var jqxBaseFramework=window.minQuery||window.jQuery;(function(e){e.jqx=e.jqx||{};e.jqx.define=function(a,b,c){a[b]=function(){this.baseType&&(this.base=new a[this.baseType],this.base.defineInstance());this.defineInstance()};a[b].prototype.defineInstance=function(){};a[b].prototype.base=null;a[b].prototype.baseType=void 0;c&&a[c]&&(a[b].prototype.baseType=c)};e.jqx.invoke=function(a,b){if(0!=b.length){for(var c=typeof b==Array||0c&&(a.batchUpdate=null)}e.each(b[0],function(c,b){for(var f=a;!f.hasOwnProperty(c)&&null!=f.base;)f=f.base;if(f.hasOwnProperty(c))e.jqx.setvalueraiseevent(f,c,b);else if(f.hasOwnProperty(c.toLowerCase()))e.jqx.setvalueraiseevent(f,c.toLowerCase(),b);else if(e.jqx.propertySetterValidation)throw"jqxCore: invalid property '"+c+"'";});null!=a.batchUpdate&&(a.batchUpdate=null,a.propertiesChangedHandler&&1d?1:0},d=function(a){if(0]*)\/>/gi,k=/<([\w:]+)/,m=/<(?:abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video)[\s/>]/i,n=/^\s+/,p={option:[1,"\x3cselect multiple\x3d'multiple'\x3e","\x3c/select\x3e"],legend:[1,"\x3cfieldset\x3e","\x3c/fieldset\x3e"],thead:[1,"\x3ctable\x3e","\x3c/table\x3e"],tr:[2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"],td:[3,"\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"],col:[2,"\x3ctable\x3e\x3ctbody\x3e\x3c/tbody\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"],area:[1,"\x3cmap\x3e","\x3c/map\x3e"],_default:[0,"",""]};if(!("string"!==typeof c||h.test(c)||!e.support.htmlSerialize&&m.test(c)||!e.support.leadingWhitespace&&n.test(c)||p[(k.exec(c)||["",""])[1].toLowerCase()])){c=c.replace(l,"\x3c$1\x3e\x3c/$2\x3e");try{for(;da.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(a)||[],c={browser:b[1]||"",version:b[2]||"0"};0<=a.indexOf("rv:11.0")&&0<=a.indexOf(".net4.0c")&&(c.browser="msie",c.version="11",b[1]="msie");0<=a.indexOf("edge")&&(c.browser="msie",c.version="12",b[1]="msie");c[b[1]]=b[1];return c}});e.jqx.browser=e.jqx.utilities.getBrowser();e.jqx.isHidden=function(a){if(!a||!a[0])return!1;var b=a[0].offsetHeight;return 0===a[0].offsetWidth||0===b?!0:!1};e.jqx.ariaEnabled=!0;e.jqx.aria=function(a,b,c){if(e.jqx.ariaEnabled)if(void 0==b)e.each(a.aria,function(c,b){var g=a.base?a.base.host.attr(c):a.host.attr(c);if(void 0==g||e.isFunction(g)){g=a[b.name];e.isFunction(g)&&(g=a[b.name]());void 0==g&&(g="");try{a.base?a.base.host.attr(c,g.toString()):a.host.attr(c,g.toString())}catch(l){}}else{var h=g;switch(b.type){case "number":h=new Number(g);isNaN(h)&&(h=g);break;case "boolean":h="true"==g?!0:!1;break;case "date":if(h=new Date(g),"Invalid Date"==h||isNaN(h))h=g}a[b.name]=h}});else try{a.host?a.base?a.base.host?a.base.host.attr(b,c.toString()):a.attr(b,c.toString()):a.host?a.element.setAttribute?a.element.setAttribute(b,c.toString()):a.host.attr(b,c.toString()):a.attr(b,c.toString()):a.setAttribute&&a.setAttribute(b,c.toString())}catch(f){}};Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c=this.length,f=Number(b)||0,f=0>f?Math.ceil(f):Math.floor(f);for(0>f&&(f+=c);f(b/=d/2)?-f/2*(Math.sqrt(1-b*b)-1)+c:f/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInOutSine:function(a,b,c,f,d){return-f/2*(Math.cos(Math.PI*b/d)-1)+c},easeInCubic:function(a,b,c,f,d){return f*(b/=d)*b*b+c},easeOutCubic:function(a,b,c,f,d){return f*((b=b/d-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,f,d){return 1>(b/=d/2)?f/2*b*b*b+c:f/2*((b-=2)*b*b+2)+c},easeInSine:function(a,b,c,f,d){return-f*Math.cos(b/d*(Math.PI/2))+f+c},easeOutSine:function(a,b,c,f,d){return f*Math.sin(b/d*(Math.PI/2))+c},easeInOutSine:function(a,b,c,f,d){return-f/2*(Math.cos(Math.PI*b/d)-1)+c}})})(jqxBaseFramework);(function(e){e.extend(e.event.special,{close:{noBubble:!0},open:{noBubble:!0},cellclick:{noBubble:!0},rowclick:{noBubble:!0},tabclick:{noBubble:!0},selected:{noBubble:!0},expanded:{noBubble:!0},collapsed:{noBubble:!0},valuechanged:{noBubble:!0},expandedItem:{noBubble:!0},collapsedItem:{noBubble:!0},expandingItem:{noBubble:!0},collapsingItem:{noBubble:!0}});e.fn.extend({ischildof:function(a){for(var c=e(this).parents().get(),f=0;f>>0;if("function"!==typeof a)throw TypeError();var d;for(d=0;da?"0"+a:a}function d(a,c){switch(c){case "string":return b(a);case "number":case "float":case "integer":case "int":return isFinite(a)?a:"null";case "boolean":return a}return"null"}function e(c,g){var h=g[c],k=typeof h;h&&"object"===typeof h&&"function"===typeof h.toJSON&&(h=h.toJSON(c),k=typeof h);if(/(number|float|int|integer|string|boolean)/.test(k)||!h&&"object"===k)return d(h,k);a:{switch(Object.prototype.toString.call(h)){case "[object Date]":h=isFinite(h.valueOf())?h.getUTCFullYear()+"-"+f(h.getUTCMonth()+1)+"-"+f(h.getUTCDate())+"T"+f(h.getUTCHours())+":"+f(h.getUTCMinutes())+":"+f(h.getUTCSeconds())+'Z"':"null";break a;case "[object Array]":var l=h.length,k=[],m;for(m=0;mk.length&&h.push.apply(h,Array(c-k.length));else throw new RangeError("Invalid array length");return a}});e.jqx.observableArray.prototype.fromArray=function(a,c){return new e.jqx.observableArray(a,c)};e.jqx.observableArray.prototype.clone=function(){var a=new e.jqx.observableArray(k,c);a.observing=h.observing;a.changes=h.changes;a.notifier=h.notifier;return a};h.remove=function(a){if(0>a||a>=h.length)throw Error("Invalid index : "+a);if(h.hasOwnProperty(a)){var c=h[a];h[a]=void 0;k[a]=void 0;"function"===typeof l&&l({object:h,type:"delete",index:a,name:"index",newValue:void 0,oldValue:c});return!0}return!1};h.concat=function(a,c){var b=k.concat(a);return new e.jqx.observableArray(b,c)};Object.getOwnPropertyNames(Array.prototype).forEach(function(a){a in h||Object.defineProperty(h,a,{configurable:!1,enumerable:!0,writeable:!1,value:function(){var c=h.observing;h.observing=!1;var b=k[a].apply(k,arguments);h.observing=c;return b}})});h.set=function(a,c){if("string"==e.type(a)&&1=h.length)throw Error("Invalid Index: "+a);d=h.length?h.push(c):h[a]=c;return!0};h.get=function(a){return h[a]};a instanceof Array&&h.push.apply(h,a);l=function(){h.observing&&(arguments&&arguments[0]&&h.changes.push(arguments[0]),c&&c.apply(h,arguments),h.notifier&&h.notifier.apply(h,arguments))};return h};e.jqx.formatDate=function(a,c,b){return e.jqx.dataFormat.formatdate(a,c,b)};e.jqx.formatNumber=function(a,c,b){return e.jqx.dataFormat.formatnumber(a,c,b)};e.jqx.dataAdapter=function(a,c){void 0!=a&&(void 0!==a.dataFields&&(a.datafields=a.dataFields),void 0!==a.dataType&&(a.datatype=a.dataType),void 0!==a.localData&&(a.localdata=a.localData),void 0!==a.sortColumn&&(a.sortcolumn=a.sortColumn),void 0!==a.sortDirection&&(a.sortdirection=a.sortDirection),void 0!==a.sortOrder&&(a.sortdirection=a.sortOrder),void 0!==a.formatData&&(a.formatdata=a.formatData),void 0!==a.processData&&(a.processdata=a.processData),void 0!==a.pageSize&&(a.pagesize=a.pageSize),void 0!==a.pageNum&&(a.pagenum=a.pageNum),void 0!==a.updateRow&&(a.updaterow=a.updateRow),void 0!==a.addRow&&(a.addrow=a.addRow),void 0!==a.deleteRow&&(a.deleterow=a.deleteRow),void 0!==a.contentType&&(a.contenttype=a.contentType),void 0!=a.totalRecords&&(a.totalrecords=a.totalRecords),void 0!=a.loadError&&(a.loadError=a.loadError),void 0!=a.sortComparer&&(a.sortcomparer=a.sortComparer));this._source=a;this._options=c||{};void 0!=a.beforeLoadComplete&&(this._options.beforeLoadComplete=this._source.beforeLoadComplete);void 0!=a.downloadComplete&&(this._options.downloadComplete=this._source.downloadComplete);void 0!=a.loadComplete&&(this._options.loadComplete=this._source.loadComplete);void 0!=a.autoBind&&(this._options.downloadComplete=this._source.autoBind);void 0!=a.formatData&&(this._options.formatData=this._source.formatData);void 0!=a.loadError&&(this._options.loadError=this._source.loadError);void 0!=a.beforeSend&&(this._options.beforeSend=this._source.beforeSend);void 0!=a.contentType&&(this._options.contentType=this._source.contentType);void 0!=a.async&&(this._options.async=this._source.async);void 0!=a.loadServerData&&(this._options.loadServerData=this._source.loadServerData);void 0!=a.uniqueDataFields&&(this._options.uniqueDataFields=this._source.uniqueDataFields);this.records=[];this._downloadComplete=[];this._bindingUpdate=[];if(void 0!=a&&null!=a.localdata&&"function"==typeof a.localdata){var b=a.localdata();if(null!=b){a._localdata=a.localdata;var f=this;a._localdata.subscribe&&(f._oldlocaldata=[],a._localdata.subscribe(function(a){var c=function(a){return e.isArray(a)?e.makeArray(c(e(a))):e.extend(!0,{},a)};if(0==f.suspendKO||void 0==f.suspendKO||0==f._oldlocaldata.length)f._oldlocaldata=c(a)},a._localdata,"beforeChange"),a._localdata.subscribe(function(c){if(0==f.suspendKO||void 0==f.suspendKO){var b="";f._oldrecords=f.records;0==f._oldlocaldata.length&&(a.localdata=a._localdata());0==f._oldlocaldata.length?b="change":c&&(f._oldlocaldata.length==c.length&&(b="update"),f._oldlocaldata.length>c.length&&(b="remove"),f._oldlocaldata.lengththis.pagenum&&(this.pagenum=0);var g=this,h=b.datatype;if("csv"===b.datatype||"tab"===b.datatype||"tsv"===b.datatype||"text"==b.datatype)h="text";d=void 0!=f.async?f.async:!0;void 0!=b.async&&(d=b.async);switch(h){default:if(void 0==b.localdata&&b.length){b.localdata=[];for(var k=0;kc?1:0;e.jqx.dataFormat.isNumber(a)||e.jqx.dataFormat.isNumber(c)||(a=String(a).toLowerCase(),c=String(c).toLowerCase());return ac?1:0}),Object.prototype.toString=k);g.loadedData=b.localdata;g.buildHierarchy();e.isFunction(f.loadComplete)&&f.loadComplete(b.localdata,g.records);break;case "json":case "jsonp":case "xml":case "xhtml":case "script":case "text":if(null!=b.localdata){e.isFunction(b.beforeprocessing)&&b.beforeprocessing(b.localdata);"xml"===b.datatype?g.loadxml(b.localdata,b.localdata,b):"text"===h?g.loadtext(b.localdata,b):g.loadjson(b.localdata,b.localdata,b);g.addForeignValues(b);f.uniqueDataFields&&(k=g.getUniqueRecords(g.records,f.uniqueDataFields),g.records=k,g.cachedrecords=k);f.beforeLoadComplete&&(k=f.beforeLoadComplete(g.records,this.originaldata),void 0!=k&&(g.records=k,g.cachedrecords=k));g.loadedData=b.localdata;g.buildHierarchy.call(g);e.isFunction(f.loadComplete)&&f.loadComplete(b.localdata,g.records);g.callBindingUpdate(c);return}m=void 0!=f.data?f.data:{};b.processdata&&b.processdata(m);e.isFunction(f.processData)&&f.processData(m);e.isFunction(f.formatData)&&(q=f.formatData(m),void 0!=q&&(m=q));q="application/x-www-form-urlencoded";f.contentType&&(q=f.contentType);p="GET";b.type&&(p=b.type);f.type&&(p=f.type);b.url&&0this.totalrecords&&(g=this.totalrecords)):this.virtualmode?(e=a.recordstartindex,g=a.recordendindex,g>this.totalrecords&&(g=this.totalrecords)):(e=0,g=this.records.length);for(;e|\/@])/g,"");f=a.split(this.mapChar);if(1=b.recordendindex||kv)if(u=e(t.map,l),1==u.length)u=u.text();else{for(var v=[],w=0;w=b.recordendindex||d=p.length)){var t=c.datafields[r],u=p[r];t.map&&e.isFunction(t.map)&&(u=t.map(m));t.type&&(u=this.getvaluebytype(u,t));q[t.map||t.name||r.toString()]=u;null!=c.id&&c.id===t.name&&(n=u,this.recordids[n]=m)}null==n&&(n=g);d[h+g]=e.extend({},q);d[h+g].uid=n;this.originaldata[h+g]=e.extend({},d[g])}}this.cachedrecords=this.records=d}},getvaluebytype:function(a,c){var b=a;if(null==a)return a;if(e.isArray(a)&&"array"!=c.type){for(b=0;b=b)return d;return 0},toUpper:function(a){return a.split("\u00a0").join(" ").toUpperCase()},toUpperArray:function(a){for(var c=[],b=0,f=a.length;ba&&(a=this.arrayIndexOf(b?g[1]:g[0],c));return a},appendPreOrPostMatch:function(a,c){for(var b=0,f=!1,d=0,e=a.length;da;f=a+"";d=d?d:".";if(this.isNumber(e)){var k=e;f=Math.pow(10,k);f=(a*f).toFixed(0)/f+"";a=f.lastIndexOf(".");if(0a?(f+=d,a=f.length-1):"."!==d&&(f=f.replace(".",d));f.length-1-a=k.length){q=d;l.push(r.getDate());break}}for(d=0;dn[p]&&h.setFullYear(n[p]),NaN!=h.getTime()&&k.push(h);0b},expandYear:function(a,c){var b=new Date,f=this.getEra(b);if(100>c){var d=a.twoDigitYearMax,d="string"===typeof d?(new Date).getFullYear()%100+parseInt(d,10):d,b=this.getEraYear(b,a,f);c+=b-b%100;c>d&&(c-=100)}return c},parsedate:function(a,c,b){if(void 0==b||null==b)b=this.defaultcalendar();a=this.trim(a);c=this.getparseregexp(b,c);var f=(new RegExp(c.regExp)).exec(a);if(null===f)return null;var d=c.groups,e=c=a=null,g=null,h=null,k=0,l,m=0,n=0,q=0;l=null;for(var p=!1,r=0,t=d.length;rw?this.expandYear(b,x):x;if(this.outOfRange(c,0,9999))return null;break;case "h":case "hh":k=x;12===k&&(k=0);if(this.outOfRange(k,0,11))return null;break;case "H":case "HH":k=x;if(this.outOfRange(k,0,23))return null;break;case "m":case "mm":m=x;if(this.outOfRange(m,0,59))return null;break;case "s":case "ss":n=x;if(this.outOfRange(n,0,59))return null;break;case "tt":case "t":p=b.PM&&(u===b.PM[0]||u===b.PM[1]||u===b.PM[2]);if(!p&&(!b.AM||u!==b.AM[0]&&u!==b.AM[1]&&u!==b.AM[2]))return null;break;case "f":case "ff":case "fff":q=x*Math.pow(10,3-w);if(this.outOfRange(q,0,999))return null;break;case "ddd":case "dddd":h=this.getDayIndex(b,u,3===w);if(this.outOfRange(h,0,6))return null;break;case "zzz":v=u.split(/:/);if(2!==v.length)return null;l=parseInt(v[0],10);if(this.outOfRange(l,-12,13))return null;v=parseInt(v[1],10);if(this.outOfRange(v,0,59))return null;l=60*l+(this.startsWith(u,"-")?-v:v);break;case "z":case "zz":l=x;if(this.outOfRange(l,-12,13))return null;l*=60;break;case "g":case "gg":if(!u||!b.eras)return null;u=trim(u.toLowerCase());v=0;for(w=b.eras.length;vk&&(k+=12);f.setHours(k,m,n,q);null!==l&&(b=f.getMinutes()-(l+f.getTimezoneOffset()),f.setHours(f.getHours()+parseInt(b/60,10),b%60));return f},cleardatescache:function(){this.datescache=[]},formatDate:function(a,c,b){return this.formatdate(a,c,b)},formatdate:function(a,c,b){function f(a,c){var b;b=a+"";return 1r&&(l%=100);g.push(f(l,r));break;case "h":case "hh":l=a.getHours()%12;0===l&&(l=12);g.push(f(l,r));break;case "H":case "HH":g.push(f(a.getHours(),r));break;case "m":case "mm":g.push(f(a.getMinutes(),r));break;case "s":case "ss":g.push(f(a.getSeconds(),r));break;case "t":case "tt":l=12>a.getHours()?b.AM?b.AM[0]:" ":b.PM?b.PM[0]:" ";g.push(1===r?l.charAt(0):l);break;case "f":case "ff":case "fff":g.push(f(a.getMilliseconds(),3).substr(0,r));break;case "z":case "zz":l=a.getTimezoneOffset()/60;g.push((0>=l?"+":"-")+f(Math.floor(Math.abs(l)),r));break;case "zzz":l=a.getTimezoneOffset()/60;g.push((0>=l?"+":"-")+f(Math.floor(Math.abs(l)),2)+":"+f(Math.abs(a.getTimezoneOffset()%60),2));break;case "g":case "gg":b.eras&&g.push(b.eras[this.getEra(a,h)].name);break;case "/":g.push(b["/"]);break;default:throw"Invalid date format pattern '"+l+"'.";}}a=g.join("");this.datescache||(this.datescache=[]);return this.datescache[e]=a}});e.jqx.data={};var d,g,h=/#.*$/,l=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,k=/^(?:GET|HEAD)$/,m=/^\/\//,n=/\?/,p=/([?&])_=[^&]*/,q=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,r=/\s+/,t={},v={},u=["*/"]+["*"];try{g=location.href}catch(B){g=document.createElement("a"),g.href="",g=g.href}d=q.exec(g.toLowerCase())||[];e.extend(e.jqx.data,{ajaxSetup:function(a,b){b?c(a,e.jqx.data.ajaxSettings):(b=a,a=e.jqx.data.ajaxSettings);c(a,b);return a},ajaxSettings:{url:g,isLocal:/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/.test(d[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset\x3dUTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":u},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":window.String,"text html":!0,"text json":e.parseJSON,"text xml":e.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:a(t),ajaxTransport:a(v),ajax:function(a,c){function f(a,c,b,d){var h,k,l,m,n=c;if(2!==O){O=2;J&&clearTimeout(J);D=void 0;w=d||"";H.readyState=0a||304===a)if(y.ifModified&&((b=H.getResponseHeader("Last-Modified"))&&(e.lastModified[g]=b),(b=H.getResponseHeader("Etag"))&&(e.etag[g]=b)),304===a)n="notmodified",h=!0;else{a:{k=y;l=m;var B,x,n=k.dataTypes.slice();q=n[0];p={};r=0;k.dataFilter&&(l=k.dataFilter(l,k.dataType));if(n[1])for(B in k.converters)p[B.toLowerCase()]=k.converters[B];for(;b=n[++r];)if("*"!==b){if("*"!==q&&q!==b){B=p[q+" "+b]||p["* "+b];if(!B)for(x in p)if(h=x.split(" "),h[1]===b&&(B=p[q+" "+h[0]]||p["* "+h[0]])){!0===B?B=p[x]:!0!==p[x]&&(b=h[0],n.splice(r--,0,b));break}if(!0!==B)if(B&&k["throws"])l=B(l);else try{l=B(l)}catch(L){h={state:"parsererror",error:B?L:"No conversion from "+q+" to "+b};break a}}q=b}h={state:"success",data:l}}n=h.state;k=h.data;l=h.error;h=!l}else if(l=n,!n||a)n="error",0>a&&(a=0);H.status=a;H.statusText=(c||n)+"";h?U.resolveWith(P,[k,n,H]):U.rejectWith(P,[H,n,l]);H.statusCode(S);S=void 0;M&&T.trigger("ajax"+(h?"Success":"Error"),[H,y,h?k:l]);X.fireWith(P,[H,n]);M&&(T.trigger("ajaxComplete",[H,y]),--e.active||e.event.trigger("ajaxStop"))}}"object"===typeof a&&(c=a,a=void 0);c=c||{};var g,w,x,D,J,z,M,C,y=e.jqx.data.ajaxSetup({},c),P=y.context||y,T=P!==y&&(P.nodeType||P instanceof e)?e(P):e.event,U=e.Deferred(),X=e.Callbacks("once memory"),S=y.statusCode||{},W={},Y={},O=0,Z="canceled",H={readyState:0,setRequestHeader:function(a,c){if(!O){var b=a.toLowerCase();a=Y[b]=Y[b]||a;W[a]=c}return this},getAllResponseHeaders:function(){return 2===O?w:null},getResponseHeader:function(a){var c;if(2===O){if(!x)for(x={};c=l.exec(w);)x[c[1].toLowerCase()]=c[2];c=x[a.toLowerCase()]}return void 0===c?null:c},overrideMimeType:function(a){O||(y.mimeType=a);return this},abort:function(a){a=a||Z;D&&D.abort(a);f(0,a);return this}};U.promise(H);H.success=H.done;H.error=H.fail;H.complete=X.add;H.statusCode=function(a){if(a){var c;if(2>O)for(c in a)S[c]=[S[c],a[c]];else c=a[H.status],H.always(c)}return this};y.url=((a||y.url)+"").replace(h,"").replace(m,d[1]+"//");y.dataTypes=e.trim(y.dataType||"*").toLowerCase().split(r);null==y.crossDomain&&(z=q.exec(y.url.toLowerCase()),y.crossDomain=!(!z||z[1]===d[1]&&z[2]===d[2]&&(z[3]||("http:"===z[1]?80:443))==(d[3]||("http:"===d[1]?80:443))));y.data&&y.processData&&"string"!==typeof y.data&&(y.data=e.param(y.data,y.traditional));b(t,y,c,H);if(2===O)return H;M=y.global;y.type=y.type.toUpperCase();y.hasContent=!k.test(y.type);M&&0===e.active++&&e.event.trigger("ajaxStart");if(!y.hasContent&&(y.data&&(y.url+=(n.test(y.url)?"\x26":"?")+y.data,delete y.data),g=y.url,!1===y.cache)){z=e.now();var aa=y.url.replace(p,"$1_\x3d"+z);y.url=aa+(aa===y.url?(n.test(y.url)?"\x26":"?")+"_\x3d"+z:"")}(y.data&&y.hasContent&&!1!==y.contentType||c.contentType)&&H.setRequestHeader("Content-Type",y.contentType);y.ifModified&&(g=g||y.url,e.lastModified[g]&&H.setRequestHeader("If-Modified-Since",e.lastModified[g]),e.etag[g]&&H.setRequestHeader("If-None-Match",e.etag[g]));H.setRequestHeader("Accept",y.dataTypes[0]&&y.accepts[y.dataTypes[0]]?y.accepts[y.dataTypes[0]]+("*"!==y.dataTypes[0]?", "+u+"; q\x3d0.01":""):y.accepts["*"]);for(C in y.headers)H.setRequestHeader(C,y.headers[C]);if(y.beforeSend&&(!1===y.beforeSend.call(P,H,y)||2===O))return H.abort();Z="abort";for(C in{success:1,error:1,complete:1})H[C](y[C]);if(D=b(v,y,c,H)){H.readyState=1;M&&T.trigger("ajaxSend",[H,y]);y.async&&0O)f(-1,ba);else throw ba;}}else f(-1,"No Transport");return H},active:0,lastModified:{},etag:{}});var w=[],x=/\?/,z=/(=)\?(?=&|$)|\?\?/,D=e.now();e.jqx.data.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=w.pop()||e.expando+"_"+D++;this[a]=!0;return a}});e.jqx.data.ajaxPrefilter("json jsonp",function(a,c,b){var f,d,g,h=a.data,k=a.url,l=!1!==a.jsonp,m=l&&z.test(k),n=l&&!m&&"string"===typeof h&&!(a.contentType||"").indexOf("application/x-www-form-urlencoded")&&z.test(h);if("jsonp"===a.dataTypes[0]||m||n)return f=a.jsonpCallback=e.isFunction(a.jsonpCallback)?a.jsonpCallback():a.jsonpCallback,d=window[f],m?a.url=k.replace(z,"$1"+f):n?a.data=h.replace(z,"$1"+f):l&&(a.url+=(x.test(k)?"\x26":"?")+a.jsonp+"\x3d"+f),a.converters["script json"]=function(){g||e.error(f+" was not called");return g[0]},a.dataTypes[0]="json",window[f]=function(){g=arguments},b.always(function(){window[f]=d;a[f]&&(a.jsonpCallback=c.jsonpCallback,w.push(f));g&&e.isFunction(d)&&d(g[0]);g=d=void 0}),"script"});e.jqx.data.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){e.globalEval(a);return a}}});e.jqx.data.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1);a.crossDomain&&(a.type="GET",a.global=!1)});e.jqx.data.ajaxTransport("script",function(a){if(a.crossDomain){var c,b=document.head||document.getElementsByTagName("head")[0]||document.documentElement;return{send:function(f,d){c=document.createElement("script");c.async="async";a.scriptCharset&&(c.charset=a.scriptCharset);c.src=a.url;c.onload=c.onreadystatechange=function(a,f){if(f||!c.readyState||/loaded|complete/.test(c.readyState))c.onload=c.onreadystatechange=null,b&&c.parentNode&&b.removeChild(c),c=void 0,f||d(200,"success")};b.insertBefore(c,b.firstChild)},abort:function(){if(c)c.onload(0,1)}}}});var C,J=window.ActiveXObject?function(){for(var a in C)C[a](0,1)}:!1,M=0;e.jqx.data.ajaxSettings.xhr=window.ActiveXObject?function(){var a;if(!(a=!this.isLocal&&f()))a:{try{a=new window.ActiveXObject("Microsoft.XMLHTTP");break a}catch(c){}a=void 0}return a}:f;(function(a){e.extend(e.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})})(e.jqx.data.ajaxSettings.xhr());e.support.ajax&&e.jqx.data.ajaxTransport(function(a){if(!a.crossDomain||e.support.cors){var c;return{send:function(b,f){var d,g,h=a.xhr();a.username?h.open(a.type,a.url,a.async,a.username,a.password):h.open(a.type,a.url,a.async);if(a.xhrFields)for(g in a.xhrFields)h[g]=a.xhrFields[g];a.mimeType&&h.overrideMimeType&&h.overrideMimeType(a.mimeType);a.crossDomain||b["X-Requested-With"]||(b["X-Requested-With"]="XMLHttpRequest");try{for(g in b)h.setRequestHeader(g,b[g])}catch(k){}h.send(a.hasContent&&a.data||null);c=function(b,g){var k,l,m,n,q;try{if(c&&(g||4===h.readyState))if(c=void 0,d&&(h.onreadystatechange=e.noop,J&&delete C[d]),g)4!==h.readyState&&h.abort();else{k=h.status;m=h.getAllResponseHeaders();n={};(q=h.responseXML)&&q.documentElement&&(n.xml=q);try{n.text=h.responseText}catch(p){}try{l=h.statusText}catch(p){l=""}k||!a.isLocal||a.crossDomain?1223===k&&(k=204):k=n.text?200:404}}catch(p){g||f(-1,p)}n&&f(k,l,n,m)};a.async?4===h.readyState?setTimeout(c,0):(d=++M,J&&(C||(C={},e(window).unload(J)),C[d]=c),h.onreadystatechange=c):c()},abort:function(){c&&c(0,1)}}}});e.jqx.filter=function(){this.operator="and";var a="EMPTY NOT_EMPTY CONTAINS CONTAINS_CASE_SENSITIVE DOES_NOT_CONTAIN DOES_NOT_CONTAIN_CASE_SENSITIVE STARTS_WITH STARTS_WITH_CASE_SENSITIVE ENDS_WITH ENDS_WITH_CASE_SENSITIVE EQUAL EQUAL_CASE_SENSITIVE NULL NOT_NULL".split(" "),c="EQUAL NOT_EQUAL LESS_THAN LESS_THAN_OR_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL NULL NOT_NULL".split(" "),b="EQUAL NOT_EQUAL LESS_THAN LESS_THAN_OR_EQUAL GREATER_THAN GREATER_THAN_OR_EQUAL NULL NOT_NULL".split(" "),f=["EQUAL","NOT_EQUAL"],d=[],g=[];this.evaluate=function(a){for(var c=!0,b=0;ba||a>d.length?null:g[a]};this.setoperatorat=function(a,c){if(void 0==a||null==a||0>a||a>d.length)return null;g[c]=c};this.getfilterat=function(a){return void 0==a||null==a||0>a||a>d.length?null:d[a]};this.setfilterat=function(a,c){if(void 0==a||null==a||0>a||a>d.length)return null;c.key=h();d[a]=c};this.clear=function(){d=[];g=[]};var k=function(a,c){this.filtervalue=a;this.comparisonoperator=c;this.type="stringfilter";this.evaluate=function(a){var c=this.filtervalue,b=this.comparisonoperator;if(null==a||void 0==a||""==a){if("NULL"==b||"EQUAL"==b&&a==c||"NOT_EQUAL"==b&&a!=c)return!0;if("EMPTY"!=b)return!1;if(""==a)return!0}var f="";try{f=a.toString()}catch(d){return!0}var g=function(a,c){switch(b){case "EQUAL":return e.jqx.string.equalsIgnoreCase(a,c);case "EQUAL_CASE_SENSITIVE":return e.jqx.string.equals(a,c);case "NOT_EQUAL":return!e.jqx.string.equalsIgnoreCase(a,c);case "NOT_EQUAL_CASE_SENSITIVE":return!e.jqx.string.equals(a,c);case "CONTAINS":return e.jqx.string.containsIgnoreCase(a,c);case "CONTAINS_CASE_SENSITIVE":return e.jqx.string.contains(a,c);case "DOES_NOT_CONTAIN":return!e.jqx.string.containsIgnoreCase(a,c);case "DOES_NOT_CONTAIN_CASE_SENSITIVE":return!e.jqx.string.contains(a,c);case "EMPTY":return""==a;case "NOT_EMPTY":return""!=a;case "NOT_NULL":return null!=a;case "STARTS_WITH":return e.jqx.string.startsWithIgnoreCase(a,c);case "ENDS_WITH":return e.jqx.string.endsWithIgnoreCase(a,c);case "ENDS_WITH_CASE_SENSITIVE":return e.jqx.string.endsWith(a,c);case "STARTS_WITH_CASE_SENSITIVE":return e.jqx.string.startsWith(a,c);default:return!1}},h=[];if(c&&c.indexOf&&(0<=c.indexOf("|")||0<=c.indexOf(" AND ")||0<=c.indexOf(" OR ")||0<=c.indexOf(" and ")||0<=c.indexOf(" or "))){if(a=g(f,c))return a;var k=0<=c.indexOf(" AND ")?c.split(" AND "):[];a=0<=c.indexOf(" OR ")?c.split(" OR "):[];var l=0<=c.indexOf(" and ")?c.split(" and "):[],m=0<=c.indexOf(" or ")?c.split(" or "):[],n=0<=c.indexOf("|")?c.split("|"):[];if(0c;case "GREATER_THAN_OR_EQUAL":return a>=c;case "LESS_THAN":return a=a[0]&&f<=a[1])):k=g(f,a),a=c=h[0]&&f<=h[1]:g(f,c)}},n=function(a,c,b,f){this.filtervalue=a;this.type="datefilter";var d=this;if(void 0!=b&&void 0!=f){var g=e.jqx.dataFormat.parsedate(a,b,f);null!=g?this.filterdate=g:(g=e.jqx.dataFormat.tryparsedate(a,f),null!=g&&(this.filterdate=g))}else g=new Date(a),this.filterdate="NaN"==g.toString()||"Invalid Date"==g.toString()?e.jqx.dataFormat.tryparsedate(a):g;this.filterdate||(g=new Date(a),this.filterdate="NaN"==g.toString()||"Invalid Date"==g.toString()?e.jqx.dataFormat.tryparsedate(a):g);this.comparisonoperator=c;this.evaluate=function(a){var c=this.filtervalue,g=this.comparisonoperator;if(null==a||void 0==a||""==a){if("NOT_NULL"==g)return!1;if("NULL"==g)return!0;switch(g){case "EQUAL":return a==c;case "NOT_EQUAL":return a!=c}return!1}if("NULL"==g)return!1;if("NOT_NULL"==g)return!0;var h=new Date;h.setFullYear(1900,0,1);h.setHours(12,0,0,0);try{var k=new Date(a),h=a="NaN"==k.toString()||"Invalid Date"==k.toString()?e.jqx.dataFormat.tryparsedate(a):k,l=!1;if(void 0!=b&&void 0!=f&&(0<=b.indexOf("t")||0<=b.indexOf("T")||0<=b.indexOf(":")||0<=b.indexOf("f"))&&(l=!0,c&&-1==c.toString().indexOf(":"))){var m=e.jqx.dataFormat.tryparsedate(c.toString()+":00",f);null!=m&&(d.filterdate=m)}l||(h.setHours(0),h.setMinutes(0),h.setSeconds(0))}catch(n){if(""!=a.toString())return!1}if(null!=d.filterdate)c=d.filterdate;else if(c&&c.indexOf&&(-1!=c.indexOf(":")||!isNaN(parseInt(c)))){m=new Date(h);m.setHours(12,0,0,0);k=c.split(":");for(c=0;cc;case "GREATER_THAN_OR_EQUAL":return a>=c;case "LESS_THAN":return a=a[0]&&h<=a[1])):m=l(h,a),a=p=k[0]&&h<=k[1]:l(h,c)}},q=function(a,c,b){this.filtervalue=a;this.comparisonoperator=c;this.evaluate=function(a,c){return b(this.filtervalue,a,this.comparisonoperator)}}};e.jqx.longInt=function(){var a=this;a.longObj={};var c=a.longObj;c.mathObj={};c.mathObj.Long={};c.mathObj.Long=function(a,c){this.lowBits=a|0;this.highBits=c|0};c.mathObj.Long.IntCache={};c.mathObj.Long.fromInt=function(a){if(-128<=a&&128>a){var b=c.mathObj.Long.IntCache[a];if(b)return b}b=new c.mathObj.Long(a|0,0>a?-1:0);-128<=a&&128>a&&(c.mathObj.Long.IntCache[a]=b);return b};c.mathObj.Long.fromNumber=function(a){return isNaN(a)||!isFinite(a)?c.mathObj.Long.ZERO:a<=-c.mathObj.Long.TWO_PWR_63_DBL_?c.mathObj.Long.MIN_VALUE:a+1>=c.mathObj.Long.TWO_PWR_63_DBL_?c.mathObj.Long.MAX_VALUE:0>a?c.mathObj.Long.fromNumber(-a).negate():new c.mathObj.Long(a%c.mathObj.Long.TWO_PWR_32_DBL_|0,a/c.mathObj.Long.TWO_PWR_32_DBL_|0)};c.mathObj.Long.fromBits=function(a,b){return new c.mathObj.Long(a,b)};c.mathObj.Long.fromString=function(a,b){if(0===a.length)throw Error("number format error: empty string");var f=b||10;if(2>f||36h?(h=c.mathObj.Long.fromNumber(Math.pow(f,h)),e=e.multiply(h).add(c.mathObj.Long.fromNumber(k))):(e=e.multiply(d),e=e.add(c.mathObj.Long.fromNumber(k)))}return e};c.mathObj.Long.TWO_PWR_16_DBL_=65536;c.mathObj.Long.TWO_PWR_24_DBL_=16777216;c.mathObj.Long.TWO_PWR_32_DBL_=c.mathObj.Long.TWO_PWR_16_DBL_*c.mathObj.Long.TWO_PWR_16_DBL_;c.mathObj.Long.TWO_PWR_31_DBL_=c.mathObj.Long.TWO_PWR_32_DBL_/2;c.mathObj.Long.TWO_PWR_48_DBL_=c.mathObj.Long.TWO_PWR_32_DBL_*c.mathObj.Long.TWO_PWR_16_DBL_;c.mathObj.Long.TWO_PWR_64_DBL_=c.mathObj.Long.TWO_PWR_32_DBL_*c.mathObj.Long.TWO_PWR_32_DBL_;c.mathObj.Long.TWO_PWR_63_DBL_=c.mathObj.Long.TWO_PWR_64_DBL_/2;c.mathObj.Long.ZERO=c.mathObj.Long.fromInt(0);c.mathObj.Long.ONE=c.mathObj.Long.fromInt(1);c.mathObj.Long.NEG_ONE=c.mathObj.Long.fromInt(-1);c.mathObj.Long.MAX_VALUE=c.mathObj.Long.fromBits(-1,2147483647);c.mathObj.Long.MIN_VALUE=c.mathObj.Long.fromBits(0,-2147483648);c.mathObj.Long.TWO_PWR_24_=c.mathObj.Long.fromInt(16777216);c.mathObj.Long.prototype.toInt=function(){return this.lowBits};c.mathObj.Long.prototype.toNumber=function(){return this.highBits*c.mathObj.Long.TWO_PWR_32_DBL_+this.getLowBitsUnsigned()};c.mathObj.Long.prototype.toString=function(b){b=b||10;if(2>b||36h.length;)h="0"+h;d=""+h+d}};c.mathObj.Long.prototype.getHighBits=function(){return this.highBits};c.mathObj.Long.prototype.getLowBits=function(){return this.lowBits};c.mathObj.Long.prototype.getLowBitsUnsigned=function(){return 0<=this.lowBits?this.lowBits:c.mathObj.Long.TWO_PWR_32_DBL_+this.lowBits};c.mathObj.Long.prototype.getNumBitsAbs=function(){if(this.isNegative())return this.equals(c.mathObj.Long.MIN_VALUE)?64:this.negate().getNumBitsAbs();for(var a=0!==this.highBits?this.highBits:this.lowBits,b=31;0this.highBits};c.mathObj.Long.prototype.isOdd=function(){return 1===(this.lowBits&1)};c.mathObj.Long.prototype.equals=function(a){return this.highBits===a.highBits&&this.lowBits===a.lowBits};c.mathObj.Long.prototype.notEquals=function(a){return this.highBits!==a.highBits||this.lowBits!==a.lowBits};c.mathObj.Long.prototype.lessThan=function(a){return 0>this.compare(a)};c.mathObj.Long.prototype.lessThanOrEqual=function(a){return 0>=this.compare(a)};c.mathObj.Long.prototype.greaterThan=function(a){return 0>>16,f=this.highBits&65535,d=this.lowBits>>>16,e=a.highBits>>>16,g=a.highBits&65535,h=a.lowBits>>>16,k;k=0+((this.lowBits&65535)+(a.lowBits&65535));a=0+(k>>>16);a+=d+h;d=0+(a>>>16);d+=f+g;f=0+(d>>>16);f=f+(b+e)&65535;return c.mathObj.Long.fromBits((a&65535)<<16|k&65535,f<<16|d&65535)};c.mathObj.Long.prototype.subtract=function(a){return this.add(a.negate())};c.mathObj.Long.prototype.multiply=function(a){if(this.isZero()||a.isZero())return c.mathObj.Long.ZERO;if(this.equals(c.mathObj.Long.MIN_VALUE))return a.isOdd()?c.mathObj.Long.MIN_VALUE:c.mathObj.Long.ZERO;if(a.equals(c.mathObj.Long.MIN_VALUE))return this.isOdd()?c.mathObj.Long.MIN_VALUE:c.mathObj.Long.ZERO;if(this.isNegative())return a.isNegative()?this.negate().multiply(a.negate()):this.negate().multiply(a).negate();if(a.isNegative())return this.multiply(a.negate()).negate();if(this.lessThan(c.mathObj.Long.TWO_PWR_24_)&&a.lessThan(c.mathObj.Long.TWO_PWR_24_))return c.mathObj.Long.fromNumber(this.toNumber()*a.toNumber());var b=this.highBits>>>16,f=this.highBits&65535,d=this.lowBits>>>16,e=this.lowBits&65535,g=a.highBits>>>16,h=a.highBits&65535,k=a.lowBits>>>16;a=a.lowBits&65535;var l,m,n,q;q=0+e*a;n=0+(q>>>16);n+=d*a;m=0+(n>>>16);n=(n&65535)+e*k;m+=n>>>16;n&=65535;m+=f*a;l=0+(m>>>16);m=(m&65535)+d*k;l+=m>>>16;m&=65535;m+=e*h;l+=m>>>16;m&=65535;l=l+(b*a+f*k+d*h+e*g)&65535;return c.mathObj.Long.fromBits(n<<16|q&65535,l<<16|m)};c.mathObj.Long.prototype.div=function(a){if(a.isZero())throw Error("division by zero");if(this.isZero())return c.mathObj.Long.ZERO;var b,f;if(this.equals(c.mathObj.Long.MIN_VALUE)){if(a.equals(c.mathObj.Long.ONE)||a.equals(c.mathObj.Long.NEG_ONE))return c.mathObj.Long.MIN_VALUE;if(a.equals(c.mathObj.Long.MIN_VALUE))return c.mathObj.Long.ONE;b=this.shiftRight(1).div(a).shiftLeft(1);if(b.equals(c.mathObj.Long.ZERO))return a.isNegative()?c.mathObj.Long.ONE:c.mathObj.Long.NEG_ONE;f=this.subtract(a.multiply(b));return b.add(f.div(a))}if(a.equals(c.mathObj.Long.MIN_VALUE))return c.mathObj.Long.ZERO;if(this.isNegative())return a.isNegative()?this.negate().div(a.negate()):this.negate().div(a).negate();if(a.isNegative())return this.div(a.negate()).negate();var d=c.mathObj.Long.ZERO;for(f=this;f.greaterThanOrEqual(a);){b=Math.max(1,Math.floor(f.toNumber()/a.toNumber()));for(var e=Math.ceil(Math.log(b)/Math.LN2),e=48>=e?1:Math.pow(2,e-48),g=c.mathObj.Long.fromNumber(b),h=g.multiply(a);h.isNegative()||h.greaterThan(f);)b-=e,g=c.mathObj.Long.fromNumber(b),h=g.multiply(a);g.isZero()&&(g=c.mathObj.Long.ONE);d=d.add(g);f=f.subtract(h)}return d};c.mathObj.Long.prototype.modulo=function(a){return this.subtract(this.div(a).multiply(a))};c.mathObj.Long.prototype.not=function(){return c.mathObj.Long.fromBits(~this.lowBits,~this.highBits)};c.mathObj.Long.prototype.and=function(a){return c.mathObj.Long.fromBits(this.lowBits&a.lowBits,this.highBits&a.highBits)};c.mathObj.Long.prototype.or=function(a){return c.mathObj.Long.fromBits(this.lowBits|a.lowBits,this.highBits|a.highBits)};c.mathObj.Long.prototype.xor=function(a){return c.mathObj.Long.fromBits(this.lowBits^a.lowBits,this.highBits^a.highBits)};c.mathObj.Long.prototype.shiftLeft=function(a){a&=63;if(0===a)return this;var b=this.lowBits;return 32>a?c.mathObj.Long.fromBits(b<>>32-a):c.mathObj.Long.fromBits(0,b<a?c.mathObj.Long.fromBits(this.lowBits>>>a|b<<32-a,b>>a):c.mathObj.Long.fromBits(b>>a-32,0<=b?0:-1)};c.mathObj.Long.prototype.shiftRightUnsigned=function(a){a&=63;if(0===a)return this;var b=this.highBits;return 32>a?c.mathObj.Long.fromBits(this.lowBits>>>a|b<<32-a,b>>>a):32===a?c.mathObj.Long.fromBits(b,0):c.mathObj.Long.fromBits(b>>>a-32,0)};return c};e.jqx.math=function(){var a={},c=new e.jqx.longInt;a.getDecimalNotation=function(a,c){function b(a){for(var c="",f=0;fMath.max(d.dataview.totalrows,d.dataview.totalrecords)&&d.autoheight?m=Math.max(d.dataview.totalrows,d.dataview.totalrecords):d.autoheight||d.dataview.totalrows=parseInt(d._oldHeight)&&(d.prerenderrequired=!0);d._renderrows(d.virtualsizeinfo);d.rtl&&(d._updatecolumnwidths(),d.table&&d.table.width(d.columnsheader.width()),d._updatecellwidths())}k!=d.vScrollBar.css("visibility")&&(d.vScrollInstance.setPosition(0),d._arrange(),d._updatecolumnwidths(),d.table&&d.table.width(d.columnsheader.width()),d._updatecellwidths())}}if(g!=d._oldWidth||1==a){k=!1;if(d.editcell&&d.editcell.editor)switch(d.editcell.columntype){case "dropdownlist":if(k=d.editcell.editor.jqxDropDownList("isOpened")||d.editcell.editor.jqxDropDownList("isanimating")&&!d.editcell.editor.jqxDropDownList("ishiding")){d.editcell.editor.jqxDropDownList({openDelay:0});d.editcell.editor.jqxDropDownList("open");d.editcell.editor.jqxDropDownList({openDelay:250});return}break;case "combobox":if(k=d.editcell.editor.jqxComboBox("isOpened")||d.editcell.editor.jqxComboBox("isanimating")&&!d.editcell.editor.jqxComboBox("ishiding")){d.editcell.editor.jqxComboBox({openDelay:0});d.editcell.editor.jqxComboBox("open");d.editcell.editor.jqxComboBox({openDelay:250});return}break;case "datetimeinput":if(k){d.editcell.editor.jqxDateTimeInput("isOpened")||d.editcell.editor.jqxDateTimeInput("isanimating")&&d.editcell.editor.jqxDateTimeInput("ishiding");d.editcell.editor.jqxDateTimeInput({openDelay:0});d.editcell.editor.jqxDateTimeInput("open");d.editcell.editor.jqxDateTimeInput({openDelay:250});return}}k=d.hScrollBar.css("visibility");d._arrange();d._updatecolumnwidths();d.table&&d.table.width(d.columnsheader.width());d._updatecellwidths();0==a&&d._oldWidth>g||b&&0!=d.dataview.rows.length||d._renderrows(d.virtualsizeinfo);k!=d.hScrollBar.css("visibility")&&d.hScrollInstance.setPosition(0)}d._oldWidth=g;d._oldHeight=n;d.resizingGrid=!1}},5)}},getTouches:function(a){return e.jqx.mobile.getTouches(a)},_updateTouchScrolling:function(){var a=this.that;if(a.isTouchDevice()){a.scrollmode="logical";a.vScrollInstance.thumbStep=a.rowsheight;var b=e.jqx.mobile.getTouchEventName("touchstart"),d=e.jqx.mobile.getTouchEventName("touchend"),g=e.jqx.mobile.getTouchEventName("touchmove");a.enablehover=!1;a.gridcontent&&(a.removeHandler(a.gridcontent,b+".touchScroll"),a.removeHandler(a.gridcontent,g+".touchScroll"),a.removeHandler(a.gridcontent,d+".touchScroll"),a.removeHandler(a.gridcontent,"touchcancel.touchScroll"),e.jqx.mobile.touchScroll(a.gridcontent[0],a.vScrollInstance.max,function(b,f){if("visible"==a.vScrollBar.css("visibility")){var d=a.vScrollInstance.value;a.vScrollInstance.setPosition(d+f)}"visible"==a.hScrollBar.css("visibility")&&(d=a.hScrollInstance.value,a.hScrollInstance.setPosition(d+b));a.vScrollInstance.thumbCapture=!0;a._lastScroll=new Date},this.element.id,this.hScrollBar,this.vScrollBar),a._overlayElement&&(a.removeHandler(a._overlayElement,b+".touchScroll"),a.removeHandler(a._overlayElement,g+".touchScroll"),a.removeHandler(a._overlayElement,d+".touchScroll"),a.removeHandler(a._overlayElement,"touchcancel.touchScroll"),e.jqx.mobile.touchScroll(a._overlayElement[0],a.vScrollInstance.max,function(b,f){if("visible"==a.vScrollBar.css("visibility")){var d=a.vScrollInstance.value;a.vScrollInstance.setPosition(d+f)}"visible"==a.hScrollBar.css("visibility")&&(d=a.hScrollInstance.value,a.hScrollInstance.setPosition(d+b));a.vScrollInstance.thumbCapture=!0;a._lastScroll=new Date},this.element.id,this.hScrollBar,this.vScrollBar),this.addHandler(this.host,b,function(){a.editcell?a._overlayElement.css("visibility","hidden"):a._overlayElement.css("visibility","visible")}),this.addHandler(this.host,d,function(){a.editcell?a._overlayElement.css("visibility","hidden"):a._overlayElement.css("visibility","visible")})))}},isTouchDevice:function(){if(void 0!=this.touchDevice)return this.touchDevice;var a=e.jqx.mobile.isTouchDevice();this.touchDevice=a;if(1==this.touchmode){if(e.jqx.browser.msie&&9>e.jqx.browser.version)return this.enablehover=!1;a=!0;e.jqx.mobile.setMobileSimulator(this.element);this.touchDevice=a}else 0==this.touchmode&&(a=!1);a&&0!=this.touchModeStyle&&(this.touchDevice=!0,this.host.addClass(this.toThemeProperty("jqx-touch")),this.host.find("jqx-widget-content").addClass(this.toThemeProperty("jqx-touch")),this.host.find("jqx-widget-header").addClass(this.toThemeProperty("jqx-touch")),this.scrollbarsize=this.touchscrollbarsize);return a},toTP:function(a){return this.toThemeProperty(a)},localizestrings:function(a,b){this._cellscache=[];e.jqx.dataFormat&&e.jqx.dataFormat.cleardatescache();if(this._loading)throw Error("jqxGrid: "+this.loadingerrormessage);if(null!=a){for(var d in a)d.toLowerCase()!==d&&(a[d.toLowerCase()]=a[d]);a.pagergotopagestring&&(this.gridlocalization.pagergotopagestring=a.pagergotopagestring);a.pagershowrowsstring&&(this.gridlocalization.pagershowrowsstring=a.pagershowrowsstring);a.pagerrangestring&&(this.gridlocalization.pagerrangestring=a.pagerrangestring);a.pagernextbuttonstring&&(this.gridlocalization.pagernextbuttonstring=a.pagernextbuttonstring);a.pagerpreviousbuttonstring&&(this.gridlocalization.pagerpreviousbuttonstring=a.pagerpreviousbuttonstring);a.pagerfirstbuttonstring&&(this.gridlocalization.pagerfirstbuttonstring=a.pagerfirstbuttonstring);a.pagerlastbuttonstring&&(this.gridlocalization.pagerlastbuttonstring=a.pagerlastbuttonstring);a.groupsheaderstring&&(this.gridlocalization.groupsheaderstring=a.groupsheaderstring);a.sortascendingstring&&(this.gridlocalization.sortascendingstring=a.sortascendingstring);a.sortdescendingstring&&(this.gridlocalization.sortdescendingstring=a.sortdescendingstring);a.sortremovestring&&(this.gridlocalization.sortremovestring=a.sortremovestring);a.groupbystring&&(this.gridlocalization.groupbystring=a.groupbystring);a.groupremovestring&&(this.gridlocalization.groupremovestring=a.groupremovestring);a.firstDay&&(this.gridlocalization.firstDay=a.firstDay);a.days&&(this.gridlocalization.days=a.days);a.months&&(this.gridlocalization.months=a.months);a.AM&&(this.gridlocalization.AM=a.AM);a.PM&&(this.gridlocalization.PM=a.PM);a.patterns&&(this.gridlocalization.patterns=a.patterns);a.percentsymbol&&(this.gridlocalization.percentsymbol=a.percentsymbol);a.currencysymbol&&(this.gridlocalization.currencysymbol=a.currencysymbol);a.currencysymbolposition&&(this.gridlocalization.currencysymbolposition=a.currencysymbolposition);void 0!=a.decimalseparator&&(this.gridlocalization.decimalseparator=a.decimalseparator);void 0!=a.thousandsseparator&&(this.gridlocalization.thousandsseparator=a.thousandsseparator);a.filterclearstring&&(this.gridlocalization.filterclearstring=a.filterclearstring);a.filterstring&&(this.gridlocalization.filterstring=a.filterstring);a.filtershowrowstring&&(this.gridlocalization.filtershowrowstring=a.filtershowrowstring);a.filtershowrowdatestring&&(this.gridlocalization.filtershowrowdatestring=a.filtershowrowdatestring);a.filterselectallstring&&(this.gridlocalization.filterselectallstring=a.filterselectallstring);a.filterchoosestring&&(this.gridlocalization.filterchoosestring=a.filterchoosestring);a.filterorconditionstring&&(this.gridlocalization.filterorconditionstring=a.filterorconditionstring);a.filterandconditionstring&&(this.gridlocalization.filterandconditionstring=a.filterandconditionstring);a.filterstringcomparisonoperators&&(this.gridlocalization.filterstringcomparisonoperators=a.filterstringcomparisonoperators);a.filternumericcomparisonoperators&&(this.gridlocalization.filternumericcomparisonoperators=a.filternumericcomparisonoperators);a.filterdatecomparisonoperators&&(this.gridlocalization.filterdatecomparisonoperators=a.filterdatecomparisonoperators);a.filterbooleancomparisonoperators&&(this.gridlocalization.filterbooleancomparisonoperators=a.filterbooleancomparisonoperators);a.emptydatastring&&(this.gridlocalization.emptydatastring=a.emptydatastring);a.filterselectstring&&(this.gridlocalization.filterselectstring=a.filterselectstring);a.todaystring&&(this.gridlocalization.todaystring=a.todaystring);a.clearstring&&(this.gridlocalization.clearstring=a.clearstring);a.validationstring&&(this.gridlocalization.validationstring=a.validationstring);a.loadtext&&(this.gridlocalization.loadtext=a.loadtext);a.addrowstring&&(this.gridlocalization.addrowstring=a.addrowstring);a.udpaterowstring&&(this.gridlocalization.udpaterowstring=a.udpaterowstring);a.deleterowstring&&(this.gridlocalization.deleterowstring=a.deleterowstring);a.resetrowstring&&(this.gridlocalization.resetrowstring=a.resetrowstring);a.everpresentrowplaceholder&&(this.gridlocalization.everpresentrowplaceholder=a.everpresentrowplaceholder);if(!1!==b){this._initpager&&this._initpager();this._initgroupsheader&&this._initgroupsheader();this._initmenu&&this._initmenu();this._builddataloadelement();e(this.dataloadelement).css("visibility","hidden");e(this.dataloadelement).css("display","none");if(this.filterable&&this.showfilterrow&&this._updatefilterrow){for(d in this._filterrowcache)e(this._filterrowcache[d]).remove();this._filterrowcache=[];this._updatefilterrow()}this.showaggregates&&this.refresheaggregates&&this.refresheaggregates();this._renderrows(this.virtualsizeinfo)}}else this.gridlocalization={"/":"/",":":":",firstDay:0,days:{names:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),namesAbbr:"Sun Mon Tue Wed Thu Fri Sat".split(" "),namesShort:"Su Mo Tu We Th Fr Sa".split(" ")},months:{names:"January February March April May June July August September October November December ".split(" "),namesAbbr:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ".split(" ")},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",ISO:"yyyy-MM-dd hh:mm:ss",ISO2:"yyyy-MM-dd HH:mm:ss",d1:"dd.MM.yyyy",d2:"dd-MM-yyyy",d3:"dd-MMMM-yyyy",d4:"dd-MM-yy",d5:"H:mm",d6:"HH:mm",d7:"HH:mm tt",d8:"dd/MMMM/yyyy",d9:"MMMM-dd",d10:"MM-dd",d11:"MM-dd-yyyy"},percentsymbol:"%",currencysymbol:"$",currencysymbolposition:"before",decimalseparator:".",thousandsseparator:",",pagergotopagestring:"Go to page:",pagershowrowsstring:"Show rows:",pagerrangestring:" of ",pagerpreviousbuttonstring:"previous",pagernextbuttonstring:"next",pagerfirstbuttonstring:"first",pagerlastbuttonstring:"last",groupsheaderstring:"Drag a column and drop it here to group by that column",sortascendingstring:"Sort Ascending",sortdescendingstring:"Sort Descending",sortremovestring:"Remove Sort",groupbystring:"Group By this column",groupremovestring:"Remove from groups",filterclearstring:"Clear",filterstring:"Filter",filtershowrowstring:"Show rows where:",filtershowrowdatestring:"Show rows where date:",filterorconditionstring:"Or",filterandconditionstring:"And",filterselectallstring:"(Select All)",filterchoosestring:"Please Choose:",filterstringcomparisonoperators:"empty;not empty;contains;contains(match case);does not contain;does not contain(match case);starts with;starts with(match case);ends with;ends with(match case);equal;equal(match case);null;not null".split(";"),filternumericcomparisonoperators:"equal;not equal;less than;less than or equal;greater than;greater than or equal;null;not null".split(";"),filterdatecomparisonoperators:"equal;not equal;less than;less than or equal;greater than;greater than or equal;null;not null".split(";"),filterbooleancomparisonoperators:["equal","not equal"],validationstring:"Entered value is not valid",emptydatastring:"No data to display",filterselectstring:"Select Filter",loadtext:"Loading...",clearstring:"Clear",todaystring:"Today",addrowstring:"Add",udpaterowstring:"Update",deleterowstring:"Delete",resetrowstring:"Reset",everpresentrowplaceholder:"Enter "}},_getmenudefaultheight:function(){var a=0;this.sortable&&this._togglesort&&this.showsortmenuitems&&(a=3);this.groupable&&this._initgroupsheader&&this.showgroupmenuitems&&(a+=2);var b=this._measureMenuElement(),a=a*b+9;this.filterable&&!this.showfilterrow&&this.showfiltermenuitems&&(a+=180,e.jqx.browser.msie&&8>e.jqx.browser.version&&(a+=20));return a},_initmenu:function(){var a=this.that;if(this.host.jqxMenu){if(this.gridmenu){if(this._hasOpenedMenu)return;this.filterable&&this._destroyfilterpanel&&this._destroyfilterpanel();this.removeHandler(this.gridmenu,"keydown");this.removeHandler(this.gridmenu,"closed");this.removeHandler(this.gridmenu,"itemclick");this.gridmenu.jqxMenu("destroy");this.gridmenu.removeData();this.gridmenu.remove()}this.menuitemsarray=[];this.gridmenu=e('\x3cdiv id\x3d"gridmenu'+this.element.id+'" style\x3d"z-index: 9999999999999;"\x3e\x3c/div\x3e');this.host.append(this.gridmenu);var b=e("\x3cul\x3e\x3c/ul\x3e"),d=e('\x3cli\x3e\x3cdiv class\x3d"jqx-grid-sortasc-icon"\x3e\x3c/div\x3e'+this.gridlocalization.sortascendingstring+"\x3c/li\x3e"),g=e('\x3cli\x3e\x3cdiv class\x3d"jqx-grid-sortdesc-icon"\x3e\x3c/div\x3e'+this.gridlocalization.sortdescendingstring+"\x3c/li\x3e"),h=e('\x3cli\x3e\x3cdiv class\x3d"jqx-grid-sortremove-icon"\x3e\x3c/div\x3e'+this.gridlocalization.sortremovestring+"\x3c/li\x3e"),l=e('\x3cli\x3e\x3cdiv class\x3d"jqx-grid-groupby-icon"\x3e\x3c/div\x3e'+this.gridlocalization.groupbystring+"\x3c/li\x3e"),k=e('\x3cli\x3e\x3cdiv class\x3d"jqx-grid-groupby-icon"\x3e\x3c/div\x3e'+this.gridlocalization.groupremovestring+"\x3c/li\x3e"),m=e('\x3cli type\x3d"separator"\x3e\x3c/li\x3e'),n=e('\x3cli class\x3d"filter" style\x3d"height: 175px;" ignoretheme\x3d"true"\x3e\x3cdiv class\x3d"filter"\x3e\x3c/div\x3e\x3c/li\x3e'),p=this.gridlocalization.sortascendingstring.length,q=this.gridlocalization.sortascendingstring;this.gridlocalization.sortdescendingstring.length>p&&(p=this.gridlocalization.sortdescendingstring.length,q=this.gridlocalization.sortdescendingstring);this.gridlocalization.sortremovestring.length>p&&(p=this.gridlocalization.sortremovestring.length,q=this.gridlocalization.sortremovestring);this.groupable&&this._initgroupsheader&&this.showgroupmenuitems&&(this.gridlocalization.groupbystring.length>p&&(p=this.gridlocalization.groupbystring.length,q=this.gridlocalization.groupbystring),this.gridlocalization.groupremovestring.length>p&&(p=this.gridlocalization.groupremovestring.length,q=this.gridlocalization.groupremovestring));p=200;q=e.trim(q).replace(/\ \;/ig,"").replace(/\ \;/ig,"");q=e("\x3cspan\x3e"+q+"\x3c/span\x3e");q.addClass(this.toThemeProperty("jqx-menu-item"));this.host.append(q);p=q.outerWidth()+60;q.remove();q=0;this.sortable&&this._togglesort&&this.showsortmenuitems&&(b.append(d),this.menuitemsarray[0]=d[0],b.append(g),this.menuitemsarray[1]=g[0],b.append(h),this.menuitemsarray[2]=h[0],q=3);this.groupable&&this._initgroupsheader&&this.showgroupmenuitems&&(b.append(l),this.menuitemsarray[3]=l[0],b.append(k),this.menuitemsarray[4]=k[0],q+=2);var r=this._measureMenuElement(),q=q*r+9,r=!0;if(this.filterable&&!this.showfilterrow&&this.showfiltermenuitems)if(this._initfilterpanel)this.menuitemsarray[5]=n[0],this.menuitemsarray[6]=n[0],b.append(m),b.append(n),q+=180,e.jqx.browser.msie&&8>e.jqx.browser.version&&(q+=20),m=e(n).find("div:first"),this.excelfilterpanel=e("\x3cdiv\x3e\x3c/div\x3e"),this.filterpanel=m,this.filtermenu=e(n),p+=20,this._initfilterpanel(this,m,"",p),this._initfilterpanel(this,this.excelfilterpanel,"",p,!0),r=!1,this.removeHandler(e(document),"click.menu"+a.element.id,a._closemenuafterclick,a),this.addHandler(e(document),"click.menu"+a.element.id,a._closemenuafterclick,a);else throw Error("jqxGrid: Missing reference to jqxgrid.filter.js.");this.gridmenu.append(b);e.jqx.browser.msie&&8>e.jqx.browser.version&&this.filterable&&(e("#listBoxfilter1"+this.element.id).css("z-index",4990),e("#listBoxfilter2"+this.element.id).css("z-index",4990),e("#listBoxfilter3"+this.element.id).css("z-index",4990),e("#gridmenu"+this.element.id).css("z-index",5E3),this.addHandler(e("#gridmenu"+this.element.id),"initialized",function(){e("#menuWrappergridmenu"+a.element.id).css("z-index",4980)}));void 0==this.menuitemsarray[0]&&(q=65);this.removeHandler(e(window),"orientationchange.jqxgrid"+this.element.id);this.removeHandler(e(window),"orientationchanged.jqxgrid"+this.element.id);this.addHandler(e(window),"orientationchange.jqxgrid"+this.element.id,function(){a.gridmenu.jqxMenu("close")});this.addHandler(e(window),"orientationchanged.jqxgrid"+this.element.id,function(){a.gridmenu.jqxMenu("close")});this.removeHandler(this.gridmenu,"keydown");this.addHandler(this.gridmenu,"keydown",function(b){if(27==b.keyCode)a.gridmenu.jqxMenu("close");else if(13==b.keyCode&&a.filterable&&a._buildfilter){b="block"==e(e.find("#filter1"+a.element.id)).jqxDropDownList("container").css("display");var f="block"==e(e.find("#filter2"+a.element.id)).jqxDropDownList("container").css("display"),d="block"==e(e.find("#filter3"+a.element.id)).jqxDropDownList("container").css("display");e(e.find("#filterclearbutton"+a.element.id)).hasClass("jqx-fill-state-focus")?(b=e.data(document.body,"contextmenu"+a.element.id).column,a._clearfilter(a,a.element,b),a.gridmenu.jqxMenu("close")):b||f||d||(b=e.data(document.body,"contextmenu"+a.element.id).column,a.gridmenu.jqxMenu("close"),a._buildfilter(a,n,b))}});"auto"!=this.popupwidth&&(p=this.popupwidth);this.gridmenu.jqxMenu({popupZIndex:999999,width:p,height:q,autoCloseOnClick:r,autoOpenPopup:!1,mode:"popup",theme:this.theme,animationShowDuration:0,animationHideDuration:0,animationShowDelay:0});this.filterable&&this.gridmenu.jqxMenu("_setItemProperty",n[0].id,"closeOnClick",!1);if(this.rtl){var t=this.that;e.each(b.find("li"),function(){e(this).addClass(t.toTP("jqx-rtl"))});b=function(a){a=a.find("div");a.css("float","right");a.css("margin-left","4px");a.css("margin-right","-4px")};b(h);b(g);b(d);b(l);b(k)}this._handlemenueevents()}else this.columnsmenu=!1},_arrangemenu:function(){this.gridmenu||this._initmenu();var a=this.gridlocalization.sortascendingstring.length,b=this.gridlocalization.sortascendingstring;this.gridlocalization.sortdescendingstring.length>a&&(a=this.gridlocalization.sortdescendingstring.length,b=this.gridlocalization.sortdescendingstring);this.gridlocalization.sortremovestring.length>a&&(a=this.gridlocalization.sortremovestring.length,b=this.gridlocalization.sortremovestring);this.groupable&&this._initgroupsheader&&(this.gridlocalization.groupbystring.length>a&&(a=this.gridlocalization.groupbystring.length,b=this.gridlocalization.groupbystring),this.gridlocalization.groupremovestring.length>a&&(b=this.gridlocalization.groupremovestring));a=200;b=e.trim(b).replace(/\ \;/ig,"").replace(/\ \;/ig,"");b=e("\x3cspan\x3e"+b+"\x3c/span\x3e");b.addClass(this.toThemeProperty("jqx-menu-item"));this.host.append(b);a=b.outerWidth()+60;b.remove();b=0;this.sortable&&this._togglesort&&this.showsortmenuitems&&(b=3);this.groupable&&this._initgroupsheader&&this.showgroupmenuitems&&(b+=2);b=27*b+3;this.filterable&&this.showfiltermenuitems&&this._initfilterpanel&&(b+=180,a+=20,e.jqx.browser.msie&&8>e.jqx.browser.version&&(b+=20));void 0==this.menuitemsarray[0]&&(b=65);"auto"!=this.popupwidth&&(a=this.popupwidth);"auto"!=this.popupheight&&(b=this.popupheight);this.gridmenu.jqxMenu({width:a,height:b})},_closemenuafterclick:function(a){var b=null!=a?a.data:this,d=!1;if(void 0==a.target||void 0!=a.target&&void 0==a.target.className.indexOf)b.gridmenu.jqxMenu("close");else if(-1==a.target.className.indexOf("filter")||-1!=a.target.className.indexOf("jqx-grid-cell-filter"))if(-1!=a.target.className.indexOf("jqx-grid-cell"))b.gridmenu.jqxMenu("close");else if(!b._hasOpenedMenu||!e(a.target).ischildof(b.gridmenu)){b.host.coord();var g=b.gridmenu.coord(),h=a.pageX,l=a.pageY;e.each(e(a.target).parents(),function(){if(null!=this.id&&this.id.indexOf&&-1!=this.id.indexOf("filter")||this.className.indexOf&&-1!=this.className.indexOf("filter")&&-1==this.className.indexOf("jqx-grid-cell-filter"))return d=!0,!1;if(this.className.indexOf&&-1!=this.className.indexOf("jqx-grid-cell")||this.className.indexOf&&-1!=this.className.indexOf("jqx-grid-column"))return b.gridmenu.jqxMenu("close"),!1});if(!d){try{if("default"===b.filtermode){var k=e(e.find("#filter1"+b.element.id)).jqxDropDownList("listBox").vScrollInstance._mouseup,m=new Date;if(100>m-k)return;var n=e(e.find("#filter3"+b.element.id)).jqxDropDownList("listBox").vScrollInstance._mouseup;if(100>m-n||"block"==e(e.find("#filter3"+b.element.id)).jqxDropDownList("container").css("display")||"block"==e(e.find("#filter1"+b.element.id)).jqxDropDownList("container").css("display")||"block"==e(e.find("#filter2"+b.element.id)).jqxDropDownList("container").css("display")||b._hasdatefilter&&"div"==e(".filtertext1"+b.element.id)[0].nodeName.toLowerCase()&&("block"==e(".filtertext1"+b.element.id).jqxDateTimeInput("container").css("display")||"block"==e(".filtertext2"+b.element.id).jqxDateTimeInput("container").css("display")))return}else{k=e(e.find("#filter1"+b.element.id)).data().jqxListBox.instance.vScrollInstance._mouseup;m=new Date;if(100>m-k)return;n=e(e.find("#filter1"+b.element.id)).data().jqxListBox.instance.hScrollInstance._mouseup;if(100>m-n)return}}catch(p){}h>=g.left&&h<=g.left+b.gridmenu.width()&&l>=g.top&&l<=g.top+b.gridmenu.height()||b.gridmenu.jqxMenu("close")}}},_handlemenueevents:function(){var a=this.that;this.removeHandler(this.gridmenu,"closed");this.addHandler(this.gridmenu,"closed",function(b){a._closemenu()});this.removeHandler(this.gridmenu,"itemclick");this.addHandler(this.gridmenu,"itemclick",function(b){var d=b.args;for(b=0;bh+l+2&&(this.scrolltop(m-l),e=!0)}else if(this.pageable){m=k*this.rowsheight;if(this.rowdetails)for(n=b*d;nh+l)this.scrollto(0,m),e=!0}return e},ensurecellvisible:function(a,b){var d=this.that,g=this.hScrollBar.jqxScrollBar("value"),h=d.hScrollInstance.max;d.rtl&&"visible"!=this.hScrollBar.css("visibility")&&(h=0);var l=this.ensurerowvisible(a),k=0;if(this.columns.records){if("hidden"==this.hScrollBar.css("visibility"))return;var m=this.host.width(),n=0,p="visible"==this.vScrollBar.css("visibility")?20:0,q=!1;e.each(this.columns.records,function(){if(this.hidden)return!0;if(this.datafield==b){var a=0,a=d.rtl?h-g:g;k+this.width>a+m-p?(a=k+this.width-m+p,d.rtl&&(a=h-a),d.scrollleft(a),q=!0):k<=a&&(a=k-this.width,d.rtl&&(a=h-a),d.scrollleft(a),q=!0);0==n?(d.rtl?d.scrollleft(h):d.scrollleft(0),q=!0):n==d.columns.records.length-1&&"visible"==d.hScrollBar.css("visibility")&&(d.rtl?d.scrollleft(d.hScrollBar.jqxScrollBar("min")):d.scrollleft(d.hScrollBar.jqxScrollBar("max")),q=!0);return!1}n++;k+=this.width});q||d.scrollleft(g)}return l},setrowheight:function(a,f){if(this._loading)throw Error("jqxGrid: "+this.loadingerrormessage);if(null==a||null==f)return!1;this.heightboundrows[a]={index:a,height:f};a=this.getrowvisibleindex(a);if(0>a)return!1;this.rows.records[a]?this.rows.records[a].height=f:(row=new b(this,null),row.height=f,this.rows.replace(a,row));this.heights[a]=f;this.rendergridcontent(!0);return!0},getrowheight:function(a){if(null==a)return null;a=this.getrowvisibleindex(a);if(0>a)return!1;if(this.rows.records[a])return this.rows.records[a].height},setrowdetails:function(a,b,d,g){if(!(void 0==a||null==a||0>a)){var h=a+"_";this._rowdetailscache[h]&&(e(this._rowdetailscache[h].element).remove(),this._rowdetailscache[h]=null);h=this.dataview.generatekey();this.detailboundrows[a]={index:a,details:{rowdetails:b,rowdetailsheight:d,rowdetailshidden:g,key:h}};a=this.getrowvisibleindex(a);return 0>a?!1:this._setrowdetails(a,b,d,g,h)}},getcolumn:function(a){var b=null;this.columns.records&&e.each(this.columns.records,function(){if(this.datafield==a||this.displayfield==a)return b=this,!1});return b},_getcolumnindex:function(a){var b=-1;this.columns.records&&e.each(this.columns.records,function(){b++;if(this.datafield==a)return!1});return b},_getcolumnat:function(a){return this.columns.records[a]},_getprevvisiblecolumn:function(a){for(var b=this.that;0a)return!1;if(this.details[a])return this.details[a];if(this.rowdetailstemplate)return this.rowdetailstemplate},getrecordscount:function(){return this.dataview.totalrecords},showrowdetails:function(a){if(this._loading)throw Error("jqxGrid: "+this.loadingerrormessage);if(null==a)return!1;a=this.getrowvisibleindex(a);if(0>a)return!1;var b=this._getrowdetails(a);return this._setrowdetailsvisibility(a,b,!1)},hiderowdetails:function(a){if(this._loading)throw Error("jqxGrid: "+this.loadingerrormessage);a=this.getrowvisibleindex(a);if(0>a)return!1;var b=this._getrowdetails(a);return this._setrowdetailsvisibility(a,b,!0)},_togglerowdetails:function(a){var b=a.visibleindex,d=this._getrowdetails(b);return null!=d?(a=this.vScrollInstance.value,b=this._setrowdetailsvisibility(b,d,!d.rowdetailshidden),0!==a&&"hidden"!==this.vScrollBar.css("visibility")&&(a<=this.vScrollInstance.max?this.vScrollInstance.setPosition(a):this.vScrollInstance.setPosition(this.vScrollInstance.max)),b):!1},_setrowdetailsvisibility:function(a,b,d){if(this.rowdetailstemplate&&(this.details||(this.details=[]),!this.details[a])){this.details[a]={rowdetailshidden:this.rowdetailstemplate.rowdetailshidden,rowdetailsheight:this.rowdetailstemplate.rowdetailsheight,rowdetails:this.rowdetailstemplate.rowdetails};var e=this.dataview.generatekey();this.details[a].detailskey=e;this.detailboundrows[a]={index:a,details:this.details[a]}}if(null!=b)this.details[a].rowdetailshidden=d;else return!1;b=this.details[a];d?this._raiseEvent(21,{rowindex:a,details:b.rowdetails,height:b.rowdetailsheight}):this._raiseEvent(20,{rowindex:a,details:b.rowdetails,height:b.rowdetailsheight});return this._setrowdetails(a,b.rowdetails,b.rowdetailsheight,b.rowdetailshidden)},getrowvisibleindex:function(a){return void 0==a||null==a||0>a?!1:this.virtualmode?(a=this.dataview.loadedrecords[a],void 0==a?-1:a.visibleindex):this.getrowdisplayindex(a)},hiderow:function(a){if(this._loading)throw Error("jqxGrid: "+this.loadingerrormessage);if(void 0==a||null==a||0>a||null==a)return!1;this.hiddenboundrows[a]={index:a,hidden:!0};a=this.getrowvisibleindex(a);return this._setrowvisibility(a,!0)},showrow:function(a){if(this._loading)throw Error("jqxGrid: "+this.loadingerrormessage);if(void 0==a||null==a||0>a||null==a)return!1;this.hiddenboundrows[a]={index:a,hidden:!1};a=this.getrowvisibleindex(a);return this._setrowvisibility(a,!1)},isrowhiddenat:function(a){if(null==a)return null;a=this.getrowvisibleindex(a);if(this.rows.records[a])return this.rows.records[a].hidden},_setrowvisibility:function(a,b,d){if(null==a)return!1;this.hiddens[a]=b;return void 0==d||d?(this.rendergridcontent(!0),!0):!1},_loadrows:function(){if(this._pageviews[this.dataview.pagenum]||this.pageable){var a=this.pageable?0:this._pageviews[this.dataview.pagenum].top;if(!this.pageable&&void 0!=this._pagescache[this.dataview.pagenum])return null;if(this.virtualsizeinfo){var f=this.that,d=[],e=[],h=f.groupable&&0=this.dataview.rows.length);m++){var n=this.dataview.rows[m],p=null;f.rows.records[n.visibleindex]?(p=f.rows.records[n.visibleindex],p.setdata(n)):p=new b(f,n);p.hidden=this.hiddens[p.visibleindex];this.rowdetailstemplate&&(p.rowdetails=this.rowdetailstemplate.rowdetails,p.rowdetailsheight=this.rowdetailstemplate.rowdetailsheight,p.rowdetailshidden=this.rowdetailstemplate.rowdetailshidden);var q=this.details[p.visibleindex];q?(p.rowdetails=q.rowdetails,p.rowdetailsheight=q.rowdetailsheight,p.rowdetailshidden=q.rowdetailshidden):this.rowdetailstemplate||(p.rowdetails=null);if(h&&this.pageable&&null!=p.parentbounddata){q=d[p.parentbounddata.uniqueid];if(null!=q){var r=this._findgroupstate(q.uniqueid);this._setsubgroupsvisibility&&this._setsubgroupsvisibility(this,p.parentbounddata,!r,!1);p.hidden=this.hiddens[p.visibleindex]}null!=q&&void 0!=q&&(p.parentrow=q,q.subrows[q.subrows.length++]=p)}p.hidden||(n=n.visibleindex,this.heights[n]||(this.heights[n]=this.rowsheight),p.height=this.heights[n],this.rowdetails&&p.rowdetails&&!p.rowdetailshidden&&(p.height+=p.rowdetailsheight),d[p.uniqueid]=p,e[l++]=p,p.top=a,a+=p.height,f.rows.replace(n,p))}(this.autoheight||this.pageable)&&this.autorowheight&&this._pageviews&&0h.maxwidth&&(l=h.maxwidth);var k=e(b[0].cells[g]);k.css("left",a);k.width();k.width(l);k[0].left=a;h.addnewrowwidget&&(k.html(""),k.append(h.addnewrowwidget));h.hidden&&h.hideable?k.css("display","none"):a+=l}d=this.everpresentrowactions.split(" ");this.addnewrowbutton.show();this.addnewrowupdatebutton.show();this.addnewrowresetbutton.show();this.addnewrowdeletebutton.show();-1==d.indexOf("add")&&-1==d.indexOf("addBottom")&&this.addnewrowbutton.hide();-1==d.indexOf("update")&&this.addnewrowupdatebutton.hide();-1==d.indexOf("reset")&&this.addnewrowresetbutton.hide();-1==d.indexOf("delete")&&this.addnewrowdeletebutton.hide();b=e(b.children()[0]);b.width(parseInt(a)+2);b.height(this.everpresentrowheight);b.css("max-height",this.everpresentrowheight+"px")},_removeaddnewrow:function(){for(var a=this.columns.records.length,b=0;bu.maxwidth&&(w=u.maxwidth);var x=e('\x3cdiv style\x3d"overflow: hidden; position: absolute; height: 100%;" class\x3d"'+l+'"\x3e\x3c/div\x3e');d.append(x);x.css("left",g);a.rtl?(x.css("z-index",k++),x.css("border-left-width","1px")):x.css("z-index",k--);"auto"==w&&(w=0);x[0].style.width=parseFloat(w)+"px";x[0].left=g;u.hidden&&u.hideable?x.css("display","none"):g+=w;m[m.length]=x[0];if(u.checkboxcolumn)u=a.toThemeProperty("jqx-grid-cell"),u+=" "+a.toThemeProperty("jqx-grid-cell-filter-row"),u+=" "+a.toThemeProperty("jqx-grid-cell-pinned"),x.removeClass().addClass(u);else{w=!0;if(a.rtl)a.groupable&&(z=a.showrowdetailscolumn&&a.rowdetails?1:0,a.groups.length+z+v>h-1&&(w=!1)),a.showrowdetailscolumn&&a.rowdetails&&v==h-1&&(w=!1);else{if(a.groupable){var z=a.showrowdetailscolumn&&a.rowdetails?1:0;a.groups.length+z>v&&(w=!1)}a.showrowdetailscolumn&&a.rowdetails&&0==v&&(w=!1)}a.updateeverpresentrow=function(){var b=null;if(0w&&(w=4),w+="px","addButtonColumn"===u.datafield?(u=e('\x3cdiv style\x3d"padding-bottom: 2px; text-align: center; margin-top: '+w+';"\x3e\x3ca href\x3d"#"\x3e'+a.gridlocalization.addrowstring+"\x3c/a\x3e\x3c/div\x3e"),x.append(u),u.mousedown(function(){p.trigger("mousedown")})):"resetButtonColumn"===u.datafield?(u=e('\x3cdiv style\x3d"padding-bottom: 2px; text-align: center; margin-top: '+w+';"\x3e\x3ca href\x3d"#"\x3e'+a.gridlocalization.resetrowstring+"\x3c/a\x3e\x3c/div\x3e"),x.append(u),u.mousedown(function(){t.trigger("mousedown")})):function(b,f,d){var g=e('\x3cinput style\x3d"box-sizing: border-box; padding-right: 4px; padding-left: 4px; border:none;" autocomplete\x3d"off" type\x3d"textarea"/\x3e');g[0].id=e.jqx.utilities.createId();g.addClass(b.toThemeProperty("jqx-widget"));g.addClass(b.toThemeProperty("jqx-input"));g.addClass(b.toThemeProperty("jqx-widget-content"));g.addClass(b.toThemeProperty("jqx-enableselect"));g.addClass(b.toThemeProperty("jqx-grid-cell-add-new-row"));g.css("text-align",d.cellsalign);b.rtl&&g.css("direction","rtl");b.disabled&&g.attr("disabled",!0);g.attr("disabled",!1);g.attr("placeholder",b.gridlocalization.everpresentrowplaceholder+d.text);g.appendTo(f);g.css("width","100%");g.css("height",b.everpresentrowheight+"px");g.css("line-height",b.everpresentrowheight+"px");g.css("max-height",b.everpresentrowheight+"px");g.css("margin","0px");g.focus(function(){(0e.jqx.browser.version&&d.css("z-index",k--);d.width(parseFloat(g)+2);b.addClass(l);b.css("border-bottom-width","0px");a.showfilterrow?b.css("border-top-width","0px"):b.css("border-top-width","1px");b.css("box-sizing","border-box");b.css("border-right-width","0px")},_gettableheight:function(){if(void 0!=this.tableheight)return this.tableheight;var a=this.host.height();if(this.columnsheader){var b=this.columnsheader.outerHeight();this.showheader||(b=0)}a-=b;"visible"==this.hScrollBar[0].style.visibility&&(a-=this.hScrollBar.outerHeight());this.pageable&&(a-=this.pager.outerHeight());this._groupsheader()&&(a-=this.groupsheader.outerHeight());this.showtoolbar&&(a-=this.toolbarheight);this.showstatusbar&&(a-=this.statusbarheight);this.showeverpresentrow&&"bottom"===this.everpresentrowposition&&(a-=this.everpresentrowheight);return 0this.dataview.totalrows&&100>this.dataview.totalrecords&&0Math.max(this.dataview.totalrows,this.dataview.totalrecords)&&this.autoheight?b=Math.max(this.dataview.totalrows,this.dataview.totalrecords):this.autoheight||this.dataview.totalrows=b){b=n-b;0realheight&&!this.autoheight?(this.vScrollBar.css("visibility","visible"),"deferred"==this.scrollmode?this.vScrollBar.jqxScrollBar({max:d}):this.vScrollBar.jqxScrollBar({max:d-realheight})):this.vScrollBar.css("visibility","hidden");this.dataview.pagesize=k;this.dataview.updateview();return{visiblerecords:a,virtualheight:d}},_updatepageviews:function(){if(!this.updating()){this._pagescache=[];this._pageviews=[];this.tableheight=null;var a=this.that,b=Math.round(this.host.height())+2*this.rowsheight,b=Math.round(b/this.rowsheight),d=Math.max(this.dataview.totalrows,this.dataview.totalrecords),e=d*this.rowsheight,h=0,l=0,k=0,m=0,n=0,p=this._getpagesize();if(this.pageable)this._updatepagedview&&(e=this._updatepagedview(d,e,0)),this.autoheight&&this._arrange();else for(var q=0;q=p||q==d-1)this._pageviews[k++]={top:m,height:l},l=0,m=h,n=0}a=this._gettableheight();e>a?(this.pageable&&this.gotopage&&(e=this._pageviews[0].height,0>e&&(e=this._pageviews[0].height)),"visible"!=this.vScrollBar.css("visibility")&&this.vScrollBar.css("visibility","visible"),(e<=a||this.autoheight)&&this.vScrollBar.css("visibility","hidden"),0b?(this.pageable&&this.gotopage&&(a=this._pageviews[0].height,0>a&&(a=this._pageviews[0].height)),"visible"!=this.vScrollBar.css("visibility")&&this.vScrollBar.css("visibility","visible"),(a<=b||this.autoheight)&&this.vScrollBar.css("visibility","hidden"),0c?1:0});for(h=1;hparseInt(a.version)||this.isTouchDevice())if(this._overlayElement&&this._overlayElement.remove(),this._overlayElement=e("\x3cdiv style\x3d'visibility: hidden; position: absolute; width: 100%; height: 100%;'\x3e\x3c/div\x3e"),this._overlayElement.css("background","white"),this._overlayElement.css("z-index",18E3),this._overlayElement.css("opacity",.001),this.isTouchDevice())if("hidden"!==this.vScrollBar.css("visibility")||"hidden"!==this.hScrollBar.css("visibility")){a=0;"checkbox"==this.selectionmode&&(a+=30);(this.groupable||this.rowdetails)&&this._overlayElement.css("left",30*(this.groups.length+(this.rowdetails?1:0)));var b=this._overlayElement.css("left");this._overlayElement.css("left",b+a)}else this._overlayElement&&this._overlayElement.remove();else this.content.prepend(this._overlayElement)}this._updateTouchScrolling()},_addscrollelement:function(){this._scrollelement&&this._scrollelement.remove();this._scrollelementoverlay&&this._scrollelementoverlay.remove();this._scrollelementoverlay=e("\x3cdiv style\x3d'visibility: hidden; position: absolute; width: 100%; height: 100%;'\x3e\x3c/div\x3e");this._scrollelementoverlay.css("background","black");this._scrollelementoverlay.css("z-index",18E3);this._scrollelementoverlay.css("opacity",.1);this._scrollelement=e("\x3cspan style\x3d'visibility: hidden; top: 50%; right: 10px; position: absolute;'\x3e\x3c/span\x3e");this._scrollelement.css("z-index",18005);this._scrollelement.addClass(this.toThemeProperty("jqx-button"));this._scrollelement.addClass(this.toThemeProperty("jqx-fill-state-normal"));this._scrollelement.addClass(this.toThemeProperty("jqx-rc-all"));this._scrollelement.addClass(this.toThemeProperty("jqx-shadow"));this.content.prepend(this._scrollelement);this.content.prepend(this._scrollelementoverlay)},rendergridcontent:function(a,b){if(this.updating())return!1;if(void 0==a||null==a)a=!1;this._requiresupdate=a;var d=this.prerenderrequired;this.prerenderrequired&&this._arrange();var e=this.that;if(null==b||void 0==b)b=!0;this.tableheight=null;e.virtualsizeinfo=e.virtualsizeinfo||e._calculatevirtualheight();e.pageable&&!e.autoheight&&e.dataview.totalrowsthis.maxwidth&&"auto"!=this.maxwidth&&(k=this.maxwidth);a-=k}else"auto"==this.width||this._width?d+=this.text:a-=this.width});var l=this._gettableheight();if(!this.autoheight&&this.virtualsizeinfo&&this.virtualsizeinfo.virtualheight>l)if(this.groupable&&0l?(a-=this.scrollbarsize+5,b-=this.scrollbarsize+5):"visible"==this.vScrollBar.css("visibility")&&(a-=this.scrollbarsize+5,b-=this.scrollbarsize+5)}else a-=this.scrollbarsize+5,b-=this.scrollbarsize+5;else"hidden"!=this.vScrollBar.css("visibility")&&(a-=this.scrollbarsize+5,b-=this.scrollbarsize+5);h=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:this.groups.length*this.groupindentwidth;b-=h;if(this.columnsheader&&(l=this.columnsheader.find("#columntable"+this.element.id),0!=l.length)){var n=0;e.each(this.columns.records,function(g,h){var k=e(this.element);this.hidden||"none"!==this.element.style.display||(this.element.style.display="block");var l=!1,m=this.width;if(-1!=this.width.toString().indexOf("%")||void 0!=this._percentagewidth)m=void 0!=this._percentagewidth?parseFloat(this._percentagewidth)*b/100:parseFloat(this.width)*b/100,l=!0;"auto"==this.width||this._width||l?l?(mthis.maxwidth&&"auto"!=this.maxwidth&&(this.width=m=this.maxwidth),parseInt(k[0].style.width)!=m&&(k.width(m),this.width=m)):(l=Math.floor(this.text.length/d.length*a),isNaN(l)&&(l=this.minwidth),Infinity==l&&(l=0),0>l&&($element=e("\x3cspan\x3e"+this.text+"\x3c/span\x3e"),e(document.body).append($element),l=10+$element.width(),$element.remove()),lthis.maxwidth&&(l=this.maxwidth),this._width="auto",this.width=l,k.width(this.width)):parseInt(k[0].style.width)!=this.width&&k.width(this.width);parseInt(k[0].style.left)!=n&&k.css("left",n);this.hidden&&this.hideable||(n+=this.width);this._requirewidthupdate=!0});this.columnsheader.width(2+n);l.width(this.columnsheader.width());this.columnsheader[0].style.visibility=0==n?"hidden":"inherit";this._resizecolumngroups();this.showfilterrow&&this.filterrow&&(this.filterrow.width(this.columnsheader.width()),this._updatefilterrowui());this.showeverpresentrow&&("bottom"!==this.everpresentrowposition?this.addnewrowtop.width(this.columnsheader.width()):this.addnewrowbottom.width(this.columnsheader.width()),this._updateaddnewrowui());this.autowidth&&this._arrange()}}},_rendercolumnheaders:function(){var a=this.that;if(this.prerenderrequired){this._columnsbydatafield=[];this.columnsheader.find("#columntable"+this.element.id).remove();var b=e('\x3cdiv id\x3d"columntable'+this.element.id+'" style\x3d"height: 100%; position: relative;"\x3e\x3c/div\x3e');b[0].cells=[];var d=0,g=0,h="",l=this.host.width(),k=l,m=[],n=[],p=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:this.groups.length*this.groupindentwidth;e.each(this.columns.records,function(b,f){if(!this.hidden||!this.hideable)if("auto"==this.width||this._width)h+=this.text;else if(this.widththis.maxwidth&&"auto"!=this.maxwidth)l-=this.maxwidth;else if(-1!=this.width.toString().indexOf("%")){var d="hidden"==a.vScrollBar[0].style.visibility?0:a.scrollbarsize+5,d=d+p;f=parseFloat(this.width)*(k-d)/100;fthis.maxwidth&&"auto"!=this.maxwidth&&(f=this.maxwidth);l-=f}else"string"==typeof this.width&&(this.width=parseInt(this.width)),l-=this.width;this.pinned||this.grouped||this.checkboxcolumn?(a._haspinned&&(this.pinned=!0),m[m.length]=this):n[n.length]=this});if(this.rtl){var q=0;m.reverse();for(r=this.columns.records.length-1;r>=this.columns.records.length-m.length;r--)this.columns.replace(r,m[q++]);for(q=0;qq&&!this.scrollbarautoshow)if(this.groupable&&0q&&(l-=this.scrollbarsize+5,k-=this.scrollbarsize+5)}else l-=this.scrollbarsize+5,k-=this.scrollbarsize+5;else this.autoheight||(l-=this.scrollbarsize+5,k-=this.scrollbarsize+5);var k=k-p,x=function(b,f){var d=a.columngroupslevel*a.columnsheight;return d-=f.level*a.columnsheight},z=document.createDocumentFragment();e.each(this.columns.records,function(m,n){this.height=a.columnsheight;a.columngroups&&a.columngroups.length&&(u=this.height=x(this.datafield,this));var q=a.toTP("jqx-grid-column-header")+" "+a.toTP("jqx-widget-header");a.rtl&&(q+=" "+a.toTP("jqx-grid-column-header-rtl"));var p=a.rtl?150+t+1:150+t-1,r=a.rtl?t++:t--,w=e('\x3cdiv role\x3d"columnheader" style\x3d"z-index: '+r+';position: absolute; height: 100%;" class\x3d"'+q+'"\x3e\x3cdiv style\x3d"height: 100%; width: 100%;"\x3e\x3c/div\x3e\x3c/div\x3e');a.columngroups&&(w[0].style.height=u+"px",w[0].style.bottom="0px",this.pinned&&(w[0].style.zIndex=p));this.uielement=w;""!=this.classname&&this.classname&&w.addClass(this.classname);q=this.width;p=!1;null===this.width&&(this.width="auto");if(-1!=this.width.toString().indexOf("%")||void 0!=this._percentagewidth)q=void 0!=this._percentagewidth?parseFloat(this._percentagewidth)*k/100:parseFloat(this.width)*k/100,p=!0;if("auto"==this.width||this._width||p)if(p){qthis.maxwidth&&"auto"!=this.maxwidth&&(q=this.maxwidth);if(void 0==this._percentagewidth||-1!=this.width.toString().indexOf("%"))this._percentagewidth=this.width;w.width(q);this.width=q}else this.hidden||(q=Math.floor(this.text.length/h.length*l),isNaN(q)&&(q=this.minwidth),0>q&&($element=e("\x3cspan\x3e"+this.text+"\x3c/span\x3e"),e(document.body).append($element),q=10+$element.width(),$element.remove()),qthis.maxwidth&&(q=this.maxwidth),this._width="auto",q=this.width=q,w.width(this.width));else qthis.maxwidth&&"auto"!=this.maxwidth&&(this.width=q=this.maxwidth),w[0].style.width=parseInt(q)+"px";this.hidden&&this.hideable&&w.css("display","none");var L=e(w.children()[0]),p=a.rtl?a.toTP("jqx-grid-column-menubutton")+" "+a.toTP("jqx-grid-column-menubutton-rtl"):a.toTP("jqx-grid-column-menubutton"),p=p+(" "+a.toTP("jqx-icon-arrow-down")),p=e('\x3cdiv style\x3d"height: '+u+'px; display: none; left: 100%; top: 0%; position: absolute;"\x3e\x3cdiv class\x3d"'+p+'" style\x3d"width: 100%; height:100%;"\x3e\x3c/div\x3e\x3c/div\x3e');a.enableanimations||p.css("margin-left",-16);a.rtl&&p.css("left","0px");this.columnsmenu=p[0];b[0].cells[m]=w[0];p[0].style.width=parseInt(a.columnsmenuwidth)+"px";var r=a.columnsmenu,I=!1,N=!1,K=a.groupable&&0a.columns.records.length-1-v);if(K)d++,r&=0,this.editable=this.sortable=!1,N=!0;else{var G=null!=this.renderer?this.renderer(this.text,this.align,u):a._rendercolumnheader(this.text,this.align,u,a);null==G&&(G=a._rendercolumnheader(this.text,this.align,u,a));null!=this.renderer&&(G=e(G));r&=1;I=!0}a.WinJS?MSApp.execUnsafeLocalFunction(function(){L.append(e(G))}):this.renderer?L.append(e(G)):G&&(L[0].innerHTML=G);if(null!=G){var E=e('\x3cdiv class\x3d"iconscontainer" style\x3d"height: '+u+'px; margin-left: -32px; display: block; position: absolute; left: 100%; top: 0%; width: 32px;"\x3e\x3cdiv class\x3d"filtericon '+a.toTP("jqx-widget-header")+'" style\x3d"height: '+u+'px; float: right; display: none; width: 16px;"\x3e\x3cdiv class\x3d"'+a.toTP("jqx-grid-column-filterbutton")+'" style\x3d"width: 100%; height:100%;"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"sortasc '+a.toTP("jqx-widget-header")+'" style\x3d"height: '+u+'px; float: right; display: none; width: 16px;"\x3e\x3cdiv class\x3d"'+a.toTP("jqx-grid-column-sortascbutton")+" "+a.toTP("jqx-icon-arrow-up")+'" style\x3d"width: 100%; height:100%;"\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class\x3d"sortdesc '+a.toTP("jqx-widget-header")+'" style\x3d"height: '+u+'px; float: right; display: none; width: 16px;"\x3e\x3cdiv class\x3d"'+a.toTP("jqx-grid-column-sortdescbutton")+" "+a.toTP("jqx-icon-arrow-down")+'" style\x3d"width: 100%; height:100%;"\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e');p.addClass(a.toTP("jqx-widget-header"));L.append(E);K=E.children();this.sortasc=K[1];this.sortdesc=K[2];this.filtericon=K[0];this.iconscontainer=E;a.rtl&&(E.css("margin-left","0px"),E.css("left","0px"),e(this.sortasc).css("float","left"),e(this.filtericon).css("float","left"),e(this.sortdesc).css("float","left"));!a.autoshowfiltericon&&this.filterable&&e(this.filtericon).css("display","block")}this.element=w[0];r&&(a._handlecolumnsmenu(a,L,w,p,this),this.menu||p.hide());z.appendChild(w[0]);if(a.groupable&&I)if(w[0].id=a.dataview.generatekey(),a._handlecolumnstogroupsdragdrop)a._handlecolumnstogroupsdragdrop(this,w);else throw Error("jqxGrid: Missing reference to jqxgrid.grouping.js.");a.columnsreorder&&this.draggable&&a._handlecolumnsdragreorder&&a._handlecolumnsdragreorder(this,w);var F=this;a.addHandler(w,"click",function(b){if(F.checkboxcolumn)return!0;if(0=g+F.width-40?(a.resizablecolumn={columnelement:w,column:F},w.css("cursor","col-resize")):(w.css("cursor",""),a.resizablecolumn=null),!0;b=F.width;a.rtl&&(b=0);if(f>=g+b-d){if(f<=g+b+d)return a.resizablecolumn={columnelement:w,column:F},w.css("cursor","col-resize"),!1;w.css("cursor","")}else w.css("cursor",""),f=g+l-f&&b<=g+l+f)return!1;b=a.vScrollInstance.isScrolling();h.menu&&a.autoshowcolumnsmenubutton&&!b&&!a.disabled&&k()});a.autoshowcolumnsmenubutton||(g.css("display","block"),h.iconscontainer.css("margin-left",(a.rtl?16:-48)+"px"),a.rtl?g.css({"margin-left":"0px"}):g.css({"margin-left":-l}));a.addHandler(d,"mouseleave",function(b){a.menuitemsarray&&0parseInt(b.left)+a.gridmenu.width()?a.gridmenu.jqxMenu("open",b.left,b.top+f):a.gridmenu.jqxMenu("open",g.width()+b.left-a.gridmenu.width(),b.top+f);100>a.gridmenu.width()&&a._arrangemenu();a._hasOpenedMenu=!0;var f=a._getmenuitembyindex(0),d=a._getmenuitembyindex(1),k=a._getmenuitembyindex(2),l=a._getmenuitembyindex(3),p=a._getmenuitembyindex(4),b=a._getmenuitembyindex(5);if(null!=f&&null!=d&&null!=k){var x=h.sortable&&a.sortable;a.gridmenu.jqxMenu("disable",f.id,!x);a.gridmenu.jqxMenu("disable",d.id,!x);a.gridmenu.jqxMenu("disable",k.id,!x);void 0!=h.displayfield&&(a.sortcolumn==h.displayfield?(k=a.getsortinformation(),x&&(k.sortdirection.ascending?a.gridmenu.jqxMenu("disable",f.id,!0):a.gridmenu.jqxMenu("disable",d.id,!0))):a.gridmenu.jqxMenu("disable",k.id,!0))}null!=l&&null!=p&&(a.groupable&&h.groupable?a.groups&&-1!=a.groups.indexOf(h.datafield)?(a.gridmenu.jqxMenu("disable",l.id,!0),a.gridmenu.jqxMenu("disable",p.id,!1)):(a.gridmenu.jqxMenu("disable",l.id,!1),a.gridmenu.jqxMenu("disable",p.id,!0)):(a.gridmenu.jqxMenu("disable",p.id,!0),a.gridmenu.jqxMenu("disable",l.id,!0)));null!=b&&(a.menuOwner=h,a._updatefilterpanel(a,b,h),f=0,a.sortable&&a._togglesort&&a.showsortmenuitems&&(f+=3),a.groupable&&a.addgroup&&a.showgroupmenuitems&&(f+=2),f=27*f+3,e.jqx.browser.msie&&8>e.jqx.browser.version&&(f+=20,e(b).height(190)),a.filterable&&a.showfiltermenuitems&&(h.filterable?(a.gridmenu.height(f+180),e(b).css("display","block")):(a.gridmenu.height(f),e(b).css("display","none"))));a.columnmenuopening&&!1===a.columnmenuopening(a.gridmenu,h.displayfield,a.gridmenu.height())&&a._closemenu();e.data(document.body,"contextmenu"+a.element.id,{column:h,columnsmenu:g[0]})};a.addHandler(b,"click",function(b){if(!h.menu)return!1;a.showfilterrow||("block"!=g[0].style.display&&d.trigger("mouseenter"),setTimeout(function(){"block"!=g[0].style.display&&d.trigger("mouseenter");p()},200));return!1});a.addHandler(g,"click",function(a){if(!h.menu)return!1;p();return!1});a.isTouchDevice()&&a.addHandler(g,e.jqx.mobile.getTouchEventName("touchstart"),function(b){if(!h.menu)return!1;a._hasOpenedMenu?a._closemenu():p();return!1})},_removecolumnhandlers:function(a){var b=this.that,d=e(a.element);0h&&(h=4),h+="px"):25!=this.columnsheight&&(h=this.columnsheight/2-this._columnheight/2,0>h&&(h=4),h+="px");return this.enableellipsis?'\x3cdiv style\x3d"padding-bottom: 2px; overflow: hidden; text-overflow: ellipsis; text-align: '+b+"; margin-left: 4px; margin-right: 2px; margin-bottom: "+h+"; margin-top: "+h+';"\x3e\x3cspan style\x3d"text-overflow: ellipsis; cursor: default;"\x3e'+a+"\x3c/span\x3e\x3c/div\x3e":"center"==b||"middle"==b?'\x3cdiv style\x3d"padding-bottom: 2px; text-align: center; margin-top: '+h+';"\x3e\x3ca href\x3d"#"\x3e'+a+"\x3c/a\x3e\x3c/div\x3e":'\x3ca style\x3d"margin-top: '+h+"; float: "+b+';" href\x3d"#"\x3e'+a+"\x3c/a\x3e"},_renderrows:function(a,b,d){var g=this.that;(this.pageable||this.groupable)&&(this.autoheight||this.autorowheight)&&null!=this.table&&null!=this.table[0].rows&&this.table[0].rows.lengthe.jqx.browser.version;if(this.virtualmode)d=function(){if(g.rendergridrows){var a=g._startboundindex;void 0==a&&(a=0);var c=a+1+g.dataview.pagesize;if(null!=a&&null!=c){var d=g.source._source?!0:!1;if((d?g.source._source.recordstartindex:g.source.recordstartindex)!=a||1==b){if(d){if(c>=g.source._source.totalrecords&&(c=g.source._source.totalrecords,a=c-g.dataview.pagesize-1,0>a&&(a=0),g.source._source.recordendindex==c&&g.source._source.recordstartindex==a))return;g.source._source.recordstartindex=a;g.source._source.recordendindex=c}else g.source.recordstartindex=a,g.source.recordendindex=c;g.updatebounddata("cells")}}}},this.loadondemand&&(h(),d(),this.loadondemand=!1),d=void 0==this._browser?this._isIE10():this._browser,this.editable&&this.editcell&&!this.vScrollInstance.isScrolling()&&!this.hScrollInstance.isScrolling()?h():this.autoheight?h():d||a||navigator&&-1!=navigator.userAgent.indexOf("Safari")?(null!=this._scrolltimer&&clearTimeout(this._scrolltimer),this._scrolltimer=setTimeout(function(){h()},5)):h();else{if("deferred"==this.scrollmode&&(this.hScrollInstance.isScrolling()||this.vScrollInstance.isScrolling())){null!=this._scrolltimer&&clearInterval(this._scrolltimer);var l=this._getfirstvisualrow();null!=l&&(a=function(a){if(null==l)return"";a="\x3ctable\x3e";var b=g.deferreddatafields;null==b&&0k?(this.pageable&&this.gotopage&&(a=this._pageviews[0].height,0>a&&(a=this._pageviews[0].height)),"visible"!=this.vScrollBar.css("visibility")&&this.vScrollBar.css("visibility","visible"),(a<=k||this.autoheight)&&this.vScrollBar.css("visibility","hidden"),0=a&&-1==m&&(m=h),k>b+a){n=h;break}n++;n>d+e&&(n=d+e);if(-1==m||p)m=0;return{start:m,end:n}},_getvirtualcolumnsindexes:function(a,b,d,e,h){if(this.rtl||this.editcell||this.exporting)return{start:0,end:d+e};var l=0,k=-1,m=d+e;if(this.autorowheight)return{start:0,end:d+e};if(!h)for(h=0;h=a&&-1==k&&(k=h),l>b+a){m=h;break}m++;m>d+e&&(m=d+e);-1==k&&(k=0);return{start:k,end:m}},_getfirstvisualrow:function(){var a=parseInt(this.vScrollInstance.value);0==this._pagescache.length&&(this.dataview.updateview(),this._loadrows());"visible"!=this.vScrollBar[0].style.visibility&&(a=0);if(!this.pageable){var b=this._findvisiblerow(a,this._pageviews);if(-1==b)return null;b!=this.dataview.pagenum?(this.dataview.pagenum=b,this.dataview.updateview(),this._loadrows()):this._pagescache[this.dataview.pagenum]||this._loadrows()}a=this._findvisiblerow(a,this._pagescache[this.dataview.pagenum]);if((b=this._pagescache[this.dataview.pagenum])&&b[0])return b[a]},_rendervisualrows:function(){if(this.virtualsizeinfo){var a=this.vScrollInstance,b=this.hScrollInstance,d=b.value,g=parseInt(a.value),h=parseInt(d),l=this._gettableheight(),k=void 0!=this._hostwidth?this._hostwidth:this.host.width();"visible"==this.hScrollBar[0].style.visibility&&(l+=29);"deferred"==this.scrollmode&&0!=this._newmax&&g>this._newmax&&null!=this._newmax&&(g=this._newmax);var m=a.isScrolling()||b.isScrolling()||this._keydown,n=this.groupable&&0t&&(t=0);var v=0,u=0,w=0,x=0,z=this.virtualsizeinfo.visiblerecords,D=this.groupable?this.groups.length:0,C=this.toTP("jqx-grid-cell")+" "+this.toTP("jqx-item");this.rtl&&(C+=" "+this.toTP("jqx-grid-cell-rtl"));(this.autoheight||this.autorowheight)&&this.pageable&&(!this.groupable||this.groupable&&0===this.groups.length)&&(z=this.dataview.pagesize);n&&(C=" "+this.toTP("jqx-grid-group-cell"));this.isTouchDevice()&&(C+=" "+this.toTP("jqx-touch"));this.autorowheight&&(C+=" jqx-grid-cell-wrap");var J=this.rowsheight,M=this._rendercell,d=this._getvisualcolumnsindexes(h,k,p,q,n,!0),b=d.start,d=d.end,B=this._getvirtualcolumnsindexes(h,k,p,q,n),A=B.start,L=B.end;(this.autoheight||this.pageable)&&this.autorowheight&&this._pageviews[0]&&(this._oldpageviewheight=this._pageviews[0].height);this.autorowheight&&(t=0);if(0<=t){this._updaterowdetailsvisibility();this._startboundindex=null!=r?r[t].bounddata.boundindex:0;this._startvisibleindex=null!=r?r[t].bounddata.visibleindex:0;var I=this.table[0].rows;if(10=l)break}else cansetheight=!0,this._clearvisualrow(h,n,u,p,q),w+v+x<=l&&(v+=J);u++}this._horizontalvalue=h;0e.jqx.browser.version&&(l.css("margin-left","0px"),l.css("left",this.host.width()/2-l.width()/2));l=Math.abs(parseInt(this.table[0].style.top));isNaN(l)&&(l=0);e(d).height(this._gettableheight()+l);h.css("margin-left","0px");h.width(this.host.width());this.table.width()=this.altstart&&0==(this.altstart+u)%(1+this.altstep)&&(b=v?b+(" "+this.toTP("jqx-grid-cell-sort-alt")):b+(" "+this.toTP("jqx-grid-cell-alt")),t.filter&&this.showfiltercolumnbackground&&(b+=" "+this.toTP("jqx-grid-cell-filter-alt")),t.pinned&&this.showpinnedcolumnbackground&&(b+=" "+this.toTP("jqx-grid-cell-pinned-alt")))}if(p<=k){if(l||this.rowdetails)v=e(q),u=this.columns.records[p].width,q.style.width!=parseInt(u)+"px"&&v.width(u)}else(l||this.rowdetails)&&this._hiddencolumns&&(v=e(q),u=this.columns.records[p].width,parseInt(q.style.width)!=u&&v.width(u));if(this.rowdetails&&g&&(h&&!l?b+=" "+this.toTP("jqx-grid-details-cell"):l&&(b+=" "+this.toTP("jqx-grid-group-details-cell")),this.showrowdetailscolumn))if(!this.rtl){if(void 0==n.group&&p==k){a=this.toThemeProperty("jqx-icon-arrow-down");h?b+=" "+this.toTP("jqx-grid-group-expand"):(b+=" "+this.toTP("jqx-grid-group-collapse"),a=this.toThemeProperty("jqx-icon-arrow-right"));b+=" "+a;q.title="";q.innerHTML="";q.className!=b&&(q.className=b);return}}else if(void 0==n.group&&p==m.cells.length-k-1){a=this.toThemeProperty("jqx-icon-arrow-down");h?b+=" "+this.toTP("jqx-grid-group-expand-rtl"):(b+=" "+this.toTP("jqx-grid-group-collapse-rtl"),a=this.toThemeProperty("jqx-icon-arrow-left"));b+=" "+a;q.title="";q.innerHTML="";q.className!=b&&(q.className=b);return}d&&p>=k&&(b+=" "+this.toTP("jqx-grid-cell-selected"),b+=" "+this.toTP("jqx-fill-state-pressed"));q.className!=b&&(q.className=b);void 0!=n.group?(cellvalue="",q.title="",q.innerHTML=""):a(this,t,n,cellvalue,q,r)}},_rendercell:function(a,b,d,g,h,l){var k=g+"_"+b.visibleindex;if("number"==b.columntype||null!=b.cellsrenderer)k=d.uniqueid+"_"+b.visibleindex;"number"==b.columntype&&(g=d.visibleindex);if(a.editcell&&void 0==a.editrow)if("selectedrow"==a.editmode&&b.editable&&a.editable){if(a.editcell.row==a.getboundindex(d)&&a._showcelleditor){a.hScrollInstance.isScrolling()||a.vScrollInstance.isScrolling()?a._showcelleditor(a.editcell.row,b,h,!1,!1):a._showcelleditor(a.editcell.row,b,h,a.editcell.init);return}}else if(a.editcell.row==a.getboundindex(d)&&a.editcell.column==b.datafield&&(a.editcell.element=h,a.editcell.editing&&a._showcelleditor)){a.hScrollInstance.isScrolling()||a.vScrollInstance.isScrolling()?a._showcelleditor(a.editcell.row,b,a.editcell.element,a.editcell.init,!1):a._showcelleditor(a.editcell.row,b,a.editcell.element,a.editcell.init);return}var m=a._defaultcellsrenderer(g,b),n=a._cellscache[k];if(n)if("inline"==b.columntype)a._renderinlinecell(a,h,b,d,g),null!=b.cellsrenderer&&(a=b.cellsrenderer(a.getboundindex(d),b.datafield,g,m,b.getcolumnproperties(),d.bounddata),void 0!=a&&(h.innerHTML=a));else{if("checkbox"==b.columntype){if(a.host.jqxCheckBox){""===g&&(g=null);n=0==h.innerHTML.toString().length;!h.checkbox||a.groupable||n?a._rendercheckboxcell(a,h,b,d,g):(h.checkboxrow=a.getboundindex(d),""==g&&(g=!1),"1"==g&&(g=!0),"0"==g&&(g=!1),1==g&&(g=!0),0==g&&(g=!1),"true"==g&&(g=!0),"false"==g&&(g=!1),null!=g||b.threestatecheckbox||(g=!1),b.checkboxcolumn&&(g=!1,0n.maxwidth&&(p=n.maxwidth);parseInt(m.style.width)!=p&&("auto"!=p?e(m)[0].style.width=p+"px":e(m)[0].style.width=p);""!=m.title&&(m.title="");""!=m.innerHTML&&(m.innerHTML="")}b[d]&&parseInt(b[d].style.height)!=this.rowsheight&&(b[d].style.height=parseInt(this.rowsheight)+"px")},_findgroupstate:function(a){a=this._findgroup(a);return null==a?!1:a.expanded},_findgroup:function(a){return this.expandedgroups[a]?this.expandedgroups[a]:null},_clearcaches:function(){this._columnsbydatafield=[];this._pagescache=[];this._pageviews=[];this._cellscache=[];this.heights=[];this.hiddens=[];this.hiddenboundrows=[];this.heightboundrows=[];this.detailboundrows=[];this.details=[];this.expandedgroups=[];this._rowdetailscache=[];this._rowdetailselementscache=[];e.jqx.dataFormat&&e.jqx.dataFormat.cleardatescache();this.tableheight=null},_getColumnText:function(a){void 0==this._columnsbydatafield&&(this._columnsbydatafield=[]);if(this._columnsbydatafield[a])return this._columnsbydatafield[a];var b=a,d=null;e.each(this.columns.records,function(){if(this.datafield==a||this.displayfield==a)return b=this.text,d=this,!1});this._columnsbydatafield[a]={label:b,column:d};return this._columnsbydatafield[a]},_getcolumnbydatafield:function(a){void 0==this.__columnsbydatafield&&(this.__columnsbydatafield=[]);if(this.__columnsbydatafield[a])return this.__columnsbydatafield[a];var b=null;e.each(this.columns.records,function(){if(this.datafield==a||this.displayfield==a)return b=this,!1});this.__columnsbydatafield[a]=b;return this.__columnsbydatafield[a]},isscrollingvertically:function(){return this.vScrollBar.jqxScrollBar("isScrolling")},_renderrowdetails:function(a,b,d,g,h,l){if(void 0!=b){var k=e(b);l=this.rowdetails&&this.showrowdetailscolumn?(1+this.groups.length)*this.groupindentwidth:this.groups.length*this.groupindentwidth;if(this.groupable&&0m;)n=b.cells[0+m-1],m++;n=e(n)}if(this.rtl)for(;gd&&(d=4),d+="px");if(this.enableellipsis){if("center"==b.cellsalign||"middle"==b.cellsalign)return'\x3cdiv style\x3d"text-overflow: ellipsis; overflow: hidden; padding-bottom: 2px; text-align: center; margin-top: '+d+';"\x3e'+a+"\x3c/div\x3e";if("left"==b.cellsalign)return'\x3cdiv style\x3d"overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; text-align: left; margin-right: 2px; margin-left: 4px; margin-top: '+d+';"\x3e'+a+"\x3c/div\x3e";if("right"==b.cellsalign)return'\x3cdiv style\x3d"overflow: hidden; text-overflow: ellipsis; padding-bottom: 2px; text-align: right; margin-right: 2px; margin-left: 4px; margin-top: '+d+';"\x3e'+a+"\x3c/div\x3e"}return"center"==b.cellsalign||"middle"==b.cellsalign?'\x3cdiv style\x3d"text-align: center; margin-top: '+d+';"\x3e'+a+"\x3c/div\x3e":'\x3cspan style\x3d"margin-left: 4px; margin-right: 2px; margin-top: '+d+"; float: "+b.cellsalign+';"\x3e'+a+"\x3c/span\x3e"},getcelltext:function(a,b){if(null==a||null==b)return null;var d=this.getcellvalue(a,b),g=this.getcolumn(b);g&&""!=g.cellsformat&&e.jqx.dataFormat&&(e.jqx.dataFormat.isDate(d)?d=e.jqx.dataFormat.formatdate(d,g.cellsformat,this.gridlocalization):e.jqx.dataFormat.isNumber(d)&&(d=e.jqx.dataFormat.formatnumber(d,g.cellsformat,this.gridlocalization)));return d},getcelltextbyid:function(a,b){if(null==a||null==b)return null;var d=this.getcellvaluebyid(a,b),g=this.getcolumn(b);g&&""!=g.cellsformat&&e.jqx.dataFormat&&(e.jqx.dataFormat.isDate(d)?d=e.jqx.dataFormat.formatdate(d,g.cellsformat,this.gridlocalization):e.jqx.dataFormat.isNumber(d)&&(d=e.jqx.dataFormat.formatnumber(d,g.cellsformat,this.gridlocalization)));return d},_getcellvalue:function(a,b){var d=null,d=b.bounddata[a.datafield];null!=a.displayfield&&(d=b.bounddata[a.displayfield]);null==d&&(d="");return d},getcell:function(a,b){if(null==a||null==b)return null;var d=parseInt(a),e=a,h="";isNaN(d)||(e=this.getrowdata(d));null!=e&&(h=e[b]);return this._getcellresult(h,a,b)},getrenderedcell:function(a,b){if(null==a||null==b)return null;var d=parseInt(a),e=a,h="";isNaN(d)||(e=this.getrenderedrowdata(d));null!=e&&(h=e[b]);return this._getcellresult(h,a,b)},_getcellresult:function(a,b,d){var e=this.getcolumn(d);if(null==e||void 0==e)return null;var h=e.getcolumnproperties(),e=h.hidden,l=h.width,k=h.pinned,m=h.cellsalign,h=h.cellsformat,n=this.getrowheight(b);return 0==n?null:{value:a,row:b,column:d,datafield:d,width:l,height:n,hidden:e,pinned:k,align:m,format:h}},setcellvaluebyid:function(a,b,d,e,h){a=this.getrowboundindexbyid(a);return this.setcellvalue(a,b,d,e,h)},getcellvaluebyid:function(a,b){var d=this.getrowboundindexbyid(a);return this.getcellvalue(d,b)},setcellvalue:function(a,b,d,g,h){if(null==a||null==b)return!1;var l=parseInt(a),k=a;isNaN(l)||(k=this.getrowdata(l));var m=!1;this.filterable&&this._initfilterpanel&&this.dataview.filters.length&&(m=!0);this.virtualmode&&(this._pagescache=[]);this.sortcache&&(this.sortcache={});var n="",p="";if(null!=k&&k[b]!==d){if(null===k[b]&&""===d)return;var q=this._getcolumnbydatafield(b),r="string",t=this.source.datafields||(this.source._source?this.source._source.datafields:null);if(t){var v="";e.each(t,function(){if(this.name==q.displayfield)return this.type&&(v=this.type),!1});v&&(r=v);p=k[q.displayfield]}n=k[b];if(!q.nullable||null!=d&&""!==d&&q.nullable&&void 0===d.label)if(e.jqx.dataFormat.isNumber(n)||"number"==r||"float"==r||"int"==r||"decimal"==r&&"date"!=r?(this.gridlocalization&&","==this.gridlocalization.decimalseparator&&d&&d.indexOf&&0<=d.indexOf(",")&&(d=d.replace(",",".")),d=new Number(d),d=parseFloat(d),isNaN(d)&&(d=0)):!e.jqx.dataFormat.isDate(n)&&"date"!=r||""==d||(t=new Date(d),"Invalid Date"!=t&&null!=t?d=t:"Invalid Date"==t&&(d=t=new Date)),k[b]===d){this._updating||0==g||this._renderrows(this.virtualsizeinfo);return}t=this.source&&this.source._source.localdata&&"observableArray"===this.source._source.localdata.name;k[b]=d;if(t){var u=this.source._source.localdata;u._updating||(u._updating=!0,u[a][b]=d,u._updating=!1)}r=this.getrenderedrowdata(l,!0);if(!r)return;r[b]=d;null!=d&&null!=d.label&&(q=this._getcolumnbydatafield(b),k[q.displayfield]=d.label,r[q.displayfield]=d.label,k[b]=d.value,r[b]=d.value,t&&!u._updating&&(u._updating=!0,u[a][b]=d.value,u[a][q.displayfield]=d.label,u._updating=!1));m&&void 0!=k.dataindex&&(this.dataview.cachedrecords[k.dataindex][b]=d,null!=d&&void 0!=d.label&&(this.dataview.cachedrecords[k.dataindex][b]=d.value,this.dataview.cachedrecords[k.dataindex][q.displayfield]=d.label))}else return this._updating||0==g||this._renderrows(this.virtualsizeinfo),!1;if(this.source&&this.source._knockoutdatasource&&!this._updateFromAdapter&&this.autokoupdates&&this.source._source._localdata){u=l;m&&void 0!=k.dataindex&&(u=k.dataindex);u=this.source._source._localdata()[u];this.source.suspendKO=!0;if(u[b]&&u[b].subscribe)if(null!=d&&null!=d.label)u[q.displayfield](d.label),u[b](d.value);else u[b](d);else{var t=this.source._source.datafields,w=null;t&&e.each(t,function(){if(this.name==b)return w=this.map,!1});if(null==w)null!=d&&null!=d.label?(u[b]=d.value,u[q.displayfield]=d.label):u[b]=d;else if(t=w.split(this.source.mapChar),0this.source._source.totalrecords-d?b.slice(0,this.source._source.totalrecords-d):b}if(this.dataview.sortdata){b=[];for(d=0;da&&h.top+h.height>a)e=mid-1;else if(h.toph-d?("visible"!=b&&(a.autowidth||(a.hScrollBar[0].style.visibility="visible"),a._arrange()),"visible"==e?"deferred"==a.scrollmode||a.virtualmode?a._updatevscrollbarmax():a.virtualsizeinfo&&(e=a.virtualsizeinfo.virtualheight-a._gettableheight(),!isNaN(e)&&0e.jqx.browser.version;l&&b.host.attr("hideFocus","true");var k=b.tableZIndex;a*d>k&&(k=a*d);b.isTouchDevice();var m="";b._hiddencolumns=!1;for(var n=0;nt.maxwidth&&(v=t.maxwidth);if(b.rtl){var u='\x3cdiv role\x3d"gridcell" style\x3d"left: '+q+"px; z-index: "+(k-d+2*r)+"; width:"+v+"px;";k--}else u='\x3cdiv role\x3d"gridcell" style\x3d"left: '+q+"px; z-index: "+k--+"; width:"+v+"px;";t.hidden&&t.hideable?(u+="display: none;",b._hiddencolumns=!0,k++):q+=v;u+='" class\x3d"'+h+'"\x3e\x3c/div\x3e';p+=u}0==g&&(b.table.width(parseInt(q)+2),g=q);p+="\x3c/div\x3e";m+=p}b.WinJS?MSApp.execUnsafeLocalFunction(function(){b.table.html(m)}):b.table[0].innerHTML=m;b.table[0].rows=[];g=b.table.children();for(n=0;nt.maxwidth&&(v=t.maxwidth),t.hidden&&t.hideable||(q+=v);b.table.width(parseInt(q)+2);g=q}b._updatescrollbarsafterrowsprerender();b.rendered&&b.rendered("rows");b.toCompile=[];b._addoverlayelement()}}},_groupsheader:function(){return this.groupable&&this.showgroupsheader},_arrange:function(){var a=null,b=null;this.tableheight=null;var d=this.that,e=!1,h=!1;null!=d.width&&-1!=d.width.toString().indexOf("px")?a=d.width:void 0==d.width||isNaN(d.width)||(a=d.width);null!=d.width&&-1!=d.width.toString().indexOf("%")&&(a=d.width,e=!0);d.scrollbarautoshow&&(d.vScrollBar[0].style.display="none",d.hScrollBar[0].style.display="none",d.vScrollBar[0].style.zIndex=d.tableZIndex+d.headerZIndex,d.hScrollBar[0].style.zIndex=d.tableZIndex+d.headerZIndex);if(d.autowidth){for(var l=a=0;l=a&&(a=600,d.host.width(a)),d._oldWidth||(d._oldWidth=a))):d.host.width(250);null!=b?(h||(b=parseInt(b)),h?d.element.style.height=d.height:d.element.style.height!=parseInt(b)+"px"&&(d.element.style.height=parseInt(b)+"px"),h&&!d.autoheight&&(b=d.host.height(),0==b&&(b=400,d.host.height(b)),d._oldHeight||(d._oldHeight=b))):d.host.height(250);d.autoheight&&(d.tableheight=null,d._gettableheight());e=0;d.showtoolbar?(d.toolbar.width(a),d.toolbar.height(d.toolbarheight-1),d.toolbar.css("top",0),e+=d.toolbarheight,b-=parseInt(d.toolbarheight)):d.toolbar[0].style.height="0px";d.showstatusbar?(d.showaggregates?d.statusbar.width(d.table?Math.max(a,d.table.width()):a):d.statusbar.width(a),d.statusbar.height(-1+d.statusbarheight)):d.statusbar[0].style.height="0px";d.showeverpresentrow&&"bottom"===d.everpresentrowposition?(d.addnewrow.width(a),d.addnewrow.height(d.everpresentrowheight)):d.addnewrow[0].style.height="0px";d._groupsheader()?(d.groupsheader.width(a),d.groupsheader.height(d.groupsheaderheight),d.groupsheader.css("top",e),h=d.groupsheader.height()+1,e+=h,b>h&&(b-=parseInt(h))):(d.groupsheader[0].style.width!=a+"px"&&(d.groupsheader[0].style.width=parseInt(a)+"px"),d.groupsheader[0].style.height="0px",d.groupsheader[0].style.top!=e+"px"&&d.groupsheader.css("top",e),h=d.showgroupsheader&&d.groupable?d.groupsheaderheight:0,d.content[0].style.top!=e+h+"px"&&d.content.css("top",e+d.groupsheaderheight));var m=d.scrollbarsize;isNaN(m)&&(m=parseInt(m),m=isNaN(m)?"17px":m+"px");m=parseInt(m);k=2;h=0;"visible"==d.vScrollBar[0].style.visibility&&(h=m+4);"visible"==d.hScrollBar[0].style.visibility&&(k=m+4+2);l=0;d.pageable&&(l=d.pagerheight,k+=d.pagerheight);d.showstatusbar&&(k+=d.statusbarheight,l+=d.statusbarheight);d.showeverpresentrow&&"bottom"===d.everpresentrowposition&&(k+=d.everpresentrowheight,l+=d.everpresentrowheight);d.hScrollBar[0].style.height!=m+"px"&&(d.hScrollBar[0].style.height=parseInt(m)+"px");d.hScrollBar[0].style.top==e+b-4-m-l+"px"&&"0px"==d.hScrollBar[0].style.left||d.hScrollBar.css({top:e+b-4-m-l+"px",left:"0px"});var n=d.hScrollBar[0].style.width,p=!1,q=!1;0==h?n!=a-2+"px"&&(d.hScrollBar.width(a-2),p=!0):n!=a-m-4+"px"&&(d.hScrollBar.width(a-m-4+"px"),p=!0);d.autoheight||(d.vScrollBar[0].style.width!=m+"px"&&(d.vScrollBar.width(m),q=!0),d.vScrollBar[0].style.height!=parseInt(b)-k+"px"&&(d.vScrollBar.height(parseInt(b)-k+"px"),q=!0),d.vScrollBar[0].style.left==parseInt(a)-parseInt(m)-4+"px"&&d.vScrollBar[0].style.top==e+"px"||d.vScrollBar.css({left:parseInt(a)-parseInt(m)-4+"px",top:e}));d.rtl&&(d.vScrollBar.css({left:"0px",top:e}),"hidden"!=d.vScrollBar.css("visibility")&&d.hScrollBar.css({left:m+2}));n=d.vScrollInstance;n.disabled=d.disabled;d.autoheight||q&&n.refresh();q=d.hScrollInstance;q.disabled=d.disabled;p&&q.refresh();d.autowidth&&(d.hScrollBar[0].style.visibility="hidden");d.statusbarheight=parseInt(d.statusbarheight);d.toolbarheight=parseInt(d.toolbarheight);p=function(a){if("visible"==a.vScrollBar[0].style.visibility&&"visible"==a.hScrollBar[0].style.visibility){a.bottomRight[0].style.visibility="visible";a.bottomRight.css({left:1+parseInt(a.vScrollBar.css("left")),top:parseInt(a.hScrollBar.css("top"))});a.rtl&&a.bottomRight.css("left","0px");a.bottomRight.width(parseInt(m)+3);a.bottomRight.height(parseInt(m)+4);var b=a.showeverpresentrow&&"bottom"==a.everpresentrowposition?a.everpresentrowheight:0;0a?this.scrollDown():this.scrollUp();a=this.vScrollInstance.value;if(b!=a)return!0}else if("hidden"!=this.hScrollBar.css("visibility")&&(b=this.hScrollInstance.value,02*this.horizontalscrollbarstep?this.hScrollInstance.setPosition(this.hScrollInstance.value-2*this.horizontalscrollbarstep):this.hScrollInstance.setPosition(0):this.hScrollInstance.value=a.min?a.setPosition(parseInt(a.value)-this.rowsheight):a.setPosition(a.min)}},_removeHandlers:function(){var a=this.that;a.removeHandler(e(window),"orientationchange.jqxgrid"+a.element.id);a.removeHandler(e(window),"orientationchanged.jqxgrid"+a.element.id);a.removeHandler(a.vScrollBar,"valueChanged");a.removeHandler(a.hScrollBar,"valueChanged");a.vScrollInstance.valueChanged=null;a.hScrollInstance.valueChanged=null;var b="mousedown.jqxgrid";a.isTouchDevice()&&(b=e.jqx.mobile.getTouchEventName("touchend"));a.removeHandler(a.host,"dblclick.jqxgrid");a.removeHandler(a.host,b);a.removeHandler(a.content,"mousemove",a._mousemovefunc);a.removeHandler(a.host,"mouseleave.jqxgrid");a.removeHandler(a.content,"mouseenter");a.removeHandler(a.content,"mouseleave");a.removeHandler(a.content,"mousedown");a.removeHandler(a.content,"scroll");a.removeHandler(a.content,"selectstart."+a.element.id);a.removeHandler(a.host,"dragstart."+a.element.id);a.removeHandler(a.host,"keydown.edit"+a.element.id);a.removeHandler(e(document),"keydown.edit"+a.element.id);a.removeHandler(e(document),"keyup.edit"+a.element.id);a._mousemovedocumentfunc&&a.removeHandler(e(document),"mousemove.selection"+a.element.id,a._mousemovedocumentfunc);a.removeHandler(e(document),"mouseup.selection"+a.element.id);a._mousewheelfunc&&a.removeHandler(a.host,"mousewheel",a._mousewheelfunc);a.editable&&a.removeHandler(e(document),"mousedown.gridedit"+a.element.id);a.host.off&&(a.content.off("mousemove"),a.host.off("mousewheel"))},_addHandlers:function(){var a=this.that,b=a.isTouchDevice();b||a.addHandler(a.host,"dragstart."+a.element.id,function(a){return!1});a.scrollbarautoshow&&(a.addHandler(a.host,"mouseenter.gridscroll"+a.element.id,function(b){a.vScrollBar.fadeIn("fast");a.hScrollBar.fadeIn("fast")}),a.addHandler(a.host,"mouseleave.gridscroll"+a.element.id,function(b){a.vScrollInstance.isScrolling()||a.hScrollInstance.isScrolling()||(a.vScrollBar.fadeOut("fast"),a.hScrollBar.fadeOut("fast"))}));a.editable&&a.addHandler(e(document),"mousedown.gridedit"+a.element.id,function(b){if(a.editable&&a.begincelledit&&a.editcell&&!a.vScrollInstance.isScrolling()&&!a.vScrollInstance.isScrolling()){var d=a.host.coord(),f=a.host.width(),e=a.host.height(),m=!1,n=!1;if(b.pageYd.top+e)n=m=!0;if(b.pageXd.left+f)m=!0;if(m){if(a.editcell&&a.editcell.editor)switch(a.editcell.columntype){case "datetimeinput":if(a.editcell.editor.jqxDateTimeInput&&a.editcell.editor.jqxDateTimeInput("container")&&"block"==a.editcell.editor.jqxDateTimeInput("container")[0].style.display)if(d=a.editcell.editor.jqxDateTimeInput("container").coord().top,f=a.editcell.editor.jqxDateTimeInput("container").coord().top+a.editcell.editor.jqxDateTimeInput("container").height(),n&&(b.pageYf))a.editcell.editor.jqxDateTimeInput("close");else return;break;case "combobox":if(a.editcell.editor.jqxComboBox&&a.editcell.editor.jqxComboBox("container")&&"block"==a.editcell.editor.jqxComboBox("container")[0].style.display)if(d=a.editcell.editor.jqxComboBox("container").coord().top,f=a.editcell.editor.jqxComboBox("container").coord().top+a.editcell.editor.jqxComboBox("container").height(),n&&(b.pageYf))a.editcell.editor.jqxComboBox("close");else return;break;case "dropdownlist":if(a.editcell.editor.jqxDropDownList&&a.editcell.editor.jqxDropDownList("container")&&"block"==a.editcell.editor.jqxDropDownList("container")[0].style.display)if(d=a.editcell.editor.jqxDropDownList("container").coord().top,f=a.editcell.editor.jqxDropDownList("container").coord().top+a.editcell.editor.jqxDropDownList("container").height(),n&&(b.pageYf))a.editcell.editor.jqxDropDownList("close");else return;break;case "template":case "custom":for(d=["jqxDropDownList","jqxComboBox","jqxDropDownButton","jqxDateTimeInput"],f=0;fp)?(e.close(),e=!0):e=!1}else e=void 0;if(0==e)return}}a.endcelledit(a.editcell.row,a.editcell.column,!1,!0);a._oldselectedcell=null}}});a.vScrollInstance.valueChanged=function(d){a.virtualsizeinfo&&(a._closemenu(),a._renderrows(a.virtualsizeinfo),a.currentScrollValue=d.currentValue,a.pageable||a.groupable||!a.dataview.virtualmode||(a.loadondemandupdate&&clearTimeout(a.loadondemandupdate),a.loadondemandupdate=setTimeout(function(){a.loadondemand=!0;a._renderrows(a.virtualsizeinfo)},100)),b&&(a._lastScroll=new Date))};a.hScrollInstance.valueChanged=function(d){if(a.virtualsizeinfo){a._closemenu();var h=function(){a._renderhorizontalscroll();a._renderrows(a.virtualsizeinfo);a.editcell&&!a.editrow&&a._showcelleditor&&a.editcell.editing&&(a.hScrollInstance.isScrolling()||a._showcelleditor(a.editcell.row,a.getcolumn(a.editcell.column),a.editcell.element,a.editcell.init))};void 0==a._browser&&a._isIE10();navigator&&-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome")?(a._hScrollTimer&&clearTimeout(a._hScrollTimer),a._hScrollTimer=setTimeout(function(){h()},1)):e.jqx.browser.msie?(a._hScrollTimer&&clearTimeout(a._hScrollTimer),a._hScrollTimer=setTimeout(function(){h()},.01)):h();b&&(a._lastScroll=new Date)}};a._mousewheelfunc=a._mousewheelfunc||function(b){if(!a.editcell&&a.enablemousewheel)return a.wheel(b,a),!1};a.removeHandler(a.host,"mousewheel",a._mousewheelfunc);a.addHandler(a.host,"mousewheel",a._mousewheelfunc);var d="mousedown.jqxgrid";b&&(d=e.jqx.mobile.getTouchEventName("touchend"));a.addHandler(a.host,d,function(b){if(a.isTouchDevice()&&(a._newScroll=new Date,500>a._newScroll-a._lastScroll||e(b.target).ischildof(a.vScrollBar)||e(b.target).ischildof(a.hScrollBar)))return!1;a._mousedown=new Date;var d=a._handlemousedown(b,a);a.isNestedGrid&&(a.resizablecolumn||a.columnsreorder||b.stopPropagation());a._lastmousedown=new Date;return d});b||(a.addHandler(a.host,"dblclick.jqxgrid",function(b){a.editable&&a.begincelledit&&"dblclick"==a.editmode?a._handledblclick(b,a):e.jqx.browser.msie&&9>e.jqx.browser.version&&a._handlemousedown(b,a);a.mousecaptured=!1;a._lastmousedown=new Date;return!0}),a._mousemovefunc=function(b){if(a._handlemousemove)return a._handlemousemove(b,a)},a.addHandler(a.content,"mousemove",a._mousemovefunc),a._handlemousemoveselection&&(a._mousemovedocumentfunc=function(b){if(a._handlemousemoveselection)return a._handlemousemoveselection(b,a)},a.addHandler(e(document),"mousemove.selection"+a.element.id,a._mousemovedocumentfunc)),a.addHandler(e(document),"mouseup.selection"+a.element.id,function(b){a._handlemouseupselection&&a._handlemouseupselection(b,a)}));try{""==document.referrer&&!window.frameElement||null==window.top||window.top==window.self||(d=null,window.parent&&document.referrer&&(d=document.referrer),d&&-1!=d.indexOf(document.location.host)&&(d=function(b){if(a._handlemouseupselection)try{a._handlemouseupselection(b,a)}catch(d){}},window.top.document.addEventListener?window.top.document.addEventListener("mouseup",d,!1):window.top.document.attachEvent&&window.top.document.attachEvent("onmouseup",d)))}catch(g){}a.focused=!1;b||(a.addHandler(a.content,"mouseenter",function(b){a.focused=!0;a.wrapper&&(a.wrapper.attr("tabindex",1),a.content.attr("tabindex",2));a._overlayElement&&(a.vScrollInstance.isScrolling()||a.hScrollInstance.isScrolling()?a._overlayElement[0].style.visibility="visible":a._overlayElement[0].style.visibility="hidden")}),a.addHandler(a.content,"mouseleave",function(b){a._handlemousemove&&a.enablehover&&a._clearhoverstyle();a._overlayElement&&(a._overlayElement[0].style.visibility="hidden");a.focused=!1}),(a.groupable||a.columnsreorder)&&a.addHandler(e(document),"selectstart."+a.element.id,function(b){if(!0===a.__drag)return!1}),a.addHandler(a.content,"selectstart."+a.element.id,function(b){if(a.enablebrowserselection||a.showfilterrow&&e(b.target).ischildof(a.filterrow)||a.showeverpresentrow&&(e(b.target).ischildof(a.addnewrow)||a.addnewrowtop&&e(b.target).ischildof(a.addnewrowtop)))return!0;if(!a.editcell)return!1;b.stopPropagation&&b.stopPropagation()}),a.addHandler(e(document),"keyup.edit"+a.element.id,function(b){a._keydown=!1}),a.addHandler(e(document),"keydown.edit"+a.element.id,function(b){a._keydown=!a.editcell;var d=b.charCode?b.charCode:b.keyCode?b.keyCode:0;if(a.handlekeyboardnavigation&&1==a.handlekeyboardnavigation(b))return!1;a.editable&&a.editcell&&(13==d||27==d)&&a._handleeditkeydown&&(f=a._handleeditkeydown(b,a));27==d&&(a.mousecaptured=!1,"visible"==a.selectionarea.css("visibility")&&a.selectionarea.css("visibility","hidden"));if(e.jqx.browser.msie&&12>e.jqx.browser.version&&a.focused&&!a.isNestedGrid){if(13==d&&0==f)return f;var f=!0;!a.editcell&&a.editable&&"programmatic"!=a.editmode&&a._handleeditkeydown&&(f=a._handleeditkeydown(b,a));if(f&&a.keyboardnavigation&&a._handlekeydown)return f=a._handlekeydown(b,a),f||(b.preventDefault&&b.preventDefault(),void 0!=b.stopPropagation&&b.stopPropagation()),f}return!0}),a.addHandler(a.host,"keydown.edit"+a.element.id,function(b){var d=!0;if(a.handlekeyboardnavigation&&1==a.handlekeyboardnavigation(b))return!1;a.editable&&"programmatic"!=a.editmode&&a._handleeditkeydown&&(d=a._handleeditkeydown(b,a),a.isNestedGrid&&b.stopPropagation());e.jqx.browser.msie&&8>e.jqx.browser.version?a.isNestedGrid&&d&&a.keyboardnavigation&&a._handlekeydown&&(d=a._handlekeydown(b,a),b.stopPropagation()):d&&a.keyboardnavigation&&a._handlekeydown&&(d=a._handlekeydown(b,a),a.isNestedGrid&&b.stopPropagation());d||(b.preventDefault&&b.preventDefault(),void 0!=b.stopPropagation&&b.stopPropagation());return d}))},_hittestrow:function(a,b){if(null!=this.vScrollInstance&&null!=this.hScrollInstance){void 0==b&&0==b;var d=this.hScrollInstance,g=this.vScrollInstance.value;"visible"!=this.vScrollBar.css("visibility")&&(g=0);d=d.value;"visible"!=this.hScrollBar.css("visibility")&&(d=0);"deferred"==this.scrollmode&&null!=this._newmax&&g>this._newmax&&(g=this._newmax);var h=parseInt(g)+b;parseInt(d);if(null!=this.visiblerows&&0!=this.visiblerows.length){g=!1;d=this._findvisiblerow(h,this.visiblerows);if(0<=d){var l=this.visiblerows[d],h=!l.rowdetailshidden;if(this.rowdetails&&l.rowdetails){var k=this.visiblerows[d-1];k==l&&(l=k,d--);h&&(h=e(this.hittestinfo[d].visualrow).position().top+parseInt(this.table.css("top")),k=e(this.hittestinfo[d].visualrow).height(),b>=h&&b<=h+k||(d++,l=this.visiblerows[d],g=!0))}}return{index:d,row:l,details:g}}}},getcellatposition:function(a,b){var d=this.that,g=this.showheader?this.columnsheader.height()+2:0,h=this._groupsheader()?this.groupsheader.height():0,h=h+(this.showtoolbar?this.toolbarheight:0),l=this.host.coord();this.hasTransform&&(l=e.jqx.utilities.getOffset(this.host));var k=a-l.left,m=b-g-l.top-h,h=this._hittestrow(k,m),g=h.row,h=this.table[0].rows[h.index];if(this.dataview&&0==this.dataview.records.length){for(var g=this.table[0].rows,n=0,l=0;l=n&&m=k&&k>=a){n=l;break}}return null!=g?(d=this._getcolumnat(n),{row:this.getboundindex(g),column:d.datafield,value:this.getcellvalue(this.getboundindex(g),d.datafield)}):null},_handlemousedown:function(a,b){if(null==a.target||b.disabled||e(a.target).ischildof(this.columnsheader)||e(a.target).ischildof(this.hScrollBar)||e(a.target).ischildof(this.vScrollBar))return!0;var d;a.which?d=3==a.which:a.button&&(d=2==a.button);var g;a.which?g=2==a.which:a.button&&(g=1==a.button);if(g||this.showstatusbar&&(e(a.target).ischildof(this.statusbar)||a.target==this.statusbar[0])||this.showtoolbar&&(e(a.target).ischildof(this.toolbar)||a.target==this.toolbar[0])||this.pageable&&(e(a.target).ischildof(this.pager)||a.target==this.pager[0])||!this.columnsheader||!this.editcell&&this.pageable&&e(a.target).ischildof(this.pager))return!0;g=this.showheader?this.columnsheader.height()+2:0;var h=this._groupsheader()?this.groupsheader.height():0,h=h+(this.showtoolbar?this.toolbarheight:0),l=this.host.coord();if(this.hasTransform){var l=e.jqx.utilities.getOffset(this.host),k=this._getBodyOffset();l.left-=k.left;l.top-=k.top}var m=parseInt(a.pageX),n=parseInt(a.pageY);this.isTouchDevice()&&(k=b.getTouches(a)[0],m=parseInt(k.pageX),n=parseInt(k.pageY),1==b.touchmode&&void 0!=k._pageX&&(m=parseInt(k._pageX),n=parseInt(k._pageY)));k=m-l.left;m=n-g-l.top-h;if(this.pageable&&!this.autoheight&&this.gotopage&&(g=this.pager.coord().top-l.top-h-g,m>g))return;if((l=this._hittestrow(k,m))&&!l.details){g=l.row;var p=l.index,n=a.target.className,q=this.table[0].rows[p];if(null==q)return b.editable&&b.begincelledit&&b.editcell&&b.endcelledit(b.editcell.row,b.editcell.column,!1,!0),!0;b.mousecaptured=!0;b.mousecaptureposition={left:a.pageX,top:a.pageY-h,clickedrow:q};var m=this.hScrollInstance,r=m.value;this.rtl&&"hidden"!=this.hScrollBar.css("visibility")&&(r=m.max-m.value);var t=-1,v=this.groupable?this.groups.length:0;this.rtl&&("hidden"!=this.vScrollBar[0].style.visibility&&(r-=this.scrollbarsize+4),"hidden"==this.hScrollBar[0].style.visibility&&(r=-parseInt(this.content.css("left"))));for(var u=0;u=k&&k>=m){t=u;b.mousecaptureposition.clickedcell=u;break}if(this.rtl&&this._haspinned)for(u=q.cells.length-1;0<=u&&b.columns.records[u].pinned;u--)if(m=h=e(this.columnsrow[0].cells[u]).coord().left-this.host.coord().left,h=this._getcolumnat(u),null==h||!h.hidden)if(h=m+e(this.columnsrow[0].cells[u]).width(),h>=k&&k>=m){t=u;b.mousecaptureposition.clickedcell=u;break}if(null!=g&&0<=t){this._raiseEvent(1,{rowindex:this.getboundindex(g),visibleindex:g.visibleindex,row:g,group:g.group,rightclick:d,originalEvent:a});h=this._getcolumnat(t);k=this.getcellvalue(this.getboundindex(g),h.datafield);this.editable&&this.editcell&&h.datafield==this.editcell.column&&this.getboundindex(g)==this.editcell.row&&(this.mousecaptured=!1);this._raiseEvent(8,{rowindex:this.getboundindex(g),column:h?h.getcolumnproperties():null,row:g,visibleindex:g.visibleindex,datafield:h?h.datafield:null,columnindex:t,value:k,rightclick:d,originalEvent:a});if(this.isTouchDevice())if("checkbox"==h.columntype&&this.editable&&this._overlayElement){if(!this.editcell)return this._overlayElement.css("visibility","hidden"),this.editcell=this.getcell(p,h.datafield),!0}else if("button"==h.columntype&&this._overlayElement)return h.buttonclick&&h.buttonclick(q.cells[t].buttonrow,a),!0;m=!1;if(null!=this._lastmousedown&&300>this._mousedown-this._lastmousedown&&this._clickedrowindex==this.getboundindex(g)&&(this._raiseEvent(22,{rowindex:this.getboundindex(g),row:g,visibleindex:g.visibleindex,group:g.group,rightclick:d,originalEvent:a}),this._clickedcolumn==h.datafield&&this._raiseEvent(23,{rowindex:this.getboundindex(g),row:g,visibleindex:g.visibleindex,column:h?h.getcolumnproperties():null,datafield:h?h.datafield:null,columnindex:t,value:k,rightclick:d,originalEvent:a}),m=!0,this._clickedrowindex=-1,this._clickedcolumn=null,a.isPropagationStopped&&a.isPropagationStopped()))return!1;if(d)return!0;m||(this._clickedrowindex=this.getboundindex(g),this._clickedcolumn=h.datafield);d=e.jqx.utilities.getBrowser();"msie"==d.browser&&7>=parseInt(d.version)&&(0==t&&this.rowdetails&&(n="jqx-grid-group-collapse"),0q.cells.length-v-1&&this._togglegroupstate?this._togglegroupstate(g.bounddata,!0):t==q.cells.length-1-v&&this.rowdetails&&this.showrowdetailscolumn&&(this._togglerowdetails(g.bounddata,!0),this.gridcontent[0].scrollTop=0,this.gridcontent[0].scrollLeft=0):0a&&(a=1);this.records[a-1]=-1};this.length=function(){return this.records.length};this.indexOf=function(a){return this.records.indexOf(a)};this.add=function(a){if(null==a)return!1;this.records[this.records.length]=a;this.updating||this._raiseEvent({type:"add",element:a});return!0};this.insertAt=function(a,b){return null==a||void 0==a||null==b?!1:0<=a?aa)return!1;if(ae.jqx.browser.version)try{b()}catch(d){}else b()};d.unbindDownloadComplete(h.grid.element.id);d.bindDownloadComplete(h.grid.element.id,l);!h.grid.autobind&&h.grid.isInitialized||h.grid.autobind?d.dataBind():h.grid.isInitialized||h.grid.autobind||l();d._options.data=k}};this.getid=function(a,b,d){return 0=k||id!=l[g][n.uniqueId]||h&&h[id])m[m.length]=g;l[g]=t;g++;t.visibleindex=p;p++;d++}if(n.grid.summaryrows){var v=d;e.each(n.grid.summaryrows,function(){var a=e.extend({},this);a.boundindex=b++;n.loadedrecords[v]=a;a.uniqueid=n.generatekey();n.bounditems[n.bounditems.length]=a;l[g]=a;g++;a.visibleindex=p;p++;v++})}return p};this.updateview=function(a,b){var d=this.that,e=this.pagesize*this.pagenum,h=0,l=[],k=this.filters,m=this.updated,n=l.length;if(this.pageable){if(this.virtualmode)if(!this.groupable||0==this.groups.length)this.loadflatrecords(this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum),k,h,m,l,n,[]),this.totalrows=l.length;else if(this.groupable&&0this.totalrecords&&(d=this.totalrecords);this.loadgrouprecords(0,this.pagesize*this.pagenum,d,k,h,m,l,n,[]);this._cachegrouppages[this.pagenum+"_"+this.pagesize]=this.rows;this.totalrows=this.rows.length;return}}else if(this.virtualmode&&(!this.groupable||0==this.groups.length)){var p=this.pagesize;0==p&&(p=Math.min(100,this.totalrecords));null!=a&&null!=b?this.loadflatrecords(a,b,k,h,m,l,n,[]):this.loadflatrecords(this.pagesize*this.pagenum,this.pagesize*(1+this.pagenum),k,h,m,l,n,[]);this.totalrows=this.loadedrecords.length;this.rows=l;if(l.length>=p)return}if(this.groupable&&this.pageable&&0=this.pagesize*this.pagenum&&e<=this.pagesize*(this.pagenum+1))l[h]=m,h++;e++}if((0==l.length||l.lengthp&&(p=0);for(var q=0;qk[t.displayfield]&&(k[t.displayfield]=l,m[t.displayfield]=v,n[t.displayfield]=u);if(0=u){var w=20*u+15*(l-u),x=20*n[t.displayfield]+15*(k[t.displayfield]-n[t.displayfield]);w>x&&0k[t.displayfield]&&(m[t.displayfield]=t.text,k[t.displayfield]=t.text.length,u=t.text.toString(),u=u.replace(/[^A-Z]/g,"").length,n[t.displayfield]=u),v=t.text,l=v.toString().length,u=v.toString(),u=u.replace(/[^A-Z]/g,"").length,0=u&&(w=20*u+15*(l-u),x=20*n[t.displayfield]+15*(k[t.displayfield]-n[t.displayfield]),w>x&&0e.jqx.browser.version&&(c+=10),this.filterable&&this.showfilterrow&&(c+=5),c+=b,c>t.maxwidth&&(c=t.maxwidth),void 0!=t._width&&(t.__width=t._width),t._width=null,"auto"==t.maxwidth||c<=t.maxwidth))f=t.width,cl&&(l=q,k=p,m=r);if(0=r){var t=20*r+15*(q-r),v=20*m+15*(l-m);t>v&&0l&&(k=d.text),p=d.text.toString(),q=p.toString().length,r=p.toString(),r=r.replace(/[^A-Z]/g,"").length,0=r&&(t=20*r+15*(q-r),v=20*m+15*(l-m),t>v&&0e.jqx.browser.version&&(b+=5);this.filterable&&this.showfilterrow&&(b+=5);b+=c;h.remove();b>d.maxwidth&&(b=d.maxwidth);if("auto"==d.maxwidth||b<=d.maxwidth)c=d.width,b=d.left&&q>=g&&(0!=n&&c.pageX=d.left&&q<=d.left+a.host.width()&&(a.resizeline.css("left",q),b))return!1}if(!b&&null!=a.resizablecolumn)return!1});this.removeHandler(e(document),f);this.addHandler(e(document),f,function(b){if(null!=e.data(document.body,"contextmenu"+a.element.id)&&a.autoshowcolumnsmenubutton)return!0;if(null!=a.resizablecolumn&&!a.disabled){var c=a.resizablecolumn.columnelement;if(c.coord().top+c.height()+5b.pageY)a.resizablecolumn=null;else{a._startcolumnwidth=a.resizablecolumn.column.width;a.resizablecolumn.column._width=null;e(document.body).addClass("jqx-disableselect");e(document.body).addClass("jqx-position-reset");a.host.addClass("jqx-disableselect");a.content.addClass("jqx-disableselect");a._mouseDownResize=new Date;a.resizing=!0;if(a._lastmouseDownResize&&a.columnsautoresize&&300>a._lastmouseDownResize-a._mouseDownResize&&-500a._mouseUpResize-a._mouseDownResize)a.resizing=!1,null!=a._resizecolumn&&null!=a.resizeline&&"block"==a.resizeline.css("display")&&(a._resizecolumn=null,a.resizeline.hide(),a.resizestartline.hide(),a.resizebackground.remove());else if(a.resizing=!1,!a.disabled){var b=a.host.width();"hidden"!=a.vScrollBar[0].style.visibility&&(b-=20);0>b&&(b=0);if(null!=a._resizecolumn&&null!=a.resizeline&&"block"==a.resizeline.css("display")){var c=parseInt(a.resizeline.css("left")),d=parseInt(a.resizestartline.css("left")),f=a._startcolumnwidth+c-d;a.rtl&&(f=a._startcolumnwidth-c+d);c=a._resizecolumn.width;a._closemenu();fd.maxwidth&&(g=d.maxwidth);var h=e(this.filterrow[0].cells[f]);h.css("left",c);var l=!0;h.width()==g&&(l=!1);a&&(l=!0);h.width(g);h[0].left=c;d.hidden&&d.hideable?h.css("display","none"):c+=g;if(l)if(d.createfilterwidget&&"custom"==d.filtertype)d.createfilterwidget(d,h);else if(d.filterable)switch(l=function(a,b){var c=e(b.children()[0]);c.width(g-10);c.attr("disabled",a.disabled)},d.filtertype){case "number":case "input":e(h.children()[0]).width(g);h.find("input").width(g-30);h.find("input").attr("disabled",this.disabled);e(h.find(".jqx-dropdownlist-state-normal")).jqxDropDownList({theme:this.theme,disabled:this.disabled});break;case "date":case "range":this.host.jqxDateTimeInput?e(h.children()[0]).jqxDateTimeInput({theme:this.theme,disabled:this.disabled,width:g-10}):l(this,h);break;case "textbox":case "default":l(this,h);break;case "list":case "checkedlist":this.host.jqxDropDownList?e(h.children()[0]).jqxDropDownList({theme:this.theme,disabled:this.disabled,width:g-10}):l(this,h);break;case "bool":case "boolean":this.host.jqxCheckBox?e(h.children()[0]).jqxCheckBox({theme:this.theme,disabled:this.disabled}):l(this,h)}}a=e(this.filterrow.children()[0]);a.width(parseInt(c)+2);a.height(this.filterrowheight)}},clearfilterrow:function(a){this._disablefilterrow=!0;if(this.columns.records){for(var b=this.columns.records.length,c=0;cf.length))return!1}void 0!=a.filtercondition&&(g=a.filtercondition);a="datefilter"==c?d.createfilter(c,f,g,null,a.cellsformat,b.gridlocalization):d.createfilter(c,f,g);d.addfilter(1,a)}else e=!1}return e};switch(d.filtertype){case "range":case "date":if(d._filterwidget.jqxDateTimeInput)if("range"==d.filtertype)if(l=d._filterwidget.jqxDateTimeInput("getRange"),null!=l&&null!=l.from&&null!=l.to){var k="GREATER_THAN_OR_EQUAL",m=new Date(0);m.setHours(0);m.setMinutes(0);m.setFullYear(l.from.getFullYear(),l.from.getMonth(),l.from.getDate());var n=new Date(0);n.setHours(0);n.setMinutes(0);n.setFullYear(l.to.getFullYear(),l.to.getMonth(),l.to.getDate());n.setHours(l.to.getHours());n.setMinutes(l.to.getMinutes());n.setSeconds(l.to.getSeconds());l=f.createfilter(h,m,k);f.addfilter(0,l);h=f.createfilter(h,n,"LESS_THAN_OR_EQUAL");f.addfilter(0,h)}else g=!1;else l=d._filterwidget.jqxDateTimeInput("getDate"),null!=l?(m=new Date(0),m.setHours(0),m.setMinutes(0),m.setFullYear(l.getFullYear(),l.getMonth(),l.getDate()),l=f.createfilter(h,m,"EQUAL"),f.addfilter(0,l)):g=!1;else g=l(d,h,f);break;case "input":d._filterwidget?(l=d._filterwidget.find("input").val(),n=d._filterwidget.find(".filter").jqxDropDownList("selectedIndex"),k=f.getoperatorsbyfiltertype(h)[n],b.updatefilterconditions&&(k=b.updatefilterconditions(h,f.getoperatorsbyfiltertype(h)),void 0!=k&&f.setoperatorsbyfiltertype(h,k),k=f.getoperatorsbyfiltertype(h)[n]),n="NULL"==k||"NOT_NULL"==k,m="EMPTY"==k||"NOT_EMPTY"==k,void 0!=l&&0p.maxwidth&&(q=p.maxwidth);var r=document.createElement("div");r.style.overflow="hidden";r.style.position="absolute";r.style.height="100%";r.className=f;r=e(r);m.appendChild(r[0]);r[0].style.left=b+"px";this.rtl?(r.css("z-index",d++),r.css("border-left-width","1px")):r.css("z-index",d--);"auto"==q&&(q=0);r[0].style.width=parseFloat(q)+"px";r[0].left=b;p.hidden&&p.hideable?r.css("display","none"):b+=q;g[g.length]=r[0];var t=!0;if(this.rtl)this.groupable&&(v=this.showrowdetailscolumn&&this.rowdetails?1:0,this.groups.length+v+n>c-1&&(t=!1)),this.showrowdetailscolumn&&this.rowdetails&&n==c-1&&(t=!1);else{if(this.groupable){var v=this.showrowdetailscolumn&&this.rowdetails?1:0;this.groups.length+v>n&&(t=!1)}this.showrowdetailscolumn&&this.rowdetails&&0==n&&(t=!1)}t&&("custom"==p.filtertype&&p.createfilterwidget?p.createfilterwidget(p,r,function(){h._applyfilterfromfilterrow()}):p.filterable&&(this._filterrowcache[p.datafield]?(l=!0,r.append(this._filterrowcache[p.datafield]),p._filterwidget=this._filterrowcache[p.datafield]):(this._addfilterwidget(p,r,q),k[p.datafield]=p._filterwidget)))}a[0].appendChild(m);this._filterrowcache=k;e.jqx.browser.msie&&8>e.jqx.browser.version&&a.css("z-index",d--);a.width(parseFloat(b)+2);this.filterrow.addClass(f);this.filterrow.css("border-top-width","1px");this.filterrow.css("border-right-width","0px");l&&this._updatefilterrowui(!0)},_addfilterwidget:function(a,b,c){for(var f=this.that,d="",g="",g=0;gc?220:"auto";l.dataBind();var q=8>l.records.length?!0:!1,h=q;k.appendTo(b);k.jqxDropDownList({placeHolder:f.gridlocalization.filterchoosestring,disabled:f.disabled,touchMode:f.touchmode,rtl:f.rtl,checkboxes:n,dropDownWidth:g,source:l.records,autoDropDownHeight:q,theme:this.theme,width:c-10,height:this.filterrowheight-10,displayMember:a.displayfield,valueMember:m});a.createfilterwidget&&a.createfilterwidget(a,b,k);var r=k.jqxDropDownList("listBox");if(n){if(k.jqxDropDownList({selectionRenderer:function(){return'\x3cspan class\x3d"'+f.toThemeProperty("jqx-item")+'" style\x3d"top: 2px; position: relative; color: inherit; border: none; background-color: transparent;"\x3e'+f.gridlocalization.filterselectstring+"\x3c/span\x3e"}}),b=e('\x3cspan style\x3d"top: 2px; position: relative; color: inherit; border: none; background-color: transparent;"\x3e'+f.gridlocalization.filterselectstring+"\x3c/span\x3e"),b.addClass(this.toThemeProperty("jqx-item")),void 0!=r){h||r.host.height(200);r.insertAt(f.gridlocalization.filterselectallstring,0);k.jqxDropDownList("setContent",b);var t=!0;r.checkAll(!1);f.addHandler(r.host,"checkChange",function(a){k[0]._selectionChanged=!0;if(t){if(a.args.label!=f.gridlocalization.filterselectallstring){t=!1;r.host.jqxListBox("checkIndex",0,!0,!1);a=r.host.jqxListBox("getCheckedItems");var b=r.host.jqxListBox("getItems");1==a.length?r.host.jqxListBox("uncheckIndex",0,!0,!1):b.length!=a.length&&r.host.jqxListBox("indeterminateIndex",0,!0,!1)}else t=!1,a.args.checked?r.host.jqxListBox("checkAll",!1):r.host.jqxListBox("uncheckAll",!1);t=!0}})}}else r.insertAt({label:this.gridlocalization.filterchoosestring,value:""},0),k.jqxDropDownList({selectedIndex:0});a._filterwidget=k;k.jqxDropDownList("dropdownlistWrapper");"list"==a.filtertype?this.addHandler(k,"select",function(a){!f.refreshingfilter&&a.args&&"none"!=a.args.type&&(f._applyfilterfromfilterrow(),f.focusedfilter=null)}):this.addHandler(k,"close",function(a){k[0]._selectionChanged&&(f._applyfilterfromfilterrow(),f.focusedfilter=null,k[0]._selectionChanged=!1)})}else g(this,b);break;case "bool":case "boolean":this.host.jqxCheckBox?(g=e('\x3cdiv tabIndex\x3d0 style\x3d"opacity: 0.99; position: absolute; top: 50%; left: 50%; margin-top: -7px; margin-left: -10px;"\x3e\x3c/div\x3e'),g.appendTo(b),g.jqxCheckBox({disabled:f.disabled,enableContainerClick:!1,animationShowDelay:0,animationHideDelay:0,hasThreeStates:!0,theme:this.theme,checked:null}),a.createfilterwidget&&a.createfilterwidget(a,b,g),!0===d||"true"==d?g.jqxCheckBox({checked:!0}):!1!==d&&"false"!=d||g.jqxCheckBox({checked:!1}),a._filterwidget=g,this.addHandler(g,"change",function(a){!f.refreshingfilter&&a.args&&(f.focusedfilter=null,f._applyfilterfromfilterrow())})):g(this,b)}},_getfilterdataadapter:function(a){if(this.source._source){var b={localdata:this.source.records,datatype:this.source.datatype,async:!1},c=this;dataadapter=new e.jqx.dataAdapter(b,{autoBind:!1,autoSort:!0,autoSortField:a.displayfield,async:!1,uniqueDataFields:[a.displayfield],beforeLoadComplete:function(b){var d=[];if(a.cellsformat){for(var e=c._getcolumntypebydatafield(a),h=0;hk.length?h.jqxDropDownList("autoDropDownHeight",!0):h.jqxDropDownList("autoDropDownHeight",!1)}}},_renderfiltercolumn:function(){var a=this.that;this.filterable&&this.columns.records&&e.each(this.columns.records,function(b,c){var f=!1;a.autoshowfiltericon?this.filter?(e(this.filtericon).show(),f=!0):e(this.filtericon).hide():this.filterable&&(e(this.filtericon).show(),f=!0);"right"==this.align&&!this.renderer&&this.element&&(this.element.firstChild.firstChild.style.marginRight=f?"18px":"2px")})},_initcolumntypes:function(){if(this.columns&&this.columns.records){var a=this.source._source.datafields;if(a)for(var b=0;bd.length&&(t=!0),g.jqxDropDownList({autoDropDownHeight:t,selectedIndex:2}),n.jqxDropDownList({autoDropDownHeight:t,selectedIndex:2}));m.jqxDropDownList({selectedIndex:0});h=c.filter;t=new e.jqx.filter;d="";switch(f){case "number":case "int":case "float":case "decimal":d="numericfilter";v=t.getoperatorsbyfiltertype("numericfilter");break;case "boolean":case "bool":d="booleanfilter";v=t.getoperatorsbyfiltertype("booleanfilter");break;case "date":case "time":d="datefilter";v=t.getoperatorsbyfiltertype("datefilter");break;case "string":d="stringfilter",v=t.getoperatorsbyfiltertype("stringfilter")}if(null!=h){r=h.getfilterat(0);t=h.getfilterat(1);h.getoperatorat(0);if(a.updatefilterconditions){var v=[],f=a.updatefilterconditions(d,v);if(void 0!=f){for(v=0;v=c&&c>=n){l=k;break}}null!=f&&(m=this._getcolumnat(l),-1==g.indexOf("jqx-grid-group-expand")&&-1==g.indexOf("jqx-grid-group-collapse")&&-1!=f.boundindex&&b.begincelledit(b.getboundindex(f),m.datafield,m.defaulteditorvalue))}}}}},_getpreveditablecolumn:function(a){for(;0=c&&"multiplecellsadvanced"==b.selectionmode){var f="textbox"==this.editcell.columntype||null==this.editcell.columntype?this.editcell.editor:this.editcell.editor.find("input"),d=b._selection(f),f=f.val().length;0=this.pagesize&&(this.clearselection(!1),d=this.dataview.loadedrecords[g],this.selectcell(this.getboundindex(d),f.datafield)))),!1;if(27==c)return this.endcelledit(this.editcell.row,this.editcell.column,!0,!0),!1}else{d=!1;113==c&&(d=!0);if(!(a.ctrlKey||a.altKey||a.metaKey||(48<=c&&57>=c&&(this.editchar=String.fromCharCode(c),d=!0),65<=c&&90>=c?(this.editchar=String.fromCharCode(c),d=!1,a.shiftKey?d=a.shiftKey:a.modifiers&&(d=!!(a.modifiers&4)),d||(this.editchar=this.editchar.toLowerCase()),d=!0):96<=c&&105>=c&&(this.editchar=c-96,this.editchar=this.editchar.toString(),d=!0),f=e(".jqx-grid").length,d=d&&(1==f||1h.length?k.jqxDropDownList("autoDropDownHeight",!0):k.jqxDropDownList("autoDropDownHeight",!1));m=this.getcellvalue(a,t);h=this.findRecordIndex(m,t,h);f&&(""!=m?k.jqxDropDownList("selectIndex",h,!0):k.jqxDropDownList("selectIndex",-1));if(!this.editcell)return;void 0!=this.editcell.defaultvalue&&k.jqxDropDownList("selectIndex",this.editcell.defaultvalue,!0);d&&k.jqxDropDownList("focus")}break;case "combobox":if(this.host.jqxComboBox){c.innerHTML="";q=e.trim(b.datafield).split(" ").join("");t=e.trim(b.displayfield).split(" ").join("");-1!=q.indexOf(".")&&(q=q.replace(".",""));-1!=t.indexOf(".")&&(t=t.replace(".",""));v=this.editors["combobox_"+q];k=void 0==v?e("\x3cdiv style\x3d'border-radius: 0px; -moz-border-radius: 0px; -webkit-border-radius: 0px; z-index: 99999; top: 0px; left: 0px; position: absolute;' id\x3d'comboboxeditor'\x3e\x3c/div\x3e"):v;k.css("top",e(c).parent().position().top);this.oldhscroll?k.css("left",-p+parseInt(e(c).position().left)):k.css("left",parseInt(e(c).position().left));b.pinned&&k.css("left",p+parseInt(e(c).position().left));void 0==v&&(k.prependTo(this.table),k[0].id="comboboxeditor"+this.element.id+q,v=this.source._source?!0:!1,p=null,v?(p={localdata:this.source.records,datatype:this.source.datatype,async:!1},p=new e.jqx.dataAdapter(p,{autoBind:!1,async:!1,uniqueDataFields:[t],autoSort:!0,autoSortField:t})):p=new e.jqx.dataAdapter(this.source,{autoBind:!1,uniqueDataFields:[t],async:!1,autoSort:!0,autoSortField:t}),v=b.createeditor?!1:!0,k.jqxComboBox({enableBrowserBoundsDetection:!0,keyboardSelection:!1,source:p,rtl:this.rtl,autoDropDownHeight:v,theme:this.theme,width:h.width()-2,height:h.height()-2,displayMember:t,valueMember:g}),k.removeAttr("tabindex"),k.find("div").removeAttr("tabindex"),this.editors["combobox_"+q]=k,b.createeditor&&b.createeditor(a,m,k));b._requirewidthupdate&&k.jqxComboBox({width:h.width()-2});h=k.jqxComboBox("listBox").visibleItems;b.createeditor||(8>h.length?k.jqxComboBox("autoDropDownHeight",!0):k.jqxComboBox("autoDropDownHeight",!1));m=this.getcellvalue(a,t);h=this.findRecordIndex(m,t,h);f&&(""!=m?k.jqxComboBox("selectIndex",h,!0):k.jqxComboBox("selectIndex",-1),k.jqxComboBox("val",m));if(!this.editcell)return;void 0!=this.editcell.defaultvalue&&k.jqxComboBox("selectIndex",this.editcell.defaultvalue,!0);this.editchar&&0c.indexOf(l.gridlocalization.decimalseparator))return!0;for(var e=0;ee.jqx.browser.version&&(k[0].style.zIndex=1+this.columns.records.length+c.style.zIndex),k.css("display","block"),this.editcell.editor=k,this.editcell[g]||(this.editcell[g]={}),this.editcell[g].editor=k);f&&b.initeditor&&b.initeditor(a,m,k,n,this.editchar);l.isTouchDevice()||setTimeout(function(){l.content&&(l.content[0].scrollTop=0,l.content[0].scrollLeft=0);l.gridcontent&&(l.gridcontent[0].scrollLeft=0,l.gridcontent[0].scrollTop=0)},10)}},_setSelection:function(a,b,c){try{if("selectionStart"in a)a.setSelectionRange(b,c);else{var e=a.createTextRange();e.collapse(!0);e.moveEnd("character",c);e.moveStart("character",b);e.select()}}catch(d){}},_hideeditors:function(){if(null!=this.editcells)for(var a in this.editcells)this.editcell=this.editcells[a],this._hidecelleditor()},_hidecelleditor:function(a){if(this.editcell)if("selectedrow"===this.editmode){for(a=0;a=this._gettableheight()&&(d.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up")),d.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down")),m=parseInt(k.position().top)-this.rowsheight-5,0>m&&(m=0,this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down")),l=!0),f.css("top",m+"px"),d.css("top",m+f.outerHeight()-9));k=-g+parseInt(e(h).position().left);d.css("left",g+k+30);m=f.width();m+k>this.host.width()-20&&(m=m+k-this.host.width()+40,k-=m);l?f.css("left",g+parseInt(e(h).position().left)-f.outerWidth()):f.css("left",g+k);f.show();d.show();this.popups||(this.popups=[]);this.popups[this.popups.length]={validation:f,validationrow:d}}else{this.ensurerowvisible(a);var n=this;f.remove();d.remove();setTimeout(function(){for(var d=null,e=0;e=d&&(this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-up")),this.validationpopuparrow.addClass(this.toThemeProperty("jqx-grid-validation-arrow-down")),f=parseInt(e(a.element).parent().position().top)-this.rowsheight-5,"selectedrow"==this.editmode&&(f=this.visiblerows&&this.visiblerows[this.editcell.visiblerowindex]?this.visiblerows[this.editcell.visiblerowindex].top-this.rowsheight-5:parseInt(e(a.editor).position().top)-this.rowsheight-5),0>f&&(f=0,this.validationpopuparrow.removeClass(this.toThemeProperty("jqx-grid-validation-arrow-down")),b=!0),this.validationpopup.css("top",f+"px"),this.validationpopuparrow.css("top",f+this.validationpopup.outerHeight()-9));f=-c+parseInt(e(a.element).position().left);this.validationpopuparrow.css("left",c+f+30);d=this.validationpopup.width();d+f>this.host.width()-20&&(d=d+f-this.host.width()+40,f-=d);b?this.validationpopup.css("left",c+parseInt(e(a.element).position().left)-this.validationpopup.outerWidth()):this.validationpopup.css("left",c+f);"none"==this.editcell.editor.css("display")?(this.validationpopup.hide(),this.validationpopuparrow.hide()):(this.validationpopup.show(),this.validationpopuparrow.show())}}})})(jqxBaseFramework);(function(e){e.extend(e.jqx._jqxGrid.prototype,{_initpager:function(){var a=this.that,b=this.gridlocalization.pagergotopagestring,c=this.gridlocalization.pagershowrowsstring,f=(this.pagerheight-17)/2;this.pagerdiv=this.pagerdiv||e('\x3cdiv style\x3d"width: 100%; height: 100%; position: relative;"\x3e\x3c/div\x3e');if(this.pageable){if(this.pagerrenderer)this.pagerdiv.children().remove(),b=this.pagerrenderer(),null!=b&&this.pagerdiv.append(e(b)),this.pager.append(this.pagerdiv);else{this.pagerdiv.css("top",f);this.pager.append(this.pagerdiv);this.pagergotoinput=this.pagergotoinput||e('\x3cdiv style\x3d"margin-right: 7px; width: 27px; height: 17px; float: right;"\x3e\x3cinput style\x3d"margin-top: 0px; text-align: right; width: 27px;" type\x3d"text"/\x3e\x3c/div\x3e');this.pagergoto=this.pagergoto||e('\x3cdiv style\x3d"float: right; margin-right: 7px;"\x3e\x3c/div\x3e');this.pagerrightbutton=this.pagerrightbutton||e('\x3cdiv type\x3d"button" style\x3d"padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"\x3e\x3c/div\x3e');this.pagerleftbutton=this.pagerleftbutton||e('\x3cdiv type\x3d"button" style\x3d"padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"\x3e\x3c/div\x3e');this.pagerdetails=this.pagerdetails||e('\x3cdiv style\x3d"margin-right: 7px; float: right;"\x3e\x3c/div\x3e');this.pagershowrows=this.pagershowrows||e('\x3cdiv style\x3d"margin-right: 7px; float: right;"\x3e\x3c/div\x3e');this.pagerbuttons=e('\x3cdiv style\x3d"margin-right: 3px; float: right;"\x3e\x3c/div\x3e');this.pagershowrowscombo&&this.pagershowrowscombo.jqxDropDownList&&(this.pagershowrowscombo.remove(),this.pagershowrowscombo=null);this.pagergotoinput.attr("disabled",this.disabled);this.pagerfirstbutton=e('\x3cdiv type\x3d"button" style\x3d"padding: 0px; margin-top: 0px; margin-left: 3px; margin-right: 3px; width: 27px; float: right;"\x3e\x3c/div\x3e');this.pagerlastbutton=e('\x3cdiv type\x3d"button" style\x3d"padding: 0px; margin-top: 0px; margin-right: 3px; width: 27px; float: right;"\x3e\x3c/div\x3e');this.pagershowrowscombo=this.pagershowrowscombo||e('\x3cdiv id\x3d"gridpagerlist" style\x3d"margin-top: 0px; margin-right: 7px; float: right;"\x3e\x3c/div\x3e');this.pagerdiv.children().remove();this.pagershowrowscombo[0].id="gridpagerlist"+this.element.id;this.removeHandler(this.pagerrightbutton,"mousedown");this.removeHandler(this.pagerrightbutton,"mouseup");this.removeHandler(this.pagerrightbutton,"click");this.removeHandler(this.pagerleftbutton,"mousedown");this.removeHandler(this.pagerleftbutton,"mouseup");this.removeHandler(this.pagerleftbutton,"click");this.removeHandler(this.pagerfirstbutton,"mousedown");this.removeHandler(this.pagerfirstbutton,"mouseup");this.removeHandler(this.pagerfirstbutton,"click");this.removeHandler(this.pagerlastbutton,"mousedown");this.removeHandler(this.pagerlastbutton,"mouseup");this.removeHandler(this.pagerlastbutton,"click");this.pagerleftbutton.attr("title",this.gridlocalization.pagerpreviousbuttonstring);this.pagerrightbutton.attr("title",this.gridlocalization.pagernextbuttonstring);if("simple"==this.pagermode){e.jqx.browser.msie&&8>e.jqx.browser.version&&(this.pagerbuttons.css("overflow","visible"),this.pagerbuttons.css("padding","3px"));this.pagerfirstbutton.attr("title",this.gridlocalization.pagerfirstbuttonstring);this.pagerlastbutton.attr("title",this.gridlocalization.pagerlastbuttonstring);var d=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e");d.addClass(this.toThemeProperty("jqx-icon-arrow-first"));this.pagerfirstbutton.wrapInner(d);var g=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e");g.addClass(this.toThemeProperty("jqx-icon-arrow-last"));this.pagerlastbutton.wrapInner(g);this.rtl?(this.pagerdiv.append(this.pagerlastbutton),this.pagerdiv.append(this.pagerrightbutton),this.pagerdiv.append(this.pagerbuttons),this.pagerdiv.append(this.pagerleftbutton),this.pagerdiv.append(this.pagerfirstbutton)):(this.pagerdiv.append(this.pagerfirstbutton),this.pagerdiv.append(this.pagerleftbutton),this.pagerdiv.append(this.pagerbuttons),this.pagerdiv.append(this.pagerrightbutton),this.pagerdiv.append(this.pagerlastbutton));this.pagerlastbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerfirstbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});f=this.rtl?"right":"left";this.pagerbuttons.css("float",f);this.pagerlastbutton.css("float",f);this.pagerfirstbutton.css("float",f);this.pagerrightbutton.css("float",f);this.pagerleftbutton.css("float",f);this.pagerdetails.css("float",this.rtl?"left":"right");this.rtl?(this.pagerdetails.css("margin-left","7px"),this.pagerdetails.css("margin-right","0px")):(this.pagerdetails.css("margin-left","0px"),this.pagerdetails.css("margin-right","7px"));this.pagergotoinput.hide();this.pagershowrowscombo.hide();this.pagergoto.hide();this.pagershowrows.hide()}else this.pagergotoinput.show(),this.pagershowrowscombo.show(),this.pagergoto.show(),this.pagershowrows.show(),this.rtl||(this.pagerdiv.append(this.pagerrightbutton),this.pagerdiv.append(this.pagerleftbutton));this.pagerrightbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerleftbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme});this.pagerleftbutton.find(".jqx-icon-arrow-left").remove();this.pagerrightbutton.find(".jqx-icon-arrow-right").remove();var h=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e");h.addClass(this.toThemeProperty("jqx-icon-arrow-left"));this.pagerleftbutton.wrapInner(h);var l=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e");l.addClass(this.toThemeProperty("jqx-icon-arrow-right"));this.pagerrightbutton.wrapInner(l);this.pagerdiv.append(this.pagerdetails);"simple"!=this.pagermode&&(this.rtl?(this.pagerdiv.append(this.pagergoto),this.pagerdiv.append(this.pagergotoinput),this.pagerdiv.append(this.pagershowrows),this.pagerdiv.append(this.pagershowrowscombo),this.pagerdiv.append(this.pagerdetails),this.pagerdiv.append(this.pagerrightbutton),this.pagerdiv.append(this.pagerleftbutton)):(this.pagerdiv.append(this.pagershowrowscombo),this.pagerdiv.append(this.pagershowrows),this.pagerdiv.append(this.pagergotoinput),this.pagerdiv.append(this.pagergoto)));var k=this.pagesizeoptions;if(!this.pagershowrowscombo.jqxDropDownList)throw Error("jqxGrid: jqxdropdownlist.js is not loaded.");this.pagershowrowscombo.jqxDropDownList({rtl:this.rtl,disabled:this.disabled,source:k,enableBrowserBoundsDetection:!0,keyboardSelection:!1,autoDropDownHeight:!0,width:"auto",height:16,theme:this.theme});for(var m=f=0;m=k[m]&&(f=m);this.pagershowrows[0].innerHTML=c;this.pagergoto[0].innerHTML=b;this.updatepagerdetails();this.pagershowrowscombo.jqxDropDownList({selectedIndex:f});this.pagerpageinput=this.pagergotoinput.find("input");this.pagerpageinput.addClass(this.toThemeProperty("jqx-input"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-widget-content"));this.rtl&&this.pagerpageinput.css("direction","rtl");a=this.that;this.removeHandler(this.pagershowrowscombo,"select");this.addHandler(this.pagershowrowscombo,"select",function(b){if(b.args){a.vScrollInstance&&a.vScrollInstance.setPosition(0);null!=a.editcell&&a.endcelledit&&a.endcelledit(a.editcell.row,a.editcell.column,!0,!1);var c=a.dataview.pagenum*a.dataview.pagesize,d=k[b.args.index];b=a.pagesize;a.pagesize=parseInt(d);isNaN(a.pagesize)&&(a.pagesize=10);100<=d?a.pagershowrowscombo.jqxDropDownList({width:"auto"}):a.pagershowrowscombo.jqxDropDownList({width:44});a.dataview.pagesize=a.pagesize;c=Math.floor(c/a.dataview.pagesize);a.prerenderrequired=!0;a._requiresupdate=!0;a._raiseEvent(10,{pagenum:c,oldpagesize:b,pagesize:a.dataview.pagesize});a.gotopage(c);a.autoheight&&a._updatesizeonwindowresize&&(a._updatesize(!0),setTimeout(function(){a._updatesize(!0)},500))}});var n=this.pagergotoinput.find("input");n.addClass(this.toThemeProperty("jqx-grid-pager-input"));n.addClass(this.toThemeProperty("jqx-rc-all"));this.removeHandler(n,"keydown");this.removeHandler(n,"change");this.addHandler(n,"keydown",function(b){if(65<=b.keyCode&&90>=b.keyCode)return!1;if("13"==b.keyCode)return b=n.val(),b=parseInt(b),isNaN(b)||a.gotopage(b-1),!1});this.addHandler(n,"change",function(){var b=n.val(),b=parseInt(b);isNaN(b)||a.gotopage(b-1)});this.addHandler(this.pagerrightbutton,"mouseenter",function(){l.addClass(a.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseenter",function(){h.addClass(a.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mouseleave",function(){l.removeClass(a.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseleave",function(){h.removeClass(a.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mousedown",function(){l.addClass(a.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerrightbutton,"mouseup",function(){l.removeClass(a.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerleftbutton,"mousedown",function(){h.addClass(a.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerleftbutton,"mouseup",function(){h.removeClass(a.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(e(document),"mouseup.pagerbuttons"+this.element.id,function(){l.removeClass(a.toThemeProperty("jqx-icon-arrow-right-selected"));h.removeClass(a.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerrightbutton,"click",function(){a.pagerrightbutton.jqxButton("disabled")||(a.rtl?a.gotoprevpage():a.gotonextpage())});this.addHandler(this.pagerleftbutton,"click",function(){a.pagerleftbutton.jqxButton("disabled")||(a.rtl?a.gotonextpage():a.gotoprevpage())});var p=this;if("simple"===this.pagermode){var q=this.pagerfirstbutton,r=this.pagerlastbutton;this.addHandler(r,"mouseenter",function(){g.addClass(p.toThemeProperty("jqx-icon-arrow-last-hover"))});this.addHandler(q,"mouseenter",function(){d.addClass(p.toThemeProperty("jqx-icon-arrow-first-hover"))});this.addHandler(r,"mouseleave",function(){g.removeClass(p.toThemeProperty("jqx-icon-arrow-last-hover"))});this.addHandler(q,"mouseleave",function(){d.removeClass(p.toThemeProperty("jqx-icon-arrow-first-hover"))});this.addHandler(r,"mousedown",function(){g.addClass(p.toThemeProperty("jqx-icon-arrow-last-selected"))});this.addHandler(q,"mousedown",function(){d.addClass(p.toThemeProperty("jqx-icon-arrow-first-selected"))});this.addHandler(r,"mouseup",function(){g.removeClass(p.toThemeProperty("jqx-icon-arrow-last-selected"))});this.addHandler(q,"mouseup",function(){d.removeClass(p.toThemeProperty("jqx-icon-arrow-first-selected"))});this.addHandler(e(document),"mouseup.pagerbuttons"+name+this.element.id,function(){l.removeClass(p.toThemeProperty("jqx-icon-arrow-right-selected"));h.removeClass(p.toThemeProperty("jqx-icon-arrow-left-selected"));g&&(g.removeClass(p.toThemeProperty("jqx-icon-arrow-last-selected")),d.removeClass(p.toThemeProperty("jqx-icon-arrow-first-selected")))});this.addHandler(q,"click",function(){q.jqxButton("disabled")||(p.rtl?p.gotopage(Math.ceil(p.dataview.totalrecords/p.pagesize)-1):p.gotopage(0))});this.addHandler(r,"click",function(){r.jqxButton("disabled")||(p.rtl?p.gotopage(0):p.gotopage(Math.ceil(p.dataview.totalrecords/p.pagesize)-1))})}}this.vScrollBar.jqxScrollBar("refresh");this._arrange()}else this.pagerdiv.remove(),this.vScrollBar.jqxScrollBar({thumbSize:0})},_updatepagertheme:function(){if(null!=this.pagershowrowscombo){this.pagershowrowscombo.jqxDropDownList({theme:this.theme});this.pagerrightbutton.jqxButton({theme:this.theme});this.pagerleftbutton.jqxButton({theme:this.theme});this.pagerpageinput.removeClass();var a=this.pagergotoinput.find("input");a.removeClass();a.addClass(this.toThemeProperty("jqx-grid-pager-input"));a.addClass(this.toThemeProperty("jqx-rc-all"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-input"));this.pagerpageinput.addClass(this.toThemeProperty("jqx-widget-content"));this.pagerleftbutton.find(".jqx-icon-arrow-left").remove();this.pagerrightbutton.find(".jqx-icon-arrow-right").remove();var b=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e");b.addClass(this.toThemeProperty("jqx-icon-arrow-left"));this.pagerleftbutton.wrapInner(b);var c=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e");c.addClass(this.toThemeProperty("jqx-icon-arrow-right"));this.pagerrightbutton.wrapInner(c);"simple"==this.pagermode?(e.jqx.browser.msie&&8>e.jqx.browser.version&&(this.pagerbuttons.css("overflow","visible"),this.pagerbuttons.css("padding","3px")),this.pagerfirstbutton.attr("title",this.gridlocalization.pagerfirstbuttonstring),this.pagerlastbutton.attr("title",this.gridlocalization.pagerlastbuttonstring),a=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e"),a.addClass(this.toThemeProperty("jqx-icon-arrow-first")),this.pagerfirstbutton.wrapInner(a),a=e("\x3cdiv style\x3d'margin-left: 6px; width: 15px; height: 15px;'\x3e\x3c/div\x3e"),a.addClass(this.toThemeProperty("jqx-icon-arrow-last")),this.pagerlastbutton.wrapInner(a),this.pagerdiv.append(this.pagerfirstbutton),this.pagerdiv.append(this.pagerleftbutton),this.pagerdiv.append(this.pagerbuttons),this.pagerdiv.append(this.pagerrightbutton),this.pagerdiv.append(this.pagerlastbutton),this.pagerlastbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme}),this.pagerfirstbutton.jqxButton({cursor:"pointer",disabled:this.disabled,theme:this.theme}),this.pagerbuttons.css("float","left"),this.pagerlastbutton.css("float","left"),this.pagerfirstbutton.css("float","left"),this.pagerrightbutton.css("float","left"),this.pagerleftbutton.css("float","left"),this.pagergotoinput.hide(),this.pagershowrowscombo.hide(),this.pagergoto.hide(),this.pagershowrows.hide()):(this.pagergotoinput.show(),this.pagershowrowscombo.show(),this.pagergoto.show(),this.pagershowrows.show());a=function(a,b){a.removeHandler(b,"mouseenter");a.removeHandler(b,"mouseleave");a.removeHandler(b,"mousedown");a.removeHandler(b,"mouseup")};a(this,this.pagerrightbutton);a(this,this.pagerleftbutton);var f=this.that;this.addHandler(this.pagerrightbutton,"mouseenter",function(){c.addClass(f.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseenter",function(){b.addClass(f.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mouseleave",function(){c.removeClass(f.toThemeProperty("jqx-icon-arrow-right-hover"))});this.addHandler(this.pagerleftbutton,"mouseleave",function(){b.removeClass(f.toThemeProperty("jqx-icon-arrow-left-hover"))});this.addHandler(this.pagerrightbutton,"mousedown",function(){c.addClass(f.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerrightbutton,"mouseup",function(){c.removeClass(f.toThemeProperty("jqx-icon-arrow-right-selected"))});this.addHandler(this.pagerleftbutton,"mousedown",function(){b.addClass(f.toThemeProperty("jqx-icon-arrow-left-selected"))});this.addHandler(this.pagerleftbutton,"mouseup",function(){b.removeClass(f.toThemeProperty("jqx-icon-arrow-left-selected"))})}},gotopage:function(a){if(null==a||void 0==a)a=0;-1==a&&(a=0);if(!(0>a)){var b=this.dataview.totalrecords;this.summaryrows&&(b+=this.summaryrows.length);var c=this.pagenum;this._raiseEvent(25,{oldpagenum:this.dataview.pagenum,pagenum:a,pagesize:this.dataview.pagesize});b=Math.ceil(b/this.pagesize);a>=b&&(0==this.dataview.totalrecords&&(this.dataview.pagenum=0,this.updatepagerdetails()),0a&&(a=0));if((this.dataview.pagenum!=a||this._requiresupdate)&&this.pageable){this.source.pager&&this.source.pager(a,this.dataview.pagesize,this.dataview.pagenum);this.dataview.pagenum=a;if(this.virtualmode){if(this.hiddens=[],this.expandedgroups=[],this.rendergridrows){var b=a*this.dataview.pagesize,e=b+this.dataview.pagesize;if(null!=b&&null!=e){this.pagerrightbutton&&(this.pagerrightbutton.jqxButton({disabled:!0}),this.pagerleftbutton.jqxButton({disabled:!0}),this.pagershowrowscombo.jqxDropDownList({disabled:!0}));this.pagerfirstbutton&&(this.pagerfirstbutton.jqxButton({disabled:!0}),this.pagerlastbutton.jqxButton({disabled:!0}));this.updatebounddata("pagechanged");this._raiseEvent(9,{pagenum:a,oldpagenum:c,pagesize:this.dataview.pagesize});this.updatepagerdetails();this.autosavestate&&this.savestate&&this.savestate();return}}}else this.dataview.updateview();this._loadrows();this._updatepageviews();this.tableheight=null;this._updatecolumnwidths();this._updatecellwidths();this._renderrows(this.virtualsizeinfo);this.updatepagerdetails();if(this.autoheight||this.autorowheight)height=this.host.height()-this._gettableheight()+this._pageviews[0].height,height!=this.host.height()&&(this._arrange(),this._updatepageviews(),this.autorowheight&&this._renderrows(this.virtualsizeinfo));null!=this.editcell&&this.endcelledit&&this.endcelledit(this.editcell.row,this.editcell.column,!1,!1);this.focus();this._raiseEvent(9,{pagenum:a,oldpagenum:c,pagesize:this.dataview.pagesize});this.autosavestate&&this.savestate&&this.savestate()}}},gotoprevpage:function(){if(0=this.dataview.totalrecords&&(b=this.dataview.totalrecords);var c=this.dataview.totalrecords;this.summaryrows&&(c+=this.summaryrows.length,(this.dataview.pagenum+1)*this.pagesize>this.dataview.totalrecords&&(b=c));a++;var f=Math.ceil(c/this.dataview.pagesize);1<=f&&f--;f++;if("simple"!==this.pagermode)this.pagergotoinput.find("input").val(this.dataview.pagenum+1);else{var d="",g=this.pagerbuttonscount;0!=g&&g||(g=5);var h=0;for(this.rtl&&(h=g-1);this.rtl&&0<=h||!this.rtl&&hf)break;this.rtl||0==h&&l>g&&(d+="\x3ca class\x3d'"+k+"' tabindex\x3d-1 href\x3d'javascript:;' data-page\x3d'"+(-1+l)+"'\x3e...\x3c/a\x3e");this.dataview.pagenum===l-1&&(k+=" "+this.toTP("jqx-fill-state-pressed"));this.rtl?(h===g-1&&(k=this.toTP("jqx-grid-pager-number"),k+=" "+this.toTP("jqx-rc-all"),f>=1+l&&(d+="\x3ca class\x3d'"+k+"' tabindex\x3d-1 href\x3d'javascript:;' data-page\x3d'"+(1+l)+"'\x3e...\x3c/a\x3e")),this.dataview.pagenum===l-1&&(k+=" "+this.toTP("jqx-fill-state-pressed")),d+="\x3ca class\x3d'"+k+"' tabindex\x3d-1 href\x3d'javascript:;' data-page\x3d'"+l+"'\x3e"+l+"\x3c/a\x3e"):(d+="\x3ca class\x3d'"+k+"' tabindex\x3d-1 href\x3d'javascript:;' data-page\x3d'"+l+"'\x3e"+l+"\x3c/a\x3e",h===g-1&&(k=this.toTP("jqx-grid-pager-number"),k+=" "+this.toTP("jqx-rc-all"),f>=1+l&&(d+="\x3ca class\x3d'"+k+"' tabindex\x3d-1 href\x3d'javascript:;' data-page\x3d'"+(1+l)+"'\x3e...\x3c/a\x3e")));this.rtl&&(k=this.toTP("jqx-grid-pager-number"),k+=" "+this.toTP("jqx-rc-all"),0==h&&l>g&&(d+="\x3ca class\x3d'"+k+"' tabindex\x3d-1 href\x3d'javascript:;' data-page\x3d'"+(-1+l)+"'\x3e...\x3c/a\x3e"));this.rtl?h--:h++}var m=this.pagerbuttons.find("a");this.removeHandler(m,"click");this.removeHandler(m,"mouseenter");this.removeHandler(m,"mouseleave");this.pagerbuttons[0].innerHTML=d;var n=this,m=this.pagerbuttons.find("a");(function(){n.addHandler(m,"click",function(a){a=e(a.target).attr("data-page");n.gotopage(parseInt(a)-1);return!1});n.addHandler(m,"mouseenter",function(a){e(a.target).addClass(n.toTP("jqx-fill-state-hover"))});n.addHandler(m,"mouseleave",function(a){e(a.target).removeClass(n.toTP("jqx-fill-state-hover"))})})(m)}this.pagergotoinput.attr("title","1 - "+f);0==b&&bb&&this.gotoprevpage()}},_updatepagedview:function(a,b,c){a=this.that;this.dataview.rows.length!=this.dataview.pagesize&&this.dataview.updateview();for(var e=this.dataview.rows.length,d=0;dd.left+this.host.width()&&(h=d.left+this.host.width());c=d.top+c;ga.pageX){if(w>=h&&h>=x){t=v;r=!0;break}}else if(w>=n&&n>=x){t=v;r=!0;break}}if(!r)if(b.mousecaptureposition.left>a.pageX)e.each(this.columns.records,function(a,c){if(b.groupable&&0=c){for(var r=!1,D=0;Dc+m){n=v;break}}if(-1!=h&&(c=e(b.table[0].rows[h]).coord().top-d.top-f-2,f=0,this.filterable&&this.showfilterrow&&(f=this.filterrowheight),0>parseFloat(b.table[0].style.top)&&c=n&&d<=r||f>=n&&f<=r||n>=d&&n<=f)&&b._applycellselection(b.getboundindex(h),b._getcolumnat(m).datafield,!0,!1)}c+=5}}b.autosavestate&&b.savestate&&b.savestate();b._renderrows(b.virtualsizeinfo)}}},selectprevcell:function(a,b){var c=this._getcolumnindex(b),c=this._getprevvisiblecolumn(c);null!=c&&(this.clearselection(),this.selectcell(a,c.datafield))},selectnextcell:function(a,b){var c=this._getcolumnindex(b),c=this._getnextvisiblecolumn(c);null!=c&&(this.clearselection(),this.selectcell(a,c.datafield))},_getfirstvisiblecolumn:function(){for(var a=this.columns.records.length,b=0;b=c){if(a.altKey||void 0!=b._cancelkeydown&&0!=b._cancelkeydown)return b._cancelkeydown=!1,!0;if("selectedrow"!==b.editmode){if(b.endcelledit(b.editcell.row,b.editcell.column,!1,!0),b._cancelkeydown=!1,b.editcell&&!b.editcell.validated)return b._rendervisualrows(),b.endcelledit(b.editcell.row,b.editcell.column,!1,!0),!1}else return!0}else return!0;if("none"==b.selectionmode||b.showfilterrow&&b.filterable&&this.filterrow&&e(a.target).ischildof(b.filterrow)||b.showeverpresentrow&&(b.addnewrowtop&&e(a.target).ischildof(b.addnewrowtop)||b.addnewrowbottom&&e(a.target).ischildof(b.addnewrowbottom))||b.pageable&&e(a.target).ischildof(this.pager)||this.showtoolbar&&e(a.target).ischildof(this.toolbar)||this.showstatusbar&&e(a.target).ischildof(this.statusbar))return!0;var f=!1;if(a.altKey)return!0;var d=Math.round(b._gettableheight()),g=Math.round(d/b.rowsheight),h=b.getdatainformation();switch(b.selectionmode){case "singlecell":case "multiplecells":case "multiplecellsextended":case "multiplecellsadvanced":var l=b.getselectedcell();if(null!=l){var d=this.getrowvisibleindex(l.rowindex),k=l.datafield,m=b._getcolumnindex(k),n=function(c,d,e,g){var h=function(a,c){var d=b.dataview.loadedrecords[a];if(b.groupable&&0k;){l=!1;"down"==g?d=b.getdisplayrows()[h+k]:"up"==g&&(d=b.getdisplayrows()[h-k]);if(!d)break;d&&d.group&&(l=!0);for(var m=d.parentItem;m;){var n;if(n=m)n=m.group?b.expandedgroups[m.uniqueid]?b.expandedgroups[m.uniqueid].expanded:void 0:!1,n=!n;n&&(l=!0);m=m.parentItem}if(!l)break;k++}300==k&&(d=null);if(b.pageable&&(h=!1,d)){for(k=0;kd+g?n(d+g,k,!p):q());38==c&&(v?l():0d+1||b.groupable&&0d;){h=!1;"down"==g?c=b.getdisplayrows()[a+d]:"up"==g&&(c=b.getdisplayrows()[a-d]);if(!c)break;c&&c.group&&(h=!0);for(var k=c.parentItem;k;){var l;if(l=k)l=k.group?b.expandedgroups[k.uniqueid]?b.expandedgroups[k.uniqueid].expanded:void 0:!1,l=!l;l&&(h=!0);k=k.parentItem}if(!h)break;d++}300==d&&(c=null);if(b.pageable&&(d=!1,c)){for(h=0;hd+g?u(d+g,!p):q():38==c?0d+1||b.groupable&&0e(f).width()+e(f).coord().left))){var l=0;d=f.cells.length;b.rowdetails&&b.showrowdetailscolumn?this.rtl?(--d,d-=this.groups.length):l=1+this.groups.length:this.groupable&&(this.rtl?d-=this.groups.length:l=this.groups.length);if(0!=f.cells.length){var k=f.cells[l].className;if(!(h.group||0<=this.selectionmode.indexOf("row")&&-1!=k.indexOf("jqx-grid-cell-selected")))if(this.hoveredrow=c,-1!=this.selectionmode.indexOf("cell")||"checkbox"==this.selectionmode){var h=-1,m=this.hScrollInstance,k=m.value;for(this.rtl&&"hidden"!=this.hScrollBar.css("visibility")&&(k=m.max-m.value);l=g&&g>=m){h=l;break}if(-1!=h&&(g=f.cells[h],this.cellhover&&this.cellhover(g,a.pageX,a.pageY),-1==g.className.indexOf("jqx-grid-cell-selected"))){if(this.editcell&&(f=this._getcolumnat(h))&&this.editcell.row==c&&this.editcell.column==f.datafield)return;e(g).addClass(this.toTP("jqx-grid-cell-hover"));e(g).addClass(this.toTP("jqx-fill-state-hover"))}}else for(;lb?1:0;e.jqx.dataFormat.isNumber(a)||e.jqx.dataFormat.isNumber(b)||(a=String(a).toLowerCase(),b=String(b).toLowerCase())}return ab?1:0};this._equals=function(a,b){return 0===this._compare(a,b)}};e.extend(e.jqx._jqxGrid.prototype,{_rendersortcolumn:function(){var a=this.that,b=this.getsortcolumn();if(this.sortdirection){var c=function(b,c){var g=a.getcolumn(b);g&&(c.ascending?e.jqx.aria(g.element,"aria-sort","ascending"):c.descending?e.jqx.aria(g.element,"aria-sort","descending"):e.jqx.aria(g.element,"aria-sort","none"))};this._oldsortinfo&&this._oldsortinfo.column&&c(this._oldsortinfo.column,{ascending:!1,descending:!1});c(b,this.sortdirection)}this._oldsortinfo={column:b,direction:this.sortdirection};this.sortdirection&&e.each(this.columns.records,function(c,d){var g=e.data(document.body,"groupsortelements"+this.displayfield);null==b||this.displayfield!=b?(e(this.sortasc).hide(),e(this.sortdesc).hide(),null!=g&&(g.sortasc.hide(),g.sortdesc.hide())):a.sortdirection.ascending?(e(this.sortasc).show(),e(this.sortdesc).hide(),null!=g&&(g.sortasc.show(),g.sortdesc.hide())):(e(this.sortasc).hide(),e(this.sortdesc).show(),null!=g&&(g.sortasc.hide(),g.sortdesc.show()))})},getsortcolumn:function(){return void 0!=this.sortcolumn?this.sortcolumn:null},removesort:function(){this.sortby(null)},sortby:function(a,b,c,e,d){if(this._loading&&!1!==d)throw Error("jqxGrid: "+this.loadingerrormessage);null==a&&(b=null,a=this.sortcolumn);if(void 0!=a){d=this.that;void 0==c&&null!=d.source.sortcomparer&&(c=d.source.sortcomparer);ascending="a"==b||"asc"==b||"ascending"==b||1==b?!0:!1;d.sortdirection=null!=b?{ascending:ascending,descending:!ascending}:{ascending:!1,descending:!1};d.sortcolumn=null!=b?a:null;if(d.source.sort||d.virtualmode){if(d.dataview.sortfield=a,d.dataview.sortfielddirection=null==b?"":ascending?"asc":"desc",d.source.sort&&!this._loading){d.source.sort(a,b);d._raiseEvent(6,{sortinformation:d.getsortinformation()});return}}else d.dataview.sortby(a,b,c);!1!==e&&(d.groupable&&0=a.minLength){var b=a.listBoxContainer.jqxListBox("items");b?0e.jqx.browser.version||k.input.attr("placeholder",k.placeHolder);a.propertyChangeMap.disabled=function(a,b,c,d){d?(a.host.addClass(k.toThemeProperty("jqx-combobox-state-disabled")),a.host.addClass(k.toThemeProperty("jqx-fill-state-disabled")),a.dropdownlistContent.addClass(k.toThemeProperty("jqx-combobox-content-disabled"))):(a.host.removeClass(k.toThemeProperty("jqx-combobox-state-disabled")),a.host.removeClass(k.toThemeProperty("jqx-fill-state-disabled")),a.dropdownlistContent.removeClass(k.toThemeProperty("jqx-combobox-content-disabled")));a.input.attr("disabled",a.disabled);e.jqx.aria(a,"aria-disabled",a.disabled);a.input.attr("disabled",a.disabled)};a.disabled&&(a.host.addClass(a.toThemeProperty("jqx-combobox-state-disabled")),a.host.addClass(a.toThemeProperty("jqx-fill-state-disabled")),a.dropdownlistContent.addClass(a.toThemeProperty("jqx-combobox-content-disabled")));a.host.addClass(a.toThemeProperty("jqx-combobox-state-normal"));a.host.addClass(a.toThemeProperty("jqx-combobox"));a.host.addClass(a.toThemeProperty("jqx-rc-all"));a.host.addClass(a.toThemeProperty("jqx-widget"));a.host.addClass(a.toThemeProperty("jqx-widget-content"));a.dropdownlistArrowIcon=e("\x3cdiv\x3e\x3c/div\x3e");a.dropdownlistArrowIcon.addClass(a.toThemeProperty("jqx-icon-arrow-down"));a.dropdownlistArrowIcon.addClass(a.toThemeProperty("jqx-icon"));a.dropdownlistArrow.append(a.dropdownlistArrowIcon);a.dropdownlistArrow.addClass(a.toThemeProperty("jqx-combobox-arrow-normal"));a.dropdownlistArrow.addClass(a.toThemeProperty("jqx-fill-state-normal"));a.rtl?a.dropdownlistArrow.addClass(a.toThemeProperty("jqx-rc-l")):a.dropdownlistArrow.addClass(a.toThemeProperty("jqx-rc-r"));a._setSize();a._updateHandlers();a.addHandler(a.input,"keyup.textchange",function(b){a._search(b);a.cinput&&a.input&&(a.displayMember?a._updateInputSelection():a.cinput[0].value=a.input[0].value)});e.jqx.browser.msie&&8>e.jqx.browser.version&&0this.host.width()&&(c=this.host.width());25>c&&(c=25);this.input.css("width",c+"px");0==this.selectedItems.length?(this.input.css("width","100%"),this.input.attr("placeholder",this.placeHolder)):this.input.attr("placeholder","");b=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px";c=e.jqx.mobile.isSafariMobileBrowser()||e.jqx.mobile.isWindowsPhone();null!=c&&c&&(b=e.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight()),"0px"!=e("body").css("border-top-width")&&(b=parseInt(b)-this._getBodyOffset().top+"px"));this.container.css("top",b);b=parseInt(this.host.height());this.dropdownlistArrow.height(b)}if(!this.isanimating){if(a.altKey&&38==a.keyCode)return this.hideListBox("altKey"),!1;if(a.altKey&&40==a.keyCode)return this.isOpened()||this.showListBox("altKey"),!1}if(37==a.keyCode||39==a.keyCode)return!1;if(!(a.altKey||18==a.keyCode||33<=a.keyCode&&40>=a.keyCode||(a.ctrlKey||this.ctrlKey)&&88!=a.keyCode&&86!=a.keyCode))if(b=this.input.val(),0!=b.length||this.autoComplete)if(this.remoteAutoComplete){var f=this;b.length>=f.minLength?a.ctrlKey||a.altKey||(f.searchString!=b&&(null==f.listBoxContainer.jqxListBox("source")&&f.listBoxContainer.jqxListBox({source:f.source}),this._searchTimer&&clearTimeout(this._searchTimer),13!=a.keyCode&&27!=a.keyCode&&(this._searchTimer=setTimeout(function(){f.listBox.vScrollInstance.value=0;f.autoDropDownHeight&&(f.listBox.autoHeight=!0);f.searchString=f.input.val();if(null!=f.search)f.search(f.input.val());else throw"'search' function is not defined";},this.remoteAutoCompleteDelay))),f.searchString=b):(this._searchTimer&&clearTimeout(this._searchTimer),f.listBox.vScrollInstance.value=0,f.searchString="",f.listBoxContainer.jqxListBox({source:null}))}else{if(f=this,b!==f.searchString){if("27"!=a.keyCode&&"13"!=a.keyCode){var d=this._updateItemsVisibility(b),b=d.matchItems,d=d.index;this.autoComplete||this.removeAutoComplete||this.multiSelect&&!(this.multiSelect&&0<=d)||(this.listBox.selectIndex(d),this.listBox.isIndexInView(d)?this.listBox._renderItems():this.listBox.ensureVisible(d));this.autoComplete&&0===b.length&&this.hideListBox("search")}if("13"==a.keyCode)(d="block"==this.container.css("display"))&&!this.isanimating&&(this.hideListBox("keyboard"),this._oldvalue=this.listBox.selectedValue);else if("27"==a.keyCode){if((d="block"==this.container.css("display"))&&!this.isanimating){if(h.multiSelect)h.input.val(""),h.listBox.selectedValue=null;else{var g=this.listBox.getVisibleItem(this._oldvalue);if(g){var h=this;setTimeout(function(){h.autoComplete&&h._updateItemsVisibility("");h.listBox.selectIndex(g.index);h.renderSelection("api")},h.closeDelay)}else this.clearSelection()}this.hideListBox("keyboard");this.renderSelection("api");a.preventDefault();return!1}}else this.isOpened()||this.opening||a.ctrlKey||this.listBox.visibleItems&&0=e&&b.pageY<=e+a.host.height()+2&&b.pageX>=c&&b.pageX=h&&b.pageY<=h+a.container.height()-20&&b.pageX>=l&&b.pageXe.jqx.browser.version,this.input.val(""),this.input.attr("value",""),a||this.input.attr("placeholder",this.placeHolder),this._updateInputSelection();else{this.selectedIndex=this.listBox.selectedIndex;var b=e("\x3cspan\x3e\x3c/span\x3e");void 0!=a.label&&null!=a.label&&0d&&f>this.host.width()&&(d=this.host.coord().left,f-=this.host.width(),b.left=d-f+2);0>b.left&&(b.left=parseInt(this.host.coord().left)+"px");b.top-=Math.min(b.top,b.top+a>g&&g>a?Math.abs(a+c+23):0);return b},open:function(){this.isOpened()||this.opening||this.showListBox("api")},close:function(){this.isOpened()&&this.hideListBox("api")},_getBodyOffset:function(){var a=0,b=0;"0px"!=e("body").css("border-top-width")&&(a=parseInt(e("body").css("border-top-width")),isNaN(a)&&(a=0));"0px"!=e("body").css("border-left-width")&&(b=parseInt(e("body").css("border-left-width")),isNaN(b)&&(b=0));return{left:b,top:a}},showListBox:function(a){if(!this.listBox.items||0!=this.listBox.items.length){"search"!=a||this.autoComplete||this.remoteAutoComplete||this.autoDropDownHeight&&this.container.height(this.listBoxContainer.height()+25);if((this.autoComplete||this.multiSelect&&!this.remoteAutoComplete)&&"search"!=a&&(this._updateItemsVisibility(""),this.multiSelect))for(var b=this.getVisibleItems(),c=0;cthis.host.width()?this.container.css("left",25+parseInt(Math.round(c))-l+"px"):this.container.css("left",25+parseInt(Math.round(c))+l+"px")}this.enableBrowserBoundsDetection&&(b=this.testOffset(d,{left:parseInt(this.container.css("left")),top:parseInt(b)},parseInt(this.host.outerHeight())),parseInt(this.container.css("top"))!=b.top?(g=!0,d.css("top",23),d.addClass(this.toThemeProperty("jqx-popup-up"))):d.css("top",0),this.container.css("top",b.top),this.container.css("top",b.top),parseInt(this.container.css("left"))!=b.left&&this.container.css("left",b.left));"none"==this.animationType?(this.container.css("display","block"),e.data(document.body,"openedCombojqxListBoxParent",f),e.data(document.body,"openedCombojqxListBox"+f.element.id,d),d.css("margin-top",0),d.css("opacity",1)):(this.container.css("display","block"),b=d.outerHeight(),d.stop(),"fade"==this.animationType?(d.css("margin-top",0),d.css("opacity",0),d.animate({opacity:1},this.openDelay,function(){f.isanimating=!1;f.opening=!1;e.data(document.body,"openedCombojqxListBoxParent",f);e.data(document.body,"openedCombojqxListBox"+f.element.id,d)})):(d.css("opacity",1),g?d.css("margin-top",b):d.css("margin-top",-b),this.opening=this.isanimating=!0,d.animate({"margin-top":0},this.openDelay,function(){f.isanimating=!1;f.opening=!1;e.data(document.body,"openedCombojqxListBoxParent",f);e.data(document.body,"openedCombojqxListBox"+f.element.id,d)})));a._renderItems();g?(this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded")),d.addClass(this.toThemeProperty("jqx-rc-b-expanded")),this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-t-expanded"))):(this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded")),d.addClass(this.toThemeProperty("jqx-rc-t-expanded")),this.dropdownlistArrow.addClass(this.toThemeProperty("jqx-rc-b-expanded")));d.addClass(this.toThemeProperty("jqx-fill-state-focus"));this._raiseEvent("0",a)}},doMultiSelect:function(a){this.checkboxes&&(this.multiSelect=!1);var b=this;if(this.multiSelect){if(!this.validateSelection||this.validateSelection(this.listBox.selectedValue)){if(this.listBox.selectedValue){if(-1===this.selectedItems.indexOf(this.listBox.selectedValue)){var c=this.getItemByValue(this.listBox.selectedValue);c&&c.visible&&(this.selectedItems.push(this.listBox.selectedValue),this._selectedItems.push(c),this._raiseEvent("2",{index:c.index,item:c}),this._raiseEvent("4",{index:c.index,item:c}))}this.listBox.selectedIndex=0}if(c=this.listBox.items){for(var f=0;fe.jqx.browser.version&&(l='\x3cdiv style\x3d"position: relative; overflow: hidden; float: left; min-height: 16px; min-width: 18px;"\x3e\x3cdiv style\x3d"position: absolute; left: 100%; top: 50%; margin-left: -18px; margin-top: -7px; float: none; width: 16px; height: 16px;" class\x3d"'+b.toThemeProperty("jqx-icon-close")+'"\x3e\x3c/div\x3e\x3c/div\x3e'),b.rtl&&(l='\x3cdiv style\x3d"position: relative; overflow: hidden; float: '+c+'; min-height: 16px; min-width: 18px;"\x3e\x3cdiv style\x3d"position: absolute; left: 0px; top: 50%; margin-top: -7px; float: none; width: 16px; height: 16px;" class\x3d"'+b.toThemeProperty("jqx-icon-close")+'"\x3e\x3c/div\x3e\x3c/div\x3e',e.jqx.browser.msie&&8>e.jqx.browser.version&&(l='\x3cdiv style\x3d"position: relative; overflow: hidden; float: left; min-height: 16px; min-width: 18px;"\x3e\x3cdiv style\x3d"position: absolute; left: 0px; top: 50%; margin-top: -7px; float: none; width: 16px; height: 16px;" class\x3d"'+b.toThemeProperty("jqx-icon-close")+'"\x3e\x3c/div\x3e\x3c/div\x3e')),f[0].innerHTML+=l)}else""==f[0].innerHTML&&(f[0].innerHTML='\x3ca href\x3d"#"\x3e\x3c/a\x3e');b.dropdownlistContent.append(f)});b.dropdownlistContent.append(b.input);b.input.val("");!1!==a&&(b.input.focus(),setTimeout(function(){b.input.focus()},10));c=b.dropdownlistContent.find(".jqx-button");!0===this.touchMode&&(f="mousedown");this.addHandler(c,f,function(a){if(0<=a.target.className.indexOf("jqx-icon-close")||b.disabled)return!0;var c=e(a.target).attr("data-value");b.getItemByValue(c)&&(b.listBox.selectedValue=null,b.listBox.clearSelection());b.listBox.scrollTo(0,0);b.open();a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1});this.addHandler(c.find(".jqx-icon-close"),f,function(a){if(!b.disabled){a=e(a.target).parent().parent().find("a").attr("data-value");var c=b.getItemByValue(a);if(c||b.remoteAutoComplete&&!c&&0<=b.selectedItems.indexOf(a)){b.listBox.selectedValue=null;var f=b.selectedItems.indexOf(a),l=c&&0<=c.index?c.index:f;if(0<=f){b.selectedItems.splice(f,1);var k=b._selectedItems[f];k||(k=c);b._selectedItems.splice(f,1);b._raiseEvent("3",{index:l,type:"mouse",item:k});b._raiseEvent("4",{index:l,type:"mouse",item:k});b.doMultiSelect()}else for(f=0;f=e.jqx.browser.version&&this.dropdownlistContent.css("left",1+this.dropdownlistArrow.width()));this.multiSelect&&(this.input.css("float","left"),this.dropdownlistWrapper.parent().css("height","auto"),this.dropdownlistContent.css("height","auto"),this.dropdownlistWrapper.css("height","auto"),this.dropdownlistContent.css("position","relative"),this.dropdownlistContent.css("cursor","text"),this.host.css("height","auto"),this.host.css("min-height",this.height),this.dropdownlistContent.css("min-height",this.height),b=parseInt(this.host.height()),this.dropdownlistArrow.height(b),b=parseInt(this.host.css("min-height")),b=parseInt(b)/2-parseInt(c)/2,0e.jqx.browser.version&&0=d&&b.pageY<=d+a.host.height()&&b.pageX>=e&&b.pageX=g&&b.pageY<=g+a.container.height()&&b.pageX>=h&&b.pageX=this.width.toString().indexOf("%");b.remove();b.removeClass();if(this.selectionRenderer)e.jqx.utilities.html(this.dropdownlistContent,this.selectionRenderer(b,a.index,a.label,a.value));else if(this.checkboxes){for(var a=this.getCheckedItems(),g="",h=0;hd&&f>this.host.width()&&(d=this.host.coord().left,f-=this.host.width(),b.left=d-f+2);0>b.left&&(b.left=parseInt(this.host.coord().left)+"px");b.top-=Math.min(b.top,b.top+a>g&&g>a?Math.abs(a+c+22):0);return b},open:function(){this.showListBox()},close:function(){this.hideListBox()},_getBodyOffset:function(){var a=0,b=0;"0px"!=e("body").css("border-top-width")&&(a=parseInt(e("body").css("border-top-width")),isNaN(a)&&(a=0));"0px"!=e("body").css("border-left-width")&&(b=parseInt(e("body").css("border-left-width")),isNaN(b)&&(b=0));return{left:b,top:a}},showListBox:function(){e.jqx.aria(this,"aria-expanded",!0);this.listBox._renderOnDemand&&this.listBoxContainer.jqxListBox({_renderOnDemand:!1});if("auto"==this.dropDownWidth&&null!=this.width&&this.width.indexOf&&(-1!=this.width.indexOf("%")||-1!=this.width.indexOf("auto"))&&this.listBox.host.width()!=this.host.width()){var a=this.host.width();this.listBoxContainer.jqxListBox({width:a});this.container.width(parseInt(a)+25)}var b=this,c=this.listBoxContainer,f=this.listBox;e(window).scrollTop();e(window).scrollLeft();var a=parseInt(this._findPos(this.host[0])[1])+parseInt(this.host.outerHeight())-1+"px",d,g=parseInt(Math.round(this.host.coord(!0).left));d=g+"px";var h=e.jqx.mobile.isSafariMobileBrowser()||e.jqx.mobile.isWindowsPhone();if(null!=this.listBox){this.ishiding=!1;this.keyboardSelection||(this.listBox.selectIndex(this.selectedIndex),this.listBox.ensureVisible(this.selectedIndex));this.tempSelectedIndex=this.selectedIndex;this.autoDropDownHeight&&this.container.height(this.listBoxContainer.height()+25);null!=h&&h&&(d=e.jqx.mobile.getLeftPos(this.element),a=e.jqx.mobile.getTopPos(this.element)+parseInt(this.host.outerHeight()),"0px"!=e("body").css("border-top-width")&&(a=parseInt(a)-this._getBodyOffset().top+"px"),"0px"!=e("body").css("border-left-width")&&(d=parseInt(d)-this._getBodyOffset().left+"px"));c.stop();"simple"!==this.renderMode&&(this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-selected")),this.host.addClass(this.toThemeProperty("jqx-fill-state-pressed")),this.arrow.addClass(this.toThemeProperty("jqx-icon-arrow-down-selected")));this.container.css("left",d);this.container.css("top",a);f._arrange();d=!1;if("right"==this.dropDownHorizontalAlignment||this.rtl){var h=this.container.outerWidth(),l=Math.abs(h-this.host.width());h>this.host.width()?this.container.css("left",25+parseInt(Math.round(g))-l+"px"):this.container.css("left",25+parseInt(Math.round(g))+l+"px")}this.enableBrowserBoundsDetection&&(a=this.testOffset(c,{left:parseInt(this.container.css("left")),top:parseInt(a)},parseInt(this.host.outerHeight())),parseInt(this.container.css("top"))!=a.top?(d=!0,c.css("top",23),c.addClass(this.toThemeProperty("jqx-popup-up"))):c.css("top",0),this.container.css("top",a.top),parseInt(this.container.css("left"))!=a.left&&this.container.css("left",a.left));"none"==this.animationType?(this.container.css("display","block"),e.data(document.body,"openedJQXListBoxParent",b),e.data(document.body,"openedJQXListBox"+this.id,c),c.css("margin-top",0),c.css("opacity",1),f._renderItems(),b._raiseEvent("0",f)):(this.container.css("display","block"),b.isanimating=!0,"fade"==this.animationType?(c.css("margin-top",0),c.css("opacity",0),c.animate({opacity:1},this.openDelay,function(){e.data(document.body,"openedJQXListBoxParent",b);e.data(document.body,"openedJQXListBox"+b.id,c);b.ishiding=!1;b.isanimating=!1;f._renderItems();b._raiseEvent("0",f)})):(c.css("opacity",1),a=c.outerHeight(),d?c.css("margin-top",a):c.css("margin-top",-a),c.animate({"margin-top":0},this.openDelay,function(){e.data(document.body,"openedJQXListBoxParent",b);e.data(document.body,"openedJQXListBox"+b.id,c);b.ishiding=!1;b.isanimating=!1;f._renderItems();b._raiseEvent("0",f)})));d?(this.host.addClass(this.toThemeProperty("jqx-rc-t-expanded")),c.addClass(this.toThemeProperty("jqx-rc-b-expanded"))):(this.host.addClass(this.toThemeProperty("jqx-rc-b-expanded")),c.addClass(this.toThemeProperty("jqx-rc-t-expanded")));"simple"!==this.renderMode&&(c.addClass(this.toThemeProperty("jqx-fill-state-focus")),this.host.addClass(this.toThemeProperty("jqx-dropdownlist-state-focus")),this.host.addClass(this.toThemeProperty("jqx-fill-state-focus")))}},hideListBox:function(){e.jqx.aria(this,"aria-expanded",!1);var a=this.listBoxContainer,b=this.listBox,c=this.container,f=this;e.data(document.body,"openedJQXListBox"+this.id,null);if("none"==this.animationType)this.container.css("display","none");else if(!f.ishiding){a.stop();var d=a.outerHeight();a.css("margin-top",0);f.isanimating=!0;var g=-d;parseInt(this.container.coord().top)=e&&(this.dropdownlistContent[0].style.width="0px");"auto"===this.width&&(this.dropdownlistContent.css("width","auto"),a=this.dropdownlistContent.width()+c+6,this.host.width(a));this.dropdownlistContent[0].style.height=b+"px";this.dropdownlistContent[0].style.left="0px";this.dropdownlistContent[0].style.top="0px";this.dropdownlistArrow[0].style.width=c+"px";this.width&&0<=this.width.toString().indexOf("%")&&(this.dropdownlistArrow[0].style.width=100*c/a+"%",this.dropdownlistContent[0].style.width=100*e/a+"%");this.dropdownlistArrow[0].style.height=b+"px";this.rtl&&(this.dropdownlistArrow.css("float","left"),this.dropdownlistContent.css("float","right"))},destroy:function(){e.jqx.utilities.resize(this.host,null,!0);this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBoxContainer,"unselect");this.removeHandler(this.listBoxContainer,"change");this.removeHandler(this.dropdownlistWrapper,"selectstart");this.removeHandler(this.dropdownlistWrapper,"mousedown");this.removeHandler(this.host,"keydown");this.removeHandler(this.listBoxContainer,"select");this.removeHandler(this.listBox.content,"click");this.removeHandler(this.listBoxContainer,"bindingComplete");this.host.parents()&&this.removeHandler(this.host.parents(),"scroll.dropdownlist"+this.element.id);this.removeHandlers();this.listBoxContainer.jqxListBox("destroy");this.listBoxContainer.remove();this.host.removeClass();this.removeHandler(e(document),"mousedown."+this.id,this.closeOpenedListBox);this.touch&&this.removeHandler(e(document),e.jqx.mobile.getTouchEventName("touchstart")+"."+this.id);this.dropdownlistArrow.remove();delete this.dropdownlistArrow;delete this.dropdownlistWrapper;delete this.listBoxContainer;delete this.input;delete this.arrow;delete this.dropdownlistContent;delete this.listBox;delete this._firstDiv;this.container.remove();delete this.container;var a=e.data(this.element,"jqxDropDownList");a&&delete a.instance;this.host.removeData();this.host.remove();delete this.comboStructure;delete this.host;delete this.element},_raiseEvent:function(a,b){void 0==b&&(b={owner:null});var c=this.events[a];args=b;args.owner=this;c=new e.Event(c);c.owner=this;if(2==a||3==a||4==a||5==a)c.args=b;return this.host.trigger(c)},propertyChangedHandler:function(a,b,c,f){if(void 0!=a.isInitialized&&0!=a.isInitialized){"filterable"==b&&a.listBoxContainer.jqxListBox({filterable:f});"filterHeight"==b&&a.listBoxContainer.jqxListBox({filterHeight:f});"filterPlaceHolder"==b&&a.listBoxContainer.jqxListBox({filterPlaceHolder:f});"filterDelay"==b&&a.listBoxContainer.jqxListBox({filterDelay:f});"enableSelection"==b&&a.listBoxContainer.jqxListBox({enableSelection:f});"enableHover"==b&&a.listBoxContainer.jqxListBox({enableHover:f});"autoOpen"==b&&a._updateHandlers();"emptyString"==b&&(a.listBox.emptyString=a.emptyString);"itemHeight"==b&&a.listBoxContainer.jqxListBox({itemHeight:f});"renderer"==b&&a.listBoxContainer.jqxListBox({renderer:f});"rtl"==b&&(f?(a.dropdownlistArrow.css("float","left"),a.dropdownlistContent.css("float","right")):(a.dropdownlistArrow.css("float","right"),a.dropdownlistContent.css("float","left")),a.listBoxContainer.jqxListBox({rtl:a.rtl}));"source"==b&&(a.listBoxContainer.jqxListBox({source:a.source}),a.listBox.selectedIndex=-1,a.listBox.selectIndex(this.selectedIndex),a.renderSelection(),null==f&&a.clear());if("displayMember"==b||"valueMember"==b)a.listBoxContainer.jqxListBox({displayMember:a.displayMember,valueMember:a.valueMember}),a.renderSelection();"placeHolder"==b&&a.renderSelection();"theme"==b&&null!=f&&(a.listBoxContainer.jqxListBox({theme:f}),a.listBoxContainer.addClass(a.toThemeProperty("jqx-popup")),e.jqx.utilities.setTheme(c,f,a.host));"autoDropDownHeight"==b&&(a.listBoxContainer.jqxListBox({autoHeight:a.autoDropDownHeight}),a.autoDropDownHeight?a.container.height(a.listBoxContainer.height()+25):(a.listBoxContainer.jqxListBox({height:a.dropDownHeight}),a.container.height(parseInt(a.dropDownHeight)+25)),a.listBox._arrange(),a.listBox._updatescrollbars());"searchMode"==b&&a.listBoxContainer.jqxListBox({searchMode:a.searchMode});"incrementalSearch"==b&&a.listBoxContainer.jqxListBox({incrementalSearch:a.incrementalSearch});"incrementalSearchDelay"==b&&a.listBoxContainer.jqxListBox({incrementalSearchDelay:a.incrementalSearchDelay});"dropDownHeight"!=b||a.autoDropDownHeight||(a.listBoxContainer.jqxListBox({height:a.dropDownHeight}),a.container.height(parseInt(a.dropDownHeight)+25));if("dropDownWidth"==b||"scrollBarSize"==b){var d=a.width;"auto"!=a.dropDownWidth&&(d=a.dropDownWidth);a.listBoxContainer.jqxListBox({width:d,scrollBarSize:a.scrollBarSize});a.container.width(parseInt(d)+25)}"width"!=b&&"height"!=b||f==c||(this.refresh(),"width"==b&&"auto"==a.dropDownWidth&&(d=a.host.width(),a.listBoxContainer.jqxListBox({width:d}),a.container.width(parseInt(d)+25)));"checkboxes"==b&&a.listBoxContainer.jqxListBox({checkboxes:a.checkboxes});"selectedIndex"==b&&null!=a.listBox&&(a.listBox.selectIndex(parseInt(f)),a.renderSelection())}}})})(jqxBaseFramework);(function(e){e.jqx.jqxWidget("jqxInput","",{});e.extend(e.jqx._jqxInput.prototype,{defineInstance:function(){var a={disabled:!1,filter:this._filter,sort:this._sort,highlight:this._highlight,dropDownWidth:null,renderer:this._renderer,opened:!1,$popup:e("\x3cul\x3e\x3c/ul\x3e"),source:[],roundedCorners:!0,searchMode:"default",placeHolder:"",width:null,height:null,value:"",rtl:!1,displayMember:"",valueMember:"",events:["select","open","close","change"],popupZIndex:2E4,items:8,item:'\x3cli\x3e\x3ca href:"#"\x3e\x3c/a\x3e\x3c/li\x3e',minLength:1,maxLength:null};e.extend(!0,this,a);return a},createInstance:function(a){this.render()},render:function(){if("textarea"==this.element.nodeName.toLowerCase())this.element.style.overflow="auto";else if("div"==this.element.nodeName.toLowerCase()){this.baseHost=this.element;var a=this.host.find("input"),b=!1;e.each(a,function(){var c=this.type;if(null==c||"text"==c||"textarea"==c)return a=e(this),b=!0,!1});if(!b)throw Error("jqxInput: Missing Text Input in the Input Group");if(0e.jqx.browser.version&&this.baseHost.css("display","inline-block");e.each(this.baseHost.children(),function(){e(this).css("height","100%");e.jqx.browser.msie&&8>e.jqx.browser.version&&e(this).css("height",c+"px");this!==a.element&&(b+=e(this).outerWidth()+2)});this.host.css("width",this.baseHost.width()-b-4+"px");e.jqx.browser.msie&&9>e.jqx.browser.version&&(this.host.css("min-height",c+"px"),this.host.css("line-height",c+"px"))}}else this.width&&this.host.width(this.width),this.height&&this.host.height(this.height);this.host.attr("disabled",this.disabled);this.maxLength&&this.host.attr("maxlength",this.maxLength);this.host.attr("placeholder")||this._refreshPlaceHolder()},_refreshPlaceHolder:function(){if("placeholder"in this.element)this.host.attr("placeHolder",this.placeHolder);else{var a=this;""==this.element.value&&(this.element.value=this.placeHolder,this.host.focus(function(){a.element.value==a.placeHolder&&(a.element.value="")}),this.host.blur(function(){if(""==a.element.value||a.element.value==a.placeHolder)a.element.value=a.placeHolder}))}},destroy:function(){this.removeHandlers();this.baseHost?this.baseHost.remove():this.host.remove();this.$popup&&this.$popup.remove()},propertyChangedHandler:function(a,b,c,f){if("placeHolder"==b)a._refreshPlaceHolder();else if("theme"===b&&e.jqx.utilities.setTheme(c,f,a.host),"opened"==b)f?a.open():a.close();else{"source"==b&&(a._oldsource=f,a._updateSource());if("displayMember"==b||"valueMember"==b)a.source=a._oldsource,a._updateSource();"disabled"==b&&e.jqx.aria(a,"aria-disabled",a.disabled);"value"==b&&(a.element.value=f);a.refresh()}},select:function(a,b){var c=this.$popup.find(".jqx-fill-state-pressed").attr("data-value"),e=this.$popup.find(".jqx-fill-state-pressed").attr("data-name");this.element.value=this.renderer(e,this.element.value);this.selectedItem={label:e,value:c};this.host.attr("data-value",c);this.host.attr("data-label",e);this._raiseEvent("0",{item:{label:e,value:c},label:e,value:c});this._raiseEvent("3",{item:{label:e,value:c},label:e,value:c});return this.close()},val:function(a){if(0==arguments.length||null!=a&&"object"==typeof a&&!a.label&&!a.value)return""!=this.displayMember&&""!=this.valueMember&&this.selectedItem?""===this.element.value?"":this.selectedItem:this.element.value;if(a&&a.label)return this.selectedItem={label:a.label,value:a.value},this.host.attr("data-value",a.value),this.host.attr("data-label",a.label),this.value=a,this.element.value=a.label,this.element.value;this.value=a;this.element.value=a;this.host.attr("data-value",a);this.host.attr("data-label",a);a&&a.label?this._raiseEvent("3",{item:{label:a.label,value:a.value},label:a.label,value:a.value}):this._raiseEvent("3",{item:{label:a,value:a},label:a,value:a});return this.element.value},_raiseEvent:function(a,b){void 0==b&&(b={owner:null});var c=this.events[a];b.owner=this;c=new e.Event(c);c.owner=this;c.args=b;c.preventDefault&&c.preventDefault();return this.host.trigger(c)},_renderer:function(a){return a},open:function(){if(!e.jqx.isHidden(this.host)){var a=e.extend({},this.host.coord(!0),{height:this.host[0].offsetHeight});if(0==this.$popup.parent().length){var b=this.element.id+"_popup";this.$popup[0].id=b;e.jqx.aria(this,"aria-owns",b)}this.$popup.appendTo(e(document.body)).css({position:"absolute",zIndex:this.popupZIndex,top:a.top+a.height,left:a.left}).show();var c=0,a=this.$popup.children();e.each(a,function(){c+=e(this).outerHeight(!0)-1});this.$popup.height(c);this.opened=!0;this._raiseEvent("1",{popup:this.$popup});e.jqx.aria(this,"aria-expanded",!0);return this}},close:function(){this.$popup.hide();this.opened=!1;this._raiseEvent("2",{popup:this.$popup});e.jqx.aria(this,"aria-expanded",!1);return this},suggest:function(a){this.query=this.element.value;return!this.query||this.query.lengthe.jqx.browser.version||(b=e("\x3cdiv class\x3d'overlay' unselectable\x3d'on' style\x3d'z-index: 99; -webkit-appearance: none; border: none; background: black; opacity: 0.01; outline: none; border: none; padding: 0px; overflow: hidden; margin: 0px; align:left; valign:top; left: 0px; top: 0px; position: absolute;'\x3e\x3c/div\x3e"),a.content.parent().append(b),a.overlayContent=a.host.find(".overlay"),a.filterable&&a.overlayContent.css("top","30px"));a._updateTouchScrolling();a.host.addClass("jqx-disableselect");a.host.jqxDragDrop&&jqxListBoxDragDrop()},_highlight:function(a,b){var c=b.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$\x26");return a.replace(new RegExp("("+c+")","ig"),function(a,b){return"\x3cb\x3e"+b+"\x3c/b\x3e"})},_addInput:function(){var a=this.host.attr("name");a&&this.host.attr("name","");this.input=e("\x3cinput type\x3d'hidden'/\x3e");this.host.append(this.input);this.input.attr("name",a)},_updateTouchScrolling:function(){var a=this;if(this.isTouchDevice()){a.enableHover=!1;var b=this.overlayContent?this.overlayContent:this.content;this.removeHandler(e(b),e.jqx.mobile.getTouchEventName("touchstart")+".touchScroll");this.removeHandler(e(b),e.jqx.mobile.getTouchEventName("touchmove")+".touchScroll");this.removeHandler(e(b),e.jqx.mobile.getTouchEventName("touchend")+".touchScroll");this.removeHandler(e(b),"touchcancel.touchScroll");e.jqx.mobile.touchScroll(b,a.vScrollInstance.max,function(b,e){if("hidden"!=a.vScrollBar.css("visibility")){var d=a.vScrollInstance.value;a.vScrollInstance.setPosition(d+e);a._lastScroll=new Date}"hidden"!=a.hScrollBar.css("visibility")&&(d=a.hScrollInstance.value,a.hScrollInstance.setPosition(d+b),a._lastScroll=new Date)},this.element.id,this.hScrollBar,this.vScrollBar);"visible"!=a.vScrollBar.css("visibility")&&"visible"!=a.hScrollBar.css("visibility")?e.jqx.mobile.setTouchScroll(!1,this.element.id):e.jqx.mobile.setTouchScroll(!0,this.element.id);this._arrange()}},isTouchDevice:function(){var a=e.jqx.mobile.isTouchDevice();if(1==this.touchMode){if(this.touchDevice)return!0;if(e.jqx.browser.msie&&9>e.jqx.browser.version)return!1;a=this.touchDevice=!0;e.jqx.mobile.setMobileSimulator(this.element)}else 0==this.touchMode&&(a=!1);a&&0!=this.touchModeStyle&&(this.scrollBarSize=e.jqx.utilities.touchScrollBarSize);a&&this.host.addClass(this.toThemeProperty("jqx-touch"));return a},beginUpdate:function(){this.updatingListBox=!0},endUpdate:function(){this.updatingListBox=!1;this._addItems();this._renderItems()},beginUpdateLayout:function(){this.updating=!0},resumeUpdateLayout:function(){this.updating=!1;this.vScrollInstance.value=0;this._render(!1)},propertiesChangedHandler:function(a,b,c){a._cachedItemHtml=[];a.clearSelection();a.refresh()},propertyChangedHandler:function(a,b,c,f){if(void 0!=this.isInitialized&&0!=this.isInitialized&&(!a.batchUpdate||"touchMode"==b||"rtl"==b)){if("_renderOnDemand"==b&&(a._render(!1,!0),-1!=a.selectedIndex)){var d=a.selectedIndex;a.selectedIndex=-1;a._stopEvents=!0;a.selectIndex(d,!1,!0);-1==a.selectedIndex&&(a.selectedIndex=d);a._stopEvents=!1}"filterable"==b&&a.refresh();"filterHeight"==b&&a._arrange();"filterPlaceHolder"==b&&a.filterInput.attr("placeholder",f);"renderer"==b&&(a._cachedItemHtml=[],a.refresh());"itemHeight"==b&&a.refresh();if("source"==b||"checkboxes"==b)null==f&&c&&c.unbindBindingUpdate&&(c.unbindBindingUpdate(a.element.id),c.unbindDownloadComplete(a.element.id)),a.clearSelection(),a.refresh();"scrollBarSize"!=b&&"equalItemsWidth"!=b||f==c||a._updatescrollbars();"disabled"==b&&(a._renderItems(),a.vScrollBar.jqxScrollBar({disabled:f}),a.hScrollBar.jqxScrollBar({disabled:f}));if("touchMode"==b||"rtl"==b)a._removeHandlers(),a.vScrollBar.jqxScrollBar({touchMode:f}),a.hScrollBar.jqxScrollBar({touchMode:f}),"touchMode"!=b||e.jqx.browser.msie&&9>e.jqx.browser.version||(d=e("\x3cdiv class\x3d'overlay' unselectable\x3d'on' style\x3d'z-index: 99; -webkit-appearance: none; border: none; background: black; opacity: 0.01; outline: none; border: none; padding: 0px; overflow: hidden; margin: 0px; align:left; valign:top; left: 0px; top: 0px; position: absolute;'\x3e\x3c/div\x3e"),a.content.parent().append(d),a.overlayContent=a.host.find(".overlay")),a.filterable&&a.filterInput&&("rtl"==b&&f?a.filterInput.addClass(a.toThemeProperty("jqx-rtl")):"rtl"!=b||f||a.filterInput.removeClass(a.toThemeProperty("jqx-rtl")),a._arrange()),a._updateTouchScrolling(),a._addHandlers(),a._render(!1);this.updating||"width"!=b&&"height"!=b||a._updateSize();"theme"==b&&c!=f&&(a.hScrollBar.jqxScrollBar({theme:a.theme}),a.vScrollBar.jqxScrollBar({theme:a.theme}),a.host.removeClass(),a.host.addClass(a.toThemeProperty("jqx-listbox")),a.host.addClass(a.toThemeProperty("jqx-widget")),a.host.addClass(a.toThemeProperty("jqx-widget-content")),a.host.addClass(a.toThemeProperty("jqx-reset")),a.host.addClass(a.toThemeProperty("jqx-rc-all")),a.refresh());"selectedIndex"==b&&(a.clearSelection(),a.selectIndex(f,!0));if("displayMember"==b||"valueMember"==b)c!=f&&(d=a.selectedIndex,a.refresh(),a.selectedIndex=d,a.selectedIndexes[d]=d),a._renderItems();"autoHeight"==b&&(c!=f?a._render(!1):(a._updatescrollbars(),a._renderItems()));a._checkForHiddenParent&&e.jqx.isHidden(a.host)&&e.jqx.utilities.resize(this.host,function(){a._updateSize()},!1,a._checkForHiddenParent)}},loadFromSelect:function(a){if(null!=a&&(a=e("#"+a),0b&&(b=0));var c=parseInt(this.vScrollInstance.value),e=this._searchFirstVisibleIndex(b+c,this.renderedVisibleItems);if(void 0!=this.renderedVisibleItems[e]&&this.renderedVisibleItems[e].isGroup||0a&&d.initialTop+d.height>a)e=mid-1;else if(d.initialTopthis.items.length-1)break}if(!this._renderOnDemand)for(var d=this.toThemeProperty("jqx-listitem-state-normal")+" "+this.toThemeProperty("jqx-item"),l=this.toThemeProperty("jqx-listitem-state-group"),r=this.toThemeProperty("jqx-listitem-state-disabled")+" "+this.toThemeProperty("jqx-fill-state-disabled"),t=0,v=this,q=0;q=k)n();else{if(n=e(u[0].firstChild),this.checkboxes&&(n=e(u[0].lastChild)),0!=n.length&&null!=n[0]){n[0].className="";n[0].style.display="block";n[0].style.visibility="inherit";p="";p=!b.isGroup&&0<=!this.selectedIndexes[b.index]?d:l;if(b.disabled||this.disabled)p+=" "+r;this.roundedcorners&&(p+=" "+this.toThemeProperty("jqx-rc-all"));a&&(p+=" "+this.toThemeProperty("jqx-listitem-state-normal-touch"));n[0].className=p;if(this.renderer)b.key||(b.key=this.generatekey()),this._cachedItemHtml||(this._cachedItemHtml=[]),this._cachedItemHtml[b.key]?n[0].innerHTML!=this._cachedItemHtml[b.key]&&(n[0].innerHTML=this._cachedItemHtml[b.key]):(p=this.renderer(b.index,b.label,b.value),n[0].innerHTML=p,this._cachedItemHtml[b.key]=n[0].innerHTML);else if(-1!==this.itemHeight&&(p=2+2*parseInt(n.css("padding-top")),n[0].style.lineHeight=b.height-p+"px",n.css("vertical-align","middle")),null!=b.html&&0this.virtualSize.width?(n[0].style.width=m+"px",b.width=m):(n[0].style.width=-4+this.virtualSize.width+"px",b.width=this.virtualSize.width-4)):n.width()g&&(g=10);this.filterable&&(c+=this.filterHeight);d.parentNode.removeChild(d);return{width:b,height:c,itemsPerPage:g}}},_getVirtualItemsCount:function(){if(0==this.virtualItemsCount){var a=parseInt(this.host.height())/5;a>this.items.length&&(a=this.items.length);return a}return this.virtualItemsCount},_addItems:function(a){if(!this._renderOnDemand){var b=this;if(1!=b.updatingListBox)if(void 0==b.items||0==b.items.length)b.virtualSize={width:0,height:0,itemsPerPage:0},b._updatescrollbars(),b.renderedVisibleItems=[],b.itemswrapper&&b.itemswrapper.children().remove();else{var c=b.host.height();if(0==a){var f=b._calculateVirtualSize(c),d=2*f.itemsPerPage;b.autoHeight&&(d=b.items.length);b.virtualItemsCount=Math.min(d,b.items.length);b.virtualSize=f;b._updatescrollbars()}else{a=0;b.visibleItems=[];b.renderedVisibleItems=[];b._removeHandlers();b.allowDrag&&b._enableDragDrop&&(b.itemswrapper=null);null==b.itemswrapper&&(b.content[0].innerHTML="",b.itemswrapper=e('\x3cdiv style\x3d"outline: 0 none; overflow:hidden; width:100%; position: relative;"\x3e\x3c/div\x3e'),b.itemswrapper[0].style.height=2*c+"px",b.content[0].appendChild(b.itemswrapper[0]));f=b._calculateVirtualSize(c);d=2*f.itemsPerPage;b.autoHeight&&(d=b.items.length);b.virtualItemsCount=Math.min(d,b.items.length);b=this;b.virtualSize=f;f=Math.max(b.host.width(),17+f.width);b.itemswrapper[0].style.width=f+"px";for(var g="",h=e.jqx.browser.msie&&9>e.jqx.browser.version?' unselectable\x3d"on"':"",f=0;fe.jqx.browser.version&&(b.host.attr("hideFocus",!0),b.host.find("div").attr("hideFocus",!0))}}}},_updatescrollbars:function(){if(this.virtualSize){var a=this.virtualSize.height,b=this.virtualSize.width,c=this.vScrollInstance,f=this.hScrollInstance;this._arrange(!1);var d=!1,g=this.host.outerWidth(),h=this.host.outerHeight(),l=0;b>g&&(l=this.hScrollBar.outerHeight()+2);if(a+l>h){var k=c.max;c.max=2+parseInt(a)+l-parseInt(h-2);"inherit"!=this.vScrollBar[0].style.visibility&&(this.vScrollBar[0].style.visibility="inherit",d=!0);k!=c.max&&c._arrange()}else"hidden"!=this.vScrollBar[0].style.visibility&&(this.vScrollBar[0].style.visibility="hidden",d=!0,c.setPosition(0));l=0;"hidden"!=this.vScrollBar[0].style.visibility&&(l=this.scrollBarSize+6);k=this.checkboxes?20:0;if(this.autoItemsHeight)this.hScrollBar[0].style.visibility="hidden";else if(b>=g-l-k){var m=f.max;f.max="inherit"==this.vScrollBar[0].style.visibility?k+l+parseInt(b)-this.host.width()+4:k+parseInt(b)-this.host.width()+6;"inherit"!=this.hScrollBar[0].style.visibility&&(this.hScrollBar[0].style.visibility="inherit",d=!0);m!=f.max&&f._arrange();"inherit"==this.vScrollBar[0].style.visibility&&(c.max=2+parseInt(a)+this.hScrollBar.outerHeight()+2-parseInt(this.host.height()))}else"hidden"!=this.hScrollBar[0].style.visibility&&(this.hScrollBar[0].style.visibility="hidden",d=!0);f.setPosition(0);d&&this._arrange();this.itemswrapper&&(this.itemswrapper[0].style.width=Math.max(0,Math.max(g-2,17+b))+"px",this.itemswrapper[0].style.height=Math.max(0,2*h)+"px");this.isTouchDevice()&&("visible"!=this.vScrollBar.css("visibility")&&"visible"!=this.hScrollBar.css("visibility")?e.jqx.mobile.setTouchScroll(!1,this.element.id):e.jqx.mobile.setTouchScroll(!0,this.element.id))}},clear:function(){this.source=null;this.clearSelection();this.refresh()},clearSelection:function(a){for(var b=0;bh+g.height-c||h-c>=this.host.height())l=!1;l&&e.push(g)}}return{items:a,visibleItems:b,viewItems:e}},getItem:function(a){if(-1==a||isNaN(a)||"string"===typeof a)return-1===a?null:this.getItemByValue(a);var b=null;e.each(this.items,function(){if(this.index==a)return b=this,!1});return b},getVisibleItem:function(a){return-1==a||isNaN(a)||"string"===typeof a?-1===a?null:this.getItemByValue(a):this.visibleItems[a]},getVisibleItems:function(){return this.visibleItems},checkIndex:function(a,b,c){if(this.checkboxes&&!(isNaN(a)||0>a||a>=this.visibleItems.length||null!=this.visibleItems[a]&&this.visibleItems[a].disabled||this.disabled)){var f=this.getItem(a);if(0a||a>=this.visibleItems.length||null!=this.visibleItems[a]&&this.visibleItems[a].disabled||this.disabled)){var f=this.getItem(a);if(0a||a>=this.visibleItems.length||null!=this.visibleItems[a]&&this.visibleItems[a].disabled||this.disabled)){var f=this.getItem(a);if(0a||a>=this.visibleItems.length||null!=this.visibleItems[a]&&this.visibleItems[a].disabled||this.disabled))if(this.multiple||this.multipleextended||this.selectedIndex!=a||e||this.checkboxes)if(this.checkboxes){this._updateCheckedItems();var l=h;this.selectedIndex!=a||this.multiple||(l=-1);void 0==d&&(d="none");var h=this.getItem(a),k=this.getItem(l);this.visibleItems&&this.items&&this.visibleItems.length!=this.items.length&&(h=this.getVisibleItem(a),k=this.getVisibleItem(l));this._raiseEvent("1",{index:l,type:d,item:k,originalEvent:g});this.selectedIndex=a;this.selectedIndexes[l]=-1;this.selectedIndexes[a]=a;h&&(this.selectedValue=h.value,this.selectedValues[h.value]=h.value);this._raiseEvent("0",{index:a,type:d,item:h,originalEvent:g});this._renderItems()}else{this.focused=!0;var m=!1;this.selectedIndex!=a&&(m=!0);l=h;this.selectedIndex!=a||this.multiple||(l=-1);void 0==d&&(d="none");h=this.getItem(a);k=this.getItem(l);this.visibleItems&&this.items&&this.visibleItems.length!=this.items.length&&(h=this.getVisibleItem(a),k=this.getVisibleItem(l));if(void 0!=e&&e)this._raiseEvent("1",{index:l,type:d,item:k,originalEvent:g}),this.selectedIndex=a,this.selectedIndexes[l]=-1,this.selectedIndexes[a]=a,h&&(this.selectedValue=h.value,this.selectedValues[h.value]=h.value),this._raiseEvent("0",{index:a,type:d,item:h,originalEvent:g});else{var n=this;e=function(a,b,c,d,e,f){n._raiseEvent("1",{index:b,type:c,item:d,originalEvent:f});n.selectedIndex=a;n.selectedIndexes=[];n.selectedIndexes[a]=a;n.selectedValues=[];e&&(n.selectedValues[e.value]=e.value);n._raiseEvent("0",{index:a,type:c,item:e,originalEvent:f})};var p=function(a,b,c,d,e,f){void 0==n.selectedIndexes[a]||-1==n.selectedIndexes[a]?(n.selectedIndexes[a]=a,n.selectedIndex=a,e&&(n.selectedValues[e.value]=e.value,n._raiseEvent("0",{index:a,type:c,item:e,originalEvent:f}))):(b=n.selectedIndexes[a],(d=n.getVisibleItem(b))&&(n.selectedValues[d.value]=null),n.selectedIndexes[a]=-1,n.selectedIndex=-1,n._raiseEvent("1",{index:b,type:c,item:d,originalEvent:f}))};if(this.multipleextended)if(!this._shiftKey&&!this._ctrlKey)"keyboard"!=d&&"mouse"!=d?(p(a,l,d,k,h,g),n._clickedIndex=a):(this.clearSelection(!1),n._clickedIndex=a,e(a,l,d,k,h,g));else if(this._ctrlKey)"keyboard"==d&&(this.clearSelection(!1),n._clickedIndex=a),p(a,l,d,k,h,g);else{if(this._shiftKey){void 0==n._clickedIndex&&(n._clickedIndex=l);e=Math.min(n._clickedIndex,a);l=Math.max(n._clickedIndex,a);for(this.clearSelection(!1);e<=l;e++)n.selectedIndexes[e]=e,n.selectedValues[n.getVisibleItem(e).value]=n.getVisibleItem(e).value,n._raiseEvent("0",{index:e,type:d,item:this.getVisibleItem(e),originalEvent:g});n.selectedIndex="keyboard"!=d?n._clickedIndex:a}}else this.multiple?p(a,l,d,k,h,g):(h&&(this.selectedValue=h.value),e(a,l,d,k,h,g))}void 0!=c&&1!=c||this._renderItems();void 0!=b&&null!=b&&1==b&&this.ensureVisible(a);this._raiseEvent("2",{index:a,item:h,oldItem:k,type:d,originalEvent:g});this._updateInputSelection();return m}else this.visibleItems&&this.items&&this.visibleItems.length!=this.items.length&&(h=this.getVisibleItem(a))&&(this.selectedValue=h.value,this.selectedValues[h.value]=h.value)}},_updateInputSelection:function(){this._syncSelection();var a=[];if(this.input&&(-1==this.selectedIndex?this.input.val(""):this.items&&void 0!=this.items[this.selectedIndex]&&(this.input.val(this.items[this.selectedIndex].value),a.push(this.items[this.selectedIndex].value)),this.multiple||this.multipleextended||this.checkboxes)){var b=this.checkboxes?this.getCheckedItems():this.getSelectedItems(),c="";if(b){for(var f=0;fa||a>=this.items.length)return!1;var b=this.vScrollInstance.value,c=0;this.filterable&&(c=this.filterHeight);var e=this.visibleItems[a];if(void 0==e)return!0;a=e.initialTop;e=e.height;return a-b=this.host.outerHeight()?!1:!0},_itemsInPage:function(){var a=0,b=this;this.items&&e.each(this.items,function(){if(this.initialTop+this.height>=b.content.height())return!1;a++});return a},_firstItemIndex:function(){return null!=this.visibleItems?this.visibleItems[0]?this.visibleItems[0].isGroup?this._nextItemIndex(0):0:0:-1},_lastItemIndex:function(){return null!=this.visibleItems?this.visibleItems[this.visibleItems.length-1]?this.visibleItems[this.visibleItems.length-1].isGroup?this._prevItemIndex(this.visibleItems.length-1):this.visibleItems.length-1:this.visibleItems.length-1:-1},_nextItemIndex:function(a){for(indx=a+1;indx=a.keyCode||(a.ctrlKey||a.metaKey||this.ctrlKey)&&88!=a.keyCode&&86!=a.keyCode||b!==this.searchString&&this._updateItemsVisibility(b)}},_updateItemsVisibility:function(a){var b=this.getItems();if(void 0==b)return{index:-1,matchItem:[]};var c=this,f=0;e.each(b,function(b){b="";if(!this.isGroup){b=this.searchLabel?this.searchLabel:this.label?this.label:this.value?this.value:this.title?this.title:"jqxItem";b=b.toString();var d=!1;switch(c.searchMode){case "containsignorecase":d=e.jqx.string.containsIgnoreCase(b,a);break;case "contains":d=e.jqx.string.contains(b,a);break;case "equals":d=e.jqx.string.equals(b,a);break;case "equalsignorecase":d=e.jqx.string.equalsIgnoreCase(b,a);break;case "startswith":d=e.jqx.string.startsWith(b,a);break;case "startswithignorecase":d=e.jqx.string.startsWithIgnoreCase(b,a);break;case "endswith":d=e.jqx.string.endsWith(b,a);break;case "endswithignorecase":d=e.jqx.string.endsWithIgnoreCase(b,a)}d||(this.visible=!1);d&&(f++,this.visible=!0);""==a&&(this.visible=!0)}});c.renderedVisibleItems=[];c.visibleItems=[];c.vScrollInstance.setPosition(0,!0);c._addItems(!1);c._renderItems();for(b=0;b=b)return d=this.visibleIndex,!1}});return d},findItems:function(a){var b=this.getItems(),c=this,f=0,d=[];e.each(b,function(b){b="";if(!this.isGroup){b=this.label?this.label:this.value?this.value:this.title?this.title:"jqxItem";var h=!1;switch(c.searchMode){case "containsignorecase":h=e.jqx.string.containsIgnoreCase(b,a);break;case "contains":h=e.jqx.string.contains(b,a);break;case "equals":h=e.jqx.string.equals(b,a);break;case "equalsignorecase":h=e.jqx.string.equalsIgnoreCase(b,a);break;case "startswith":h=e.jqx.string.startsWith(b,a);break;case "startswithignorecase":h=e.jqx.string.startsWithIgnoreCase(b,a);break;case "endswith":h=e.jqx.string.endsWith(b,a);break;case "endswithignorecase":h=e.jqx.string.endsWithIgnoreCase(b,a)}h&&(d[f++]=this)}});return d},_syncSelection:function(){if(this.filterable){if(this.items)for(var a=0;a=b||k||8==b||32==b||46==b){a.shiftKey||(h=h.toLocaleLowerCase());k=1+c.selectedIndex;8!=b&&32!=b&&46!=b&&(0a?this.scrollDown():this.scrollUp();return b!=this.vScrollInstance.value?!0:!1},focus:function(){try{this.focused=!0;this.host.focus();var a=this;setTimeout(function(){a.host.focus()},25)}catch(b){}},_removeHandlers:function(){this.removeHandler(e(document),"keydown.listbox"+this.element.id);this.removeHandler(e(document),"keyup.listbox"+this.element.id);this.removeHandler(this.vScrollBar,"valueChanged");this.removeHandler(this.hScrollBar,"valueChanged");this._mousewheelfunc?this.removeHandler(this.host,"mousewheel",this._mousewheelfunc):this.removeHandler(this.host,"mousewheel");this.removeHandler(this.host,"keydown");this.removeHandler(this.content,"mouseleave");this.removeHandler(this.content,"focus");this.removeHandler(this.content,"blur");this.removeHandler(this.host,"focus");this.removeHandler(this.host,"blur");this.removeHandler(this.content,"mouseenter");this.removeHandler(this.content,"mouseup");this.removeHandler(this.content,"mousedown");this.removeHandler(this.content,"touchend");this._mousemovefunc?this.removeHandler(this.content,"mousemove",this._mousemovefunc):this.removeHandler(this.content,"mousemove");this.removeHandler(this.content,"selectstart");this.overlayContent&&this.removeHandler(this.overlayContent,e.jqx.mobile.getTouchEventName("touchend"))},_updateSize:function(){this.virtualSize||(this._oldheight=null,this.virtualSize=this._calculateVirtualSize());this._arrange();if(this.host.height()!=this._oldheight||this.host.width()!=this._oldwidth){this.host.width();if(this.autoItemsHeight)this._render(!1);else if(this.items)if(0e.jqx.browser.version&&a.focused||(a.host.removeClass(a.toThemeProperty("jqx-fill-state-focus")),a.focused=!1)});this.addHandler(this.content,"mouseenter",function(b){a.focused=!0});var c=e.jqx.utilities.hasTransform(this.host);if(this.enableSelection){var f=a.isTouchDevice()&&!0!==this.touchMode,d=f?"touchend":"mousedown";if(this.overlayContent)this.addHandler(this.overlayContent,e.jqx.mobile.getTouchEventName("touchend"),function(b){if(!a.enableSelection||f&&(a._newScroll=new Date,500>a._newScroll-a._lastScroll))return!0;var c=e.jqx.mobile.getTouches(b)[0];if(void 0!=c){var d=a.host.offset(),g=parseInt(c.pageX),n=parseInt(c.pageY);1==a.touchMode&&void 0!=c._pageX&&(g=parseInt(c._pageX),n=parseInt(c._pageY));var g=g-d.left,n=n-d.top,p=a._hitTest(g,n);if(null!=p&&!p.isGroup){a._newScroll=new Date;if(500>a._newScroll-a._lastScroll)return!1;if(a.checkboxes)a._updateItemCheck(p,p.visibleIndex);else if(-1!=p.html.indexOf("href"))setTimeout(function(){a.selectIndex(p.visibleIndex,!1,!0,!1,"mouse",b);a.content.trigger("click");return!1},100);else return a.selectIndex(p.visibleIndex,!1,!0,!1,"mouse",b),b.preventDefault&&b.preventDefault(),a.content.trigger("click"),!1}}});else{var g=!1;this.addHandler(this.content,d,function(b){if(!a.enableSelection)return!0;g=!0;if(f&&(a._newScroll=new Date,500>a._newScroll-a._lastScroll))return!1;a.focused=!0;!a.isTouchDevice()&&a.focusable&&a.host.focus();if(b.target.id!="listBoxContent"+a.element.id&&a.itemswrapper[0]!=b.target){var l=b.target,k=e(l).offset(),m=a.host.offset();if(c){var n=e.jqx.mobile.getLeftPos(l),l=e.jqx.mobile.getTopPos(l);k.left=n;k.top=l;n=e.jqx.mobile.getLeftPos(a.element);l=e.jqx.mobile.getTopPos(a.element);m.left=n;m.top=l}var n=parseInt(k.top)-parseInt(m.top),p=parseInt(k.left)-parseInt(m.left),q=a._hitTest(p,n);if(null!=q&&!q.isGroup){var r=function(b,c){a._shiftKey||(a._clickedIndex=b.visibleIndex);a.checkboxes?(p=20+c.pageX-k.left,a.rtl?("hidden"!=a.hScrollBar.css("visibility")||a.host.width(),p<=a.host.width()-20&&(a.allowDrag?setTimeout(function(){a._dragItem||g||(a._updateItemCheck(b,b.visibleIndex),a.selectIndex(b.visibleIndex,!1,!0,!1,"mouse",c))},200):(a._updateItemCheck(b,b.visibleIndex),a.selectIndex(b.visibleIndex,!1,!0,!1,"mouse",c)))):20<=p+a.hScrollInstance.value&&(a.allowDrag?setTimeout(function(){a._dragItem||g||(a._updateItemCheck(b,b.visibleIndex),a.selectIndex(b.visibleIndex,!1,!0,!1,"mouse",c))},200):(a._updateItemCheck(b,b.visibleIndex),a.selectIndex(b.visibleIndex,!1,!0,!1,"mouse",c)))):a.selectIndex(b.visibleIndex,!1,!0,!1,"mouse",c)};q.disabled||(-1!=q.html.indexOf("href")?setTimeout(function(){r(q,b)},100):r(q,b))}if("mousedown"==d)return m=!1,b.which?m=3==b.which:b.button&&(m=2==b.button),m?!0:!1}return!0})}this.addHandler(this.content,"mouseup",function(b){a.vScrollInstance.handlemouseup(a,b);g=!1});e.jqx.browser.msie&&this.addHandler(this.content,"selectstart",function(a){return!1})}b=this.isTouchDevice();this.enableHover&&!b&&(this._mousemovefunc=function(d){if(b||!a.enableHover||null==d.target||a.disabled)return!0;a.focused=!0;if(!a.vScrollInstance.isScrolling()&&d.target.id!="listBoxContent"+a.element.id&&a.itemswrapper[0]!=d.target){var f=d.target;d=e(f).offset();var g=a.host.offset();if(c){var m=e.jqx.mobile.getLeftPos(f),f=e.jqx.mobile.getTopPos(f);d.left=m;d.top=f;m=e.jqx.mobile.getLeftPos(a.element);f=e.jqx.mobile.getTopPos(a.element);g.left=m;g.top=f}m=parseInt(d.top)-parseInt(g.top);d=parseInt(d.left)-parseInt(g.left);d=a._hitTest(d,m);null==d||d.isGroup||d.disabled||(g=e.data(a.element,"hoveredItem"),null!=g&&(e(g).removeClass(a.toThemeProperty("jqx-listitem-state-hover")),e(g).removeClass(a.toThemeProperty("jqx-fill-state-hover"))),e.data(a.element,"hoveredItem",d.element),d=e(d.element),d.addClass(a.toThemeProperty("jqx-listitem-state-hover")),d.addClass(a.toThemeProperty("jqx-fill-state-hover")))}},this.addHandler(this.content,"mousemove",this._mousemovefunc))},_arrange:function(a){void 0==a&&(a=!0);var b=this,c=null,e=null,d=b.filterable?b.filterHeight:0,g=function(a){a=b.host.height();0==a&&(a=200,b.host.height(a));return a};null!=b.width&&-1!=b.width.toString().indexOf("px")?c=b.width:void 0==b.width||isNaN(b.width)||(c=b.width);null!=b.height&&-1!=b.height.toString().indexOf("px")?e=b.height:void 0==b.height||isNaN(b.height)||(e=b.height);null!=b.width&&-1!=b.width.toString().indexOf("%")&&(b.host.css("width",b.width),c=b.host.width());null!=b.height&&-1!=b.height.toString().indexOf("%")&&(b.host.css("height",b.height),e=g(e));null!=c&&(c=parseInt(c),parseInt(b.element.style.width)!=parseInt(b.width)&&b.host.width(b.width));b.autoHeight?b.virtualSize&&("hidden"!=b.hScrollBar.css("visibility")?(b.host.height(b.virtualSize.height+parseInt(b.scrollBarSize)+3),b.height=b.virtualSize.height+parseInt(b.scrollBarSize)+3,e=b.height):(b.host.height(b.virtualSize.height),e=b.height=b.virtualSize.height)):null!=e&&(e=parseInt(e),parseInt(b.element.style.height)!=parseInt(b.height)&&(b.host.height(b.height),g(e)));var h=b.scrollBarSize;isNaN(h)&&(h=parseInt(h),h=isNaN(h)?"17px":h+"px");var h=parseInt(h),g=2,l=1;if(b.vScrollBar&&("hidden"!=b.vScrollBar[0].style.visibility?l=h+4:b.vScrollInstance.setPosition(0),b.hScrollBar)){"hidden"!=b.hScrollBar[0].style.visibility?g=h+4:b.hScrollInstance.setPosition(0);b.autoItemsHeight&&(b.hScrollBar[0].style.visibility="hidden",g=0);null==e&&(e=0);var k=parseInt(e)-4-h;0>k&&(k=0);parseInt(b.hScrollBar[0].style.height)!=h&&(0>parseInt(h)&&(h=0),b.hScrollBar[0].style.height=parseInt(h)+"px");b.hScrollBar[0].style.top!=k+"px"&&(b.hScrollBar[0].style.top=k+"px",b.hScrollBar[0].style.left="0px");k=c-h-4;0>k&&(k=0);k+="px";b.hScrollBar[0].style.width!=k&&(b.hScrollBar[0].style.width=k);1>=l&&2<=c&&(b.hScrollBar[0].style.width=parseInt(c-2)+"px");h!=parseInt(b.vScrollBar[0].style.width)&&(b.vScrollBar[0].style.width=parseInt(h)+"px");parseInt(e)-g!=parseInt(b.vScrollBar[0].style.height)&&(k=parseInt(e)-g,0>k&&(k=0),b.vScrollBar[0].style.height=k+"px");null==c&&(c=0);k=parseInt(c)-parseInt(h)-4+"px";k!=b.vScrollBar[0].style.left&&(0<=parseInt(k)&&(b.vScrollBar[0].style.left=k),b.vScrollBar[0].style.top="0px");k=b.vScrollInstance;k.disabled=b.disabled;a&&k._arrange();k=b.hScrollInstance;k.disabled=b.disabled;a&&k._arrange();"hidden"!=b.vScrollBar[0].style.visibility&&"hidden"!=b.hScrollBar[0].style.visibility?(b.bottomRight[0].style.visibility="inherit",b.bottomRight[0].style.left=1+parseInt(b.vScrollBar[0].style.left)+"px",b.bottomRight[0].style.top=1+parseInt(b.hScrollBar[0].style.top)+"px",b.rtl&&b.bottomRight.css({left:0}),b.bottomRight[0].style.width=parseInt(h)+3+"px",b.bottomRight[0].style.height=parseInt(h)+3+"px"):b.bottomRight[0].style.visibility="hidden";parseInt(b.content[0].style.width)!=parseInt(c)-l&&(a=parseInt(c)-l,0>a&&(a=0),b.content[0].style.width=a+"px");b.rtl&&(b.vScrollBar.css({left:"0px",top:"0px"}),b.hScrollBar.css({left:b.vScrollBar.width()+2+"px"}),"hidden"!=b.vScrollBar[0].style.visibility?b.content.css("margin-left",4+b.vScrollBar.width()):(b.content.css("margin-left",0),b.hScrollBar.css({left:"0px"})),b.filterable&&b.filterInput&&b.filterInput.css({left:b.vScrollBar.width()+6+"px"}));parseInt(b.content[0].style.height)!=parseInt(e)-g&&(a=parseInt(e)-g,0>a&&(a=0),b.content[0].style.height=a+"px",b.content[0].style.top="0px");0a)return;if(this.autoHeight){var f=e.data(this.vScrollBar[0],"jqxScrollBar").instance;f.setPosition(0)}else for(indx=0;indxd+this.host.height()-g&&(g=this.host.height(),this.filterable?f.setPosition(this.filterHeight+2+c.initialTop+c.height+2-g+h):(f.setPosition(c.initialTop+c.height+2-g+h),indx===this.visibleItems.length-1&&f.setPosition(f.max)),b&&(d=f.value,h=c.initialTop,this.filterable&&(h=this.filterHeight+2+c.initialTop),d+g=a.min?(a.setPosition(a.value-a.largestep),!0):a.value!=a.min?(a.setPosition(a.min),!0):!1},databind:function(a,b){this.records=[];var c=a._source?!0:!1,f=new e.jqx.dataAdapter(a,{autoBind:!1});c&&(f=a,a=a._source);var d=function(a,b){var c=function(b){var c=null;if("string"===typeof b)var d=b,f=b,g="";else void 0!=a.displayMember&&""!=a.displayMember&&(f=b[a.valueMember],d=b[a.displayMember]);g="";a.groupMember?g=b[a.groupMember]:b&&void 0!=b.group&&(g=b.group);a.searchMember?c=b[a.searchMember]:b&&void 0!=b.searchLabel&&(c=b.searchLabel);a.valueMember||a.displayMember||"string"==e.type(b)&&(d=f=b.toString());b&&void 0!=b.label&&(d=b.label);b&&void 0!=b.value&&(f=b.value);var k=!1;b&&void 0!=b.checked&&(k=b.checked);var l="";b&&void 0!=b.html&&(l=b.html);var n=!0;b&&void 0!=b.visible&&(n=b.visible);var m=!1;b&&void 0!=b.disabled&&(m=b.disabled);var p=!1;b&&void 0!=b.hasThreeStates&&(p=b.hasThreeStates);var q={};q.label=d;q.value=f;q.searchLabel=c;q.html=l;q.visible=n;q.originalItem=b;q.group=g;q.groupHtml="";q.disabled=m;q.checked=k;q.hasThreeStates=p;return q};if(void 0!=b&&f._changedrecords[0])e.each(f._changedrecords,function(){var d=this.index,e=this.record;if("remove"!=b)var f=c(e);switch(b){case "update":a.updateAt(f,d);break;case "add":a.insertAt(f,d);break;case "remove":a.removeAt(d)}});else{a.records=f.records;for(var d=a.records.length,g=[],p=0;p=d){for(m=0;m=this.items.length)c.index=this.items.length,this.items[this.items.length]=c;else{for(var f=[],d=0,g=!1,h=0,l=0;l=b&&!g&&(f[d++]=c,c.index=b,h++,g=!0),f[d]=this.items[l],this.items[l].isGroup||(f[d].index=h,h++),d++;this.items=f}f=c.value;if(""==c.value||null==c.value)f=b;this.itemsByValue[e.trim(f).split(" ").join("_")]=c;this.visibleItems=[];this.renderedVisibleItems=[];c=e.data(this.vScrollBar[0],"jqxScrollBar").instance;f=c.value;c.setPosition(0);this.allowDrag&&this._enableDragDrop||this.virtualSize&&this.virtualSize.height<10+this.host.height()?this._addItems(!0):this._addItems(!1);this._renderItems();this.allowDrag&&this._enableDragDrop&&this._enableDragDrop();c.setPosition(f);this.rendered&&this.rendered();return!0},removeAt:function(a){if(0>a||a>this.items.length-1||void 0==a)return!1;var b=this.items[a].height,c=this.items[a].value;if(""==c||null==c)c=a;this.itemsByValue[e.trim(c).split(" ").join("_")]=null;if(1a||a>this.items.length-1)return!1;this.items[a].disabled=!0;this._renderItems();return!0},enableAt:function(a){if(!this.items||0>a||a>this.items.length-1)return!1;this.items[a].disabled=!1;this._renderItems();return!0},destroy:function(){this.source&&this.source.unbindBindingUpdate&&this.source.unbindBindingUpdate(this.element.id);this._removeHandlers();this.vScrollBar.jqxScrollBar("destroy");this.hScrollBar.jqxScrollBar("destroy");this.vScrollBar.remove();this.hScrollBar.remove();this.content.remove();e.jqx.utilities.resize(this.host,null,!0);var a=e.data(this.element,"jqxListBox");delete this.hScrollInstance;delete this.vScrollInstance;delete this.vScrollBar;delete this.hScrollBar;delete this.content;delete this.bottomRight;delete this.itemswrapper;delete this.visualItems;delete this.visibleItems;delete this.items;delete this.groups;delete this.renderedVisibleItems;delete this._mousewheelfunc;delete this._mousemovefunc;delete this._cachedItemHtml;delete this.itemsByValue;delete this._activeElement;delete this.source;delete this.events;this.input&&(this.input.remove(),delete this.input);a&&delete a.instance;this.host.removeData();this.host.removeClass();this.host.remove();this.element=null;delete this.element;this.host=null;delete this.set;delete this.get;delete this.call;delete this.host},_raiseEvent:function(a,b){if(1==this._stopEvents)return!0;void 0==b&&(b={owner:null});var c=this.events[a];args=b;args.owner=this;this._updateInputSelection();c=new e.Event(c);c.owner=this;c.args=args;if(null!=this.host)var f=this.host.trigger(c);return f}})})(jqxBaseFramework);(function(e){e.jqx.parseSourceTag=function(a){var b=[],c=e(a).find("option"),f=e(a).find("optgroup"),d=!1;0===c.length&&(c=e(a).find("li"),0e.jqx.browser.version&&!d&&""==l.value&&null!=this.text&&0e.jqx.browser.version&&this.host.attr("hideFocus",!0)},focus:function(){try{if(this.host.focus(),"popup"===this.mode&&this.host.closest("div.jqx-menu-wrapper").focus(),this.keyboardNavigation){var a=this,b=function(){if(e.jqx.isHidden(e(a.items[0].element))){var b=a._nextVisibleItem(a.items[0],0);b&&(e(b.element).addClass(a.toThemeProperty("jqx-fill-state-focus")),a.activeItem=b)}else e(a.items[0].element).addClass(a.toThemeProperty("jqx-fill-state-focus")),a.activeItem=a.items[0]};this.activeItem?e.jqx.isHidden(e(this.activeItem.element))?(e(this.activeItem.element).removeClass(this.toThemeProperty("jqx-fill-state-focus")),b()):e(this.activeItem.element).addClass(this.toThemeProperty("jqx-fill-state-focus")):b()}}catch(c){}},loadItems:function(a,b){if(null!=a){if(0==a.length)return"";var c=this;this.items=[];var f='\x3cul class\x3d"jqx-menu-ul"\x3e';b&&(f='\x3cul class\x3d"jqx-menu-ul" style\x3d"width:'+b+';"\x3e');e.map(a,function(a){if(void 0==a)return null;f+=c._parseItem(a)});return f+="\x3c/ul\x3e"}},_parseItem:function(a){var b;if(void 0==a)return null;var c=a.label;!a.label&&a.html&&(c=a.html);c||(c="Item");"string"===typeof a&&(c=a);var e=!1;void 0!=a.disabled&&a.disabled&&(e=!0);b="\x3cli";e&&(b+=' item-disabled\x3d"true" ');a.label&&!a.html&&(b+=' item-label\x3d"'+c+'" ');null!=a.value&&(b+=' item-value\x3d"'+a.value+'" ');void 0!=a.id&&(b+=' id\x3d"'+a.id+'" ');b+="\x3e"+c;a.items&&(b=a.subMenuWidth?b+this.loadItems(a.items,a.subMenuWidth):b+this.loadItems(a.items));return b+"\x3c/li\x3e"},setSize:function(){null!=this.width&&-1!=this.width.toString().indexOf("%")?this.host.width(this.width):null!=this.width&&-1!=this.width.toString().indexOf("px")?this.host.width(this.width):void 0==this.width||isNaN(this.width)||this.host.width(this.width);null!=this.height&&-1!=this.height.toString().indexOf("%")?this.host.height(this.height):null!=this.height&&-1!=this.height.toString().indexOf("px")?this.host.height(this.height):void 0==this.height||isNaN(this.height)||this.host.height(this.height);null===this.height&&this.host.height("auto");if(null!=this.minimizeWidth&&"popup"!=this.mode){var a=e(window).width();if(!e.jqx.response){var b=!1;navigator.userAgent.match(/Windows|Linux|MacOS/)&&(0<=navigator.userAgent.indexOf("Windows Phone")||0<=navigator.userAgent.indexOf("WPDesktop")||0<=navigator.userAgent.indexOf("IEMobile")||0<=navigator.userAgent.indexOf("ZuneWP7")||(b=!0));var c=this.minimizeWidth;if(b&&"auto"==this.minimizeWidth)return}if("auto"==this.minimizeWidth&&e.jqx.response){if(a=new e.jqx.response,"Phone"==a.device.type||"Tablet"==a.device.type)this.minimized||this.minimize()}else a=c&&this.restore()}},minimize:function(){if(!this.minimized){var a=this;this.host.addClass(this.toThemeProperty("jqx-menu-minimized"));this.minimized=!0;this._tmpMode=this.mode;this.mode="simple";var b=this.host.closest("div.jqx-menu-wrapper");b.remove();e("#menuWrapper"+this.element.id).remove();e.each(this.items,function(){e(this.element);e(this.subMenuElement).closest("div.jqx-menu-popup").remove()});if(this.source){var c=this.loadItems(this.source);this.element.innerHTML=c;this._tmpHTML=this.element.innerHTML}this.element.innerHTML=this._tmpHTML;this.element.innerHTML.indexOf("UL")&&(c=this.host.find("ul:first"),0e.jqx.browser.version;if(this.menuElements[a]){a=this.menuElements[a];if(null!=b&&(a.openHorizontalDirection=b,a.hasItems&&0e.jqx.browser.version;null==this.arrow?b?a.appendTo($element):a.prependTo($element):a=e(this.arrow);"down"==this.openVerticalDirection?(a.addClass(c.toThemeProperty("jqx-menu-item-arrow-down")),a.addClass(c.toThemeProperty("jqx-icon-arrow-down"))):(a.addClass(c.toThemeProperty("jqx-menu-item-arrow-up")),a.addClass(c.toThemeProperty("jqx-icon-arrow-up")));a.css("visibility","visible");b?a.css("display","inline-block"):(a.css("display","block"),a.css("float","right"));this.arrow=a[0]}else this.ignoretheme||!this.hasItems||c.showTopLevelArrows||null==this.arrow||(a=e(this.arrow),a.remove(),this.arrow=null);f=Math.max(f,$element.height())}});break;case "vertical":case "popup":case "simple":c.host.addClass(c.toThemeProperty("jqx-menu-vertical")),e.each(c.items,function(){$element=e(this.element);if(this.hasItems&&!this.ignoretheme){this.arrow&&e(this.arrow).remove();if("simple"==c.mode)return!0;var a=e('\x3cspan style\x3d"border: none; background-color: transparent;" id\x3d"arrow'+$element[0].id+'"\x3e\x3c/span\x3e');a.prependTo($element);a.css("float","right");0==this.level?a.addClass(c.toThemeProperty("jqx-menu-item-arrow-top-"+c._getDir("right"))):a.addClass(c.toThemeProperty("jqx-menu-item-arrow-"+c._getDir("right")));a.addClass(c.toThemeProperty("jqx-icon-arrow-"+c._getDir("right")));this.arrow=a[0]}$element.css("float","none")}),"popup"==c.mode?(c.host.addClass(c.toThemeProperty("jqx-widget-content")),c.host.wrap('\x3cdiv tabindex\x3d0 class\x3d"jqx-menu-wrapper" style\x3d"z-index:'+c.popupZIndex+'; border: none; background-color: transparent; padding: 0px; margin: 0px; position: absolute; top: 0; left: 0; display: block; visibility: visible;"\x3e\x3c/div\x3e'),g=c.host.closest("div.jqx-menu-wrapper"),c.host.addClass(c.toThemeProperty("jqx-popup")),g[0].id="menuWrapper"+c.element.id,g.appendTo(e(document.body)),c.addHandler(g,"keydown",function(a){return c.handleKeyDown(a)})):c.host.addClass(c.toThemeProperty("jqx-widget-header")),"popup"==c.mode&&(d=c.host.height(),c.host.css("position","absolute"),c.host.css("top","0"),c.host.css("left","0"),"simple"!=c.mode&&(c.host.height(d),c.host.css("display","none")))}d=c.isTouchDevice();c.autoCloseOnClick&&(c.removeHandler(e(document),"mousedown.menu"+c.element.id,c._closeAfterClick),c.addHandler(e(document),"mousedown.menu"+c.element.id,c._closeAfterClick,c),d&&(c.removeHandler(e(document),e.jqx.mobile.getTouchEventName("touchstart")+".menu"+c.element.id,c._closeAfterClick,c),c.addHandler(e(document),e.jqx.mobile.getTouchEventName("touchstart")+".menu"+c.element.id,c._closeAfterClick,c)))},_getBodyOffset:function(){var a=0,b=0;"0px"!=e("body").css("border-top-width")&&(a=parseInt(e("body").css("border-top-width")),isNaN(a)&&(a=0));"0px"!=e("body").css("border-left-width")&&(b=parseInt(e("body").css("border-left-width")),isNaN(b)&&(b=0));return{left:b,top:a}},_getOffset:function(a){var b=e.jqx.mobile.isSafariMobileBrowser(),c=e(a).coord(!0),f=c.top,c=c.left;"0px"!=e("body").css("border-top-width")&&(f=parseInt(f)+this._getBodyOffset().top);"0px"!=e("body").css("border-left-width")&&(c=parseInt(c)+this._getBodyOffset().left);var d=e.jqx.mobile.isWindowsPhone(),g=e.jqx.mobile.isTouchDevice();return this.hasTransform||null!=b&&b||d||g?{left:e.jqx.mobile.getLeftPos(a),top:e.jqx.mobile.getTopPos(a)}:{left:c,top:f}},_isRightClick:function(a){var b;a||(a=window.event);a.which?b=3==a.which:a.button&&(b=2==a.button);return b},_openContextMenu:function(a){this._isRightClick(a)&&this.open(parseInt(a.clientX)+5,parseInt(a.clientY)+5)},close:function(){var a=this;e.data(this.element,"contextMenuOpened"+this.element.id)&&(e.each(a.items,function(){this.hasItems&&a._closeItem(a,this)}),e.each(a.items,function(){1==this.isOpen&&($submenu=e(this.subMenuElement),$submenu.closest("div.jqx-menu-popup").hide(this.animationHideDuration))}),this.host.hide(this.animationHideDuration),e.data(a.element,"contextMenuOpened"+this.element.id,!1),a._raiseEvent("1",a),a._raiseEvent("5"))},open:function(a,b){if("popup"==this.mode){var c=0;"block"==this.host.css("display")&&(this.close(),c=this.animationHideDuration);var f=this;if(void 0==a||null==a)a=0;if(void 0==b||null==b)b=0;setTimeout(function(){f.host.show(f.animationShowDuration);f.host.css("visibility","visible");e.data(f.element,"contextMenuOpened"+f.element.id,!0);f._raiseEvent("0",f);f._raiseEvent("4",{left:a,top:b});f.host.css("z-index",9999);void 0!=a&&void 0!=b&&f.host.css({left:a,top:b});f.focus()},c)}},_renderHover:function(a,b,c){var e=this;b.ignoretheme||(this.addHandler(a,"mouseenter",function(){e.hoveredItem=b;b.disabled||b.separator||!e.enableHover||e.disabled||(0parseInt(this.host.height())&&(b=parseInt(this.host.height()));b=parseInt(this.host.height());e.each(this.items,function(){$element=e(this.element);if(0==this.level&&0d&&$element.css("padding-top",c-1)}})}e.each(this.items,function(){$element=e(this.element);if(this.hasItems&&0a.max&&(a.max=a.min+1),a._arrange(),a.setPosition(a.value))};this.propertyChangeMap.min=function(a,b,c,e){isNaN(e)||c==e||(a.min=parseInt(e),a.min>a.max&&(a.max=a.min+1),a._arrange(),a.setPosition(a.value))};this.propertyChangeMap.disabled=function(a,b,c,e){c!=e&&(e?a.host.addClass(a.toThemeProperty("jqx-fill-state-disabled")):a.host.removeClass(a.toThemeProperty("jqx-fill-state-disabled")),a.btnUp.jqxRepeatButton("disabled",a.disabled),a.btnDown.jqxRepeatButton("disabled",a.disabled),a.btnThumb.jqxButton("disabled",a.disabled))};this.propertyChangeMap.touchMode=function(a,b,c,e){c!=e&&(a._updateTouchBehavior(),!0===e?(a.showButtons=!1,a.refresh()):!1===e&&(a.showButtons=!0,a.refresh()))};this.propertyChangeMap.rtl=function(a,b,c,e){c!=e&&a.refresh()};this.buttonDownCapture=this.buttonUpCapture=!1;this._updateTouchBehavior();this.setPosition(this.value);this._addHandlers();this.setTheme()},resize:function(a,b){this.width=a;this.height=b;this._arrange()},_updateTouchBehavior:function(){this.isTouchDevice=e.jqx.mobile.isTouchDevice();1==this.touchMode?(e.jqx.browser.msie&&9>e.jqx.browser.version||(this.isTouchDevice=!0,e.jqx.mobile.setMobileSimulator(this.btnThumb[0]),this._removeHandlers(),this._addHandlers()),this.setTheme()):0==this.touchMode&&(this.isTouchDevice=!1)},_addHandlers:function(){var a=this,b=!1;try{if("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)this._touchSupport=b=!0}catch(f){}if(a.isTouchDevice||b)this.addHandler(this.btnThumb,e.jqx.mobile.getTouchEventName("touchend"),function(b){var c=a.vertical?a.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):a.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"),e=a.toThemeProperty("jqx-fill-state-pressed");a.btnThumb.removeClass(c);a.btnThumb.removeClass(e);a.disabled||a.handlemouseup(a,b);return!1}),this.addHandler(this.btnThumb,e.jqx.mobile.getTouchEventName("touchstart"),function(b){a.disabled||(1==a.touchMode?(b.clientX=b.originalEvent.clientX,b.clientY=b.originalEvent.clientY):b.originalEvent.touches&&b.originalEvent.touches.length?(b.clientX=b.originalEvent.touches[0].clientX,b.clientY=b.originalEvent.touches[0].clientY):(b.clientX=b.originalEvent.clientX,b.clientY=b.originalEvent.clientY),a.handlemousedown(b),b.preventDefault&&b.preventDefault())}),e.jqx.mobile.touchScroll(this.element,a.max,function(b,c,e,h,l){"visible"==a.host.css("visibility")&&(1==a.touchMode?(l.clientX=l.originalEvent.clientX,l.clientY=l.originalEvent.clientY):l.originalEvent.touches&&l.originalEvent.touches.length?(l.clientX=l.originalEvent.touches[0].clientX,l.clientY=l.originalEvent.touches[0].clientY):(l.clientX=l.originalEvent.clientX,l.clientY=l.originalEvent.clientY),b=a.vertical?a.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):a.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"),a.btnThumb.addClass(b),a.btnThumb.addClass(a.toThemeProperty("jqx-fill-state-pressed")),a.thumbCapture=!0,a.handlemousemove(l))},a.element.id);if(!this.isTouchDevice){try{""==document.referrer&&!window.frameElement||null==window.top||window.top==window.self||(b=null,window.parent&&document.referrer&&(b=document.referrer),b&&-1!=b.indexOf(document.location.host)&&(b=function(b){a.disabled||a.handlemouseup(a,b)},window.top.document.addEventListener?window.top.document.addEventListener("mouseup",b,!1):window.top.document.attachEvent&&window.top.document.attachEvent("onmouseup",b)))}catch(f){}this.addHandler(this.btnDown,"click mouseup mousedown",function(b){var c=a.step;Math.abs(a.max-a.min)<=c&&(c=1);a.rtl&&!a.vertical&&(c=-a.step);switch(b.type){case "click":a.buttonDownCapture&&!a.isTouchDevice?a.disabled||a.setPosition(a.value+c):!a.disabled&&a.isTouchDevice&&a.setPosition(a.value+c);break;case "mouseup":if(!a.btnDownInstance.base.disabled&&a.buttonDownCapture)return a.buttonDownCapture=!1,a.btnDown.removeClass(a.toThemeProperty("jqx-scrollbar-button-state-pressed")),a.btnDown.removeClass(a.toThemeProperty("jqx-fill-state-pressed")),a._removeArrowClasses("pressed","down"),a.handlemouseup(a,b),a.setPosition(a.value+c),!1;break;case "mousedown":if(!a.btnDownInstance.base.disabled)return a.buttonDownCapture=!0,a.btnDown.addClass(a.toThemeProperty("jqx-fill-state-pressed")),a.btnDown.addClass(a.toThemeProperty("jqx-scrollbar-button-state-pressed")),a._addArrowClasses("pressed","down"),!1}});this.addHandler(this.btnUp,"click mouseup mousedown",function(b){var c=a.step;Math.abs(a.max-a.min)<=c&&(c=1);a.rtl&&!a.vertical&&(c=-a.step);switch(b.type){case "click":a.buttonUpCapture&&!a.isTouchDevice?a.disabled||a.setPosition(a.value-c):!a.disabled&&a.isTouchDevice&&a.setPosition(a.value-c);break;case "mouseup":if(!a.btnUpInstance.base.disabled&&a.buttonUpCapture)return a.buttonUpCapture=!1,a.btnUp.removeClass(a.toThemeProperty("jqx-scrollbar-button-state-pressed")),a.btnUp.removeClass(a.toThemeProperty("jqx-fill-state-pressed")),a._removeArrowClasses("pressed","up"),a.handlemouseup(a,b),a.setPosition(a.value-c),!1;break;case "mousedown":if(!a.btnUpInstance.base.disabled)return a.buttonUpCapture=!0,a.btnUp.addClass(a.toThemeProperty("jqx-fill-state-pressed")),a.btnUp.addClass(a.toThemeProperty("jqx-scrollbar-button-state-pressed")),a._addArrowClasses("pressed","up"),!1}})}b="click";this.isTouchDevice&&(b=e.jqx.mobile.getTouchEventName("touchend"));this.addHandler(this.areaUp,b,function(b){if(!a.disabled)return b=a.largestep,a.rtl&&!a.vertical&&(b=-a.largestep),a.setPosition(a.value-b),!1});this.addHandler(this.areaDown,b,function(b){if(!a.disabled)return b=a.largestep,a.rtl&&!a.vertical&&(b=-a.largestep),a.setPosition(a.value+b),!1});this.addHandler(this.areaUp,"mousedown",function(b){if(!a.disabled)return a.areaUpCapture=!0,!1});this.addHandler(this.areaDown,"mousedown",function(b){if(!a.disabled)return a.areaDownCapture=!0,!1});this.addHandler(this.btnThumb,"mousedown dragstart",function(b){if("dragstart"===b.type)return!1;a.disabled||a.handlemousedown(b);b.preventDefault&&b.preventDefault()});this.addHandler(e(document),"mouseup."+this.element.id,function(b){a.disabled||a.handlemouseup(a,b)});if(!this.isTouchDevice&&(this.mousemoveFunc=function(b){a.disabled||a.handlemousemove(b)},this.addHandler(e(document),"mousemove."+this.element.id,this.mousemoveFunc),this.addHandler(e(document),"mouseleave."+this.element.id,function(b){a.disabled||a.handlemouseleave(b)}),this.addHandler(e(document),"mouseenter."+this.element.id,function(b){a.disabled||a.handlemouseenter(b)}),!a.disabled)){this.addHandler(this.btnUp,"mouseenter mouseleave",function(b){"mouseenter"===b.type?a.disabled||a.btnUpInstance.base.disabled||1==a.touchMode||(a.btnUp.addClass(a.toThemeProperty("jqx-scrollbar-button-state-hover")),a.btnUp.addClass(a.toThemeProperty("jqx-fill-state-hover")),a._addArrowClasses("hover","up")):a.disabled||a.btnUpInstance.base.disabled||1==a.touchMode||(a.btnUp.removeClass(a.toThemeProperty("jqx-scrollbar-button-state-hover")),a.btnUp.removeClass(a.toThemeProperty("jqx-fill-state-hover")),a._removeArrowClasses("hover","up"))});var c=a.toThemeProperty("jqx-scrollbar-thumb-state-hover");a.vertical||(c=a.toThemeProperty("jqx-scrollbar-thumb-state-hover-horizontal"));this.addHandler(this.btnThumb,"mouseenter mouseleave",function(b){"mouseenter"===b.type?a.disabled||1==a.touchMode||(a.btnThumb.addClass(c),a.btnThumb.addClass(a.toThemeProperty("jqx-fill-state-hover"))):a.disabled||1==a.touchMode||(a.btnThumb.removeClass(c),a.btnThumb.removeClass(a.toThemeProperty("jqx-fill-state-hover")))});this.addHandler(this.btnDown,"mouseenter mouseleave",function(b){"mouseenter"===b.type?a.disabled||a.btnDownInstance.base.disabled||1==a.touchMode||(a.btnDown.addClass(a.toThemeProperty("jqx-scrollbar-button-state-hover")),a.btnDown.addClass(a.toThemeProperty("jqx-fill-state-hover")),a._addArrowClasses("hover","down")):a.disabled||a.btnDownInstance.base.disabled||1==a.touchMode||(a.btnDown.removeClass(a.toThemeProperty("jqx-scrollbar-button-state-hover")),a.btnDown.removeClass(a.toThemeProperty("jqx-fill-state-hover")),a._removeArrowClasses("hover","down"))})}},destroy:function(){var a=this.btnUp,b=this.btnDown,c=this.btnThumb,f=this.areaUp,d=this.areaDown;this.arrowUp.remove();delete this.arrowUp;this.arrowDown.remove();delete this.arrowDown;d.removeClass();f.removeClass();b.removeClass();a.removeClass();c.removeClass();a.jqxRepeatButton("destroy");b.jqxRepeatButton("destroy");f.jqxRepeatButton("destroy");d.jqxRepeatButton("destroy");c.jqxButton("destroy");a=e.data(this.element,"jqxScrollBar");this._removeHandlers();this.scrollOuterWrap=this.areaDown=this.areaUp=this.scrollWrap=this.btnDown=this.btnUp=null;delete this.mousemoveFunc;delete this.btnDownInstance;delete this.btnUpInstance;delete this.scrollOuterWrap;delete this.scrollWrap;delete this.btnDown;delete this.areaDown;delete this.areaUp;delete this.btnDown;delete this.btnUp;delete this.btnThumb;delete this.propertyChangeMap.value;delete this.propertyChangeMap.min;delete this.propertyChangeMap.max;delete this.propertyChangeMap.touchMode;delete this.propertyChangeMap.disabled;delete this.propertyChangeMap.theme;delete this.propertyChangeMap;a&&delete a.instance;this.host.removeData();this.host.remove();delete this.host;delete this.set;delete this.get;delete this.call;delete this.element},_removeHandlers:function(){this.removeHandler(this.btnUp,"mouseenter");this.removeHandler(this.btnDown,"mouseenter");this.removeHandler(this.btnThumb,"mouseenter");this.removeHandler(this.btnUp,"mouseleave");this.removeHandler(this.btnDown,"mouseleave");this.removeHandler(this.btnThumb,"mouseleave");this.removeHandler(this.btnUp,"click");this.removeHandler(this.btnDown,"click");this.removeHandler(this.btnDown,"mouseup");this.removeHandler(this.btnUp,"mouseup");this.removeHandler(this.btnDown,"mousedown");this.removeHandler(this.btnUp,"mousedown");this.removeHandler(this.areaUp,"mousedown");this.removeHandler(this.areaDown,"mousedown");this.removeHandler(this.areaUp,"click");this.removeHandler(this.areaDown,"click");this.removeHandler(this.btnThumb,"mousedown");this.removeHandler(this.btnThumb,"dragstart");this.removeHandler(e(document),"mouseup."+this.element.id);this.mousemoveFunc?this.removeHandler(e(document),"mousemove."+this.element.id,this.mousemoveFunc):this.removeHandler(e(document),"mousemove."+this.element.id);this.removeHandler(e(document),"mouseleave."+this.element.id);this.removeHandler(e(document),"mouseenter."+this.element.id)},_addArrowClasses:function(a,b){"pressed"==a&&(a="selected");""!=a&&(a="-"+a);this.vertical?("up"!=b&&void 0!=b||this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-up"+a)),"down"!=b&&void 0!=b||this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-down"+a))):("up"!=b&&void 0!=b||this.arrowUp.addClass(this.toThemeProperty("jqx-icon-arrow-left"+a)),"down"!=b&&void 0!=b||this.arrowDown.addClass(this.toThemeProperty("jqx-icon-arrow-right"+a)))},_removeArrowClasses:function(a,b){"pressed"==a&&(a="selected");""!=a&&(a="-"+a);this.vertical?("up"!=b&&void 0!=b||this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-up"+a)),"down"!=b&&void 0!=b||this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-down"+a))):("up"!=b&&void 0!=b||this.arrowUp.removeClass(this.toThemeProperty("jqx-icon-arrow-left"+a)),"down"!=b&&void 0!=b||this.arrowDown.removeClass(this.toThemeProperty("jqx-icon-arrow-right"+a)))},setTheme:function(){var a=this.btnUp,b=this.btnDown,c=this.btnThumb,f=this.scrollWrap,d=this.arrowUp,g=this.arrowDown;this.scrollWrap[0].className=this.toThemeProperty("jqx-reset");this.scrollOuterWrap[0].className=this.toThemeProperty("jqx-reset");var h=this.toThemeProperty("jqx-reset");this.areaDown[0].className=h;this.areaUp[0].className=h;var l=this.toThemeProperty("jqx-scrollbar")+" "+this.toThemeProperty("jqx-widget")+" "+this.toThemeProperty("jqx-widget-content");this.host.addClass(l);b[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");a[0].className=this.toThemeProperty("jqx-scrollbar-button-state-normal");l="";this.vertical?(d[0].className=h+" "+this.toThemeProperty("jqx-icon-arrow-up"),g[0].className=h+" "+this.toThemeProperty("jqx-icon-arrow-down"),l=this.toThemeProperty("jqx-scrollbar-thumb-state-normal")):(d[0].className=h+" "+this.toThemeProperty("jqx-icon-arrow-left"),g[0].className=h+" "+this.toThemeProperty("jqx-icon-arrow-right"),l=this.toThemeProperty("jqx-scrollbar-thumb-state-normal-horizontal"));l+=" "+this.toThemeProperty("jqx-fill-state-normal");c[0].className=l;this.disabled?(f.addClass(this.toThemeProperty("jqx-fill-state-disabled")),f.removeClass(this.toThemeProperty("jqx-scrollbar-state-normal"))):(f.addClass(this.toThemeProperty("jqx-scrollbar-state-normal")),f.removeClass(this.toThemeProperty("jqx-fill-state-disabled")));"all"==this.roundedCorners?(this.host.addClass(this.toThemeProperty("jqx-rc-all")),this.vertical?(f=e.jqx.cssroundedcorners("top"),f=this.toThemeProperty(f),a.addClass(f),a=e.jqx.cssroundedcorners("bottom")):(f=e.jqx.cssroundedcorners("left"),f=this.toThemeProperty(f),a.addClass(f),a=e.jqx.cssroundedcorners("right")),a=this.toThemeProperty(a),b.addClass(a)):(b=e.jqx.cssroundedcorners(this.roundedCorners),b=this.toThemeProperty(b),elBtnUp.addClass(b),elBtnDown.addClass(b));b=e.jqx.cssroundedcorners(this.roundedCorners);b=this.toThemeProperty(b);c.hasClass(b)||c.addClass(b);this.isTouchDevice&&0!=this.touchModeStyle&&(this.showButtons=!1,c.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-normal-touch")))},isScrolling:function(){return void 0==this.thumbCapture||void 0==this.buttonDownCapture||void 0==this.buttonUpCapture||void 0==this.areaDownCapture||void 0==this.areaUpCapture?!1:this.thumbCapture||this.buttonDownCapture||this.buttonUpCapture||this.areaDownCapture||this.areaUpCapture},handlemousedown:function(a){if(void 0==this.thumbCapture||0==this.thumbCapture){this.thumbCapture=!0;var b=this.btnThumb;null!=b&&(b.addClass(this.toThemeProperty("jqx-fill-state-pressed")),this.vertical?b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed")):b.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal")))}this.dragStartX=a.clientX;this.dragStartY=a.clientY;this.dragStartValue=this.value},toggleHover:function(a,b){},refresh:function(){this._arrange()},_setElementPosition:function(a,b,c){isNaN(b)||parseInt(a[0].style.left)==parseInt(b)||(a[0].style.left=b+"px");isNaN(c)||parseInt(a[0].style.top)==parseInt(c)||(a[0].style.top=c+"px")},_setElementTopPosition:function(a,b){isNaN(b)||(a[0].style.top=b+"px")},_setElementLeftPosition:function(a,b){isNaN(b)||(a[0].style.left=b+"px")},handlemouseleave:function(a){a=this.btnUp;var b=this.btnDown;if(this.buttonDownCapture||this.buttonUpCapture)a.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),this._removeArrowClasses("pressed");1==this.thumbCapture&&(a=this.btnThumb,b=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"),a.removeClass(b),a.removeClass(this.toThemeProperty("jqx-fill-state-pressed")))},handlemouseenter:function(a){a=this.btnUp;var b=this.btnDown;this.buttonUpCapture&&(a.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),a.addClass(this.toThemeProperty("jqx-fill-state-pressed")),this._addArrowClasses("pressed","up"));this.buttonDownCapture&&(b.addClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),b.addClass(this.toThemeProperty("jqx-fill-state-pressed")),this._addArrowClasses("pressed","down"));1==this.thumbCapture&&(a=this.btnThumb,this.vertical?a.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed")):a.addClass(this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal")),a.addClass(this.toThemeProperty("jqx-fill-state-pressed")))},handlemousemove:function(a){var b=this.btnUp,c=this.btnDown;if(null!=c&&null!=b){null!=b&&null!=c&&void 0!=this.buttonDownCapture&&void 0!=this.buttonUpCapture&&(this.buttonDownCapture&&0==a.which?(c.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),c.removeClass(this.toThemeProperty("jqx-fill-state-pressed")),this._removeArrowClasses("pressed","down"),this.buttonDownCapture=!1):this.buttonUpCapture&&0==a.which&&(b.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),b.removeClass(this.toThemeProperty("jqx-fill-state-pressed")),this._removeArrowClasses("pressed","up"),this.buttonUpCapture=!1));if(1!=this.thumbCapture)return!1;var e=this.btnThumb;if(0==a.which&&!this.isTouchDevice&&!this._touchSupport)return this.thumbCapture=!1,this._arrange(),a=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal"),e.removeClass(a),e.removeClass(this.toThemeProperty("jqx-fill-state-pressed")),!0;void 0!=a.preventDefault&&a.preventDefault();null!=a.originalEvent&&(a.originalEvent.mouseHandled=!0);void 0!=a.stopPropagation&&a.stopPropagation();var d=0;try{var d=this.vertical?a.clientY-this.dragStartY:a.clientX-this.dragStartX,g=this._btnAndThumbSize;this._btnAndThumbSize||(g=this.vertical?b.height()+c.height()+e.height():b.width()+c.width()+e.width());var h=(this.max-this.min)/(this.scrollBarSize-g);if("auto"==this.thumbStep)d*=h;else{d*=h;if(Math.abs(this.dragStartValue+d-this.value)>=parseInt(this.thumbStep)){var l=Math.round(parseInt(d)/this.thumbStep)*this.thumbStep;this.rtl&&!this.vertical?this.setPosition(this.dragStartValue-l):this.setPosition(this.dragStartValue+l)}return!1}l=d;this.rtl&&!this.vertical&&(l=-d);this.setPosition(this.dragStartValue+l)}catch(k){alert(k)}return!1}},handlemouseup:function(a,b){var c=!1;if(this.thumbCapture){this.thumbCapture=!1;var c=this.btnThumb,e=this.vertical?this.toThemeProperty("jqx-scrollbar-thumb-state-pressed"):this.toThemeProperty("jqx-scrollbar-thumb-state-pressed-horizontal");c.removeClass(e);c.removeClass(this.toThemeProperty("jqx-fill-state-pressed"));c=!0;this._mouseup=new Date}this.areaDownCapture=this.areaUpCapture=!1;if(this.buttonUpCapture||this.buttonDownCapture)c=this.btnUp,e=this.btnDown,this.buttonDownCapture=this.buttonUpCapture=!1,c.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),e.removeClass(this.toThemeProperty("jqx-scrollbar-button-state-pressed")),c.removeClass(this.toThemeProperty("jqx-fill-state-pressed")),e.removeClass(this.toThemeProperty("jqx-fill-state-pressed")),this._removeArrowClasses("pressed"),c=!0,this._mouseup=new Date;c&&(void 0!=b.preventDefault&&b.preventDefault(),null!=b.originalEvent&&(b.originalEvent.mouseHandled=!0),void 0!=b.stopPropagation&&b.stopPropagation())},setPosition:function(a,b){if(void 0==a||NaN==a)a=this.min;a>=this.max&&(a=this.max);ad&&(d=0);this.vertical?(h=h-d-l,0>h&&(h=0),b[0].style.height=h+"px",a[0].style.height=d+"px",this._setElementTopPosition(a,g),this._setElementTopPosition(c,g+d),this._setElementTopPosition(b,g+d+e)):(a[0].style.width=d+"px",b[0].style.width=0<=h-d-l?h-d-l+"px":"0px",this._setElementLeftPosition(a,g),this._setElementLeftPosition(c,g+d),this._setElementLeftPosition(b,2+g+d+e))},_arrange:function(){if(this._initialLayout)this._initialLayout=!1;else{if(this.min>this.max){var a=this.min;this.min=this.max;this.max=a}0>this.min&&(a=this.max-this.min,this.min=0,this.max=a);var a=this.areaUp,b=this.areaDown,c=this.btnUp,e=this.btnDown,d=this.btnThumb,g=this.scrollWrap,h=parseInt(this.element.style.height),l=parseInt(this.element.style.width);this.isPercentage&&(h=this.host.height(),l=this.host.width());isNaN(h)&&(h=0);isNaN(l)&&(l=0);this._width=l;this._height=h;var k=this.vertical?l:h;this.showButtons||(k=0);c[0].style.width=k+"px";c[0].style.height=k+"px";e[0].style.width=k+"px";e[0].style.height=k+"px";this.vertical?g[0].style.width=l+2+"px":g[0].style.height=h+2+"px";this._setElementPosition(c,0,0);c=k+2;this.vertical?this._setElementPosition(e,0,h-c):this._setElementPosition(e,l-c,0);var m=this.vertical?h:l;this.scrollBarSize=m;e=this._getThumbSize(m-2*c);e=Math.floor(e-2);eh)h=10;if(NaN==l||10>l)l=10;this.btnSize=k;g=this.vertical?2*c+(2+parseInt(d[0].style.height)):2*c+(2+parseInt(d[0].style.width));this._btnAndThumbSize=g=Math.round(g);var n=(m-g)/(this.max-this.min)*(this.value-this.min);this.rtl&&!this.vertical&&(n=(m-g)/(this.max-this.min)*(this.max-this.value-this.min));n=Math.round(n);if(isNaN(n)||0>n||-Infinity===n||Infinity===n)n=0;if(this.vertical){h=m-n-g;0>h&&(h=0);b[0].style.height=h+"px";b[0].style.width=l+"px";a[0].style.height=n+"px";a[0].style.width=l+"px";h=parseInt(this.element.style.height);this.isPercentage&&(h=this.host.height());d[0].style.visibility="inherit";if(0>h-3*parseInt(k)||hl&&(l=0);b[0].style.width=l+"px";b[0].style.height=h+"px";h=parseInt(this.element.style.width);this.isPercentage&&(h=this.host.width());d[0].style.visibility="inherit";if(0>h-3*parseInt(k)||hl&&(l=0);l>g+0-c&&(l=g+0-c);f=this.panels[0].min;d=this.panels[1].min;-1!=d.toString().indexOf("%")&&(d=parseFloat(d)*h);-1!=f.toString().indexOf("%")&&(f=parseFloat(f)*h);this._splitBarClone.removeClass(this.toThemeProperty("jqx-splitter-splitbar-invalid"));lg+0-c-d&&(this._splitBarClone.addClass(this.toThemeProperty("jqx-splitter-splitbar-invalid")),l=g+0-c-d);this._splitBarClone.css(b,l);a.preventDefault&&a.preventDefault();a.stopPropagation&&a.stopPropagation();return!1}return!0}},resize:function(a,b){this.width=a;this.height=b;this._arrange()},_resize:function(){var a="horizontal"==this.orientation?"height":"width",b=this._splitBarClone.css("horizontal"==this.orientation?"top":"left"),a=1/(this.host[a]()/100);-1!=this.panels[0].size.toString().indexOf("%")?this.panels[0].size=parseFloat(b)*a+"%":this.panels[0].size=parseFloat(b);this._layoutPanels();this._raiseEvent(0,{panels:this.panels})},_stopDrag:function(){this._dragging&&this._initOverlay();this._dragging=!1;if(this._splitBarClone){if(this.panels[0].collapsed||this.panels[1].collapsed||this.disabled)return!0;this._resize();this._splitBarClone.remove();this._splitBarClone=null}},_createSplitBarClone:function(){var a=this.splitBar.clone();a.fadeTo(0,.7);a.css("z-index",99999);"vertical"==this.orientation?a.css("cursor","col-resize"):a.css("cursor","row-resize");this.host.append(a);return a},_eventName:function(a){return this._isTouchDevice?this._eventsMap[a]:a},_addHandlers:function(){var a=this;e.jqx.utilities.resize(this.host,function(){a._layoutPanels()});this.addHandler(this.splitBar,"dragstart."+this.element.id,function(a){return!1});this.splitBarButton&&(this.addHandler(this.splitBarButton,"click."+this.element.id,function(){a.panels[0].collapsible?a.panels[0].collapsed?a.expand():a.collapse():a.panels[1].collapsible&&(a.panels[1].collapsed?a.expand():a.collapse())}),this.addHandler(this.splitBarButton,this._eventName("mouseenter"),function(){a.splitBarButton.addClass(a.toThemeProperty("jqx-splitter-collapse-button-hover"));a.splitBarButton.addClass(a.toThemeProperty("jqx-fill-state-hover"))}),this.addHandler(this.splitBarButton,this._eventName("mouseleave"),function(){a.splitBarButton.removeClass(a.toThemeProperty("jqx-splitter-collapse-button-hover"));a.splitBarButton.removeClass(a.toThemeProperty("jqx-fill-state-hover"))}));this.addHandler(e(document),this._eventName("mousemove")+"."+this.element.id,function(b){return a._drag(b)});this.addHandler(e(document),this._eventName("mouseup")+"."+this.element.id,function(){return a._stopDrag()});this.addHandler(this.splitBar,this._eventName("mousedown"),function(b){return a._startDrag(b)});this.addHandler(this.splitBar,this._eventName("mouseenter"),function(){a.resizable&&!a.disabled&&(a.splitBar.addClass(a.toThemeProperty("jqx-splitter-splitbar-hover")),a.splitBar.addClass(a.toThemeProperty("jqx-fill-state-hover")))});this.addHandler(this.splitBar,this._eventName("mouseleave"),function(){a.resizable&&!a.disabled&&(a.splitBar.removeClass(a.toThemeProperty("jqx-splitter-splitbar-hover")),a.splitBar.removeClass(a.toThemeProperty("jqx-fill-state-hover")))});if((""!=document.referrer||window.frameElement)&&null!=window.top&&window.top!=window.self){var b=null;window.parent&&document.referrer&&(b=document.referrer);b&&-1!=b.indexOf(document.location.host)&&(b=function(b){a._stopDrag()},window.top.document.addEventListener?window.top.document.addEventListener("mouseup",b,!1):window.top.document.attachEvent&&window.top.document.attachEvent("onmouseup",b))}},_removeHandlers:function(){this.removeHandler(e(window),"resize."+this.element.id);this.splitBarButton&&(this.removeHandler(this.splitBarButton,"click."+this.element.id),this.removeHandler(this.splitBarButton,this._eventName("mouseenter")),this.removeHandler(this.splitBarButton,this._eventName("mouseleave")));this.removeHandler(e(document),this._eventName("mousemove")+"."+this.element.id);this.removeHandler(e(document),this._eventName("mouseup")+"."+this.element.id);this.splitBar&&(this.removeHandler(this.splitBar,"dragstart."+this.element.id),this.removeHandler(this.splitBar,this._eventName("mousedown")),this.removeHandler(this.splitBar,this._eventName("mouseenter")),this.removeHandler(this.splitBar,this._eventName("mouseleave")))},render:function(){this.splitBar&&this.splitBar.remove();var a=this.host.children();if(2!=a.length)throw"Invalid HTML Structure! jqxSplitter requires 1 container DIV tag and 2 nested DIV tags.";if(2==a.length){var b=a[0].className.split(" "),a=a[1].className.split(" ");if(-1!=b.indexOf("jqx-reset")&&-1!=b.indexOf("jqx-splitter")&&-1!=b.indexOf("jqx-widget"))throw"Invalid HTML Structure! Nested jqxSplitter cannot be initialized from a Splitter Panel. You need to add a new DIV tag inside the Splitter Panel and initialize the nested jqxSplitter from it!";if(-1!=a.indexOf("jqx-reset")&&-1!=a.indexOf("jqx-splitter")&&-1!=a.indexOf("jqx-widget"))throw"Invalid HTML Structure! Nested jqxSplitter cannot be initialized from a Splitter Panel. You need to add a new DIV tag inside the Splitter Panel and initialize the nested jqxSplitter from it!";}if(0this.size&&(this.size=0);0>this.min&&(this.min=0);void 0==this.collapsible&&(this.collapsible=!0);void 0==this.collapsed&&(this.collapsed=!1);0!=this.size&&(-1!=this.size.toString().indexOf("px")&&(this.size=parseInt(this.size)),-1==this.size.toString().indexOf("%")?parseInt(this.min)>parseInt(this.size)&&(this.min=this.size):-1!=this.min.toString().indexOf("%")&&parseInt(this.min)>parseInt(this.size)&&(this.min=this.size))})},_arrange:function(){if(null!=this.width){var a=this.width;"string"!=typeof a&&(a=parseInt(this.width)+"px");this.host.css("width",a)}null!=this.height&&(a=this.height,"string"!=typeof a&&(a=parseInt(this.height)+"px"),this.host.css("height",a));this._splitBarSize=this._isTouchDevice?this.touchSplitBarSize:this.splitBarSize;this.showSplitBar||(this._splitBarSize=0,this.splitBar.hide());a="horizontal"==this.orientation?"width":"height";this.splitBar.css(a,"100%");this.panel1.css(a,"100%");this.panel2.css(a,"100%");"horizontal"==this.orientation?this.splitBar.height(this._splitBarSize):this.splitBar.width(this._splitBarSize);"vertical"===this.orientation?(this.splitBarButton.width(this._splitBarSize),this.splitBarButton.height(45)):(this.splitBarButton.height(this._splitBarSize),this.splitBarButton.width(45));this.splitBarButton.css("position","relative");"vertical"===this.orientation?(this.splitBarButton.css("top","50%"),this.splitBarButton.css("left","0"),this.splitBarButton.css("margin-top","-23px"),this.splitBarButton.css("margin-left","-0px")):(this.splitBarButton.css("left","50%"),this.splitBarButton.css("top","0"),this.splitBarButton.css("margin-left","-23px"),this.splitBarButton.css("margin-top","-0px"));this._layoutPanels()},collapse:function(){if(!this.disabled){var a=-1;this.panels[0].collapsed=this.panels[1].collapsed=!1;this.panels[0].element[0].style.visibility="inherit";this.panels[1].element[0].style.visibility="inherit";this.panels[0].collapsible?a=0:this.panels[1].collapsible&&(a=1);-1!=a&&(this.panels[a].collapsed=!0,this.panels[a].element[0].style.visibility="hidden",this.splitBar.addClass(this.toThemeProperty("jqx-splitter-splitbar-collapsed")),this._layoutPanels(),this._raiseEvent(2,{index:a,panels:this.panels}),this._raiseEvent(0,{panels:this.panels}))}},expand:function(){if(!this.disabled){var a=-1;this.panels[0].collapsed=this.panels[1].collapsed=!1;this.panels[0].element[0].style.visibility="inherit";this.panels[1].element[0].style.visibility="inherit";this.panels[0].collapsible?a=0:this.panels[1].collapsible&&(a=1);-1!=a&&(this.panels[a].collapsed=!1,this.panels[a].element[0].style.visibility="inherit",this.splitBar.removeClass(this.toThemeProperty("jqx-splitter-splitbar-collapsed")),this._layoutPanels(),this._raiseEvent(1,{index:a,panels:this.panels}),this._raiseEvent(0,{panels:this.panels}))}},disable:function(){this.disabled=!0;this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this.splitBar.addClass(this.toThemeProperty("jqx-splitter-splitbar-collapsed"));this.splitBarButton.addClass(this.toThemeProperty("jqx-splitter-splitbar-collapsed"))},enable:function(){this.disabled=!1;this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled"));this.splitBar.removeClass(this.toThemeProperty("jqx-splitter-splitbar-collapsed"));this.splitBarButton.removeClass(this.toThemeProperty("jqx-splitter-splitbar-collapsed"))},refresh:function(a){1!=a&&this._arrange()},propertyChangedHandler:function(a,b,c,f){"panels"===b||"orientation"===b||"showSplitBar"===b?a.render():("touchMode"===b&&(a._isTouchDevice=f),"disabled"===b?f?a.disable():a.enable():"theme"===b?e.jqx.utilities.setTheme(c,f,a.host):a.refresh())},_layoutPanels:function(){var a="horizontal"==this.orientation?"height":"width",b="horizontal"==this.orientation?"top":"left",c,e,d,g,h=parseInt(this._splitBarSize)+2;this.showSplitBar||(h=0);var l=this.host[a](),k=l/100,m=1/k,n=m*h,p=this.panel1,q=this.panel2,r=this.panels[0].size;this.panels[0].collapsed&&(d=!0);this.panels[1].collapsed&&(g=!0);c=this.panels[0].min;e=this.panels[1].min;-1!=e.toString().indexOf("%")&&(e=parseFloat(e)*k);-1!=c.toString().indexOf("%")&&(c=parseFloat(c)*k);this._isNested&&this._isTouchDevice&&("horizontal"==this.orientation?(p.width(this.host.width()),q.width(this.host.width())):(p.height(this.host.height()),q.height(this.host.height())));if(d)c=Math.max(e,l-h),p[a](0),q[a](c);else if(g)c=Math.max(c,l-h),q[a](0),p[a](c);else if(-1!=r.toString().indexOf("%"))d=100-parseFloat(r),p.css(a,parseFloat(r)+"%"),q.css(a,d-n+"%"),d=q[a](),d=e.jqx.browser.version?!1:!0},render:function(){this._refresh()},_uiRefresh:function(a){this._unorderedListLeftBackup=this._unorderedList.css("left");a&&this._render();this._addStyles();this._performLayout();this._prepareTabs();this._removeEventHandlers();this._addEventHandlers();"auto"===this._unorderedListLeftBackup&&(this._unorderedListLeftBackup=this._getArrowsDisplacement());this._unorderedList.css("left",this._unorderedListLeftBackup);this.rtl&&this.scrollable&&this._rightArrow&&"hidden"!=this._rightArrow.css("visibility")&&(a=2*this.arrowButtonSize,a=this.host.width()-parseInt(this._unorderedList.width()+a+ +parseInt(this._unorderedList.css("margin-left")),10),this._unorderedList.css("left",a+"px"))},_refresh:function(){e.jqx.isHidden(this.host)||this._uiRefresh(!0)},_addStyles:function(){this._unorderedList.addClass(this.toThemeProperty("jqx-tabs-title-container"));this._unorderedList.css({outline:"none","white-space":"nowrap","margin-top":"0px","margin-bottom":"0px",padding:"0px",background:"transparent",border:"none","border-style":"none","text-indent":"0px"});for(var a=this.length();a;)switch(a--,this._titleList[a].removeClass(),this._titleList[a].css("padding",""),this._titleList[a].addClass("jqx-reset"),this._titleList[a].addClass("jqx-disableselect"),this._titleList[a].addClass(this.toThemeProperty("jqx-tabs-title")),this._titleList[a].addClass(this.toThemeProperty("jqx-item")),"bottom"==this.position&&this._titleList[a].addClass(this.toThemeProperty("jqx-tabs-title-bottom")),this._titleList[a].disabled&&(this._titleList[a].addClass(this.toThemeProperty("jqx-tabs-title-disable")),this._titleList[a].addClass(this.toThemeProperty("jqx-fill-state-disabled"))),this._titleList[a].removeClass(this.toThemeProperty("jqx-rc-b")),this._titleList[a].removeClass(this.toThemeProperty("jqx-rc-t")),this._contentList[a].removeClass(this.toThemeProperty("jqx-rc-b")),this._contentList[a].removeClass(this.toThemeProperty("jqx-rc-t")),this.position){case "top":this._titleList[a].addClass(this.toThemeProperty("jqx-rc-t"));this._contentList[a].addClass(this.toThemeProperty("jqx-rc-b"));break;case "bottom":this._titleList[a].addClass(this.toThemeProperty("jqx-rc-b")),this._contentList[a].addClass(this.toThemeProperty("jqx-rc-t"))}if(this.selectionTracker)switch(this._selectionTracker.removeClass(this.toThemeProperty("jqx-rc-b")),this._selectionTracker.removeClass(this.toThemeProperty("jqx-rc-t")),this.position){case "top":this._selectionTracker.addClass(this.toThemeProperty("jqx-rc-t"));break;case "bottom":this._selectionTracker.addClass(this.toThemeProperty("jqx-rc-b"))}},_raiseEvent:function(a,b){var c=new e.Event(this._events[a]);c.owner=this;c.args=b;if(6===a||7===a)c.cancel=!1,this._currentEvent=c;var f="";try{if(f=this.host.trigger(c),1==a){var d=this;this.selectionTracker||"none"!=this.animationType?setTimeout(function(){!d._initTabContentList[d.selectedItem]&&d.initTabContent&&(d.initTabContent(d.selectedItem),d._initTabContentList[d.selectedItem]=!0);var a=new e.Event("loadContent");a.owner=this;0parseInt(this._unorderedList.css("margin-left"))+parseInt(this._unorderedList.width(),10)?k=l:Math.abs(h)+this.scrollStepparseInt(this._unorderedList.css("left"),10)+4&&(m=e-c-d-g+parseInt(this._titleList[this._selectedItem].position().left)));this._performScrollAnimation(k,m,a)},_scrollLeft:function(a,b){this._unorderedList.stop();this._unlockAnimation("unorderedList");var c=parseInt(this._unorderedList.css("left")),e=this._getArrowsDisplacement(),d=0,g=void 0;a=this.enableScrollAnimation?a:0;parseInt(this._headerWrapper.width())>=parseInt(this._unorderedList.width())?d=e:c+this.scrollStepparseInt(this._unorderedList.css("left"))+4&&(g=parseInt(this._titleList[this._selectedItem].position().left)));this._performScrollAnimation(d,g,a)},_performScrollAnimation:function(a,b,c){var e=this;void 0!==b&&this._moveSelectionTrack(this._selectedItem,0,b);this._lockAnimation("unorderedList");this._unorderedList.animate({left:a},c,function(){e._moveSelectionTrack(e.selectedItem,0);e._unlockAnimation("unorderedList")})},_addKeyboardHandlers:function(){var a=this;this.keyboardNavigation&&this.addHandler(this.host,"keydown",function(b){if(!a._activeAnimation()){var c=a.selectionTracker,f=a.getContentAt(a._selectedItem);if(e(b.target).ischildof(f))return!0;switch(b.keyCode){case 37:return a.rtl?a.next():a.previous(),!1;case 39:return a.rtl?a.previous():a.next(),!1;case 36:return a.first(),!1;case 35:return a.last(),!1;case 27:a._tabCaptured&&(a._cancelClick=!0,a._uncapture(null,a.selectedItem),a._tabCaptured=!1)}a.selectionTracker=c}return!0})},_addScrollHandlers:function(){var a=this;this.addHandler(this._leftArrow,"mousedown",function(){a._startScrollRepeat(!0,a.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mousedown",function(){a._startScrollRepeat(!1,a.scrollAnimationDuration)});this.addHandler(this._rightArrow,"mouseleave",function(){clearTimeout(a._scrollTimeout)});this.addHandler(this._leftArrow,"mouseleave",function(){clearTimeout(a._scrollTimeout)});this.addHandler(e(document),"mouseup.tab"+this.element.id,this._mouseUpScrollDocumentHandler,this);this.addHandler(e(document),"mouseleave.tab"+this.element.id,this._mouseLeaveScrollDocumentHandler,this)},_mouseLeaveScrollDocumentHandler:function(a){a=a.data;a._scrollTimeout&&clearTimeout(a._scrollTimeout)},_mouseUpScrollDocumentHandler:function(a){clearTimeout(a.data._scrollTimeout)},_mouseUpDragDocumentHandler:function(a){var b=a.data;b._tabCaptured&&b._dragStarted&&b._uncapture(a);b._tabCaptured=!1},_addReorderHandlers:function(){this.addHandler(e(document),"mousemove.tab"+this.element.id,this._moveElement,this);this.addHandler(e(document),"mouseup.tab"+this.element.id,this._mouseUpDragDocumentHandler,this)},_addEventHandlers:function(){for(var a=this.length();a;)a--,this._addEventListenerAt(a);this.keyboardNavigation&&this._addKeyboardHandlers();this.scrollable&&this._addScrollHandlers();this.reorder&&!this._isTouchDevice&&this._addReorderHandlers();var b=this;try{if((""!=document.referrer||window.frameElement)&&null!=window.top&&window.top!=window.self){var a=function(a){b._tabCaptured&&(b._cancelClick=!0,b._uncapture(null,b.selectedItem),b._tabCaptured=!1)},c=null;window.parent&&document.referrer&&(c=document.referrer);c&&-1!=c.indexOf(document.location.host)&&window.top.document&&this.addHandler(e(window.top.document),"mouseup",a)}}catch(f){}},focus:function(){try{this.host.focus();var a=this;setTimeout(function(){a.host.focus()},25)}catch(b){}},_getFocusedItem:function(a,b){for(var c=this.length();c;){c--;var e=this._titleList[c],d=parseInt(e.outerWidth(!0)),g=parseInt(e.offset().left);parseInt(this._unorderedList.offset().left);parseInt(this.host.offset().left);if(g<=a&&g+d>=a&&e!==this._capturedElement&&!this._titleList[c].locked&&!0!==this._titleList[c].disabled)return c}return-1},_uncapture:function(a){var b=this.selectionTracker;this._unorderedListLeftBackup=this._unorderedList.css("left");this._tabCaptured=this._dragStarted=!1;var c=this._indexOf(this._capturedElement);if(this._capturedElement){switch(this.position){case "top":this._capturedElement.css("bottom",0);break;case "bottom":this._capturedElement.css("top",0)}if(a)var f=this._getFocusedItem(a.clientX,a.clientY);-1!==f&&a?(this._raiseEvent(10,{item:c,dropIndex:f}),this._reorderItems(f,c)):this._capturedElement.css("left",0);e.each(this._titleList,function(){this.css("position","static")});this._reorderHeaderElements();this._unorderedList.css({position:"relative",top:"0px"});this._prepareTabs();-1!==f&&a?this._moveSelectionTrack(this._selectedItem,0):(this._selectedItem=c,this._moveSelectionTrack(c,0));this._addSelectStyle(this._selectedItem,!0);document.selection&&document.selection.clear();this._unorderedList.css("left",this._unorderedListLeftBackup);this.selectionTracker=b}},_reorderItems:function(a,b){var c=this._titleList[this.selectedItem];"undefined"===typeof this._capturedElement&&(this._capturedElement=this._titleList[b]);this._titleList[b].remove();b=a;e--)this._titleList[e]=this._titleList[e-1],this._contentList[e]=this._contentList[e-1];this._contentList[a]=c;this._titleList[a]=this._capturedElement},getSelectedItem:function(){return this.selectedItem},_getSelectedItem:function(a){for(var b=this.length();b;)if(b--,this._titleList[b]===a){this._selectedItem=this.selectedItem=b;break}},_moveElement:function(a,b){b=a.data;if(b._tabCaptured)if(document.selection&&document.selection.clear(),b._dragStarted)b._performDrag(a),clearTimeout(b._scrollTimeout);else if(unorderedListLeft=-parseInt(b._unorderedList.css("left"),10),a.clientX+unorderedListLeft>b._startX+3||a.clientX+unorderedListLeftthis._headerWrapper.offset().left+parseInt(this._headerWrapper.width(),10)?(this._scrollRight(this.scrollAnimationDuration),this._capturedElement.css("left",parseInt(this._capturedElement.css("left"))+this._lastUnorderedListPosition-b)):(this._unorderedList.stop(),this._unlockAnimation("unorderedList"),clearTimeout(this._scrollTimeout));c=this;this._scrollTimeout=setTimeout(function(){c._dragScroll(a)},this.scrollAnimationDuration);this._lastUnorderedListPosition=b},_captureElement:function(a,b){this._tabCaptured||this._titleList[b].locked||!0===this._titleList[b].disabled||this._activeAnimation()||(unorderedListLeft=-parseInt(this._unorderedList.css("left"),10),this._startX=unorderedListLeft+a.clientX,this._startY=a.clientY,this._lastX=a.clientX,this._lastY=a.clientY,this._tabCaptured=!0,this._capturedElement=this._titleList[b])},_titleInteractionTrigger:function(a){0=this._titleList.length)&&this.selectionTracker&&this._selectionTracker){this._selectionTracker.stop();this._unlockAnimation("selectionTracker");void 0===c&&(c=parseInt(this._titleList[a].position().left),isNaN(parseInt(this._unorderedList.css("left")))||(c+=parseInt(this._unorderedList.css("left"))),isNaN(parseInt(this._unorderedList.css("margin-left")))||(c+=parseInt(this._unorderedList.css("margin-left"))),isNaN(parseInt(this._titleList[a].css("margin-left")))||(c+=parseInt(this._titleList[a].css("margin-left"))),isNaN(parseInt(this._titleList[a].css("margin-right"))));var d=0;"top"===this.position&&(parseInt(this._headerWrapper.height()),parseInt(this._titleList[a].outerHeight()),this.autoHeight||(d+=parseInt(this._titleList[a].css("margin-top"))));this._lockAnimation("selectionTracker");var d=parseInt(this._titleList[a].css("padding-left"))+parseInt(this._titleList[a].css("padding-right")),g="top"==this.position?0:1,h=parseInt(this._headerWrapper.css("padding-top")),l=parseInt(this._titleList[a].css("padding-top"))+parseInt(this._titleList[a].css("padding-bottom"));this._selectionTracker.css("visibility","visible");this._moveSelectionTrackerContainer.css("visibility","visible");var k=parseInt(this._titleList[a].css("margin-top"));isNaN(k)&&(k=0);this._selectionTracker.animate({top:h+k-g,left:c+"px",height:parseInt(this._titleList[a].height()+l),width:this._titleList[a].width()+d},b,function(){e._unlockAnimation("selectionTracker");e._selectionTracker.css("visibility","hidden");e._addSelectStyle(a,!0);e._moveSelectionTrackerContainer.css("visibility","hidden")})}},destroy:function(){e.jqx.utilities.resize(this.host,null,!0);this.host.remove()},_switchTabs:function(a,b){if(a!==b&&!this._activeAnimation()&&!this._tabCaptured){this._raiseEvent(7,{item:b});this._raiseEvent(6,{item:a});if(this._currentEvent&&this._currentEvent.cancel){this._currentEvent=null;return}this._unselect(b,null,!0);this._select(a,this.contentTransitionDuration,null,!0);return!0}return!1},_activeAnimation:function(){for(child in this._isAnimated)if(this._isAnimated.hasOwnProperty(child)&&this._isAnimated[child])return!0;return!1},_indexOf:function(a){for(var b=this.length();b;)if(b--,this._titleList[b][0]===a[0]||this._contentList[b][0]===a[0])return b;return-1},_validateProperties:function(){try{if(0>this.scrollAnimationDuration||isNaN(this.scrollAnimationDuration))throw Error(this._invalidArgumentExceptions.invalidScrollAnimationDuration);if(0>parseInt(this.width)&&"auto"!==this.width)throw Error(this._invalidArgumentExceptions.invalidWidth);if(0>parseInt(this.height)&&"auto"!==this.height)throw Error(this._invalidArgumentExceptions.invalidHeight);if("none"!==this.animationType&&"fade"!==this.animationType)throw Error(this._invalidArgumentExceptions.invalidAnimationType);if(0>this.contentTransitionDuration||isNaN(this.contentTransitionDuration))throw Error(this._invalidArgumentExceptions.invalidcontentTransitionDuration);if("click"!==this.toggleMode&&"dblclick"!==this.toggleMode&&"mouseenter"!==this.toggleMode&&"none"!==this.toggleMode)throw Error(this._invalidArgumentExceptions.invalidToggleMode);if("top"!==this.position&&"bottom"!==this.position)throw Error(this._invalidArgumentExceptions.invalidPosition);if("left"!==this.scrollPosition&&"right"!==this.scrollPosition&&"both"!==this.scrollPosition)throw Error(this._invalidArgumentExceptions.invalidScrollPosition);if(0>this.scrollStep||isNaN(this.scrollStep))throw Error(this._invalidArgumentExceptions.invalidScrollStep);if(this._titleList.length!==this._contentList.length||0==this._titleList.length)throw Error(this._invalidArgumentExceptions.invalidStructure);if(0>this.arrowButtonSize||isNaN(this.arrowButtonSize))throw Error(this._invalidArgumentExceptions.invalidArrowSize);if(0>this.closeButtonSize||isNaN(this.closeButtonSize))throw Error(this._invalidArgumentExceptions.invalidCloseSize);}catch(a){alert(a)}},_startScrollRepeat:function(a,b){var c=this;a?this._scrollLeft(b):this._scrollRight(b);this._scrollTimeout&&clearTimeout(this._scrollTimeout);this._scrollTimeout=setTimeout(function(){c._startScrollRepeat(a,c.scrollAnimationDuration)},b)},_performLayout:function(){for(var a=this.length();a;)if(a--,"top"===this.position||"bottom"===this.position)this.rtl?this._titleList[a].css("float","right"):this._titleList[a].css("float","left");this._fitToSize();this._performHeaderLayout();this._fitToSize()},updatetabsheader:function(){this._performHeaderLayout()},_performResize:function(){this._fitToSize();this._positionArrows(this._totalItemsWidth);this._totalItemsWidth>this.element.offsetWidth?this._unorderedList.width(this._totalItemsWidth):this._unorderedList[0].style.width=this.element.offsetWidth-2+"px";this._fitToSize()},_addArrows:function(){this._leftArrow&&this._rightArrow&&(this._leftArrow.remove(),this._rightArrow.remove());this._leftArrow=e('\x3cdiv\x3e\x3cspan style\x3d"display: block; width: 16px; height: 16px;" class\x3d"'+this.toThemeProperty("jqx-tabs-arrow-left")+'"\x3e\x3c/span\x3e\x3c/div\x3e');this._rightArrow=e('\x3cdiv\x3e\x3cspan style\x3d"display: block; width: 16px; height: 16px;" class\x3d"'+this.toThemeProperty("jqx-tabs-arrow-right")+'"\x3e\x3c/span\x3e\x3c/div\x3e');this._leftArrow.addClass(this.toThemeProperty("jqx-tabs-arrow-background"));this._rightArrow.addClass(this.toThemeProperty("jqx-tabs-arrow-background"));this._leftArrow.addClass(this.toThemeProperty("jqx-widget-header"));this._rightArrow.addClass(this.toThemeProperty("jqx-widget-header"));this._headerWrapper.append(this._leftArrow);this._headerWrapper.append(this._rightArrow);this._leftArrow.width(this.arrowButtonSize);this._leftArrow.height("100%");this._rightArrow.width(this.arrowButtonSize);this._rightArrow.height("100%");this._leftArrow.css({"z-index":"30"});this._rightArrow.css({"z-index":"30"});this._leftArrow.css("display","none");this._rightArrow.css("display","none")},_tabsWithVisibleCloseButtons:function(){if(!this.showCloseButtons)return 0;var a=this.length();e.each(this._titleList,function(){var b=this.attr("hasclosebutton");void 0!=b&&null!=b&&("false"!=b&&0!=b||a--)});return a},_calculateTitlesSize:function(){var a=0,b=0,c=this.length();this.rtl&&e.jqx.browser.msie&&8>e.jqx.browser.version&&(this._measureItem=e("\x3cspan style\x3d'position: relative; visibility: hidden;'\x3e\x3c/span\x3e"),e(document.body).append(this._measureItem));for(;c;){c--;this._measureItem&&(this._measureItem.html(this._titleList[c].html()),this._titleList[c].width(this._measureItem.width()));this._titleList[c].css("position","static");this._titleList[c].find(this.toThemeProperty(".jqx-tabs-close-button",!0)).css("display","none");b+=parseInt(this._titleList[c].outerWidth(!0));a=parseInt(this._headerWrapper[0].offsetWidth)&&this.scrollable?(this._needScroll=!0,0===this._unorderedList.position().left&&(this._unorderedListLeftBackup=this._getArrowsDisplacement()+"px"),this._leftArrow.css("display","block"),this._rightArrow.css("display","block")):(this._needScroll=!1,this._leftArrow[0].style.display="none",this._rightArrow[0].style.display="none",this._unorderedList[0].style.left="0px")},_performHeaderLayout:function(){this._removeSelectStyle();var a=this._calculateTitlesSize(),b=a.height,a=a.width;this._headerWrapper.height(b);this._unorderedList.height(b);null!=this.headerHeight&&"auto"!=this.headerHeight&&(this._headerWrapper.height(this.headerHeight),this._unorderedList.height(this.headerHeight));a>this.host.width()?this._unorderedList.width(a):this._unorderedList.width(this.host.width());e.jqx.browser.msie&&8>e.jqx.browser.version&&(this._unorderedList.css("position","relative"),this._headerWrapper.css("overflow","hidden"));this._reorderHeaderElements();this._totalItemsWidth=a+=parseInt(this._unorderedList.css("margin-left"));this._positionArrows(a);this._unorderedList.css({position:"relative",top:"0px"});this._verticalAlignElements();this._moveSelectionTrack(this._selectedItem,0);this._addSelectStyle(this.selectedItem)},_verticalAlignElements:function(){var a=this.length();for(this._maxHeightTab();a;){a--;var b=this._titleList[a].find(".jqx-tabs-titleContentWrapper");b.height();var c=this._titleList[a].find(this.toThemeProperty(".jqx-tabs-close-button",!0));parseInt(this._titleList[a].css("padding-top"));if(this.autoHeight){var e=this._titleList[a].outerHeight(!0)-this._titleList[a].height(),e=parseInt(this._titleList[a].css("padding-top")),d=parseInt(this._titleList[a].css("padding-bottom")),g=parseInt(this._titleList[a].css("border-top-width")),h=parseInt(this._titleList[a].css("border-bottom-width"));this._titleList[a].height(this._unorderedList.outerHeight()-e-d-g-h)}else"top"===this.position?(e=parseInt(this._unorderedList.height())-parseInt(this._titleList[a].outerHeight(!0)),parseInt(this._titleList[a].css("margin-top"))!==e&&0!==e&&this._titleList[a].css("margin-top",e)):this._titleList[a].height(this._titleList[a].height());this._titleList[a].children(0).height("100%");e=parseInt(this._titleList[a].height());d=parseInt(e)/2-parseInt(c.height())/2;c.css("margin-top",1+d);c=parseInt(e)/2-parseInt(b.height())/2;b.css("margin-top",c)}this.scrollable&&(e=parseInt(this._headerWrapper.outerHeight())-this.arrowButtonSize,a=e/2,this._rightArrow.children(0).css("margin-top",a),this._rightArrow.height("100%"),this._leftArrow.height("100%"),this._leftArrow.children(0).css("margin-top",a))},_getImageUrl:function(a){a=a.css("background-image");a=a.replace('url("',"");a=a.replace('")',"");a=a.replace("url(","");return a=a.replace(")","")},_fitToSize:function(){var a=!1,b=!1;null!=this.width&&-1!=this.width.toString().indexOf("%")&&(a=!0);null!=this.height&&-1!=this.height.toString().indexOf("%")&&(b=!0);a&&(this.host[0].style.width=this.width,this._contentWrapper[0].style.width="100%");if(b){this.host[0].style.height=this.height;this._contentWrapper[0].style.width="100%";this._contentWrapper[0].style.height="auto";var c=this.element.offsetHeight-this._headerWrapper[0].offsetHeight;this._contentWrapper[0].style.height=c+"px"}a||(this.host.width(this.width),"auto"!=this.width&&this._contentWrapper.css("width","100%"));b||("auto"!==this.height?(this.host.height(this.height),c=this.host.height()-this._headerWrapper.outerHeight(),this._contentWrapper.height(c)):this._contentWrapper.css("height","auto"))},_maxHeightTab:function(){for(var a=this.length(),b=-1;a;)a--,-1=this._titleList[a].children(".jqx-tabs-titleWrapper").length){var b=e('\x3cdiv class\x3d"jqx-tabs-titleWrapper" style\x3d"outline: none; position: relative;"\x3e');b.append(this._titleList[a].html());this._titleList[a].empty();b.appendTo(this._titleList[a])}this._titleList[a].children(".jqx-tabs-titleWrapper").css("z-index","15")}},_render:function(){this._addCloseButtons();this._addHeaderWrappers();this._addContentWrapper();this.selectionTracker&&this._addSelectionTracker();this._addArrows()},_addCloseButton:function(a){if(0>=this._titleList[a].find(this.toThemeProperty(".jqx-tabs-close-button",!0)).length&&0>=this._titleList[a].find(".jqx-tabs-titleContentWrapper").length){var b=e('\x3cdiv class\x3d"jqx-tabs-titleContentWrapper"\x3e\x3c/div\x3e'),c="left";this.rtl&&(c="right");b.css("float",c);b.addClass("jqx-disableselect");b.append(this._titleList[a].html());this._titleList[a].html("");var f=e('\x3cdiv class\x3d"'+this.toThemeProperty("jqx-tabs-close-button")+'"\x3e\x3c/div\x3e');f.css({height:this.closeButtonSize,width:this.closeButtonSize,"float":c,"font-size":"1px"});this._titleList[a].append(b);this._titleList[a].append(f);this.showCloseButtons?this.hiddenCloseButtons&&1==this.hiddenCloseButtons[a]&&f.css("display","none"):f.css("display","none")}},_addCloseButtons:function(){for(var a=this.length();a;)a--,this._addCloseButton(a)},_prepareTabs:function(){var a=this.length(),b=this.selectionTracker;for(this.selectionTracker=!1;a;)a--,this._selectedItem!==a&&this._unselect(a,null,!1);this._select(this._selectedItem,0,null,!1);this.selectionTracker=b;!this.initTabContent||this._initTabContentList[this.selectedItem]||this._hiddenParent()||(this.initTabContent(this.selectedItem),this._initTabContentList[this.selectedItem]=!0)},_isValidIndex:function(a){return 0<=a&&athis._getArrowsDisplacement()&&this._unorderedList.css("left",this._getArrowsDisplacement());parseInt(this._unorderedList.width())<=parseInt(this._headerWrapper.width())&&(a=this.enableScrollAnimation?this.scrollAnimationDuration:0,this._lockAnimation("unorderedList"),this._unorderedList.animate({left:0},a,function(){b._unlockAnimation("unorderedList")}))}},removeFirst:function(){this.removeAt(0)},removeLast:function(){this.removeAt(this.length()-1)},disableAt:function(a){this._titleList[a].disabled&&void 0!==this._titleList[a].disabled||(this.selectedItem==a&&(this.next()||this.previous()),this._titleList[a].disabled=!0,this.removeHandler(this._titleList[a],this.toggleMode),this.enabledHover&&this._titleList[a].off("mouseenter").off("mouseleave"),this._removeEventListenerAt(a),this._titleList[a].addClass(this.toThemeProperty("jqx-tabs-title-disable")),this._titleList[a].addClass(this.toThemeProperty("jqx-fill-state-disabled")),this._raiseEvent(5,{item:a}))},enableAt:function(a){this._titleList[a].disabled&&(this._titleList[a].disabled=!1,this._addEventListenerAt(a),this._titleList[a].removeClass(this.toThemeProperty("jqx-tabs-title-disable")),this._titleList[a].removeClass(this.toThemeProperty("jqx-fill-state-disabled")),this._raiseEvent(4,{item:a}))},addAt:function(a,b,c){if(0<=a||a<=this.length())this._removeHoverStates(),b=e("\x3cli\x3e"+b+"\x3c/li\x3e"),c=e("\x3cdiv\x3e"+c+"\x3c/div\x3e"),b.addClass(this.toThemeProperty("jqx-tabs-title")),b.addClass(this.toThemeProperty("jqx-item")),c.addClass(this.toThemeProperty("jqx-tabs-content-element")),"bottom"==this.position&&b.addClass(this.toThemeProperty("jqx-tabs-title-bottom")),0==this._titleList.length?this._unorderedList.append(b):aa&&this._selectedItem++,this._switchTabs(a,this._selectedItem),this._selectedItem=a,this.showCloseButtons&&0h-this._getArrowsDisplacement())c=-c+d-g-(this.scrollable?2*this.arrowButtonSize-this._getArrowsDisplacement():0),d=d-g-this._getArrowsDisplacement();else return this._moveSelectionTrack(a,this.selectionTrackerAnimationDuration),!0;this._lockAnimation("unorderedList");this._unorderedList.animate({left:c},this.scrollAnimationDuration,function(){b._unlockAnimation("unorderedList");b._moveSelectionTrack(b._selectedItem,0);return!0});this._moveSelectionTrack(a,this.selectionTrackerAnimationDuration,d);return!0},isVisibleAt:function(a){if(void 0==a||-1==a||null==a)a=this.selectedItem;if(!this._isValidIndex(a))return!1;var b=parseInt(this._titleList[a].position().left)+parseInt(this._unorderedList.css("margin-left")),c=parseInt(this._unorderedList.css("left")),e=parseInt(this._headerWrapper.outerWidth(!0));a=parseInt(this._titleList[a].outerWidth(!0));c-=this._getArrowsDisplacement();e=e-this._getArrowsDisplacement()-c;return b<-c?!1:b+a>e?!1:!0},isDisabled:function(a){return this._titleList[a].disabled},_lockAnimation:function(a){this._isAnimated&&(this._isAnimated[a]=!0)},_unlockAnimation:function(a){this._isAnimated&&(this._isAnimated[a]=!1)},propertyChangedHandler:function(a,b,c,f){this._validateProperties();switch(b){case "touchMode":f&&(a.enabledHover=!1,a.keyboardNavigation=!1);break;case "width":case "height":a._performResize();return;case "disabled":f?this.disable():this.enable();return;case "showCloseButtons":f?this.showAllCloseButtons():this.hideAllCloseButtons();this._moveSelectionTrack(this._selectedItem,this.selectionTrackerAnimationDuration);return;case "selectedItem":this._isValidIndex(f)&&this.select(f);return;case "scrollStep":case "contentTransitionDuration":case "scrollAnimationDuration":case "enableScrollAnimation":return;case "selectionTracker":f?(this._refresh(),this.select(this._selectedItem)):null!=this._selectionTracker&&this._selectionTracker.remove();return;case "scrollable":f?(this._refresh(),this.select(this._selectedItem)):(this._leftArrow.remove(),this._rightArrow.remove(),this._performHeaderLayout());return;case "autoHeight":this._performHeaderLayout();return;case "theme":e.jqx.utilities.setTheme(c,f,this.host);return}this._unorderedList.css("left","0px");this._refresh();this.select(this._selectedItem);this._addSelectStyle(this._selectedItem,!0)}})})(jqxBaseFramework);(function(e){e.jqx.jqxWidget("jqxTextArea","",{});e.extend(e.jqx._jqxTextArea.prototype,{defineInstance:function(){var a={disabled:!1,filter:this._filter,sort:this._sort,highlight:this._highlight,dropDownWidth:null,renderer:this._renderer,opened:!1,$popup:e("\x3cul\x3e\x3c/ul\x3e"),source:[],roundedCorners:!0,searchMode:"default",placeHolder:"",width:null,height:null,rtl:!1,displayMember:"",valueMember:"",popupZIndex:2E4,items:8,item:'\x3cli\x3e\x3ca href\x3d"#"\x3e\x3c/a\x3e\x3c/li\x3e',minLength:1,maxLength:null,scrollBarSize:e.jqx.utilities.scrollBarSize,query:"",events:["change","select","open","close"]};e.extend(!0,this,a)},createInstance:function(){this.render();this.isInitialized=!0},render:function(){var a=this.element.id;if(!0===this.isInitialized)this.refresh();else{15!==e.jqx.utilities.scrollBarSize&&(this.scrollBarSize=e.jqx.utilities.scrollBarSize);var b=e('\x3cdiv id\x3d"panelWrapper'+a+'" style\x3d"overflow: hidden; width: 100%; height: 100%; background-color: transparent; -webkit-appearance: none; outline: none; align:left; border: 0px; padding: 0px; margin: 0px; left: 0px; top: 0px; valign:top; position: relative;"\x3e\x3c/div\x3e'),c=e('\x3cdiv id\x3d"verticalScrollBar'+a+'" style\x3d"align: left; valign: top; left: 0px; top: 0px; position: absolute;"\x3e\x3c/div\x3e');this._id=this.element.id;"div"===this.element.tagName.toLowerCase()?(this._baseHost=this.host,this.host.append(b),b.append('\x3ctextarea id\x3d"area'+a+'" class\x3d"'+this.toThemeProperty("jqx-text-area-element")+'"\x3e\x3c/textarea\x3e'),b.append(c)):"textarea"===this.element.tagName.toLowerCase()&&(this._baseHost=e(this.element),this._baseHost.wrap("\x3cdiv\x3e\x3c/div\x3e"),this._baseHost.wrap(b),this._baseHost.after(c),this.host=this._baseHost.parent().parent(),this.host[0].style.cssText=this.element.style.cssText,this.element.style.cssText="",this._baseHost.addClass(this.toThemeProperty("jqx-text-area-element")));a=this.host;this.wrapper=b;this.textarea=a.find("textarea");this._addClasses();if(!a.jqxButton)throw Error("jqxTextArea: Missing reference to jqxbuttons.js.");if(!a.jqxScrollBar)throw Error("jqxTextArea: Missing reference to jqxscrollbar.js.");null===this.width&&a[0].style&&null!==a[0].style.width&&(this.width=a[0].style.width);null===this.height&&a[0].style&&null!==a[0].style.height&&(this.height=a[0].style.height);this._setSize();""===e.trim(this.textarea.val())&&this.textarea.val("");this.textarea.attr("placeholder",this.placeHolder);null!==this.maxLength&&this.textarea.attr("maxlength",this.maxLength);e.jqx.browser.msie&&10>e.jqx.browser.version&&""===this.textarea.val()&&this.textarea.val(this.placeHolder);this.vScrollBar=c;c.jqxScrollBar({vertical:!0,width:15,height:"100%",max:this.height,theme:this.theme});if(this.source instanceof Array&&this.source.length||this.source._source||e.isFunction(this.source))this._oldsource=this.source,this._updateSource(),this._addPopupClasses(),e.jqx.aria(this,"aria-haspopup",!0);this._arrange();this._addHandlers()}},refresh:function(a){!0!==a&&(this._setSize(),this._arrange(),this._removeHandlers(),this._addHandlers(),!0===this.opened&&this.open())},_arrange:function(){var a=this.textarea,b=a[0].scrollHeight-a.height(),c=a[0].scrollHeight-a.height();0>c&&(c=0);this.vScrollBar.jqxScrollBar({max:c,value:a[0].scrollTop});5>b?(a.width(this.host.width()),this.vScrollBar.css("visibility","hidden")):(a.width(this.host.width()-this.scrollBarSize),this.vScrollBar.css("visibility","visible"),this._arrangeScrollbars(this.scrollBarSize))},val:function(a){var b=this.textarea,c=b.val();e.jqx.browser.msie&&10>e.jqx.browser.version&&c===this.placeHolder&&(c="");if(0===arguments.length||"object"===typeof a&&!0===e.isEmptyObject(a))return""!==this.displayMember&&""!==this.valueMember&&this.selectedItem?""===c?"":this.selectedItem:c;if(a&&a.label){if(this.selectedItem&&a.label===this.selectedItem.label&&a.value===this.selectedItem.value)return a.label;this.selectedItem={label:a.label,value:a.value};this.host.attr("data-value",a.value);this.host.attr("data-label",a.label);b.val(a.label);b=a.label}else{if(c===a)return a;b.val(a);this.host.attr("data-value",a);this.host.attr("data-label",a);b=a}this._arrange();this._raiseEvent("0");return b},focus:function(){this.textarea.focus()},selectAll:function(){var a=this.textarea;setTimeout(function(){if("selectionStart"in a[0])a[0].focus(),a[0].setSelectionRange(0,a[0].value.length);else{var b=a[0].createTextRange();b.collapse(!0);b.moveEnd("character",a[0].value.length);b.moveStart("character",0);b.select()}},10)},_arrangeScrollbars:function(a){var b=this.host.width(),c=this.host.height(),f=this.vScrollBar,d="hidden"!==f[0].style.visibility;f.width(a);f.height(parseInt(c,10)-2+"px");f.css({left:parseInt(b,10)-parseInt(a,10)-2-2+"px",top:"0px"});this.rtl?(f.css({left:"0px"}),a=d?parseInt(a,10)+"px":0,"rtl"!==this.textarea.children().css("direction")&&(b=!1,e.jqx.browser.msie&&8>e.jqx.browser.version&&(b=!0),b||this.textarea.css("padding-left",a))):"hidden"!==f.css("visibility")&&this.textarea.css("width",this.host.width()-this.vScrollBar.outerWidth());f.jqxScrollBar("refresh")},destroy:function(){this.opened&&this._removeItemHandlers();this.$popup.remove();this.vScrollBar.jqxScrollBar("destroy");this._removeHandlers();this.host.remove()},propertyChangedHandler:function(a,b,c,f){if(void 0!==a.isInitialized&&!1!==a.isInitialized&&f!==c)switch(b){case "theme":a.vScrollBar.jqxScrollBar({theme:a.theme});break;case "width":a.host.css("width",f);a._arrange();break;case "height":a.host.css("height",f);a._arrange();break;case "source":a._oldsource=f;a._updateSource();break;case "displayMember":case "valueMember":a.source=a._oldsource;a._updateSource();break;case "opened":!0===f?a.open():a.close();break;case "maxLength":a.textarea.attr("maxlength",f);break;case "placeHolder":a.textarea.attr("placeholder",f);e.jqx.browser.msie&&10>e.jqx.browser.version&&a.textarea.val()===c&&a.textarea.val(f);break;case "scrollBarSize":a._arrange();break;case "dropDownWidth":a.$popup.width(f);break;case "roundedCorners":!0===f?a.host.add(a.$popup).addClass(a.toThemeProperty("jqx-rc-all")):a.host.add(a.$popup).removeClass(a.toThemeProperty("jqx-rc-all"));break;case "disabled":a.vScrollBar.jqxScrollBar({disabled:f});!0===f?(a.host.addClass(a.toThemeProperty("jqx-fill-state-disabled")),a.textarea.attr("disabled","")):(a.host.removeClass(a.toThemeProperty("jqx-fill-state-disabled")),a.textarea.removeAttr("disabled"));e.jqx.aria(a,"aria-disabled",f);break;case "rtl":!0===f?a.textarea.addClass(a.toThemeProperty("jqx-text-area-element-rtl")):a.textarea.removeClass(a.toThemeProperty("jqx-text-area-element-rtl")),a._arrange()}},_raiseEvent:function(a,b){void 0===b&&(b={owner:null});var c=this.events[a];b.owner=this;var f=new e.Event(c);f.owner=this;f.args=b;f.preventDefault&&f.preventDefault();return("change"===c||"div"===this._baseHost[0].tagName.toLowerCase()?this.host:this._baseHost).trigger(f)},_addHandlers:function(){var a=this,b=a.element.id,c=a.host,f=a.textarea;e.jqx.utilities.resize(a._baseHost,function(){a._ttimer=setTimeout(function(){a._arrange()},100)},!1,!0);a.addHandler(c,(e.jqx.browser.mozilla?"wheel":"mousewheel")+".jqxTextArea"+b,function(b){a.wheel(b,a)});a.addHandler(c,"mouseenter.jqxTextArea"+b,function(){a.focused=!0});a.addHandler(c,"mouseleave.jqxTextArea"+b,function(){a.focused=!1});a.addHandler(c,"focus.jqxTextArea"+b,function(){a.focused=!0});a.addHandler(c,"blur.jqxTextArea"+b,function(){a.focused=!1});a.addHandler(a.wrapper,"scroll.jqxTextArea"+b,function(){0!==a.wrapper[0].scrollTop&&(a.wrapper[0].scrollTop=0);0!==a.wrapper[0].scrollLeft&&(a.wrapper[0].scrollLeft=0)});a.addHandler(f,"change.jqxTextArea"+b,function(b){b.stopPropagation();b.preventDefault();a._arrange();a._raiseEvent("0")});a.addHandler(f,"select.jqxTextArea"+b,function(a){a.stopPropagation();a.preventDefault()});a.addHandler(f,"scroll.jqxTextArea"+b,function(){a._arrange()});a.addHandler(f,"focus.jqxTextArea"+b,function(){a.host.addClass(a.toThemeProperty("jqx-fill-state-focus"));e.jqx.browser.msie&&10>e.jqx.browser.version&&a.textarea.val()===a.placeHolder&&a.textarea.val("")});a.addHandler(f,"blur.jqxTextArea"+b,function(){a.host.removeClass(a.toThemeProperty("jqx-fill-state-focus"));if(e.jqx.browser.msie&&10>e.jqx.browser.version){var b=a.textarea.val();""===b?a.textarea.val(a.placeHolder):null!==a.maxLength&&b.length>a.maxLength&&a.textarea.val(b.substr(0,a.maxLength))}});a.addHandler(f,"keydown.jqxTextArea"+b,function(b){a._suppressKeyPressRepeat=~e.inArray(b.keyCode,[40,38,9,13,27]);a._move(b)});a.addHandler(f,"keypress.jqxTextArea"+b,function(b){if(null!==a.maxLength&&e.jqx.browser.msie&&10>e.jqx.browser.version&&f.val().length>a.maxLength)return!1;a._suppressKeyPressRepeat||a._move(b)});a.addHandler(f,"keyup.jqxTextArea"+b,function(b){switch(b.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!a.opened)return;a._select();break;case 27:if(!a.opened)return;a.close();break;default:a.timer&&clearTimeout(a.timer),a.timer=setTimeout(function(){a._suggest()},300)}b.stopPropagation();b.preventDefault();a._arrange()});a.addHandler(a.vScrollBar,"valueChanged.jqxTextArea"+b,function(a){f.scrollTop(a.currentValue)});a.addHandler(a.$popup,"mousedown.jqxTextArea"+b,function(b){b.stopPropagation();b.preventDefault();a._select()})},_removeHandlers:function(){var a=this.element.id,b=this.host,c=this.textarea;e.jqx.utilities.resize(this._baseHost,null,!0);this.removeHandler(b,"mousewheel.jqxTextArea"+a);this.removeHandler(b,"mouseenter.jqxTextArea"+a);this.removeHandler(b,"mouseleave.jqxTextArea"+a);this.removeHandler(b,"focus.jqxTextArea"+a);this.removeHandler(b,"blur.jqxTextArea"+a);this.removeHandler(this.wrapper,"scroll.jqxTextArea"+a);this.removeHandler(c,"change.jqxTextArea"+a);this.removeHandler(c,"select.jqxTextArea"+a);this.removeHandler(c,"scroll.jqxTextArea"+a);this.removeHandler(c,"focus.jqxTextArea"+a);this.removeHandler(c,"blur.jqxTextArea"+a);this.removeHandler(c,"keydown.jqxTextArea"+a);this.removeHandler(c,"keypress.jqxTextArea"+a);this.removeHandler(c,"keyup.jqxTextArea"+a);this.removeHandler(this.vScrollBar,"valueChanged.jqxTextArea"+a);this.removeHandler(this.$popup,"mousedown.jqxTextArea"+a)},_addItemHandlers:function(){var a=this;a.addHandler(a.$popup.find("li"),"mouseenter.jqxTextArea"+a.element.id,function(b){a.$popup.find(".jqx-fill-state-pressed").removeClass(a.toThemeProperty("jqx-fill-state-pressed"));e(b.currentTarget).addClass(a.toThemeProperty("jqx-fill-state-pressed"))})},_removeItemHandlers:function(){this.removeHandler(this.$popup.find("li"),"mouseenter.jqxTextArea"+this.element.id)},wheel:function(a,b){var c=0;a.originalEvent&&e.jqx.browser.msie&&a.originalEvent.wheelDelta&&(c=a.originalEvent.wheelDelta/120);a||(a=window.event);a.wheelDelta?c=a.wheelDelta/120:a.detail?c=-a.detail/3:a.originalEvent.wheelDelta?c=a.originalEvent.wheelDelta/120:a.originalEvent.detail?c=-a.originalEvent.detail/3:a.originalEvent.deltaY&&(c=-a.originalEvent.deltaY/3);if(c)return(c=b._handleDelta(c))||a.preventDefault&&a.preventDefault(),c?!1:c;a.preventDefault&&a.preventDefault();a.returnValue=!1},_handleDelta:function(a){var b=this.vScrollBar.jqxScrollBar("getInstance");if(this.focused){var c=b.value;0>a?this.scrollDown():this.scrollUp();if(c!==b.value)return!1}return!0},scrollDown:function(){if("hidden"===this.vScrollBar.css("visibility"))return!1;var a=this.vScrollBar.jqxScrollBar("getInstance");a.setPosition(Math.min(a.value+a.largestep,a.max));this._arrange();return!0},scrollUp:function(){if("hidden"===this.vScrollBar.css("visibility"))return!1;var a=this.vScrollBar.jqxScrollBar("getInstance");a.setPosition(Math.max(a.value-a.largestep,a.min));this._arrange();return!0},_setSize:function(){this.host.css("width",this.width);this.host.css("height",this.height)},_addClasses:function(){this.host.addClass(this.toThemeProperty("jqx-panel"));this.host.addClass(this.toThemeProperty("jqx-widget"));this.host.addClass(this.toThemeProperty("jqx-widget-content"));this.host.addClass(this.toThemeProperty("jqx-text-area"));this.textarea.addClass(this.toThemeProperty("jqx-widget-content"));!0===this.roundedCorners&&this.host.addClass(this.toThemeProperty("jqx-rc-all"));!0===this.disabled?(this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled")),this.textarea.attr("disabled",""),e.jqx.aria(this,"aria-disabled",!0)):e.jqx.aria(this,"aria-disabled",!1);!0===this.rtl&&this.textarea.addClass(this.toThemeProperty("jqx-text-area-element-rtl"))},_addPopupClasses:function(){var a=this.$popup;a.addClass(this.toThemeProperty("jqx-popup"));e.jqx.browser.msie&&a.addClass(this.toThemeProperty("jqx-noshadow"));a.addClass(this.toThemeProperty("jqx-input-popup"));a.addClass(this.toThemeProperty("jqx-menu"));a.addClass(this.toThemeProperty("jqx-menu-vertical"));a.addClass(this.toThemeProperty("jqx-menu-dropdown"));a.addClass(this.toThemeProperty("jqx-widget"));a.addClass(this.toThemeProperty("jqx-widget-content"));this.roundedCorners&&a.addClass(this.toThemeProperty("jqx-rc-all"))},_updateSource:function(){var a=this,b=function(b){var c=[];return c=e.map(b,function(b){if(void 0===b)return null;if("string"===typeof b||b instanceof String)return{label:b,value:b};if("string"!==typeof b&&!1===b instanceof String){var c="",d="";""!==a.displayMember&&void 0!==a.displayMember&&b[a.displayMember]&&(c=b[a.displayMember]);""!==a.valueMember&&void 0!==a.valueMember&&(d=b[a.valueMember]);""===c&&(c=b.label);""===d&&(d=b.value);return{label:c,value:d}}return b})};if(a.source&&a.source._source){a.adapter=a.source;if(a.adapter._source.localdata)a.adapter.unbindBindingUpdate(a.element.id),a.adapter.bindBindingUpdate(a.element.id,function(){a.source=b(a.adapter.records)});else{var c={};a.adapter._options.data?e.extend(a.adapter._options.data,c):(a.source._source.data&&e.extend(c,a.source._source.data),a.adapter._options.data=c);a.adapter.unbindDownloadComplete(a.element.id);a.adapter.bindDownloadComplete(a.element.id,function(){a.source=b(a.adapter.records)})}a.source.dataBind()}else e.isFunction(a.source)||(a.source=b(a.source))},open:function(){if(!e.jqx.isHidden(this.host)){var a=e.extend({},this.host.coord(!0),{height:this.host[0].offsetHeight});if(0===this.$popup.parent().length){var b=this._id+"_popup";this.$popup[0].id=b;e.jqx.aria(this,"aria-owns",b)}this.$popup.appendTo(e(document.body)).css({position:"absolute",zIndex:this.popupZIndex,top:a.top+a.height,left:a.left}).show();var c=0,a=this.$popup.children();e.each(a,function(){c+=e(this).outerHeight(!0)-1});this.$popup.height(c);this.opened=!0;this._raiseEvent("2",{popup:this.$popup});e.jqx.aria(this,"aria-expanded",!0);this._addItemHandlers();return this}},close:function(){this._removeItemHandlers();this.$popup.hide();this.opened=!1;this._raiseEvent("3",{popup:this.$popup});e.jqx.aria(this,"aria-expanded",!1);return this},_suggest:function(){var a;this.query=this.textarea[0].value;return!this.query||this.query.lengthe.jqx.browser.version&&"string"===typeof a.width&&"%"===a.width.charAt(a.width.length-1)){var b=a.host.parent().width()*parseFloat(a.width.replace("%",""))/100,f=parseInt(a.host.css("border-left-width"),10)+parseInt(a.host.css("border-right-width"),10)+parseInt(a.host.css("padding-left"),10)+parseInt(a.host.css("padding-right"),10);a.host.css("width",b-f-1)}!0===a._isOpen&&(a._minimizePopup.hide(),a._isOpen=!1,a._raiseEvent("1"));a._minimize()});a.addHandler(e(document),"click.jqxToolbar"+b,function(){!0===a._isOpen&&a._openMinimizePopup()});a.addHandler(a._minimizeButton,"click.jqxToolbar"+b,function(b){b.stopPropagation();a._openMinimizePopup()});a.addHandler(e(".jqx-popup"),"click.jqxToolbar"+b,function(a){e(a.target).hasClass("jqx-window-content")||a.stopPropagation()})},_removeHandlers:function(){var a=this.element.id;this.removeHandler(e(document),"click.jqxToolbar"+a);this.removeHandler(this._minimizeButton,"click.jqxToolbar"+a);this.removeHandler(e(".jqx-popup"),"click.jqxToolbar"+a)},_setSize:function(){this.host.width(this.width);this.host.height(this.height);this.minWidth&&this.host.css("min-width",this.minWidth);this.maxWidth&&this.host.css("max-width",this.maxWidth)},_createTools:function(){var a=this,b=a.tools.split(" "),c=e.trim(a.tools.replace(/\|/g,"")),c=c.replace(/\s+/g," "),c=c.split(" ");a._toolWidgets=[];var f=0;e.each(c,function(d,e){c[d]!==b[d+f]&&f++;var h=d+f,l;a._toolWidgets[d-1]&&(l=a._toolWidgets[d-1].tool);h=a._initializeTool(d,b[h],l,b[h-1],b[h+1],a.initTools,!0);a._toolWidgets.push(h)});a._minimizePopup.css({display:"none",visibility:"visible"})},_initializeTool:function(a,b,c,f,d,g,h){var l,k;k=this._initializeWidget(b,l,k,c);l=k.tool;k=k.menuTool;c=!0;l.addClass(this.toThemeProperty("jqx-toolbar-tool"));!0===this.rtl&&l.addClass(this.toThemeProperty("jqx-toolbar-tool-rtl"));if(this.initTools){var m;m=!0===h?this.initTools(b,a,l,!1):g(b,l,!1);if(!m||!1!==m.minimizable&&!1!==m.menuTool)!0===h?this.initTools(b,a,k,!0):g(b,k,!0),k.addClass(this.toThemeProperty("jqx-toolbar-tool-minimized"));else{if("custom"!==b)k[this._toolToWidgetMapping[b]]("destroy");else k.remove();!1===m.minimizable&&(c=!1);k=!1}}a=!1;g=l;k&&(g=g.add(k),k.css("display","none"));var n;h=this.rtl?"rtl":"ltr";m=["button","toggleButton","repeatButton","linkButton"];var p={button:"jqxButton",toggleButton:"jqxToggleButton",repeatButton:"jqxRepeatButton",linkButton:"jqxRepeatButton"};"|"===d?(a=!0,g.addClass(this.toThemeProperty("jqx-toolbar-tool-separator-"+h)),k&&(n=e('\x3cdiv class\x3d"'+this.toThemeProperty("jqx-fill-state-pressed jqx-toolbar-minimized-popup-separator")+'"\x3e\x3c/div\x3e'),this._minimizePopup.append(n))):(-1===m.indexOf(b)||-1!==m.indexOf(b)&&-1===m.indexOf(d))&&g.addClass(this.toThemeProperty("jqx-toolbar-tool-no-separator-"+h));if(-1===m.indexOf(f)&&-1!==m.indexOf(b)&&-1!==m.indexOf(d))if(!1===this.rtl)g[p[b]]({roundedCorners:"left"});else g[p[b]]({roundedCorners:"right"}),g.css("border-left-width",0);else if(-1!==m.indexOf(f)&&-1!==m.indexOf(b)&&-1!==m.indexOf(d))g.addClass(this.toThemeProperty("jqx-toolbar-tool-inner-button")),g.css("border-left-width",0);else if(-1!==m.indexOf(f)&&-1!==m.indexOf(b)&&-1===m.indexOf(d))if(!1===this.rtl)g[p[b]]({roundedCorners:"right"}),g.css("border-left-width",0);else g[p[b]]({roundedCorners:"left"});e.jqx.browser.msie&&8>e.jqx.browser.version&&"combobox"===b&&g.find(".jqx-combobox-arrow-normal").width(18);return{type:b,tool:l,separatorAfterWidget:a,minimizable:c,minimized:!1,menuTool:k,menuSeparator:n}},_initializeWidget:function(a,b,c,f){function d(){c=b.clone();f?(f.after(b),g._minimizePopup.append(c)):(g.host.prepend(b),g._minimizePopup.prepend(c))}var g=this;if("custom"!==a&&void 0===g.host[g._toolToWidgetMapping[a]])throw a=g._toolToWidgetMapping[a].toLowerCase(),Error("jqxToolBar: Missing reference to "+a+".js");switch(a){case "button":case "toggleButton":b=e("\x3cbutton\x3e\x3c/button\x3e");d();b.add(c)[g._toolToWidgetMapping[a]]({theme:g.theme,height:g.host.height(),disabled:g.disabled,rtl:g.rtl});break;case "dropdownlist":case "combobox":b=e("\x3cdiv\x3e\x3c/div\x3e");d();b.add(c)[g._toolToWidgetMapping[a]]({theme:g.theme,autoDropDownHeight:!0,height:g.host.height()-2,disabled:g.disabled,rtl:g.rtl});break;case "input":b=e('\x3cinput type\x3d"text" /\x3e');d();b.add(c).jqxInput({theme:g.theme,height:g.host.height()-2,disabled:g.disabled,rtl:g.rtl});break;case "custom":b=e("\x3cdiv\x3e\x3c/div\x3e"),d()}return{tool:b,menuTool:c}},_appendMinimizeButton:function(){this._minimizedTools=0;this._minimizeButton=e('\x3cdiv class\x3d"'+this.toThemeProperty("jqx-menu-minimized-button jqx-toolbar-minimized-button")+'"\x3e\x3c/div\x3e');this._minimizePopup=e('\x3cdiv id\x3d"'+this.element.id+'Popup" class\x3d"'+this.toThemeProperty("jqx-popup jqx-fill-state-normal jqx-rc-b jqx-toolbar-minimized-popup")+'"\x3e\x3c/div\x3e');!0===this.rtl&&(this._minimizeButton.addClass(this.toThemeProperty("jqx-toolbar-minimized-button-rtl")),this._minimizePopup.addClass(this.toThemeProperty("jqx-toolbar-minimized-popup-rtl")));this.host.append(this._minimizeButton);e("body").append(this._minimizePopup);this._isOpen=!1;this._minimizePopup.width(this.minimizeWidth)},_openMinimizePopup:function(){if(!1===this._isOpen){var a=this.host.offset(),b=a.left;!1===this.rtl&&(b+=this.host.outerWidth()-this._minimizePopup.outerWidth());a=a.top+this.host.outerHeight()-1;this._minimizePopup.css({left:b,top:a});this._minimizePopup.slideDown("fast");this._isOpen=!0;this._raiseEvent("0")}else this._minimizePopup.slideUp("fast"),this._isOpen=!1,this._raiseEvent("1")},_minimize:function(){var a=0;0a)){for(var b=0,c,e=0;ea?(this._minimizeTool(!0),this._minimize()):void 0!==c&&b+cthis._indexOf(this.host,c)&&c.push(this.host),e.data(document.body,"jqxwindows-list",c),1parseInt(this.closeButtonSize))throw Error(this._invalidArgumentExceptions.invalidCloseButtonSize);if(isNaN(this.collapseButtonSize)||0>parseInt(this.collapseButtonSize))throw Error(this._invalidArgumentExceptions.invalidCollapseButtonSize);}catch(a){alert(a)}},_validateModalProperties:function(){if(0>this.modalOpacity||1this.maxHeight&&(this.height=this.maxHeight);this.width>this.maxWidth&&(this.width=this.maxWidth);null!==this.dragArea&&this.dragArea&&(null!==this.dragArea.height&&this.host.height()>this.dragArea.height||parseInt(this.height,10))},_validateSizeLimits:function(){null==this.maxHeight&&(this.maxHeight=9999);null==this.minWidth&&(this.minWidth=0);null==this.maxWidth&&(this.maxWidth=9999);null==this.minHeight&&(this.minHeight=0);if(isNaN(parseInt(this.minHeight)))throw Error(this._invalidArgumentExceptions.invalidMinHeight);if(isNaN(parseInt(this.maxHeight)))throw Error(this._invalidArgumentExceptions.invalidMaxHeight);if(isNaN(parseInt(this.minWidth)))throw Error(this._invalidArgumentExceptions.invalidMinWidth);if(isNaN(parseInt(this.maxWidth)))throw Error(this._invalidArgumentExceptions.invalidMaxWidth);if(this.minHeight>this.maxHeight)throw Error(this._invalidArgumentExceptions.invalidMinHeight);if(this.minWidth>this.maxWidth)throw Error(this._invalidArgumentExceptions.invalidMinWidth);},_validateAnimationProperties:function(){if("fade"!==this.animationType&&"slide"!==this.animationType&&"combined"!==this.animationType&&"none"!==this.animationType)throw Error(this._invalidArgumentExceptions.invalidAnimationType);if(isNaN(parseInt(this.closeAnimationDuration),10)||0>this.closeAnimationDuration)throw Error(this._invalidArgumentExceptions.invalidCloseAnimationDuration);if(isNaN(parseInt(this.showAnimationDuration),10)||0>this.showAnimationDuration)throw Error(this._invalidArgumentExceptions.invalidShowAnimationDuration);},_validateInteractionProperties:function(){if(0>parseInt(this.keyCode,10)||130this._modalBackground.length)){var a=e.data(document.body,"jqxwindows-list");a&&(this._removeFromArray(this.host,a),e.data(document.body,"jqxwindows-list",a));this._modalBackground=e("\x3cdiv\x3e\x3c/div\x3e");this._modalBackground.addClass(this.toThemeProperty("jqx-window-modal"));this._setModalBackgroundStyles();e(document.body).append(this._modalBackground);this.addHandler(this._modalBackground,this._getEvent("click"),function(){return!1});var c=this;this.addHandler(this._modalBackground,"mouseup",function(a){c._stopResizing(c);a.preventDefault()});this.addHandler(this._modalBackground,"mousedown",function(a){var b=c._getTabbables();0this.minWidth&&(this.minWidth=Math.min(c+e,100),a=!1);return a},_centerElement:function(a,c,e,d){"number"===typeof c.left&&"number"===typeof c.top&&"number"===typeof c.height&&"number"===typeof c.width?this._centerElementInArea(a,c,e):this._centerElementInParent(a,c,e,d)},_centerElementInParent:function(a,c,e,d){e=e.toLowerCase();d=d?d+"-":"";if(0<=e.indexOf("y")){var g=a.outerHeight(!0),h=c.height();a.css(d+"top",Math.max(0,h-g)/2+"px")}0<=e.indexOf("x")&&(e=a.outerWidth(!0),c=c.width(),a.css(d+"left",Math.max(0,c-e)/2+"px"))},_centerElementInArea:function(a,c,e){e=e.toLowerCase();if(0<=e.indexOf("y")){var d=a.outerHeight(!0);a.css("top",(c.height-d)/2+c.top+"px")}0<=e.indexOf("x")&&(e=a.outerWidth(!0),a.css("left",(c.width-e)/2+c.left+"px"))},_removeEventHandlers:function(){this.removeHandler(this._header,this._getEvent("mousedown"));this.removeHandler(this._header,this._getEvent("mousemove"));this.removeHandler(this._header,"focus");this.removeHandler(e(document),this._getEvent("mousemove")+"."+this.host.attr("id"));this.removeHandler(e(document),this._getEvent("mouseup")+"."+this.host.attr("id"));this.removeHandler(this.host,"keydown");this.removeHandler(this._closeButton,this._getEvent("click"));this.removeHandler(this._closeButton,this._getEvent("mouseenter"));this.removeHandler(this._closeButton,this._getEvent("mouseleave"));this.removeHandler(this._collapseButton,this._getEvent("click"));this.removeHandler(this._collapseButton,this._getEvent("mouseenter"));this.removeHandler(this._collapseButton,this._getEvent("mouseleave"));this.removeHandler(this.host,this._getEvent("mousedown"));this.removeHandler(e(this.okButton),this._getEvent("click"),this._setDialogResultHandler);this.removeHandler(e(this.cancelButton),this._getEvent("click"),this._setDialogResultHandler);this.removeHandler(this._header,this._getEvent("mouseenter"));this.removeHandler(this._header,this._getEvent("mouseleave"));this.removeHandler(this.host,"resizing",this._windowResizeHandler)},_removeFromArray:function(a,c){return 0<=this._indexOf(a,c)?c.splice(this._indexOf(a,c),1):c},_sortByStyle:function(a,c){for(var e=0;ee;d--){var g=c[d],h=c[d-1];parseInt(g.css(a),10)e.jqx.browser.version,c=a?4:0,f=c;document.body.scrollHeight>document.body.clientHeight&&a&&(c=this._SCROLL_WIDTH);document.body.scrollWidth>document.body.clientWidth&&a&&(f=this._SCROLL_WIDTH);return{width:e(document).width()-c,height:e(document).height()-f}},_closeButtonHover:function(){var a=this;this.addHandler(this._closeButton,this._getEvent("mouseenter"),function(){a._closeButton.addClass(a.toThemeProperty("jqx-window-close-button-hover"))});this.addHandler(this._closeButton,this._getEvent("mouseleave"),function(){a._closeButton.removeClass(a.toThemeProperty("jqx-window-close-button-hover"))})},_collapseButtonHover:function(){var a=this;this.addHandler(this._collapseButton,this._getEvent("mouseenter"),function(){a._collapseButton.addClass(a.toThemeProperty("jqx-window-collapse-button-hover"))});this.addHandler(this._collapseButton,this._getEvent("mouseleave"),function(){a._collapseButton.removeClass(a.toThemeProperty("jqx-window-collapse-button-hover"))})},_setModalBackgroundStyles:function(){this.isModal&&(this._modalBackground.fadeTo(0,this.modalOpacity),this._modalBackground.css({position:"absolute",top:"0px",left:"0px",width:this._getDocumentSize().width,height:this._getDocumentSize().height,"z-index":this.modalBackgroundZIndex}),this.autoOpen||this._modalBackground.css("display","none"))},_addFocusHandlers:function(){var a=this;this.addHandler(this.host,this._getEvent("mousedown"),function(){a.isModal||a.bringToFront()})},_indexOf:function(a,c){for(var e=0;ea._mousePosition.x||f+3a._mousePosition.y)a._isDragging=!0,a._mousePosition={x:d,y:f},a._windowPosition={x:a.host.coord().left,y:a.host.coord().top},e(document.body).addClass(a.toThemeProperty("jqx-disableselect"));return a._isTouchDevice?(c.preventDefault(),!0):!1}return a._isDragging?a._isTouchDevice?(c.preventDefault(),!0):!1:!0},_dropHandler:function(a,c){var f=!0;if(a._isDragging&&!a.isResizing&&!a._resizeDirection){var f=parseInt(a.host.css("left"),10),d=parseInt(a.host.css("top"),10),g=a._isTouchDevice?0:c.pageX,h=a._isTouchDevice?0:c.pageY;a.enableResize=a._enableResizeBackup;a._enableResizeBackup="undefined";a._raiseEvent(3,f,d,g,h);f=!1;"undefined"!=c.preventDefault&&c.preventDefault();null!=c.originalEvent&&(c.originalEvent.mouseHandled=!0);"undefined"!=c.stopPropagation&&c.stopPropagation()}a._isDragging=!1;a._mouseDown=!1;e(document.body).removeClass(a.toThemeProperty("jqx-disableselect"));return f},_dragHandler:function(a,c){if(a._isDragging&&!a.isResizing&&!a._resizeDirection){var f=a._isTouchDevice?c.originalEvent.which:c.which;"undefined"===typeof a._enableResizeBackup&&(a._enableResizeBackup=a.enableResize);a.enableResize=!1;if(0===f&&e.jqx.browser.msie&&8>e.jqx.browser.version)return a._dropHandler(a,c);e.jqx.mobile.getTouches(c);f=e.jqx.position(c);a.move(a._windowPosition.x+(f.left-a._mousePosition.x),a._windowPosition.y+(f.top-a._mousePosition.y),c);c.preventDefault();return!1}return!0},_validateCoordinates:function(a,c,e,d){var g=this._getDraggingArea();a=a=g.width+g.left-2*d&&(a=g.width+g.left-h-d);c+l>=g.height+g.top-e&&(c=g.height+g.top-l-e);return{x:a,y:c}},_performLayout:function(){this._performHeaderLayout();this._performWidgetLayout()},_parseDragAreaAttributes:function(){null!==this.dragArea&&(this.dragArea.height=parseInt(this.dragArea.height,10),this.dragArea.width=parseInt(this.dragArea.width,10),this.dragArea.top=parseInt(this.dragArea.top,10),this.dragArea.left=parseInt(this.dragArea.left,10))},_positionWindow:function(){this._parseDragAreaAttributes();if(this.position instanceof Array&&2===this.position.length&&"number"===typeof this.position[0]&&"number"===typeof this.position[1])this.host.css({left:this.position[0],top:this.position[1]});else if(this.position instanceof Object)if(this.position.left)this.host.offset(this.position);else if(void 0!==this.position.x&&void 0!=this.position.y)this.host.css({left:this.position.x,top:this.position.y});else{if(this.position.center){this._centerElement(this.host,this.position.center,"xy");var a=this.position.center.coord(),c=parseInt(this.host.css("left")),e=parseInt(this.host.css("top"));this.host.css({left:c+a.left,top:e+a.top})}}else this._positionFromLiteral()},_getDraggingArea:function(){var a={};a.left=this.dragArea&&this.dragArea.left?this.dragArea.left:0;a.top=this.dragArea&&this.dragArea.top?this.dragArea.top:0;a.width=this.dragArea&&this.dragArea.width?this.dragArea.width:this._getDocumentSize().width;a.height=this.dragArea&&this.dragArea.height?this.dragArea.height:this._getDocumentSize().height;return a},_positionFromLiteral:function(){this.position instanceof Array||(this.position=this.position.split(","));for(var a=this.position.length,c=this._getDraggingArea();a;)switch(--a,this.position[a]=this.position[a].replace(/ /g,""),this.position[a]){case "top":this.host.css("top",c.top);break;case "left":this.host.css("left",c.left);break;case "bottom":this.host.css("top",c.height-this.host.height()+c.top);break;case "right":this.host.css("left",c.left+c.width-this.host.width());break;default:this.dragArea||(c=e(window)),this._centerElement(this.host,c,"xy")}},_raiseEvent:function(a,c,f,d,g){var h=this._events[a],l=e.Event(h),k={};if(2===a||3===a)k.x=c,k.y=f,k.pageX=d,k.pageY=g;if("closed"===h||"close"===h)k.dialogResult=this.dialogResult;l.args=k;return this.host.trigger(l)},destroy:function(){this.removeHandler(e(window),"resize.window"+this.element.id);this._removeEventHandlers();this._destroy()},_destroy:function(){this.restricter&&(this.removeHandler(e(window),"resize."+this.element.id),this.removeHandler(e(window),"orientationchanged."+this.element.id),this.removeHandler(e(window),"orientationchange."+this.element.id));this.host.remove();null!==this._modalBackground&&this._modalBackground.remove()},_toClose:function(a,c){return a&&c[0]===this.element||c[0]!==this.element&&"object"===typeof c[0]},propertyChangedHandler:function(a,c,f,d){this._validateProperties();switch(c){case "rtl":this._performLayout();break;case "dragArea":this._positionWindow();break;case "collapseButtonSize":this._performLayout();break;case "closeButtonSize":this._performLayout();break;case "isModal":this._refresh();this._fixWindowZIndex();break;case "keyboardCloseKey":this._removeEventHandlers();this._addEventHandlers();break;case "disabled":d?this.disable():(this.disabled=!0,this.enable());break;case "showCloseButton":case "showCollapseButton":this._performLayout();break;case "height":this._performLayout();break;case "width":this._performLayout();break;case "title":this.setTitle(d);this.title=d;break;case "content":this.setContent(d);break;case "draggable":this._removeEventHandlers();this._addEventHandlers();this._removeResize();this._initializeResize();break;case "resizable":(this.enableResize=d)?this._initializeResize():this._removeResize();break;case "position":this._positionWindow();break;case "modalOpacity":this._setModalBackgroundStyles();break;case "okButton":d?this._addDialogButtonsHandlers():this.removeHandler(this.okButton);break;case "cancelButton":d?this._addDialogButtonsHandlers():this.removeHandler(this.cancelButton);break;case "collapsed":d?f||(this.collapsed=!1,this.collapse(0)):f&&(this.collapsed=!0,this.expand(0));case "theme":e.jqx.utilities.setTheme(f,d,this.host);break;case "maxWidth":case "maxHeight":case "minWidth":case "minHeight":a._performLayout(),a._removeResize(),a._initializeResize()}},collapse:function(a){if(!this.collapsed&&!this.host.is(":animated")&&"none"!=this.host.css("display")){var c=this,f=this._header.outerHeight(!0),d=parseInt(this._header.css("border-bottom-width"),10),g=parseInt(this._header.css("margin-bottom"),10);a=isNaN(parseInt(a))?this.collapseAnimationDuration:a;isNaN(d)||(f-=2*d);isNaN(g)||(f+=g);this._heightBeforeCollapse=this.host.height();this._minHeightBeforeCollapse=this.host.css("min-height");this.host.css("min-height",f);this.host.animate({height:f},a,function(){c.collapsed=!0;c._collapseButton.addClass(c.toThemeProperty("jqx-window-collapse-button-collapsed"));c._collapseButton.addClass(c.toThemeProperty("jqx-icon-arrow-down"));c._content.css("display","none");c._raiseEvent(5);c._raiseEvent(9);e.jqx.aria(c,"aria-expanded",!1)})}},expand:function(a){if(this.collapsed&&!this.host.is(":animated")){var c=this;a=isNaN(parseInt(a))?this.collapseAnimationDuration:a;this.host.animate({height:this._heightBeforeCollapse},a,function(){c.collapsed=!1;c.host.css("min-height",c._minHeightBeforeCollapse);c._collapseButton.removeClass(c.toThemeProperty("jqx-window-collapse-button-collapsed"));c._collapseButton.removeClass(c.toThemeProperty("jqx-icon-arrow-down"));c._content.css("display","block");c._raiseEvent(6);c._performWidgetLayout();c._raiseEvent(9);e.jqx.aria(c,"aria-expanded",!0)})}},closeAll:function(a){a=!0;for(var c=e.data(document.body,"jqxwindows-list"),f=c.length,d=e.data(document.body,"jqxwindow-modal")||[];f;)--f,this._toClose(a,c[f])&&(c[f].jqxWindow("closeWindow","close"),c.splice(f,1));this._toClose(a,d)&&(d.jqxWindow("closeWindow","close"),e.data(document.body,"jqxwindow-modal",[]));e.data(document.body,"jqxwindows-list",c)},setTitle:function(a){e.jqx.utilities.html(this._headerContentWrapper,a);this.title=a;this._performLayout()},setContent:function(a){this._contentInitialized=!1;for(var c=this._content,f=!1;!f;)c.css("height","auto"),c.css("width","auto"),c.is(".jqx-window")?f=!0:c=c.parent();e.jqx.utilities.html(this._content,a);this._performLayout()},disable:function(){this.disabled=!0;this._removeEventHandlers();this._header.addClass(this.toThemeProperty("jqx-window-header-disabled"));this._closeButton.addClass(this.toThemeProperty("jqx-window-close-button-disabled"));this._collapseButton.addClass(this.toThemeProperty("jqx-window-collapse-button-disabled"));this._content.addClass(this.toThemeProperty("jqx-window-content-disabled"));this.host.addClass(this.toThemeProperty("jqx-window-disabled"));this.host.addClass(this.toThemeProperty("jqx-fill-state-disabled"));this._removeResize()},enable:function(){this.disabled&&(this._addEventHandlers(),this._header.removeClass(this.toThemeProperty("jqx-window-header-disabled")),this._content.removeClass(this.toThemeProperty("jqx-window-content-disabled")),this._closeButton.removeClass(this.toThemeProperty("jqx-window-close-button-disabled")),this._collapseButton.removeClass(this.toThemeProperty("jqx-window-collapse-button-disabled")),this.host.removeClass(this.toThemeProperty("jqx-window-disabled")),this.host.removeClass(this.toThemeProperty("jqx-fill-state-disabled")),this.disabled=!1,this._initializeResize())},isOpen:function(){return this._visible},closeWindow:function(a){var c=this;a="undefined"===typeof a?this.closeButtonAction:a;this.hide(function(){"close"===a&&c._destroy()})},bringToFront:function(){var a=e.data(document.body,"jqxwindows-list");if(this.isModal)e.data(document.body,"jqxwindows-modallist"),this._fixWindowZIndex("modal-hide"),this._fixWindowZIndex("modal-show");else{for(var c=parseInt(a[a.length-1].css("z-index"),10),f=this._indexOf(this.host,a),d=a.length-1;d>f;--d){var g=parseInt(a[d].css("z-index"),10)-1;a[d].css("z-index",g)}this.host.css("z-index",c);this._sortByStyle("z-index",a)}},hide:function(a,c,e){if(!this.closing||0!=this.closing()){c=c||this.closeAnimationDuration;switch(this.animationType){case "none":this.host.css("display","none");break;case "fade":this.host.fadeOut(c,function(){a instanceof Function&&a()});case "slide":this.host.slideUp(c,function(){a instanceof Function&&a()});case "combined":this.host.hide(c,function(){a instanceof Function&&a()})}this._visible=!1;this.isModal&&(this._modalBackground.hide(),this._fixWindowZIndex("modal-hide"));!0!==e&&(this._raiseEvent(1),this._raiseEvent(8))}},open:function(a,c){this.show(a,c)},close:function(a,c,e){this.hide(a,c,e)},show:function(a,c){this._setDialogResult("none");c=c||this.showAnimationDuration;switch(this.animationType){case "none":this.host.css("display","block");break;case "fade":this.host.fadeIn(c,function(){a instanceof Function&&a()});break;case "slide":this.host.slideDown(c,function(){a instanceof Function&&a()});break;case "combined":this.host.show(c,function(){a instanceof Function&&a()})}this.isModal&&(this._modalBackground.show(),this._fixWindowZIndex("modal-show"));var e=this;this._visible||(150e(document).width()&&!this.dragArea&&(h=this._SCROLL_WIDTH),e(window).height()document.documentElement.scrollWidth&&!this.dragArea&&(g=this._SCROLL_WIDTH));g=this._validateCoordinates(a,c,h,g);if(parseInt(this.host.css("left"),10)!==g.x||parseInt(this.host.css("top"),10)!==g.y)f&&(e.jqx.mobile.getTouches(f),f=e.jqx.position(f),l=f.left,k=f.top),void 0==l&&(l=a),void 0==k&&(k=c),!1!==d&&this._raiseEvent(2,g.x,g.y,l,k);this.element.style.left=g.x+"px";this.element.style.top=g.y+"px";this._moved=!0}})})(jqxBaseFramework);(function(e){var a=function(a){return{resizeConfig:function(){this.resizeTarget=null;this.resizeIndicatorSize=5;this.resizeTargetChildren=null;this.resizeArea=this.isResizing=!1;this.minWidth=1;this.maxWidth=100;this.minHeight=1;this.maxHeight=100;this.resizeParent=null;this.enableResize=!0;this._cursorBackup;this._resizeEvents=["resizing","resized","resize"];this._resizeMouseDown=!1;this._resizeCurrentMode=null;this._mouseResizePosition={};this._resizeMethods=null;this._SCROLL_WIDTH=21},_resizeExceptions:{invalidTarget:"Invalid target!",invalidMinHeight:"Invalid minimal height!",invalidMaxHeight:"Invalid maximum height!",invalidMinWidth:"Invalid minimum width!",invalidMaxWidth:"Invalid maximum width!",invalidIndicatorSize:"Invalid indicator size!",invalidSize:"Invalid size!"},removeResize:function(){if(this.resizeTarget){var c=a(this.resizeTarget.children(".jqx-resize"));c.detach();var e=c.children();this._removeResizeEventListeners();for(var d=0;dthis.minWidth?3*this.resizeIndicatorSize:this.minWidth;this.resizeTarget.maxHeight=this.maxHeight;this.resizeTarget.minHeight=3*this.resizeIndicatorSize>this.minHeight?3*this.resizeIndicatorSize:this.minHeight},_parseResizeParentProperties:function(){this.resizeParent&&(this.resizeParent.left=parseInt(this.resizeParent.left,10),this.resizeParent.top=parseInt(this.resizeParent.top,10),this.resizeParent.width=parseInt(this.resizeParent.width,10),this.resizeParent.height=parseInt(this.resizeParent.height,10))},_getChildren:function(c,e,d,g,h){this.resizeTargetChildren=a(h);this.resizeTargetChildren.toArray();for(c=this.resizeTargetChildren.length;c;)--c,this.resizeTargetChildren[c]=a(this.resizeTargetChildren[c])},_refreshResize:function(){this._renderResize();this._performResizeLayout();this._removeResizeEventListeners();this._addResizeEventHandlers()},_renderResize:function(){this.resizeTarget.wrapInner(a("\x3cdiv\x3e\x3c/div\x3e"));this._resizeWrapper=this.resizeTarget.children(0);this._resizeWrapper.addClass("jqx-resize");this._resizeWrapper.addClass("jqx-rc-all");this._resizeWrapper.css("z-index",8E3)},_performResizeLayout:function(){this._resizeWrapper.height(this.resizeTarget.height());this._resizeWrapper.width(this.resizeTarget.width())},_removeResizeEventListeners:function(){var c=this.resizeTarget.attr("id");this.removeHandler(this._resizeWrapper,"mousemove.resize"+c);this.removeHandler(this._resizeWrapper,"mousedown.resize"+c);this.removeHandler(a(document),"mousemove.resize"+c);this.removeHandler(a(document),"mouseup.resize"+c)},_addResizeEventHandlers:function(){var c=this.resizeTarget.attr("id"),e=this;this.addHandler(this._resizeWrapper,"mousemove.resize."+c,function(a){e._resizeCursorChangeHandler(e,a)});this.addHandler(this._resizeWrapper,"mousedown.resize."+c,function(a){e._resizeMouseDownHandler(e,a)});this.addHandler(a(document),"mousemove.resize."+c,function(a){return e._resizeHandler(e,a)});this.addHandler(a(document),"mouseup.resize."+c,function(a){e._stopResizing(e,a)});try{if(""!=document.referrer||window.frameElement)c=function(a){e._stopResizing(e,a)},window.top.document.addEventListener?window.top.document.addEventListener("mouseup",c,!1):window.top.document.attachEvent&&window.top.document.attachEvent("onmouseup",c)}catch(d){}},_stopResizing:function(a,b){a.enableResize&&(a.isResizing&&a._raiseResizeEvent(1),a._resizeMouseDown=!1,a.isResizing=!1,a._resizeDirection=null,a.resizeTarget&&a.resizeTarget.removeClass("jqx-disableselect"));"undefined"==a._cursorBackup&&(a._cursorBackup="default");a._resizeWrapper&&a._resizeWrapper.css("cursor",a._cursorBackup)},_resizeHandler:function(c,e){if(c.enableResize&&!c.collapsed)return c.isResizing&&c._resizeDirection?(0===e.which&&a.jqx.browser.msie&&9>a.jqx.browser.version&&c._stopResizing(e),c._performResize(e.pageX,e.pageY),!1):c._resizeCaptureCursor(e.pageX,e.pageY)},_resizeCaptureCursor:function(a,b){if(this._resizeMouseDown&&!this.isResizing&&this._resizeDirection&&(a+3this._mouseResizePosition.x||b+3this._mouseResizePosition.y))return this._changeCursor(a-parseInt(this.resizeTarget.css("left")),b-parseInt(this.resizeTarget.css("top"))),this._mouseResizePosition={x:a,y:b},this._prepareResizeMethods(this._resizeDirection),this._resizeBackupData(),this.isResizing=!0,this.resizeTarget.addClass("jqx-disableselect"),!1},_resizeBackupData:function(){this.resizeTarget.lastWidth=this.resizeTarget.width();this.resizeTarget.lastHeight=this.resizeTarget.height();this.resizeTarget.x=parseInt(this.resizeTarget.css("left"),10);this.resizeTarget.y=parseInt(this.resizeTarget.css("top"),10);this._resizeBackupChildrenSize()},_resizeBackupChildrenSize:function(){for(var a=this.resizeTargetChildren.length,b;a;)--a,b=this.resizeTargetChildren[a],this.resizeTargetChildren[a].lastWidth=b.width(),this.resizeTargetChildren[a].lastHeight=b.height()},_performResize:function(a,b){var d=a-this._mouseResizePosition.x,e=b-this._mouseResizePosition.y;this._resizeDirection&&this._resize(this.resizeTarget,d,e)},_resizeCursorChangeHandler:function(a,b){a.enableResize&&!a.collapsed&&(a.isResizing||a._changeCursor(b.pageX-parseInt(a.resizeTarget.css("left")),b.pageY-parseInt(a.resizeTarget.css("top"))))},_resizeMouseDownHandler:function(a,b){a.enableResize&&null!==a._resizeDirection&&(a._resizeMouseDown=!0,a._mouseResizePosition.x=b.pageX,a._mouseResizePosition.y=b.pageY,b.preventDefault())},_validateResizeProperties:function(){try{if(!this.resizeTarget||1!==this.resizeTarget.length)throw Error(this._resizeExceptions.invalidTarget);if(0>this.minHeight||isNaN(parseInt(this.minHeight)))throw Error(this._resizeExceptions.invalidMinHeight);if(0>=this.maxHeight||isNaN(parseInt(this.maxHeight)))throw Error(this._resizeExceptions.invalidMaxHeight);if(0>this.minWidth||isNaN(parseInt(this.minWidth)))throw Error(this._resizeExceptions.invalidMinWidth);if(0>this.maxWidth||isNaN(parseInt(this.maxWidth)))throw Error(this._resizeExceptions.invalidMaxWidth);if(0>this.resizeIndicatorSize||isNaN(parseInt(this.resizeIndicatorSize)))throw Error(this._resizeExceptions.invalidIndicatorSize);if(this.minHeight>this.maxHeight||this.minWidth>this.maxWidth)throw Error(this._resizeExceptions.invalidSize);}catch(a){alert(a)}},_changeCursor:function(a,b){this.isResizing||this._resizeMouseDown||(this.resizeArea=!0,a<=this.resizeIndicatorSize&&0<=a&&b<=this.resizeIndicatorSize&&0=this.resizeTarget.width()-this.resizeIndicatorSize?(this._resizeWrapper.css("cursor","ne-resize"),this._resizeDirection="topright"):b>=this.resizeTarget.height()-this.resizeIndicatorSize&&b=this.resizeTarget.height()-this.resizeIndicatorSize&&b=this.resizeTarget.width()-this.resizeIndicatorSize&&a=this.resizeTarget.height()-this.resizeIndicatorSize&&b=this.resizeTarget.width()-this.resizeIndicatorSize&&aa(document).width()&&a.jqx.browser.msie&&h.height===a(document).height()&&(g=this._SCROLL_WIDTH);return"bottom"===d&&c+e.position().top+g+2>h.height+h.top?{fix:h.height-e.position().top-g-2+h.top,result:!1}:"top"===d&&e.lastHeight-c+e.ye.maxHeight?{fix:e.maxHeight,result:!1}:{result:!0,fix:c}},_validateWidth:function(c,e,d){var g=0,h=this._getParent();a(window).height()=document.documentElement.scrollWidth&&h.width===a(document).width()&&(g=this._SCROLL_WIDTH);return"right"===d&&c+e.position().left+g+2>h.width+h.left?{fix:h.width-e.position().left-g-2+h.left,result:!1}:"left"===d&&e.lastWidth-c+e.xe.maxWidth?{fix:e.maxWidth,result:!1}:{result:!0,fix:c}},_resize:function(a,b,d){for(var e=this._resizeMethods.length,h=0;h