{"version":3,"file":"kendo.autocomplete.js","names":["__meta__","id","name","category","description","depends","features","$","undefined$1","kendo","window","encode","htmlEncode","support","caret","activeElement","_activeElement","placeholderSupported","placeholder","ui","List","keys","DataSource","data","ARIA_DISABLED","ARIA_READONLY","CHANGE","DISABLED","READONLY","FOCUSED","HIDDENCLASS","STATEDISABLED","ns","HOVEREVENTS","indexOfWordAtCaret","caretIdx","text","separator","substring","split","length","AutoComplete","extend","init","element","options","wrapper","that","this","Array","isArray","dataSource","fn","call","attr","_wrapper","_loader","_clearButton","_dataSource","_ignoreCase","type","_popup","addClass","on","_keydown","bind","_keypress","_search","_prev","_accessor","_oldText","_placeholder","ev","filterInput","relatedTarget","_change","close","removeClass","autocomplete","role","_clear","_clearValue","_enable","_old","_initList","parents","is","enable","listView","e","preventDefault","_resetFocusItemHandler","_resetFocusItem","notify","_toggleCloseVisibility","_applyCssClasses","label","_label","_aria","enabled","suggest","template","groupTemplate","fixedGroupTemplate","dataTextField","minLength","enforceMinLength","delay","height","filter","ignoreCase","highlightFirst","animation","virtual","value","clearButton","autoWidth","popup","size","fillMode","rounded","_onActionSheetCreate","val","trigger","_onCloseButtonPressed","_refreshHandler","_unbindDataSource","_progressHandler","_showBusy","_errorHandler","_hideBusy","create","setDataSource","events","setOptions","listOptions","_listOptions","_accessors","skipUpdateOnBind","dataValueField","selectedItemChange","_editable","off","readonly","disable","_toggleHover","prop","current","focus","_deactivateItem","destroy","refresh","select","li","_select","search","word","_separator","accentFoldingFiltering","clearTimeout","_typingTimeout","wordAtCaret","_open","_mute","_filterSource","toLocaleLowerCase","toLowerCase","operator","field","one","_unifySeparators","idx","key","_last","words","wordIndex","selectionEnd","BACKSPACE","DELETE","view","inArray","ul","_text","indexOf","lastIndexOf","toString","push","join","_refreshFloatingLabel","_click","item","dataItem","dataItemByIndex","getElementIndex","_active","done","_blur","_clearText","noop","index","scrollTo","_listBound","action","flatView","groupsLength","_group","isActive","_renderFooter","_renderNoData","_toggleNoData","_toggleHeader","_resizePopup","position","_inputValue","_allowOpening","unbind","_touchScroller","reset","callback","_muted","_listChange","_selectValue","selectedDataItems","defaultSeparator","splice","replaceWordAtCaret","_defaultSeparator","_preselect","oldText","setValue","unifyType","valueUpdated","_typing","itemSelected","typing","className","keyCode","visible","DOWN","_move","open","ESC","altKey","UP","HOME","END","ENTER","TAB","PAGEDOWN","PAGEUP","_hovered","direction","scrollWith","screenHeight","_busy","_loading","setTimeout","_hideClear","show","toggleClass","document","RegExp","candidate","insertAfter","currentTarget","preventShow","_showClear","DOMelement","parent","wrap","style","cssText","css","width","_focused","plugin","cssProperties","registerPrefix","registerValues","values","roundedValues","concat","jQuery","kendo$1"],"sources":["kendo.autocomplete.js"],"mappings":"MAAO,wBACA,mCACA,yBAEP,IAAIA,SAAW,CACXC,GAAI,eACJC,KAAM,eACNC,SAAU,MACVC,YAAa,kHACbC,QAAS,CAAE,QACXC,SAAU,CAAE,CACRL,GAAI,kBACJC,KAAM,kBACNE,YAAa,iDACbC,QAAS,CAAE,oBACZ,CACCJ,GAAI,iBACJC,KAAM,cACNE,YAAa,6BACbC,QAAS,CAAE,mBAInB,SAAUE,EAAGC,GACT,IAAIC,EAAQC,OAAOD,MACfE,EAASF,EAAMG,WACfC,EAAUJ,EAAMI,QAChBC,EAAQL,EAAMK,MACdC,EAAgBN,EAAMO,eACtBC,EAAuBJ,EAAQK,YAC/BC,EAAKV,EAAMU,GACXC,EAAOD,EAAGC,KACVC,EAAOZ,EAAMY,KACbC,EAAab,EAAMc,KAAKD,WACxBE,EAAgB,gBAChBC,EAAgB,gBAChBC,EAAS,SACTC,EAAW,WACXC,EAAW,WACXC,EAAU,UAEVC,EAAc,WACdC,EAAgB,aAGhBC,EAAK,qBACLC,EAAc,aAAeD,EAAK,cAAgBA,EAEtD,SAASE,EAAmBC,EAAUC,EAAMC,GACxC,OAAOA,EAAYD,EAAKE,UAAU,EAAGH,GAAUI,MAAMF,GAAWG,OAAS,EAAI,CACjF,CAkBA,IAAIC,EAAerB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esContent":["import './kendo.list.js';\nimport './kendo.mobile.scroller.js';\nimport './kendo.virtuallist.js';\n\nvar __meta__ = {\n id: \"autocomplete\",\n name: \"AutoComplete\",\n category: \"web\",\n description: \"The AutoComplete widget provides suggestions depending on the typed text.It also allows multiple value entries.\",\n depends: [ \"list\" ],\n features: [ {\n id: \"mobile-scroller\",\n name: \"Mobile scroller\",\n description: \"Support for kinetic scrolling in mobile device\",\n depends: [ \"mobile.scroller\" ]\n }, {\n id: \"virtualization\",\n name: \"VirtualList\",\n description: \"Support for virtualization\",\n depends: [ \"virtuallist\" ]\n } ]\n};\n\n(function($, undefined$1) {\n var kendo = window.kendo,\n encode = kendo.htmlEncode,\n support = kendo.support,\n caret = kendo.caret,\n activeElement = kendo._activeElement,\n placeholderSupported = support.placeholder,\n ui = kendo.ui,\n List = ui.List,\n keys = kendo.keys,\n DataSource = kendo.data.DataSource,\n ARIA_DISABLED = \"aria-disabled\",\n ARIA_READONLY = \"aria-readonly\",\n CHANGE = \"change\",\n DISABLED = \"disabled\",\n READONLY = \"readonly\",\n FOCUSED = \"k-focus\",\n SELECTED = \"k-selected\",\n HIDDENCLASS = \"k-hidden\",\n STATEDISABLED = \"k-disabled\",\n AUTOCOMPLETEVALUE = \"off\",\n HOVER = \"k-hover\",\n ns = \".kendoAutoComplete\",\n HOVEREVENTS = \"mouseenter\" + ns + \" mouseleave\" + ns;\n\n function indexOfWordAtCaret(caretIdx, text, separator) {\n return separator ? text.substring(0, caretIdx).split(separator).length - 1 : 0;\n }\n\n function wordAtCaret(caretIdx, text, separator) {\n return text.split(separator)[indexOfWordAtCaret(caretIdx, text, separator)];\n }\n\n function replaceWordAtCaret(caretIdx, text, word, separator, defaultSeparator) {\n var words = text.split(separator);\n\n words.splice(indexOfWordAtCaret(caretIdx, text, separator), 1, word);\n\n if (separator && words[words.length - 1] !== \"\") {\n words.push(\"\");\n }\n\n return words.join(defaultSeparator);\n }\n\n var AutoComplete = List.extend({\n init: function(element, options) {\n var that = this, wrapper, disabled;\n\n that.ns = ns;\n options = Array.isArray(options) ? { dataSource: options } : options;\n\n List.fn.init.call(that, element, options);\n\n element = that.element;\n options = that.options;\n\n options.placeholder = options.placeholder || element.attr(\"placeholder\");\n if (placeholderSupported) {\n element.attr(\"placeholder\", options.placeholder);\n }\n\n that._wrapper();\n that._loader();\n that._clearButton();\n\n that._dataSource();\n that._ignoreCase();\n\n element[0].type = \"text\";\n wrapper = that.wrapper;\n\n that._popup();\n\n element\n .addClass(\"k-input-inner\")\n .on(\"keydown\" + ns, that._keydown.bind(that))\n .on(\"keypress\" + ns, that._keypress.bind(that))\n .on(\"input\" + ns, that._search.bind(that))\n .on(\"paste\" + ns, that._search.bind(that))\n .on(\"focus\" + ns, function() {\n that._prev = that._accessor();\n that._oldText = that._prev;\n that._placeholder(false);\n wrapper.addClass(FOCUSED);\n })\n .on(\"focusout\" + ns, function(ev) {\n if (that.filterInput && ev.relatedTarget === that.filterInput[0]) {\n return;\n }\n\n that._change();\n that._placeholder();\n that.close();\n wrapper.removeClass(FOCUSED);\n })\n .attr({\n autocomplete: AUTOCOMPLETEVALUE,\n role: \"combobox\",\n \"aria-expanded\": false\n });\n\n that._clear.on(\"click\" + ns + \" touchend\" + ns, that._clearValue.bind(that));\n that._enable();\n\n that._old = that._accessor();\n\n that._placeholder();\n\n that._initList();\n\n disabled = $(that.element).parents(\"fieldset\").is(':disabled');\n\n if (disabled) {\n that.enable(false);\n }\n\n that.listView.bind(\"click\", function(e) { e.preventDefault(); });\n\n that._resetFocusItemHandler = that._resetFocusItem.bind(that);\n\n kendo.notify(that);\n that._toggleCloseVisibility();\n that._applyCssClasses();\n\n if (options.label) {\n that._label();\n }\n\n that._aria();\n },\n\n options: {\n name: \"AutoComplete\",\n enabled: true,\n suggest: false,\n template: \"\",\n groupTemplate: (data) => encode(data),\n fixedGroupTemplate: (data) => encode(data),\n dataTextField: \"\",\n minLength: 1,\n enforceMinLength: false,\n delay: 200,\n height: 200,\n filter: \"startswith\",\n ignoreCase: true,\n highlightFirst: false,\n separator: null,\n placeholder: \"\",\n animation: {},\n virtual: false,\n value: null,\n clearButton: true,\n autoWidth: false,\n popup: null,\n size: \"medium\",\n fillMode: \"solid\",\n rounded: \"medium\",\n label: null\n },\n\n _onActionSheetCreate: function() {\n var that = this;\n\n if (that.filterInput) {\n that.filterInput\n .on(\"keydown\" + ns, that._keydown.bind(that))\n .on(\"keypress\" + ns, that._keypress.bind(that))\n .on(\"input\" + ns, that._search.bind(that))\n .on(\"paste\" + ns, that._search.bind(that))\n .attr({\n autocomplete: AUTOCOMPLETEVALUE,\n role: \"combobox\",\n \"aria-expanded\": false\n });\n\n that.popup.bind(\"activate\", () => {\n that.filterInput.val(that.element.val());\n that.filterInput.trigger(\"focus\");\n });\n\n that.popup.bind(\"deactivate\", () => {\n that.element.trigger(\"focus\");\n });\n }\n },\n\n _onCloseButtonPressed: function() {\n var that = this;\n\n if (that.filterInput && activeElement() === that.filterInput[0]) {\n that.element.val(that.filterInput.val());\n }\n },\n\n _dataSource: function() {\n var that = this;\n\n if (that.dataSource && that._refreshHandler) {\n that._unbindDataSource();\n } else {\n that._progressHandler = that._showBusy.bind(that);\n that._errorHandler = that._hideBusy.bind(that);\n }\n\n that.dataSource = DataSource.create(that.options.dataSource)\n .bind(\"progress\", that._progressHandler)\n .bind(\"error\", that._errorHandler);\n },\n\n setDataSource: function(dataSource) {\n this.options.dataSource = dataSource;\n this._dataSource();\n\n this.listView.setDataSource(this.dataSource);\n },\n\n events: [\n \"open\",\n \"close\",\n CHANGE,\n \"select\",\n \"filtering\",\n \"dataBinding\",\n \"dataBound\"\n ],\n\n setOptions: function(options) {\n var listOptions = this._listOptions(options);\n\n List.fn.setOptions.call(this, options);\n\n this.listView.setOptions(listOptions);\n this._accessors();\n this._aria();\n this._clearButton();\n },\n\n _listOptions: function(options) {\n var listOptions = List.fn._listOptions.call(this, $.extend(options, {\n skipUpdateOnBind: true\n }));\n\n listOptions.dataValueField = listOptions.dataTextField;\n listOptions.selectedItemChange = null;\n\n return listOptions;\n },\n\n _editable: function(options) {\n var that = this,\n element = that.element,\n wrapper = that.wrapper.off(ns),\n readonly = options.readonly,\n disable = options.disable;\n\n if (!readonly && !disable) {\n wrapper\n .removeClass(STATEDISABLED)\n .on(HOVEREVENTS, that._toggleHover);\n\n element.prop(DISABLED, false)\n .prop(READONLY, false)\n .attr(ARIA_DISABLED, false)\n .attr(ARIA_READONLY, false);\n } else {\n wrapper\n .addClass(disable ? STATEDISABLED : \"\")\n .removeClass(disable ? \"\" : STATEDISABLED);\n\n element.attr(DISABLED, disable)\n .attr(READONLY, readonly)\n .attr(ARIA_DISABLED, disable)\n .attr(ARIA_READONLY, readonly);\n }\n\n that._toggleCloseVisibility();\n },\n\n close: function() {\n var that = this;\n var current = that.listView.focus();\n\n if (current) {\n current.removeClass(SELECTED);\n }\n\n that.popup.close();\n that._deactivateItem();\n },\n\n destroy: function() {\n var that = this;\n\n that.element.off(ns);\n that._clear.off(ns);\n that.wrapper.off(ns);\n\n if (that.filterInput) {\n that.filterInput.off(ns);\n }\n\n List.fn.destroy.call(that);\n },\n\n refresh: function() {\n this.listView.refresh();\n },\n\n select: function(li) {\n this._select(li);\n },\n\n search: function(word) {\n var that = this,\n options = that.options,\n ignoreCase = options.ignoreCase,\n separator = that._separator(),\n length,\n accentFoldingFiltering = that.dataSource.options.accentFoldingFiltering,\n element = that.filterInput && activeElement() === that.filterInput[0] ? that.filterInput : that.element;\n\n word = word || that._accessor();\n\n clearTimeout(that._typingTimeout);\n\n if (separator) {\n word = wordAtCaret(caret(element)[0], word, separator);\n }\n\n length = word.length;\n\n if ((!options.enforceMinLength && !length) || length >= options.minLength) {\n that._open = true;\n\n that._mute(function() {\n this.listView.value([]);\n });\n\n that._filterSource({\n value: ignoreCase ? (accentFoldingFiltering ? word.toLocaleLowerCase(accentFoldingFiltering) : word.toLowerCase()) : word,\n operator: options.filter,\n field: options.dataTextField,\n ignoreCase: ignoreCase\n });\n\n that.one(\"close\", that._unifySeparators.bind(that));\n }\n that._toggleCloseVisibility();\n },\n\n suggest: function(word) {\n var that = this,\n key = that._last,\n value = that._accessor(),\n element = that.element[0],\n caretIdx = caret(element)[0],\n separator = that._separator(),\n words = value.split(separator),\n wordIndex = indexOfWordAtCaret(caretIdx, value, separator),\n selectionEnd = caretIdx,\n idx,\n accentFoldingFiltering = that.dataSource.options.accentFoldingFiltering;\n\n if (key == keys.BACKSPACE || key == keys.DELETE) {\n that._last = undefined$1;\n return;\n }\n\n word = word || \"\";\n\n if (typeof word !== \"string\") {\n if (word[0]) {\n word = that.dataSource.view()[List.inArray(word[0], that.ul[0])];\n }\n\n word = word ? that._text(word) : \"\";\n }\n\n if (caretIdx <= 0) {\n caretIdx = (accentFoldingFiltering ? value.toLocaleLowerCase(accentFoldingFiltering) : value.toLowerCase()).indexOf(accentFoldingFiltering ? word.toLocaleLowerCase(accentFoldingFiltering) : word.toLowerCase()) + 1;\n }\n\n idx = value.substring(0, caretIdx).lastIndexOf(separator);\n idx = idx > -1 ? caretIdx - (idx + separator.length) : caretIdx;\n value = words[wordIndex].substring(0, idx);\n\n if (word) {\n word = word.toString();\n idx = (accentFoldingFiltering ? word.toLocaleLowerCase(accentFoldingFiltering) : word.toLowerCase()).indexOf(accentFoldingFiltering ? value.toLocaleLowerCase(accentFoldingFiltering) : value.toLowerCase());\n if (idx > -1) {\n word = word.substring(idx + value.length);\n\n selectionEnd = caretIdx + word.length;\n\n value += word;\n }\n\n if (separator && words[words.length - 1] !== \"\") {\n words.push(\"\");\n }\n\n }\n\n words[wordIndex] = value;\n\n that._accessor(words.join(separator || \"\"));\n\n if (element === activeElement()) {\n caret(element, caretIdx, selectionEnd);\n }\n },\n\n value: function(value) {\n if (value !== undefined$1) {\n this.listView.value(value);\n\n this._accessor(value);\n this._old = this._accessor();\n this._oldText = this._accessor();\n } else {\n return this._accessor();\n }\n this._toggleCloseVisibility();\n this._refreshFloatingLabel();\n },\n\n _click: function(e) {\n var item = e.item;\n var that = this;\n var element = that.element;\n var dataItem = that.listView.dataItemByIndex(that.listView.getElementIndex(item));\n\n e.preventDefault();\n\n that._active = true;\n\n if (that.trigger(\"select\", { dataItem: dataItem, item: item })) {\n that.close();\n return;\n }\n that._oldText = element.val();\n that._select(item).done(function() {\n that._blur();\n\n caret(element, element.val().length);\n });\n },\n\n _clearText: $.noop,\n\n _resetFocusItem: function() {\n var index = this.options.highlightFirst ? 0 : -1;\n\n if (this.options.virtual) {\n this.listView.scrollTo(0);\n }\n\n this.listView.focus(index);\n },\n\n _listBound: function() {\n var that = this;\n var popup = that.popup;\n var options = that.options;\n var data = that.dataSource.flatView();\n var length = data.length;\n var groupsLength = that.dataSource._group ? that.dataSource._group.length : 0;\n var isActive = that.element[0] === activeElement() || that.filterInput && that.filterInput[0] === activeElement();\n var action;\n\n that._renderFooter();\n that._renderNoData();\n that._toggleNoData(!length);\n that._toggleHeader(!!groupsLength && !!length);\n\n that._resizePopup();\n\n popup.position();\n\n if (length) {\n if (options.suggest && isActive && that._inputValue()) {\n that.suggest(data[0]);\n }\n }\n\n if (that._open) {\n that._open = false;\n action = that._allowOpening() ? \"open\" : \"close\";\n\n if (that._typingTimeout && !isActive) {\n action = \"close\";\n }\n\n if (length) {\n that._resetFocusItem();\n\n if (options.virtual) {\n that.popup\n .unbind(\"activate\", that._resetFocusItemHandler)\n .one(\"activate\", that._resetFocusItemHandler);\n }\n }\n\n popup[action]();\n that._typingTimeout = undefined$1;\n }\n\n if (that._touchScroller) {\n that._touchScroller.reset();\n }\n\n that._hideBusy();\n\n that.trigger(\"dataBound\");\n },\n\n _mute: function(callback) {\n this._muted = true;\n callback.call(this);\n this._muted = false;\n },\n\n _listChange: function() {\n var isActive = this._active || this.element[0] === activeElement();\n\n if (isActive && !this._muted) {\n this._selectValue(this.listView.selectedDataItems()[0]);\n }\n },\n\n _selectValue: function(dataItem) {\n var separator = this._separator();\n var text = \"\";\n\n if (dataItem) {\n text = this._text(dataItem);\n }\n\n if (text === null) {\n text = \"\";\n }\n\n if (separator) {\n text = replaceWordAtCaret(caret(this.element)[0], this._accessor(), text, separator, this._defaultSeparator());\n }\n\n this._prev = text;\n this._accessor(text);\n this._placeholder();\n },\n\n _unifySeparators: function() {\n this._accessor(this.value().split(this._separator()).join(this._defaultSeparator()));\n return this;\n },\n\n _preselect: function(value, text) {\n this._inputValue(text);\n this._accessor(value);\n\n this._old = this.oldText = this._accessor();\n\n this.listView.setValue(value);\n this._placeholder();\n },\n\n _change: function() {\n var that = this;\n var value = that._unifySeparators().value();\n var trigger = value !== List.unifyType(that._old, typeof value);\n\n var valueUpdated = trigger && !that._typing;\n var itemSelected = that._oldText !== value;\n\n that._old = value;\n that._oldText = value;\n\n if (that.filterInput && activeElement() === that.filterInput[0]) {\n that.element.val(that.filterInput.val());\n }\n\n if (valueUpdated || itemSelected) {\n // trigger the DOM change event so any subscriber gets notified\n that.element.trigger(CHANGE);\n }\n\n if (trigger) {\n that.trigger(CHANGE);\n }\n\n that.typing = false;\n that._toggleCloseVisibility();\n },\n\n _accessor: function(value) {\n var that = this,\n element = that.filterInput && activeElement() === that.filterInput[0] ? that.filterInput[0] : that.element[0];\n\n if (value !== undefined$1) {\n element.value = value === null ? \"\" : value;\n that._placeholder();\n } else {\n value = element.value;\n\n if (element.className.indexOf(\"k-readonly\") > -1) {\n if (value === that.options.placeholder) {\n return \"\";\n } else {\n return value;\n }\n }\n\n return value;\n }\n },\n\n _keydown: function(e) {\n var that = this;\n var key = e.keyCode;\n var listView = that.listView;\n var visible = that.popup.visible();\n var current = listView.focus();\n\n that._last = key;\n\n if (key === keys.DOWN) {\n if (visible) {\n this._move(current ? \"focusNext\" : \"focusFirst\");\n } else if (that.value()) {\n that._filterSource({\n value: that.ignoreCase ? that.value().toLowerCase() : that.value(),\n operator: that.options.filter,\n field: that.options.dataTextField,\n ignoreCase: that.ignoreCase\n }).done(function() {\n if (that._allowOpening()) {\n that._resetFocusItem();\n that.popup.open();\n }\n });\n }\n e.preventDefault();\n } else if (key === keys.ESC ) {\n if (visible) {\n e.preventDefault();\n that.close();\n } else {\n that._clearValue();\n }\n } else if (e.altKey && key === keys.UP && visible) {\n e.preventDefault();\n that.close();\n } else if (key === keys.UP) {\n if (visible) {\n this._move(current ? \"focusPrev\" : \"focusLast\");\n }\n e.preventDefault();\n } else if (key === keys.HOME) {\n this._move(\"focusFirst\");\n } else if (key === keys.END) {\n this._move(\"focusLast\");\n } else if (key === keys.ENTER || key === keys.TAB) {\n\n if (key === keys.ENTER && visible) {\n e.preventDefault();\n }\n\n if (visible && current) {\n var dataItem = listView.dataItemByIndex(listView.getElementIndex(current));\n if (that.trigger(\"select\", { dataItem: dataItem, item: current })) {\n return;\n }\n\n this._select(current);\n }\n\n this._blur();\n } else if (that.popup.visible() && (key === keys.PAGEDOWN || key === keys.PAGEUP)) {\n e.preventDefault();\n\n var direction = key === keys.PAGEDOWN ? 1 : -1;\n listView.scrollWith(direction * listView.screenHeight());\n } else {\n // In some cases when the popup is opened resize is triggered which will cause it to close\n // Setting the below flag will prevent this from happening\n that.popup._hovered = true;\n that._search();\n }\n },\n\n _keypress: function() {\n this._oldText = this.element.val();\n this._typing = true;\n },\n\n _move: function(action) {\n this.listView[action]();\n\n if (this.options.suggest) {\n this.suggest(this.listView.focus());\n }\n },\n\n _hideBusy: function() {\n var that = this;\n clearTimeout(that._busy);\n that._loading.addClass(HIDDENCLASS);\n that.element.attr(\"aria-busy\", false);\n that._busy = null;\n that._toggleCloseVisibility();\n },\n\n _showBusy: function() {\n var that = this;\n\n if (that._busy) {\n return;\n }\n\n that._busy = setTimeout(function() {\n that.element.attr(\"aria-busy\", true);\n that._loading.removeClass(HIDDENCLASS);\n that._hideClear();\n }, 100);\n },\n\n _placeholder: function(show) {\n if (placeholderSupported) {\n return;\n }\n\n var that = this,\n element = that.element,\n placeholder = that.options.placeholder,\n value;\n\n if (placeholder) {\n value = element.val();\n\n if (show === undefined$1) {\n show = !value;\n }\n\n if (!show) {\n if (value !== placeholder) {\n placeholder = value;\n } else {\n placeholder = \"\";\n }\n }\n\n if (value === that._old && !show) {\n return;\n }\n\n element.toggleClass(\"k-readonly\", show)\n .val(placeholder);\n\n if (!placeholder && element[0] === document.activeElement) {\n caret(element[0], 0, 0);\n }\n }\n },\n\n _separator: function() {\n var separator = this.options.separator;\n if (separator instanceof Array) {\n return new RegExp(separator.join(\"|\"), 'gi');\n }\n return separator;\n },\n\n _defaultSeparator: function() {\n var separator = this.options.separator;\n if (separator instanceof Array) {\n return separator[0];\n }\n return separator;\n },\n\n _inputValue: function() {\n return this.element.val();\n },\n\n _search: function() {\n var that = this;\n clearTimeout(that._typingTimeout);\n\n that._typingTimeout = setTimeout(function() {\n if (that._prev !== that._accessor()) {\n that._prev = that._accessor();\n that.search();\n }\n }, that.options.delay);\n },\n\n _select: function(candidate) {\n var that = this;\n that._active = true;\n\n return that.listView.select(candidate).done(function() {\n that._active = false;\n });\n },\n\n _loader: function() {\n this._loading = $('').insertAfter(this.element);\n },\n\n _clearButton: function() {\n List.fn._clearButton.call(this);\n\n if (this.options.clearButton) {\n this._clear.insertAfter(this.element);\n this.wrapper.addClass(\"k-autocomplete-clearable\");\n }\n },\n\n _toggleHover: function(e) {\n $(e.currentTarget).toggleClass(HOVER, e.type === \"mouseenter\");\n },\n\n _toggleCloseVisibility: function() {\n var preventShow = this.element.is(\":disabled\") || this.element.is(\"[readonly]\");\n\n if (this.value() && !preventShow) {\n this._showClear();\n } else {\n this._hideClear();\n }\n },\n\n _wrapper: function() {\n var that = this,\n element = that.element,\n DOMelement = element[0],\n wrapper;\n\n wrapper = element.parent();\n\n if (!wrapper.is(\"span.k-autocomplete\")) {\n wrapper = element.wrap(\"\").parent();\n }\n\n wrapper.attr(\"tabindex\", -1);\n\n wrapper[0].style.cssText = DOMelement.style.cssText;\n element.css({\n width: \"\",\n height: DOMelement.style.height\n });\n\n that._focused = that.element;\n that.wrapper = wrapper\n .addClass(\"k-autocomplete k-input\")\n .addClass(DOMelement.className)\n .removeClass('input-validation-error');\n },\n\n _clearValue: function() {\n List.fn._clearValue.call(this);\n this.element.focus();\n }\n });\n\n ui.plugin(AutoComplete);\n\n kendo.cssProperties.registerPrefix(\"AutoComplete\", \"k-input-\");\n\n kendo.cssProperties.registerValues(\"AutoComplete\", [{\n prop: \"rounded\",\n values: kendo.cssProperties.roundedValues.concat([['full', 'full']])\n }]);\n})(window.kendo.jQuery);\nvar kendo$1 = kendo;\n\nexport { kendo$1 as default };\n"]}