@progress/kendo-ui
Version:
This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.
3 lines (2 loc) • 42.6 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("kendo.data.js"),require("kendo.popup.js"),require("kendo.label.js"),require("kendo.icons.js"),require("kendo.actionsheet.js"),require("kendo.dropdowns-loader.chunk.js")):"function"==typeof define&&define.amd?define(["exports","kendo.data","kendo.popup","kendo.label","kendo.icons","kendo.actionsheet","kendo.dropdowns-loader.chunk"],t):t(((e="undefined"!=typeof globalThis?globalThis:e||self).kendo=e.kendo||{},e.kendo._globals=e.kendo._globals||{},e.kendo._globals.List={}),e.kendo._globals.Data,e.kendo._globals.Popup,e.kendo._globals.Label,e.kendo._globals.Icons,e.kendo._globals.Actionsheet,e.kendo._globals.DropdownsLoaderChunk)}(this,(function(e,t,i,a,s,n,l){!function(e,t){var i=window.kendo,a=i.ui,s=i._outerHeight,n=/^\d+(\.\d+)?%$/i,o=a.Widget,r=i.keys,u=i.support,d=i.htmlEncode,c=i._activeElement,h=i._outerWidth,p=i.data.ObservableArray,f="id",_="change",m="k-focus",g="k-hover",v="k-selected",b="k-list-ul",w=".k-list-group-sticky-header",k=".k-list-item",x="open",S="close",y="cascade",I="select",F="click",V="mouseenter",C="activate",T="deactivate",L="dataBinding",D="dataBound",H="selectedItemChange",P="selected",B="requestStart",A="requestEnd",E="focus",M=e.extend,O=Array.isArray,Q=u.browser,W="k-hidden",q="width",G="text",z=Q.msie,N=/"/g,j={ComboBox:["DropDownList","MultiColumnComboBox"],DropDownList:["ComboBox","MultiColumnComboBox"],MultiColumnComboBox:["ComboBox","DropDownList"]},R="aria-labelledby",$="aria-label",U="aria-activedescendant",K="aria-expanded",Y="aria-hidden",X="aria-selected",J=".k-table-group-row",Z=i.ui.DataBoundWidget.extend({init:function(t,a){var s,n=this;o.fn.init.call(n,t,a),t=n.element,a=n.options,n._isSelect=t.is(I),n._isSelect&&n.element[0].length&&(a.dataSource||(a.dataTextField=a.dataTextField||G,a.dataValueField=a.dataValueField||"value")),"auto"===a.adaptiveMode&&(n.largeMQL=i.mediaQuery("large"),n.mediumMQL=i.mediaQuery("medium"),n.smallMQL=i.mediaQuery("small")),n._bindLoader(),n._listSize=i.cssProperties.getValidClass({widget:"List",propName:"size",value:a.size}),n._filterHeader(),n.ul=e('<ul unselectable="on"/>').attr({tabIndex:-1,"aria-hidden":!0}),n.list=e("<div class='k-list'/>").addClass(n._listSize).append(n.ul),(s=t.attr(f))||(s=i.guid()),n.list.attr(f,s+"-list"),n.ul.attr(f,s+"_listbox"),a.columns&&a.columns.length&&(n.list.removeClass("k-list").addClass("k-data-table"),n.list.removeClass(n._listSize).addClass("k-table-md"),n.ul.removeClass(b).addClass("k-table"),n._columnsHeader()),n._header(),n._noData(),n._footer(),n._accessors(),n._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:!0,size:"medium",messages:{noData:"No data found.",clear:"clear"},adaptiveMode:"none"},setOptions:function(e){o.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),e.label&&this._inputLabel?this.label.setOptions(e.label):!1===e.label?(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel):e.label&&this._label()},_bindLoader:function(){const e=this;e._initLoader=l.i.bind(e),e._initLoader()},focus:function(){this._focused.trigger(E)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,a=t.options,s=e.isPlainObject(a.label)?a.label:{content:a.label};t.label=new i.ui.Label(null,e.extend({},s,{widget:t,floatCheck:t._floatCheck.bind(t)})),t._inputLabel=t.label.element,t._refreshFloatingLabel()},_floatCheck:function(){return!this.listView||!(this.value()||!!this.text&&this.text())&&!this.popup.visible()},_refreshFloatingLabel:function(){var e=this;e.label&&e.label.floatingLabel&&e.label.floatingLabel.refresh()},_header:function(){var t=this,a=e(t.header),s=t.options.headerTemplate;if(i.destroy(a),a.remove(),s){var n="function"!=typeof s?i.template(s):s;a=e(n({})),t.header=a[0]?a:null,t.list.parent.length>0&&t.list.before(a)}else t.header=null},_filterHeader:function(){this.filterTemplate='<div class="k-list-filter"><span class="k-searchbox k-input k-input-md k-rounded-md k-input-solid" type="text" autocomplete="off">'+i.ui.icon({icon:"search",iconClass:"k-input-icon"})+"</span></div>",this.actionSheetFilterTemplate=`<div class="k-actionsheet-titlebar-group k-actionsheet-filter">${this.filterTemplate}</div>`,this._isFilterEnabled()&&(this.filterInput=e('<input class="k-input-inner" type="text" />').attr({placeholder:this.element.attr("placeholder"),title:this.options.filterTitle||this.element.attr("title"),role:"searchbox","aria-label":this.options.filterTitle,"aria-haspopup":"listbox","aria-autocomplete":"list"}))},_columnsHeader:function(){var t,a=this,s=e(a.columnsHeader);i.destroy(s),s.remove();for(var l="<div class='k-table-header'><div class='k-table-header-wrap'><table class='k-table' role='presentation'>",o="<colgroup>",r="<tr class='k-table-row'>",u=0;u<this.options.columns.length;u++){var d=this.options.columns[u],c=d.title||d.field||"",h=d.headerTemplate||(()=>c),p="function"!=typeof h?i.template(h):h,f=d.width,_=parseInt(f,10),m="";f&&!isNaN(_)&&(m+=`${i.attr("style-width")}="${_}${n.test(f)?"%":"px"}"`),o+="<col "+m+"/>",r+="<th class='k-table-th'>",r+=p(d),r+="</th>"}l+=o+="</colgroup>",l+="<thead class='k-table-thead'>",l+=r+="</tr>",t=e(l+="</thead></table></div></div>"),i.applyStylesFromKendoAttributes(t,["width"]),a.columnsHeader=s=t,a.list.prepend(s)},_noData:function(){var t=this,a=e(t.noData),s=!0===t.options.noDataTemplate?()=>d(t.options.messages.noData):t.options.noDataTemplate;i.destroy(a),a.remove(),s?(t.noData=e('<div class="k-no-data"></div>').hide().appendTo(t.list),t.noDataTemplate="function"!=typeof s?i.template(s):s):t.noData=null},_footer:function(){var t=this,a=e(t.footer),s=t.options.footerTemplate,n=this.options.columns&&this.options.columns.length?'<div class="k-table-footer"><span class="k-table-td"></span></div>':'<div class="k-list-footer"></div>';i.destroy(a),a.remove(),s?(t.footer=e(n).appendTo(t.list),t.footerTemplate="function"!=typeof s?i.template(s):s):t.footer=null},_listOptions:function(t){var a=this,s=a.options,n=s.virtual,l={change:a._listChange.bind(a)},o=a._listBound.bind(a),r=a._focused,u=a.element.attr("id"),c=e('label[for="'+a.element.attr("id")+'"]'),h=r.attr(R);return!h&&c.length&&(h=c.attr("id")||a._generateLabelId(c,u||i.guid())),n="object"==typeof n?n:{},(t=e.extend({autoBind:!1,selectable:!0,dataSource:a.dataSource,click:a._click.bind(a),activate:a._activateItem.bind(a),columns:s.columns,deactivate:a._deactivateItem.bind(a),dataBinding:function(){a.trigger(L)},dataBound:o,height:s.height,dataValueField:s.dataValueField,dataTextField:s.dataTextField,groupTemplate:s.groupTemplate,fixedGroupTemplate:s.fixedGroupTemplate,template:s.template,ariaLabel:r.attr($),ariaLabelledBy:h,listSize:a._listSize},t,n,l)).template||(t.template=e=>d(i.getter(t.dataTextField)(e))),t},_initList:function(e){var t=this,a=e&&e.skipValueUpdate,s=t._listOptions({selectedItemChange:t._listChange.bind(t)});t.options.virtual?(t.listView=new i.ui.VirtualList(t.ul,Object.assign(s,{height:t._hasActionSheet()?362:t.options.height})),t.list.addClass("k-virtual-list")):t.listView=new i.ui.StaticList(t.ul,s),t.listView.bind("listBound",t._listBound.bind(t)),a||t._setListValue()},_setListValue:function(e){(e=e||this.options.value)!==t&&this.listView.value(e).done(this._updateSelectionState.bind(this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){this._clear&&this._clear.addClass(W)},_showClear:function(){this._clear&&this._clear.removeClass(W)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(t,i){var a=this,s=a.options,n=s.filterFields&&t&&t.logic&&t.filters&&t.filters.length,l=a.dataSource,o=M({},l.filter()||{}),r=t||o.filters&&o.filters.length&&!t,u=le(o,s.dataTextField);if(this._clearFilterExpressions(o),(t||u)&&a.trigger("filtering",{filter:t}))return e.Deferred().reject().promise();var d={filters:[],logic:"and"};n?d.filters.push(t):this._pushFilterExpression(d,t),ne(o)&&(d.logic===o.logic?d.filters=d.filters.concat(o.filters):d.filters.push(o)),a._cascading&&this.listView.setDSFilter(d);var c=M({},{page:r?1:l.page(),pageSize:r?l.options.pageSize:l.pageSize(),sort:l.sort(),filter:l.filter(),group:l.group(),aggregate:l.aggregate()},{filter:d});return l[i?"read":"query"](l._mergeState(c))},_pushFilterExpression:function(e,t){ne(t)&&""!==t.value&&e.filters.push(t)},_clearFilterExpressions:function(e){if(e.filters){for(var t,i=0;i<e.filters.length;i++)"fromFilter"in e.filters[i]&&(t=i);isNaN(t)||e.filters.splice(t,1)}},_renderNoData:function(){var e=this,t=e.noData;t&&t.html(e.noDataTemplate({instance:e}))},_toggleNoData:function(t){e(this.noData).toggle(t)},_toggleHeader:function(e){this.listView.content.prev(w).toggle(e)},_renderFooter:function(){var e=this,t=e.footer?this.options.columns&&this.options.columns.length?e.footer.children().first():e.footer:null;t&&t.html(e.footerTemplate({instance:e}))},_allowOpening:function(){return this.options.noDataTemplate||this.dataSource.flatView().length},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,i=t.dataSource.reader.model;i&&i.fields&&(e=i.fields[t.options.dataTextField])&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1)},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t,i=this,a=i.options,s=e.word,n=a.filterFields,l=a.dataTextField;if(n&&n.length){t={logic:"or",filters:[],fromFilter:!0};for(var o=0;o<n.length;o++)this._pushFilterExpression(t,i._buildExpression(s,n[o]))}else t=i._buildExpression(s,l);i._open=e.open,i._filterSource(t)},_buildExpression:function(e,t){var i=this.options,a=i.ignoreCase,s=this.dataSource.options.accentFoldingFiltering;return{value:a?s?e.toLocaleLowerCase(s):e.toLowerCase():e,field:t,operator:i.filter,ignoreCase:a}},_clearButton:function(){var t=this,a=t.options.messages.clear;t._clear||(t._clear=e(`<span unselectable="on" class="k-clear-value" title="${a}">${i.ui.icon("x")}</span>`).attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},search:function(e){var t=this.options;e="string"==typeof e?e:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!e.length||e.length>=t.minLength)&&(this._state="filter",this.listView&&(this.listView._emptySearch=!i.trim(e).length),this._isFilterEnabled()?this._filter({word:e,open:!0}):this._searchByWord(e))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;o.fn.destroy.call(e),e._unbindDataSource(),(e.largeMQL||e.mediumMQL||e.smallMQL)&&(e.largeMQL.destroy(),e.mediumMQL.destroy(),e.smallMQL.destroy()),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler),e.label&&e.label.destroy()},dataItem:function(i){var a=this;if(i===t)return a.listView.selectedDataItems()[0];if("number"!=typeof i){if(a.options.virtual)return a.dataSource.getByUid(e(i).data("uid"));i=e(a.items()).index(i)}return a.dataSource.flatView()[i]},_activateItem:function(){var e=this.listView.focus();e&&this.popup.visible()&&this._focused.add(this.filterInput).attr(U,e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr(U)},_accessors:function(){var e=this,t=e.element,a=e.options,s=i.getter,n=t.attr(i.attr("text-field")),l=t.attr(i.attr("value-field"));!a.dataTextField&&n&&(a.dataTextField=n),!a.dataValueField&&l&&(a.dataValueField=l),e._text=s(a.dataTextField),e._value=s(a.dataValueField)},_aria:function(e){var i,a=this,s=a.options,n=a._focused;s.suggest!==t&&(i="none"===s.filter?!0===s.suggest?"inline":"none":!0===s.suggest?"both":"list",n.attr("aria-autocomplete",i)),e=e?e+" "+a.ul[0].id:a.ul[0].id,n.attr({"aria-controls":e}),a.filterInput&&a.filterInput.length>0&&a.filterInput.attr("aria-controls",e),a.ul.attr("aria-live",a._isFilterEnabled()?"polite":"off"),a._ariaLabel(a._focused)},_blur:function(){var e=this;e._change(),e.close(),e._userTriggered=!1},_isValueChanged:function(e){return e!==ee(this._old,typeof e)},_change:function(){var e,i=this,a=i.selectedIndex,s=i.options.value,n=i.value();i._isSelect&&!i.listView.bound()&&s&&(n=s),i._isValueChanged(n)||i._valueBeforeCascade!==t&&i._isValueChanged(i._valueBeforeCascade)&&i._userTriggered?e=!0:a===t||a===i._oldIndex||i.listView.isFiltered()||i.options.virtual||(e=!0),e&&(null===i._old||""===i._old||""===n?i._valueBeforeCascade=i._old=n:i.dataItem()?i._valueBeforeCascade=i._old=i.options.dataValueField?i.dataItem()[i.options.dataValueField]:i.dataItem():i._valueBeforeCascade=i._old=null,i._oldIndex=a,i._typing||i.element.trigger(_),i.trigger(_)),i.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,i=e.options,a=e.element.is("[disabled]");i.enable!==t&&(i.enabled=i.enable),!i.enabled||a?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var i=this._value(e);return i===t&&(i=this._text(e)),i},_offsetHeight:function(){var t=0;return this.listView.content.parent().prevAll(":visible").each((function(){var i=e(this);t+=s(i,!0)})),t},_height:function(t){var i,a=this,n=a.list,l=a.options.height,o=a.popup.visible(),r=this.options.columns&&this.options.columns.length;if(t||a.options.noDataTemplate){if(i=n.parent().add(n.closest(".k-animation-container").add(n.closest(".k-child-animation-container"))).show(),!n.parent().is(":visible"))return void i.hide();l=a.listView.content[0].scrollHeight>l?l:"auto",i.height(l),"auto"!==l&&(l-=a._offsetHeight(),r&&(l=l-(s(e(a.footer))||0)-(s(e(a.columnsHeader))||0))),r?a.listView.content.outerHeight(l):a.listView.content.parent().outerHeight(l),o||n.parent().hide()}return l},_openHandler:function(e){var t;this._adjustListWidth(),this.trigger(x)?e.preventDefault():(this._focused.attr(K,!0),this.ul.attr(Y,!1),(t=this.listView.focus())&&this._focused.add(this.filterInput).attr(U,t.attr("id")))},_adjustListWidth:function(){var e,t,i=this,a=i.list.parent(),s=a[0].style.width,n=i.wrapper;if(!(!a.data(q)&&s||i._hasActionSheet()))return e=window.getComputedStyle?window.getComputedStyle(n[0],null):0,t=parseFloat(e&&e.width)||h(n),e&&Q.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),s="border-box"!==a.css("box-sizing")?t-(h(a)-a.width()):t,a.css({fontFamily:n.css("font-family"),width:i.options.autoWidth?"auto":s,minWidth:s,whiteSpace:i.options.autoWidth?"nowrap":"normal"}).data(q,s),!0},_closeHandler:function(e){e.closeButton&&this._onCloseButtonPressed(),this.trigger(S)?e.preventDefault():(this._focused.attr(K,!1),this.ul.attr(Y,!0),this._focused.add(this.filterInput).removeAttr(U))},_focusItem:function(){var e=this.listView,i=!e.focus(),a=ae(e.select());a===t&&this.options.highlightFirst&&i&&(a=0),a!==t?e.focus(a):i&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first").first(),a=this.listView.content.prev(w),s=0,n="right";a[0]&&"none"!==a[0].style.display&&("auto"!==e&&(s=i.support.scrollbar()),this.element.parents(".k-rtl").length&&(n="left"),s+=parseFloat(t.css("border-"+n+"-width"),10)+parseFloat(t.children(".k-list-item-group-label").css("padding-"+n),10),a.css("padding-"+n,s))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){if(this.options.columns&&this.options.columns.length){var t=u.isRtl(this.wrapper),a=i.support.scrollbar();this.columnsHeader.css(t?"padding-left":"padding-right","auto"!==e?a:0)}},_refreshScroll:function(){var e=this.listView,t=e.element.height()>e.content.height();this.options.autoWidth&&e.content.css({overflowX:"hidden",overflowY:t?"scroll":"auto"})},_hasActionSheet:function(){return"auto"===this.options.adaptiveMode&&(this.mediumMQL.mediaQueryList.matches||this.smallMQL.mediaQueryList.matches)},_resizePopup:function(e){this.options.virtual||this._hasActionSheet()||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):(this.popup.one("open",function(e){return function(t){t.isDefaultPrevented()||this._calculatePopupHeight(e)}.bind(this)}.call(this,e)),this.popup.one(C,this._refreshScroll.bind(this))))},_popup:function(){var e=this;e.list.wrap("<div>"),"auto"===e.options.adaptiveMode?(e.largeMQL.onEnter(e._createPopup.bind(e)),e.mediumMQL.onEnter(e._createActionSheet.bind(e)),e.smallMQL.onEnter((()=>{e.popup&&e.popup.fullscreen||e._createActionSheet(),e.popup.fullscreen(!0)}))):e._createPopup()},_addFilterHeader:function(){var t=this;t._isFilterEnabled()&&(t._filterHeader(),"auto"===t.options.adaptiveMode&&(t.mediumMQL.mediaQueryList.matches||t.smallMQL.mediaQueryList.matches)?(t.popup.element.find(".k-actionsheet-titlebar").append(e(t.actionSheetFilterTemplate)).find(".k-searchbox").append(t.filterInput),t._enable()):t.options.popupFilter&&t.list.parent().prepend(e(t.filterTemplate)).find(".k-searchbox").append(t.filterInput),t._enable())},_createPopup:function(){var e=this;e.popup&&(e._cachedFilterValue=e.filterInput?e.filterInput.val():null,e.popup.destroy(),e.popup.wrapper&&e.popup.wrapper.remove(),e._removeFilterHeader(),e._removeStaticHeader()),e.popup=new a.Popup(e.list.parent().addClass("k-list-container"),M({},e.options.popup,{anchor:e.wrapper,open:e._openHandler.bind(e),close:e._closeHandler.bind(e),animation:e.options.animation,isRtl:u.isRtl(e.wrapper),autosize:e.options.autoWidth,autowidth:e.options.autoWidth,activate:()=>{this._refreshFloatingLabel()},deactivate:()=>{this._refreshFloatingLabel()}})),e._postCreatePopup()},_onActionSheetCreate:e.noop,_onCloseButtonPressed:e.noop,_createActionSheet:function(){var e=this;e.popup&&(e._cachedFilterValue=e.filterInput?e.filterInput.val():null,e.popup.destroy(),e.popup.wrapper&&e.popup.wrapper.remove(),e._removeFilterHeader(),e._removeStaticHeader(),e.list.add(e.list.parent()).css({width:"",height:"",minWidth:""})),e.popup=new a.ActionSheet(e.list.parent(),{headerTemplate:t=>'<div class="k-text-center k-actionsheet-titlebar" ><div class="k-actionsheet-titlebar-group k-hbox"><div class="k-actionsheet-title">'+(e.options.label?`<div class="k-text-center">${e.options.label}</div>`:"")+(e.options.placeholder?`<div class="k-actionsheet-subtitle k-text-center">${e.options.placeholder||""}</div>`:"")+"</div>"+(t.closeButton?'<div class="k-actionsheet-actions">'+i.html.renderButton(`<button tabindex="-1" ${i.attr("ref-actionsheet-close-button")}></button>`,{icon:"x",fillMode:"flat",size:"large"})+"</div>":"")+"</div></div>",open:e._openHandler.bind(e),close:e._closeHandler.bind(e),focusOnActivate:!1,adaptive:!0,appendTo:e.options.popup&&e.options.popup.appendTo||document.body,closeButton:!0,fullscreen:e.smallMQL.mediaQueryList.matches,activate:()=>{this._refreshFloatingLabel()},deactivate:()=>{this._refreshFloatingLabel()},popup:M({},e.options.popup,{autosize:e.options.autoWidth})}),e._postCreatePopup(),e._onActionSheetCreate()},_removeFilterHeader:function(){this.filterInput&&(this.filterInput.off(this.ns).closest(".k-list-filter").remove(),this.filterInput=null)},_removeStaticHeader:function(){this.listView.header.remove()},_postCreatePopup:function(){var e,t=this;t._addFilterHeader(),t.filterInput&&t._cachedFilterValue&&t.filterInput.val(t._cachedFilterValue),t.popup.element.prepend(t.header).on("mousedown"+this.ns,this._listMousedown.bind(this)),t.listView&&(e=t.listView.value(),t.listView._clean&&t.listView._clean(),t.tagList&&t.options.virtual&&t.tagList.empty(),t.listView.destroy(),t.listView.content&&this.ul.unwrap(),t._initList({skipValueUpdate:!0}),t.listView.value(e))},_toggleHover:function(t){e(t.currentTarget).toggleClass(g,t.type===V)},_toggle:function(e,i){var a=this,s=u.mobileOS&&(u.touch||u.MSPointers||u.pointers);e=e!==t?e:!a.popup.visible(),i||s||a._focused[0]===c()||(a._prevent=!0,a._focused.trigger(E),a._prevent=!1),a[e?x:S]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===ee(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(y,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(_)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(B,e._requestStartHandler).unbind(A,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){if(((e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t))&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw new Error("ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function")}});function ee(e,i){return e!==t&&""!==e&&null!==e&&("boolean"===i?("boolean"!=typeof e&&(e="true"===e.toString().toLowerCase()),e=Boolean(e)):"number"===i?e=Number(e):"string"===i&&(e=e.toString())),e}M(Z,{inArray:function(e,t){var i,a,s=t.children;if(!e||e.parentNode!==t)return-1;for(i=0,a=s.length;i<a;i++)if(e===s[i])return i;return-1},unifyType:ee}),i.ui.List=Z,a.Select=Z.extend({init:function(e,t){Z.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){var t,i=this;i.options.dataSource=e,i._dataSource(),i.listView.bound()&&(i._initialIndex=null,i.listView._current=null),i.listView.setDataSource(i.dataSource),i.options.autoBind&&i.dataSource.fetch(),(t=i._parentWidget())&&i._cascadeSelect(t)},close:function(){this.popup.close()},select:function(e){var i=this;return e===t?i.selectedIndex:i._select(e).done((function(){i._cascadeValue=i._old=i._accessor(),i._oldIndex=i.selectedIndex,i._refreshFloatingLabel()}))},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var i=this.element[0];if(e===t)return i.value;null===e&&(e=""),i.value=e},_accessorSelect:function(e,i){var a=this.element[0];if(e===t)return se(a).value||"";se(a).selected=!1,i===t&&(i=-1),null!==e&&""!==e&&-1==i?this._custom(e):e?a.value=e:a.selectedIndex=i},_syncValueAndText:function(){return!0},_custom:function(t){var i=this,a=i.element,s=i._customOption;s||(s=e("<option/>"),i._customOption=s,a.append(s)),s.text(t),s[0].selected=!0},_dataSource:function(){var e,t=this,a=t.element,s=t.options,n=s.dataSource||{};n=Array.isArray(n)?{data:n}:n,t._isSelect&&((e=a[0].selectedIndex)>-1&&(s.index=e),n.select=a,n.fields=[{field:s.dataTextField},{field:s.dataValueField}]),t.dataSource?t._unbindDataSource():(t._requestStartHandler=t._showBusy,t._requestEndHandler=t._hideBusy,t._errorHandler=function(){t._hideBusy()}),t.dataSource=i.data.DataSource.create(n).bind(B,t._requestStartHandler).bind(A,t._requestEndHandler).bind("error",t._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){return this.listView.focusNext()},_prevItem:function(){return this.listView.focusPrev()},_getNormalizedDataItem:function(e){var t,i=this,a=i.listView,s="number"==typeof e,n=i.optionLabel&&i.optionLabel.length;return t=s?n?--e:e:a.getElementIndex(e),a.dataItemByIndex(t)},_getNormalizedSelectCandidate:function(e){var t=e;return this.optionLabel&&this.optionLabel.length&&"number"==typeof e&&t++,t},_move:function(e){var t,i,a,s,n,l=this,o=l.listView,u=e.keyCode,d=u===r.DOWN,h=l.options.virtual;if(u===r.UP||d){if(e.altKey)l.toggle(d);else{if(!o.bound()&&!l.ul[0].firstChild)return l._fetch||(l.dataSource.one(_,(function(){l._fetch=!1,l._move(e)})),l._fetch=!0,l._filterSource()),e.preventDefault(),!0;a=l._focus(),l._fetch||a&&!a.hasClass(v)||(d?(s=l._nextItem(),(h&&s<=0||!l._focus()&&!s)&&l._lastItem()):(s=l._prevItem(),(h&&s>=o.dataSource.total()-1||!l._focus()&&!s)&&l._firstItem())),n=l._getNormalizedSelectCandidate(l._get(l._focus())||s||0),l._select(n,!0).done((function(){var e=function(){l.popup.visible()||l._blur(),null===l._cascadedValue?l._cascadedValue=l.value():l._cascadedValue=l.dataItem()?l.dataItem()[l.options.dataValueField]||l.dataItem():null};l.trigger(I,{dataItem:l._getNormalizedDataItem(n),item:l._focus()})?l._select(a).done(e):e()}))}e.preventDefault(),i=!0}else if(u===r.ENTER||u===r.TAB){l.popup.visible()&&e.preventDefault(),a=l._focus(),t=l.dataItem(),l.popup.visible()||t&&l.text()===l._text(t)||(a=null);var p,f=l.filterInput&&l.filterInput[0]===c();if(a){var m=!0;if((t=o.dataItemByIndex(o.getElementIndex(a)))&&(m=l._value(t)!==Z.unifyType(l.value(),typeof l._value(t))),m&&l.trigger(I,{dataItem:t,item:a}))return;p=l._select(a)}else l.input&&((l._syncValueAndText()||l._isSelect)&&l._accessor(l.input.val()),l.listView.value(l.input.val()));l._focusElement&&l._focusElement(l.wrapper),f&&u===r.TAB?l.wrapper.focusout():p&&"function"==typeof p.done?p.done((function(){l._blur()})):l._blur(),l.close(),i=!0}else if(u===r.ESC)l.popup.visible()&&(e.preventDefault(),e.stopPropagation()),l.close(),i=!0;else if(l.popup.visible()&&(u===r.PAGEDOWN||u===r.PAGEUP)){e.preventDefault();var g=u===r.PAGEDOWN?1:-1;o.scrollWith(g*o.screenHeight()),i=!0}return i},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.bound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done((function(){e._fetch=!1})))},_options:function(e,i,a){var s,n,l,o,r=this,u=r.element,c=u[0],h=e.length,p="",f=0;for(i&&(p=i);f<h;f++)s="<option",n=e[f],l=r._text(n),(o=r._value(n))!==t&&(-1!==(o+="").indexOf('"')&&(o=o.replace(N,""")),s+=' value="'+o+'"'),s+=">",l!==t&&(s+=d(l)),p+=s+="</option>";u.html(p),a!==t&&(c.value=a,c.value&&!a&&(c.selectedIndex=-1)),-1!==c.selectedIndex&&(s=se(c))&&s.setAttribute(P,P)},_reset:function(){var t=this,i=t.element,a=i.attr("form"),s=a?e("#"+a):i.closest("form");s[0]&&(t._resetHandler=function(){setTimeout((function(){t.options._removeDataItems&&(t.listView._dataItems=[]),t.value(t._initial),t.options._shouldRefresh&&(t.text(t._initial),t.refresh())}))},t._form=s.on("reset",t._resetHandler))},_parentWidget:function(){var t=this.options.name;if(this.options.cascadeFrom){var i=e("#"+this.options.cascadeFrom),a=i.data("kendo"+t);if(!a)for(var s=0;s<j[t].length&&!(a=i.data("kendo"+j[t][s]));s+=1);return a}},_cascade:function(){var e,t=this,i=t.options;if(i.cascadeFrom){if(!(e=t._parentWidget()))return;t._cascadeHandlerProxy=t._cascadeHandler.bind(t),t._cascadeFilterRequests=[],i.autoBind=!1,e.bind("set",(function(){t.one("set",(function(e){t._selectedValue=e.value||t._accessor()}))})),e.first(y,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one(D,(function(){t._toggleCascadeOnFocus(),e.popup.visible()&&e._focused.trigger(E)})),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),i=z&&t instanceof a.DropDownList?"blur":"focusout";t._focused.add(t.filterInput).on(E,(function(){t.unbind(y,e._cascadeHandlerProxy),t.unbind(_,e._cascadeHandlerProxy),t.first(_,e._cascadeHandlerProxy)})),t._focused.add(t.filterInput).on(i,(function(){t.unbind(_,e._cascadeHandlerProxy),t.unbind(y,e._cascadeHandlerProxy),t.first(y,e._cascadeHandlerProxy)}))},_cascadeHandler:function(e){var t=this._parentWidget(),i=this.value();this._userTriggered=e.userTriggered||t._userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,i)},_cascadeChange:function(e){var t=this,i=t._accessor()||t._selectedValue;t._cascadeFilterRequests.length||(t._selectedValue=null),t._userTriggered?t._clearSelection(e,!0):i?(i!==ee(t.listView.value()[0],typeof i)&&t.value(i),t.dataSource.view()[0]&&-1!==t.selectedIndex||t._clearSelection(e,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._triggerChange(),t._userTriggered=!1},_cascadeSelect:function(e,i){var a=this,s=e.dataItem(),n=s?s[a.options.cascadeFromParentField]||e._value(s):null,l=a.options.cascadeFromField||e.options.dataValueField;if(!e.options.cascadeOnCustomValue||null!==n||a.options.cascadeFromParentField&&a.options.cascadeFromParentField!==e.options.dataValueField||(n=e.value()),a._valueBeforeCascade=i!==t?i:a.value(),n||0===n){le(a.dataSource.filter()||{},l);var o=function(){var t=a._cascadeFilterRequests.shift();t&&a.unbind("dataBound",t),(t=a._cascadeFilterRequests[0])&&a.first("dataBound",t),a._cascadeChange(e)};a._cascadeFilterRequests.push(o),1===a._cascadeFilterRequests.length&&a.first("dataBound",o),a._cascading=!0,a._filterSource({field:l,operator:"eq",value:n}),a._cascading=!1}else a.enable(!1),a._clearSelection(e),a._triggerCascade(),a._triggerChange(),a._userTriggered=!1;a._refreshFloatingLabel()}});var te=".StaticList",ie=i.ui.DataBoundWidget.extend({init:function(t,a){if(o.fn.init.call(this,t,a),this.element.attr("role",a.aria&&a.aria.role||"listbox").on(F+te,"li",this._click.bind(this)).on(V+te,"li",(function(){e(this).addClass(g)})).on("mouseleave"+te,"li",(function(){e(this).removeClass(g)})),a&&a.ariaLabel?this.element.attr($,a.ariaLabel):a&&a.ariaLabelledBy&&this.element.attr(R,a.ariaLabelledBy),u.touch&&this._touchHandlers(),"multiple"===this.options.selectable&&this.element.attr("aria-multiselectable",!0),this.options.columns&&this.options.columns.length){var s=this.element.parent().find(".k-table-thead"),n=e('<tr class="k-table-group-row"><th class="k-table-th" colspan="'+this.options.columns.length+'"></th></tr>');s.append(n),this.header=n.find(".k-table-th"),this.content=this.element.wrap("<div class='k-table-body k-table-scroller' unselectable='on'></div>").parent(),this.element.addClass("k-table-list")}else this.content=this.element.wrap("<div class='k-list-content k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before(e('<div class="k-list-group-sticky-header"></div>').hide()).prev(),this.element.addClass(b);this.bound(!1),this._optionID=i.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var l=this.options.value;l&&(this._values=Array.isArray(l)?l.slice(0):[l]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._createOnScrollProxy()},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null,ariaLabel:null,ariaLabelledBy:null},events:[F,_,C,T,L,D,H],setDataSource:function(e){var t,a=this,s=e||{};s=Array.isArray(s)?{data:s}:s,s=i.data.DataSource.create(s),a.dataSource?(a.dataSource.unbind(_,a._refreshHandler),t=a.value(),a.value([]),a.bound(!1),a.value(t)):a._refreshHandler=a.refresh.bind(a),a.setDSFilter(s.filter()),a.dataSource=s.bind(_,a._refreshHandler),a._fixedHeader()},_touchHandlers:function(){var t,i,a=this,s=this.options.columns&&this.options.columns.length?".k-table-row":k,n=function(e){return(e.originalEvent||e).changedTouches[0].pageY};a.element.on("touchstart"+te,(function(e){t=n(e)})),a.element.on("touchend"+te,(function(l){l.isDefaultPrevented()||(i=n(l),Math.abs(i-t)<10&&(a._touchTriggered=!0,a._triggerClick(e(l.target).closest(s).get(0))))}))},skip:function(){return this.dataSource.skip()},setOptions:function(e){o.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render(),this.label&&e.label?this.label.setOptions(e.label):this.label&&!1===e.label&&(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel)},destroy:function(){this.element.off(te),this._refreshHandler&&this.dataSource.unbind(_,this._refreshHandler),clearTimeout(this._scrollId),o.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],i=e.offsetTop,a=e.offsetHeight,s=t.scrollTop,n=t.clientHeight,l=i+a;s>i?s=i:l>s+n&&(s=l-n),t.scrollTop=s}},selectedDataItems:function(e){if(e===t)return this._dataItems.slice();this._dataItems=e,this._values=this._getValues(e)},_getValues:function(t){var i=this._valueGetter;return e.map(t,(function(e){return i(e)}))},focusNext:function(){var e=this.focus();e=e?e.next():0,this.focus(e)},focusPrev:function(){var e=this.focus();e=e?e.prev():this.element[0].children.length-1,this.focus(e)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(ae(this.element[0].children))},focus:function(i){var a,s=this,n=s._optionID;if(i===t)return s._current;i=ae(s._get(i)),i=e(this.element[0].children[i]),s._current&&(s._current.removeClass(m).removeAttr(f),s.trigger(T)),(a=!!i[0])&&(i.addClass(m),s.scroll(i),i.attr("id",n)),s._current=a?i:null,s.trigger(C)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(i){var a,s,n=this,l=n.options.selectable,o="multiple"!==l&&!1!==l,r=n._selectedIndices,u=[this.element.find(".k-selected").index()],d=[];if(i===t)return r.slice();1===(i=n._get(i)).length&&-1===i[0]&&(i=[]);var c=e.Deferred().resolve(),h=n.isFiltered();return h&&!o&&n._deselectFiltered(i)?c:o&&!h&&-1!==e.inArray(ae(i),r)&&-1!==e.inArray(ae(i),u)?(n._dataItems.length&&n._view.length&&(n._dataItems=[n._view[r[0]].item]),c):(a=(s=n._deselect(i)).removed,(i=s.indices).length&&(o&&(i=[ae(i)]),d=n._select(i)),(d.length||a.length)&&(n._valueComparer=null,n.trigger(_,{added:d,removed:a})),c)},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(e){e=Array.isArray(e)||e instanceof p?e.slice(0):[e],this._values=e,this._valueComparer=null},value:function(i){var a,s=this,n=s._valueDeferred;return i===t?s._values.slice():(s.setValue(i),n&&"resolved"!==n.state()||(s._valueDeferred=n=e.Deferred()),s.bound()&&(a=s._valueIndices(s._values),"multiple"===s.options.selectable&&s.select(-1),s.select(a),n.resolve()),s._skipUpdate=!1,n)},items:function(){return this.element.children(k)},_click:function(e){this._touchTriggered?this._touchTriggered=!1:e.isDefaultPrevented()||this._triggerClick(e.currentTarget)},_createOnScrollProxy:function(){this._onScroll=function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout((function(){e._renderHeader()}),50)}.bind(this)},_triggerClick:function(t){this.trigger(F,{item:e(t)})||this.select(t)},_valueExpr:function(e,t){var i,a=this,s=0,n=[];if(!a._valueComparer||a._valueType!==e){for(a._valueType=e;s<t.length;s++)n.push(ee(t[s],e));i=(e,t)=>{for(var i=0;i<n.length;i++)if(e===t[i])return i;return-1},a._valueComparer=function(e){return i(e,n)}}return a._valueComparer},_dataItemPosition:function(e,t){var i=this._valueGetter(e);return this._valueExpr(typeof i,t)(i)},_getter:function(){this._valueGetter=i.getter(this.options.dataValueField)},_deselect:function(t){var i,a,s=this,n=s.element[0].children,l=s.options.selectable,o=s._selectedIndices,r=s._dataItems,u=s._values,d=[],c=0,h=0;if(t=t.slice(),!0!==l&&t.length){if("multiple"===l)for(;c<t.length;)if(i=t[c],e(n[i]).hasClass(v)){for(;h<o.length;){if((a=o[h])===i){e(n[a]).removeClass(v).attr(X,!1);var p=this._view[i].item,f=this._dataItemPosition(p,this._values);d.push({position:f,dataItem:p}),r.splice(h,1),o.splice(h,1),t.splice(c,1),u.splice(h,1),c-=1,h-=1;break}h++}c++}else c++}else{for(;c<o.length;c++)e(n[o[c]]).removeClass(v).attr(X,!1),d.push({position:c,dataItem:r[c]});s._values=[],s._dataItems=[],s._selectedIndices=[]}return{indices:t,removed:d}},_deselectFiltered:function(t){for(var i,a,s,n=this.element[0].children,l=[],o=0;o<t.length;o++)a=t[o],i=this._view[a].item,(s=this._dataItemPosition(i,this._values))>-1&&(l.push(this.removeAt(s)),e(n[a]).removeClass(v));return!!l.length&&(this.trigger(_,{added:[],removed:l}),!0)},_select:function(t){var i,a,s=this,n=s.element[0].children,l=s._view,o=[],r=0;for(-1!==ae(t)&&s.focus(t);r<t.length;r++)i=l[a=t[r]],-1!==a&&i&&(i=i.item,s._selectedIndices.push(a),s._dataItems.push(i),s._values.push(s._valueGetter(i)),e(n[a]).addClass(v).attr(X,!0),o.push({dataItem:i}));return o},getElementIndex:function(t){return e(t).data("offset-index")},_get:function(e){return"number"==typeof e?e=[e]:O(e)||(e=[(e=this.getElementIndex(e))!==t?e:-1]),e},_templates:function(){var e,t=this.options,a={template:t.template,groupTemplate:t.groupTemplate,fixedGroupTemplate:t.fixedGroupTemplate};for(var s in t.columns&&t.columns.forEach(((e,t)=>{var s=e.field?e.field.toString():G;a["column"+t]=e.template||(e=>d(i.getter(s)(e)))})),a)(e=a[s])&&"function"!=typeof e&&(a[s]=i.template(e));this.templates=a},_normalizeIndices:function(e){for(var i=[],a=0;a<e.length;a++)e[a]!==t&&i.push(e[a]);return i},_valueIndices:function(e,t){var i,a=this._view,s=0;if(t=t?t.slice():[],!e.length)return[];for(;s<a.length;s++)-1!==(i=this._dataItemPosition(a[s].item,e))&&(t[i]=s);return this._normalizeIndices(t)},_firstVisibleItem:function(){var t=this.element[0],i=this.content[0].scrollTop,a=e(t.children[0]).height(),s=Math.floor(i/a)||0;if(0==t.childElementCount)return null;for(var n=t.children[s]||t.lastChild,l=n.offsetTop<i;n;)if(l){if(n.offsetTop+a>i||!n.nextSibling)break;n=n.nextSibling}else{if(n.offsetTop<=i||!n.previousSibling)break;n=n.previousSibling}return this._view[e(n).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.closest(J).length?this.header.closest(J).show():this.header.show(),this.content.scroll(this._onScroll)):(this.header.closest(J).length?this.header.closest(J).hide():this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e=this.templates.fixedGroupTemplate;if(e){var t=this._firstVisibleItem();t&&t.group.toString().length&&this.header.html(e(t.group))}},_renderItem:function(e){var t=`<li tabindex="-1" role="${this.options.aria&&this.options.aria.itemRole||"option"}" unselectable="on" `,i=e.item,a=0!==e.index,s=e.selected,n=this.isGrouped(),l=this.options.columns&&this.options.columns.length,o=e.index%2==1?" k-table-alt-row":"";return t+=l?'class="k-table-row'+o:'class="k-list-item',a&&e.newGroup&&(t+=" k-first"),e.isLastGroupedItem&&l&&(t+=" k-last"),s&&(t+=" k-selected"),t+='" aria-selected="'+(s?"true":"false")+'" data-offset-index="'+e.index+'">',l?t+=this._renderColumns(i):(t+='<span class="k-list-item-text">',t+=this.templates.template(i),t+="</span>"),a&&e.newGroup?t+=l?'<span class="k-table-td k-table-group-td"><span>'+this.templates.groupTemplate(e.group)+"</span></span>":'<div class="k-list-item-group-label">'+this.templates.groupTemplate(e.group)+"</div>":n&&l&&(t+='<span class="k-table-td k-table-spacer-td"></span>'),t+"</li>"},_renderColumns:function(e){for(var t="",a=0;a<this.options.columns.length;a++){var s=this.options.columns[a].width,l=parseInt(s,10),o="";s&&!isNaN(l)&&(o+=`${i.attr("style-width")}="${l}${n.test(s)?"%":"px"}"`),t+="<span class='k-table-td' "+o+">",t+=this.templates["column"+a](e),t+="</span>"}return t},_render:function(){var t,a,s,n,l,o="",r=0,u=0,d=[],c=this.dataSource.view(),h=this.value(),p=this.isGrouped();if(p)for(r=0;r<c.length;r++)for(s=c[r],n=!0,l=0;l<s.items.length;l++)a={selected:this._selected(s.items[l],h),item:s.items[l],group:s.value,newGroup:n,isLastGroupedItem:l===s.items.length-1,index:u},d[u]=a,u+=1,o+=this._renderItem(a),n=!1;else for(r=0;r<c.length;r++)a={selected:this._selected(c[r],h),item:c[r],index:r},d[r]=a,o+=this._renderItem(a);this._view=d,t=e(o),i.applyStylesFromKendoAttributes(t,["width","background-color"]),this.element.empty().append(t),p&&d.length&&this._renderHeader()},_selected:function(e,t){return(!this.isFiltered()||"multiple"===this.options.selectable)&&-1!==this._dataItemPosition(e,t)},setDSFilter:function(e){this._lastDSFilter=M({},e)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!i.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(e){var t,i=this,a=e&&e.action,s=i.options.skipUpdateOnBind,n="itemchange"===a;i.trigger(L),i._fixedHeader(),i._render(),i.bound(!0),n||"remove"===a?(t=function(e,t){var i,a,s,n,l=t.length,o=e.length,r=[],u=[];if(o)for(s=0;s<o;s++){for(i=e[s],a=!1,n=0;n<l;n++)if(i===t[n]){a=!0,r.push({index:s,item:i});break}a||u.push(i)}return{changed:r,unchanged:u}}(i._dataItems,e.items)).changed.length&&(n?i.trigger(H,{items:t.changed}):i.value(i._getValues(t.unchanged))):i.isFiltered()||i._skipUpdate||i._emptySearch?(i.focus(0),(i._skipUpdate||i._emptySearch&&i._selectedIndices.length)&&(i._skipUpdate=!1,i._selectedIndices=i._valueIndices(i._values,i._selectedIndices))):s||a&&"add"!==a||i.value(i._values),i._valueDeferred&&i._valueDeferred.resolve(),i.trigger(D)},bound:function(e){if(e===t)return this._bound;this._bound=e},isGrouped:function(){return(this.dataSource.group()||[]).length}});function ae(e){return e[e.length-1]}function se(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function ne(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function le(t,i){var a,s=!1;return t.filters&&(a=e.grep(t.filters,(function(e){return s=le(e,i),e.filters?e.filters.length:e.field!=i})),s||t.filters.length===a.length||(s=!0),t.filters=a),s}a.plugin(ie),i.cssProperties.registerPrefix("List","k-list-")}(window.kendo.jQuery);var o=kendo;e.__meta__={id:"list",name:"List",category:"framework",depends:["data","popup","label","icons","actionsheet","dropdowns-loader.chunk"],hidden:!0},e.default=o,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=kendo.list.min.js.map