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c,EAC3D,aADX,CAKJ,EAjFO,MAAMR,EAAUpR,EAAAA,WACvB,CACIqR,MAAO,CACHC,WAAY,CAAC,MAAO,QACpBO,UAAW,CAAC,eAGhBN,MAAM,CACFD,WAAY,CAAC,MAAO,MAAO,MAAO,MAAO,OACzCO,UAAW,CAAC,YAAa,YAAa,YAAa,YAAa,eAKlEV,EAA8BW,GAAyBA,EAAW9hB,KAAI+hB,GAAO,IAAMA","sources":["webpack://fieldservice-clientapp/./ClientApp/common/components/semantic-ui/components/dropdown.js","webpack://fieldservice-clientapp/./ClientApp/common/components/semantic-ui/components/transition.js","webpack://fieldservice-clientapp/./ClientApp/common/components/semantic-ui/semantic-dropdown.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/auth-api.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/aws/aws-utils.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/aws/index.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/aws/xhr_http_handler.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/base-api.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/diagnostics.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/form-utils/form-validation.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/index.ts","webpack://fieldservice-clientapp/./ClientApp/common/utils/media-utils.ts"],"sourcesContent":["/*!\r\n * # Fomantic-UI 2.8.8 - Dropdown\r\n * http://github.com/fomantic/Fomantic-UI/\r\n *\r\n *\r\n * Released under the MIT license\r\n * http://opensource.org/licenses/MIT\r\n *\r\n */\r\n\r\n(function ($, window, document, undefined) {\r\n\t\"use strict\";\r\n\r\n\t$.isFunction =\r\n\t\t$.isFunction ||\r\n\t\tfunction (obj) {\r\n\t\t\treturn typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\r\n\t\t};\r\n\r\n\twindow =\r\n\t\ttypeof window != \"undefined\" && window.Math == Math\r\n\t\t\t? window\r\n\t\t\t: typeof self != \"undefined\" && self.Math == Math\r\n\t\t\t? self\r\n\t\t\t: Function(\"return this\")();\r\n\r\n\t$.fn.suidropdown = function (parameters) {\r\n\t\tvar $allModules = $(this),\r\n\t\t\t$document = $(document),\r\n\t\t\tmoduleSelector = $allModules.selector || \"\",\r\n\t\t\thasTouch = \"ontouchstart\" in document.documentElement,\r\n\t\t\tclickEvent = hasTouch ? \"touchstart\" : \"click\",\r\n\t\t\ttime = new Date().getTime(),\r\n\t\t\tperformance = [],\r\n\t\t\tquery = arguments[0],\r\n\t\t\tmethodInvoked = typeof query == \"string\",\r\n\t\t\tqueryArguments = [].slice.call(arguments, 1),\r\n\t\t\treturnedValue;\r\n\r\n\t\t$allModules.each(function (elementIndex) {\r\n\t\t\tvar settings = $.isPlainObject(parameters)\r\n\t\t\t\t\t? $.extend(true, {}, $.fn.suidropdown.settings, parameters)\r\n\t\t\t\t\t: $.extend({}, $.fn.suidropdown.settings),\r\n\t\t\t\tclassName = settings.className,\r\n\t\t\t\tmessage = settings.message,\r\n\t\t\t\tfields = settings.fields,\r\n\t\t\t\tkeys = settings.keys,\r\n\t\t\t\tmetadata = settings.metadata,\r\n\t\t\t\tnamespace = settings.namespace,\r\n\t\t\t\tregExp = settings.regExp,\r\n\t\t\t\tselector = settings.selector,\r\n\t\t\t\terror = settings.error,\r\n\t\t\t\ttemplates = settings.templates,\r\n\t\t\t\teventNamespace = \".\" + namespace,\r\n\t\t\t\tmoduleNamespace = \"module-\" + namespace,\r\n\t\t\t\t$module = $(this),\r\n\t\t\t\t$context = $(settings.context),\r\n\t\t\t\t$text = $module.find(selector.text),\r\n\t\t\t\t$search = $module.find(selector.search),\r\n\t\t\t\t$sizer = $module.find(selector.sizer),\r\n\t\t\t\t$input = $module.find(selector.input),\r\n\t\t\t\t$icon = $module.find(selector.icon),\r\n\t\t\t\t$clear = $module.find(selector.clearIcon),\r\n\t\t\t\t$combo =\r\n\t\t\t\t\t$module.prev().find(selector.text).length > 0\r\n\t\t\t\t\t\t? $module.prev().find(selector.text)\r\n\t\t\t\t\t\t: $module.prev(),\r\n\t\t\t\t$menu = $module.children(selector.menu),\r\n\t\t\t\t$item = $menu.find(selector.item),\r\n\t\t\t\t$divider = settings.hideDividers\r\n\t\t\t\t\t? $item.parent().children(selector.divider)\r\n\t\t\t\t\t: $(),\r\n\t\t\t\tactivated = false,\r\n\t\t\t\titemActivated = false,\r\n\t\t\t\tinternalChange = false,\r\n\t\t\t\ticonClicked = false,\r\n\t\t\t\telement = this,\r\n\t\t\t\tfocused = false,\r\n\t\t\t\tinstance = $module.data(moduleNamespace),\r\n\t\t\t\tselectActionActive,\r\n\t\t\t\tinitialLoad,\r\n\t\t\t\tpageLostFocus,\r\n\t\t\t\twillRefocus,\r\n\t\t\t\telementNamespace,\r\n\t\t\t\tid,\r\n\t\t\t\tselectObserver,\r\n\t\t\t\tmenuObserver,\r\n\t\t\t\tclassObserver,\r\n\t\t\t\tmodule;\r\n\r\n\t\t\tmodule = {\r\n\t\t\t\tinitialize: function () {\r\n\t\t\t\t\tmodule.debug(\"Initializing dropdown\", settings);\r\n\r\n\t\t\t\t\tif (module.is.alreadySetup()) {\r\n\t\t\t\t\t\tmodule.setup.reference();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (settings.ignoreDiacritics && !String.prototype.normalize) {\r\n\t\t\t\t\t\t\tsettings.ignoreDiacritics = false;\r\n\t\t\t\t\t\t\tmodule.error(error.noNormalize, element);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmodule.setup.layout();\r\n\r\n\t\t\t\t\t\tif (settings.values) {\r\n\t\t\t\t\t\t\tmodule.set.initialLoad();\r\n\t\t\t\t\t\t\tmodule.change.values(settings.values);\r\n\t\t\t\t\t\t\tmodule.remove.initialLoad();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tmodule.refreshData();\r\n\r\n\t\t\t\t\t\tmodule.save.defaults();\r\n\t\t\t\t\t\tmodule.restore.selected();\r\n\r\n\t\t\t\t\t\tmodule.create.id();\r\n\t\t\t\t\t\tmodule.bind.events();\r\n\r\n\t\t\t\t\t\tmodule.observeChanges();\r\n\t\t\t\t\t\tmodule.instantiate();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tinstantiate: function () {\r\n\t\t\t\t\tmodule.verbose(\"Storing instance of dropdown\", module);\r\n\t\t\t\t\tinstance = module;\r\n\t\t\t\t\t$module.data(moduleNamespace, module);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tdestroy: function () {\r\n\t\t\t\t\tmodule.verbose(\"Destroying previous dropdown\", $module);\r\n\t\t\t\t\tmodule.remove.tabbable();\r\n\t\t\t\t\tmodule.remove.active();\r\n\t\t\t\t\t$menu.transition(\"stop all\");\r\n\t\t\t\t\t$menu.removeClass(className.visible).addClass(className.hidden);\r\n\t\t\t\t\t$module.off(eventNamespace).removeData(moduleNamespace);\r\n\t\t\t\t\t$menu.off(eventNamespace);\r\n\t\t\t\t\t$document.off(elementNamespace);\r\n\t\t\t\t\tmodule.disconnect.menuObserver();\r\n\t\t\t\t\tmodule.disconnect.selectObserver();\r\n\t\t\t\t\tmodule.disconnect.classObserver();\r\n\t\t\t\t},\r\n\r\n\t\t\t\tobserveChanges: function () {\r\n\t\t\t\t\tif (\"MutationObserver\" in window) {\r\n\t\t\t\t\t\tselectObserver = new MutationObserver(module.event.select.mutation);\r\n\t\t\t\t\t\tmenuObserver = new MutationObserver(module.event.menu.mutation);\r\n\t\t\t\t\t\tclassObserver = new MutationObserver(module.event.class.mutation);\r\n\t\t\t\t\t\tmodule.debug(\r\n\t\t\t\t\t\t\t\"Setting up mutation observer\",\r\n\t\t\t\t\t\t\tselectObserver,\r\n\t\t\t\t\t\t\tmenuObserver,\r\n\t\t\t\t\t\t\tclassObserver\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tmodule.observe.select();\r\n\t\t\t\t\t\tmodule.observe.menu();\r\n\t\t\t\t\t\tmodule.observe.class();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tdisconnect: {\r\n\t\t\t\t\tmenuObserver: function () {\r\n\t\t\t\t\t\tif (menuObserver) {\r\n\t\t\t\t\t\t\tmenuObserver.disconnect();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tselectObserver: function () {\r\n\t\t\t\t\t\tif (selectObserver) {\r\n\t\t\t\t\t\t\tselectObserver.disconnect();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclassObserver: function () {\r\n\t\t\t\t\t\tif (classObserver) {\r\n\t\t\t\t\t\t\tclassObserver.disconnect();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\tobserve: {\r\n\t\t\t\t\tselect: function () {\r\n\t\t\t\t\t\tif (module.has.input() && selectObserver) {\r\n\t\t\t\t\t\t\tselectObserver.observe($module[0], {\r\n\t\t\t\t\t\t\t\tchildList: true,\r\n\t\t\t\t\t\t\t\tsubtree: true,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmenu: function () {\r\n\t\t\t\t\t\tif (module.has.menu() && menuObserver) {\r\n\t\t\t\t\t\t\tmenuObserver.observe($menu[0], {\r\n\t\t\t\t\t\t\t\tchildList: true,\r\n\t\t\t\t\t\t\t\tsubtree: true,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclass: function () {\r\n\t\t\t\t\t\tif (module.has.search() && classObserver) {\r\n\t\t\t\t\t\t\tclassObserver.observe($module[0], {\r\n\t\t\t\t\t\t\t\tattributes: true,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tcreate: {\r\n\t\t\t\t\tid: function () {\r\n\t\t\t\t\t\tid = (Math.random().toString(16) + \"000000000\").substr(2, 8);\r\n\t\t\t\t\t\telementNamespace = \".\" + id;\r\n\t\t\t\t\t\tmodule.verbose(\"Creating unique id for element\", id);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tuserChoice: function (values) {\r\n\t\t\t\t\t\tvar $userChoices, $userChoice, isUserValue, html;\r\n\t\t\t\t\t\tvalues = values || module.get.userValues();\r\n\t\t\t\t\t\tif (!values) {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvalues = Array.isArray(values) ? values : [values];\r\n\t\t\t\t\t\t$.each(values, function (index, value) {\r\n\t\t\t\t\t\t\tif (module.get.item(value) === false) {\r\n\t\t\t\t\t\t\t\thtml = settings.templates.addition(\r\n\t\t\t\t\t\t\t\t\tmodule.add.variables(message.addResult, value)\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t$userChoice = $(\"
\")\r\n\t\t\t\t\t\t\t\t\t.html(html)\r\n\t\t\t\t\t\t\t\t\t.attr(\"data-\" + metadata.value, value)\r\n\t\t\t\t\t\t\t\t\t.attr(\"data-\" + metadata.text, value)\r\n\t\t\t\t\t\t\t\t\t.addClass(className.addition)\r\n\t\t\t\t\t\t\t\t\t.addClass(className.item);\r\n\t\t\t\t\t\t\t\tif (settings.hideAdditions) {\r\n\t\t\t\t\t\t\t\t\t$userChoice.addClass(className.hidden);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t$userChoices =\r\n\t\t\t\t\t\t\t\t\t$userChoices === undefined\r\n\t\t\t\t\t\t\t\t\t\t? $userChoice\r\n\t\t\t\t\t\t\t\t\t\t: $userChoices.add($userChoice);\r\n\t\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\t\"Creating user choices for value\",\r\n\t\t\t\t\t\t\t\t\tvalue,\r\n\t\t\t\t\t\t\t\t\t$userChoice\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn $userChoices;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tuserLabels: function (value) {\r\n\t\t\t\t\t\tvar userValues = module.get.userValues();\r\n\t\t\t\t\t\tif (userValues) {\r\n\t\t\t\t\t\t\tmodule.debug(\"Adding user labels\", userValues);\r\n\t\t\t\t\t\t\t$.each(userValues, function (index, value) {\r\n\t\t\t\t\t\t\t\tmodule.verbose(\"Adding custom user value\");\r\n\t\t\t\t\t\t\t\tmodule.add.label(value, value);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmenu: function () {\r\n\t\t\t\t\t\t$menu = $(\"
\").addClass(className.menu).appendTo($module);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsizer: function () {\r\n\t\t\t\t\t\t$sizer = $(\"\")\r\n\t\t\t\t\t\t\t.addClass(className.sizer)\r\n\t\t\t\t\t\t\t.insertAfter($search);\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tsearch: function (query) {\r\n\t\t\t\t\tquery = query !== undefined ? query : module.get.query();\r\n\t\t\t\t\tmodule.verbose(\"Searching for query\", query);\r\n\t\t\t\t\tif (settings.fireOnInit === false && module.is.initialLoad()) {\r\n\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\"Skipping callback on initial load\",\r\n\t\t\t\t\t\t\tsettings.onSearch\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t} else if (\r\n\t\t\t\t\t\tmodule.has.minCharacters(query) &&\r\n\t\t\t\t\t\tsettings.onSearch.call(element, query) !== false\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tmodule.filter(query);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmodule.hide(null, true);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tselect: {\r\n\t\t\t\t\tfirstUnfiltered: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Selecting first non-filtered element\");\r\n\t\t\t\t\t\tmodule.remove.selectedItem();\r\n\t\t\t\t\t\t$item\r\n\t\t\t\t\t\t\t.not(selector.unselectable)\r\n\t\t\t\t\t\t\t.not(selector.addition + selector.hidden)\r\n\t\t\t\t\t\t\t.eq(0)\r\n\t\t\t\t\t\t\t.addClass(className.selected);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tnextAvailable: function ($selected) {\r\n\t\t\t\t\t\t$selected = $selected.eq(0);\r\n\t\t\t\t\t\tvar $nextAvailable = $selected\r\n\t\t\t\t\t\t\t\t.nextAll(selector.item)\r\n\t\t\t\t\t\t\t\t.not(selector.unselectable)\r\n\t\t\t\t\t\t\t\t.eq(0),\r\n\t\t\t\t\t\t\t$prevAvailable = $selected\r\n\t\t\t\t\t\t\t\t.prevAll(selector.item)\r\n\t\t\t\t\t\t\t\t.not(selector.unselectable)\r\n\t\t\t\t\t\t\t\t.eq(0),\r\n\t\t\t\t\t\t\thasNext = $nextAvailable.length > 0;\r\n\t\t\t\t\t\tif (hasNext) {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Moving selection to\", $nextAvailable);\r\n\t\t\t\t\t\t\t$nextAvailable.addClass(className.selected);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Moving selection to\", $prevAvailable);\r\n\t\t\t\t\t\t\t$prevAvailable.addClass(className.selected);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tsetup: {\r\n\t\t\t\t\tapi: function () {\r\n\t\t\t\t\t\tvar apiSettings = {\r\n\t\t\t\t\t\t\tdebug: settings.debug,\r\n\t\t\t\t\t\t\turlData: {\r\n\t\t\t\t\t\t\t\tvalue: module.get.value(),\r\n\t\t\t\t\t\t\t\tquery: module.get.query(),\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\ton: false,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tmodule.verbose(\"First request, initializing API\");\r\n\t\t\t\t\t\t$module.api(apiSettings);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tlayout: function () {\r\n\t\t\t\t\t\tif ($module.is(\"select\")) {\r\n\t\t\t\t\t\t\tmodule.setup.select();\r\n\t\t\t\t\t\t\tmodule.setup.returnedObject();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!module.has.menu()) {\r\n\t\t\t\t\t\t\tmodule.create.menu();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (module.is.clearable() && !module.has.clearItem()) {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Adding clear icon\");\r\n\t\t\t\t\t\t\t$clear = $(\"\").addClass(\"remove icon\").insertBefore($text);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (module.is.search() && !module.has.search()) {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Adding search input\");\r\n\t\t\t\t\t\t\t$search = $(\"\")\r\n\t\t\t\t\t\t\t\t.addClass(className.search)\r\n\t\t\t\t\t\t\t\t.prop(\r\n\t\t\t\t\t\t\t\t\t\"autocomplete\",\r\n\t\t\t\t\t\t\t\t\tmodule.is.chrome() ? \"fomantic-search\" : \"off\"\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.insertBefore($text);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tmodule.is.multiple() &&\r\n\t\t\t\t\t\t\tmodule.is.searchSelection() &&\r\n\t\t\t\t\t\t\t!module.has.sizer()\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tmodule.create.sizer();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (settings.allowTab) {\r\n\t\t\t\t\t\t\tmodule.set.tabbable();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tselect: function () {\r\n\t\t\t\t\t\tvar selectValues = module.get.selectValues();\r\n\t\t\t\t\t\tmodule.debug(\"Dropdown initialized on a select\", selectValues);\r\n\t\t\t\t\t\tif ($module.is(\"select\")) {\r\n\t\t\t\t\t\t\t$input = $module;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// see if select is placed correctly already\r\n\t\t\t\t\t\tif ($input.parent(selector.dropdown).length > 0) {\r\n\t\t\t\t\t\t\tmodule.debug(\r\n\t\t\t\t\t\t\t\t\"UI dropdown already exists. Creating dropdown menu only\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t$module = $input.closest(selector.dropdown);\r\n\t\t\t\t\t\t\tif (!module.has.menu()) {\r\n\t\t\t\t\t\t\t\tmodule.create.menu();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$menu = $module.children(selector.menu);\r\n\t\t\t\t\t\t\tmodule.setup.menu(selectValues);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.debug(\"Creating entire dropdown from select\");\r\n\t\t\t\t\t\t\t$module = $(\"
\")\r\n\t\t\t\t\t\t\t\t.attr(\"class\", $input.attr(\"class\"))\r\n\t\t\t\t\t\t\t\t.addClass(className.selection)\r\n\t\t\t\t\t\t\t\t.addClass(className.dropdown) \r\n\t\t\t\t\t\t\t\t.html(\r\n\t\t\t\t\t\t\t\t\ttemplates.dropdown(\r\n\t\t\t\t\t\t\t\t\t\tselectValues,\r\n\t\t\t\t\t\t\t\t\t\tfields,\r\n\t\t\t\t\t\t\t\t\t\tsettings.preserveHTML,\r\n\t\t\t\t\t\t\t\t\t\tsettings.className\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.insertBefore($input);\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t$input.hasClass(className.multiple) &&\r\n\t\t\t\t\t\t\t\t$input.prop(\"multiple\") === false\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tmodule.error(error.missingMultiple);\r\n\t\t\t\t\t\t\t\t$input.prop(\"multiple\", true);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($input.is(\"[multiple]\")) {\r\n\t\t\t\t\t\t\t\tmodule.set.multiple();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif ($input.prop(\"disabled\")) {\r\n\t\t\t\t\t\t\t\tmodule.debug(\"Disabling dropdown\");\r\n\t\t\t\t\t\t\t\t$module.addClass(className.disabled);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$input\r\n\t\t\t\t\t\t\t\t.removeAttr(\"required\")\r\n\t\t\t\t\t\t\t\t.removeAttr(\"class\")\r\n\t\t\t\t\t\t\t\t.detach()\r\n\t\t\t\t\t\t\t\t.prependTo($module);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmodule.refresh();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmenu: function (values) {\r\n\t\t\t\t\t\t$menu.html(\r\n\t\t\t\t\t\t\ttemplates.menu(\r\n\t\t\t\t\t\t\t\tvalues,\r\n\t\t\t\t\t\t\t\tfields,\r\n\t\t\t\t\t\t\t\tsettings.preserveHTML,\r\n\t\t\t\t\t\t\t\tsettings.className\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t$item = $menu.find(selector.item);\r\n\t\t\t\t\t\t$divider = settings.hideDividers\r\n\t\t\t\t\t\t\t? $item.parent().children(selector.divider)\r\n\t\t\t\t\t\t\t: $();\r\n\t\t\t\t\t},\r\n\t\t\t\t\treference: function () {\r\n\t\t\t\t\t\tmodule.debug(\r\n\t\t\t\t\t\t\t\"Dropdown behavior was called on select, replacing with closest dropdown\"\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\t// replace module reference\r\n\t\t\t\t\t\t$module = $module.parent(selector.dropdown);\r\n\t\t\t\t\t\tinstance = $module.data(moduleNamespace);\r\n\t\t\t\t\t\telement = $module.get(0);\r\n\t\t\t\t\t\tmodule.refresh();\r\n\t\t\t\t\t\tmodule.setup.returnedObject();\r\n\t\t\t\t\t},\r\n\t\t\t\t\treturnedObject: function () {\r\n\t\t\t\t\t\tvar $firstModules = $allModules.slice(0, elementIndex),\r\n\t\t\t\t\t\t\t$lastModules = $allModules.slice(elementIndex + 1);\r\n\t\t\t\t\t\t// adjust all modules to use correct reference\r\n\t\t\t\t\t\t$allModules = $firstModules.add($module).add($lastModules);\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\trefresh: function () {\r\n\t\t\t\t\tmodule.refreshSelectors();\r\n\t\t\t\t\tmodule.refreshData();\r\n\t\t\t\t},\r\n\r\n\t\t\t\trefreshItems: function () {\r\n\t\t\t\t\t$item = $menu.find(selector.item);\r\n\t\t\t\t\t$divider = settings.hideDividers\r\n\t\t\t\t\t\t? $item.parent().children(selector.divider)\r\n\t\t\t\t\t\t: $();\r\n\t\t\t\t},\r\n\r\n\t\t\t\trefreshSelectors: function () {\r\n\t\t\t\t\tmodule.verbose(\"Refreshing selector cache\");\r\n\t\t\t\t\t$text = $module.find(selector.text);\r\n\t\t\t\t\t$search = $module.find(selector.search);\r\n\t\t\t\t\t$input = $module.find(selector.input);\r\n\t\t\t\t\t$icon = $module.find(selector.icon);\r\n\t\t\t\t\t$combo =\r\n\t\t\t\t\t\t$module.prev().find(selector.text).length > 0\r\n\t\t\t\t\t\t\t? $module.prev().find(selector.text)\r\n\t\t\t\t\t\t\t: $module.prev();\r\n\t\t\t\t\t$menu = $module.children(selector.menu);\r\n\t\t\t\t\t$item = $menu.find(selector.item);\r\n\t\t\t\t\t$divider = settings.hideDividers\r\n\t\t\t\t\t\t? $item.parent().children(selector.divider)\r\n\t\t\t\t\t\t: $();\r\n\t\t\t\t},\r\n\r\n\t\t\t\trefreshData: function () {\r\n\t\t\t\t\tmodule.verbose(\"Refreshing cached metadata\");\r\n\t\t\t\t\t$item.removeData(metadata.text).removeData(metadata.value);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tclearData: function () {\r\n\t\t\t\t\tmodule.verbose(\"Clearing metadata\");\r\n\t\t\t\t\t$item.removeData(metadata.text).removeData(metadata.value);\r\n\t\t\t\t\t$module\r\n\t\t\t\t\t\t.removeData(metadata.defaultText)\r\n\t\t\t\t\t\t.removeData(metadata.defaultValue)\r\n\t\t\t\t\t\t.removeData(metadata.placeholderText);\r\n\t\t\t\t},\r\n\r\n\t\t\t\tclearItems: function () {\r\n\t\t\t\t\t$menu.empty();\r\n\t\t\t\t\tmodule.refreshItems();\r\n\t\t\t\t},\r\n\r\n\t\t\t\ttoggle: function () {\r\n\t\t\t\t\tmodule.verbose(\"Toggling menu visibility\");\r\n\t\t\t\t\tif (!module.is.active()) {\r\n\t\t\t\t\t\tmodule.show();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmodule.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tshow: function (callback, preventFocus) {\r\n\t\t\t\t\tcallback = $.isFunction(callback) ? callback : function () {};\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\t(focused || iconClicked) &&\r\n\t\t\t\t\t\tmodule.is.remote() &&\r\n\t\t\t\t\t\tmodule.is.noApiCache()\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tmodule.clearItems();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!module.can.show() && module.is.remote()) {\r\n\t\t\t\t\t\tmodule.debug(\"No API results retrieved, searching before show\");\r\n\t\t\t\t\t\tmodule.queryRemote(module.get.query(), module.show, [\r\n\t\t\t\t\t\t\tcallback,\r\n\t\t\t\t\t\t\tpreventFocus,\r\n\t\t\t\t\t\t]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (module.can.show() && !module.is.active()) {\r\n\t\t\t\t\t\tmodule.debug(\"Showing dropdown\");\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tmodule.has.message() &&\r\n\t\t\t\t\t\t\t!(module.has.maxSelections() || module.has.allResultsFiltered())\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tmodule.remove.message();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (module.is.allFiltered()) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (settings.onShow.call(element) !== false) {\r\n\t\t\t\t\t\t\tmodule.animate.show(function () {\r\n\t\t\t\t\t\t\t\tif (module.can.click()) {\r\n\t\t\t\t\t\t\t\t\tmodule.bind.intent();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (module.has.search() && !preventFocus) {\r\n\t\t\t\t\t\t\t\t\tmodule.focusSearch();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tmodule.set.visible();\r\n\t\t\t\t\t\t\t\tcallback.call(element);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\thide: function (callback, preventBlur) {\r\n\t\t\t\t\tcallback = $.isFunction(callback) ? callback : function () {};\r\n\t\t\t\t\tif (module.is.active() && !module.is.animatingOutward()) {\r\n\t\t\t\t\t\tmodule.debug(\"Hiding dropdown\");\r\n\t\t\t\t\t\tif (settings.onHide.call(element) !== false) {\r\n\t\t\t\t\t\t\tmodule.animate.hide(function () {\r\n\t\t\t\t\t\t\t\tmodule.remove.visible();\r\n\t\t\t\t\t\t\t\t// hiding search focus\r\n\t\t\t\t\t\t\t\tif (module.is.focusedOnSearch() && preventBlur !== true) {\r\n\t\t\t\t\t\t\t\t\t$search.blur();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tcallback.call(element);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (module.can.click()) {\r\n\t\t\t\t\t\tmodule.unbind.intent();\r\n\t\t\t\t\t}\r\n\t\t\t\t\ticonClicked = false;\r\n\t\t\t\t\tfocused = false;\r\n\t\t\t\t},\r\n\r\n\t\t\t\thideOthers: function () {\r\n\t\t\t\t\tmodule.verbose(\"Finding other dropdowns to hide\");\r\n\t\t\t\t\t$allModules\r\n\t\t\t\t\t\t.not($module)\r\n\t\t\t\t\t\t.has(selector.menu + \".\" + className.visible)\r\n\t\t\t\t\t\t.suidropdown(\"hide\");\r\n\t\t\t\t},\r\n\r\n\t\t\t\thideMenu: function () {\r\n\t\t\t\t\tmodule.verbose(\"Hiding menu instantaneously\");\r\n\t\t\t\t\tmodule.remove.active();\r\n\t\t\t\t\tmodule.remove.visible();\r\n\t\t\t\t\t$menu.transition(\"hide\");\r\n\t\t\t\t},\r\n\r\n\t\t\t\thideSubMenus: function () {\r\n\t\t\t\t\tvar $subMenus = $menu.children(selector.item).find(selector.menu);\r\n\t\t\t\t\tmodule.verbose(\"Hiding sub menus\", $subMenus);\r\n\t\t\t\t\t$subMenus.transition(\"hide\");\r\n\t\t\t\t},\r\n\r\n\t\t\t\tbind: {\r\n\t\t\t\t\tevents: function () {\r\n\t\t\t\t\t\tmodule.bind.keyboardEvents();\r\n\t\t\t\t\t\tmodule.bind.inputEvents();\r\n\t\t\t\t\t\tmodule.bind.mouseEvents();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tkeyboardEvents: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Binding keyboard events\");\r\n\t\t\t\t\t\t$module.on(\"keydown\" + eventNamespace, module.event.keydown);\r\n\t\t\t\t\t\tif (module.has.search()) {\r\n\t\t\t\t\t\t\t$module.on(\r\n\t\t\t\t\t\t\t\tmodule.get.inputEvent() + eventNamespace,\r\n\t\t\t\t\t\t\t\tselector.search,\r\n\t\t\t\t\t\t\t\tmodule.event.input\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (module.is.multiple()) {\r\n\t\t\t\t\t\t\t$document.on(\r\n\t\t\t\t\t\t\t\t\"keydown\" + elementNamespace,\r\n\t\t\t\t\t\t\t\tmodule.event.document.keydown\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinputEvents: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Binding input change events\");\r\n\t\t\t\t\t\t$module.on(\r\n\t\t\t\t\t\t\t\"change\" + eventNamespace,\r\n\t\t\t\t\t\t\tselector.input,\r\n\t\t\t\t\t\t\tmodule.event.change\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmouseEvents: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Binding mouse events\");\r\n\t\t\t\t\t\tif (module.is.multiple()) {\r\n\t\t\t\t\t\t\t$module\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.label,\r\n\t\t\t\t\t\t\t\t\tmodule.event.label.click\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.remove,\r\n\t\t\t\t\t\t\t\t\tmodule.event.remove.click\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (module.is.searchSelection()) {\r\n\t\t\t\t\t\t\t$module\r\n\t\t\t\t\t\t\t\t.on(\"mousedown\" + eventNamespace, module.event.mousedown)\r\n\t\t\t\t\t\t\t\t.on(\"mouseup\" + eventNamespace, module.event.mouseup)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\t\"mousedown\" + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.menu,\r\n\t\t\t\t\t\t\t\t\tmodule.event.menu.mousedown\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\t\"mouseup\" + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.menu,\r\n\t\t\t\t\t\t\t\t\tmodule.event.menu.mouseup\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.icon,\r\n\t\t\t\t\t\t\t\t\tmodule.event.icon.click\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.clearIcon,\r\n\t\t\t\t\t\t\t\t\tmodule.event.clearIcon.click\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\t\"focus\" + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.search,\r\n\t\t\t\t\t\t\t\t\tmodule.event.search.focus\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.search,\r\n\t\t\t\t\t\t\t\t\tmodule.event.search.focus\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\t\"blur\" + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.search,\r\n\t\t\t\t\t\t\t\t\tmodule.event.search.blur\r\n\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.text,\r\n\t\t\t\t\t\t\t\t\tmodule.event.text.focus\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tif (module.is.multiple()) {\r\n\t\t\t\t\t\t\t\t$module\r\n\t\t\t\t\t\t\t\t\t.on(clickEvent + eventNamespace, module.event.click)\r\n\t\t\t\t\t\t\t\t\t.on(clickEvent + eventNamespace, module.event.search.focus);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tif (settings.on == \"click\") {\r\n\t\t\t\t\t\t\t\t$module\r\n\t\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\t\tselector.icon,\r\n\t\t\t\t\t\t\t\t\t\tmodule.event.icon.click\r\n\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t.on(clickEvent + eventNamespace, module.event.test.toggle);\r\n\t\t\t\t\t\t\t} else if (settings.on == \"hover\") {\r\n\t\t\t\t\t\t\t\t$module\r\n\t\t\t\t\t\t\t\t\t.on(\"mouseenter\" + eventNamespace, module.delay.show)\r\n\t\t\t\t\t\t\t\t\t.on(\"mouseleave\" + eventNamespace, module.delay.hide);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$module.on(settings.on + eventNamespace, module.toggle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t$module\r\n\t\t\t\t\t\t\t\t.on(\"mousedown\" + eventNamespace, module.event.mousedown)\r\n\t\t\t\t\t\t\t\t.on(\"mouseup\" + eventNamespace, module.event.mouseup)\r\n\t\t\t\t\t\t\t\t.on(\"focus\" + eventNamespace, module.event.focus)\r\n\t\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\tclickEvent + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.clearIcon,\r\n\t\t\t\t\t\t\t\t\tmodule.event.clearIcon.click\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tif (module.has.menuSearch()) {\r\n\t\t\t\t\t\t\t\t$module.on(\r\n\t\t\t\t\t\t\t\t\t\"blur\" + eventNamespace,\r\n\t\t\t\t\t\t\t\t\tselector.search,\r\n\t\t\t\t\t\t\t\t\tmodule.event.search.blur\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$module.on(\"blur\" + eventNamespace, module.event.blur);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$menu\r\n\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t(hasTouch ? \"touchstart\" : \"mouseenter\") + eventNamespace,\r\n\t\t\t\t\t\t\t\tselector.item,\r\n\t\t\t\t\t\t\t\tmodule.event.item.mouseenter\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\"mouseleave\" + eventNamespace,\r\n\t\t\t\t\t\t\t\tselector.item,\r\n\t\t\t\t\t\t\t\tmodule.event.item.mouseleave\r\n\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t.on(\r\n\t\t\t\t\t\t\t\t\"click\" + eventNamespace,\r\n\t\t\t\t\t\t\t\tselector.item,\r\n\t\t\t\t\t\t\t\tmodule.event.item.click\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tintent: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Binding hide intent event to document\");\r\n\t\t\t\t\t\tif (hasTouch) {\r\n\t\t\t\t\t\t\t$document\r\n\t\t\t\t\t\t\t\t.on(\"touchstart\" + elementNamespace, module.event.test.touch)\r\n\t\t\t\t\t\t\t\t.on(\"touchmove\" + elementNamespace, module.event.test.touch);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$document.on(clickEvent + elementNamespace, module.event.test.hide);\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tunbind: {\r\n\t\t\t\t\tintent: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Removing hide intent event from document\");\r\n\t\t\t\t\t\tif (hasTouch) {\r\n\t\t\t\t\t\t\t$document\r\n\t\t\t\t\t\t\t\t.off(\"touchstart\" + elementNamespace)\r\n\t\t\t\t\t\t\t\t.off(\"touchmove\" + elementNamespace);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$document.off(clickEvent + elementNamespace);\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tfilter: function (query) {\r\n\t\t\t\t\tvar searchTerm = query !== undefined ? query : module.get.query(),\r\n\t\t\t\t\t\tafterFiltered = function () {\r\n\t\t\t\t\t\t\tif (module.is.multiple()) {\r\n\t\t\t\t\t\t\t\tmodule.filterActive();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (query || (!query && module.get.activeItem().length == 0)) {\r\n\t\t\t\t\t\t\t\tmodule.select.firstUnfiltered();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (module.has.allResultsFiltered()) {\r\n\t\t\t\t\t\t\t\tif (settings.onNoResults.call(element, searchTerm)) {\r\n\t\t\t\t\t\t\t\t\tif (settings.allowAdditions) {\r\n\t\t\t\t\t\t\t\t\t\tif (settings.hideAdditions) {\r\n\t\t\t\t\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\"User addition with no menu, setting empty style\"\r\n\t\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\t\tmodule.set.empty();\r\n\t\t\t\t\t\t\t\t\t\t\tmodule.hideMenu();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\t\t\t\"All items filtered, showing message\",\r\n\t\t\t\t\t\t\t\t\t\t\tsearchTerm\r\n\t\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\t\tmodule.add.message(message.noResults);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\t\t\"All items filtered, hiding dropdown\",\r\n\t\t\t\t\t\t\t\t\t\tsearchTerm\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\tmodule.hideMenu();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmodule.remove.empty();\r\n\t\t\t\t\t\t\t\tmodule.remove.message();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (settings.allowAdditions) { \r\n\t\t\t\t\t\t\t\tmodule.add.userSuggestion(module.escape.htmlEntities(query));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tmodule.is.searchSelection() &&\r\n\t\t\t\t\t\t\t\tmodule.can.show() &&\r\n\t\t\t\t\t\t\t\tmodule.is.focusedOnSearch()\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tmodule.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\tif (settings.useLabels && module.has.maxSelections()) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (settings.apiSettings) {\r\n\t\t\t\t\t\tif (module.can.useAPI()) {\r\n\t\t\t\t\t\t\tmodule.queryRemote(searchTerm, function () {\r\n\t\t\t\t\t\t\t\tif (settings.filterRemoteData) {\r\n\t\t\t\t\t\t\t\t\tmodule.filterItems(searchTerm);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tvar preSelected = $input.val();\r\n\t\t\t\t\t\t\t\tif (!Array.isArray(preSelected)) {\r\n\t\t\t\t\t\t\t\t\tpreSelected =\r\n\t\t\t\t\t\t\t\t\t\tpreSelected && preSelected !== \"\"\r\n\t\t\t\t\t\t\t\t\t\t\t? preSelected.split(settings.delimiter)\r\n\t\t\t\t\t\t\t\t\t\t\t: [];\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tif (module.is.multiple()) {\r\n\t\t\t\t\t\t\t\t\t$.each(preSelected, function (index, value) {\r\n\t\t\t\t\t\t\t\t\t\t$item\r\n\t\t\t\t\t\t\t\t\t\t\t.filter('[data-value=\"' + value + '\"]')\r\n\t\t\t\t\t\t\t\t\t\t\t.addClass(className.filtered);\r\n\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tmodule.focusSearch(true);\r\n\t\t\t\t\t\t\t\tafterFiltered();\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.error(error.noAPI);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmodule.filterItems(searchTerm);\r\n\t\t\t\t\t\tafterFiltered();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tqueryRemote: function (query, callback, callbackParameters) {\r\n\t\t\t\t\tif (!Array.isArray(callbackParameters)) {\r\n\t\t\t\t\t\tcallbackParameters = [callbackParameters];\r\n\t\t\t\t\t}\r\n\t\t\t\t\tvar apiSettings = {\r\n\t\t\t\t\t\terrorDuration: false,\r\n\t\t\t\t\t\tcache: \"local\",\r\n\t\t\t\t\t\tthrottle: settings.throttle,\r\n\t\t\t\t\t\turlData: {\r\n\t\t\t\t\t\t\tquery: query,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tonError: function () {\r\n\t\t\t\t\t\t\tmodule.add.message(message.serverError);\r\n\t\t\t\t\t\t\ticonClicked = false;\r\n\t\t\t\t\t\t\tfocused = false;\r\n\t\t\t\t\t\t\tcallback.apply(null, callbackParameters);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tonFailure: function () {\r\n\t\t\t\t\t\t\tmodule.add.message(message.serverError);\r\n\t\t\t\t\t\t\ticonClicked = false;\r\n\t\t\t\t\t\t\tfocused = false;\r\n\t\t\t\t\t\t\tcallback.apply(null, callbackParameters);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tonSuccess: function (response) {\r\n\t\t\t\t\t\t\tvar values = response[fields.remoteValues];\r\n\t\t\t\t\t\t\tif (!Array.isArray(values)) {\r\n\t\t\t\t\t\t\t\tvalues = [];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmodule.remove.message();\r\n\t\t\t\t\t\t\tvar menuConfig = {};\r\n\t\t\t\t\t\t\tmenuConfig[fields.values] = values;\r\n\t\t\t\t\t\t\tmodule.setup.menu(menuConfig);\r\n\r\n\t\t\t\t\t\t\tif (values.length === 0 && !settings.allowAdditions) {\r\n\t\t\t\t\t\t\t\tmodule.add.message(message.noResults);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tvar value = module.is.multiple()\r\n\t\t\t\t\t\t\t\t\t? module.get.values()\r\n\t\t\t\t\t\t\t\t\t: module.get.value();\r\n\t\t\t\t\t\t\t\tif (value !== \"\") {\r\n\t\t\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\t\t\"Value(s) present after click icon, select value(s) in items\"\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t\tmodule.set.selected(value, null, null, true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\ticonClicked = false;\r\n\t\t\t\t\t\t\tfocused = false;\r\n\t\t\t\t\t\t\tcallback.apply(null, callbackParameters);\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t};\r\n\t\t\t\t\tif (!$module.api(\"get request\")) {\r\n\t\t\t\t\t\tmodule.setup.api();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tapiSettings = $.extend(true, {}, apiSettings, settings.apiSettings);\r\n\t\t\t\t\t$module.api(\"setting\", apiSettings).api(\"query\");\r\n\t\t\t\t},\r\n\r\n\t\t\t\tfilterItems: function (query) {\r\n\t\t\t\t\tvar searchTerm = module.remove.diacritics(\r\n\t\t\t\t\t\t\tquery !== undefined ? query : module.get.query()\r\n\t\t\t\t\t\t),\r\n\t\t\t\t\t\tresults = null,\r\n\t\t\t\t\t\tescapedTerm = module.escape.string(searchTerm),\r\n\t\t\t\t\t\tregExpFlags = (settings.ignoreSearchCase ? \"i\" : \"\") + \"gm\",\r\n\t\t\t\t\t\tbeginsWithRegExp = new RegExp(\"^\" + escapedTerm, regExpFlags);\r\n\t\t\t\t\t// avoid loop if we're matching nothing\r\n\t\t\t\t\tif (module.has.query()) {\r\n\t\t\t\t\t\tresults = [];\r\n\r\n\t\t\t\t\t\tmodule.verbose(\"Searching for matching values\", searchTerm);\r\n\t\t\t\t\t\t$item.each(function () {\r\n\t\t\t\t\t\t\tvar $choice = $(this),\r\n\t\t\t\t\t\t\t\ttext,\r\n\t\t\t\t\t\t\t\tvalue;\r\n\t\t\t\t\t\t\tif ($choice.hasClass(className.unfilterable)) {\r\n\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (settings.match === \"both\" || settings.match === \"text\") {\r\n\t\t\t\t\t\t\t\ttext = module.remove.diacritics(\r\n\t\t\t\t\t\t\t\t\tString(module.get.choiceText($choice, false))\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tif (text.search(beginsWithRegExp) !== -1) {\r\n\t\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t\t\tsettings.fullTextSearch === \"exact\" &&\r\n\t\t\t\t\t\t\t\t\tmodule.exactSearch(searchTerm, text)\r\n\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t\t\tsettings.fullTextSearch === true &&\r\n\t\t\t\t\t\t\t\t\tmodule.fuzzySearch(searchTerm, text)\r\n\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (settings.match === \"both\" || settings.match === \"value\") {\r\n\t\t\t\t\t\t\t\tvalue = module.remove.diacritics(\r\n\t\t\t\t\t\t\t\t\tString(module.get.choiceValue($choice, text))\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tif (value.search(beginsWithRegExp) !== -1) {\r\n\t\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t\t\tsettings.fullTextSearch === \"exact\" &&\r\n\t\t\t\t\t\t\t\t\tmodule.exactSearch(searchTerm, value)\r\n\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t\t\tsettings.fullTextSearch === true &&\r\n\t\t\t\t\t\t\t\t\tmodule.fuzzySearch(searchTerm, value)\r\n\t\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t\tresults.push(this);\r\n\t\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmodule.debug(\"Showing only matched items\", searchTerm);\r\n\t\t\t\t\tmodule.remove.filteredItem();\r\n\t\t\t\t\tif (results) {\r\n\t\t\t\t\t\t$item.not(results).addClass(className.filtered);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (!module.has.query()) {\r\n\t\t\t\t\t\t$divider.removeClass(className.hidden);\r\n\t\t\t\t\t} else if (settings.hideDividers === true) {\r\n\t\t\t\t\t\t$divider.addClass(className.hidden);\r\n\t\t\t\t\t} else if (settings.hideDividers === \"empty\") {\r\n\t\t\t\t\t\t$divider\r\n\t\t\t\t\t\t\t.removeClass(className.hidden)\r\n\t\t\t\t\t\t\t.filter(function () {\r\n\t\t\t\t\t\t\t\t// First find the last divider in this divider group\r\n\t\t\t\t\t\t\t\t// Dividers which are direct siblings are considered a group\r\n\t\t\t\t\t\t\t\tvar lastDivider = $(this).nextUntil(selector.item);\r\n\r\n\t\t\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t\t\t// Hide divider if no items are found\r\n\t\t\t\t\t\t\t\t\t(lastDivider.length ? lastDivider : $(this))\r\n\t\t\t\t\t\t\t\t\t\t// Count all non-filtered items until the next divider (or end of the dropdown)\r\n\t\t\t\t\t\t\t\t\t\t.nextUntil(selector.divider)\r\n\t\t\t\t\t\t\t\t\t\t.filter(selector.item + \":not(.\" + className.filtered + \")\")\r\n\t\t\t\t\t\t\t\t\t\t.length === 0\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t.addClass(className.hidden);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tfuzzySearch: function (query, term) {\r\n\t\t\t\t\tvar termLength = term.length,\r\n\t\t\t\t\t\tqueryLength = query.length;\r\n\t\t\t\t\tquery = settings.ignoreSearchCase ? query.toLowerCase() : query;\r\n\t\t\t\t\tterm = settings.ignoreSearchCase ? term.toLowerCase() : term;\r\n\t\t\t\t\tif (queryLength > termLength) {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (queryLength === termLength) {\r\n\t\t\t\t\t\treturn query === term;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsearch: for (\r\n\t\t\t\t\t\tvar characterIndex = 0, nextCharacterIndex = 0;\r\n\t\t\t\t\t\tcharacterIndex < queryLength;\r\n\t\t\t\t\t\tcharacterIndex++\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tvar queryCharacter = query.charCodeAt(characterIndex);\r\n\t\t\t\t\t\twhile (nextCharacterIndex < termLength) {\r\n\t\t\t\t\t\t\tif (term.charCodeAt(nextCharacterIndex++) === queryCharacter) {\r\n\t\t\t\t\t\t\t\tcontinue search;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t},\r\n\t\t\t\texactSearch: function (query, term) {\r\n\t\t\t\t\tquery = settings.ignoreSearchCase ? query.toLowerCase() : query;\r\n\t\t\t\t\tterm = settings.ignoreSearchCase ? term.toLowerCase() : term;\r\n\t\t\t\t\treturn term.indexOf(query) > -1;\r\n\t\t\t\t},\r\n\t\t\t\tfilterActive: function () {\r\n\t\t\t\t\tif (settings.useLabels) {\r\n\t\t\t\t\t\t$item.filter(\".\" + className.active).addClass(className.filtered);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tfocusSearch: function (skipHandler) {\r\n\t\t\t\t\tif (module.has.search() && !module.is.focusedOnSearch()) {\r\n\t\t\t\t\t\tif (skipHandler) {\r\n\t\t\t\t\t\t\t$module.off(\"focus\" + eventNamespace, selector.search);\r\n\t\t\t\t\t\t\t$search.focus();\r\n\t\t\t\t\t\t\t$module.on(\r\n\t\t\t\t\t\t\t\t\"focus\" + eventNamespace,\r\n\t\t\t\t\t\t\t\tselector.search,\r\n\t\t\t\t\t\t\t\tmodule.event.search.focus\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$search.focus();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tblurSearch: function () {\r\n\t\t\t\t\tif (module.has.search()) {\r\n\t\t\t\t\t\t$search.blur();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tforceSelection: function () {\r\n\t\t\t\t\tvar $currentlySelected = $item\r\n\t\t\t\t\t\t\t.not(className.filtered)\r\n\t\t\t\t\t\t\t.filter(\".\" + className.selected)\r\n\t\t\t\t\t\t\t.eq(0),\r\n\t\t\t\t\t\t$activeItem = $item\r\n\t\t\t\t\t\t\t.not(className.filtered)\r\n\t\t\t\t\t\t\t.filter(\".\" + className.active)\r\n\t\t\t\t\t\t\t.eq(0),\r\n\t\t\t\t\t\t$selectedItem =\r\n\t\t\t\t\t\t\t$currentlySelected.length > 0 ? $currentlySelected : $activeItem,\r\n\t\t\t\t\t\thasSelected = $selectedItem.length > 0;\r\n\t\t\t\t\tif (\r\n\t\t\t\t\t\tsettings.allowAdditions ||\r\n\t\t\t\t\t\t(hasSelected && !module.is.multiple())\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tmodule.debug(\r\n\t\t\t\t\t\t\t\"Forcing partial selection to selected item\",\r\n\t\t\t\t\t\t\t$selectedItem\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tmodule.event.item.click.call($selectedItem, {}, true);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmodule.remove.searchTerm();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tchange: {\r\n\t\t\t\t\tvalues: function (values) {\r\n\t\t\t\t\t\tif (!settings.allowAdditions) {\r\n\t\t\t\t\t\t\tmodule.clear();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmodule.debug(\"Creating dropdown with specified values\", values);\r\n\t\t\t\t\t\tvar menuConfig = {};\r\n\t\t\t\t\t\tmenuConfig[fields.values] = values;\r\n\t\t\t\t\t\tmodule.setup.menu(menuConfig);\r\n\t\t\t\t\t\t$.each(values, function (index, item) {\r\n\t\t\t\t\t\t\tif (item.selected == true) {\r\n\t\t\t\t\t\t\t\tmodule.debug(\r\n\t\t\t\t\t\t\t\t\t\"Setting initial selection to\",\r\n\t\t\t\t\t\t\t\t\titem[fields.value]\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tmodule.set.selected(item[fields.value]);\r\n\t\t\t\t\t\t\t\tif (!module.is.multiple()) {\r\n\t\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (module.has.selectInput()) {\r\n\t\t\t\t\t\t\tmodule.disconnect.selectObserver();\r\n\t\t\t\t\t\t\t$input.html(\"\");\r\n\t\t\t\t\t\t\t$input.append(\"\");\r\n\t\t\t\t\t\t\t$.each(values, function (index, item) {\r\n\t\t\t\t\t\t\t\tvar value = settings.templates.deQuote(item[fields.value]),\r\n\t\t\t\t\t\t\t\t\tname = settings.templates.escape(\r\n\t\t\t\t\t\t\t\t\t\titem[fields.name] || \"\",\r\n\t\t\t\t\t\t\t\t\t\tsettings.preserveHTML\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t$input.append(\r\n\t\t\t\t\t\t\t\t\t'\"\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tmodule.observe.select();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tevent: {\r\n\t\t\t\t\tchange: function () {\r\n\t\t\t\t\t\tif (!internalChange) {\r\n\t\t\t\t\t\t\tmodule.debug(\"Input changed, updating selection\");\r\n\t\t\t\t\t\t\tmodule.set.selected();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfocus: function () {\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tsettings.showOnFocus &&\r\n\t\t\t\t\t\t\t!activated &&\r\n\t\t\t\t\t\t\tmodule.is.hidden() &&\r\n\t\t\t\t\t\t\t!pageLostFocus\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tfocused = true;\r\n\t\t\t\t\t\t\tmodule.show();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tblur: function (event) {\r\n\t\t\t\t\t\tpageLostFocus = document.activeElement === this;\r\n\t\t\t\t\t\tif (!activated && !pageLostFocus) {\r\n\t\t\t\t\t\t\tmodule.remove.activeLabel();\r\n\t\t\t\t\t\t\tmodule.hide();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmousedown: function () {\r\n\t\t\t\t\t\tif (module.is.searchSelection()) {\r\n\t\t\t\t\t\t\t// prevent menu hiding on immediate re-focus\r\n\t\t\t\t\t\t\twillRefocus = true;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// prevents focus callback from occurring on mousedown\r\n\t\t\t\t\t\t\tactivated = true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmouseup: function () {\r\n\t\t\t\t\t\tif (module.is.searchSelection()) {\r\n\t\t\t\t\t\t\t// prevent menu hiding on immediate re-focus\r\n\t\t\t\t\t\t\twillRefocus = false;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tactivated = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclick: function (event) {\r\n\t\t\t\t\t\tvar $target = $(event.target);\r\n\t\t\t\t\t\t// focus search\r\n\t\t\t\t\t\tif ($target.is($module)) {\r\n\t\t\t\t\t\t\tif (!module.is.focusedOnSearch()) {\r\n\t\t\t\t\t\t\t\tmodule.focusSearch();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmodule.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsearch: {\r\n\t\t\t\t\t\tfocus: function (event) {\r\n\t\t\t\t\t\t\tactivated = true;\r\n\t\t\t\t\t\t\tif (module.is.multiple()) {\r\n\t\t\t\t\t\t\t\tmodule.remove.activeLabel();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t/* jpw - this broke touch search dropdowns\r\n !focused &&\r\n\t\t\t\t\t\t\t\t!module.is.active() &&*/\r\n\t\t\t\t\t\t\t\t(settings.showOnFocus ||\r\n\t\t\t\t\t\t\t\t\t(event.type !== \"focus\" && event.type !== \"focusin\"))\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tfocused = true;\r\n\t\t\t\t\t\t\t\tmodule.search();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\tblur: function (event) {\r\n\t\t\t\t\t\t\tpageLostFocus = document.activeElement === this;\r\n\t\t\t\t\t\t\tif (module.is.searchSelection() && !willRefocus) {\r\n\t\t\t\t\t\t\t\tif (!itemActivated && !pageLostFocus) {\r\n\t\t\t\t\t\t\t\t\tif (settings.forceSelection) {\r\n\t\t\t\t\t\t\t\t\t\tmodule.forceSelection();\r\n\t\t\t\t\t\t\t\t\t} else if (!settings.allowAdditions) {\r\n\t\t\t\t\t\t\t\t\t\tmodule.remove.searchTerm();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tmodule.hide();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\twillRefocus = false;\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclearIcon: {\r\n\t\t\t\t\t\tclick: function (event) {\r\n\t\t\t\t\t\t\tmodule.clear();\r\n\t\t\t\t\t\t\tif (module.is.searchSelection()) {\r\n\t\t\t\t\t\t\t\tmodule.remove.searchTerm();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmodule.hide();\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\ticon: {\r\n\t\t\t\t\t\tclick: function (event) {\r\n\t\t\t\t\t\t\ticonClicked = true;\r\n\t\t\t\t\t\t\tif (module.has.search()) {\r\n\t\t\t\t\t\t\t\tif (!module.is.active()) {\r\n\t\t\t\t\t\t\t\t\tif (settings.showOnFocus) {\r\n\t\t\t\t\t\t\t\t\t\tmodule.focusSearch();\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\tmodule.toggle();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\tmodule.blurSearch();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmodule.toggle();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttext: {\r\n\t\t\t\t\t\tfocus: function (event) {\r\n\t\t\t\t\t\t\tactivated = true;\r\n\t\t\t\t\t\t\tmodule.focusSearch();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinput: function (event) {\r\n\t\t\t\t\t\tif (module.is.multiple() || module.is.searchSelection()) {\r\n\t\t\t\t\t\t\tmodule.set.filtered();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tclearTimeout(module.timer);\r\n\t\t\t\t\t\tmodule.timer = setTimeout(module.search, settings.delay.search);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tlabel: {\r\n\t\t\t\t\t\tclick: function (event) {\r\n\t\t\t\t\t\t\tvar $label = $(this),\r\n\t\t\t\t\t\t\t\t$labels = $module.find(selector.label),\r\n\t\t\t\t\t\t\t\t$activeLabels = $labels.filter(\".\" + className.active),\r\n\t\t\t\t\t\t\t\t$nextActive = $label.nextAll(\".\" + className.active),\r\n\t\t\t\t\t\t\t\t$prevActive = $label.prevAll(\".\" + className.active),\r\n\t\t\t\t\t\t\t\t$range =\r\n\t\t\t\t\t\t\t\t\t$nextActive.length > 0\r\n\t\t\t\t\t\t\t\t\t\t? $label\r\n\t\t\t\t\t\t\t\t\t\t\t\t.nextUntil($nextActive)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.add($activeLabels)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.add($label)\r\n\t\t\t\t\t\t\t\t\t\t: $label\r\n\t\t\t\t\t\t\t\t\t\t\t\t.prevUntil($prevActive)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.add($activeLabels)\r\n\t\t\t\t\t\t\t\t\t\t\t\t.add($label);\r\n\t\t\t\t\t\t\tif (event.shiftKey) {\r\n\t\t\t\t\t\t\t\t$activeLabels.removeClass(className.active);\r\n\t\t\t\t\t\t\t\t$range.addClass(className.active);\r\n\t\t\t\t\t\t\t} else if (event.ctrlKey) {\r\n\t\t\t\t\t\t\t\t$label.toggleClass(className.active);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$activeLabels.removeClass(className.active);\r\n\t\t\t\t\t\t\t\t$label.addClass(className.active);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsettings.onLabelSelect.apply(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t$labels.filter(\".\" + className.active)\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\tremove: {\r\n\t\t\t\t\t\tclick: function (event) {\r\n\t\t\t\t\t\t\tvar $label = $(this).parent();\r\n\t\t\t\t\t\t\tif ($label.hasClass(className.active)) {\r\n\t\t\t\t\t\t\t\t// remove all selected labels\r\n\t\t\t\t\t\t\t\tmodule.remove.activeLabels();\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// remove this label only\r\n\t\t\t\t\t\t\t\tmodule.remove.activeLabels($label);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttest: {\r\n\t\t\t\t\t\ttoggle: function (event) {\r\n\t\t\t\t\t\t\tvar toggleBehavior = module.is.multiple()\r\n\t\t\t\t\t\t\t\t? module.show\r\n\t\t\t\t\t\t\t\t: module.toggle;\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tmodule.is.bubbledLabelClick(event) ||\r\n\t\t\t\t\t\t\t\tmodule.is.bubbledIconClick(event)\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t!module.is.multiple() ||\r\n\t\t\t\t\t\t\t\t(module.is.multiple() && !module.is.active())\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tfocused = true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (module.determine.eventOnElement(event, toggleBehavior)) {\r\n\t\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\ttouch: function (event) {\r\n\t\t\t\t\t\t\tmodule.determine.eventOnElement(event, function () {\r\n\t\t\t\t\t\t\t\tif (event.type == \"touchstart\") {\r\n\t\t\t\t\t\t\t\t\tmodule.timer = setTimeout(function () {\r\n\t\t\t\t\t\t\t\t\t\tmodule.hide();\r\n\t\t\t\t\t\t\t\t\t}, settings.delay.touch);\r\n\t\t\t\t\t\t\t\t} else if (event.type == \"touchmove\") {\r\n\t\t\t\t\t\t\t\t\tclearTimeout(module.timer);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\tevent.stopPropagation();\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\thide: function (event) {\r\n\t\t\t\t\t\t\tif (module.determine.eventInModule(event, module.hide)) {\r\n\t\t\t\t\t\t\t\tif (element.id && $(event.target).attr(\"for\") === element.id) {\r\n\t\t\t\t\t\t\t\t\tevent.preventDefault();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclass: {\r\n\t\t\t\t\t\tmutation: function (mutations) {\r\n\t\t\t\t\t\t\tmutations.forEach(function (mutation) {\r\n\t\t\t\t\t\t\t\tif (mutation.attributeName === \"class\") {\r\n\t\t\t\t\t\t\t\t\tmodule.check.disabled();\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t},\r\n\t\t\t\t\tselect: {\r\n\t\t\t\t\t\tmutation: function (mutations) {\r\n\t\t\t\t\t\t\tmodule.debug(\" removing selected option\",\r\n\t\t\t\t\t\t\t\tremovedValue\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tnewValue = module.remove.arrayValue(removedValue, values);\r\n\t\t\t\t\t\t\tmodule.remove.optionValue(removedValue);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Removing from delimited values\", removedValue);\r\n\t\t\t\t\t\t\tnewValue = module.remove.arrayValue(removedValue, values);\r\n\t\t\t\t\t\t\tnewValue = newValue.join(settings.delimiter);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (settings.fireOnInit === false && module.is.initialLoad()) {\r\n\t\t\t\t\t\t\tmodule.verbose(\"No callback on initial load\", settings.onRemove);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tsettings.onRemove.call(\r\n\t\t\t\t\t\t\t\telement,\r\n\t\t\t\t\t\t\t\tremovedValue,\r\n\t\t\t\t\t\t\t\tremovedText,\r\n\t\t\t\t\t\t\t\t$removedItem\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmodule.set.value(\r\n\t\t\t\t\t\t\tnewValue,\r\n\t\t\t\t\t\t\tremovedText,\r\n\t\t\t\t\t\t\t$removedItem,\r\n\t\t\t\t\t\t\tpreventChangeTrigger\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tmodule.check.maxSelections();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tarrayValue: function (removedValue, values) {\r\n\t\t\t\t\t\tif (!Array.isArray(values)) {\r\n\t\t\t\t\t\t\tvalues = [values];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvalues = $.grep(values, function (value) {\r\n\t\t\t\t\t\t\treturn removedValue != value;\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\"Removed value from delimited string\",\r\n\t\t\t\t\t\t\tremovedValue,\r\n\t\t\t\t\t\t\tvalues\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\treturn values;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tlabel: function (value, shouldAnimate) {\r\n\t\t\t\t\t\tvar escapedValue = module.escape.value(value),\r\n\t\t\t\t\t\t\t$labels = $module.find(selector.label),\r\n\t\t\t\t\t\t\t$removedLabel = $labels.filter(\r\n\t\t\t\t\t\t\t\t\"[data-\" +\r\n\t\t\t\t\t\t\t\t\tmetadata.value +\r\n\t\t\t\t\t\t\t\t\t'=\"' +\r\n\t\t\t\t\t\t\t\t\tmodule.escape.string(\r\n\t\t\t\t\t\t\t\t\t\tsettings.ignoreCase\r\n\t\t\t\t\t\t\t\t\t\t\t? escapedValue.toLowerCase()\r\n\t\t\t\t\t\t\t\t\t\t\t: escapedValue\r\n\t\t\t\t\t\t\t\t\t) +\r\n\t\t\t\t\t\t\t\t\t'\"]'\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\tmodule.verbose(\"Removing label\", $removedLabel);\r\n\t\t\t\t\t\t$removedLabel.remove();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tactiveLabels: function ($activeLabels) {\r\n\t\t\t\t\t\t$activeLabels =\r\n\t\t\t\t\t\t\t$activeLabels ||\r\n\t\t\t\t\t\t\t$module.find(selector.label).filter(\".\" + className.active);\r\n\t\t\t\t\t\tmodule.verbose(\"Removing active label selections\", $activeLabels);\r\n\t\t\t\t\t\tmodule.remove.labels($activeLabels);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tlabels: function ($labels, preventChangeTrigger) {\r\n\t\t\t\t\t\t$labels = $labels || $module.find(selector.label);\r\n\t\t\t\t\t\tmodule.verbose(\"Removing labels\", $labels);\r\n\t\t\t\t\t\t$labels.each(function () {\r\n\t\t\t\t\t\t\tvar $label = $(this),\r\n\t\t\t\t\t\t\t\tvalue = $label.data(metadata.value),\r\n\t\t\t\t\t\t\t\tstringValue = value !== undefined ? String(value) : value,\r\n\t\t\t\t\t\t\t\tisUserValue = module.is.userValue(stringValue);\r\n\t\t\t\t\t\t\tif (settings.onLabelRemove.call($label, value) === false) {\r\n\t\t\t\t\t\t\t\tmodule.debug(\"Label remove callback cancelled removal\");\r\n\t\t\t\t\t\t\t\treturn;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tmodule.remove.message();\r\n\t\t\t\t\t\t\tif (isUserValue) {\r\n\t\t\t\t\t\t\t\tmodule.remove.value(\r\n\t\t\t\t\t\t\t\t\tstringValue,\r\n\t\t\t\t\t\t\t\t\tstringValue,\r\n\t\t\t\t\t\t\t\t\tmodule.get.item(stringValue),\r\n\t\t\t\t\t\t\t\t\tpreventChangeTrigger\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\tmodule.remove.label(stringValue);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// selected will also remove label\r\n\t\t\t\t\t\t\t\tmodule.remove.selected(\r\n\t\t\t\t\t\t\t\t\tstringValue,\r\n\t\t\t\t\t\t\t\t\tfalse,\r\n\t\t\t\t\t\t\t\t\tpreventChangeTrigger\r\n\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t},\r\n\t\t\t\t\ttabbable: function () {\r\n\t\t\t\t\t\tif (module.is.searchSelection()) {\r\n\t\t\t\t\t\t\tmodule.debug(\"Searchable dropdown initialized\");\r\n\t\t\t\t\t\t\t$search.removeAttr(\"tabindex\");\r\n\t\t\t\t\t\t\t$menu.removeAttr(\"tabindex\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.debug(\"Simple selection dropdown initialized\");\r\n\t\t\t\t\t\t\t$module.removeAttr(\"tabindex\");\r\n\t\t\t\t\t\t\t$menu.removeAttr(\"tabindex\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\tdiacritics: function (text) {\r\n\t\t\t\t\t\treturn settings.ignoreDiacritics\r\n\t\t\t\t\t\t\t? text.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\")\r\n\t\t\t\t\t\t\t: text;\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\thas: {\r\n\t\t\t\t\tmenuSearch: function () {\r\n\t\t\t\t\t\treturn module.has.search() && $search.closest($menu).length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclearItem: function () {\r\n\t\t\t\t\t\treturn $clear.length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsearch: function () {\r\n\t\t\t\t\t\treturn $search.length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsizer: function () {\r\n\t\t\t\t\t\treturn $sizer.length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tselectInput: function () {\r\n\t\t\t\t\t\treturn $input.is(\"select\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\tminCharacters: function (searchTerm) {\r\n\t\t\t\t\t\tif (settings.minCharacters && !iconClicked) {\r\n\t\t\t\t\t\t\tsearchTerm =\r\n\t\t\t\t\t\t\t\tsearchTerm !== undefined\r\n\t\t\t\t\t\t\t\t\t? String(searchTerm)\r\n\t\t\t\t\t\t\t\t\t: String(module.get.query());\r\n\t\t\t\t\t\t\treturn searchTerm.length >= settings.minCharacters;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ticonClicked = false;\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfirstLetter: function ($item, letter) {\r\n\t\t\t\t\t\tvar text, firstLetter;\r\n\t\t\t\t\t\tif (!$item || $item.length === 0 || typeof letter !== \"string\") {\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttext = module.get.choiceText($item, false);\r\n\t\t\t\t\t\tletter = letter.toLowerCase();\r\n\t\t\t\t\t\tfirstLetter = String(text).charAt(0).toLowerCase();\r\n\t\t\t\t\t\treturn letter == firstLetter;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinput: function () {\r\n\t\t\t\t\t\treturn $input.length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\titems: function () {\r\n\t\t\t\t\t\treturn $item.length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmenu: function () {\r\n\t\t\t\t\t\treturn $menu.length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsubMenu: function ($currentMenu) {\r\n\t\t\t\t\t\treturn ($currentMenu || $menu).find(selector.menu).length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmessage: function () {\r\n\t\t\t\t\t\treturn $menu.children(selector.message).length !== 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tlabel: function (value) {\r\n\t\t\t\t\t\tvar escapedValue = module.escape.value(value),\r\n\t\t\t\t\t\t\t$labels = $module.find(selector.label);\r\n\t\t\t\t\t\tif (settings.ignoreCase) {\r\n\t\t\t\t\t\t\tescapedValue = escapedValue.toLowerCase();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t$labels.filter(\r\n\t\t\t\t\t\t\t\t\"[data-\" +\r\n\t\t\t\t\t\t\t\t\tmetadata.value +\r\n\t\t\t\t\t\t\t\t\t'=\"' +\r\n\t\t\t\t\t\t\t\t\tmodule.escape.string(escapedValue) +\r\n\t\t\t\t\t\t\t\t\t'\"]'\r\n\t\t\t\t\t\t\t).length > 0\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmaxSelections: function () {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\tsettings.maxSelections &&\r\n\t\t\t\t\t\t\tmodule.get.selectionCount() >= settings.maxSelections\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tallResultsFiltered: function () {\r\n\t\t\t\t\t\tvar $normalResults = $item.not(selector.addition);\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t$normalResults.filter(selector.unselectable).length ===\r\n\t\t\t\t\t\t\t$normalResults.length\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tuserSuggestion: function () {\r\n\t\t\t\t\t\treturn $menu.children(selector.addition).length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tquery: function () {\r\n\t\t\t\t\t\treturn module.get.query() !== \"\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\tvalue: function (value) {\r\n\t\t\t\t\t\treturn settings.ignoreCase\r\n\t\t\t\t\t\t\t? module.has.valueIgnoringCase(value)\r\n\t\t\t\t\t\t\t: module.has.valueMatchingCase(value);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tvalueMatchingCase: function (value) {\r\n\t\t\t\t\t\tvar values = module.get.values(true),\r\n\t\t\t\t\t\t\thasValue = Array.isArray(values)\r\n\t\t\t\t\t\t\t\t? values && $.inArray(value, values) !== -1\r\n\t\t\t\t\t\t\t\t: values == value;\r\n\t\t\t\t\t\treturn hasValue ? true : false;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tvalueIgnoringCase: function (value) {\r\n\t\t\t\t\t\tvar values = module.get.values(true),\r\n\t\t\t\t\t\t\thasValue = false;\r\n\t\t\t\t\t\tif (!Array.isArray(values)) {\r\n\t\t\t\t\t\t\tvalues = [values];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$.each(values, function (index, existingValue) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\tString(value).toLowerCase() ==\r\n\t\t\t\t\t\t\t\tString(existingValue).toLowerCase()\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\thasValue = true;\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn hasValue;\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tis: {\r\n\t\t\t\t\tactive: function () {\r\n\t\t\t\t\t\treturn $module.hasClass(className.active);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tanimatingInward: function () {\r\n\t\t\t\t\t\treturn $menu.transition(\"is inward\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\tanimatingOutward: function () {\r\n\t\t\t\t\t\treturn $menu.transition(\"is outward\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbubbledLabelClick: function (event) {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t$(event.target).is(\"select, input\") &&\r\n\t\t\t\t\t\t\t$module.closest(\"label\").length > 0\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tbubbledIconClick: function (event) {\r\n\t\t\t\t\t\treturn $(event.target).closest($icon).length > 0;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tchrome: function () {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t!!window.chrome &&\r\n\t\t\t\t\t\t\t(!!window.chrome.webstore || !!window.chrome.runtime)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\talreadySetup: function () {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t$module.is(\"select\") &&\r\n\t\t\t\t\t\t\t$module.parent(selector.dropdown).data(moduleNamespace) !==\r\n\t\t\t\t\t\t\t\tundefined &&\r\n\t\t\t\t\t\t\t$module.prev().length === 0\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tanimating: function ($subMenu) {\r\n\t\t\t\t\t\treturn $subMenu\r\n\t\t\t\t\t\t\t? $subMenu.transition && $subMenu.transition(\"is animating\")\r\n\t\t\t\t\t\t\t: $menu.transition && $menu.transition(\"is animating\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\tleftward: function ($subMenu) {\r\n\t\t\t\t\t\tvar $selectedMenu = $subMenu || $menu;\r\n\t\t\t\t\t\treturn $selectedMenu.hasClass(className.leftward);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclearable: function () {\r\n\t\t\t\t\t\treturn $module.hasClass(className.clearable) || settings.clearable;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tdisabled: function () {\r\n\t\t\t\t\t\treturn $module.hasClass(className.disabled);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfocused: function () {\r\n\t\t\t\t\t\treturn document.activeElement === $module[0];\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfocusedOnSearch: function () {\r\n\t\t\t\t\t\treturn document.activeElement === $search[0];\r\n\t\t\t\t\t},\r\n\t\t\t\t\tallFiltered: function () {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t(module.is.multiple() || module.has.search()) &&\r\n\t\t\t\t\t\t\t!(\r\n\t\t\t\t\t\t\t\tsettings.hideAdditions == false && module.has.userSuggestion()\r\n\t\t\t\t\t\t\t) &&\r\n\t\t\t\t\t\t\t!module.has.message() &&\r\n\t\t\t\t\t\t\tmodule.has.allResultsFiltered()\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\thidden: function ($subMenu) {\r\n\t\t\t\t\t\treturn !module.is.visible($subMenu);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinitialLoad: function () {\r\n\t\t\t\t\t\treturn initialLoad;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tinObject: function (needle, object) {\r\n\t\t\t\t\t\tvar found = false;\r\n\t\t\t\t\t\t$.each(object, function (index, property) {\r\n\t\t\t\t\t\t\tif (property == needle) {\r\n\t\t\t\t\t\t\t\tfound = true;\r\n\t\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn found;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tmultiple: function () {\r\n\t\t\t\t\t\treturn $module.hasClass(className.multiple);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tremote: function () {\r\n\t\t\t\t\t\treturn settings.apiSettings && module.can.useAPI();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tnoApiCache: function () {\r\n\t\t\t\t\t\treturn settings.apiSettings && !settings.apiSettings.cache;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsingle: function () {\r\n\t\t\t\t\t\treturn !module.is.multiple();\r\n\t\t\t\t\t},\r\n\t\t\t\t\tselectMutation: function (mutations) {\r\n\t\t\t\t\t\tvar selectChanged = false;\r\n\t\t\t\t\t\t$.each(mutations, function (index, mutation) {\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t$(mutation.target).is(\"select\") ||\r\n\t\t\t\t\t\t\t\t$(mutation.addedNodes).is(\"select\")\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tselectChanged = true;\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\treturn selectChanged;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsearch: function () {\r\n\t\t\t\t\t\treturn $module.hasClass(className.search);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tsearchSelection: function () {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\tmodule.has.search() &&\r\n\t\t\t\t\t\t\t$search.parent(selector.dropdown).length === 1\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tselection: function () {\r\n\t\t\t\t\t\treturn $module.hasClass(className.selection);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tuserValue: function (value) {\r\n\t\t\t\t\t\treturn $.inArray(value, module.get.userValues()) !== -1;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tupward: function ($menu) {\r\n\t\t\t\t\t\tvar $element = $menu || $module;\r\n\t\t\t\t\t\treturn $element.hasClass(className.upward);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tvisible: function ($subMenu) {\r\n\t\t\t\t\t\treturn $subMenu\r\n\t\t\t\t\t\t\t? $subMenu.hasClass(className.visible)\r\n\t\t\t\t\t\t\t: $menu.hasClass(className.visible);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tverticallyScrollableContext: function () {\r\n\t\t\t\t\t\tvar overflowY =\r\n\t\t\t\t\t\t\t$context.get(0) !== window ? $context.css(\"overflow-y\") : false;\r\n\t\t\t\t\t\treturn overflowY == \"auto\" || overflowY == \"scroll\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\thorizontallyScrollableContext: function () {\r\n\t\t\t\t\t\tvar overflowX =\r\n\t\t\t\t\t\t\t$context.get(0) !== window ? $context.css(\"overflow-X\") : false;\r\n\t\t\t\t\t\treturn overflowX == \"auto\" || overflowX == \"scroll\";\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tcan: {\r\n\t\t\t\t\tactivate: function ($item) {\r\n\t\t\t\t\t\tif (settings.useLabels) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!module.has.maxSelections()) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tmodule.has.maxSelections() &&\r\n\t\t\t\t\t\t\t$item.hasClass(className.active)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t},\r\n\t\t\t\t\topenDownward: function ($subMenu) {\r\n\t\t\t\t\t\tvar $currentMenu = $subMenu || $menu,\r\n\t\t\t\t\t\t\tcanOpenDownward = true,\r\n\t\t\t\t\t\t\tonScreen = {},\r\n\t\t\t\t\t\t\tcalculations;\r\n\t\t\t\t\t\t$currentMenu.addClass(className.loading);\r\n\t\t\t\t\t\tcalculations = {\r\n\t\t\t\t\t\t\tcontext: {\r\n\t\t\t\t\t\t\t\toffset:\r\n\t\t\t\t\t\t\t\t\t$context.get(0) === window\r\n\t\t\t\t\t\t\t\t\t\t? { top: 0, left: 0 }\r\n\t\t\t\t\t\t\t\t\t\t: $context.offset(),\r\n\t\t\t\t\t\t\t\tscrollTop: $context.scrollTop(),\r\n\t\t\t\t\t\t\t\theight: $context.outerHeight(),\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tmenu: {\r\n\t\t\t\t\t\t\t\toffset: $currentMenu.offset(),\r\n\t\t\t\t\t\t\t\theight: $currentMenu.outerHeight(),\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tif (module.is.verticallyScrollableContext()) {\r\n\t\t\t\t\t\t\tcalculations.menu.offset.top += calculations.context.scrollTop;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (module.has.subMenu($currentMenu)) {\r\n\t\t\t\t\t\t\tcalculations.menu.height += $currentMenu\r\n\t\t\t\t\t\t\t\t.find(selector.menu)\r\n\t\t\t\t\t\t\t\t.first()\r\n\t\t\t\t\t\t\t\t.outerHeight();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tonScreen = {\r\n\t\t\t\t\t\t\tabove:\r\n\t\t\t\t\t\t\t\tcalculations.context.scrollTop <=\r\n\t\t\t\t\t\t\t\tcalculations.menu.offset.top -\r\n\t\t\t\t\t\t\t\t\tcalculations.context.offset.top -\r\n\t\t\t\t\t\t\t\t\tcalculations.menu.height,\r\n\t\t\t\t\t\t\tbelow:\r\n\t\t\t\t\t\t\t\tcalculations.context.scrollTop + calculations.context.height >=\r\n\t\t\t\t\t\t\t\tcalculations.menu.offset.top -\r\n\t\t\t\t\t\t\t\t\tcalculations.context.offset.top +\r\n\t\t\t\t\t\t\t\t\tcalculations.menu.height,\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tif (onScreen.below) {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Dropdown can fit in context downward\", onScreen);\r\n\t\t\t\t\t\t\tcanOpenDownward = true;\r\n\t\t\t\t\t\t} else if (!onScreen.below && !onScreen.above) {\r\n\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\"Dropdown cannot fit in either direction, favoring downward\",\r\n\t\t\t\t\t\t\t\tonScreen\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tcanOpenDownward = true;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\"Dropdown cannot fit below, opening upward\",\r\n\t\t\t\t\t\t\t\tonScreen\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tcanOpenDownward = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$currentMenu.removeClass(className.loading);\r\n\t\t\t\t\t\treturn canOpenDownward;\r\n\t\t\t\t\t},\r\n\t\t\t\t\topenRightward: function ($subMenu) {\r\n\t\t\t\t\t\tvar $currentMenu = $subMenu || $menu,\r\n\t\t\t\t\t\t\tcanOpenRightward = true,\r\n\t\t\t\t\t\t\tisOffscreenRight = false,\r\n\t\t\t\t\t\t\tcalculations;\r\n\t\t\t\t\t\t$currentMenu.addClass(className.loading);\r\n\t\t\t\t\t\tcalculations = {\r\n\t\t\t\t\t\t\tcontext: {\r\n\t\t\t\t\t\t\t\toffset:\r\n\t\t\t\t\t\t\t\t\t$context.get(0) === window\r\n\t\t\t\t\t\t\t\t\t\t? { top: 0, left: 0 }\r\n\t\t\t\t\t\t\t\t\t\t: $context.offset(),\r\n\t\t\t\t\t\t\t\tscrollLeft: $context.scrollLeft(),\r\n\t\t\t\t\t\t\t\twidth: $context.outerWidth(),\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tmenu: {\r\n\t\t\t\t\t\t\t\toffset: $currentMenu.offset(),\r\n\t\t\t\t\t\t\t\twidth: $currentMenu.outerWidth(),\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t\tif (module.is.horizontallyScrollableContext()) {\r\n\t\t\t\t\t\t\tcalculations.menu.offset.left += calculations.context.scrollLeft;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tisOffscreenRight =\r\n\t\t\t\t\t\t\tcalculations.menu.offset.left -\r\n\t\t\t\t\t\t\t\tcalculations.context.offset.left +\r\n\t\t\t\t\t\t\t\tcalculations.menu.width >=\r\n\t\t\t\t\t\t\tcalculations.context.scrollLeft + calculations.context.width;\r\n\t\t\t\t\t\tif (isOffscreenRight) {\r\n\t\t\t\t\t\t\tmodule.verbose(\r\n\t\t\t\t\t\t\t\t\"Dropdown cannot fit in context rightward\",\r\n\t\t\t\t\t\t\t\tisOffscreenRight\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tcanOpenRightward = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$currentMenu.removeClass(className.loading);\r\n\t\t\t\t\t\treturn canOpenRightward;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tclick: function () {\r\n\t\t\t\t\t\treturn hasTouch || settings.on == \"click\";\r\n\t\t\t\t\t},\r\n\t\t\t\t\textendSelect: function () {\r\n\t\t\t\t\t\treturn settings.allowAdditions || settings.apiSettings;\r\n\t\t\t\t\t},\r\n\t\t\t\t\tshow: function () {\r\n\t\t\t\t\t\treturn (\r\n\t\t\t\t\t\t\t!module.is.disabled() &&\r\n\t\t\t\t\t\t\t(module.has.items() || module.has.message())\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tuseAPI: function () {\r\n\t\t\t\t\t\treturn $.fn.api !== undefined;\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tanimate: {\r\n\t\t\t\t\tshow: function (callback, $subMenu) {\r\n\t\t\t\t\t\tvar $currentMenu = $subMenu || $menu,\r\n\t\t\t\t\t\t\tstart = $subMenu\r\n\t\t\t\t\t\t\t\t? function () {}\r\n\t\t\t\t\t\t\t\t: function () {\r\n\t\t\t\t\t\t\t\t\t\tmodule.hideSubMenus();\r\n\t\t\t\t\t\t\t\t\t\tmodule.hideOthers();\r\n\t\t\t\t\t\t\t\t\t\tmodule.set.active();\r\n\t\t\t\t\t\t\t\t },\r\n\t\t\t\t\t\t\ttransition;\r\n\t\t\t\t\t\tcallback = $.isFunction(callback) ? callback : function () {};\r\n\t\t\t\t\t\tmodule.verbose(\"Doing menu show animation\", $currentMenu);\r\n\t\t\t\t\t\tmodule.set.direction($subMenu);\r\n\t\t\t\t\t\ttransition =\r\n\t\t\t\t\t\t\tsettings.transition.showMethod || module.get.transition($subMenu);\r\n\t\t\t\t\t\tif (module.is.selection()) {\r\n\t\t\t\t\t\t\tmodule.set.scrollPosition(module.get.selectedItem(), true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tmodule.is.hidden($currentMenu) ||\r\n\t\t\t\t\t\t\tmodule.is.animating($currentMenu)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tif (transition === \"none\") {\r\n\t\t\t\t\t\t\t\tstart();\r\n\t\t\t\t\t\t\t\t$currentMenu\r\n\t\t\t\t\t\t\t\t\t.transition({\r\n\t\t\t\t\t\t\t\t\t\tdisplayType: module.get.displayType(),\r\n\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t.transition(\"show\");\r\n\t\t\t\t\t\t\t\tcallback.call(element);\r\n\t\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t\t$.fn.transition !== undefined &&\r\n\t\t\t\t\t\t\t\t$module.transition(\"is supported\")\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t$currentMenu.transition({\r\n\t\t\t\t\t\t\t\t\tanimation: transition + \" in\",\r\n\t\t\t\t\t\t\t\t\tdebug: settings.debug,\r\n\t\t\t\t\t\t\t\t\tverbose: settings.verbose,\r\n\t\t\t\t\t\t\t\t\tduration:\r\n\t\t\t\t\t\t\t\t\t\tsettings.transition.showDuration || settings.duration,\r\n\t\t\t\t\t\t\t\t\tqueue: true,\r\n\t\t\t\t\t\t\t\t\tonStart: start,\r\n\t\t\t\t\t\t\t\t\tdisplayType: module.get.displayType(),\r\n\t\t\t\t\t\t\t\t\tonComplete: function () {\r\n\t\t\t\t\t\t\t\t\t\tcallback.call(element);\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmodule.error(error.noTransition, transition);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t\thide: function (callback, $subMenu) {\r\n\t\t\t\t\t\tvar $currentMenu = $subMenu || $menu,\r\n\t\t\t\t\t\t\tstart = $subMenu\r\n\t\t\t\t\t\t\t\t? function () {}\r\n\t\t\t\t\t\t\t\t: function () {\r\n\t\t\t\t\t\t\t\t\t\tif (module.can.click()) {\r\n\t\t\t\t\t\t\t\t\t\t\tmodule.unbind.intent();\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tmodule.remove.active();\r\n\t\t\t\t\t\t\t\t },\r\n\t\t\t\t\t\t\ttransition =\r\n\t\t\t\t\t\t\t\tsettings.transition.hideMethod ||\r\n\t\t\t\t\t\t\t\tmodule.get.transition($subMenu);\r\n\t\t\t\t\t\tcallback = $.isFunction(callback) ? callback : function () {};\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\tmodule.is.visible($currentMenu) ||\r\n\t\t\t\t\t\t\tmodule.is.animating($currentMenu)\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tmodule.verbose(\"Doing menu hide animation\", $currentMenu);\r\n\r\n\t\t\t\t\t\t\tif (transition === \"none\") {\r\n\t\t\t\t\t\t\t\tstart();\r\n\t\t\t\t\t\t\t\t$currentMenu\r\n\t\t\t\t\t\t\t\t\t.transition({\r\n\t\t\t\t\t\t\t\t\t\tdisplayType: module.get.displayType(),\r\n\t\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\t\t.transition(\"hide\");\r\n\t\t\t\t\t\t\t\tcallback.call(element);\r\n\t\t\t\t\t\t\t} else if (\r\n\t\t\t\t\t\t\t\t$.fn.transition !== undefined &&\r\n\t\t\t\t\t\t\t\t$module.transition(\"is supported\")\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\t$currentMenu.transition({\r\n\t\t\t\t\t\t\t\t\tanimation: transition + \" out\",\r\n\t\t\t\t\t\t\t\t\tduration:\r\n\t\t\t\t\t\t\t\t\t\tsettings.transition.hideDuration || settings.duration,\r\n\t\t\t\t\t\t\t\t\tdebug: settings.debug,\r\n\t\t\t\t\t\t\t\t\tverbose: settings.verbose,\r\n\t\t\t\t\t\t\t\t\tqueue: false,\r\n\t\t\t\t\t\t\t\t\tonStart: start,\r\n\t\t\t\t\t\t\t\t\tdisplayType: module.get.displayType(),\r\n\t\t\t\t\t\t\t\t\tonComplete: function () {\r\n\t\t\t\t\t\t\t\t\t\tcallback.call(element);\r\n\t\t\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmodule.error(error.transition);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\thideAndClear: function () {\r\n\t\t\t\t\tmodule.remove.searchTerm();\r\n\t\t\t\t\tif (module.has.maxSelections()) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (module.has.search()) {\r\n\t\t\t\t\t\tmodule.hide(function () {\r\n\t\t\t\t\t\t\tmodule.remove.filteredItem();\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tmodule.hide();\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\r\n\t\t\t\tdelay: {\r\n\t\t\t\t\tshow: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Delaying show event to ensure user intent\");\r\n\t\t\t\t\t\tclearTimeout(module.timer);\r\n\t\t\t\t\t\tmodule.timer = setTimeout(module.show, settings.delay.show);\r\n\t\t\t\t\t},\r\n\t\t\t\t\thide: function () {\r\n\t\t\t\t\t\tmodule.verbose(\"Delaying hide event to ensure user intent\");\r\n\t\t\t\t\t\tclearTimeout(module.timer);\r\n\t\t\t\t\t\tmodule.timer = setTimeout(module.hide, settings.delay.hide);\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tescape: {\r\n\t\t\t\t\tvalue: function (value) {\r\n\t\t\t\t\t\tvar multipleValues = Array.isArray(value),\r\n\t\t\t\t\t\t\tstringValue = typeof value === \"string\",\r\n\t\t\t\t\t\t\tisUnparsable = !stringValue && !multipleValues,\r\n\t\t\t\t\t\t\thasQuotes = stringValue && value.search(regExp.quote) !== -1,\r\n\t\t\t\t\t\t\tvalues = [];\r\n\t\t\t\t\t\tif (isUnparsable || !hasQuotes) {\r\n\t\t\t\t\t\t\treturn value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmodule.debug(\"Encoding quote values for use in select\", value);\r\n\t\t\t\t\t\tif (multipleValues) {\r\n\t\t\t\t\t\t\t$.each(value, function (index, value) {\r\n\t\t\t\t\t\t\t\tvalues.push(value.replace(regExp.quote, \""\"));\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\treturn values;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn value.replace(regExp.quote, \""\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\tstring: function (text) {\r\n\t\t\t\t\t\ttext = String(text);\r\n\t\t\t\t\t\treturn text.replace(regExp.escape, \"\\\\$&\");\r\n\t\t\t\t\t},\r\n\t\t\t\t\thtmlEntities: function (string) {\r\n\t\t\t\t\t\tvar badChars = /[<>\"'`]/g,\r\n\t\t\t\t\t\t\tshouldEscape = /[&<>\"'`]/,\r\n\t\t\t\t\t\t\tescape = {\r\n\t\t\t\t\t\t\t\t\"<\": \"<\",\r\n\t\t\t\t\t\t\t\t\">\": \">\",\r\n\t\t\t\t\t\t\t\t'\"': \""\",\r\n\t\t\t\t\t\t\t\t\"'\": \"'\",\r\n\t\t\t\t\t\t\t\t\"`\": \"`\",\r\n\t\t\t\t\t\t\t},\r\n\t\t\t\t\t\t\tescapedChar = function (chr) {\r\n\t\t\t\t\t\t\t\treturn escape[chr];\r\n\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\tif (shouldEscape.test(string)) {\r\n\t\t\t\t\t\t\tstring = string.replace(/&(?![a-z0-9#]{1,6};)/, \"&\");\r\n\t\t\t\t\t\t\treturn string.replace(badChars, escapedChar);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn string;\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\r\n\t\t\t\tsetting: function (name, value) {\r\n\t\t\t\t\tmodule.debug(\"Changing setting\", name, value);\r\n\t\t\t\t\tif ($.isPlainObject(name)) {\r\n\t\t\t\t\t\t$.extend(true, settings, name);\r\n\t\t\t\t\t} else if (value !== undefined) {\r\n\t\t\t\t\t\tif ($.isPlainObject(settings[name])) {\r\n\t\t\t\t\t\t\t$.extend(true, settings[name], value);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tsettings[name] = value;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn settings[name];\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tinternal: function (name, value) {\r\n\t\t\t\t\tif ($.isPlainObject(name)) {\r\n\t\t\t\t\t\t$.extend(true, module, name);\r\n\t\t\t\t\t} else if (value !== undefined) {\r\n\t\t\t\t\t\tmodule[name] = value;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\treturn module[name];\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tdebug: function () {\r\n\t\t\t\t\tif (!settings.silent && settings.debug) {\r\n\t\t\t\t\t\tif (settings.performance) {\r\n\t\t\t\t\t\t\tmodule.performance.log(arguments);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.debug = Function.prototype.bind.call(\r\n\t\t\t\t\t\t\t\tconsole.info,\r\n\t\t\t\t\t\t\t\tconsole,\r\n\t\t\t\t\t\t\t\tsettings.name + \":\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tmodule.debug.apply(console, arguments);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tverbose: function () {\r\n\t\t\t\t\tif (!settings.silent && settings.verbose && settings.debug) {\r\n\t\t\t\t\t\tif (settings.performance) {\r\n\t\t\t\t\t\t\tmodule.performance.log(arguments);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmodule.verbose = Function.prototype.bind.call(\r\n\t\t\t\t\t\t\t\tconsole.info,\r\n\t\t\t\t\t\t\t\tconsole,\r\n\t\t\t\t\t\t\t\tsettings.name + \":\"\r\n\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\tmodule.verbose.apply(console, arguments);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\terror: function () {\r\n\t\t\t\t\tif (!settings.silent) {\r\n\t\t\t\t\t\tmodule.error = Function.prototype.bind.call(\r\n\t\t\t\t\t\t\tconsole.error,\r\n\t\t\t\t\t\t\tconsole,\r\n\t\t\t\t\t\t\tsettings.name + \":\"\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\tmodule.error.apply(console, arguments);\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\tperformance: {\r\n\t\t\t\t\tlog: function (message) {\r\n\t\t\t\t\t\tvar currentTime, executionTime, previousTime;\r\n\t\t\t\t\t\tif (settings.performance) {\r\n\t\t\t\t\t\t\tcurrentTime = new Date().getTime();\r\n\t\t\t\t\t\t\tpreviousTime = time || currentTime;\r\n\t\t\t\t\t\t\texecutionTime = currentTime - previousTime;\r\n\t\t\t\t\t\t\ttime = currentTime;\r\n\t\t\t\t\t\t\tperformance.push({\r\n\t\t\t\t\t\t\t\tName: message[0],\r\n\t\t\t\t\t\t\t\tArguments: [].slice.call(message, 1) || \"\",\r\n\t\t\t\t\t\t\t\tElement: element,\r\n\t\t\t\t\t\t\t\t\"Execution Time\": executionTime,\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tclearTimeout(module.performance.timer);\r\n\t\t\t\t\t\tmodule.performance.timer = setTimeout(\r\n\t\t\t\t\t\t\tmodule.performance.display,\r\n\t\t\t\t\t\t\t500\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t},\r\n\t\t\t\t\tdisplay: function () {\r\n\t\t\t\t\t\tvar title = settings.name + \":\",\r\n\t\t\t\t\t\t\ttotalTime = 0;\r\n\t\t\t\t\t\ttime = false;\r\n\t\t\t\t\t\tclearTimeout(module.performance.timer);\r\n\t\t\t\t\t\t$.each(performance, function (index, data) {\r\n\t\t\t\t\t\t\ttotalTime += data[\"Execution Time\"];\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\ttitle += \" \" + totalTime + \"ms\";\r\n\t\t\t\t\t\tif (moduleSelector) {\r\n\t\t\t\t\t\t\ttitle += \" '\" + moduleSelector + \"'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t(console.group !== undefined || console.table !== undefined) &&\r\n\t\t\t\t\t\t\tperformance.length > 0\r\n\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\tconsole.groupCollapsed(title);\r\n\t\t\t\t\t\t\tif (console.table) {\r\n\t\t\t\t\t\t\t\tconsole.table(performance);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$.each(performance, function (index, data) {\r\n\t\t\t\t\t\t\t\t\tconsole.log(\r\n\t\t\t\t\t\t\t\t\t\tdata[\"Name\"] + \": \" + data[\"Execution Time\"] + \"ms\"\r\n\t\t\t\t\t\t\t\t\t);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tconsole.groupEnd();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tperformance = [];\r\n\t\t\t\t\t},\r\n\t\t\t\t},\r\n\t\t\t\tinvoke: function (query, passedArguments, context) {\r\n\t\t\t\t\tvar object = instance,\r\n\t\t\t\t\t\tmaxDepth,\r\n\t\t\t\t\t\tfound,\r\n\t\t\t\t\t\tresponse;\r\n\t\t\t\t\tpassedArguments = passedArguments || queryArguments;\r\n\t\t\t\t\tcontext = element || context;\r\n\t\t\t\t\tif (typeof query == \"string\" && object !== undefined) {\r\n\t\t\t\t\t\tquery = query.split(/[\\. ]/);\r\n\t\t\t\t\t\tmaxDepth = query.length - 1;\r\n\t\t\t\t\t\t$.each(query, function (depth, value) {\r\n\t\t\t\t\t\t\tvar camelCaseValue =\r\n\t\t\t\t\t\t\t\tdepth != maxDepth\r\n\t\t\t\t\t\t\t\t\t? value +\r\n\t\t\t\t\t\t\t\t\t query[depth + 1].charAt(0).toUpperCase() +\r\n\t\t\t\t\t\t\t\t\t query[depth + 1].slice(1)\r\n\t\t\t\t\t\t\t\t\t: query;\r\n\t\t\t\t\t\t\tif (\r\n\t\t\t\t\t\t\t\t$.isPlainObject(object[camelCaseValue]) &&\r\n\t\t\t\t\t\t\t\tdepth != maxDepth\r\n\t\t\t\t\t\t\t) {\r\n\t\t\t\t\t\t\t\tobject = object[camelCaseValue];\r\n\t\t\t\t\t\t\t} else if (object[camelCaseValue] !== undefined) {\r\n\t\t\t\t\t\t\t\tfound = object[camelCaseValue];\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} else if ($.isPlainObject(object[value]) && depth != maxDepth) {\r\n\t\t\t\t\t\t\t\tobject = object[value];\r\n\t\t\t\t\t\t\t} else if (object[value] !== undefined) {\r\n\t\t\t\t\t\t\t\tfound = object[value];\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tmodule.error(error.method, query);\r\n\t\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($.isFunction(found)) {\r\n\t\t\t\t\t\tresponse = found.apply(context, passedArguments);\r\n\t\t\t\t\t} else if (found !== undefined) {\r\n\t\t\t\t\t\tresponse = found;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (Array.isArray(returnedValue)) {\r\n\t\t\t\t\t\treturnedValue.push(response);\r\n\t\t\t\t\t} else if (returnedValue !== undefined) {\r\n\t\t\t\t\t\treturnedValue = [returnedValue, response];\r\n\t\t\t\t\t} else if (response !== undefined) {\r\n\t\t\t\t\t\treturnedValue = response;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn found;\r\n\t\t\t\t},\r\n\t\t\t};\r\n\r\n\t\t\tif (methodInvoked) {\r\n\t\t\t\tif (instance === undefined) {\r\n\t\t\t\t\tmodule.initialize();\r\n\t\t\t\t}\r\n\t\t\t\tmodule.invoke(query);\r\n\t\t\t} else {\r\n\t\t\t\tif (instance !== undefined) {\r\n\t\t\t\t\tinstance.invoke(\"destroy\");\r\n\t\t\t\t}\r\n\t\t\t\tmodule.initialize();\r\n\t\t\t}\r\n\t\t});\r\n\t\treturn returnedValue !== undefined ? returnedValue : $allModules;\r\n\t};\r\n\r\n\t$.fn.suidropdown.settings = {\r\n\t\tsilent: false,\r\n\t\tdebug: false,\r\n\t\tverbose: false,\r\n\t\tperformance: true,\r\n\r\n\t\ton: \"click\", // what event should show menu action on item selection\r\n\t\taction: \"activate\", // action on item selection (nothing, activate, select, combo, hide, function(){})\r\n\r\n\t\tvalues: false, // specify values to use for dropdown\r\n\r\n\t\tclearable: false, // whether the value of the dropdown can be cleared\r\n\r\n\t\tapiSettings: false,\r\n\t\tselectOnKeydown: true, // Whether selection should occur automatically when keyboard shortcuts used\r\n\t\tminCharacters: 0, // Minimum characters required to trigger API call\r\n\r\n\t\tfilterRemoteData: false, // Whether API results should be filtered after being returned for query term\r\n\t\tsaveRemoteData: true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh\r\n\r\n\t\tthrottle: 200, // How long to wait after last user input to search remotely\r\n\r\n\t\tcontext: window, // Context to use when determining if on screen\r\n\t\tdirection: \"auto\", // Whether dropdown should always open in one direction\r\n\t\tkeepOnScreen: true, // Whether dropdown should check whether it is on screen before showing\r\n\r\n\t\tmatch: \"both\", // what to match against with search selection (both, text, or label)\r\n\t\tfullTextSearch: false, // search anywhere in value (set to 'exact' to require exact matches)\r\n\t\tignoreDiacritics: false, // match results also if they contain diacritics of the same base character (for example searching for \"a\" will also match \"á\" or \"â\" or \"à\", etc...)\r\n\t\thideDividers: false, // Whether to hide any divider elements (specified in selector.divider) that are sibling to any items when searched (set to true will hide all dividers, set to 'empty' will hide them when they are not followed by a visible item)\r\n\r\n\t\tplaceholder: \"auto\", // whether to convert blank the values will be delimited with this character\r\n\r\n\t\tshowOnFocus: true, // show menu on focus\r\n\t\tallowReselection: false, // whether current value should trigger callbacks when reselected\r\n\t\tallowTab: true, // add tabindex to element\r\n\t\tallowCategorySelection: false, // allow elements with sub-menus to be selected\r\n\r\n\t\tfireOnInit: false, // Whether callbacks should fire when initializing dropdown values\r\n\r\n\t\ttransition: \"auto\", // auto transition will slide down or up based on direction\r\n\t\tduration: 200, // duration of transition\r\n\t\tdisplayType: false, // displayType of transition\r\n\r\n\t\tglyphWidth: 1.037, // widest glyph width in em (W is 1.037 em) used to calculate multiselect input width\r\n\r\n\t\theaderDivider: true, // whether option headers should have an additional divider line underneath when converted from requires multiple property to be set to correctly preserve multiple values\",\r\n\t\t\tmethod: \"The method you called is not defined.\",\r\n\t\t\tnoAPI: \"The API module is required to load resources remotely\",\r\n\t\t\tnoStorage: \"Saving remote data requires session storage\",\r\n\t\t\tnoTransition:\r\n\t\t\t\t\"This module requires ui transitions \",\r\n\t\t\tnoNormalize:\r\n\t\t\t\t'\"ignoreDiacritics\" setting will be ignored. Browser does not support String().normalize(). You may consider including as a polyfill.',\r\n\t\t},\r\n\r\n\t\tregExp: {\r\n\t\t\tescape: /[-[\\]{}()*+?.,\\\\^$|#\\s:=@]/g,\r\n\t\t\tquote: /\"/g,\r\n\t\t},\r\n\r\n\t\tmetadata: {\r\n\t\t\tdefaultText: \"defaultText\",\r\n\t\t\tdefaultValue: \"defaultValue\",\r\n\t\t\tplaceholderText: \"placeholder\",\r\n\t\t\ttext: \"text\",\r\n\t\t\tvalue: \"value\",\r\n\t\t},\r\n\r\n\t\t// property names for remote query\r\n\t\tfields: {\r\n\t\t\tremoteValues: \"results\", // grouping for api results\r\n\t\t\tvalues: \"values\", // grouping for all dropdown values\r\n\t\t\tdisabled: \"disabled\", // whether value should be disabled\r\n\t\t\tname: \"name\", // displayed dropdown text\r\n\t\t\tdescription: \"description\", // displayed dropdown description\r\n\t\t\tdescriptionVertical: \"descriptionVertical\", // whether description should be vertical\r\n\t\t\tvalue: \"value\", // actual dropdown value\r\n\t\t\ttext: \"text\", // displayed text when selected\r\n\t\t\ttype: \"type\", // type of dropdown element\r\n\t\t\timage: \"image\", // optional image path\r\n\t\t\timageClass: \"imageClass\", // optional individual class for image\r\n\t\t\ticon: \"icon\", // optional icon name\r\n\t\t\ticonClass: \"iconClass\", // optional individual class for icon (for example to use flag instead)\r\n\t\t\tclass: \"class\", // optional individual class for item/header\r\n\t\t\tdivider: \"divider\", // optional divider append for group headers\r\n\t\t},\r\n\r\n\t\tkeys: {\r\n\t\t\tbackspace: 8,\r\n\t\t\tdelimiter: 188, // comma\r\n\t\t\tdeleteKey: 46,\r\n\t\t\tenter: 13,\r\n\t\t\tescape: 27,\r\n\t\t\tpageUp: 33,\r\n\t\t\tpageDown: 34,\r\n\t\t\tleftArrow: 37,\r\n\t\t\tupArrow: 38,\r\n\t\t\trightArrow: 39,\r\n\t\t\tdownArrow: 40,\r\n\t\t},\r\n\r\n\t\tselector: {\r\n\t\t\taddition: \".addition\",\r\n\t\t\tdivider: \".divider, .header\",\r\n\t\t\tdropdown: \".ui.dropdown\",\r\n\t\t\thidden: \".hidden\",\r\n\t\t\ticon: \"> .dropdown.icon\",\r\n\t\t\tinput: '> input[type=\"hidden\"], > select',\r\n\t\t\titem: \".item\",\r\n\t\t\tlabel: \"> .label\",\r\n\t\t\tremove: \"> .label > .delete.icon\",\r\n\t\t\tsiblingLabel: \".label\",\r\n\t\t\tmenu: \".menu\",\r\n\t\t\tmessage: \".message\",\r\n\t\t\tmenuIcon: \".dropdown.icon\",\r\n\t\t\tsearch: \"input.search, .menu > .search > input, .menu input.search\",\r\n\t\t\tsizer: \"> span.sizer\",\r\n\t\t\ttext: \"> .text:not(.icon)\",\r\n\t\t\tunselectable: \".disabled, .filtered\",\r\n\t\t\tclearIcon: \"> .remove.icon\",\r\n\t\t},\r\n\r\n\t\tclassName: {\r\n\t\t\tactive: \"active\",\r\n\t\t\taddition: \"addition\",\r\n\t\t\tanimating: \"animating\",\r\n\t\t\tdescription: \"description\",\r\n\t\t\tdescriptionVertical: \"vertical\",\r\n\t\t\tdisabled: \"disabled\",\r\n\t\t\tempty: \"empty\",\r\n\t\t\tdropdown: \"ui dropdown\",\r\n\t\t\tfiltered: \"filtered\",\r\n\t\t\thidden: \"hidden transition\",\r\n\t\t\ticon: \"icon\",\r\n\t\t\timage: \"image\",\r\n\t\t\titem: \"item\",\r\n\t\t\tlabel: \"ui label\",\r\n\t\t\tloading: \"loading\",\r\n\t\t\tmenu: \"menu\",\r\n\t\t\tmessage: \"message\",\r\n\t\t\tmultiple: \"multiple\",\r\n\t\t\tplaceholder: \"default\",\r\n\t\t\tsizer: \"sizer\",\r\n\t\t\tsearch: \"search\",\r\n\t\t\tselected: \"selected\",\r\n\t\t\tselection: \"selection\",\r\n\t\t\ttext: \"text\",\r\n\t\t\tupward: \"upward\",\r\n\t\t\tleftward: \"left\",\r\n\t\t\tvisible: \"visible\",\r\n\t\t\tclearable: \"clearable\",\r\n\t\t\tnoselection: \"noselection\",\r\n\t\t\tdelete: \"delete\",\r\n\t\t\theader: \"header\",\r\n\t\t\tdivider: \"divider\",\r\n\t\t\tgroupIcon: \"\",\r\n\t\t\tunfilterable: \"unfilterable\",\r\n\t\t},\r\n\t};\r\n\r\n\t/* Templates */\r\n\t$.fn.suidropdown.settings.templates = {\r\n\t\tdeQuote: function (string, encode) {\r\n\t\t\treturn String(string).replace(/\"/g, encode ? \""\" : \"\");\r\n\t\t},\r\n\t\tescape: function (string, preserveHTML) {\r\n\t\t\tif (preserveHTML) {\r\n\t\t\t\treturn string;\r\n\t\t\t}\r\n\t\t\tvar badChars = /[<>\"'`]/g,\r\n\t\t\t\tshouldEscape = /[&<>\"'`]/,\r\n\t\t\t\tescape = {\r\n\t\t\t\t\t\"<\": \"<\",\r\n\t\t\t\t\t\">\": \">\",\r\n\t\t\t\t\t'\"': \""\",\r\n\t\t\t\t\t\"'\": \"'\",\r\n\t\t\t\t\t\"`\": \"`\",\r\n\t\t\t\t},\r\n\t\t\t\tescapedChar = function (chr) {\r\n\t\t\t\t\treturn escape[chr];\r\n\t\t\t\t};\r\n\t\t\tif (shouldEscape.test(string)) {\r\n\t\t\t\tstring = string.replace(/&(?![a-z0-9#]{1,6};)/, \"&\");\r\n\t\t\t\treturn string.replace(badChars, escapedChar);\r\n\t\t\t}\r\n\t\t\treturn string;\r\n\t\t},\r\n\t\t// generates dropdown from select values\r\n\t\tdropdown: function (select, fields, preserveHTML, className) {\r\n\t\t\tvar placeholder = select.placeholder || false,\r\n\t\t\t\thtml = \"\",\r\n\t\t\t\tescape = $.fn.suidropdown.settings.templates.escape;\r\n\t\t\thtml += '';\r\n\t\t\tif (placeholder) {\r\n\t\t\t\thtml +=\r\n\t\t\t\t\t'
' +\r\n\t\t\t\t\tescape(placeholder, preserveHTML) +\r\n\t\t\t\t\t\"
\";\r\n\t\t\t} else {\r\n\t\t\t\thtml += '
';\r\n\t\t\t}\r\n\t\t\thtml += '
';\r\n\t\t\thtml += $.fn.suidropdown.settings.templates.menu(\r\n\t\t\t\tselect,\r\n\t\t\t\tfields,\r\n\t\t\t\tpreserveHTML,\r\n\t\t\t\tclassName\r\n\t\t\t);\r\n\t\t\thtml += \"
\";\r\n\t\t\treturn html;\r\n\t\t},\r\n\r\n\t\t// generates just menu from select\r\n\t\tmenu: function (response, fields, preserveHTML, className) {\r\n\t\t\tvar values = response[fields.values] || [],\r\n\t\t\t\thtml = \"\",\r\n\t\t\t\tescape = $.fn.suidropdown.settings.templates.escape,\r\n\t\t\t\tdeQuote = $.fn.suidropdown.settings.templates.deQuote;\r\n\t\t\t$.each(values, function (index, option) {\r\n\t\t\t\tvar itemType = option[fields.type] ? option[fields.type] : \"item\",\r\n\t\t\t\t\tisMenu = itemType.indexOf(\"menu\") !== -1;\r\n\t\t\t\tif (itemType === \"item\" || isMenu) {\r\n\t\t\t\t\tvar maybeText = option[fields.text]\r\n\t\t\t\t\t\t\t? ' data-text=\"' + deQuote(option[fields.text], true) + '\"'\r\n\t\t\t\t\t\t\t: \"\",\r\n\t\t\t\t\t\tmaybeDisabled = option[fields.disabled]\r\n\t\t\t\t\t\t\t? className.disabled + \" \"\r\n\t\t\t\t\t\t\t: \"\",\r\n\t\t\t\t\t\tmaybeDescriptionVertical = option[fields.descriptionVertical]\r\n\t\t\t\t\t\t\t? className.descriptionVertical + \" \"\r\n\t\t\t\t\t\t\t: \"\",\r\n\t\t\t\t\t\thasDescription =\r\n\t\t\t\t\t\t\tescape(option[fields.description] || \"\", preserveHTML) != \"\";\r\n\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t'
\";\r\n\t\t\t\t\tif (isMenu) {\r\n\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t'';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (option[fields.image]) {\r\n\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t'';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (option[fields.icon]) {\r\n\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t'';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (hasDescription) {\r\n\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t'' +\r\n\t\t\t\t\t\t\tescape(option[fields.description] || \"\", preserveHTML) +\r\n\t\t\t\t\t\t\t\"\";\r\n\t\t\t\t\t\thtml += !isMenu ? '' : \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (isMenu) {\r\n\t\t\t\t\t\thtml += '';\r\n\t\t\t\t\t}\r\n\t\t\t\t\thtml += escape(option[fields.name] || \"\", preserveHTML);\r\n\t\t\t\t\tif (isMenu) {\r\n\t\t\t\t\t\thtml += \"\";\r\n\t\t\t\t\t\thtml += '
';\r\n\t\t\t\t\t\thtml += $.fn.suidropdown.settings.templates.menu(\r\n\t\t\t\t\t\t\toption,\r\n\t\t\t\t\t\t\tfields,\r\n\t\t\t\t\t\t\tpreserveHTML,\r\n\t\t\t\t\t\t\tclassName\r\n\t\t\t\t\t\t);\r\n\t\t\t\t\t\thtml += \"
\";\r\n\t\t\t\t\t} else if (hasDescription) {\r\n\t\t\t\t\t\thtml += \"
\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\thtml += \"
\";\r\n\t\t\t\t} else if (itemType === \"header\") {\r\n\t\t\t\t\tvar groupName = escape(option[fields.name] || \"\", preserveHTML),\r\n\t\t\t\t\t\tgroupIcon = option[fields.icon]\r\n\t\t\t\t\t\t\t? deQuote(option[fields.icon])\r\n\t\t\t\t\t\t\t: className.groupIcon;\r\n\t\t\t\t\tif (groupName !== \"\" || groupIcon !== \"\") {\r\n\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t'
';\r\n\t\t\t\t\t\tif (groupIcon !== \"\") {\r\n\t\t\t\t\t\t\thtml +=\r\n\t\t\t\t\t\t\t\t'';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\thtml += groupName;\r\n\t\t\t\t\t\thtml += \"
\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (option[fields.divider]) {\r\n\t\t\t\t\t\thtml += '
';\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\treturn html;\r\n\t\t},\r\n\r\n\t\t// generates label for multiselect\r\n\t\tlabel: function (value, text, preserveHTML, className) {\r\n\t\t\tvar escape = $.fn.suidropdown.settings.templates.escape;\r\n\t\t\treturn (\r\n\t\t\t\tescape(text, preserveHTML) +\r\n\t\t\t\t''\r\n\t\t\t);\r\n\t\t},\r\n\r\n\t\t// generates messages like \"No results\"\r\n\t\tmessage: function (message) {\r\n\t\t\treturn message;\r\n\t\t},\r\n\r\n\t\t// generates user addition to selection menu\r\n\t\taddition: function (choice) {\r\n\t\t\treturn choice;\r\n\t\t},\r\n\t};\r\n})(jQuery, window, document);\r\n","/*!\r\n * # Fomantic-UI 2.8.8 - Transition\r\n * http://github.com/fomantic/Fomantic-UI/\r\n *\r\n *\r\n * Released under the MIT license\r\n * http://opensource.org/licenses/MIT\r\n *\r\n */\r\n\r\n;(function ($, window, document, undefined) {\r\n\r\n'use strict';\r\n\r\n$.isFunction = $.isFunction || function(obj) {\r\n return typeof obj === \"function\" && typeof obj.nodeType !== \"number\";\r\n};\r\n\r\nwindow = (typeof window != 'undefined' && window.Math == Math)\r\n ? window\r\n : (typeof self != 'undefined' && self.Math == Math)\r\n ? self\r\n : Function('return this')()\r\n;\r\n\r\n$.fn.transition = function() {\r\n var\r\n $allModules = $(this),\r\n moduleSelector = $allModules.selector || '',\r\n\r\n time = new Date().getTime(),\r\n performance = [],\r\n\r\n moduleArguments = arguments,\r\n query = moduleArguments[0],\r\n queryArguments = [].slice.call(arguments, 1),\r\n methodInvoked = (typeof query === 'string'),\r\n\r\n returnedValue\r\n ;\r\n $allModules\r\n .each(function(index) {\r\n var\r\n $module = $(this),\r\n element = this,\r\n\r\n // set at run time\r\n settings,\r\n instance,\r\n\r\n error,\r\n className,\r\n metadata,\r\n animationEnd,\r\n\r\n moduleNamespace,\r\n eventNamespace,\r\n module\r\n ;\r\n\r\n module = {\r\n\r\n initialize: function() {\r\n\r\n // get full settings\r\n settings = module.get.settings.apply(element, moduleArguments);\r\n\r\n // shorthand\r\n className = settings.className;\r\n error = settings.error;\r\n metadata = settings.metadata;\r\n\r\n // define namespace\r\n eventNamespace = '.' + settings.namespace;\r\n moduleNamespace = 'module-' + settings.namespace;\r\n instance = $module.data(moduleNamespace) || module;\r\n\r\n // get vendor specific events\r\n animationEnd = module.get.animationEndEvent();\r\n\r\n if(methodInvoked) {\r\n methodInvoked = module.invoke(query);\r\n }\r\n\r\n // method not invoked, lets run an animation\r\n if(methodInvoked === false) {\r\n module.verbose('Converted arguments into settings object', settings);\r\n if(settings.interval) {\r\n module.delay(settings.animate);\r\n }\r\n else {\r\n module.animate();\r\n }\r\n module.instantiate();\r\n }\r\n },\r\n\r\n instantiate: function() {\r\n module.verbose('Storing instance of module', module);\r\n instance = module;\r\n $module\r\n .data(moduleNamespace, instance)\r\n ;\r\n },\r\n\r\n destroy: function() {\r\n module.verbose('Destroying previous module for', element);\r\n $module\r\n .removeData(moduleNamespace)\r\n ;\r\n },\r\n\r\n refresh: function() {\r\n module.verbose('Refreshing display type on next animation');\r\n delete module.displayType;\r\n },\r\n\r\n forceRepaint: function() {\r\n module.verbose('Forcing element repaint');\r\n var\r\n $parentElement = $module.parent(),\r\n $nextElement = $module.next()\r\n ;\r\n if($nextElement.length === 0) {\r\n $module.detach().appendTo($parentElement);\r\n }\r\n else {\r\n $module.detach().insertBefore($nextElement);\r\n }\r\n },\r\n\r\n repaint: function() {\r\n module.verbose('Repainting element');\r\n var\r\n fakeAssignment = element.offsetWidth\r\n ;\r\n },\r\n\r\n delay: function(interval) {\r\n var\r\n direction = module.get.animationDirection(),\r\n shouldReverse,\r\n delay\r\n ;\r\n if(!direction) {\r\n direction = module.can.transition()\r\n ? module.get.direction()\r\n : 'static'\r\n ;\r\n }\r\n interval = (interval !== undefined)\r\n ? interval\r\n : settings.interval\r\n ;\r\n shouldReverse = (settings.reverse == 'auto' && direction == className.outward);\r\n delay = (shouldReverse || settings.reverse == true)\r\n ? ($allModules.length - index) * settings.interval\r\n : index * settings.interval\r\n ;\r\n module.debug('Delaying animation by', delay);\r\n setTimeout(module.animate, delay);\r\n },\r\n\r\n animate: function(overrideSettings) {\r\n settings = overrideSettings || settings;\r\n if(!module.is.supported()) {\r\n module.error(error.support);\r\n return false;\r\n }\r\n module.debug('Preparing animation', settings.animation);\r\n if(module.is.animating()) {\r\n if(settings.queue) {\r\n if(!settings.allowRepeats && module.has.direction() && module.is.occurring() && module.queuing !== true) {\r\n module.debug('Animation is currently occurring, preventing queueing same animation', settings.animation);\r\n }\r\n else {\r\n module.queue(settings.animation);\r\n }\r\n return false;\r\n }\r\n else if(!settings.allowRepeats && module.is.occurring()) {\r\n module.debug('Animation is already occurring, will not execute repeated animation', settings.animation);\r\n return false;\r\n }\r\n else {\r\n module.debug('New animation started, completing previous early', settings.animation);\r\n instance.complete();\r\n }\r\n }\r\n if( module.can.animate() ) {\r\n module.set.animating(settings.animation);\r\n }\r\n else {\r\n module.error(error.noAnimation, settings.animation, element);\r\n }\r\n },\r\n\r\n reset: function() {\r\n module.debug('Resetting animation to beginning conditions');\r\n module.remove.animationCallbacks();\r\n module.restore.conditions();\r\n module.remove.animating();\r\n },\r\n\r\n queue: function(animation) {\r\n module.debug('Queueing animation of', animation);\r\n module.queuing = true;\r\n $module\r\n .one(animationEnd + '.queue' + eventNamespace, function() {\r\n module.queuing = false;\r\n module.repaint();\r\n module.animate.apply(this, settings);\r\n })\r\n ;\r\n },\r\n\r\n complete: function (event) {\r\n if(event && event.target === element) {\r\n event.stopPropagation();\r\n }\r\n module.debug('Animation complete', settings.animation);\r\n module.remove.completeCallback();\r\n module.remove.failSafe();\r\n if(!module.is.looping()) {\r\n if( module.is.outward() ) {\r\n module.verbose('Animation is outward, hiding element');\r\n module.restore.conditions();\r\n module.hide();\r\n }\r\n else if( module.is.inward() ) {\r\n module.verbose('Animation is outward, showing element');\r\n module.restore.conditions();\r\n module.show();\r\n }\r\n else {\r\n module.verbose('Static animation completed');\r\n module.restore.conditions();\r\n settings.onComplete.call(element);\r\n }\r\n }\r\n },\r\n\r\n force: {\r\n visible: function() {\r\n var\r\n style = $module.attr('style'),\r\n userStyle = module.get.userStyle(style),\r\n displayType = module.get.displayType(),\r\n overrideStyle = userStyle + 'display: ' + displayType + ' !important;',\r\n inlineDisplay = $module[0].style.display,\r\n mustStayHidden = !displayType || (inlineDisplay === 'none' && settings.skipInlineHidden) || $module[0].tagName.match(/(script|link|style)/i)\r\n ;\r\n if (mustStayHidden){\r\n module.remove.transition();\r\n return false;\r\n }\r\n module.verbose('Overriding default display to show element', displayType);\r\n $module\r\n .attr('style', overrideStyle)\r\n ;\r\n return true;\r\n },\r\n hidden: function() {\r\n var\r\n style = $module.attr('style'),\r\n currentDisplay = $module.css('display'),\r\n emptyStyle = (style === undefined || style === '')\r\n ;\r\n if(currentDisplay !== 'none' && !module.is.hidden()) {\r\n module.verbose('Overriding default display to hide element');\r\n $module\r\n .css('display', 'none')\r\n ;\r\n }\r\n else if(emptyStyle) {\r\n $module\r\n .removeAttr('style')\r\n ;\r\n }\r\n }\r\n },\r\n\r\n has: {\r\n direction: function(animation) {\r\n var\r\n hasDirection = false\r\n ;\r\n animation = animation || settings.animation;\r\n if(typeof animation === 'string') {\r\n animation = animation.split(' ');\r\n $.each(animation, function(index, word){\r\n if(word === className.inward || word === className.outward) {\r\n hasDirection = true;\r\n }\r\n });\r\n }\r\n return hasDirection;\r\n },\r\n inlineDisplay: function() {\r\n var\r\n style = $module.attr('style') || ''\r\n ;\r\n return Array.isArray(style.match(/display.*?;/, ''));\r\n }\r\n },\r\n\r\n set: {\r\n animating: function(animation) {\r\n // remove previous callbacks\r\n module.remove.completeCallback();\r\n\r\n // determine exact animation\r\n animation = animation || settings.animation;\r\n var animationClass = module.get.animationClass(animation);\r\n\r\n // save animation class in cache to restore class names\r\n module.save.animation(animationClass);\r\n\r\n if(module.force.visible()) {\r\n module.remove.hidden();\r\n module.remove.direction();\r\n\r\n module.start.animation(animationClass);\r\n }\r\n },\r\n duration: function(animationName, duration) {\r\n duration = duration || settings.duration;\r\n duration = (typeof duration == 'number')\r\n ? duration + 'ms'\r\n : duration\r\n ;\r\n if(duration || duration === 0) {\r\n module.verbose('Setting animation duration', duration);\r\n $module\r\n .css({\r\n 'animation-duration': duration\r\n })\r\n ;\r\n }\r\n },\r\n direction: function(direction) {\r\n direction = direction || module.get.direction();\r\n if(direction == className.inward) {\r\n module.set.inward();\r\n }\r\n else {\r\n module.set.outward();\r\n }\r\n },\r\n looping: function() {\r\n module.debug('Transition set to loop');\r\n $module\r\n .addClass(className.looping)\r\n ;\r\n },\r\n hidden: function() {\r\n $module\r\n .addClass(className.transition)\r\n .addClass(className.hidden)\r\n ;\r\n },\r\n inward: function() {\r\n module.debug('Setting direction to inward');\r\n $module\r\n .removeClass(className.outward)\r\n .addClass(className.inward)\r\n ;\r\n },\r\n outward: function() {\r\n module.debug('Setting direction to outward');\r\n $module\r\n .removeClass(className.inward)\r\n .addClass(className.outward)\r\n ;\r\n },\r\n visible: function() {\r\n $module\r\n .addClass(className.transition)\r\n .addClass(className.visible)\r\n ;\r\n }\r\n },\r\n\r\n start: {\r\n animation: function(animationClass) {\r\n animationClass = animationClass || module.get.animationClass();\r\n module.debug('Starting tween', animationClass);\r\n $module\r\n .addClass(animationClass)\r\n .one(animationEnd + '.complete' + eventNamespace, module.complete)\r\n ;\r\n if(settings.useFailSafe) {\r\n module.add.failSafe();\r\n }\r\n module.set.duration(settings.duration);\r\n settings.onStart.call(element);\r\n }\r\n },\r\n\r\n save: {\r\n animation: function(animation) {\r\n if(!module.cache) {\r\n module.cache = {};\r\n }\r\n module.cache.animation = animation;\r\n },\r\n displayType: function(displayType) {\r\n if(displayType !== 'none') {\r\n $module.data(metadata.displayType, displayType);\r\n }\r\n },\r\n transitionExists: function(animation, exists) {\r\n $.fn.transition.exists[animation] = exists;\r\n module.verbose('Saving existence of transition', animation, exists);\r\n }\r\n },\r\n\r\n restore: {\r\n conditions: function() {\r\n var\r\n animation = module.get.currentAnimation()\r\n ;\r\n if(animation) {\r\n $module\r\n .removeClass(animation)\r\n ;\r\n module.verbose('Removing animation class', module.cache);\r\n }\r\n module.remove.duration();\r\n }\r\n },\r\n\r\n add: {\r\n failSafe: function() {\r\n var\r\n duration = module.get.duration()\r\n ;\r\n module.timer = setTimeout(function() {\r\n $module.triggerHandler(animationEnd);\r\n }, duration + settings.failSafeDelay);\r\n module.verbose('Adding fail safe timer', module.timer);\r\n }\r\n },\r\n\r\n remove: {\r\n animating: function() {\r\n $module.removeClass(className.animating);\r\n },\r\n animationCallbacks: function() {\r\n module.remove.queueCallback();\r\n module.remove.completeCallback();\r\n },\r\n queueCallback: function() {\r\n $module.off('.queue' + eventNamespace);\r\n },\r\n completeCallback: function() {\r\n $module.off('.complete' + eventNamespace);\r\n },\r\n display: function() {\r\n $module.css('display', '');\r\n },\r\n direction: function() {\r\n $module\r\n .removeClass(className.inward)\r\n .removeClass(className.outward)\r\n ;\r\n },\r\n duration: function() {\r\n $module\r\n .css('animation-duration', '')\r\n ;\r\n },\r\n failSafe: function() {\r\n module.verbose('Removing fail safe timer', module.timer);\r\n if(module.timer) {\r\n clearTimeout(module.timer);\r\n }\r\n },\r\n hidden: function() {\r\n $module.removeClass(className.hidden);\r\n },\r\n visible: function() {\r\n $module.removeClass(className.visible);\r\n },\r\n looping: function() {\r\n module.debug('Transitions are no longer looping');\r\n if( module.is.looping() ) {\r\n module.reset();\r\n $module\r\n .removeClass(className.looping)\r\n ;\r\n }\r\n },\r\n transition: function() {\r\n $module\r\n .removeClass(className.transition)\r\n .removeClass(className.visible)\r\n .removeClass(className.hidden)\r\n ;\r\n }\r\n },\r\n get: {\r\n settings: function(animation, duration, onComplete) {\r\n // single settings object\r\n if(typeof animation == 'object') {\r\n return $.extend(true, {}, $.fn.transition.settings, animation);\r\n }\r\n // all arguments provided\r\n else if(typeof onComplete == 'function') {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation,\r\n onComplete : onComplete,\r\n duration : duration\r\n });\r\n }\r\n // only duration provided\r\n else if(typeof duration == 'string' || typeof duration == 'number') {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation,\r\n duration : duration\r\n });\r\n }\r\n // duration is actually settings object\r\n else if(typeof duration == 'object') {\r\n return $.extend({}, $.fn.transition.settings, duration, {\r\n animation : animation\r\n });\r\n }\r\n // duration is actually callback\r\n else if(typeof duration == 'function') {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation,\r\n onComplete : duration\r\n });\r\n }\r\n // only animation provided\r\n else {\r\n return $.extend({}, $.fn.transition.settings, {\r\n animation : animation\r\n });\r\n }\r\n },\r\n animationClass: function(animation) {\r\n var\r\n animationClass = animation || settings.animation,\r\n directionClass = (module.can.transition() && !module.has.direction())\r\n ? module.get.direction() + ' '\r\n : ''\r\n ;\r\n return className.animating + ' '\r\n + className.transition + ' '\r\n + directionClass\r\n + animationClass\r\n ;\r\n },\r\n currentAnimation: function() {\r\n return (module.cache && module.cache.animation !== undefined)\r\n ? module.cache.animation\r\n : false\r\n ;\r\n },\r\n currentDirection: function() {\r\n return module.is.inward()\r\n ? className.inward\r\n : className.outward\r\n ;\r\n },\r\n direction: function() {\r\n return module.is.hidden() || !module.is.visible()\r\n ? className.inward\r\n : className.outward\r\n ;\r\n },\r\n animationDirection: function(animation) {\r\n var\r\n direction\r\n ;\r\n animation = animation || settings.animation;\r\n if(typeof animation === 'string') {\r\n animation = animation.split(' ');\r\n // search animation name for out/in class\r\n $.each(animation, function(index, word){\r\n if(word === className.inward) {\r\n direction = className.inward;\r\n }\r\n else if(word === className.outward) {\r\n direction = className.outward;\r\n }\r\n });\r\n }\r\n // return found direction\r\n if(direction) {\r\n return direction;\r\n }\r\n return false;\r\n },\r\n duration: function(duration) {\r\n duration = duration || settings.duration;\r\n if(duration === false) {\r\n duration = $module.css('animation-duration') || 0;\r\n }\r\n return (typeof duration === 'string')\r\n ? (duration.indexOf('ms') > -1)\r\n ? parseFloat(duration)\r\n : parseFloat(duration) * 1000\r\n : duration\r\n ;\r\n },\r\n displayType: function(shouldDetermine) {\r\n shouldDetermine = (shouldDetermine !== undefined)\r\n ? shouldDetermine\r\n : true\r\n ;\r\n if(settings.displayType) {\r\n return settings.displayType;\r\n }\r\n if(shouldDetermine && $module.data(metadata.displayType) === undefined) {\r\n var currentDisplay = $module.css('display');\r\n if(currentDisplay === '' || currentDisplay === 'none'){\r\n // create fake element to determine display state\r\n module.can.transition(true);\r\n } else {\r\n module.save.displayType(currentDisplay);\r\n }\r\n }\r\n return $module.data(metadata.displayType);\r\n },\r\n userStyle: function(style) {\r\n style = style || $module.attr('style') || '';\r\n return style.replace(/display.*?;/, '');\r\n },\r\n transitionExists: function(animation) {\r\n return $.fn.transition.exists[animation];\r\n },\r\n animationStartEvent: function() {\r\n var\r\n element = document.createElement('div'),\r\n animations = {\r\n 'animation' :'animationstart',\r\n 'OAnimation' :'oAnimationStart',\r\n 'MozAnimation' :'mozAnimationStart',\r\n 'WebkitAnimation' :'webkitAnimationStart'\r\n },\r\n animation\r\n ;\r\n for(animation in animations){\r\n if( element.style[animation] !== undefined ){\r\n return animations[animation];\r\n }\r\n }\r\n return false;\r\n },\r\n animationEndEvent: function() {\r\n var\r\n element = document.createElement('div'),\r\n animations = {\r\n 'animation' :'animationend',\r\n 'OAnimation' :'oAnimationEnd',\r\n 'MozAnimation' :'mozAnimationEnd',\r\n 'WebkitAnimation' :'webkitAnimationEnd'\r\n },\r\n animation\r\n ;\r\n for(animation in animations){\r\n if( element.style[animation] !== undefined ){\r\n return animations[animation];\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n },\r\n\r\n can: {\r\n transition: function(forced) {\r\n var\r\n animation = settings.animation,\r\n transitionExists = module.get.transitionExists(animation),\r\n displayType = module.get.displayType(false),\r\n elementClass,\r\n tagName,\r\n $clone,\r\n currentAnimation,\r\n inAnimation,\r\n directionExists\r\n ;\r\n if( transitionExists === undefined || forced) {\r\n module.verbose('Determining whether animation exists');\r\n elementClass = $module.attr('class');\r\n tagName = $module.prop('tagName');\r\n\r\n $clone = $('<' + tagName + ' />').addClass( elementClass ).insertAfter($module);\r\n currentAnimation = $clone\r\n .addClass(animation)\r\n .removeClass(className.inward)\r\n .removeClass(className.outward)\r\n .addClass(className.animating)\r\n .addClass(className.transition)\r\n .css('animationName')\r\n ;\r\n inAnimation = $clone\r\n .addClass(className.inward)\r\n .css('animationName')\r\n ;\r\n if(!displayType) {\r\n displayType = $clone\r\n .attr('class', elementClass)\r\n .removeAttr('style')\r\n .removeClass(className.hidden)\r\n .removeClass(className.visible)\r\n .show()\r\n .css('display')\r\n ;\r\n module.verbose('Determining final display state', displayType);\r\n module.save.displayType(displayType);\r\n }\r\n\r\n $clone.remove();\r\n if(currentAnimation != inAnimation) {\r\n module.debug('Direction exists for animation', animation);\r\n directionExists = true;\r\n }\r\n else if(currentAnimation == 'none' || !currentAnimation) {\r\n module.debug('No animation defined in css', animation);\r\n return;\r\n }\r\n else {\r\n module.debug('Static animation found', animation, displayType);\r\n directionExists = false;\r\n }\r\n module.save.transitionExists(animation, directionExists);\r\n }\r\n return (transitionExists !== undefined)\r\n ? transitionExists\r\n : directionExists\r\n ;\r\n },\r\n animate: function() {\r\n // can transition does not return a value if animation does not exist\r\n return (module.can.transition() !== undefined);\r\n }\r\n },\r\n\r\n is: {\r\n animating: function() {\r\n return $module.hasClass(className.animating);\r\n },\r\n inward: function() {\r\n return $module.hasClass(className.inward);\r\n },\r\n outward: function() {\r\n return $module.hasClass(className.outward);\r\n },\r\n looping: function() {\r\n return $module.hasClass(className.looping);\r\n },\r\n occurring: function(animation) {\r\n animation = animation || settings.animation;\r\n animation = '.' + animation.replace(' ', '.');\r\n return ( $module.filter(animation).length > 0 );\r\n },\r\n visible: function() {\r\n return $module.is(':visible');\r\n },\r\n hidden: function() {\r\n return $module.css('visibility') === 'hidden';\r\n },\r\n supported: function() {\r\n return(animationEnd !== false);\r\n }\r\n },\r\n\r\n hide: function() {\r\n module.verbose('Hiding element');\r\n if( module.is.animating() ) {\r\n module.reset();\r\n }\r\n element.blur(); // IE will trigger focus change if element is not blurred before hiding\r\n module.remove.display();\r\n module.remove.visible();\r\n if($.isFunction(settings.onBeforeHide)){\r\n settings.onBeforeHide.call(element,function(){\r\n module.hideNow();\r\n });\r\n } else {\r\n module.hideNow();\r\n }\r\n\r\n },\r\n\r\n hideNow: function() {\r\n module.set.hidden();\r\n module.force.hidden();\r\n settings.onHide.call(element);\r\n settings.onComplete.call(element);\r\n // module.repaint();\r\n },\r\n\r\n show: function(display) {\r\n module.verbose('Showing element', display);\r\n if(module.force.visible()) {\r\n module.remove.hidden();\r\n module.set.visible();\r\n settings.onShow.call(element);\r\n settings.onComplete.call(element);\r\n // module.repaint();\r\n }\r\n },\r\n\r\n toggle: function() {\r\n if( module.is.visible() ) {\r\n module.hide();\r\n }\r\n else {\r\n module.show();\r\n }\r\n },\r\n\r\n stop: function() {\r\n module.debug('Stopping current animation');\r\n $module.triggerHandler(animationEnd);\r\n },\r\n\r\n stopAll: function() {\r\n module.debug('Stopping all animation');\r\n module.remove.queueCallback();\r\n $module.triggerHandler(animationEnd);\r\n },\r\n\r\n clear: {\r\n queue: function() {\r\n module.debug('Clearing animation queue');\r\n module.remove.queueCallback();\r\n }\r\n },\r\n\r\n enable: function() {\r\n module.verbose('Starting animation');\r\n $module.removeClass(className.disabled);\r\n },\r\n\r\n disable: function() {\r\n module.debug('Stopping animation');\r\n $module.addClass(className.disabled);\r\n },\r\n\r\n setting: function(name, value) {\r\n module.debug('Changing setting', name, value);\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, settings, name);\r\n }\r\n else if(value !== undefined) {\r\n if($.isPlainObject(settings[name])) {\r\n $.extend(true, settings[name], value);\r\n }\r\n else {\r\n settings[name] = value;\r\n }\r\n }\r\n else {\r\n return settings[name];\r\n }\r\n },\r\n internal: function(name, value) {\r\n if( $.isPlainObject(name) ) {\r\n $.extend(true, module, name);\r\n }\r\n else if(value !== undefined) {\r\n module[name] = value;\r\n }\r\n else {\r\n return module[name];\r\n }\r\n },\r\n debug: function() {\r\n if(!settings.silent && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.debug.apply(console, arguments);\r\n }\r\n }\r\n },\r\n verbose: function() {\r\n if(!settings.silent && settings.verbose && settings.debug) {\r\n if(settings.performance) {\r\n module.performance.log(arguments);\r\n }\r\n else {\r\n module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');\r\n module.verbose.apply(console, arguments);\r\n }\r\n }\r\n },\r\n error: function() {\r\n if(!settings.silent) {\r\n module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');\r\n module.error.apply(console, arguments);\r\n }\r\n },\r\n performance: {\r\n log: function(message) {\r\n var\r\n currentTime,\r\n executionTime,\r\n previousTime\r\n ;\r\n if(settings.performance) {\r\n currentTime = new Date().getTime();\r\n previousTime = time || currentTime;\r\n executionTime = currentTime - previousTime;\r\n time = currentTime;\r\n performance.push({\r\n 'Name' : message[0],\r\n 'Arguments' : [].slice.call(message, 1) || '',\r\n 'Element' : element,\r\n 'Execution Time' : executionTime\r\n });\r\n }\r\n clearTimeout(module.performance.timer);\r\n module.performance.timer = setTimeout(module.performance.display, 500);\r\n },\r\n display: function() {\r\n var\r\n title = settings.name + ':',\r\n totalTime = 0\r\n ;\r\n time = false;\r\n clearTimeout(module.performance.timer);\r\n $.each(performance, function(index, data) {\r\n totalTime += data['Execution Time'];\r\n });\r\n title += ' ' + totalTime + 'ms';\r\n if(moduleSelector) {\r\n title += ' \\'' + moduleSelector + '\\'';\r\n }\r\n if($allModules.length > 1) {\r\n title += ' ' + '(' + $allModules.length + ')';\r\n }\r\n if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {\r\n console.groupCollapsed(title);\r\n if(console.table) {\r\n console.table(performance);\r\n }\r\n else {\r\n $.each(performance, function(index, data) {\r\n console.log(data['Name'] + ': ' + data['Execution Time']+'ms');\r\n });\r\n }\r\n console.groupEnd();\r\n }\r\n performance = [];\r\n }\r\n },\r\n // modified for transition to return invoke success\r\n invoke: function(query, passedArguments, context) {\r\n var\r\n object = instance,\r\n maxDepth,\r\n found,\r\n response\r\n ;\r\n passedArguments = passedArguments || queryArguments;\r\n context = element || context;\r\n if(typeof query == 'string' && object !== undefined) {\r\n query = query.split(/[\\. ]/);\r\n maxDepth = query.length - 1;\r\n $.each(query, function(depth, value) {\r\n var camelCaseValue = (depth != maxDepth)\r\n ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)\r\n : query\r\n ;\r\n if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {\r\n object = object[camelCaseValue];\r\n }\r\n else if( object[camelCaseValue] !== undefined ) {\r\n found = object[camelCaseValue];\r\n return false;\r\n }\r\n else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {\r\n object = object[value];\r\n }\r\n else if( object[value] !== undefined ) {\r\n found = object[value];\r\n return false;\r\n }\r\n else {\r\n return false;\r\n }\r\n });\r\n }\r\n if ( $.isFunction( found ) ) {\r\n response = found.apply(context, passedArguments);\r\n }\r\n else if(found !== undefined) {\r\n response = found;\r\n }\r\n\r\n if(Array.isArray(returnedValue)) {\r\n returnedValue.push(response);\r\n }\r\n else if(returnedValue !== undefined) {\r\n returnedValue = [returnedValue, response];\r\n }\r\n else if(response !== undefined) {\r\n returnedValue = response;\r\n }\r\n return (found !== undefined)\r\n ? found\r\n : false\r\n ;\r\n }\r\n };\r\n module.initialize();\r\n })\r\n ;\r\n return (returnedValue !== undefined)\r\n ? returnedValue\r\n : this\r\n ;\r\n};\r\n\r\n// Records if CSS transition is available\r\n$.fn.transition.exists = {};\r\n\r\n$.fn.transition.settings = {\r\n\r\n // module info\r\n name : 'Transition',\r\n\r\n // hide all output from this component regardless of other settings\r\n silent : false,\r\n\r\n // debug content outputted to console\r\n debug : false,\r\n\r\n // verbose debug output\r\n verbose : false,\r\n\r\n // performance data output\r\n performance : true,\r\n\r\n // event namespace\r\n namespace : 'transition',\r\n\r\n // delay between animations in group\r\n interval : 0,\r\n\r\n // whether group animations should be reversed\r\n reverse : 'auto',\r\n\r\n // animation callback event\r\n onStart : function() {},\r\n onComplete : function() {},\r\n onShow : function() {},\r\n onHide : function() {},\r\n\r\n // whether timeout should be used to ensure callback fires in cases animationend does not\r\n useFailSafe : true,\r\n\r\n // delay in ms for fail safe\r\n failSafeDelay : 100,\r\n\r\n // whether EXACT animation can occur twice in a row\r\n allowRepeats : false,\r\n\r\n // Override final display type on visible\r\n displayType : false,\r\n\r\n // animation duration\r\n animation : 'fade',\r\n duration : false,\r\n\r\n // new animations will occur after previous ones\r\n queue : true,\r\n\r\n// whether initially inline hidden objects should be skipped for transition\r\n skipInlineHidden: false,\r\n\r\n metadata : {\r\n displayType: 'display'\r\n },\r\n\r\n className : {\r\n animating : 'animating',\r\n disabled : 'disabled',\r\n hidden : 'hidden',\r\n inward : 'in',\r\n loading : 'loading',\r\n looping : 'looping',\r\n outward : 'out',\r\n transition : 'transition',\r\n visible : 'visible'\r\n },\r\n\r\n // possible errors\r\n error: {\r\n noAnimation : 'Element is no longer attached to DOM. Unable to animate. Use silent setting to surpress this warning in production.',\r\n repeated : 'That animation is already occurring, cancelling repeated animation',\r\n method : 'The method you called is not defined',\r\n support : 'This browser does not support CSS animations'\r\n }\r\n\r\n};\r\n\r\n\r\n})( jQuery, window, document );\r\n","\r\nimport \"./components/transition.js\";\r\n//import \"./components/search.js\"\r\nimport \"./components/dropdown.js\";\r\nimport \"./semantic-dropdown.scss\";\r\n\r\nimport { ISelectOption } from '@/apps/car-details/types';\r\n\r\ntype dropdownCallback = (this: JQuery, value: any, text: string, $choice: JQuery) => void;\r\n//type searchCallback = (this:JQuery, searchTerm:string) => boolean | void ;\r\n\r\nexport const StandardSearchDropdownOptions: any = {\r\n placeholder: false,\r\n allowAdditions: false,\r\n forceSelection: false,\r\n fullTextSearch: \"exact\", \r\n ignoreCase: true,\r\n ignoreSearchCase: true,\r\n className: { menu: 'scrollhint menu' },\r\n match: \"text\",\r\n // debug: true,\r\n // verbose: true,\r\n};\r\n\r\nconst searchAddDropdown: any = {\r\n allowAdditions: true,\r\n match: \"text\",\r\n fullTextSearch: false,\r\n ignoreCase: true,\r\n ignoreSearchCase: true,\r\n className: { menu: 'scrollhint menu' },\r\n};\r\n\r\n\r\nconst searchAddClearableDropdown: any = {\r\n allowAdditions: true,\r\n match: \"text\",\r\n fullTextSearch: false,\r\n ignoreCase: true,\r\n ignoreSearchCase: true,\r\n className: { menu: 'scrollhint menu' },\r\n placeholder:false,\r\n clearable:true\r\n};\r\n\r\n\r\n\r\n\r\nconst keyedOptions: { [name: string]: SemanticUI.DropdownSettings } = {\r\n 'default': StandardSearchDropdownOptions,\r\n 'search-add': searchAddDropdown,\r\n 'search-add-clearable': searchAddClearableDropdown,\r\n 'dealer-select': {\r\n fullTextSearch: \"exact\", \r\n forceSelection:true,\r\n match: \"text\",\r\n }\r\n};\r\n\r\n\r\nexport class SemanticDropdown {\r\n\r\n ctl:JQuery;\r\n \r\n constructor(el: string|HTMLElement, settings: SemanticUI.DropdownSettings | undefined = undefined) {\r\n \r\n this.ctl = (typeof el == 'string') ? $(el) : $(el);\r\n\r\n if (settings) this.ctl.suidropdown(settings);\r\n \r\n console.log(\"[semantic-dropdown] initialized\", this.ctl.attr('id'));\r\n }\r\n\r\n clearAll() { \r\n this.clear();\r\n this.setOptions([{name:\"\", value:\"\"}]);\r\n }\r\n \r\n clear() { this.ctl.suidropdown('clear'); }\r\n refresh() { this.ctl.suidropdown('refresh'); }\r\n \r\n show(/*cb?:()=>void|undefined, preventFocus?:boolean|undefined*/) { this.ctl.suidropdown('show');}\r\n\r\n //@ts-ignore\r\n setOptions(values: ISelectOption[]) { this.ctl.suidropdown('setup menu', { values }); }\r\n\r\n //@ts-ignore\r\n setValues(values: ISelectOption[]) { this.ctl.suidropdown('change values', { values }); }\r\n\r\n updateOptions(options: ISelectOption[]){\r\n \r\n // Update the hidden select control\r\n this.ctl.empty(); \r\n \r\n options.forEach((value)=>\r\n {\r\n this.ctl.append($(\"\").attr(\"value\", value.value).text(value.name));\r\n });\r\n\r\n // Update the semantic dropdown\r\n this.setOptions(options); \r\n }\r\n\r\n smartUpdateOptions(options: ISelectOption[]) {\r\n \r\n const oldValue = this.getValue();\r\n\r\n this.updateOptions(options);\r\n\r\n var match = options.find(x => x.value === oldValue);\r\n\r\n if (match){\r\n this.select(match.value);\r\n }\r\n else this.clear();\r\n \r\n }\r\n\r\n select(value:any) { \r\n if (value)\r\n this.ctl.suidropdown('set selected', value);\r\n else\r\n this.clear();\r\n }\r\n\r\n deselect(value: any) {\r\n this.ctl.suidropdown('remove selected', value);\r\n }\r\n\r\n toggleSelect(value:any):boolean {\r\n\r\n const selection = this.getValue();\r\n \r\n const selected = Array.isArray(selection) ?\r\n selection.includes(value) : \r\n selection == value;\r\n\r\n if (selected){\r\n this.deselect(value);\r\n return false;\r\n }\r\n else\r\n {\r\n this.select(value);\r\n return true;\r\n } \r\n }\r\n\r\n getValue() { return this.ctl.suidropdown('get value'); }\r\n\r\n\r\n getText() { return this.ctl.suidropdown('get text'); }\r\n setText(text:string) { this.ctl.suidropdown('set text', text); }\r\n getInitialText() { return this.ctl.suidropdown('get default text'); }\r\n\r\n onChange(cb: dropdownCallback){this.ctl.suidropdown('setting', 'onChange',cb);}\r\n\r\n onAdd(cb: dropdownCallback) { this.ctl.suidropdown('setting', 'onAdd', cb); }\r\n onRemove(cb: dropdownCallback) { this.ctl.suidropdown('setting', 'onRemove', cb); }\r\n \r\n //onSearch(cb: searchCallback) { this.ctl.suidropdown('setting', 'onSearch', cb); }\r\n\r\n saveDefaults() { this.ctl.suidropdown('save defaults') };\r\n\r\n restoreDefaults(){ this.ctl.suidropdown('restore defaults');}\r\n\r\n restoreDefaultText() { this.ctl.suidropdown('restore default text'); }\r\n restoreDefaultValue() { this.ctl.suidropdown('restore default value'); }\r\n\r\n allowAdditions(hide:boolean = true){\r\n this.ctl.suidropdown('setting', 'allowAdditions', true);\r\n this.ctl.suidropdown('setting', 'hideAdditions', hide);\r\n } \r\n\r\n forceSelection(force:boolean) {\r\n this.ctl.suidropdown('setting', 'forceSelection', force); \r\n } \r\n\r\n fullTextSearch(fulltext: boolean|\"exact\") {\r\n this.ctl.suidropdown('setting', 'fullTextSearch', fulltext);\r\n } \r\n}\r\n\r\nexport function initializeDropdowns(selector: string, optionsKey?: string):JQuery {\r\n const ctl: JQuery = $(selector);\r\n const options = keyedOptions[optionsKey ?? \"default\"];\r\n console.log(`Initialized ${ctl.length} dropdowns with ${optionsKey}`);\r\n return ctl.suidropdown(options);\r\n}\r\n\r\nexport function initializeDropdown(el: string | HTMLElement, optionsKey?:string|null):JQuery {\r\n const ctl:JQuery = (typeof el == 'string') ? $(el) : $(el);\r\n const options = keyedOptions[optionsKey ?? \"default\"];\r\n console.log(`Initialized 1 dropdowns with ${optionsKey}`);\r\n return ctl.suidropdown(options);\r\n}\r\n","import { API, ApiException, AxiosPromise } from '@/common/utils/base-api';\r\n\r\nexport const AuthApi = {\r\n /*\r\n async initSession() {\r\n const apiResponse = await API.get(\"api/auth/initsession\");\r\n return apiResponse;\r\n },\r\n */\r\n\r\n refreshToken(): AxiosPromise {\r\n return API.get(\"/api/auth/refreshtoken\");\r\n }\r\n\r\n /*\r\n async refreshToken() {\r\n const apiResponse = await API.get(\"api/auth/refreshtoken\");\r\n return apiResponse;\r\n }*/\r\n};","import { fromWebToken } from \"@aws-sdk/credential-providers\";\r\nimport { getDefaultRoleAssumerWithWebIdentity } from \"@aws-sdk/client-sts\";\r\nimport {AuthApi} from '@/common/utils/auth-api';\r\n\r\nimport { CredentialProvider, Credentials } from \"@aws-sdk/types\";\r\nimport { S3Client, S3ClientConfig, PutObjectCommandInput, BucketLoggingStatus } from \"@aws-sdk/client-s3\";\r\nimport { LambdaClient, InvokeCommand, InvokeCommandOutput } from \"@aws-sdk/client-lambda\";\r\nimport { FetchHttpHandler } from \"@smithy/fetch-http-handler\";\r\nimport { Upload } from \"@aws-sdk/lib-storage\";\r\nimport XhrHttpHandler from \"./xhr_http_handler\";\r\nimport type { ProgressCallback, IAwsUserContext } from './aws-types';\r\nimport dbg from \"../diagnostics\";\r\n\r\nexport class AwsUtils {\r\n\r\n public static credentials: CredentialProvider;\r\n public static defaultRegion:string; \r\n\r\n public static readonly INVALID_S3KEY_CHARS: any[] = [...'\"<>|\\x00\\x01\\x02\\x03\\x04\\x05\\x06\\x07\\b\\t\\n\\v\\f\\r\\x0E\\x0F\\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17\\x18\\x19\\x1A\\x1B\\x1C\\x1D\\x1E\\x1F:*?\\\\/<>*%&:\\\\?'];\r\n \r\n public static readonly DEFAULT_AWS_REGION = 'us-west-2';\r\n public static readonly DEFAULT_TOKEN_DURATION = 28800;\r\n\r\n public static async setupCredentials(\r\n //roleArn: string, idToken: string,userName: string, duration: number = 28800, region: string = \"us-west-2\"\r\n userContext: IAwsUserContext):Promise {\r\n\r\n // Fill in any missing bits with defaults\r\n if (!userContext.region) userContext.region = this.DEFAULT_AWS_REGION;\r\n if (!userContext.tokenDuration) userContext.tokenDuration = this.DEFAULT_TOKEN_DURATION;\r\n if (!this.defaultRegion) this.defaultRegion = userContext.region;\r\n\r\n /* old\r\n this.credentials = fromWebToken({\r\n roleArn: userContext.roleArn,\r\n roleSessionName: userContext.userName,\r\n clientConfig: { region: userContext.region },\r\n // The token passed from the server\r\n webIdentityToken: userContext.idToken,\r\n // How long this token should last\r\n durationSeconds: userContext.tokenDuration,\r\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity({\r\n region: userContext.region\r\n })\r\n });\r\n */\r\n\r\n \r\n // Create our own function to pass into the credentials\r\n // argument. This function will get called when credentials\r\n // are to be fetched. This allows us to intercept the failure\r\n // when the token has expired.\r\n const wrappedCredentials = (() => {\r\n\r\n let result:Credentials|null = null;\r\n\r\n return async () => {\r\n if (result != null) {\r\n // If we've previously retrieved an AWS token and it hasn't yet expired, use that token.\r\n if (result.expiration && result.expiration.getTime() > new Date().getTime()) {\r\n return result;\r\n }\r\n }\r\n\r\n const credentialsArgs = {\r\n roleArn: userContext.roleArn,\r\n roleSessionName: userContext.userName, \r\n webIdentityToken: userContext.idToken,\r\n durationSeconds: userContext.tokenDuration,\r\n clientConfig: { region: userContext.region }, \r\n roleAssumerWithWebIdentity:getDefaultRoleAssumerWithWebIdentity({region: userContext.region})\r\n };\r\n\r\n const credentialsFunc = fromWebToken(credentialsArgs);\r\n\r\n try {\r\n result = await credentialsFunc();\r\n } catch (ex) {\r\n const refreshResult = await AuthApi.refreshToken();\r\n\r\n // Update the ID Token with the one we just received after refreshing our tokens.\r\n userContext.idToken = refreshResult.data;\r\n\r\n // We will have received a new ID token.\r\n credentialsArgs.webIdentityToken = userContext.idToken;\r\n\r\n // Try one last time. If this fails, then the failure is for some other reason\r\n result = await fromWebToken(credentialsArgs)();\r\n }\r\n\r\n return result;\r\n };\r\n })();\r\n\r\n this.credentials = wrappedCredentials;\r\n \r\n return await this.credentials();\r\n //return this.credentials;\r\n }\r\n \r\n\r\n public static internalCreateS3Client(region: string = this.DEFAULT_AWS_REGION, httpHandler:FetchHttpHandler): S3Client {\r\n \r\n const s3Config: S3ClientConfig = {\r\n region: region,\r\n credentials: this.credentials,\r\n useAccelerateEndpoint: true,\r\n maxAttempts: 10,\r\n requestHandler: httpHandler,\r\n };\r\n\r\n return new S3Client(s3Config);\r\n }\r\n\r\n public static createS3Client(region: string = this.DEFAULT_AWS_REGION):S3Client{\r\n const httpHandler = new FetchHttpHandler({\r\n // From v2 - Set timeout to 0 for slow connections as per https://github.com/aws/aws-sdk-js/issues/1704 and various other sources\r\n requestTimeout: 0\r\n });\r\n\r\n return this.internalCreateS3Client(region, httpHandler);\r\n }\r\n\r\n \r\n\r\n public static createLambdaClient(region = \"us-west-2\"):LambdaClient{\r\n const lambdaClient = new LambdaClient({\r\n credentials: AwsUtils.credentials,\r\n region: region\r\n });\r\n\r\n return lambdaClient;\r\n }\r\n\r\n public static sanitizeKeyName(keyname:string){\r\n for (const invalidCharIdx in this.INVALID_S3KEY_CHARS) {\r\n const invalidChar = this.INVALID_S3KEY_CHARS[invalidCharIdx];\r\n while (keyname.indexOf(invalidChar) > -1) {\r\n keyname = keyname.replace(invalidChar, '_');\r\n }\r\n }\r\n\r\n return keyname;\r\n }\r\n\r\n /*\r\n public static testUpload(ctx: IUploadClientContext) {\r\n var params: PutObjectCommandInput = {\r\n Bucket: ctx.targetS3Bucket,\r\n Key: 'uploads/' + ctx.userName + '/' + \"test.txt\",\r\n Body: new TextEncoder().encode(\"HELLO\")\r\n };\r\n const upload = this.createUpload(params, (progress) => {console.log(progress);});\r\n\r\n upload.done().then(x => {\r\n console.log(x);\r\n })\r\n .catch(reason => {\r\n console.log(reason);\r\n })\r\n .finally(() => {\r\n console.log(\"finally\");\r\n })\r\n }\r\n*/\r\n public static createUpload(params: PutObjectCommandInput, listener: (progress: any) => void):Upload{\r\n\r\n // Ponyfill Blob.stream if necessary (Safari 14.1)\r\n if (!Blob.prototype.stream) {\r\n params.Body = this.blobStream(params.Body);\r\n dbg.addBreadcrumb({ type: \"browser-fix\", message:\"Using polyfill stream\"}); \r\n }\r\n\r\n const upload = new Upload({\r\n client: this.createS3Client(this.defaultRegion),\r\n params: params,\r\n // This will prevent the DELETE request from occuring after canceling. \r\n // We're bypassing it because our CORS policy doesn't allow DELETE\r\n leavePartsOnError: true,\r\n\r\n queueSize:1\r\n });\r\n\r\n \r\n upload.on('httpUploadProgress', listener); \r\n return upload;\r\n }\r\n\r\n public static createXhrUpload(params: PutObjectCommandInput, callback: ProgressCallback): Upload {\r\n\r\n // Ponyfill Blob.stream if necessary (Safari 14.1)\r\n if (!Blob.prototype.stream) {\r\n params.Body = this.blobStream(params.Body);\r\n dbg.addBreadcrumb({ type: \"browser-fix\", message: \"Using custom stream\" });\r\n }\r\n\r\n const httpHandler = new XhrHttpHandler({\r\n // From v2 - Set timeout to 0 for slow connections as per https://github.com/aws/aws-sdk-js/issues/1704 and various other sources\r\n requestTimeout: 0\r\n });\r\n\r\n httpHandler.onProgress(callback);\r\n\r\n const upload = new Upload({\r\n client: this.internalCreateS3Client(this.defaultRegion, httpHandler),\r\n params: params,\r\n // This will prevent the DELETE request from occuring after canceling. \r\n // We're bypassing it because our CORS policy doesn't allow DELETE\r\n leavePartsOnError: true,\r\n\r\n queueSize: 1\r\n });\r\n \r\n return upload;\r\n }\r\n\r\n public static invokeLambda(functionName: string, payloadText: string, cb: (err: any, data?: InvokeCommandOutput) => void)\r\n {\r\n const lambdaRequest = new InvokeCommand({\r\n FunctionName: functionName,\r\n InvocationType: \"RequestResponse\",\r\n Payload: new TextEncoder().encode(payloadText)\r\n });\r\n\r\n const client = this.createLambdaClient(this.defaultRegion);\r\n\r\n return client.send(lambdaRequest).then(\r\n data => cb(undefined, data),\r\n err => cb(err, undefined)\r\n );\r\n }\r\n\r\n public static blobStream(blob:any) {\r\n let position = 0;\r\n\r\n return new ReadableStream({\r\n async pull(controller) {\r\n\r\n const desiredSize = controller.desiredSize ?? 1000;\r\n\r\n const chunk = blob.slice(\r\n position,\r\n Math.min(blob.size, position + Math.max(desiredSize, 512 * 1024))\r\n );\r\n const buffer = await new Response(chunk).arrayBuffer();\r\n const uint8array = new Uint8Array(buffer);\r\n const bytesRead = uint8array.byteLength;\r\n\r\n position += bytesRead;\r\n controller.enqueue(uint8array);\r\n\r\n if (position >= blob.size) controller.close();\r\n }\r\n });\r\n }\r\n}\r\n","export * from './aws-utils';\r\nexport * from './aws-types';\r\n","import { FetchHttpHandler, FetchHttpHandlerOptions } from '@smithy/fetch-http-handler';\r\nimport { buildQueryString } from '@smithy/querystring-builder';\r\nimport { HeaderBag, HttpHandlerOptions } from '@smithy/types';\r\nimport { HttpResponse, HttpRequest, } from '@smithy/protocol-http';\r\nimport type {ProgressCallback} from './aws-types';\r\nimport dbg from \"@/common/utils/diagnostics\";\r\n\r\n// Custom 'fetch handler' from StackOverflow 'How to track upload progress to S3 using aws-sdk V3 for browser (javascript)'\r\n// https://stackoverflow.com/questions/65728325/how-to-track-upload-progress-to-s3-using-aws-sdk-v3-for-browser-javascript\r\n\r\nexport default class XhrHttpHandler extends FetchHttpHandler {\r\n\r\n onProgressCallbacks: ProgressCallback[] = [];\r\n myRequestTimeout?: number;\r\n\r\n constructor({ requestTimeout }: FetchHttpHandlerOptions = {}) {\r\n super({ requestTimeout });\r\n this.myRequestTimeout = requestTimeout;\r\n }\r\n\r\n handle(request: HttpRequest, { abortSignal }: HttpHandlerOptions = {}): Promise<{ response: HttpResponse }> {\r\n // Override requests to post or put, otherwise use default fetch method\r\n if ((request.method === 'PUT') && request.body) {\r\n return this.handleByXhr(request, { abortSignal });\r\n } else {\r\n return super.handle(request, { abortSignal });\r\n }\r\n }\r\n\r\n onProgress(callback: ProgressCallback) {\r\n this.onProgressCallbacks.push(callback);\r\n }\r\n\r\n offProgress(callback: ProgressCallback) {\r\n const index = this.onProgressCallbacks.indexOf(callback);\r\n if (index !== -1) {\r\n this.onProgressCallbacks.splice(index, 1);\r\n }\r\n }\r\n\r\n /**\r\n * handles a request by XHR instead of fetch\r\n * this is a copy the `handle` method of the `FetchHttpHandler` class of @aws-sdk/fetch-http-handler\r\n * replacing the `Fetch`part with XHR\r\n */\r\n async handleByXhr(request: HttpRequest, { abortSignal }: HttpHandlerOptions = {}): Promise<{ response: HttpResponse }> {\r\n const requestTimeoutInMs = this.myRequestTimeout;\r\n\r\n // if the request was already aborted, prevent doing extra work\r\n if (abortSignal && abortSignal.aborted) {\r\n const abortError = new Error('Request aborted');\r\n abortError.name = 'AbortError';\r\n return Promise.reject(abortError);\r\n }\r\n\r\n let path = request.path;\r\n if (request.query) {\r\n const queryString = buildQueryString(request.query);\r\n if (queryString) {\r\n path += `?${queryString}`;\r\n }\r\n }\r\n\r\n const { port, method } = request;\r\n const url = `${request.protocol}//${request.hostname}${port ? `:${port}` : ''}${path}`;\r\n // Request constructor doesn't allow GET/HEAD request with body\r\n // ref: https://github.com/whatwg/fetch/issues/551\r\n const body = method === 'GET' || method === 'HEAD' ? undefined : request.body;\r\n const requestOptions = {\r\n body,\r\n headers: new Headers(request.headers),\r\n method,\r\n };\r\n\r\n\r\n const myXHR = new XMLHttpRequest();\r\n const xhrPromise = new Promise <{ headers: string[], body: Blob, status: number }>((resolve, reject) => {\r\n try {\r\n myXHR.responseType = 'blob';\r\n\r\n // bind the events\r\n myXHR.onload = progressEvent => {\r\n \r\n /*console.log('XHR.on.load', {\r\n url: myXHR.responseURL,\r\n status: myXHR.status,\r\n text: myXHR.statusText,\r\n restype: myXHR.response.type,\r\n headers:myXHR.getAllResponseHeaders(),\r\n progressEvent,\r\n myXHR \r\n });*/\r\n\r\n resolve({\r\n body: myXHR.response,\r\n headers: myXHR.getAllResponseHeaders().split(/[\\r\\n]+/),\r\n status: myXHR.status\r\n });\r\n };\r\n myXHR.onerror = progressEvent => {\r\n //console.log('XHR.on.error', { myXHR, progressEvent });\r\n \r\n let errorMessage = \"Unknown error occured while uploading a file\";\r\n try {\r\n errorMessage = myXHR.responseText;\r\n } catch { }\r\n\r\n dbg.captureException(errorMessage, { extra: { myXHR, progressEvent } });\r\n\r\n reject(new Error(errorMessage));\r\n };\r\n myXHR.onabort = progressEvent => {\r\n\r\n //console.log('XHR.on.abort', { myXHR, progressEvent });\r\n\r\n dbg.logWarning(\"Upload aborted\", \"upload\", { extra: { myXHR, progressEvent } });\r\n\r\n const abortError = new Error('Request aborted');\r\n abortError.name = 'AbortError';\r\n reject(abortError);\r\n };\r\n\r\n // progress event must be bound to the `upload` property\r\n if (myXHR.upload) {\r\n myXHR.upload.onprogress = progressEvent => {\r\n \r\n //console.log('XHR.on.onprogress', progressEvent );\r\n this.onProgressCallbacks.forEach(c => c(path, progressEvent));\r\n };\r\n }\r\n\r\n\r\n myXHR.open(requestOptions.method, url);\r\n // append headers\r\n if (requestOptions.headers) {\r\n (requestOptions.headers).forEach((headerVal, headerKey, headers) => {\r\n if (['host', 'content-length'].indexOf(headerKey.toLowerCase()) >= 0) {\r\n // avoid \"refused to set unsafe header\" error message\r\n return;\r\n }\r\n\r\n myXHR.setRequestHeader(headerKey, headerVal);\r\n });\r\n }\r\n myXHR.send(requestOptions.body);\r\n } catch (e) {\r\n console.error('S3 XHRHandler error', e);\r\n reject(e);\r\n }\r\n });\r\n\r\n const raceOfPromises = [\r\n xhrPromise.then((response) => {\r\n const fetchHeaders = response.headers;\r\n const transformedHeaders:HeaderBag = {};\r\n\r\n fetchHeaders.forEach(header => {\r\n const name = header.substr(0, header.indexOf(':'));\r\n const val = header.substr(header.indexOf(':') + 1);\r\n if (name && val) {\r\n transformedHeaders[name] = val.trim();\r\n }\r\n });\r\n\r\n const hasReadableStream = response.body !== undefined;\r\n\r\n // Return the response with buffered body\r\n if (!hasReadableStream) {\r\n return response.body.text().then(body => ({\r\n response: new HttpResponse({\r\n headers: transformedHeaders,\r\n statusCode: response.status,\r\n body,\r\n }),\r\n }));\r\n }\r\n // Return the response with streaming body\r\n return {\r\n response: new HttpResponse({\r\n \r\n headers: transformedHeaders,\r\n statusCode: response.status,\r\n body: response.body,\r\n }),\r\n };\r\n }),\r\n this.requestTimeoutFn(requestTimeoutInMs),\r\n ];\r\n if (abortSignal) {\r\n raceOfPromises.push(\r\n new Promise((resolve, reject) => {\r\n abortSignal.onabort = () => {\r\n myXHR.abort();\r\n };\r\n })\r\n );\r\n }\r\n\r\n \r\n //@ts-ignore\r\n return Promise.race(raceOfPromises);\r\n }\r\n\r\n requestTimeoutFn(timeoutInMs = 0):Promise {\r\n return new Promise((resolve, reject) => {\r\n if (timeoutInMs) {\r\n setTimeout(() => {\r\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\r\n timeoutError.name = 'TimeoutError';\r\n reject(timeoutError);\r\n }, timeoutInMs);\r\n }\r\n });\r\n }\r\n}\r\n\r\n","import axios, { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';\r\nexport type {AxiosPromise} from 'axios';\r\nimport { FieldServiceClient } from '@dealervisionjs/fieldservice-client';\r\n\r\n//import { API_URL } from \"./site-config\";\r\n\r\nexport const API = axios.create({\r\n baseURL: '',\r\n timeout: 30000,\r\n withCredentials: true,\r\n headers: {'Content-Type': 'application/json'}\r\n});\r\n\r\nexport const ApiClient = new FieldServiceClient({\r\n WITH_CREDENTIALS: true,\r\n HEADERS: { 'Content-Type': 'application/json' }\r\n});\r\n\r\n\r\n// Install interceptors\r\n\r\nexport function enableDebugLogs(axi: AxiosInstance) {\r\n axi.interceptors.request.use(req => {\r\n console.debug(`[BaseApi:Request] ${req.baseURL} ${req.method} ${req.url}`);\r\n return req;\r\n });\r\n\r\n axios.interceptors.response.use(res => {\r\n console.debug(`[BaseApi:Response] ${res.data.json}`);\r\n return res;\r\n });\r\n}\r\n\r\nexport function enableHttpsExceptions(axi: AxiosInstance) {\r\n axi.interceptors.response.use(\r\n res => res,\r\n err => {\r\n if (err.response.status === 404) {\r\n throw new Error(`${err.config.url} not found`);\r\n }\r\n throw err;\r\n }\r\n );\r\n}\r\n\r\nexport function wrap>(promise: Promise) {\r\n promise.catch((_error: any) => {\r\n return processError(_error);\r\n }).then((_response: any) => {\r\n return processResult(_response);\r\n });\r\n}\r\n\r\nexport function isAxiosError(obj: any | undefined): obj is AxiosError {\r\n return obj && obj.isAxiosError === true;\r\n}\r\n\r\nexport function processError(_error: any) {\r\n if (isAxiosError(_error) && _error.response) {\r\n return _error.response;\r\n } else {\r\n throw _error;\r\n }\r\n}\r\n\r\nexport function processResult(response: AxiosResponse) {\r\n const status = response.status;\r\n const _headers: any = {};\r\n if (response.headers && typeof response.headers === \"object\") {\r\n for (const k in response.headers) {\r\n if (response.headers.hasOwnProperty(k)) {\r\n _headers[k] = response.headers[k];\r\n }\r\n }\r\n }\r\n if (status === 200) {\r\n return;\r\n } else if (status === 404) {\r\n const _responseText = response.data;\r\n let result404: any = null;\r\n const resultData404 = _responseText;\r\n result404 = JSON.parse(resultData404);\r\n return throwException(\"A server side error occurred.\", status, _responseText, _headers, result404);\r\n } else if (status !== 200 && status !== 204) {\r\n const _responseText = response.data;\r\n return throwException(\"An unexpected server error occurred.\", status, _responseText, _headers);\r\n }\r\n\r\n}\r\n\r\nfunction throwException(message: string, status: number, response: string, headers: { [key: string]: any; }, result?: any): any {\r\n if (result !== null && result !== undefined)\r\n throw result;\r\n else\r\n throw new ApiException(message, status, response, headers, null);\r\n}\r\n\r\nexport class ApiException extends Error {\r\n message: string;\r\n status: number;\r\n response: string;\r\n headers: { [key: string]: any; };\r\n result: any;\r\n\r\n constructor(message: string, status: number, response: string, headers: { [key: string]: any; }, result: any) {\r\n super();\r\n\r\n this.message = message;\r\n this.status = status;\r\n this.response = response;\r\n this.headers = headers;\r\n this.result = result;\r\n }\r\n\r\n protected isApiException = true;\r\n\r\n static isApiException(obj: any): obj is ApiException {\r\n return obj.isApiException === true;\r\n }\r\n}\r\n\r\nexport default API;\r\n\r\n","// \r\n// A light wrapper around Sentry which may or may not be defined.\r\n// Webpacked code has the dbg constant provided globally with the\r\n// ProvidePlugin\r\n\r\n// Importing Sentry and it's types\r\n//import * as Sentry from \"@sentry/browser\";\r\n\r\ndeclare const Sentry: typeof import(\"@sentry/browser\");\r\nimport type { Client, CaptureContext, Breadcrumb, SeverityLevel } from \"@sentry/types\";\r\n\r\n// Our custom dto for passing sentry data from server\r\nimport { SentryContext } from \"@/common/types\";\r\n\r\nconst Environment = {\r\n IsDebugBuild: process.env.NODE_ENV == \"development\",\r\n IsProductionBuild: process.env.NODE_ENV == \"production\",\r\n}\r\n\r\n\r\ndeclare global {\r\n interface Window {\r\n Sentry: Client\r\n }\r\n}\r\n\r\nexport function initializeContext(ctx: SentryContext) {\r\n\r\n if (window.Sentry) {\r\n\r\n console.log('[sentry] Initializing with context', ctx);\r\n\r\n if (ctx.username) {\r\n Sentry.setUser({ username: ctx.username, id: ctx.userId, ip_address: ctx.ipAddress });\r\n }\r\n\r\n if (ctx.dealerName || ctx.tenantName) {\r\n Sentry.setContext(\"qacontext\",\r\n {\r\n dealer: ctx.dealerName,\r\n tenant: ctx.tenantName\r\n });\r\n } \r\n }\r\n}\r\n\r\nexport function captureMessage(message: string, captureContext?: CaptureContext | SeverityLevel): string {\r\n return Sentry.captureMessage(message, captureContext);\r\n}\r\n\r\nexport function captureWarning(message: string, category?: string, data?: any): void {\r\n\r\n let context:CaptureContext = {\r\n level: \"warning\",\r\n extra: data,\r\n tags: category ? { \"category\": category } : undefined \r\n };\r\n\r\n Sentry.captureMessage(message,context);\r\n console.warn(`${category} - ${message}`, data);\r\n}\r\n\r\n\r\n\r\nexport function captureException(exception: Error | unknown, captureContext?: CaptureContext): string {\r\n\r\n // Calling sentry first as it's our primary exception manager\r\n const res = Sentry.captureException(exception, captureContext);\r\n return res;\r\n}\r\n\r\nexport function dropBreadcrumb(message: string, data?: any): void {\r\n addBreadcrumb({\r\n message: message,\r\n level: \"info\",\r\n data: data\r\n });\r\n}\r\n\r\nexport function addBreadcrumb(breadcrumb: Breadcrumb): void {\r\n\r\n Sentry.addBreadcrumb(breadcrumb); \r\n}\r\n\r\nconst dbg = {\r\n captureMessage,\r\n captureException,\r\n captureWarning,\r\n addBreadcrumb,\r\n dropBreadcrumb,\r\n logWarning: captureWarning,\r\n initializeContext,\r\n Environment\r\n};\r\n\r\nexport default dbg;\r\nexport * from \"@sentry/types\";\r\n","import \"jquery-validation\";\r\nimport \"jquery-validation-unobtrusive\";\r\n\r\n/* Bootstrap 5 Customization */\r\nexport function setValidatorOptions(){\r\n\r\n console.log('[form-validation] Configuring JQuery Validation');\r\n\r\n if ($.validator && $.validator.unobtrusive) {\r\n console.log('[form-validation] Setting default validation options');\r\n\r\n const settings = {\r\n validClass: \"is-valid\",\r\n errorClass: \"is-invalid\",\r\n ignore: ':hidden, .novalidate',\r\n showErrors: function (errorMap: any, errorList: any[]) {\r\n // If we have any errors, send out a 'form-invalid' event\r\n if (errorList.length) {\r\n //@ts-ignore\r\n document.dispatchEvent(new CustomEvent('form-invalid', { 'detail': { 'form': this.currentForm.id } }));\r\n }\r\n //@ts-ignore\r\n this.defaultShowErrors();\r\n }\r\n };\r\n\r\n $.validator.setDefaults(settings);\r\n //@ts-ignore\r\n $.validator.unobtrusive.options = settings; \r\n }\r\n else {\r\n console.warn('$.validator is not defined. Please load this library **after** loading jquery.validate.js and jquery.validate.unobtrusive.js');\r\n }\r\n}\r\n\r\n","export * from './aws';\r\nexport * from './media-utils';\r\nexport * from './diagnostics';","export type MediaType = \"Photo\" | \"Video\";\r\n\r\nexport const MediaTypes =\r\n{\r\n Photo: {\r\n Extensions: ['jpg', 'jpeg'],\r\n MimeTypes: ['image/jpeg']\r\n },\r\n\r\n Video:{\r\n Extensions: ['mov', 'avi', 'mpg', 'mp4', 'mts'],\r\n MimeTypes: ['video/mov', 'video/avi', 'video/mpg', 'video/mp4', 'video/mts']\r\n }\r\n}\r\n\r\n\r\nconst prefixExtensionsWithPeriod = (extensions: string[]) => extensions.map(ext => '.' + ext);\r\n\r\n//\r\n// Builds a File Inputs accept attribute value from our accepted media types. Due\r\n// to the behavior of some browsers (mobile, etc) we currently use file extensions\r\n// for photos and mime types for videos. When using purely extensions or mimetypes\r\n// certian phone/browser combinations would fail to show live video capture as an option.\r\n// Another breakout occured in 12/2022 - frozen phones, happens on multiple file uploaders.\r\n//\r\n// References\r\n// https://app.asana.com/0/24608526417701/1202205638471803/f\r\n//\r\nexport function buildFileInputAcceptValue(includePhoto: boolean, includeVideo: boolean):string\r\n{\r\n let accept: string[] = [];\r\n\r\n if (includePhoto) {\r\n accept = accept.concat(prefixExtensionsWithPeriod(MediaTypes.Photo.Extensions));\r\n }\r\n\r\n if (includeVideo) {\r\n accept = accept.concat(prefixExtensionsWithPeriod(MediaTypes.Video.Extensions)); \r\n }\r\n\r\n // Dont ask.. Chrome 100 doesn't work without this? Nutty\r\n accept = accept.concat(\".dealervision\");\r\n\r\n return accept.join(\", \");\r\n}\r\n\r\nexport function buildAcceptedExtensionList(includePhoto: boolean, includeVideo: boolean):string[] {\r\n let accept: string[] = [];\r\n\r\n if (includePhoto) {\r\n accept = accept.concat(prefixExtensionsWithPeriod(MediaTypes.Photo.Extensions));\r\n }\r\n\r\n if (includeVideo) {\r\n accept = accept.concat(prefixExtensionsWithPeriod(MediaTypes.Video.Extensions));\r\n }\r\n\r\n return accept;\r\n}\r\n\r\nexport function getFileExtension(filename:string){\r\n const fileNameParts = filename.split(\".\");\r\n\r\n if (fileNameParts.length === 1 || (fileNameParts[0] === \"\" && fileNameParts.length === 2)) {\r\n return undefined;\r\n }\r\n\r\n return fileNameParts.pop()?.toLowerCase();\r\n}\r\n\r\n\r\n\r\nexport function getSupportedMediaType(extension: string, includePhoto: boolean, includeVideo: boolean): MediaType|undefined{\r\n\r\n if (includePhoto && MediaTypes.Photo.Extensions.indexOf(extension) > -1){\r\n return \"Photo\";\r\n }\r\n\r\n if (includeVideo && MediaTypes.Video.Extensions.indexOf(extension) > -1) {\r\n return \"Video\";\r\n }\r\n\r\n return undefined;\r\n}"],"names":["$","window","document","undefined","isFunction","obj","nodeType","Math","self","Function","fn","suidropdown","parameters","returnedValue","$allModules","this","$document","moduleSelector","selector","hasTouch","documentElement","clickEvent","time","Date","getTime","performance","query","arguments","methodInvoked","queryArguments","slice","call","each","elementIndex","selectActionActive","initialLoad","pageLostFocus","willRefocus","elementNamespace","id","selectObserver","menuObserver","classObserver","module","settings","isPlainObject","extend","className","message","fields","keys","metadata","namespace","regExp","error","templates","eventNamespace","moduleNamespace","$module","$context","context","$text","find","text","$search","search","$sizer","sizer","$input","input","$icon","icon","$clear","clearIcon","$combo","prev","length","$menu","children","menu","$item","item","$divider","hideDividers","parent","divider","activated","itemActivated","internalChange","iconClicked","element","focused","instance","data","initialize","debug","is","alreadySetup","setup","reference","ignoreDiacritics","String","prototype","normalize","noNormalize","layout","values","set","change","remove","refreshData","save","defaults","restore","selected","create","bind","events","observeChanges","instantiate","verbose","destroy","tabbable","active","transition","removeClass","visible","addClass","hidden","off","removeData","disconnect","MutationObserver","event","select","mutation","class","observe","has","childList","subtree","attributes","random","toString","substr","userChoice","$userChoices","$userChoice","html","get","userValues","Array","isArray","index","value","addition","add","variables","addResult","attr","hideAdditions","userLabels","label","appendTo","insertAfter","fireOnInit","onSearch","minCharacters","filter","hide","firstUnfiltered","selectedItem","not","unselectable","eq","nextAvailable","$selected","$nextAvailable","nextAll","$prevAvailable","prevAll","api","apiSettings","urlData","on","returnedObject","clearable","clearItem","insertBefore","prop","chrome","multiple","searchSelection","allowTab","selectValues","dropdown","closest","selection","preserveHTML","hasClass","missingMultiple","disabled","removeAttr","detach","prependTo","refresh","$firstModules","$lastModules","refreshSelectors","refreshItems","clearData","defaultText","defaultValue","placeholderText","clearItems","empty","toggle","show","callback","preventFocus","remote","noApiCache","can","queryRemote","maxSelections","allResultsFiltered","allFiltered","onShow","animate","click","intent","focusSearch","preventBlur","animatingOutward","onHide","focusedOnSearch","blur","unbind","hideOthers","hideMenu","hideSubMenus","$subMenus","keyboardEvents","inputEvents","mouseEvents","keydown","inputEvent","mousedown","mouseup","focus","test","delay","menuSearch","mouseenter","mouseleave","touch","searchTerm","afterFiltered","filterActive","activeItem","onNoResults","allowAdditions","noResults","userSuggestion","escape","htmlEntities","useLabels","useAPI","filterRemoteData","filterItems","preSelected","val","split","delimiter","filtered","noAPI","callbackParameters","errorDuration","cache","throttle","onError","serverError","apply","onFailure","onSuccess","response","remoteValues","menuConfig","diacritics","results","escapedTerm","string","regExpFlags","ignoreSearchCase","beginsWithRegExp","RegExp","$choice","unfilterable","push","match","choiceText","fullTextSearch","exactSearch","fuzzySearch","choiceValue","filteredItem","lastDivider","nextUntil","term","termLength","queryLength","toLowerCase","characterIndex","nextCharacterIndex","queryCharacter","charCodeAt","indexOf","skipHandler","blurSearch","forceSelection","$currentlySelected","$activeItem","$selectedItem","hasSelected","clear","selectInput","append","deQuote","name","showOnFocus","activeElement","activeLabel","target","type","stopPropagation","clearTimeout","timer","setTimeout","$label","$labels","$activeLabels","$nextActive","$prevActive","$range","prevUntil","shiftKey","ctrlKey","toggleClass","onLabelSelect","activeLabels","toggleBehavior","bubbledLabelClick","bubbledIconClick","determine","eventOnElement","preventDefault","eventInModule","mutations","forEach","attributeName","check","selectMutation","$addedNode","addedNodes","$removedNode","removedNodes","$changedNodes","isUserAddition","isMessage","$target","$subMenu","$otherMenus","siblings","hasSubMenu","itemTimer","skipRefocus","isBubbledEvent","tagName","allowCategorySelection","userAddition","scrollPosition","selectAction","pressedKey","which","inObject","$activeLabel","labelIndex","labelCount","hasActiveLabel","hasMultipleActive","isFirstLabel","isLastLabel","isSearch","isFocusedOnSearch","isFocused","caretAtStart","caretPosition","isSelectedSearch","leftArrow","siblingLabel","end","last","rightArrow","first","next","deleteKey","backspace","$nextItem","$visibleItems","addBack","$parentMenu","inVisibleMenu","animating","hasSelectedItem","selectedIsSelectable","delimiterPressed","enter","upArrow","selectOnKeydown","single","downArrow","pageUp","scrollPage","pageDown","selectedLetter","fromCharCode","trigger","inputElement","createEvent","initEvent","dispatchEvent","action","inDocument","inModule","inVisibleDOM","body","contains","notOnLabel","notInMenu","nothing","activate","hideAndClear","combo","placeholder","trim","searchWidth","ceil","width","selectionCount","upward","grep","uniqueArray","array","inArray","returnEndPos","range","rangeLength","selectionEnd","selectionStart","createRange","moveStart","isEmptyMultiselect","raw","read","remoteData","clone","menuIcon","oninput","onpropertychange","oldGroup","$option","group","headerDivider","sortSelect","sort","a","b","localeCompare","itemWithAdditions","$items","$userItems","strict","shouldSearch","isMultiple","optionText","optionValue","map","v","ignoreCase","displayType","preventChangeTrigger","labels","saveRemoteData","noselection","Storage","sessionStorage","getItem","noStorage","setItem","clearValue","direction","$nextSelectedItem","$currentItem","menuHeight","outerHeight","currentScroll","scrollTop","itemHeight","itemsPerPage","floor","newScroll","$selectableItem","isSearchMultiple","searchValue","hasSearchValue","valueIsSet","glyphWidth","css","loading","partialSearch","forceScroll","hasActive","offset","menuScroll","abovePage","belowPage","position","top","height","searchText","letter","alreadySelectedLetter","firstLetter","$nextValue","openDownward","leftward","openRightward","$currentMenu","escapedValue","hasInput","currentValue","stringValue","allowReselection","extendSelect","onChange","exactly","keepSearchTerm","selectedText","selectedValue","isFiltered","isActive","isUserValue","shouldAnimate","count","$next","onLabelCreate","variation","animation","duration","$message","$addition","$existingItem","alreadyHasValue","hasUserSuggestion","hasCount","hasMaxCount","hasTerm","replace","addedValue","addedText","newValue","concat","join","onAdd","removedValue","removedText","$removedItem","arrayValue","onRemove","$removedLabel","userValue","onLabelRemove","charAt","items","subMenu","$normalResults","valueIgnoringCase","valueMatchingCase","hasValue","existingValue","animatingInward","webstore","runtime","needle","object","found","property","selectChanged","verticallyScrollableContext","overflowY","horizontallyScrollableContext","overflowX","onScreen","calculations","canOpenDownward","left","above","below","isOffscreenRight","canOpenRightward","scrollLeft","outerWidth","start","showMethod","showDuration","queue","onStart","onComplete","noTransition","hideMethod","hideDuration","multipleValues","isUnparsable","hasQuotes","quote","chr","setting","internal","silent","log","console","info","currentTime","executionTime","Name","Arguments","Element","display","title","totalTime","table","groupCollapsed","groupEnd","invoke","passedArguments","maxDepth","depth","camelCaseValue","toUpperCase","method","keepOnScreen","$selectedLabels","description","descriptionVertical","image","imageClass","iconClass","delete","header","groupIcon","encode","option","itemType","isMenu","maybeText","maybeDisabled","maybeDescriptionVertical","hasDescription","groupName","choice","moduleArguments","animationEnd","animationEndEvent","interval","forceRepaint","$parentElement","$nextElement","repaint","offsetWidth","animationDirection","reverse","outward","overrideSettings","supported","support","allowRepeats","occurring","queuing","complete","noAnimation","reset","animationCallbacks","conditions","one","completeCallback","failSafe","looping","inward","force","style","userStyle","overrideStyle","inlineDisplay","skipInlineHidden","currentDisplay","emptyStyle","hasDirection","word","animationClass","animationName","useFailSafe","transitionExists","exists","currentAnimation","triggerHandler","failSafeDelay","queueCallback","directionClass","currentDirection","parseFloat","shouldDetermine","animationStartEvent","createElement","animations","forced","elementClass","$clone","inAnimation","directionExists","onBeforeHide","hideNow","stop","stopAll","enable","disable","repeated","el","optionsKey","ctl","options","keyedOptions","require","exports","constructor","_defineProperty2","default","clearAll","setOptions","setValues","updateOptions","smartUpdateOptions","oldValue","getValue","x","deselect","toggleSelect","includes","getText","setText","getInitialText","cb","saveDefaults","restoreDefaults","restoreDefaultText","restoreDefaultValue","fulltext","_baseApi","refreshToken","API","_credentialProviders","_clientSts","_authApi","_clientS","_clientLambda","_fetchHttpHandler","_libStorage","_xhr_http_handler","_interopRequireDefault","_diagnostics","AwsUtils","setupCredentials","userContext","region","DEFAULT_AWS_REGION","tokenDuration","DEFAULT_TOKEN_DURATION","defaultRegion","wrappedCredentials","result","async","expiration","credentialsArgs","roleArn","roleSessionName","userName","webIdentityToken","idToken","durationSeconds","clientConfig","roleAssumerWithWebIdentity","getDefaultRoleAssumerWithWebIdentity","credentialsFunc","fromWebToken","ex","refreshResult","AuthApi","credentials","internalCreateS3Client","httpHandler","s3Config","useAccelerateEndpoint","maxAttempts","requestHandler","S3Client","createS3Client","FetchHttpHandler","requestTimeout","createLambdaClient","LambdaClient","sanitizeKeyName","keyname","invalidCharIdx","INVALID_S3KEY_CHARS","invalidChar","createUpload","params","listener","Blob","stream","Body","blobStream","dbg","addBreadcrumb","upload","Upload","client","leavePartsOnError","queueSize","createXhrUpload","XhrHttpHandler","onProgress","invokeLambda","functionName","payloadText","lambdaRequest","InvokeCommand","FunctionName","InvocationType","Payload","TextEncoder","send","then","err","blob","ReadableStream","pull","controller","_controller$desiredSi","desiredSize","chunk","min","size","max","buffer","Response","arrayBuffer","uint8array","Uint8Array","bytesRead","byteLength","enqueue","close","_awsUtils","Object","key","defineProperty","enumerable","_awsTypes","_querystringBuilder","_protocolHttp","super","myRequestTimeout","handle","request","abortSignal","handleByXhr","onProgressCallbacks","offProgress","splice","requestTimeoutInMs","aborted","abortError","Error","Promise","reject","path","queryString","buildQueryString","port","url","protocol","hostname","requestOptions","headers","Headers","myXHR","XMLHttpRequest","raceOfPromises","resolve","responseType","onload","progressEvent","getAllResponseHeaders","status","onerror","errorMessage","responseText","captureException","extra","onabort","logWarning","onprogress","c","open","headerVal","headerKey","setRequestHeader","e","fetchHeaders","transformedHeaders","HttpResponse","statusCode","requestTimeoutFn","abort","race","timeoutInMs","timeoutError","axi","interceptors","use","req","baseURL","axios","res","json","config","promise","catch","_error","processError","_response","processResult","_axios","_fieldserviceClient","timeout","withCredentials","isAxiosError","_headers","k","hasOwnProperty","_responseText","result404","resultData404","JSON","parse","throwException","ApiException","FieldServiceClient","WITH_CREDENTIALS","HEADERS","isApiException","_types","initializeContext","ctx","Sentry","username","setUser","userId","ip_address","ipAddress","dealerName","tenantName","setContext","dealer","tenant","captureMessage","captureContext","captureWarning","category","level","tags","warn","exception","dropBreadcrumb","breadcrumb","_exportNames","Environment","IsDebugBuild","process","IsProductionBuild","validator","unobtrusive","validClass","errorClass","ignore","showErrors","errorMap","errorList","CustomEvent","currentForm","defaultShowErrors","setDefaults","_aws","_mediaUtils","includePhoto","includeVideo","accept","prefixExtensionsWithPeriod","MediaTypes","Photo","Extensions","Video","filename","_fileNameParts$pop","fileNameParts","pop","extension","MimeTypes","extensions","ext"],"sourceRoot":""}