@boldreports/javascript-reporting-controls 4.2.66 → 4.2.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/Content/bold.reportdesigner.core.bootstrap.compatibility.min.css +1 -1
  2. package/Content/bold.reportdesigner.core.bootstrap.min.css +1 -1
  3. package/Content/bold.reportdesigner.core.bootstrap4.compatibility.min.css +1 -1
  4. package/Content/bold.reportdesigner.core.bootstrap4.min.css +1 -1
  5. package/Content/bold.reportdesigner.core.compatibility.min.css +1 -1
  6. package/Content/bold.reportdesigner.core.material.compatibility.min.css +1 -1
  7. package/Content/bold.reportdesigner.core.material.min.css +1 -1
  8. package/Content/bold.reportdesigner.core.min.css +1 -1
  9. package/Content/bold.reportdesigner.core.office-365.compatibility.min.css +1 -1
  10. package/Content/bold.reportdesigner.core.office-365.min.css +1 -1
  11. package/Content/bold.widgets.core.bootstrap.compatibility.min.css +1 -1
  12. package/Content/bold.widgets.core.bootstrap.min.css +1 -1
  13. package/Content/bold.widgets.core.bootstrap4.compatibility.min.css +1 -1
  14. package/Content/bold.widgets.core.bootstrap4.min.css +1 -1
  15. package/Content/bold.widgets.core.compatibility.min.css +1 -1
  16. package/Content/bold.widgets.core.material.compatibility.min.css +1 -1
  17. package/Content/bold.widgets.core.material.min.css +1 -1
  18. package/Content/bold.widgets.core.min.css +1 -1
  19. package/Content/bold.widgets.core.office-365.compatibility.min.css +1 -1
  20. package/Content/bold.widgets.core.office-365.min.css +1 -1
  21. package/Content/bootstrap-theme/bold.reportdesigner.theme.compatibility.min.css +1 -1
  22. package/Content/bootstrap-theme/bold.reportdesigner.theme.min.css +1 -1
  23. package/Content/bootstrap-theme/bold.theme.compatibility.min.css +1 -1
  24. package/Content/bootstrap-theme/bold.theme.min.css +1 -1
  25. package/Content/bootstrap4/bold.reportdesigner.theme.compatibility.min.css +1 -1
  26. package/Content/bootstrap4/bold.reportdesigner.theme.min.css +1 -1
  27. package/Content/bootstrap4/bold.theme.compatibility.min.css +1 -1
  28. package/Content/bootstrap4/bold.theme.min.css +1 -1
  29. package/Content/high-contrast-01/bold.reportdesigner.theme.compatibility.min.css +1 -1
  30. package/Content/high-contrast-01/bold.reportdesigner.theme.min.css +1 -1
  31. package/Content/high-contrast-01/bold.theme.compatibility.min.css +1 -1
  32. package/Content/high-contrast-01/bold.theme.min.css +1 -1
  33. package/Content/high-contrast-02/bold.reportdesigner.theme.compatibility.min.css +1 -1
  34. package/Content/high-contrast-02/bold.reportdesigner.theme.min.css +1 -1
  35. package/Content/high-contrast-02/bold.theme.compatibility.min.css +1 -1
  36. package/Content/high-contrast-02/bold.theme.min.css +1 -1
  37. package/Content/material/bold.reportdesigner.theme.compatibility.min.css +1 -1
  38. package/Content/material/bold.reportdesigner.theme.min.css +1 -1
  39. package/Content/material/bold.theme.compatibility.min.css +1 -1
  40. package/Content/material/bold.theme.min.css +1 -1
  41. package/Content/office-365/bold.reportdesigner.theme.compatibility.min.css +1 -1
  42. package/Content/office-365/bold.reportdesigner.theme.min.css +1 -1
  43. package/Content/office-365/bold.theme.compatibility.min.css +1 -1
  44. package/Content/office-365/bold.theme.min.css +1 -1
  45. package/Scripts/bold.report-designer.min.js +1 -1
  46. package/Scripts/bold.report-viewer.min.js +2 -2
  47. package/Scripts/common/bold.report-designer-widgets.min.js +1 -1
  48. package/Scripts/common/bold.reports.common.min.js +2 -2
  49. package/Scripts/common/bold.reports.react.min.js +1 -1
  50. package/Scripts/common/bold.reports.widgets.min.js +1 -1
  51. package/Scripts/common/ej.unobtrusive.min.js +1 -1
  52. package/Scripts/common/ej.webform.min.js +1 -1
  53. package/Scripts/common/ej.widget.angular.min.js +1 -1
  54. package/Scripts/common/ej.widget.ko.min.js +1 -1
  55. package/Scripts/data-visualization/ej.bulletgraph.min.js +1 -1
  56. package/Scripts/data-visualization/ej.chart.min.js +1 -1
  57. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
1
  /*!
2
2
  * filename: bold.reports.common.min.js
3
- * version : 4.2.66
3
+ * version : 4.2.68
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
8
8
  * applicable laws.
9
9
  */
10
- (function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n()})(function(){window.ej=window.Syncfusion=window.Syncfusion||{},function(n,t,i){"use strict";var e,u,f,o;t.version="13.3.0.8";t.consts={NamespaceJoin:"-"};t.TextAlign={Center:"center",Justify:"justify",Left:"left",Right:"right"};t.Orientation={Horizontal:"horizontal",Vertical:"vertical"};t.serverTimezoneOffset=0;t.parseDateInUTC=!1;t.persistStateVersion=null;t.locales=t.locales||[];Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(n,t){return n[t]!==i});Date.prototype.toISOString||function(){function n(n){var t=String(n);return t.length===1&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+n(this.getUTCMonth()+1)+"-"+n(this.getUTCDate())+"T"+n(this.getUTCHours())+":"+n(this.getUTCMinutes())+":"+n(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();String.format=function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace(new RegExp("\\{"+n+"\\}","gm"),arguments[n+1]);return t.replace(/\{[0-9]\}/g,"")};jQuery.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};t.defineClass=function(n,r,u,f){if(!n||!u)return i;for(var o=n.split("."),s=window,e=0;e<o.length-1;e++)t.isNullOrUndefined(s[o[e]])&&(s[o[e]]={}),s=s[o[e]];return(f||t.isNullOrUndefined(s[o[e]]))&&(r=typeof r=="function"?r:function(){},s[o[e]]=r,s[o[e]].prototype=u),s[o[e]]};t.util={getNameSpace:function(n){var i=n.toLowerCase().split(".");return i[0]==="ej"&&(i[0]="e"),i.join(t.consts.NamespaceJoin)},getObject:function(n,r){var u,e,f;if(!r||!n)return i;for(typeof n!="string"&&(n=JSON.stringify(n)),u=r,e=n.split("."),f=0;f<e.length;f++){if(t.util.isNullOrUndefined(u))break;u=u[e[f]]}return u},createObject:function(n,i,r){for(var o=n.split("."),s=r||window,u=s,e,h=o.length,f=0;f<h;f++)e=o[f],f+1==h?u[e]=i:t.isNullOrUndefined(u[e])&&(u[e]={}),u=u[e];return s},isNullOrUndefined:function(n){return n===i||n===null},exportAll:function(i,r){var h=[],o,u=[],c,l,a,f,v,p={action:i,method:"post","data-ajax":"false"},s=t.buildTag("form","",null,p),e,y;if(r.length!=0){for(e=0;e<r.length;e++)c=e,l=n("#"+r[e]),a=n("#"+r[e]).data(),o=a.ejWidgets,f=n(l).data(o[0]),u.push({id:f._id,locale:f.model.locale}),t.isNullOrUndefined(f)||(v=f._getExportModel(f.model),h.push({name:o[0],type:"hidden",value:f.stringify(v)}),y=t.buildTag("input","",null,h[c]),s.append(y));n("body").append(s);s.submit();setTimeout(function(){var r,f,i;if(u.length)for(i=0;i<u.length;i++)t.isNullOrUndefined(u[i].locale)||(r=n("#"+u[i].id).data(),o=r.ejWidgets,f=n("#"+u[i].id).data(o[0]),f.model.locale=u[i].locale)},0);s.remove()}return!0},print:function(i,r){var f=t.buildTag("div"),o=i.clone(),r,e,u;f.append(o);r||(r=window.open("","print","height=452,width=1024,tabbar=no"));r.document.write("<!DOCTYPE html>");e=n("head").find("link").add("style");t.browserInfo().name==="msie"?(u="",e.each(function(t,i){i.tagName=="LINK"&&n(i).attr("href",i.href);u+=i.outerHTML}),r.document.write("<html><head><\/head><body>"+u+f[0].innerHTML+"<\/body><\/html>")):(u="",r.document.write("<html><head>"),e.each(function(t,i){i.tagName=="LINK"&&n(i).attr("href",i.href);u+=i.outerHTML}),r.document.writeln(u+"<\/head><body>"),r.document.writeln(f[0].innerHTML+"<\/body><\/html>"));r.document.close();r.focus();setTimeout(function(){t.isNullOrUndefined(r.window)||(r.print(),setTimeout(function(){r.close()},1e3))},1e3)},ieClearRemover:function(t){var i=n(t).height();t.style.paddingTop=parseFloat(i/2)+"px";t.style.paddingBottom=parseFloat(i/2)+"px";t.style.height="1px";t.style.lineHeight="1px"},sendAjaxRequest:function(t){n.ajax({type:t.type,cache:t.cache,url:t.url,dataType:t.dataType,data:t.data,contentType:t.contentType,async:t.async,success:t.successHandler,error:t.errorHandler,beforeSend:t.beforeSendHandler,complete:t.completeHandler})},buildTag:function(t,r,u,f){var s=/^[a-z]*[0-9a-z]+/ig.exec(t)[0],e=/#([_a-z0-9-&@\/\\,+()$~%:*?<>{}\[\]]+\S)/ig.exec(t),o;return e=e?e[e.length-1].replace(/[&@\/\\,+()$~%.:*?<>{}\[\]]/g,""):i,o=/\.([a-z]+[-_0-9a-z ]+)/ig.exec(t),o=o?o[o.length-1]:i,n(document.createElement(s)).attr(e?{id:e}:{}).addClass(o||"").css(u||{}).attr(f||{}).html(r||"")},_preventDefaultException:function(n,t){if(n)for(var i in t)if(t[i].test(n[i]))return!0;return!1},getMaxZindex:function(){var t=1;return t=Math.max.apply(null,n.map(n("body *"),function(t){if(n(t).css("position")=="absolute"||n(t).css("position")=="fixed")return parseInt(n(t).css("z-index"))||1})),(t==i||t==null)&&(t=1),t},blockDefaultActions:function(n){n.cancelBubble=!0;n.returnValue=!1;n.preventDefault&&n.preventDefault();n.stopPropagation&&n.stopPropagation()},getDimension:function(t,i){var e,u=n(t).parents().andSelf().filter(":hidden"),r,f;return u&&(r={visibility:"hidden",display:"block"},f=[],u.each(function(){var t={};for(var n in r)t[n]=this.style[n],this.style[n]=r[n];f.push(t)}),e=/(outer)/g.test(i)?n(t)[i](!0):n(t)[i](),u.each(function(n){var i=f[n];for(var t in r)this.style[t]=i[t]})),e},transitionEndEvent:function(){return{"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"otransitionend",ms:"MSTransitionEnd"}[t.userAgent()]},animationEndEvent:function(){return{"":"animationend",webkit:"webkitAnimationEnd",Moz:"animationend",O:"webkitAnimationEnd",ms:"animationend"}[t.userAgent()]},startEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"touchstart":"mousedown"},endEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"touchend":"mouseup"},moveEvent:function(){return t.isTouchDevice()||n.support.hasPointer?n.support.hasPointer&&!t.isMobile()?"ejtouchmove":"touchmove":"mousemove"},cancelEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"touchcancel":"mousecancel"},tapEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"tap":"click"},tapHoldEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"taphold":"click"},isDevice:function(){return t.getBooleanVal(n("head"),"data-ej-forceset",!1)?t.getBooleanVal(n("head"),"data-ej-device",this._device()):this._device()},isPortrait:function(){var n=document.documentElement;return n&&n.clientWidth/n.clientHeight<1.1},isLowerResolution:function(){return window.innerWidth<=640&&t.isPortrait()&&t.isDevice()||window.innerWidth<=800&&!t.isDevice()||window.innerWidth<=800&&!t.isPortrait()&&t.isWindows()&&t.isDevice()||t.isMobile()},isIOSWebView:function(){return/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent)},isAndroidWebView:function(){return!(typeof Android=="undefined")},isWindowsWebView:function(){return location.href.indexOf("x-wmapp")!=-1},_device:function(){return/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|kindle|windows\sce|palm|smartphone|iemobile|mobile|pad|xoom|sch-i800|playbook/i.test(navigator.userAgent.toLowerCase())},isMobile:function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(navigator.userAgent.toLowerCase())&&/mobile/i.test(navigator.userAgent.toLowerCase())||t.getBooleanVal(n("head"),"data-ej-mobile",!1)===!0},isTablet:function(){return/ipad|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase())||t.getBooleanVal(n("head"),"data-ej-tablet",!1)===!0||!t.isMobile()&&t.isDevice()},isTouchDevice:function(){return("ontouchstart"in window||window.navigator.msPointerEnabled&&t.isMobile())&&this.isDevice()},getClearString:function(t){return n.trim(t.replace(/\s+/g," ").replace(/(\r\n|\n|\r)/gm,"").replace(new RegExp(">[\n\t ]+<","g"),"><"))},getBooleanVal:function(t,i,r){var u=n(t).attr(i);return u!=null?u.toLowerCase()=="true":r},_getSkewClass:function(n,t,i){var h=n.width(),c=n.height(),f=n.offset().left,e=n.offset().left+h,o=n.offset().top,s=n.offset().top+c,r=h*.3,u=c*.3;return t<f+r&&i<o+u?"e-m-skew-topleft":t>e-r&&i<o+u?"e-m-skew-topright":t>e-r&&i>s-u?"e-m-skew-bottomright":t<f+r&&i>s-u?"e-m-skew-bottomleft":t>f+r&&i<o+u&&t<e-r?"e-m-skew-top":t<f+r?"e-m-skew-left":t>e-r?"e-m-skew-right":i>s-u?"e-m-skew-bottom":"e-m-skew-center"},_removeSkewClass:function(t){n(t).removeClass("e-m-skew-top e-m-skew-bottom e-m-skew-left e-m-skew-right e-m-skew-topleft e-m-skew-topright e-m-skew-bottomleft e-m-skew-bottomright e-m-skew-center e-skew-top e-skew-bottom e-skew-left e-skew-right e-skew-topleft e-skew-topright e-skew-bottomleft e-skew-bottomright e-skew-center")},_getObjectKeys:function(n){var t,i=[];if(n=Object.prototype.toString.call(n)===Object.prototype.toString()?n:{},!Object.keys){for(t in n)n.hasOwnProperty(t)&&i.push(t);return i}if(Object.keys)return Object.keys(n)},_touchStartPoints:function(n,t){if(n){var i=n.touches?n.touches[0]:n;t._distX=0;t._distY=0;t._moved=!1;t._pointX=i.pageX;t._pointY=i.pageY}},_isTouchMoved:function(n,t){if(n){var i=n.touches?n.touches[0]:n,f=i.pageX-t._pointX,e=i.pageY-t._pointY,o=Date.now(),r,u;return t._pointX=i.pageX,t._pointY=i.pageY,t._distX+=f,t._distY+=e,r=Math.abs(t._distX),u=Math.abs(t._distY),!(r<5&&u<5)}},listenEvents:function(n,i,r,u,f,e){for(var o=0;o<n.length;o++)t.listenTouchEvent(n[o],i[o],r[o],u,f,e)},listenTouchEvent:function(i,r,u,f,e,o){for(var s,h=f?"removeEventListener":"addEventListener",a=f?"off":"on",l=n(i),c=0;c<l.length;c++){s=l[c];switch(r){case"touchstart":t._bindEvent(s,h,r,u,"mousedown","MSPointerDown","pointerdown",o);break;case"touchmove":t._bindEvent(s,h,r,u,"mousemove","MSPointerMove","pointermove",o);break;case"touchend":t._bindEvent(s,h,r,u,"mouseup","MSPointerUp","pointerup",o);break;case"touchcancel":t._bindEvent(s,h,r,u,"mousecancel","MSPointerCancel","pointercancel",o);break;case"tap":case"taphold":case"ejtouchmove":case"click":n(s)[a](r,u);break;default:t.browserInfo().name=="msie"&&t.browserInfo().version<9?e._on(n(s),r,u):s[h](r,u,!0)}}},_bindEvent:function(t,i,r,u,f,e,o){n.support.hasPointer?t[i](window.navigator.pointerEnabled?o:e,u,!0):t[i](r,u,!0)},_browser:function(){return/webkit/i.test(navigator.appVersion)?"webkit":/firefox/i.test(navigator.userAgent)?"Moz":/trident/i.test(navigator.userAgent)?"ms":"opera"in window?"O":""},styles:document.createElement("div").style,userAgent:function(){for(var i="webkitT,t,MozT,msT,OT".split(","),r,n=0,u=i.length;n<u;n++)if(r=i[n]+"ransform",r in t.styles)return i[n].substr(0,i[n].length-1);return!1},addPrefix:function(n){return t.userAgent()===""?n:(n=n.charAt(0).toUpperCase()+n.substr(1),t.userAgent()+n)},destroyWidgets:function(t){var i=n(t).find("[data-role *= ejm]");i.each(function(t,i){var r=n(i),u=r.data("ejWidgets");u&&r[u]("destroy")})},getAttrVal:function(t,i,r){var u=n(t).attr(i);return u!=null?u:r},getOffset:function(t){var i={},u=t.offset()||{left:0,top:0},r;return n.extend(!0,i,u),n("body").css("position")!="static"&&(r=n("body").offset(),i.left-=r.left,i.top-=r.top),i},getZindexPartial:function(i,r){var e,f,u;if(!t.isNullOrUndefined(i)&&i.length>0)return e=i.parents(),f=n("body").children(),!t.isNullOrUndefined(i)&&i.length>0&&f.splice(f.index(r),1),n(f).each(function(n,t){e.push(t)}),u=Math.max.apply(u,n.map(e,function(t){if(n(t).css("position")!="static")return parseInt(n(t).css("z-index"))||1})),!u||u<1e4?u=1e4:u+=1,u},isValidAttr:function(t,i){var t=n(t)[0],r;return typeof t[i]!="undefined"?!0:(r=!1,n.each(t,function(n){if(n.toLowerCase()==i.toLowerCase())return r=!0,!1}),r)}};n.extend(t,t.util);t.widgetBase={droppables:{"default":[]},resizables:{"default":[]},_renderEjTemplate:function(i,r,u,f,e){var o=null;if((typeof i=="object"||i.startsWith("#")||i.startsWith("."))&&(o=n(i).attr("type")),o){if(o=o.toLowerCase(),t.template[o])return t.template[o](this,i,r,u,f)}else if(!t.isNullOrUndefined(e))return t.template["text/x-"+e](this,i,r,u,f);return t.template.render(this,i,r,u,f)},destroy:function(){var u,r,f,i;if(!this._trigger("destroy")){this.model.enablePersistence&&(this.persistState(),n(window).off("unload",this._persistHandler));try{this._destroy()}catch(e){}for(u=this.element.data("ejWidgets")||[],i=0;i<u.length;i++)u[i]==this.pluginName&&u.splice(i,1);for(u.length||this.element.removeData("ejWidgets");this._events;){if(r=this._events.pop(),f=[],!r)break;for(i=0;i<r[1].length;i++)n.isPlainObject(r[1][i])||f.push(r[1][i]);n.fn.off.apply(r[0],f)}this._events=null;this.element.removeClass(t.util.getNameSpace(this.sfType)).removeClass("e-js").removeData(this.pluginName);this.element=null;this.model=null}},_on:function(i){this._events||(this._events=[]);for(var r=[].splice.call(arguments,1,arguments.length-1),u={},f=r.length;u&&typeof u!="function";)u=r[--f];return r[f]=t.proxy(r[f],this),this._events.push([i,r,u,r[f]]),n.fn.on.apply(i,r),this},_off:function(t,i,r,u){var e=this._events,s,h,o,f,c;if(!e||!e.length)return this;for(typeof r=="function"&&(s=u,u=r,r=s),h=i.match(/\S+/g)||[""],o=0;o<e.length;o++)if(f=e[o],c=f[0].length&&(!u||f[2]===u)&&(f[1][0]===i||h[0])&&(!r||f[1][1]===r)&&n.inArray(t[0],f[0])>-1,c){n.fn.off.apply(t,u?[i,r,f[3]]:[i,r]);e.splice(o,1);break}return this},_trigger:function(i,r){var f=null,e,u,o={},s;return(n.extend(o,r),i in this.model&&(f=this.model[i]),f&&(typeof f=="string"&&(f=t.util.getObject(f,window)),n.isFunction(f)&&(u=t.event(i,this.model,r),e=f.call(this,u),r&&n.extend(r,u),u.cancel||!t.isNullOrUndefined(e))))?e===!1||u.cancel:(s=Boolean(r),r=r||{},r.originalEventType=i,r.type=this.pluginName+i,u=n.Event(r.type,t.event(r.type,this.model,r)),this.element&&this.element.trigger(u),s&&n.extend(r,u),t.isOnWebForms&&u.cancel==!1&&this.model.serverEvents&&this.model.serverEvents.length&&t.raiseWebFormsServerEvents(i,r,o),u.cancel)},setModel:function(t,i){var r,f,o,u;if(!this._trigger("modelChange",{changes:t})){for(r in t){if(!i){if(this.model[r]===t[r]){delete t[r];continue}if(n.isPlainObject(t[r])&&(e(this.model[r],t[r]),n.isEmptyObject(t[r]))){delete t[r];continue}}if(this.dataTypes&&(f=this._isValidModelValue(r,this.dataTypes,t),f!==!0))throw"setModel - Invalid input for property :"+r+" - "+f;this.model.notifyOnEachPropertyChanges&&this.model[r]!==t[r]&&(o={oldValue:this.model[r],newValue:t[r]},t[r]=this._trigger(r+"Change",o)?this.model[r]:o.newValue)}n.isEmptyObject(t)||(this._setFirst?(u=t.dataSource,u&&delete t.dataSource,n.extend(!0,this.model,t),u&&(this.model.dataSource=u instanceof Array?u.slice():u,t.dataSource=this.model.dataSource),this._setModel&&this._setModel(t)):this._setModel&&this._setModel(t)===!1||n.extend(!0,this.model,t),"enablePersistence"in t&&this._setState(t.enablePersistence))}},option:function(r,u,f){if(!r)return this.model;if(n.isPlainObject(r))return this.setModel(r,f);if(typeof r=="string"){r=r.replace(/^model\./,"");var e=t.getObject(r,this.model);if(u===i&&!f)return e;if(r==="enablePersistence")return this._setState(u);if(f&&u===t.extensions.modelGUID)return this._setModel(t.createObject(r,t.getObject(r,this.model),{}));if(f||t.getObject(r,this.model)!==u)return this.setModel(t.createObject(r,u,{}),f)}return i},_isValidModelValue:function(n,t,i){var r=t[n],u=i[n],f,e,o;if(!r)return!0;if(typeof r=="string"){if(r=="enum"&&(i[n]=u?u.toString().toLowerCase():u,r="string"),r==="array"){if(Object.prototype.toString.call(u)==="[object Array]")return!0}else if(r==="data"||r==="parent"||typeof u===r)return!0;return"Expected type - "+r}if(u instanceof Array){for(e=0;e<u.length;e++)if(f=this._isValidModelValue(n,t,u[e]),f!==!0)return" ["+e+"] - "+f;return!0}for(o in u)if(f=this._isValidModelValue(o,r,u),f!==!0)return o+" : "+f;return!0},_returnFn:function(n,t){t.indexOf(".")!=-1?this._returnFn(n[t.split(".")[0]],t.split(".").slice(1).join(".")):n[t]=n[t].call(n.propName)},_removeCircularRef:function(n){function i(n,r,u){if(typeof n=="object"){if(Array.prototype.indexOf||(Array.prototype.indexOf=function(n){return jQuery.inArray(n,this)}),t.indexOf(n)>=0){delete u[r];return}t.push(n);for(var f in n)n.hasOwnProperty(f)&&i(n[f],f,n);t.pop();return}}var t=[];return i(n,"obj",null),n},stringify:function(n,i){for(var f,u=this.observables,r=0;r<u.length;r++)f=t.getObject(u[r],n),t.isNullOrUndefined(f)||typeof f!="function"||this._returnFn(n,u[r]);return i&&(n=this._removeCircularRef(n)),JSON.stringify(n)},_setState:function(i){if(i===!0){this._persistHandler=t.proxy(this.persistState,this);n(window).on("unload",this._persistHandler)}else this.deleteState(),n(window).off("unload",this._persistHandler)},_removeProp:function(n,i){t.isNullOrUndefined(n)||(i.indexOf(".")!=-1?this._removeProp(n[i.split(".")[0]],i.split(".").slice(1).join(".")):delete n[i])},persistState:function(){var n,i;if(this._ignoreOnPersist){for(n=r({},this.model),i=0;i<this._ignoreOnPersist.length;i++)this._removeProp(n,this._ignoreOnPersist[i]);n.ignoreOnPersist=this._ignoreOnPersist}else if(this._addToPersist){for(n={},i=0;i<this._addToPersist.length;i++)t.createObject(this._addToPersist[i],t.getObject(this._addToPersist[i],this.model),n);n.addToPersist=this._addToPersist}else n=r({},this.model);this._persistState&&(n.customPersists={},this._persistState(n.customPersists));window.localStorage?(t.isNullOrUndefined(t.persistStateVersion)||window.localStorage.getItem("persistKey")!=null||window.localStorage.setItem("persistKey",t.persistStateVersion),window.localStorage.setItem("$ej$"+this.pluginName+this._id,JSON.stringify(n))):document.cookie&&(t.isNullOrUndefined(t.persistStateVersion)||t.cookie.get("persistKey")!=null||t.cookie.set("persistKey",t.persistStateVersion),t.cookie.set("$ej$"+this.pluginName+this._id,n))},deleteState:function(){var n;window.localStorage?window.localStorage.removeItem("$ej$"+this.pluginName+this._id):document.cookie&&t.cookie.set("$ej$"+this.pluginName+this._id,n,new Date)},restoreState:function(i){var f=null,r,u,e;if(window.localStorage?f=window.localStorage.getItem("$ej$"+this.pluginName+this._id):document.cookie&&(f=t.cookie.get("$ej$"+this.pluginName+this._id)),f&&(r=JSON.parse(f),this._restoreState&&(this._restoreState(r.customPersists),delete r.customPersists),t.isNullOrUndefined(r)===!1&&(t.isNullOrUndefined(r.ignoreOnPersist)?t.isNullOrUndefined(r.addToPersist)||(this._addToPersist=r.addToPersist,delete r.addToPersist):(this._ignoreOnPersist=r.ignoreOnPersist,delete r.ignoreOnPersist))),t.isNullOrUndefined(r)||t.isNullOrUndefined(this._ignoreOnPersist))this.model=n.extend(!0,this.model,r);else{for(u=0,e=this._ignoreOnPersist.length;u<e;u++)this._ignoreOnPersist[u].indexOf(".")!==-1?t.createObject(this._ignoreOnPersist[u],t.getObject(this._ignoreOnPersist[u],this.model),r):r[this._ignoreOnPersist[u]]=this.model[this._ignoreOnPersist[u]];this.model=r}!i&&f&&this._setModel&&this._setModel(this.model)},ignoreOnPersist:function(n){var r=[],t,u;if(typeof n=="object"?r=n:typeof n=="string"&&r.push(n),this._addToPersist===i)for(this._ignoreOnPersist=this._ignoreOnPersist||[],t=0;t<r.length;t++)this._ignoreOnPersist.push(r[t]);else for(t=0;t<r.length;t++)u=this._addToPersist.indexOf(r[t]),this._addToPersist.splice(u,1)},addToPersist:function(t){var u=[],f,r;if(typeof t=="object"?u=t:typeof t=="string"&&u.push(t),this._addToPersist===i)for(this._ignoreOnPersist=this._ignoreOnPersist||[],r=0;r<u.length;r++)f=this._ignoreOnPersist.indexOf(u[r]),this._ignoreOnPersist.splice(f,1);else for(r=0;r<u.length;r++)n.inArray(u[r],this._addToPersist)===-1&&this._addToPersist.push(u[r])},formatting:function(i,r,u){var f,l,h,c,a,v,s,e,y;if(i=i.replace(/%280/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">"),u=t.preferredCulture(u)?u:"en-US",f=i,l=i.split("{0:"),a=i.split("}"),h=l[0],c=a[1],typeof r=="string"&&n.isNumeric(r)&&(r=Number(r)),i.indexOf("{0:")!=-1)return v=new RegExp("\\{0(:([^\\}]+))?\\}","gm"),s=v.exec(i),s!=null&&r!=null?h!=null&&c!=null?h+t.format(r,s[2],u)+c:t.format(r,s[2],u):r!=null?r:"";if(f.startsWith("{")&&!f.startsWith("{0:")){var o=f.split(""),r=(r||"")+"",p=r.split(""),w=/[0aA\*CN<>\?]/gm;for(e=0,y=0;e<o.length;e++)o[e]=w.test(o[e])?"{"+y+++"}":o[e];return String.format.apply(String,[o.join("")].concat(p)).replace("{","").replace("}","")}return this.data!=null&&this.data.Value==null?(n.each(this.data,function(n,t){f=f.replace(new RegExp("\\{"+n+"\\}","gm"),t)}),f):this.data.Value}};t.WidgetBase=function(){};e=function(t,i){var u,f,r;if(t instanceof Array)for(u=0,f=t.length;u<f;u++)r=t[u],r===i[r]&&delete i[r],n.isPlainObject(i[r])&&n.isPlainObject(r)&&e(r,i[r]);else for(r in t)t[r]===i[r]&&delete i[r],n.isPlainObject(i[r])&&n.isPlainObject(t[r])&&e(t[r],i[r])};t.widget=function(f,e,h){var a,l,v;if(typeof f=="object"){h=e;for(a in f)l=f[a],l instanceof Array&&(h._rootCSS=l[1],l=l[0]),t.widget(a,l,h),f[a]instanceof Array&&(h._rootCSS="");return}v=h._rootCSS||t.getNameSpace(e);h=t.defineClass(e,function(i,o){var y,p,w,b,c,tt,g,k,d,nt,l,a;if(this.sfType=e,this.pluginName=f,this.instance=s,t.isNullOrUndefined(this._setFirst)&&(this._setFirst=!0),this["ob.values"]={},n.extend(this,t.widgetBase),this.dataTypes)for(y in o)if(p=this._isValidModelValue(y,this.dataTypes,o),p!==!0)throw"setModel - Invalid input for property :"+y+" - "+p;for(w=i.data("ejWidgets")||[],w.push(f),i.data("ejWidgets",w),c=0;t.widget.observables&&this.observables&&c<this.observables.length;c++)b=t.getObject(this.observables[c],o),b&&t.createObject(this.observables[c],t.widget.observables.register(b,this.observables[c],this,i),o);if(this.element=i.jquery?i:n(i),this.model=r(!0,{},h.prototype.defaults,o),this.model.keyConfigs=r(this.keyConfigs),this.element.addClass(v+" e-js").data(f,this),this._id=i[0].id,this.model.enablePersistence){if(window.localStorage&&!t.isNullOrUndefined(t.persistStateVersion)&&window.localStorage.getItem("persistKey")!=t.persistStateVersion)for(c in window.localStorage)c.indexOf("$ej$")!=-1&&(window.localStorage.removeItem(c),window.localStorage.setItem("persistKey",t.persistStateVersion));else if(document.cookie&&!t.isNullOrUndefined(t.persistStateVersion)&&t.cookie.get("persistKey")!=t.persistStateVersion){g=document.cookie.split(/; */);for(k in g)k.indexOf("$ej$")!=-1&&(t.cookie.set(k.split("=")[0],tt,new Date),t.cookie.set("persistKey",t.persistStateVersion))}this._persistHandler=t.proxy(this.persistState,this);n(window).on("unload",this._persistHandler);this.restoreState(!0)}if(this._init(o),typeof this.model.keyConfigs=="object"&&!(this.model.keyConfigs instanceof Array)){d=!1;this.model.keyConfigs.focus&&this.element.attr("accesskey",this.model.keyConfigs.focus);for(nt in this.model.keyConfigs)if(nt!=="focus"){d=!0;break}d&&this._keyPressed&&(l=i,a="keydown",this.keySettings&&(l=this.keySettings.getElement?this.keySettings.getElement()||l:l,a=this.keySettings.event||a),this._on(l,a,function(n){if(this.model.keyConfigs){var t=u.getActionFromCode(this.model.keyConfigs,n.which,n.ctrlKey,n.shiftKey,n.altKey),i={code:n.which,ctrl:n.ctrlKey,alt:n.altKey,shift:n.shiftKey};t&&this._keyPressed(t,n.target,i,n)===!1&&n.preventDefault()}}))}this._trigger("create")},h);n.fn[f]=function(r){for(var w,p=r,u,y=0;y<this.length;y++){var s=n(this[y]),l=s.data(f),b=l&&s.hasClass(v),a=null;if(this.length>0&&n.isPlainObject(p)&&(r=t.copyObject({},p)),!b){h.prototype._requiresID!==!0||n(this[y]).attr("id")||s.attr("id",c("ejControl_"));r&&typeof r!="object"?o(f+": methods/properties can be accessed only after plugin creation"):(h.prototype.defaults&&!t.isNullOrUndefined(t.setCulture)&&"locale"in h.prototype.defaults&&f!="ejChart"&&(!r||"locale"in r?t.isNullOrUndefined(r)&&(r={},r.locale=t.setCulture().name):r.locale=t.setCulture().name),new h(s,r));continue}if(r)if(u=[].slice.call(arguments,1),this.length>0&&u[0]&&p==="option"&&n.isPlainObject(u[0])&&(u[0]=t.copyObject({},u[0])),n.isPlainObject(r))l.setModel(r);else if((r.indexOf("_")===0||t.isNullOrUndefined(a=t.getObject(r,l)))&&r.indexOf("model.")!==0)o(e+": function/property - "+r+" does not exist");else{if(!a||!n.isFunction(a)){if(arguments.length==1)return a;l.option(r,arguments[1]);continue}if(w=a.apply(l,u),w!==i)return w}}return f.indexOf("ejm")!=-1&&t.widget.registerInstance(s,f,e,h.prototype),this};t.widget.register(f,e,h.prototype);t.loadLocale(f)};t.loadLocale=function(i){for(var f=t.locales,r=0,u=f.length;r<u;r++)n.fn["Locale_"+f[r]](i)};n.extend(t.widget,function(){var n={},i=[],r=function(i,r,u){t.isNullOrUndefined(n[i])||o("ej.widget : The widget named "+i+" is trying to register twice.");n[i]={name:i,className:r,proto:u};t.widget.extensions&&t.widget.extensions.registerWidget(i)},u=function(n,t,r,u){i.push({element:n,pluginName:t,className:r,proto:u})};return{register:r,registerInstance:u,registeredWidgets:n,registeredInstances:i}}());t.widget.destroyAll=function(n){var u,r,t,i;if(n&&n.length)for(u=0;u<n.length;u++)if(r=n.eq(u).data(),t=r.ejWidgets,t&&t.length)for(i=0;i<t.length;i++)r[t[i]]&&r[t[i]].destroy&&r[t[i]].destroy()};t.cookie={get:function(n){var t=RegExp(n+"=([^;]+)").exec(document.cookie);return t&&t.length>1?t[1]:i},set:function(n,t,i){typeof t=="object"&&(t=JSON.stringify(t));t=escape(t)+(i==null?"":"; expires="+i.toUTCString());document.cookie=n+"="+t}};u={getActionFromCode:function(n,t,i,r,f){var s,o,e;i=i||!1;r=r||!1;f=f||!1;for(s in n)if(s!=="focus")for(o=u.getKeyObject(n[s]),e=0;e<o.length;e++)if(t===o[e].code&&i==o[e].isCtrl&&r==o[e].isShift&&f==o[e].isAlt)return s;return null},getKeyObject:function(t){for(var f,o,e,s={isCtrl:!1,isShift:!1,isAlt:!1},c=n.extend(!0,{},s),r=t.split(","),h=[],i=0;i<r.length;i++){if(f=null,r[i].indexOf("+")!=-1)for(o=r[i].split("+"),e=0;e<o.length;e++)f=u.getResult(n.trim(o[e]),s);else f=u.getResult(n.trim(r[i]),n.extend(!0,{},c));h.push(f)}return h},getResult:function(n,t){return n==="ctrl"?t.isCtrl=!0:n==="shift"?t.isShift=!0:n==="alt"?t.isAlt=!0:t.code=parseInt(n,10),t}};t.getScrollableParents=function(t){return n(t).parentsUntil("html").filter(function(){return n(this).css("overflow")!="visible"}).add(n(window))};t.browserInfo=function(){var i={},r=[],e={opera:/(opera|opr)(?:.*version|)[ \/]([\w.]+)/i,edge:/(edge)(?:.*version|)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,msie:/(msie|trident) ([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i},o,s,f,u;for(o in e)if(e.hasOwnProperty(o)&&(r=navigator.userAgent.match(e[o]),r)){if(i.name=r[1].toLowerCase()=="opr"?"opera":r[1].toLowerCase(),i.version=r[2],i.culture={},i.culture.name=i.culture.language=navigator.language||navigator.userLanguage,typeof t.globalize!="undefined"){for(s=t.preferredCulture().name,f=navigator.language||navigator.userLanguage?t.preferredCulture(navigator.language||navigator.userLanguage):t.preferredCulture("en-US"),u=0;navigator.languages&&u<navigator.languages.length;u++)if(f=t.preferredCulture(navigator.languages[u]),f.language==navigator.languages[u])break;t.preferredCulture(s);n.extend(!0,i.culture,f)}!navigator.userAgent.match(/Trident\/7\./)||(i.name="msie");break}return i.isMSPointerEnabled=i.name=="msie"&&i.version>9&&window.navigator.msPointerEnabled,i.pointerEnabled=window.navigator.pointerEnabled,i};t.eventType={mouseDown:"mousedown touchstart",mouseMove:"mousemove touchmove",mouseUp:"mouseup touchend",mouseLeave:"mouseleave touchcancel",click:"click touchend"};t.event=function(t,i,r){return n.extend(r||{},{type:t,model:i,cancel:!1})};t.proxy=function(n,t,i){return!n||typeof n!="function"?null:"on"in n&&t?i?n.on(t,i):n.on(t):function(){var r=i?[i]:[];return r.push.apply(r,arguments),n.apply(t||this,r)}};t.hasStyle=function(n){var r=document.documentElement.style,i,t;if(n in r)return!0;for(i=["ms","Moz","Webkit","O","Khtml"],n=n[0].toUpperCase()+n.slice(1),t=0;t<i.length;t++)if(i[t]+n in r)return!0;return!1};Array.prototype.indexOf=Array.prototype.indexOf||function(n){var i=this.length,t;if(i===0)return-1;for(t=0;t<i;t++)if(t in this&&this[t]===n)return t;return-1};String.prototype.startsWith=String.prototype.startsWith||function(n){return this.slice(0,n.length)===n};var r=t.copyObject=function(n,u){var h=2,c,f,s,o,e,l;for(typeof n!="boolean"&&(h=1),s=[].slice.call(arguments,h),h===1&&(u=n,n=i),o=0;o<s.length;o++)for(e in s[o])if(c=u[e],f=s[o][e],f!==i&&c!==f&&s[o]!==f&&u!==f)if(f instanceof Array)if(o===0&&n)if(e==="dataSource"||e==="data"||e==="predicates")u[e]=f.slice();else for(u[e]=[],l=0;l<f.length;l++)r(!0,u[e],f);else u[e]=f.slice();else t.isPlainObject(f)?(u[e]=c||{},n?r(n,u[e],f):r(u[e],f)):u[e]=f;return u},s=function(){return this},h=0,c=function(n){return n+h++};t.template={};t.template.render=t.template["text/x-jsrender"]=function(t,i,r,u,f){i.slice(0,1)!=="#"&&(i=["<div>",i,"<\/div>"].join(""));var e={prop:f,index:u};return n(i).render(r,e)};t.isPlainObject=function(n){if(!n||t.DataManager!==i&&n instanceof t.DataManager||typeof n!="object"||n.nodeType||jQuery.isWindow(n))return!1;try{if(n.constructor&&!n.constructor.prototype.hasOwnProperty("isPrototypeOf"))return!1}catch(f){return!1}var r,u=t.support.isOwnLast;for(r in n)if(u)break;return r===i||n.hasOwnProperty(r)};f=!1;t.util.valueFunction=function(n){return function(r,u){var e=t.getObject(n,this.model);if(f===!1&&(f=t.getObject("observables.getValue",t.widget)),r===i)return t.isNullOrUndefined(f)?typeof e=="function"?e.call(this):e:f(e,u);typeof e=="function"?(this["ob.values"][n]=r,e.call(this,r)):t.createObject(n,r,this.model)}};t.util.getVal=function(n){return typeof n=="function"?n():n};t.support={isOwnLast:function(){var n=function(){this.a=1},t;n.prototype.b=1;for(t in new n)return t==="b"}(),outerHTML:function(){return document.createElement("div").outerHTML!==i}()};o=t.throwError=function(n){try{throw new Error(n);}catch(t){throw t.message+"\n"+t.stack;}};t.getRandomValue=function(n,r){var u,f;return n===i||r===i?t.throwError("Min and Max values are required for generating a random number"):("crypto"in window&&"getRandomValues"in crypto?(f=new Uint16Array(1),window.crypto.getRandomValues(f),u=f[0]%(r-n)+n):u=Math.random()*(r-n)+n,u|0)};t.extensions={};t.extensions.modelGUID="{0B1051BA-1CCB-42C2-A3B5-635389B92A50}"}(window.jQuery,window.Syncfusion),function(){$.fn.addEleAttrs=function(n){var t=$(this);$.each(n,function(n,i){i&&i.specified&&t.attr(i.name,i.value)})};$.fn.removeEleAttrs=function(n){return this.each(function(){var t=$(this),i=$(this.attributes).clone();$.each(i,function(i,r){r&&r.specified&&n.test(r.name)&&t.removeAttr(r.name)})})};$.fn.attrNotStartsWith=function(n){var u=this,r=[],i,t;for(this.each(function(){i=$(this.attributes).clone()}),t=0;t<i.length;t++)if(i[t]&&i[t].specified&&n.test(i[t].name))continue;else r.push(i[t]);return r};$.fn.removeEleEmptyAttrs=function(){return this.each(function(){var n=$(this),t=$(this.attributes).clone();$.each(t,function(t,i){i&&i.specified&&i.value===""&&n.removeAttr(i.name)})})};$.extend($.support,{has3d:ej.addPrefix("perspective")in ej.styles,hasTouch:"ontouchstart"in window,hasPointer:navigator.msPointerEnabled,hasTransform:ej.userAgent()!==!1,pushstate:"pushState"in history&&"replaceState"in history,hasTransition:ej.addPrefix("transition")in ej.styles});$.extend($.expr[":"],{attrNotStartsWith:function(n,t,i){for(var u=n.attributes,r=0;r<u.length;r++)if(u[r].nodeName.indexOf(i[3])===0)return!1;return!0}});var n=$.fn.andSelf||$.fn.addBack;$.fn.andSelf=$.fn.addBack=function(){return n.apply(this,arguments)}}();window.ej=window.Syncfusion=window.Syncfusion||{},function(n,t,i,r){"use strict";var e,nt,tt,y,d,w,h,c,f;t.DataManager=function(i,u,f){if(!(this instanceof t.DataManager))return new t.DataManager(i,u,f);i||(i=[]);f=f||i.adaptor;typeof f=="string"&&(f=new t[f]);var e=[],o=this;return i instanceof Array?e={json:i,offline:!0}:typeof i=="object"?n.isPlainObject(i)?(i.json||(i.json=[]),i.table&&(i.json=this._getJsonFromElement(i.table,i.headerOption)),e={url:i.url,insertUrl:i.insertUrl,removeUrl:i.removeUrl,updateUrl:i.updateUrl,crudUrl:i.crudUrl,batchUrl:i.batchUrl,json:i.json,headers:i.headers,accept:i.accept,data:i.data,async:i.async,timeTillExpiration:i.timeTillExpiration,cachingPageSize:i.cachingPageSize,enableCaching:i.enableCaching,requestType:i.requestType,key:i.key,crossDomain:i.crossDomain,antiForgery:i.antiForgery,jsonp:i.jsonp,dataType:i.dataType,enableAjaxCache:i.enableAjaxCache,offline:i.offline!==r?i.offline:i.adaptor=="remoteSaveAdaptor"||i.adaptor instanceof t.remoteSaveAdaptor?!1:i.url?!1:!0,requiresFormat:i.requiresFormat}):(i.jquery||pt(i))&&(e={json:this._getJsonFromElement(i),offline:!0,table:i}):typeof i=="string"&&(e={url:i,offline:!1,dataType:"json",json:[]}),e.requiresFormat!==r||t.support.cors||(e.requiresFormat=c(e.crossDomain)?!0:e.crossDomain),e.antiForgery&&this.antiForgeryToken(),e.dataType===r&&(e.dataType="json"),this.dataSource=e,this.defaultQuery=u,e.url&&e.offline&&!e.json.length?(this.isDataAvailable=!1,this.adaptor=f||new t.ODataAdaptor,this.dataSource.offline=!1,this.ready=this.executeQuery(u||t.Query()).done(function(n){o.dataSource.offline=!0;o.isDataAvailable=!0;e.json=n.result;o.adaptor=new t.JsonAdaptor})):this.adaptor=e.offline?new t.JsonAdaptor:new t.ODataAdaptor,!e.jsonp&&this.adaptor instanceof t.ODataAdaptor&&(e.jsonp="callback"),this.adaptor=f||this.adaptor,e.enableCaching&&(this.adaptor=new t.CacheAdaptor(this.adaptor,e.timeTillExpiration,e.cachingPageSize)),this};t.DataManager.prototype={setDefaultQuery:function(n){this.defaultQuery=n},executeQuery:function(i,u,e,o){var s,h,c;return typeof i=="function"&&(o=e,e=u,u=i,i=null),i||(i=this.defaultQuery),i instanceof t.Query||f("DataManager - executeQuery() : A query is required to execute"),s=n.Deferred(),s.then(u,e,o),h={query:i},this.dataSource.offline||this.dataSource.url==r?t.isNullOrUndefined(this.dataSource.async)||this.dataSource.async!=!1?d(function(){this._localQueryProcess(i,h,s)},this):this._localQueryProcess(i,h,s):(c=this.adaptor.processQuery(this,i),t.isNullOrUndefined(c.url)?d(function(){h=this._getDeferedArgs(i,c,h);s.resolveWith(this,[h])},this):this._makeRequest(c,s,h,i)),s.promise()},_localQueryProcess:function(n,t,i){var r=this.executeLocal(n);t=this._getDeferedArgs(n,r,t);i.resolveWith(this,[t])},_getDeferedArgs:function(n,t,i){return n._requiresCount?(i.result=t.result,i.count=t.count):i.result=t,i.getTableModel=rt(n._fromTable,i.result,this),i.getKnockoutModel=ut(i.result),i},executeLocal:function(i){var e,r;if(this.defaultQuery||i instanceof t.Query||f("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||f("DataManager - executeLocal() : Json data is required to execute"),i=i||this.defaultQuery,e=this.adaptor.processQuery(this,i),i._subQuery){var o=i._subQuery._fromTable,s=i._subQuery._lookup,u=i._requiresCount?e.result:e;for(s&&s instanceof Array&&k(i._subQuery._fKey,o,u,s,i._subQuery._key),r=0;r<u.length;r++)u[r][o]instanceof Array&&(u[r]=n.extend({},u[r]),u[r][o]=this.adaptor.processResponse(i._subQuery.using(t.DataManager(u[r][o].slice(0))).executeLocal(),this,i))}return this.adaptor.processResponse(e,this,i)},_makeRequest:function(i,r,u,f){var o=!!f._subQuerySelector,c=h(function(n){u.error=n;r.rejectWith(this,[u])},this),l=h(function(n,t,i,e,s,h,c){o||(u.xhr=i,u.count=parseInt(t,10),u.result=n,u.request=e,u.aggregates=h,u.getTableModel=rt(f._fromTable,n,this),u.getKnockoutModel=ut(n),u.actual=s,u.virtualSelectRecords=c,r.resolveWith(this,[u]))},this),a=h(function(t,i){var r=n.Deferred(),h={parent:u},e,s;return f._subQuery._isChild=!0,e=this.adaptor.processQuery(this,f._subQuery,t?this.adaptor.processResponse(t):i),s=this._makeRequest(e,r,h,f._subQuery),o||r.then(function(n){t&&(k(f._subQuery._fKey,f._subQuery._fromTable,t,n,f._subQuery._key),l(t))},c),s},this),v=w(function(n,i,r,u){r.getResponseHeader("Content-Type").indexOf("xml")==-1&&t.dateParse&&(n=t.parseJSON(n));var e=this.adaptor.processResponse(n,this,f,r,u),s=0,h=null,c=n.virtualSelectRecords;if(f._requiresCount&&(s=e.count,h=e.aggregates,e=e.result),!f._subQuery){l(e,s,r,u,n,h,c);return}o||a(e)},this),e=n.extend({type:"GET",dataType:this.dataSource.dataType,crossDomain:this.dataSource.crossDomain,jsonp:this.dataSource.jsonp,cache:t.isNullOrUndefined(this.dataSource.enableAjaxCache)?!0:this.dataSource.enableAjaxCache,beforeSend:h(this._beforeSend,this),processData:!1,success:v,error:c},i),s;return"async"in this.dataSource&&(e.async=this.dataSource.async),e=n.ajax(e),o&&(s=f._subQuerySelector.call(this,{query:f._subQuery,parent:f}),s&&s.length?(e=n.when(e,a(null,s)),e.then(w(function(n,t,i){var r=this.adaptor.processResponse(n[0],this,f,n[2],i[0]),e=0,u;f._requiresCount&&(e=r.count,r=r.result);u=this.adaptor.processResponse(t[0],this,f._subQuery,t[2],i[1]);e=0;f._subQuery._requiresCount&&(e=u.count,u=u.result);k(f._subQuery._fKey,f._subQuery._fromTable,r,u,f._subQuery._key);o=!1;l(r,e,n[2])},this),c)):o=!1),e},_beforeSend:function(n,t){var i,f,r,u;for(this.adaptor.beforeSend(this,n,t),i=this.dataSource.headers,r=0;i&&r<i.length;r++){f=[];for(u in i[r])f.push(u),n.setRequestHeader(u,i[r][u])}},saveChanges:function(i,r,u,f){var s,o,e;return(u instanceof t.Query&&(f=u,u=null),s={url:u,key:r||this.dataSource.key},o=this.adaptor.batchRequest(this,i,s,f),this.dataSource.offline)?o:(e=n.Deferred(),n.ajax(n.extend({beforeSend:h(this._beforeSend,this),success:w(function(n,t,u,f){e.resolveWith(this,[this.adaptor.processResponse(n,this,null,u,f,i,r)])},this),error:function(n){e.rejectWith(this,[{error:n}])}},o)),e.promise())},insert:function(i,r,f){var o,e;return(i=u.replacer(i,!0),r instanceof t.Query&&(f=r,r=null),o=this.adaptor.insert(this,i,r,f),this.dataSource.offline)?o:(e=n.Deferred(),n.ajax(n.extend({type:"POST",contentType:"application/json; charset=utf-8",processData:!1,beforeSend:h(this._beforeSend,this),success:w(function(n,i,r,f){try{t.isNullOrUndefined(n)?n=[]:u.parseJson(n)}catch(o){n=[]}n=this.adaptor.processResponse(u.parseJson(n),this,null,r,f);e.resolveWith(this,[{record:n,dataManager:this}])},this),error:function(n){e.rejectWith(this,[{error:n,dataManager:this}])}},o)),e.promise())},antiForgeryToken:function(){var i;return t.isNullOrUndefined(n("input[name='_ejRequestVerifyToken']").val())?i=t.buildTag("input","","",{type:"hidden",name:"_ejRequestVerifyToken",value:t.getGuid()}).appendTo("body"):n("input[name='_ejRequestVerifyToken']").val(t.getGuid()),t.cookie.set("_ejRequestVerifyToken",n("input[name='_ejRequestVerifyToken']").val()),{name:"_ejRequestVerifyToken",value:n("input[name='_ejRequestVerifyToken']").val()}},remove:function(i,r,f,e){var s,o;return(typeof r=="object"&&(r=r[i]),f instanceof t.Query&&(e=f,f=null),s=this.adaptor.remove(this,i,r,f,e),this.dataSource.offline)?s:(o=n.Deferred(),n.ajax(n.extend({type:"POST",contentType:"application/json; charset=utf-8",beforeSend:h(this._beforeSend,this),success:w(function(n,i,r,f){try{t.isNullOrUndefined(n)?n=[]:u.parseJson(n)}catch(e){n=[]}n=this.adaptor.processResponse(u.parseJson(n),this,null,r,f);o.resolveWith(this,[{record:n,dataManager:this}])},this),error:function(n){o.rejectWith(this,[{error:n,dataManager:this}])}},s)),o.promise())},update:function(i,r,f,e){var s,o;return(r=u.replacer(r,!0),f instanceof t.Query&&(e=f,f=null),s=this.adaptor.update(this,i,r,f,e),this.dataSource.offline)?s:(o=n.Deferred(),n.ajax(n.extend({contentType:"application/json; charset=utf-8",beforeSend:h(this._beforeSend,this),success:w(function(n,i,r,f){try{t.isNullOrUndefined(n)?n=[]:u.parseJson(n)}catch(e){n=[]}n=this.adaptor.processResponse(u.parseJson(n),this,null,r,f);o.resolveWith(this,[{record:n,dataManager:this}])},this),error:function(n){o.rejectWith(this,[{error:n,dataManager:this}])}},s)),o.promise())},_getJsonFromElement:function(i){typeof i=="string"&&(i=n(n(i).html()));i=i.jquery?i[0]:i;var r=i.tagName.toLowerCase();return r!=="table"&&f("ej.DataManager : Unsupported htmlElement : "+r),t.parseTable(i)}};var k=function(n,i,r,u,e){var o,s={},c,h;for(u.result&&(u=u.result),u.GROUPGUID&&f("ej.DataManager: Do not have support Grouping in hierarchy"),o=0;o<u.length;o++)h=t.getObject(n,u[o]),c=s[h]||(s[h]=[]),c.push(u[o]);for(o=0;o<r.length;o++)r[o][i]=s[t.getObject(e||n,r[o])]},l={accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 "},u={parseJson:function(n){var t=typeof n;return t==="string"?n=JSON.parse(n,u.jsonReviver):n instanceof Array?u.iterateAndReviveArray(n):t==="object"&&u.iterateAndReviveJson(n),n},iterateAndReviveArray:function(n){for(var t=0;t<n.length;t++)typeof n[t]=="object"?u.iterateAndReviveJson(n[t]):n[t]=typeof n[t]!="string"||/^[\s]*\[|^[\s]*\{|\"/g.test(n[t])?u.parseJson(n[t]):u.jsonReviver("",n[t])},iterateAndReviveJson:function(n){var t;for(var i in n)i.startsWith("__")||(t=n[i],typeof t=="object"?t instanceof Array?u.iterateAndReviveArray(t):u.iterateAndReviveJson(t):n[i]=u.jsonReviver(i,t))},jsonReviver:function(n,i){var o=i,e=/[\-,/,\,.,:,]+/,f,r;if(typeof i=="string"){if(f=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(i),f)return t.parseDateInUTC?u.isValidDate(f[0]):u.replacer(new Date(parseInt(f[1])));(t.dateParse?/^(?:(\d{4}\-\d\d\-\d\d)|(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?)$/.test(i):/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(i))&&(r=o.split(/[^0-9]/),/^(\d{4}\-\d\d\-\d\d)$/.test(i)?i=new Date(r[t.dateFormat.split(e).indexOf("yyyy")],r[t.dateFormat.split(e).indexOf("MM")]-1,r[t.dateFormat.split(e).indexOf("dd")]):(i=t.parseDateInUTC?u.isValidDate(i):u.replacer(new Date(i)),isNaN(i)&&(i=u.replacer(new Date(r[0],r[1]-1,r[2],r[3],r[4],r[5])))))}return i},isValidDate:function(n){var t=n,i;return(typeof t=="string"&&t.indexOf("/Date(")==0&&(n=t.replace(/\d+/,function(n){var t=new Date(parseInt(n)).getTimezoneOffset()*6e4,i=parseInt(n)+t;return u.replacer(new Date(parseInt(i)))})),typeof n=="string")?(n=n.replace("/Date(",function(){return""}),n=n.replace(")/",function(){return""}),i=new Date(n)instanceof Date,i?new Date(n):n):n},isJson:function(n){return typeof n[0]=="string"?n:t.parseJSON(n)},isGuid:function(n){var t=/[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i.exec(n);return t!=null},replacer:function(n,i){return t.isPlainObject(n)?u.jsonReplacer(n,i):n instanceof Array?u.arrayReplacer(n):n instanceof Date?u.jsonReplacer({val:n},i).val:n},jsonReplacer:function(n,i){var r,u,f;for(u in n)(r=n[u],r instanceof Date)&&(f=t.serverTimezoneOffset*36e5*(t.isNullOrUndefined(i)||i===!1?1:-1),n[u]=new Date(+r+f));return n},arrayReplacer:function(n){for(var i=0;i<n.length;i++)t.isPlainObject(n[i])?n[i]=u.jsonReplacer(n[i]):n[i]instanceof Date&&(n[i]=u.jsonReplacer({date:n[i]}).date);return n}};t.isJSON=u.isJson;t.parseJSON=u.parseJson;t.dateParse=!0;t.dateFormat="yyyy-MM-dd";t.isGUID=u.isGuid;t.Query=function(n){return(this instanceof t.Query)?(this.queries=[],this._key="",this._fKey="",typeof n=="string"?this._fromTable=n||"":n&&n instanceof Array&&(this._lookup=n),this._expands=[],this._sortedColumns=[],this._groupedColumns=[],this._subQuery=null,this._isChild=!1,this._params=[],this):new t.Query(n)};t.Query.prototype={key:function(n){return typeof n=="string"&&(this._key=n),this},using:function(n){return n instanceof t.DataManager?(this.dataManagar=n,this):f("Query - using() : 'using' function should be called with parameter of instance ej.DataManager")},execute:function(n,i,r,u){return(n=n||this.dataManagar,n&&n instanceof t.DataManager)?n.executeQuery(this,i,r,u):f("Query - execute() : dataManager needs to be is set using 'using' function or should be passed as argument")},executeLocal:function(n){return(n=n||this.dataManagar,n&&n instanceof t.DataManager)?n.executeLocal(this):f("Query - executeLocal() : dataManager needs to be is set using 'using' function or should be passed as argument")},clone:function(){var n=new t.Query;return n.queries=this.queries.slice(0),n._key=this._key,n._isChild=this._isChild,n.dataManagar=this.dataManager,n._fromTable=this._fromTable,n._params=this._params.slice(0),n._expands=this._expands.slice(0),n._sortedColumns=this._sortedColumns.slice(0),n._groupedColumns=this._groupedColumns.slice(0),n._subQuerySelector=this._subQuerySelector,n._subQuery=this._subQuery,n._fKey=this._fKey,n._requiresCount=this._requiresCount,n},from:function(n){return typeof n=="string"&&(this._fromTable=n),this},addParams:function(n,i){return typeof i=="function"||t.isPlainObject(i)?typeof i=="function"&&this._params.push({key:n,fn:i}):this._params.push({key:n,value:i}),this},expand:function(n){return this._expands=typeof n=="string"?[].slice.call(arguments,0):n.slice(0),this},where:function(n,i,r,u,e){i=(i||t.FilterOperators.equal).toLowerCase();var o=null;return typeof n=="string"?o=new t.Predicate(n,i,r,u,e):n instanceof t.Predicate?o=n:f("Query - where : Invalid arguments"),this.queries.push({fn:"onWhere",e:o}),this},search:function(n,i,r,u,f){i&&typeof i!="boolean"?typeof i=="string"&&(i=[i]):(i=[],u=i);typeof r=="boolean"&&(u=r,r=null);r=r||t.FilterOperators.contains;r.length<3&&(r=t.data.operatorSymbols[r]);var e=t.data.fnOperators[r]||t.data.fnOperators.processSymbols(r);return this.queries.push({fn:"onSearch",e:{fieldNames:i,operator:r,searchKey:n,ignoreCase:u,ignoreAccent:f,comparer:e}}),this},sortBy:function(n,i,r){var o=t.sortOrder.Ascending,s,f,u,e;if(typeof n=="string"&&n.toLowerCase().endsWith(" desc")&&(n=n.replace(/ desc$/i,""),i=t.sortOrder.Descending),n instanceof Array){for(u=0;u<n.length;u++)this.sortBy(n[u],i,r);return this}if(typeof i=="boolean"?i=i?t.sortOrder.Descending:t.sortOrder.Ascending:typeof i=="function"&&(o="custom"),i&&typeof i!="string"||(o=i?i.toLowerCase():t.sortOrder.Ascending,i=t.pvt.fnSort(i)),r)for(s=a(this.queries,"onSortBy"),u=0;u<s.length;u++)if(f=s[u].e.fieldName,typeof f=="string"){if(f===n)return this}else if(f instanceof Array)for(e=0;e<f.length;e++)if(f[e]===n||n.toLowerCase()===f[e]+" desc")return this;return this.queries.push({fn:"onSortBy",e:{fieldName:n,comparer:i,direction:o}}),this},sortByDesc:function(n){return this.sortBy(n,t.sortOrder.Descending)},group:function(n,t){return this.sortBy(n,null,!0),this.queries.push({fn:"onGroup",e:{fieldName:n,fn:t}}),this},page:function(n,t){return this.queries.push({fn:"onPage",e:{pageIndex:n,pageSize:t}}),this},range:function(n,t){return(typeof n!="number"||typeof t!="number")&&f("Query() - range : Arguments type should be a number"),this.queries.push({fn:"onRange",e:{start:n,end:t}}),this},take:function(n){return typeof n!="number"&&f("Query() - Take : Argument type should be a number"),this.queries.push({fn:"onTake",e:{nos:n}}),this},skip:function(n){return typeof n!="number"&&f("Query() - Skip : Argument type should be a number"),this.queries.push({fn:"onSkip",e:{nos:n}}),this},select:function(n){return typeof n=="string"&&(n=[].slice.call(arguments,0)),n instanceof Array||f("Query() - Select : Argument type should be String or Array"),this.queries.push({fn:"onSelect",e:{fieldNames:n}}),this},hierarchy:function(n,i){return n&&n instanceof t.Query||f("Query() - hierarchy : query must be instance of ej.Query"),typeof i=="function"&&(this._subQuerySelector=i),this._subQuery=n,this},foreignKey:function(n){return typeof n=="string"&&(this._fKey=n),this},requiresCount:function(){return this._requiresCount=!0,this},aggregate:function(n,t){this.queries.push({fn:"onAggregates",e:{field:t,type:n}})}};t.Adaptor=function(n){this.dataSource=n;this.pvt={};this.init.apply(this,[].slice.call(arguments,1))};t.Adaptor.prototype={options:{from:"table",requestType:"json",sortBy:"sorted",select:"select",skip:"skip",group:"group",take:"take",search:"search",count:"requiresCounts",where:"where",aggregates:"aggregates",antiForgery:"antiForgery"},init:function(){},extend:function(t){var i=function(t){this.dataSource=t;this.options&&(this.options=n.extend({},this.options));this.init.apply(this,[].slice.call(arguments,0));this.pvt={}},u,r;i.prototype=new this.type;i.prototype.type=i;u=i.prototype.base={};for(r in t)i.prototype[r]&&(u[r]=i.prototype[r]);return n.extend(!0,i.prototype,t),i},processQuery:function(){},processResponse:function(n){return n.d?n.d:n},convertToQueryString:function(t){return n.param(t)},type:t.Adaptor};t.UrlAdaptor=(new t.Adaptor).extend({processQuery:function(n,t,i){var w=a(t.queries,"onSortBy"),d=a(t.queries,"onGroup"),nt=a(t.queries,"onWhere"),tt=a(t.queries,"onSearch"),it=a(t.queries,"onAggregates"),l=g(t.queries,["onSelect","onPage","onSkip","onTake","onRange"]),rt=t._params,b=n.dataSource.url,u,y,p=null,h=this.options,s={sorted:[],grouped:[],filters:[],searches:[],aggregates:[]},f,r,v,k;for(l.onPage?(u=l.onPage,y=e(u.pageIndex,t),p=e(u.pageSize,t),y=(y-1)*p):l.onRange&&(u=l.onRange,y=u.start,p=u.end-u.start),f=0;f<w.length;f++)u=e(w[f].e.fieldName,t),s.sorted.push(o(this,"onEachSort",{name:u,direction:w[f].e.direction},t));for(i&&(u=this.getFiltersFrom(i,t),u&&s.filters.push(o(this,"onEachWhere",u.toJSON(),t))),f=0;f<nt.length;f++){s.filters.push(o(this,"onEachWhere",nt[f].e.toJSON(),t));for(v in s.filters[f])c(s[v])&&delete s[v]}for(f=0;f<tt.length;f++)u=tt[f].e,s.searches.push(o(this,"onEachSearch",{fields:u.fieldNames,operator:u.operator,key:u.searchKey,ignoreCase:u.ignoreCase},t));for(f=0;f<d.length;f++)s.grouped.push(e(d[f].e.fieldName,t));for(f=0;f<it.length;f++)u=it[f].e,s.aggregates.push({type:u.type,field:e(u.field,t)});r={};r[h.from]=t._fromTable;h.expand&&(r[h.expand]=t._expands);r[h.select]=l.onSelect?o(this,"onSelect",e(l.onSelect.fieldNames,t),t):"";r[h.count]=t._requiresCount?o(this,"onCount",t._requiresCount,t):"";r[h.search]=s.searches.length?o(this,"onSearch",s.searches,t):"";r[h.skip]=l.onSkip?o(this,"onSkip",e(l.onSkip.nos,t),t):"";r[h.take]=l.onTake?o(this,"onTake",e(l.onTake.nos,t),t):"";r[h.antiForgery]=n.dataSource.antiForgery?n.antiForgeryToken().value:"";r[h.where]=s.filters.length||s.searches.length?o(this,"onWhere",s.filters,t):"";r[h.sortBy]=s.sorted.length?o(this,"onSortBy",s.sorted,t):"";r[h.group]=s.grouped.length?o(this,"onGroup",s.grouped,t):"";r[h.aggregates]=s.aggregates.length?o(this,"onAggregates",s.aggregates,t):"";r.param=[];o(this,"addParams",{dm:n,query:t,params:rt,reqParams:r});for(v in r)(c(r[v])||r[v]===""||r[v].length===0||v==="params")&&delete r[v];return(h.skip in r&&h.take in r||p===null||(r[h.skip]=o(this,"onSkip",y,t),r[h.take]=o(this,"onTake",p,t)),k=this.pvt,this.pvt={},this.options.requestType==="json")?{data:JSON.stringify(r),url:b,ejPvtData:k,type:"POST",contentType:"application/json; charset=utf-8"}:(u=this.convertToQueryString(r,t,n),u=(n.dataSource.url.indexOf("?")!==-1?"&":"/")+u,{type:"GET",url:u.length?b.replace(/\/*$/,u):b,ejPvtData:k})},convertToQueryString:function(t,i,r){return r.dataSource.url&&r.dataSource.url.indexOf("?")!==-1?n.param(t):"?"+n.param(t)},processResponse:function(n,i,u,f,e,o){var c=e.ejPvtData||{},v=n.groupDs,y,a,h,s,d,w;if(f&&f.getResponseHeader("Content-Type")&&f.getResponseHeader("Content-Type").indexOf("xml")!=-1&&n.nodeType==9)return u._requiresCount?{result:[],count:0}:[];if(y=JSON.parse(e.data),y&&y.action==="batch"&&n.added)return o.added=n.added,o;if(n.d&&(n=n.d),c&&c.aggregates&&c.aggregates.length){var l=c.aggregates,h={},p,k={};for(("count"in n)&&(h.count=n.count),n.result&&(h.result=n.result),n.aggregate&&(n=n.aggregate),s=0;s<l.length;s++)p=t.aggregates[l[s].type],p&&(k[l[s].field+" - "+l[s].type]=p(n,l[s].field));h.aggregates=k;n=h}if(c&&c.groups&&c.groups.length){for(a=c.groups,h={},("count"in n)&&(h.count=n.count),n.aggregates&&(h.aggregates=n.aggregates),n.result&&(n=n.result),s=0;s<a.length;s++)d=null,w=b(a[s],u.queries),t.isNullOrUndefined(v)||(v=t.group(v,a[s],null,w)),n=t.group(n,a[s],c.aggregates,w,d,v);return h.count!=r?h.result=n:h=n,h}return n},onGroup:function(n){this.pvt.groups=n},onAggregates:function(n){this.pvt.aggregates=n},batchRequest:function(n,t,i,r){var u={changed:t.changed,added:t.added,deleted:t.deleted,action:"batch",table:i.url,key:i.key,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return r&&this.addParams({dm:n,query:r,params:r._params,reqParams:u}),{type:"POST",url:n.dataSource.batchUrl||n.dataSource.crudUrl||n.dataSource.removeUrl||n.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u)}},beforeSend:function(){},insert:function(n,t,i,r){var u={value:t,table:i,action:"insert",antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return r&&this.addParams({dm:n,query:r,params:r._params,reqParams:u}),{url:n.dataSource.insertUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify(u)}},remove:function(n,t,i,r,u){var f={key:i,keyColumn:t,table:r,action:"remove",antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return u&&this.addParams({dm:n,query:u,params:u._params,reqParams:f}),{type:"POST",url:n.dataSource.removeUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify(f)}},update:function(n,t,i,r,u){var f={value:i,action:"update",keyColumn:t,key:i[t],table:r,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return u&&this.addParams({dm:n,query:u,params:u._params,reqParams:f}),{type:"POST",url:n.dataSource.updateUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify(f)}},getFiltersFrom:function(n,i){var r;n instanceof Array&&n.length||f("ej.SubQuery: Array of key values required");var u=i._fKey,e,o=u,h=i._key,s=[],c=typeof n[0]!="object";for(typeof n[0]!="object"&&(o=null),r=0;r<n.length;r++)e=c?n[r]:t.pvt.getObject(h||o,n[r]),s.push(new t.Predicate(u,"==",e));return t.Predicate.or(s)},addParams:function(n){var e=n.dm,u=n.query,o=n.params,i=n.reqParams,r,t;for(i.params={},r=0;t=o[r];r++)i[t.key]&&f("ej.Query: Custom Param is conflicting other request arguments"),i[t.key]=t.value,t.fn&&(i[t.key]=t.fn.call(u,t.key,u,e)),i.params[t.key]=i[t.key]}});t.WebMethodAdaptor=(new t.UrlAdaptor).extend({processQuery:function(n,i,r){var u=t.UrlAdaptor.prototype.processQuery(n,i,r),e=t.parseJSON(u.data),f={};return f.value=e,o(this,"addParams",{dm:n,query:i,params:i._params,reqParams:f}),{data:JSON.stringify(f),url:u.url,ejPvtData:u.ejPvtData,type:"POST",contentType:"application/json; charset=utf-8"}},addParams:function(n){var s=n.dm,o=n.query,h=n.params,i=n.reqParams,u,t,r,e;for(i.params={},u=0;t=h[u];u++)i[t.key]&&f("ej.Query: Custom Param is conflicting other request arguments"),r=t.key,e=t.value,t.fn&&(e=t.fn.call(o,t.key,o,s)),i[r]=e,i.params[r]=i[r]}});t.CacheAdaptor=(new t.UrlAdaptor).extend({init:function(n,i,r){var f,u;t.isNullOrUndefined(n)||(this.cacheAdaptor=n);this.pageSize=r;this.guidId=t.getGuid("cacheAdaptor");f={keys:[],results:[]};window.localStorage&&window.localStorage.setItem(this.guidId,JSON.stringify(f));u=this.guidId;t.isNullOrUndefined(i)||setInterval(function(){for(var e,r=t.parseJSON(window.localStorage.getItem(u)),f=[],n=0;n<r.results.length;n++)r.results[n].timeStamp=new Date-new Date(r.results[n].timeStamp),new Date-new Date(r.results[n].timeStamp)>i&&f.push(n);for(e=f,n=0;n<f.length;n++)r.results.splice(f[n],1),r.keys.splice(f[n],1);window.localStorage.removeItem(u);window.localStorage.setItem(u,JSON.stringify(r))},i)},generateKey:function(n,t){var h=a(t.queries,"onSortBy"),c=a(t.queries,"onGroup"),o=a(t.queries,"onWhere"),l=a(t.queries,"onSearch"),v=a(t.queries,"onPage"),s=g(t.queries,["onSelect","onPage","onSkip","onTake","onRange"]),y=t._params,r=n,u,i,f,e;for(s.onPage&&(r+=s.onPage.pageIndex),h.forEach(function(n){r+=n.e.direction+n.e.fieldName}),c.forEach(function(n){r+=n.e.fieldName}),l.forEach(function(n){r+=n.e.searchKey}),u=0;u<o.length;u++)if(i=o[u],i.e.isComplex){for(f=t.clone(),f.queries=[],e=0;e<i.e.predicates.length;e++)f.queries.push({fn:"onWhere",e:i.e.predicates[e],filter:t.queries.filter});r+=i.e.condition+this.generateKey(n,f)}else r+=i.e.field+i.e.operator+i.e.value;return r},processQuery:function(n,i){var f=this.generateKey(n.dataSource.url,i),r,u;return(window.localStorage&&(r=t.parseJSON(window.localStorage.getItem(this.guidId))),u=r?r.results[r.keys.indexOf(f)]:null,u!=null&&!this._crudAction&&!this._insertAction)?u:(this._crudAction=null,this._insertAction=null,this.cacheAdaptor.processQuery.apply(this.cacheAdaptor,[].slice.call(arguments,0)))},processResponse:function(i,r,u,f,e,o){var h;if(this._insertAction||e&&this.cacheAdaptor.options.batch&&e.url.endsWith(this.cacheAdaptor.options.batch)&&e.type.toLowerCase()==="post")return this.cacheAdaptor.processResponse(i,r,u,f,e,o);var i=this.cacheAdaptor.processResponse.apply(this,[].slice.call(arguments,0)),c=this.generateKey(r.dataSource.url,u),s={};for(window.localStorage&&(s=t.parseJSON(window.localStorage.getItem(this.guidId))),h=n.inArray(c,s.keys),h!=-1&&(s.results.splice(h,1),s.keys.splice(h,1)),s.results[s.keys.push(c)-1]={keys:c,result:i.result,timeStamp:new Date,count:i.count};s.results.length>this.pageSize;)s.results.splice(0,1),s.keys.splice(0,1);return window.localStorage.setItem(this.guidId,JSON.stringify(s)),i},update:function(n,t,i,r){return this._crudAction=!0,this.cacheAdaptor.update(n,t,i,r)},insert:function(n,t,i){return this._insertAction=!0,this.cacheAdaptor.insert(n,t,i)},remove:function(n,t,i,r){return this._crudAction=!0,this.cacheAdaptor.remove(n,t,i,r)},batchRequest:function(n,t,i){return this.cacheAdaptor.batchRequest(n,t,i)}});var a=function(n,t){return n.filter(function(n){return n.fn===t})||[]},g=function(n,t){for(var r=n.filter(function(n){return t.indexOf(n.fn)!==-1}),u={},i=0;i<r.length;i++)u[r[i].fn]||(u[r[i].fn]=r[i].e);return u},o=function(n,t,i,r){if(n[t]){var u=n[t](i,r);c(u)||(i=u)}return i};t.ODataAdaptor=(new t.UrlAdaptor).extend({options:{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$inlinecount",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 "},onEachWhere:function(n,t){return n.isComplex?this.onComplexPredicate(n,t):this.onPredicate(n,t)},_typeStringQuery:function(n,i,r,u,f){r.indexOf("'")!=-1&&(r=r.replace(new RegExp(/'/g),"''"));return/[ !@@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(r)&&(r=encodeURIComponent(r)),r="'"+r+"'",i&&(u="cast("+u+", 'Edm.String')"),t.isGUID(r)&&(f="guid"),n.ignoreCase&&(f?u:u="tolower("+u+")",r=r.toLowerCase()),{val:r,guid:f,field:u}},onPredicate:function(n,i,r){var f="",o,l,e=n.value,v=typeof e,h=this._p(n.field),s,c,y,a;if(e instanceof Date&&(e="datetime'"+u.replacer(e).toJSON()+"'"),v==="string"&&(c=this._typeStringQuery(n,r,e,h,l),e=c.val,h=c.field,l=c.guid),o=t.data.odBiOperator[n.operator],n.anyCondition!=""&&o)return f+=e.table,f+="/"+n.anyCondition,f+="(d:d/",f+=h,f+=o,f+=e.value,f+")";if(n.operator=="in"||n.operator=="notin"){for(f+="(",s=0;s<e.length;s++)e[s]instanceof Date&&(e[s]="datetime'"+u.replacer(e[s]).toJSON()+"'"),typeof e[s]=="string"&&(c=this._typeStringQuery(n,r,e[s],h,l),e[s]=c.val,h=c.field,l=c.guid),f+=h,f+=o,f+=e[s],s!=e.length-1&&(f+=n.operator=="in"?" or ":" and ");return f+")"}return o?this.onOperation(f,o,h,e,l):(o=t.data.odUniOperator[n.operator],!o||v!=="string")?"":(o==="substringof"&&(y=e,e=h,h=y),f+=o+"(",f+=h+",",l&&(f+=l),f+=e+")",n.operator=="notcontains"&&(f+=" eq false"),n.anyCondition!=""&&o)?(a+=e.table,a+="/"+n.anyCondition,a+="(d:d/",f+=f,a+")"):f},onOperation:function(n,t,i,r,u){return n+=i,n+=t,u&&(n+=u),n+r},onComplexPredicate:function(n,t){for(var r=[],i=0;i<n.predicates.length;i++)r.push("("+this.onEachWhere(n.predicates[i],t)+")");return r.join(" "+n.condition+" ")},onWhere:function(n){return this.pvt.searches&&n.push(this.onEachWhere(this.pvt.searches,null,!0)),n.join(" and ")},onEachSearch:function(n){var r,i;for(n.fields.length===0&&f("Query() - Search : oData search requires list of field names to search"),r=this.pvt.searches||[],i=0;i<n.fields.length;i++)r.push(new t.Predicate(n.fields[i],n.operator,n.key,n.ignoreCase));this.pvt.searches=r},onSearch:function(){return this.pvt.searches=t.Predicate.or(this.pvt.searches),""},onEachSort:function(n){var i=[],t;if(n.name instanceof Array)for(t=0;t<n.name.length;t++)i.push(this._p(n.name[t]));else i.push(this._p(n.name)+(n.direction==="descending"?" desc":""));return i.join(",")},onSortBy:function(n){return n.reverse().join(",")},onGroup:function(n){return this.pvt.groups=n,""},onSelect:function(n){for(var t=0;t<n.length;t++)n[t]=this._p(n[t]);return n.join(",")},onAggregates:function(n){return this.pvt.aggregates=n,""},onCount:function(n){return n===!0?"allpages":""},beforeSend:function(n,t,i){i.url.endsWith(this.options.batch)&&i.type.toLowerCase()==="post"&&(t.setRequestHeader("Accept",l.multipartAccept),t.setRequestHeader("DataServiceVersion","2.0"),t.overrideMimeType("text/plain; charset=x-user-defined"));n.dataSource.crossDomain||(t.setRequestHeader("DataServiceVersion","2.0"),t.setRequestHeader("MaxDataServiceVersion","2.0"))},processResponse:function(i,r,f,e,o,s){var a,l,v,d,tt,g,it,k,h,ft;if(!t.isNullOrUndefined(i.d)&&(a=f&&f._requiresCount?i.d.results:i.d,!t.isNullOrUndefined(a)))for(h=0;h<a.length;h++)t.isNullOrUndefined(a[h].__metadata)||delete a[h].__metadata;if(l=o&&o.ejPvtData,e&&e.getResponseHeader("Content-Type")&&e.getResponseHeader("Content-Type").indexOf("xml")!=-1&&i.nodeType==9)return f._requiresCount?{result:[],count:0}:[];if(o&&this.options.batch&&o.url.endsWith(this.options.batch)&&o.type.toLowerCase()==="post"){if(v=e.getResponseHeader("Content-Type"),v=v.substring(v.indexOf("=batchresponse")+1),i=i.split(v),i.length<2)return;for(i=i[1],g=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(i),i.replace(g[0],""),it=g[1],i=i.split(it),h=i.length;h>-1;h--)/\bContent-ID:/i.test(i[h])&&/\bHTTP.+201/.test(i[h])&&(d=parseInt(/\bContent-ID: (\d+)/i.exec(i[h])[1]),s.added[d]&&(tt=u.parseJson(/^\{.+\}/m.exec(i[h])[0]),n.extend(s.added[d],this.processResponse(tt))));return s}var y=e&&e.getResponseHeader("DataServiceVersion"),w=null,rt={};if(y=y&&parseInt(y,10)||2,f&&f._requiresCount&&((i.__count||i["odata.count"])&&(w=i.__count||i["odata.count"]),i.d&&(i=i.d),(i.__count||i["odata.count"])&&(w=i.__count||i["odata.count"])),y===3&&i.value&&(i=i.value),i.d&&(i=i.d),y<3&&i.results&&(i=i.results),l&&l.aggregates&&l.aggregates.length){var p=l.aggregates,nt,ut={};for(h=0;h<p.length;h++)nt=t.aggregates[p[h].type],nt&&(ut[p[h].field+" - "+p[h].type]=nt(i,p[h].field));rt=ut}if(l&&l.groups&&l.groups.length)for(k=l.groups,h=0;h<k.length;h++)ft=b(k[h],f.queries),i=t.group(i,k[h],l.aggregates,ft);return c(w)?i:{result:i,count:w,aggregates:rt}},convertToQueryString:function(n,t,i){var r=[],u=n.table||"",f;delete n.table;i.dataSource.requiresFormat&&(n.$format="json");for(f in n)r.push(f+"="+n[f]);return(r=r.join("&"),i.dataSource.url&&i.dataSource.url.indexOf("?")!==-1&&!u)?r:r.length?u+"?"+r:u||""},insert:function(n,t,i){return{url:n.dataSource.url.replace(/\/*$/,i?"/"+i:""),data:JSON.stringify(t)}},remove:function(n,i,r,u){return typeof r=="string"?{type:"DELETE",url:t.isGUID(r)?n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r+")":n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"('"+r+"')"}:{type:"DELETE",url:n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r+")"}},update:function(n,i,r,u){var f;return f=typeof r[i]=="string"?t.isGUID(r[i])?n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r[i]+")":n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"('"+r[i]+"')":n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r[i]+")",{type:"PUT",url:f,data:JSON.stringify(r),accept:this.options.accept}},batchRequest:function(n,i,r){var e=r.guid=t.getGuid(l.batchPre),o=n.dataSource.url.replace(/\/*$/,"/"+this.options.batch),f={url:r.url,key:r.key,cid:1,cSet:t.getGuid(l.changeSet)},u="--"+e+"\n";return u+="Content-Type: multipart/mixed; boundary="+f.cSet.replace("--","")+"\n",this.pvt.changeSet=0,u+=this.generateInsertRequest(i.added,f),u+=this.generateUpdateRequest(i.changed,f),u+=this.generateDeleteRequest(i.deleted,f),u+=f.cSet+"--\n",u+="--"+e+"--",{type:"POST",url:o,contentType:"multipart/mixed; charset=UTF-8;boundary="+e,data:u}},generateDeleteRequest:function(n,t){var i,u,r;if(!n)return"";for(i="",r=0;r<n.length;r++)i+="\n"+t.cSet+"\n",i+=l.changeSetContent+"\n\n",i+="DELETE ",u=typeof n[r][t.key]=="string"?"'"+n[r][t.key]+"'":n[r][t.key],i+=t.url+"("+u+") HTTP/1.1\n",i+="If-Match : * \n",i+="Accept: "+l.accept+"\n",i+="Content-Id: "+this.pvt.changeSet+++"\n",i+=l.batchChangeSetContentType+"\n";return i+"\n"},generateInsertRequest:function(n,t){var i,r;if(!n)return"";for(i="",r=0;r<n.length;r++)i+="\n"+t.cSet+"\n",i+=l.changeSetContent+"\n\n",i+="POST ",i+=t.url+" HTTP/1.1\n",i+="Accept: "+l.accept+"\n",i+="Content-Id: "+this.pvt.changeSet+++"\n",i+=l.batchChangeSetContentType+"\n\n",i+=JSON.stringify(n[r])+"\n";return i},generateUpdateRequest:function(n,t){var i,u,r;if(!n)return"";for(i="",r=0;r<n.length;r++)i+="\n"+t.cSet+"\n",i+=l.changeSetContent+"\n\n",i+="PUT ",u=typeof n[r][t.key]=="string"?"'"+n[r][t.key]+"'":n[r][t.key],i+=t.url+"("+u+") HTTP/1.1\n",i+="If-Match : * \n",i+="Accept: "+l.accept+"\n",i+="Content-Id: "+this.pvt.changeSet+++"\n",i+=l.batchChangeSetContentType+"\n\n",i+=JSON.stringify(n[r])+"\n\n";return i},_p:function(n){return n.replace(/\./g,"/")}});t.ODataV4Adaptor=(new t.ODataAdaptor).extend({options:{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$count",search:"$search",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 "},onCount:function(n){return n===!0?"true":""},onPredicate:function(n,i,r){var u="",f=n.value,e=f instanceof Date;return t.data.odUniOperator.contains="contains",u=t.ODataAdaptor.prototype.onPredicate.call(this,n,i,r),t.data.odUniOperator.contains="substringof",e&&(u=u.replace(/datetime'(.*)'$/,"$1")),u},onOperation:function(n,t,i,r,u){return u?(n+="("+i,n+=t,n+=r.replace(/["']/g,"")+")"):(n+=i,n+=t,n+=r),n},onEachSearch:function(n){var t=this.pvt.search||[];t.push(n.key);this.pvt.search=t},onSearch:function(){return this.pvt.search.join(" OR ")},beforeSend:function(){},processQuery:function(n,i){for(var f,o,e=/\/[\d*\/]*/g,u="",r=i._expands.length-1;r>0;r--)if(u.indexOf(i._expands[r])>=0)i._expands.pop();else if(e.test(i._expands[r])){for(u=i._expands.pop(),f=u.replace(e,"($expand="),o=0;o<u.split(e).length-1;o++)f=f+")";i._expands.unshift(f);r++}return t.ODataAdaptor.prototype.processQuery.apply(this,[n,i])},processResponse:function(i,r,f,e,o,s){var l=o&&o.ejPvtData,a,w,nt,k,tt,y,d,p,h,rt;if(e&&e.getResponseHeader("Content-Type")&&e.getResponseHeader("Content-Type").indexOf("xml")!=-1&&i.nodeType==9)return f._requiresCount?{result:[],count:0}:[];if(o&&this.options.batch&&o.url.endsWith(this.options.batch)&&o.type.toLowerCase()==="post"){if(a=e.getResponseHeader("Content-Type"),a=a.substring(a.indexOf("=batchresponse")+1),i=i.split(a),i.length<2)return;for(i=i[1],k=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(i),i.replace(k[0],""),tt=k[1],i=i.split(tt),h=i.length;h>-1;h--)/\bContent-ID:/i.test(i[h])&&/\bHTTP.+201/.test(i[h])&&(w=parseInt(/\bContent-ID: (\d+)/i.exec(i[h])[1]),s.added[w]&&(nt=u.parseJson(/^\{.+\}/m.exec(i[h])[0]),n.extend(s.added[w],this.processResponse(nt))));return s}if(y=null,d={},f&&f._requiresCount&&"@odata.count"in i&&(y=i["@odata.count"]),i=t.isNullOrUndefined(i.value)?i:i.value,l&&l.aggregates&&l.aggregates.length){var v=l.aggregates,g,it={};for(h=0;h<v.length;h++)g=t.aggregates[v[h].type],g&&(it[v[h].field+" - "+v[h].type]=g(i,v[h].field));d=it}if(l&&l.groups&&l.groups.length)for(p=l.groups,h=0;h<p.length;h++)rt=b(p[h],f.queries),i=t.group(i,p[h],l.aggregates,rt);return c(y)?i:{result:i,count:y,aggregates:d}}});t.JsonAdaptor=(new t.Adaptor).extend({processQuery:function(n,t){for(var u=n.dataSource.json.slice(0),o=u.length,s=!0,f,i,h={},e=0;e<t.queries.length;e++)i=t.queries[e],f=this[i.fn].call(this,u,i.e,t),i.fn=="onAggregates"?h[i.e.field+" - "+i.e.type]=f:u=f!==r?f:u,(i.fn==="onPage"||i.fn==="onSkip"||i.fn==="onTake"||i.fn==="onRange")&&(s=!1),s&&(o=u.length);return t._requiresCount&&(u={result:u,count:o,aggregates:h}),u},batchRequest:function(n,t,i){for(var r=0;r<t.added.length;r++)this.insert(n,t.added[r]);for(r=0;r<t.changed.length;r++)this.update(n,i.key,t.changed[r]);for(r=0;r<t.deleted.length;r++)this.remove(n,i.key,t.deleted[r]);return t},onWhere:function(n,t){return n?n.filter(function(n){return t.validate(n)}):n},onAggregates:function(n,i){var r=t.aggregates[i.type];return!n||!r||n.length==0?null:r(n,i.field)},onSearch:function(n,i){return!n||!n.length?n:(i.fieldNames.length===0&&t.pvt.getFieldList(n[0],i.fieldNames),n.filter(function(n){for(var r=0;r<i.fieldNames.length;r++)if(i.comparer.call(n,t.pvt.getObject(i.fieldNames[r],n),i.searchKey,i.ignoreCase,i.ignoreAccent))return!0;return!1}))},onSortBy:function(n,i,r){var o,u,f;if(!n)return n;if(u=e(i.fieldName,r),!u)return n.sort(i.comparer);if(u instanceof Array){for(u=u.slice(0),f=u.length-1;f>=0;f--)u[f]&&(o=i.comparer,u[f].endsWith(" desc")&&(o=t.pvt.fnSort(t.sortOrder.Descending),u[f]=u[f].replace(" desc","")),n=it(n,u[f],o,[]));return n}return it(n,u,i.comparer,r?r.queries:[])},onGroup:function(n,i,r){var u,o,s,f,h;if(!n)return n;if(u=a(r.queries,"onAggregates"),o=[],u.length)for(f=0;f<u.length;f++)s=u[f].e,o.push({type:s.type,field:e(s.field,r)});return h=b(i.fieldName,r.queries),t.group(n,e(i.fieldName,r),o,h)},onPage:function(n,t,i){var r=e(t.pageSize,i),u=(e(t.pageIndex,i)-1)*r,f=u+r;return n?n.slice(u,f):n},onRange:function(n,t){return n?n.slice(e(t.start),e(t.end)):n},onTake:function(n,t){return n?n.slice(0,e(t.nos)):n},onSkip:function(n,t){return n?n.slice(e(t.nos)):n},onSelect:function(n,i){return n?t.select(n,e(i.fieldNames)):n},insert:function(n,t){return n.dataSource.json.push(t)},remove:function(n,i,r){var f=n.dataSource.json,u;for(typeof r=="object"&&(r=t.getObject(i,r)),u=0;u<f.length;u++)if(t.getObject(i,f[u])===r)break;return u!==f.length?f.splice(u,1):null},update:function(i,r,u){for(var e=i.dataSource.json,o=t.getObject(r,u),f=0;f<e.length;f++)if(t.getObject(r,e[f])===o)break;return f<e.length?n.extend(e[f],u):null}});t.ForeignKeyAdaptor=function(i,u){var f=(new t[u||"JsonAdaptor"]).extend({init:function(){var r,n;for(this.foreignData=[],this.key=[],this.adaptorType=u,this.value=[],this.fValue=[],this.keyField=[],r=i,n=0;n<r.length;n++)this.foreignData[n]=r[n].dataSource,this.key[n]=r[n].foreignKeyField,this.fValue[n]=t.isNullOrUndefined(r[n].field)?r[n].foreignKeyValue:r[n].field+"_"+r[n].foreignKeyValue,this.value[n]=r[n].foreignKeyValue,this.keyField[n]=r[n].field||r[n].foreignKeyField,this.initial=!0},processQuery:function(n,i){var e=n.dataSource.json,u,f,r;if(this.initial){for(u=0;u<e.length;u++)for(f=this,r=0;r<this.foreignData.length;r++)this.foreignData[r].filter(function(n){t.getObject(f.key[r],n)==t.getObject(f.keyField[r],e[u])&&(e[u][f.fValue[r]]=t.getObject(f.value[r],n))});this.initial=!1}return this.base.processQuery.apply(this,[n,i])},setValue:function(i){for(var o,f,e,u=0;u<this.foreignData.length;u++)o=this,f=i[this.fValue[u]],typeof f!="string"||isNaN(f)||(f=t.parseFloat(f)),e=n.grep(o.foreignData[u],function(n){return n[o.value[u]]==f})[0],t.isNullOrUndefined(e)&&(e=n.grep(o.foreignData[u],function(n){return n[o.key[u]]==f})[0],t.getObject(this.value[u],e)!=r&&t.createObject(o.value[u],t.getObject(this.value[u],e),i)),t.getObject(this.value[u],e)!=r&&t.createObject(this.keyField[u],t.getObject(this.key[u],e),i)},insert:function(n,t,i){return this.setValue(t),{url:n.dataSource.insertUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify({value:t,table:i,action:"insert",antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""})}},update:function(n,i,r,u){return this.setValue(r),t.JsonAdaptor.prototype.update(n,i,r,u),{type:"POST",url:n.dataSource.updateUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify({value:r,action:"update",keyColumn:i,key:r[i],table:u,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""})}}});return n.extend(this,new f),this};t.remoteSaveAdaptor=(new t.JsonAdaptor).extend({beforeSend:t.UrlAdaptor.prototype.beforeSend,insert:t.UrlAdaptor.prototype.insert,update:t.UrlAdaptor.prototype.update,remove:t.UrlAdaptor.prototype.remove,addParams:t.UrlAdaptor.prototype.addParams,batchRequest:function(n,t,i,r){var u={changed:t.changed,added:t.added,deleted:t.deleted,action:"batch",table:i.url,key:i.key,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return r&&this.addParams({dm:n,query:r,params:r._params,reqParams:u}),{type:"POST",url:n.dataSource.batchUrl||n.dataSource.crudUrl||n.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u)}},processResponse:function(n,i,r,u,f,e,o){if(t.isNullOrUndefined(e))return n.d?n.d:n;n.d&&(n=n.d);n.added&&(e.added=t.parseJSON(n.added));n.changed&&(e.changed=t.parseJSON(n.changed));n.deleted&&(e.deleted=t.parseJSON(n.deleted));for(var s=0;s<e.added.length;s++)t.JsonAdaptor.prototype.insert(i,e.added[s]);for(s=0;s<e.changed.length;s++)t.JsonAdaptor.prototype.update(i,o,e.changed[s]);for(s=0;s<e.deleted.length;s++)t.JsonAdaptor.prototype.remove(i,o,e.deleted[s]);return n}});t.WebApiAdaptor=(new t.ODataAdaptor).extend({insert:function(n,t){return{type:"POST",url:n.dataSource.url,data:JSON.stringify(t)}},remove:function(n,t,i){return{type:"DELETE",url:n.dataSource.url+"/"+i,data:JSON.stringify(i)}},update:function(n,t,i){return{type:"PUT",url:n.dataSource.url,data:JSON.stringify(i)}},batchRequest:function(i,r,u){var e=u.guid=t.getGuid(l.batchPre),f=[];return n.each(r.added,function(n,t){f.push("--"+e);f.push("Content-Type: application/http; msgtype=request","");f.push("POST "+i.dataSource.insertUrl+" HTTP/1.1");f.push("Content-Type: application/json; charset=utf-8");f.push("Host: "+location.host);f.push("",t?JSON.stringify(t):"")}),n.each(r.changed,function(n,t){f.push("--"+e);f.push("Content-Type: application/http; msgtype=request","");f.push("PUT "+i.dataSource.updateUrl+" HTTP/1.1");f.push("Content-Type: application/json; charset=utf-8");f.push("Host: "+location.host);f.push("",t?JSON.stringify(t):"")}),n.each(r.deleted,function(n,t){f.push("--"+e);f.push("Content-Type: application/http; msgtype=request","");f.push("DELETE "+i.dataSource.removeUrl+"/"+t[u.key]+" HTTP/1.1");f.push("Content-Type: application/json; charset=utf-8");f.push("Host: "+location.host);f.push("",t?JSON.stringify(t):"")}),f.push("--"+e+"--",""),{type:"POST",url:i.dataSource.batchUrl||i.dataSource.crudUrl||i.dataSource.url,data:f.join("\r\n"),contentType:'multipart/mixed; boundary="'+e+'"'}},processResponse:function(n,i,r,u,f){var o=f&&f.ejPvtData,l,e,w;if(f&&f.type.toLowerCase()!="post"){var h=u&&u.getResponseHeader("DataServiceVersion"),a=null,y={};if(h=h&&parseInt(h,10)||2,r&&r._requiresCount&&(c(n.Count)||(a=n.Count)),h<3&&n.Items&&(n=n.Items),o&&o.aggregates&&o.aggregates.length){var s=o.aggregates,v,p={};for(e=0;e<s.length;e++)v=t.aggregates[s[e].type],v&&(p[s[e].field+" - "+s[e].type]=v(n,s[e].field));y=p}if(o&&o.groups&&o.groups.length)for(l=o.groups,e=0;e<l.length;e++)w=b(l[e],r.queries),n=t.group(n,l[e],o.aggregates,w);return c(a)?n:{result:n,count:a,aggregates:y}}}});e=function(n,t){return typeof n=="function"?n.call(t||{}):n};t.TableModel=function(i,r,u,e){var c,o,l,s;if(!p(this,t.TableModel))return new t.TableModel(r);for(p(r,Array)||f("ej.TableModel - Json Array is required"),c=[],l=h(ht,this),s=0;s<r.length;s++){o=new t.Model(r[s],this);o.state="unchanged";o.on("stateChange",l);e&&o.computes(e);c.push(o)}return this.name=i||"table1",this.rows=t.NotifierArray(c),this._deleted=[],this._events=n({}),this.dataManager=u,this._isDirty=!1,this};t.TableModel.prototype={on:function(n,t){this._events.on(n,t)},off:function(n,t){this._events.off(n,t)},setDataManager:function(n){this.dataManagar=n},saveChanges:function(){if(this.dataManager&&p(this.dataManager,t.DataManager)||f("ej.TableModel - saveChanges : Set the dataManager using setDataManager function"),this.isDirty()){var n=this.dataManager.saveChanges(this.getChanges(),this.key,this.name);n.done(h(function(n){for(var t=this.toArray(),i=0;i<t.length;i++)t.state==="added"&&t.set(this.key,n.added.filter(function(n){return n[this.key]===t.get(this.key)})[0][this.key]),t[i].markCommit();this._events.triggerHandler({type:"save",table:this})},this));n.fail(h(function(n){this.rejectChanges();this._events.triggerHandler({type:"reject",table:this,error:n})},this));this._isDirty=!1}},rejectChanges:function(){for(var t=this.toArray(),n=0;n<t.length;n++)t[n].revert(!0);this._isDirty=!1;this._events.triggerHandler({type:"reject",table:this})},insert:function(n){var i=new t.Model(n);i._isDirty=this._isDirty=!0;this.rows.push(i);this._events.triggerHandler({type:"insert",model:i,table:this})},update:function(n){var r;this.key||f("TableModel - update : Primary key should be assigned to TableModel.key");var i=n,t,u=this.key,e=i[u];t=this.rows.array.filter(function(n){return n.get(u)===e});t=t[0];for(r in i)t.set(r,i[r]);this._isDirty=!0;this._events.triggerHandler({type:"update",model:t,table:this})},remove:function(n){var t,i,e,u;for(this.key||f("TableModel - update : Primary key should be assigned to TableModel.key"),t=this.key,i=-1,n&&typeof n=="object"&&(n=n[t]!==r?n[t]:n.get(t)),u=0;u<this.rows.length();u++)if(this.rows.array[u].get(t)===n){i=u;break}i>-1&&(e=this.rows.removeAt(i),e.markDelete(),this._deleted.push({model:e,position:i}),this._isDirty=!0,this._events.triggerHandler({type:"remove",model:e,table:this}))},isDirty:function(){return this._isDirty},getChanges:function(){for(var i={added:[],changed:[]},r=this.toArray(),n=0;n<r.length;n++)i[r[n].state]&&i[r[n].state].push(r[n].json);return i.deleted=t.select(this._deleted,["model"]),i},toArray:function(){return this.rows.toArray()},setDirty:function(n,t){this._isDirty!==!!n&&(this._isDirty=!!n,this._events.triggerHandler({type:"dirty",table:this,model:t}))},get:function(n){return this.rows.array[n]},length:function(){return this.rows.array.length},bindTo:function(t){var i=nt,e=n(t.html()),f=this.toArray(),u,r;for(n.inArray(t.prop("tagName").toLowerCase(),["table","tbody"])&&(i=tt),i.insertBefore(t),t.detach().empty(),r=0;r<f.length;r++)u=e.clone(),f[r].bindTo(u),t.append(u);t.insertAfter(i);i.remove()}};nt=i?n(document.createElement("div")):{};tt=i?n(document.createElement("tr")):{};t.Model=function(i,r,u){typeof r=="string"&&(u=r,r=null);this.$id=et("m");this.json=i;this.table=r instanceof t.TableModel?r:null;this.name=u||this.table&&this.table.name;this.dataManager=r instanceof t.DataManager?r:r.dataManagar;this.actual={};this._events=n({});this.isDirty=!1;this.state="added";this._props=[];this._computeEls={};this._fields={};this._attrEls={};this._updates={};this.computed={}};t.Model.prototype={computes:function(t){n.extend(this.computed,t)},on:function(n,t){this._events.on(n,t)},off:function(n,t){this._events.off(n,t)},set:function(n,t){var i=this.json,e=n,f,u;for(n=n.split("."),u=0;u<n.length-1;u++)n=n[0],i=i[n[0]];this.isDirty=!0;this.changeState("changed",{from:"set"});f=i[n];this.actual[n]!==r||n in this.actual||(this.actual[n]=t);i[n]=t;this._updateValues(n,t);this._events.triggerHandler({type:e,current:t,previous:f,model:this})},get:function(n){return t.pvt.getObject(n,this.json)},revert:function(n){for(var t in this.actual)this.json[t]=this.actual[t];this.isDirty=!1;n?this.state="unchanged":this.changeState("unchanged",{from:"revert"})},save:function(i,r){return(i=i||this.dataManagar,r=r||i.dataSource.key,i||f("ej.Model - DataManager is required to commit the changes"),this.state==="added")?i.insert(this.json,this.name).done(t.proxy(function(t){n.extend(this.json,t.record)},this)):this.state==="changed"?i.update(r,this.json,this.name):this.state==="deleted"?i.remove(r,this.json,this.name):void 0},markCommit:function(){this.isDirty=!1;this.changeState("unchanged",{from:"commit"})},markDelete:function(){this.changeState("deleted",{from:"delete"})},changeState:function(t,i){if(this.state!==t){if(this.state==="added")if(t==="deleted")t="unchanged";else return;var r=t;i=i||{};this.state=t;this._events.triggerHandler(n.extend({type:"stateChange",current:t,previous:r,model:this},i))}},properties:function(){if(this._props.length)return this._props;for(var n in this.json)this._props.push(n),this._updates[n]={read:[],input:[]};return this._props},bindTo:function(t){var e=n(t),r,i,o=e.find("[ej-observe], [ej-computed], [ej-prop]"),s=o.length,u,f;for(e.data("ejModel",this),u={fields:[],props:[],computes:[]},f=0;f<s;f++){if(r=o.eq(f),i=r.attr("ej-prop"),i&&this._processAttrib(i,r,u),i=r.attr("ej-observe"),i&&this._props.indexOf(i)!==-1){this._processField(r,i,u);continue}if(i=r.attr("ej-computed"),i){this._processComputed(i,r,u);continue}}e.data("ejModelBinding"+this.$id,u)},unbind:function(t){var u,r={props:this._attrEls,computes:this._computeEls},f=!1,i,c,e,s,h,o;t&&(r=n(t).removeData("ejModel").data("ejModelBinding"+this.$id)||r,f=!0);for(i in this.computed)u=r.computes[i],i=this.computed[i],u&&i.deps&&(this.off(i.deps.join(" "),u.handle),f&&delete this._computeEls[i]);f||(this._computeEls={});for(i in r.props)u=r.props[i],u&&(this.off(u.deps.join(" "),u.handle),delete r.props[i],f&&delete this._attrEls[i]);if(f||(this._attrEls={}),r.fields&&r.fields.length)for(c=r.fields.length,o=0;o<c;o++)e=r.fields[o],n(e).off("change",null,this._changeHandler),h=this.formElements.indexOf(e.tagName.toLowerCase())!==-1?"input":"read",s=this._updates[h].indexOf(e),s!==-1&&this._updates[h].splice(s,1)},_processComputed:function(n,t,i){if(n){var r,u,f=st(n),e=this.formElements.indexOf(t[0].tagName.toLowerCase())!==-1?"val":"html";this.computed[n]&&this.computed[f]||(this.computed[f]={value:new Function("var e = this; return "+n),deps:this._generateDeps(n)},n=f);r=this.computed[n];r.get||(r.get=function(){r.value.call(this.json)});u=r.deps;r=r.value;this._updateDeps(u);this._updateElement(t,e,r);r={el:t,handle:h(this._computeHandle,this,{value:n,type:e})};this._computeEls[n]=r;i.computes[n]=r;this.on(u.join(" "),r.handle)}},_computeHandle:function(n){var t=this._computeEls[n.value];t&&this.computed[n.value]&&this._updateElement(t.el,n.type,this.computed[n.value].value)},_updateElement:function(t,i,r){t[i](r.call(n.extend({},this.json,this.computed)))},_updateDeps:function(n){for(var i=0;i<n.length;i++)!(n[i]in this.json)&&n[i]in this.computed&&t.merge(n,this.computed[n[i]].deps)},_generateDeps:function(n){for(var r=n.replace(/(^e\.)|( e\.)/g,"#%^*##ej.#").split("#%^*#"),t,u=[],i=0;i<r.length;i++)r[i].startsWith("#ej.#")&&(t=r[i].replace("#ej.#","").split(" ")[0],t&&this._props.indexOf(t)!==-1&&u.push(t));return u},_processAttrib:function(n,t,i){var e,o,u={},r,f;for(n=n.replace(/^ +| +$/g,"").split(";"),r=0;r<n.length;r++)(n[r]=n[r].split(":"),n[r].length<2)||(e=n[r][0].replace(/^ +| +$/g,"").replace(/^'|^"|'$|"$/g,""),u[e]=n[r][1].replace(/^ +| +$/g,"").replace(/^'|^"|'$|"$/g,""));n=u;f=[];for(e in n)f.push(n[e]);this._updateDeps(f);this._updateProps(t,n);u=et("emak");o={el:t,handle:h(this._attrHandle,this,u),value:n,deps:f};t.prop("ejmodelattrkey",u);i.props[u]=o;this._attrEls[u]=o;this.on(f.join(" "),o.handle)},_attrHandle:function(n){var t=this._attrEls[n];t&&this._updateProps(t.el,t.value)},_updateProps:function(t,i){var f=this.json,r,u=this.computed;for(var e in i)r=i[e],r in f?r=f[r]:r in u&&(r=u[r],r&&(r=r.value.call(n.extend({},this.json,u)))),c(r)||t.prop(e,r)},_updateValues:function(n,t){var i=this._updates[n];i&&(i.read||i.input)&&(this._ensureItems(i.read,"html",t),this._ensureItems(i.input,"val",t))},_ensureItems:function(t,i,r){if(t)for(var u=t.length-1;u>-1;u--){if(!t[u].offsetParent){t.splice(u,1);continue}n(t[u])[i](r)}},_changeHandler:function(t){t.data.self.set(t.data.prop,n(this).val())},_processField:function(n,t,i){var u={self:this,prop:t},r=this.get(t);if(i.fields.push(n[0]),this.formElements.indexOf(n[0].tagName.toLowerCase())===-1)return n.html(r),this._updates[t].read.push(n[0]);n.val(r).off("change",null,this._changeHandler).on("change",null,u,this._changeHandler);return this._updates[t].input.push(n[0])},formElements:["input","select","textarea"]};var ot=/[^\w]+/g,st=function(n){return n.replace(ot,"_")},ht=function(n){this.setDirty(!0,n.model)};if(t.Predicate=function(n,i,r,u,f){if(!(this instanceof t.Predicate))return new t.Predicate(n,i,r,u,f);if(this.ignoreAccent=!1,typeof n=="string"){var e="";i.toLowerCase().indexOf(" any")!=-1?(i=i.replace(" any",""),e="any"):i.toLowerCase().indexOf(" all")!=-1&&(i=i.replace(" all",""),e="all");this.field=n;this.operator=i;this.value=r;this.ignoreCase=u;this.ignoreAccent=f;this.isComplex=!1;this.anyCondition=e;this._comparer=t.data.fnOperators.processOperator(e!=""?e:this.operator)}else(n instanceof t.Predicate&&r instanceof t.Predicate||r instanceof Array)&&(this.isComplex=!0,this.condition=i.toLowerCase(),this.predicates=[n],r instanceof Array?[].push.apply(this.predicates,r):this.predicates.push(r));return this},t.Predicate.and=function(){return y._combinePredicates([].slice.call(arguments,0),"and")},t.Predicate.or=function(){return y._combinePredicates([].slice.call(arguments,0),"or")},t.Predicate.fromJSON=function(n){var i,t,r;if(p(n,Array)){for(i=[],t=0,r=n.length;t<r;t++)i.push(y._fromJSON(n[t]));return i}return y._fromJSON(n)},y={_combinePredicates:function(n,i){if(!n.length)return r;if(n.length===1){if(!p(n[0],Array))return n[0];n=n[0]}return new t.Predicate(n[0],i,n.slice(1))},_combine:function(n,i,r,u,e,o,s){return i instanceof t.Predicate?t.Predicate[e](n,i):typeof i=="string"?t.Predicate[e](n,new t.Predicate(i,r,u,o,s)):f("Predicate - "+e+" : invalid arguments")},_fromJSON:function(n){var i;if(!n||p(n,t.Predicate))return n;var u=n.predicates||[],f=u.length,r=[];for(i=0;i<f;i++)r.push(y._fromJSON(u[i]));return n.isComplex?new t.Predicate(r[0],n.condition,r.slice(1)):new t.Predicate(n.field,n.operator,t.parseJSON({val:n.value}).val,n.ignoreCase,n.ignoreAccent)}},t.Predicate.prototype={and:function(n,t,i,r,u){return y._combine(this,n,t,i,"and",r,u)},or:function(n,t,i,r,u){return y._combine(this,n,t,i,"or",r,u)},validate:function(n){var f=this.predicates,r,u,i;if(!this.isComplex)return this._comparer.call(this,t.pvt.getObject(this.field,n),this.value,this.ignoreCase,this.ignoreAccent);for(r=this.condition==="and",i=0;i<f.length;i++)if(u=f[i].validate(n),r){if(!u)return!1}else if(u)return!0;return r},toJSON:function(){var t,i,n;if(this.isComplex)for(t=[],i=this.predicates,n=0;n<i.length;n++)t.push(i[n].toJSON());return{isComplex:this.isComplex,field:this.field,operator:this.operator,value:this.value,ignoreCase:this.ignoreCase,ignoreAccent:this.ignoreAccent,condition:this.condition,predicates:t,anyCondition:this.anyCondition}}},t.dataUtil={swap:function(n,t,i){if(t!=i){var r=n[t];n[t]=n[i];n[i]=r}},mergeSort:function(n,i,r){return r&&typeof r!="string"||(r=t.pvt.fnSort(r,!0)),typeof i=="function"&&(r=i,i=null),t.pvt.mergeSort(n,i,r)},max:function(n,i,r){return typeof i=="function"&&(r=i,i=null),t.pvt.getItemFromComparer(n,i,r||t.pvt.fnDescending)},min:function(n,i,r){return typeof i=="function"&&(r=i,i=null),t.pvt.getItemFromComparer(n,i,r||t.pvt.fnAscending)},distinct:function(n,t,i){for(var f=[],r,e={},u=0;u<n.length;u++)r=v(n,t,u),r in e||(f.push(i?n[u]:r),e[r]=1);return f},sum:function(n,t){for(var u=0,i,f=typeof v(n,t,0)!="number",r=0;r<n.length;r++)i=v(n,t,r),isNaN(i)||i===null||(f&&(i=+i),u+=i);return u},avg:function(n,i){return t.sum(n,i)/n.length},select:function(n,i){for(var u=[],r=0;r<n.length;r++)u.push(t.pvt.extractFields(n[r],i));return u},group:function(i,r,u,f,e,o){var p,a,c,h,k,l,b,y,s,w;if(e=e||1,i.GROUPGUID==t.pvt.consts.GROUPGUID){for(s=0;s<i.length;s++)t.isNullOrUndefined(o)?(i[s].items=t.group(i[s].items,r,u,f,i.level+1),i[s].count=i[s].items.length):(p=-1,w=n.grep(o,function(n){return n.key==i[s].key}),p=o.indexOf(w[0]),i[s].items=t.group(i[s].items,r,u,f,i.level+1,o[p].items),i[s].count=o[p].count);return i.childLevels+=1,i}for(a={},c=[],c.GROUPGUID=t.pvt.consts.GROUPGUID,c.level=e,c.childLevels=0,c.records=i,l=0;l<i.length;l++)h=v(i,r,l),t.isNullOrUndefined(f)||(h=f(h,r)),a[h]||(a[h]={key:h,count:0,items:[],aggregates:{},field:r},c.push(a[h]),t.isNullOrUndefined(o)||(k=n.grep(o,function(n){return n.key==a[h].key}),a[h].count=k[0].count)),a[h].count=t.isNullOrUndefined(o)?a[h].count+=1:a[h].count,a[h].items.push(i[l]);if(u&&u.length)for(l=0;l<c.length;l++){for(b={},s=0;s<u.length;s++)y=t.aggregates[u[s].type],t.isNullOrUndefined(o)?y&&(b[u[s].field+" - "+u[s].type]=y(c[l].items,u[s].field)):(w=n.grep(o,function(n){return n.key==c[l].key}),y&&(b[u[s].field+" - "+u[s].type]=y(w[0].items,u[s].field)));c[l].aggregates=b}return c},parseTable:function(i,r,u){var s=i.rows,h,v=[],y=[],f,c,l,a,e,o;if(!s.length)return[];u=u||0;switch((r||"").toLowerCase()){case t.headerOption.tHead:h=i.tHead.rows[u];break;case t.headerOption.row:default:h=i.rows[u]}for(c=h.cells,f=0;f<c.length;f++)v.push(n.trim(c[f].innerHTML));for(f=u+1;f<s.length;f++){for(l={},a=s[f].cells,e=0;e<a.length;e++)o=a[e].innerHTML,l[v[e]]=typeof o=="string"&&n.isNumeric(o)?Number(o):o;y.push(l)}return y}},t.headerOption={tHead:"thead",row:"row"},t.aggregates={sum:function(n,i){return t.sum(n,i)},average:function(n,i){return t.avg(n,i)},minimum:function(n,i){return t.getObject(i,t.min(n,i))},maximum:function(n,i){return t.getObject(i,t.max(n,i))},truecount:function(n,i){var r=t.Predicate(i,"equal",!0);return t.DataManager(n).executeLocal(t.Query().where(r)).length},falsecount:function(n,i){var r=t.Predicate(i,"equal",!1);return t.DataManager(n).executeLocal(t.Query().where(r)).length},count:function(n){return n.length}},t.pvt={filterQueries:a,mergeSort:function(n,i,r){if(n.length<=1)return n;var e=parseInt(n.length/2,10),u=n.slice(0,e),f=n.slice(e);return u=t.pvt.mergeSort(u,i,r),f=t.pvt.mergeSort(f,i,r),t.pvt.merge(u,f,i,r)},getItemFromComparer:function(n,i,r){var f,e,o,u=0,s=typeof v(n,i,0)=="string";if(n.length)while(t.isNullOrUndefined(f)&&u<n.length)f=v(n,i,u),o=n[u++];for(;u<n.length;u++)(e=v(n,i,u),t.isNullOrUndefined(e))||(s&&(f=+f,e=+e),r(f,e)>0&&(f=e,o=n[u]));return o},quickSelect:function(n,i,r,u,f,e){if(r==u)return n[r];var o=t.pvt.partition(n,i,r,u,e),s=o-r+1;return s==f?n[o]:f<s?t.pvt.quickSelect(n,i,r,o-1,f,e):t.pvt.quickSelect(n,i,o+1,u,f-s,e)},extractFields:function(n,i){var u={},r;if(i.length==1)return t.pvt.getObject(i[0],n);for(r=0;r<i.length;r++)u[i[r].replace(".",t.pvt.consts.complexPropertyMerge)]=t.pvt.getObject(i[r],n);return u},partition:function(n,i,r,u,f){var e=parseInt((r+u)/2,10),s=v(n,i,e),o;for(t.swap(n,e,u),e=r,o=r;o<u;o++)f(v(n,i,o),s)&&(t.swap(n,o,e),e++);return t.swap(n,e,u),e},fnSort:function(n){return(n=n?n.toLowerCase():t.sortOrder.Ascending,n==t.sortOrder.Ascending)?t.pvt.fnAscending:t.pvt.fnDescending},fnGetComparer:function(n,i){return function(r,u){return i(t.pvt.getObject(n,r),t.pvt.getObject(n,u))}},fnAscending:function(n,i){return t.isNullOrUndefined(i)&&t.isNullOrUndefined(n)?-1:i===null||i===r?-1:typeof n=="string"?n.localeCompare(i):n===null||n===r?1:n-i},fnDescending:function(n,i){return t.isNullOrUndefined(i)&&t.isNullOrUndefined(n)?-1:i===null||i===r?1:typeof n=="string"?n.localeCompare(i)*-1:n===null||n===r?-1:i-n},merge:function(n,t,i,r){for(var u=[],f;n.length>0||t.length>0;)f=n.length>0&&t.length>0?r?r(v(n,i,0),v(t,i,0))<=0?n:t:n[0][i]<n[0][i]?n:t:n.length>0?n:t,u.push(f.shift());return u},getObject:function(n,t){var i,f,u;if(!t)return r;if(!n)return t;if(n.indexOf(".")===-1)return t[n];for(i=t,f=n.split("."),u=0;u<f.length;u++){if(i==null)break;i=i[f[u]]}return i},createObject:function(n,t,i){for(var f=n.split("."),o=i||window,e=o,u=0;u<f.length;u++)u+1==f.length?e[f[u]]=t===r?{}:t:e[f[u]]==null&&(e[f[u]]={}),e=e[f[u]];return o},ignoreDiacritics:function(n){if(typeof n!="string")return n;var i=n.split(""),r=i.map(function(n){return n in t.data.diacritics?t.data.diacritics[n]:n});return r.join("")},getFieldList:function(n,i,u){if(u===r&&(u=""),i===r||i===null)return t.pvt.getFieldList(n,[],u);for(var f in n)typeof n[f]!="object"||n[f]instanceof Array?i.push(u+f):t.pvt.getFieldList(n[f],i,u+f+".");return i}},t.FilterOperators={lessThan:"lessthan",greaterThan:"greaterthan",lessThanOrEqual:"lessthanorequal",greaterThanOrEqual:"greaterthanorequal",equal:"equal",contains:"contains",startsWith:"startswith",endsWith:"endswith",notEqual:"notequal"},t.data={},t.data.operatorSymbols={"<":"lessthan",">":"greaterthan","<=":"lessthanorequal",">=":"greaterthanorequal","==":"equal","!=":"notequal","*=":"contains","$=":"endswith","^=":"startswith"},t.data.odBiOperator={"<":" lt ",">":" gt ","<=":" le ",">=":" ge ","==":" eq ","!=":" ne ",lessthan:" lt ",lessthanorequal:" le ",greaterthan:" gt ",greaterthanorequal:" ge ",equal:" eq ",notequal:" ne ","in":" eq ",notin:" ne "},t.data.odUniOperator={"$=":"endswith","^=":"startswith","*=":"substringof",endswith:"endswith",startswith:"startswith",contains:"substringof",notcontains:"substringof"},t.data.diacritics={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},t.data.fnOperators={equal:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?s(n)==s(i):n==i},notequal:function(n,i,r,u){return u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),!t.data.fnOperators.equal(n,i,r)},notin:function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators.notequal(n,i[u],r)==!1)return!1;return!0},lessthan:function(n,t,i){return i?s(n)<s(t):n<t},greaterthan:function(n,t,i){return i?s(n)>s(t):n>t},lessthanorequal:function(n,t,i){return i?s(n)<=s(t):n<=t},greaterthanorequal:function(n,t,i){return i?s(n)>=s(t):n>=t},contains:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?!c(n)&&!c(i)&&s(n).indexOf(s(i))!=-1:!c(n)&&!c(i)&&n.toString().indexOf(i)!=-1},notcontains:function(n,i,r,u){return u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),!t.data.fnOperators.contains(n,i,r)},notnull:function(n){return n!==null},isnull:function(n){return n===null},startswith:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?n&&i&&s(n).startsWith(s(i)):n&&i&&n.startsWith(i)},endswith:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?n&&i&&s(n).endsWith(s(i)):n&&i&&n.endsWith(i)},all:function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators[this.operator](n,i[u],r)==!1)return!1;return!0},any:function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators[this.operator](n,i[u],r)==!0)return!0;return!1},processSymbols:function(n){var r=t.data.operatorSymbols[n],i;return r&&(i=t.data.fnOperators[r],i)?i:f("Query - Process Operator : Invalid operator")},processOperator:function(n){var i=t.data.fnOperators[n];return i?i:t.data.fnOperators.processSymbols(n)}},t.data.fnOperators["in"]=function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators.equal(n,i[u],r)==!0)return!0;return!1},t.NotifierArray=function(i){return p(this,t.NotifierArray)?(this.array=i,this._events=n({}),this._isDirty=!1,this):new t.NotifierArray(i)},t.NotifierArray.prototype={on:function(n,t){this._events.on(n,t)},off:function(n,t){this._events.off(n,t)},push:function(n){var t;return t=p(n,Array)?[].push.apply(this.array,n):this.array.push(n),this._raise("add",{item:n,index:this.length()-1}),t},pop:function(){var n=this.array.pop();return this._raise("remove",{item:n,index:this.length()-1}),n},addAt:function(n,t){return this.array.splice(n,0,t),this._raise("add",{item:t,index:n}),t},removeAt:function(n){var t=this.array.splice(n,1)[0];return this._raise("remove",{item:t,index:n}),t},remove:function(n){var t=this.array.indexOf(n);return t>-1&&(this.array.splice(t,1),this._raise("remove",{item:n,index:t})),t},length:function(){return this.array.length},_raise:function(t,i){this._events.triggerHandler(n.extend({type:t},i));this._events.triggerHandler({type:"all",name:t,args:i})},toArray:function(){return this.array}},n.extend(t,t.dataUtil),Array.prototype.forEach=Array.prototype.forEach||function(n,t){for(var i=0,r=this.length;i<r;++i)n.call(t,this[i],i,this)},Array.prototype.indexOf=Array.prototype.indexOf||function(n){var i=this.length,t;if(i===0)return-1;for(t=0;t<i;t++)if(t in this&&this[t]===n)return t;return-1},Array.prototype.filter=Array.prototype.filter||function(n){var i,u,t,r;if(typeof n!="function")throw new TypeError;for(i=[],u=arguments[1]||this,t=0;t<this.length;t++)r=this[t],n.call(u,r,t,this)&&i.push(r);return i},String.prototype.endsWith=String.prototype.endsWith||function(n){return this.slice(-n.length)===n},String.prototype.startsWith=String.prototype.startsWith||function(n){return this.slice(0,n.length)===n},t.support||(t.support={}),t.support.stableSort=function(){for(var t=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16].sort(function(){return 0}),n=0;n<17;n++)if(n!==t[n])return!1;return!0}(),t.support.cors=n.support.cors,!n.support.cors&&window.XDomainRequest){var ct=/^https?:\/\//i,lt=/^get|post$/i,at=new RegExp("^"+location.protocol,"i"),vt=/\/xml/i;n.ajaxTransport("text html xml json",function(n,t){if(n.crossDomain&&n.async&&lt.test(n.type)&&ct.test(t.url)&&at.test(t.url)){var i=null,u=(t.dataType||"").toLowerCase();return{send:function(f,e){i=new XDomainRequest;/^\d+$/.test(t.timeout)&&(i.timeout=t.timeout);i.ontimeout=function(){e(500,"timeout")};i.onload=function(){var o="Content-Length: "+i.responseText.length+"\r\nContent-Type: "+i.contentType,t={code:200,message:"success"},f={text:i.responseText},n;try{if(u==="json")try{f.json=JSON.parse(i.responseText)}catch(h){t.code=500;t.message="parseerror"}else if(u==="xml"||u!=="text"&&vt.test(i.contentType)){n=new ActiveXObject("Microsoft.XMLDOM");n.async=!1;try{n.loadXML(i.responseText)}catch(h){n=r}if(!n||!n.documentElement||n.getElementsByTagName("parsererror").length){t.code=500;t.message="parseerror";throw"Invalid XML: "+i.responseText;}f.xml=n}}catch(s){throw s;}finally{e(t.code,t.message,f,o)}};i.onerror=function(){e(500,"error",{text:i.responseText})};navigator.userAgent.indexOf("MSIE 9.0")!=-1&&(i.onprogress=function(){});i.open(n.type,n.url);i.send(t.data)},abort:function(){i&&i.abort()}}}})}n.support.cors=!0;t.sortOrder={Ascending:"ascending",Descending:"descending"};t.pvt.consts={GROUPGUID:"{271bbba0-1ee7}",complexPropertyMerge:"_"};d=function(n,t){t&&(n=h(n,t));(window.setImmediate||window.setTimeout)(n,0)};t.support.enableLocalizedSort=!1;var it=function(n,i,r,u){return t.support.stableSort?!t.support.enableLocalizedSort&&typeof t.pvt.getObject(i,n[0]||{})=="string"&&(r===t.pvt.fnAscending||r===t.pvt.fnDescending)&&u.filter(function(n){return n.fn==="onSortBy"}).length===1?yt(n,i,r===t.pvt.fnDescending):n.sort(t.pvt.fnGetComparer(i,r)):t.mergeSort(n,i,r)},b=function(i,r){for(var f=n.grep(r,function(n){return n.fn=="onGroup"}),u=0;u<f.length;u++)if(t.getObject("fieldName",f[u].e)==i)return t.getObject("fn",f[u].e)},yt=function(n,i,r){var u=Object.prototype.toString;Object.prototype.toString=i.indexOf(".")===-1?function(){return this[i]}:function(){return t.pvt.getObject(i,this)};n=n.sort();Object.prototype.toString=u;r&&n.reverse()},s=function(n){return n?n.toLowerCase?n.toLowerCase():n.toString().toLowerCase():n===0||n===!1?n.toString():""},v=function(n,i,r){return i?t.pvt.getObject(i,n[r]):n[r]},pt=function(n){return typeof HTMLElement=="object"?n instanceof HTMLElement:n&&n.nodeType===1&&typeof n=="object"&&typeof n.nodeName=="string"},p=function(n,t){return n instanceof t},rt=function(n,i,r,u){return function(f){return typeof f=="object"&&(u=f,f=null),new t.TableModel(f||n,i,r,u)}},ut=function(t){return function(i,r){var o,h,e,u,s;for(r=r||window.ko,r||f("Knockout is undefined"),h=[],s=0;s<t.length;s++){o={};for(e in t[s])e.startsWith("_")||(o[e]=r.observable(t[s][e]));for(e in i)u=i[e],n.isPlainObject(u)?(u.owner||(u.owner=o),u=r.computed(u)):u=r.computed(u,o),o[e]=u;h.push(o)}return r.observableArray(h)}},ft=0,et=function(n){return ft+=1,n+ft};t.getGuid=function(n){var i="0123456789abcdef",t;return(n||"")+"00000000-0000-4000-0000-000000000000".replace(/0/g,function(n,r){if("crypto"in window&&"getRandomValues"in crypto){var u=new Uint8Array(1);window.crypto.getRandomValues(u);t=u[0]%16|0}else t=Math.random()*16|0;return i[r===19?t&3|8:t]})};w=function(n,t){return function(){var i=[].slice.call(arguments,0);return i.push(this),n.apply(t||this,i)}};h=function(n,t,i){return"bind"in n?i?n.bind(t,i):n.bind(t):function(){var r=i?[i]:[];return r.push.apply(r,arguments),n.apply(t||this,r)}};t.merge=function(n,t){n&&t&&Array.prototype.push.apply(n,t)};c=function(n){return n===r||n===null};f=function(n){try{throw new Error(n);}catch(t){throw t.message+"\n"+t.stack;}}}(window.jQuery,window.Syncfusion,window.document),function(n,t){function k(){var n={},t=[],i={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,msie:/(msie) ([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in i)if(i.hasOwnProperty(r)&&(t=navigator.userAgent.match(i[r]),t)){n.name=t[1].toLowerCase();n.version=t[2];!navigator.userAgent.match(/Trident\/7\./)||(n.name="msie");break}return n.isMSPointerEnabled=n.name=="msie"&&n.version>9&&window.navigator.msPointerEnabled,n.pointerEnabled=window.navigator.pointerEnabled,n}function a(t,i,r){var u=r.type;r.type=i;n.event.dispatch.call(t,r);r.type=u}function it(n,t){if(t)for(prop in t)prop in n||(n[prop]=t[prop])}function o(n){return n.originalEvent.touches?n.originalEvent.touches[0]:i?n.originalEvent:n}function d(n){var r=i?n.originalEvent.pointerType:n.originalEvent.touches?"touch":"mouse",u=i&&l==t?r==4?"mouse":"touch":r;return n.pointerType=u,n.type!="mousedown"&&n.type!="mouseup"&&it(n,n.originalEvent),u=="touch"&&(n.button=t),n}function s(t,i,r){var o,s,h,u={},e,f;return r&&(f=r.originalEvent.touches?[r.originalEvent.touches[0],t.originalEvent.changedTouches[0]]:[r.originalEvent,t.originalEvent],i._isSwipe||i._isdrag?(o=n.event.special.pinch._getdistance(f[0],f[1]),s=i.time,e={pageX:i.stopPoint.pageX,pageY:i.stopPoint.pageY}):i._isPinch&&(o=n.event.special.pinch.distance(t),s=t.timeStamp-r.timeStamp,h=i._pinchDistance),i._isDelta&&(u._dTime=t.timeStamp-r.timeStamp,u._x=f[1].pageX-f[0].pageX,u._y=f[1].pageY-f[0].pageY)),{options:t,delta:{time:u._dTime||null,X:u._x||null,Y:u._y||null},distance:o,scale:i._isPinch?h:null,time:s,velocity:{XY:o/u._dTime||null,X:u._x/u._dTime||null,Y:u._y/u._dTime||null},currentPosition:{pageX:e?e.pageX:null,pageY:e?e.pageY:null}}}function h(){var n=new Date;return n.getTime()}function v(n){i&&n.css("-ms-touch-action","pinch-zoom").css("touch-action","pinch-zoom")}var c=n(document);n.each("touchstart touchmove touchend tap doubletap taphold swipe swipeleft swiperight pinch pinchin pinchout pinchstop scrollstart scrollstop".split(" "),function(t,i){n.fn[i]=function(n){return n?this.on(i,n):this.trigger(i)};n.attrFn&&(n.attrFn[i]=!0)});var i=k().isMSPointerEnabled,l=k().pointerEnabled,y="ontouchstart"in window,rt="scroll",p=typeof orientation=="undefined",g=navigator.userAgent.match(/iPhone|iPad|iPod/i),u=i?l?"pointerdown":"MSPointerDown":y?"touchstart":"mousedown",f=i?l?"pointerup":"MSPointerUp":g?"touchend":y?"touchend":"mouseup",r=i?l?"pointermove":"MSPointerMove":y?"touchmove":"mousemove",w=i?l?"pointercancel":"MSPointerCancel":y?"touchcancel":"mouseleave",ut=i||!p?u:g?"touchstart":"touchstart mousedown",e=i||!p?f:"touchend mouseup",b=i||!p?r:"touchmove mousemove",nt=k(),tt=nt.name=="msie"&&nt.version=="9.0"?!0:!1;n.event.special.ejtouchmove={setup:function(){function s(){}function h(n){if(n.originalEvent&&!(n.which&&n.which!==1)){var f=n.target,u=n.originalEvent;i&&(t={x:u.x,y:u.y});o.on(r,l)}}function l(n){if(!(n.which&&n.which!==1)){var u=n.target,r=n.originalEvent;it(n,n.originalEvent);(!i||!t||Math.abs(t.x-r.x)>10||Math.abs(t.y-r.y)>10&&i)&&a(e,"ejtouchmove",n)}}var e=this,o=n(e),t;o.on(u,h);c.on(f,s);t={}}};n.event.special.swipeupdown={setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){function l(n){if(n.preventDefault(),e){var t=o(n);h={time:(new Date).getTime(),coords:[t.pageX,t.pageY]};Math.abs(e.coords[1]-h.coords[1])>10&&n.preventDefault()}}if(u.originalEvent){var a=u,c=o(u),e={time:(new Date).getTime(),coords:[c.pageX,c.pageY],origin:n(u.target)},h;i.on(r,l).one(f,function(u){if(i.off(r,l),e&&h&&h.time-e.time<1e3&&Math.abs(e.coords[1]-h.coords[1])>30&&Math.abs(e.coords[0]-h.coords[0])<75){var o={time:h.time-e.time,_isSwipe:!0,_isDelta:!0,stopPoint:h},f=s(u,o,a);e.origin.trigger(n.extend(!0,{type:"swipeupdown"},f)).trigger(n.extend(!0,{type:e.coords[1]>h.coords[1]?"swipeup":"swipedown"},f))}e=h=t})}})}};n.event.special.scrollstart={isEnabled:!0,setup:function(){function u(n,r){t=r;a(i,t?"scrollstart":"scrollstop",n)}var i=this,f=n(i),t,r;f.on(rt,function(i){n.event.special.scrollstart.isEnabled&&(t||u(i,!0),clearTimeout(r),r=setTimeout(function(){u(i,!1)},250))})}};n.event.special.tap={doubleTapThreshold:500,tapholdThreshold:650,canDoubleTap:function(t){return h()-t.doubleTapStartTime<=n.event.special.tap.doubleTapThreshold},setup:function(){var u=this,i=n(u),t=i.data(),r;v(i);t.isDoubleTapWait=!1;t.stopProcess=!1;t.preTouchend=null;t.preTouchstart=null;i.on(ut,function(f){function o(){clearTimeout(v);i.off(e,s);tt&&c.off(e,s);c.off(e,o);i.off(w,o);i.off(b,y);i.off("dragstart",it)}function y(n){var t=10,r=n.originalEvent.changedTouches?n.originalEvent.changedTouches[0]:n.originalEvent,u=f.originalEvent.changedTouches?f.originalEvent.changedTouches[0]:f.originalEvent;r.pageX-u.pageX<t&&r.pageX-u.pageX>-t&&r.pageY-u.pageY<t&&r.pageY-u.pageY>-t||(n.type=="mousemove"||n.type=="pointermove"&&n.originalEvent.pointerType=="mouse"||n.type=="MSPointerMove"&&n.originalEvent.pointerType==4?(clearTimeout(v),i.off(w,o),i.off(b,y)):o())}function s(i){var e,s;i.type=="touchend"&&(t.preTouchend=h());o();r!=i.target&&(i.type=="mouseup"||f.type=="pointerup"||"MSPointerUp")&&(e=i.target,jQuery.contains(r,e)?nt(i,r):jQuery.contains(e,r)||(s=n(r).parents().has(n(e)).first()[0],ej.isNullOrUndefined(s)||nt(i,s)));g===i.currentTarget&&(a(u,"tap",n.extend(d(i),{time:h()-t.startTime})),t.isDoubleTapWait&&n.event.special.tap.canDoubleTap(t)?(t.isDoubleTapWait=!1,a(u,"doubletap",n.extend(d(i),{time:h()-t.doubleTapStartTime}))):(t.isDoubleTapWait&&(t.isDoubleTapWait=!1,t.doubleTapStartTime=t.startTime),n.event.special.tap.canDoubleTap(t)&&(t.isDoubleTapWait=!0)))}function nt(n,t){n.target=t;n.toElement=t}function it(){o()}var g,l,v,p,k;if(f.originalEvent)if((f.type=="mousedown"||f.type=="pointerdown"||"MSPointerDown")&&(r=f.target),t=i.data(),t.startTime=h(),t.isDoubleTapWait||(t.doubleTapStartTime=t.startTime),f.type=="touchstart"&&(t.preTouchstart=t.startTime),t.stopProcess=f.type=="mousedown"&&(t.startTime-t.preTouchend<300||t.startTime-t.preTouchstart<30)?!0:!1,g=f.currentTarget,l=f.originalEvent,f.which&&f.which!==1||t.stopProcess)t.stopProcess&&(t.stopProcess=!1);else{i.on(e,s);c.on(e,o);if(tt)c.on(e,s);i.on(w,o);i.on(b,y);i.on("dragstart",it);p={};for(k in l)p[k]=l[k];v=setTimeout(function(){t.isDoubleTapWait&&(t.isDoubleTapWait=!1);a(u,"taphold",n.extend(d(f),{options:p,time:h()-t.startTime}))},n.event.special.tap.tapholdThreshold)}})}};n.event.special.swipe={scrollSupression:10,duration:1e3,horizontalDistance:30,verticalDistance:75,pointers:window.navigator.msPointerEnabled,startPoint:function(t){var i=o(t);return{time:(new Date).getTime(),Items:i,coords:[i.pageX,i.pageY],origin:n(t.target)}},stopPoint:function(n){var t=o(n);return{time:(new Date).getTime(),Items:t,coords:[t.pageX,t.pageY]}},handleSwipe:function(t,i,r,u){if((t.Items.pageY!=t.Items.clientY||i.Items.pageY!=i.Items.clientY)&&(n.event.special.swipe.horizontalDistance=130),i.time-t.time<n.event.special.swipe.duration&&Math.abs(t.coords[0]-i.coords[0])>n.event.special.swipe.horizontalDistance&&Math.abs(t.coords[1]-i.coords[1])<n.event.special.swipe.verticalDistance){var e={time:i.time-t.time,_isSwipe:!0,_isDelta:!0,stopPoint:i},f=s(r,e,u);t.origin.trigger(n.extend(!0,{type:"swipe"},f)).trigger(n.extend(!0,{type:t.coords[0]>i.coords[0]?"swipeleft":"swiperight"},f))}},setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){function s(t){e&&(o=n.event.special.swipe.stopPoint(t),Math.abs(e.coords[0]-o.coords[0])>n.event.special.swipe.scrollSupression&&t.preventDefault())}if(u.originalEvent){var e=n.event.special.swipe.startPoint(u),o,h=u;n(u.target).data("_dataTouchStart",{event:u,_now:(new Date).getTime()});i.on(r,s).one(f,function(u){i.off(r,s);e&&o&&n.event.special.swipe.handleSwipe(e,o,u,h);e=o=t})}})}};n.event.special.pinch={distance:function(t){return t.originalEvent.touches.length<2?null:n.event.special.pinch._getdistance(t.originalEvent.touches[0],t.originalEvent.touches[1])},_getdistance:function(n,t){return Math.sqrt((n.pageX-t.pageX)*(n.pageX-t.pageX)+(n.pageY-t.pageY)*(n.pageY-t.pageY))},setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){var h;if(u.originalEvent&&(h=u,u.originalEvent.touches&&u.originalEvent.touches.length>=2)){var o=n.event.special.pinch.distance(u),e,v=5,c=o,l,y=s(u,{_isPinch:!0,_pinchDistance:c},h);n(u.target).trigger(n.extend(!0,{type:"pinch"},y));function a(t){l=t;e=n.event.special.pinch.distance(t)||null;o&&e&&Math.abs(o-e)>v&&(n(t.target).trigger(n.extend(!0,{type:o>e?"pinchin":"pinchout"},s(t,{_isPinch:!0,_pinchDistance:c},h))),o=e)}i.on(r,a).one(f,function(){i.off(r,a);n(u.target).trigger(n.extend(!0,{type:"pinchstop"},s(l,{_isPinch:!0,_pinchDistance:e},h)));o=e=t})}})}};n.event.special.touchdrag={setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){function c(t){h&&(e=o(t),n.event.special.pinch._getdistance(h,e)>5&&n(t.target).trigger(n.extend(!0,{type:"touchdrag"},s(t,{_isdrag:!0,stopPoint:e,_isDelta:!0},l))))}if(u.originalEvent){var h=o(u),e,l=u;n(u.target).data("_dataTouchStart",{event:u,_now:(new Date).getTime()});i.on(r,c).one(f,function(){i.off(r,c);h=e=t})}})}};n.each({scrollstop:"scrollstart",doubletap:"tap",taphold:"tap",swipeleft:"swipe",swiperight:"swipe",swipedown:"swipeupdown",swipeup:"swipeupdown",pinchin:"pinch",pinchout:"pinch",pinchstop:"pinch"},function(t,i){n.event.special[t]={setup:function(){n(this).on(i,n.noop)}}})}(jQuery),function(n,t,i){t.widget("ejDraggable","ej.Draggable",{element:null,model:null,validTags:["div","span","a"],defaults:{scope:"default",handle:null,dragArea:null,clone:!1,distance:1,dragOnTaphold:!1,cursorAt:{top:-1,left:-2},dragStart:null,drag:null,dragStop:null,create:null,destroy:null,autoScroll:!1,scrollSensitivity:20,scrollSpeed:20,helper:function(){return n('<div class="e-drag-helper" />').html("draggable").appendTo(document.body)}},_init:function(){this.handler=function(){};this.resizables={};this._wireEvents();this._browser=t.browserInfo();this._isIE8=this._browser.name=="msie"&&this._browser.version=="8.0";this._isIE9=this._browser.name=="msie"&&this._browser.version=="9.0";this._browser.name=="msie"&&this.element.addClass("e-pinch");this._browser.name=="edge"&&this.element.css("touch-action","none")},_setModel:function(n){for(var t in n)switch(t){case"dragArea":this.model.dragArea=n[t];break;case"dragOnTaphold":this.model.dragOnTaphold=n[t];break;case"autoScroll":this.model.autoScroll=n[t]}},_destroy:function(){n(document).off(t.eventType.mouseUp,this._destroyHandler).off(t.eventType.mouseUp,this._dragStopHandler).off(t.eventType.mouseMove,this._dragStartHandler).off(t.eventType.mouseMove,this._dragHandler).off("mouseleave",this._dragMouseOutHandler).off("selectstart",!1);t.widgetBase.droppables[this.scope]=null},_initialize:function(i){var r,u;if(i.target&&i.target.nodeName&&n(i.target).closest("input[type='text'], input[type='checkbox'], textarea, select, option").length)return!0;r=i;i.preventDefault();i=this._getCoordinate(i);this.target=n(r.currentTarget);this._initPosition={x:i.pageX,y:i.pageY};n(document).on(t.eventType.mouseMove,this._dragStartHandler).on(t.eventType.mouseUp,this._destroyHandler);this.model.clone||(u=this.element.offset(),this._relXposition=i.pageX-u.left,this._relYposition=i.pageY-u.top);n(document.documentElement).trigger(t.eventType.mouseDown,r)},_setDragArea:function(){var o=n(this.model.dragArea)[0],s,h,u,r,f,e,i;if(o){if(r=["left","right","bottom","top"],t.isNullOrUndefined(o.getBoundingClientRect)){for(s=n(this.model.dragArea).outerWidth(),h=n(this.model.dragArea).outerHeight(),i=0;i<r.length;i++)this["border-"+r[i]+"-width"]=0,this["padding-"+r[i]]=0;f=e=0}else{for(u=o.getBoundingClientRect(),s=u.width?u.width:u.right-u.left,h=u.height?u.height:u.bottom-u.top,i=0;i<r.length;i++)this["border-"+r[i]+"-width"]=isNaN(parseFloat(n(n(this.model.dragArea)[0]).css("border-"+r[i]+"-width")))?0:parseFloat(n(n(this.model.dragArea)[0]).css("border-"+r[i]+"-width")),this["padding-"+r[i]]=isNaN(parseFloat(n(n(this.model.dragArea)[0]).css("padding-"+r[i])))?0:parseFloat(n(n(this.model.dragArea)[0]).css("padding-"+r[i]));f=n(this.model.dragArea).offset().top;e=n(this.model.dragArea).offset().left}this._left=t.isNullOrUndefined(n(this.model.dragArea).offset())?0+this["border-left-width"]+this["padding-left"]:e+this["border-left-width"]+this["padding-left"];this._top=t.isNullOrUndefined(n(this.model.dragArea).offset())?0+this["border-top-width"]+this["padding-top"]:f+this["border-top-width"]+this["padding-top"];this._right=e+s-[this["border-right-width"]+this["padding-right"]];this._bottom=f+h-[this["border-bottom-width"]+this["padding-bottom"]]}},_dragStart:function(r){var a,u,o,e,f,s,h;if(r.type=="touchmove"||r.type=="mousemove"&&(r.buttons!==i?r.buttons:r.which)==1||this._isIE8||this._isIE9){u=r;r=this._getCoordinate(r);this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0};this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.position=this._getMousePosition(u);var c=this._initPosition.x-r.pageX,l=this._initPosition.y-r.pageY,v=Math.sqrt(c*c+l*l);if(v>=this.model.distance){if(o=this.model.helper({sender:u,element:this.target}),!o||t.isNullOrUndefined(o))return;if(e=this.model.handle=this.helper=o,this.model.dragStart&&(f=null,u.type=="touchmove"?(s=u.originalEvent.changedTouches[0],f=document.elementFromPoint(s.clientX,s.clientY)):f=u.originalEvent.target||u.target,this.model.cursorAt.top==0&&this.model.cursorAt.left==0&&(f=this._checkTargetElement(r)||f),this._trigger("dragStart",{event:u,element:this.element,target:f,currentTarget:this._getCurrTarget(r)})))return this._destroy(),!1;if(this.model.dragArea?this._setDragArea():(this._left=this._top=this._right=this._bottom=0,this["border-top-width"]=this["border-left-width"]=0),!t.isNullOrUndefined(e)&&e.length>0){h=e.offsetParent().offset();n(document).off(t.eventType.mouseMove,this._dragStartHandler).off(t.eventType.mouseUp,this._destroyHandler).on(t.eventType.mouseMove,this._dragHandler).on(t.eventType.mouseUp,this._dragStopHandler).on("mouseleave",this._dragMouseOutHandler).on("selectstart",!1);t.widgetBase.droppables[this.model.scope]={draggable:this.element,helper:e.css({position:"absolute",left:this.position.left-h.left,top:this.position.top-h.top}),destroy:this._destroyHandler}}}}(this.model.autoScroll&&r.type=="touchmove"||r.type=="mousemove"&&(r.buttons!==i?r.buttons:r.which)==1||this._isIE8||this._isIE9)&&(a=this._getScrollParent(u.target))},_drag:function(i){var f,e,s,h,r,l,v,u,a,o,c;i.preventDefault();this.position=this._getMousePosition(i);this.position.top<0&&(this.position.top=0);n(document).height()<this.position.top&&(this.position.top=n(document).height());n(document).width()<this.position.left&&(this.position.left=n(document).width());o=t.widgetBase.droppables[this.model.scope].helper;this.model.drag&&(l=null,i.type=="touchmove"?(v=i.originalEvent.changedTouches[0],l=document.elementFromPoint(v.clientX,v.clientY)):l=i.originalEvent.target||i.target,this.model.cursorAt.top==0&&this.model.cursorAt.left==0&&(l=this._checkTargetElement(i)||l),u={event:i,element:this.target,target:l,currentTarget:this._getCurrTarget(i),position:{left:null,top:null}},this._trigger("drag",u));a=this._checkTargetElement(i);t.isNullOrUndefined(a)?this._hoverTarget&&(i.target=i.toElement=this._hoverTarget,this._hoverTarget.object._out(i),this._hoverTarget=null):(i.target=i.toElement=a,a.object._over(i),this._hoverTarget=a);o=t.widgetBase.droppables[this.model.scope].helper;c=o.offsetParent().offset();s=t.isNullOrUndefined(i.pageX)||i.pageX===0&&i.type=="touchmove"?i.originalEvent.changedTouches[0].pageX:i.pageX;h=t.isNullOrUndefined(i.pageY)||i.pageY===0&&i.type=="touchmove"?i.originalEvent.changedTouches[0].pageY:i.pageY;this.model.dragArea?(this._pageX!=s&&(f=this._left>this.position.left?this._left:this._right<this.position.left+o.outerWidth(!0)?this._right-o.outerWidth(!0):this.position.left),this._pageY!=h&&(e=this._top>this.position.top?this._top:this._bottom<this.position.top+o.outerHeight(!0)?this._bottom-o.outerHeight(!0):this.position.top)):(f=this.position.left,e=this.position.top);(e<0||e-[c.top+this["border-top-width"]]<0)&&(e=[c.top+this["border-top-width"]]);(f<0||f-[c.left+this["border-left-width"]]<0)&&(f=[c.left+this["border-left-width"]]);f=u&&u.position&&u.position.left?u.position.left:f;e=u&&u.position&&u.position.top?u.position.top:e;o.css({left:u&&u.position&&u.position.left?f:f-[c.left+this["border-left-width"]],top:u&&u.position&&u.position.top?e:e-[c.top+this["border-top-width"]]});this.position.left=f;this.position.top=e;this._pageX=s;this._pageY=h;this.model.autoScroll&&(r&&r!=document&&r.tagName!="HTML"?(n(r).offset().top+r.clientHeight-h<this.model.scrollSensitivity?r.scrollTop=r.scrollTop+this.model.scrollSpeed:h-n(r).offset().top<this.model.scrollSensitivity&&(r.scrollTop=r.scrollTop-this.model.scrollSpeed),n(r).offset().left+r.clientWidth-s<this.model.scrollSensitivity?r.scrollLeft=r.scrollLeft+this.model.scrollSpeed:s-n(r).offset().left<this.model.scrollSensitivity&&(r.scrollLeft=r.scrollLeft+this.model.scrollSpeed)):(h-n(document).scrollTop()<this.model.scrollSensitivity?n(document).scrollTop(n(document).scrollTop()-this.model.scrollSpeed):n(window).height()-(h-n(document).scrollTop())<this.model.scrollSensitivity&&n(document).scrollTop(n(document).scrollTop()+this.model.scrollSpeed),s-n(document).scrollLeft()<this.model.scrollSensitivity?n(document).scrollLeft(n(document).scrollLeft()-this.model.scrollSpeed):n(window).width()-(s-n(document).scrollLeft())<this.model.scrollSensitivity&&n(document).scrollLeft(n(document).scrollLeft()+this.model.scrollSpeed)))},_dragStop:function(n){var t,i;(n.type=="mouseup"||n.type=="touchend")&&this._destroy(n);this.model.dragStop&&(t=null,n.type=="touchend"?this.model.cursorAt.top==0&&this.model.cursorAt.left==0?t=n.originalEvent.target||n.target:(i=n.originalEvent.changedTouches[0],t=document.elementFromPoint(i.clientX,i.clientY)):t=n.originalEvent.target||n.target,this.model.cursorAt.top==0&&this.model.cursorAt.left==0&&(t=this._checkTargetElement(n)||t),this._trigger("dragStop",{event:n,element:this.target,target:t,currentTarget:this._getCurrTarget(n)}));this._dragEnd(n)},_dragEnd:function(n){var i=this._checkTargetElement(n);t.isNullOrUndefined(i)||(n.target=n.toElement=i,i.object._drop(n,this.element))},_dragMouseEnter:function(t){n(document).off("mouseenter",this._dragMouseEnterHandler);this._isIE9?this._dragManualStop(t):this._isIE8?t.button==0&&this._dragManualStop(t):t.buttons==0&&this._dragManualStop(t)},_dragManualStop:function(n){this.model.dragStop!=null&&this._trigger("dragStop",{event:n,element:this.target,target:n.originalEvent.target||n.target,currentTarget:this._getCurrTarget(n)});this._destroy(n)},_dragMouseOut:function(){n(document).on("mouseenter",this._dragMouseEnterHandler)},_checkTargetElement:function(n){var t,i;return(n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend"||n.type=="taphold"?(i=n.originalEvent.changedTouches[0],t=document.elementFromPoint(i.clientX,i.clientY)):t=n.target,this.helper&&this._contains(this.helper[0],t))?(this.helper.hide(),t=this._elementUnderCursor(n),this.helper.show(),this._withDropElement(t)):this._withDropElement(t)},_getCurrTarget:function(n){var i=n.originalEvent&&n.originalEvent.target||n.target,u,r;if(!t.isNullOrUndefined(i.style))return u=i.style.display,this.element.is(i)&&(i.style.display="none"),r=null,t.isNullOrUndefined(n.pageX)||t.isNullOrUndefined(n.pageY)||(r=document.elementFromPoint(n.pageX,n.pageY)),i.style.display=u,r},_withDropElement:function(i){if(i){var r=n(i).data("ejDroppable");if(t.isNullOrUndefined(r)&&(r=this._checkParentElement(n(i))),!t.isNullOrUndefined(r))return n.extend(i,{object:r})}},_checkParentElement:function(i){var u=n(i).closest(".e-droppable"),r;if(u.length>0&&(r=n(u).data("ejDroppable"),!t.isNullOrUndefined(r)))return r},_elementUnderCursor:function(n){return n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend"||n.type=="taphold"?document.elementFromPoint(n.originalEvent.changedTouches[0].clientX,n.originalEvent.changedTouches[0].clientY):document.elementFromPoint(n.clientX,n.clientY)},_contains:function(t,i){try{return n.contains(t,i)||t==i}catch(r){return!1}},_wireEvents:function(){t.isDevice()==!0&&this.model.dragOnTaphold==!0?this._on(this.element,"taphold",this._initialize):this._on(this.element,t.eventType.mouseDown,this._initialize);this._dragStartHandler=n.proxy(this._dragStart,this);this._destroyHandler=n.proxy(this._destroy,this);this._dragStopHandler=n.proxy(this._dragStop,this);this._dragHandler=n.proxy(this._drag,this);this._dragMouseEnterHandler=n.proxy(this._dragMouseEnter,this);this._dragMouseOutHandler=n.proxy(this._dragMouseOut,this)},_getMousePosition:function(n){n=this._getCoordinate(n);var t=this.model.clone?n.pageX:n.pageX-this._relXposition,i=this.model.clone?n.pageY:n.pageY-this._relYposition;return{left:t-[this.margins.left+this.model.cursorAt.left],top:i-[this.margins.top+this.model.cursorAt.top]}},_getCoordinate:function(n){var i=n;return(n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend"||n.type=="taphold"&&t.browserInfo().name!="msie")&&(i=n.originalEvent.changedTouches[0]),i},_getScrollParent:function(n){return n&&n.scrollHeight>n.clientHeight?n:n&&n.parentNode?this._getScrollParent(n.parentNode):void 0}})}(jQuery,Syncfusion),function(n,t){t.widget("ejDroppable","ej.Droppable",{element:null,model:null,validTags:["div","span","a"],dropElements:[],defaults:{accept:null,scope:"default",drop:null,over:null,out:null,create:null,destroy:null},_init:function(){this._mouseOver=!1;this.dropElements.push(this)},_setModel:function(){},_destroy:function(){n(this.element).off("mouseup",n.proxy(this._drop,this))},_over:function(n){this._mouseOver||(this._trigger("over",n),this._mouseOver=!0)},_out:function(n){this._mouseOver&&(this._trigger("out",n),this._mouseOver=!1)},_drop:function(t,i){var u=t.target,f=n(u).parents(".e-droppable"),r;for(n(u).hasClass("e-droppable")&&f.push(u),r=0;r<this.dropElements.length;r++)n(f).is(n(this.dropElements[r].element))&&this.dropElements[r]._dropEvent.call(this.dropElements[r],t,i)},_dropEvent:function(i,r){var u=t.widgetBase.droppables[this.model.scope],f=!t.isNullOrUndefined(u.helper)&&u.helper.is(":visible"),e;f&&i.type=="touchend"&&n(u.helper).hide();e=this._isDropArea(i);f&&i.type=="touchend"&&n(u.helper).show();u&&!t.isNullOrUndefined(this.model.drop)&&f&&e.canDrop&&this.model.drop(n.extend(i,{dropTarget:e.target,dragElement:r},!0),u)},_isDropArea:function(t){var i={canDrop:!0,target:n(t.target)},e,r,o,u,f;if(t.type=="touchend")for(e=t.originalEvent.changedTouches[0],r=document.elementFromPoint(e.clientX,e.clientY),i.canDrop=!1,o=n(r).parents(),u=0;u<this.element.length;u++){if(n(r).is(n(this.element[u])))i={canDrop:!0,target:n(r)};else for(f=0;f<o.length;f++)if(n(this.element[u]).is(n(o[f]))){i={canDrop:!0,target:n(r)};break}if(i.canDrop)break}return i}})}(jQuery,Syncfusion),function(n,t){t.widget("ejResizable","ej.resizable",{element:null,model:null,validTags:["div","span","a"],defaults:{scope:"default",handle:null,distance:1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,cursorAt:{top:1,left:1},resizeStart:null,resize:null,resizeStop:null,create:null,destroy:null,helper:function(){return n('<div class="e-resize-helper" />').html("resizable").appendTo(document.body)}},_init:function(){if(this.target=this.element,this._browser=t.browserInfo(),this._isIE8=this._browser.name=="msie"&&this._browser.version=="8.0",this._isIE9=this._browser.name=="msie"&&this._browser.version=="9.0",this.handle!=null)n(this.target).delegate(this.handle,t.eventType.mouseDown,n.proxy(this._mousedown,this)).delegate(this.handle,"resizestart",this._blockDefaultActions);else n(this.target).on(t.eventType.mouseDown,n.proxy(this._mousedown,this));this._resizeStartHandler=n.proxy(this._resizeStart,this);this._destroyHandler=n.proxy(this._destroy,this);this._resizeStopHandler=n.proxy(this._resizeStop,this);this._resizeHandler=n.proxy(this._resize,this);this._resizeMouseEnterHandler=n.proxy(this._resizeMouseEnter,this)},_mouseover:function(i){if(n(i.target).hasClass("e-resizable")){n(i.target).css({cursor:"se-resize"});n(this.target).on(t.eventType.mouseDown,n.proxy(this._mousedown,this))}else n(this.target).off(t.eventType.mouseDown),n(this.target).css({cursor:""})},_blockDefaultActions:function(n){n.cancelBubble=!0;n.returnValue=!1;n.preventDefault&&n.preventDefault();n.stopPropagation&&n.stopPropagation()},_setModel:function(){},_mousedown:function(i){var r=i;i=this._getCoordinate(i);this.target=n(r.currentTarget);this._initPosition={x:i.pageX,y:i.pageY};this._pageX=i.pageX;this._pageY=i.pageY;n(document).on(t.eventType.mouseMove,this._resizeStartHandler).on(t.eventType.mouseUp,this._destroyHandler);return n(document.documentElement).trigger(t.eventType.mouseDown,r),!1},_resizeStart:function(i){var r,h;if(n(i.target).hasClass("e-resizable")){i=this._getCoordinate(i);var u=this._initPosition.x-i.pageX,f=this._initPosition.y-i.pageY,e,o,s=Math.sqrt(u*u+f*f);if(s>=this.model.distance){if(this.model.resizeStart!=null&&this._trigger("resizeStart",{event:i,element:this.target}))return;r=this.model.helper({element:this.target});e=i.pageX-this._pageX+r.outerWidth();o=i.pageY-this._pageY+r.outerHeight();this._pageX=i.pageX;this._pageY=i.pageY;h=this.getElementPosition(r);n(document).off(t.eventType.mouseMove,this._resizeStartHandler).off(t.eventType.mouseUp,this._destroyHandler).on(t.eventType.mouseMove,this._resizeHandler).on(t.eventType.mouseUp,this._resizeStopHandler).on("mouseenter",this._resizeMouseEnterHandler).on("selectstart",!1);t.widgetBase.resizables[this.scope]={resizable:this.target,helper:r.css({width:e,height:o}),destroy:this._destroyHandler}}}},_resize:function(n){var i,r,u,e,f;n=this._getCoordinate(n);e=this.getElementPosition(t.widgetBase.resizables[this.scope].helper);f=this.model.helper({element:this.target});i=n.pageX-this._pageX+f.outerWidth();r=n.pageY-this._pageY+f.outerHeight();this._pageX=n.pageX;this._pageY=n.pageY;i<this.model.minWidth&&(u=this.model.minWidth-i,i=this.model.minWidth,this._pageX=n.pageX+u);r<this.model.minHeight&&(u=this.model.minHeight-r,r=this.model.minHeight,this._pageY=n.pageY+u);this.model.maxHeight!=null&&r>this.model.maxHeight&&(u=r-this.model.maxHeight,r=this.model.maxHeight,this._pageY=n.pageY-u);this.model.maxWidth!=null&&i>this.model.maxWidth&&(u=i-this.model.maxWidth,i=this.model.maxWidth,this._pageX=n.pageX-u);t.widgetBase.resizables[this.scope].helper.css({width:i,height:r});this._trigger("resize",{element:this.target})},_resizeStop:function(n){this.model.resizeStop!=null&&this._trigger("resizeStop",{element:this.target});(n.type=="mouseup"||n.type=="touchend")&&this._destroy(n)},_resizeMouseEnter:function(n){this._isIE9?this._resizeManualStop(n):this._isIE8?n.button==0&&this._resizeManualStop(n):n.buttons==0&&this._resizeManualStop(n)},_resizeManualStop:function(n){this.model.resizeStop!=null&&this._trigger("resizeStop",{element:this.target});this._destroy(n)},_destroy:function(){n(document).off(t.eventType.mouseUp,this._destroyHandler).off(t.eventType.mouseUp,this._resizeStopHandler).off(t.eventType.mouseMove,this._resizeStartHandler).off(t.eventType.mouseMove,this._resizeHandler).off("mouseenter",this._resizeMouseEnterHandler).off("selectstart",!1);t.widgetBase.resizables[this.scope]=null},getElementPosition:function(n){return n!=null&&n.length>0?{left:n[0].offsetLeft,top:n[0].offsetTop}:null},_getCoordinate:function(n){var t=n;return(n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend")&&(t=n.originalEvent.changedTouches[0]),t}})}(jQuery,Syncfusion),function(n,t,i,r){"use strict";t.widget("ejScrollBar","ej.ScrollBar",{defaults:{orientation:"horizontal",viewportSize:0,height:18,width:18,smallChange:57,largeChange:57,value:0,maximum:0,minimum:0,buttonSize:18,infiniteScrolling:!1},validTags:["div"],type:"transclude",dataTypes:{buttonSize:"number",smallChange:"number",largeChange:"number"},observables:["value"],value:t.util.valueFunction("value"),_enabled:!0,content:function(){return this._content&&this._content.length||(this._content=this.model.orientation==="horizontal"?this.element.find(".e-hhandle"):this.element.find(".e-vhandle")),this._content},_init:function(){this.element.addClass("e-widget");this._ensureScrollers();this.content();this._setInitialValues()},_setInitialValues:function(){var n="X";this.model.orientation===t.ScrollBar.Orientation.Horizontal?this.element.addClass("e-hscrollbar"):(this.element.addClass("e-vscrollbar"),n="Y");(this.value()!==0||this.model.minimum!==0)&&(this.value()<this.model.minimum&&this.value(this.model.minimum),this.scroll(this.value(),"none"))},_ensureScrollers:function(){var t=n.fn.jquery;this.model.height&&this.element.height(this.model.height);this.model.width&&this.element.width(this.model.width);this._scrollData||(this._scrollData=this.model.orientation==="vertical"?this._createScroller("Height","Y","Top","e-v"):this._createScroller("Width","X","Left","e-h"))},_setModel:function(n){for(var t in n)if(t==="value")this.value()&&this.scroll(this.value(),"none");else{this.refresh();break}},_createScroller:function(t,i,r,u){var f={},o=n.fn.jquery,e;return f.dimension=t,f.xy=i,f.position=r,f.css=u,f.uDimension=t,this._calculateLayout(f),this._createLayout(f),e=this[f.main].find(".e-button"),this._off(e,"mousedown")._on(e,"mousedown",{d:f,step:1},this._spaceMouseDown),this._off(this[f.scroll],"mousedown")._on(this[f.scroll],"mousedown",{d:f},this._spaceMouseDown),this._off(this[f.handler],"mousedown touchstart")._on(this[f.handler],"mousedown touchstart",{d:f},this._mouseDown),f},_createLayout:function(i){var r="<div class='"+i.css+"{0}' style='"+i.dimension+":{1}px'>{2}<\/div>",u=n.fn.jquery,f={},o,e;f[i.dimension]=i.modelDim;e=t.buildTag("div."+i.css+"scroll e-box",String.format(r,"up e-chevron-up_01 e-icon e-box e-button",i.buttonSize)+String.format(r,"handlespace",i.handleSpace,String.format(r,"handle e-box e-pinch",i.handle))+String.format(r,"down e-chevron-down_01 e-icon e-box e-button",i.buttonSize),f);this.element.append(e);this.element.find(".e-vhandle").addClass("e-v-line e-icon");this.element.find(".e-hhandle").addClass("e-h-line e-icon");o=u==="1.7.1"||u==="1.7.2"?i.uDimension.toLowerCase():"outer"+i.uDimension;this[i.handler]=this.element.find("."+i.handler);this[i.handler].css("transition","none");this[i.scroll]=this[i.handler].parent();this[i.main]=this[i.scroll].parent();this[i.main].find(".e-button")["outer"+i.uDimension](i.buttonSize)},_calculateLayout:function(n){var i,u;n.scrollDim="scroll"+n.dimension;n.lPosition=n.position.toLowerCase();n.clientXy="page"+n.xy;n.scrollVal="scroll"+n.position;n.scrollOneStepBy=this.model.smallChange;n.modelDim=this.model[n.dimension=n.dimension.toLowerCase()];n.handler=n.css+"handle";n.buttonSize=this.model.buttonSize;n.main=n.css+"scroll";n.scroll=n.css+"ScrollSpace";n.handleSpace=n.modelDim-2*n.buttonSize;n.scrollable=this.model.maximum-this.model.minimum;i=this.model.height;this.model.orientation==="horizontal"&&(i=this.model.width);n.handle=this.model.viewportSize/(this.model.maximum-this.model.minimum+this.model.viewportSize)*(i-2*this.model.buttonSize);u=!t.isNullOrUndefined(this.model.elementHeight)&&typeof this.model.elementHeight=="string"&&this.model.elementHeight.indexOf("%")!=-1?!0:!1;n.handle<20&&!u&&(n.handle=20);n.onePx=n.scrollable/(n.handleSpace-n.handle);n.fromScroller=!1;n.up=!0;n.vInterval=r},_updateLayout:function(n){this.element.height(this.model.height);this.element.width(this.model.width);var t=this.element.find("."+n.css+"handle"),f=this.element.find("."+n.css+"handlespace"),u=n.dimension=="width"?t.css("left"):t.css("top"),i=n.dimension=="width"?f.outerWidth():f.outerHeight();u!==r&&u!=="auto"&&(i>=n.handle+parseFloat(u)||(this.model.enableRTL?t.css(n.dimension==="width"?"left":"top",parseFloat(i)-n.handle):t.css(n.dimension==="width"?"left":"top",parseFloat(i)-n.handle>0?parseFloat(i)-n.handle:0)));this.element.find("."+n.css+"scroll").css(n.dimension,n.modelDim+"px").find(".e-button").css(n.dimension,this.model.buttonSize).end().find("."+n.css+"handlespace").css(n.dimension,n.handleSpace+"px").find("."+n.css+"handle").css(n.dimension,n.handle+"px")},refresh:function(){this._ensureScrollers();this.value()&&this.scroll(this.value(),"none");this._scrollData&&(this._calculateLayout(this._scrollData),this._updateLayout(this._scrollData))},scroll:function(n,i,r,u){var o=this._scrollData,f,e;if(!r)if(this.model.orientation===t.ScrollBar.Orientation.Horizontal){if(this._trigger("scroll",{source:i||"custom",scrollData:this._scrollData,scrollLeft:n,originalEvent:u}))return}else if(this._trigger("scroll",{source:i||"custom",scrollData:this._scrollData,scrollTop:n,originalEvent:u}))return;this._scrollData&&(this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name!="msie"?this.value(-o.scrollable+n):this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name=="msie"?this.value(-1*n):this.value(n),this.content().length>0&&(this.model.orientation===t.ScrollBar.Orientation.Horizontal?(f=this.element.find(".e-hhandlespace").width()-this.element.find(".e-hhandle").outerWidth(),n=f<(n-this.model.minimum)/this._scrollData.onePx?f:(n-this.model.minimum)/this._scrollData.onePx,this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name!="msie"&&(n=f-n,n>0?n=n*-1:n),this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name=="msie"&&(n=-n),this._scrollData.enableRTL&&n>0&&!this._scrollData._scrollleftflag?n=0:n,this._scrollData._scrollleftflag&&(n>0?n=n*-1:n,this.value(n)),this.content()[0].style.left=n+"px",this._scrollData._scrollleftflag=!1):(e=this.element.find(".e-vhandlespace").height()-this.element.find(".e-vhandle").outerHeight(),n=e<(n-this.model.minimum)/this._scrollData.onePx?e:(n-this.model.minimum)/this._scrollData.onePx,t.browserInfo().name=="msie"&&isNaN(n)&&(n=""),this.content()[0].style.top=n+"px")))},_changeTop:function(n,t,i){var u,r;return u=n.dimension==="height"?this.value():this.value(),r=u+t,n.step=t,n.enableRTL&&t<0||t>0&&!n.enableRTL?n.enableRTL?r<this.model.maximum*-1&&(r=this.model.maximum*-1):r>this.model.maximum&&(r=this.model.maximum):n.enableRTL?r>this.model.minimum&&(r=this.model.minimum):r<this.model.minimum&&(r=this.model.minimum),(r!==u||this.model.infiniteScrolling)&&this.scroll(r,i),r!==u},_mouseUp:function(i){if(i.data){var r=i.data.d;clearInterval(r.vInterval);i.type=="touchend"&&n(i.target).removeClass("e-touch");i.type!=="mouseup"&&i.type!=="touchend"&&(i.toElement||i.relatedTarget||i.target)||(this._prevY=this._d=this._data=null,this._off(n(document),"mousemove touchmove",this._mouseMove),n(document).off("mouseup touchend",t.proxy(this._mouseUp,this)),r.fromScroller=!1,this[r.scroll].off("mousemove"),this[r.handler].off("mousemove").css("transition",""),i.data.source!=="thumb"||t.isNullOrUndefined(this.model)||n.when(this.content()).done(t.proxy(function(){this._trigger("thumbEnd",{originalEvent:i,scrollData:r})},this)));r.up=!0}},_mouseDown:function(i){if(this._enabled){this._d=i;this._data=this._d.data.d;this._data.target=this._d.target;this._data.fromScroller=!0;this[this._data.handler].css("transition","none");this._on(n(document),"mousemove touchmove",{d:this._data,source:"thumb"},this._mouseMove);this._trigger("thumbStart",{originalEvent:this._d,scrollData:this._data});n(document).one("mouseup touchend",{d:this._data,source:"thumb"},t.proxy(this._mouseUp,this));i.type=="touchstart"&&n(i.target).addClass("e-touch")}},_mouseCall:function(n){n.type="mouseup";this._mouseUp(n)},_mouseMove:function(i){var u,f=0,r=parseInt(this[this._data.handler].css(this._data.lPosition))||0,o,e;if(i.preventDefault(),o=1,t.isNullOrUndefined(i.target.tagName)){if(n(i.target).is(document)){this._mouseCall(i);return}}else if(i.target.tagName.toLowerCase()==="iframe"){this._mouseCall(i);return}e=i.type=="mousemove"?i[this._data.clientXy]:i.originalEvent.changedTouches[0][this._data.clientXy];this._prevY&&e!==this._prevY&&(f=e-this._prevY,this.model.infiniteScrolling?(r=r+f,this._data.step=f,(this._data.enableRTL?r>0:r<0)&&(r=0),r*(this._data.enableRTL?-1:1)+this._data.handle>=this._data.handleSpace&&(r=(this._data.handleSpace-this._data.handle)*(this._data.enableRTL?-1:1)),u=Math.ceil(r*this._data.onePx),this.scroll(u,"thumb")):(u=f*this._data.onePx,this._changeTop(this._data,u,"thumb",this._d)),this._trigger("thumbMove",{originalEvent:i,direction:this._data.step>0?1:-1,scrollData:this._data}));o===1&&(this._prevY=e)},_spaceMouseDown:function(r){var u,o,f,e;if(r.data&&this._enabled&&(u=r.data.d,o=this[u.handler][0].getBoundingClientRect(),r.which===1&&r.target!==this[u.handler][0])){f=r.data.step?this.model.smallChange:this.model.largeChange;e=r.data.top||o[u.lPosition];r[u.clientXy]=r[u.clientXy]||0;r[u.clientXy]-i.scrollY<e&&(f*=-1);u.target=r.target;this._changeTop(u,f,f===3?"track":"button",r);r.data.step!==1&&this[u.scroll].mousemove(function(){u.up=!0});u.up=!1;u.vInterval=setInterval(t.proxy(function(){if((f<0?e+f/u.onePx<r[u.clientXy]:e+u.handle+f/u.onePx>r[u.clientXy])&&(u.up=!0),u.up){clearInterval(u.vInterval);return}this._changeTop(u,f,f===3?"track":"button",r);e=r.data?r.data.top||o[u.lPosition]:o[u.lPosition]},this),150);n(document).one("mouseup",{d:u},t.proxy(this._mouseUp,this));n(document).mouseout({d:u},t.proxy(this._mouseUp,this))}},_remove:function(){this.model.orientation===t.ScrollBar.Orientation.Horizontal&&this.element.find(".e-hscroll").remove();this.model.orientation===t.ScrollBar.Orientation.Vertical&&this.element.find(".e-vscroll").remove();this._scrollData=null;this._content=null},_destroy:function(){this.element.remove()}});t.ScrollBar.Orientation={Horizontal:"horizontal",Vertical:"vertical"}}(jQuery,Syncfusion,window),function(n,t,i,r){"use strict";t.widget("ejScroller","ej.Scroller",{_addToPersist:["scrollLeft","scrollTop"],defaults:{height:250,autoHide:!1,animationSpeed:600,width:0,scrollOneStepBy:57,buttonSize:18,scrollLeft:0,scrollTop:0,targetPane:null,scrollerSize:18,enablePersistence:!1,enableRTL:r,enableTouchScroll:!0,preventDefault:!1,enabled:!0,create:null,destroy:null,wheelStart:null,wheelMove:null,wheelStop:null},validTags:["div"],type:"transclude",dataTypes:{buttonSize:"number",scrollOneStepBy:"number"},observables:["scrollTop","scrollLeft"],scrollTop:t.util.valueFunction("scrollTop"),scrollLeft:t.util.valueFunction("scrollLeft"),keyConfigs:{up:"38",down:"40",left:"37",right:"39",pageUp:"33",pageDown:"34",pageLeft:"ctrl+37",pageRight:"ctrl+39"},content:function(){return!this._contentOffsetParent&&this._content&&this._content[0]&&(this._contentOffsetParent=this._content[0].offsetParent),this._content&&this._content.length&&this._contentOffsetParent||(this._content=this.element.children().first().addClass("e-content")),this._content},_setFirst:!0,_updateScroll:!1,_init:function(){t.isNullOrUndefined(this.content()[0])||(this._isJquery3=parseInt(n.fn.jquery)>=3?!0:!1,this._tempWidth=this.model.width,this._prevScrollWidth=this.content()[0].scrollWidth,this._prevScrollHeight=this.content()[0].scrollHeight,this.element.addClass("e-widget"),this.content(),this._browser=t.browserInfo().name,this._wheelStart=!0,this._eleHeight=this.model.height,this._eleWidth=this.model.width,this._isNativeScroll=t.isDevice(),this.model.targetPane!=null&&this.content().find(this.model.targetPane).addClass("e-target-pane"),this.model.enableRTL===r&&(this.model.enableRTL=this.element.css("direction")==="rtl"),this.model.autoHide&&this._on(this.element,"mousedown",this._mouseDownInitContent),this._ensureScrollers(),this.model.enableRTL&&(this.element.addClass("e-rtl"),this._rtlScrollLeftValue=this.content().scrollLeft()),this._isNativeScroll&&this.element.addClass("e-native-scroll"),this._on(this.content(),"scroll",this._scroll),this.model.targetPane!=null&&this._on(this.content().find(this.model.targetPane),"scroll",this._scroll),this.scrollLeft()&&this._setScrollLeftValue(this.scrollLeft()),this.scrollTop()&&this.scrollTop(this._isJquery3?Math.ceil(this.scrollTop()):this.scrollTop()),this.content().scrollTop(this.scrollTop()),this.model.autoHide&&this._autohide(),this.model.enabled?this.enable():this.disable(),this._setDimension(),(this._prevScrollWidth!==this.content()[0].scrollWidth||this._prevScrollHeight!==this.content()[0].scrollHeight)&&this.refresh());this._addActionClass();this._isNativeScroll&&this._on(this.content(),"scrollstop",this._touchDown)},_mouseDownInitContent:function(){this.model.autoHide&&this._on(n(document),"mouseup",this._mouseUpContent);this.element.addClass("e-scroll-focus")},_addActionClass:function(){this._browser=="msie"&&(this.content().removeClass("e-pinch e-pan-x e-pan-y"),this._vScrollbar&&this._hScrollbar?this.content().addClass("e-pinch"):this._vScrollbar&&!this._hScrollbar?this.content().addClass("e-pan-x"):this._hScrollbar&&!this._vScrollbar&&this.content().addClass("e-pan-y"))},_setDimension:function(){t.isNullOrUndefined(this.model.height)||typeof this.model.height!="string"||this.model.height.indexOf("%")==-1||(this._vScroll||this._hScroll?this.model.height=this._convertPercentageToPixel(parseInt(this._eleHeight),this.element.parent().height()):n(this.content()[0]).height(""));t.isNullOrUndefined(this.model.width)||typeof this.model.width!="string"||this.model.width.indexOf("%")==-1||(this._hScroll||this._vScroll?this.model.width=this._convertPercentageToPixel(parseInt(this._eleWidth),this.element.parent().width()):n(this.content()[0]).width(""))},_setScrollLeftValue:function(n){this.model.enableRTL&&(n=t.browserInfo().name=="mozilla"?n<0?n:n*-1:!t.isNullOrUndefined(this._rtlScrollLeftValue)&&(t.browserInfo().name=="chrome"||this._rtlScrollLeftValue>0)?n<0?this._rtlScrollLeftValue+n:this._rtlScrollLeftValue-n:Math.abs(n));this.content().scrollLeft(n)},_ensureScrollers:function(){var u=n.fn.jquery,f;if(this.model.height=typeof this.model.height=="string"&&this.model.height.indexOf("px")!=-1?parseInt(this.model.height):this.model.height,this.model.width=typeof this.model.width=="string"&&this.model.width.indexOf("px")!=-1?parseInt(this.model.width):this.model.width,this.model.height&&this.element.height(this.model.height),this.model.width&&this.element.width(this.model.width),this._off(this.content(),"mousedown touchstart"),this.content().length>0){if(this.isVScroll()?(this._tempVscrollbar||(this._vScrollbar=this._createScrollbar(t.ScrollBar.Orientation.Vertical,this.isHScroll()),this._tempVscrollbar=this._vScrollbar),this.model.enableTouchScroll&&this._on(this.content(),"mousedown touchstart",{d:this._vScrollbar._scrollData},this._mouseDownOnContent)):(this._vScrollbar=null,this._tempVscrollbar=this._vScrollbar,this.element.children(".e-vscrollbar").remove()),this.isHScroll()?(this._tempHscrollbar||(this._hScrollbar=this._createScrollbar(t.ScrollBar.Orientation.Horizontal,this.isVScroll()),this._tempHscrollbar=this._hScrollbar),this.model.enableTouchScroll&&this._on(this.content(),"mousedown touchstart",{d:this._hScrollbar._scrollData},this._mouseDownOnContent)):(this._hScrollbar=null,this._tempHscrollbar=this._hScrollbar,this.element.children(".e-hscrollbar").remove()),this._vScrollbar||this._hScrollbar||this.content().css({width:"auto",height:"auto"}),this.element.find(".e-hscroll").length>0||this._vScrollbar&&this.content().outerHeight(this.content().outerHeight()-1),u==="1.7.1"||u==="1.7.2"?(this._contentHeight="height",this._contentWidth="width"):(this._contentHeight="outerHeight",this._contentWidth="outerWidth"),this._hScroll=this.isHScroll(),this._vScroll=this.isVScroll(),this._hScroll||this._vScroll){if(this.content().addClass("e-content"),f=this._exactElementDimension(this.element),this._elementDimension(f),this.model.targetPane!==null&&this.content().find(this.model.targetPane)[0]!==r?this.content().find(this.model.targetPane)[0].scrollLeft=this.scrollLeft():!this.isHScroll()&&this.element.children(".e-hscrollbar").length>0&&this._ensureScrollers(),isNaN(this._eleWidth)&&this._eleWidth.indexOf("%")>0&&isNaN(this._eleHeight)&&this._eleHeight.indexOf("%")>0)n(i).on("resize",n.proxy(this._resetScroller,this))}else this.content().removeClass("e-content");this._setDimension();this._parentHeight=n(this.element).parent().height();this._parentWidth=n(this.element).parent().width()}},_elementDimension:function(n){this._ElementHeight=n.height-(this.border_bottom+this.border_top+this.padding_bottom+this.padding_top);this.content()[this._contentHeight](this._ElementHeight-(this._hScroll&&!this.model.autoHide?this.model.scrollerSize:this.element.find(".e-hscrollbar").is(":visible")?this.model.scrollerSize:0));this._ElementWidth=n.width-(this.border_left+this.border_right+this.padding_left+this.padding_right);this.content()[this._contentWidth](this._ElementWidth-(this._vScroll&&!this.model.autoHide?this.model.scrollerSize:this.element.find(".e-vscrollbar").is(":visible")?this.model.scrollerSize:0))},_convertPercentageToPixel:function(n,t){return Math.floor(n*t/100)},isHScroll:function(){var u=parseFloat(n.fn.jquery)>=3?Math.ceil(this.element.width()):this.element.width(),i=this.model.width,r;if(t.isNullOrUndefined(this.model.width)||(i=typeof this.model.width=="string"&&this.model.width.indexOf("%")!=-1?u:parseFloat(n.fn.jquery)>=3&&!isNaN(parseFloat(this.model.width))?Math.ceil(parseFloat(this.model.width)):this.model.width),t.isNullOrUndefined(this._tempWidth)||typeof this._tempWidth!="string"||this._tempWidth.indexOf("%")==-1){if(i>0){if(r=this.content().find(this.model.targetPane),this.model.targetPane!=null&&r.length)return r[0].scrollWidth+r.siblings().width()>i;if(this.content()[0].scrollWidth>i)return!0;if(this.content()[0].scrollWidth==i){if(this.model.autoHide&&n(this.content()[0]).find("> *").length>0)return n(this.content()[0]).find("> *")[0].scrollWidth>n(this.content()[0]).width();if(n(this.content()[0]).find("> *").length>0)return n(this.content()[0]).find("> *")[0].scrollWidth>(t.isNullOrUndefined(this._tempVscrollbar)?i:i-this.model.scrollerSize)}return!1}return!1}if(t.isNullOrUndefined(this.model.width)||typeof this.model.width!="string"||this.model.width.indexOf("%")==-1){if(this.content()[0].scrollWidth>u)return!0}else return this.content()[0].scrollWidth>u},isVScroll:function(){if(t.isNullOrUndefined(this.model.height)||typeof this.model.height!="string"||this.model.height.indexOf("%")==-1){if(this.model.height>0&&(this.content()[0].scrollHeight>Math.ceil(this.model.height)||this.isHScroll()&&(this.content()[0].scrollHeight==this.model.height||this.content()[0].scrollHeight>this.model.height-(this.model.scrollerSize-2))))return!0}else return this.content()[0].scrollHeight>this.element.outerHeight();return!1},_setModel:function(n){for(var i in n)switch(i){case"enableRTL":n[i]?(this.element.addClass("e-rtl"),this._rtlScrollLeftValue=this.content().scrollLeft(),t.isNullOrUndefined(this._hScrollbar)||(this._hScrollbar._scrollData.enableRTL=!0)):(this.element.removeClass("e-rtl"),t.isNullOrUndefined(this._hScrollbar)||(this._hScrollbar._scrollData.enableRTL=!1));this._hScrollbar&&(this.element.find(".e-hhandle").css("left",0),this._hScrollbar.value(0));break;case"preventDefault":this.model.preventDefault=n[i];break;case"scrollLeft":(parseFloat(t.util.getVal(n[i]))<0||!this._hScroll)&&(n[i]=0);this._hScrollbar&&(n[i]=parseFloat(t.util.getVal(n[i]))>this._hScrollbar._scrollData.scrollable?this._hScrollbar._scrollData.scrollable:parseFloat(t.util.getVal(n[i])));this._setScrollLeftValue(parseFloat(n[i]));this.scrollLeft(n[i]);!this._hScrollbar||this._hScrollbar._scrollData._scrollleftflag&&this.model.enableRTL||this.scrollX(n[i],!0);break;case"scrollTop":this._vScrollbar&&(n[i]=parseFloat(t.util.getVal(n[i]))>this._vScrollbar._scrollData.scrollable?this._vScrollbar._scrollData.scrollable:parseFloat(t.util.getVal(n[i])));(parseFloat(n[i])<0||!this._vScroll)&&(n[i]=0);this.content().scrollTop(parseFloat(n[i]));this.scrollTop(n[i]);this.scrollY(n[i],!0);break;case"touchScroll":this.model.enableTouchScroll?(this._vScrollbar&&this._on(this.content(),"mousedown touchstart",{d:this._vScrollbar._scrollData},this._mouseDownOnContent),this._hScrollbar&&this._on(this.content(),"mousedown touchstart",{d:this._hScrollbar._scrollData},this._mouseDownOnContent)):this._off(this.content(),"mousedown touchstart");break;case"scrollOneStepBy":this._vScrollbar&&(this._vScrollbar._scrollData.scrollOneStepBy=n[i],this._vScrollbar.model.smallChange=n[i]);this._hScrollbar&&(this._hScrollbar._scrollData.scrollOneStepBy=n[i],this._hScrollbar.model.smallChange=n[i]);break;case"buttonSize":this._vScrollbar&&(this._vScrollbar.model.buttonSize=this.model.buttonSize);this._hScrollbar&&(this._hScrollbar.model.buttonSize=this.model.buttonSize);this.refresh();break;case"height":this._eleHeight=n[i];this.refresh();break;case"width":this._eleWidth=n[i];this.refresh();break;case"enabled":n[i]?this.enable():this.disable();break;default:this.refresh()}},_createScrollbar:function(i,r){var c=this,f,o,l,s,a,h=document.createElement("div"),e,u;return i===t.ScrollBar.Orientation.Vertical?(o=this.model.scrollerSize,l=t.isNullOrUndefined(this.model.height)||typeof this.model.height!="string"||this.model.height.indexOf("%")==-1?f=this.model.height-(r?this.model.scrollerSize:0):f=this.element.height()-(r?this.model.scrollerSize:0),s=this.content()[0].scrollHeight,a=this.scrollTop()):(o=f=this.model.width-(r?this.model.scrollerSize:0),l=this.model.scrollerSize,t.isNullOrUndefined(this.model.width)||typeof this.model.width!="string"||this.model.width.indexOf("%")==-1?(e=this.content().find(this.model.targetPane),s=this.model.targetPane!=null&&e.length?e[0].scrollWidth+e.parent().width()-e.width():this.content()[0].scrollWidth):(o=f=this.element.width()-(r?this.model.scrollerSize:0),s=this.content()[0].scrollWidth),a=this.scrollLeft()),this.element.children(".e-hscrollbar").length>0?n(this.element.children(".e-hscrollbar")).before(h):this.element.append(h),n(h).ejScrollBar({elementHeight:c._eleHeight,elementWidth:c._eleWidth,buttonSize:c.model.buttonSize,orientation:i,viewportSize:f,height:l,width:o,maximum:s-f,value:a,smallChange:this.model.scrollOneStepBy,largeChange:3*this.model.scrollOneStepBy,scroll:t.proxy(this._scrollChanged,this),thumbEnd:t.proxy(this._thumbEnd,this),thumbStart:t.proxy(this._thumbStart,this),thumbMove:t.proxy(this._thumbMove,this)}),u=n(h).ejScrollBar("instance"),i!==t.ScrollBar.Orientation.Vertical&&r||this._off(this.element,this._browser=="msie"?"wheel mousewheel":"mousewheel DOMMouseScroll",this._mouseWheel)._on(this.element,this._browser=="msie"?"wheel mousewheel":"mousewheel DOMMouseScroll",{d:u._scrollData},this._mouseWheel),i===t.ScrollBar.Orientation.Horizontal?this._scrollXdata=u._scrollData:this._scrollYdata=u._scrollData,i===t.ScrollBar.Orientation.Horizontal&&this.model.enableRTL&&(u._scrollData.enableRTL=!0),u._enabled=this.model.enabled,u},_updateScrollbar:function(i,r){var u=i===t.ScrollBar.Orientation.Vertical?this._vScrollbar:this._hScrollbar;u&&(i===t.ScrollBar.Orientation.Vertical?(u.model.width=this.model.scrollerSize,u.model.height=u.model.viewportSize=this.model.height-(r?this.model.scrollerSize:0),u.model.maximum=this.content()[0].scrollHeight-u.model.viewportSize,u.model.value=this.scrollTop()):(u.model.width=u.model.viewportSize=this.model.width-(r?this.model.scrollerSize:0),u.model.height=this.model.scrollerSize,u.model.maximum=(this.model.targetPane!=null&&this.content().find(this.model.targetPane).length>0?this.content().find(this.model.targetPane)[0].scrollWidth+(this.content().width()-this.content().find(n(this.model.targetPane)).outerWidth()):this.content()[0].scrollWidth)-u.model.viewportSize,this.model.enableRTL||(u.model.value=this.scrollLeft())))},_autohide:function(){this.model.autoHide?(this.element.addClass("e-autohide"),this._on(this.element,"mouseenter mouseleave touchstart touchend",this._scrollerHover),n(":hover").filter(this.element[0]).length||this.content().siblings(".e-scrollbar.e-js").hide(),this._elementDimension(this._exactElementDimension(this.element))):(this.element.removeClass("e-autohide"),this._off(this.element,"mouseenter mouseleave touchstart touchend",this._scrollerHover),this.content().siblings(".e-scrollbar.e-js").show())},_mouseUpContent:function(t){t.type=="mouseup"&&(this.element.removeClass("e-scroll-focus"),this._autohide(),this._off(n(document),"mouseup",this._mouseUpContent))},_scrollChanged:function(i){this._updateScroll=!0;i.scrollTop!==r?this.scrollY(i.scrollTop,!0,"",i.source):i.scrollLeft!==r&&this.scrollX(i.scrollLeft,!0,"",i.source);this._updateScroll=!1;var u=this;n.when(this.content()).done(t.proxy(function(){u._trigger("scrollEnd",{scrollData:i})}))},_bindBlurEvent:function(r,u){this._scrollEle=n(r).data("ejScrollBar");this._event=u;var f=this;this._listener=function(){this._scrollEle._off(n(document),"mousemove touchmove",this._scrollEle._mouseMove);n(document).off("mouseup touchend",t.proxy(this._scrollEle._mouseUp,this._scrollEle));this._scrollEle._prevY=null;this._off(n(document),"mousemove touchmove",this._mouseMove);this._off(n(document),"mouseup touchend",this._mouseUp);this._off(n(i),"blur");this._evtData.handler==="e-vhandle"?this._scrollEle._trigger("thumbEnd",{originalEvent:this._event,scrollData:this._evtData}):this._scrollEle._trigger("thumbEnd",{originalEvent:this._event,scrollData:this._evtData})};this._on(n(i),"blur",this._listener)},_thumbStart:function(n){this._evtData=n.scrollData;var t=n.scrollData.handler==="e-vhandle"?this.element.find("."+n.scrollData.handler).closest(".e-scrollbar"):this.element.find("."+n.scrollData.handler).closest(".e-scrollbar"),t=n.scrollData.handler==="e-vhandle"?this.element.find("."+n.scrollData.handler).closest(".e-scrollbar"):this.element.find("."+n.scrollData.handler).closest(".e-scrollbar");this._bindBlurEvent(t,n);this._trigger("thumbStart",n)},_thumbMove:function(n){this._trigger("thumbMove",n)},_thumbEnd:function(t){this._trigger("thumbEnd",t);this._off(n(i),"blur")},refresh:function(i){var r,u;i?(this._tempVscrollbar=null,this.element.children(".e-vscrollbar").remove(),this._tempHscrollbar=null,this.element.children(".e-hscrollbar").remove()):this.element.find(">.e-content").removeAttr("style");t.isNullOrUndefined(this._eleHeight)||typeof this._eleHeight!="string"||this._eleHeight.indexOf("%")==-1||this._parentHeight==n(this.element).parent().height()||(r=this._exactElementDimension(this.element.parent()),r=r.height-(this.border_bottom+this.border_top+this.padding_bottom+this.padding_top),this.model.height=this._convertPercentageToPixel(parseInt(this._eleHeight),r));t.isNullOrUndefined(this._eleWidth)||typeof this._eleWidth!="string"||this._eleWidth.indexOf("%")==-1||this._parentWidth==n(this.element).parent().width()||(r=this._exactElementDimension(this.element.parent()),r=r.width-(this.border_left+this.border_right+this.padding_left+this.padding_right),this.model.width=this._convertPercentageToPixel(parseInt(this._eleWidth),r));this._ensureScrollers();u=this.model.scrollLeft;this.model.enableRTL?(this.element.hasClass("e-rtl")||this.element.addClass("e-rtl"),this._rtlScrollLeftValue=this.content().scrollLeft(),u>0?this.content().scrollLeft(this._rtlScrollLeftValue-u):this._setScrollLeftValue(u)):this.content().scrollLeft(u);(this.scrollTop()&&t.isNullOrUndefined(this._vScrollbar)||!t.isNullOrUndefined(this._vScrollbar)&&this._vScrollbar&&this._vScrollbar._scrollData!=null&&!this._vScrollbar._scrollData.skipChange)&&this.scrollTop(this._isJquery3?Math.ceil(this.scrollTop()):this.scrollTop());this.content().scrollTop(this.scrollTop());this._vScrollbar&&(this._vScrollbar._scrollData.dimension="Height",this._updateScrollbar(t.ScrollBar.Orientation.Vertical,this._hScroll),this._vScroll&&!this._vScrollbar._calculateLayout(this._vScrollbar._scrollData)&&this._vScrollbar._updateLayout(this._vScrollbar._scrollData));this._hScrollbar&&(this._hScrollbar._scrollData.dimension="Width",this._updateScrollbar(t.ScrollBar.Orientation.Horizontal,this._vScroll),this._hScroll&&!this._hScrollbar._calculateLayout(this._hScrollbar._scrollData)&&this._hScrollbar._updateLayout(this._hScrollbar._scrollData));t.browserInfo().name=="msie"&&t.browserInfo().version=="8.0"?this.element.find(".e-hhandle").css("left","0px"):this.model.targetPane!=null&&this._on(this.content().find(this.model.targetPane),"scroll",this._scroll);this._addActionClass();this._autohide()},_exactElementDimension:function(n){var i=n.get(0).getBoundingClientRect(),r=["left","right","top","bottom"],u,f,t;for(u=i.width?i.width:i.right-i.left,f=i.height?i.height:i.bottom-i.top,t=0;t<r.length;t++)this["border_"+r[t]]=isNaN(parseFloat(n.css("border-"+r[t]+"-width")))?0:parseFloat(n.css("border-"+r[t]+"-width")),this["padding_"+r[t]]=isNaN(parseFloat(n.css("padding-"+r[t])))?0:parseFloat(n.css("padding-"+r[t]));return{width:u,height:f}},_keyPressed:function(n,i){if(this.model.enabled){if(["input","select","textarea"].indexOf(i.tagName.toLowerCase())!==-1)return!0;var r,u;if(["up","down","pageUp","pageDown"].indexOf(n)!==-1)this._vScrollbar&&(t.browserInfo().name=="msie"&&this.model.allowVirtualScrolling&&this._content.focus(),r=this._vScrollbar._scrollData),u="o";else if(["left","right","pageLeft","pageRight"].indexOf(n)!==-1)this._hScrollbar&&(r=this._hScrollbar._scrollData),u="i";else return!0;return r?!this._changeTop(r,(n.indexOf(u)<0?-1:1)*(n[0]!=="p"?1:3)*r.scrollOneStepBy,"key"):!0}},scrollY:function(n,i,r,u,f){var e=this,f;if(n!==""){if(i){if(f={source:u||"custom",scrollData:this._vScrollbar?this._vScrollbar._scrollData:null,scrollTop:n,originalEvent:f},n=this._isJquery3?Math.ceil(f.scrollTop):f.scrollTop,this.scrollTop(n),this._trigger("scroll",f))return;this.content().scrollTop(n);return}(t.isNullOrUndefined(r)||r==="")&&(r=100);this._vScrollbar&&(n=parseFloat(n)>this._vScrollbar._scrollData.scrollable?this._vScrollbar._scrollData.scrollable:parseFloat(n));n=this._isJquery3?Math.ceil(n):n;this.scrollTop(n);this.content().stop().animate({scrollTop:n},r,"linear",function(){e._trigger("scroll",{source:u||"custom",scrollData:e._vScrollbar?e._vScrollbar._scrollData:null,scrollTop:n,originalEvent:f})})}},scrollX:function(n,i,r,u,f){var o=this,e,s;if(n!==""){if(this._hScrollbar&&(n=parseFloat(n)>this._hScrollbar._scrollData.scrollable?this._hScrollbar._scrollData.scrollable:parseFloat(n)),e=t.browserInfo().name,this.model.enableRTL&&e!="mozilla"&&(n<0&&(n=Math.abs(n)),s=this.model.targetPane!=null?this.content().find(this.model.targetPane)[0]:this.content()[0],f!="mousemove"&&f!="touchmove"&&e!="msie"&&e!="msie"&&(n=this._hScrollbar._scrollData.scrollable-n)),this.scrollLeft(n),i){if(this._trigger("scroll",{source:u||"custom",scrollData:this._hScrollbar?this._hScrollbar._scrollData:null,scrollLeft:n,originalEvent:f}))return;this.model.targetPane!=null&&this.content().find(this.model.targetPane).length?this.content().find(this.model.targetPane).scrollLeft(n):this.content().scrollLeft(n);return}(t.isNullOrUndefined(r)||r==="")&&(r=100);this.model.targetPane!=null&&this.content().find(this.model.targetPane).length?this.content().find(this.model.targetPane).stop().animate({scrollLeft:n},r,"linear"):this.content().stop().animate({scrollLeft:n},r,"linear",function(){o._trigger("scroll",{source:u||"custom",scrollData:o._hScrollbar?o._hScrollbar._scrollData:null,scrollLeft:n,originalEvent:f})})}},enable:function(){var n=this.element.find(".e-vscrollbar,.e-hscrollbar,.e-vscroll,.e-hscroll,.e-vhandle,.e-hhandle,.e-vscroll .e-icon,.e-hscroll .e-icon");n.hasClass("e-disable")&&(n.removeClass("e-disable").attr({"aria-disabled":!1}),this.model.enabled=!0);this._vScrollbar&&(this._vScrollbar._enabled=this.model.enabled);this._hScrollbar&&(this._hScrollbar._enabled=this.model.enabled)},disable:function(){var n=this.element.find(".e-vscrollbar,.e-hscrollbar,.e-vscroll,.e-hscroll,.e-vhandle,.e-hhandle,.e-vscroll .e-icon,.e-hscroll .e-icon");n.addClass("e-disable").attr({"aria-disabled":!0});this.model.enabled=!1;this._vScrollbar&&(this._vScrollbar._enabled=this.model.enabled);this._hScrollbar&&(this._hScrollbar._enabled=this.model.enabled)},_changeTop:function(n,i,r,u){var e=Math.ceil(this.model.targetPane!=null&&n.dimension!="height"?this.content().find(this.model.targetPane)[n.scrollVal]():this.content()[n.scrollVal]()),f;return n.dimension=="height"&&e==0&&(e=this.scrollTop()!=0?this.scrollTop():0),f=e+i,(n.enableRTL?f<n.scrollable:f>n.scrollable)&&(f=Math.round(n.scrollable)),(n.enableRTL?f>0:f<0)&&(f=0),f!==e&&(this["scroll"+n.xy](f,!0,"",r,u),n.xy!=="X"||t.isNullOrUndefined(this._hScrollbar)?t.isNullOrUndefined(this._vScrollbar)||this._vScrollbar.scroll(f,r,!0,u):this._hScrollbar.scroll(f,r,!0,u)),f!==e},_mouseWheel:function(t){var o;if((!this._vScrollbar||!t.ctrlKey)&&(this._vScrollbar||t.shiftKey)&&t.data&&this.model.enabled){var u=0,f=t.data.d,r=t,e;if(t=t.originalEvent,this._wheelStart&&this._trigger("wheelStart",{originalEvent:t,scrollData:r.data.d}),this._wheelStart=!1,clearTimeout(n.data(this,"timer")),this._wheelx!=1&&(t.wheelDeltaX==0||t.wheelDeltaY==0)&&(this._wheelx=1),navigator.platform.indexOf("Mac")==0&&this._wheelx==0&&(this._browser=="webkit"||this._browser=="chrome"))return!0;(this._browser=="mozilla"?t.axis==t.HORIZONTAL_AXIS?f=this._scrollXdata:this._scrollYdata:this._browser=="msie"?(t.type=="wheel"&&(u=t.deltaX/120),t.type=="mousewheel"&&t.shiftKey&&(f=this._scrollXdata,t.preventDefault?t.preventDefault():t.returnValue=!1)):this._wheelx&&t.wheelDeltaX!=0&&t.wheelDeltaY==0&&this._scrollXdata&&(f=this._scrollXdata),t.wheelDeltaX==0&&(this._wheelx=t.wheelDeltaX),t.wheelDelta?(u=this._normalizingDelta(t),i.opera&&parseFloat(i.opera.version,10)<10&&(u=-u)):t.detail&&(u=t.detail/3),u)&&(r.originalEvent&&(e=r.originalEvent.wheelDelta&&r.originalEvent.wheelDelta>0||r.originalEvent.detail&&r.originalEvent.detail<0?-1:1),this._changeTop(f,u*f.scrollOneStepBy,"wheel",t)?(t.preventDefault?t.preventDefault():r.preventDefault(),this._trigger("wheelMove",{originalEvent:t,scrollData:r.data.d,direction:e})):(this._trigger("scrollEnd",{originalEvent:t,scrollData:r}),this._wheelx=0),o=this,n.data(this,"timer",setTimeout(function(){o._wheelStart=!0;o._trigger("wheelStop",{originalEvent:t,scrollData:r.data.d,direction:e})},250)))}},_normalizingDelta:function(n){return navigator.platform.indexOf("Mac")==0?-n.wheelDelta/3:-n.wheelDelta/120},_contentHeightWidth:function(){this.content().siblings().css("display")=="block"&&this.model.autoHide?(this._hScroll&&this.content()[this._contentHeight](this._ElementHeight-this.model.scrollerSize),this._vScroll&&this.content()[this._contentWidth](this._ElementWidth-this.model.scrollerSize)):this.content().siblings().css("display")=="none"&&this.model.autoHide&&(this._vScroll||this._hScroll)&&(this.content()[this._contentHeight](this._ElementHeight),this.content()[this._contentWidth](this._ElementWidth))},_scrollerHover:function(n){this.model.enabled&&(n.type!="mouseenter"&&n.type!="touchstart"||this.content().siblings().is(":visible")?n.type!="mouseleave"&&n.type!="touchend"||this.element.hasClass("e-scroll-focus")||(this.content().siblings().hide(),this._contentHeightWidth(),this._trigger("scrollHide",{originalEvent:n})):(this.content().siblings().css("display","block"),this._contentHeightWidth(),this._ensureScrollers(),this._setScrollLeftValue(this.model.scrollLeft),this._trigger("scrollVisible",{originalEvent:n})))},_mouseUp:function(r){if(r.data){var u=r.data.d;this.model.enableRTL&&(r.type=="mouseup"||r.type=="touchend")&&(this.model.scrollLeft=this._rtlScrollLeftValue-this.model.scrollLeft);r.type!=="mouseup"&&r.type!=="touchend"&&(r.toElement||r.relatedTarget)||(this.content().css("cursor","default"),this._off(n(document),"mousemove touchmove"),this._off(this.content(),"touchmove",this._touchMove),this._off(n(document),"mouseup touchend",this._mouseUp),u.fromScroller=!1,this._mouseMoved!==!0||r.data.source!=="thumb"||t.isNullOrUndefined(this.model)||(n.when(this.content()).done(t.proxy(function(){this._trigger("thumbEnd",{originalEvent:r,scrollData:u})},this)),this._off(n(i),"blur")));u.up=!0;this._mouseMoved=!1;i.ontouchmove=null}},_mouseDownOnContent:function(u){var f,s;if((this._startX=u.clientX!=r?u.clientX:u.originalEvent.changedTouches[0].clientX,this._startY=u.clientY!=r?u.clientY:u.originalEvent.changedTouches[0].clientY,this._timeStart=u.timeStamp||Date.now(),this.model.enabled)&&(f=u.data.d,this._evtData=u.data,s=f.handler==="e-vhandle"?this.element.find("."+f.handler).closest(".e-scrollbar"):this.element.find("."+f.handler).closest(".e-scrollbar"),this._bindBlurEvent(s,u),!this._trigger("thumbStart",{originalEvent:u,scrollData:f}))&&(u.which!=3||u.button!=2)){f.fromScroller=!0;var e=null,o=1,c=5,h;this._document=n(document);this._window=n(i);this._mouseMove=function(n){var l,a,s;if(this.model.enableRTL&&this._UpdateScrollLeftValue(u),this._startX+this._startY!=n.clientX+n.clientY){if(this._relDisX=(this._startx=n.clientX!=r?n.clientX:n.originalEvent.changedTouches[0].clientX)-this._startX,this._relDisY=(this._starty=n.clientY!=r?n.clientY:n.originalEvent.changedTouches[0].clientY)-this._startY,this._duration=(n.timeStamp||Date.now())-this._timeStart,this._velocityY=Math.abs(this._relDisY)/this._duration,this._velocityX=Math.abs(this._relDisX)/this._duration,this._swipe=Math.abs(this._relDisX)>Math.abs(this._relDisY)?this._relDisX>0?"left":"right":this._relDisY>0?"up":"down",!t.isNullOrUndefined(n.target.tagName)&&n.target.tagName.toLowerCase()==="iframe"){n.type="mouseup";this._mouseUp(n);return}if(l=n.type=="mousemove"?n[f.clientXy]:n.originalEvent.changedTouches[0][f.clientXy],e&&l!==e&&(this._mouseMoved=!0,a=l-e,s=this.model[f.scrollVal]-a,o==1&&Math.abs(a)>c&&(h=f.position,o=0),o==0&&(e=l),s>=0&&s<=f.scrollable&&h===f.position)){var v=this._velocityY>.5&&this._duration<50&&f.position=="Top",y=this._velocityX>.5&&this._duration<50&&f.position=="Left",p=(this._velocityY>.5||this._velocityX>.5)&&this._duration<50;p?v?(s=Math.abs(this._relDisY)+this._duration*this._velocityY,this._startY>this._starty?(s+=this.scrollTop(),s>f.scrollable&&(s=f.scrollable)):(s<this.scrollTop()&&(s=Math.abs(s-this.scrollTop())),s>this.scrollTop()&&(s=0)),this.scrollTop()<=f.scrollable&&this.scrollY(s,!1,this.model.animationSpeed,"thumb")):y&&(s=Math.abs(this._relDisX),this._startX>this._startx?(s+=this.scrollLeft(),s>f.scrollable&&(s=f.scrollable)):(s-=this.scrollLeft(),s=Math.abs(s),(s>f.scrollable||s>=this.scrollLeft())&&(s=0)),this.scrollLeft()<=f.scrollable&&this.scrollX(s,!1,this.model.animationSpeed,"thumb")):(this["scroll"+f.xy](s,!0,"","thumb",n.type),f.xy==="X"?this._hScrollbar.scroll(s,"thumb",!0,n.type):t.isNullOrUndefined(this._vScrollbar)||this._vScrollbar.scroll(s,"thumb",!0,n.type),this.content().css("cursor","pointer"),this._trigger("thumbMove",{originalEvent:n,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:f}))}i.ontouchmove=function(n){n=n||i.event;n.preventDefault&&n.preventDefault();n.returnValue=!1};e==null&&(e=l);(Math.round(this._content.scrollTop())==0&&this._swipe=="down"||(Math.ceil(this._content.scrollTop())==f.scrollable||Math.ceil(this._content.scrollTop())+1==f.scrollable)&&this._swipe=="up")&&(this._trigger("scrollEnd",{originalEvent:n.originalEvent,scrollData:n}),i.ontouchmove=null)}};this._trigger("touchStart",{originalEvent:u,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:this._scrollData,scrollTop:this.content().scrollTop(),scrollLeft:this.content().scrollLeft()});this._on(n(document),"mousemove",{d:f,source:"thumb"},this._mouseMove);this._isNativeScroll?this._on(this.content(),"touchmove",{d:f,source:"thumb"},this._touchMove):this._on(n(document),"touchmove",{d:f,source:"thumb"},this._mouseMove);this._on(n(document),"mouseup touchend",{d:f,source:"thumb"},this._mouseUp)}},_touchMove:function(){this.content().css("cursor","pointer");this._mouseMoved=!0;this._tempLeft=this.model.targetPane!=null?this.content().find(this.model.targetPane).scrollLeft():this.content().scrollLeft();this._tempTop=this.content().scrollTop()},_touchDown:function(n){var t;t=this._tempLeft!=this.scrollLeft()?this._scrollXdata:this._tempTop!=this.scrollTop()?this._scrollYdata:this._scrollYdata?this._scrollYdata:this._scrollXdata;this._trigger("scrollStop",{source:"thumb",originalEvent:n,scrollData:t,scrollTop:this.content().scrollTop(),scrollLeft:this.content().scrollLeft()})},_speedScrolling:function(n){var r,i,u,n,t;if(this._mouseMoved){if(this.element.find(".e-vhandle").length>0&&(r=this.content().scrollTop(),this._tempTop!==r&&(this._trigger("thumbMove",{originalEvent:n,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:this._scrollData}),this._vScrollbar.scroll(this.content().scrollTop(),"thumb",!0,"touchmove"),n={source:"thumb",scrollData:this._vScrollbar?this._vScrollbar._scrollData:null,scrollTop:this.content().scrollTop(),originalEvent:n},t=this._isJquery3?Math.ceil(n.scrollTop):n.scrollTop,this.scrollTop(t),this._trigger("scroll",n))))return;if(this.element.find(".e-hhandle").length>0&&(i=this.model.targetPane!=null?this.content().find(this.model.targetPane):this.content(),u=i.scrollLeft(),this._tempLeft!==u&&(this._trigger("thumbMove",{originalEvent:n,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:this._scrollData}),this._hScrollbar.scroll(i.scrollLeft(),"thumb",!0,"touchmove"),n={source:"thumb",scrollData:this._hScrollbar?this._hScrollbar._scrollData:null,scrollLeft:this.content().scrollLeft(),originalEvent:n},t=this._isJquery3?Math.ceil(n.scrollLeft):n.scrollLeft,this.scrollLeft(t),this._trigger("scroll",n))))return;this.content().css("cursor","pointer")}},_scroll:function(r){var s=[this._vScrollbar?this._vScrollbar._scrollData:null,this._hScrollbar?this._hScrollbar._scrollData:null],h,f,u,o,e;for(this._evtData&&(h=this._evtData.d?this._evtData.d:this._evtData),f=0;f<2;f++)(u=s[f],u&&!u.skipChange)&&((this.model&&(!this.model.targetPane||this.model.targetPane&&h&&h.xy!="X")&&(u.dimension==="height"?this.scrollTop(r.target[u.scrollVal]):this.scrollLeft(r.target[u.scrollVal])),u.sTop=this.model&&this.model.targetPane!=null&&f==1&&this.content().find(this.model.targetPane).length?this.content().find(this.model.targetPane)[0][u.scrollVal]:u.scrollVal=="scrollTop"?this.scrollTop():this.scrollLeft(),this[u.scrollVal](u.sTop),u.fromScroller)||(f===1?(o=this.content()[0],this._rtlScrollLeftValue&&o.scrollWidth-o.clientWidth!=this._rtlScrollLeftValue&&(this._rtlScrollLeftValue=o.scrollWidth-o.clientWidth),u.sTop=this.model&&t.browserInfo().name!="mozilla"&&this.model.enableRTL&&!this._hScrollbar._scrollData._scrollleftflag?this._rtlScrollLeftValue==0?u.sTop*-1:u.sTop-this._rtlScrollLeftValue:u.sTop,this._hScrollbar.scroll(u.sTop,"",!0)):this._vScrollbar.scroll(u.sTop,"",!0),(s.length==2&&f==1||s.length==1&&f==0)&&(this._externalScroller=!1,this.model&&this._trigger("scroll",{source:"custom",scrollData:this._hScrollbar?this._hScrollbar._scrollData:null,scrollLeft:this.scrollLeft(),originalEvent:r}))));this._isNativeScroll&&this.model.enableTouchScroll&&this._speedScrolling(r);this._UpdateScrollLeftValue(r);e=this;this._vScrollbar&&this._scrollYdata&&this.model&&this._scrollYdata.scrollable-this.model.scrollOneStepBy>=this.scrollTop()&&(n(":hover").filter(this.element[0]).length||e._off(t.getScrollableParents(e.wrapper),"scroll",null),i.onmousewheel=function(t){e.model&&e.model.preventDefault&&n(":hover").filter(e.element[0]).length&&t.preventDefault()})},_UpdateScrollLeftValue:function(n){this.model&&n.type!="touchstart"&&n.type!="mousedown"&&this.model.enableRTL&&this._rtlScrollLeftValue&&this.model.scrollLeft!=this._previousScrollLeft&&(this.model.scrollLeft=this._rtlScrollLeftValue-this.model.scrollLeft,this._previousScrollLeft=this.model.scrollLeft);(this.model&&n.type=="touchstart"||n.type=="mousedown")&&this.model.enableRTL&&(this.model.scrollLeft=this.content().scrollLeft(),this.option("scrollLeft",this.content().scrollLeft()))},_changevHandlerPosition:function(n){var t=this._vScrollbar;t&&(n=t._scrollData!=null&&n>=t._scrollData.scrollable?t._scrollData.scrollable:n,t!=null&&n>=0&&n<=t._scrollData.scrollable&&t[t._scrollData.handler].css(t._scrollData.lPosition,n/t._scrollData.onePx+"px"))},_changehHandlerPosition:function(n){var t=this._hScrollbar;t&&(n=t._scrollData!=null&&n>=t._scrollData.scrollable?t._scrollData.scrollable:n,t!=null&&top>=0&&n<=t._scrollData.scrollable&&t[t._scrollData.handler].css(t._scrollData.lPosition,n/t._scrollData.onePx+"px"))},_destroy:function(){this._off(this.content(),"scrollstop",this._touchDown);this._off(n(document),"mouseup",this._mouseUpContent);this.element.css({width:"",height:""}).children(".e-vscrollbar,.e-hscrollbar").remove();this.content().removeClass("e-content").css({width:"",height:""});this.element.removeClass("e-widget")},_preventDefault:function(n){n=n||i.event;n.preventDefault&&n.preventDefault();n.returnValue=!1}})}(jQuery,Syncfusion,window),function(n,t){function ft(n,t){var s=n||"",k=y,t=t.toString(),ct=t.indexOf(".")>-1||n.indexOf(".")>-1,r=0,rt=0,i="",d="",a=n.split(","),ut="0",lt,at=n.toLowerCase().indexOf("e"),w,o,ft=s.indexOf("#"),v,st,b,l,p,nt,tt,f,u,c,e;if(n.indexOf("\\")>-1&&(d=n.substr(0,n.lastIndexOf("\\")+1),n=n.substr(n.lastIndexOf("\\")+1,n.length),ft=n.indexOf("#")),at>-1){for(v="",s="",o=n.toLowerCase().split("e"),lt=n.indexOf("+")>-1?n.split("+")[1]:n.split("-")[1],t=parseInt(t).toExponential(),w=t.split("e"),r=o[1].length-w[1].length,u=o[1].length-1;u>0;u--)o[1][u]!="0"?s+=o[1][u]:r>1?(s+="#",r--):s+="0";for(st=n.indexOf("+")>-1?"+":"",s=st+s.split("").reverse().join(""),u=0;u<w[0].length;u++)v=w[0][u]!="."?v.concat("#"):v.concat(".");v.length>o[0].length&&(v=o[0]);s=d+v+"e"+s}else if(ct){if(o=n.split("."),w=t.split("."),o[1]=o[1].replace(/[,.]/g,""),r=o[0].replace(/[,.]/g,"").length-w[0].replace(/[,.]/g,"").length,r<0&&ej.isNullOrUndefined(n.match(/[\[\(\)\]]/g))){for(a=o[0].split(","),i=o[0].split(","),e=a.length-1;e>=0;e--)if(a[e])for(f=a[e].length,u=0,c=Math.abs(r);u<c;u++){if(f===3)break;i[e]="0"+i[e];f++;r++}if(i=i.join(),r<0)for(ej.isNullOrUndefined(f)||f==3||(i=","+i),u=0,c=Math.abs(r);u<c;u++)f===3&&(i=","+i,f=0),i="0"+i,f++;r=0;s=d+i+"."+o[1]}else if(ej.isNullOrUndefined(n.match(/[\[\(\)\]]/g))){for(i=o[0].replace(/[,.]/g,""),b="",f=0,l=i.length-1;l>=0;l--)f===3?(b=","+b,f=0):f++,b=i[l]+b;s=d+b+"."+o[1]}}else{if(p=0,nt=a.splice(1,a.length),r=n.replace(/[,.\[\(\]\)]/g,"").length-t.replace(/[,.]/g,"").length,ft>-1){for(tt=0,c=n.length;tt<c;tt++)n[tt]==="#"&&p++;(p===1||a[1]&&p===2)&&(ut="#");p===1&&(nt=a[0])}if(r<0){for(o=s.split(","),i=o.splice(1,o.length),e=a.length-1;e>=0;e--)if(nt[e])for(f=nt[e].length,i[e]||(i[e]=""),u=0,c=Math.abs(r)+1;u<c;u++){if(p!=1&&f===3){f=0;break}i[e]=i[e].concat(ut);f++;r++}if(i=i.join(),r<0)for(ej.isNullOrUndefined(f)||f==3||(i=","+i),u=0,c=Math.abs(r)+1;u<c;u++)p!=1&&f===3&&(i=","+i,f=0),i=ut+i,f++;r=0;s=d+i}rt=0}for(var et=[],vt=s.split(""),it=0,l=0,h,g,ot=!1,ht=!1,yt=n.indexOf("\\");l<s.length;l++)if(h=vt[l],h==="e"&&(ht=!0),h==="0"&&ft<0?r>0&&rt<=l?(r--,rt++):r>0?r--:g=k[h]:h=="0"&&(ht||h!="0")||(g=k[h]),h==="0"&&yt>-1&&(g=k[h]),l===s.lastIndexOf("\\")&&(ot=!1),g&&!ot)et[it]={rule:g},it+=1;else for(h==="\\"&&(h="",l===s.lastIndexOf("\\")||(ot=!0)),h=h.split(""),e=0;e<h.length;e++)et[it]=h[e],it+=1;return k=et,{rules:k,format:s}}function et(n,t,i){var u,r,e,o;if(ej.isNullOrUndefined(n)||typeof n=="string"||!t)throw"Bad Number Format Exception";if(o=t,u=ft(t,n),e=u.rules,t=u.format,t.indexOf("\\")>=0){var s=t.lastIndexOf("\\"),l=t.slice(0,s),f=t.slice(s+1,t.length),c;f=f.replace(/[9?CANa#&]/g,"_");c=l+f;r=c.replace(/[\\]/g,"");t=t.replace(/[\\]/g,"")}else r=t.replace(/[9?CANa#&]/g,"_");return r=h(r,i),ot(n,t,r,e,i,o)}function h(n,t){var r,f,e,o,u,i;if(n.length!=0){for(r=ej.preferredCulture(t),u="",f=r.numberFormat[","],e=r.numberFormat.currency.symbol,o=r.numberFormat["."],i=0;i<n.length;i++)u+=n[i]==","?f:n[i]=="."?o:n[i]=="$"?e:n[i];n=u}return n}function ot(i,r,u,f,e,o){var ft,l,nt,it;if(!ej.isNullOrUndefined(i)){r.toLowerCase().indexOf("e")>-1&&(ft=o.indexOf("+")>-1?o.split("+")[1]:o.split("-")[1],i=i.toExponential(),o.indexOf("-")>-1&&(i=i.replace("+","")));var b,ut,k,et,rt=b=ut=i.toString(),s=u,a=k=0,c,g="_",d,v,y,tt,ot=r.match(/[\(\[\]\)]/g);if(rt=!r.indexOf("\\")>=0?i=ut.replace(/[\(\)-]/g,""):et,l=f.length-1,nt=b.length-1,ej.isNullOrUndefined(ot))while(a<f.length){if(c=b[k],d=f[a],c==t)break;if(c===d||c===g||c==="e"&&c===d.toLowerCase()?(c===g?g:"",v=s.substring(0,a),y=s.substring(a),c=h(c,e),s=v+c+y.substr(1,y.length),k+=1,a+=1):f[a].rule!=t?(it=b.charCodeAt(k),p(r,it,a)?(v=s.substring(0,a),y=s.substring(a),tt=w(b,k,a,r,u),s=v+tt+y.substr(1,y.length),a++,k++):a++):(d==="e"&&(k=b.indexOf("e")+1),a++),k>rt.length||l<0)break}else while(l>=0){if(c=b[nt],d=f[l],c==t)break;if(c===d||c===g||c==="e"&&c===d.toLowerCase()?(c===g?g:"",v=s.substring(0,l+1),y=s.substring(l+1),c=h(c,e),s=v.substr(0,v.length-1)+c+y,l--,nt--):f[l].rule!=t?(it=b.charCodeAt(nt),p(r,it,l)?(v=s.substring(0,l+1),y=s.substring(l+1),tt=w(b,nt,l,r,u),s=v.substr(0,v.length-1)+tt+y,l--,nt--):l--):l--,k>rt.length||l<0)break}if(i)return(s.indexOf("_")-s.indexOf(",")==1||s.indexOf("_")-s.indexOf(".")==1)&&(s=s.slice(0,s.indexOf("_")-1)),n.trim(s.replace(/[_]/g,""))==""?null:s.replace(/[_]/g,"")}}function p(t,i,r){var f=y,u=!1,e=t.substr(r,1),o=String.fromCharCode(i);return n.each(f,function(n,t){e==n&&(u=o.match(new RegExp(t))?!0:!1)}),u}function w(n,t,i,r,u){var f=!1;return r.indexOf(".")>-1&&i===u.length-1&&n[t+1]>5&&(f=!0),f?(parseInt(n[t])+1).toString():n[t]}function o(n,t){return n.indexOf(t)===0}function c(n,t){return n.substr(n.length-t.length)===t}function f(n){return(n+"").replace(tt,"")}function st(n){return isNaN(n)?NaN:Math[n<0?"ceil":"floor"](n)}function s(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n}function l(n,t,i){var r=t["-"],u=t["+"],f;switch(i){case"n -":r=" "+r;u=" "+u;case"n-":c(n,r)?f=["-",n.substr(0,n.length-r.length)]:c(n,u)&&(f=["+",n.substr(0,n.length-u.length)]);break;case"- n":r+=" ";u+=" ";case"-n":o(n,r)?f=["-",n.substr(r.length)]:o(n,u)&&(f=["+",n.substr(u.length)]);break;case"(n)":o(n,"(")&&c(n,")")&&(f=["-",n.substr(1,n.length-2)])}return f||["",n]}function ht(n,t,i){var l=i.groupSizes||[3],c=l[0],a=1,v=ej._round(n,t),p;isFinite(v)||(v=n);n=v;var r=n+"",u="",e=r.split(/e/i),f=e.length>1?parseInt(e[1],10):0;r=e[0];e=r.split(".");r=e[0];u=e.length>1?e[1]:"";f>0?(u=s(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=s(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f));p=i["."]||".";u=t>0?p+(u.length>t?u.slice(0,t):s(u,t)):"";for(var o=r.length-1,y=i[","]||",",h="";o>=0;){if(c===0||c>o)return r.slice(0,o+1)+(h.length?y+h+u:u);h=r.slice(o-c+1,o+1)+(h.length?y+h:"");o-=c;a<l.length&&(c=l[a],a++)}return r.slice(0,o+1)+y+h+u}function ct(n,t,i){var h,r;if(!t||t==="i")return i.name.length?n.toLocaleString():n.toString();t=t||"D";var e=i.numberFormat,u=Math.abs(n),f=-1,o;t.length>1&&(f=parseInt(t.slice(1),10));h=t.charAt(0).toUpperCase();switch(h){case"D":o="n";u=st(u);f!==-1&&(u=s(""+u,f,!0));n<0&&(u=-u);break;case"N":r=e;r.pattern=r.pattern||["-n"];case"C":r=r||e.currency;r.pattern=r.pattern||["-$n","$n"];case"P":r=r||e.percent;r.pattern=r.pattern||["-n %","n %"];o=n<0?r.pattern[0]||"-n":r.pattern[1]||"n";f===-1&&(f=r.decimals);u=ht(u*(h==="P"?100:1),f,r);break;default:return et(n,t,i)}return lt(u,o,e)}function lt(n,t,i){for(var f=/n|\$|-|%/g,r="",e,u;;){if(e=f.lastIndex,u=f.exec(t),r+=t.slice(e,u?u.index:t.length),!u)break;switch(u[0]){case"n":r+=n;break;case"$":r+=i.currency.symbol||"$";break;case"-":/[1-9]/.test(n)&&(r+=i["-"]||"-");break;case"%":r+=i.percent.symbol||"%"}}return r}function b(n,t,i){var p,o,s,r,w,d,b,k,g,h,nt;typeof i=="string"&&(t=i,i=10);t=ej.globalize.findCulture(t);var c=NaN,u=t.numberFormat,y=t.numberFormat.pattern[0];if(n=n.replace(/ /g,""),n.indexOf(t.numberFormat.currency.symbol)>-1?(n=n.replace(t.numberFormat.currency.symbol||"$",""),n=n.replace(t.numberFormat.currency["."]||".",t.numberFormat["."]||"."),y=f(t.numberFormat.currency.pattern[0].replace("$",""))):n.indexOf(t.numberFormat.percent.symbol)>-1&&(n=n.replace(t.numberFormat.percent.symbol||"%",""),n=n.replace(t.numberFormat.percent["."]||".",t.numberFormat["."]||"."),y=f(t.numberFormat.percent.pattern[0].replace("%",""))),n=f(n),it.test(n))c=parseFloat(n,"",i);else if(rt.test(n))c=parseInt(n,16);else{var a=l(n,u,y),v=a[0],e=a[1];v===""&&u.pattern[0]!=="-n"&&(a=l(n,u,"-n"),v=a[0],e=a[1]);v=v||"+";s=e.indexOf("e");s<0&&(s=e.indexOf("E"));s<0?(o=e,p=null):(o=e.substr(0,s),p=e.substr(s+1));d=u["."]||".";b=o.indexOf(d);b<0?(r=o,w=null):(r=o.substr(0,b),w=o.substr(b+d.length));k=u[","]||",";r=r.split(k).join("");g=k.replace(/\u00A0/g," ");k!==g&&(r=r.split(g).join(""));h=v+r;w!==null&&(h+="."+w);p!==null&&(nt=l(p,u,y),h+="e"+(nt[0]||"+")+nt[1]);!i&&ut.test(h)?c=parseFloat(h):i&&(c=parseInt(h,i))}return c}function r(n,t,i){return n<t||n>i}function at(n,t){var u=new Date,i,r;return t<100&&(i=n.twoDigitYearMax,i=typeof i=="string"?(new Date).getFullYear()%100+parseInt(i,10):i,r=u.getFullYear(),t+=r-r%100,t>i&&(t-=100)),t}function e(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1}function a(n){return n.split(" ").join(" ").toUpperCase()}function u(n){for(var i=[],t=0,r=n.length;t<r;t++)i[t]=a(n[t]);return i}function vt(n,t,i){var r,o=n.days,f=n._upperDays;return f||(n._upperDays=f=[u(o.names),u(o.namesAbbr),u(o.namesShort)]),t=a(t),i?(r=e(f[1],t),r===-1&&(r=e(f[2],t))):r=e(f[0],t),r}function yt(n,t,i){var s=n.months,h=n.monthsGenitive||n.months,r=n._upperMonths,o=n._upperMonthsGen,f;return r||(n._upperMonths=r=[u(s.names),u(s.namesAbbr)],n._upperMonthsGen=o=[u(h.names),u(h.namesAbbr)]),t=a(t),f=e(i?r[1]:r[0],t),f<0&&(f=e(i?o[1]:o[0],t)),f}function v(n,t){for(var r,f=0,i=!1,u=0,e=n.length;u<e;u++)r=n.charAt(u),r=="'"?(i?t.push("'"):f++,i=!1):r=="\\"?(i&&t.push("\\"),i=!i):(t.push(r),i=!1);return f}function pt(n,t,i,r){var s,e;if(!n)return null;var u=0,f=0,o=null;t=t.split("");for(var h=t.length,c=function(n){for(var i=0;t[u]===n;)i++,u++;return i>0&&(u-=1),i},l=function(t){var r=new RegExp("^\\d{1,"+t+"}"),i=n.substr(f,t).match(r);return i?(i=i[0],f+=i.length,parseInt(i,10)):null},a=function(t,i){for(var r=0,s=t.length,e,o,u;r<s;r++)if(e=t[r],o=e.length,u=n.substr(f,o),i&&(u=u.toLowerCase()),u==e)return f+=o,r+1;return null},v=function(n){for(var t=0,r=n.length,i=[];t<r;t++)i[t]=(n[t]+"").toLowerCase();return i},y=function(n){var t={};for(var i in n)t[i]=v(n[i]);return t};u<h;u++)s=t[u],s==="d"&&(e=c("d"),r._lowerDays||(r._lowerDays=y(r.days)),o=e<3?l(2):a(r._lowerDays[e==3?"namesAbbr":"names"],!0));return o}function k(n,t){t=t||"F";var i,u=n.patterns,r=t.length;if(r===1){if(i=u[t],!i)throw"Invalid date format string '"+t+"'.";t=i}else r===2&&t.charAt(0)==="%"&&(t=t.charAt(1));return t}function d(n,t,u){var w,ct,h,g,nt,s,wt,b,et;n=f(n);t=f(t);var e=u.calendar,ot=ej.globalize._getDateParseRegExp(e,t),st=new RegExp(ot.regExp).exec(n);if(st===null)return null;var ht=ot.groups,y=null,a=null,v=null,tt=null,l=0,p,it=0,rt=0,ut=0,k=null,ft=!1;for(w=0,ct=ht.length;w<ct;w++)if(h=st[w+1],h){var lt=ht[w],d=lt.length,c=parseInt(h,10);switch(lt){case i.DAY_OF_MONTH_DOUBLE_DIGIT:case i.DAY_OF_MONTH_SINGLE_DIGIT:if(v=c,r(v,1,31))return null;break;case i.MONTH_THREE_LETTER:case i.MONTH_FULL_NAME:if(a=yt(e,h,d===3),r(a,0,11))return null;break;case i.MONTH_SINGLE_DIGIT:case i.MONTH_DOUBLE_DIGIT:if(a=c-1,r(a,0,11))return null;break;case i.YEAR_SINGLE_DIGIT:case i.YEAR_DOUBLE_DIGIT:case i.YEAR_FULL:if(y=d<4?at(e,c):c,r(y,0,9999))return null;break;case i.HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:if(l=c,l===12&&(l=0),r(l,0,11))return null;break;case i.HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:if(l=c,r(l,0,23))return null;break;case i.MINUTES_SINGLE_DIGIT:case i.MINUTES_DOUBLE_DIGIT:if(it=c,r(it,0,59))return null;break;case i.SECONDS_SINGLE_DIGIT:case i.SECONDS_DOUBLE_DIGIT:if(rt=c,r(rt,0,59))return null;break;case i.MERIDIAN_INDICATOR_FULL:case i.MERIDIAN_INDICATOR_SINGLE:if(ft=e.PM&&(h===e.PM[0]||h===e.PM[1]||h===e.PM[2]),!ft&&(!e.AM||h!==e.AM[0]&&h!==e.AM[1]&&h!==e.AM[2]))return null;break;case i.DECISECONDS:case i.CENTISECONDS:case i.MILLISECONDS:if(ut=c*Math.pow(10,3-d),r(ut,0,999))return null;break;case i.DAY_OF_WEEK_THREE_LETTER:v=pt(n,t,u,e);break;case i.DAY_OF_WEEK_FULL_NAME:if(vt(e,h,d===3),r(tt,0,6))return null;break;case i.TIME_ZONE_OFFSET_FULL:if((g=h.split(/:/),g.length!==2)||(p=parseInt(g[0],10),r(p,-12,13))||(nt=parseInt(g[1],10),r(nt,0,59)))return null;k=p*60+(o(h,"-")?-nt:nt);break;case i.TIME_ZONE_OFFSET_SINGLE_DIGIT:case i.TIME_ZONE_OFFSET_DOUBLE_DIGIT:if(p=c,r(p,-12,13))return null;k=p*60}}if(s=new Date,b=e.convert,wt=b?b.fromGregorian(s)[0]:s.getFullYear(),y===null&&(y=wt),a===null&&(a=0),v===null&&(v=1),b){if(s=b.toGregorian(y,a,v),s===null)return null}else if((s.setFullYear(y,a,v),s.getDate()!==v)||tt!==null&&s.getDay()!==tt)return null;return ft&&l<12&&(l+=12),s.setHours(l,it,rt,ut),k!==null&&(et=s.getMinutes()-(k+s.getTimezoneOffset()),s.setHours(s.getHours()+parseInt(et/60,10),et%60)),s}function g(n,t,r){function o(n,t){var i,r=n+"";return t>1&&r.length<t?(i=it[t-2]+r,i.substr(i.length-t,t)):r}function ut(){return l||b?l:(l=rt.test(t),b=!0,l)}var e=r.calendar,p=e.convert,u,w,y,f,tt,h;if(!t||!t.length||t==="i")return r&&r.name.length?p?g(n,e.patterns.F,r):n.toLocaleString():n.toString();w=t==="s";t=k(e,t);u=[];var s,it=["0","00","000"],l,b,rt=/([^d]|^)(d|dd)([^d]|$)/g,d=0,nt=/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g,c;for(!w&&p&&(c=p.fromGregorian(n));;){var ft=nt.lastIndex,a=nt.exec(t),et=t.slice(ft,a?a.index:t.length);if(d+=v(et,u),!a)break;if(d%2){u.push(a[0]);continue}y=a[0];f=y.length;switch(y){case i.DAY_OF_WEEK_THREE_LETTER:case i.DAY_OF_WEEK_FULL_NAME:tt=f===3?e.days.namesAbbr:e.days.names;u.push(tt[n.getDay()]);break;case i.DAY_OF_MONTH_SINGLE_DIGIT:case i.DAY_OF_MONTH_DOUBLE_DIGIT:l=!0;u.push(o(c?c[2]:n.getDate(),f));break;case i.MONTH_THREE_LETTER:case i.MONTH_FULL_NAME:h=c?c[1]:n.getMonth();u.push(e.monthsGenitive&&ut()?e.monthsGenitive[f===3?"namesAbbr":"names"][h]:e.months[f===3?"namesAbbr":"names"][h]);break;case i.MONTH_SINGLE_DIGIT:case i.MONTH_DOUBLE_DIGIT:u.push(o((c?c[1]:n.getMonth())+1,f));break;case i.YEAR_SINGLE_DIGIT:case i.YEAR_DOUBLE_DIGIT:case i.YEAR_FULL:h=c?c[0]:n.getFullYear();f<4&&(h=h%100);u.push(o(h,f));break;case i.HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:s=n.getHours()%12;s===0&&(s=12);u.push(o(s,f));break;case i.HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:u.push(o(n.getHours(),f));break;case i.MINUTES_SINGLE_DIGIT:case i.MINUTES_DOUBLE_DIGIT:u.push(o(n.getMinutes(),f));break;case i.SECONDS_SINGLE_DIGIT:case i.SECONDS_DOUBLE_DIGIT:u.push(o(n.getSeconds(),f));break;case i.MERIDIAN_INDICATOR_SINGLE:case i.MERIDIAN_INDICATOR_FULL:h=n.getHours()<12?e.AM?e.AM[0]:" ":e.PM?e.PM[0]:" ";u.push(f===1?h.charAt(0):h);break;case i.DECISECONDS:case i.CENTISECONDS:case i.MILLISECONDS:u.push(o(n.getMilliseconds(),3).substr(0,f));break;case i.TIME_ZONE_OFFSET_SINGLE_DIGIT:case i.TIME_ZONE_OFFSET_DOUBLE_DIGIT:s=n.getTimezoneOffset()/60;u.push((s<=0?"+":"-")+o(Math.floor(Math.abs(s)),f));break;case i.TIME_ZONE_OFFSET_FULL:s=n.getTimezoneOffset()/60;u.push((s<=0?"+":"-")+o(Math.floor(Math.abs(s)),2)+":"+o(Math.abs(n.getTimezoneOffset()%60),2));break;case i.DATE_SEPARATOR:u.push(e["/"]||"/");break;default:throw"Invalid date format pattern '"+y+"'.";}}return u.join("")}function nt(n,t){return t.length?nt(n[t[0]],t.slice(1)):n}var i;ej.globalize={};ej.cultures={};ej.cultures["default"]=ej.cultures["en-US"]=n.extend(!0,{name:"en-US",englishName:"English",nativeName:"English",language:"en",isRTL:!1,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{"/":"/",":":":",firstDay:0,week:{name:"Week",nameAbbr:"Wek",nameShort:"Wk"},days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],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"}}}},ej.cultures["en-US"]);ej.cultures["en-US"].calendar=ej.cultures["en-US"].calendar||ej.cultures["en-US"].calendars.standard;var tt=/^\s+|\s+$/g,it=/^[+-]?infinity$/i,rt=/^0x[a-f0-9]+$/i,ut=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,y={"9":"[0-9 ]","0":"[0-9 ]",a:"[A-Za-z0-9 ]",A:"[A-Za-z0-9]",N:"[0-9]","#":"[0-9]","&":"[^]+","<":"",">":"",C:"[A-Za-z ]","?":"[A-Za-z]"};i={DAY_OF_WEEK_THREE_LETTER:"ddd",DAY_OF_WEEK_FULL_NAME:"dddd",DAY_OF_MONTH_SINGLE_DIGIT:"d",DAY_OF_MONTH_DOUBLE_DIGIT:"dd",MONTH_THREE_LETTER:"MMM",MONTH_FULL_NAME:"MMMM",MONTH_SINGLE_DIGIT:"M",MONTH_DOUBLE_DIGIT:"MM",YEAR_SINGLE_DIGIT:"y",YEAR_DOUBLE_DIGIT:"yy",YEAR_FULL:"yyyy",HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:"h",HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:"hh",HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:"H",HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:"HH",MINUTES_SINGLE_DIGIT:"m",MINUTES_DOUBLE_DIGIT:"mm",SECONDS_SINGLE_DIGIT:"s",SECONDS_DOUBLE_DIGIT:"ss",MERIDIAN_INDICATOR_SINGLE:"t",MERIDIAN_INDICATOR_FULL:"tt",DECISECONDS:"f",CENTISECONDS:"ff",MILLISECONDS:"fff",TIME_ZONE_OFFSET_SINGLE_DIGIT:"z",TIME_ZONE_OFFSET_DOUBLE_DIGIT:"zz",TIME_ZONE_OFFSET_FULL:"zzz",DATE_SEPARATOR:"/"};ej.globalize._getDateParseRegExp=function(n,t){var e=n._parseRegExp,s,p,o,w,r,b,d;if(e){if(s=e[t],s)return s}else n._parseRegExp=e={};for(var h=k(n,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),u=["^"],l=[],c=0,a=0,y=/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g,f;(f=y.exec(h))!==null;){if(p=h.slice(c,f.index),c=y.lastIndex,a+=v(p,u),a%2){u.push(f[0]);continue}o=f[0];w=o.length;switch(o){case i.DAY_OF_WEEK_THREE_LETTER:case i.DAY_OF_WEEK_FULL_NAME:case i.MONTH_FULL_NAME:case i.MONTH_THREE_LETTER:r="(\\D+)";break;case i.MERIDIAN_INDICATOR_FULL:case i.MERIDIAN_INDICATOR_SINGLE:r="(\\D*)";break;case i.YEAR_FULL:case i.MILLISECONDS:case i.CENTISECONDS:case i.DECISECONDS:r="(\\d{"+w+"})";break;case i.DAY_OF_MONTH_DOUBLE_DIGIT:case i.DAY_OF_MONTH_SINGLE_DIGIT:case i.MONTH_DOUBLE_DIGIT:case i.MONTH_SINGLE_DIGIT:case i.YEAR_DOUBLE_DIGIT:case i.YEAR_SINGLE_DIGIT:case i.HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:case i.HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:case i.MINUTES_DOUBLE_DIGIT:case i.MINUTES_SINGLE_DIGIT:case i.SECONDS_DOUBLE_DIGIT:case i.SECONDS_SINGLE_DIGIT:r="(\\d\\d?)";break;case i.TIME_ZONE_OFFSET_FULL:r="([+-]?\\d\\d?:\\d{2})";break;case i.TIME_ZONE_OFFSET_DOUBLE_DIGIT:case i.TIME_ZONE_OFFSET_SINGLE_DIGIT:r="([+-]?\\d\\d?)";break;case i.DATE_SEPARATOR:r="(\\"+n["/"]+")";break;default:throw"Invalid date format pattern '"+o+"'.";}r&&u.push(r);l.push(f[0])}return v(h.slice(c),u),u.push("$"),b=u.join("").replace(/\s+/g,"\\s+"),d={regExp:b,groups:l},e[t]=d};ej.globalize.addCulture=function(t,i){ej.cultures[t]=n.extend(!0,n.extend(!0,{},ej.cultures["default"],i),ej.cultures[t]);ej.cultures[t].calendar=ej.cultures[t].calendars.standard};ej.globalize.preferredCulture=function(n){return n=typeof n!="undefined"&&typeof n==typeof this.cultureObject?n.name:n,this.cultureObject=ej.globalize.findCulture(n),this.cultureObject};ej.globalize.setCulture=function(n){return ej.isNullOrUndefined(this.globalCultureObject)&&(this.globalCultureObject=ej.globalize.findCulture(n)),n=typeof n!="undefined"&&typeof n==typeof this.globalCultureObject?n.name:n,n&&(this.globalCultureObject=ej.globalize.findCulture(n)),ej.cultures.current=this.globalCultureObject,this.globalCultureObject};ej.globalize.culture=function(n){ej.cultures.current=ej.globalize.findCulture(n)};ej.globalize.findCulture=function(t){var f,i,e,u,r,o;if(t){if(n.isPlainObject(t)&&t.numberFormat&&(f=t),typeof t=="string"){if(i=ej.cultures,i[t])return i[t];if(t.indexOf("-")>-1){if(e=t.split("-")[0],i[e])return i[e]}else for(u=n.map(i,function(n){return n}),r=0;r<u.length;r++)if(o=u[r].name.split("-")[0],o===t)return u[r];return ej.cultures["default"]}}else f=ej.cultures.current||ej.cultures["default"];return f};ej.globalize.format=function(n,t,i){var r=ej.globalize.findCulture(i);return typeof n=="number"?n=ct(n,t,r):n instanceof Date&&(n=g(n,t,r)),n};ej.globalize._round=function(n,t){var i=Math.pow(10,t);return Math.round(n*i)/i};ej.globalize.parseInt=function(n,t,i){return t||(t=10),Math.floor(b(n,i,t))};ej.globalize.getISODate=function(n){if(n instanceof Date)return n.toISOString()};ej.globalize.parseFloat=function(n,t,i){return typeof t=="string"&&(i=t,t=10),b(n,i)};ej.globalize.parseDate=function(n,t,i){var r,o,f,u,s,e;if(i=ej.globalize.findCulture(i),t){if(typeof t=="string"&&(t=[t]),t.length)for(u=0,s=t.length;u<s;u++)if(e=t[u],e&&(r=d(n,e,i),r))break}else{f=i.calendar.patterns;for(o in f)if(r=d(n,f[o],i),r)break}return r||null};ej.globalize.getLocalizedConstants=function(t,i){var r,u=t.replace("ej.","").split(".");return r=nt(ej,u),n.extend(!0,{},r.Locale["default"],r.Locale[i?i:this.cultureObject.name])};n.extend(ej,ej.globalize)}(jQuery)});
10
+ (function(n){typeof define=="function"&&define.amd?define(["jquery"],n):n()})(function(){window.ej=window.Syncfusion=window.Syncfusion||{},function(n,t,i){"use strict";var e,u,f,o;t.version="13.3.0.8";t.consts={NamespaceJoin:"-"};t.TextAlign={Center:"center",Justify:"justify",Left:"left",Right:"right"};t.Orientation={Horizontal:"horizontal",Vertical:"vertical"};t.serverTimezoneOffset=0;t.parseDateInUTC=!1;t.persistStateVersion=null;t.locales=t.locales||[];Object.prototype.hasOwnProperty||(Object.prototype.hasOwnProperty=function(n,t){return n[t]!==i});Date.prototype.toISOString||function(){function n(n){var t=String(n);return t.length===1&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+n(this.getUTCMonth()+1)+"-"+n(this.getUTCDate())+"T"+n(this.getUTCHours())+":"+n(this.getUTCMinutes())+":"+n(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();String.format=function(){for(var t=arguments[0],n=0;n<arguments.length-1;n++)t=t.replace(new RegExp("\\{"+n+"\\}","gm"),arguments[n+1]);return t.replace(/\{[0-9]\}/g,"")};jQuery.uaMatch=function(n){n=n.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(n)||/(webkit)[ \/]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[];return{browser:t[1]||"",version:t[2]||"0"}};t.defineClass=function(n,r,u,f){if(!n||!u)return i;for(var o=n.split("."),s=window,e=0;e<o.length-1;e++)t.isNullOrUndefined(s[o[e]])&&(s[o[e]]={}),s=s[o[e]];return(f||t.isNullOrUndefined(s[o[e]]))&&(r=typeof r=="function"?r:function(){},s[o[e]]=r,s[o[e]].prototype=u),s[o[e]]};t.util={getNameSpace:function(n){var i=n.toLowerCase().split(".");return i[0]==="ej"&&(i[0]="e"),i.join(t.consts.NamespaceJoin)},getObject:function(n,r){var u,e,f;if(!r||!n)return i;for(typeof n!="string"&&(n=JSON.stringify(n)),u=r,e=n.split("."),f=0;f<e.length;f++){if(t.util.isNullOrUndefined(u))break;u=u[e[f]]}return u},createObject:function(n,i,r){for(var o=n.split("."),s=r||window,u=s,e,h=o.length,f=0;f<h;f++)e=o[f],f+1==h?u[e]=i:t.isNullOrUndefined(u[e])&&(u[e]={}),u=u[e];return s},isNullOrUndefined:function(n){return n===i||n===null},exportAll:function(i,r){var h=[],o,u=[],c,l,a,f,v,p={action:i,method:"post","data-ajax":"false"},s=t.buildTag("form","",null,p),e,y;if(r.length!=0){for(e=0;e<r.length;e++)c=e,l=n("#"+r[e]),a=n("#"+r[e]).data(),o=a.ejWidgets,f=n(l).data(o[0]),u.push({id:f._id,locale:f.model.locale}),t.isNullOrUndefined(f)||(v=f._getExportModel(f.model),h.push({name:o[0],type:"hidden",value:f.stringify(v)}),y=t.buildTag("input","",null,h[c]),s.append(y));n("body").append(s);s.submit();setTimeout(function(){var r,f,i;if(u.length)for(i=0;i<u.length;i++)t.isNullOrUndefined(u[i].locale)||(r=n("#"+u[i].id).data(),o=r.ejWidgets,f=n("#"+u[i].id).data(o[0]),f.model.locale=u[i].locale)},0);s.remove()}return!0},print:function(i,r){var f=t.buildTag("div"),o=i.clone(),r,e,u;f.append(o);r||(r=window.open("","print","height=452,width=1024,tabbar=no","noopener"));r.document.write("<!DOCTYPE html>");e=n("head").find("link").add("style");t.browserInfo().name==="msie"?(u="",e.each(function(t,i){i.tagName=="LINK"&&n(i).attr("href",i.href);u+=i.outerHTML}),r.document.write("<html><head><\/head><body>"+u+f[0].innerHTML+"<\/body><\/html>")):(u="",r.document.write("<html><head>"),e.each(function(t,i){i.tagName=="LINK"&&n(i).attr("href",i.href);u+=i.outerHTML}),r.document.writeln(u+"<\/head><body>"),r.document.writeln(f[0].innerHTML+"<\/body><\/html>"));r.document.close();r.focus();setTimeout(function(){t.isNullOrUndefined(r.window)||(r.print(),setTimeout(function(){r.close()},1e3))},1e3)},ieClearRemover:function(t){var i=n(t).height();t.style.paddingTop=parseFloat(i/2)+"px";t.style.paddingBottom=parseFloat(i/2)+"px";t.style.height="1px";t.style.lineHeight="1px"},sendAjaxRequest:function(t){n.ajax({type:t.type,cache:t.cache,url:t.url,dataType:t.dataType,data:t.data,contentType:t.contentType,async:t.async,success:t.successHandler,error:t.errorHandler,beforeSend:t.beforeSendHandler,complete:t.completeHandler})},buildTag:function(t,r,u,f){var s=/^[a-z]*[0-9a-z]+/ig.exec(t)[0],e=/#([_a-z0-9-&@\/\\,+()$~%:*?<>{}\[\]]+\S)/ig.exec(t),o;return e=e?e[e.length-1].replace(/[&@\/\\,+()$~%.:*?<>{}\[\]]/g,""):i,o=/\.([a-z]+[-_0-9a-z ]+)/ig.exec(t),o=o?o[o.length-1]:i,n(document.createElement(s)).attr(e?{id:e}:{}).addClass(o||"").css(u||{}).attr(f||{}).html(r||"")},_preventDefaultException:function(n,t){if(n)for(var i in t)if(t[i].test(n[i]))return!0;return!1},getMaxZindex:function(){var t=1;return t=Math.max.apply(null,n.map(n("body *"),function(t){if(n(t).css("position")=="absolute"||n(t).css("position")=="fixed")return parseInt(n(t).css("z-index"))||1})),(t==i||t==null)&&(t=1),t},blockDefaultActions:function(n){n.cancelBubble=!0;n.returnValue=!1;n.preventDefault&&n.preventDefault();n.stopPropagation&&n.stopPropagation()},getDimension:function(t,i){var e,u=n(t).parents().andSelf().filter(":hidden"),r,f;return u&&(r={visibility:"hidden",display:"block"},f=[],u.each(function(){var t={};for(var n in r)t[n]=this.style[n],this.style[n]=r[n];f.push(t)}),e=/(outer)/g.test(i)?n(t)[i](!0):n(t)[i](),u.each(function(n){var i=f[n];for(var t in r)this.style[t]=i[t]})),e},transitionEndEvent:function(){return{"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"otransitionend",ms:"MSTransitionEnd"}[t.userAgent()]},animationEndEvent:function(){return{"":"animationend",webkit:"webkitAnimationEnd",Moz:"animationend",O:"webkitAnimationEnd",ms:"animationend"}[t.userAgent()]},startEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"touchstart":"mousedown"},endEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"touchend":"mouseup"},moveEvent:function(){return t.isTouchDevice()||n.support.hasPointer?n.support.hasPointer&&!t.isMobile()?"ejtouchmove":"touchmove":"mousemove"},cancelEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"touchcancel":"mousecancel"},tapEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"tap":"click"},tapHoldEvent:function(){return t.isTouchDevice()||n.support.hasPointer?"taphold":"click"},isDevice:function(){return t.getBooleanVal(n("head"),"data-ej-forceset",!1)?t.getBooleanVal(n("head"),"data-ej-device",this._device()):this._device()},isPortrait:function(){var n=document.documentElement;return n&&n.clientWidth/n.clientHeight<1.1},isLowerResolution:function(){return window.innerWidth<=640&&t.isPortrait()&&t.isDevice()||window.innerWidth<=800&&!t.isDevice()||window.innerWidth<=800&&!t.isPortrait()&&t.isWindows()&&t.isDevice()||t.isMobile()},isIOSWebView:function(){return/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent)},isAndroidWebView:function(){return!(typeof Android=="undefined")},isWindowsWebView:function(){return location.href.indexOf("x-wmapp")!=-1},_device:function(){return/Android|BlackBerry|iPhone|iPad|iPod|IEMobile|kindle|windows\sce|palm|smartphone|iemobile|mobile|pad|xoom|sch-i800|playbook/i.test(navigator.userAgent.toLowerCase())},isMobile:function(){return/iphone|ipod|android|blackberry|opera|mini|windows\sce|palm|smartphone|iemobile/i.test(navigator.userAgent.toLowerCase())&&/mobile/i.test(navigator.userAgent.toLowerCase())||t.getBooleanVal(n("head"),"data-ej-mobile",!1)===!0},isTablet:function(){return/ipad|xoom|sch-i800|playbook|tablet|kindle/i.test(navigator.userAgent.toLowerCase())||t.getBooleanVal(n("head"),"data-ej-tablet",!1)===!0||!t.isMobile()&&t.isDevice()},isTouchDevice:function(){return("ontouchstart"in window||window.navigator.msPointerEnabled&&t.isMobile())&&this.isDevice()},getClearString:function(t){return n.trim(t.replace(/\s+/g," ").replace(/(\r\n|\n|\r)/gm,"").replace(new RegExp(">[\n\t ]+<","g"),"><"))},getBooleanVal:function(t,i,r){var u=n(t).attr(i);return u!=null?u.toLowerCase()=="true":r},_getSkewClass:function(n,t,i){var h=n.width(),c=n.height(),f=n.offset().left,e=n.offset().left+h,o=n.offset().top,s=n.offset().top+c,r=h*.3,u=c*.3;return t<f+r&&i<o+u?"e-m-skew-topleft":t>e-r&&i<o+u?"e-m-skew-topright":t>e-r&&i>s-u?"e-m-skew-bottomright":t<f+r&&i>s-u?"e-m-skew-bottomleft":t>f+r&&i<o+u&&t<e-r?"e-m-skew-top":t<f+r?"e-m-skew-left":t>e-r?"e-m-skew-right":i>s-u?"e-m-skew-bottom":"e-m-skew-center"},_removeSkewClass:function(t){n(t).removeClass("e-m-skew-top e-m-skew-bottom e-m-skew-left e-m-skew-right e-m-skew-topleft e-m-skew-topright e-m-skew-bottomleft e-m-skew-bottomright e-m-skew-center e-skew-top e-skew-bottom e-skew-left e-skew-right e-skew-topleft e-skew-topright e-skew-bottomleft e-skew-bottomright e-skew-center")},_getObjectKeys:function(n){var t,i=[];if(n=Object.prototype.toString.call(n)===Object.prototype.toString()?n:{},!Object.keys){for(t in n)n.hasOwnProperty(t)&&i.push(t);return i}if(Object.keys)return Object.keys(n)},_touchStartPoints:function(n,t){if(n){var i=n.touches?n.touches[0]:n;t._distX=0;t._distY=0;t._moved=!1;t._pointX=i.pageX;t._pointY=i.pageY}},_isTouchMoved:function(n,t){if(n){var i=n.touches?n.touches[0]:n,f=i.pageX-t._pointX,e=i.pageY-t._pointY,o=Date.now(),r,u;return t._pointX=i.pageX,t._pointY=i.pageY,t._distX+=f,t._distY+=e,r=Math.abs(t._distX),u=Math.abs(t._distY),!(r<5&&u<5)}},listenEvents:function(n,i,r,u,f,e){for(var o=0;o<n.length;o++)t.listenTouchEvent(n[o],i[o],r[o],u,f,e)},listenTouchEvent:function(i,r,u,f,e,o){for(var s,h=f?"removeEventListener":"addEventListener",a=f?"off":"on",l=n(i),c=0;c<l.length;c++){s=l[c];switch(r){case"touchstart":t._bindEvent(s,h,r,u,"mousedown","MSPointerDown","pointerdown",o);break;case"touchmove":t._bindEvent(s,h,r,u,"mousemove","MSPointerMove","pointermove",o);break;case"touchend":t._bindEvent(s,h,r,u,"mouseup","MSPointerUp","pointerup",o);break;case"touchcancel":t._bindEvent(s,h,r,u,"mousecancel","MSPointerCancel","pointercancel",o);break;case"tap":case"taphold":case"ejtouchmove":case"click":n(s)[a](r,u);break;default:t.browserInfo().name=="msie"&&t.browserInfo().version<9?e._on(n(s),r,u):s[h](r,u,!0)}}},_bindEvent:function(t,i,r,u,f,e,o){n.support.hasPointer?t[i](window.navigator.pointerEnabled?o:e,u,!0):t[i](r,u,!0)},_browser:function(){return/webkit/i.test(navigator.appVersion)?"webkit":/firefox/i.test(navigator.userAgent)?"Moz":/trident/i.test(navigator.userAgent)?"ms":"opera"in window?"O":""},styles:document.createElement("div").style,userAgent:function(){for(var i="webkitT,t,MozT,msT,OT".split(","),r,n=0,u=i.length;n<u;n++)if(r=i[n]+"ransform",r in t.styles)return i[n].substr(0,i[n].length-1);return!1},addPrefix:function(n){return t.userAgent()===""?n:(n=n.charAt(0).toUpperCase()+n.substr(1),t.userAgent()+n)},destroyWidgets:function(t){var i=n(t).find("[data-role *= ejm]");i.each(function(t,i){var r=n(i),u=r.data("ejWidgets");u&&r[u]("destroy")})},getAttrVal:function(t,i,r){var u=n(t).attr(i);return u!=null?u:r},getOffset:function(t){var i={},u=t.offset()||{left:0,top:0},r;return n.extend(!0,i,u),n("body").css("position")!="static"&&(r=n("body").offset(),i.left-=r.left,i.top-=r.top),i},getZindexPartial:function(i,r){var e,f,u;if(!t.isNullOrUndefined(i)&&i.length>0)return e=i.parents(),f=n("body").children(),!t.isNullOrUndefined(i)&&i.length>0&&f.splice(f.index(r),1),n(f).each(function(n,t){e.push(t)}),u=Math.max.apply(u,n.map(e,function(t){if(n(t).css("position")!="static")return parseInt(n(t).css("z-index"))||1})),!u||u<1e4?u=1e4:u+=1,u},isValidAttr:function(t,i){var t=n(t)[0],r;return typeof t[i]!="undefined"?!0:(r=!1,n.each(t,function(n){if(n.toLowerCase()==i.toLowerCase())return r=!0,!1}),r)}};n.extend(t,t.util);t.widgetBase={droppables:{"default":[]},resizables:{"default":[]},_renderEjTemplate:function(i,r,u,f,e){var o=null;if((typeof i=="object"||i.startsWith("#")||i.startsWith("."))&&(o=n(i).attr("type")),o){if(o=o.toLowerCase(),t.template[o])return t.template[o](this,i,r,u,f)}else if(!t.isNullOrUndefined(e))return t.template["text/x-"+e](this,i,r,u,f);return t.template.render(this,i,r,u,f)},destroy:function(){var u,r,f,i;if(!this._trigger("destroy")){this.model.enablePersistence&&(this.persistState(),n(window).off("unload",this._persistHandler));try{this._destroy()}catch(e){}for(u=this.element.data("ejWidgets")||[],i=0;i<u.length;i++)u[i]==this.pluginName&&u.splice(i,1);for(u.length||this.element.removeData("ejWidgets");this._events;){if(r=this._events.pop(),f=[],!r)break;for(i=0;i<r[1].length;i++)n.isPlainObject(r[1][i])||f.push(r[1][i]);n.fn.off.apply(r[0],f)}this._events=null;this.element.removeClass(t.util.getNameSpace(this.sfType)).removeClass("e-js").removeData(this.pluginName);this.element=null;this.model=null}},_on:function(i){this._events||(this._events=[]);for(var r=[].splice.call(arguments,1,arguments.length-1),u={},f=r.length;u&&typeof u!="function";)u=r[--f];return r[f]=t.proxy(r[f],this),this._events.push([i,r,u,r[f]]),n.fn.on.apply(i,r),this},_off:function(t,i,r,u){var e=this._events,s,h,o,f,c;if(!e||!e.length)return this;for(typeof r=="function"&&(s=u,u=r,r=s),h=i.match(/\S+/g)||[""],o=0;o<e.length;o++)if(f=e[o],c=f[0].length&&(!u||f[2]===u)&&(f[1][0]===i||h[0])&&(!r||f[1][1]===r)&&n.inArray(t[0],f[0])>-1,c){n.fn.off.apply(t,u?[i,r,f[3]]:[i,r]);e.splice(o,1);break}return this},_trigger:function(i,r){var f=null,e,u,o={},s;return(n.extend(o,r),i in this.model&&(f=this.model[i]),f&&(typeof f=="string"&&(f=t.util.getObject(f,window)),n.isFunction(f)&&(u=t.event(i,this.model,r),e=f.call(this,u),r&&n.extend(r,u),u.cancel||!t.isNullOrUndefined(e))))?e===!1||u.cancel:(s=Boolean(r),r=r||{},r.originalEventType=i,r.type=this.pluginName+i,u=n.Event(r.type,t.event(r.type,this.model,r)),this.element&&this.element.trigger(u),s&&n.extend(r,u),t.isOnWebForms&&u.cancel==!1&&this.model.serverEvents&&this.model.serverEvents.length&&t.raiseWebFormsServerEvents(i,r,o),u.cancel)},setModel:function(t,i){var r,f,o,u;if(!this._trigger("modelChange",{changes:t})){for(r in t){if(!i){if(this.model[r]===t[r]){delete t[r];continue}if(n.isPlainObject(t[r])&&(e(this.model[r],t[r]),n.isEmptyObject(t[r]))){delete t[r];continue}}if(this.dataTypes&&(f=this._isValidModelValue(r,this.dataTypes,t),f!==!0))throw"setModel - Invalid input for property :"+r+" - "+f;this.model.notifyOnEachPropertyChanges&&this.model[r]!==t[r]&&(o={oldValue:this.model[r],newValue:t[r]},t[r]=this._trigger(r+"Change",o)?this.model[r]:o.newValue)}n.isEmptyObject(t)||(this._setFirst?(u=t.dataSource,u&&delete t.dataSource,n.extend(!0,this.model,t),u&&(this.model.dataSource=u instanceof Array?u.slice():u,t.dataSource=this.model.dataSource),this._setModel&&this._setModel(t)):this._setModel&&this._setModel(t)===!1||n.extend(!0,this.model,t),"enablePersistence"in t&&this._setState(t.enablePersistence))}},option:function(r,u,f){if(!r)return this.model;if(n.isPlainObject(r))return this.setModel(r,f);if(typeof r=="string"){r=r.replace(/^model\./,"");var e=t.getObject(r,this.model);if(u===i&&!f)return e;if(r==="enablePersistence")return this._setState(u);if(f&&u===t.extensions.modelGUID)return this._setModel(t.createObject(r,t.getObject(r,this.model),{}));if(f||t.getObject(r,this.model)!==u)return this.setModel(t.createObject(r,u,{}),f)}return i},_isValidModelValue:function(n,t,i){var r=t[n],u=i[n],f,e,o;if(!r)return!0;if(typeof r=="string"){if(r=="enum"&&(i[n]=u?u.toString().toLowerCase():u,r="string"),r==="array"){if(Object.prototype.toString.call(u)==="[object Array]")return!0}else if(r==="data"||r==="parent"||typeof u===r)return!0;return"Expected type - "+r}if(u instanceof Array){for(e=0;e<u.length;e++)if(f=this._isValidModelValue(n,t,u[e]),f!==!0)return" ["+e+"] - "+f;return!0}for(o in u)if(f=this._isValidModelValue(o,r,u),f!==!0)return o+" : "+f;return!0},_returnFn:function(n,t){t.indexOf(".")!=-1?this._returnFn(n[t.split(".")[0]],t.split(".").slice(1).join(".")):n[t]=n[t].call(n.propName)},_removeCircularRef:function(n){function i(n,r,u){if(typeof n=="object"){if(Array.prototype.indexOf||(Array.prototype.indexOf=function(n){return jQuery.inArray(n,this)}),t.indexOf(n)>=0){delete u[r];return}t.push(n);for(var f in n)n.hasOwnProperty(f)&&i(n[f],f,n);t.pop();return}}var t=[];return i(n,"obj",null),n},stringify:function(n,i){for(var f,u=this.observables,r=0;r<u.length;r++)f=t.getObject(u[r],n),t.isNullOrUndefined(f)||typeof f!="function"||this._returnFn(n,u[r]);return i&&(n=this._removeCircularRef(n)),JSON.stringify(n)},_setState:function(i){if(i===!0){this._persistHandler=t.proxy(this.persistState,this);n(window).on("unload",this._persistHandler)}else this.deleteState(),n(window).off("unload",this._persistHandler)},_removeProp:function(n,i){t.isNullOrUndefined(n)||(i.indexOf(".")!=-1?this._removeProp(n[i.split(".")[0]],i.split(".").slice(1).join(".")):delete n[i])},persistState:function(){var n,i;if(this._ignoreOnPersist){for(n=r({},this.model),i=0;i<this._ignoreOnPersist.length;i++)this._removeProp(n,this._ignoreOnPersist[i]);n.ignoreOnPersist=this._ignoreOnPersist}else if(this._addToPersist){for(n={},i=0;i<this._addToPersist.length;i++)t.createObject(this._addToPersist[i],t.getObject(this._addToPersist[i],this.model),n);n.addToPersist=this._addToPersist}else n=r({},this.model);this._persistState&&(n.customPersists={},this._persistState(n.customPersists));window.localStorage?(t.isNullOrUndefined(t.persistStateVersion)||window.localStorage.getItem("persistKey")!=null||window.localStorage.setItem("persistKey",t.persistStateVersion),window.localStorage.setItem("$ej$"+this.pluginName+this._id,JSON.stringify(n))):document.cookie&&(t.isNullOrUndefined(t.persistStateVersion)||t.cookie.get("persistKey")!=null||t.cookie.set("persistKey",t.persistStateVersion),t.cookie.set("$ej$"+this.pluginName+this._id,n))},deleteState:function(){var n;window.localStorage?window.localStorage.removeItem("$ej$"+this.pluginName+this._id):document.cookie&&t.cookie.set("$ej$"+this.pluginName+this._id,n,new Date)},restoreState:function(i){var f=null,r,u,e;if(window.localStorage?f=window.localStorage.getItem("$ej$"+this.pluginName+this._id):document.cookie&&(f=t.cookie.get("$ej$"+this.pluginName+this._id)),f&&(r=JSON.parse(f),this._restoreState&&(this._restoreState(r.customPersists),delete r.customPersists),t.isNullOrUndefined(r)===!1&&(t.isNullOrUndefined(r.ignoreOnPersist)?t.isNullOrUndefined(r.addToPersist)||(this._addToPersist=r.addToPersist,delete r.addToPersist):(this._ignoreOnPersist=r.ignoreOnPersist,delete r.ignoreOnPersist))),t.isNullOrUndefined(r)||t.isNullOrUndefined(this._ignoreOnPersist))this.model=n.extend(!0,this.model,r);else{for(u=0,e=this._ignoreOnPersist.length;u<e;u++)this._ignoreOnPersist[u].indexOf(".")!==-1?t.createObject(this._ignoreOnPersist[u],t.getObject(this._ignoreOnPersist[u],this.model),r):r[this._ignoreOnPersist[u]]=this.model[this._ignoreOnPersist[u]];this.model=r}!i&&f&&this._setModel&&this._setModel(this.model)},ignoreOnPersist:function(n){var r=[],t,u;if(typeof n=="object"?r=n:typeof n=="string"&&r.push(n),this._addToPersist===i)for(this._ignoreOnPersist=this._ignoreOnPersist||[],t=0;t<r.length;t++)this._ignoreOnPersist.push(r[t]);else for(t=0;t<r.length;t++)u=this._addToPersist.indexOf(r[t]),this._addToPersist.splice(u,1)},addToPersist:function(t){var u=[],f,r;if(typeof t=="object"?u=t:typeof t=="string"&&u.push(t),this._addToPersist===i)for(this._ignoreOnPersist=this._ignoreOnPersist||[],r=0;r<u.length;r++)f=this._ignoreOnPersist.indexOf(u[r]),this._ignoreOnPersist.splice(f,1);else for(r=0;r<u.length;r++)n.inArray(u[r],this._addToPersist)===-1&&this._addToPersist.push(u[r])},formatting:function(i,r,u){var f,l,h,c,a,v,s,e,y;if(i=i.replace(/%280/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">"),u=t.preferredCulture(u)?u:"en-US",f=i,l=i.split("{0:"),a=i.split("}"),h=l[0],c=a[1],typeof r=="string"&&n.isNumeric(r)&&(r=Number(r)),i.indexOf("{0:")!=-1)return v=new RegExp("\\{0(:([^\\}]+))?\\}","gm"),s=v.exec(i),s!=null&&r!=null?h!=null&&c!=null?h+t.format(r,s[2],u)+c:t.format(r,s[2],u):r!=null?r:"";if(f.startsWith("{")&&!f.startsWith("{0:")){var o=f.split(""),r=(r||"")+"",p=r.split(""),w=/[0aA\*CN<>\?]/gm;for(e=0,y=0;e<o.length;e++)o[e]=w.test(o[e])?"{"+y+++"}":o[e];return String.format.apply(String,[o.join("")].concat(p)).replace("{","").replace("}","")}return this.data!=null&&this.data.Value==null?(n.each(this.data,function(n,t){f=f.replace(new RegExp("\\{"+n+"\\}","gm"),t)}),f):this.data.Value}};t.WidgetBase=function(){};e=function(t,i){var u,f,r;if(t instanceof Array)for(u=0,f=t.length;u<f;u++)r=t[u],r===i[r]&&delete i[r],n.isPlainObject(i[r])&&n.isPlainObject(r)&&e(r,i[r]);else for(r in t)t[r]===i[r]&&delete i[r],n.isPlainObject(i[r])&&n.isPlainObject(t[r])&&e(t[r],i[r])};t.widget=function(f,e,h){var a,l,v;if(typeof f=="object"){h=e;for(a in f)l=f[a],l instanceof Array&&(h._rootCSS=l[1],l=l[0]),t.widget(a,l,h),f[a]instanceof Array&&(h._rootCSS="");return}v=h._rootCSS||t.getNameSpace(e);h=t.defineClass(e,function(i,o){var y,p,w,b,c,tt,g,k,d,nt,l,a;if(this.sfType=e,this.pluginName=f,this.instance=s,t.isNullOrUndefined(this._setFirst)&&(this._setFirst=!0),this["ob.values"]={},n.extend(this,t.widgetBase),this.dataTypes)for(y in o)if(p=this._isValidModelValue(y,this.dataTypes,o),p!==!0)throw"setModel - Invalid input for property :"+y+" - "+p;for(w=i.data("ejWidgets")||[],w.push(f),i.data("ejWidgets",w),c=0;t.widget.observables&&this.observables&&c<this.observables.length;c++)b=t.getObject(this.observables[c],o),b&&t.createObject(this.observables[c],t.widget.observables.register(b,this.observables[c],this,i),o);if(this.element=i.jquery?i:n(i),this.model=r(!0,{},h.prototype.defaults,o),this.model.keyConfigs=r(this.keyConfigs),this.element.addClass(v+" e-js").data(f,this),this._id=i[0].id,this.model.enablePersistence){if(window.localStorage&&!t.isNullOrUndefined(t.persistStateVersion)&&window.localStorage.getItem("persistKey")!=t.persistStateVersion)for(c in window.localStorage)c.indexOf("$ej$")!=-1&&(window.localStorage.removeItem(c),window.localStorage.setItem("persistKey",t.persistStateVersion));else if(document.cookie&&!t.isNullOrUndefined(t.persistStateVersion)&&t.cookie.get("persistKey")!=t.persistStateVersion){g=document.cookie.split(/; */);for(k in g)k.indexOf("$ej$")!=-1&&(t.cookie.set(k.split("=")[0],tt,new Date),t.cookie.set("persistKey",t.persistStateVersion))}this._persistHandler=t.proxy(this.persistState,this);n(window).on("unload",this._persistHandler);this.restoreState(!0)}if(this._init(o),typeof this.model.keyConfigs=="object"&&!(this.model.keyConfigs instanceof Array)){d=!1;this.model.keyConfigs.focus&&this.element.attr("accesskey",this.model.keyConfigs.focus);for(nt in this.model.keyConfigs)if(nt!=="focus"){d=!0;break}d&&this._keyPressed&&(l=i,a="keydown",this.keySettings&&(l=this.keySettings.getElement?this.keySettings.getElement()||l:l,a=this.keySettings.event||a),this._on(l,a,function(n){if(this.model.keyConfigs){var t=u.getActionFromCode(this.model.keyConfigs,n.which,n.ctrlKey,n.shiftKey,n.altKey),i={code:n.which,ctrl:n.ctrlKey,alt:n.altKey,shift:n.shiftKey};t&&this._keyPressed(t,n.target,i,n)===!1&&n.preventDefault()}}))}this._trigger("create")},h);n.fn[f]=function(r){for(var w,p=r,u,y=0;y<this.length;y++){var s=n(this[y]),l=s.data(f),b=l&&s.hasClass(v),a=null;if(this.length>0&&n.isPlainObject(p)&&(r=t.copyObject({},p)),!b){h.prototype._requiresID!==!0||n(this[y]).attr("id")||s.attr("id",c("ejControl_"));r&&typeof r!="object"?o(f+": methods/properties can be accessed only after plugin creation"):(h.prototype.defaults&&!t.isNullOrUndefined(t.setCulture)&&"locale"in h.prototype.defaults&&f!="ejChart"&&(!r||"locale"in r?t.isNullOrUndefined(r)&&(r={},r.locale=t.setCulture().name):r.locale=t.setCulture().name),new h(s,r));continue}if(r)if(u=[].slice.call(arguments,1),this.length>0&&u[0]&&p==="option"&&n.isPlainObject(u[0])&&(u[0]=t.copyObject({},u[0])),n.isPlainObject(r))l.setModel(r);else if((r.indexOf("_")===0||t.isNullOrUndefined(a=t.getObject(r,l)))&&r.indexOf("model.")!==0)o(e+": function/property - "+r+" does not exist");else{if(!a||!n.isFunction(a)){if(arguments.length==1)return a;l.option(r,arguments[1]);continue}if(w=a.apply(l,u),w!==i)return w}}return f.indexOf("ejm")!=-1&&t.widget.registerInstance(s,f,e,h.prototype),this};t.widget.register(f,e,h.prototype);t.loadLocale(f)};t.loadLocale=function(i){for(var f=t.locales,r=0,u=f.length;r<u;r++)n.fn["Locale_"+f[r]](i)};n.extend(t.widget,function(){var n={},i=[],r=function(i,r,u){t.isNullOrUndefined(n[i])||o("ej.widget : The widget named "+i+" is trying to register twice.");n[i]={name:i,className:r,proto:u};t.widget.extensions&&t.widget.extensions.registerWidget(i)},u=function(n,t,r,u){i.push({element:n,pluginName:t,className:r,proto:u})};return{register:r,registerInstance:u,registeredWidgets:n,registeredInstances:i}}());t.widget.destroyAll=function(n){var u,r,t,i;if(n&&n.length)for(u=0;u<n.length;u++)if(r=n.eq(u).data(),t=r.ejWidgets,t&&t.length)for(i=0;i<t.length;i++)r[t[i]]&&r[t[i]].destroy&&r[t[i]].destroy()};t.cookie={get:function(n){var t=RegExp(n+"=([^;]+)").exec(document.cookie);return t&&t.length>1?t[1]:i},set:function(n,t,i){typeof t=="object"&&(t=JSON.stringify(t));t=escape(t)+(i==null?"":"; expires="+i.toUTCString());document.cookie=n+"="+t}};u={getActionFromCode:function(n,t,i,r,f){var s,o,e;i=i||!1;r=r||!1;f=f||!1;for(s in n)if(s!=="focus")for(o=u.getKeyObject(n[s]),e=0;e<o.length;e++)if(t===o[e].code&&i==o[e].isCtrl&&r==o[e].isShift&&f==o[e].isAlt)return s;return null},getKeyObject:function(t){for(var f,o,e,s={isCtrl:!1,isShift:!1,isAlt:!1},c=n.extend(!0,{},s),r=t.split(","),h=[],i=0;i<r.length;i++){if(f=null,r[i].indexOf("+")!=-1)for(o=r[i].split("+"),e=0;e<o.length;e++)f=u.getResult(n.trim(o[e]),s);else f=u.getResult(n.trim(r[i]),n.extend(!0,{},c));h.push(f)}return h},getResult:function(n,t){return n==="ctrl"?t.isCtrl=!0:n==="shift"?t.isShift=!0:n==="alt"?t.isAlt=!0:t.code=parseInt(n,10),t}};t.getScrollableParents=function(t){return n(t).parentsUntil("html").filter(function(){return n(this).css("overflow")!="visible"}).add(n(window))};t.browserInfo=function(){var i={},r=[],e={opera:/(opera|opr)(?:.*version|)[ \/]([\w.]+)/i,edge:/(edge)(?:.*version|)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,msie:/(msie|trident) ([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i},o,s,f,u;for(o in e)if(e.hasOwnProperty(o)&&(r=navigator.userAgent.match(e[o]),r)){if(i.name=r[1].toLowerCase()=="opr"?"opera":r[1].toLowerCase(),i.version=r[2],i.culture={},i.culture.name=i.culture.language=navigator.language||navigator.userLanguage,typeof t.globalize!="undefined"){for(s=t.preferredCulture().name,f=navigator.language||navigator.userLanguage?t.preferredCulture(navigator.language||navigator.userLanguage):t.preferredCulture("en-US"),u=0;navigator.languages&&u<navigator.languages.length;u++)if(f=t.preferredCulture(navigator.languages[u]),f.language==navigator.languages[u])break;t.preferredCulture(s);n.extend(!0,i.culture,f)}!navigator.userAgent.match(/Trident\/7\./)||(i.name="msie");break}return i.isMSPointerEnabled=i.name=="msie"&&i.version>9&&window.navigator.msPointerEnabled,i.pointerEnabled=window.navigator.pointerEnabled,i};t.eventType={mouseDown:"mousedown touchstart",mouseMove:"mousemove touchmove",mouseUp:"mouseup touchend",mouseLeave:"mouseleave touchcancel",click:"click touchend"};t.event=function(t,i,r){return n.extend(r||{},{type:t,model:i,cancel:!1})};t.proxy=function(n,t,i){return!n||typeof n!="function"?null:"on"in n&&t?i?n.on(t,i):n.on(t):function(){var r=i?[i]:[];return r.push.apply(r,arguments),n.apply(t||this,r)}};t.hasStyle=function(n){var r=document.documentElement.style,i,t;if(n in r)return!0;for(i=["ms","Moz","Webkit","O","Khtml"],n=n[0].toUpperCase()+n.slice(1),t=0;t<i.length;t++)if(i[t]+n in r)return!0;return!1};Array.prototype.indexOf=Array.prototype.indexOf||function(n){var i=this.length,t;if(i===0)return-1;for(t=0;t<i;t++)if(t in this&&this[t]===n)return t;return-1};String.prototype.startsWith=String.prototype.startsWith||function(n){return this.slice(0,n.length)===n};var r=t.copyObject=function(n,u){var h=2,c,f,s,o,e,l;for(typeof n!="boolean"&&(h=1),s=[].slice.call(arguments,h),h===1&&(u=n,n=i),o=0;o<s.length;o++)for(e in s[o])if(c=u[e],f=s[o][e],f!==i&&c!==f&&s[o]!==f&&u!==f)if(f instanceof Array)if(o===0&&n)if(e==="dataSource"||e==="data"||e==="predicates")u[e]=f.slice();else for(u[e]=[],l=0;l<f.length;l++)r(!0,u[e],f);else u[e]=f.slice();else t.isPlainObject(f)?(u[e]=c||{},n?r(n,u[e],f):r(u[e],f)):u[e]=f;return u},s=function(){return this},h=0,c=function(n){return n+h++};t.template={};t.template.render=t.template["text/x-jsrender"]=function(t,i,r,u,f){i.slice(0,1)!=="#"&&(i=["<div>",i,"<\/div>"].join(""));var e={prop:f,index:u};return n(i).render(r,e)};t.isPlainObject=function(n){if(!n||t.DataManager!==i&&n instanceof t.DataManager||typeof n!="object"||n.nodeType||jQuery.isWindow(n))return!1;try{if(n.constructor&&!n.constructor.prototype.hasOwnProperty("isPrototypeOf"))return!1}catch(f){return!1}var r,u=t.support.isOwnLast;for(r in n)if(u)break;return r===i||n.hasOwnProperty(r)};f=!1;t.util.valueFunction=function(n){return function(r,u){var e=t.getObject(n,this.model);if(f===!1&&(f=t.getObject("observables.getValue",t.widget)),r===i)return t.isNullOrUndefined(f)?typeof e=="function"?e.call(this):e:f(e,u);typeof e=="function"?(this["ob.values"][n]=r,e.call(this,r)):t.createObject(n,r,this.model)}};t.util.getVal=function(n){return typeof n=="function"?n():n};t.support={isOwnLast:function(){var n=function(){this.a=1},t;n.prototype.b=1;for(t in new n)return t==="b"}(),outerHTML:function(){return document.createElement("div").outerHTML!==i}()};o=t.throwError=function(n){try{throw new Error(n);}catch(t){throw t.message+"\n"+t.stack;}};t.getRandomValue=function(n,r){var u,f;return n===i||r===i?t.throwError("Min and Max values are required for generating a random number"):("crypto"in window&&"getRandomValues"in crypto?(f=new Uint16Array(1),window.crypto.getRandomValues(f),u=f[0]%(r-n)+n):u=Math.random()*(r-n)+n,u|0)};t.extensions={};t.extensions.modelGUID="{0B1051BA-1CCB-42C2-A3B5-635389B92A50}"}(window.jQuery,window.Syncfusion),function(){$.fn.addEleAttrs=function(n){var t=$(this);$.each(n,function(n,i){i&&i.specified&&t.attr(i.name,i.value)})};$.fn.removeEleAttrs=function(n){return this.each(function(){var t=$(this),i=$(this.attributes).clone();$.each(i,function(i,r){r&&r.specified&&n.test(r.name)&&t.removeAttr(r.name)})})};$.fn.attrNotStartsWith=function(n){var u=this,r=[],i,t;for(this.each(function(){i=$(this.attributes).clone()}),t=0;t<i.length;t++)if(i[t]&&i[t].specified&&n.test(i[t].name))continue;else r.push(i[t]);return r};$.fn.removeEleEmptyAttrs=function(){return this.each(function(){var n=$(this),t=$(this.attributes).clone();$.each(t,function(t,i){i&&i.specified&&i.value===""&&n.removeAttr(i.name)})})};$.extend($.support,{has3d:ej.addPrefix("perspective")in ej.styles,hasTouch:"ontouchstart"in window,hasPointer:navigator.msPointerEnabled,hasTransform:ej.userAgent()!==!1,pushstate:"pushState"in history&&"replaceState"in history,hasTransition:ej.addPrefix("transition")in ej.styles});$.extend($.expr[":"],{attrNotStartsWith:function(n,t,i){for(var u=n.attributes,r=0;r<u.length;r++)if(u[r].nodeName.indexOf(i[3])===0)return!1;return!0}});var n=$.fn.andSelf||$.fn.addBack;$.fn.andSelf=$.fn.addBack=function(){return n.apply(this,arguments)}}();window.ej=window.Syncfusion=window.Syncfusion||{},function(n,t,i,r){"use strict";var e,nt,tt,y,d,w,h,c,f;t.DataManager=function(i,u,f){if(!(this instanceof t.DataManager))return new t.DataManager(i,u,f);i||(i=[]);f=f||i.adaptor;typeof f=="string"&&(f=new t[f]);var e=[],o=this;return i instanceof Array?e={json:i,offline:!0}:typeof i=="object"?n.isPlainObject(i)?(i.json||(i.json=[]),i.table&&(i.json=this._getJsonFromElement(i.table,i.headerOption)),e={url:i.url,insertUrl:i.insertUrl,removeUrl:i.removeUrl,updateUrl:i.updateUrl,crudUrl:i.crudUrl,batchUrl:i.batchUrl,json:i.json,headers:i.headers,accept:i.accept,data:i.data,async:i.async,timeTillExpiration:i.timeTillExpiration,cachingPageSize:i.cachingPageSize,enableCaching:i.enableCaching,requestType:i.requestType,key:i.key,crossDomain:i.crossDomain,antiForgery:i.antiForgery,jsonp:i.jsonp,dataType:i.dataType,enableAjaxCache:i.enableAjaxCache,offline:i.offline!==r?i.offline:i.adaptor=="remoteSaveAdaptor"||i.adaptor instanceof t.remoteSaveAdaptor?!1:i.url?!1:!0,requiresFormat:i.requiresFormat}):(i.jquery||pt(i))&&(e={json:this._getJsonFromElement(i),offline:!0,table:i}):typeof i=="string"&&(e={url:i,offline:!1,dataType:"json",json:[]}),e.requiresFormat!==r||t.support.cors||(e.requiresFormat=c(e.crossDomain)?!0:e.crossDomain),e.antiForgery&&this.antiForgeryToken(),e.dataType===r&&(e.dataType="json"),this.dataSource=e,this.defaultQuery=u,e.url&&e.offline&&!e.json.length?(this.isDataAvailable=!1,this.adaptor=f||new t.ODataAdaptor,this.dataSource.offline=!1,this.ready=this.executeQuery(u||t.Query()).done(function(n){o.dataSource.offline=!0;o.isDataAvailable=!0;e.json=n.result;o.adaptor=new t.JsonAdaptor})):this.adaptor=e.offline?new t.JsonAdaptor:new t.ODataAdaptor,!e.jsonp&&this.adaptor instanceof t.ODataAdaptor&&(e.jsonp="callback"),this.adaptor=f||this.adaptor,e.enableCaching&&(this.adaptor=new t.CacheAdaptor(this.adaptor,e.timeTillExpiration,e.cachingPageSize)),this};t.DataManager.prototype={setDefaultQuery:function(n){this.defaultQuery=n},executeQuery:function(i,u,e,o){var s,h,c;return typeof i=="function"&&(o=e,e=u,u=i,i=null),i||(i=this.defaultQuery),i instanceof t.Query||f("DataManager - executeQuery() : A query is required to execute"),s=n.Deferred(),s.then(u,e,o),h={query:i},this.dataSource.offline||this.dataSource.url==r?t.isNullOrUndefined(this.dataSource.async)||this.dataSource.async!=!1?d(function(){this._localQueryProcess(i,h,s)},this):this._localQueryProcess(i,h,s):(c=this.adaptor.processQuery(this,i),t.isNullOrUndefined(c.url)?d(function(){h=this._getDeferedArgs(i,c,h);s.resolveWith(this,[h])},this):this._makeRequest(c,s,h,i)),s.promise()},_localQueryProcess:function(n,t,i){var r=this.executeLocal(n);t=this._getDeferedArgs(n,r,t);i.resolveWith(this,[t])},_getDeferedArgs:function(n,t,i){return n._requiresCount?(i.result=t.result,i.count=t.count):i.result=t,i.getTableModel=rt(n._fromTable,i.result,this),i.getKnockoutModel=ut(i.result),i},executeLocal:function(i){var e,r;if(this.defaultQuery||i instanceof t.Query||f("DataManager - executeLocal() : A query is required to execute"),this.dataSource.json||f("DataManager - executeLocal() : Json data is required to execute"),i=i||this.defaultQuery,e=this.adaptor.processQuery(this,i),i._subQuery){var o=i._subQuery._fromTable,s=i._subQuery._lookup,u=i._requiresCount?e.result:e;for(s&&s instanceof Array&&k(i._subQuery._fKey,o,u,s,i._subQuery._key),r=0;r<u.length;r++)u[r][o]instanceof Array&&(u[r]=n.extend({},u[r]),u[r][o]=this.adaptor.processResponse(i._subQuery.using(t.DataManager(u[r][o].slice(0))).executeLocal(),this,i))}return this.adaptor.processResponse(e,this,i)},_makeRequest:function(i,r,u,f){var o=!!f._subQuerySelector,c=h(function(n){u.error=n;r.rejectWith(this,[u])},this),l=h(function(n,t,i,e,s,h,c){o||(u.xhr=i,u.count=parseInt(t,10),u.result=n,u.request=e,u.aggregates=h,u.getTableModel=rt(f._fromTable,n,this),u.getKnockoutModel=ut(n),u.actual=s,u.virtualSelectRecords=c,r.resolveWith(this,[u]))},this),a=h(function(t,i){var r=n.Deferred(),h={parent:u},e,s;return f._subQuery._isChild=!0,e=this.adaptor.processQuery(this,f._subQuery,t?this.adaptor.processResponse(t):i),s=this._makeRequest(e,r,h,f._subQuery),o||r.then(function(n){t&&(k(f._subQuery._fKey,f._subQuery._fromTable,t,n,f._subQuery._key),l(t))},c),s},this),v=w(function(n,i,r,u){r.getResponseHeader("Content-Type").indexOf("xml")==-1&&t.dateParse&&(n=t.parseJSON(n));var e=this.adaptor.processResponse(n,this,f,r,u),s=0,h=null,c=n.virtualSelectRecords;if(f._requiresCount&&(s=e.count,h=e.aggregates,e=e.result),!f._subQuery){l(e,s,r,u,n,h,c);return}o||a(e)},this),e=n.extend({type:"GET",dataType:this.dataSource.dataType,crossDomain:this.dataSource.crossDomain,jsonp:this.dataSource.jsonp,cache:t.isNullOrUndefined(this.dataSource.enableAjaxCache)?!0:this.dataSource.enableAjaxCache,beforeSend:h(this._beforeSend,this),processData:!1,success:v,error:c},i),s;return"async"in this.dataSource&&(e.async=this.dataSource.async),e=n.ajax(e),o&&(s=f._subQuerySelector.call(this,{query:f._subQuery,parent:f}),s&&s.length?(e=n.when(e,a(null,s)),e.then(w(function(n,t,i){var r=this.adaptor.processResponse(n[0],this,f,n[2],i[0]),e=0,u;f._requiresCount&&(e=r.count,r=r.result);u=this.adaptor.processResponse(t[0],this,f._subQuery,t[2],i[1]);e=0;f._subQuery._requiresCount&&(e=u.count,u=u.result);k(f._subQuery._fKey,f._subQuery._fromTable,r,u,f._subQuery._key);o=!1;l(r,e,n[2])},this),c)):o=!1),e},_beforeSend:function(n,t){var i,f,r,u;for(this.adaptor.beforeSend(this,n,t),i=this.dataSource.headers,r=0;i&&r<i.length;r++){f=[];for(u in i[r])f.push(u),n.setRequestHeader(u,i[r][u])}},saveChanges:function(i,r,u,f){var s,o,e;return(u instanceof t.Query&&(f=u,u=null),s={url:u,key:r||this.dataSource.key},o=this.adaptor.batchRequest(this,i,s,f),this.dataSource.offline)?o:(e=n.Deferred(),n.ajax(n.extend({beforeSend:h(this._beforeSend,this),success:w(function(n,t,u,f){e.resolveWith(this,[this.adaptor.processResponse(n,this,null,u,f,i,r)])},this),error:function(n){e.rejectWith(this,[{error:n}])}},o)),e.promise())},insert:function(i,r,f){var o,e;return(i=u.replacer(i,!0),r instanceof t.Query&&(f=r,r=null),o=this.adaptor.insert(this,i,r,f),this.dataSource.offline)?o:(e=n.Deferred(),n.ajax(n.extend({type:"POST",contentType:"application/json; charset=utf-8",processData:!1,beforeSend:h(this._beforeSend,this),success:w(function(n,i,r,f){try{t.isNullOrUndefined(n)?n=[]:u.parseJson(n)}catch(o){n=[]}n=this.adaptor.processResponse(u.parseJson(n),this,null,r,f);e.resolveWith(this,[{record:n,dataManager:this}])},this),error:function(n){e.rejectWith(this,[{error:n,dataManager:this}])}},o)),e.promise())},antiForgeryToken:function(){var i;return t.isNullOrUndefined(n("input[name='_ejRequestVerifyToken']").val())?i=t.buildTag("input","","",{type:"hidden",name:"_ejRequestVerifyToken",value:t.getGuid()}).appendTo("body"):n("input[name='_ejRequestVerifyToken']").val(t.getGuid()),t.cookie.set("_ejRequestVerifyToken",n("input[name='_ejRequestVerifyToken']").val()),{name:"_ejRequestVerifyToken",value:n("input[name='_ejRequestVerifyToken']").val()}},remove:function(i,r,f,e){var s,o;return(typeof r=="object"&&(r=r[i]),f instanceof t.Query&&(e=f,f=null),s=this.adaptor.remove(this,i,r,f,e),this.dataSource.offline)?s:(o=n.Deferred(),n.ajax(n.extend({type:"POST",contentType:"application/json; charset=utf-8",beforeSend:h(this._beforeSend,this),success:w(function(n,i,r,f){try{t.isNullOrUndefined(n)?n=[]:u.parseJson(n)}catch(e){n=[]}n=this.adaptor.processResponse(u.parseJson(n),this,null,r,f);o.resolveWith(this,[{record:n,dataManager:this}])},this),error:function(n){o.rejectWith(this,[{error:n,dataManager:this}])}},s)),o.promise())},update:function(i,r,f,e){var s,o;return(r=u.replacer(r,!0),f instanceof t.Query&&(e=f,f=null),s=this.adaptor.update(this,i,r,f,e),this.dataSource.offline)?s:(o=n.Deferred(),n.ajax(n.extend({contentType:"application/json; charset=utf-8",beforeSend:h(this._beforeSend,this),success:w(function(n,i,r,f){try{t.isNullOrUndefined(n)?n=[]:u.parseJson(n)}catch(e){n=[]}n=this.adaptor.processResponse(u.parseJson(n),this,null,r,f);o.resolveWith(this,[{record:n,dataManager:this}])},this),error:function(n){o.rejectWith(this,[{error:n,dataManager:this}])}},s)),o.promise())},_getJsonFromElement:function(i){typeof i=="string"&&(i=n(n(i).html()));i=i.jquery?i[0]:i;var r=i.tagName.toLowerCase();return r!=="table"&&f("ej.DataManager : Unsupported htmlElement : "+r),t.parseTable(i)}};var k=function(n,i,r,u,e){var o,s={},c,h;for(u.result&&(u=u.result),u.GROUPGUID&&f("ej.DataManager: Do not have support Grouping in hierarchy"),o=0;o<u.length;o++)h=t.getObject(n,u[o]),c=s[h]||(s[h]=[]),c.push(u[o]);for(o=0;o<r.length;o++)r[o][i]=s[t.getObject(e||n,r[o])]},l={accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 "},u={parseJson:function(n){var t=typeof n;return t==="string"?n=JSON.parse(n,u.jsonReviver):n instanceof Array?u.iterateAndReviveArray(n):t==="object"&&u.iterateAndReviveJson(n),n},iterateAndReviveArray:function(n){for(var t=0;t<n.length;t++)typeof n[t]=="object"?u.iterateAndReviveJson(n[t]):n[t]=typeof n[t]!="string"||/^[\s]*\[|^[\s]*\{|\"/g.test(n[t])?u.parseJson(n[t]):u.jsonReviver("",n[t])},iterateAndReviveJson:function(n){var t;for(var i in n)i.startsWith("__")||(t=n[i],typeof t=="object"?t instanceof Array?u.iterateAndReviveArray(t):u.iterateAndReviveJson(t):n[i]=u.jsonReviver(i,t))},jsonReviver:function(n,i){var o=i,e=/[\-,/,\,.,:,]+/,f,r;if(typeof i=="string"){if(f=/^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(i),f)return t.parseDateInUTC?u.isValidDate(f[0]):u.replacer(new Date(parseInt(f[1])));(t.dateParse?/^(?:(\d{4}\-\d\d\-\d\d)|(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?)$/.test(i):/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(i))&&(r=o.split(/[^0-9]/),/^(\d{4}\-\d\d\-\d\d)$/.test(i)?i=new Date(r[t.dateFormat.split(e).indexOf("yyyy")],r[t.dateFormat.split(e).indexOf("MM")]-1,r[t.dateFormat.split(e).indexOf("dd")]):(i=t.parseDateInUTC?u.isValidDate(i):u.replacer(new Date(i)),isNaN(i)&&(i=u.replacer(new Date(r[0],r[1]-1,r[2],r[3],r[4],r[5])))))}return i},isValidDate:function(n){var t=n,i;return(typeof t=="string"&&t.indexOf("/Date(")==0&&(n=t.replace(/\d+/,function(n){var t=new Date(parseInt(n)).getTimezoneOffset()*6e4,i=parseInt(n)+t;return u.replacer(new Date(parseInt(i)))})),typeof n=="string")?(n=n.replace("/Date(",function(){return""}),n=n.replace(")/",function(){return""}),i=new Date(n)instanceof Date,i?new Date(n):n):n},isJson:function(n){return typeof n[0]=="string"?n:t.parseJSON(n)},isGuid:function(n){var t=/[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i.exec(n);return t!=null},replacer:function(n,i){return t.isPlainObject(n)?u.jsonReplacer(n,i):n instanceof Array?u.arrayReplacer(n):n instanceof Date?u.jsonReplacer({val:n},i).val:n},jsonReplacer:function(n,i){var r,u,f;for(u in n)(r=n[u],r instanceof Date)&&(f=t.serverTimezoneOffset*36e5*(t.isNullOrUndefined(i)||i===!1?1:-1),n[u]=new Date(+r+f));return n},arrayReplacer:function(n){for(var i=0;i<n.length;i++)t.isPlainObject(n[i])?n[i]=u.jsonReplacer(n[i]):n[i]instanceof Date&&(n[i]=u.jsonReplacer({date:n[i]}).date);return n}};t.isJSON=u.isJson;t.parseJSON=u.parseJson;t.dateParse=!0;t.dateFormat="yyyy-MM-dd";t.isGUID=u.isGuid;t.Query=function(n){return(this instanceof t.Query)?(this.queries=[],this._key="",this._fKey="",typeof n=="string"?this._fromTable=n||"":n&&n instanceof Array&&(this._lookup=n),this._expands=[],this._sortedColumns=[],this._groupedColumns=[],this._subQuery=null,this._isChild=!1,this._params=[],this):new t.Query(n)};t.Query.prototype={key:function(n){return typeof n=="string"&&(this._key=n),this},using:function(n){return n instanceof t.DataManager?(this.dataManagar=n,this):f("Query - using() : 'using' function should be called with parameter of instance ej.DataManager")},execute:function(n,i,r,u){return(n=n||this.dataManagar,n&&n instanceof t.DataManager)?n.executeQuery(this,i,r,u):f("Query - execute() : dataManager needs to be is set using 'using' function or should be passed as argument")},executeLocal:function(n){return(n=n||this.dataManagar,n&&n instanceof t.DataManager)?n.executeLocal(this):f("Query - executeLocal() : dataManager needs to be is set using 'using' function or should be passed as argument")},clone:function(){var n=new t.Query;return n.queries=this.queries.slice(0),n._key=this._key,n._isChild=this._isChild,n.dataManagar=this.dataManager,n._fromTable=this._fromTable,n._params=this._params.slice(0),n._expands=this._expands.slice(0),n._sortedColumns=this._sortedColumns.slice(0),n._groupedColumns=this._groupedColumns.slice(0),n._subQuerySelector=this._subQuerySelector,n._subQuery=this._subQuery,n._fKey=this._fKey,n._requiresCount=this._requiresCount,n},from:function(n){return typeof n=="string"&&(this._fromTable=n),this},addParams:function(n,i){return typeof i=="function"||t.isPlainObject(i)?typeof i=="function"&&this._params.push({key:n,fn:i}):this._params.push({key:n,value:i}),this},expand:function(n){return this._expands=typeof n=="string"?[].slice.call(arguments,0):n.slice(0),this},where:function(n,i,r,u,e){i=(i||t.FilterOperators.equal).toLowerCase();var o=null;return typeof n=="string"?o=new t.Predicate(n,i,r,u,e):n instanceof t.Predicate?o=n:f("Query - where : Invalid arguments"),this.queries.push({fn:"onWhere",e:o}),this},search:function(n,i,r,u,f){i&&typeof i!="boolean"?typeof i=="string"&&(i=[i]):(i=[],u=i);typeof r=="boolean"&&(u=r,r=null);r=r||t.FilterOperators.contains;r.length<3&&(r=t.data.operatorSymbols[r]);var e=t.data.fnOperators[r]||t.data.fnOperators.processSymbols(r);return this.queries.push({fn:"onSearch",e:{fieldNames:i,operator:r,searchKey:n,ignoreCase:u,ignoreAccent:f,comparer:e}}),this},sortBy:function(n,i,r){var o=t.sortOrder.Ascending,s,f,u,e;if(typeof n=="string"&&n.toLowerCase().endsWith(" desc")&&(n=n.replace(/ desc$/i,""),i=t.sortOrder.Descending),n instanceof Array){for(u=0;u<n.length;u++)this.sortBy(n[u],i,r);return this}if(typeof i=="boolean"?i=i?t.sortOrder.Descending:t.sortOrder.Ascending:typeof i=="function"&&(o="custom"),i&&typeof i!="string"||(o=i?i.toLowerCase():t.sortOrder.Ascending,i=t.pvt.fnSort(i)),r)for(s=a(this.queries,"onSortBy"),u=0;u<s.length;u++)if(f=s[u].e.fieldName,typeof f=="string"){if(f===n)return this}else if(f instanceof Array)for(e=0;e<f.length;e++)if(f[e]===n||n.toLowerCase()===f[e]+" desc")return this;return this.queries.push({fn:"onSortBy",e:{fieldName:n,comparer:i,direction:o}}),this},sortByDesc:function(n){return this.sortBy(n,t.sortOrder.Descending)},group:function(n,t){return this.sortBy(n,null,!0),this.queries.push({fn:"onGroup",e:{fieldName:n,fn:t}}),this},page:function(n,t){return this.queries.push({fn:"onPage",e:{pageIndex:n,pageSize:t}}),this},range:function(n,t){return(typeof n!="number"||typeof t!="number")&&f("Query() - range : Arguments type should be a number"),this.queries.push({fn:"onRange",e:{start:n,end:t}}),this},take:function(n){return typeof n!="number"&&f("Query() - Take : Argument type should be a number"),this.queries.push({fn:"onTake",e:{nos:n}}),this},skip:function(n){return typeof n!="number"&&f("Query() - Skip : Argument type should be a number"),this.queries.push({fn:"onSkip",e:{nos:n}}),this},select:function(n){return typeof n=="string"&&(n=[].slice.call(arguments,0)),n instanceof Array||f("Query() - Select : Argument type should be String or Array"),this.queries.push({fn:"onSelect",e:{fieldNames:n}}),this},hierarchy:function(n,i){return n&&n instanceof t.Query||f("Query() - hierarchy : query must be instance of ej.Query"),typeof i=="function"&&(this._subQuerySelector=i),this._subQuery=n,this},foreignKey:function(n){return typeof n=="string"&&(this._fKey=n),this},requiresCount:function(){return this._requiresCount=!0,this},aggregate:function(n,t){this.queries.push({fn:"onAggregates",e:{field:t,type:n}})}};t.Adaptor=function(n){this.dataSource=n;this.pvt={};this.init.apply(this,[].slice.call(arguments,1))};t.Adaptor.prototype={options:{from:"table",requestType:"json",sortBy:"sorted",select:"select",skip:"skip",group:"group",take:"take",search:"search",count:"requiresCounts",where:"where",aggregates:"aggregates",antiForgery:"antiForgery"},init:function(){},extend:function(t){var i=function(t){this.dataSource=t;this.options&&(this.options=n.extend({},this.options));this.init.apply(this,[].slice.call(arguments,0));this.pvt={}},u,r;i.prototype=new this.type;i.prototype.type=i;u=i.prototype.base={};for(r in t)i.prototype[r]&&(u[r]=i.prototype[r]);return n.extend(!0,i.prototype,t),i},processQuery:function(){},processResponse:function(n){return n.d?n.d:n},convertToQueryString:function(t){return n.param(t)},type:t.Adaptor};t.UrlAdaptor=(new t.Adaptor).extend({processQuery:function(n,t,i){var w=a(t.queries,"onSortBy"),d=a(t.queries,"onGroup"),nt=a(t.queries,"onWhere"),tt=a(t.queries,"onSearch"),it=a(t.queries,"onAggregates"),l=g(t.queries,["onSelect","onPage","onSkip","onTake","onRange"]),rt=t._params,b=n.dataSource.url,u,y,p=null,h=this.options,s={sorted:[],grouped:[],filters:[],searches:[],aggregates:[]},f,r,v,k;for(l.onPage?(u=l.onPage,y=e(u.pageIndex,t),p=e(u.pageSize,t),y=(y-1)*p):l.onRange&&(u=l.onRange,y=u.start,p=u.end-u.start),f=0;f<w.length;f++)u=e(w[f].e.fieldName,t),s.sorted.push(o(this,"onEachSort",{name:u,direction:w[f].e.direction},t));for(i&&(u=this.getFiltersFrom(i,t),u&&s.filters.push(o(this,"onEachWhere",u.toJSON(),t))),f=0;f<nt.length;f++){s.filters.push(o(this,"onEachWhere",nt[f].e.toJSON(),t));for(v in s.filters[f])c(s[v])&&delete s[v]}for(f=0;f<tt.length;f++)u=tt[f].e,s.searches.push(o(this,"onEachSearch",{fields:u.fieldNames,operator:u.operator,key:u.searchKey,ignoreCase:u.ignoreCase},t));for(f=0;f<d.length;f++)s.grouped.push(e(d[f].e.fieldName,t));for(f=0;f<it.length;f++)u=it[f].e,s.aggregates.push({type:u.type,field:e(u.field,t)});r={};r[h.from]=t._fromTable;h.expand&&(r[h.expand]=t._expands);r[h.select]=l.onSelect?o(this,"onSelect",e(l.onSelect.fieldNames,t),t):"";r[h.count]=t._requiresCount?o(this,"onCount",t._requiresCount,t):"";r[h.search]=s.searches.length?o(this,"onSearch",s.searches,t):"";r[h.skip]=l.onSkip?o(this,"onSkip",e(l.onSkip.nos,t),t):"";r[h.take]=l.onTake?o(this,"onTake",e(l.onTake.nos,t),t):"";r[h.antiForgery]=n.dataSource.antiForgery?n.antiForgeryToken().value:"";r[h.where]=s.filters.length||s.searches.length?o(this,"onWhere",s.filters,t):"";r[h.sortBy]=s.sorted.length?o(this,"onSortBy",s.sorted,t):"";r[h.group]=s.grouped.length?o(this,"onGroup",s.grouped,t):"";r[h.aggregates]=s.aggregates.length?o(this,"onAggregates",s.aggregates,t):"";r.param=[];o(this,"addParams",{dm:n,query:t,params:rt,reqParams:r});for(v in r)(c(r[v])||r[v]===""||r[v].length===0||v==="params")&&delete r[v];return(h.skip in r&&h.take in r||p===null||(r[h.skip]=o(this,"onSkip",y,t),r[h.take]=o(this,"onTake",p,t)),k=this.pvt,this.pvt={},this.options.requestType==="json")?{data:JSON.stringify(r),url:b,ejPvtData:k,type:"POST",contentType:"application/json; charset=utf-8"}:(u=this.convertToQueryString(r,t,n),u=(n.dataSource.url.indexOf("?")!==-1?"&":"/")+u,{type:"GET",url:u.length?b.replace(/\/*$/,u):b,ejPvtData:k})},convertToQueryString:function(t,i,r){return r.dataSource.url&&r.dataSource.url.indexOf("?")!==-1?n.param(t):"?"+n.param(t)},processResponse:function(n,i,u,f,e,o){var c=e.ejPvtData||{},v=n.groupDs,y,a,h,s,d,w;if(f&&f.getResponseHeader("Content-Type")&&f.getResponseHeader("Content-Type").indexOf("xml")!=-1&&n.nodeType==9)return u._requiresCount?{result:[],count:0}:[];if(y=JSON.parse(e.data),y&&y.action==="batch"&&n.added)return o.added=n.added,o;if(n.d&&(n=n.d),c&&c.aggregates&&c.aggregates.length){var l=c.aggregates,h={},p,k={};for(("count"in n)&&(h.count=n.count),n.result&&(h.result=n.result),n.aggregate&&(n=n.aggregate),s=0;s<l.length;s++)p=t.aggregates[l[s].type],p&&(k[l[s].field+" - "+l[s].type]=p(n,l[s].field));h.aggregates=k;n=h}if(c&&c.groups&&c.groups.length){for(a=c.groups,h={},("count"in n)&&(h.count=n.count),n.aggregates&&(h.aggregates=n.aggregates),n.result&&(n=n.result),s=0;s<a.length;s++)d=null,w=b(a[s],u.queries),t.isNullOrUndefined(v)||(v=t.group(v,a[s],null,w)),n=t.group(n,a[s],c.aggregates,w,d,v);return h.count!=r?h.result=n:h=n,h}return n},onGroup:function(n){this.pvt.groups=n},onAggregates:function(n){this.pvt.aggregates=n},batchRequest:function(n,t,i,r){var u={changed:t.changed,added:t.added,deleted:t.deleted,action:"batch",table:i.url,key:i.key,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return r&&this.addParams({dm:n,query:r,params:r._params,reqParams:u}),{type:"POST",url:n.dataSource.batchUrl||n.dataSource.crudUrl||n.dataSource.removeUrl||n.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u)}},beforeSend:function(){},insert:function(n,t,i,r){var u={value:t,table:i,action:"insert",antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return r&&this.addParams({dm:n,query:r,params:r._params,reqParams:u}),{url:n.dataSource.insertUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify(u)}},remove:function(n,t,i,r,u){var f={key:i,keyColumn:t,table:r,action:"remove",antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return u&&this.addParams({dm:n,query:u,params:u._params,reqParams:f}),{type:"POST",url:n.dataSource.removeUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify(f)}},update:function(n,t,i,r,u){var f={value:i,action:"update",keyColumn:t,key:i[t],table:r,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return u&&this.addParams({dm:n,query:u,params:u._params,reqParams:f}),{type:"POST",url:n.dataSource.updateUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify(f)}},getFiltersFrom:function(n,i){var r;n instanceof Array&&n.length||f("ej.SubQuery: Array of key values required");var u=i._fKey,e,o=u,h=i._key,s=[],c=typeof n[0]!="object";for(typeof n[0]!="object"&&(o=null),r=0;r<n.length;r++)e=c?n[r]:t.pvt.getObject(h||o,n[r]),s.push(new t.Predicate(u,"==",e));return t.Predicate.or(s)},addParams:function(n){var e=n.dm,u=n.query,o=n.params,i=n.reqParams,r,t;for(i.params={},r=0;t=o[r];r++)i[t.key]&&f("ej.Query: Custom Param is conflicting other request arguments"),i[t.key]=t.value,t.fn&&(i[t.key]=t.fn.call(u,t.key,u,e)),i.params[t.key]=i[t.key]}});t.WebMethodAdaptor=(new t.UrlAdaptor).extend({processQuery:function(n,i,r){var u=t.UrlAdaptor.prototype.processQuery(n,i,r),e=t.parseJSON(u.data),f={};return f.value=e,o(this,"addParams",{dm:n,query:i,params:i._params,reqParams:f}),{data:JSON.stringify(f),url:u.url,ejPvtData:u.ejPvtData,type:"POST",contentType:"application/json; charset=utf-8"}},addParams:function(n){var s=n.dm,o=n.query,h=n.params,i=n.reqParams,u,t,r,e;for(i.params={},u=0;t=h[u];u++)i[t.key]&&f("ej.Query: Custom Param is conflicting other request arguments"),r=t.key,e=t.value,t.fn&&(e=t.fn.call(o,t.key,o,s)),i[r]=e,i.params[r]=i[r]}});t.CacheAdaptor=(new t.UrlAdaptor).extend({init:function(n,i,r){var f,u;t.isNullOrUndefined(n)||(this.cacheAdaptor=n);this.pageSize=r;this.guidId=t.getGuid("cacheAdaptor");f={keys:[],results:[]};window.localStorage&&window.localStorage.setItem(this.guidId,JSON.stringify(f));u=this.guidId;t.isNullOrUndefined(i)||setInterval(function(){for(var e,r=t.parseJSON(window.localStorage.getItem(u)),f=[],n=0;n<r.results.length;n++)r.results[n].timeStamp=new Date-new Date(r.results[n].timeStamp),new Date-new Date(r.results[n].timeStamp)>i&&f.push(n);for(e=f,n=0;n<f.length;n++)r.results.splice(f[n],1),r.keys.splice(f[n],1);window.localStorage.removeItem(u);window.localStorage.setItem(u,JSON.stringify(r))},i)},generateKey:function(n,t){var h=a(t.queries,"onSortBy"),c=a(t.queries,"onGroup"),o=a(t.queries,"onWhere"),l=a(t.queries,"onSearch"),v=a(t.queries,"onPage"),s=g(t.queries,["onSelect","onPage","onSkip","onTake","onRange"]),y=t._params,r=n,u,i,f,e;for(s.onPage&&(r+=s.onPage.pageIndex),h.forEach(function(n){r+=n.e.direction+n.e.fieldName}),c.forEach(function(n){r+=n.e.fieldName}),l.forEach(function(n){r+=n.e.searchKey}),u=0;u<o.length;u++)if(i=o[u],i.e.isComplex){for(f=t.clone(),f.queries=[],e=0;e<i.e.predicates.length;e++)f.queries.push({fn:"onWhere",e:i.e.predicates[e],filter:t.queries.filter});r+=i.e.condition+this.generateKey(n,f)}else r+=i.e.field+i.e.operator+i.e.value;return r},processQuery:function(n,i){var f=this.generateKey(n.dataSource.url,i),r,u;return(window.localStorage&&(r=t.parseJSON(window.localStorage.getItem(this.guidId))),u=r?r.results[r.keys.indexOf(f)]:null,u!=null&&!this._crudAction&&!this._insertAction)?u:(this._crudAction=null,this._insertAction=null,this.cacheAdaptor.processQuery.apply(this.cacheAdaptor,[].slice.call(arguments,0)))},processResponse:function(i,r,u,f,e,o){var h;if(this._insertAction||e&&this.cacheAdaptor.options.batch&&e.url.endsWith(this.cacheAdaptor.options.batch)&&e.type.toLowerCase()==="post")return this.cacheAdaptor.processResponse(i,r,u,f,e,o);var i=this.cacheAdaptor.processResponse.apply(this,[].slice.call(arguments,0)),c=this.generateKey(r.dataSource.url,u),s={};for(window.localStorage&&(s=t.parseJSON(window.localStorage.getItem(this.guidId))),h=n.inArray(c,s.keys),h!=-1&&(s.results.splice(h,1),s.keys.splice(h,1)),s.results[s.keys.push(c)-1]={keys:c,result:i.result,timeStamp:new Date,count:i.count};s.results.length>this.pageSize;)s.results.splice(0,1),s.keys.splice(0,1);return window.localStorage.setItem(this.guidId,JSON.stringify(s)),i},update:function(n,t,i,r){return this._crudAction=!0,this.cacheAdaptor.update(n,t,i,r)},insert:function(n,t,i){return this._insertAction=!0,this.cacheAdaptor.insert(n,t,i)},remove:function(n,t,i,r){return this._crudAction=!0,this.cacheAdaptor.remove(n,t,i,r)},batchRequest:function(n,t,i){return this.cacheAdaptor.batchRequest(n,t,i)}});var a=function(n,t){return n.filter(function(n){return n.fn===t})||[]},g=function(n,t){for(var r=n.filter(function(n){return t.indexOf(n.fn)!==-1}),u={},i=0;i<r.length;i++)u[r[i].fn]||(u[r[i].fn]=r[i].e);return u},o=function(n,t,i,r){if(n[t]){var u=n[t](i,r);c(u)||(i=u)}return i};t.ODataAdaptor=(new t.UrlAdaptor).extend({options:{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$inlinecount",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 "},onEachWhere:function(n,t){return n.isComplex?this.onComplexPredicate(n,t):this.onPredicate(n,t)},_typeStringQuery:function(n,i,r,u,f){r.indexOf("'")!=-1&&(r=r.replace(new RegExp(/'/g),"''"));return/[ !@@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(r)&&(r=encodeURIComponent(r)),r="'"+r+"'",i&&(u="cast("+u+", 'Edm.String')"),t.isGUID(r)&&(f="guid"),n.ignoreCase&&(f?u:u="tolower("+u+")",r=r.toLowerCase()),{val:r,guid:f,field:u}},onPredicate:function(n,i,r){var f="",o,l,e=n.value,v=typeof e,h=this._p(n.field),s,c,y,a;if(e instanceof Date&&(e="datetime'"+u.replacer(e).toJSON()+"'"),v==="string"&&(c=this._typeStringQuery(n,r,e,h,l),e=c.val,h=c.field,l=c.guid),o=t.data.odBiOperator[n.operator],n.anyCondition!=""&&o)return f+=e.table,f+="/"+n.anyCondition,f+="(d:d/",f+=h,f+=o,f+=e.value,f+")";if(n.operator=="in"||n.operator=="notin"){for(f+="(",s=0;s<e.length;s++)e[s]instanceof Date&&(e[s]="datetime'"+u.replacer(e[s]).toJSON()+"'"),typeof e[s]=="string"&&(c=this._typeStringQuery(n,r,e[s],h,l),e[s]=c.val,h=c.field,l=c.guid),f+=h,f+=o,f+=e[s],s!=e.length-1&&(f+=n.operator=="in"?" or ":" and ");return f+")"}return o?this.onOperation(f,o,h,e,l):(o=t.data.odUniOperator[n.operator],!o||v!=="string")?"":(o==="substringof"&&(y=e,e=h,h=y),f+=o+"(",f+=h+",",l&&(f+=l),f+=e+")",n.operator=="notcontains"&&(f+=" eq false"),n.anyCondition!=""&&o)?(a+=e.table,a+="/"+n.anyCondition,a+="(d:d/",f+=f,a+")"):f},onOperation:function(n,t,i,r,u){return n+=i,n+=t,u&&(n+=u),n+r},onComplexPredicate:function(n,t){for(var r=[],i=0;i<n.predicates.length;i++)r.push("("+this.onEachWhere(n.predicates[i],t)+")");return r.join(" "+n.condition+" ")},onWhere:function(n){return this.pvt.searches&&n.push(this.onEachWhere(this.pvt.searches,null,!0)),n.join(" and ")},onEachSearch:function(n){var r,i;for(n.fields.length===0&&f("Query() - Search : oData search requires list of field names to search"),r=this.pvt.searches||[],i=0;i<n.fields.length;i++)r.push(new t.Predicate(n.fields[i],n.operator,n.key,n.ignoreCase));this.pvt.searches=r},onSearch:function(){return this.pvt.searches=t.Predicate.or(this.pvt.searches),""},onEachSort:function(n){var i=[],t;if(n.name instanceof Array)for(t=0;t<n.name.length;t++)i.push(this._p(n.name[t]));else i.push(this._p(n.name)+(n.direction==="descending"?" desc":""));return i.join(",")},onSortBy:function(n){return n.reverse().join(",")},onGroup:function(n){return this.pvt.groups=n,""},onSelect:function(n){for(var t=0;t<n.length;t++)n[t]=this._p(n[t]);return n.join(",")},onAggregates:function(n){return this.pvt.aggregates=n,""},onCount:function(n){return n===!0?"allpages":""},beforeSend:function(n,t,i){i.url.endsWith(this.options.batch)&&i.type.toLowerCase()==="post"&&(t.setRequestHeader("Accept",l.multipartAccept),t.setRequestHeader("DataServiceVersion","2.0"),t.overrideMimeType("text/plain; charset=x-user-defined"));n.dataSource.crossDomain||(t.setRequestHeader("DataServiceVersion","2.0"),t.setRequestHeader("MaxDataServiceVersion","2.0"))},processResponse:function(i,r,f,e,o,s){var a,l,v,d,tt,g,it,k,h,ft;if(!t.isNullOrUndefined(i.d)&&(a=f&&f._requiresCount?i.d.results:i.d,!t.isNullOrUndefined(a)))for(h=0;h<a.length;h++)t.isNullOrUndefined(a[h].__metadata)||delete a[h].__metadata;if(l=o&&o.ejPvtData,e&&e.getResponseHeader("Content-Type")&&e.getResponseHeader("Content-Type").indexOf("xml")!=-1&&i.nodeType==9)return f._requiresCount?{result:[],count:0}:[];if(o&&this.options.batch&&o.url.endsWith(this.options.batch)&&o.type.toLowerCase()==="post"){if(v=e.getResponseHeader("Content-Type"),v=v.substring(v.indexOf("=batchresponse")+1),i=i.split(v),i.length<2)return;for(i=i[1],g=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(i),i.replace(g[0],""),it=g[1],i=i.split(it),h=i.length;h>-1;h--)/\bContent-ID:/i.test(i[h])&&/\bHTTP.+201/.test(i[h])&&(d=parseInt(/\bContent-ID: (\d+)/i.exec(i[h])[1]),s.added[d]&&(tt=u.parseJson(/^\{.+\}/m.exec(i[h])[0]),n.extend(s.added[d],this.processResponse(tt))));return s}var y=e&&e.getResponseHeader("DataServiceVersion"),w=null,rt={};if(y=y&&parseInt(y,10)||2,f&&f._requiresCount&&((i.__count||i["odata.count"])&&(w=i.__count||i["odata.count"]),i.d&&(i=i.d),(i.__count||i["odata.count"])&&(w=i.__count||i["odata.count"])),y===3&&i.value&&(i=i.value),i.d&&(i=i.d),y<3&&i.results&&(i=i.results),l&&l.aggregates&&l.aggregates.length){var p=l.aggregates,nt,ut={};for(h=0;h<p.length;h++)nt=t.aggregates[p[h].type],nt&&(ut[p[h].field+" - "+p[h].type]=nt(i,p[h].field));rt=ut}if(l&&l.groups&&l.groups.length)for(k=l.groups,h=0;h<k.length;h++)ft=b(k[h],f.queries),i=t.group(i,k[h],l.aggregates,ft);return c(w)?i:{result:i,count:w,aggregates:rt}},convertToQueryString:function(n,t,i){var r=[],u=n.table||"",f;delete n.table;i.dataSource.requiresFormat&&(n.$format="json");for(f in n)r.push(f+"="+n[f]);return(r=r.join("&"),i.dataSource.url&&i.dataSource.url.indexOf("?")!==-1&&!u)?r:r.length?u+"?"+r:u||""},insert:function(n,t,i){return{url:n.dataSource.url.replace(/\/*$/,i?"/"+i:""),data:JSON.stringify(t)}},remove:function(n,i,r,u){return typeof r=="string"?{type:"DELETE",url:t.isGUID(r)?n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r+")":n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"('"+r+"')"}:{type:"DELETE",url:n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r+")"}},update:function(n,i,r,u){var f;return f=typeof r[i]=="string"?t.isGUID(r[i])?n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r[i]+")":n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"('"+r[i]+"')":n.dataSource.url.replace(/\/*$/,u?"/"+u:"")+"("+r[i]+")",{type:"PUT",url:f,data:JSON.stringify(r),accept:this.options.accept}},batchRequest:function(n,i,r){var e=r.guid=t.getGuid(l.batchPre),o=n.dataSource.url.replace(/\/*$/,"/"+this.options.batch),f={url:r.url,key:r.key,cid:1,cSet:t.getGuid(l.changeSet)},u="--"+e+"\n";return u+="Content-Type: multipart/mixed; boundary="+f.cSet.replace("--","")+"\n",this.pvt.changeSet=0,u+=this.generateInsertRequest(i.added,f),u+=this.generateUpdateRequest(i.changed,f),u+=this.generateDeleteRequest(i.deleted,f),u+=f.cSet+"--\n",u+="--"+e+"--",{type:"POST",url:o,contentType:"multipart/mixed; charset=UTF-8;boundary="+e,data:u}},generateDeleteRequest:function(n,t){var i,u,r;if(!n)return"";for(i="",r=0;r<n.length;r++)i+="\n"+t.cSet+"\n",i+=l.changeSetContent+"\n\n",i+="DELETE ",u=typeof n[r][t.key]=="string"?"'"+n[r][t.key]+"'":n[r][t.key],i+=t.url+"("+u+") HTTP/1.1\n",i+="If-Match : * \n",i+="Accept: "+l.accept+"\n",i+="Content-Id: "+this.pvt.changeSet+++"\n",i+=l.batchChangeSetContentType+"\n";return i+"\n"},generateInsertRequest:function(n,t){var i,r;if(!n)return"";for(i="",r=0;r<n.length;r++)i+="\n"+t.cSet+"\n",i+=l.changeSetContent+"\n\n",i+="POST ",i+=t.url+" HTTP/1.1\n",i+="Accept: "+l.accept+"\n",i+="Content-Id: "+this.pvt.changeSet+++"\n",i+=l.batchChangeSetContentType+"\n\n",i+=JSON.stringify(n[r])+"\n";return i},generateUpdateRequest:function(n,t){var i,u,r;if(!n)return"";for(i="",r=0;r<n.length;r++)i+="\n"+t.cSet+"\n",i+=l.changeSetContent+"\n\n",i+="PUT ",u=typeof n[r][t.key]=="string"?"'"+n[r][t.key]+"'":n[r][t.key],i+=t.url+"("+u+") HTTP/1.1\n",i+="If-Match : * \n",i+="Accept: "+l.accept+"\n",i+="Content-Id: "+this.pvt.changeSet+++"\n",i+=l.batchChangeSetContentType+"\n\n",i+=JSON.stringify(n[r])+"\n\n";return i},_p:function(n){return n.replace(/\./g,"/")}});t.ODataV4Adaptor=(new t.ODataAdaptor).extend({options:{requestType:"get",accept:"application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",multipartAccept:"multipart/mixed",sortBy:"$orderby",select:"$select",skip:"$skip",take:"$top",count:"$count",search:"$search",where:"$filter",expand:"$expand",batch:"$batch",changeSet:"--changeset_",batchPre:"batch_",contentId:"Content-Id: ",batchContent:"Content-Type: multipart/mixed; boundary=",changeSetContent:"Content-Type: application/http\nContent-Transfer-Encoding: binary ",batchChangeSetContentType:"Content-Type: application/json; charset=utf-8 "},onCount:function(n){return n===!0?"true":""},onPredicate:function(n,i,r){var u="",f=n.value,e=f instanceof Date;return t.data.odUniOperator.contains="contains",u=t.ODataAdaptor.prototype.onPredicate.call(this,n,i,r),t.data.odUniOperator.contains="substringof",e&&(u=u.replace(/datetime'(.*)'$/,"$1")),u},onOperation:function(n,t,i,r,u){return u?(n+="("+i,n+=t,n+=r.replace(/["']/g,"")+")"):(n+=i,n+=t,n+=r),n},onEachSearch:function(n){var t=this.pvt.search||[];t.push(n.key);this.pvt.search=t},onSearch:function(){return this.pvt.search.join(" OR ")},beforeSend:function(){},processQuery:function(n,i){for(var f,o,e=/\/[\d*\/]*/g,u="",r=i._expands.length-1;r>0;r--)if(u.indexOf(i._expands[r])>=0)i._expands.pop();else if(e.test(i._expands[r])){for(u=i._expands.pop(),f=u.replace(e,"($expand="),o=0;o<u.split(e).length-1;o++)f=f+")";i._expands.unshift(f);r++}return t.ODataAdaptor.prototype.processQuery.apply(this,[n,i])},processResponse:function(i,r,f,e,o,s){var l=o&&o.ejPvtData,a,w,nt,k,tt,y,d,p,h,rt;if(e&&e.getResponseHeader("Content-Type")&&e.getResponseHeader("Content-Type").indexOf("xml")!=-1&&i.nodeType==9)return f._requiresCount?{result:[],count:0}:[];if(o&&this.options.batch&&o.url.endsWith(this.options.batch)&&o.type.toLowerCase()==="post"){if(a=e.getResponseHeader("Content-Type"),a=a.substring(a.indexOf("=batchresponse")+1),i=i.split(a),i.length<2)return;for(i=i[1],k=/(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(i),i.replace(k[0],""),tt=k[1],i=i.split(tt),h=i.length;h>-1;h--)/\bContent-ID:/i.test(i[h])&&/\bHTTP.+201/.test(i[h])&&(w=parseInt(/\bContent-ID: (\d+)/i.exec(i[h])[1]),s.added[w]&&(nt=u.parseJson(/^\{.+\}/m.exec(i[h])[0]),n.extend(s.added[w],this.processResponse(nt))));return s}if(y=null,d={},f&&f._requiresCount&&"@odata.count"in i&&(y=i["@odata.count"]),i=t.isNullOrUndefined(i.value)?i:i.value,l&&l.aggregates&&l.aggregates.length){var v=l.aggregates,g,it={};for(h=0;h<v.length;h++)g=t.aggregates[v[h].type],g&&(it[v[h].field+" - "+v[h].type]=g(i,v[h].field));d=it}if(l&&l.groups&&l.groups.length)for(p=l.groups,h=0;h<p.length;h++)rt=b(p[h],f.queries),i=t.group(i,p[h],l.aggregates,rt);return c(y)?i:{result:i,count:y,aggregates:d}}});t.JsonAdaptor=(new t.Adaptor).extend({processQuery:function(n,t){for(var u=n.dataSource.json.slice(0),o=u.length,s=!0,f,i,h={},e=0;e<t.queries.length;e++)i=t.queries[e],f=this[i.fn].call(this,u,i.e,t),i.fn=="onAggregates"?h[i.e.field+" - "+i.e.type]=f:u=f!==r?f:u,(i.fn==="onPage"||i.fn==="onSkip"||i.fn==="onTake"||i.fn==="onRange")&&(s=!1),s&&(o=u.length);return t._requiresCount&&(u={result:u,count:o,aggregates:h}),u},batchRequest:function(n,t,i){for(var r=0;r<t.added.length;r++)this.insert(n,t.added[r]);for(r=0;r<t.changed.length;r++)this.update(n,i.key,t.changed[r]);for(r=0;r<t.deleted.length;r++)this.remove(n,i.key,t.deleted[r]);return t},onWhere:function(n,t){return n?n.filter(function(n){return t.validate(n)}):n},onAggregates:function(n,i){var r=t.aggregates[i.type];return!n||!r||n.length==0?null:r(n,i.field)},onSearch:function(n,i){return!n||!n.length?n:(i.fieldNames.length===0&&t.pvt.getFieldList(n[0],i.fieldNames),n.filter(function(n){for(var r=0;r<i.fieldNames.length;r++)if(i.comparer.call(n,t.pvt.getObject(i.fieldNames[r],n),i.searchKey,i.ignoreCase,i.ignoreAccent))return!0;return!1}))},onSortBy:function(n,i,r){var o,u,f;if(!n)return n;if(u=e(i.fieldName,r),!u)return n.sort(i.comparer);if(u instanceof Array){for(u=u.slice(0),f=u.length-1;f>=0;f--)u[f]&&(o=i.comparer,u[f].endsWith(" desc")&&(o=t.pvt.fnSort(t.sortOrder.Descending),u[f]=u[f].replace(" desc","")),n=it(n,u[f],o,[]));return n}return it(n,u,i.comparer,r?r.queries:[])},onGroup:function(n,i,r){var u,o,s,f,h;if(!n)return n;if(u=a(r.queries,"onAggregates"),o=[],u.length)for(f=0;f<u.length;f++)s=u[f].e,o.push({type:s.type,field:e(s.field,r)});return h=b(i.fieldName,r.queries),t.group(n,e(i.fieldName,r),o,h)},onPage:function(n,t,i){var r=e(t.pageSize,i),u=(e(t.pageIndex,i)-1)*r,f=u+r;return n?n.slice(u,f):n},onRange:function(n,t){return n?n.slice(e(t.start),e(t.end)):n},onTake:function(n,t){return n?n.slice(0,e(t.nos)):n},onSkip:function(n,t){return n?n.slice(e(t.nos)):n},onSelect:function(n,i){return n?t.select(n,e(i.fieldNames)):n},insert:function(n,t){return n.dataSource.json.push(t)},remove:function(n,i,r){var f=n.dataSource.json,u;for(typeof r=="object"&&(r=t.getObject(i,r)),u=0;u<f.length;u++)if(t.getObject(i,f[u])===r)break;return u!==f.length?f.splice(u,1):null},update:function(i,r,u){for(var e=i.dataSource.json,o=t.getObject(r,u),f=0;f<e.length;f++)if(t.getObject(r,e[f])===o)break;return f<e.length?n.extend(e[f],u):null}});t.ForeignKeyAdaptor=function(i,u){var f=(new t[u||"JsonAdaptor"]).extend({init:function(){var r,n;for(this.foreignData=[],this.key=[],this.adaptorType=u,this.value=[],this.fValue=[],this.keyField=[],r=i,n=0;n<r.length;n++)this.foreignData[n]=r[n].dataSource,this.key[n]=r[n].foreignKeyField,this.fValue[n]=t.isNullOrUndefined(r[n].field)?r[n].foreignKeyValue:r[n].field+"_"+r[n].foreignKeyValue,this.value[n]=r[n].foreignKeyValue,this.keyField[n]=r[n].field||r[n].foreignKeyField,this.initial=!0},processQuery:function(n,i){var e=n.dataSource.json,u,f,r;if(this.initial){for(u=0;u<e.length;u++)for(f=this,r=0;r<this.foreignData.length;r++)this.foreignData[r].filter(function(n){t.getObject(f.key[r],n)==t.getObject(f.keyField[r],e[u])&&(e[u][f.fValue[r]]=t.getObject(f.value[r],n))});this.initial=!1}return this.base.processQuery.apply(this,[n,i])},setValue:function(i){for(var o,f,e,u=0;u<this.foreignData.length;u++)o=this,f=i[this.fValue[u]],typeof f!="string"||isNaN(f)||(f=t.parseFloat(f)),e=n.grep(o.foreignData[u],function(n){return n[o.value[u]]==f})[0],t.isNullOrUndefined(e)&&(e=n.grep(o.foreignData[u],function(n){return n[o.key[u]]==f})[0],t.getObject(this.value[u],e)!=r&&t.createObject(o.value[u],t.getObject(this.value[u],e),i)),t.getObject(this.value[u],e)!=r&&t.createObject(this.keyField[u],t.getObject(this.key[u],e),i)},insert:function(n,t,i){return this.setValue(t),{url:n.dataSource.insertUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify({value:t,table:i,action:"insert",antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""})}},update:function(n,i,r,u){return this.setValue(r),t.JsonAdaptor.prototype.update(n,i,r,u),{type:"POST",url:n.dataSource.updateUrl||n.dataSource.crudUrl||n.dataSource.url,data:JSON.stringify({value:r,action:"update",keyColumn:i,key:r[i],table:u,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""})}}});return n.extend(this,new f),this};t.remoteSaveAdaptor=(new t.JsonAdaptor).extend({beforeSend:t.UrlAdaptor.prototype.beforeSend,insert:t.UrlAdaptor.prototype.insert,update:t.UrlAdaptor.prototype.update,remove:t.UrlAdaptor.prototype.remove,addParams:t.UrlAdaptor.prototype.addParams,batchRequest:function(n,t,i,r){var u={changed:t.changed,added:t.added,deleted:t.deleted,action:"batch",table:i.url,key:i.key,antiForgery:n.dataSource.antiForgery?n.antiForgeryToken().value:""};return r&&this.addParams({dm:n,query:r,params:r._params,reqParams:u}),{type:"POST",url:n.dataSource.batchUrl||n.dataSource.crudUrl||n.dataSource.url,contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(u)}},processResponse:function(n,i,r,u,f,e,o){if(t.isNullOrUndefined(e))return n.d?n.d:n;n.d&&(n=n.d);n.added&&(e.added=t.parseJSON(n.added));n.changed&&(e.changed=t.parseJSON(n.changed));n.deleted&&(e.deleted=t.parseJSON(n.deleted));for(var s=0;s<e.added.length;s++)t.JsonAdaptor.prototype.insert(i,e.added[s]);for(s=0;s<e.changed.length;s++)t.JsonAdaptor.prototype.update(i,o,e.changed[s]);for(s=0;s<e.deleted.length;s++)t.JsonAdaptor.prototype.remove(i,o,e.deleted[s]);return n}});t.WebApiAdaptor=(new t.ODataAdaptor).extend({insert:function(n,t){return{type:"POST",url:n.dataSource.url,data:JSON.stringify(t)}},remove:function(n,t,i){return{type:"DELETE",url:n.dataSource.url+"/"+i,data:JSON.stringify(i)}},update:function(n,t,i){return{type:"PUT",url:n.dataSource.url,data:JSON.stringify(i)}},batchRequest:function(i,r,u){var e=u.guid=t.getGuid(l.batchPre),f=[];return n.each(r.added,function(n,t){f.push("--"+e);f.push("Content-Type: application/http; msgtype=request","");f.push("POST "+i.dataSource.insertUrl+" HTTP/1.1");f.push("Content-Type: application/json; charset=utf-8");f.push("Host: "+location.host);f.push("",t?JSON.stringify(t):"")}),n.each(r.changed,function(n,t){f.push("--"+e);f.push("Content-Type: application/http; msgtype=request","");f.push("PUT "+i.dataSource.updateUrl+" HTTP/1.1");f.push("Content-Type: application/json; charset=utf-8");f.push("Host: "+location.host);f.push("",t?JSON.stringify(t):"")}),n.each(r.deleted,function(n,t){f.push("--"+e);f.push("Content-Type: application/http; msgtype=request","");f.push("DELETE "+i.dataSource.removeUrl+"/"+t[u.key]+" HTTP/1.1");f.push("Content-Type: application/json; charset=utf-8");f.push("Host: "+location.host);f.push("",t?JSON.stringify(t):"")}),f.push("--"+e+"--",""),{type:"POST",url:i.dataSource.batchUrl||i.dataSource.crudUrl||i.dataSource.url,data:f.join("\r\n"),contentType:'multipart/mixed; boundary="'+e+'"'}},processResponse:function(n,i,r,u,f){var o=f&&f.ejPvtData,l,e,w;if(f&&f.type.toLowerCase()!="post"){var h=u&&u.getResponseHeader("DataServiceVersion"),a=null,y={};if(h=h&&parseInt(h,10)||2,r&&r._requiresCount&&(c(n.Count)||(a=n.Count)),h<3&&n.Items&&(n=n.Items),o&&o.aggregates&&o.aggregates.length){var s=o.aggregates,v,p={};for(e=0;e<s.length;e++)v=t.aggregates[s[e].type],v&&(p[s[e].field+" - "+s[e].type]=v(n,s[e].field));y=p}if(o&&o.groups&&o.groups.length)for(l=o.groups,e=0;e<l.length;e++)w=b(l[e],r.queries),n=t.group(n,l[e],o.aggregates,w);return c(a)?n:{result:n,count:a,aggregates:y}}}});e=function(n,t){return typeof n=="function"?n.call(t||{}):n};t.TableModel=function(i,r,u,e){var c,o,l,s;if(!p(this,t.TableModel))return new t.TableModel(r);for(p(r,Array)||f("ej.TableModel - Json Array is required"),c=[],l=h(ht,this),s=0;s<r.length;s++){o=new t.Model(r[s],this);o.state="unchanged";o.on("stateChange",l);e&&o.computes(e);c.push(o)}return this.name=i||"table1",this.rows=t.NotifierArray(c),this._deleted=[],this._events=n({}),this.dataManager=u,this._isDirty=!1,this};t.TableModel.prototype={on:function(n,t){this._events.on(n,t)},off:function(n,t){this._events.off(n,t)},setDataManager:function(n){this.dataManagar=n},saveChanges:function(){if(this.dataManager&&p(this.dataManager,t.DataManager)||f("ej.TableModel - saveChanges : Set the dataManager using setDataManager function"),this.isDirty()){var n=this.dataManager.saveChanges(this.getChanges(),this.key,this.name);n.done(h(function(n){for(var t=this.toArray(),i=0;i<t.length;i++)t.state==="added"&&t.set(this.key,n.added.filter(function(n){return n[this.key]===t.get(this.key)})[0][this.key]),t[i].markCommit();this._events.triggerHandler({type:"save",table:this})},this));n.fail(h(function(n){this.rejectChanges();this._events.triggerHandler({type:"reject",table:this,error:n})},this));this._isDirty=!1}},rejectChanges:function(){for(var t=this.toArray(),n=0;n<t.length;n++)t[n].revert(!0);this._isDirty=!1;this._events.triggerHandler({type:"reject",table:this})},insert:function(n){var i=new t.Model(n);i._isDirty=this._isDirty=!0;this.rows.push(i);this._events.triggerHandler({type:"insert",model:i,table:this})},update:function(n){var r;this.key||f("TableModel - update : Primary key should be assigned to TableModel.key");var i=n,t,u=this.key,e=i[u];t=this.rows.array.filter(function(n){return n.get(u)===e});t=t[0];for(r in i)t.set(r,i[r]);this._isDirty=!0;this._events.triggerHandler({type:"update",model:t,table:this})},remove:function(n){var t,i,e,u;for(this.key||f("TableModel - update : Primary key should be assigned to TableModel.key"),t=this.key,i=-1,n&&typeof n=="object"&&(n=n[t]!==r?n[t]:n.get(t)),u=0;u<this.rows.length();u++)if(this.rows.array[u].get(t)===n){i=u;break}i>-1&&(e=this.rows.removeAt(i),e.markDelete(),this._deleted.push({model:e,position:i}),this._isDirty=!0,this._events.triggerHandler({type:"remove",model:e,table:this}))},isDirty:function(){return this._isDirty},getChanges:function(){for(var i={added:[],changed:[]},r=this.toArray(),n=0;n<r.length;n++)i[r[n].state]&&i[r[n].state].push(r[n].json);return i.deleted=t.select(this._deleted,["model"]),i},toArray:function(){return this.rows.toArray()},setDirty:function(n,t){this._isDirty!==!!n&&(this._isDirty=!!n,this._events.triggerHandler({type:"dirty",table:this,model:t}))},get:function(n){return this.rows.array[n]},length:function(){return this.rows.array.length},bindTo:function(t){var i=nt,e=n(t.html()),f=this.toArray(),u,r;for(n.inArray(t.prop("tagName").toLowerCase(),["table","tbody"])&&(i=tt),i.insertBefore(t),t.detach().empty(),r=0;r<f.length;r++)u=e.clone(),f[r].bindTo(u),t.append(u);t.insertAfter(i);i.remove()}};nt=i?n(document.createElement("div")):{};tt=i?n(document.createElement("tr")):{};t.Model=function(i,r,u){typeof r=="string"&&(u=r,r=null);this.$id=et("m");this.json=i;this.table=r instanceof t.TableModel?r:null;this.name=u||this.table&&this.table.name;this.dataManager=r instanceof t.DataManager?r:r.dataManagar;this.actual={};this._events=n({});this.isDirty=!1;this.state="added";this._props=[];this._computeEls={};this._fields={};this._attrEls={};this._updates={};this.computed={}};t.Model.prototype={computes:function(t){n.extend(this.computed,t)},on:function(n,t){this._events.on(n,t)},off:function(n,t){this._events.off(n,t)},set:function(n,t){var i=this.json,e=n,f,u;for(n=n.split("."),u=0;u<n.length-1;u++)n=n[0],i=i[n[0]];this.isDirty=!0;this.changeState("changed",{from:"set"});f=i[n];this.actual[n]!==r||n in this.actual||(this.actual[n]=t);i[n]=t;this._updateValues(n,t);this._events.triggerHandler({type:e,current:t,previous:f,model:this})},get:function(n){return t.pvt.getObject(n,this.json)},revert:function(n){for(var t in this.actual)this.json[t]=this.actual[t];this.isDirty=!1;n?this.state="unchanged":this.changeState("unchanged",{from:"revert"})},save:function(i,r){return(i=i||this.dataManagar,r=r||i.dataSource.key,i||f("ej.Model - DataManager is required to commit the changes"),this.state==="added")?i.insert(this.json,this.name).done(t.proxy(function(t){n.extend(this.json,t.record)},this)):this.state==="changed"?i.update(r,this.json,this.name):this.state==="deleted"?i.remove(r,this.json,this.name):void 0},markCommit:function(){this.isDirty=!1;this.changeState("unchanged",{from:"commit"})},markDelete:function(){this.changeState("deleted",{from:"delete"})},changeState:function(t,i){if(this.state!==t){if(this.state==="added")if(t==="deleted")t="unchanged";else return;var r=t;i=i||{};this.state=t;this._events.triggerHandler(n.extend({type:"stateChange",current:t,previous:r,model:this},i))}},properties:function(){if(this._props.length)return this._props;for(var n in this.json)this._props.push(n),this._updates[n]={read:[],input:[]};return this._props},bindTo:function(t){var e=n(t),r,i,o=e.find("[ej-observe], [ej-computed], [ej-prop]"),s=o.length,u,f;for(e.data("ejModel",this),u={fields:[],props:[],computes:[]},f=0;f<s;f++){if(r=o.eq(f),i=r.attr("ej-prop"),i&&this._processAttrib(i,r,u),i=r.attr("ej-observe"),i&&this._props.indexOf(i)!==-1){this._processField(r,i,u);continue}if(i=r.attr("ej-computed"),i){this._processComputed(i,r,u);continue}}e.data("ejModelBinding"+this.$id,u)},unbind:function(t){var u,r={props:this._attrEls,computes:this._computeEls},f=!1,i,c,e,s,h,o;t&&(r=n(t).removeData("ejModel").data("ejModelBinding"+this.$id)||r,f=!0);for(i in this.computed)u=r.computes[i],i=this.computed[i],u&&i.deps&&(this.off(i.deps.join(" "),u.handle),f&&delete this._computeEls[i]);f||(this._computeEls={});for(i in r.props)u=r.props[i],u&&(this.off(u.deps.join(" "),u.handle),delete r.props[i],f&&delete this._attrEls[i]);if(f||(this._attrEls={}),r.fields&&r.fields.length)for(c=r.fields.length,o=0;o<c;o++)e=r.fields[o],n(e).off("change",null,this._changeHandler),h=this.formElements.indexOf(e.tagName.toLowerCase())!==-1?"input":"read",s=this._updates[h].indexOf(e),s!==-1&&this._updates[h].splice(s,1)},_processComputed:function(n,t,i){if(n){var r,u,f=st(n),e=this.formElements.indexOf(t[0].tagName.toLowerCase())!==-1?"val":"html";this.computed[n]&&this.computed[f]||(this.computed[f]={value:new Function("var e = this; return "+n),deps:this._generateDeps(n)},n=f);r=this.computed[n];r.get||(r.get=function(){r.value.call(this.json)});u=r.deps;r=r.value;this._updateDeps(u);this._updateElement(t,e,r);r={el:t,handle:h(this._computeHandle,this,{value:n,type:e})};this._computeEls[n]=r;i.computes[n]=r;this.on(u.join(" "),r.handle)}},_computeHandle:function(n){var t=this._computeEls[n.value];t&&this.computed[n.value]&&this._updateElement(t.el,n.type,this.computed[n.value].value)},_updateElement:function(t,i,r){t[i](r.call(n.extend({},this.json,this.computed)))},_updateDeps:function(n){for(var i=0;i<n.length;i++)!(n[i]in this.json)&&n[i]in this.computed&&t.merge(n,this.computed[n[i]].deps)},_generateDeps:function(n){for(var r=n.replace(/(^e\.)|( e\.)/g,"#%^*##ej.#").split("#%^*#"),t,u=[],i=0;i<r.length;i++)r[i].startsWith("#ej.#")&&(t=r[i].replace("#ej.#","").split(" ")[0],t&&this._props.indexOf(t)!==-1&&u.push(t));return u},_processAttrib:function(n,t,i){var e,o,u={},r,f;for(n=n.replace(/^ +| +$/g,"").split(";"),r=0;r<n.length;r++)(n[r]=n[r].split(":"),n[r].length<2)||(e=n[r][0].replace(/^ +| +$/g,"").replace(/^'|^"|'$|"$/g,""),u[e]=n[r][1].replace(/^ +| +$/g,"").replace(/^'|^"|'$|"$/g,""));n=u;f=[];for(e in n)f.push(n[e]);this._updateDeps(f);this._updateProps(t,n);u=et("emak");o={el:t,handle:h(this._attrHandle,this,u),value:n,deps:f};t.prop("ejmodelattrkey",u);i.props[u]=o;this._attrEls[u]=o;this.on(f.join(" "),o.handle)},_attrHandle:function(n){var t=this._attrEls[n];t&&this._updateProps(t.el,t.value)},_updateProps:function(t,i){var f=this.json,r,u=this.computed;for(var e in i)r=i[e],r in f?r=f[r]:r in u&&(r=u[r],r&&(r=r.value.call(n.extend({},this.json,u)))),c(r)||t.prop(e,r)},_updateValues:function(n,t){var i=this._updates[n];i&&(i.read||i.input)&&(this._ensureItems(i.read,"html",t),this._ensureItems(i.input,"val",t))},_ensureItems:function(t,i,r){if(t)for(var u=t.length-1;u>-1;u--){if(!t[u].offsetParent){t.splice(u,1);continue}n(t[u])[i](r)}},_changeHandler:function(t){t.data.self.set(t.data.prop,n(this).val())},_processField:function(n,t,i){var u={self:this,prop:t},r=this.get(t);if(i.fields.push(n[0]),this.formElements.indexOf(n[0].tagName.toLowerCase())===-1)return n.html(r),this._updates[t].read.push(n[0]);n.val(r).off("change",null,this._changeHandler).on("change",null,u,this._changeHandler);return this._updates[t].input.push(n[0])},formElements:["input","select","textarea"]};var ot=/[^\w]+/g,st=function(n){return n.replace(ot,"_")},ht=function(n){this.setDirty(!0,n.model)};if(t.Predicate=function(n,i,r,u,f){if(!(this instanceof t.Predicate))return new t.Predicate(n,i,r,u,f);if(this.ignoreAccent=!1,typeof n=="string"){var e="";i.toLowerCase().indexOf(" any")!=-1?(i=i.replace(" any",""),e="any"):i.toLowerCase().indexOf(" all")!=-1&&(i=i.replace(" all",""),e="all");this.field=n;this.operator=i;this.value=r;this.ignoreCase=u;this.ignoreAccent=f;this.isComplex=!1;this.anyCondition=e;this._comparer=t.data.fnOperators.processOperator(e!=""?e:this.operator)}else(n instanceof t.Predicate&&r instanceof t.Predicate||r instanceof Array)&&(this.isComplex=!0,this.condition=i.toLowerCase(),this.predicates=[n],r instanceof Array?[].push.apply(this.predicates,r):this.predicates.push(r));return this},t.Predicate.and=function(){return y._combinePredicates([].slice.call(arguments,0),"and")},t.Predicate.or=function(){return y._combinePredicates([].slice.call(arguments,0),"or")},t.Predicate.fromJSON=function(n){var i,t,r;if(p(n,Array)){for(i=[],t=0,r=n.length;t<r;t++)i.push(y._fromJSON(n[t]));return i}return y._fromJSON(n)},y={_combinePredicates:function(n,i){if(!n.length)return r;if(n.length===1){if(!p(n[0],Array))return n[0];n=n[0]}return new t.Predicate(n[0],i,n.slice(1))},_combine:function(n,i,r,u,e,o,s){return i instanceof t.Predicate?t.Predicate[e](n,i):typeof i=="string"?t.Predicate[e](n,new t.Predicate(i,r,u,o,s)):f("Predicate - "+e+" : invalid arguments")},_fromJSON:function(n){var i;if(!n||p(n,t.Predicate))return n;var u=n.predicates||[],f=u.length,r=[];for(i=0;i<f;i++)r.push(y._fromJSON(u[i]));return n.isComplex?new t.Predicate(r[0],n.condition,r.slice(1)):new t.Predicate(n.field,n.operator,t.parseJSON({val:n.value}).val,n.ignoreCase,n.ignoreAccent)}},t.Predicate.prototype={and:function(n,t,i,r,u){return y._combine(this,n,t,i,"and",r,u)},or:function(n,t,i,r,u){return y._combine(this,n,t,i,"or",r,u)},validate:function(n){var f=this.predicates,r,u,i;if(!this.isComplex)return this._comparer.call(this,t.pvt.getObject(this.field,n),this.value,this.ignoreCase,this.ignoreAccent);for(r=this.condition==="and",i=0;i<f.length;i++)if(u=f[i].validate(n),r){if(!u)return!1}else if(u)return!0;return r},toJSON:function(){var t,i,n;if(this.isComplex)for(t=[],i=this.predicates,n=0;n<i.length;n++)t.push(i[n].toJSON());return{isComplex:this.isComplex,field:this.field,operator:this.operator,value:this.value,ignoreCase:this.ignoreCase,ignoreAccent:this.ignoreAccent,condition:this.condition,predicates:t,anyCondition:this.anyCondition}}},t.dataUtil={swap:function(n,t,i){if(t!=i){var r=n[t];n[t]=n[i];n[i]=r}},mergeSort:function(n,i,r){return r&&typeof r!="string"||(r=t.pvt.fnSort(r,!0)),typeof i=="function"&&(r=i,i=null),t.pvt.mergeSort(n,i,r)},max:function(n,i,r){return typeof i=="function"&&(r=i,i=null),t.pvt.getItemFromComparer(n,i,r||t.pvt.fnDescending)},min:function(n,i,r){return typeof i=="function"&&(r=i,i=null),t.pvt.getItemFromComparer(n,i,r||t.pvt.fnAscending)},distinct:function(n,t,i){for(var f=[],r,e={},u=0;u<n.length;u++)r=v(n,t,u),r in e||(f.push(i?n[u]:r),e[r]=1);return f},sum:function(n,t){for(var u=0,i,f=typeof v(n,t,0)!="number",r=0;r<n.length;r++)i=v(n,t,r),isNaN(i)||i===null||(f&&(i=+i),u+=i);return u},avg:function(n,i){return t.sum(n,i)/n.length},select:function(n,i){for(var u=[],r=0;r<n.length;r++)u.push(t.pvt.extractFields(n[r],i));return u},group:function(i,r,u,f,e,o){var p,a,c,h,k,l,b,y,s,w;if(e=e||1,i.GROUPGUID==t.pvt.consts.GROUPGUID){for(s=0;s<i.length;s++)t.isNullOrUndefined(o)?(i[s].items=t.group(i[s].items,r,u,f,i.level+1),i[s].count=i[s].items.length):(p=-1,w=n.grep(o,function(n){return n.key==i[s].key}),p=o.indexOf(w[0]),i[s].items=t.group(i[s].items,r,u,f,i.level+1,o[p].items),i[s].count=o[p].count);return i.childLevels+=1,i}for(a={},c=[],c.GROUPGUID=t.pvt.consts.GROUPGUID,c.level=e,c.childLevels=0,c.records=i,l=0;l<i.length;l++)h=v(i,r,l),t.isNullOrUndefined(f)||(h=f(h,r)),a[h]||(a[h]={key:h,count:0,items:[],aggregates:{},field:r},c.push(a[h]),t.isNullOrUndefined(o)||(k=n.grep(o,function(n){return n.key==a[h].key}),a[h].count=k[0].count)),a[h].count=t.isNullOrUndefined(o)?a[h].count+=1:a[h].count,a[h].items.push(i[l]);if(u&&u.length)for(l=0;l<c.length;l++){for(b={},s=0;s<u.length;s++)y=t.aggregates[u[s].type],t.isNullOrUndefined(o)?y&&(b[u[s].field+" - "+u[s].type]=y(c[l].items,u[s].field)):(w=n.grep(o,function(n){return n.key==c[l].key}),y&&(b[u[s].field+" - "+u[s].type]=y(w[0].items,u[s].field)));c[l].aggregates=b}return c},parseTable:function(i,r,u){var s=i.rows,h,v=[],y=[],f,c,l,a,e,o;if(!s.length)return[];u=u||0;switch((r||"").toLowerCase()){case t.headerOption.tHead:h=i.tHead.rows[u];break;case t.headerOption.row:default:h=i.rows[u]}for(c=h.cells,f=0;f<c.length;f++)v.push(n.trim(c[f].innerHTML));for(f=u+1;f<s.length;f++){for(l={},a=s[f].cells,e=0;e<a.length;e++)o=a[e].innerHTML,l[v[e]]=typeof o=="string"&&n.isNumeric(o)?Number(o):o;y.push(l)}return y}},t.headerOption={tHead:"thead",row:"row"},t.aggregates={sum:function(n,i){return t.sum(n,i)},average:function(n,i){return t.avg(n,i)},minimum:function(n,i){return t.getObject(i,t.min(n,i))},maximum:function(n,i){return t.getObject(i,t.max(n,i))},truecount:function(n,i){var r=t.Predicate(i,"equal",!0);return t.DataManager(n).executeLocal(t.Query().where(r)).length},falsecount:function(n,i){var r=t.Predicate(i,"equal",!1);return t.DataManager(n).executeLocal(t.Query().where(r)).length},count:function(n){return n.length}},t.pvt={filterQueries:a,mergeSort:function(n,i,r){if(n.length<=1)return n;var e=parseInt(n.length/2,10),u=n.slice(0,e),f=n.slice(e);return u=t.pvt.mergeSort(u,i,r),f=t.pvt.mergeSort(f,i,r),t.pvt.merge(u,f,i,r)},getItemFromComparer:function(n,i,r){var f,e,o,u=0,s=typeof v(n,i,0)=="string";if(n.length)while(t.isNullOrUndefined(f)&&u<n.length)f=v(n,i,u),o=n[u++];for(;u<n.length;u++)(e=v(n,i,u),t.isNullOrUndefined(e))||(s&&(f=+f,e=+e),r(f,e)>0&&(f=e,o=n[u]));return o},quickSelect:function(n,i,r,u,f,e){if(r==u)return n[r];var o=t.pvt.partition(n,i,r,u,e),s=o-r+1;return s==f?n[o]:f<s?t.pvt.quickSelect(n,i,r,o-1,f,e):t.pvt.quickSelect(n,i,o+1,u,f-s,e)},extractFields:function(n,i){var u={},r;if(i.length==1)return t.pvt.getObject(i[0],n);for(r=0;r<i.length;r++)u[i[r].replace(".",t.pvt.consts.complexPropertyMerge)]=t.pvt.getObject(i[r],n);return u},partition:function(n,i,r,u,f){var e=parseInt((r+u)/2,10),s=v(n,i,e),o;for(t.swap(n,e,u),e=r,o=r;o<u;o++)f(v(n,i,o),s)&&(t.swap(n,o,e),e++);return t.swap(n,e,u),e},fnSort:function(n){return(n=n?n.toLowerCase():t.sortOrder.Ascending,n==t.sortOrder.Ascending)?t.pvt.fnAscending:t.pvt.fnDescending},fnGetComparer:function(n,i){return function(r,u){return i(t.pvt.getObject(n,r),t.pvt.getObject(n,u))}},fnAscending:function(n,i){return t.isNullOrUndefined(i)&&t.isNullOrUndefined(n)?-1:i===null||i===r?-1:typeof n=="string"?n.localeCompare(i):n===null||n===r?1:n-i},fnDescending:function(n,i){return t.isNullOrUndefined(i)&&t.isNullOrUndefined(n)?-1:i===null||i===r?1:typeof n=="string"?n.localeCompare(i)*-1:n===null||n===r?-1:i-n},merge:function(n,t,i,r){for(var u=[],f;n.length>0||t.length>0;)f=n.length>0&&t.length>0?r?r(v(n,i,0),v(t,i,0))<=0?n:t:n[0][i]<n[0][i]?n:t:n.length>0?n:t,u.push(f.shift());return u},getObject:function(n,t){var i,f,u;if(!t)return r;if(!n)return t;if(n.indexOf(".")===-1)return t[n];for(i=t,f=n.split("."),u=0;u<f.length;u++){if(i==null)break;i=i[f[u]]}return i},createObject:function(n,t,i){for(var f=n.split("."),o=i||window,e=o,u=0;u<f.length;u++)u+1==f.length?e[f[u]]=t===r?{}:t:e[f[u]]==null&&(e[f[u]]={}),e=e[f[u]];return o},ignoreDiacritics:function(n){if(typeof n!="string")return n;var i=n.split(""),r=i.map(function(n){return n in t.data.diacritics?t.data.diacritics[n]:n});return r.join("")},getFieldList:function(n,i,u){if(u===r&&(u=""),i===r||i===null)return t.pvt.getFieldList(n,[],u);for(var f in n)typeof n[f]!="object"||n[f]instanceof Array?i.push(u+f):t.pvt.getFieldList(n[f],i,u+f+".");return i}},t.FilterOperators={lessThan:"lessthan",greaterThan:"greaterthan",lessThanOrEqual:"lessthanorequal",greaterThanOrEqual:"greaterthanorequal",equal:"equal",contains:"contains",startsWith:"startswith",endsWith:"endswith",notEqual:"notequal"},t.data={},t.data.operatorSymbols={"<":"lessthan",">":"greaterthan","<=":"lessthanorequal",">=":"greaterthanorequal","==":"equal","!=":"notequal","*=":"contains","$=":"endswith","^=":"startswith"},t.data.odBiOperator={"<":" lt ",">":" gt ","<=":" le ",">=":" ge ","==":" eq ","!=":" ne ",lessthan:" lt ",lessthanorequal:" le ",greaterthan:" gt ",greaterthanorequal:" ge ",equal:" eq ",notequal:" ne ","in":" eq ",notin:" ne "},t.data.odUniOperator={"$=":"endswith","^=":"startswith","*=":"substringof",endswith:"endswith",startswith:"startswith",contains:"substringof",notcontains:"substringof"},t.data.diacritics={"Ⓐ":"A","A":"A","À":"A","Á":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ā":"A","Ă":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ǡ":"A","Ä":"A","Ǟ":"A","Ả":"A","Å":"A","Ǻ":"A","Ǎ":"A","Ȁ":"A","Ȃ":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ą":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ǣ":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","Ⓑ":"B","B":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Ƃ":"B","Ɓ":"B","Ⓒ":"C","C":"C","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","Ç":"C","Ḉ":"C","Ƈ":"C","Ȼ":"C","Ꜿ":"C","Ⓓ":"D","D":"D","Ḋ":"D","Ď":"D","Ḍ":"D","Ḑ":"D","Ḓ":"D","Ḏ":"D","Đ":"D","Ƌ":"D","Ɗ":"D","Ɖ":"D","Ꝺ":"D","DZ":"DZ","DŽ":"DZ","Dz":"Dz","Dž":"Dz","Ⓔ":"E","E":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ē":"E","Ḕ":"E","Ḗ":"E","Ĕ":"E","Ė":"E","Ë":"E","Ẻ":"E","Ě":"E","Ȅ":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Ɛ":"E","Ǝ":"E","Ⓕ":"F","F":"F","Ḟ":"F","Ƒ":"F","Ꝼ":"F","Ⓖ":"G","G":"G","Ǵ":"G","Ĝ":"G","Ḡ":"G","Ğ":"G","Ġ":"G","Ǧ":"G","Ģ":"G","Ǥ":"G","Ɠ":"G","Ꞡ":"G","Ᵹ":"G","Ꝿ":"G","Ⓗ":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Ȟ":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","Ⱶ":"H","Ɥ":"H","Ⓘ":"I","I":"I","Ì":"I","Í":"I","Î":"I","Ĩ":"I","Ī":"I","Ĭ":"I","İ":"I","Ï":"I","Ḯ":"I","Ỉ":"I","Ǐ":"I","Ȉ":"I","Ȋ":"I","Ị":"I","Į":"I","Ḭ":"I","Ɨ":"I","Ⓙ":"J","J":"J","Ĵ":"J","Ɉ":"J","Ⓚ":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","Ꝁ":"K","Ꝃ":"K","Ꝅ":"K","Ꞣ":"K","Ⓛ":"L","L":"L","Ŀ":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ļ":"L","Ḽ":"L","Ḻ":"L","Ł":"L","Ƚ":"L","Ɫ":"L","Ⱡ":"L","Ꝉ":"L","Ꝇ":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","Ⓜ":"M","M":"M","Ḿ":"M","Ṁ":"M","Ṃ":"M","Ɱ":"M","Ɯ":"M","Ⓝ":"N","N":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Ņ":"N","Ṋ":"N","Ṉ":"N","Ƞ":"N","Ɲ":"N","Ꞑ":"N","Ꞥ":"N","NJ":"NJ","Nj":"Nj","Ⓞ":"O","O":"O","Ò":"O","Ó":"O","Ô":"O","Ồ":"O","Ố":"O","Ỗ":"O","Ổ":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","Ō":"O","Ṑ":"O","Ṓ":"O","Ŏ":"O","Ȯ":"O","Ȱ":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Ő":"O","Ǒ":"O","Ȍ":"O","Ȏ":"O","Ơ":"O","Ờ":"O","Ớ":"O","Ỡ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","Ɵ":"O","Ꝋ":"O","Ꝍ":"O","Ƣ":"OI","Ꝏ":"OO","Ȣ":"OU","Ⓟ":"P","P":"P","Ṕ":"P","Ṗ":"P","Ƥ":"P","Ᵽ":"P","Ꝑ":"P","Ꝓ":"P","Ꝕ":"P","Ⓠ":"Q","Q":"Q","Ꝗ":"Q","Ꝙ":"Q","Ɋ":"Q","Ⓡ":"R","R":"R","Ŕ":"R","Ṙ":"R","Ř":"R","Ȑ":"R","Ȓ":"R","Ṛ":"R","Ṝ":"R","Ŗ":"R","Ṟ":"R","Ɍ":"R","Ɽ":"R","Ꝛ":"R","Ꞧ":"R","Ꞃ":"R","Ⓢ":"S","S":"S","ẞ":"S","Ś":"S","Ṥ":"S","Ŝ":"S","Ṡ":"S","Š":"S","Ṧ":"S","Ṣ":"S","Ṩ":"S","Ș":"S","Ş":"S","Ȿ":"S","Ꞩ":"S","Ꞅ":"S","Ⓣ":"T","T":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Ț":"T","Ţ":"T","Ṱ":"T","Ṯ":"T","Ŧ":"T","Ƭ":"T","Ʈ":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","Ⓤ":"U","U":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ü":"U","Ǜ":"U","Ǘ":"U","Ǖ":"U","Ǚ":"U","Ủ":"U","Ů":"U","Ű":"U","Ǔ":"U","Ȕ":"U","Ȗ":"U","Ư":"U","Ừ":"U","Ứ":"U","Ữ":"U","Ử":"U","Ự":"U","Ụ":"U","Ṳ":"U","Ų":"U","Ṷ":"U","Ṵ":"U","Ʉ":"U","Ⓥ":"V","V":"V","Ṽ":"V","Ṿ":"V","Ʋ":"V","Ꝟ":"V","Ʌ":"V","Ꝡ":"VY","Ⓦ":"W","W":"W","Ẁ":"W","Ẃ":"W","Ŵ":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","Ⱳ":"W","Ⓧ":"X","X":"X","Ẋ":"X","Ẍ":"X","Ⓨ":"Y","Y":"Y","Ỳ":"Y","Ý":"Y","Ŷ":"Y","Ỹ":"Y","Ȳ":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","Ỵ":"Y","Ƴ":"Y","Ɏ":"Y","Ỿ":"Y","Ⓩ":"Z","Z":"Z","Ź":"Z","Ẑ":"Z","Ż":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","Ꝣ":"Z","ⓐ":"a","a":"a","ẚ":"a","à":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","ā":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","ǡ":"a","ä":"a","ǟ":"a","ả":"a","å":"a","ǻ":"a","ǎ":"a","ȁ":"a","ȃ":"a","ạ":"a","ậ":"a","ặ":"a","ḁ":"a","ą":"a","ⱥ":"a","ɐ":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","ǣ":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","ⓑ":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","ƀ":"b","ƃ":"b","ɓ":"b","ⓒ":"c","c":"c","ć":"c","ĉ":"c","ċ":"c","č":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","ⓓ":"d","d":"d","ḋ":"d","ď":"d","ḍ":"d","ḑ":"d","ḓ":"d","ḏ":"d","đ":"d","ƌ":"d","ɖ":"d","ɗ":"d","ꝺ":"d","dz":"dz","dž":"dz","ⓔ":"e","e":"e","è":"e","é":"e","ê":"e","ề":"e","ế":"e","ễ":"e","ể":"e","ẽ":"e","ē":"e","ḕ":"e","ḗ":"e","ĕ":"e","ė":"e","ë":"e","ẻ":"e","ě":"e","ȅ":"e","ȇ":"e","ẹ":"e","ệ":"e","ȩ":"e","ḝ":"e","ę":"e","ḙ":"e","ḛ":"e","ɇ":"e","ɛ":"e","ǝ":"e","ⓕ":"f","f":"f","ḟ":"f","ƒ":"f","ꝼ":"f","ⓖ":"g","g":"g","ǵ":"g","ĝ":"g","ḡ":"g","ğ":"g","ġ":"g","ǧ":"g","ģ":"g","ǥ":"g","ɠ":"g","ꞡ":"g","ᵹ":"g","ꝿ":"g","ⓗ":"h","h":"h","ĥ":"h","ḣ":"h","ḧ":"h","ȟ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","ɥ":"h","ƕ":"hv","ⓘ":"i","i":"i","ì":"i","í":"i","î":"i","ĩ":"i","ī":"i","ĭ":"i","ï":"i","ḯ":"i","ỉ":"i","ǐ":"i","ȉ":"i","ȋ":"i","ị":"i","į":"i","ḭ":"i","ɨ":"i","ı":"i","ⓙ":"j","j":"j","ĵ":"j","ǰ":"j","ɉ":"j","ⓚ":"k","k":"k","ḱ":"k","ǩ":"k","ḳ":"k","ķ":"k","ḵ":"k","ƙ":"k","ⱪ":"k","ꝁ":"k","ꝃ":"k","ꝅ":"k","ꞣ":"k","ⓛ":"l","l":"l","ŀ":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","ſ":"l","ł":"l","ƚ":"l","ɫ":"l","ⱡ":"l","ꝉ":"l","ꞁ":"l","ꝇ":"l","lj":"lj","ⓜ":"m","m":"m","ḿ":"m","ṁ":"m","ṃ":"m","ɱ":"m","ɯ":"m","ⓝ":"n","n":"n","ǹ":"n","ń":"n","ñ":"n","ṅ":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","ƞ":"n","ɲ":"n","ʼn":"n","ꞑ":"n","ꞥ":"n","nj":"nj","ⓞ":"o","o":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","ỗ":"o","ổ":"o","õ":"o","ṍ":"o","ȭ":"o","ṏ":"o","ō":"o","ṑ":"o","ṓ":"o","ŏ":"o","ȯ":"o","ȱ":"o","ö":"o","ȫ":"o","ỏ":"o","ő":"o","ǒ":"o","ȍ":"o","ȏ":"o","ơ":"o","ờ":"o","ớ":"o","ỡ":"o","ở":"o","ợ":"o","ọ":"o","ộ":"o","ǫ":"o","ǭ":"o","ø":"o","ǿ":"o","ɔ":"o","ꝋ":"o","ꝍ":"o","ɵ":"o","ƣ":"oi","ȣ":"ou","ꝏ":"oo","ⓟ":"p","p":"p","ṕ":"p","ṗ":"p","ƥ":"p","ᵽ":"p","ꝑ":"p","ꝓ":"p","ꝕ":"p","ⓠ":"q","q":"q","ɋ":"q","ꝗ":"q","ꝙ":"q","ⓡ":"r","r":"r","ŕ":"r","ṙ":"r","ř":"r","ȑ":"r","ȓ":"r","ṛ":"r","ṝ":"r","ŗ":"r","ṟ":"r","ɍ":"r","ɽ":"r","ꝛ":"r","ꞧ":"r","ꞃ":"r","ⓢ":"s","s":"s","ß":"s","ś":"s","ṥ":"s","ŝ":"s","ṡ":"s","š":"s","ṧ":"s","ṣ":"s","ṩ":"s","ș":"s","ş":"s","ȿ":"s","ꞩ":"s","ꞅ":"s","ẛ":"s","ⓣ":"t","t":"t","ṫ":"t","ẗ":"t","ť":"t","ṭ":"t","ț":"t","ţ":"t","ṱ":"t","ṯ":"t","ŧ":"t","ƭ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","ũ":"u","ṹ":"u","ū":"u","ṻ":"u","ŭ":"u","ü":"u","ǜ":"u","ǘ":"u","ǖ":"u","ǚ":"u","ủ":"u","ů":"u","ű":"u","ǔ":"u","ȕ":"u","ȗ":"u","ư":"u","ừ":"u","ứ":"u","ữ":"u","ử":"u","ự":"u","ụ":"u","ṳ":"u","ų":"u","ṷ":"u","ṵ":"u","ʉ":"u","ⓥ":"v","v":"v","ṽ":"v","ṿ":"v","ʋ":"v","ꝟ":"v","ʌ":"v","ꝡ":"vy","ⓦ":"w","w":"w","ẁ":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","ⱳ":"w","ⓧ":"x","x":"x","ẋ":"x","ẍ":"x","ⓨ":"y","y":"y","ỳ":"y","ý":"y","ŷ":"y","ỹ":"y","ȳ":"y","ẏ":"y","ÿ":"y","ỷ":"y","ẙ":"y","ỵ":"y","ƴ":"y","ɏ":"y","ỿ":"y","ⓩ":"z","z":"z","ź":"z","ẑ":"z","ż":"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ω":"ω","ς":"σ"},t.data.fnOperators={equal:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?s(n)==s(i):n==i},notequal:function(n,i,r,u){return u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),!t.data.fnOperators.equal(n,i,r)},notin:function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators.notequal(n,i[u],r)==!1)return!1;return!0},lessthan:function(n,t,i){return i?s(n)<s(t):n<t},greaterthan:function(n,t,i){return i?s(n)>s(t):n>t},lessthanorequal:function(n,t,i){return i?s(n)<=s(t):n<=t},greaterthanorequal:function(n,t,i){return i?s(n)>=s(t):n>=t},contains:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?!c(n)&&!c(i)&&s(n).indexOf(s(i))!=-1:!c(n)&&!c(i)&&n.toString().indexOf(i)!=-1},notcontains:function(n,i,r,u){return u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),!t.data.fnOperators.contains(n,i,r)},notnull:function(n){return n!==null},isnull:function(n){return n===null},startswith:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?n&&i&&s(n).startsWith(s(i)):n&&i&&n.startsWith(i)},endswith:function(n,i,r,u){return(u&&(n=t.pvt.ignoreDiacritics(n),i=t.pvt.ignoreDiacritics(i)),r)?n&&i&&s(n).endsWith(s(i)):n&&i&&n.endsWith(i)},all:function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators[this.operator](n,i[u],r)==!1)return!1;return!0},any:function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators[this.operator](n,i[u],r)==!0)return!0;return!1},processSymbols:function(n){var r=t.data.operatorSymbols[n],i;return r&&(i=t.data.fnOperators[r],i)?i:f("Query - Process Operator : Invalid operator")},processOperator:function(n){var i=t.data.fnOperators[n];return i?i:t.data.fnOperators.processSymbols(n)}},t.data.fnOperators["in"]=function(n,i,r){for(var u=0;u<i.length;u++)if(t.data.fnOperators.equal(n,i[u],r)==!0)return!0;return!1},t.NotifierArray=function(i){return p(this,t.NotifierArray)?(this.array=i,this._events=n({}),this._isDirty=!1,this):new t.NotifierArray(i)},t.NotifierArray.prototype={on:function(n,t){this._events.on(n,t)},off:function(n,t){this._events.off(n,t)},push:function(n){var t;return t=p(n,Array)?[].push.apply(this.array,n):this.array.push(n),this._raise("add",{item:n,index:this.length()-1}),t},pop:function(){var n=this.array.pop();return this._raise("remove",{item:n,index:this.length()-1}),n},addAt:function(n,t){return this.array.splice(n,0,t),this._raise("add",{item:t,index:n}),t},removeAt:function(n){var t=this.array.splice(n,1)[0];return this._raise("remove",{item:t,index:n}),t},remove:function(n){var t=this.array.indexOf(n);return t>-1&&(this.array.splice(t,1),this._raise("remove",{item:n,index:t})),t},length:function(){return this.array.length},_raise:function(t,i){this._events.triggerHandler(n.extend({type:t},i));this._events.triggerHandler({type:"all",name:t,args:i})},toArray:function(){return this.array}},n.extend(t,t.dataUtil),Array.prototype.forEach=Array.prototype.forEach||function(n,t){for(var i=0,r=this.length;i<r;++i)n.call(t,this[i],i,this)},Array.prototype.indexOf=Array.prototype.indexOf||function(n){var i=this.length,t;if(i===0)return-1;for(t=0;t<i;t++)if(t in this&&this[t]===n)return t;return-1},Array.prototype.filter=Array.prototype.filter||function(n){var i,u,t,r;if(typeof n!="function")throw new TypeError;for(i=[],u=arguments[1]||this,t=0;t<this.length;t++)r=this[t],n.call(u,r,t,this)&&i.push(r);return i},String.prototype.endsWith=String.prototype.endsWith||function(n){return this.slice(-n.length)===n},String.prototype.startsWith=String.prototype.startsWith||function(n){return this.slice(0,n.length)===n},t.support||(t.support={}),t.support.stableSort=function(){for(var t=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16].sort(function(){return 0}),n=0;n<17;n++)if(n!==t[n])return!1;return!0}(),t.support.cors=n.support.cors,!n.support.cors&&window.XDomainRequest){var ct=/^https?:\/\//i,lt=/^get|post$/i,at=new RegExp("^"+location.protocol,"i"),vt=/\/xml/i;n.ajaxTransport("text html xml json",function(n,t){if(n.crossDomain&&n.async&&lt.test(n.type)&&ct.test(t.url)&&at.test(t.url)){var i=null,u=(t.dataType||"").toLowerCase();return{send:function(f,e){i=new XDomainRequest;/^\d+$/.test(t.timeout)&&(i.timeout=t.timeout);i.ontimeout=function(){e(500,"timeout")};i.onload=function(){var o="Content-Length: "+i.responseText.length+"\r\nContent-Type: "+i.contentType,t={code:200,message:"success"},f={text:i.responseText},n;try{if(u==="json")try{f.json=JSON.parse(i.responseText)}catch(h){t.code=500;t.message="parseerror"}else if(u==="xml"||u!=="text"&&vt.test(i.contentType)){n=new ActiveXObject("Microsoft.XMLDOM");n.async=!1;try{n.loadXML(i.responseText)}catch(h){n=r}if(!n||!n.documentElement||n.getElementsByTagName("parsererror").length){t.code=500;t.message="parseerror";throw"Invalid XML: "+i.responseText;}f.xml=n}}catch(s){throw s;}finally{e(t.code,t.message,f,o)}};i.onerror=function(){e(500,"error",{text:i.responseText})};navigator.userAgent.indexOf("MSIE 9.0")!=-1&&(i.onprogress=function(){});i.open(n.type,n.url);i.send(t.data)},abort:function(){i&&i.abort()}}}})}n.support.cors=!0;t.sortOrder={Ascending:"ascending",Descending:"descending"};t.pvt.consts={GROUPGUID:"{271bbba0-1ee7}",complexPropertyMerge:"_"};d=function(n,t){t&&(n=h(n,t));(window.setImmediate||window.setTimeout)(n,0)};t.support.enableLocalizedSort=!1;var it=function(n,i,r,u){return t.support.stableSort?!t.support.enableLocalizedSort&&typeof t.pvt.getObject(i,n[0]||{})=="string"&&(r===t.pvt.fnAscending||r===t.pvt.fnDescending)&&u.filter(function(n){return n.fn==="onSortBy"}).length===1?yt(n,i,r===t.pvt.fnDescending):n.sort(t.pvt.fnGetComparer(i,r)):t.mergeSort(n,i,r)},b=function(i,r){for(var f=n.grep(r,function(n){return n.fn=="onGroup"}),u=0;u<f.length;u++)if(t.getObject("fieldName",f[u].e)==i)return t.getObject("fn",f[u].e)},yt=function(n,i,r){var u=Object.prototype.toString;Object.prototype.toString=i.indexOf(".")===-1?function(){return this[i]}:function(){return t.pvt.getObject(i,this)};n=n.sort();Object.prototype.toString=u;r&&n.reverse()},s=function(n){return n?n.toLowerCase?n.toLowerCase():n.toString().toLowerCase():n===0||n===!1?n.toString():""},v=function(n,i,r){return i?t.pvt.getObject(i,n[r]):n[r]},pt=function(n){return typeof HTMLElement=="object"?n instanceof HTMLElement:n&&n.nodeType===1&&typeof n=="object"&&typeof n.nodeName=="string"},p=function(n,t){return n instanceof t},rt=function(n,i,r,u){return function(f){return typeof f=="object"&&(u=f,f=null),new t.TableModel(f||n,i,r,u)}},ut=function(t){return function(i,r){var o,h,e,u,s;for(r=r||window.ko,r||f("Knockout is undefined"),h=[],s=0;s<t.length;s++){o={};for(e in t[s])e.startsWith("_")||(o[e]=r.observable(t[s][e]));for(e in i)u=i[e],n.isPlainObject(u)?(u.owner||(u.owner=o),u=r.computed(u)):u=r.computed(u,o),o[e]=u;h.push(o)}return r.observableArray(h)}},ft=0,et=function(n){return ft+=1,n+ft};t.getGuid=function(n){var i="0123456789abcdef",t;return(n||"")+"00000000-0000-4000-0000-000000000000".replace(/0/g,function(n,r){if("crypto"in window&&"getRandomValues"in crypto){var u=new Uint8Array(1);window.crypto.getRandomValues(u);t=u[0]%16|0}else t=Math.random()*16|0;return i[r===19?t&3|8:t]})};w=function(n,t){return function(){var i=[].slice.call(arguments,0);return i.push(this),n.apply(t||this,i)}};h=function(n,t,i){return"bind"in n?i?n.bind(t,i):n.bind(t):function(){var r=i?[i]:[];return r.push.apply(r,arguments),n.apply(t||this,r)}};t.merge=function(n,t){n&&t&&Array.prototype.push.apply(n,t)};c=function(n){return n===r||n===null};f=function(n){try{throw new Error(n);}catch(t){throw t.message+"\n"+t.stack;}}}(window.jQuery,window.Syncfusion,window.document),function(n,t){function k(){var n={},t=[],i={webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,msie:/(msie) ([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var r in i)if(i.hasOwnProperty(r)&&(t=navigator.userAgent.match(i[r]),t)){n.name=t[1].toLowerCase();n.version=t[2];!navigator.userAgent.match(/Trident\/7\./)||(n.name="msie");break}return n.isMSPointerEnabled=n.name=="msie"&&n.version>9&&window.navigator.msPointerEnabled,n.pointerEnabled=window.navigator.pointerEnabled,n}function a(t,i,r){var u=r.type;r.type=i;n.event.dispatch.call(t,r);r.type=u}function it(n,t){if(t)for(prop in t)prop in n||(n[prop]=t[prop])}function o(n){return n.originalEvent.touches?n.originalEvent.touches[0]:i?n.originalEvent:n}function d(n){var r=i?n.originalEvent.pointerType:n.originalEvent.touches?"touch":"mouse",u=i&&l==t?r==4?"mouse":"touch":r;return n.pointerType=u,n.type!="mousedown"&&n.type!="mouseup"&&it(n,n.originalEvent),u=="touch"&&(n.button=t),n}function s(t,i,r){var o,s,h,u={},e,f;return r&&(f=r.originalEvent.touches?[r.originalEvent.touches[0],t.originalEvent.changedTouches[0]]:[r.originalEvent,t.originalEvent],i._isSwipe||i._isdrag?(o=n.event.special.pinch._getdistance(f[0],f[1]),s=i.time,e={pageX:i.stopPoint.pageX,pageY:i.stopPoint.pageY}):i._isPinch&&(o=n.event.special.pinch.distance(t),s=t.timeStamp-r.timeStamp,h=i._pinchDistance),i._isDelta&&(u._dTime=t.timeStamp-r.timeStamp,u._x=f[1].pageX-f[0].pageX,u._y=f[1].pageY-f[0].pageY)),{options:t,delta:{time:u._dTime||null,X:u._x||null,Y:u._y||null},distance:o,scale:i._isPinch?h:null,time:s,velocity:{XY:o/u._dTime||null,X:u._x/u._dTime||null,Y:u._y/u._dTime||null},currentPosition:{pageX:e?e.pageX:null,pageY:e?e.pageY:null}}}function h(){var n=new Date;return n.getTime()}function v(n){i&&n.css("-ms-touch-action","pinch-zoom").css("touch-action","pinch-zoom")}var c=n(document);n.each("touchstart touchmove touchend tap doubletap taphold swipe swipeleft swiperight pinch pinchin pinchout pinchstop scrollstart scrollstop".split(" "),function(t,i){n.fn[i]=function(n){return n?this.on(i,n):this.trigger(i)};n.attrFn&&(n.attrFn[i]=!0)});var i=k().isMSPointerEnabled,l=k().pointerEnabled,y="ontouchstart"in window,rt="scroll",p=typeof orientation=="undefined",g=navigator.userAgent.match(/iPhone|iPad|iPod/i),u=i?l?"pointerdown":"MSPointerDown":y?"touchstart":"mousedown",f=i?l?"pointerup":"MSPointerUp":g?"touchend":y?"touchend":"mouseup",r=i?l?"pointermove":"MSPointerMove":y?"touchmove":"mousemove",w=i?l?"pointercancel":"MSPointerCancel":y?"touchcancel":"mouseleave",ut=i||!p?u:g?"touchstart":"touchstart mousedown",e=i||!p?f:"touchend mouseup",b=i||!p?r:"touchmove mousemove",nt=k(),tt=nt.name=="msie"&&nt.version=="9.0"?!0:!1;n.event.special.ejtouchmove={setup:function(){function s(){}function h(n){if(n.originalEvent&&!(n.which&&n.which!==1)){var f=n.target,u=n.originalEvent;i&&(t={x:u.x,y:u.y});o.on(r,l)}}function l(n){if(!(n.which&&n.which!==1)){var u=n.target,r=n.originalEvent;it(n,n.originalEvent);(!i||!t||Math.abs(t.x-r.x)>10||Math.abs(t.y-r.y)>10&&i)&&a(e,"ejtouchmove",n)}}var e=this,o=n(e),t;o.on(u,h);c.on(f,s);t={}}};n.event.special.swipeupdown={setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){function l(n){if(n.preventDefault(),e){var t=o(n);h={time:(new Date).getTime(),coords:[t.pageX,t.pageY]};Math.abs(e.coords[1]-h.coords[1])>10&&n.preventDefault()}}if(u.originalEvent){var a=u,c=o(u),e={time:(new Date).getTime(),coords:[c.pageX,c.pageY],origin:n(u.target)},h;i.on(r,l).one(f,function(u){if(i.off(r,l),e&&h&&h.time-e.time<1e3&&Math.abs(e.coords[1]-h.coords[1])>30&&Math.abs(e.coords[0]-h.coords[0])<75){var o={time:h.time-e.time,_isSwipe:!0,_isDelta:!0,stopPoint:h},f=s(u,o,a);e.origin.trigger(n.extend(!0,{type:"swipeupdown"},f)).trigger(n.extend(!0,{type:e.coords[1]>h.coords[1]?"swipeup":"swipedown"},f))}e=h=t})}})}};n.event.special.scrollstart={isEnabled:!0,setup:function(){function u(n,r){t=r;a(i,t?"scrollstart":"scrollstop",n)}var i=this,f=n(i),t,r;f.on(rt,function(i){n.event.special.scrollstart.isEnabled&&(t||u(i,!0),clearTimeout(r),r=setTimeout(function(){u(i,!1)},250))})}};n.event.special.tap={doubleTapThreshold:500,tapholdThreshold:650,canDoubleTap:function(t){return h()-t.doubleTapStartTime<=n.event.special.tap.doubleTapThreshold},setup:function(){var u=this,i=n(u),t=i.data(),r;v(i);t.isDoubleTapWait=!1;t.stopProcess=!1;t.preTouchend=null;t.preTouchstart=null;i.on(ut,function(f){function o(){clearTimeout(v);i.off(e,s);tt&&c.off(e,s);c.off(e,o);i.off(w,o);i.off(b,y);i.off("dragstart",it)}function y(n){var t=10,r=n.originalEvent.changedTouches?n.originalEvent.changedTouches[0]:n.originalEvent,u=f.originalEvent.changedTouches?f.originalEvent.changedTouches[0]:f.originalEvent;r.pageX-u.pageX<t&&r.pageX-u.pageX>-t&&r.pageY-u.pageY<t&&r.pageY-u.pageY>-t||(n.type=="mousemove"||n.type=="pointermove"&&n.originalEvent.pointerType=="mouse"||n.type=="MSPointerMove"&&n.originalEvent.pointerType==4?(clearTimeout(v),i.off(w,o),i.off(b,y)):o())}function s(i){var e,s;i.type=="touchend"&&(t.preTouchend=h());o();r!=i.target&&(i.type=="mouseup"||f.type=="pointerup"||"MSPointerUp")&&(e=i.target,jQuery.contains(r,e)?nt(i,r):jQuery.contains(e,r)||(s=n(r).parents().has(n(e)).first()[0],ej.isNullOrUndefined(s)||nt(i,s)));g===i.currentTarget&&(a(u,"tap",n.extend(d(i),{time:h()-t.startTime})),t.isDoubleTapWait&&n.event.special.tap.canDoubleTap(t)?(t.isDoubleTapWait=!1,a(u,"doubletap",n.extend(d(i),{time:h()-t.doubleTapStartTime}))):(t.isDoubleTapWait&&(t.isDoubleTapWait=!1,t.doubleTapStartTime=t.startTime),n.event.special.tap.canDoubleTap(t)&&(t.isDoubleTapWait=!0)))}function nt(n,t){n.target=t;n.toElement=t}function it(){o()}var g,l,v,p,k;if(f.originalEvent)if((f.type=="mousedown"||f.type=="pointerdown"||"MSPointerDown")&&(r=f.target),t=i.data(),t.startTime=h(),t.isDoubleTapWait||(t.doubleTapStartTime=t.startTime),f.type=="touchstart"&&(t.preTouchstart=t.startTime),t.stopProcess=f.type=="mousedown"&&(t.startTime-t.preTouchend<300||t.startTime-t.preTouchstart<30)?!0:!1,g=f.currentTarget,l=f.originalEvent,f.which&&f.which!==1||t.stopProcess)t.stopProcess&&(t.stopProcess=!1);else{i.on(e,s);c.on(e,o);if(tt)c.on(e,s);i.on(w,o);i.on(b,y);i.on("dragstart",it);p={};for(k in l)p[k]=l[k];v=setTimeout(function(){t.isDoubleTapWait&&(t.isDoubleTapWait=!1);a(u,"taphold",n.extend(d(f),{options:p,time:h()-t.startTime}))},n.event.special.tap.tapholdThreshold)}})}};n.event.special.swipe={scrollSupression:10,duration:1e3,horizontalDistance:30,verticalDistance:75,pointers:window.navigator.msPointerEnabled,startPoint:function(t){var i=o(t);return{time:(new Date).getTime(),Items:i,coords:[i.pageX,i.pageY],origin:n(t.target)}},stopPoint:function(n){var t=o(n);return{time:(new Date).getTime(),Items:t,coords:[t.pageX,t.pageY]}},handleSwipe:function(t,i,r,u){if((t.Items.pageY!=t.Items.clientY||i.Items.pageY!=i.Items.clientY)&&(n.event.special.swipe.horizontalDistance=130),i.time-t.time<n.event.special.swipe.duration&&Math.abs(t.coords[0]-i.coords[0])>n.event.special.swipe.horizontalDistance&&Math.abs(t.coords[1]-i.coords[1])<n.event.special.swipe.verticalDistance){var e={time:i.time-t.time,_isSwipe:!0,_isDelta:!0,stopPoint:i},f=s(r,e,u);t.origin.trigger(n.extend(!0,{type:"swipe"},f)).trigger(n.extend(!0,{type:t.coords[0]>i.coords[0]?"swipeleft":"swiperight"},f))}},setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){function s(t){e&&(o=n.event.special.swipe.stopPoint(t),Math.abs(e.coords[0]-o.coords[0])>n.event.special.swipe.scrollSupression&&t.preventDefault())}if(u.originalEvent){var e=n.event.special.swipe.startPoint(u),o,h=u;n(u.target).data("_dataTouchStart",{event:u,_now:(new Date).getTime()});i.on(r,s).one(f,function(u){i.off(r,s);e&&o&&n.event.special.swipe.handleSwipe(e,o,u,h);e=o=t})}})}};n.event.special.pinch={distance:function(t){return t.originalEvent.touches.length<2?null:n.event.special.pinch._getdistance(t.originalEvent.touches[0],t.originalEvent.touches[1])},_getdistance:function(n,t){return Math.sqrt((n.pageX-t.pageX)*(n.pageX-t.pageX)+(n.pageY-t.pageY)*(n.pageY-t.pageY))},setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){var h;if(u.originalEvent&&(h=u,u.originalEvent.touches&&u.originalEvent.touches.length>=2)){var o=n.event.special.pinch.distance(u),e,v=5,c=o,l,y=s(u,{_isPinch:!0,_pinchDistance:c},h);n(u.target).trigger(n.extend(!0,{type:"pinch"},y));function a(t){l=t;e=n.event.special.pinch.distance(t)||null;o&&e&&Math.abs(o-e)>v&&(n(t.target).trigger(n.extend(!0,{type:o>e?"pinchin":"pinchout"},s(t,{_isPinch:!0,_pinchDistance:c},h))),o=e)}i.on(r,a).one(f,function(){i.off(r,a);n(u.target).trigger(n.extend(!0,{type:"pinchstop"},s(l,{_isPinch:!0,_pinchDistance:e},h)));o=e=t})}})}};n.event.special.touchdrag={setup:function(){var e=this,i=n(e);v(i);i.on(u,function(u){function c(t){h&&(e=o(t),n.event.special.pinch._getdistance(h,e)>5&&n(t.target).trigger(n.extend(!0,{type:"touchdrag"},s(t,{_isdrag:!0,stopPoint:e,_isDelta:!0},l))))}if(u.originalEvent){var h=o(u),e,l=u;n(u.target).data("_dataTouchStart",{event:u,_now:(new Date).getTime()});i.on(r,c).one(f,function(){i.off(r,c);h=e=t})}})}};n.each({scrollstop:"scrollstart",doubletap:"tap",taphold:"tap",swipeleft:"swipe",swiperight:"swipe",swipedown:"swipeupdown",swipeup:"swipeupdown",pinchin:"pinch",pinchout:"pinch",pinchstop:"pinch"},function(t,i){n.event.special[t]={setup:function(){n(this).on(i,n.noop)}}})}(jQuery),function(n,t,i){t.widget("ejDraggable","ej.Draggable",{element:null,model:null,validTags:["div","span","a"],defaults:{scope:"default",handle:null,dragArea:null,clone:!1,distance:1,dragOnTaphold:!1,cursorAt:{top:-1,left:-2},dragStart:null,drag:null,dragStop:null,create:null,destroy:null,autoScroll:!1,scrollSensitivity:20,scrollSpeed:20,helper:function(){return n('<div class="e-drag-helper" />').html("draggable").appendTo(document.body)}},_init:function(){this.handler=function(){};this.resizables={};this._wireEvents();this._browser=t.browserInfo();this._isIE8=this._browser.name=="msie"&&this._browser.version=="8.0";this._isIE9=this._browser.name=="msie"&&this._browser.version=="9.0";this._browser.name=="msie"&&this.element.addClass("e-pinch");this._browser.name=="edge"&&this.element.css("touch-action","none")},_setModel:function(n){for(var t in n)switch(t){case"dragArea":this.model.dragArea=n[t];break;case"dragOnTaphold":this.model.dragOnTaphold=n[t];break;case"autoScroll":this.model.autoScroll=n[t]}},_destroy:function(){n(document).off(t.eventType.mouseUp,this._destroyHandler).off(t.eventType.mouseUp,this._dragStopHandler).off(t.eventType.mouseMove,this._dragStartHandler).off(t.eventType.mouseMove,this._dragHandler).off("mouseleave",this._dragMouseOutHandler).off("selectstart",!1);t.widgetBase.droppables[this.scope]=null},_initialize:function(i){var r,u;if(i.target&&i.target.nodeName&&n(i.target).closest("input[type='text'], input[type='checkbox'], textarea, select, option").length)return!0;r=i;i.preventDefault();i=this._getCoordinate(i);this.target=n(r.currentTarget);this._initPosition={x:i.pageX,y:i.pageY};n(document).on(t.eventType.mouseMove,this._dragStartHandler).on(t.eventType.mouseUp,this._destroyHandler);this.model.clone||(u=this.element.offset(),this._relXposition=i.pageX-u.left,this._relYposition=i.pageY-u.top);n(document.documentElement).trigger(t.eventType.mouseDown,r)},_setDragArea:function(){var o=n(this.model.dragArea)[0],s,h,u,r,f,e,i;if(o){if(r=["left","right","bottom","top"],t.isNullOrUndefined(o.getBoundingClientRect)){for(s=n(this.model.dragArea).outerWidth(),h=n(this.model.dragArea).outerHeight(),i=0;i<r.length;i++)this["border-"+r[i]+"-width"]=0,this["padding-"+r[i]]=0;f=e=0}else{for(u=o.getBoundingClientRect(),s=u.width?u.width:u.right-u.left,h=u.height?u.height:u.bottom-u.top,i=0;i<r.length;i++)this["border-"+r[i]+"-width"]=isNaN(parseFloat(n(n(this.model.dragArea)[0]).css("border-"+r[i]+"-width")))?0:parseFloat(n(n(this.model.dragArea)[0]).css("border-"+r[i]+"-width")),this["padding-"+r[i]]=isNaN(parseFloat(n(n(this.model.dragArea)[0]).css("padding-"+r[i])))?0:parseFloat(n(n(this.model.dragArea)[0]).css("padding-"+r[i]));f=n(this.model.dragArea).offset().top;e=n(this.model.dragArea).offset().left}this._left=t.isNullOrUndefined(n(this.model.dragArea).offset())?0+this["border-left-width"]+this["padding-left"]:e+this["border-left-width"]+this["padding-left"];this._top=t.isNullOrUndefined(n(this.model.dragArea).offset())?0+this["border-top-width"]+this["padding-top"]:f+this["border-top-width"]+this["padding-top"];this._right=e+s-[this["border-right-width"]+this["padding-right"]];this._bottom=f+h-[this["border-bottom-width"]+this["padding-bottom"]]}},_dragStart:function(r){var a,u,o,e,f,s,h;if(r.type=="touchmove"||r.type=="mousemove"&&(r.buttons!==i?r.buttons:r.which)==1||this._isIE8||this._isIE9){u=r;r=this._getCoordinate(r);this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0};this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.position=this._getMousePosition(u);var c=this._initPosition.x-r.pageX,l=this._initPosition.y-r.pageY,v=Math.sqrt(c*c+l*l);if(v>=this.model.distance){if(o=this.model.helper({sender:u,element:this.target}),!o||t.isNullOrUndefined(o))return;if(e=this.model.handle=this.helper=o,this.model.dragStart&&(f=null,u.type=="touchmove"?(s=u.originalEvent.changedTouches[0],f=document.elementFromPoint(s.clientX,s.clientY)):f=u.originalEvent.target||u.target,this.model.cursorAt.top==0&&this.model.cursorAt.left==0&&(f=this._checkTargetElement(r)||f),this._trigger("dragStart",{event:u,element:this.element,target:f,currentTarget:this._getCurrTarget(r)})))return this._destroy(),!1;if(this.model.dragArea?this._setDragArea():(this._left=this._top=this._right=this._bottom=0,this["border-top-width"]=this["border-left-width"]=0),!t.isNullOrUndefined(e)&&e.length>0){h=e.offsetParent().offset();n(document).off(t.eventType.mouseMove,this._dragStartHandler).off(t.eventType.mouseUp,this._destroyHandler).on(t.eventType.mouseMove,this._dragHandler).on(t.eventType.mouseUp,this._dragStopHandler).on("mouseleave",this._dragMouseOutHandler).on("selectstart",!1);t.widgetBase.droppables[this.model.scope]={draggable:this.element,helper:e.css({position:"absolute",left:this.position.left-h.left,top:this.position.top-h.top}),destroy:this._destroyHandler}}}}(this.model.autoScroll&&r.type=="touchmove"||r.type=="mousemove"&&(r.buttons!==i?r.buttons:r.which)==1||this._isIE8||this._isIE9)&&(a=this._getScrollParent(u.target))},_drag:function(i){var f,e,s,h,r,l,v,u,a,o,c;i.preventDefault();this.position=this._getMousePosition(i);this.position.top<0&&(this.position.top=0);n(document).height()<this.position.top&&(this.position.top=n(document).height());n(document).width()<this.position.left&&(this.position.left=n(document).width());o=t.widgetBase.droppables[this.model.scope].helper;this.model.drag&&(l=null,i.type=="touchmove"?(v=i.originalEvent.changedTouches[0],l=document.elementFromPoint(v.clientX,v.clientY)):l=i.originalEvent.target||i.target,this.model.cursorAt.top==0&&this.model.cursorAt.left==0&&(l=this._checkTargetElement(i)||l),u={event:i,element:this.target,target:l,currentTarget:this._getCurrTarget(i),position:{left:null,top:null}},this._trigger("drag",u));a=this._checkTargetElement(i);t.isNullOrUndefined(a)?this._hoverTarget&&(i.target=i.toElement=this._hoverTarget,this._hoverTarget.object._out(i),this._hoverTarget=null):(i.target=i.toElement=a,a.object._over(i),this._hoverTarget=a);o=t.widgetBase.droppables[this.model.scope].helper;c=o.offsetParent().offset();s=t.isNullOrUndefined(i.pageX)||i.pageX===0&&i.type=="touchmove"?i.originalEvent.changedTouches[0].pageX:i.pageX;h=t.isNullOrUndefined(i.pageY)||i.pageY===0&&i.type=="touchmove"?i.originalEvent.changedTouches[0].pageY:i.pageY;this.model.dragArea?(this._pageX!=s&&(f=this._left>this.position.left?this._left:this._right<this.position.left+o.outerWidth(!0)?this._right-o.outerWidth(!0):this.position.left),this._pageY!=h&&(e=this._top>this.position.top?this._top:this._bottom<this.position.top+o.outerHeight(!0)?this._bottom-o.outerHeight(!0):this.position.top)):(f=this.position.left,e=this.position.top);(e<0||e-[c.top+this["border-top-width"]]<0)&&(e=[c.top+this["border-top-width"]]);(f<0||f-[c.left+this["border-left-width"]]<0)&&(f=[c.left+this["border-left-width"]]);f=u&&u.position&&u.position.left?u.position.left:f;e=u&&u.position&&u.position.top?u.position.top:e;o.css({left:u&&u.position&&u.position.left?f:f-[c.left+this["border-left-width"]],top:u&&u.position&&u.position.top?e:e-[c.top+this["border-top-width"]]});this.position.left=f;this.position.top=e;this._pageX=s;this._pageY=h;this.model.autoScroll&&(r&&r!=document&&r.tagName!="HTML"?(n(r).offset().top+r.clientHeight-h<this.model.scrollSensitivity?r.scrollTop=r.scrollTop+this.model.scrollSpeed:h-n(r).offset().top<this.model.scrollSensitivity&&(r.scrollTop=r.scrollTop-this.model.scrollSpeed),n(r).offset().left+r.clientWidth-s<this.model.scrollSensitivity?r.scrollLeft=r.scrollLeft+this.model.scrollSpeed:s-n(r).offset().left<this.model.scrollSensitivity&&(r.scrollLeft=r.scrollLeft+this.model.scrollSpeed)):(h-n(document).scrollTop()<this.model.scrollSensitivity?n(document).scrollTop(n(document).scrollTop()-this.model.scrollSpeed):n(window).height()-(h-n(document).scrollTop())<this.model.scrollSensitivity&&n(document).scrollTop(n(document).scrollTop()+this.model.scrollSpeed),s-n(document).scrollLeft()<this.model.scrollSensitivity?n(document).scrollLeft(n(document).scrollLeft()-this.model.scrollSpeed):n(window).width()-(s-n(document).scrollLeft())<this.model.scrollSensitivity&&n(document).scrollLeft(n(document).scrollLeft()+this.model.scrollSpeed)))},_dragStop:function(n){var t,i;(n.type=="mouseup"||n.type=="touchend")&&this._destroy(n);this.model.dragStop&&(t=null,n.type=="touchend"?this.model.cursorAt.top==0&&this.model.cursorAt.left==0?t=n.originalEvent.target||n.target:(i=n.originalEvent.changedTouches[0],t=document.elementFromPoint(i.clientX,i.clientY)):t=n.originalEvent.target||n.target,this.model.cursorAt.top==0&&this.model.cursorAt.left==0&&(t=this._checkTargetElement(n)||t),this._trigger("dragStop",{event:n,element:this.target,target:t,currentTarget:this._getCurrTarget(n)}));this._dragEnd(n)},_dragEnd:function(n){var i=this._checkTargetElement(n);t.isNullOrUndefined(i)||(n.target=n.toElement=i,i.object._drop(n,this.element))},_dragMouseEnter:function(t){n(document).off("mouseenter",this._dragMouseEnterHandler);this._isIE9?this._dragManualStop(t):this._isIE8?t.button==0&&this._dragManualStop(t):t.buttons==0&&this._dragManualStop(t)},_dragManualStop:function(n){this.model.dragStop!=null&&this._trigger("dragStop",{event:n,element:this.target,target:n.originalEvent.target||n.target,currentTarget:this._getCurrTarget(n)});this._destroy(n)},_dragMouseOut:function(){n(document).on("mouseenter",this._dragMouseEnterHandler)},_checkTargetElement:function(n){var t,i;return(n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend"||n.type=="taphold"?(i=n.originalEvent.changedTouches[0],t=document.elementFromPoint(i.clientX,i.clientY)):t=n.target,this.helper&&this._contains(this.helper[0],t))?(this.helper.hide(),t=this._elementUnderCursor(n),this.helper.show(),this._withDropElement(t)):this._withDropElement(t)},_getCurrTarget:function(n){var i=n.originalEvent&&n.originalEvent.target||n.target,u,r;if(!t.isNullOrUndefined(i.style))return u=i.style.display,this.element.is(i)&&(i.style.display="none"),r=null,t.isNullOrUndefined(n.pageX)||t.isNullOrUndefined(n.pageY)||(r=document.elementFromPoint(n.pageX,n.pageY)),i.style.display=u,r},_withDropElement:function(i){if(i){var r=n(i).data("ejDroppable");if(t.isNullOrUndefined(r)&&(r=this._checkParentElement(n(i))),!t.isNullOrUndefined(r))return n.extend(i,{object:r})}},_checkParentElement:function(i){var u=n(i).closest(".e-droppable"),r;if(u.length>0&&(r=n(u).data("ejDroppable"),!t.isNullOrUndefined(r)))return r},_elementUnderCursor:function(n){return n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend"||n.type=="taphold"?document.elementFromPoint(n.originalEvent.changedTouches[0].clientX,n.originalEvent.changedTouches[0].clientY):document.elementFromPoint(n.clientX,n.clientY)},_contains:function(t,i){try{return n.contains(t,i)||t==i}catch(r){return!1}},_wireEvents:function(){t.isDevice()==!0&&this.model.dragOnTaphold==!0?this._on(this.element,"taphold",this._initialize):this._on(this.element,t.eventType.mouseDown,this._initialize);this._dragStartHandler=n.proxy(this._dragStart,this);this._destroyHandler=n.proxy(this._destroy,this);this._dragStopHandler=n.proxy(this._dragStop,this);this._dragHandler=n.proxy(this._drag,this);this._dragMouseEnterHandler=n.proxy(this._dragMouseEnter,this);this._dragMouseOutHandler=n.proxy(this._dragMouseOut,this)},_getMousePosition:function(n){n=this._getCoordinate(n);var t=this.model.clone?n.pageX:n.pageX-this._relXposition,i=this.model.clone?n.pageY:n.pageY-this._relYposition;return{left:t-[this.margins.left+this.model.cursorAt.left],top:i-[this.margins.top+this.model.cursorAt.top]}},_getCoordinate:function(n){var i=n;return(n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend"||n.type=="taphold"&&t.browserInfo().name!="msie")&&(i=n.originalEvent.changedTouches[0]),i},_getScrollParent:function(n){return n&&n.scrollHeight>n.clientHeight?n:n&&n.parentNode?this._getScrollParent(n.parentNode):void 0}})}(jQuery,Syncfusion),function(n,t){t.widget("ejDroppable","ej.Droppable",{element:null,model:null,validTags:["div","span","a"],dropElements:[],defaults:{accept:null,scope:"default",drop:null,over:null,out:null,create:null,destroy:null},_init:function(){this._mouseOver=!1;this.dropElements.push(this)},_setModel:function(){},_destroy:function(){n(this.element).off("mouseup",n.proxy(this._drop,this))},_over:function(n){this._mouseOver||(this._trigger("over",n),this._mouseOver=!0)},_out:function(n){this._mouseOver&&(this._trigger("out",n),this._mouseOver=!1)},_drop:function(t,i){var u=t.target,f=n(u).parents(".e-droppable"),r;for(n(u).hasClass("e-droppable")&&f.push(u),r=0;r<this.dropElements.length;r++)n(f).is(n(this.dropElements[r].element))&&this.dropElements[r]._dropEvent.call(this.dropElements[r],t,i)},_dropEvent:function(i,r){var u=t.widgetBase.droppables[this.model.scope],f=!t.isNullOrUndefined(u.helper)&&u.helper.is(":visible"),e;f&&i.type=="touchend"&&n(u.helper).hide();e=this._isDropArea(i);f&&i.type=="touchend"&&n(u.helper).show();u&&!t.isNullOrUndefined(this.model.drop)&&f&&e.canDrop&&this.model.drop(n.extend(i,{dropTarget:e.target,dragElement:r},!0),u)},_isDropArea:function(t){var i={canDrop:!0,target:n(t.target)},e,r,o,u,f;if(t.type=="touchend")for(e=t.originalEvent.changedTouches[0],r=document.elementFromPoint(e.clientX,e.clientY),i.canDrop=!1,o=n(r).parents(),u=0;u<this.element.length;u++){if(n(r).is(n(this.element[u])))i={canDrop:!0,target:n(r)};else for(f=0;f<o.length;f++)if(n(this.element[u]).is(n(o[f]))){i={canDrop:!0,target:n(r)};break}if(i.canDrop)break}return i}})}(jQuery,Syncfusion),function(n,t){t.widget("ejResizable","ej.resizable",{element:null,model:null,validTags:["div","span","a"],defaults:{scope:"default",handle:null,distance:1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,cursorAt:{top:1,left:1},resizeStart:null,resize:null,resizeStop:null,create:null,destroy:null,helper:function(){return n('<div class="e-resize-helper" />').html("resizable").appendTo(document.body)}},_init:function(){if(this.target=this.element,this._browser=t.browserInfo(),this._isIE8=this._browser.name=="msie"&&this._browser.version=="8.0",this._isIE9=this._browser.name=="msie"&&this._browser.version=="9.0",this.handle!=null)n(this.target).delegate(this.handle,t.eventType.mouseDown,n.proxy(this._mousedown,this)).delegate(this.handle,"resizestart",this._blockDefaultActions);else n(this.target).on(t.eventType.mouseDown,n.proxy(this._mousedown,this));this._resizeStartHandler=n.proxy(this._resizeStart,this);this._destroyHandler=n.proxy(this._destroy,this);this._resizeStopHandler=n.proxy(this._resizeStop,this);this._resizeHandler=n.proxy(this._resize,this);this._resizeMouseEnterHandler=n.proxy(this._resizeMouseEnter,this)},_mouseover:function(i){if(n(i.target).hasClass("e-resizable")){n(i.target).css({cursor:"se-resize"});n(this.target).on(t.eventType.mouseDown,n.proxy(this._mousedown,this))}else n(this.target).off(t.eventType.mouseDown),n(this.target).css({cursor:""})},_blockDefaultActions:function(n){n.cancelBubble=!0;n.returnValue=!1;n.preventDefault&&n.preventDefault();n.stopPropagation&&n.stopPropagation()},_setModel:function(){},_mousedown:function(i){var r=i;i=this._getCoordinate(i);this.target=n(r.currentTarget);this._initPosition={x:i.pageX,y:i.pageY};this._pageX=i.pageX;this._pageY=i.pageY;n(document).on(t.eventType.mouseMove,this._resizeStartHandler).on(t.eventType.mouseUp,this._destroyHandler);return n(document.documentElement).trigger(t.eventType.mouseDown,r),!1},_resizeStart:function(i){var r,h;if(n(i.target).hasClass("e-resizable")){i=this._getCoordinate(i);var u=this._initPosition.x-i.pageX,f=this._initPosition.y-i.pageY,e,o,s=Math.sqrt(u*u+f*f);if(s>=this.model.distance){if(this.model.resizeStart!=null&&this._trigger("resizeStart",{event:i,element:this.target}))return;r=this.model.helper({element:this.target});e=i.pageX-this._pageX+r.outerWidth();o=i.pageY-this._pageY+r.outerHeight();this._pageX=i.pageX;this._pageY=i.pageY;h=this.getElementPosition(r);n(document).off(t.eventType.mouseMove,this._resizeStartHandler).off(t.eventType.mouseUp,this._destroyHandler).on(t.eventType.mouseMove,this._resizeHandler).on(t.eventType.mouseUp,this._resizeStopHandler).on("mouseenter",this._resizeMouseEnterHandler).on("selectstart",!1);t.widgetBase.resizables[this.scope]={resizable:this.target,helper:r.css({width:e,height:o}),destroy:this._destroyHandler}}}},_resize:function(n){var i,r,u,e,f;n=this._getCoordinate(n);e=this.getElementPosition(t.widgetBase.resizables[this.scope].helper);f=this.model.helper({element:this.target});i=n.pageX-this._pageX+f.outerWidth();r=n.pageY-this._pageY+f.outerHeight();this._pageX=n.pageX;this._pageY=n.pageY;i<this.model.minWidth&&(u=this.model.minWidth-i,i=this.model.minWidth,this._pageX=n.pageX+u);r<this.model.minHeight&&(u=this.model.minHeight-r,r=this.model.minHeight,this._pageY=n.pageY+u);this.model.maxHeight!=null&&r>this.model.maxHeight&&(u=r-this.model.maxHeight,r=this.model.maxHeight,this._pageY=n.pageY-u);this.model.maxWidth!=null&&i>this.model.maxWidth&&(u=i-this.model.maxWidth,i=this.model.maxWidth,this._pageX=n.pageX-u);t.widgetBase.resizables[this.scope].helper.css({width:i,height:r});this._trigger("resize",{element:this.target})},_resizeStop:function(n){this.model.resizeStop!=null&&this._trigger("resizeStop",{element:this.target});(n.type=="mouseup"||n.type=="touchend")&&this._destroy(n)},_resizeMouseEnter:function(n){this._isIE9?this._resizeManualStop(n):this._isIE8?n.button==0&&this._resizeManualStop(n):n.buttons==0&&this._resizeManualStop(n)},_resizeManualStop:function(n){this.model.resizeStop!=null&&this._trigger("resizeStop",{element:this.target});this._destroy(n)},_destroy:function(){n(document).off(t.eventType.mouseUp,this._destroyHandler).off(t.eventType.mouseUp,this._resizeStopHandler).off(t.eventType.mouseMove,this._resizeStartHandler).off(t.eventType.mouseMove,this._resizeHandler).off("mouseenter",this._resizeMouseEnterHandler).off("selectstart",!1);t.widgetBase.resizables[this.scope]=null},getElementPosition:function(n){return n!=null&&n.length>0?{left:n[0].offsetLeft,top:n[0].offsetTop}:null},_getCoordinate:function(n){var t=n;return(n.type=="touchmove"||n.type=="touchstart"||n.type=="touchend")&&(t=n.originalEvent.changedTouches[0]),t}})}(jQuery,Syncfusion),function(n,t,i,r){"use strict";t.widget("ejScrollBar","ej.ScrollBar",{defaults:{orientation:"horizontal",viewportSize:0,height:18,width:18,smallChange:57,largeChange:57,value:0,maximum:0,minimum:0,buttonSize:18,infiniteScrolling:!1},validTags:["div"],type:"transclude",dataTypes:{buttonSize:"number",smallChange:"number",largeChange:"number"},observables:["value"],value:t.util.valueFunction("value"),_enabled:!0,content:function(){return this._content&&this._content.length||(this._content=this.model.orientation==="horizontal"?this.element.find(".e-hhandle"):this.element.find(".e-vhandle")),this._content},_init:function(){this.element.addClass("e-widget");this._ensureScrollers();this.content();this._setInitialValues()},_setInitialValues:function(){var n="X";this.model.orientation===t.ScrollBar.Orientation.Horizontal?this.element.addClass("e-hscrollbar"):(this.element.addClass("e-vscrollbar"),n="Y");(this.value()!==0||this.model.minimum!==0)&&(this.value()<this.model.minimum&&this.value(this.model.minimum),this.scroll(this.value(),"none"))},_ensureScrollers:function(){var t=n.fn.jquery;this.model.height&&this.element.height(this.model.height);this.model.width&&this.element.width(this.model.width);this._scrollData||(this._scrollData=this.model.orientation==="vertical"?this._createScroller("Height","Y","Top","e-v"):this._createScroller("Width","X","Left","e-h"))},_setModel:function(n){for(var t in n)if(t==="value")this.value()&&this.scroll(this.value(),"none");else{this.refresh();break}},_createScroller:function(t,i,r,u){var f={},o=n.fn.jquery,e;return f.dimension=t,f.xy=i,f.position=r,f.css=u,f.uDimension=t,this._calculateLayout(f),this._createLayout(f),e=this[f.main].find(".e-button"),this._off(e,"mousedown")._on(e,"mousedown",{d:f,step:1},this._spaceMouseDown),this._off(this[f.scroll],"mousedown")._on(this[f.scroll],"mousedown",{d:f},this._spaceMouseDown),this._off(this[f.handler],"mousedown touchstart")._on(this[f.handler],"mousedown touchstart",{d:f},this._mouseDown),f},_createLayout:function(i){var r="<div class='"+i.css+"{0}' style='"+i.dimension+":{1}px'>{2}<\/div>",u=n.fn.jquery,f={},o,e;f[i.dimension]=i.modelDim;e=t.buildTag("div."+i.css+"scroll e-box",String.format(r,"up e-chevron-up_01 e-icon e-box e-button",i.buttonSize)+String.format(r,"handlespace",i.handleSpace,String.format(r,"handle e-box e-pinch",i.handle))+String.format(r,"down e-chevron-down_01 e-icon e-box e-button",i.buttonSize),f);this.element.append(e);this.element.find(".e-vhandle").addClass("e-v-line e-icon");this.element.find(".e-hhandle").addClass("e-h-line e-icon");o=u==="1.7.1"||u==="1.7.2"?i.uDimension.toLowerCase():"outer"+i.uDimension;this[i.handler]=this.element.find("."+i.handler);this[i.handler].css("transition","none");this[i.scroll]=this[i.handler].parent();this[i.main]=this[i.scroll].parent();this[i.main].find(".e-button")["outer"+i.uDimension](i.buttonSize)},_calculateLayout:function(n){var i,u;n.scrollDim="scroll"+n.dimension;n.lPosition=n.position.toLowerCase();n.clientXy="page"+n.xy;n.scrollVal="scroll"+n.position;n.scrollOneStepBy=this.model.smallChange;n.modelDim=this.model[n.dimension=n.dimension.toLowerCase()];n.handler=n.css+"handle";n.buttonSize=this.model.buttonSize;n.main=n.css+"scroll";n.scroll=n.css+"ScrollSpace";n.handleSpace=n.modelDim-2*n.buttonSize;n.scrollable=this.model.maximum-this.model.minimum;i=this.model.height;this.model.orientation==="horizontal"&&(i=this.model.width);n.handle=this.model.viewportSize/(this.model.maximum-this.model.minimum+this.model.viewportSize)*(i-2*this.model.buttonSize);u=!t.isNullOrUndefined(this.model.elementHeight)&&typeof this.model.elementHeight=="string"&&this.model.elementHeight.indexOf("%")!=-1?!0:!1;n.handle<20&&!u&&(n.handle=20);n.onePx=n.scrollable/(n.handleSpace-n.handle);n.fromScroller=!1;n.up=!0;n.vInterval=r},_updateLayout:function(n){this.element.height(this.model.height);this.element.width(this.model.width);var t=this.element.find("."+n.css+"handle"),f=this.element.find("."+n.css+"handlespace"),u=n.dimension=="width"?t.css("left"):t.css("top"),i=n.dimension=="width"?f.outerWidth():f.outerHeight();u!==r&&u!=="auto"&&(i>=n.handle+parseFloat(u)||(this.model.enableRTL?t.css(n.dimension==="width"?"left":"top",parseFloat(i)-n.handle):t.css(n.dimension==="width"?"left":"top",parseFloat(i)-n.handle>0?parseFloat(i)-n.handle:0)));this.element.find("."+n.css+"scroll").css(n.dimension,n.modelDim+"px").find(".e-button").css(n.dimension,this.model.buttonSize).end().find("."+n.css+"handlespace").css(n.dimension,n.handleSpace+"px").find("."+n.css+"handle").css(n.dimension,n.handle+"px")},refresh:function(){this._ensureScrollers();this.value()&&this.scroll(this.value(),"none");this._scrollData&&(this._calculateLayout(this._scrollData),this._updateLayout(this._scrollData))},scroll:function(n,i,r,u){var o=this._scrollData,f,e;if(!r)if(this.model.orientation===t.ScrollBar.Orientation.Horizontal){if(this._trigger("scroll",{source:i||"custom",scrollData:this._scrollData,scrollLeft:n,originalEvent:u}))return}else if(this._trigger("scroll",{source:i||"custom",scrollData:this._scrollData,scrollTop:n,originalEvent:u}))return;this._scrollData&&(this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name!="msie"?this.value(-o.scrollable+n):this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name=="msie"?this.value(-1*n):this.value(n),this.content().length>0&&(this.model.orientation===t.ScrollBar.Orientation.Horizontal?(f=this.element.find(".e-hhandlespace").width()-this.element.find(".e-hhandle").outerWidth(),n=f<(n-this.model.minimum)/this._scrollData.onePx?f:(n-this.model.minimum)/this._scrollData.onePx,this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name!="msie"&&(n=f-n,n>0?n=n*-1:n),this._scrollData.enableRTL&&(u=="mousemove"||u=="touchmove")&&t.browserInfo().name=="msie"&&(n=-n),this._scrollData.enableRTL&&n>0&&!this._scrollData._scrollleftflag?n=0:n,this._scrollData._scrollleftflag&&(n>0?n=n*-1:n,this.value(n)),this.content()[0].style.left=n+"px",this._scrollData._scrollleftflag=!1):(e=this.element.find(".e-vhandlespace").height()-this.element.find(".e-vhandle").outerHeight(),n=e<(n-this.model.minimum)/this._scrollData.onePx?e:(n-this.model.minimum)/this._scrollData.onePx,t.browserInfo().name=="msie"&&isNaN(n)&&(n=""),this.content()[0].style.top=n+"px")))},_changeTop:function(n,t,i){var u,r;return u=n.dimension==="height"?this.value():this.value(),r=u+t,n.step=t,n.enableRTL&&t<0||t>0&&!n.enableRTL?n.enableRTL?r<this.model.maximum*-1&&(r=this.model.maximum*-1):r>this.model.maximum&&(r=this.model.maximum):n.enableRTL?r>this.model.minimum&&(r=this.model.minimum):r<this.model.minimum&&(r=this.model.minimum),(r!==u||this.model.infiniteScrolling)&&this.scroll(r,i),r!==u},_mouseUp:function(i){if(i.data){var r=i.data.d;clearInterval(r.vInterval);i.type=="touchend"&&n(i.target).removeClass("e-touch");i.type!=="mouseup"&&i.type!=="touchend"&&(i.toElement||i.relatedTarget||i.target)||(this._prevY=this._d=this._data=null,this._off(n(document),"mousemove touchmove",this._mouseMove),n(document).off("mouseup touchend",t.proxy(this._mouseUp,this)),r.fromScroller=!1,this[r.scroll].off("mousemove"),this[r.handler].off("mousemove").css("transition",""),i.data.source!=="thumb"||t.isNullOrUndefined(this.model)||n.when(this.content()).done(t.proxy(function(){this._trigger("thumbEnd",{originalEvent:i,scrollData:r})},this)));r.up=!0}},_mouseDown:function(i){if(this._enabled){this._d=i;this._data=this._d.data.d;this._data.target=this._d.target;this._data.fromScroller=!0;this[this._data.handler].css("transition","none");this._on(n(document),"mousemove touchmove",{d:this._data,source:"thumb"},this._mouseMove);this._trigger("thumbStart",{originalEvent:this._d,scrollData:this._data});n(document).one("mouseup touchend",{d:this._data,source:"thumb"},t.proxy(this._mouseUp,this));i.type=="touchstart"&&n(i.target).addClass("e-touch")}},_mouseCall:function(n){n.type="mouseup";this._mouseUp(n)},_mouseMove:function(i){var u,f=0,r=parseInt(this[this._data.handler].css(this._data.lPosition))||0,o,e;if(i.preventDefault(),o=1,t.isNullOrUndefined(i.target.tagName)){if(n(i.target).is(document)){this._mouseCall(i);return}}else if(i.target.tagName.toLowerCase()==="iframe"){this._mouseCall(i);return}e=i.type=="mousemove"?i[this._data.clientXy]:i.originalEvent.changedTouches[0][this._data.clientXy];this._prevY&&e!==this._prevY&&(f=e-this._prevY,this.model.infiniteScrolling?(r=r+f,this._data.step=f,(this._data.enableRTL?r>0:r<0)&&(r=0),r*(this._data.enableRTL?-1:1)+this._data.handle>=this._data.handleSpace&&(r=(this._data.handleSpace-this._data.handle)*(this._data.enableRTL?-1:1)),u=Math.ceil(r*this._data.onePx),this.scroll(u,"thumb")):(u=f*this._data.onePx,this._changeTop(this._data,u,"thumb",this._d)),this._trigger("thumbMove",{originalEvent:i,direction:this._data.step>0?1:-1,scrollData:this._data}));o===1&&(this._prevY=e)},_spaceMouseDown:function(r){var u,o,f,e;if(r.data&&this._enabled&&(u=r.data.d,o=this[u.handler][0].getBoundingClientRect(),r.which===1&&r.target!==this[u.handler][0])){f=r.data.step?this.model.smallChange:this.model.largeChange;e=r.data.top||o[u.lPosition];r[u.clientXy]=r[u.clientXy]||0;r[u.clientXy]-i.scrollY<e&&(f*=-1);u.target=r.target;this._changeTop(u,f,f===3?"track":"button",r);r.data.step!==1&&this[u.scroll].mousemove(function(){u.up=!0});u.up=!1;u.vInterval=setInterval(t.proxy(function(){if((f<0?e+f/u.onePx<r[u.clientXy]:e+u.handle+f/u.onePx>r[u.clientXy])&&(u.up=!0),u.up){clearInterval(u.vInterval);return}this._changeTop(u,f,f===3?"track":"button",r);e=r.data?r.data.top||o[u.lPosition]:o[u.lPosition]},this),150);n(document).one("mouseup",{d:u},t.proxy(this._mouseUp,this));n(document).mouseout({d:u},t.proxy(this._mouseUp,this))}},_remove:function(){this.model.orientation===t.ScrollBar.Orientation.Horizontal&&this.element.find(".e-hscroll").remove();this.model.orientation===t.ScrollBar.Orientation.Vertical&&this.element.find(".e-vscroll").remove();this._scrollData=null;this._content=null},_destroy:function(){this.element.remove()}});t.ScrollBar.Orientation={Horizontal:"horizontal",Vertical:"vertical"}}(jQuery,Syncfusion,window),function(n,t,i,r){"use strict";t.widget("ejScroller","ej.Scroller",{_addToPersist:["scrollLeft","scrollTop"],defaults:{height:250,autoHide:!1,animationSpeed:600,width:0,scrollOneStepBy:57,buttonSize:18,scrollLeft:0,scrollTop:0,targetPane:null,scrollerSize:18,enablePersistence:!1,enableRTL:r,enableTouchScroll:!0,preventDefault:!1,enabled:!0,create:null,destroy:null,wheelStart:null,wheelMove:null,wheelStop:null},validTags:["div"],type:"transclude",dataTypes:{buttonSize:"number",scrollOneStepBy:"number"},observables:["scrollTop","scrollLeft"],scrollTop:t.util.valueFunction("scrollTop"),scrollLeft:t.util.valueFunction("scrollLeft"),keyConfigs:{up:"38",down:"40",left:"37",right:"39",pageUp:"33",pageDown:"34",pageLeft:"ctrl+37",pageRight:"ctrl+39"},content:function(){return!this._contentOffsetParent&&this._content&&this._content[0]&&(this._contentOffsetParent=this._content[0].offsetParent),this._content&&this._content.length&&this._contentOffsetParent||(this._content=this.element.children().first().addClass("e-content")),this._content},_setFirst:!0,_updateScroll:!1,_init:function(){t.isNullOrUndefined(this.content()[0])||(this._isJquery3=parseInt(n.fn.jquery)>=3?!0:!1,this._tempWidth=this.model.width,this._prevScrollWidth=this.content()[0].scrollWidth,this._prevScrollHeight=this.content()[0].scrollHeight,this.element.addClass("e-widget"),this.content(),this._browser=t.browserInfo().name,this._wheelStart=!0,this._eleHeight=this.model.height,this._eleWidth=this.model.width,this._isNativeScroll=t.isDevice(),this.model.targetPane!=null&&this.content().find(this.model.targetPane).addClass("e-target-pane"),this.model.enableRTL===r&&(this.model.enableRTL=this.element.css("direction")==="rtl"),this.model.autoHide&&this._on(this.element,"mousedown",this._mouseDownInitContent),this._ensureScrollers(),this.model.enableRTL&&(this.element.addClass("e-rtl"),this._rtlScrollLeftValue=this.content().scrollLeft()),this._isNativeScroll&&this.element.addClass("e-native-scroll"),this._on(this.content(),"scroll",this._scroll),this.model.targetPane!=null&&this._on(this.content().find(this.model.targetPane),"scroll",this._scroll),this.scrollLeft()&&this._setScrollLeftValue(this.scrollLeft()),this.scrollTop()&&this.scrollTop(this._isJquery3?Math.ceil(this.scrollTop()):this.scrollTop()),this.content().scrollTop(this.scrollTop()),this.model.autoHide&&this._autohide(),this.model.enabled?this.enable():this.disable(),this._setDimension(),(this._prevScrollWidth!==this.content()[0].scrollWidth||this._prevScrollHeight!==this.content()[0].scrollHeight)&&this.refresh());this._addActionClass();this._isNativeScroll&&this._on(this.content(),"scrollstop",this._touchDown)},_mouseDownInitContent:function(){this.model.autoHide&&this._on(n(document),"mouseup",this._mouseUpContent);this.element.addClass("e-scroll-focus")},_addActionClass:function(){this._browser=="msie"&&(this.content().removeClass("e-pinch e-pan-x e-pan-y"),this._vScrollbar&&this._hScrollbar?this.content().addClass("e-pinch"):this._vScrollbar&&!this._hScrollbar?this.content().addClass("e-pan-x"):this._hScrollbar&&!this._vScrollbar&&this.content().addClass("e-pan-y"))},_setDimension:function(){t.isNullOrUndefined(this.model.height)||typeof this.model.height!="string"||this.model.height.indexOf("%")==-1||(this._vScroll||this._hScroll?this.model.height=this._convertPercentageToPixel(parseInt(this._eleHeight),this.element.parent().height()):n(this.content()[0]).height(""));t.isNullOrUndefined(this.model.width)||typeof this.model.width!="string"||this.model.width.indexOf("%")==-1||(this._hScroll||this._vScroll?this.model.width=this._convertPercentageToPixel(parseInt(this._eleWidth),this.element.parent().width()):n(this.content()[0]).width(""))},_setScrollLeftValue:function(n){this.model.enableRTL&&(n=t.browserInfo().name=="mozilla"?n<0?n:n*-1:!t.isNullOrUndefined(this._rtlScrollLeftValue)&&(t.browserInfo().name=="chrome"||this._rtlScrollLeftValue>0)?n<0?this._rtlScrollLeftValue+n:this._rtlScrollLeftValue-n:Math.abs(n));this.content().scrollLeft(n)},_ensureScrollers:function(){var u=n.fn.jquery,f;if(this.model.height=typeof this.model.height=="string"&&this.model.height.indexOf("px")!=-1?parseInt(this.model.height):this.model.height,this.model.width=typeof this.model.width=="string"&&this.model.width.indexOf("px")!=-1?parseInt(this.model.width):this.model.width,this.model.height&&this.element.height(this.model.height),this.model.width&&this.element.width(this.model.width),this._off(this.content(),"mousedown touchstart"),this.content().length>0){if(this.isVScroll()?(this._tempVscrollbar||(this._vScrollbar=this._createScrollbar(t.ScrollBar.Orientation.Vertical,this.isHScroll()),this._tempVscrollbar=this._vScrollbar),this.model.enableTouchScroll&&this._on(this.content(),"mousedown touchstart",{d:this._vScrollbar._scrollData},this._mouseDownOnContent)):(this._vScrollbar=null,this._tempVscrollbar=this._vScrollbar,this.element.children(".e-vscrollbar").remove()),this.isHScroll()?(this._tempHscrollbar||(this._hScrollbar=this._createScrollbar(t.ScrollBar.Orientation.Horizontal,this.isVScroll()),this._tempHscrollbar=this._hScrollbar),this.model.enableTouchScroll&&this._on(this.content(),"mousedown touchstart",{d:this._hScrollbar._scrollData},this._mouseDownOnContent)):(this._hScrollbar=null,this._tempHscrollbar=this._hScrollbar,this.element.children(".e-hscrollbar").remove()),this._vScrollbar||this._hScrollbar||this.content().css({width:"auto",height:"auto"}),this.element.find(".e-hscroll").length>0||this._vScrollbar&&this.content().outerHeight(this.content().outerHeight()-1),u==="1.7.1"||u==="1.7.2"?(this._contentHeight="height",this._contentWidth="width"):(this._contentHeight="outerHeight",this._contentWidth="outerWidth"),this._hScroll=this.isHScroll(),this._vScroll=this.isVScroll(),this._hScroll||this._vScroll){if(this.content().addClass("e-content"),f=this._exactElementDimension(this.element),this._elementDimension(f),this.model.targetPane!==null&&this.content().find(this.model.targetPane)[0]!==r?this.content().find(this.model.targetPane)[0].scrollLeft=this.scrollLeft():!this.isHScroll()&&this.element.children(".e-hscrollbar").length>0&&this._ensureScrollers(),isNaN(this._eleWidth)&&this._eleWidth.indexOf("%")>0&&isNaN(this._eleHeight)&&this._eleHeight.indexOf("%")>0)n(i).on("resize",n.proxy(this._resetScroller,this))}else this.content().removeClass("e-content");this._setDimension();this._parentHeight=n(this.element).parent().height();this._parentWidth=n(this.element).parent().width()}},_elementDimension:function(n){this._ElementHeight=n.height-(this.border_bottom+this.border_top+this.padding_bottom+this.padding_top);this.content()[this._contentHeight](this._ElementHeight-(this._hScroll&&!this.model.autoHide?this.model.scrollerSize:this.element.find(".e-hscrollbar").is(":visible")?this.model.scrollerSize:0));this._ElementWidth=n.width-(this.border_left+this.border_right+this.padding_left+this.padding_right);this.content()[this._contentWidth](this._ElementWidth-(this._vScroll&&!this.model.autoHide?this.model.scrollerSize:this.element.find(".e-vscrollbar").is(":visible")?this.model.scrollerSize:0))},_convertPercentageToPixel:function(n,t){return Math.floor(n*t/100)},isHScroll:function(){var u=parseFloat(n.fn.jquery)>=3?Math.ceil(this.element.width()):this.element.width(),i=this.model.width,r;if(t.isNullOrUndefined(this.model.width)||(i=typeof this.model.width=="string"&&this.model.width.indexOf("%")!=-1?u:parseFloat(n.fn.jquery)>=3&&!isNaN(parseFloat(this.model.width))?Math.ceil(parseFloat(this.model.width)):this.model.width),t.isNullOrUndefined(this._tempWidth)||typeof this._tempWidth!="string"||this._tempWidth.indexOf("%")==-1){if(i>0){if(r=this.content().find(this.model.targetPane),this.model.targetPane!=null&&r.length)return r[0].scrollWidth+r.siblings().width()>i;if(this.content()[0].scrollWidth>i)return!0;if(this.content()[0].scrollWidth==i){if(this.model.autoHide&&n(this.content()[0]).find("> *").length>0)return n(this.content()[0]).find("> *")[0].scrollWidth>n(this.content()[0]).width();if(n(this.content()[0]).find("> *").length>0)return n(this.content()[0]).find("> *")[0].scrollWidth>(t.isNullOrUndefined(this._tempVscrollbar)?i:i-this.model.scrollerSize)}return!1}return!1}if(t.isNullOrUndefined(this.model.width)||typeof this.model.width!="string"||this.model.width.indexOf("%")==-1){if(this.content()[0].scrollWidth>u)return!0}else return this.content()[0].scrollWidth>u},isVScroll:function(){if(t.isNullOrUndefined(this.model.height)||typeof this.model.height!="string"||this.model.height.indexOf("%")==-1){if(this.model.height>0&&(this.content()[0].scrollHeight>Math.ceil(this.model.height)||this.isHScroll()&&(this.content()[0].scrollHeight==this.model.height||this.content()[0].scrollHeight>this.model.height-(this.model.scrollerSize-2))))return!0}else return this.content()[0].scrollHeight>this.element.outerHeight();return!1},_setModel:function(n){for(var i in n)switch(i){case"enableRTL":n[i]?(this.element.addClass("e-rtl"),this._rtlScrollLeftValue=this.content().scrollLeft(),t.isNullOrUndefined(this._hScrollbar)||(this._hScrollbar._scrollData.enableRTL=!0)):(this.element.removeClass("e-rtl"),t.isNullOrUndefined(this._hScrollbar)||(this._hScrollbar._scrollData.enableRTL=!1));this._hScrollbar&&(this.element.find(".e-hhandle").css("left",0),this._hScrollbar.value(0));break;case"preventDefault":this.model.preventDefault=n[i];break;case"scrollLeft":(parseFloat(t.util.getVal(n[i]))<0||!this._hScroll)&&(n[i]=0);this._hScrollbar&&(n[i]=parseFloat(t.util.getVal(n[i]))>this._hScrollbar._scrollData.scrollable?this._hScrollbar._scrollData.scrollable:parseFloat(t.util.getVal(n[i])));this._setScrollLeftValue(parseFloat(n[i]));this.scrollLeft(n[i]);!this._hScrollbar||this._hScrollbar._scrollData._scrollleftflag&&this.model.enableRTL||this.scrollX(n[i],!0);break;case"scrollTop":this._vScrollbar&&(n[i]=parseFloat(t.util.getVal(n[i]))>this._vScrollbar._scrollData.scrollable?this._vScrollbar._scrollData.scrollable:parseFloat(t.util.getVal(n[i])));(parseFloat(n[i])<0||!this._vScroll)&&(n[i]=0);this.content().scrollTop(parseFloat(n[i]));this.scrollTop(n[i]);this.scrollY(n[i],!0);break;case"touchScroll":this.model.enableTouchScroll?(this._vScrollbar&&this._on(this.content(),"mousedown touchstart",{d:this._vScrollbar._scrollData},this._mouseDownOnContent),this._hScrollbar&&this._on(this.content(),"mousedown touchstart",{d:this._hScrollbar._scrollData},this._mouseDownOnContent)):this._off(this.content(),"mousedown touchstart");break;case"scrollOneStepBy":this._vScrollbar&&(this._vScrollbar._scrollData.scrollOneStepBy=n[i],this._vScrollbar.model.smallChange=n[i]);this._hScrollbar&&(this._hScrollbar._scrollData.scrollOneStepBy=n[i],this._hScrollbar.model.smallChange=n[i]);break;case"buttonSize":this._vScrollbar&&(this._vScrollbar.model.buttonSize=this.model.buttonSize);this._hScrollbar&&(this._hScrollbar.model.buttonSize=this.model.buttonSize);this.refresh();break;case"height":this._eleHeight=n[i];this.refresh();break;case"width":this._eleWidth=n[i];this.refresh();break;case"enabled":n[i]?this.enable():this.disable();break;default:this.refresh()}},_createScrollbar:function(i,r){var c=this,f,o,l,s,a,h=document.createElement("div"),e,u;return i===t.ScrollBar.Orientation.Vertical?(o=this.model.scrollerSize,l=t.isNullOrUndefined(this.model.height)||typeof this.model.height!="string"||this.model.height.indexOf("%")==-1?f=this.model.height-(r?this.model.scrollerSize:0):f=this.element.height()-(r?this.model.scrollerSize:0),s=this.content()[0].scrollHeight,a=this.scrollTop()):(o=f=this.model.width-(r?this.model.scrollerSize:0),l=this.model.scrollerSize,t.isNullOrUndefined(this.model.width)||typeof this.model.width!="string"||this.model.width.indexOf("%")==-1?(e=this.content().find(this.model.targetPane),s=this.model.targetPane!=null&&e.length?e[0].scrollWidth+e.parent().width()-e.width():this.content()[0].scrollWidth):(o=f=this.element.width()-(r?this.model.scrollerSize:0),s=this.content()[0].scrollWidth),a=this.scrollLeft()),this.element.children(".e-hscrollbar").length>0?n(this.element.children(".e-hscrollbar")).before(h):this.element.append(h),n(h).ejScrollBar({elementHeight:c._eleHeight,elementWidth:c._eleWidth,buttonSize:c.model.buttonSize,orientation:i,viewportSize:f,height:l,width:o,maximum:s-f,value:a,smallChange:this.model.scrollOneStepBy,largeChange:3*this.model.scrollOneStepBy,scroll:t.proxy(this._scrollChanged,this),thumbEnd:t.proxy(this._thumbEnd,this),thumbStart:t.proxy(this._thumbStart,this),thumbMove:t.proxy(this._thumbMove,this)}),u=n(h).ejScrollBar("instance"),i!==t.ScrollBar.Orientation.Vertical&&r||this._off(this.element,this._browser=="msie"?"wheel mousewheel":"mousewheel DOMMouseScroll",this._mouseWheel)._on(this.element,this._browser=="msie"?"wheel mousewheel":"mousewheel DOMMouseScroll",{d:u._scrollData},this._mouseWheel),i===t.ScrollBar.Orientation.Horizontal?this._scrollXdata=u._scrollData:this._scrollYdata=u._scrollData,i===t.ScrollBar.Orientation.Horizontal&&this.model.enableRTL&&(u._scrollData.enableRTL=!0),u._enabled=this.model.enabled,u},_updateScrollbar:function(i,r){var u=i===t.ScrollBar.Orientation.Vertical?this._vScrollbar:this._hScrollbar;u&&(i===t.ScrollBar.Orientation.Vertical?(u.model.width=this.model.scrollerSize,u.model.height=u.model.viewportSize=this.model.height-(r?this.model.scrollerSize:0),u.model.maximum=this.content()[0].scrollHeight-u.model.viewportSize,u.model.value=this.scrollTop()):(u.model.width=u.model.viewportSize=this.model.width-(r?this.model.scrollerSize:0),u.model.height=this.model.scrollerSize,u.model.maximum=(this.model.targetPane!=null&&this.content().find(this.model.targetPane).length>0?this.content().find(this.model.targetPane)[0].scrollWidth+(this.content().width()-this.content().find(n(this.model.targetPane)).outerWidth()):this.content()[0].scrollWidth)-u.model.viewportSize,this.model.enableRTL||(u.model.value=this.scrollLeft())))},_autohide:function(){this.model.autoHide?(this.element.addClass("e-autohide"),this._on(this.element,"mouseenter mouseleave touchstart touchend",this._scrollerHover),n(":hover").filter(this.element[0]).length||this.content().siblings(".e-scrollbar.e-js").hide(),this._elementDimension(this._exactElementDimension(this.element))):(this.element.removeClass("e-autohide"),this._off(this.element,"mouseenter mouseleave touchstart touchend",this._scrollerHover),this.content().siblings(".e-scrollbar.e-js").show())},_mouseUpContent:function(t){t.type=="mouseup"&&(this.element.removeClass("e-scroll-focus"),this._autohide(),this._off(n(document),"mouseup",this._mouseUpContent))},_scrollChanged:function(i){this._updateScroll=!0;i.scrollTop!==r?this.scrollY(i.scrollTop,!0,"",i.source):i.scrollLeft!==r&&this.scrollX(i.scrollLeft,!0,"",i.source);this._updateScroll=!1;var u=this;n.when(this.content()).done(t.proxy(function(){u._trigger("scrollEnd",{scrollData:i})}))},_bindBlurEvent:function(r,u){this._scrollEle=n(r).data("ejScrollBar");this._event=u;var f=this;this._listener=function(){this._scrollEle._off(n(document),"mousemove touchmove",this._scrollEle._mouseMove);n(document).off("mouseup touchend",t.proxy(this._scrollEle._mouseUp,this._scrollEle));this._scrollEle._prevY=null;this._off(n(document),"mousemove touchmove",this._mouseMove);this._off(n(document),"mouseup touchend",this._mouseUp);this._off(n(i),"blur");this._evtData.handler==="e-vhandle"?this._scrollEle._trigger("thumbEnd",{originalEvent:this._event,scrollData:this._evtData}):this._scrollEle._trigger("thumbEnd",{originalEvent:this._event,scrollData:this._evtData})};this._on(n(i),"blur",this._listener)},_thumbStart:function(n){this._evtData=n.scrollData;var t=n.scrollData.handler==="e-vhandle"?this.element.find("."+n.scrollData.handler).closest(".e-scrollbar"):this.element.find("."+n.scrollData.handler).closest(".e-scrollbar"),t=n.scrollData.handler==="e-vhandle"?this.element.find("."+n.scrollData.handler).closest(".e-scrollbar"):this.element.find("."+n.scrollData.handler).closest(".e-scrollbar");this._bindBlurEvent(t,n);this._trigger("thumbStart",n)},_thumbMove:function(n){this._trigger("thumbMove",n)},_thumbEnd:function(t){this._trigger("thumbEnd",t);this._off(n(i),"blur")},refresh:function(i){var r,u;i?(this._tempVscrollbar=null,this.element.children(".e-vscrollbar").remove(),this._tempHscrollbar=null,this.element.children(".e-hscrollbar").remove()):this.element.find(">.e-content").removeAttr("style");t.isNullOrUndefined(this._eleHeight)||typeof this._eleHeight!="string"||this._eleHeight.indexOf("%")==-1||this._parentHeight==n(this.element).parent().height()||(r=this._exactElementDimension(this.element.parent()),r=r.height-(this.border_bottom+this.border_top+this.padding_bottom+this.padding_top),this.model.height=this._convertPercentageToPixel(parseInt(this._eleHeight),r));t.isNullOrUndefined(this._eleWidth)||typeof this._eleWidth!="string"||this._eleWidth.indexOf("%")==-1||this._parentWidth==n(this.element).parent().width()||(r=this._exactElementDimension(this.element.parent()),r=r.width-(this.border_left+this.border_right+this.padding_left+this.padding_right),this.model.width=this._convertPercentageToPixel(parseInt(this._eleWidth),r));this._ensureScrollers();u=this.model.scrollLeft;this.model.enableRTL?(this.element.hasClass("e-rtl")||this.element.addClass("e-rtl"),this._rtlScrollLeftValue=this.content().scrollLeft(),u>0?this.content().scrollLeft(this._rtlScrollLeftValue-u):this._setScrollLeftValue(u)):this.content().scrollLeft(u);(this.scrollTop()&&t.isNullOrUndefined(this._vScrollbar)||!t.isNullOrUndefined(this._vScrollbar)&&this._vScrollbar&&this._vScrollbar._scrollData!=null&&!this._vScrollbar._scrollData.skipChange)&&this.scrollTop(this._isJquery3?Math.ceil(this.scrollTop()):this.scrollTop());this.content().scrollTop(this.scrollTop());this._vScrollbar&&(this._vScrollbar._scrollData.dimension="Height",this._updateScrollbar(t.ScrollBar.Orientation.Vertical,this._hScroll),this._vScroll&&!this._vScrollbar._calculateLayout(this._vScrollbar._scrollData)&&this._vScrollbar._updateLayout(this._vScrollbar._scrollData));this._hScrollbar&&(this._hScrollbar._scrollData.dimension="Width",this._updateScrollbar(t.ScrollBar.Orientation.Horizontal,this._vScroll),this._hScroll&&!this._hScrollbar._calculateLayout(this._hScrollbar._scrollData)&&this._hScrollbar._updateLayout(this._hScrollbar._scrollData));t.browserInfo().name=="msie"&&t.browserInfo().version=="8.0"?this.element.find(".e-hhandle").css("left","0px"):this.model.targetPane!=null&&this._on(this.content().find(this.model.targetPane),"scroll",this._scroll);this._addActionClass();this._autohide()},_exactElementDimension:function(n){var i=n.get(0).getBoundingClientRect(),r=["left","right","top","bottom"],u,f,t;for(u=i.width?i.width:i.right-i.left,f=i.height?i.height:i.bottom-i.top,t=0;t<r.length;t++)this["border_"+r[t]]=isNaN(parseFloat(n.css("border-"+r[t]+"-width")))?0:parseFloat(n.css("border-"+r[t]+"-width")),this["padding_"+r[t]]=isNaN(parseFloat(n.css("padding-"+r[t])))?0:parseFloat(n.css("padding-"+r[t]));return{width:u,height:f}},_keyPressed:function(n,i){if(this.model.enabled){if(["input","select","textarea"].indexOf(i.tagName.toLowerCase())!==-1)return!0;var r,u;if(["up","down","pageUp","pageDown"].indexOf(n)!==-1)this._vScrollbar&&(t.browserInfo().name=="msie"&&this.model.allowVirtualScrolling&&this._content.focus(),r=this._vScrollbar._scrollData),u="o";else if(["left","right","pageLeft","pageRight"].indexOf(n)!==-1)this._hScrollbar&&(r=this._hScrollbar._scrollData),u="i";else return!0;return r?!this._changeTop(r,(n.indexOf(u)<0?-1:1)*(n[0]!=="p"?1:3)*r.scrollOneStepBy,"key"):!0}},scrollY:function(n,i,r,u,f){var e=this,f;if(n!==""){if(i){if(f={source:u||"custom",scrollData:this._vScrollbar?this._vScrollbar._scrollData:null,scrollTop:n,originalEvent:f},n=this._isJquery3?Math.ceil(f.scrollTop):f.scrollTop,this.scrollTop(n),this._trigger("scroll",f))return;this.content().scrollTop(n);return}(t.isNullOrUndefined(r)||r==="")&&(r=100);this._vScrollbar&&(n=parseFloat(n)>this._vScrollbar._scrollData.scrollable?this._vScrollbar._scrollData.scrollable:parseFloat(n));n=this._isJquery3?Math.ceil(n):n;this.scrollTop(n);this.content().stop().animate({scrollTop:n},r,"linear",function(){e._trigger("scroll",{source:u||"custom",scrollData:e._vScrollbar?e._vScrollbar._scrollData:null,scrollTop:n,originalEvent:f})})}},scrollX:function(n,i,r,u,f){var o=this,e,s;if(n!==""){if(this._hScrollbar&&(n=parseFloat(n)>this._hScrollbar._scrollData.scrollable?this._hScrollbar._scrollData.scrollable:parseFloat(n)),e=t.browserInfo().name,this.model.enableRTL&&e!="mozilla"&&(n<0&&(n=Math.abs(n)),s=this.model.targetPane!=null?this.content().find(this.model.targetPane)[0]:this.content()[0],f!="mousemove"&&f!="touchmove"&&e!="msie"&&e!="msie"&&(n=this._hScrollbar._scrollData.scrollable-n)),this.scrollLeft(n),i){if(this._trigger("scroll",{source:u||"custom",scrollData:this._hScrollbar?this._hScrollbar._scrollData:null,scrollLeft:n,originalEvent:f}))return;this.model.targetPane!=null&&this.content().find(this.model.targetPane).length?this.content().find(this.model.targetPane).scrollLeft(n):this.content().scrollLeft(n);return}(t.isNullOrUndefined(r)||r==="")&&(r=100);this.model.targetPane!=null&&this.content().find(this.model.targetPane).length?this.content().find(this.model.targetPane).stop().animate({scrollLeft:n},r,"linear"):this.content().stop().animate({scrollLeft:n},r,"linear",function(){o._trigger("scroll",{source:u||"custom",scrollData:o._hScrollbar?o._hScrollbar._scrollData:null,scrollLeft:n,originalEvent:f})})}},enable:function(){var n=this.element.find(".e-vscrollbar,.e-hscrollbar,.e-vscroll,.e-hscroll,.e-vhandle,.e-hhandle,.e-vscroll .e-icon,.e-hscroll .e-icon");n.hasClass("e-disable")&&(n.removeClass("e-disable").attr({"aria-disabled":!1}),this.model.enabled=!0);this._vScrollbar&&(this._vScrollbar._enabled=this.model.enabled);this._hScrollbar&&(this._hScrollbar._enabled=this.model.enabled)},disable:function(){var n=this.element.find(".e-vscrollbar,.e-hscrollbar,.e-vscroll,.e-hscroll,.e-vhandle,.e-hhandle,.e-vscroll .e-icon,.e-hscroll .e-icon");n.addClass("e-disable").attr({"aria-disabled":!0});this.model.enabled=!1;this._vScrollbar&&(this._vScrollbar._enabled=this.model.enabled);this._hScrollbar&&(this._hScrollbar._enabled=this.model.enabled)},_changeTop:function(n,i,r,u){var e=Math.ceil(this.model.targetPane!=null&&n.dimension!="height"?this.content().find(this.model.targetPane)[n.scrollVal]():this.content()[n.scrollVal]()),f;return n.dimension=="height"&&e==0&&(e=this.scrollTop()!=0?this.scrollTop():0),f=e+i,(n.enableRTL?f<n.scrollable:f>n.scrollable)&&(f=Math.round(n.scrollable)),(n.enableRTL?f>0:f<0)&&(f=0),f!==e&&(this["scroll"+n.xy](f,!0,"",r,u),n.xy!=="X"||t.isNullOrUndefined(this._hScrollbar)?t.isNullOrUndefined(this._vScrollbar)||this._vScrollbar.scroll(f,r,!0,u):this._hScrollbar.scroll(f,r,!0,u)),f!==e},_mouseWheel:function(t){var o;if((!this._vScrollbar||!t.ctrlKey)&&(this._vScrollbar||t.shiftKey)&&t.data&&this.model.enabled){var u=0,f=t.data.d,r=t,e;if(t=t.originalEvent,this._wheelStart&&this._trigger("wheelStart",{originalEvent:t,scrollData:r.data.d}),this._wheelStart=!1,clearTimeout(n.data(this,"timer")),this._wheelx!=1&&(t.wheelDeltaX==0||t.wheelDeltaY==0)&&(this._wheelx=1),navigator.platform.indexOf("Mac")==0&&this._wheelx==0&&(this._browser=="webkit"||this._browser=="chrome"))return!0;(this._browser=="mozilla"?t.axis==t.HORIZONTAL_AXIS?f=this._scrollXdata:this._scrollYdata:this._browser=="msie"?(t.type=="wheel"&&(u=t.deltaX/120),t.type=="mousewheel"&&t.shiftKey&&(f=this._scrollXdata,t.preventDefault?t.preventDefault():t.returnValue=!1)):this._wheelx&&t.wheelDeltaX!=0&&t.wheelDeltaY==0&&this._scrollXdata&&(f=this._scrollXdata),t.wheelDeltaX==0&&(this._wheelx=t.wheelDeltaX),t.wheelDelta?(u=this._normalizingDelta(t),i.opera&&parseFloat(i.opera.version,10)<10&&(u=-u)):t.detail&&(u=t.detail/3),u)&&(r.originalEvent&&(e=r.originalEvent.wheelDelta&&r.originalEvent.wheelDelta>0||r.originalEvent.detail&&r.originalEvent.detail<0?-1:1),this._changeTop(f,u*f.scrollOneStepBy,"wheel",t)?(t.preventDefault?t.preventDefault():r.preventDefault(),this._trigger("wheelMove",{originalEvent:t,scrollData:r.data.d,direction:e})):(this._trigger("scrollEnd",{originalEvent:t,scrollData:r}),this._wheelx=0),o=this,n.data(this,"timer",setTimeout(function(){o._wheelStart=!0;o._trigger("wheelStop",{originalEvent:t,scrollData:r.data.d,direction:e})},250)))}},_normalizingDelta:function(n){return navigator.platform.indexOf("Mac")==0?-n.wheelDelta/3:-n.wheelDelta/120},_contentHeightWidth:function(){this.content().siblings().css("display")=="block"&&this.model.autoHide?(this._hScroll&&this.content()[this._contentHeight](this._ElementHeight-this.model.scrollerSize),this._vScroll&&this.content()[this._contentWidth](this._ElementWidth-this.model.scrollerSize)):this.content().siblings().css("display")=="none"&&this.model.autoHide&&(this._vScroll||this._hScroll)&&(this.content()[this._contentHeight](this._ElementHeight),this.content()[this._contentWidth](this._ElementWidth))},_scrollerHover:function(n){this.model.enabled&&(n.type!="mouseenter"&&n.type!="touchstart"||this.content().siblings().is(":visible")?n.type!="mouseleave"&&n.type!="touchend"||this.element.hasClass("e-scroll-focus")||(this.content().siblings().hide(),this._contentHeightWidth(),this._trigger("scrollHide",{originalEvent:n})):(this.content().siblings().css("display","block"),this._contentHeightWidth(),this._ensureScrollers(),this._setScrollLeftValue(this.model.scrollLeft),this._trigger("scrollVisible",{originalEvent:n})))},_mouseUp:function(r){if(r.data){var u=r.data.d;this.model.enableRTL&&(r.type=="mouseup"||r.type=="touchend")&&(this.model.scrollLeft=this._rtlScrollLeftValue-this.model.scrollLeft);r.type!=="mouseup"&&r.type!=="touchend"&&(r.toElement||r.relatedTarget)||(this.content().css("cursor","default"),this._off(n(document),"mousemove touchmove"),this._off(this.content(),"touchmove",this._touchMove),this._off(n(document),"mouseup touchend",this._mouseUp),u.fromScroller=!1,this._mouseMoved!==!0||r.data.source!=="thumb"||t.isNullOrUndefined(this.model)||(n.when(this.content()).done(t.proxy(function(){this._trigger("thumbEnd",{originalEvent:r,scrollData:u})},this)),this._off(n(i),"blur")));u.up=!0;this._mouseMoved=!1;i.ontouchmove=null}},_mouseDownOnContent:function(u){var f,s;if((this._startX=u.clientX!=r?u.clientX:u.originalEvent.changedTouches[0].clientX,this._startY=u.clientY!=r?u.clientY:u.originalEvent.changedTouches[0].clientY,this._timeStart=u.timeStamp||Date.now(),this.model.enabled)&&(f=u.data.d,this._evtData=u.data,s=f.handler==="e-vhandle"?this.element.find("."+f.handler).closest(".e-scrollbar"):this.element.find("."+f.handler).closest(".e-scrollbar"),this._bindBlurEvent(s,u),!this._trigger("thumbStart",{originalEvent:u,scrollData:f}))&&(u.which!=3||u.button!=2)){f.fromScroller=!0;var e=null,o=1,c=5,h;this._document=n(document);this._window=n(i);this._mouseMove=function(n){var l,a,s;if(this.model.enableRTL&&this._UpdateScrollLeftValue(u),this._startX+this._startY!=n.clientX+n.clientY){if(this._relDisX=(this._startx=n.clientX!=r?n.clientX:n.originalEvent.changedTouches[0].clientX)-this._startX,this._relDisY=(this._starty=n.clientY!=r?n.clientY:n.originalEvent.changedTouches[0].clientY)-this._startY,this._duration=(n.timeStamp||Date.now())-this._timeStart,this._velocityY=Math.abs(this._relDisY)/this._duration,this._velocityX=Math.abs(this._relDisX)/this._duration,this._swipe=Math.abs(this._relDisX)>Math.abs(this._relDisY)?this._relDisX>0?"left":"right":this._relDisY>0?"up":"down",!t.isNullOrUndefined(n.target.tagName)&&n.target.tagName.toLowerCase()==="iframe"){n.type="mouseup";this._mouseUp(n);return}if(l=n.type=="mousemove"?n[f.clientXy]:n.originalEvent.changedTouches[0][f.clientXy],e&&l!==e&&(this._mouseMoved=!0,a=l-e,s=this.model[f.scrollVal]-a,o==1&&Math.abs(a)>c&&(h=f.position,o=0),o==0&&(e=l),s>=0&&s<=f.scrollable&&h===f.position)){var v=this._velocityY>.5&&this._duration<50&&f.position=="Top",y=this._velocityX>.5&&this._duration<50&&f.position=="Left",p=(this._velocityY>.5||this._velocityX>.5)&&this._duration<50;p?v?(s=Math.abs(this._relDisY)+this._duration*this._velocityY,this._startY>this._starty?(s+=this.scrollTop(),s>f.scrollable&&(s=f.scrollable)):(s<this.scrollTop()&&(s=Math.abs(s-this.scrollTop())),s>this.scrollTop()&&(s=0)),this.scrollTop()<=f.scrollable&&this.scrollY(s,!1,this.model.animationSpeed,"thumb")):y&&(s=Math.abs(this._relDisX),this._startX>this._startx?(s+=this.scrollLeft(),s>f.scrollable&&(s=f.scrollable)):(s-=this.scrollLeft(),s=Math.abs(s),(s>f.scrollable||s>=this.scrollLeft())&&(s=0)),this.scrollLeft()<=f.scrollable&&this.scrollX(s,!1,this.model.animationSpeed,"thumb")):(this["scroll"+f.xy](s,!0,"","thumb",n.type),f.xy==="X"?this._hScrollbar.scroll(s,"thumb",!0,n.type):t.isNullOrUndefined(this._vScrollbar)||this._vScrollbar.scroll(s,"thumb",!0,n.type),this.content().css("cursor","pointer"),this._trigger("thumbMove",{originalEvent:n,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:f}))}i.ontouchmove=function(n){n=n||i.event;n.preventDefault&&n.preventDefault();n.returnValue=!1};e==null&&(e=l);(Math.round(this._content.scrollTop())==0&&this._swipe=="down"||(Math.ceil(this._content.scrollTop())==f.scrollable||Math.ceil(this._content.scrollTop())+1==f.scrollable)&&this._swipe=="up")&&(this._trigger("scrollEnd",{originalEvent:n.originalEvent,scrollData:n}),i.ontouchmove=null)}};this._trigger("touchStart",{originalEvent:u,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:this._scrollData,scrollTop:this.content().scrollTop(),scrollLeft:this.content().scrollLeft()});this._on(n(document),"mousemove",{d:f,source:"thumb"},this._mouseMove);this._isNativeScroll?this._on(this.content(),"touchmove",{d:f,source:"thumb"},this._touchMove):this._on(n(document),"touchmove",{d:f,source:"thumb"},this._mouseMove);this._on(n(document),"mouseup touchend",{d:f,source:"thumb"},this._mouseUp)}},_touchMove:function(){this.content().css("cursor","pointer");this._mouseMoved=!0;this._tempLeft=this.model.targetPane!=null?this.content().find(this.model.targetPane).scrollLeft():this.content().scrollLeft();this._tempTop=this.content().scrollTop()},_touchDown:function(n){var t;t=this._tempLeft!=this.scrollLeft()?this._scrollXdata:this._tempTop!=this.scrollTop()?this._scrollYdata:this._scrollYdata?this._scrollYdata:this._scrollXdata;this._trigger("scrollStop",{source:"thumb",originalEvent:n,scrollData:t,scrollTop:this.content().scrollTop(),scrollLeft:this.content().scrollLeft()})},_speedScrolling:function(n){var r,i,u,n,t;if(this._mouseMoved){if(this.element.find(".e-vhandle").length>0&&(r=this.content().scrollTop(),this._tempTop!==r&&(this._trigger("thumbMove",{originalEvent:n,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:this._scrollData}),this._vScrollbar.scroll(this.content().scrollTop(),"thumb",!0,"touchmove"),n={source:"thumb",scrollData:this._vScrollbar?this._vScrollbar._scrollData:null,scrollTop:this.content().scrollTop(),originalEvent:n},t=this._isJquery3?Math.ceil(n.scrollTop):n.scrollTop,this.scrollTop(t),this._trigger("scroll",n))))return;if(this.element.find(".e-hhandle").length>0&&(i=this.model.targetPane!=null?this.content().find(this.model.targetPane):this.content(),u=i.scrollLeft(),this._tempLeft!==u&&(this._trigger("thumbMove",{originalEvent:n,direction:this._swipe=="down"||this._swipe=="right"?1:-1,scrollData:this._scrollData}),this._hScrollbar.scroll(i.scrollLeft(),"thumb",!0,"touchmove"),n={source:"thumb",scrollData:this._hScrollbar?this._hScrollbar._scrollData:null,scrollLeft:this.content().scrollLeft(),originalEvent:n},t=this._isJquery3?Math.ceil(n.scrollLeft):n.scrollLeft,this.scrollLeft(t),this._trigger("scroll",n))))return;this.content().css("cursor","pointer")}},_scroll:function(r){var s=[this._vScrollbar?this._vScrollbar._scrollData:null,this._hScrollbar?this._hScrollbar._scrollData:null],h,f,u,o,e;for(this._evtData&&(h=this._evtData.d?this._evtData.d:this._evtData),f=0;f<2;f++)(u=s[f],u&&!u.skipChange)&&((this.model&&(!this.model.targetPane||this.model.targetPane&&h&&h.xy!="X")&&(u.dimension==="height"?this.scrollTop(r.target[u.scrollVal]):this.scrollLeft(r.target[u.scrollVal])),u.sTop=this.model&&this.model.targetPane!=null&&f==1&&this.content().find(this.model.targetPane).length?this.content().find(this.model.targetPane)[0][u.scrollVal]:u.scrollVal=="scrollTop"?this.scrollTop():this.scrollLeft(),this[u.scrollVal](u.sTop),u.fromScroller)||(f===1?(o=this.content()[0],this._rtlScrollLeftValue&&o.scrollWidth-o.clientWidth!=this._rtlScrollLeftValue&&(this._rtlScrollLeftValue=o.scrollWidth-o.clientWidth),u.sTop=this.model&&t.browserInfo().name!="mozilla"&&this.model.enableRTL&&!this._hScrollbar._scrollData._scrollleftflag?this._rtlScrollLeftValue==0?u.sTop*-1:u.sTop-this._rtlScrollLeftValue:u.sTop,this._hScrollbar.scroll(u.sTop,"",!0)):this._vScrollbar.scroll(u.sTop,"",!0),(s.length==2&&f==1||s.length==1&&f==0)&&(this._externalScroller=!1,this.model&&this._trigger("scroll",{source:"custom",scrollData:this._hScrollbar?this._hScrollbar._scrollData:null,scrollLeft:this.scrollLeft(),originalEvent:r}))));this._isNativeScroll&&this.model.enableTouchScroll&&this._speedScrolling(r);this._UpdateScrollLeftValue(r);e=this;this._vScrollbar&&this._scrollYdata&&this.model&&this._scrollYdata.scrollable-this.model.scrollOneStepBy>=this.scrollTop()&&(n(":hover").filter(this.element[0]).length||e._off(t.getScrollableParents(e.wrapper),"scroll",null),i.onmousewheel=function(t){e.model&&e.model.preventDefault&&n(":hover").filter(e.element[0]).length&&t.preventDefault()})},_UpdateScrollLeftValue:function(n){this.model&&n.type!="touchstart"&&n.type!="mousedown"&&this.model.enableRTL&&this._rtlScrollLeftValue&&this.model.scrollLeft!=this._previousScrollLeft&&(this.model.scrollLeft=this._rtlScrollLeftValue-this.model.scrollLeft,this._previousScrollLeft=this.model.scrollLeft);(this.model&&n.type=="touchstart"||n.type=="mousedown")&&this.model.enableRTL&&(this.model.scrollLeft=this.content().scrollLeft(),this.option("scrollLeft",this.content().scrollLeft()))},_changevHandlerPosition:function(n){var t=this._vScrollbar;t&&(n=t._scrollData!=null&&n>=t._scrollData.scrollable?t._scrollData.scrollable:n,t!=null&&n>=0&&n<=t._scrollData.scrollable&&t[t._scrollData.handler].css(t._scrollData.lPosition,n/t._scrollData.onePx+"px"))},_changehHandlerPosition:function(n){var t=this._hScrollbar;t&&(n=t._scrollData!=null&&n>=t._scrollData.scrollable?t._scrollData.scrollable:n,t!=null&&top>=0&&n<=t._scrollData.scrollable&&t[t._scrollData.handler].css(t._scrollData.lPosition,n/t._scrollData.onePx+"px"))},_destroy:function(){this._off(this.content(),"scrollstop",this._touchDown);this._off(n(document),"mouseup",this._mouseUpContent);this.element.css({width:"",height:""}).children(".e-vscrollbar,.e-hscrollbar").remove();this.content().removeClass("e-content").css({width:"",height:""});this.element.removeClass("e-widget")},_preventDefault:function(n){n=n||i.event;n.preventDefault&&n.preventDefault();n.returnValue=!1}})}(jQuery,Syncfusion,window),function(n,t){function ft(n,t){var s=n||"",k=y,t=t.toString(),ct=t.indexOf(".")>-1||n.indexOf(".")>-1,r=0,rt=0,i="",d="",a=n.split(","),ut="0",lt,at=n.toLowerCase().indexOf("e"),w,o,ft=s.indexOf("#"),v,st,b,l,p,nt,tt,f,u,c,e;if(n.indexOf("\\")>-1&&(d=n.substr(0,n.lastIndexOf("\\")+1),n=n.substr(n.lastIndexOf("\\")+1,n.length),ft=n.indexOf("#")),at>-1){for(v="",s="",o=n.toLowerCase().split("e"),lt=n.indexOf("+")>-1?n.split("+")[1]:n.split("-")[1],t=parseInt(t).toExponential(),w=t.split("e"),r=o[1].length-w[1].length,u=o[1].length-1;u>0;u--)o[1][u]!="0"?s+=o[1][u]:r>1?(s+="#",r--):s+="0";for(st=n.indexOf("+")>-1?"+":"",s=st+s.split("").reverse().join(""),u=0;u<w[0].length;u++)v=w[0][u]!="."?v.concat("#"):v.concat(".");v.length>o[0].length&&(v=o[0]);s=d+v+"e"+s}else if(ct){if(o=n.split("."),w=t.split("."),o[1]=o[1].replace(/[,.]/g,""),r=o[0].replace(/[,.]/g,"").length-w[0].replace(/[,.]/g,"").length,r<0&&ej.isNullOrUndefined(n.match(/[\[\(\)\]]/g))){for(a=o[0].split(","),i=o[0].split(","),e=a.length-1;e>=0;e--)if(a[e])for(f=a[e].length,u=0,c=Math.abs(r);u<c;u++){if(f===3)break;i[e]="0"+i[e];f++;r++}if(i=i.join(),r<0)for(ej.isNullOrUndefined(f)||f==3||(i=","+i),u=0,c=Math.abs(r);u<c;u++)f===3&&(i=","+i,f=0),i="0"+i,f++;r=0;s=d+i+"."+o[1]}else if(ej.isNullOrUndefined(n.match(/[\[\(\)\]]/g))){for(i=o[0].replace(/[,.]/g,""),b="",f=0,l=i.length-1;l>=0;l--)f===3?(b=","+b,f=0):f++,b=i[l]+b;s=d+b+"."+o[1]}}else{if(p=0,nt=a.splice(1,a.length),r=n.replace(/[,.\[\(\]\)]/g,"").length-t.replace(/[,.]/g,"").length,ft>-1){for(tt=0,c=n.length;tt<c;tt++)n[tt]==="#"&&p++;(p===1||a[1]&&p===2)&&(ut="#");p===1&&(nt=a[0])}if(r<0){for(o=s.split(","),i=o.splice(1,o.length),e=a.length-1;e>=0;e--)if(nt[e])for(f=nt[e].length,i[e]||(i[e]=""),u=0,c=Math.abs(r)+1;u<c;u++){if(p!=1&&f===3){f=0;break}i[e]=i[e].concat(ut);f++;r++}if(i=i.join(),r<0)for(ej.isNullOrUndefined(f)||f==3||(i=","+i),u=0,c=Math.abs(r)+1;u<c;u++)p!=1&&f===3&&(i=","+i,f=0),i=ut+i,f++;r=0;s=d+i}rt=0}for(var et=[],vt=s.split(""),it=0,l=0,h,g,ot=!1,ht=!1,yt=n.indexOf("\\");l<s.length;l++)if(h=vt[l],h==="e"&&(ht=!0),h==="0"&&ft<0?r>0&&rt<=l?(r--,rt++):r>0?r--:g=k[h]:h=="0"&&(ht||h!="0")||(g=k[h]),h==="0"&&yt>-1&&(g=k[h]),l===s.lastIndexOf("\\")&&(ot=!1),g&&!ot)et[it]={rule:g},it+=1;else for(h==="\\"&&(h="",l===s.lastIndexOf("\\")||(ot=!0)),h=h.split(""),e=0;e<h.length;e++)et[it]=h[e],it+=1;return k=et,{rules:k,format:s}}function et(n,t,i){var u,r,e,o;if(ej.isNullOrUndefined(n)||typeof n=="string"||!t)throw"Bad Number Format Exception";if(o=t,u=ft(t,n),e=u.rules,t=u.format,t.indexOf("\\")>=0){var s=t.lastIndexOf("\\"),l=t.slice(0,s),f=t.slice(s+1,t.length),c;f=f.replace(/[9?CANa#&]/g,"_");c=l+f;r=c.replace(/[\\]/g,"");t=t.replace(/[\\]/g,"")}else r=t.replace(/[9?CANa#&]/g,"_");return r=h(r,i),ot(n,t,r,e,i,o)}function h(n,t){var r,f,e,o,u,i;if(n.length!=0){for(r=ej.preferredCulture(t),u="",f=r.numberFormat[","],e=r.numberFormat.currency.symbol,o=r.numberFormat["."],i=0;i<n.length;i++)u+=n[i]==","?f:n[i]=="."?o:n[i]=="$"?e:n[i];n=u}return n}function ot(i,r,u,f,e,o){var ft,l,nt,it;if(!ej.isNullOrUndefined(i)){r.toLowerCase().indexOf("e")>-1&&(ft=o.indexOf("+")>-1?o.split("+")[1]:o.split("-")[1],i=i.toExponential(),o.indexOf("-")>-1&&(i=i.replace("+","")));var b,ut,k,et,rt=b=ut=i.toString(),s=u,a=k=0,c,g="_",d,v,y,tt,ot=r.match(/[\(\[\]\)]/g);if(rt=!r.indexOf("\\")>=0?i=ut.replace(/[\(\)-]/g,""):et,l=f.length-1,nt=b.length-1,ej.isNullOrUndefined(ot))while(a<f.length){if(c=b[k],d=f[a],c==t)break;if(c===d||c===g||c==="e"&&c===d.toLowerCase()?(c===g?g:"",v=s.substring(0,a),y=s.substring(a),c=h(c,e),s=v+c+y.substr(1,y.length),k+=1,a+=1):f[a].rule!=t?(it=b.charCodeAt(k),p(r,it,a)?(v=s.substring(0,a),y=s.substring(a),tt=w(b,k,a,r,u),s=v+tt+y.substr(1,y.length),a++,k++):a++):(d==="e"&&(k=b.indexOf("e")+1),a++),k>rt.length||l<0)break}else while(l>=0){if(c=b[nt],d=f[l],c==t)break;if(c===d||c===g||c==="e"&&c===d.toLowerCase()?(c===g?g:"",v=s.substring(0,l+1),y=s.substring(l+1),c=h(c,e),s=v.substr(0,v.length-1)+c+y,l--,nt--):f[l].rule!=t?(it=b.charCodeAt(nt),p(r,it,l)?(v=s.substring(0,l+1),y=s.substring(l+1),tt=w(b,nt,l,r,u),s=v.substr(0,v.length-1)+tt+y,l--,nt--):l--):l--,k>rt.length||l<0)break}if(i)return(s.indexOf("_")-s.indexOf(",")==1||s.indexOf("_")-s.indexOf(".")==1)&&(s=s.slice(0,s.indexOf("_")-1)),n.trim(s.replace(/[_]/g,""))==""?null:s.replace(/[_]/g,"")}}function p(t,i,r){var f=y,u=!1,e=t.substr(r,1),o=String.fromCharCode(i);return n.each(f,function(n,t){e==n&&(u=o.match(new RegExp(t))?!0:!1)}),u}function w(n,t,i,r,u){var f=!1;return r.indexOf(".")>-1&&i===u.length-1&&n[t+1]>5&&(f=!0),f?(parseInt(n[t])+1).toString():n[t]}function o(n,t){return n.indexOf(t)===0}function c(n,t){return n.substr(n.length-t.length)===t}function f(n){return(n+"").replace(tt,"")}function st(n){return isNaN(n)?NaN:Math[n<0?"ceil":"floor"](n)}function s(n,t,i){for(var r=n.length;r<t;r++)n=i?"0"+n:n+"0";return n}function l(n,t,i){var r=t["-"],u=t["+"],f;switch(i){case"n -":r=" "+r;u=" "+u;case"n-":c(n,r)?f=["-",n.substr(0,n.length-r.length)]:c(n,u)&&(f=["+",n.substr(0,n.length-u.length)]);break;case"- n":r+=" ";u+=" ";case"-n":o(n,r)?f=["-",n.substr(r.length)]:o(n,u)&&(f=["+",n.substr(u.length)]);break;case"(n)":o(n,"(")&&c(n,")")&&(f=["-",n.substr(1,n.length-2)])}return f||["",n]}function ht(n,t,i){var l=i.groupSizes||[3],c=l[0],a=1,v=ej._round(n,t),p;isFinite(v)||(v=n);n=v;var r=n+"",u="",e=r.split(/e/i),f=e.length>1?parseInt(e[1],10):0;r=e[0];e=r.split(".");r=e[0];u=e.length>1?e[1]:"";f>0?(u=s(u,f,!1),r+=u.slice(0,f),u=u.substr(f)):f<0&&(f=-f,r=s(r,f+1,!0),u=r.slice(-f,r.length)+u,r=r.slice(0,-f));p=i["."]||".";u=t>0?p+(u.length>t?u.slice(0,t):s(u,t)):"";for(var o=r.length-1,y=i[","]||",",h="";o>=0;){if(c===0||c>o)return r.slice(0,o+1)+(h.length?y+h+u:u);h=r.slice(o-c+1,o+1)+(h.length?y+h:"");o-=c;a<l.length&&(c=l[a],a++)}return r.slice(0,o+1)+y+h+u}function ct(n,t,i){var h,r;if(!t||t==="i")return i.name.length?n.toLocaleString():n.toString();t=t||"D";var e=i.numberFormat,u=Math.abs(n),f=-1,o;t.length>1&&(f=parseInt(t.slice(1),10));h=t.charAt(0).toUpperCase();switch(h){case"D":o="n";u=st(u);f!==-1&&(u=s(""+u,f,!0));n<0&&(u=-u);break;case"N":r=e;r.pattern=r.pattern||["-n"];case"C":r=r||e.currency;r.pattern=r.pattern||["-$n","$n"];case"P":r=r||e.percent;r.pattern=r.pattern||["-n %","n %"];o=n<0?r.pattern[0]||"-n":r.pattern[1]||"n";f===-1&&(f=r.decimals);u=ht(u*(h==="P"?100:1),f,r);break;default:return et(n,t,i)}return lt(u,o,e)}function lt(n,t,i){for(var f=/n|\$|-|%/g,r="",e,u;;){if(e=f.lastIndex,u=f.exec(t),r+=t.slice(e,u?u.index:t.length),!u)break;switch(u[0]){case"n":r+=n;break;case"$":r+=i.currency.symbol||"$";break;case"-":/[1-9]/.test(n)&&(r+=i["-"]||"-");break;case"%":r+=i.percent.symbol||"%"}}return r}function b(n,t,i){var p,o,s,r,w,d,b,k,g,h,nt;typeof i=="string"&&(t=i,i=10);t=ej.globalize.findCulture(t);var c=NaN,u=t.numberFormat,y=t.numberFormat.pattern[0];if(n=n.replace(/ /g,""),n.indexOf(t.numberFormat.currency.symbol)>-1?(n=n.replace(t.numberFormat.currency.symbol||"$",""),n=n.replace(t.numberFormat.currency["."]||".",t.numberFormat["."]||"."),y=f(t.numberFormat.currency.pattern[0].replace("$",""))):n.indexOf(t.numberFormat.percent.symbol)>-1&&(n=n.replace(t.numberFormat.percent.symbol||"%",""),n=n.replace(t.numberFormat.percent["."]||".",t.numberFormat["."]||"."),y=f(t.numberFormat.percent.pattern[0].replace("%",""))),n=f(n),it.test(n))c=parseFloat(n,"",i);else if(rt.test(n))c=parseInt(n,16);else{var a=l(n,u,y),v=a[0],e=a[1];v===""&&u.pattern[0]!=="-n"&&(a=l(n,u,"-n"),v=a[0],e=a[1]);v=v||"+";s=e.indexOf("e");s<0&&(s=e.indexOf("E"));s<0?(o=e,p=null):(o=e.substr(0,s),p=e.substr(s+1));d=u["."]||".";b=o.indexOf(d);b<0?(r=o,w=null):(r=o.substr(0,b),w=o.substr(b+d.length));k=u[","]||",";r=r.split(k).join("");g=k.replace(/\u00A0/g," ");k!==g&&(r=r.split(g).join(""));h=v+r;w!==null&&(h+="."+w);p!==null&&(nt=l(p,u,y),h+="e"+(nt[0]||"+")+nt[1]);!i&&ut.test(h)?c=parseFloat(h):i&&(c=parseInt(h,i))}return c}function r(n,t,i){return n<t||n>i}function at(n,t){var u=new Date,i,r;return t<100&&(i=n.twoDigitYearMax,i=typeof i=="string"?(new Date).getFullYear()%100+parseInt(i,10):i,r=u.getFullYear(),t+=r-r%100,t>i&&(t-=100)),t}function e(n,t){if(n.indexOf)return n.indexOf(t);for(var i=0,r=n.length;i<r;i++)if(n[i]===t)return i;return-1}function a(n){return n.split(" ").join(" ").toUpperCase()}function u(n){for(var i=[],t=0,r=n.length;t<r;t++)i[t]=a(n[t]);return i}function vt(n,t,i){var r,o=n.days,f=n._upperDays;return f||(n._upperDays=f=[u(o.names),u(o.namesAbbr),u(o.namesShort)]),t=a(t),i?(r=e(f[1],t),r===-1&&(r=e(f[2],t))):r=e(f[0],t),r}function yt(n,t,i){var s=n.months,h=n.monthsGenitive||n.months,r=n._upperMonths,o=n._upperMonthsGen,f;return r||(n._upperMonths=r=[u(s.names),u(s.namesAbbr)],n._upperMonthsGen=o=[u(h.names),u(h.namesAbbr)]),t=a(t),f=e(i?r[1]:r[0],t),f<0&&(f=e(i?o[1]:o[0],t)),f}function v(n,t){for(var r,f=0,i=!1,u=0,e=n.length;u<e;u++)r=n.charAt(u),r=="'"?(i?t.push("'"):f++,i=!1):r=="\\"?(i&&t.push("\\"),i=!i):(t.push(r),i=!1);return f}function pt(n,t,i,r){var s,e;if(!n)return null;var u=0,f=0,o=null;t=t.split("");for(var h=t.length,c=function(n){for(var i=0;t[u]===n;)i++,u++;return i>0&&(u-=1),i},l=function(t){var r=new RegExp("^\\d{1,"+t+"}"),i=n.substr(f,t).match(r);return i?(i=i[0],f+=i.length,parseInt(i,10)):null},a=function(t,i){for(var r=0,s=t.length,e,o,u;r<s;r++)if(e=t[r],o=e.length,u=n.substr(f,o),i&&(u=u.toLowerCase()),u==e)return f+=o,r+1;return null},v=function(n){for(var t=0,r=n.length,i=[];t<r;t++)i[t]=(n[t]+"").toLowerCase();return i},y=function(n){var t={};for(var i in n)t[i]=v(n[i]);return t};u<h;u++)s=t[u],s==="d"&&(e=c("d"),r._lowerDays||(r._lowerDays=y(r.days)),o=e<3?l(2):a(r._lowerDays[e==3?"namesAbbr":"names"],!0));return o}function k(n,t){t=t||"F";var i,u=n.patterns,r=t.length;if(r===1){if(i=u[t],!i)throw"Invalid date format string '"+t+"'.";t=i}else r===2&&t.charAt(0)==="%"&&(t=t.charAt(1));return t}function d(n,t,u){var w,ct,h,g,nt,s,wt,b,et;n=f(n);t=f(t);var e=u.calendar,ot=ej.globalize._getDateParseRegExp(e,t),st=new RegExp(ot.regExp).exec(n);if(st===null)return null;var ht=ot.groups,y=null,a=null,v=null,tt=null,l=0,p,it=0,rt=0,ut=0,k=null,ft=!1;for(w=0,ct=ht.length;w<ct;w++)if(h=st[w+1],h){var lt=ht[w],d=lt.length,c=parseInt(h,10);switch(lt){case i.DAY_OF_MONTH_DOUBLE_DIGIT:case i.DAY_OF_MONTH_SINGLE_DIGIT:if(v=c,r(v,1,31))return null;break;case i.MONTH_THREE_LETTER:case i.MONTH_FULL_NAME:if(a=yt(e,h,d===3),r(a,0,11))return null;break;case i.MONTH_SINGLE_DIGIT:case i.MONTH_DOUBLE_DIGIT:if(a=c-1,r(a,0,11))return null;break;case i.YEAR_SINGLE_DIGIT:case i.YEAR_DOUBLE_DIGIT:case i.YEAR_FULL:if(y=d<4?at(e,c):c,r(y,0,9999))return null;break;case i.HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:if(l=c,l===12&&(l=0),r(l,0,11))return null;break;case i.HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:if(l=c,r(l,0,23))return null;break;case i.MINUTES_SINGLE_DIGIT:case i.MINUTES_DOUBLE_DIGIT:if(it=c,r(it,0,59))return null;break;case i.SECONDS_SINGLE_DIGIT:case i.SECONDS_DOUBLE_DIGIT:if(rt=c,r(rt,0,59))return null;break;case i.MERIDIAN_INDICATOR_FULL:case i.MERIDIAN_INDICATOR_SINGLE:if(ft=e.PM&&(h===e.PM[0]||h===e.PM[1]||h===e.PM[2]),!ft&&(!e.AM||h!==e.AM[0]&&h!==e.AM[1]&&h!==e.AM[2]))return null;break;case i.DECISECONDS:case i.CENTISECONDS:case i.MILLISECONDS:if(ut=c*Math.pow(10,3-d),r(ut,0,999))return null;break;case i.DAY_OF_WEEK_THREE_LETTER:v=pt(n,t,u,e);break;case i.DAY_OF_WEEK_FULL_NAME:if(vt(e,h,d===3),r(tt,0,6))return null;break;case i.TIME_ZONE_OFFSET_FULL:if((g=h.split(/:/),g.length!==2)||(p=parseInt(g[0],10),r(p,-12,13))||(nt=parseInt(g[1],10),r(nt,0,59)))return null;k=p*60+(o(h,"-")?-nt:nt);break;case i.TIME_ZONE_OFFSET_SINGLE_DIGIT:case i.TIME_ZONE_OFFSET_DOUBLE_DIGIT:if(p=c,r(p,-12,13))return null;k=p*60}}if(s=new Date,b=e.convert,wt=b?b.fromGregorian(s)[0]:s.getFullYear(),y===null&&(y=wt),a===null&&(a=0),v===null&&(v=1),b){if(s=b.toGregorian(y,a,v),s===null)return null}else if((s.setFullYear(y,a,v),s.getDate()!==v)||tt!==null&&s.getDay()!==tt)return null;return ft&&l<12&&(l+=12),s.setHours(l,it,rt,ut),k!==null&&(et=s.getMinutes()-(k+s.getTimezoneOffset()),s.setHours(s.getHours()+parseInt(et/60,10),et%60)),s}function g(n,t,r){function o(n,t){var i,r=n+"";return t>1&&r.length<t?(i=it[t-2]+r,i.substr(i.length-t,t)):r}function ut(){return l||b?l:(l=rt.test(t),b=!0,l)}var e=r.calendar,p=e.convert,u,w,y,f,tt,h;if(!t||!t.length||t==="i")return r&&r.name.length?p?g(n,e.patterns.F,r):n.toLocaleString():n.toString();w=t==="s";t=k(e,t);u=[];var s,it=["0","00","000"],l,b,rt=/([^d]|^)(d|dd)([^d]|$)/g,d=0,nt=/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g,c;for(!w&&p&&(c=p.fromGregorian(n));;){var ft=nt.lastIndex,a=nt.exec(t),et=t.slice(ft,a?a.index:t.length);if(d+=v(et,u),!a)break;if(d%2){u.push(a[0]);continue}y=a[0];f=y.length;switch(y){case i.DAY_OF_WEEK_THREE_LETTER:case i.DAY_OF_WEEK_FULL_NAME:tt=f===3?e.days.namesAbbr:e.days.names;u.push(tt[n.getDay()]);break;case i.DAY_OF_MONTH_SINGLE_DIGIT:case i.DAY_OF_MONTH_DOUBLE_DIGIT:l=!0;u.push(o(c?c[2]:n.getDate(),f));break;case i.MONTH_THREE_LETTER:case i.MONTH_FULL_NAME:h=c?c[1]:n.getMonth();u.push(e.monthsGenitive&&ut()?e.monthsGenitive[f===3?"namesAbbr":"names"][h]:e.months[f===3?"namesAbbr":"names"][h]);break;case i.MONTH_SINGLE_DIGIT:case i.MONTH_DOUBLE_DIGIT:u.push(o((c?c[1]:n.getMonth())+1,f));break;case i.YEAR_SINGLE_DIGIT:case i.YEAR_DOUBLE_DIGIT:case i.YEAR_FULL:h=c?c[0]:n.getFullYear();f<4&&(h=h%100);u.push(o(h,f));break;case i.HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:s=n.getHours()%12;s===0&&(s=12);u.push(o(s,f));break;case i.HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:u.push(o(n.getHours(),f));break;case i.MINUTES_SINGLE_DIGIT:case i.MINUTES_DOUBLE_DIGIT:u.push(o(n.getMinutes(),f));break;case i.SECONDS_SINGLE_DIGIT:case i.SECONDS_DOUBLE_DIGIT:u.push(o(n.getSeconds(),f));break;case i.MERIDIAN_INDICATOR_SINGLE:case i.MERIDIAN_INDICATOR_FULL:h=n.getHours()<12?e.AM?e.AM[0]:" ":e.PM?e.PM[0]:" ";u.push(f===1?h.charAt(0):h);break;case i.DECISECONDS:case i.CENTISECONDS:case i.MILLISECONDS:u.push(o(n.getMilliseconds(),3).substr(0,f));break;case i.TIME_ZONE_OFFSET_SINGLE_DIGIT:case i.TIME_ZONE_OFFSET_DOUBLE_DIGIT:s=n.getTimezoneOffset()/60;u.push((s<=0?"+":"-")+o(Math.floor(Math.abs(s)),f));break;case i.TIME_ZONE_OFFSET_FULL:s=n.getTimezoneOffset()/60;u.push((s<=0?"+":"-")+o(Math.floor(Math.abs(s)),2)+":"+o(Math.abs(n.getTimezoneOffset()%60),2));break;case i.DATE_SEPARATOR:u.push(e["/"]||"/");break;default:throw"Invalid date format pattern '"+y+"'.";}}return u.join("")}function nt(n,t){return t.length?nt(n[t[0]],t.slice(1)):n}var i;ej.globalize={};ej.cultures={};ej.cultures["default"]=ej.cultures["en-US"]=n.extend(!0,{name:"en-US",englishName:"English",nativeName:"English",language:"en",isRTL:!1,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{"/":"/",":":":",firstDay:0,week:{name:"Week",nameAbbr:"Wek",nameShort:"Wk"},days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],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"}}}},ej.cultures["en-US"]);ej.cultures["en-US"].calendar=ej.cultures["en-US"].calendar||ej.cultures["en-US"].calendars.standard;var tt=/^\s+|\s+$/g,it=/^[+-]?infinity$/i,rt=/^0x[a-f0-9]+$/i,ut=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,y={"9":"[0-9 ]","0":"[0-9 ]",a:"[A-Za-z0-9 ]",A:"[A-Za-z0-9]",N:"[0-9]","#":"[0-9]","&":"[^]+","<":"",">":"",C:"[A-Za-z ]","?":"[A-Za-z]"};i={DAY_OF_WEEK_THREE_LETTER:"ddd",DAY_OF_WEEK_FULL_NAME:"dddd",DAY_OF_MONTH_SINGLE_DIGIT:"d",DAY_OF_MONTH_DOUBLE_DIGIT:"dd",MONTH_THREE_LETTER:"MMM",MONTH_FULL_NAME:"MMMM",MONTH_SINGLE_DIGIT:"M",MONTH_DOUBLE_DIGIT:"MM",YEAR_SINGLE_DIGIT:"y",YEAR_DOUBLE_DIGIT:"yy",YEAR_FULL:"yyyy",HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:"h",HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:"hh",HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:"H",HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:"HH",MINUTES_SINGLE_DIGIT:"m",MINUTES_DOUBLE_DIGIT:"mm",SECONDS_SINGLE_DIGIT:"s",SECONDS_DOUBLE_DIGIT:"ss",MERIDIAN_INDICATOR_SINGLE:"t",MERIDIAN_INDICATOR_FULL:"tt",DECISECONDS:"f",CENTISECONDS:"ff",MILLISECONDS:"fff",TIME_ZONE_OFFSET_SINGLE_DIGIT:"z",TIME_ZONE_OFFSET_DOUBLE_DIGIT:"zz",TIME_ZONE_OFFSET_FULL:"zzz",DATE_SEPARATOR:"/"};ej.globalize._getDateParseRegExp=function(n,t){var e=n._parseRegExp,s,p,o,w,r,b,d;if(e){if(s=e[t],s)return s}else n._parseRegExp=e={};for(var h=k(n,t).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),u=["^"],l=[],c=0,a=0,y=/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g,f;(f=y.exec(h))!==null;){if(p=h.slice(c,f.index),c=y.lastIndex,a+=v(p,u),a%2){u.push(f[0]);continue}o=f[0];w=o.length;switch(o){case i.DAY_OF_WEEK_THREE_LETTER:case i.DAY_OF_WEEK_FULL_NAME:case i.MONTH_FULL_NAME:case i.MONTH_THREE_LETTER:r="(\\D+)";break;case i.MERIDIAN_INDICATOR_FULL:case i.MERIDIAN_INDICATOR_SINGLE:r="(\\D*)";break;case i.YEAR_FULL:case i.MILLISECONDS:case i.CENTISECONDS:case i.DECISECONDS:r="(\\d{"+w+"})";break;case i.DAY_OF_MONTH_DOUBLE_DIGIT:case i.DAY_OF_MONTH_SINGLE_DIGIT:case i.MONTH_DOUBLE_DIGIT:case i.MONTH_SINGLE_DIGIT:case i.YEAR_DOUBLE_DIGIT:case i.YEAR_SINGLE_DIGIT:case i.HOURS_DOUBLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_SINGLE_DIGIT_24_HOUR_CLOCK:case i.HOURS_DOUBLE_DIGIT_12_HOUR_CLOCK:case i.HOURS_SINGLE_DIGIT_12_HOUR_CLOCK:case i.MINUTES_DOUBLE_DIGIT:case i.MINUTES_SINGLE_DIGIT:case i.SECONDS_DOUBLE_DIGIT:case i.SECONDS_SINGLE_DIGIT:r="(\\d\\d?)";break;case i.TIME_ZONE_OFFSET_FULL:r="([+-]?\\d\\d?:\\d{2})";break;case i.TIME_ZONE_OFFSET_DOUBLE_DIGIT:case i.TIME_ZONE_OFFSET_SINGLE_DIGIT:r="([+-]?\\d\\d?)";break;case i.DATE_SEPARATOR:r="(\\"+n["/"]+")";break;default:throw"Invalid date format pattern '"+o+"'.";}r&&u.push(r);l.push(f[0])}return v(h.slice(c),u),u.push("$"),b=u.join("").replace(/\s+/g,"\\s+"),d={regExp:b,groups:l},e[t]=d};ej.globalize.addCulture=function(t,i){ej.cultures[t]=n.extend(!0,n.extend(!0,{},ej.cultures["default"],i),ej.cultures[t]);ej.cultures[t].calendar=ej.cultures[t].calendars.standard};ej.globalize.preferredCulture=function(n){return n=typeof n!="undefined"&&typeof n==typeof this.cultureObject?n.name:n,this.cultureObject=ej.globalize.findCulture(n),this.cultureObject};ej.globalize.setCulture=function(n){return ej.isNullOrUndefined(this.globalCultureObject)&&(this.globalCultureObject=ej.globalize.findCulture(n)),n=typeof n!="undefined"&&typeof n==typeof this.globalCultureObject?n.name:n,n&&(this.globalCultureObject=ej.globalize.findCulture(n)),ej.cultures.current=this.globalCultureObject,this.globalCultureObject};ej.globalize.culture=function(n){ej.cultures.current=ej.globalize.findCulture(n)};ej.globalize.findCulture=function(t){var f,i,e,u,r,o;if(t){if(n.isPlainObject(t)&&t.numberFormat&&(f=t),typeof t=="string"){if(i=ej.cultures,i[t])return i[t];if(t.indexOf("-")>-1){if(e=t.split("-")[0],i[e])return i[e]}else for(u=n.map(i,function(n){return n}),r=0;r<u.length;r++)if(o=u[r].name.split("-")[0],o===t)return u[r];return ej.cultures["default"]}}else f=ej.cultures.current||ej.cultures["default"];return f};ej.globalize.format=function(n,t,i){var r=ej.globalize.findCulture(i);return typeof n=="number"?n=ct(n,t,r):n instanceof Date&&(n=g(n,t,r)),n};ej.globalize._round=function(n,t){var i=Math.pow(10,t);return Math.round(n*i)/i};ej.globalize.parseInt=function(n,t,i){return t||(t=10),Math.floor(b(n,i,t))};ej.globalize.getISODate=function(n){if(n instanceof Date)return n.toISOString()};ej.globalize.parseFloat=function(n,t,i){return typeof t=="string"&&(i=t,t=10),b(n,i)};ej.globalize.parseDate=function(n,t,i){var r,o,f,u,s,e;if(i=ej.globalize.findCulture(i),t){if(typeof t=="string"&&(t=[t]),t.length)for(u=0,s=t.length;u<s;u++)if(e=t[u],e&&(r=d(n,e,i),r))break}else{f=i.calendar.patterns;for(o in f)if(r=d(n,f[o],i),r)break}return r||null};ej.globalize.getLocalizedConstants=function(t,i){var r,u=t.replace("ej.","").split(".");return r=nt(ej,u),n.extend(!0,{},r.Locale["default"],r.Locale[i?i:this.cultureObject.name])};n.extend(ej,ej.globalize)}(jQuery)});