UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

2 lines 167 kB
module.exports=function(e){function t(o){if(r[o])return r[o].exports;var l=r[o]={exports:{},id:o,loaded:!1};return e[o].call(l.exports,l,l.exports,t),l.loaded=!0,l.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}({0:function(e,t,r){e.exports=r(1273)},3:function(e,t){e.exports=function(){throw Error("define cannot be used indirect")}},1048:function(e,t){e.exports=require("jquery")},1059:function(e,t){e.exports=require("./kendo.data")},1079:function(e,t){e.exports=require("./kendo.selectable")},1094:function(e,t){e.exports=require("./kendo.filtermenu")},1194:function(e,t){e.exports=require("./kendo.resizable")},1195:function(e,t){e.exports=require("./kendo.window")},1246:function(e,t){e.exports=require("./kendo.dialog")},1255:function(e,t){e.exports=require("./kendo.editable")},1258:function(e,t){e.exports=require("./kendo.switch")},1263:function(e,t){e.exports=require("./kendo.pdf")},1273:function(e,t,r){var o,l,a;(function(n){!function(n,define){l=[r(1059),r(1275),r(1255),r(1195),r(1094),r(1276),r(1277),r(1278),r(1079),r(1279),r(1274),r(1194),r(1280),r(1281),r(1282),r(1283),r(1263),r(1246),r(1282),r(1258)],o=n,a="function"==typeof o?o.apply(t,l):o,!(void 0!==a&&(e.exports=a))}(function(){return function(e,t){function r(e,t){return"["+Ue.attr(e)+"="+t+"]"}function o(e){return Array(e+1).join('<td class="k-group-cell">&nbsp;</td>')}function l(e){var t,r=" ";if(e){if(typeof e===xr)return e;for(t in e)""!==e[t]&&(r+=t+'="'+e[t]+'"')}return r}function a(t,r){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",r)}function i(t,r,o,l,a){var n,i=r;for(r=e(),a=a||1,n=0;n<a;n++)r=r.add(t.eq(i+n));"number"==typeof o?r[l?"insertBefore":"insertAfter"](t.eq(o)):r.appendTo(o)}function s(t,r,o){return e(t).add(r).find(o)}function d(e,t,r){var o,l,a,n;for(r=nt(r)?r:[r],o=0,l=r.length;o<l;o++)a=r[o],rt(a)&&a.click&&(n=a.name||a.text,t.on(Cr+Ht,"a.k-grid-"+(n||"").replace(/\s/g,""),{commandName:n},dt(a.click,e)))}function c(e,t,r,o,l){return lt(e,function(e){var a,n;return e=typeof e===xr?{field:e}:e,e.parentIds=l,v(e)&&!r||(e.attributes=de(e.attributes),e.footerAttributes=de(e.footerAttributes),e.headerAttributes=de(e.headerAttributes),a=!0),n=Ue.guid(),o&&!e.locked&&(e.locked=o),e.headerAttributes=ot({headers:l},e.headerAttributes),e.headerAttributes.id?n=e.headerAttributes.id:e.headerAttributes=ot({id:n},e.headerAttributes),e.columns&&(e.columns=c(e.columns,t,a,e.locked,l?l+" "+n:n)),ot({encoded:t,hidden:a,locked:o},e)})}function u(e,t){var r=[];return p(e,t,r),r[r.length-1]}function p(e,t,r){var o,l;for(r=r||[],o=0;o<t.length;o++){if(e===t[o])return!0;if(t[o].columns){if(l=r.length,r.push(t[o]),p(e,t[o].columns,r))return!0;r.splice(l,r.length-l)}}return!1}function h(e,t){f(e,t,t)}function f(e,t,r){var o=r?ue:de;e.hidden=!t,e.attributes=o(e.attributes),e.footerAttributes=o(e.footerAttributes),e.headerAttributes=o(e.headerAttributes)}function g(e,t){m(e);var r=e._hideByMedia;f(e,t,r?e.matchesMedia:t)}function m(e){e.matchesMedia=k(e)}function k(e){return e&&(y(e.media)||!y(e.media)&&Ue.matchesMedia(e.media))}function _(){return"none"!==this.style.display}function b(t){return"none"!==e(t)[0].style.display}function v(e){return C([e]).length>0}function C(e){return at(e,function(e){var t=!e.hidden&&e.matchesMedia!==!1;return t&&e.columns&&(t=C(e.columns).length>0),t})}function w(e){var t,r,o=[];for(r=0;r<e.length;r++){if(t=e[r],!y(t.media)){if(!y(t.minScreenWidth))throw Error("Using 'media' and 'minScreenWidth' options at the same time is not supported.");o.push(t)}t.columns&&(o=o.concat(w(t.columns)))}return o}function y(e){return t===e}function S(t){return e(t).map(function(){return this.toArray()})}function T(e,t,r){var o=R($(t)),l=R(Q(t)),a=e.rowSpan;e.rowSpan=r?o>l?a-(o-l)||1:a+(l-o):o>l?a+(o-l):a-(l-o)||1}function x(t,r,o,l,a,n,i,s){var d,c,u=R(t),p=R([r]);u>p&&(d=Array(i+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>'),c=n.children(":not(.k-filter-row)"),e(Array(u-p+1).join("<tr>"+d+"</tr>")).insertAfter(c.last())),B(n,u-p),I(o,l,a,n,s)}function H(t,r,o){var l,a,n,i,s,d,c,u;for(o=o||0,n=r,r=oe(r),i={},s=t.find(">tr:not(.k-filter-row)"),d=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},c=0,u=r.length;c<u;c++)l=E(r[c],n),i[l.row]||(i[l.row]=s.eq(l.row).find(".k-header").filter(d)),a=i[l.row].eq(l.cell),a.attr(Ue.attr("index"),o+c);return r.length}function R(e){var t,r,o=1,l=0;for(t=0;t<e.length;t++)e[t].columns&&(r=R(e[t].columns),r>l&&(l=r));return o+l}function I(t,r,o,l,a){var n,i,s=D(t[0],r),d=o.find(">tr:not(.k-filter-row):eq("+s.row+")>th.k-header"),c=e(),u=s.cell;for(n=0;n<t.length;n++)c=c.add(d.eq(u+n));for(l.find(">tr:not(.k-filter-row)").eq(s.row)[a](c),i=[],n=0;n<t.length;n++)t[n].columns&&(i=i.concat(t[n].columns));i.length&&I(i,r,o,l,a)}function E(e,t,r,o){var l,a;for(r=r||0,o=o||{},o[r]=o[r]||0,a=0;a<t.length;a++){if(t[a]==e){l={cell:o[r],row:r};break}if(t[a].columns&&(l=E(e,t[a].columns,r+1,o)))break;o[r]++}return l}function z(e,t,r,o){var l,a,n=!!r.locked;do l=e[t],t+=o?1:-1,a=!!l.locked;while(l&&t>-1&&t<e.length&&l!=r&&!l.columns&&a===n);return l}function A(e,t,r,o,l){var a,n,i,s,d;return t.columns?(t=t.columns,t[o?0:t.length-1]):(a=u(t,e),n=a?a.columns:e,i=it(t,n),0===i&&o?i++:i==n.length-1&&!o||!r.locked&&!t.columns&&!o?i--:(i>0||0===i&&!o)&&i++,s=it(r,n),t=z(n,i,r,s>i),d=it(t,l),(!t.columns||d&&d!==n.length-1)&&t&&t!=r&&t.columns?A(e,t,r,o,l):null)}function D(e,t,r,o){var l,a;for(r=r||0,o=o||{},o[r]=o[r]||0,a=0;a<t.length;a++){if(t[a]==e){l={cell:o[r],row:r};break}if(t[a].columns&&(l=D(e,t[a].columns,r+1,o)))break;t[a].hidden||o[r]++}return l}function L(e){var t=M($(e));return t.concat(M(Q(e)))}function F(e,t,r,o){var l=e[r],a=e[o],n=u(l,t);return t=n?n.columns:t,it(a,t)}function M(e){var t,r=[],o=[];for(t=0;t<e.length;t++)r.push(e[t]),e[t].columns&&(o=o.concat(e[t].columns));return o.length&&(r=r.concat(M(o))),r}function q(e){var t,r,o=0;for(r=0;r<e.length;r++)t=e[r],t.columns?o+=q(t.columns):t.hidden&&o++;return o}function P(e){var t,r,o=0;for(t=0,r=e.length;t<r;t++)e[t].hidden||(o+=parseInt(e[t].width,10));return o}function W(e){var t,r,o,l=0;for(r=0,o=e.length;r<o;r++)t=e[r].style.width,t&&t.indexOf("%")==-1&&(l+=parseInt(t,10));return l}function V(e,t){var r,o,l=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(o=0;o<l.length;o++)r=l[o].rowSpan,r>1&&(l[o].rowSpan=r-t||1)}function B(e,t){var r,o=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(r=0;r<o.length;r++)o[r].rowSpan+=t}function O(t){var r,o=t.find("tr:not(.k-filter-row)"),l=o.filter(function(){return!e(this).children().length}).remove().length,a=o.find("th:not(.k-group-cell,.k-hierarchy-cell)");for(r=0;r<a.length;r++)a[r].rowSpan>1&&(a[r].rowSpan-=l);return o.length-l}function G(e,t,r,o,l){var a,n,i,s=[];for(a=0,i=e.length;a<i;a++)n=r[o]||[],n.push(t.eq(l+a)),r[o]=n,e[a].columns&&(s=s.concat(e[a].columns));s.length&&G(s,t,r,o+1,l+e.length)}function N(e,t,r){e.css({left:t,right:r})}function K(e,t,r){e[t]=e[t]||{},e[t][r]=e[t][r]||""}function U(e,t,r,o){K(e,t,r),""!==e[t][r]?e[t][r]+=" "+o:e[t][r]=o}function j(e,t,r,o){K(e,t,r),e[t][r]=e[t][r].replace(o,"")}function $(e){return at(e,function(e){return e.locked})}function Q(e){return at(e,function(e){return!e.locked})}function J(e){return at(e,function(e){return e.sticky&&!e.locked})}function Y(e){return at(e,function(e){return e.sticky&&!e.locked&&v(e)})}function X(e){return at(e,function(e){return!e.locked&&v(e)})}function Z(e){return at(e,function(e){return e.locked&&v(e)})}function ee(e){var t,r=[];for(t=0;t<e.length;t++)e[t].hidden||(e[t].columns?r=r.concat(ee(e[t].columns)):r.push(e[t]));return r}function te(e){var t,r=[];for(t=0;t<e.length;t++)e[t].columns&&(r=r.concat(e[t].columns));return r}function re(e){var t=te(e);return t=t.filter(function(e){return!e.hidden})}function oe(e){var t,r=[];for(t=0;t<e.length;t++)e[t].columns?r=r.concat(oe(e[t].columns)):r.push(e[t]);return r}function le(e){var t,r=[];for(e=oe(e),t=0;t<e.length;t++)"string"==typeof e[t]?r.push(e[t]):e[t].field&&r.push(e[t].field);return r}function ae(r){var o,l=r.find(">tr:not(.k-filter-row)"),a=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},n=e();return l.length>1&&(n=l.find("th").filter(a).filter(function(){return this.rowSpan>1})),n=n.add(l.last().find("th").filter(a)),o=Ue.attr("index"),n.sort(function(r,l){var a,n;return r=e(r),l=e(l),a=r.attr(o),n=l.attr(o),a===t&&(a=e(r).index()),n===t&&(n=e(l).index()),a=parseInt(a,10),n=parseInt(n,10),a>n?1:a<n?-1:0}),n}function ne(t){var r,o,l,a,n,i,s,d=t.closest("table"),c=e().add(t),u=t.closest("tr"),p=d.find("tr:not(.k-filter-row)"),h=p.index(u);if(h>0){for(r=p.eq(h-1),o=r.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!e(this).attr("rowspan")}),l=0,a=u.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t),n=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),i=0;i<n.length;i++)l+=n[i].colSpan||1;for(a+=Math.max(l-1,0),l=0,i=0;i<o.length;i++)if(s=o.eq(i),l+=s.attr("data-colspan")?s[0].getAttribute("data-colspan"):1,a>=i&&a<l){c=ne(s).add(c);break}}return c}function ie(t){var r,o,l,a,n,i,s,d=t.closest("thead"),c=e().add(t),u=t.closest("tr"),p=d.find("tr:not(.k-filter-row)"),h=p.index(u)+t[0].rowSpan,f=Ue.attr("colspan");if(h<=p.length-1){for(r=u.next(),o=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),o=o.filter(function(){return!this.rowSpan||1===this.rowSpan}),a=0,l=0;l<o.length;l++)a+=parseInt(o.eq(l).attr(f),10)||1;for(n=r.find("th:not(.k-group-cell,.k-hierarchy-cell)"),i=parseInt(t.attr(f),10)||1,l=0;l<i;)r=n.eq(l+a),c=c.add(ie(r)),s=parseInt(r.attr(f),10),s>1&&(i-=s-1),l++}return c}function se(t,r,o,l){var a,n=t;return l&&t.empty(),Je?t[0].innerHTML=o:(a=document.createElement("div"),a.innerHTML="<table><tbody>"+o+"</tbody></table>",t=a.firstChild.firstChild,r[0].replaceChild(t,n[0]),t=e(t)),t}function de(e){e=e||{};var t=e.style;return t?(t=t.replace(/display:[^;]*/i,"display:none"),t.match(/display:/i)||(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",ot({},e,{style:t})}function ce(e){e=e||{};var t=e.style||"";return t.indexOf("display:none")!==-1}function ue(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function pe(t,r,o,l){var a,n=t.find(">colgroup"),i=lt(r,function(e){return a=e.width,a&&0!==parseInt(a,10)?Ue.format('<col style="width:{0}"/>',typeof a===xr?a:a+"px"):"<col />"});(o||n.find(".k-hierarchy-col").length)&&i.splice(0,0,'<col class="k-hierarchy-col" />'),n.length&&n.remove(),n=e(Array(l+1).join('<col class="k-group-col">')+i.join("")),n.is("colgroup")||(n=e("<colgroup/>").append(n)),t.prepend(n)}function he(e,t){var r,o,l=0,a=e.find("th:not(.k-group-cell)");for(r=0,o=t.length;r<o;r++)t[r].locked&&(a.eq(r).insertBefore(a.eq(l)),a=e.find("th:not(.k-group-cell)"),l++)}function fe(e){var t,r,o,l={};for(r=0,o=e.length;r<o;r++)t=e[r],l[t.value]=t.text;return l}function ge(e,t,r,o){var l=r&&r.length&&rt(r[0])&&"value"in r[0],a=l?fe(r)[e]:e;return a=null!=a?a:"",t?Ue.format(t,a):o===!1?a:Ue.htmlEncode(a)}function me(e,t,r){for(var o,l=0,a=e[l];a;){if(o=!!r||"none"!==a.style.display,o&&!Jr.test(a.className)&&--t<0){a.style.display=r?"":"none";break}a=e[++l]}}function ke(t,r){for(var o,l,a=0,n=t.length;a<n;a+=1)l=t.eq(a),l.is(".k-grouping-row,.k-detail-row")?(o=l.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)-1)):(l.hasClass("k-grid-edit-row")&&(o=l.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)-1),o.find("col").eq(r).remove(),l=o.find("tr:first")),me(l[0].cells,r,!1))}function _e(e){var t,r,o=[];for(r=0;r<e.length&&(t=e[r],"field"in t&&"value"in t&&"items"in t);r++)o.push(t),t.hasSubgroups&&(o=o.concat(_e(t.items)));return o}function be(e){var t,r,o=[];for(r=0;r<e.length&&(t=e[r],"field"in t&&"value"in t&&"items"in t);r++)t.hasSubgroups&&(o=o.concat(be(t.items))),o.push(t.aggregates);return o}function ve(t,r){for(var o,l,a,n=0,i=t.length;n<i;n+=1)l=t.eq(n),l.is(".k-grouping-row,.k-detail-row")?(o=l.children(":not(.k-group-cell):first,.k-detail-cell").last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+1)):(l.hasClass("k-grid-edit-row")&&(o=l.children(".k-edit-container")[0])&&(o=e(o),o.attr("colspan",parseInt(o.attr("colspan"),10)+1),pe(o.find(">form>table"),C(a),!1,0),l=o.find("tr:first")),me(l[0].cells,r,!0))}function Ce(e,t,r){r=r||1;var o,l,a;for(l=0,a=e.length;l<a;l++)o=e.eq(l).children().last(),o.attr("colspan",parseInt(o.attr("colspan"),10)+r),o=t.eq(l).children().last(),o.attr("colspan",parseInt(o.attr("colspan"),10)-r)}function we(e){var t,r,o=0,l=e.find(">colgroup>col");for(t=0,r=l.length;t<r;t+=1)o+=parseInt(l[t].style.width,10);return o}function ye(e,t){var r,o,l,a;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(r=e.offsetHeight,o=t.offsetHeight,r>o?(l=t.rows[t.rows.length-1],Yr.test(l.className)&&(l=t.rows[t.rows.length-2]),a=r-o):(l=e.rows[e.rows.length-1],Yr.test(l.className)&&(l=e.rows[e.rows.length-2]),a=o-r),l.style.height=l.offsetHeight+a+"px")}function Se(e,t){var r,o=e.offsetHeight,l=t.offsetHeight;o>l?r=o+"px":o<l&&(r=l+"px"),r&&(e.style.height=t.style.height=r)}function Te(e,t){var r,o,l;if(typeof e===xr&&e===t)return e;if(rt(e)&&e.name===t)return e;if(nt(e))for(r=0,o=e.length;r<o;r++)if(l=e[r],typeof l===xr&&l===t||l.name===t)return l;return null}function xe(t,r){if(r===!0){t=e(t);var o=Ue.scrollLeft(t.parent());Ue.focusElement(t),Ue.scrollLeft(t.parent(),o)}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function He(e,r){return e.options.groupable&&(r.groupable||r.groupable===t)}function Re(t,r){return!!e.grep(t,function(e){return e.field===r}).length}function Ie(e,t){return!(!e.field||e.selectable)&&(!(t.editable&&!t.editable(e.field))&&!(e.editable&&!e.editable(t)))}function Ee(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function ze(r){var o=e(r.currentTarget),l=o.is("th"),a=this.table.add(this.lockedTable),n=this.thead.parent().add(e(">table",this.lockedHeader)),i=Ee(r.target),s=e(r.target).is(".k-checkbox"),d=e(r.target),c=o.closest("table")[0];return i&&o.find(Ue.roleSelector("filtercell")).length?(this._setCurrent(o),t):(c!==a[0]&&c!==a[1]&&c!==n[0]&&c!==n[1]||d.is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(o,!1,s),!l&&i||setTimeout(function(){e(Ue._activeElement()).hasClass("k-widget")||!e(Ue._activeElement()).is(rr)&&Ee(Ue._activeElement())&&e.contains(c,Ue._activeElement())||xe(c,!0)}),l&&!Ue.support.touch&&r.preventDefault()),t)}function Ae(e,t){if(!t)return 0;var r=0;return Ue.support.browser.webkit&&(r=e.width()),r}function De(e){var r;return"string"==typeof e?(r=e.toLowerCase(),"true"===r?{rows:!0}:{rows:r.indexOf("rows")>-1,columns:r.indexOf("columns")>-1}):e===!0?{rows:!0}:t}function Le(t,r){var o,l;return!!t&&(r=e(r),!!(r[0]&&pt(t[0],r[0])&&(o=r.offset().top-t.offset().top,l=r.outerHeight()/2,(o>=0||ht.abs(o)<=l)&&ht.floor(o+l)<=t.height())))}function Fe(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function Me(e){return'<td colspan="#=data.colspan +'+e+'#"><p class="k-reset"><a class="k-icon k-i-collapse" href="\\#" tabindex="-1" '+Ur+'="'+Nr+'"></a>#=data.text#</p></td>'}function qe(e){return'<td colspan="'+e+'"><p class="k-reset">&nbsp;</p></td>'}function Pe(e,t,r,l,a,n){return'<tr role="row"'+(n?'data-group-uid="'+a+'"':"")+'class="k-grouping-row">'+o(t)+'<td colspan="'+e+'" aria-expanded="'+!!l+'"><p class="k-reset"><a class="k-icon '+(l?"k-i-collapse":"k-i-expand")+'" href="#" tabindex="-1" '+Ur+'="'+(l?Nr:Kr)+'"></a>'+r+"</p></td></tr>"}function We(e){return'<tr role="row" class="k-grouping-row"><td colspan="'+e+'" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'}function Ve(t,r){t=e(t)[0],t.style.display=r?"":"none"}function Be(e,t){var r=/&/g,o=/</g,l=/"/g,a=/'/g,n=/>/g;return(""+e).replace(r,"&amp;").replace(o,"&lt;").replace(n,"&gt;").replace(l,function(e){return t?"\\"+e:"&quot;"}).replace(a,"&#39;")}var Oe,Ge,Ne,Ke,Ue=window.kendo,je=Ue.ui,$e=Ue.data.DataSource,Qe=Ue.data.ObservableObject,Je=Ue.support.tbodyInnerHtml,Ye=Ue._activeElement,Xe=je.Widget,Ze=Ue._outerWidth,et=Ue._outerHeight,tt=Ue.keys,rt=e.isPlainObject,ot=e.extend,lt=e.map,at=e.grep,nt=e.isArray,it=e.inArray,st=Array.prototype.push,dt=e.proxy,ct=Ue.isFunction,ut=e.isEmptyObject,pt=e.contains,ht=Math,ft=".",gt="progress",mt="error",kt="k-hierarchy-cell",_t=":not(.k-group-cell):not(["+Ue.attr("virtual")+"]):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",bt="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",vt="tr:not(.k-footer-template):visible",Ct=":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",wt="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",yt=wt+":first",St=wt+":last",Tt=vt+":first>"+Ct+":first",xt="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",Ht=".kendoGrid",Rt="k-grid-content-locked",It="k-group-cell",Et="edit",zt="beforeEdit",At="save",Dt="remove",Lt="detailInit",Ft="filterMenuInit",Mt="columnMenuInit",qt="filterMenuOpen",Pt="columnMenuOpen",Wt="cellClose",Vt="change",Bt="columnHide",Ot="columnShow",Gt="saveChanges",Nt="dataBound",Kt="detailExpand",Ut="detailCollapse",jt="itemchange",$t="page",Qt="paging",Jt="scroll",Yt="sync",Xt="k-state-focused",Zt=":kendoFocusable",er="k-state-selected",tr="k-checkbox",rr="input[data-role='checkbox']."+tr,or="k-grid-norecords",lr="k-link",ar="k-icon",nr="k-sort-order",ir="k-header-column-menu",sr="k-grid-filter",dr="k-grid-content-sticky",cr="k-grid-header-sticky",ur="k-grid-footer-sticky",pr="k-grid-no-left-border",hr="resize",fr="columnResize",gr="columnReorder",mr="columnLock",kr="columnUnlock",_r="columnStick",br="columnUnstick",vr="navigate",Cr="click",wr="mousedown",yr="height",Sr="tabIndex",Tr="function",xr="string",Hr="bottom",Rr="container-for",Ir="field",Er="input",zr="incell",Ar="inline",Dr="uid",Lr=1,Fr="colSpan",Mr="overflow",qr="hidden",Pr="sort",Wr="group-sort",Vr="Are you sure you want to delete this record?",Br="No records available.",Or="Delete",Gr="Cancel",Nr="Collapse",Kr="Expand",Ur="aria-label",jr=/(\}|\#)/gi,$r=/#/gi,Qr="[\\x20\\t\\r\\n\\f]",Jr=RegExp("(^|"+Qr+")(k-group-cell|k-hierarchy-cell)("+Qr+"|$)"),Yr=RegExp("(^|"+Qr+")(k-filter-row)("+Qr+"|$)"),Xr='# if (iconClass) {#<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass#"></span>#=text#</a># } else { #<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#">#=text#</a># } #',Zr='<input class="'+tr+'" data-role="checkbox" aria-label="Select row" aria-checked="false" type="checkbox">',eo='<input class="'+tr+'" data-role="checkbox" aria-label="Select all rows" aria-checked="false" type="checkbox">',to=!1,ro=Ue.support.browser,oo=ro.msie&&11===ro.version,lo=/Mac OS/.test(navigator.userAgent),ao={content:"k-content",widget:"k-widget",scrollContainer:"k-scroll-container"};je.Pager&&(Oe=je.Pager.extend({init:function(e,t){je.Pager.fn.init.call(this,e,ot(!0,{},t)),this.dataSource.options.useRanges=!0,this.dataSource._omitPrefetch=!0},options:{name:"GroupsPager"},totalPages:function(){var e=this;return Math.ceil((e._collapsedTotal()||0)/(e.pageSize()||1))},_collapsedTotal:function(){var e=this.dataSource;return e?e.groupsTotal(!0)||0:0}})),Ge=Xe.extend({init:function(e,t){var r=this;Xe.fn.init.call(r,e,t),r._refreshHandler=dt(r.refresh,r),r.setDataSource(t.dataSource),r.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(Vt,t._refreshHandler),t.dataSource=e,t.dataSource.bind(Vt,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[Qt,$t,Jt],destroy:function(){var e=this;Xe.fn.destroy.call(e),e.dataSource.unbind(Vt,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(Ht),clearTimeout(e._timeout),e._scrollingTimeout&&clearTimeout(e._scrollingTimeout),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,r=this,o=Ue.support.scrollbar()+1,l=r.element;l.css({width:"auto",overflow:"hidden"}).css(to?"padding-left":"padding-right",o),r.content=l.children().first(),t=r.wrapper=r.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll"+Ht+" mousewheel"+Ht,dt(r._wheelScroll,r)),r._wrapper(),(Ue.support.kineticScrollNeeded||Ue.support.touch)&&(r.wrapper.css("touch-action","none"),r.drag=new Ue.UserEvents(r.wrapper,{global:!0,allowSelection:!0,start:function(e){e.sender.capture()},move:function(e){r.verticalScrollbar.scrollTop(r.verticalScrollbar.scrollTop()-e.y.delta),Ue.scrollLeft(t,Ue.scrollLeft(t)-e.x.delta),e.preventDefault()}})),r.verticalScrollbar=e('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:o}).appendTo(l).bind("scroll"+Ht,dt(r._scroll,r))},_wrapper:function(){var e=this;oo&&(e.wrapper.css({"overflow-y":Jt}),e.element.css(to?"padding-left":"padding-right",0))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,r=t.scrollTop(),o=Ue.wheelDeltaY(e);!o||o>0&&0===r||o<0&&r+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(r+-o))}},_scroll:function(e){var r=this,o=!r.options.prefetch,l=e.currentTarget.scrollTop,a=r.dataSource,n=r.itemHeight,i=a.skip()||0,s=r._rangeStart||i,d=r.element.innerHeight(),c=!!(r._scrollbarTop&&r._scrollbarTop>l),u=ht.max(ht.floor(l/n),0),p=c?ht.ceil(d/n):ht.floor(d/n),h=ht.max(u+p,0);return r._preventScroll?(r._preventScroll=!1,t):(r._prevScrollTop=r._scrollTop,r._scrollTop=l-s*n,r._scrollbarTop=l,r._scrolling=o,r._fetch(u,h,c)||(r.wrapper[0].scrollTop=r._scrollTop),r.trigger(Jt),o&&(r._scrollingTimeout&&clearTimeout(r._scrollingTimeout),r._scrollingTimeout=setTimeout(function(){r._scrolling=!1,r._page(r._rangeStart,r.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,r=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?(!e._wrapperScrolled&&r||e._isScrolledToBottom())&&(t.scrollTop(r+Ue.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(r-Ue.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,r=t.verticalScrollbar;r.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),r.scrollTop(e),t._scrollbarTop=r.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},position:function(e){var t,r=this._rangeStart||this.dataSource.skip()||0,o=this.dataSource.pageSize();return t=e>r?e-r:r-e-1,t>o?o:t},scrollIntoView:function(e){var t=this.wrapper[0],r=t.clientHeight,o=this._isScrolledToBottom()?t.scrollTop:this._scrollTop||t.scrollTop,l=e[0].offsetTop,a=e[0].offsetHeight;o>l?this.verticalScrollbar[0].scrollTop-=r/2:l+a>=o+r&&(this.verticalScrollbar[0].scrollTop+=r/2)},_fetch:function(t,r,o){var l=this,a=l.dataSource,n=l.itemHeight,i=a.take(),s=l._rangeStart||a.skip()||0,d=ht.floor(t/i)*i,c=!1,u=.33,p=l.verticalScrollbar,h=ro.webkit?1:0,f=a._isGroupPaged()?a.groupsTotal(!0):a.total();return t<s?(c=!0,s=ht.max(0,r-i),l._scrollTop=p.scrollTop()-s*n,l._page(s,i)):r>=s+i&&!o?(c=!0,s=ht.min(t,f-i),l._scrollTop=p.scrollTop()>=p[0].scrollHeight-p[0].offsetHeight-h?l.wrapper[0].scrollHeight-l.wrapper[0].offsetHeight:l.dataSource._isGroupPaged()&&t>=f-i?l.wrapper[0].scrollHeight-l.wrapper[0].offsetHeight-(l._scrollTop-l._prevScrollTop):n,l._page(s,i)):!l._fetching&&l.options.prefetch&&(t<d+i-i*u&&t>i&&a.prefetch(d-i,i,e.noop),r>d+i*u&&a.prefetch(d+i,i,e.noop)),c},fetching:function(){return this._fetching},_page:function(t,r,o){var l=this,a=!l.options.prefetch,n=l.dataSource,i=n._isGroupPaged();o=ct(o)?o:e.noop,l.trigger(Qt,{skip:t,take:r})||(clearTimeout(l._timeout),l._fetching=!0,l._rangeStart=t,i&&n._groupRangeExists(t,t+r)||!i&&n.inRange(t,r)?(Ue.ui.progress(e(l.wrapper).parent(),!0),n.range(t,r,function(){Ue.ui.progress(e(l.wrapper).parent(),!1),o(),l.trigger($t)},"page")):(a||Ue.ui.progress(l.wrapper.parent(),!0),l._timeout=setTimeout(function(){l._scrolling||(a&&Ue.ui.progress(l.wrapper.parent(),!0),n.range(t,r,function(){Ue.ui.progress(l.wrapper.parent(),!1),o(),l.trigger($t)}))},100)))},repaintScrollbar:function(e){var r,o=this,l="",a=o.options.maxScrollHeight,n=o.dataSource,i=Ue.support.kineticScrollNeeded?0:Ue.support.scrollbar(),s=o.wrapper[0],d=o._isScrolledToBottom(),c=o.itemHeight=o.options.itemHeight()||0,u=s.scrollWidth>s.offsetWidth?i:0,p=(n._isGroupPaged()?n.groupsTotal(!0):n.total())*c+u;for(r=0;r<ht.floor(p/a);r++)l+='<div style="width:1px;height:'+a+'px"></div>';p%a&&(l+='<div style="width:1px;height:'+p%a+'px"></div>'),o.verticalScrollbar.html(l),!d||o._isScrolledToBottom()||o.dataSource._isGroupPaged()||o.scrollToBottom(),t!==o._scrollTop&&e&&(s.scrollTop=o._scrollTop,o._scrollWrapperOnColumnResize())},refresh:function(e){var r=this,o=r.dataSource,l=r._rangeStart,a=(e||{}).action,n=r._isScrolledToBottom()||!a||a!==jt&&a!==Dt&&a!==Yt;Ue.ui.progress(r.wrapper.parent(),!1),clearTimeout(r._timeout),r.repaintScrollbar(n),r.drag&&r.drag.cancel(),t===l||r._fetching||((!a||a!==Yt&&a!==jt&&"expandGroup"!==a)&&(r._rangeStart=o.skip()),1!==o.page()||a&&(a===Yt||a===jt||"expandGroup"===a||"collapseGroup"===a)||(r.verticalScrollbar[0].scrollTop=0)),r._fetching=!1}}),Ne={create:{text:"Add new record",className:"k-grid-add",iconClass:"k-icon k-i-plus"},cancel:{text:"Cancel changes",className:"k-grid-cancel-changes",iconClass:"k-icon k-i-cancel"},save:{text:"Save changes",className:"k-grid-save-changes",iconClass:"k-icon k-i-check"},destroy:{text:"Delete",className:"k-grid-delete",iconClass:"k-icon k-i-close"},edit:{text:"Edit",className:"k-grid-edit",iconClass:"k-icon k-i-edit"},update:{text:"Update",className:"k-primary k-grid-update",iconClass:"k-icon k-i-check"},canceledit:{text:"Cancel",className:"k-grid-cancel",iconClass:"k-icon k-i-cancel"},excel:{text:"Export to Excel",className:"k-grid-excel",iconClass:"k-icon k-i-file-excel"},pdf:{text:"Export to PDF",className:"k-grid-pdf",iconClass:"k-icon k-i-file-pdf"},search:{text:"Search...",className:"k-grid-search"}},Ke=Ue.ui.DataBoundWidget.extend({init:function(t,r,o){var l=this;r=nt(r)?{dataSource:r}:r,Xe.fn.init.call(l,t,r),o&&(l._events=o),to=Ue.support.isRtl(t),l._element(),l._aria(),l._columns(e.extend(!0,[],l.options.columns)),l._foreignKeyPromises?e.when.apply(null,l._foreignKeyPromises).then(function(){l._foreignKeyPromises=null,l._continueInit()}):l._continueInit()},_continueInit:function(){var t=this;t._dataSource(),t._stickyColumns(),t._tbody(),t._thead(),t._groupable(),t._toolbar(),t._pageable(),t._setContentHeight(),t._templates(),t._navigatable(),t._selectable(),t._clipboard(),t._details(),t._editable(),t._attachCustomCommandsEvent(),t._adaptiveColumns(),t._minScreenSupport(),t.options.autoBind?t.dataSource.fetch():(t._group=t._groups()>0,t._footer()),t.lockedContent&&(t.wrapper.addClass("k-grid-lockedcolumns"),t._resizeHandler=function(){t.resize()},e(window).on("resize"+Ht,t._resizeHandler)),Ue.notify(t)},events:[Vt,"dataBinding","cancel",Nt,Kt,Ut,Lt,Ft,qt,Mt,Pt,Et,zt,At,Dt,Gt,Wt,fr,gr,Ot,Bt,mr,kr,_r,br,vr,"page","sort","filter","group","groupExpand","groupCollapse","kendoKeydown"],setDataSource:function(e){var t,r=this,o=r.options.scrollable;r.options.dataSource=e,r._dataSource(),r._pageable(),r._thead(),o&&(o.virtual?(t=r.content.find(">.k-virtual-scrollable-wrap"),Ue.scrollLeft(t,Ae(t,to))):(t=r.tbody,Ue.scrollLeft(r.content,Ae(t,to)))),r.options.groupable&&r._groupable(),r.virtualScrollable&&r.virtualScrollable.setDataSource(r.options.dataSource),r.options.navigatable&&r._navigatable(),r.options.selectable&&r._selectable(),r.options.autoBind?r.dataSource.fetch():r._footer()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,encodeTitles:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",search:!1,noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:Gr,confirmation:Vr,confirmDelete:Or},commands:{create:Ne.create.text,cancel:Ne.cancel.text,save:Ne.save.text,destroy:Ne.destroy.text,edit:Ne.edit.text,update:Ne.update.text,canceledit:Ne.canceledit.text,excel:Ne.excel.text,pdf:Ne.pdf.text,search:Ne.search.text},noRecords:Br,expandCollapseColumnHeader:"",groupHeader:"Press ctrl + space to group",ungroupHeader:"Press ctrl + space to ungroup"},width:null},destroy:function(){var t,r=this;r._angularItems("cleanup"),r._destroyColumnAttachments(),Xe.fn.destroy.call(r),this._navigatableTables&&(this._navigatableTables.off(Ht),this._navigatableTables=null),r._resizeHandler&&e(window).off("resize"+Ht,r._resizeHandler),r.pager&&r.pager.element&&r.pager.destroy(),r.timer&&clearTimeout(r.timer),r._progressTimeOut&&clearTimeout(r._progressTimeOut),r._collapseGroupsTimeOut&&clearTimeout(r._collapseGroupsTimeOut),r._endlessFetchTimeOut&&clearTimeout(r._endlessFetchTimeOut),r.pager=null,r._destroyGroupable(),r.options.reorderable&&r.wrapper.data("kendoReorderable").destroy(),r.selectable&&r.selectable.element&&(r.selectable.destroy(),r.clearArea(),r._selectedIds=null,r.copyHandler&&(r.wrapper.off("keydown",r.copyHandler),r.unbind(r.copyHandler)),r.updateClipBoardState&&(r.unbind(r.updateClipBoardState),r.updateClipBoardState=null),r.clearAreaHandler&&r.wrapper.off("keyup",r.clearAreaHandler)),r.selectable=null,r.resizable&&(r.resizable.destroy(),r._resizeUserEvents&&(r._resizeHandleDocumentClickHandler&&e(document).off("click",r._resizeHandleDocumentClickHandler),r._resizeUserEvents.destroy(),r._resizeUserEvents=null),r.resizable=null),r._destroyVirtualScrollable(),r.editableUserEvents&&(r.editableUserEvents.destroy(),r.editableUserEvents=null),r._lockedContentUserEvents&&(r._lockedContentUserEvents.destroy(),r._lockedContentUserEvents=null),r._destroyEditable(),r.dataSource&&(r.dataSource.unbind(Vt,r._refreshHandler).unbind(gt,r._progressHandler).unbind(mt,r._errorHandler).unbind(Pr,r._clearSortClasses),r._refreshHandler=r._progressHandler=r._errorHandler=r._clearSortClasses=null),t=r.element.add(r.wrapper).add(r.table).add(r.thead).add(r.wrapper.find(">.k-grid-toolbar")),r.content&&(t=t.add(r.content).add(r.content.find(">.k-virtual-scrollable-wrap"))),r.lockedHeader&&r._removeLockedContainers(),r.pane&&r.pane.destroy(),r._isMobile&&(r.wrapper.off("transitionend"+Ht),r.wrapper.off("contextmenu"+Ht)),r.minScreenResizeHandler&&e(window).off("resize",r.minScreenResizeHandler),r._detachColumnMediaResizeHandler(),r._draggableInstance&&r._draggableInstance.element&&r._draggableInstance.destroy(),r._draggableInstance=null,t.off(Ht),Ue.destroy(r.wrapper),r.rowTemplate=r.altRowTemplate=r.lockedRowTemplate=r.lockedAltRowTemplate=r.detailTemplate=r.footerTemplate=r.groupFooterTemplate=r.lockedGroupFooterTemplate=r.noRecordsTemplate=null, r.scrollables=r.thead=r.tbody=r.element=r.table=r.content=r.footer=r.wrapper=r.lockedTable=r.lockedContent=r.lockedHeader=r.lockedFooter=r._groupableClickHandler=r._groupRows=r._setContentWidthHandler=null},getOptions:function(){var r,o,l,a=this.options;return a.dataSource=null,r=ot(!0,{},this.options),r.columns=Ue.deepExtend([],this.columns),o=this.dataSource,l=o.options.data&&o._data,o.options.data=null,r.dataSource=e.extend(!0,{},o.options),o.options.data=l,r.dataSource.data=l,r.dataSource.page=o.page(),r.dataSource.filter=e.extend(!0,{},o.filter()),r.dataSource.pageSize=o.pageSize(),r.dataSource.sort=o.sort(),r.dataSource.group=o.group(),r.dataSource.aggregate=o.aggregate(),r.dataSource.transport&&(r.dataSource.transport.dataSource=null),r.pageable&&r.pageable.pageSize&&(r.pageable.pageSize=o.pageSize()),r.$angular=t,r},setOptions:function(e){var t,r,o,l,a=this.getOptions();Ue.deepExtend(a,e),e.dataSource?e.dataSource.filter&&(a.dataSource.filter=e.dataSource.filter):a.dataSource=this.dataSource,t=this.wrapper,r=this._events,o=this.element,this.destroy(),this.options=null,this._isMobile&&(l=t.closest(Ue.roleSelector("pane")).parent(),l.after(t),l.remove(),t.removeClass("k-grid-mobile")),t[0]!==o[0]&&(t.before(o),t.remove()),o.empty(),this.init(o,a,r),this._setEvents(a)},items:function(){return this.lockedContent?this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))):this._items(this.tbody)},_items:function(t,r){return t.children().filter(function(){var t=e(this);return!(t.hasClass(r?"k-detail-row":"k-grouping-row")||t.hasClass("k-detail-row")||t.hasClass("k-group-footer"))})},dataItems:function(){var e,t,r,o=Ue.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(e=o.length,t=Array(2*e),r=e;--r>=0;)t[r]=t[r+e]=o[r];o=t}return o},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead&&(this.angular("cleanup",function(){return{elements:t.thead.get()}}),t.thead.add(t.lockedHeader).find("th").each(function(){var t=e(this),r=t.data("kendoFilterMenu"),o=t.data("kendoColumnSorter"),l=t.data("kendoColumnMenu");r&&r.destroy(),o&&o.destroy(),l&&l.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,r,o=this,l=oe(o.columns||[]);for(t=0,r=l.length;t<r;t++)e=l[t].command,e&&d(o,o.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,r=t.element;r.is("table")||(r=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),r.length||(r=e("<table />").appendTo(t.element))),t.table=r.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,r){var o,l,a,n,i,s,d,c,u,p,h=this,f=h.options.columnResizeHandleWidth,g=h.options.scrollable,m=h.resizeHandle,k=3*f/2,_=0;m&&h.lockedContent&&m.data("th")[0]!==r[0]&&(m.off(Ht).remove(),m=null),m||(m=h.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'),t.append(m)),c=Ue.scrollLeft(t),to&&(ro.mozilla||ro.webkit&&ro.version>=85)&&(c*=-1),d=parseFloat(t.css("borderLeftWidth")),u=r.offset().left+c-parseFloat(r.css("marginLeft"))-(t.offset().left+d),to?g&&(_=u<=c?k:0,o=r.closest(".k-grid-header-wrap, .k-grid-header-locked"),s=o[0].scrollWidth-o[0].offsetWidth,i=parseFloat(o.css("marginLeft")),l=ro.msie?2*Ue.scrollLeft(o)+d-i-_:0,a=-_,n=ro.mozilla?d-i-_:0,u-=a+n+l):u+=r[0].offsetWidth,p=r.offset().top-parseFloat(r.css("marginTop"))-(t.offset().top+parseFloat(t.css("borderTopWidth"))),m.css({top:p,left:u-k,height:et(r),width:3*f-_}).data("th",r).show(),m.off("dblclick"+Ht).on("dblclick"+Ht,function(){h._autoFitLeafColumn(parseInt(r.attr(Ue.attr("index")),10))})},_positionColumnResizeHandle:function(){var r=this,o=r.lockedHeader?r.lockedHeader.find("thead:first"):e();r.thead.add(o).on("mousemove"+Ht,"tr:not(.k-filter-row) > th",function(o){var l=t!==o.buttons?o.buttons:o.which||o.button,a=e(this);a.hasClass("k-group-cell")||a.hasClass("k-hierarchy-cell")||t!==l&&0!==l||a[0].hasAttribute(Ue.attr(Fr))||r._createResizeHandle(a.closest("div"),a)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._resetResizeHandleHeader(),this._hideResizeHandle())},_resetResizeHandleHeader:function(){var t;this.resizeHandle&&(t=e(this.resizeHandle).data("th"),t&&(t.find(ft+lr).find(ft+ar).show(),t.find(ft+nr).show(),t.find(ft+ir).show(),t.find(ft+sr).show()))},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off(Ht).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,r=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new Ue.UserEvents(r.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,minHold:500,hold:function(r){var o=e(r.target);r.preventDefault(),t.resizeHandle&&(t.resizeHandle.data("th").removeClass("k-column-active"),t._resetResizeHandleHeader()),o.addClass("k-column-active"),o.find(ft+lr).find(ft+ar).hide(),o.find(ft+nr).hide(),o.find(ft+ir).hide(),o.find(ft+sr).hide(),t._createResizeHandle(o.closest("div"),o),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=dt(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},resizeColumn:function(r,o){var l,a,n,i,s=this,d=!!r.locked,c=!!r.hidden,u=this.options,p=Ue.support.mobileOS?0:Ue.support.scrollbar(),h=d?it(r,Z(ee(s.columns))):it(r,X(ee(s.columns))),f=d?s.lockedTable:s.table,g=s.footer||e(),m=d?s.lockedHeader.find("table"):s.thead.closest("table"),k=r.minResizableWidth||10,_=Ze(d?f.find("tbody"):s.tbody);return c?(r.width=o>k?o:k,t):(s.footer&&s.lockedContent&&(g=s.footer.children(d?".k-grid-footer-locked":".k-grid-footer-wrap")),l=u.scrollable?m.find("col:not(.k-group-col,.k-hierarchy-col):eq("+h+")").add(f.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+h+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+h+")")):f.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+h+")"),u.scrollable?(a=!1,n=s.wrapper.width()-p,i=o=o>k?o:k,d&&_-o+i>n&&(i=o+(n-_-2*p),i<0&&(i=o),a=!0),i>10&&i>=k&&(l.css("width",i),_&&(i=a?n-2*p:_+(o-r.width),f.add(m).add(g).css("width",i),d||(s._footerWidth=i))),s._scrollVirtualWrapperOnColumnResize()):o>10&&o>=k&&l.css("width",o),r.width=o,s._applyLockedContainersWidth(),s._syncLockedContentHeight(),s._syncLockedHeaderHeight(),s._updateStickyColumns(),t)},_resizable:function(){var t,r,o,l,n,i,s,d,c=this,u=c.options,p=this._isMobile,h=Ue.support.mobileOS?0:Ue.support.scrollbar();u.resizable&&(t=u.scrollable?c.wrapper.find(".k-grid-header-wrap:first"):c.wrapper,p?c._positionColumnResizeHandleTouch(t):c._positionColumnResizeHandle(t),c.resizable&&c.resizable.destroy(),c.resizable=new je.Resizable(t.add(c.lockedHeader),{handle:(u.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('<div class="k-grid-resize-indicator" />').css({height:et(t.data("th"))+c.tbody.attr("clientHeight")})},start:function(t){var h,f,g,m,k;d=e(t.currentTarget).data("th"),p&&c._hideResizeHandle(),h=d.closest("table"),f=e.inArray(d[0],ae(d.closest("thead")).filter(":visible")),i=h.parent().hasClass("k-grid-header-locked"),g=i?c.lockedTable:c.table,m=c.footer||e(),c.footer&&c.lockedContent&&(m=c.footer.children(i?".k-grid-footer-locked":".k-grid-footer-wrap")),a(c.wrapper,"col-resize"),s=u.scrollable?h.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")").add(g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")).add(m.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")):g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")"),k=e.map(c.columns,function(e){return!e.hidden&&(i&&e.locked||!i&&!e.locked)?e:null}),r=t.x.location,o=Ze(d),l=oe(k)[f].minResizableWidth||10,n=Ze(i?g.children("tbody"):c.tbody),ro.webkit&&c.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var a,p,f,g,m,k,_=to?-1:1,b=o+t.x.location*_-r*_;u.scrollable?(i&&c.lockedFooter?a=c.lockedFooter.children("table"):c.footer&&(a=c.footer.find(">.k-grid-footer-wrap>table")),a&&a[0]||(a=e()),p=d.closest("table"),f=i?c.lockedTable:c.table,g=!1,m=c.wrapper.width()-h,k=b,i&&n-o+k>m&&(k=o+(m-n-2*h),k<0&&(k=b),g=!0),k>10&&k>=l&&(s.css("width",k),n&&(k=g?m-2*h:n+t.x.location*_-r*_,f.add(p).add(a).css("width",k),i||(c._footerWidth=k))),c._scrollVirtualWrapperOnColumnResize()):b>10&&b>=l&&s.css("width",b)},resizeend:function(){var e,t,r,l=Ze(d);a(c.wrapper,""),ro.webkit&&c.wrapper.removeClass("k-grid-column-resizing"),o!=l&&(t=c.lockedHeader?c.lockedHeader.find("thead:first tr:first").add(c.thead.find("tr:first")):d.parent(),r=d.attr(Ue.attr("index")),r||(r=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(d)),e=oe(c.columns)[r],e.width=l,c.trigger(fr,{column:e,oldWidth:o,newWidth:l}),c._applyLockedContainersWidth(),c._syncLockedContentHeight(),c._syncLockedHeaderHeight(),c._updateStickyColumns()),c._resetResizeHandleHeader(),c._hideResizeHandle(),d=null}}))},_draggable:function(){var t,r=this;r.options.reorderable&&(r._draggableInstance&&r._draggableInstance.destroy(),t=r.wrapper.children(".k-grid-header"),r._draggableInstance=r.wrapper.kendoDraggable({group:Ue.guid(),autoScroll:!0,filter:r.content?".k-grid-header:first "+xt:"table:first>.k-grid-header "+xt,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+Ht+"scrolling").bind("scroll"+Ht+"scrolling",function(e){r.virtualScrollable?Ue.scrollLeft(r.content.find(">.k-virtual-scrollable-wrap"),this.scrollLeft):Ue.scrollLeft(r.scrollables.not(e.currentTarget),this.scrollLeft)})},dragend:function(){r._resetResizeHandleHeader(),t.children(".k-grid-header-wrap").unbind("scroll"+Ht+"scrolling")},drag:function(){r._hideResizeHandle()},hint:function(t){var r=t.attr(Ue.attr("title"));return r&&(r=Ue.htmlEncode(r)),e('<div class="k-header k-reorder-clue k-drag-clue" />').html(r||t.attr(Ue.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel"></span>')}}).data("kendoDraggable"))},_reorderable:function(){var t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(e,r){var o=L(t.columns);return o[e].lockable!==!1&&F(o,t.columns,e,r)>-1},inSameContainer:function(r){return e(r.source).parent()[0]===e(r.target).parent()[0]&&F(L(t.columns),t.columns,r.sourceIndex,r.targetIndex)>-1},change:function(e){var r=L(t.columns),o=r[e.oldIndex],l=F(r,t.columns,e.oldIndex,e.newIndex);t.trigger(gr,{newIndex:l,oldIndex:it(o,r),column:o}),t.reorderColumn(l,o,"before"===e.position)}}))},_reorderHeader:function(e,t,r,o){var l,a,n,d,c,u=this,p=E(e[0],u.columns),h=E(t,u.columns),f=[];for(n=0;n<e.length;n++)e[n].columns&&(f=f.concat(e[n].columns));a=o?s(o,o,"tr:eq("+p.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"):s(u.lockedHeader,u.thead,"tr:eq("+p.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),d=$(e).length,c=$([t]).length,f.length?(d>0&&0===c?(l="prepend",x(e,t,f,u.columns,u.lockedHeader.find("thead"),u.thead,this._groups(),l)):0===d&&c>0&&(l=0!==h.cell||!e[0].columns||t.columns||u._group?"append":"prepend",x(e,t,f,Q(u.columns),u.thead,u.lockedHeader.find("thead"),this._groups(),l)),(t.columns||p.cell-h.cell>1||h.cell-p.cell>1)&&(t=A(u.columns,t,e[0],r,u.columns),t&&(d>0&&0===c?u._reorderHeader(f,t,r,u.thead):0===d&&c>0?u._reorderHeader(f,t,r,u.lockedHead):u._reorderHeader(f,t,r)))):d!==c&&T(a[p.cell],u.columns,d),i(a,p.cell,h.cell,r,e.length)},_reorderContent:function(t,r,o){var l,a,n,d,c,u,p=this,h=e(),f=t[0],g=C(t),m=it(f,oe(p.columns)),k=it(r,oe(p.columns)),_=it(g[0],ee(p.columns)),b=it(r,ee(p.columns)),v=$(p.columns).length,w=!!r.locked,y=p.footer||p.wrapper.find(".k-grid-footer"),S=l=b;for(r.hidden&&(n=w?$(p.columns):Q(p.columns),C(n).length>0?(S=l=b=this._findClosestVisibleColumnIndex(n,k),a=C(n.slice(k)).length>0):w?(b=p.lockedTable.find("colgroup"),S=p.lockedHeader.find("colgroup"),l=e(p.lockedFooter).find(">table>colgroup")):(b=p.tbody.prev(),S=p.thead.prev(),l=y.find(".k-grid-footer-wrap").find(">table>colgroup"))),p._hasFilterRow()&&i(p.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),m,k,o,t.length),_>=0&&i(s(p.lockedHeader,p.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,S,a?a:o,g.length),p.options.scrollable&&_>=0&&!p._hasVirtualColumns()&&i(s(p.lockedTable,p.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,b,a?a:o,g.length),y&&y.length&&(_>=0&&i(s(p.lockedFooter,y.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),_,l,a?a:o,g.length),i(y.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),m,k,o,t.length)),d=p.tbody.children(":not(.k-grouping-row,.k-detail-row)"),p.lockedTable&&(v>k?v<=m&&Ce(p.lockedTable.find(">tbody>tr.k-grouping-row"),p.table.find(">tbody>tr.k-grouping-row"),t.length):v>m&&Ce(p.table.find(">tbody>tr.k-grouping-row"),p.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),h=p.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),c=0,u=d.length;c<u;c+=1)i(s(h[c],d[c],">td:not(.k-group-cell,.k-hierarchy-cell)"),m,k,o,t.length)},_findClosestVisibleColumnIndex:function(e,t){var r=C(e.slice(t)).length>0?e.slice(t):e.slice(0,t+1).reverse(),o=C(r)[0];return it(o,C(this.columns))},_autoFitLeafColumn:function(e){this.autoFitColumn(oe(this.columns)[e])},autoFitColumn:function(t){var r,o,l,a,n,i,s,d,c,u,p,h,f,g,m,k,b,C,w,y,S,T,x=this,H=x.options,R=x.columns,I=x.lockedHeader?ae(x.lockedHeader.find(">table>thead")).filter(_).length:0,E="col:not(.k-group-col):not(.k-hierarchy-col)",z="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?R[t]:rt(t)?at(M(R),function(e){return e===t})[0]:at(M(R),function(e){return e.field===t})[0],t&&v(t)){for(i=t.minResizableWidth,r=it(t,oe(R)),a=t.locked,l=a?x.lockedHeader.children("table"):x.thead.parent(),o=l.find("[data-index='"+r+"']"),c=o.find("a.k-header-column-menu, a.k-grid-filter"),p=a?x.lockedTable:x.table,h=x.footer||e(),x.footer&&x.lockedContent&&(h=x.footer.children(a?".k-grid-footer-locked":".k-grid-footer-wrap")),f=h.find("table").first(),x.lockedHeader&&!a&&(r-=I),g=0;g<R.length&&R[g]!==t;g++)R[g].hidden&&r--;if(H.scrollable?(n=l.find(E).eq(r).add(p.children("colgroup").find(E).eq(r)).add(f.find("colgroup").find(E).eq(r)),a||(s=p.parent(),d=Ue.scrollLeft(s))):n=p.children("colgroup").find(E).eq(r),m=l.add(p).add(f),ro.safari&&o.css("white-space","initial"),k=Ze(o),n.width(""),m.css("table-layout","fixed"),n.width("auto"),m.addClass("k-autofitting"),m.css("table-layout",""),u=c.length?Ze(c)+Ze(o):Ze(o),b=Math.ceil(Math.max(u,Ze(p.find("tr:not(.k-grouping-row)").eq(0).children(z).eq(r)),Ze(f.find("tr").eq(0).children(z).eq(r))))+1,i&&i>b&&(b=i),n.width(b),t.width=b,ro.safari&&o.css("white-space",""),H.scrollable){for(C=l.find("col"),y=0,S=0,T=C.length;S<T;S+=1)if(w=C[S].style.width,w&&w.indexOf("%")==-1)y+=parseInt(w,10);else{if(!C.eq(S).hasClass("k-group-col")){y=0;break}y+=parseInt(C.eq(S).width(),10)}y&&m.each(function(){this.style.width=y+"px"})}m.removeClass("k-autofitting"),d&&Ue.scrollLeft(s,d),x.trigger(fr,{column:t,oldWidth:k,newWidth:b}),x._applyLockedContainersWidth(),x._syncLockedContentHeight(),x._syncLockedHeaderHeight(),x._updateStickyColumns()}},reorderColumn:function(e,r,o){var l,a,n=this,i=u(r,n.columns),s=i?i.columns:n.columns,d=it(r,s),c=s[e],p=n.virtualScroll||{},h=!!c.locked,f=$(n.columns).length,g=at(oe(n.columns),function(e){return e.groupHeaderColumnTemplate});d!==e&&(!r.locked&&h&&1==Q(n.columns).length||r.locked&&!h&&1==f||(n._hideResizeHandle(),o===t&&(o=e<d),a=[r],n._reorderHeader(a,c,o),n.lockedHeader&&(O(n.thead),O(n.lockedHeader)),c.columns&&(c=oe(c.columns),c=c[o?0:c.length-1]),r.columns&&(a=oe(r.columns)),n._reorderContent(a,c,o),l=!!r.locked,l=l!=h,r.locked=h,s.splice(o?e:e+1,0,r),s.splice(d<e?d:d+1,1),n._updateLockedCols(),n._updateCols(),n._templates(),n._updateColumnCellIndex(),n._updateColumnSorters(),g.length>0&&n._renderGroupRows(),n._updateTablesWidth(),n._applyLockedContainersWidth(),n._syncLockedHeaderHeight(),n._syncLockedContentHeight(),n._updateFirstColumnClass(),n._updateStickyColumns(),p.columns&&n.refresh(),l&&(h?n.trigger(mr,{column:r}):n.trigger(kr,{column:r}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=H(e,$(this.columns))),H(this.thead,Q(this.columns),t)},lockColumn:function(e){var t,r=this.columns;e="number"==typeof e?r[e]:at(r,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(e.sticky&&this.unstickColumn(r.indexOf(e)),t=$(r).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,r=this.columns;e="number"==typeof e?r[e]:at(r,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=$(r).length,this.reorderColumn(t,e,!0))},stickColumn:function(e){var t=this.columns;e="number"==typeof e?t[e]:at(t,function(t){return t.field===e})[0],!e||e.sticky||e.hidden||e.locked&&(this.unlockColumn(t.indexOf(e)),e.locked)||(e.sticky=!0,this._updateStickyColumns())},unstickColumn:function(e){var t=this.columns;e="number"==typeof e?t[e]:at(t,function(t){return t.field===e})[0],e&&e.sticky&&!e.locked&&!e.hidden&&(this._removeStickyAttributes([e]),this._removeStickyStyles(J(t)),e.sticky=!1,this._updateStickyColumns())},cellIndex:function(t){var r=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(r=oe($(this.columns)).length),e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)+r},_modelForContainer:function(t){t=e(t),t.is("tr")||"po