/** * Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui) * Copyright 2018 Telerik AD. All rights reserved. * * Kendo UI commercial licenses may be obtained at * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete * If you do not own a commercial license, this file shall be governed by the trial license terms. */ !function(e,define){define("kendo.core.min",["jquery"],e)}(function(){return function(e,t,n){function i(){}function r(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+e+";$kendoOutput+="}function o(e,t,n){return e+="",t=t||2,n=t-e.length,n?W[t].substring(0,n)+e:e}function a(e){var t=e.css(ve.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Fe)||[0,0,0,0,0]:[0,0,0,0,0],i=xe.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function s(t,n){var i,r,o,a,s,l,d,u=Te.browser,c=ve._outerWidth,h=ve._outerHeight;return t.parent().hasClass("k-animation-container")?(l=t.parent(".k-animation-container"),d=l[0].style,l.is(":hidden")&&l.css({display:"",position:""}),i=Se.test(d.width)||Se.test(d.height),i||l.css({width:n?c(t)+1:c(t),height:h(t),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(r=t[0].style.width,o=t[0].style.height,a=Se.test(r),s=Se.test(o),i=a||s,!a&&(!n||n&&r)&&(r=n?c(t)+1:c(t)),!s&&(!n||n&&o)&&(o=h(t)),t.wrap(e("
").addClass("k-animation-container").css({width:r,height:o})),i&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),u.msie&&xe.floor(u.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function l(e){var t=1,n=arguments.length;for(t=1;t-1)return!0;var t=p(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function m(t,i){var r,o=Te.browser.webkit,a=Te.browser.mozilla,s=t instanceof e?t[0]:t;if(t)return r=Te.isRtl(t),i===n?r&&o?s.scrollWidth-s.clientWidth-s.scrollLeft:Math.abs(s.scrollLeft):(s.scrollLeft=r&&o?s.scrollWidth-s.clientWidth-i:r&&a?-i:i,n)}function g(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function v(e,n,i){var r,o,a;return n||(n="offset"),r=e[n](),o={top:r.top,right:r.right,bottom:r.bottom,left:r.left},Te.browser.msie&&(Te.pointers||Te.msPointers)&&!i&&(a=Te.isRtl(e)?1:-1,o.top-=t.pageYOffset-document.documentElement.scrollTop,o.left-=t.pageXOffset+a*document.documentElement.scrollLeft),o}function _(e){var t={};return be("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function b(e){return new ve.effects.Element(e)}function k(e,t,n,i){return typeof e===Ie&&(R(t)&&(i=t,t=400,n=!1),R(n)&&(i=n,n=!1),typeof t===He&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),_e({effects:{},duration:400,reverse:!1,init:ye,teardown:ye,hide:!1},e,{completeCallback:e.complete,complete:ye})}function w(t,n,i,r,o){for(var a,s=0,l=t.length;s-1||t.is(":visible")}function F(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&E(e)}function E(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function A(e,t){return new A.fn.init(e,t)}var I,R,M,z,H,N,B,P,L,O,V,W,U,q,j,G,$,K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de,ue,ce,he,pe,fe,me,ge,ve=t.kendo=t.kendo||{cultures:{}},_e=e.extend,be=e.each,ke=e.isArray,we=e.proxy,ye=e.noop,xe=Math,Ce=t.JSON||{},Te={},Se=/%/,De=/\{(\d+)(:[^\}]+)?\}/g,Fe=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Ee=/^(\+|-?)\d+(\.?)\d*$/,Ae="function",Ie="string",Re="number",Me="object",ze="null",He="boolean",Ne="undefined",Be={},Pe={},Le=[].slice;ve.version="2018.1.117".replace(/^\s+|\s+$/g,""),i.extend=function(e){var t,n,i=function(){},r=this,o=e&&e.init?e.init:function(){r.apply(this,arguments)};i.prototype=r.prototype,n=o.fn=o.prototype=new i;for(t in e)n[t]=null!=e[t]&&e[t].constructor===Object?_e(!0,{},i.prototype[t],e[t]):e[t];return n.constructor=o,o.extend=r.extend,o},i.prototype._initOptions=function(e){this.options=l({},this.options,e)},R=ve.isFunction=function(e){return"function"==typeof e},M=function(){this._defaultPrevented=!0},z=function(){return this._defaultPrevented===!0},H=i.extend({init:function(){this._events={}},bind:function(e,t,i){var r,o,a,s,l,d=this,u=typeof e===Ie?[e]:e,c=typeof t===Ae;if(t===n){for(r in e)d.bind(r,e[r]);return d}for(r=0,o=u.length;r=0;i--)o[i]!==t&&o[i].original!==t||o.splice(i,1);else r._events[e]=[];return r}}),N=/^\w+/,B=/\$\{([^}]*)\}/g,P=/\\\}/g,L=/__CURLY__/g,O=/\\#/g,V=/__SHARP__/g,W=["","0","00","000","0000"],I={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,r="";for(n=0,i=t.length;n99&&(r=xe.floor(r/10)),r=o(r)):"fff"===t?r=o(e.getMilliseconds(),3):"tt"===t?r=e.getHours()<12?a.AM[0]:a.PM[0]:"zzz"===t?(i=e.getTimezoneOffset(),d=i<0,r=(""+xe.abs(i/60)).split(".")[0],i=xe.abs(i)-60*r,r=(d?"+":"-")+o(r),r+=":"+o(i)):"zz"!==t&&"z"!==t||(r=e.getTimezoneOffset()/60,d=r<0,r=(""+xe.abs(r)).split(".")[0],r=(d?"+":"-")+("zz"===t?o(r):r)),r!==n?r:t.slice(1,t.length-1)})}function a(e,t,r){r=i(r);var o,a,d,u,k,w,y,x,C,T,S,D,F,E,A,I,R,M,z,H,N,B,P,L=r.numberFormat,O=L[m],V=L.decimals,W=L.pattern[0],U=[],q=e<0,j=f,G=f,$=-1;if(e===n)return f;if(!isFinite(e))return e;if(!t)return r.name.length?e.toLocaleString():""+e;if(k=c.exec(t)){if(t=k[1].toLowerCase(),a="c"===t,d="p"===t,(a||d)&&(L=a?L.currency:L.percent,O=L[m],V=L.decimals,o=L.symbol,W=L.pattern[q?0:1]),u=k[2],u&&(V=+u),"e"===t)return u?e.toExponential(V):e.toExponential();if(d&&(e*=100),e=l(e,V),q=e<0,e=e.split(m),w=e[0],y=e[1],q&&(w=w.substring(1)),G=s(w,0,w.length,L),y&&(G+=O+y),"n"===t&&!q)return G;for(e=f,T=0,S=W.length;T-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(h,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return U.push(n),b})),t=t.split(";"),q&&t[1])t=t[1],E=!0;else if(0===e){if(t=t[2]||t[0],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(H=t.indexOf("%"),N=t.indexOf("$"),d=H!=-1,a=N!=-1,d&&(e*=100),a&&"\\"===t[N-1]&&(t=t.split("\\").join(""),a=!1),(a||d)&&(L=a?L.currency:L.percent,O=L[m],V=L.decimals,o=L.symbol),F=t.indexOf(g)>-1,F&&(t=t.replace(p,f)),A=t.indexOf(m),S=t.length,A!=-1?(y=(""+e).split("e"),y=y[1]?l(e,Math.abs(y[1])):y[0],y=y.split(m)[1]||f,R=t.lastIndexOf(_)-A,I=t.lastIndexOf(v)-A,M=R>-1,z=I>-1,T=y.length,M||z||(t=t.substring(0,A)+t.substring(A+1),S=t.length,A=-1,T=0),M&&R>I?T=R:I>R&&(z&&T>I?T=I:M&&T-1&&(e=l(e,T))):e=l(e),I=t.indexOf(v),B=R=t.indexOf(_),$=I==-1&&R!=-1?R:I!=-1&&R==-1?I:I>R?R:I,I=t.lastIndexOf(v),R=t.lastIndexOf(_),P=I==-1&&R!=-1?R:I!=-1&&R==-1?I:I>R?I:R,$==S&&(P=$),$!=-1){for(G=(""+e).split(m),w=G[0],y=G[1]||f,x=w.length,C=y.length,q&&e*-1>=0&&(q=!1),e=t.substring(0,$),q&&!E&&(e+="-"),T=$;T-1&&(e+=w,T=A),A===T){e+=(y?O:f)+y,T+=P-A+1;continue}D===_?(e+=D,j=D):D===v&&(e+=j)}if(F&&(e=s(e,$+(q&&!E?1:0),Math.max(P,x+$),L)),P>=$&&(e+=t.substring(P+1)),a||d){for(G=f,T=0,S=e.length;T=p){for(s=a,l=[];s>-1;)if(d=o.substring(s-p,s),d&&l.push(d),s-=p,u=h.shift(),p=u!==n?u:p,0===p){s>0&&l.push(o.substring(0,s));break}o=l.reverse().join(r[g]),e=e.substring(0,t)+o+e.substring(i)}return e},l=function(e,t){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},d=function(e,t,i){if(t){if("[object Date]"===w.call(e))return r(e,t,i);if(typeof e===Re)return a(e,t,i)}return e!==n?e:""},ve.format=function(e){var t=arguments;return e.replace(De,function(e,n,i){var r=t[parseInt(n,10)+1];return d(r,i?i.substring(1):"")})},ve._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ve._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ve._round=l,ve._outerWidth=function(t,n){return e(t).outerWidth(n||!1)||0},ve._outerHeight=function(t,n){return e(t).outerHeight(n||!1)||0},ve.toString=d}(),function(){function t(e,t,n){return!(e>=t&&e<=n)}function i(e){return e.charAt(0)}function r(t){return e.map(t,i)}function o(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function a(e){for(var t=0,n=e.length,i=[];t0&&(B-=1),t},S=function(t){var n=k[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(P,t).match(n);return i?(i=i[0],P+=i.length,parseInt(i,10)):null},D=function(t,n){for(var i,r,o,a=0,s=t.length,l=0,d=0;al&&(l=r,d=a);return l?(P+=l,d+1):null},F=function(){var t=!1;return e.charAt(P)===i[B]&&(P++,t=!0),t},E=a.calendars.standard,A=null,I=null,R=null,M=null,z=null,H=null,N=null,B=0,P=0,L=!1,O=new Date,V=E.twoDigitYearMax||2029,W=O.getFullYear();for(i||(i="d"),h=E.patterns[i],h&&(i=h),i=i.split(""),c=i.length;B2)continue;if(R=u<3?S(2):D(E._lowerDays[3==u?"namesAbbr":"names"],!0),null===R||t(R,1,31))return null}else if("M"===d){if(u=T("M"),E._lowerMonths||(E._lowerMonths=s(E.months)),I=u<3?S(2):D(E._lowerMonths[3==u?"namesAbbr":"names"],!0),null===I||t(I,1,12))return null;I-=1}else if("y"===d){if(u=T("y"),A=S(u),null===A)return null;2==u&&("string"==typeof V&&(V=W+parseInt(V,10)),A=W-W%100+A,A>V&&(A-=100))}else if("h"===d){if(T("h"),M=S(2),12==M&&(M=0),null===M||t(M,0,11))return null}else if("H"===d){if(T("H"),M=S(2),null===M||t(M,0,23))return null}else if("m"===d){if(T("m"),z=S(2),null===z||t(z,0,59))return null}else if("s"===d){if(T("s"),H=S(2),null===H||t(H,0,59))return null}else if("f"===d){if(u=T("f"),C=e.substr(P,u).match(k[3]),N=S(u),null!==N&&(N=parseFloat("0."+C[0],10),N=ve._round(N,3),N*=1e3),null===N||t(N,0,999))return null}else if("t"===d){if(u=T("t"),_=E.AM,b=E.PM,1===u&&(_=r(_),b=r(b)),p=D(b),!p&&!D(_))return null}else if("z"===d){if(g=!0,u=T("z"),"Z"===e.substr(P,1)){F();continue}if(v=e.substr(P,6).match(u>2?m:f),!v)return null;if(v=v[0].split(":"),w=v[0],y=v[1],!y&&w.length>3&&(P=w.length-2,y=w.substring(P),w=w.substring(0,P)),w=parseInt(w,10),t(w,-12,13))return null;if(u>2&&(y=parseInt(y,10),isNaN(y)||t(y,0,59)))return null}else if("'"===d)L=!0,F();else if(!F())return null;return l&&!/^\s*$/.test(e.substr(P))?null:(x=null!==M||null!==z||H||null,null===A&&null===I&&null===R&&x?(A=W,I=O.getMonth(),R=O.getDate()):(null===A&&(A=W),null===R&&(R=1)),p&&M<12&&(M+=12),g?(w&&(M+=-w),y&&(z+=-y),e=new Date(Date.UTC(A,I,R,M,z,H,N))):(e=new Date(A,I,R,M,z,H,N),o(e,M)),A<100&&e.setFullYear(A),e.getDate()!==R&&g===n?null:e)}function d(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),e=60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10),t*e}function u(e){var t,n,i,r=xe.max(_.length,b.length),o=e.calendar.patterns,a=[];for(i=0;i0?null:(u=u>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(o=s,i=o.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),u=!0)):e.indexOf(d)>-1&&(r=!0,o=a,l=d),e=e.replace("-","").replace(l,"").replace(h," ").split(o[","].replace(h," ")).join("").replace(o["."],"."),e=parseFloat(e),isNaN(e)?e=null:u&&(e*=-1),e&&r&&(e/=100),e)}}(),function(){var i,r,o,a,s,l,d,c,h;Te._scrollbar=n,Te.scrollbar=function(e){if(isNaN(Te._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML=" ",document.body.appendChild(n),Te._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return Te._scrollbar},Te.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="",Te.tbodyInnerHtml=!0}catch(p){Te.tbodyInnerHtml=!1}Te.touch="ontouchstart"in t,r=document.documentElement.style,o=Te.transitions=!1,a=Te.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[],Te.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in r||"msPerspective"in r,Te.cssFlexbox="flexWrap"in r||"WebkitFlexWrap"in r||"msFlexWrap"in r,be(["Moz","webkit","O","ms"],function(){var e,t=""+this,n=typeof i.style[t+"Transition"]===Ie;if(n||typeof i.style[t+"Transform"]===Ie)return e=t.toLowerCase(),a={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},n&&(o=a,o.event=o.event?o.event+"TransitionEnd":"transitionend"),!1}),i=null,Te.transforms=a,Te.transitions=o,Te.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{Te.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,Te.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(p){Te.screenWidth=t.screen.availWidth,Te.screenHeight=t.screen.availHeight}Te.detectOS=function(e){var n,i,r=!1,o=[],a=!/mobile safari/i.test(e),s={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},l={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},d={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(i in s)if(s.hasOwnProperty(i)&&(o=e.match(s[i]))){if("windows"==i&&"plugins"in navigator)return!1;r={},r.device=i,r.tablet=u(i,d,!1),r.browser=u(e,c,"default"),r.name=u(i,l),r[r.name]=!0,r.majorVersion=o[2],r.minorVersion=o[3].replace("_","."),n=r.minorVersion.replace(".","").substr(0,2),r.flatVersion=r.majorVersion+n+Array(3-(n.length<3?n.length:2)).join("0"),r.cordova=typeof t.PhoneGap!==Ne||typeof t.cordova!==Ne,r.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||r.cordova,r.android&&(Te.devicePixelRatio<1.5&&r.flatVersion<400||a)&&(Te.screenWidth>800||Te.screenHeight>800)&&(r.tablet=i);break}return r},l=Te.mobileOS=Te.detectOS(navigator.userAgent),Te.wpDevicePixelRatio=l.wp?screen.width/320:0,Te.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(Te.hasNativeScrolling=l),Te.delayedClick=function(){if(Te.touch){if(l.ios)return!0;if(l.android)return!Te.browser.chrome||!(Te.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},Te.mouseAndTouchPresent=Te.touch&&!(Te.mobileOS.ios||Te.mobileOS.android),Te.detectBrowser=function(e){var t,n=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in r)if(r.hasOwnProperty(t)&&(i=e.match(r[t]))){n={},n[t]=!0,n[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},Te.browser=Te.detectBrowser(navigator.userAgent),Te.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return Te.browser.chrome&&(e.paste=!1,Te.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},Te.clipboard=Te.detectClipboardAccess(),Te.zoomLevel=function(){var e,n,i;try{return e=Te.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!Te.touch&&(n=Te.scrollbar()),Te.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(r){return 1}},Te.cssBorderSpacing=n!==r.borderSpacing&&!(Te.browser.msie&&Te.browser.version<8),function(t){var n="",i=e(document.documentElement),r=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera?n="opera":t.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+r),Te.mobileOS&&(n+=" k-mobile"),Te.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(Te.browser),Te.eventCapture=document.documentElement.addEventListener,d=document.createElement("input"),Te.placeholder="placeholder"in d,Te.propertyChangeEvent="onpropertychange"in d,Te.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",r={},o=0;ot.field?1:e.field/g,Q=function(e){return e.target},Te.touch&&(Q=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},be(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),Te.touch?Te.mobileOS?(Te.mousedown="touchstart",Te.mouseup="touchend",Te.mousemove="touchmove",Te.mousecancel="touchcancel",Te.click="touchend",Te.resize="orientationchange"):(Te.mousedown="mousedown touchstart",Te.mouseup="mouseup touchend",Te.mousemove="mousemove touchmove",Te.mousecancel="mouseleave touchcancel",Te.click="click",Te.resize="resize"):Te.pointers?(Te.mousemove="pointermove",Te.mousedown="pointerdown",Te.mouseup="pointerup",Te.mousecancel="pointercancel",Te.click="pointerup",Te.resize="orientationchange resize"):Te.msPointers?(Te.mousemove="MSPointerMove",Te.mousedown="MSPointerDown",Te.mouseup="MSPointerUp",Te.mousecancel="MSPointerCancel",Te.click="MSPointerUp",Te.resize="orientationchange resize"):(Te.mousemove="mousemove",Te.mousedown="mousedown",Te.mouseup="mouseup",Te.mousecancel="mouseleave",Te.click="click",Te.resize="resize"),X=function(e,t){var n,i,r,o,a=t||"d",s=1;for(i=0,r=e.length;i0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},getSize:function(){return ve.dimensions(this.element)},size:function(e){return e?(this.setSize(e),n):this.getSize()},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(e){this._muteRebind=!0,e.call(this),this._muteRebind=!1}}),ee=Z.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(t){var n=this;n.angular(t,function(){return{elements:n.items(),data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})}}),ve.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ve.notify=ye,te=/template$/i,ne=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ie=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,re=/([A-Z])/g,ve.initWidget=function(i,r,o){var a,s,l,d,u,c,h,p,f,m,g,v,_;if(o?o.roles&&(o=o.roles):o=ve.ui.roles,i=i.nodeType?i:i[0],c=i.getAttribute("data-"+ve.ns+"role")){f=c.indexOf(".")===-1,l=f?o[c]:ve.getter(c)(t),g=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",m=f?RegExp("^kendo.*"+c+"$","i"):RegExp("^"+v+"$","i");for(_ in g)if(_.match(m)){if(_!==v)return g[_];a=g[_]}if(l){for(p=C(i,"dataSource"),r=e.extend({},T(i,l.fn.options),r),p&&(r.dataSource=typeof p===Ie?ve.getter(p)(t):p),d=0,u=l.fn.events.length;d{1}
",l,ve.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(o,Math.abs(s)+a).prependTo(t)):d&&d.remove()},plugin:function(t,i,r){var o,a,s,l,d=t.fn.options.name;for(i=i||ve.ui,r=r||"",i[d]=t,i.roles[d.toLowerCase()]=t,o="getKendo"+r+d,d="kendo"+r+d,a={name:d,widget:t,prefix:r||""},ve.widgets.push(a),s=0,l=ve._widgetRegisteredCallbacks.length;s=0&&(l=[ve.getter(s)(t)]),i=0,r=l.length;i-1)}}),se=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],le="label, input, [data-rel=external]",de={setupMouseMute:function(){var t,n=0,i=se.length,r=document.documentElement;if(!de.mouseTrap&&Te.eventCapture)for(de.mouseTrap=!0,de.bustClick=!1,de.captureMouse=!1,t=function(t){de.captureMouse&&("click"===t.type?de.bustClick&&!e(t.target).is(le)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};n-1&&this[0]!==document.documentElement&&(de.setupMouseMute(),r=2===t.length?null:t[1],o=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,pe.call(this,{touchstart:de.muteMouse,touchend:de.unMuteMouse},r,{bustClick:o})),typeof n===Ie&&(e=a.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,pe.apply(a,t),a)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ve.jQuery=A,ve.eventMap=ue,ve.timezone=function(){function e(e,t){var n,i,r,o=t[3],a=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(a)?0===a.indexOf("last")?(n=new Date(Date.UTC(e,u[o]+1,1,s[0]-24,s[1],s[2],0)),i=c[a.substr(4,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):a.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,u[o],a.substr(5),s[0],s[1],s[2],0)),i=c[a.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r+(i=a||t==a&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(a,t)),"number"!=typeof n&&(n=+e(a,n)),t-n}),s=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(s)?s:null):(r=i.split(":"),o=0,r.length>1&&(o=60*r[0]+ +r[1]),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"])}function n(e,t,n){var i,r,o,a=t[n];if("string"==typeof a&&(a=t[a]),!a)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=a.length-1;i>=0&&(r=a[i][3],!(r&&e>r));i--);if(o=a[i+1],!o)throw Error('Timezone "'+n+'" not found on '+e+".");return o}function i(e,i,r,o){typeof e!=Re&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,i,o);return{zone:a,rule:t(e,r,a[1])}}function r(e,t){var n,r,o;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,ve.parseFloat(o?r[0]-o[6]:r[0]))}function o(e,t){var n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,a=r[2];return a.indexOf("/")>=0?a.split("/")[o&&+o[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",o&&"-"!=o[7]?o[7]:""):a}function a(e,t,n){var i,r,o,a=n;return typeof t==Ie&&(t=this.offset(e,t)),typeof n==Ie&&(n=this.offset(e,n)),r=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),o=e.getTimezoneOffset(),typeof a==Ie&&(a=this.offset(e,a)),i=o-r+(n-a),new Date(e.getTime()+6e4*i)}function s(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}function d(e){return this.apply(new Date(e),"Etc/UTC")}var u={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},c={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:r,convert:a,apply:s,remove:l,abbr:o,toLocalDate:d}}(),ve.date=function(){function e(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function t(t,n,i){var r=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,r)}function i(e,n,i){return e=new Date(e),t(e,n,i),e}function r(e){return new Date(e.getFullYear(),e.getMonth(),1)}function o(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=r(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t}function a(e,t){return 1!==t?f(i(e,t,-1),4):f(e,4-(e.getDay()||7))}function s(e,t){var n=new Date(e.getFullYear(),0,1,(-6)),i=a(e,t),r=i.getTime()-n.getTime(),o=Math.floor(r/w);return 1+Math.floor(o/7)}function l(e,t){var i,r,o;return t===n&&(t=ve.culture().calendar.firstDay),i=f(e,-7),r=f(e,7),o=s(e,t),0===o?s(i,t)+1:53===o&&s(r,t)>1?1:o}function d(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function u(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function c(e){return b(e).getTime()-d(b(e))}function h(e,t,n){var i,r=c(t),o=c(n);return!e||r==o||(t>=n&&(n+=w),i=c(e),r>i&&(i+=w),o=r&&i<=o)}function p(e,t,n){var i,r=t.getTime(),o=n.getTime();return r>=o&&(o+=w),i=e.getTime(),i>=r&&i<=o}function f(t,n){var i=t.getHours();return t=new Date(t),m(t,n*w),e(t,i),t}function m(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*k))}function g(t,n){return t=new Date(ve.date.getDate(t).getTime()+ve.date.getMilliseconds(n)),e(t,n.getHours()),t}function v(){return d(new Date)}function _(e){return d(e).getTime()==v().getTime()}function b(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var k=6e4,w=864e5;return{adjustDST:e,dayOfWeek:i,setDayOfWeek:t,getDate:d,isInDateRange:p,isInTimeRange:h,isToday:_,nextDay:function(e){return f(e,1)},previousDay:function(e){return f(e,-1)},toUtcTime:u,MS_PER_DAY:w,MS_PER_HOUR:60*k,MS_PER_MINUTE:k,setTime:m,setHours:g,addDays:f,today:v,toInvariantTime:b,firstDayOfMonth:r,lastDayOfMonth:o,weekInYear:l,getMilliseconds:c}}(),ve.stripWhitespace=function(e){var t,n,i;if(document.createNodeIterator)for(t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(n=0;nt?r():i=setTimeout(r,t-s),n):r()},r.cancel=function(){clearTimeout(i)},r)},ve.caret=function(t,i,r){var o,a,s,l,d,u=i!==n;if(r===n&&(r=i),t[0]&&(t=t[0]),!u||!t.disabled){try{t.selectionStart!==n?u?(t.focus(),a=Te.mobileOS,a.wp||a.android?setTimeout(function(){t.setSelectionRange(i,r)},0):t.setSelectionRange(i,r)):i=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),o=t.createTextRange(),u?(o.collapse(!0),o.moveStart("character",i),o.moveEnd("character",r-i),o.select()):(s=o.duplicate(),o.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",o),l=s.text.length,d=l+o.text.length,i=[l,d]))}catch(c){i=[]}return i}},ve.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+ve.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(e).injector().invoke(["$compile",function(t){t(e)(n),/^\$(digest|apply)$/.test(n.$$phase)||n.$digest()}]),ve.widgetInstance(e,ve.mobile.ui)},ve.antiForgeryTokens=function(){var t={},i=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),r=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),r!==n&&i!==n&&(t[r]=i),t},ve.cycleForm=function(e){function t(e){var t=ve.widgetInstance(e);t&&t.focus?t.focus():e.focus()}var n=e.find("input, .k-widget").first(),i=e.find("button, .k-button").last();i.on("keydown",function(e){e.keyCode!=ve.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==ve.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},ve.focusElement=function(n){var i=[],r=n.parentsUntil("body").filter(function(e,t){var n=ve.getComputedStyles(t,["overflow"]);return"visible"!==n.overflow}).add(t);r.each(function(t,n){i[t]=e(n).scrollTop()});try{n[0].setActive()}catch(o){n[0].focus()}r.each(function(t,n){e(n).scrollTop(i[t])})},function(){function n(t,n,i,r){var o,a,s=e("
").attr({action:i,method:"POST",target:r}),l=ve.antiForgeryTokens();l.fileName=n,o=t.split(";base64,"),l.contentType=o[0].replace("data:",""),l.base64=o[1];for(a in l)l.hasOwnProperty(a)&&e("").attr({value:l[a],name:a,type:"hidden"}).appendTo(s);s.appendTo("body").submit().remove()}function i(e,t){var n,i,r,o,a,s=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],r=atob(n[1]),o=new Uint8Array(r.length),a=0;a-1&&t.indexOf("#!")<0?null:t.split(e)[1]||""}function o(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):t}function a(e){return e.replace(/^(#)?/,"#")}function s(e){return e.replace(/^(#(!)?)?/,"#!")}var l=window.kendo,d="change",u="back",c="same",h=l.support,p=window.location,f=window.history,m=50,g=l.support.browser.msie,v=/^#*/,_=window.document,b=l.Class.extend({back:function(){g?setTimeout(function(){f.back()}):f.back()},forward:function(){g?setTimeout(function(){f.forward()}):f.forward()},length:function(){return f.length},replaceLocation:function(e){p.replace(e)}}),k=b.extend({init:function(e){this.root=e},navigate:function(e){f.pushState({},_.title,n(e,this.root))},replace:function(e){f.replaceState({},_.title,n(e,this.root))},normalize:function(e){return o(this.root,e)},current:function(){var e=p.pathname;return p.search&&(e+=p.search),o(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,o=e.root,a=p.pathname,s=r(i(e.hashBang));o===a+"/"&&(t=o),o===a&&s&&(t=n(s.replace(v,""),o)),t&&f.pushState({},_.title,t)}}),w=b.extend({init:function(e){this._id=l.guid(),this.prefix=i(e),this.fix=e?s:a},navigate:function(e){p.hash=this.fix(e)},replace:function(e){this.replaceLocation(this.fix(e))},normalize:function(e){return e.indexOf(this.prefix)<0?e:e.split(this.prefix)[1]},change:function(t){h.hashChange?e(window).on("hashchange."+this._id,t):this._interval=setInterval(t,m)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return r(this.prefix)},normalizeCurrent:function(e){var t=p.pathname,n=e.root;return!(!e.pushState||n===t)&&(this.replaceLocation(n+this.prefix+o(n,t)),!0)}}),y=l.Observable.extend({start:function(t){if(t=t||{},this.bind([d,u,c],t),!this._started){this._started=!0,t.root=t.root||"/";var n,i=this.createAdapter(t);i.normalizeCurrent(t)||(n=i.current(),e.extend(this,{adapter:i,root:t.root,historyLength:i.length(),current:n,locations:[n]}),i.change(e.proxy(this,"_checkUrl")))}},createAdapter:function(e){return h.pushState&&e.pushState?new k(e.root):new w(e.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(d),this._started=!1)},change:function(e){this.bind(d,e)},replace:function(e,t){this._navigate(e,t,function(t){t.replace(e),this.locations[this.locations.length-1]=this.current})},navigate:function(e,n){return"#:back"===e?(this.backCalled=!0,this.adapter.back(),t):(this._navigate(e,n,function(t){t.navigate(e),this.locations.push(this.current)}),t)},_navigate:function(e,n,i){var r=this.adapter;return e=r.normalize(e),this.current===e||this.current===decodeURIComponent(e)?(this.trigger(c),t):(!n&&this.trigger(d,{url:e,decode:!1})||(this.current=e,i.call(this,r),this.historyLength=r.length()),t)},_checkUrl:function(){var e=this.adapter,n=e.current(),i=e.length(),r=this.historyLength===i,o=n===this.locations[this.locations.length-2]&&r,a=this.backCalled,s=this.current;return null===n||this.current===n||this.current===decodeURIComponent(n)||(this.historyLength=i,this.backCalled=!1,this.current=n,o&&this.trigger("back",{url:s,to:n})?(e.forward(),this.current=s,t):this.trigger(d,{url:n,backButtonPressed:!a})?(o?e.forward():(e.back(),this.historyLength--),this.current=s,t):(o?this.locations.pop():this.locations.push(n),t))}});l.History=y,l.History.HistoryAdapter=b,l.History.HashAdapter=w,l.History.PushStateAdapter=k,l.absoluteURL=n,l.history=new y}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t,n){return RegExp("^"+t.replace(f,"\\$&").replace(c,"(?:$1)?").replace(h,e).replace(p,"(.*?)")+"$",n?"i":"")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,r=i.history,o=i.Observable,a="init",s="routeMissing",l="change",d="back",u="same",c=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,m=i.Class.extend({init:function(e,n,i){e instanceof RegExp||(e=t(e,i)),this.route=e,this._callback=n},callback:function(e,t,r){var o,a,s=0,l=i.parseQueryStringParams(e);if(l._back=t,e=n(e),o=this.route.exec(e).slice(1),a=o.length,r)for(;s3?"substringof"!==i?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===u&&(r?(d="{0}({2},'{1}') eq -1",i="indexof"):d+=" eq false")):d="{2} {0} "+d,i=m.format(d,i,c,s))),p.push(i);return i=p.join(" "+f+" "),p.length>1&&(i="("+i+")"),i}function i(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function r(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function o(e){return e+r()+"-"+r()+"-"+r()}function a(e,t){var n=v+"--"+e;return t&&(n+="--"),n}function s(e,t,n,i){var r=e.options[i].url,o=m.format("{0} ",n);return b(r)?o+r(t):o+r}function l(e,t){var n="";return n+=a(e,!1),n+=v+"Content-Type: application/http",n+=v+"Content-Transfer-Encoding: binary",n+=v+"Content-ID: "+t}function d(e){var t="";return t+=v+"Content-Type: application/json;odata=minimalmetadata",t+=v+"Prefer: return=representation",t+=_+m.stringify(e)}function u(e,t,n,i,r,o){var a,u="";for(a=0;a=200&&i<=299?(o=t.match(/\{.*\}/gm),o&&d[d.length-1].models.push(JSON.parse(o[0]))):d[d.length-1].passed=!1);return d}var m=window.kendo,g=e.extend,v="\r\n",_="\r\n\r\n",b=m.isFunction,k={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isempty:"eq",isnotempty:"ne"},w=g({},k,{contains:"contains"}),y={pageSize:e.noop,page:e.noop,filter:function(e,t,i){t&&(t=n(t,i),t&&(e.$filter=t))},sort:function(t,n){var i=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");i&&(t.$orderby=i)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},x={read:{dataType:"jsonp"}};g(!0,m.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t,n){var i,r,o,a;if(e=e||{},t=t||"read",a=(this.options||x)[t],a=a?a.dataType:"json","read"===t){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(o in e)y[o]?y[o](i,e[o],n):i[o]=e[o]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(o in e)r=e[o],"number"==typeof r&&(e[o]=r+"");i=m.stringify(e)}}return i}}}}),g(!0,m.data,{schemas:{"odata-v4":{type:"json",data:function(t){if(e.isArray(t)){for(var n=0;n=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:u,readers:{xml:u}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.min",["kendo.core.min","kendo.data.odata.min","kendo.data.xml.min"],e)}(function(){return function(e,t){function n(e,t,n,i){return function(r){var o,a={};for(o in r)a[o]=r[o];a.field=i?n+"."+r.field:n,t==Fe&&e._notifyChange&&e._notifyChange(a),e.trigger(t,a)}}function i(t,n){if(t===n)return!0;var r,o=e.type(t),a=e.type(n);if(o!==a)return!1;if("date"===o)return t.getTime()===n.getTime();if("object"!==o&&"array"!==o)return!1;for(r in t)if(!i(t[r],n[r]))return!1;return!0}function r(e,t){var n,i;for(i in e){if(n=e[i],ce(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function o(e){this.data=e||[]}function a(e,n){if(e){var i=typeof e===ye?{field:e,dir:n}:e,r=pe(i)?i:i!==t?[i]:[];return fe(r,function(e){return!!e.dir})}}function s(e){var t,n,i,r,o=e.filters;if(o)for(t=0,n=o.length;tt.field?1:e.field=t.length)););s0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e,t){for(var n,i=0,r=[],o=this.length,a=t||window;i=0;if(a)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),r=_e.getter(i,!0)(o),r instanceof q)return r.set(n.join("."),t),a;i+="."}return _e.setter(e)(o,t),a},set:function(e,t){var n=this,i=!1,r=e.indexOf(".")>=0,o=_e.getter(e,!0)(n);return o!==t&&(o instanceof ke&&this._handlers[e]&&(this._handlers[e].get&&o.unbind(Ae,this._handlers[e].get),o.unbind(Fe,this._handlers[e].change)),i=n.trigger("set",{field:e,value:t}),i||(r||(t=n.wrap(t,e,function(){return n})),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(Fe,{field:e}))),i},parent:ve,wrap:function(e,t,i){var r,o,a,s,l=this,d=$e.call(e);return null==e||"[object Object]"!==d&&"[object Array]"!==d||(a=e instanceof Qe,s=e instanceof ie,"[object Object]"!==d||s||a?("[object Array]"===d||a||s)&&(a||s||(e=new Qe(e)),o=n(l,Fe,t,!1),e.bind(Fe,o),l._handlers[t]={change:o}):(e instanceof q||(e=new q(e)),r=n(l,Ae,t,!0),e.bind(Ae,r),o=n(l,Fe,t,!0),e.bind(Fe,o),l._handlers[t]={get:r,change:o}),e.parent=i),e}}),j={number:function(e){return typeof e===ye&&"null"===e.toLowerCase()?null:_e.parseFloat(e)},date:function(e){return typeof e===ye&&"null"===e.toLowerCase()?null:_e.parseDate(e)},"boolean":function(e){return typeof e===ye?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===ye&&"null"===e.toLowerCase()?null:null!=e?e+"":e},"default":function(e){return e}},G={string:"",number:0,date:new Date,"boolean":!1,"default":""},$=q.extend({init:function(n){var i,r,o=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},o.defaults,n),o._initializers))for(i=0;i0&&(c._initializers=f),i=e.extend(c),i.define=function(e){return $.define(i,e)},c.fields&&(i.fields=c.fields,i.idField=c.idField),i},K={selector:function(e){return be(e)?e:Be(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:er?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?1:null==r?-1:r.localeCompare?r.localeCompare(i):i=0?"\\"+r:r}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i){return n("==",e,t,i)},neq:function(e,t,i){return n("!=",e,t,i)},gt:function(e,t,i){return n(">",e,t,i)},gte:function(e,t,i){return n(">=",e,t,i)},lt:function(e,t,i){return n("<",e,t,i)},lte:function(e,t,i){return n("<=",e,t,i)},startswith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == 0"}),doesnotstartwith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == -1"}),endswith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") >= 0"}),doesnotendwith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") < 0"}),contains:t(function(e,t){return e+".indexOf("+t+") >= 0"}),doesnotcontain:t(function(e,t){return e+".indexOf("+t+") == -1"}),matches:t(function(e,t){return t=t.substring(1,t.length-1),i(t)+".test("+e+")"}),doesnotmatch:t(function(e,t){return t=t.substring(1,t.length-1),"!"+i(t)+".test("+e+")"}),isempty:function(e){return e+" === ''"},isnotempty:function(e){return e+" !== ''"},isnull:function(e){return"("+e+" == null)"},isnotnull:function(e){return"("+e+" != null)"}}}(),o.filterExpr=function(e){var n,i,r,a,s,l,d=[],u={and:" && ",or:" || "},c=[],h=[],p=e.filters;for(n=0,i=p.length;n":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},o.normalizeFilter=l,o.compareFilters=h,o.prototype={toArray:function(){return this.data},range:function(e,t){return new o(this.data.slice(e,e+t))},skip:function(e){return new o(this.data.slice(e))},take:function(e){return new o(this.data.slice(0,e))},select:function(e){return new o(W(this.data,e))},order:function(e,t,n){var i={dir:t};return e&&(e.compare?i.compare=e.compare:i.field=e),new o(n?this.data.sort(K.create(i)):this.data.slice(0).sort(K.create(i)))},orderBy:function(e,t){return this.order(e,"asc",t)},orderByDescending:function(e,t){return this.order(e,"desc",t)},sort:function(e,t,n,i){var r,o,s=a(e,t),l=[];if(n=n||K,s.length){for(r=0,o=s.length;r0&&(n=e[0],r=r.groupBy(n).select(function(i){var r=new o(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new o(i.items).group(e.slice(1),r.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:r.aggregate(n.aggregates)}})),r},groupBy:function(e){if(he(e)||!this.data.length)return new o([]);var t,n,i,r,a=e.field,s=this._sortForGrouping(a,e.dir||"asc"),l=_e.accessor(a),d=l.get(s[0],a),u={field:a,value:d,items:[]},c=[u];for(i=0,r=s.length;ii&&(v(i)||_(i))&&(e=i),e}},o.process=function(e,n,i){n=n||{};var r,s=new o(e),l=n.group,d=f(l||[]).concat(a(n.sort||[])),u=n.filterCallback,c=n.filter,h=n.skip,p=n.take;return c&&(s=s.filter(c),u&&(s=u(s)),r=s.toArray().length),d&&(s=i?s.sort(d,t,t,i):s.sort(d),l&&(e=s.toArray())),h!==t&&p!==t&&(s=s.range(h,p)),l&&(s=s.group(l,e)),{total:r,data:s.toArray()}},Z=we.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),ee=we.extend({init:function(e){var t,n=this;e=n.options=de({},n.options,e),ge(He,function(t,n){typeof e[n]===ye&&(e[n]={url:e[n]})}),n.cache=e.cache?te.create(e.cache):{find:ve,add:ve},t=e.parameterMap,n.submit=e.submit,be(e.push)&&(n.push=e.push),n.push||(n.push=Ne),n.parameterMap=be(t)?t:function(e){var n={};return ge(e,function(e,i){e in t&&(e=t[e],ce(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Ne},create:function(e){return me(this.setup(e,Ce))},read:function(n){var i,r,o,a=this,s=a.cache;n=a.setup(n,Te),i=n.success||ve,r=n.error||ve,o=s.find(n.data),o!==t?i(o):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return me(this.setup(e,Se))},destroy:function(e){return me(this.setup(e,De))},setup:function(e,t){e=e||{};var n,i=this,r=i.options[t],o=be(r.data)?r.data(e.data):r.data;return e=de(!0,{},r,e),n=de(!0,{},o,e.data),e.data=i.parameterMap(n,t),be(e.url)&&(e.url=e.url(n)),e}}),te=we.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Pe(e)]=n)},find:function(e){return this._store[Pe(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Pe(e)]}}),te.create=function(e){var t={inmemory:function(){return new te}};return ce(e)&&be(e.find)?e:e===!0?new te:t[e]()},ne=we.extend({init:function(e){var t,n,i,r,o,a,s,l,d,u,c,h,p,f=this;e=e||{};for(t in e)n=e[t],f[t]=typeof n===ye?Be(n):n;r=e.modelBase||$,ce(f.model)&&(f.model=i=r.define(f.model)),o=ue(f.data,f),f._dataAccessFunction=o,f.model&&(a=ue(f.groups,f),s=ue(f.serialize,f),l={},d={},u={},c={},h=!1,i=f.model,i.fields&&(ge(i.fields,function(e,t){var n;p=e,ce(t)&&t.field?p=t.field:typeof t===ye&&(p=t),ce(t)&&t.from&&(n=t.from),h=h||n&&n!==e||p!==e,d[e]=Be(n||p),u[e]=Be(e),l[n||p]=e,c[e]=n||p}),!e.serialize&&h&&(f.serialize=x(s,i,k,u,l,c))),f._dataAccessFunction=o,f.data=x(o,i,w,d,l,c),f.groups=x(a,i,y,d,l,c))},errors:function(e){return e?e.errors:null},parse:Ne,data:Ne,total:function(e){return e.length},groups:Ne,aggregates:function(){return{}},serialize:function(e){return e}}),ie=ke.extend({init:function(e){var n,i,r,o=this;e&&(i=e.data),e=o.options=de({},o.options,e),o._map={},o._prefetch={},o._data=[],o._pristineData=[],o._ranges=[],o._view=[],o._pristineTotal=0,o._destroyed=[],o._pageSize=e.pageSize,o._page=e.page||(e.pageSize?1:t),o._sort=a(e.sort),o._filter=l(e.filter),o._group=f(e.group),o._aggregate=e.aggregate,o._total=e.total,o._shouldDetachObservableParents=!0,ke.fn.init.call(o),o.transport=re.create(e,i,o),be(o.transport.push)&&o.transport.push({pushCreate:ue(o._pushCreate,o),pushUpdate:ue(o._pushUpdate,o),pushDestroy:ue(o._pushDestroy,o)}),null!=e.offlineStorage&&("string"==typeof e.offlineStorage?(r=e.offlineStorage,o._storage={getItem:function(){return JSON.parse(localStorage.getItem(r))},setItem:function(e){localStorage.setItem(r,Pe(o.reader.serialize(e)))}}):o._storage=e.offlineStorage),o.reader=new _e.data.readers[e.schema.type||"json"](e.schema),n=o.reader.model||{},o._detachObservableParents(),o._data=o._observe(o._data),o._online=!0,o.bind(["push",Ie,Fe,Re,Ee,ze,Me],e)},options:{data:null,schema:{modelBase:$},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1,inPlaceSort:!1},clone:function(){return this},online:function(n){return n!==t?this._online!=n&&(this._online=n,n)?this.sync():e.Deferred().resolve().promise():this._online},offlineData:function(e){return null==this.options.offlineStorage?null:e!==t?this._storage.setItem(e):this._storage.getItem()||[]},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_pushCreate:function(e){this._push(e,"pushCreate")},_pushUpdate:function(e){this._push(e,"pushUpdate")},_pushDestroy:function(e){this._push(e,"pushDestroy")},_push:function(e,t){var n=this._readData(e);n||(n=e),this[t](n)},_flatData:function(e,t){if(e){if(this._isServerGrouped())return T(e);if(!t)for(var n=0;n-1)return t(i,n),!0})},_removePristineForModel:function(e){this._executeOnPristineForModel(e,function(e,t){t.splice(e,1)})},_readData:function(e){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t.call(this.reader,e)},_eachPristineItem:function(e){this._eachItem(this._pristineData,e)},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?D(e,t):t(e))},_pristineForModel:function(e){var t,n,i=function(i){if(n=R(i,e),n>-1)return t=i[n],!0};return this._eachPristineItem(i),t},_cancelModel:function(e){var t=this,n=this._pristineForModel(e);this._eachItem(this._data,function(i){var r=M(i,e);r>=0&&(!n||e.isNew()&&!n.__state__?(i.splice(r,1),t._removeModelFromRanges(e)):(i[r].accept(n),"update"==n.__state__&&(i[r].dirty=!0)))})},_submit:function(t,n){var i=this;i.trigger(Re,{type:"submit"}),i.trigger(Me),i.transport.submit(de({success:function(n,i){var r=e.grep(t,function(e){return e.type==i})[0];r&&r.resolve({response:n,models:r.models,type:i})},error:function(e,n,r){for(var o=0;o1?arguments[1]:t,e=h._readData(e,n),h._destroyed=[]}else{for(e=h._readData(e),i=[],r={},o=h.reader.model,a=o?o.idField:"id",s=0;s0?(r=this.pageSize(),n.page=n.pageSize/r,n.pageSize=r):(n.page=1,this.options.endless=!1)),this.read(this._mergeState(n))):(o=this.trigger(Re,{type:"read"}),o||(this.trigger(Me),i=this._queryProcess(this._data,this._mergeState(n)),this.options.serverFiltering||(this._total=i.total!==t?i.total:this._data.length),this._aggregateResult=this._calculateAggregates(this._data,n),this.view(i.data),this.trigger(ze,{type:"read"}),this.trigger(Fe,{items:i.data})),e.Deferred().resolve(o).promise())},fetch:function(e){var t=this,n=function(n){n!==!0&&be(e)&&e.call(t)};return this._query().then(n)},_query:function(e){var t=this;return t.query(de({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var t=this,n=t.page(),i=t.total();if(e=e||{},n&&!(i&&n+1>t.totalPages()))return t._skip=t._currentRangeStart=n*t.take(),n+=1,e.page=n,t._query(e),n},prev:function(e){var t=this,n=t.page();if(e=e||{},n&&1!==n)return t._skip=t._currentRangeStart=t._skip-t.take(),n-=1,e.page=n,t._query(e),n},page:function(e){var n,i=this;return e!==t?(e=Le.max(Le.min(Le.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Le.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n.trigger("reset"),n._query({filter:e,page:1}),t)},group:function(e){var n=this;return e!==t?(n._query({group:e}),t):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){var e=this._aggregateResult;return he(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!he(e))for(t={},pe(e)||(e=[e]),n=0;n=r;i--)n=o[i],t={value:e.get(n.field),field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Le.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Le.min(e+t,n.total());return!n.options.serverPaging&&n._data.length>0||n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(e,n,i){var r,o,a,s,l,d,u,c;if(this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=Le.min(e||0,this.total()),r=this,o=Le.max(Le.floor(e/n),0)*n,a=Le.min(o+n,r.total()),s=r._findRange(e,Le.min(e+n,r.total())),s.length){r._pending=t,r._skip=e>r.skip()?Le.min(a,(r.totalPages()-1)*r.take()):o,r._currentRangeStart=e,r._take=n,l=r.options.serverPaging,d=r.options.serverSorting,u=r.options.serverFiltering,c=r.options.serverAggregates;try{r.options.serverPaging=!0,r._isServerGrouped()||r.group()&&r.group().length||(r.options.serverSorting=!0),r.options.serverFiltering=!0,r.options.serverPaging=!0,r.options.serverAggregates=!0,l&&(r._detachObservableParents(),r._data=s=r._observe(s)),r._process(s)}finally{r.options.serverPaging=l,r.options.serverSorting=d,r.options.serverFiltering=u,r.options.serverAggregates=c}return be(i)&&i(),t}n!==t&&(r._rangeExists(o,a)?oo&&a=i.start&&e<=i.end){for(p=0,o=r;o=i.start&&(d=i.data,u=i.end,w||(k.inPlaceSort?c=v._queryProcess(i.data,{filter:v.filter()}):(g=f(v.group()||[]).concat(a(v.sort()||[])),c=v._queryProcess(i.data,{sort:g,filter:v.filter()})),h=d=c.data,c.total!==t&&(u=c.total)),s=0,e+p>i.start&&(s=e+p-i.start),l=h.length,u>n&&(l-=u-n),p+=l-s,b=v._mergeGroups(b,d,s,l),n<=i.end&&p==n-e))return b;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var r,o=t.toJSON();return e.length&&(r=e[e.length-1]),C(r,o,n,i),e.concat(o)}return e.concat(t.slice(n,i))},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var r=this,o=r._timeStamp();return function(a){var s,l,d,u=!1,c={start:e,end:t,data:[],timestamp:r._timeStamp()};if(r._dequeueRequest(),r.trigger(ze,{response:a,type:"read"}),a=r.reader.parse(a),d=r._readData(a),d.length){for(s=0,l=r._ranges.length;s=r._currentRequestTimeStamp||!r._skipRequestsInProgress)&&(n&&d.length?n():r.trigger(Fe,{}))}},prefetch:function(e,t,n){var i=this,r=Le.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(o,function(){i.trigger(Re,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n),error:function(){var e=je.call(arguments);i.error.apply(i,e)}})})},100))},_multiplePrefetch:function(e,t,n){var i=this,r=Le.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():i.trigger(Re,{type:"read"})||i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n,!0)})},_rangeExists:function(e,t){var n,i,r=this,o=r._ranges;for(n=0,i=o.length;n=t)return!0;return!1},_removeModelFromRanges:function(e){var t,n,i,r,o=this;for(i=0,r=this._ranges.length;i=e){r._getByUid(t.uid,n.data)||(r._isServerGrouped()?n.data.splice(e,0,r._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}r._updateRangesLength()},_updateRangesLength:function(){var e,t,n=this,i=n._ranges||[],r=i.length,o=!1,a=0,s=0;for(t=0;t0?this.filter(this._hierarchicalFilter):(this.options.filter=this._hierarchicalFilter,this._filter=l(this.options.filter),this._hierarchicalFilter=null)),t},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=ie.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:O("success"),data:O("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),ie.fn.insert.call(this,e,t)},filter:function(e){return e===t?this._filter:(!this.options.serverFiltering&&this._markHierarchicalQuery(e)&&(e={logic:"or",filters:[e,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:e,page:1}),t)},_markHierarchicalQuery:function(e){var t,n,i,r,a;return e=l(e),e&&0!==e.filters.length?(t=o.filterExpr(e),i=t.fields,r=t.operators,n=a=Function("d, __f, __o","return "+t.expression),(i.length||r.length)&&(a=function(e){return n(e,i,r)}),this._updateHierarchicalFilter(a),!0):(this._updateHierarchicalFilter(function(){return!0}),!1)},_updateHierarchicalFilter:function(e){var t,n,i=this._data,r=!1;for(n=0;n=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e=this.skip+n)&&(i=this.range(Math.floor(e/n)*n)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),i?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):t:this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize+t,i=Le.max(Le.floor(n/t),0)*t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e,t){if(this.offset===e)return!0;var n=this,i=this.pageSize,r=Le.max(Le.floor(e/i),0)*i,o=this.dataSource;return t&&(r+=i),o.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(o.prefetch(r,i,function(){n.offset=e,n._recalculate(),n._goToRange(e,!0)}),!1)},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var e=this.dataSource;this.length=this.useRanges?e.lastRange().end:e.view().length,this._syncPending&&(this._syncWithDataSource(),this._recalculate(),this._syncPending=!1,this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),le=_e.Observable.extend({init:function(e,t){var n=this;_e.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new se(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,n,i=this.buffer,r=e*this.batchSize,o=this.batchSize,a=[];for(i.offset>r&&i.at(i.offset-1),n=0;n0&&(n=n.get(r.substring(0,i))),e.start(n),o=n!==e.source?o.call(n,e.source):o.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(L,e._change).bind(L,e._change)),e.stop(e.source),o},set:function(e){var t=this.currentSource||this.source,n=C.getter(this.path)(t);"function"==typeof n?t!==this.source?n.call(t,this.source,e):n.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(L,this._change),this.currentSource&&this.currentSource.unbind(L,this._change)),this.unbind()}}),m=f.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof S&&(e=t.get(n));return I(e,t)}}),g=f.extend({init:function(e,t,n){var i=this;f.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=A.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(L,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),_=v.extend({dataType:function(){var e=this.element.getAttribute("data-type")||this.element.type||"text";return e.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=C.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=C.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=C.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==C.parseFloat(e)?!!C.parseFloat(e):"true"===e.toLowerCase()),e}}),E.attr=v.extend({refresh:function(e){ this.element.setAttribute(e,this.bindings.attr[e].get())}}),E.css=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.classes={}},refresh:function(t){var n=e(this.element),i=this.bindings.css[t],r=this.classes[t]=i.get();r?n.addClass(t):n.removeClass(t)}}),E.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),E.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),E.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),E.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),E.events=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],r=this.handlers[t];r&&n.off(t,r),r=this.handlers[t]=i.get(),n.on(t,i.source,r)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),E.text=v.extend({refresh:function(){var t=this.bindings.text.get(),n=this.element.getAttribute("data-format")||"";null==t&&(t=""),e(this.element).text(C.toString(t,n))}}),E.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),E.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),E.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),E.value=_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=I(this.change,this),this.eventName=i.valueUpdate||L,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=L,this.bindings[R].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[R].get(),null==e&&(e=""),t=this.dataType(),"date"==t?e=C.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=C.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),E.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof C.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof D||n instanceof C.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?C.format('',e.valueField||e.textField,e.textField||e.valueField):"":"tbody"==n?"#:data#":"ul"==n||"ol"==n?"
  • #:data#
  • ":"#:data#",t=C.template(t)),t},add:function(t,n){var i,r,o,s,l=this.container(),d=l.cloneNode(!1),u=l.children[t];if(e(d).html(C.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),r=0,o=n.length;r-1?e.splice(t,1):e.push(r)}else this.bindings[H].set(r)},refresh:function(){var e,t,n=this.bindings[H].get(),i=n,r=this.dataType(),o=this.element;if("checkbox"==o.type)if(i instanceof D){if(e=-1,n=this.parsedValue(),n instanceof Date){for(t=0;t=0}else o.checked=i;else"radio"==o.type&&null!=n&&("date"==r?n=C.toString(n,"yyyy-MM-dd"):"datetime-local"==r&&(n=C.toString(n,"yyyy-MM-ddTHH:mm:ss")),o.checked=o.value===""+n)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(L,this._change)}})},E.select={source:E.source.extend({refresh:function(n){var i,r=this,o=r.bindings.source.get();o instanceof D||o instanceof C.data.DataSource?(n=n||{},"add"==n.action?r.add(n.index,n.items):"remove"==n.action?r.remove(n.index,n.items):"itemchange"!=n.action&&n.action!==t||(r.render(),r.bindings.value&&r.bindings.value&&(i=p(r.bindings.value.get(),e(r.element).data("valueField")),null===i?r.element.selectedIndex=-1:r.element.value=i))):r.render()}}),value:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=I(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,r=this.dataType(),o=[];for(n=0,i=this.element.options.length;n1&&(l.direction=t&&r?he[s].reverse:s),n[a[0]]=l}):S(e,function(e){var i=this.direction;i&&t&&!O.test(e)&&(this.direction=he[i].reverse),n[e]=this}),n},R&&D(T,{transition:function(t,n,i){var o,s,l,d,u=0,c=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,s&&(clearTimeout(s),s=null),t.removeData(te).dequeue().css(ae,"").css(ae),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,o=a(t,n),e.merge(c,r(o)),t.data("keys",e.unique(c)).height(),t.css(ae,i.exclusive+" "+i.duration+"ms "+i.ease).css(ae),t.css(o).css(se),R.event&&(t.one(R.event,d),0!==i.duration&&(u=500)),s=setTimeout(d,i.duration+u),t.data(te,s),t.data(oe,d)},stopQueue:function(e,t,n){var i,r=e.data("keys"),o=!n&&r,a=e.data(oe);return o&&(i=C.getComputedStyles(e[0],r)),a&&a(),o&&e.css(i),e.removeData("keys").stop(t)}}),p=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,r,s,l,d,u,c=this,h=t.length,p=c.element,f=c.options,m=e.Deferred(),g={},v={};for(c.effects=t,m.then(e.proxy(c,"complete")),p.data("animating",!0),i=0;i=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial, t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),D(x,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,r){return r=1.70158,n*((e=e/i-1)*e*((r+1)*e+r)+1)+t}}),T.Animation=y,T.Transition=x,T.createEffect=d,T.box=function(t){t=e(t);var n=t.offset();return n.width=C._outerWidth(t),n.height=C._outerHeight(t),n},T.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},T.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},T.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],e)}(function(){return function(e,t){function n(e){if(!e)return{};var t=e.match(_)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var i=window.kendo,r=i.Observable,o="SCRIPT",a="init",s="show",l="hide",d="transitionStart",u="transitionEnd",c="attach",h="detach",p=/unrecognized expression/,f=r.extend({init:function(e,t){var n=this;t=t||{},r.fn.init.call(n),n.content=e,n.id=i.guid(),n.tagName=t.tagName||"div",n.model=t.model,n._wrap=t.wrap!==!1,this._evalTemplate=t.evalTemplate||!1,n._fragments={},n.bind([a,s,l,d,u],t)},render:function(t){var n=this,r=!n.element;return r&&(n.element=n._createElement()),t&&e(t).append(n.element),r&&(i.bind(n.element,n.model),n.trigger(a)),t&&(n._eachFragment(c),n.trigger(s)),n.element},clone:function(){return new m(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){this.element.css("display","")},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(d,{type:e})},afterTransition:function(e){this.trigger(u,{type:e})},hide:function(){this._eachFragment(h),this.element.detach(),this.trigger(l)},destroy:function(){var e=this.element;e&&(i.unbind(e),i.destroy(e),e.remove())},fragments:function(t){e.extend(this._fragments,t)},_eachFragment:function(e){for(var t in this._fragments)this._fragments[t][e](this,t)},_createElement:function(){var t,n,r,a=this,s="<"+a.tagName+" />";try{n=e(document.getElementById(a.content)||a.content),n[0].tagName===o&&(n=n.html())}catch(l){p.test(l.message)&&(n=a.content)}return"string"==typeof n?(n=n.replace(/^\s+|\s+$/g,""),a._evalTemplate&&(n=i.template(n)(a.model||{})),t=e(s).append(n),a._wrap||(t=t.contents())):(t=n,a._evalTemplate&&(r=e(i.template(e("
    ").append(t.clone(!0)).html())(a.model||{})),e.contains(document,t[0])&&t.replaceWith(r),t=r),a._wrap&&(t=t.wrapAll(s).parent())),t}}),m=i.Class.extend({init:function(t){e.extend(this,{element:t.element.clone(!0),transition:t.transition,id:t.id}),t.element.parent().append(this.element)},hideEnd:function(){this.element.remove()},beforeTransition:e.noop,afterTransition:e.noop}),g=f.extend({init:function(e,t){f.fn.init.call(this,e,t),this.containers={}},container:function(e){var t=this.containers[e];return t||(t=this._createContainer(e),this.containers[e]=t),t},showIn:function(e,t,n){this.container(e).show(t,n)},_createContainer:function(e){var t,n=this.render(),i=n.find(e);if(!i.length&&n.is(e)){if(!n.is(e))throw Error("can't find a container with the specified "+e+" selector");i=n}return t=new b(i),t.bind("accepted",function(e){e.view.render(i)}),t}}),v=f.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),_=/^(\w+)(:(\w+))?( (\w+))?$/,b=r.extend({init:function(e){r.fn.init.call(this),this.container=e,this.history=[],this.view=null,this.running=!1},after:function(){this.running=!1,this.trigger("complete",{view:this.view}),this.trigger("after")},end:function(){this.view.showEnd(),this.previous.hideEnd(),this.after()},show:function(e,t,r){if(!e.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;r=r||e.id;var o=this,a=e===o.view?e.clone():o.view,s=o.history,l=s[s.length-2]||{},d=l.id===r,u=t||(d?s[s.length-1].transition:e.transition),c=n(u);return o.running&&o.effect.stop(),"none"===u&&(u=null),o.trigger("accepted",{view:e}),o.view=e,o.previous=a,o.running=!0,d?s.pop():s.push({id:r,transition:u}),a?(u&&i.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),d&&!t&&(c.reverse=!c.reverse),o.effect=i.fx(e.element).replace(a.element,c.type).beforeTransition(function(){e.beforeTransition("show"),a.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),a.afterTransition("hide")}).direction(c.direction).setReverse(c.reverse),o.effect.run().then(function(){o.end()})):(e.showStart(),o.end()),!0):(e.showStart(),e.showEnd(),o.after(),!0)}});i.ViewContainer=b,i.Fragment=v,i.Layout=g,i.View=f,i.ViewClone=m}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dom.min",["kendo.core.min"],e)}(function(){return function(e){function t(){this.node=null}function n(){}function i(e,t,n){this.nodeName=e,this.attr=t||{},this.children=n||[]}function r(e){this.nodeValue=e+""}function o(e){this.html=e}function a(e,t){for(h.innerHTML=t;h.firstChild;)e.appendChild(h.firstChild)}function s(e){return new o(e)}function l(e,t,n){return new i(e,t,n)}function d(e){return new r(e)}function u(e){this.root=e,this.children=[]}var c,h;t.prototype={remove:function(){this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.attr={}},attr:{},text:function(){return""}},n.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}},c=new n,i.prototype=new t,i.prototype.appendTo=function(e){var t,n=document.createElement(this.nodeName),i=this.children;for(t=0;t2)return void this.render({appendChild:function(n){e.replaceChild(n,t.node)}},c);for(i=0;i/g,">").replace(/\"/g,""").replace(/\'/g,"'")}function r(e,t){var n,i="";for(n=0;n"+i(e)+"":''+i(e.src)+""}function s(e){var t=Math.floor(e/26)-1;return(t>=0?s(t):"")+String.fromCharCode(65+e%26)}function l(e,t){return s(t)+(e+1)}function d(e,t){return s(t)+"$"+(e+1)}function u(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function c(e){return(e/7*100+.5)/100}function h(e){return.75*e}function p(e){return(e+"").replace(/[\x00-\x08]/g,"").replace(/\n/g,"\r\n")}function f(e){var t=e;return t.length<6&&(t=t.replace(/(\w)/g,function(e,t){return t+t})),t=t.substring(1).toUpperCase(),t.length<8&&(t="FF"+t),t}function m(e){var t="thin";return 2===e?t="medium":3===e&&(t="thick"),t}function g(e,t){var n="";return t&&(n+="<"+e+' style="'+m(t.size)+'">',t.color&&(n+=''),n+=""),n}function v(e){return""+g("left",e.left)+g("right",e.right)+g("top",e.top)+g("bottom",e.bottom)+""}function _(e,t){var n,i,r,o=[],a=[];for(b(e,function(e,t){var n={_source:e,index:t,height:e.height,cells:[]};o.push(n),a[t]=n}),n=k(o).slice(0),i={rowData:o,rowsByIndex:a,mergedCells:t},r=0;r1||o>1)&&w(t.mergedCells,s+":"+l(p+r-1,a+o-1)),r>1)for(u=p+1;u\r',V=O+'\n \n \n \n \n ',W=function(e){var t=e.creator,n=e.lastModifiedBy,r=e.created,o=e.modified;return O+'\n \n '+i(t)+"\n "+i(n)+'\n '+i(r)+'\n '+i(o)+"\n"},U=function(e){var t=e.sheets;return O+'\n\n Microsoft Excel\n 0\n false\n \n \n \n Worksheets\n \n \n '+t.length+'\n \n \n \n \n '+o(t,function(e,t){return e.options.title?""+i(e.options.title)+"":"Sheet"+(t+1)+""})+"\n \n false\n false\n false\n 14.0300\n"},q=function(e){var t=e.count;return O+'\n\n \n \n \n \n \n '+r(t,function(e){return''})+'\n \n \n'},j=function(e){var t=e.sheets,n=e.filterNames,r=e.userNames;return O+'\n\n \n \n \n \n \n \n '+o(t,function(e,t){var n=e.options,r=n.name||n.title||"Sheet"+(t+1);return''})+"\n \n "+(n.length||r.length?"\n \n "+o(n,function(e){return'\n "})+"\n "+o(r,function(e){return'\n ":"")+'\n \n'},G=function(e){var t=e.frozenColumns,n=e.frozenRows,r=e.columns,s=e.defaults,l=e.data,d=e.index,u=e.mergeCells,p=e.autoFilter,f=e.filter,m=e.showGridLines,g=e.hyperlinks,v=e.validations,_=e.defaultCellStyleId,b=e.rtl;return O+'\n\n \n\n \n \n "+(n||t?'\n ':"")+'\n \n \n\n \n\n "+(null!=_||r&&r.length>0?"\n \n "+(r&&r.length?"":'\n ")+"\n "+o(r,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return 0===e.width?"':""})+"\n ":"")+"\n\n \n "+o(l,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return'\n \n "+o(e.data,function(e){return'\n \n "+(null!=e.formula?a(e.formula):"")+"\n "+(null!=e.value?""+i(e.value)+"":"")+"\n "})+"\n \n "})+"\n \n\n "+(p?'':f?E(f):"")+"\n\n "+(u.length?'\n \n '+o(u,function(e){return''})+"\n ":"")+"\n\n "+(v.length?"\n \n "+o(v,function(e){return'\n \n "+(e.formula1?""+i(e.formula1)+"":"")+"\n "+(e.formula2?""+i(e.formula2)+"":"")+"\n "})+"\n ":"")+"\n\n "+(g.length?"\n \n "+o(g,function(e,t){return'\n '})+"\n ":"")+'\n\n \n'},$=function(e){var t=e.count;return O+'\n\n '+r(t,function(e){return'\n '})+'\n \n \n'},K=function(e){var t=e.hyperlinks;return O+'\n\n '+o(t,function(e,t){return'\n '})+"\n"},Y=function(e){var t=e.count,n=e.uniqueCount,r=e.indexes;return O+'\n\n '+o(Object.keys(r),function(e){return'\n '+i(e.substring(1))+""})+"\n"},Q=function(e){var t=e.formats,n=e.fonts,r=e.fills,a=e.borders,s=e.styles;return O+'\n\n \n '+o(t,function(e,t){return'\n '})+'\n \n \n \n \n \n \n \n \n \n '+o(n,function(e){return'\n \n \n '+(e.bold?"":"")+"\n "+(e.italic?"":"")+"\n "+(e.underline?"":"")+"\n "+(e.color?'':'')+"\n "+(e.fontFamily?'\n \n \n ':'\n \n \n \n ')+"\n "})+'\n \n \n \n \n '+o(r,function(e){return"\n "+(e.background?'\n \n \n \n \n \n ':"")})+'\n \n \n \n '+o(a,v)+'\n \n \n \n \n \n \n '+o(s,function(e){return'\n \n "+(e.textAlign||e.verticalAlign||e.wrap?"\n \n ":"")+"\n \n "})+'\n \n \n \n \n \n \n'},X=new Date(1900,0,0),J=kendo.Class.extend({init:function(e,t,n,i){this.options=e,this._strings=t,this._styles=n,this._borders=i,this._validations={}},relsToXML:function(){var e=this.options.hyperlinks||[];return e.length?K({hyperlinks:e}):""},toXML:function(e){var t,n,i,r,o,a,s,d=this,c=this.options.mergedCells||[],h=this.options.rows||[],p=_(h,c);this._readCells(p),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:l(u(this.options),t.from),to:l(u(this.options),t.to)}:t&&t.ref&&t.columns&&(n=t,t=null),i=[];for(r in this._validations)Object.prototype.hasOwnProperty.call(d._validations,r)&&i.push(d._validations[r]);return o=null,this.options.defaultCellStyle&&(o=this._lookupStyle(this.options.defaultCellStyle)),a=this.options.freezePane||{},s=this.options.defaults||{},G({frozenColumns:this.options.frozenColumns||a.colSplit,frozenRows:this.options.frozenRows||a.rowSplit,columns:this.options.columns,defaults:s,data:p,index:e,mergeCells:c,autoFilter:t,filter:n,showGridLines:this.options.showGridLines,hyperlinks:this.options.hyperlinks||[],validations:i,defaultCellStyleId:o,rtl:void 0!==this.options.rtl?this.options.rtl:s.rtl})},_lookupString:function(e){var t,n="$"+e,i=this._strings.indexes[n];return void 0!==i?t=i:(t=this._strings.indexes[n]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,t},_lookupStyle:function(e){var t,i=JSON.stringify(e);return"{}"===i?0:(t=n(i,this._styles),t<0&&(t=this._styles.push(i)-1),t+1)},_lookupBorder:function(e){var t,i=JSON.stringify(e);if("{}"!==i)return t=n(i,this._borders),t<0&&(t=this._borders.push(i)-1),t+1},_readCells:function(e){var t,n,i,r,o,a=this;for(t=0;t\n '+o(n,function(e){return'\n \n '+i[e.filter](e)+"\n \n "})+"\n"},oe=function(e){var t=e.logic,n=e.criteria;return"\n\n"+o(n,function(e){var t=E.customOperator(e),n=E.customValue(e);return"'})+"\n"},ae=function(e){var t=e.type;return''},se=function(e){var t=e.type,n=e.value;return''},le=function(e){var t=e.blanks,n=e.values;return"\n "+o(n,function(e){ return'\n '})+"\n "},E.customOperator=function(e){return{eq:"equal",gt:"greaterThan",gte:"greaterThanOrEqual",lt:"lessThan",lte:"lessThanOrEqual",ne:"notEqual",doesnotstartwith:"notEqual",doesnotendwith:"notEqual",doesnotcontain:"notEqual",doesnotmatch:"notEqual"}[e.operator.toLowerCase()]},E.customValue=function(e){function t(e){return e.replace(/([*?])/g,"~$1")}switch(e.operator.toLowerCase()){case"startswith":case"doesnotstartwith":return t(e.value)+"*";case"endswith":case"doesnotendwith":return"*"+t(e.value);case"contains":case"doesnotcontain":return"*"+t(e.value)+"*";default:return e.value}},E.dynamicFilterType=function(e){return{quarter1:"Q1",quarter2:"Q2",quarter3:"Q3",quarter4:"Q4",january:"M1",february:"M2",march:"M3",april:"M4",may:"M5",june:"M6",july:"M7",august:"M8",september:"M9",october:"M10",november:"M11",december:"M12"}[e.toLowerCase()]||e},kendo.deepExtend(kendo.ooxml,{IntlService:z,Workbook:ne,Worksheet:J})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("ooxml/main.min",["kendo.core.min","ooxml/kendo-ooxml.min"],e)}(function(){!function(e){var t=kendo.ooxml.Workbook;kendo.ooxml.IntlService.register({toString:kendo.toString}),kendo.ooxml.Workbook=t.extend({toDataURL:function(){var e=t.fn.toDataURL.call(this);if("string"!=typeof e)throw Error("The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.");return e},toDataURLAsync:function(){var n=e.Deferred(),i=t.fn.toDataURL.call(this);return"string"==typeof i?i=n.resolve(i):i&&i.then&&i.then(function(e){n.resolve(e)},function(){n.reject()}),n.promise()}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.ooxml.min",["ooxml/main.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/kendo-excel.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e.title+": "+e.value}function n(e,t){var n,i=[];for(n=0;n0),n})},_leafColumns:function(e){var t,n=this,i=[];for(t=0;th?c.push({id:e,level:h}):i=t;)i=e.pop(),o.push(r._hierarchyFooter(r.aggregates[i.id],i.level+1,n));return o},_hasFooterTemplate:function(){var e,t=this.columns;for(e=0;e0&&(e.field||e.columns)},_visibleColumns:function(e){var t=this;return e.filter(function(e){var n=!e.hidden;return n&&e.columns&&(n=t._visibleColumns(e.columns).length>0),n})},_headerRow:function(t,i){var r=this,o=t.cells.map(function(n){return e.extend(n,{colSpan:n.colSpan>1?n.colSpan:1,rowSpan:t.rowSpan>1&&!n.colSpan?t.rowSpan:1})});return this.hierarchy&&(o[0].colSpan=this._depth()+1),{type:"header",cells:n(i.length,function(){return e.extend({background:"#7a7a7a",color:"#fff"},r.options.headerPaddingCellOptions)}).concat(o)}},_prependHeaderRows:function(e){var t,n=this,i=this.groups,r=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(r,this.options.columns),t=r.length-1;t>=0;t--)e.unshift(n._headerRow(r[t],i))},_prepareHeaderRows:function(t,n,i,r){var o,a,s,l=this,d=r||t[t.length-1],u=t[d.index+1],c=0;for(o=0;oo&&(o=n));return r+o},_freezePane:function(){var e=this._visibleColumns(this.options.columns||[]),t=this._visibleColumns(this._trimColumns(this._leafColumns(e.filter(function(e){return e.locked})))).length;return{rowSplit:this._headerDepth(e),colSplit:t?t+this.groups.length:0}},_cell:function(t,n){return e.extend({value:n.value(t)},n.cellOptions)},_depth:function(){var e=0;return e=this.hierarchy?this.hierarchy.depth:this.groups.length},_columns:function(){var e=this._depth(),t=n(e,function(){return{width:20}});return t.concat(this.columns.map(function(e){return{width:parseInt(e.width,10),autoWidth:!e.width}}))}}),kendo.deepExtend(kendo.excel,{ExcelExporter:s,TemplateService:a})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/main.min",["kendo.core.min","kendo.data.min","excel/kendo-excel.min"],e)}(function(){return function(e,t){var n=t.excel.ExcelExporter,i=e.extend;t.excel.TemplateService.register({compile:t.template}),t.ExcelExporter=t.Class.extend({init:function(e){var n,r,o;this.options=e,n=e.dataSource,n instanceof t.data.DataSource?(this.dataSource=new n.constructor(i({},n.options,{page:e.allPages?0:n.page(),filter:n.filter(),pageSize:e.allPages?n.total():n.pageSize(),sort:n.sort(),group:n.group(),aggregate:n.aggregate()})),r=n.data(),r.length>0&&(this.dataSource._data=r,o=this.dataSource.transport,n._isServerGrouped()&&o.options&&o.options.data&&(o.options.data=null))):this.dataSource=t.data.DataSource.create(n)},_hierarchy:function(){var e,t,n,i,r=this.options.hierarchy,o=this.dataSource;if(r&&o.level){for(r={itemLevel:function(e){return o.level(e)}},e=o.view(),t=0,i=0;it&&(t=n);r.depth=t+1}else r=!1;return{hierarchy:r}},workbook:function(){return e.Deferred(e.proxy(function(t){this.dataSource.fetch().then(e.proxy(function(){var e=new n(i({},this.options,this._hierarchy(),{data:this.dataSource.view(),groups:this.dataSource.group(),aggregates:this.dataSource.aggregates()})).workbook();t.resolve(e,this.dataSource.view())},this))},this)).promise()}})}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/mixins.min",["excel/main.min","kendo.ooxml.min"],e)}(function(){return function(e,t){t.ExcelMixin={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",allPages:!1,filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var n=this.options.excel||{},i=new t.ExcelExporter({columns:this.columns,dataSource:this.dataSource,allPages:n.allPages,filterable:n.filterable,hierarchy:n.hierarchy});i.workbook().then(e.proxy(function(e,i){if(!this.trigger("excelExport",{workbook:e,data:i})){var r=new t.ooxml.Workbook(e);r.toDataURLAsync().then(function(i){t.saveAs({dataURI:i,fileName:e.fileName||n.fileName,proxyURL:n.proxyURL,forceProxy:n.forceProxy})})}},this))}}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.excel.min",["excel/main.min","excel/mixins.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.signalr.min",["kendo.data.min"],e)}(function(){return function(e){var t=kendo.data.RemoteTransport.extend({init:function(e){var t,n=e&&e.signalr?e.signalr:{},i=n.promise;if(!i)throw Error('The "promise" option must be set.');if("function"!=typeof i.done||"function"!=typeof i.fail)throw Error('The "promise" option must be a Promise.');if(this.promise=i,t=n.hub,!t)throw Error('The "hub" option must be set.');if("function"!=typeof t.on||"function"!=typeof t.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=t,kendo.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(t,n){var i,r,o=this.hub,a=this.options.signalr.server;if(!a||!a[n])throw Error(kendo.format('The "server.{0}" option must be set.',n));i=[a[n]],r=this.parameterMap(t.data,n),e.isEmptyObject(r)||i.push(r),this.promise.done(function(){o.invoke.apply(o,i).done(t.success).fail(t.error)})},read:function(e){this._crud(e,"read")},create:function(e){this._crud(e,"create")},update:function(e){this._crud(e,"update")},destroy:function(e){this._crud(e,"destroy")}});e.extend(!0,kendo.data,{transports:{signalr:t}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/util.min",["kendo.core.min"],e)}(function(){return function(e){function t(){return e.Deferred()}function n(t){return e.when.apply(e,t)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:t,promiseAll:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.color.min",["kendo.core.min"],e)}(function(){function e(e,t,n){void 0===n&&(n="0");for(var i=e.toString(16);t>i.length;)i=n+i;return i}function t(e,t,n){var i=n;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function n(e,t){var i,r,a;if(null==e||"none"===e)return null;if(e instanceof l)return e;if(a=e.toLowerCase(),i=s(a))return a="transparent"===i[1]?new d(1,1,1,0):n(o[i[1]],t),a.match=[i[1]],a;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(a))?r=new u(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),1):(i=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(a))?r=new u(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),1):(i=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(a))?r=new u(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),1):(i=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(a))?r=new u(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])):(i=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(a))?r=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,1):(i=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(a))&&(r=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),r)r.match=i;else if(!t)throw Error("Cannot parse color: "+a);return r}var i,r,o,a,s,l,d,u,c,h,p;window.kendo=window.kendo||{},i=kendo.Class,r=kendo.support,o={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},a=r.browser,s=function(e){var t,n=Object.keys(o);return n.push("transparent"),t=RegExp("^("+n.join("|")+")(\\W|$)","i"),s=function(e){return t.exec(e)},t.exec(e)},l=i.extend({init:function(){},toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat((+this.a).toFixed(3))+")"},toDisplay:function(){return a.msie&&a.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()===n(e).toCssRgba()},diff:function(e){var t,n;return null===e?NaN:(t=this.toBytes(),n=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-n.r),2)+Math.pow(.59*(t.g-n.g),2)+Math.pow(.11*(t.b-n.b),2)))},clone:function(){var e=this.toBytes();return e===this&&(e=new u(e.r,e.g,e.b,e.a)),e}}),d=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this,i=n.r,r=n.g,o=n.b,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,d=s;return 0===l?new c(0,0,d,this.a):(0!==s?(t=l/s,e=i===s?(r-o)/l:r===s?2+(o-i)/l:4+(i-r)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new c(e,t,d,this.a))},toHSL:function(){var e,t,n,i=this,r=i.r,o=i.g,a=i.b,s=Math.max(r,o,a),l=Math.min(r,o,a),d=(s+l)/2;if(s===l)e=t=0;else{switch(n=s-l,t=d>.5?n/(2-s-l):n/(s+l),s){case r:e=(o-a)/n+(o255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this},percBrightness:function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}}),p.fromBytes=function(e,t,n,i){return new u(e,t,n,null!=i?i:1)},p.fromRGB=function(e,t,n,i){return new d(e,t,n,null!=i?i:1)},p.fromHSV=function(e,t,n,i){return new c(e,t,n,null!=i?i:1)},p.fromHSL=function(e,t,n,i){return new h(e,t,n,null!=i?i:1)},p.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],p.namedColors=o,kendo.deepExtend(kendo,{parseColor:n,Color:p})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/text-metrics.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return(e+"").replace(s,l)}function n(e){var t,n=[];for(t in e)n.push(t+e[t]);return n.sort().join("")}function i(e){var t,n=2166136261;for(t=0;t>>0}function r(){return{width:0,height:0,baseline:0}}function o(e,t,n){return c.current.measure(e,t,n)}var a,s,l,d,u,c;window.kendo.util=window.kendo.util||{},a=kendo.Class.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var n=this._map,i={key:e,value:t};n[e]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(e){var t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}}),s=/\r?\n|\r|\t/g,l=" ",d={baselineMarkerSize:1},"undefined"!=typeof document&&(u=document.createElement("div"),u.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"),c=kendo.Class.extend({init:function(t){this._cache=new a(1e3),this.options=e.extend({},d,t)},measure:function(e,o,a){var s,l,d,c,h,p,f,m,g;if(void 0===a&&(a={}),!e)return r();if(s=n(o),l=i(e+s),d=this._cache.get(l))return d;c=r(),h=a.box||u,p=this._baselineMarker().cloneNode(!1);for(f in o)m=o[f],void 0!==m&&(h.style[f]=m);return g=a.normalizeText!==!1?t(e):e+"",h.textContent=g,h.appendChild(p),document.body.appendChild(h),g.length&&(c.width=h.offsetWidth-this.options.baselineMarkerSize,c.height=h.offsetHeight,c.baseline=p.offsetTop+this.options.baselineMarkerSize),c.width>0&&c.height>0&&this._cache.put(l,c),h.parentNode.removeChild(h),c},_baselineMarker:function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e}}),c.current=new c,kendo.deepExtend(kendo.util,{LRUCache:a,TextMetrics:c,measureText:o,objectKey:n,hashKey:i,normalizeText:t})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/kendo-drawing.min",["drawing/util.min","kendo.color.min","util/text-metrics.min"],e)}(function(){!function(e){function t(e,t){return e.push.apply(e,t),e}function n(e){for(var t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n="";e>0;)e>>6),i+=on(128|63&n)):n<65536&&(i+=on(224|n>>>12),i+=on(128|n>>>6&63),i+=on(128|63&n));return i}function s(e){for(var t,n,i,r,o,s,l,d="",u=0,c=a(e);u>2,o=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,l=63&i,isNaN(n)?s=l=64:isNaN(i)&&(l=64),d=d+rn.charAt(r)+rn.charAt(o)+rn.charAt(s)+rn.charAt(l);return d}function l(e){return i((e.x||{}).location)?{x:e.x.location,y:e.y.location}:{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}}function d(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function u(e){return""===e||null===e||"none"===e||"transparent"===e||!i(e)}function c(e){if(e)return e[e.length-1]}function h(e,t,n){return Math.max(Math.min(e,n),t)}function p(e,t){function n(e,n){for(var i=[],r=0,o=0,a=0;r=0&&c<=1&&h>=0&&h<=1)return new un(e.x+h*r,e.y+h*a)}function H(e,t,n,i,r,a){var s=g((r-e)/n,3),l=g((a-t)/i,3);return g(o(Math.atan2(l,s)))}function N(e){var t,n,i,r,a,s,l,d,u,c,h,p,m,v,_,b,k,w,y,x,C,T,S,D,F,E=e.x1,A=e.y1,I=e.x2,R=e.y2,M=e.rx,z=e.ry,H=e.largeArc,N=e.swipe,B=e.rotation;return void 0===B&&(B=0),t=f(B),n=Math.cos(t),i=Math.sin(t),r=n*(E-I)/2+i*(A-R)/2,a=-i*(E-I)/2+n*(A-R)/2,s=H!==N?1:-1,l=Math.pow(r,2),d=Math.pow(a,2),u=Math.pow(M,2),c=Math.pow(z,2),h=l/u+d/c,h>1&&(h=Math.sqrt(l/u+d/c),M=h*M,u=Math.pow(M,2),z=h*z,c=Math.pow(z,2)),p=s*Math.sqrt((u*c-u*d-c*l)/(u*d+c*l)),isNaN(p)&&(p=0),m=p*(M*a)/z,v=-p*(z*r)/M,_=n*m-i*v+(E+I)/2,b=i*m+n*v+(A+R)/2,k=(r-m)/M,w=(a-v)/z,y=-(r+m)/M,x=-(a+v)/z,C=(w>=0?1:-1)*o(Math.acos(k/Math.sqrt(k*k+w*w))),T=g((k*y+w*x)/(Math.sqrt(k*k+w*w)*Math.sqrt(y*y+x*x)),10),S=(k*x-w*y>=0?1:-1)*o(Math.acos(T)),!N&&S>0&&(S-=360),N&&S<0&&(S+=360),D=C+S,F=D>=0?1:-1,D=Math.abs(D)%360*F,{center:new un(_,b),startAngle:C,endAngle:D,radiusX:M,radiusY:z,xRotation:B}}function B(e,t){for(var n=e;nt.y,r&&((0===s[o]||1===s[o])&&n.bottomRight().x>t.x||00?n.x-r:o-n.x)/(o-r)+a-n.y>=0),i?1:0}function Y(e){var t,n=e.length,i=tn,r=nn;for(t=0;t1)for(r=new un,o=e[0].bbox,a=1;as?d.length?(l.push(d),d=[],c(),u=a):(c(),l.push(d),d=[],u=0):(c(),u+=a));return d.length&&l.push(d),l}function de(e,t,n,i,r){var o,a,s,l,d=le(e,t,r),u=t.origin.clone(),c=[];for(o=0;o"+r.render()+"",r.destroy(),i}function Ie(e,t){var n,i,r,o,a,s,l=t.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),e.moveTo(i.x,i.y),r=1;rt._zIndex?-1:0}function Me(e,t){var n,i,r;for(n=0;n=o-y)&&(e.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(e.tagName))}function u(e){var t,i,r,a,s,l,c;for("TABLE"==e.tagName&&Le(e,{tableLayout:"fixed"}),t=at(e),i=parseFloat(st(t,"padding-bottom")),r=parseFloat(st(t,"border-bottom-width")),a=y,y+=i+r,s=!0,l=e.firstChild;l;l=l.nextSibling)if(1==l.nodeType){if(s=!1,Dr(l,n)){h(l);continue}if(!o){u(l);continue}if(!/^(?:static|relative)$/.test(st(at(l),"position")))continue;c=f(l),1==c?h(l):c&&d(l)?h(l):u(l)}else 3==l.nodeType&&o&&(m(l,s),s=!1);y=a}function c(e){var t=e.parentNode,n=t.firstChild;if(e===n)return!0;if(e===t.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function h(e){var t,n,i,r,o,a,l;return 1==e.nodeType&&e!==k&&c(e)?h(e.parentNode):(t=Oe(e,"table"),n=t&&t.querySelector("colgroup"),s.repeatHeaders&&(i=t&&t.querySelector("thead"),r=Oe(e,".k-grid.k-widget"),r&&r.querySelector(".k-auto-scrollable")&&(o=r.querySelector(".k-grid-header"))),a=p(),l=_.createRange(),l.setStartBefore(k),l.setEndBefore(e),a.appendChild(l.extractContents()),k.parentNode.insertBefore(a,k),g(e.parentNode),t&&(t=Oe(e,"table"),s.repeatHeaders&&i&&t.insertBefore(i.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),void(s.repeatHeaders&&o&&(r=Oe(e,".k-grid.k-widget"),r.insertBefore(o.cloneNode(!0),r.firstChild))))}function p(){var e=_.createElement("KENDO-PDF-PAGE");return Le(e,{display:"block",boxSizing:"content-box",width:r?r+"px":"auto",padding:a.top+"px "+a.right+"px "+a.bottom+"px "+a.left+"px",position:"relative",height:o?o+"px":"auto",overflow:o||r?"hidden":"visible",clear:"both"}),s&&s.pageClassName&&(e.className=s.pageClassName),b.push(e),e}function f(e){var t,n,i=e.getBoundingClientRect();return 0===i.width||0===i.height?0:(t=k.getBoundingClientRect().top,n=o-y,i.height>n?3:i.top-t>n?1:i.bottom-t>n?2:0)}function m(e,t){var n,i,r,o,a;/\S/.test(e.data)&&(n=e.data.length,i=_.createRange(),i.selectNodeContents(e),r=f(i),r&&(o=e,1==r?h(t?e.parentNode:e):(!function s(t,n,r){return i.setEnd(e,n),t==n||n==r?n:f(i)?s(t,t+n>>1,n):s(n,n+r>>1,r)}(0,n>>1,n),!/\S/.test(""+i)&&t?h(e.parentNode):(o=e.splitText(i.endOffset),a=p(),i.setStartBefore(k),a.appendChild(i.extractContents()),k.parentNode.insertBefore(a,k),g(o.parentNode))),m(o)))}function g(e){var t=Oe(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),g(t.parentNode))}var v=i(s.template),_=t.ownerDocument,b=[],k=s._destructive?t:Fr(t),w=_.createElement("KENDO-PDF-DOCUMENT"),y=0;Ne(k.querySelectorAll("tfoot")).forEach(function(e){e.parentNode.appendChild(e)}),Ne(k.querySelectorAll("ol")).forEach(function(e){Ne(e.children).forEach(function(e,t){e.setAttribute("kendo-split-index",t)})}),Le(w,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),r&&(Le(w,{width:r+"px",paddingLeft:a.left+"px",paddingRight:a.right+"px"}),Le(k,{overflow:"hidden"})),t.parentNode.insertBefore(w,t),w.appendChild(k),s.beforePageBreak?setTimeout(function(){s.beforePageBreak(w,l)},15):setTimeout(l,15)}var o,a;if(t||(t={}),o=Kt(),!e)return o.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf.defineFont(Ue(e.ownerDocument)),a=Ve(t.scale||1),Ze(e,function(){var i,s=t&&t.forcePageBreak,l=t&&t.paperSize&&"auto"!=t.paperSize,d=kendo.pdf.getPaperOptions(function(e,n){return"paperSize"==e?l?t[e]:"A4":e in t?t[e]:n}),u=l&&d.paperSize[0],c=l&&d.paperSize[1],h=t.margin&&d.margin,p=!!h;s||c?(h||(h={left:0,top:0,right:0,bottom:0}),u&&(u/=a.x),c&&(c/=a.y),h.left/=a.x,h.right/=a.x,h.top/=a.y,h.bottom/=a.y,i=new Gn({pdf:{multiPage:!0,paperSize:l?d.paperSize:"auto",_ignoreMargin:p}}),r(function(e){if(t.progress){var r=!1,a=0;!function s(){if(a0&&r(e,l,d,u,c[0])}}function r(e,t,n,i,r){/^data:/i.test(r)||/^[^\/:]+:\/\//.test(r)||/^\//.test(r)||(r=(e.href+"").replace(/[^\/]*$/,"")+r),t.forEach(function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),n&&(e+="|bold"),i&&(e+="|italic"),o[e]=r})}var o,a;for(null==e&&(e=document),o={},a=0;a0);return n}function tt(e,t,n){var i,r;Cr=Object.create(Cr),Cr[e.tagName.toLowerCase()]={element:e,style:t},i=st(t,"text-decoration"),i&&"none"!=i&&(r=st(t,"color"),i.split(/\s+/g).forEach(function(e){Cr[e]||(Cr[e]=r)})),ot(t)&&(Cr._stackingContext={element:e,group:n})}function nt(){Cr=Object.getPrototypeOf(Cr)}function it(e){if(null!=Cr._clipbox){var t=e.bbox(Cr._matrix);Cr._clipbox=Cr._clipbox?hn.intersect(Cr._clipbox,t):t}}function rt(){var e=Cr._clipbox;return null==e||(e?0===e.width()||0===e.height():void 0)}function ot(e){function t(t){return st(e,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0}function at(e,t){return window.getComputedStyle(e,t||null)}function st(e,t,n){var i=e.getPropertyValue(t);return null!=i&&""!==i||(wr.webkit?i=e.getPropertyValue("-webkit-"+t):wr.mozilla?i=e.getPropertyValue("-moz-"+t):wr.opera?i=e.getPropertyValue("-o-"+t):Tr&&(i=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==i||""===i)?n:i}function lt(e,t,n,i){e.setProperty(t,n,i),wr.webkit?e.setProperty("-webkit-"+t,n,i):wr.mozilla?e.setProperty("-moz-"+t,n,i):wr.opera?e.setProperty("-o-"+t,n,i):Tr&&(e.setProperty("-ms-"+t,n,i),t="ms"+t.replace(/(^|-)([a-z])/g,function(e,t,n){return t+n.toUpperCase()}),e[t]=n)}function dt(e,t){return t="border-"+t,{width:parseFloat(st(e,t+"-width")),style:st(e,t+"-style"),color:Xe(st(e,t+"-color"),!0)}}function ut(e,t){var n=e.style.cssText,i=t();return e.style.cssText=n,i}function ct(e,t){var n=st(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),kt({x:n[0],y:n[1]})}function ht(e){var t=e.getBoundingClientRect();return t=pt(t,"border-*-width",e),t=pt(t,"padding-*",e)}function pt(e,t,n){var i,r,o,a,s;return"string"==typeof t?(i=at(n),r=parseFloat(st(i,t.replace("*","top"))),o=parseFloat(st(i,t.replace("*","right"))),a=parseFloat(st(i,t.replace("*","bottom"))),s=parseFloat(st(i,t.replace("*","left")))):"number"==typeof t&&(r=o=a=s=t),{top:e.top+r,right:e.right-o,bottom:e.bottom-a,left:e.left+s,width:e.right-e.left-o-s,height:e.bottom-e.top-a-r}}function ft(e){var t,n,i=st(e,"transform");return"none"==i?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),t?(n=st(e,"transform-origin"),t=t[1].split(/\s*,\s*/g).map(parseFloat),n=n.split(/\s+/g).map(parseFloat),{matrix:t,origin:n}):void 0)}function mt(e){return 180*e/Math.PI%360}function gt(e){var t=parseFloat(e);return/grad$/.test(e)?Math.PI*t/200:/rad$/.test(e)?t:/turn$/.test(e)?Math.PI*t*2:/deg$/.test(e)?Math.PI*t/180:void 0}function vt(e,t){return t=new dn(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function _t(e,t){e.clip(t)}function bt(e,t,n,i){for(var r=new Sn([t,n],i).curvePoints(),o=1;o0?(r=e.className,e.className+=" kendo-pdf-hide-pseudo-elements",Ft(e,t),e.className=r,i.forEach(function(t){e.removeChild(t)})):Ft(e,t)))}function Ft(e,t){function i(t){var n,i,r,o,a,s;if(/^td$/i.test(e.tagName)&&(n=Cr.table,n&&"collapse"==st(n.style,"border-collapse"))){if(i=dt(n.style,"left").width,r=dt(n.style,"top").width,0===i&&0===r)return t;if(o=n.element.getBoundingClientRect(),a=n.element.rows[0].cells[0],s=a.getBoundingClientRect(),s.top==o.top||s.left==o.left)return Ne(t).map(function(e){return{left:e.left+i,top:e.top+r,right:e.right+i,bottom:e.bottom+r,height:e.height,width:e.width}})}return t}function r(e,n,i,r,o,a,s,l){function d(t,n,r){var o=Math.PI/2*t/(t+i),a={x:n.x-t,y:n.y-i},s=new Bn({fill:{color:e},stroke:null}).moveTo(0,0);vt(s,r),bt(s,0,n.y,{startAngle:-90,endAngle:-mt(o),radiusX:n.x,radiusY:n.y}),a.x>0&&a.y>0?(s.lineTo(a.x*Math.cos(o),n.y-a.y*Math.sin(o)),bt(s,0,n.y,{startAngle:-mt(o),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?s.lineTo(a.x,i).lineTo(0,i):s.lineTo(a.x,i).lineTo(a.x,0),c.append(s.close())}if(!(i<=0)){var u,c=new Gn;vt(c,l),t.append(c),kt(a),kt(s),u=new Bn({fill:{color:e},stroke:null}),c.append(u),u.moveTo(a.x?Math.max(a.x,r):0,0).lineTo(n-(s.x?Math.max(s.x,o):0),0).lineTo(n-Math.max(s.x,o),i).lineTo(Math.max(a.x,r),i).close(),a.x&&d(r,a,[-1,0,0,1,a.x,0]),s.x&&d(o,s,[1,0,0,1,n-s.x,0])}}function o(e){var n,i,r=new Gn;for(_t(r,xt(e,T,S,F,D)),t.append(r),A&&(n=new Bn({fill:{color:A.toCssRgba()},stroke:null}),n.moveTo(e.left,e.top).lineTo(e.right,e.top).lineTo(e.right,e.bottom).lineTo(e.left,e.bottom).close(),r.append(n)),i=d.length;--i>=0;)a(r,e,d[i],u[i%u.length],c[i%c.length],h[i%h.length],p[i%p.length])}function a(t,n,i,r,o,a,s){function l(t,n,i,l,d){function u(){for(;g.origin.x>n.left;)g.origin.x-=i}function c(){for(;g.origin.y>n.top;)g.origin.y-=l}function h(){for(;g.origin.x0&&d.height>0&&l(t,n,d.width,d.height,function(e,t){e.append(new qn(i.url,t))})}else{if("linear"!=i.type)return;l(t,n,n.width,n.height,Et(i))}}function s(){function i(n){ut(e,function(){e.style.position="relative";var i=e.ownerDocument.createElement(yr);i.style.position="absolute",i.style.boxSizing="border-box","outside"==o?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",n(i),e.insertBefore(i,e.firstChild),Ot(i,t),e.removeChild(i)})}function r(t){var n,i=e.parentNode.children,r=e.getAttribute("kendo-split-index");if(null!=r)return t(0|r,i.length);for(n=0;n0&&(i&&"ltr"==E||a&&"rtl"==E),d=y.width>0&&(a&&"ltr"==E||i&&"rtl"==E),0!==w.width||0!==C.width||0!==y.width||0!==x.width)){if(w.color==y.color&&w.color==x.color&&w.color==C.color&&w.width==y.width&&w.width==x.width&&w.width==C.width&&l&&d)return n=pt(n,w.width/2),u=yt(e,n,w.width/2),u.options.stroke={color:w.color,width:w.width},void t.append(u);if(0===T.x&&0===S.x&&0===F.x&&0===D.x&&w.width<2&&C.width<2&&y.width<2&&x.width<2)return w.width>0&&t.append(new Bn({stroke:{width:w.width,color:w.color}}).moveTo(n.left,n.top+w.width/2).lineTo(n.right,n.top+w.width/2)),x.width>0&&t.append(new Bn({stroke:{width:x.width,color:x.color}}).moveTo(n.left,n.bottom-x.width/2).lineTo(n.right,n.bottom-x.width/2)),l&&t.append(new Bn({stroke:{width:C.width,color:C.color}}).moveTo(n.left+C.width/2,n.top).lineTo(n.left+C.width/2,n.bottom)),void(d&&t.append(new Bn({stroke:{width:y.width,color:y.color}}).moveTo(n.right-y.width/2,n.top).lineTo(n.right-y.width/2,n.bottom)));c=wt(n,T,S,F,D),h=c.tl,p=c.tr,f=c.br,m=c.bl,r(w.color,n.width,w.width,C.width,y.width,h,p,[1,0,0,1,n.left,n.top]),r(x.color,n.width,x.width,y.width,C.width,f,m,[-1,0,0,-1,n.right,n.bottom]),r(C.color,n.height,C.width,x.width,w.width,s(m),s(h),[0,-1,1,0,n.left,n.bottom]),r(y.color,n.height,y.width,w.width,x.width,s(p),s(f),[0,1,-1,0,n.right,n.top])}}var d,u,c,h,p,f,m,g,v,_,b,k=at(e),w=dt(k,"top"),y=dt(k,"right"),x=dt(k,"bottom"),C=dt(k,"left"),T=ct(k,"top-left"),S=ct(k,"top-right"),D=ct(k,"bottom-left"),F=ct(k,"bottom-right"),E=st(k,"direction"),A=st(k,"background-color");if(A=Xe(A),d=Er(st(k,"background-image")),u=Ar(st(k,"background-repeat")),c=Ar(st(k,"background-position")),h=Ar(st(k,"background-origin")),p=Ar(st(k,"background-size")),wr.msie&&wr.version<10&&(c=Ar(e.currentStyle.backgroundPosition)),f=pt(e.getBoundingClientRect(),"border-*-width",e),function(){var e,n,i,r,o,a,s,l=st(k,"clip"),d=/^\s*rect\((.*)\)\s*$/.exec(l);d&&(e=d[1].split(/[ ,]+/g),n="auto"==e[0]?f.top:parseFloat(e[0])+f.top,i="auto"==e[1]?f.right:parseFloat(e[1])+f.left,r="auto"==e[2]?f.bottom:parseFloat(e[2])+f.top,o="auto"==e[3]?f.left:parseFloat(e[3])+f.left,a=new Gn,s=(new Bn).moveTo(o,n).lineTo(i,n).lineTo(i,r).lineTo(o,r).close(),_t(a,s),t.append(a),t=a,it(s))}(),_=st(k,"display"),"table-row"==_)for(m=[],g=0,v=e.children;g0&&"list-item"==_&&!e.getAttribute("kendo-no-bullet")&&s(m[0]),function(){function n(){var n=yt(e,f,"padding"),i=new Gn;_t(i,n),t.append(i),t=i,it(n)}Mt(e)?n():/^(hidden|auto|scroll)/.test(st(k,"overflow"))?n():/^(hidden|auto|scroll)/.test(st(k,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(st(k,"overflow-y"))&&n()}(),At(e,t)||Bt(e,t),t}function Et(e){return function(t,n){var i,r,o,a,s,l,d,u,c,h,p,f,m,g=n.width(),v=n.height();switch(e.type){case"linear":switch(i=null!=e.angle?e.angle:Math.PI,e.to){case"top":i=0;break;case"left":i=-Math.PI/2;break;case"bottom":i=Math.PI;break;case"right":i=Math.PI/2;break;case"top left":case"left top":i=-Math.atan2(v,g);break;case"top right":case"right top":i=Math.atan2(v,g);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,g);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,g)}e.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),r=Math.abs(g*Math.sin(i))+Math.abs(v*Math.cos(i)),o=Math.atan(g*Math.tan(i)/v),a=Math.sin(o),s=Math.cos(o),l=Math.abs(a)+Math.abs(s),d=l/2*a,u=l/2*s,i>Math.PI/2&&i<=3*Math.PI/2&&(d=-d,u=-u),c=[],h=0,p=e.stops.map(function(t,n){var i,o=t.percent;return o?o=parseFloat(o)/100:t.length?o=parseFloat(t.length)/r:0===n?o=0:n==e.stops.length-1&&(o=1),i={color:t.color.toCssRgba(),offset:o},null!=o?(h=o,c.forEach(function(e,t){var n=e.stop;n.offset=e.left+(h-e.left)*(t+1)/(c.length+1)}),c=[]):c.push({left:h,stop:i}),i}),f=[.5-d,.5+u],m=[.5+d,.5-u],t.append(Bn.fromRect(n).stroke(null).fill(new ti({start:f,end:m,stops:p,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function At(e,t){var n,i,r,o;return e._kendoExportVisual?n=e._kendoExportVisual():window.kendo&&window.kendo.jQuery&&e.getAttribute(window.kendo.attr("role"))&&(i=window.kendo.widgetInstance(window.kendo.jQuery(e)),i&&(i.exportDOMVisual||i.exportVisual)&&(n=i.exportDOMVisual?i.exportDOMVisual():i.exportVisual())),!!n&&(r=new Gn,r.children.push(n),o=e.getBoundingClientRect(),r.transform(F().translate(o.left,o.top)),t.append(r),!0)}function It(e,t,n){var i=ht(e),r=new hn([i.left,i.top],[i.width,i.height]),o=new qn(t,r);_t(o,yt(e,i,"content")),n.append(o)}function Rt(e,t){var n=at(e),i=at(t),r=parseFloat(st(n,"z-index")),o=parseFloat(st(i,"z-index")),a=st(n,"position"),s=st(i,"position");return isNaN(r)&&isNaN(o)?/static|absolute/.test(a)&&/static|absolute/.test(s)?0:"static"==a?-1:"static"==s?1:0:isNaN(r)?0===o?0:o>0?-1:1:isNaN(o)?0===r?0:r>0?1:-1:parseFloat(r)-parseFloat(o)}function Mt(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function zt(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function Ht(e,t){var n=at(e),i=st(n,"color"),r=e.getBoundingClientRect();"checkbox"==e.type?(t.append(Bn.fromRect(new hn([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(i,1)),e.checked&&t.append((new Bn).stroke(i,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(t.append(new yn(new gn([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-2,r.height-2)/2)).stroke(i,1)),e.checked&&t.append(new yn(new gn([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-8,r.height-8)/2)).fill(i).stroke(null)))}function Nt(e,t){var n,i,r,o,a,s=e.tagName.toLowerCase();if("input"==s&&("checkbox"==e.type||"radio"==e.type))return Ht(e,t);if(n=e.parentNode,i=e.ownerDocument,r=i.createElement(yr),r.style.cssText=St(at(e)),"input"==s&&(r.style.whiteSpace="pre"),"select"!=s&&"textarea"!=s||(r.style.overflow="auto"),"select"==s)if(e.multiple)for(a=0;a=u)return!0;if(m.setStart(t,d),m.setEnd(t,d+1),e=i(m),n=!1,(v||_>1)&&(f=l.substr(d).search(/\s/),f>=0&&(m.setEnd(t,d+f),r=i(m),r.bottom==e.bottom&&(e=r,n=!0,d+=f))),!n){if(f=function g(n,r,o){m.setEnd(t,r);var a=i(m);return a.bottom!=e.bottom&&n>1,r):a.right!=e.right?(e=a,r>1,o):r):r}(d,Math.min(u,d+x),u),f==d)return!0;if(d=f,f=(""+m).search(/\s+$/), 0===f)return!1;f>0&&(m.setEnd(t,m.startOffset+f),e=i(m))}if(Tr&&(e=m.getClientRects()[0]),a=""+m,/^(?:pre|pre-wrap)$/i.test(b)){if(/\t/.test(a)){for(s=0,f=p;f=0;)h=" ".substr(0,8-(s+f)%8),a=a.substr(0,f)+h+a.substr(f+1)}}else a=a.replace(/\s+/g," ");n||(C=e.bottom),o(a,e)}function o(e,t){var i,r,o;switch(Tr&&!isNaN(h)&&(i=Rr(p),r=(t.top+t.bottom-i)/2,t={top:r,right:t.right,bottom:r+i,left:t.left,height:i,width:t.right-t.left}),k){case"uppercase":e=e.toUpperCase();break;case"lowercase":e=e.toLowerCase();break;case"capitalize":e=e.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})}o=new Sr(e,new hn([t.left,t.top],[t.width,t.height]),{font:p,fill:{color:f}}),n.append(o)}function a(e){function t(t,i){var r,o;t&&(r=c/12,o=new Bn({stroke:{width:r,color:t}}),i-=r,o.moveTo(e.left,i).lineTo(e.right,i),n.append(o))}t(T,e.bottom),t(S,e.bottom-e.height/2.7),t(D,e.top)}var s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C,T,S,D,F;if(!rt()&&(s=at(e),!(parseFloat(st(s,"text-indent"))<-500)&&(l=t.data,d=0,u=l.search(/\S\s*$/)+1,u&&(c=st(s,"font-size"),h=st(s,"line-height"),p=[st(s,"font-style"),st(s,"font-variant"),st(s,"font-weight"),c,st(s,"font-family")].join(" "),c=parseFloat(c),h=parseFloat(h),0!==c)))){for(f=st(s,"color"),m=e.ownerDocument.createRange(),g=st(s,"text-align"),v="justify"==g,_=st(s,"column-count",1),b=st(s,"white-space"),k=st(s,"text-transform"),Tr&&(w=s.textOverflow,"ellipsis"==w&&(y=e.style.textOverflow,e.style.textOverflow="clip")),x=e.getBoundingClientRect().width/c*5,0===x&&(x=500),C=null,T=Cr.underline,S=Cr["line-through"],D=Cr.overline,F=T||S||D;!r(););Tr&&"ellipsis"==w&&(e.style.textOverflow=y),F&&(m.selectNode(t),Ne(m.getClientRects()).forEach(a))}}function Lt(e,t,n){var i,r,o,a,s,l;for("auto"!=n?(i=Cr._stackingContext.group,n=parseFloat(n)):(i=t,n=0),r=i.children,o=0;on);++o);return a=new Gn,i.insert(o,a),a._dom_zIndex=n,i!==t&&Cr._clipbox&&(s=Cr._matrix.invert(),l=Cr._clipbox.transformCopy(s),_t(a,Bn.fromRect(l))),a}function Ot(e,t){var n,i,r,o,a,s,l=at(e);Qe(l),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=Cr._clipbox&&(n=parseFloat(st(l,"opacity")),i=st(l,"visibility"),r=st(l,"display"),0!==n&&"hidden"!=i&&"none"!=r&&(o=ft(l),s=st(l,"z-index"),(o||n<1)&&"auto"==s&&(s=0),a=Lt(e,t,s),n<1&&a.opacity(n*a.opacity()),tt(e,l,a),o?ut(e,function(){var t,n,i,r;lt(e.style,"transform","none","important"),lt(e.style,"transition","none","important"),"static"==st(l,"position")&<(e.style,"position","relative","important"),t=e.getBoundingClientRect(),n=t.left+o.origin[0],i=t.top+o.origin[1],r=[1,0,0,1,-n,-i],r=Vt(r,o.matrix),r=Vt(r,[1,0,0,1,n,i]),r=vt(a,r),Cr._matrix=Cr._matrix.multiplyCopy(r),Dt(e,a)}):Dt(e,a),nt()))}function Vt(e,t){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],d=t[1],u=t[2],c=t[3],h=t[4],p=t[5];return[n*l+i*u,n*d+i*c,r*l+o*u,r*d+o*c,a*l+s*u+h,a*d+s*c+p]}var Wt,Ut,qt,jt,Gt,$t,Kt,Yt,Qt,Xt,Jt,Zt,en,tn,nn,rn,on,an,sn,ln,dn,un,cn,hn,pn,fn,mn,gn,vn,_n,bn,kn,wn,yn,xn,Cn,Tn,Sn,Dn,Fn,En,An,In,Rn,Mn,zn,Hn,Nn,Bn,Pn,Ln,On,Vn,Wn,Un,qn,jn,Gn,$n,Kn,Yn,Qn,Xn,Jn,Zn,ei,ti,ni,ii,ri,oi,ai,si,li,di,ui,ci,hi,pi,fi,mi,gi,vi,_i,bi,ki,wi,yi,xi,Ci,Ti,Si,Di,Fi,Ei,Ai,Ii,Ri,Mi,zi,Hi,Ni,Bi,Pi,Li,Oi,Vi,Wi,Ui,qi,ji,Gi,$i,Ki,Yi,Qi,Xi,Ji,Zi,er,tr,nr,ir,rr,or,ar,sr,lr,dr,ur,cr,hr,pr,fr,mr,gr,vr,_r,br,kr,wr,yr,xr,Cr,Tr,Sr,Dr,Fr,Er,Ar,Ir,Rr,Mr;window.kendo=window.kendo||{},Wt=kendo.drawing,Ut=Wt.util,qt=kendo.Class,jt=kendo.util,Gt=kendo.support,$t=Gt.browser,Kt=Ut.createPromise,Yt=Ut.promiseAll,Qt={extend:function(e){var t,n=this;for(t in this)"extend"!==t&&(e[t]=n[t])},observers:function(){return this._observers=this._observers||[]},addObserver:function(e){return this._observers?this._observers.push(e):this._observers=[e],this},removeObserver:function(e){var t=this.observers(),n=t.indexOf(e);return n!==-1&&t.splice(n,1),this},trigger:function(e,t){var n,i,r=this._observers;if(r&&!this._suspended)for(n=0;n=0,s=this,l=e;if(a){for(n=l.split("."),i=this.prefix;n.length>1;)l=n.shift(),i+=l+".",r=s[l],r||(r=new ln({},i),r.addObserver(o),s[l]=r),s=r;l=n[0]}s._clear(l),s[l]=t},_clear:function(e){var t=this[e];t&&t.removeObserver&&t.removeObserver(this)},_wrap:function(e,t){var n=sn.call(e),r=e;return null!==r&&i(r)&&"[object Object]"===n&&(e instanceof ln||e instanceof qt||(r=new ln(r,this.prefix+t+".")),r.addObserver(this)),r}}),Qt.extend(ln.prototype),dn=qt.extend({init:function(e,t,n,i,r,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0),this.a=e,this.b=t,this.c=n,this.d=i,this.e=r,this.f=o},multiplyCopy:function(e){return new dn(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)},invert:function(){var e=this,t=e.a,n=e.b,i=e.c,r=e.d,o=e.e,a=e.f,s=t*r-n*i;return 0===s?null:new dn(r/s,-n/s,-i/s,t/s,(i*a-r*o)/s,(n*o-t*a)/s)},clone:function(){return new dn(this.a,this.b,this.c,this.d,this.e,this.f)},equals:function(e){return!!e&&(this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f)},round:function(e){return this.a=g(this.a,e),this.b=g(this.b,e),this.c=g(this.c,e),this.d=g(this.d,e),this.e=g(this.e,e),this.f=g(this.f,e),this},toArray:function(e){var t,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(i(e))for(t=0;t0&&!u(e.color)},_clippedBBox:function(e){return this.bbox(e)}}),fn.prototype.nodeType="Element",Qt.extend(fn.prototype),mn=Math.PI/2,gn=qt.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t=0),this.setCenter(e),this.setRadius(t)},setCenter:function(e){return this._observerField("center",un.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},equals:function(e){return e&&e.center.equals(this.center)&&e.radius===this.radius},clone:function(){return new gn(this.center.clone(),this.radius)},pointAt:function(e){return this._pointAt(f(e))},bbox:function(e){var t,n,i,r,o=this,a=E(this.center,this.radius,this.radius,e),s=un.maxPoint(),l=un.minPoint();for(t=0;t<4;t++)n=o._pointAt(a.x+t*mn).transformCopy(e),i=o._pointAt(a.y+t*mn).transformCopy(e),r=new un(n.x,i.y),s=un.min(s,r),l=un.max(l,r);return hn.fromPoints(s,l)},_pointAt:function(e){var t=this,n=t.center,i=t.radius;return new un(n.x+i*Math.cos(e),n.y+i*Math.sin(e))},containsPoint:function(e){var t=this,n=t.center,i=t.radius,r=Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)<=Math.pow(i,2);return r},_isOnPath:function(e,t){var n=this,i=n.center,r=n.radius,o=i.distanceTo(e);return r-t<=o&&o<=r+t}}),S(gn.prototype,["radius"]),Qt.extend(gn.prototype),vn="Gradient",_n={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var n,r=this.options;return i(e)?(e&&e.nodeType!==vn?(n={color:e},i(t)&&(n.opacity=t),r.set("fill",n)):r.set("fill",e),this):r.get("fill")},stroke:function(e,t,n){return i(e)?(this.options.set("stroke.color",e),i(t)&&this.options.set("stroke.width",t),i(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")}},bn=""+dn.IDENTITY,kn={extend:function(e){e.bbox=this.bbox,e.geometryChange=this.geometryChange},bbox:function(e){var t,n,i=D(this.currentTransform(e)),r=i?""+i:bn;return this._bboxCache&&this._matrixHash===r?t=this._bboxCache.clone():(t=this._bbox(i),this._bboxCache=t?t.clone():null,this._matrixHash=r),n=this.options.get("stroke.width"),n&&t&&t.expand(n/2),t},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},wn="#000",yn=fn.extend({init:function(e,t){void 0===e&&(e=new gn),void 0===t&&(t={}),fn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke(wn)},rawBBox:function(){return this._geometry.bbox()},_bbox:function(e){return this._geometry.bbox(e)},_containsPoint:function(e){return this.geometry().containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),yn.prototype.nodeType="Circle",_n.extend(yn.prototype),kn.extend(yn.prototype),I(yn.prototype,["geometry"]),xn=10,Cn=45,Tn=Math.pow,Sn=qt.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t={}),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation},clone:function(){return new Sn(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(e){return this._observerField("center",un.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(e){var t=this.center,n=f(e);return new un(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))},curvePoints:function(){var e,t,n,i,r=this,o=this.startAngle,a=this.anticlockwise?-1:1,s=[this.pointAt(o)],l=this._arcInterval(),d=l.endAngle-l.startAngle,u=Math.ceil(d/Cn),c=d/u,h=o;for(this.xRotation&&(e=F().rotate(this.xRotation,this.center)),t=1;t<=u;t++)n=h+a*c,i=r._intervalCurvePoints(h,n,e),s.push(i.cp1,i.cp2,i.p2),h=n;return s},bbox:function(e){for(var t,n,i=this,r=this._arcInterval(),a=r.startAngle,s=r.endAngle,l=E(this.center,this.radiusX,this.radiusY,e),d=o(l.x),u=o(l.y),c=this.pointAt(s).transformCopy(e),h=B(d,a),p=B(u,a),f=this.pointAt(a).transformCopy(e),m=un.min(f,c),g=un.max(f,c);hi||r&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(e,t,n){var i=this.pointAt(e),r=this.pointAt(t),o=this._derivativeAt(e),a=this._derivativeAt(t),s=(f(t)-f(e))/3,l=new un(i.x+s*o.x,i.y+s*o.y),d=new un(r.x-s*a.x,r.y-s*a.y);return n&&(i.transform(n),r.transform(n),l.transform(n),d.transform(n)),{p1:i,cp1:l,cp2:d,p2:r}},_derivativeAt:function(e){var t=f(e);return new un(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},containsPoint:function(e){var t,n,i,r=this._arcInterval(),o=r.endAngle-r.startAngle,a=this,s=a.center,l=a.radiusX,d=a.radiusY,u=s.distanceTo(e),c=Math.atan2(e.y-s.y,e.x-s.x),h=l*d/Math.sqrt(Tn(l,2)*Tn(Math.sin(c),2)+Tn(d,2)*Tn(Math.cos(c),2)),p=this.pointAt(this.startAngle).round(xn),f=this.pointAt(this.endAngle).round(xn),m=z(s,e.round(xn),p,f);return o<180?t=m&&M(s.distanceTo(m),u)&&M(u,h):(n=H(s.x,s.y,l,d,e.x,e.y),360!==n&&(n=(360+n)%360),i=r.startAngle<=n&&n<=r.endAngle,t=i&&M(u,h)||!i&&(!m||m.equals(e))),t},_isOnPath:function(e,t){var n,i=this._arcInterval(),r=this.center,o=H(r.x,r.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==o&&(o=(360+o)%360),n=i.startAngle<=o&&o<=i.endAngle,n&&this.pointAt(o).distanceTo(e)<=t}}),Sn.fromPoints=function(e,t,n,i,r,o,a){var s=N({x1:e.x,y1:e.y,x2:t.x,y2:t.y,rx:n,ry:i,largeArc:r,swipe:o,rotation:a});return new Sn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:s.radiusX,radiusY:s.radiusY,xRotation:s.xRotation,anticlockwise:0===o})},S(Sn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Qt.extend(Sn.prototype),Dn=[].push,Fn=[].pop,En=[].splice,An=[].shift,In=[].slice,Rn=[].unshift,Mn=qt.extend({init:function(e){void 0===e&&(e=[]),this.length=0,this._splice(0,e.length,e)},elements:function(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)},push:function(){var e=arguments,t=Dn.apply(this,e);return this._add(e),t},slice:function(){return In.call(this)},pop:function(){var e=this.length,t=Fn.apply(this);return e&&this._remove([t]),t},splice:function(e,t){var n=In.call(arguments,2),i=this._splice(e,t,n);return this._change(),i},shift:function(){var e=this.length,t=An.apply(this);return e&&this._remove([t]),t},unshift:function(){var e=arguments,t=Rn.apply(this,e);return this._add(e),t},indexOf:function(e){var t,n=this,i=this.length;for(t=0;t1)&&(r=0),o=Math.min(Math.max(u,c),1),(o>1||o<0)&&(o=1),{min:r,max:o}},_intersectionsTo:function(e,t){var n;return n=this.controlOut()&&e.controlIn()?$([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):K(this.anchor(),e.anchor(),t)},_isOnCurveTo:function(e,t,n,i){var r,o,a,s,l,d,u,c=this.bboxTo(e).expand(n,n);if(c.containsPoint(t))return r=this.anchor(),o=this.controlOut(),a=e.controlIn(),s=e.anchor(),"start"===i&&r.distanceTo(t)<=n?!O(r,o,t):"end"===i&&s.distanceTo(t)<=n?!O(s,a,t):(l=[r,o,a,s],!(!G(l,t,"x","y",n)&&!G(l,t,"y","x",n))||(d=F().rotate(45,t),u=[r.transformCopy(d),o.transformCopy(d),a.transformCopy(d),s.transformCopy(d)],G(u,t,"x","y",n)||G(u,t,"y","x",n)))},_isOnLineTo:function(e,t,n){var i=this.anchor(),r=e.anchor(),a=o(Math.atan2(r.y-i.y,r.x-i.x)),s=new hn([i.x,i.y-n/2],[i.distanceTo(r),n]);return s.containsPoint(t.transformCopy(F().rotate(-a,i)))},_isOnPathTo:function(e,t,n,i){var r;return r=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,i):this._isOnLineTo(e,t,n)}}),L(Nn.prototype,["anchor","controlIn","controlOut"]),Qt.extend(Nn.prototype),Bn=fn.extend({init:function(e){fn.fn.init.call(this,e),this.segments=new zn,this.segments.addObserver(this),i(this.options.stroke)||(this.stroke("#000"),i(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this},lineTo:function(e,t){var n=i(t)?new un(e,t):e,r=new Nn(n);return this.segments.push(r),this},curveTo:function(e,t,n){var i,r;return this.segments.length>0&&(i=c(this.segments),r=new Nn(n,t),this.suspend(),i.controlOut(e),this.resume(),this.segments.push(r)),this},arc:function(e,t,n,i,r){var o,a,s,l,d;return this.segments.length>0&&(o=c(this.segments),a=o.anchor(),s=f(e),l=new un(a.x-n*Math.cos(s),a.y-i*Math.sin(s)),d=new Sn(l,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:r}),this._addArcSegments(d)),this},arcTo:function(e,t,n,i,r,o){var a,s,l;return this.segments.length>0&&(a=c(this.segments),s=a.anchor(),l=Sn.fromPoints(s,e,t,n,i,r,o),this._addArcSegments(l)),this},_addArcSegments:function(e){var t,n,i=this;for(this.suspend(),t=e.curvePoints(),n=1;n1){if(i[0]._isOnPathTo(i[1],e,o,"start"))return!0;for(n=2;n<=r-2;n++)if(i[n-1]._isOnPathTo(i[n],e,o))return!0;if(i[r-2]._isOnPathTo(i[r-1],e,o,"end"))return!0}return!1},_bbox:function(e){var t,n,i,r,o=this.segments,a=o.length;if(1===a)n=o[0].anchor().transformCopy(e),t=new hn(n,cn.ZERO);else if(a>0)for(i=1;i0)for(t.moveTo(n[0].x,n[0].y),e=1;e0&&c(this.paths).lineTo(e,t),this},curveTo:function(e,t,n){return this.paths.length>0&&c(this.paths).curveTo(e,t,n),this},arc:function(e,t,n,i,r){return this.paths.length>0&&c(this.paths).arc(e,t,n,i,r),this},arcTo:function(e,t,n,i,r,o){return this.paths.length>0&&c(this.paths).arcTo(e,t,n,i,r,o),this},close:function(){return this.paths.length>0&&c(this.paths).close(),this},_bbox:function(e){return Q(this.paths,!0,e)},rawBBox:function(){return Q(this.paths,!1)},_containsPoint:function(e){var t,n=this.paths;for(t=0;t=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},removeAt:function(e){if(0<=e&&e=0;n--)t(e[n],n)},Qn=Gn.extend({init:function(t,n){Gn.fn.init.call(this,e.extend({},$n,n)),this._rect=t,this._fieldMap={}},rect:function(e){return e?(this._rect=e,this):this._rect},_initMap:function(){var e=this.options,t=this._fieldMap;"horizontal"===e.orientation?(t.sizeField="width",t.groupsSizeField="height",t.groupAxis="x",t.groupsAxis="y"):(t.sizeField="height",t.groupsSizeField="width",t.groupAxis="y",t.groupsAxis="x"),e.reverse?(this.forEach=Yn,this.justifyAlign=ee):(this.forEach=Kn,this.justifyAlign=Z)},reflow:function(){var e,t,n,i,r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C=this;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),e=this.options,t=this._rect,n=this._initGroups(),i=n.groups,r=n.groupsSize,o=this._fieldMap,a=o.sizeField,s=o.groupsSizeField,l=o.groupAxis,d=o.groupsAxis,u=new un,c=new un,h=new cn,p=Z(r,t,e.alignContent,d,s),v=function(t,n){var i=m.elements[n];c[l]=f,c[d]=Z(t.size[s],g,e.alignItems,d,s),J(c,t,i),f+=t.size[a]+e.spacing},_=0;_t.size[a]&&(b=t.size[a]/g.size[a],k=g.topLeft().scale(b,b),w=g.size[s]*b,y=Z(w,t,e.alignContent,d,s),x=F(),"x"===l?x.translate(t.origin.x-k.x,y-k.y):x.translate(y-k.x,t.origin.y-k.y),x.scale(b,b),this.transform(x))}},_initGroups:function(){var e,t,n,i=this,r=this,o=r.options,a=r.children,s=o.lineSpacing,l=o.wrap,d=o.spacing,u=this._fieldMap.sizeField,c=this._newGroup(),h=[],p=function(){h.push(c),f+=c.lineSize+s},f=-s;for(e=0;ei._rect.size[u]?0===c.bboxes.length?(i._addToGroup(c,n,t),p(),c=i._newGroup()):(p(),c=i._newGroup(),i._addToGroup(c,n,t)):i._addToGroup(c,n,t));return c.bboxes.length&&p(),{groups:h,groupsSize:f}},_addToGroup:function(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),Xn=fn.extend({init:function(e,t){void 0===e&&(e=new hn),void 0===t&&(t={}),fn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke("#000")},_bbox:function(e){return this._geometry.bbox(e)},rawBBox:function(){return this._geometry.bbox()},_containsPoint:function(e){return this._geometry.containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),Xn.prototype.nodeType="Rect",_n.extend(Xn.prototype),kn.extend(Xn.prototype),I(Xn.prototype,["geometry"]),Jn=Mn.extend({_change:function(){this.optionsChange({field:"stops"})}}),Zn=qt.extend({init:function(e,t,n){this.options=new ln({offset:e,color:t,opacity:i(n)?n:1}),this.options.addObserver(this)}}),Zn.create=function(e){if(i(e)){var t;return t=e instanceof Zn?e:e.length>1?new Zn(e[0],e[1],e[2]):new Zn(e.offset,e.color,e.opacity)}},fe(Zn.prototype,["offset","color","opacity"]),Qt.extend(Zn.prototype),ei=qt.extend({init:function(e){void 0===e&&(e={}),this.stops=new Jn(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=r()},userSpace:function(e){return i(e)?(this._userSpace=e,this.optionsChange(),this):this._userSpace},_createStops:function(e){var t,n;for(void 0===e&&(e=[]),t=[],n=0;n=0&&this.stops.splice(t,1)}}),ei.prototype.nodeType="Gradient",Qt.extend(ei.prototype),e.extend(ei.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),ti=ei.extend({init:function(e){void 0===e&&(e={}),ei.fn.init.call(this,e),this.start(e.start||new un),this.end(e.end||new un(1,0))}}),L(ti.prototype,["start","end"]),ni=ei.extend({init:function(e){void 0===e&&(e={}),ei.fn.init.call(this,e),this.center(e.center||new un),this._radius=i(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill},radius:function(e){return i(e)?(this._radius=e,this.geometryChange(),this):this._radius},fallbackFill:function(e){return i(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill}}),L(ni.prototype,["center"]),ii={swing:me,linear:ge,easeOutElastic:ve},ri=Date.now||function(){return(new Date).getTime()},oi=qt.extend({init:function(t,n){this.options=e.extend({},this.options,n),this.element=t},setup:function(){},step:function(){},play:function(){var e,t,n,i=this,r=this.options,o=r.duration,a=r.delay;void 0===a&&(a=0),e=ii[r.easing],t=ri()+a,n=t+o,0===o?(this.step(1),this.abort()):setTimeout(function(){var r=function(){var a,s,l,d;i._stopped||(a=ri(),s=h(a-t,0,o),l=s/o,d=e(l,s,0,1,o),i.step(d),a2&&(s="l",d.splice(0,2))),si[s])si[s](i,{parameters:d,position:r,isRelative:l,previousCommand:n}),a&&a.toLowerCase()===hi&&i.close();else if(s!==ci)throw Error("Error while parsing SVG path. Unsupported command: "+s);n=s}),i}}),pi.current=new pi,Bn.parse=function(e,t){return pi.current.parse(e,t)},fi=qt.extend({init:function(){this._items=[]},register:function(e,t,n){var i=this._items,r=i[0],o={name:e,type:t,order:n};!r||n0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger("resize",t))},size:function(e){return e?void this.setSize(e):this.getSize()},suspendTracking:function(){this._suspendedTracking=!0},resumeTracking:function(){this._suspendedTracking=!1},_enableTracking:function(){},_resize:function(){},_handler:function(e){var t=this;return function(n){var i=t.eventTarget(n);i&&!t._suspendedTracking&&t.trigger(e,{element:i,originalEvent:n,type:e})}},_elementOffset:function(){var e=this.element,t=k(e,["paddingLeft","paddingTop"]),n=t.paddingLeft,i=t.paddingTop,r=b(e),o=r.left,a=r.top;return{left:o+parseInt(n,10),top:a+parseInt(i,10)}},_surfacePoint:function(e){var t=this._elementOffset(),n=l(e),i=n.x-t.left,r=n.y-t.top;return new un(i,r)}}),gi.create=function(e,t){return fi.current.create(e,t)},gi.support={},vi=qt.extend({init:function(e){this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())},destroy:function(){var e,t,n=this;for(this.srcElement&&this.srcElement.removeObserver(this),e=this.childNodes,t=0;t",xi=document.createElement("div"),Ci="undefined"!=typeof DOMParser,xi.innerHTML=yi,Ci&&xi.firstChild.namespaceURI!==bi&&(wi=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),r=document.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(r)})),Ti=wi,Si="transform",Di={clip:"clip-path",fill:"fill"},Fi=vi.extend({init:function(e,t){vi.fn.init.call(this,e),this.definitions={},this.options=t},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),vi.fn.destroy.call(this)},load:function(e,t){var n,r,o,a,s,l=this;for(n=0;n0&&a.load(o),s=l.element,s&&a.attachTo(s,t)},root:function(){for(var e=this;e.parent;)e=e.parent;return e},attachTo:function(e,t){var n,r=document.createElement("div");Ti(r,""+this.render()+""),n=r.firstChild.firstChild,n&&(i(t)?e.insertBefore(n,e.childNodes[t]||null):e.appendChild(n),this.setElement(n))},setElement:function(e){var t,n,i;for(this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this,t=this.childNodes,n=0;n"},renderOffset:function(){return ye("offset",this.srcElement.offset())},mapStyle:function(){var e=this.srcElement;return[["stop-color",e.color()],["stop-opacity",e.opacity()]]},optionsChange:function(e){"offset"===e.field?this.attr(e.field,e.value):"color"!==e.field&&"opacity"!==e.field||this.css("stop-"+e.field,e.value)}}),Ai=Fi.extend({init:function(e){Fi.fn.init.call(this,e),this.id=e.id,this.loadStops()},loadStops:function(){var e,t,n=this,i=this.srcElement.stops,r=this.element;for(e=0;e"+this.renderChildren()+""},mapCoordinates:function(){var e=this.srcElement,t=e.start(),n=e.end(),i=[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()];return i}}),Ri=Ai.extend({template:function(){return""+this.renderChildren()+""},mapCoordinates:function(){var e=this.srcElement,t=e.center(),n=e.radius(),i=[["cx",t.x],["cy",t.y],["r",n],this.mapSpace()];return i}}),Mi=Fi.extend({init:function(e){Fi.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:function(){return""+this.renderChildren()+""}}),zi=Fi.extend({init:function(){Fi.fn.init.call(this),this.definitionMap={}},attachTo:function(e){this.element=e},template:function(){return""+this.renderChildren()+""},definitionChange:function(e){var t=e.definitions,n=e.action;"add"===n?this.addDefinitions(t):"remove"===n&&this.removeDefinitions(t)},createDefinition:function(e,t){var n;return"clip"===e?n=Mi:"fill"===e&&(t instanceof ti?n=Ii:t instanceof ni&&(n=Ri)),new n(t)},addDefinitions:function(e){var t,n=this;for(t in e)n.addDefinition(t,e[t])},addDefinition:function(e,t){var n,i=this,r=i.element,o=i.definitionMap,a=t.id,s=o[a];s?s.count++:(n=this.createDefinition(e,t),o[a]={element:n,count:1},this.append(n),r&&n.attachTo(this.element))},removeDefinitions:function(e){var t,n=this;for(t in e)n.removeDefinition(e[t])},removeDefinition:function(e){var t=this.definitionMap,n=e.id,i=t[n];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete t[n]))}}),Hi=Fi.extend({init:function(e){Fi.fn.init.call(this),this.options=e,this.defs=new zi},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){vi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(e){this.defs.definitionChange(e)}}),Ni="rtl",Bi=gi.extend({init:function(t,n){gi.fn.init.call(this,t,n),this._root=new Hi(e.extend({rtl:k(t,"direction").direction===Ni},this.options)),Ti(this.element,this._template()),this._rootElement=this.element.firstElementChild,Fe(this._rootElement),this._root.attachTo(this._rootElement),_(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,x(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),gi.fn.destroy.call(this)},translate:function(e){var t=Math.round(e.x)+" "+Math.round(e.y)+" "+this._size.width+" "+this._size.height;this._offset=e,this._rootElement.setAttribute("viewBox",t)},draw:function(e){gi.fn.draw.call(this,e),this._root.load([e])},clear:function(){gi.fn.clear.call(this),this._root.clear()},svg:function(){return""+this._template()},exportVisual:function(){var e,t=this,n=t._visual,i=t._offset;return i&&(e=new Gn,e.children.push(n),e.transform(F().translate(-i.x,-i.y)),n=e),n},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return""+this._root.render()+""}}),Bi.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(gi.support.svg=!0,fi.current.register("svg",Bi,10)),Pi=Fi.extend({template:function(){return""+this.renderChildren()+""},optionsChange:function(e){"transform"===e.field&&this.transformChange(e.value),Fi.fn.optionsChange.call(this,e)}}),_i.Group=Pi,Li={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Oi="solid",Vi="butt",Wi={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Ui=" ",qi=Fi.extend({geometryChange:function(){this.attr("d",this.renderData()),this.invalidate()},optionsChange:function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(e.value);break;default:var t=Wi[e.field];t&&this.attr(t,e.value)}Fi.fn.optionsChange.call(this,e)},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(e){var t,n,i,r,o,a=this,s=e.segments,l=s.length;if(l>0){for(t=[],r=1;r"}}),_i.Path=qi,ji=qi.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),_i.Arc=ji,Gi=qi.extend({geometryChange:function(){var e=this.center();this.attr("cx",e.x),this.attr("cy",e.y),this.attr("r",this.radius()),this.invalidate()},center:function(){return this.srcElement.geometry().center},radius:function(){return this.srcElement.geometry().radius},template:function(){return""}}),_i.Circle=Gi,$i=qi.extend({geometryChange:function(){var e=this.srcElement.geometry();this.attr("x",e.origin.x),this.attr("y",e.origin.y),this.attr("width",e.size.width),this.attr("height",e.size.height),this.invalidate()},size:function(){return this.srcElement.geometry().size},origin:function(){return this.srcElement.geometry().origin},template:function(){return""}}),_i.Rect=$i,Ki=qi.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),qi.fn.optionsChange.call(this,e)},mapPosition:function(){var e=this.srcElement.rect(),t=e.topLeft();return[["x",t.x],["y",t.y],["width",e.width()+"px"],["height",e.height()+"px"]]},renderPosition:function(){return xe(this.mapPosition())},mapSource:function(e){var t=this.srcElement.src();return e&&(t=kendo.htmlEncode(t)),[["xlink:href",t]]},renderSource:function(){return xe(this.mapSource(!0))},template:function(){return""}}),_i.Image=Ki,Yi=/&(?:[a-zA-Z]+|#\d+);/g,"undefined"!=typeof document&&(Ee._element=document.createElement("span")),Qi=qi.extend({geometryChange:function(){var e=this.pos();this.attr("x",e.x),this.attr("y",e.y),this.invalidate()},optionsChange:function(e){"font"===e.field?(this.attr("style",Ce(this.mapStyle())),this.geometryChange()):"content"===e.field&&qi.fn.content.call(this,this.srcElement.content()),qi.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=qi.fn.mapStyle.call(this,e),n=this.srcElement.options.font;return e&&(n=kendo.htmlEncode(n)),t.push(["font",n],["white-space","pre"]),t},pos:function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},renderContent:function(){var e=this.srcElement.content();return e=Ee(e),e=kendo.htmlEncode(e),jt.normalizeText(e)},renderTextAnchor:function(){var e;return!(this.options||{}).rtl||$t.msie||$t.edge||(e="end"),ye("text-anchor",e)},template:function(){return""+this.renderContent()+""}}),_i.Text=Qi,Xi=qi.extend({renderData:function(){var e,t,n=this,i=this.srcElement.paths;if(i.length>0){for(e=[],t=0;t0&&s.load(a,t,n),i(t)?l.insertAt(s,t):l.append(s)},load:function(e,t,n){this.loadElements(e,t,n),this.invalidate()},setOpacity:function(e){if(this.srcElement){var t=this.srcElement.opacity();i(t)&&this.globalAlpha(e,t)}},globalAlpha:function(e,t){var n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n},visible:function(){var e=this.srcElement;return!e||e&&e.options.visible!==!1}}),nr=tr.extend({renderTo:function(e){var t,n,i;if(this.visible()){for(e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),t=this.childNodes,n=0;n0;)n=e.pop(),n.addObserver(i),"Group"===n.nodeType?t(e,n.children):i._insertShape(n)},_insertShape:function(e){var t,n,i,r,o=e.bbox();o&&(t=this.getSectors(o),n=t[0][0],i=t[1][0],this.inRoot(t)?this.root.insert(e,o):(r=this.rootMap,r[n]||(r[n]={}),r[n][i]||(r[n][i]=new ar(new hn([n*sr,i*sr],[sr,sr]))),r[n][i].insert(e,o)))},remove:function(e){var t,n,i=this;if(e.removeObserver(this),"Group"===e.nodeType)for(t=e.children,n=0;n1||e[1].length>1},getSectors:function(e){var t,n,i=e.bottomRight(),r=Math.floor(i.x/sr),o=Math.floor(i.y/sr),a=[[],[]];for(t=Math.floor(e.origin.x/sr);t<=r;t++)a[0].push(t);for(n=Math.floor(e.origin.y/sr);n<=o;n++)a[1].push(n);return a}}),cr=qt.extend({init:function(e){e.bind("mouseenter",this._mouseenter.bind(this)),e.bind("mouseleave",this._mouseleave.bind(this)),this.element=e.element},clear:function(){this._resetCursor()},destroy:function(){this._resetCursor(),delete this.element},_mouseenter:function(e){var t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},_mouseleave:function(){this._resetCursor()},_shapeCursor:function(e){for(var t=e.element;t&&!i(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},_getCursor:function(){if(this.element)return this.element.style.cursor},_setCursor:function(e){this.element&&(this.element.style.cursor=e,this._current=e)},_resetCursor:function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)}}),hr=gi.extend({init:function(e,t){var n,i;gi.fn.init.call(this,e,t),this.element.innerHTML=this._template(this),n=this.element.firstElementChild,i=y(e),n.width=i.width,n.height=i.height,this._rootElement=n,this._root=new rr(n),this._mouseTrackHandler=this._trackMouse.bind(this),_(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){gi.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(e){gi.fn.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},clear:function(){gi.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},eventTarget:function(e){var t,n;if(this._searchTree)return t=this._surfacePoint(e),n=this._searchTree.pointShape(t)},image:function(){var e,t,n=this,i=n._root,r=n._rootElement,o=[];return i.traverse(function(e){e.loading&&o.push(e.loading)}),e=Kt(),t=function(){i._invalidate();try{var t=r.toDataURL();e.resolve(t)}catch(n){e.reject(n)}},Yt(o).then(t,t),e},suspendTracking:function(){gi.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var e,t,n;if(gi.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new ur,e=this._root.childNodes,t=[],n=0;n"},_enableTracking:function(){this._searchTree=new ur,this._cursor=new cr(this),gi.fn._enableTracking.call(this)},_trackMouse:function(e){var t,n;this._suspendedTracking||(t=this.eventTarget(e),"click"!==e.type?(n=this._currentShape,n&&n!==t&&this.trigger("mouseleave",{element:n,originalEvent:e,type:"mouseleave"}),t&&n!==t&&this.trigger("mouseenter",{element:t,originalEvent:e,type:"mouseenter"}),this.trigger("mousemove",{element:t,originalEvent:e,type:"mousemove"}),this._currentShape=t):t&&this.trigger("click",{element:t,originalEvent:e,type:"click"}))}}),hr.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(gi.support.canvas=!0,fi.current.register("canvas",hr,20)),pr=tr.extend({renderTo:function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},setFill:function(e){var t=this.srcElement.options.fill,n=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),n=!0):u(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n},setGradientFill:function(e,t){var n,i,r,o,a=this.srcElement.rawBBox();t instanceof ti?(i=t.start(),r=t.end(),n=e.createLinearGradient(i.x,i.y,r.x,r.y)):t instanceof ni&&(o=t.center(),n=e.createRadialGradient(o.x,o.y,0,o.x,o.y,t.radius())),Me(n,t.stops),e.save(),t.userSpace()||e.transform(a.width(),0,0,a.height(),a.origin.x,a.origin.y),e.fillStyle=n,e.fill(),e.restore()},setStroke:function(e){var t=this.srcElement.options.stroke;if(t&&!u(t.color)&&t.width>0)return e.strokeStyle=t.color,e.lineWidth=v(t.width,1),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0},dashType:function(){var e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()},setLineDash:function(e){var t,n=this.dashType();n&&n!==Oi&&(t=Li[n],e.setLineDash?e.setLineDash(t):(e.mozDash=t,e.webkitLineDash=t))},setLineCap:function(e){var t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==Oi?e.lineCap=Vi:n&&n.lineCap&&(e.lineCap=n.lineCap)},setLineJoin:function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},renderPoints:function(e,t){Ie(e,t)}}),er.Path=pr,fr=pr.extend({renderPoints:function(e){var t=this.srcElement.toPath();Ie(e,t)}}),er.Arc=fr,mr=pr.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.center,i=t.radius;e.arc(n.x,n.y,i,0,2*Math.PI)}}),er.Circle=mr,gr=pr.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.origin,i=t.size;e.rect(n.x,n.y,i.width,i.height)}}),er.Rect=gr,vr=pr.extend({init:function(e,t){pr.fn.init.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Kt();var n=this.img=new Image;t&&!/^data:/i.test(e.src())&&(n.crossOrigin=t),n.src=e.src(),n.complete?this.onLoad():(n.onload=this.onLoad,n.onerror=this.onError)},renderTo:function(e){"resolved"===this.loading.state()&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())},optionsChange:function(e){"src"===e.field?(this.loading=Kt(),this.img.src=this.srcElement.src()):pr.fn.optionsChange.call(this,e)},onLoad:function(){this.loading.resolve(),this.invalidate()},onError:function(){this.loading.reject(Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},drawImage:function(e){var t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}}),er.Image=vr,_r=pr.extend({renderTo:function(e){var t=this.srcElement,n=t.position(),i=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign="left",this.setFill(e)&&e.fillText(t.content(),n.x,n.y+i.baseline),this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+i.baseline)),e.restore()}}),er.Text=_r,br=pr.extend({renderPoints:function(e){var t,n=this.srcElement.paths;for(t=0;ts&&(a.push(r(t.substring(s,l))),s=l+c[0].length),l+=c[0].length):l++;return s0)&&t.preventDefault()}).on("mouseleave"+U,function(){r._hovered=!1}),r.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),W(n.animation.open,{complete:function(){r.wrapper.css({overflow:E}),r._activated=!0,r._trigger(_)}}),W(n.animation.close,{complete:function(){r._animationClose()}}),r._mousedownProxy=function(e){r._mousedown(e)},r._resizeProxy=c.mobileOS.android?function(e){setTimeout(function(){r._resize(e)},600)}:function(e){r._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+U,e.proxy(r.toggle,r))},events:[m,_,g,v],options:{name:"Popup",toggleEvent:"click",origin:x+" "+k,position:y+" "+k,anchor:S,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var e=this,t=e.wrapper.data(D);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=S&&e._hideDirClass(),e._closing=!1,e._trigger(v)},destroy:function(){var t,n=this,i=n.options,r=n.element.off(U);d.fn.destroy.call(n),i.toggleTarget&&e(i.toggleTarget).off(U),i.modal||(N.unbind(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),s.destroy(n.element.children()),r.removeData(),i.appendTo[0]===document.body&&(t=r.parent(".k-animation-container"),t[0]?t.remove():r.remove())},open:function(t,n){var i,r,o=this,a={isFixed:!isNaN(parseInt(n,10)),x:t,y:n},l=o.element,d=o.options,u=e(d.anchor),h=l[0]&&l.hasClass("km-widget");if(!o.visible()){if(d.copyAnchorStyles&&(h&&"font-size"==q[0]&&q.shift(),l.css(s.getComputedStyles(u[0],q))),l.data("animating")||o._trigger(m))return;o._activated=!1,d.modal||(N.unbind(o.downEvent,o._mousedownProxy).bind(o.downEvent,o._mousedownProxy),o._toggleResize(!1),o._toggleResize(!0)),o.wrapper=r=s.wrap(l,d.autosize).css({overflow:T,display:"block",position:C}).attr("aria-hidden",!1),c.mobileOS.android&&r.css(V,"translatez(0)"),r.css(F),e(d.appendTo)[0]==document.body&&r.css(y,"-10000px"),o.flipped=o._position(a),i=o._openAnimation(),d.anchor!=S&&o._showDirClass(i),l.data(A,i.effects).kendoStop(!0).kendoAnimate(i).attr("aria-hidden",!1)}},_location:function(t){var n,i,r=this,o=r.element,a=r.options,l=e(a.anchor),d=o[0]&&o.hasClass("km-widget");return a.copyAnchorStyles&&(d&&"font-size"==q[0]&&q.shift(),o.css(s.getComputedStyles(l[0],q))),r.wrapper=n=s.wrap(o,a.autosize).css({overflow:T,display:"block",position:C}),c.mobileOS.android&&n.css(V,"translatez(0)"),n.css(F),e(a.appendTo)[0]==document.body&&n.css(y,"-10000px"),r._position(t||{}),i=n.offset(),{width:s._outerWidth(n),height:s._outerHeight(n),left:i.left,top:i.top}},_openAnimation:function(){var e=W(!0,{},this.options.animation.open);return e.effects=s.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),n=((t.attr("class")||"").match(M)||["","down"])[1],i=R+"-"+n;t.removeClass(i).children(z).removeClass(I).removeClass(i),this.element.removeClass(R+"-"+s.directions[n].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",i=R+"-"+n;e(this.options.anchor).addClass(i).children(z).addClass(I).addClass(i),this.element.addClass(R+"-"+s.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?g:m]()},visible:function(){return this.element.is(":"+E)},close:function(n){var i,r,o,a,l=this,d=l.options;if(l.visible()){if(i=l.wrapper[0]?l.wrapper:s.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(g))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),N.unbind(l.downEvent,l._mousedownProxy),n?r={hide:!0,effects:{}}:(r=W(!0,{},d.animation.close),o=l.element.data(A),a=r.effects,!a&&!s.size(a)&&o&&s.size(o)&&(r.effects=o,r.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),i.css({overflow:T}).attr("aria-hidden",!0),l.element.kendoAnimate(r),n&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;c.resize.indexOf(e.type)!==-1?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(e){var t=e?"on":"off",n=c.resize;c.mobileOS.ios||c.mobileOS.android||(n+=" "+L),this._scrollableParents()[t](L,this._resizeProxy),P[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,r=i.element[0],o=i.options,a=e(o.anchor)[0],l=o.toggleTarget,d=s.eventTarget(t),u=e(d).closest(".k-popup"),c=u.parent().parent(".km-shim").length;u=u[0],!c&&u&&u!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(n(r,d)||n(a,d)||l&&n(e(l)[0],d)||i.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i,r,o,a){var s=0;return a=a||t,o!==r&&o!==b&&r!==b&&(e+a>i&&(s+=-(n+t)),e+s<0&&(s+=n+t)),s},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return s.isScrollable(t)})},_position:function(t){var n,i,r,o,a,l,d,u,m,g,v,_,b,k,w,y,x,T=this,S=T.element,E=T.wrapper,A=T.options,I=e(A.viewport),R=c.zoomLevel(),M=!!(I[0]==window&&window.innerWidth&&R<=1.02),z=e(A.anchor),H=A.origin.toLowerCase().split(" "),N=A.position.toLowerCase().split(" "),B=T.collisions,P=10002,L=0,O=document.documentElement;if(a=A.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:I.offset(),M?(l=window.innerWidth,d=window.innerHeight):(l=I.width(),d=I.height()),M&&O.scrollHeight-O.clientHeight>0&&(u=A.isRtl?-1:1,l-=u*s.support.scrollbar()),n=z.parents().filter(E.siblings()),n[0])if(r=Math.max(+n.css("zIndex"),0))P=r+10;else for(i=z.parentsUntil(n),o=i.length;L=0&&e(n).is(":visible")&&!e(n).is(":disabled")});return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t,n;return i?t=e.sort(function(e,t){return e.tabIndex-t.tabIndex}):(n="__k_index",e.each(function(e,t){t.setAttribute(n,e)}),t=e.sort(function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(n),10)-parseInt(t.getAttribute(n),10):e.tabIndex-t.tabIndex}),e.removeAttr(n)),t},_nextFocusable:function(e,t){var n=t.length,i=t.index(e.target);return t.get((i+(e.shiftKey?-1:1))%n)},_focus:function(e){return"IFRAME"==e.nodeName?(e.contentWindow.document.body.focus(),t):(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length),t)},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}}),l.Popup.TabKeyTrap=a}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/surface-tooltip.min",["kendo.popup.min","drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=".kendo",n=window.kendo,i=n.deepExtend,r=n.drawing.util,o=r.defined,a=r.limitValue,s=r.eventCoordinates,l=n._outerWidth,d=n._outerHeight,u=e.proxy,c='
    ',h='',p=n.Class.extend({init:function(t,n){this.element=e(c),this.content=this.element.children(".k-tooltip-content"),n=n||{},this.options=i({},this.options,this._tooltipOptions(n)),this.popupOptions={appendTo:n.appendTo,animation:n.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=e.proxy(this._openPopup,this),this.surface=t,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=u(this._showEvent,this),this._surfaceLeaveHandler=u(this._surfaceLeave,this),this._mouseleaveHandler=u(this._mouseleave,this),this._mousemoveHandler=u(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+t,this._surfaceLeaveHandler),this.element.on("click"+t,".k-tooltip-button",u(this._hideClick,this))},getPopup:function(){return this.popup||(this.popup=new n.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var e=this.popup;this.surface.unbind("click",this._showHandler),this.surface.unbind("mouseenter",this._showHandler),this.surface.unbind("mouseleave",this._mouseleaveHandler),this.surface.unbind("mousemove",this._mousemoveHandler),this.surface.element.off("mouseleave"+t,this._surfaceLeaveHandler),this.element.off("click"+t),e&&(e.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(e){return e=e||{},{position:e.position,showOn:e.showOn,offset:e.offset,autoHide:e.autoHide,width:e.width,height:e.height,content:e.content,shared:e.shared,hideDelay:e.hideDelay,showAfter:e.showAfter}},_tooltipShape:function(e){for(;e&&!e.options.tooltip;)e=e.parent;return e},_updateContent:function(e,t,i){var r=i.content;if(n.isFunction(r)&&(r=r({element:t,target:e})),r)return this.content.html(r),!0},_position:function(e,t,n,i){var r,o=t.position,l=t.offset||0,d=this.surface,u=d._instance._elementOffset(),c=d.getSize(),h=d._instance._offset,p=e.bbox(),f=n.width,m=n.height,g=0,v=0;return p.origin.translate(u.left,u.top),h&&p.origin.translate(-h.x,-h.y),"cursor"==o&&i?(r=s(i),g=r.x-f/2,v=r.y-m-l):"left"==o?(g=p.origin.x-f-l,v=p.center().y-m/2):"right"==o?(g=p.bottomRight().x+l,v=p.center().y-m/2):"bottom"==o?(g=p.center().x-f/2,v=p.bottomRight().y+l):(g=p.center().x-f/2,v=p.origin.y-m-l),{left:a(g,u.left,u.left+c.width),top:a(v,u.top,u.top+c.height)}},show:function(e,t){this._show(e,e,i({},this.options,this._tooltipOptions(e.options.tooltip),t))},hide:function(){var e=this.popup,t=this._current;delete this._current,clearTimeout(this._showTimeout),e&&e.visible()&&t&&!this.surface.trigger("tooltipClose",{element:t.shape,target:t.target,popup:e})&&e.close()},_hideClick:function(e){e.preventDefault(),this.hide()},_show:function(e,t,n,i,r){var o,a,s=this._current;clearTimeout(this._timeout),s&&(s.shape===t&&n.shared||s.target===e)||(clearTimeout(this._showTimeout),o=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:t,target:e,popup:o})&&this._updateContent(e,t,n)&&(this._autoHide(n),a=this._measure(n),o.visible()&&o.close(!0),this._current={options:n,elementSize:a,shape:t,target:e,position:this._position(n.shared?t:e,n,a,i)},r?this._showTimeout=setTimeout(this._openPopupHandler,n.showAfter||0):this._openPopup()))},_openPopup:function(){var e=this._current,t=e.position;this.getPopup().open(t.left,t.top)},_autoHide:function(t){t.autoHide&&this._closeButton&&(this.element.removeClass("k-tooltip-closable"),this._closeButton.remove(),delete this._closeButton),t.autoHide||this._closeButton||(this.element.addClass("k-tooltip-closable"),this._closeButton=e(h).prependTo(this.element))},_showEvent:function(e){var t,n=this._tooltipShape(e.element);n&&(t=i({},this.options,this._tooltipOptions(n.options.tooltip)),t&&t.showOn==e.type&&this._show(e.element,n,t,e.originalEvent,!0))},_measure:function(e){var t,n,i,r=this.getPopup();return this.element.css({width:"auto",height:"auto"}),i=r.visible(),i||r.wrapper.show(),this.element.css({width:o(e.width)?e.width:"auto",height:o(e.height)?e.height:"auto"}),t=l(this.element),n=d(this.element),i||r.wrapper.hide(),{width:t,height:n}},_mouseleave:function(e){var t,n;this.popup&&!this._popupRelatedTarget(e.originalEvent)&&(t=this,n=t._current,n&&n.options.autoHide&&(t._timeout=setTimeout(function(){clearTimeout(t._showTimeout),t.hide()},n.options.hideDelay||0)))},_mousemove:function(e){var t,n,i=this._current;i&&e.element&&(t=i.options,"cursor"==t.position&&(n=this._position(e.element,t,i.elementSize,e.originalEvent),i.position=n,this.getPopup().wrapper.css({left:n.left,top:n.top})))},_surfaceLeave:function(e){this.popup&&!this._popupRelatedTarget(e)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(t){return t.relatedTarget&&e(t.relatedTarget).closest(this.popup.wrapper).length}});n.drawing.SurfaceTooltip=p}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/surface.min",["drawing/kendo-drawing.min","drawing/surface-tooltip.min"],e)}(function(){!function(e){function t(e){this._instance.translate(e)}var n,i=window.kendo,r=i.drawing,o=r.Surface,a=i.ui.Widget,s=i.deepExtend,l=e.proxy;i.support.svg=o.support.svg,i.support.canvas=o.support.canvas,n=a.extend({init:function(e,n){a.fn.init.call(this,e,{}),this.options=s({},this.options,n),this._instance=o.create(this.element[0],n),this._instance.translate&&(this.translate=t),this._triggerInstanceHandler=l(this._triggerInstanceEvent,this),this._bindHandler("click"),this._bindHandler("mouseenter"),this._bindHandler("mouseleave"),this._bindHandler("mousemove"),this._enableTracking()},options:{name:"Surface",tooltip:{}},events:["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],_triggerInstanceEvent:function(e){this.trigger(e.type,e)},_bindHandler:function(e){this._instance.bind(e,this._triggerInstanceHandler)},draw:function(e){this._instance.draw(e)},clear:function(){this._instance&&this._instance.clear(),this.hideTooltip()},destroy:function(){this._instance&&(this._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),a.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(e){return this._instance.eventTarget(e)},showTooltip:function(e,t){this._tooltip&&this._tooltip.show(e,t)},hideTooltip:function(){this._tooltip&&this._tooltip.hide()},suspendTracking:function(){this._instance.suspendTracking(),this.hideTooltip()},resumeTracking:function(){this._instance.resumeTracking()},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(e){this.element.css({width:e.width,height:e.height}),this._size=e,this._instance.currentSize(e),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){i.ui.Popup&&(this._tooltip=new r.SurfaceTooltip(this,this.options.tooltip||{}))}}),i.ui.plugin(n),n.create=function(e,t){return new n(e,t)},i.drawing.Surface=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/html.min",["drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=window.kendo,n=t.drawing,i=n.drawDOM;n.drawDOM=function(t,n){return i(e(t)[0],n)},n.drawDOM.drawText=i.drawText,n.drawDOM.getFontFaces=i.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.drawing.min",["drawing/util.min","drawing/kendo-drawing.min","drawing/surface-tooltip.min","drawing/surface.min","drawing/html.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.validator.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){var n,i=l.ui.validator.ruleResolvers||{},r={};for(n in i)e.extend(!0,r,i[n].resolve(t));return r}function i(e){ return e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function r(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function o(t){return e(e.parseHTML?e.parseHTML(t):t)}function a(t,n){var i,r,o,a,s=e();for(o=0,a=t.length;o #=message#',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date",dateCompare:"End date should be greater than or equal to the start date"},rules:{required:function(e){var t=e.filter("[type=checkbox]").length&&!e.is(":checked"),n=e.val();return!(A(e,"required")&&(!n||""===n||0===n.length||t))},pattern:function(e){return!e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===e.val()||F(e.val(),e.attr("pattern"))},min:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=l.parseFloat(e.val());return t<=n}return!0},max:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=l.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,i=parseFloat(e.attr("step"))||1,o=parseFloat(e.val()),a=r(i);return a?(t=Math.pow(10,a),Math.floor((o-n)*t)%(i*t)/Math.pow(100,a)===0):(o-n)%i===0}return!0},email:function(e){return E(e,"[type=email],["+l.attr("type")+"=email]",m)},url:function(e){return E(e,"[type=url],["+l.attr("type")+"=url]",g)},date:function(e){return!e.filter("[type^=date],["+l.attr("type")+"=date]").length||""===e.val()||null!==l.parseDate(e.val(),e.attr(l.attr("format")))}},validateOnBlur:!0},destroy:function(){d.fn.destroy.call(this),this.element.off(u)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(e){return!!this.validate()||(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger(T)},_attachEvents:function(){var t=this;t.element.is(y)&&t.element.on("submit"+u,D(t._submit,t)),t.options.validateOnBlur&&(t.element.is(v)?(t.element.on(k+u,function(){t._checkElement(t.element)}),t.element.is(_)&&t.element.on("click"+u,function(){t._checkElement(t.element)})):(t.element.on(k+u,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+u,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,n,i,r=!1,o=this.value();if(this._errors={},this.element.is(v))r=this.validateInput(this.element);else{for(i=!1,e=this.element.find(this._inputSelector),t=0,n=e.length;t1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){this.allowSelection&&!this.trigger(v,{event:e})||e.preventDefault()},_start:function(t){var n,r,o=this,a=0,s=o.filter,l=i(t),d=l.length,u=t.which;if(!(u&&u>1||o._maxTouchesReached()))for(R.current=null,o.currentTarget=t.currentTarget,o.stopPropagation&&t.stopPropagation();a1){for(n=0;nthis.max||er,e||t.trigger(z,t))}}),G=C.extend({init:function(e){var t=this;C.fn.init.call(t),t.x=new j(D({horizontal:!0},e)),t.y=new j(D({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(z,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(z)}}),$=C.extend({init:function(e){var t=this;D(t,e),C.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,r=t.movable,o=r[i]+e;n.enabled&&((on.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(z,t))}}),K=y.extend({init:function(t){var n,i,r,o,a=this;D(a,{elastic:!0},t),r=a.elastic?.5:0,o=a.movable,a.x=n=new $({axis:"x",dimension:a.dimensions.x,resistance:r,movable:o}),a.y=i=new $({axis:"y",dimension:a.dimensions.y,resistance:r,movable:o}),a.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e,a.offset=a.dimensions.container.offset()},press:function(t){e(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(e){var t,r,s,l=a.gesture,d=l.center,u=e.center,c=e.distance/l.distance,h=a.dimensions.minScale,p=a.dimensions.maxScale;o.scale<=h&&c<1&&(c+=.8*(1-c)),o.scale*c>=p&&(c=p/o.scale),r=o.x+a.offset.left,s=o.y+a.offset.top,t={x:(r-d.x)*c+u.x-r,y:(s-d.y)*c+u.y-s},o.scaleWith(c),n.dragMove(t.x),i.dragMove(t.y),a.dimensions.rescale(o.scale),a.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(e.x.delta),i.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),Y=b.transitions.prefix+"Transform";p=b.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"},f=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(p(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){D(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=p(n,i,t.scale),e!=t.coordinates&&(_.support.browser.msie&&_.support.browser.version<10?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[Y]=e,t._saveCoordinates(e),t.trigger(z))},_saveCoordinates:function(e){this.coordinates=e}}),m=x.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in A?A[n].push(i):A[n]=[i]},events:[V,W,U],options:{name:"DropTarget",group:"default"},destroy:function(){s(A,this)},_trigger:function(e,t){var n=this,i=E[n.options.group];if(i)return n.trigger(e,D({},t.event,{draggable:i,dropTarget:t.dropTarget}))},_over:function(e){this._trigger(V,e)},_out:function(e){this._trigger(W,e)},_drop:function(e){var t=this,n=E[t.options.group];n&&(n.dropped=!t._trigger(U,e))}}),m.destroyGroup=function(e){var t,n=A[e]||I[e];if(n){for(t=0;tw.height(),n=k.body.scrollWidth>w.width()):(t=l.offsetHeight<=l.scrollHeight,n=l.offsetWidth<=l.scrollWidth),r=l.scrollTop+u.y,o=t&&r>0&&r0&&at.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:g,ease:p.easeOutExpo})}}),R=f.extend({init:function(e){var t=this;n.effects.Animation.fn.init.call(this),s(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return m(this.offset.y)');s(n,t,{element:r,elementSize:0,movable:new u(r),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(S,a(n.refresh,n)),n.container.append(r),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,o=i/n.total,a=Math.round(-r[t]*o),s=Math.round(i*o);o>=1?this.element.css("display","none"):this.element.css("display",""),a+s>i?s=i-a:a<0&&(s+=a,a=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,a)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),z=l.extend({init:function(i,r){var o,d,p,f,g,v,_,b,k,w=this;return l.fn.init.call(w,i,r),i=w.element,(w._native=w.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('
    '),s(w,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    '),o=i.children().eq(1),d=new n.TapCapture(i),p=new u(o),f=new h({element:o,container:i,forcedEnabled:w.options.zoom}),g=this.options.avoidScrolling,v=new n.UserEvents(i,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:w.options.zoom,start:function(t){f.refresh(); var n=m(t.x.velocity),i=m(t.y.velocity),r=2*n>=i,o=e.contains(w.fixedContainer[0],t.event.target),a=2*i>=n;!o&&!g(t)&&w.enabled&&(f.x.enabled&&r||f.y.enabled&&a)?v.capture():v.cancel()}}),_=new c({movable:p,dimensions:f,userEvents:v,elastic:w.options.elastic}),b=new A({movable:p,dimensions:f,userEvents:v,tapCapture:d}),k=new R({moveTo:function(e){w.scrollTo(e.x,e.y)}}),p.bind(S,function(){w.scrollTop=-p.y,w.scrollLeft=-p.x,w.trigger(F,{scrollTop:w.scrollTop,scrollLeft:w.scrollLeft})}),w.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",a(this,"_wheelScroll")),s(w,{movable:p,dimensions:f,zoomSnapBack:b,animatedScroller:k,userEvents:v,pane:_,tapCapture:d,pulled:!1,enabled:!0,scrollElement:o,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),w._initAxis("x"),w._initAxis("y"),w._wheelEnd=function(){w._wheel=!1,w.userEvents.end(0,w._wheelY)},f.refresh(),w.options.pullToRefresh&&w._initPullToRefresh(),t)},_wheelScroll:function(e){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[T,F,D],_resize:function(){this._native||this.contentResized()},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(this.scrollElement.scrollLeft(m(e)),this.scrollElement.scrollTop(m(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,r;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},r={x:e,y:t},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(C),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend(''+e.pullTemplate({})+""),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",a(e._paneChange,e)),e.userEvents.bind("end",a(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x).addClass(C),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/w>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(C).addClass(x),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],r=t.tapCapture,o=t.pane[e],a=new M({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(S,function(){a.refresh()}),o.bind(S,function(){a.show()}),t[e+"inertia"]=new I({axis:e,paneAxis:o,movable:n,tapCapture:r,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||_,velocityMultiplier:t.options.velocityMultiplier||b,end:function(){a.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});o.plugin(z)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.groupable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return e.position().top+3}var i=window.kendo,r=i.ui.Widget,o=i._outerWidth,a=e.proxy,s=!1,l=".kendoGroupable",d="change",u=i.template('',{useWithBlock:!1}),c=function(t){var n=t.attr(i.attr("title"));return n&&(n=i.htmlEncode(n)),e('
    ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(n||t.attr(i.attr("field"))).prepend('')},h=e('
    '),p=r.extend({init:function(u,p){var f,m,g=this,v=i.guid(),_=a(g._intializePositions,g),b=g._dropCuePositions=[];r.fn.init.call(g,u,p),s=i.support.isRtl(u),m=s?"right":"left",g.draggable=f=g.options.draggable||new i.ui.Draggable(g.element,{filter:g.options.draggableElements,hint:c,group:v}),g.groupContainer=e(g.options.groupContainer,g.element).kendoDropTarget({group:f.options.group,dragenter:function(e){g._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus"),h.css("top",n(g.groupContainer)).css(m,0).appendTo(g.groupContainer))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"),h.remove()},drop:function(t){var n,r=t.draggable.currentTarget,o=r.attr(i.attr("field")),a=r.attr(i.attr("title")),l=g.indicator(o),d=g._dropCuePositions,u=d[d.length-1];(r.hasClass("k-group-indicator")||g._canDrag(r))&&(u?(n=g._dropCuePosition(i.getOffset(h).left+parseInt(u.element.css("marginLeft"),10)*(s?-1:1)+parseInt(u.element.css("marginRight"),10)),n&&g._canDrop(e(l),n.element,n.left)&&(n.before?n.element.before(l||g.buildIndicator(o,a)):n.element.after(l||g.buildIndicator(o,a)),g._change())):(g.groupContainer.append(g.buildIndicator(o,a)),g._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:c,group:f.options.group,dragcancel:a(g._dragCancel,g),dragstart:function(e){var t=e.currentTarget,i=parseInt(t.css("marginLeft"),10),r=t.position(),a=s?r.left-i:r.left+o(t);_(),h.css({top:n(g.groupContainer),left:a}).appendTo(g.groupContainer),this.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")},dragend:function(){g._dragEnd(this)},drag:a(g._drag,g)}).on("click"+l,".k-button",function(t){t.preventDefault(),g._removeIndicator(e(this).parent())}).on("click"+l,".k-link",function(t){var n=e(this).parent(),r=g.buildIndicator(n.attr(i.attr("field")),n.attr(i.attr("title")),"asc"==n.attr(i.attr("dir"))?"desc":"asc");n.before(r).remove(),g._change(),t.preventDefault()}),f.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){g._dragEnd(this)},dragcancel:a(g._dragCancel,g),dragstart:function(e){var n,i,r;return g.options.allowDrag||g._canDrag(e.currentTarget)?(_(),b.length?(n=b[b.length-1].element,i=parseInt(n.css("marginRight"),10),r=n.position().left+o(n)+i):r=0,t):(e.preventDefault(),t)},drag:a(g._drag,g)}),g.dataSource=g.options.dataSource,g.dataSource&&g._refreshHandler?g.dataSource.unbind(d,g._refreshHandler):g._refreshHandler=a(g.refresh,g),g.dataSource&&(g.dataSource.bind("change",g._refreshHandler),g.refresh())},refresh:function(){var t=this,n=t.dataSource;t.groupContainer&&t.groupContainer.empty().append(e.map(n.group()||[],function(n){var r=n.field,o=i.attr("field"),a=t.element.find(t.options.filter).filter(function(){return e(this).attr(o)===r});return t.buildIndicator(n.field,a.attr(i.attr("title")),n.dir)}).join("")),t._invalidateGroupContainer()},destroy:function(){var e=this;r.fn.destroy.call(e),e.groupContainer.off(l),e.groupContainer.data("kendoDropTarget")&&e.groupContainer.data("kendoDropTarget").destroy(),e.groupContainer.data("kendoDraggable")&&e.groupContainer.data("kendoDraggable").destroy(),e.options.draggable||e.draggable.destroy(),e.dataSource&&e._refreshHandler&&(e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=null),e.groupContainer=e.element=e.draggable=null},events:["change"],options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(t){var n=e(".k-group-indicator",this.groupContainer);return e.grep(n,function(n){return e(n).attr(i.attr("field"))===t})[0]},buildIndicator:function(e,t,n){return u({field:e.replace(/"/g,"'"),dir:n,title:t,ns:i.ns})},descriptors:function(){var t,n,r,o,a,s=this,l=e(".k-group-indicator",s.groupContainer);return t=s.element.find(s.options.filter).map(function(){var t=e(this),r=t.attr(i.attr("aggregates")),s=t.attr(i.attr("field"));if(r&&""!==r)for(n=r.split(","),r=[],o=0,a=n.length;o=r&&!s||te.right})[0],t&&(t={left:s?t.element.position().left+o(t.element)+l:t.element.position().left-a,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&h.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(i.attr("field"));return"false"!=e.attr(i.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next(),r=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!s&&n>i.position().left||s&&n
    '),t.find(c.options.filter).kendoDropTarget({group:c.options.group,dragenter:function(e){var t,i,s,l;h._draggable&&(t=this.element,s=!h._dropTargetAllowed(t)||h._isLastDraggable(),n(e.draggable.hint,s),s||(i=a(t),l=i.left,u.inSameContainer&&!u.inSameContainer({source:t,target:h._draggable,sourceIndex:h._index(t),targetIndex:h._index(h._draggable)})?h._dropTarget=t:h._index(t)>h._index(h._draggable)&&(l+=r(t)),h.reorderDropCue.css({height:o(t),top:i.top,left:l}).appendTo(document.body)))},dragleave:function(e){n(e.draggable.hint,!0),h.reorderDropCue.remove(),h._dropTarget=null},drop:function(){var e,t;h._dropTarget=null,h._draggable&&(e=this.element,t=h._draggable,h._dropTargetAllowed(e)&&!h._isLastDraggable()&&h.trigger(l,{element:h._draggable,target:e,oldIndex:h._index(t),newIndex:h._index(e),position:a(h.reorderDropCue).left>a(e).left?"after":"before"}))}}),c.bind(["dragcancel","dragend","dragstart","drag"],{dragcancel:function(){h.reorderDropCue.remove(),h._draggable=null,h._elements=null},dragend:function(){h.reorderDropCue.remove(),h._draggable=null,h._elements=null},dragstart:function(e){h._draggable=e.currentTarget,h._elements=h.element.find(h.draggable.options.filter)},drag:function(e){var t,n;h._dropTarget&&!this.hint.find(".k-drag-status").hasClass("k-i-cancel")&&(t=a(h._dropTarget).left,n=r(h._dropTarget),h.reorderDropCue.css(e.pageX>t+n/2?{left:t+n}:{left:t}))}})},options:{name:"Reorderable",filter:"*"},events:[l],_isLastDraggable:function(){var e,t=this.options.inSameContainer,n=this._draggable[0],i=this._elements.get(),r=!1;if(!t)return!1;for(;!r&&i.length>0;)e=i.pop(),r=n!==e&&t({source:n,target:e,sourceIndex:this._index(n),targetIndex:this._index(e)});return!r},_dropTargetAllowed:function(e){var t=this.options.inSameContainer,n=this.options.dragOverContainers,i=this._draggable;return i[0]!==e[0]&&(!t||!n||(!!t({source:i,target:e,sourceIndex:this._index(i),targetIndex:this._index(e)})||n(this._index(i),this._index(e))))},_index:function(e){return this._elements.index(e)},destroy:function(){var t=this;s.fn.destroy.call(t),t.element.find(t.draggable.options.filter).each(function(){var t=e(this);t.data("kendoDropTarget")&&t.data("kendoDropTarget").destroy()}),t.draggable&&(t.draggable.destroy(),t.draggable.element=t.draggable=null),t.elements=t.reorderDropCue=t._elements=t._draggable=null}});i.ui.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.resizable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=e.proxy,a=n.isFunction,s=e.extend,l="horizontal",d="vertical",u="start",c="resize",h="resizeend",p=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=d?l:d,n._positionMouse=n.orientation==l?"x":"y",n._position=n.orientation==l?"left":"top",n._sizingDom=n.orientation==l?"outerWidth":"outerHeight",n.draggable=new i.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:o(n._resize,n),dragcancel:o(n._cancel,n),dragstart:o(n._start,n),dragend:o(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[c,h,u],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return a(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_min:function(e){var n=this,i=n.options.min;return a(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=a(i)?e(i(r)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(u,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",r.css("cursor"))},_resize:function(e){var n,i=this,r=i._maxPosition,o=i._minPosition,a=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=o!==t?Math.max(o,a):a,i.position=n=r!==t?Math.min(r,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==r||n==o).css(i._position,n),i.resizing=!0,i.trigger(c,s(e,{position:n}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(h,s(t,{position:n.position})),e(document.body).css("cursor","")},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop(e))},destroy:function(){var e=this;r.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,i=n._position,r=n.targetPosition,o=n.position;o===t&&(o=r[i]),r[i]=o+e,n.userEvents.move(r.left,r.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.sortable.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(i){return!1}}function i(e){return e.clone()}function r(e){return e.clone().removeAttr("id").css("visibility","hidden")}var o=window.kendo,a=o.ui.Widget,s=o._outerWidth,l=o._outerHeight,d="start",u="beforeMove",c="move",h="end",p="change",f="cancel",m="sort",g="remove",v="receive",_=">*",b=-1,k=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n.options.placeholder||(n.options.placeholder=r),n.options.hint||(n.options.hint=i),n.draggable=n._createDraggable()},events:[d,u,c,h,p,f],options:{name:"Sortable",hint:null,placeholder:null,filter:_,holdToDrag:!1,disabled:null,container:null,connectWith:null,handler:null,cursorOffset:null,axis:null,ignore:null,autoScroll:!1,cursor:"auto",moveOnDragEnter:!1},destroy:function(){this.draggable.destroy(),a.fn.destroy.call(this)},_createDraggable:function(){var t=this,n=t.element,i=t.options;return new o.ui.Draggable(n,{filter:i.filter,hint:o.isFunction(i.hint)?i.hint:e(i.hint),holdToDrag:i.holdToDrag,container:i.container?e(i.container):null,cursorOffset:i.cursorOffset,axis:i.axis,ignore:i.ignore,autoScroll:i.autoScroll,dragstart:e.proxy(t._dragstart,t),dragcancel:e.proxy(t._dragcancel,t),drag:e.proxy(t._drag,t),dragend:e.proxy(t._dragend,t)})},_dragstart:function(t){var n=this.draggedElement=t.currentTarget,i=this.options.disabled,r=this.options.handler,a=this.options.placeholder,s=this.placeholder=e(o.isFunction(a)?a.call(this,n):a);i&&n.is(i)?t.preventDefault():r&&!e(t.initialTarget).is(r)?t.preventDefault():this.trigger(d,{item:n,draggableEvent:t})?t.preventDefault():(n.css("display","none"),n.before(s),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(f,{item:this.draggedElement}),this._resetCursor()},_drag:function(n){var i,r,o,a,s,l=this.draggedElement,d=this._findTarget(n),u={left:n.x.location,top:n.y.location},c={x:n.x.delta,y:n.y.delta},h=this.options.axis,p=this.options.moveOnDragEnter,f={item:l,list:this,draggableEvent:n};if("x"===h||"y"===h)return this._movementByAxis(h,u,c[h],f),t;if(d){if(i=this._getElementCenter(d.element),r={left:Math.round(u.left-i.left),top:Math.round(u.top-i.top)},e.extend(f,{target:d.element}),d.appendToBottom)return this._movePlaceholder(d,null,f),t;if(d.appendAfterHidden&&this._movePlaceholder(d,"next",f),this._isFloating(d.element)?c.x<0&&p||!p&&r.left<0?o="prev":(c.x>0&&p||!p&&r.left>0)&&(o="next"):c.y<0&&p||!p&&r.top<0?o="prev":(c.y>0&&p||!p&&r.top>0)&&(o="next"),o){for(s="prev"===o?jQuery.fn.prev:jQuery.fn.next,a=s.call(d.element);a.length&&!a.is(":visible");)a=s.call(a);a[0]!=this.placeholder[0]&&this._movePlaceholder(d,o,f)}}},_dragend:function(n){var i,r,o,a,s=this.placeholder,l=this.draggedElement,d=this.indexOf(l),u=this.indexOf(s),c=this.options.connectWith;return this._resetCursor(),o={action:m,item:l,oldIndex:d,newIndex:u,draggableEvent:n},u>=0?r=this.trigger(h,o):(i=s.parents(c).getKendoSortable(),o.action=g,a=e.extend({},o,{action:v,oldIndex:b,newIndex:i.indexOf(s)}),r=!(!this.trigger(h,o)&&!i.trigger(h,a))),r||u===d?(this._cancel(),t):(s.replaceWith(l),l.show(),this.draggable.dropped=!0,o={action:this.indexOf(l)!=b?m:g,item:l,oldIndex:d,newIndex:this.indexOf(l),draggableEvent:n},this.trigger(p,o),i&&(a=e.extend({},o,{action:v,oldIndex:b,newIndex:i.indexOf(l)}),i.trigger(p,a)),t)},_findTarget:function(n){var i,r,o=this._findElementUnderCursor(n),a=this.options.connectWith;return e.contains(this.element[0],o)?(i=this.items(),r=i.filter(o)[0]||i.has(o)[0],r?{element:e(r),sortable:this}:null):this.element[0]==o&&this._isEmpty()?{element:this.element,sortable:this,appendToBottom:!0}:this.element[0]==o&&this._isLastHidden()?(r=this.items().eq(0),{element:r,sortable:this,appendAfterHidden:!0}):a?this._searchConnectedTargets(o,n):t},_findElementUnderCursor:function(e){var t=o.elementUnderCursor(e),i=e.sender;return n(i.hint[0],t)&&(i.hint.hide(),t=o.elementUnderCursor(e),t||(t=o.elementUnderCursor(e)),i.hint.show()),t},_searchConnectedTargets:function(t,n){var i,r,o,a,s=e(this.options.connectWith);for(a=0;a0&&a-o>0&&this._movePlaceholder({element:s,sortable:this},"next",r)},_movePlaceholder:function(e,t,n){var i=this.placeholder;e.sortable.trigger(u,n)||(t?"prev"===t?e.element.before(i):"next"===t&&e.element.after(i):e.element.append(i),e.sortable.trigger(c,n))},_setCursor:function(){var t,n=this.options.cursor;n&&"auto"!==n&&(t=e(document.body),this._originalCursorType=t.css("cursor"),t.css({cursor:n}),this._cursorStylesheet||(this._cursorStylesheet=e("")),this._cursorStylesheet.appendTo(t))},_resetCursor:function(){this._originalCursorType&&(e(document.body).css("cursor",this._originalCursorType),this._originalCursorType=null,this._cursorStylesheet.remove())},_getElementCenter:function(e){var t=e.length?o.getOffset(e):null;return t&&(t.top+=l(e)/2,t.left+=s(e)/2),t},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_cancel:function(){this.draggedElement.show(),this.placeholder.remove()},_items:function(){var e,t=this.options.filter;return e=t?this.element.find(t):this.element.children()},indexOf:function(e){var t=this._items(),n=this.placeholder,i=this.draggedElement;return n&&e[0]==n[0]?t.not(i).index(e):t.not(n).index(e)},items:function(){var e=this.placeholder,t=this._items();return e&&(t=t.not(e)),t},_isEmpty:function(){return!this.items().length},_isLastHidden:function(){return 1===this.items().length&&this.items().is(":hidden")}});o.ui.plugin(k)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){if(!e.is(":visible"))return!1;var n=r.getOffset(e),i=t.left+t.width,o=t.top+t.height;return n.right=n.left+r._outerWidth(e),n.bottom=n.top+r._outerHeight(e),!(n.left>i||n.righto||n.bottomspan,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",g=r.support.browser.msie,v=!1;!function(e){!function(){e('
    ').on("click",">*",function(){v=!0}).find("span").click().end().off()}()}(e),i=o.extend({init:function(t,n){var i,s=this;o.fn.init.call(s,t,n),s._marquee=e("
    "),s._lastActive=null,s.element.addClass(c),s.relatedTarget=s.options.relatedTarget,i=s.options.multiple,this.options.aria&&i&&s.element.attr("aria-multiselectable",!0),s.userEvents=new r.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(v?"":"."+c+" ")+s.options.filter,tap:a(s._tap,s),touchAction:i?"none":"pan-x pan-y"}),i&&s.userEvents.bind("start",a(s._start,s)).bind("move",a(s._move,s)).bind("end",a(s._end,s)).bind("select",a(s._select,s))},events:[h],options:{name:"Selectable",filter:">*",inputSelectors:m,multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,r=!1;for(e=e[0],t=0;te.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:s(e.x.initialDelta),height:s(e.y.initialDelta)};t._marquee.css(n),t._invalidateSelectables(n,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(e){var t,n=this;n._marquee.remove(),n._unselect(n.element.find(n.options.filter+"."+f)).removeClass(f),t=n.element.find(n.options.filter+"."+u),t=t.add(n.relatedTarget(t)),n.value(t,e),n._lastActive=n._downTarget,n._items=null},_invalidateSelectables:function(e,t){var i,r,o,a,s=this._downTarget[0],l=this._items;for(i=0,r=l.length;i0?e[0]:t.element.find(t.options.filter)[0])},_selectElement:function(t,n){var i=e(t),r=!n&&this._notify("select",{element:t});i.removeClass(u),r||(i.addClass(d),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){return e.removeClass(d),this.options.aria&&e.attr(l,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!g||g&&!e(r._activeElement()).is(this.options.inputSelectors))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n,i){var r,o,a,s=this;for(s.clear(),s.element.length>1&&(a=s.options.continuousItems()),a&&a.length||(a=s.element.find(s.options.filter)),t=e.inArray(e(t)[0],a),n=e.inArray(e(n)[0],a),t>n&&(o=t,t=n,n=o),s.options.useAllItems||(n+=s.element.length-1),r=t;r<=n;r++)s._selectElement(a[r]);s._notify(h,i)},destroy:function(){var e=this;o.fn.destroy.call(e),e.element.off(p),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),i.parseOptions=function(e){var t="string"==typeof e&&e.toLowerCase();return{multiple:t&&t.indexOf("multiple")>-1,cell:t&&t.indexOf("cell")>-1}},r.ui.plugin(i)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.button.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=n.keys,a="click",s="k-button",l="k-button-icon",d="k-button-icontext",u=".kendoButton",c="disabled",h="k-state-disabled",p="k-state-focused",f="k-state-active",m=i.extend({init:function(e,t){var o=this;i.fn.init.call(o,e,t),e=o.wrapper=o.element,t=o.options,e.addClass(s).attr("role","button"),t.enable=t.enable&&!e.attr(c),o.enable(t.enable),t.enable&&o._tabindex(),o._graphics(),e.on(a+u,r(o._click,o)).on("focus"+u,r(o._focus,o)).on("blur"+u,r(o._blur,o)).on("keydown"+u,r(o._keydown,o)).on("keyup"+u,r(o._keyup,o)),n.notify(o)},destroy:function(){var e=this;e.wrapper.off(u),i.fn.destroy.call(e)},events:[a],options:{name:"Button",icon:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(a,{event:e})&&e.preventDefault()},_focus:function(){this.options.enable&&this.element.addClass(p)},_blur:function(){this.element.removeClass(p)},_keydown:function(e){var t=this;e.keyCode!=o.ENTER&&e.keyCode!=o.SPACEBAR||(t.options.enable&&t.element.addClass(f),t._isNativeButton()||(e.keyCode==o.SPACEBAR&&e.preventDefault(),t._click(e)))},_keyup:function(){this.element.removeClass(f)},_graphics:function(){var t,n,i,r=this,o=r.element,a=r.options,s=a.icon,u=a.spriteCssClass,c=a.imageUrl;(u||c||s)&&(i=!0,o.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(t,n){(1==n.nodeType||3==n.nodeType&&e.trim(n.nodeValue).length>0)&&(i=!1)}),o.addClass(i?l:d)),s?(t=o.children("span.k-icon").first(),t[0]||(t=e('').prependTo(o)),t.addClass("k-i-"+s)):u?(t=o.children("span.k-sprite").first(),t[0]||(t=e('').prependTo(o)),t.addClass(u)):c&&(n=o.children("img.k-image").first(),n[0]||(n=e('icon').prependTo(o)), n.attr("src",c))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(h,!e).attr("aria-disabled",!e).attr(c,!e),e&&n._tabindex();try{i.blur()}catch(r){}}});n.ui.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.buttongroup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(n,r){n!==t&&e(''+i.htmlEncode(n)+"").appendTo(r)}var i=window.kendo,r=i.ui,o=r.Widget,a=i.keys,s=e.proxy,l=".kendoButtonGroup",d="k-widget",u="k-button-group",c="k-button",h="k-button-icontext",p="k-button-icon",f="k-state-active",m="k-state-focused",g="k-state-disabled",v="select",_="click",b="keydown",k="focus",w="blur",y="mousedown",x='# var item = data; ## var text = item.text; ## var selected = item.selected; ## var enabled = item.enabled; ## var icon = item.icon; ## var badge = item.badge; ## var image = item.imageUrl; ## if (image) { #icon# } ## if (text) { ##= text ## } #',C=o.extend({init:function(t,n){var i,r,a,h=this;if(o.fn.init.call(h,t,n),h.wrapper=h.element,h.options.items)for(i=0;i')),t.contents().filter(function(){return!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(){(1==this.nodeType||3==this.nodeType&&e.trim(this.nodeValue).length>0)&&(s=!1)}),(a[0]||r)&&t.addClass(s?p:h),(o||0===o)&&n(o,t)},_click:function(t){var n=e(t.target).closest("."+c);t.isDefaultPrevented()||this._select(n)},_select:function(e){var n=e;return this.element.find("."+c).removeClass(m),!this._enable||n.is("."+g)?(n.addClass(m),t):(this.select(e[0]),n.addClass(m),t)}});r.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pager.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e,t,n,i,r){return e({idx:t,text:n,ns:d.ns,numeric:i,title:r||""})}function i(e,t,n){return C({className:e.substring(1),text:t,wrapClassName:n||""})}function r(e,t,n,i){e.find(t).parent().attr(d.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function o(e,t){r(e,p,1,t<=1)}function a(e,t){r(e,m,Math.max(1,t-1),t<=1)}function s(e,t,n){r(e,g,Math.min(n,t+1),t>=n)}function l(e,t,n){r(e,f,n,t>=n)}var d=window.kendo,u=d.ui,c=u.Widget,h=e.proxy,p=".k-i-arrow-end-left",f=".k-i-arrow-end-right",m=".k-i-arrow-60-left",g=".k-i-arrow-60-right",v="change",_=".kendoPager",b="click",k="keydown",w="disabled",y="down",x=e(document.documentElement),C=d.template(''),T=c.extend({init:function(t,n){var r,u,w,x,C=this;c.fn.init.call(C,t,n),n=C.options,C.dataSource=d.data.DataSource.create(n.dataSource),C.linkTemplate=d.template(C.options.linkTemplate),C.selectTemplate=d.template(C.options.selectTemplate),C.currentPageTemplate=d.template(C.options.currentPageTemplate),r=C.page(),u=C.totalPages(),C._refreshHandler=h(C.refresh,C),C.dataSource.bind(v,C._refreshHandler),C.downEvent=d.applyEventMap(y,d.guid()),n.previousNext&&(C.element.find(p).length||(C.element.append(i(p,n.messages.first,"k-pager-first")),o(C.element,r,u)),C.element.find(m).length||(C.element.append(i(m,n.messages.previous)),a(C.element,r,u))),n.numeric&&(C.list=C.element.find(".k-pager-numbers"),C.list.length||(C.list=e('
      ').appendTo(C.element))),n.input&&(C.element.find(".k-pager-input").length||C.element.append(''+n.messages.page+''+d.format(n.messages.of,u)+""),C.element.on(k+_,".k-pager-input input",h(C._keydown,C))),n.previousNext&&(C.element.find(g).length||(C.element.append(i(g,n.messages.next)),s(C.element,r,u)),C.element.find(f).length||(C.element.append(i(f,n.messages.last,"k-pager-last")),l(C.element,r,u))),n.pageSizes&&(C.element.find(".k-pager-sizes").length||(w=n.pageSizes.length?n.pageSizes:["all",5,10,20],x=e.map(w,function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"":""}),e(''+d.format(_.messages.of,y)).find("input").val(g).attr(w,k<1).toggleClass("k-state-disabled",k<1),_.previousNext&&(o(f.element,g,y),a(f.element,g,y),s(f.element,g,y),l(f.element,g,y)),_.pageSizes&&(c=f.element.find(".k-pager-sizes option[value='all']").length>0,h=c&&b===this.dataSource.total(),p=b,h&&(b="all",p=_.messages.allPages),f.element.find(".k-pager-sizes select").val(b).attr("aria-label",b).filter("["+d.attr("role")+"=dropdownlist]").kendoDropDownList("value",b).kendoDropDownList("text",p))}},_keydown:function(e){if(e.keyCode===d.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),n=parseInt(t.val(),10);(isNaN(n)||n<1||n>this.totalPages())&&(n=this.page()),t.val(n),this.page(n)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var t=e.currentTarget.value,n=parseInt(t,10),i=this.dataSource;isNaN(n)?"all"==(t+"").toLowerCase()&&i.pageSize(i.total()):i.pageSize(n)},_toggleActive:function(){var t=this;t.list.hasClass("k-state-expanded")?x.unbind(t.downEvent,e.proxy(t._hideList,t)):x.bind(t.downEvent,e.proxy(t._hideList,t)),t.list.toggleClass("k-state-expanded")},_hideList:function(t){var n=this,i=d.eventTarget(t);e.contains(n.list[0],i)||(x.unbind(n.downEvent,e.proxy(n._hideList,n)),n.list.removeClass("k-state-expanded"))},_click:function(t){var n=e(t.currentTarget);t.preventDefault(),n.is(".k-state-disabled")||this.page(n.attr(d.attr("page")))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/(this.pageSize()||1))},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(e){return e===t?this.dataSource.total()>0?this.dataSource.page():0:(this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(v,{index:e})),t)}});u.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.notification.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=e.extend,a=window.setTimeout,s="click",l="show",d="hide",u="k-notification",c=".k-notification-wrap .k-i-close",h="k-hiding",p="info",f="success",m="warning",g="error",v="top",_="left",b="bottom",k="right",w="up",y=".kendoNotification",x='
      ',C='
      #=content#
      ',T=C.replace("#=content#","#:content#"),S=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),r=o.options,r.appendTo&&e(r.appendTo).is(t)||o.element.hide(),o._compileTemplates(r.templates),o._guid="_"+n.guid(),o._isRtl=n.support.isRtl(t),o._compileStacking(r.stacking,r.position.top,r.position.left),n.notify(o)},events:[l,d],options:{name:"Notification",position:{pinned:!0,top:null,left:null,bottom:20,right:20},stacking:"default",hideOnClick:!0,button:!1,allowHideAfter:0,autoHideAfter:5e3,appendTo:null,width:null,height:null,templates:[],animation:{open:{effects:"fade:in",duration:300},close:{effects:"fade:out",duration:600,hide:!0}}},_compileTemplates:function(t){var i=this,r=n.template;i._compiled={},e.each(t,function(t,n){i._compiled[n.type]=r(n.template||e("#"+n.templateId).html())}),i._defaultCompiled=r(C),i._safeCompiled=r(T)},_getCompiled:function(e,t){var n=t?this._safeCompiled:this._defaultCompiled;return e?this._compiled[e]||n:n},_compileStacking:function(e,t,n){var i,r,o=this,a={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},s=null!==n?_:k;switch(e){case"down":i=b+" "+s,r=v+" "+s,delete a.paddingBottom;break;case k:i=v+" "+k,r=v+" "+_,delete a.paddingRight;break;case _:i=v+" "+_,r=v+" "+k,delete a.paddingLeft;break;case w:i=v+" "+s,r=b+" "+s,delete a.paddingTop;break;default:null!==t?(i=b+" "+s,r=v+" "+s,delete a.paddingBottom):(i=v+" "+s,r=b+" "+s,delete a.paddingTop)}o._popupOrigin=i,o._popupPosition=r,o._popupPaddings=a},_attachPopupEvents:function(e,t){function n(e){e.on(s+y,function(){r._hidePopup(t)})}var i,r=this,o=e.allowHideAfter,l=!isNaN(o)&&o>0;e.hideOnClick?t.bind("activate",function(){l?a(function(){n(t.element)},o):n(t.element)}):e.button&&(i=t.element.find(c),l?a(function(){n(i)},o):n(i))},_showPopup:function(t,i){var r,s,l=this,d=i.autoHideAfter,u=i.position.left,p=i.position.top;s=e("."+l._guid+":not(."+h+")").last(),r=new n.ui.Popup(t,{anchor:s[0]?s:document.body,origin:l._popupOrigin,position:l._popupPosition,animation:i.animation,modal:!0,collision:"",isRtl:l._isRtl,close:function(){l._triggerHide(this.element)},deactivate:function(e){e.sender.element.off(y),e.sender.element.find(c).off(y),e.sender.destroy()}}),l._attachPopupEvents(i,r),t.removeClass("k-group k-reset"),s[0]?r.open():(null===u&&(u=e(window).width()-t.width()-i.position.right),null===p&&(p=e(window).height()-t.height()-i.position.bottom),r.open(u,p)),r.wrapper.addClass(l._guid).css(o({margin:0,zIndex:10050},l._popupPaddings)),i.position.pinned?(r.wrapper.css("position","fixed"),s[0]&&l._togglePin(r.wrapper,!0)):s[0]||l._togglePin(r.wrapper,!1),d>0&&a(function(){l._hidePopup(r)},d)},_hidePopup:function(e){e.wrapper.addClass(h),e.close()},_togglePin:function(t,n){var i=e(window),r=n?-1:1;t.css({top:parseInt(t.css(v),10)+r*i.scrollTop(),left:parseInt(t.css(_),10)+r*i.scrollLeft()})},_attachStaticEvents:function(e,t){function n(e){e.on(s+y,r(i._hideStatic,i,t))}var i=this,o=e.allowHideAfter,l=!isNaN(o)&&o>0;e.hideOnClick?l?a(function(){n(t)},o):n(t):e.button&&(l?a(function(){n(t.find(c))},o):n(t.find(c)))},_showStatic:function(e,t){var n=this,i=t.autoHideAfter,r=t.animation,o=t.stacking==w||t.stacking==_?"prependTo":"appendTo";e.removeClass("k-popup").addClass(n._guid)[o](t.appendTo).hide().kendoAnimate(r.open||!1),n._attachStaticEvents(t,e),i>0&&a(function(){n._hideStatic(e)},i)},_hideStatic:function(e){e.kendoAnimate(o(this.options.animation.close||!1,{complete:function(){e.off(y).find(c).off(y),e.remove()}})),this._triggerHide(e)},_triggerHide:function(e){this.trigger(d,{element:e}),this.angular("cleanup",function(){return{elements:e}})},show:function(i,r,a){var s,d,c=this,h=c.options,f=e(x);return r||(r=p),null!==i&&i!==t&&""!==i&&(n.isFunction(i)&&(i=i()),d={typeIcon:r,content:""},s=e.isPlainObject(i)?o(d,i):o(d,{content:i}),f.addClass(u+"-"+r).toggleClass(u+"-button",h.button).attr("data-role","alert").css({width:h.width,height:h.height}).append(c._getCompiled(r,a)(s)),c.angular("compile",function(){return{elements:f,data:[{dataItem:s}]}}),e(h.appendTo)[0]?c._showStatic(f,h):c._showPopup(f,h),c.trigger(l,{element:f})),c},showText:function(e,t){this.show(e,t,!0)},info:function(e){return this.show(e,p)},success:function(e){return this.show(e,f)},warning:function(e){return this.show(e,m)},error:function(e){return this.show(e,g)},hide:function(){var t=this,n=t.getNotifications();return n.each(t.options.appendTo?function(n,i){t._hideStatic(e(i))}:function(n,i){var r=e(i).data("kendoPopup");r&&t._hidePopup(r)}),t},getNotifications:function(){var t=this,n=e("."+t._guid+":not(."+h+")");return t.options.appendTo?n:n.children("."+u)},setOptions:function(e){var n,r=this;i.fn.setOptions.call(r,e),n=r.options,e.templates!==t&&r._compileTemplates(n.templates),e.stacking===t&&e.position===t||r._compileStacking(n.stacking,n.position.top,n.position.left)},destroy:function(){i.fn.destroy.call(this),this.getNotifications().off(y).find(c).off(y)}});n.ui.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tooltip.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){for(;e.length&&!i(e);)e=e.parent()}function i(e){var t=e.data(a.ns+"title");if(t)return e.attr("title",t),e.removeData(a.ns+"title"),!0}function r(e){var t=e.attr("title");if(t)return e.data(a.ns+"title",t),e.attr("title",""),!0}function o(e){for(;e.length&&!e.is("body")&&!r(e);)e=e.parent()}var a=window.kendo,s=a.ui.Widget,l=a.ui.Popup,d=a.isFunction,u=e.isPlainObject,c=e.extend,h=e.proxy,p=e(document),f=a.isLocalUrl,m="_tt_active",g="aria-describedby",v="show",_="hide",b="error",k="contentLoad",w="requestStart",y="k-content-frame",x='',C=a.template(""),T=".kendoTooltip",S={bottom:{origin:"bottom center",position:"top center"},top:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"},center:{position:"center center",origin:"center center"}},D={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},F={bottom:"n",top:"s",left:"e",right:"w",center:"n"},E={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},A=function(e){return e.target.data(a.ns+"title")},I=s.extend({init:function(e,t){var n,i=this;s.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=E[n],i._documentKeyDownHandler=h(i._documentKeyDown,i),i.element.on(i.options.showOn+T,i.options.filter,h(i._showOn,i)),this._isShownOnFocus()||i.element.on("mouseenter"+T,i.options.filter,h(i._mouseenter,i)),this.options.autoHide&&!this._isShownOnFocus()&&i.element.on("mouseleave"+T,i.options.filter,h(i._mouseleave,i)),this.options.autoHide&&this._isShownOnFocus()&&i.element.on("blur"+T,i.options.filter,h(i._blur,i))},options:{name:"Tooltip",filter:"",content:A,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[v,_,k,b,w],_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_mouseenter:function(t){o(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n.options.showOn&&n.options.showOn.match(/click/)?n._show(i):n._isShownOnFocus()?(o(i),n._show(i)):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,r=n.content,o=n.options.iframe;u(i)&&i.url?("iframe"in n.options||(o=!f(i.url)),n.trigger(w,{options:i,target:e}),o?(r.hide(),t=r.find("."+y)[0],t?t.src=i.url||t.src:r.html(C({content:i})),r.find("."+y).off("load"+T).on("load"+T,function(){n.trigger(k),r.show()})):(r.empty(),a.ui.progress(r,!0),n._ajaxRequest(i))):i&&d(i)?(i=i({sender:this,target:e}),r.html(i||"")):r.html(i),n.angular("compile",function(){return{elements:r}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(c({type:"GET",dataType:"html",cache:!1,error:function(e,n){a.ui.progress(t.content,!1),t.trigger(b,{status:n,xhr:e})},success:h(function(e){a.ui.progress(t.content,!1),t.content.html(e),t.trigger(k)},t)},e))},_documentKeyDown:function(e){e.keyCode===a.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,o(e),this._show(e)},_show:function(e){var t=this,i=t.target();t.popup||t._initPopup(),i&&i[0]!=e[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),i&&i[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",function(){n(e),e.removeAttr(g),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+T,t._documentKeyDownHandler)}),t.popup.open()},_initPopup:function(){var t=this,n=t.options,i=e(a.template(x)({callout:n.callout&&"center"!==n.position,dir:F[n.position],autoHide:n.autoHide}));t.popup=new l(i,c({activate:function(){var e=this.options.anchor,i=e[0].id||t.element[0].id;i&&(e.attr(g,i+m),this.element.attr("id",i+m)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),p.on("keydown"+T,t._documentKeyDownHandler),t.trigger(v)},close:function(){t.trigger(_)},copyAnchorStyles:!1,animation:n.animation},S[n.position])),i.css({width:n.width,height:n.height}),t.content=i.find(".k-tooltip-content"),t.arrow=i.find(".k-callout"),n.autoHide&&!this._isShownOnFocus()?i.on("mouseleave"+T,h(t._mouseleave,t)):i.on("click"+T,".k-tooltip-button",h(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){this._closePopup(e.currentTarget),clearTimeout(this.timeout)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup?this.popup.close():n(e(t))},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,r=i.offset,o=t.popup,a=o.options.anchor,s=e(a).offset(),l=parseInt(t.arrow.css("border-top-width"),10),d=e(o.element).offset(),u=F[o.flipped?D[n]:n],c=s[r]-d[r]+e(a)[i.size]()/2-l;t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+u).css(r,c)},target:function(){return this.popup?this.popup.options.anchor:null},destroy:function(){var e=this.popup;e&&(e.element.off(T),e.destroy()),clearTimeout(this.timeout),this.element.off(T),p.off("keydown"+T,this._documentKeyDownHandler),s.fn.destroy.call(this)}});a.ui.plugin(I)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.list.min",["kendo.data.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&""!==e&&null!==e&&("boolean"===n?e=!!e:"number"===n?e=+e:"string"===n&&(e=""+e)),e}function i(e){return e[e.length-1]}function r(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function o(e,t){var n,i,r,o,a=t.length,s=e.length,l=[],d=[];if(s)for(r=0;r').attr({tabIndex:-1,"aria-hidden":!0}),r.list=e("
      ").append(r.ul).on("mousedown"+o,B(r._listMousedown,r)),i=t.attr(k),i&&(r.list.attr(k,i+"-list"),r.ul.attr(k,i+"_listbox")),r._header(),r._noData(),r._footer(),r._accessors(),r._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:"No data found."},setOptions:function(e){f.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_listOptions:function(t){var n=this,i=n.options,r=i.virtual,o={change:B(n._listChange,n)},a=B(n._listBound,n);return r="object"==typeof r?r:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:B(n._click,n),activate:B(n._activateItem,n),deactivate:B(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding")},dataBound:a,height:i.height,dataValueField:i.dataValueField,dataTextField:i.dataTextField,groupTemplate:i.groupTemplate,fixedGroupTemplate:i.fixedGroupTemplate,template:i.template},t,r,o),t.template||(t.template="#:"+u.expr(t.dataTextField,"data")+"#"),i.$angular&&(t.$angular=i.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:B(e._listChange,e)});e.listView=e.options.virtual?new u.ui.VirtualList(e.ul,t):new u.ui.StaticList(e.ul,t),e.listView.bind("listBound",B(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(B(this._updateSelectionState,this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){var e=this;e._clear&&this._clear.addClass(T)},_showClear:function(){var e=this;e._clear&&this._clear.removeClass(T)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isFilterEnabled()&&!this.options.enforceMinLength&&this._filter({word:"",open:!1}),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(e,t){var n,i,r=this,o=r.options,l=r.dataSource,d=N({},l.filter()||{}),u=e||d.filters&&d.filters.length&&!e,c=s(d,o.dataTextField);if(!e&&!c||!r.trigger("filtering",{filter:e}))return n={filters:[],logic:"and"},a(e)&&n.filters.push(e),a(d)&&(n.logic===d.logic?n.filters=n.filters.concat(d.filters):n.filters.push(d)),r._cascading&&this.listView.setDSFilter(n),i=N({},{page:u?1:l.page(),pageSize:u?l.options.pageSize:l.pageSize(),sort:l.sort(),filter:l.filter(),group:l.group(),aggregate:l.aggregate()},{filter:n}),l[t?"read":"query"](l._mergeState(i))},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_noData:function(){var n=e(this.noData),i=this.options.noDataTemplate;return this.angular("cleanup",function(){return{elements:n}}),u.destroy(n),n.remove(),i?(this.noData=e('').appendTo(this.list),this.noDataTemplate="function"!=typeof i?u.template(i):i,t):(this.noData=null,t)},_renderNoData:function(){var e=this.noData;e&&(this._angularElement(e,"cleanup"),e.children(":first").html(this.noDataTemplate({instance:this})),this._angularElement(e,"compile"))},_toggleNoData:function(t){e(this.noData).toggle(t)},_toggleHeader:function(e){var t=this.listView.content.prev(S);t.toggle(e)},_footer:function(){var n=e(this.footer),i=this.options.footerTemplate;return this._angularElement(n,"cleanup"),u.destroy(n),n.remove(),i?(this.footer=e('').appendTo(this.list),this.footerTemplate="function"!=typeof i?u.template(i):i,t):(this.footer=null,t)},_renderFooter:function(){var e=this.footer;e&&(this._angularElement(e,"cleanup"),e.html(this.footerTemplate({instance:this})),this._angularElement(e,"compile"))},_header:function(){var n,i=e(this.header),r=this.options.headerTemplate;return this._angularElement(i,"cleanup"),u.destroy(i),i.remove(),r?(n="function"!=typeof r?u.template(r):r,i=e(n({})),this.header=i[0]?i:null,this.list.prepend(i),this._angularElement(this.header,"compile"),t):(this.header=null,t)},_allowOpening:function(){return this.options.noDataTemplate||this.dataSource.flatView().length},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t=this,n=t.options,i=n.ignoreCase,r=n.dataTextField,o={value:i?e.word.toLowerCase():e.word,field:r,operator:n.filter,ignoreCase:i};t._open=e.open,t._filterSource(o)},_clearButton:function(){this._clear||(this._clear=e('').attr({role:"button",tabIndex:-1})),this.options.clearButton||this._clear.remove()},search:function(e){var t=this.options;e="string"==typeof e?e:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!e.length||e.length>=t.minLength)&&(this._state="filter",this._isFilterEnabled()?this._filter({word:e,open:!0}):this._searchByWord(e))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;f.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(n){var i=this;if(n===t)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=e(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var e=this.listView.focus();e&&this._focused.add(this.filterInput).attr("aria-activedescendant",e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var e=this,t=e.element,n=e.options,i=u.getter,r=t.attr(u.attr("text-field")),o=t.attr(u.attr("value-field"));!n.dataTextField&&r&&(n.dataTextField=r),!n.dataValueField&&o&&(n.dataValueField=o), e._text=i(n.dataTextField),e._value=i(n.dataValueField)},_aria:function(e){var n=this,i=n.options,r=n._focused.add(n.filterInput);i.suggest!==t&&r.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,r.attr("aria-owns",e),n.ul.attr("aria-live",n._isFilterEnabled()?"polite":"off"),n._ariaLabel()},_ariaLabel:function(){var t,n=this,i=n._focused,r=n.element,o=r.attr("id"),a=e('label[for="'+o+'"]'),s=r.attr("aria-label"),l=r.attr("aria-labelledby");i!==r&&(s?i.attr("aria-label",s):l?i.attr("aria-labelledby",l):a.length&&(t=a.attr("id")||n._generateLabelId(a,o),i.attr("aria-labelledby",t)))},_generateLabelId:function(e,t){var n=t+D;return e.attr("id",n),n},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,i=this,r=i.selectedIndex,o=i.options.value,a=i.value();i._isSelect&&!i.listView.bound()&&o&&(a=o),a!==n(i._old,typeof a)?e=!0:i._valueBeforeCascade!==t&&i._valueBeforeCascade!==n(i._old,typeof i._valueBeforeCascade)&&i._userTriggered?e=!0:r===t||r===i._oldIndex||i.listView.isFiltered()||(e=!0),e&&(i._old=null===i._old?a:i.dataItem()?i.dataItem()[i.options.dataValueField]:null,i._oldIndex=r,i._typing||i.element.trigger(w),i.trigger(w)),i.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_offsetHeight:function(){var t=0,n=this.listView.content.prevAll(":visible");return n.each(function(){var n=e(this);t+=p(n,!0)}),t},_height:function(n){var i,r,o,a=this,s=a.list,l=a.options.height,d=a.popup.visible();if(n||a.options.noDataTemplate){if(r=s.add(s.parent(".k-animation-container")).show(),!s.is(":visible"))return r.hide(),t;l=a.listView.content[0].scrollHeight>l?l:"auto",r.height(l),"auto"!==l&&(i=a._offsetHeight(),o=p(e(a.footer))||0,l=l-i-o),a.listView.content.height(l),d||r.hide()}return l},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,r=this.wrapper;if(n.data(H)||!i)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||h(r),e&&L.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i="border-box"!==n.css("box-sizing")?t-(h(n)-n.width()):t,n.css({fontFamily:r.css("font-family"),width:this.options.autoWidth?"auto":i,minWidth:i}).data(H,i),!0},_openHandler:function(e){this._adjustListWidth(),this.trigger(F)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger(E)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,n=!e.focus(),r=i(e.select());r===t&&this.options.highlightFirst&&n&&(r=0),r!==t?e.focus(r):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),n=this.listView.content.prev(S),i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=u.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("padding-right"),10),n.css("padding-right",i))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t)},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):this.popup.one("open",function(e){return B(function(){this._calculatePopupHeight(e)},this)}.call(this,e)))},_popup:function(){var e=this;e.popup=new c.Popup(e.list,N({},e.options.popup,{anchor:e.wrapper,open:B(e._openHandler,e),close:B(e._closeHandler,e),animation:e.options.animation,isRtl:g.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_makeUnselectable:function(){V&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,r=g.mobileOS&&(g.touch||g.MSPointers||g.pointers);e=e!==t?e:!i.popup.visible(),n||r||i._focused[0]===_()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?F:E]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===n(e._old,typeof e.value())||(e._cascadeTriggered=!0,e.trigger(A,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(w)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(M,e._requestStartHandler).unbind(z,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){var n=(e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t);if(n&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw Error("ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function")}});N(q,{inArray:function(e,t){var n,i,r=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=r.length;n"),n._customOption=r,i.append(r)),r.text(t),r[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(C),e._focused.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(e){var t=this;e.isDefaultPrevented()||(t._request=!0,t._busy||(t._busy=setTimeout(function(){t._arrowIcon&&(t._focused.attr("aria-busy",!0),t._arrowIcon.addClass(C),t._hideClear())},100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,n=this,i=n.element,r=n.options,o=r.dataSource||{};o=e.isArray(o)?{data:o}:o,n._isSelect&&(t=i[0].selectedIndex,t>-1&&(r.index=t),o.select=i,o.fields=[{field:r.dataTextField},{field:r.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=B(n._showBusy,n),n._requestEndHandler=B(n._requestEnd,n),n._errorHandler=B(n._hideBusy,n)),n.dataSource=u.data.DataSource.create(o).bind(M,n._requestStartHandler).bind(z,n._requestEndHandler).bind("error",n._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){this.listView.focusNext()},_prevItem:function(){this.listView.focusPrev()},_move:function(e){var n,i,r,o,a,s,l=this,d=l.listView,u=e.keyCode,c=u===m.DOWN;if(u===m.UP||c){if(e.altKey)l.toggle(c);else{if(!d.bound()&&!l.ul[0].firstChild)return l._fetch||(l.dataSource.one(w,function(){l._fetch=!1,l._move(e)}),l._fetch=!0,l._filterSource()),e.preventDefault(),!0;if(r=l._focus(),l._fetch||r&&!r.hasClass("k-state-selected")||(c?(l._nextItem(),l._focus()||l._lastItem()):(l._prevItem(),l._focus()||l._firstItem())),n=d.dataItemByIndex(d.getElementIndex(l._focus())),l.trigger(I,{dataItem:n,item:l._focus()}))return l._focus(r),t;l._select(l._focus(),!0).done(function(){l.popup.visible()||l._blur(),l._old=null===l._old?l.value():l.dataItem()?l.dataItem()[l.options.dataValueField]:null})}e.preventDefault(),i=!0}else if(u===m.ENTER||u===m.TAB){if(l.popup.visible()&&e.preventDefault(),r=l._focus(),n=l.dataItem(),l.popup.visible()||n&&l.text()===l._text(n)||(r=null),o=l.filterInput&&l.filterInput[0]===_(),r){if(n=d.dataItemByIndex(d.getElementIndex(r)),a=!0,n&&(a=l._value(n)!==q.unifyType(l.value(),typeof l._value(n))),a&&l.trigger(I,{dataItem:n,item:r}))return;l._select(r)}else l.input&&((l._syncValueAndText()||l._isSelect)&&l._accessor(l.input.val()),l.listView.value(l.input.val()));l._focusElement&&l._focusElement(l.wrapper),o&&u===m.TAB?l.wrapper.focusout():l._blur(),l.close(),i=!0}else u===m.ESC?(l.popup.visible()&&e.preventDefault(),l.close(),i=!0):!l.popup.visible()||u!==m.PAGEDOWN&&u!==m.PAGEUP||(e.preventDefault(),s=u===m.PAGEDOWN?1:-1,d.scrollWith(s*d.screenHeight()),i=!0);return i},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.bound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done(function(){e._fetch=!1}))},_options:function(e,n,i){var o,a,s,l,d=this,u=d.element,c=u[0],h=e.length,p="",f=0;for(n&&(p=n);f",p+=o;u.html(p),i!==t&&(c.value=i,c.value&&!i&&(c.selectedIndex=-1)),c.selectedIndex!==-1&&(o=r(c),o&&o.setAttribute(R,R))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=r.on("reset",t._resetHandler))},_parentWidget:function(){var t,n,i=this.options.name;if(this.options.cascadeFrom)return t=e("#"+this.options.cascadeFrom),n=t.data("kendo"+i),n||(n=t.data("kendo"+U[i])),n},_cascade:function(){var e,t=this,n=t.options,i=n.cascadeFrom;if(i){if(e=t._parentWidget(),!e)return;t._cascadeHandlerProxy=B(t._cascadeHandler,t),t._cascadeFilterRequests=[],n.autoBind=!1,e.bind("set",function(){t.one("set",function(e){t._selectedValue=e.value||t._accessor()})}),e.first(A,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one("dataBound",function(){t._toggleCascadeOnFocus()}),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),n=O?"blur":"focusout";t._focused.add(t.filterInput).bind("focus",function(){t.unbind(A,e._cascadeHandlerProxy),t.first(w,e._cascadeHandlerProxy)}),t._focused.add(t.filterInput).bind(n,function(){t.unbind(w,e._cascadeHandlerProxy),t.first(A,e._cascadeHandlerProxy)})},_cascadeHandler:function(e){var t=this._parentWidget(),n=this.value();this._userTriggered=e.userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,n)},_cascadeChange:function(e){var t=this,n=t._accessor()||t._selectedValue;t._cascadeFilterRequests.length||(t._selectedValue=null),t._userTriggered?t._clearSelection(e,!0):n?(n!==t.listView.value()[0]&&t.value(n),t.dataSource.view()[0]&&t.selectedIndex!==-1||t._clearSelection(e,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._triggerChange(),t._userTriggered=!1},_cascadeSelect:function(e,n){var i,r,o=this,a=e.dataItem(),l=a?a[o.options.cascadeFromField]||e._value(a):null,d=o.options.cascadeFromField||e.options.dataValueField;o._valueBeforeCascade=n!==t?n:o.value(),l||0===l?(i=o.dataSource.filter()||{},s(i,d),r=function(){var t=o._cascadeFilterRequests.shift();t&&o.unbind("dataBound",t),t=o._cascadeFilterRequests[0],t&&o.first("dataBound",t),o._cascadeChange(e)},o._cascadeFilterRequests.push(r),1===o._cascadeFilterRequests.length&&o.first("dataBound",r),o._cascading=!0,o._filterSource({field:d,operator:"eq",value:l}),o._cascading=!1):(o.enable(!1),o._clearSelection(e),o._triggerCascade(),o._triggerChange(),o._userTriggered=!1)}}),l=".StaticList",d=u.ui.DataBoundWidget.extend({init:function(t,n){f.fn.init.call(this,t,n),this.element.attr("role","listbox").on("click"+l,"li",B(this._click,this)).on("mouseenter"+l,"li",function(){e(this).addClass(x)}).on("mouseleave"+l,"li",function(){e(this).removeClass(x)}),"multiple"===this.options.selectable&&this.element.attr("aria-multiselectable",!0),this.content=this.element.wrap("
      ").parent(),this.header=this.content.before('').prev(),this.bound(!1),this._optionID=u.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var i=this.options.value;i&&(this._values=e.isArray(i)?i.slice(0):[i]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=B(function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout(function(){e._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click",w,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,r=t||{};r=e.isArray(r)?{data:r}:r,r=u.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(w,i._refreshHandler),n=i.value(),i.value([]),i.bound(!1),i.value(n)):i._refreshHandler=B(i.refresh,i),i.setDSFilter(r.filter()),i.dataSource=r.bind(w,i._refreshHandler),i._fixedHeader()},skip:function(){return this.dataSource.skip()},setOptions:function(e){f.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(w,this._refreshHandler),clearTimeout(this._scrollId),f.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i;r>n?r=n:a>r+o&&(r=a-o),t.scrollTop=r}},selectedDataItems:function(e){return e===t?this._dataItems.slice():(this._dataItems=e,this._values=this._getValues(e),t)},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},focusNext:function(){var e=this.focus();e=e?e.next():0,this.focus(e)},focusPrev:function(){var e=this.focus();e=e?e.prev():this.element[0].children.length-1,this.focus(e)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(i(this.element[0].children))},focus:function(n){var r,o=this,a=o._optionID;return n===t?o._current:(n=i(o._get(n)),n=e(this.element[0].children[n]),o._current&&(o._current.removeClass(y).removeAttr(k),o.trigger("deactivate")),r=!!n[0],r&&(n.addClass(y),o.scroll(n),n.attr("id",a)),o._current=r?n:null,o.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var r,o,a,s=this,l=s.options.selectable,d="multiple"!==l&&l!==!1,u=s._selectedIndices,c=[],h=[];return n===t?u.slice():(n=s._get(n),1===n.length&&n[0]===-1&&(n=[]),o=e.Deferred().resolve(),a=s.isFiltered(),a&&!d&&s._deselectFiltered(n)?o:d&&!a&&e.inArray(i(n),u)!==-1?(s._dataItems.length&&s._view.length&&(s._dataItems=[s._view[u[0]].item]),o):(r=s._deselect(n),h=r.removed,n=r.indices,n.length&&(d&&(n=[i(n)]),c=s._select(n)),(c.length||h.length)&&(s._valueComparer=null,s.trigger(w,{added:c,removed:h})),o))},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(t){t=e.isArray(t)||t instanceof b?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(n){var i,r=this,o=r._valueDeferred;return n===t?r._values.slice():(r.setValue(n),o&&"resolved"!==o.state()||(r._valueDeferred=o=e.Deferred()),r.bound()&&(i=r._valueIndices(r._values),"multiple"===r.options.selectable&&r.select(-1),r.select(i),o.resolve()),r._skipUpdate=!1,o)},items:function(){return this.element.children(".k-item")},_click:function(t){t.isDefaultPrevented()||this.trigger("click",{item:e(t.currentTarget)})||this.select(t.currentTarget)},_valueExpr:function(e,t){var i,r,o=this,a=0,s=[];if(!o._valueComparer||o._valueType!==e){for(o._valueType=e;a-1&&(a.push(this.removeAt(r)),e(o[i]).removeClass("k-state-selected"));return!!a.length&&(this.trigger(w,{added:[],removed:a}),!0)},_select:function(t){var n,r,o=this,a=o.element[0].children,s=o._view,l=[],d=0;for(i(t)!==-1&&o.focus(t);d'+n(e)+""}):n=u.template('
    • ${'+u.expr(t.dataTextField,"data")+"}
    • ",{useWithBlock:!1}),n},_templates:function(){var e,t,n=this.options,i={template:n.template,groupTemplate:n.groupTemplate,fixedGroupTemplate:n.fixedGroupTemplate};for(t in i)e=i[t],e&&"function"!=typeof e&&(i[t]=u.template(e));this.templates=i},_normalizeIndices:function(e){for(var n=[],i=0;ii||!a.nextSibling)break;a=a.nextSibling}else{if(a.offsetTop<=i||!a.previousSibling)break;a=a.previousSibling}return this._view[e(a).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e,t=this.templates.fixedGroupTemplate;t&&(e=this._firstVisibleItem(),e&&this.header.html(t(e.group)))},_renderItem:function(e){var t='
    • ',t+=this.templates.template(n),i&&e.newGroup&&(t+='
      '+this.templates.groupTemplate(e.group)+"
      "),t+"
    • "},_render:function(){var e,t,n,i,r="",o=0,a=0,s=[],l=this.dataSource.view(),d=this.value(),u=this.isGrouped();if(u)for(o=0;os&&(r=s),o+"-"+r}function i(e){var t,n=0,i=e.min,r=e.max,o=e.start,a=e.setter,l=e.build,d=e.weekNumberBuild,u=e.cells||12,c=e.isWeekColumnVisible,h=e.perRow||4,p=e.weekNumber||U,m=e.content||V,g=e.empty||W,v=e.html||'';for(c&&(v+=p(d(o)));n0&&n%h===0&&(v+='',c&&(v+=p(d(o)))),o=f(o.getFullYear(),o.getMonth(),o.getDate()),M(o,0),t=l(o,n,e.disableDates),v+=s(o,i,r)?m(t):g(t),a(o,1);return v+"
      "}function r(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),o=r,a=0;return n&&(r-=r%n,o=r-r%n+n-1),i>o?a=1:ii?i=new Ie((+t)):n=+t&&+e<=+n}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function d(e,t,n){t=t instanceof Ie?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function u(e,t){var n,i,r;return+t<+e&&(n=+e,S.views[0].setDate(e,t),S.views[0].setDate(t,new Date(n))),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+r-+i)/D.date.MS_PER_DAY)}function c(e,t,n,i){var r,o;for(r=0;r<=t;r++)o=new Date(n.getTime()),o=new Date(o.setDate(o.getDate()+r)),i(o)||e.push(o)}function h(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(ae,be.indexOf(t.type)>-1||t.type==ve)}function p(e){e.preventDefault()}function f(e,t,n){var i=1904,r=new Ie(i,t,n);return r.setFullYear(e),r}function m(e){return P(e).calendars.standard}function g(e){var n=Re[e.start],i=Re[e.depth],r=P(e.culture);e.format=N(e.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=te),(i===t||i>n)&&(e.depth=te),null===e.dates&&(e.dates=[])}function v(e){j&&e.find("*").attr("unselectable","on")}function _(e,t){e.addClass("k-"+t)}function b(e,t){for(var n=0,i=t.length;n -1;"+d;else{for(r=0;r-1&&s.push(a);n="var found = date && window.kendo.jQuery.inArray(date.getDay(),["+s+"]) > -1;"+d}return i=Function("date",n)}function T(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}var S,D=window.kendo,F=D.support,E=D.ui,A=E.Widget,I=D.keys,R=D.parseDate,M=D.date.adjustDST,z=D.date.weekInYear,H=D.ui.Selectable,N=D._extractFormat,B=D.template,P=D.getCulture,L=D.support.transitions,O=L?L.css+"transform-origin":"",V=B('#=data.value#',{useWithBlock:!1}),W=B(' ',{useWithBlock:!1}),U=B('#= data.weekNumber #',{useWithBlock:!1}),q=D.support.browser,j=q.msie&&q.version<9,G=D._outerHeight,$=D._outerWidth,K=".kendoCalendar",Y="click"+K,Q="keydown"+K,X="id",J="min",Z="left",ee="slideIn",te="month",ne="century",ie="change",re="navigate",oe="value",ae="k-state-hover",se="k-state-disabled",le="k-state-focused",de="k-other-month",ue=' class="'+de+'"',ce="k-nav-today",he="td:has(.k-link)",pe="td:has(.k-link):not(."+se+")",fe="td:not(:has(.k-link))",me="k-state-selected",ge="blur"+K,ve="focus",_e=ve+K,be=F.touch?"touchstart":"mouseenter",ke=F.touch?"touchstart"+K:"mouseenter"+K,we=F.touch?"touchend"+K+" touchmove"+K:"mouseleave"+K,ye=6e4,xe=864e5,Ce="_prevArrow",Te="_nextArrow",Se="aria-disabled",De="aria-selected",Fe="aria-label",Ee=e.proxy,Ae=e.extend,Ie=Date,Re={month:0,year:1,decade:2,century:3},Me=A.extend({init:function(t,n){var i,r,s=this;A.fn.init.call(s,t,n),t=s.wrapper=s.element,n=s.options,n.url=window.unescape(n.url),s.options.disableDates=y(s.options.disableDates),s._templates(),s._selectable(),s._header(),s._footer(s.footer),r=t.addClass("k-widget k-calendar "+(n.weekNumber?" k-week-number":"")).on(ke+" "+we,he,h).on(Q,"table.k-content",Ee(s._move,s)).on(Y,he,function(t){var i=t.currentTarget.firstChild,r=s._toDateObject(i);i.href.indexOf("#")!=-1&&t.preventDefault(),"month"==s._view.name&&s.options.disableDates(r)||"month"==s._view.name&&"single"!=n.selectable||s._click(e(i))}).on("mouseup"+K,"table.k-content, .k-footer",function(){s._focusView(s.options.focusOnNav!==!1)}).attr(X),r&&(s._cellID=r+"_cell_selected"),s._isMultipleSelection()&&s.options.weekNumber&&t.on(Y,fe,function(t){var n=e(t.currentTarget).closest("tr").find(pe).first(),i=s.selectable._lastActive=e(t.currentTarget).closest("tr").find(pe).last();s.selectable.selectRange(n,i,{event:t}),s._current=s._value=s._toDateObject(i.find("a")),s._class(le,s._current)}),g(n),i=R(n.value,n.format,n.culture),s._selectDates=[],s._index=Re[n.start],s._current=new Ie((+a(i,n.min,n.max))),s._addClassProxy=function(){if(s._active=!0,s._cell.hasClass(se)){var e=s._view.toDateString(o());s._cell=s._cellByDate(e)}s._cell.addClass(le)},s._removeClassProxy=function(){s._active=!1,s._cell.removeClass(le)},s.value(i),s._isMultipleSelection()&&n.selectDates.length>0&&s.selectDates(n.selectDates),D.notify(s)},options:{name:"Calendar",value:null,min:new Ie(1900,0,1),max:new Ie(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:te,depth:te,animation:{horizontal:{effects:ee,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:""}},events:[ie,re],setOptions:function(e){var t=this;g(e),e.disableDates=y(e.disableDates),A.fn.setOptions.call(t,e),t._templates(),t._selectable(),t._footer(t.footer),t._index=Re[t.options.start],t.navigate()},destroy:function(){var e=this,t=e._today;e.element.off(K),e._title.off(K),e[Ce].off(K),e[Te].off(K),e._destroySelectable(),D.destroy(e._table),t&&D.destroy(t.off(K)),A.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.focus()},min:function(e){return this._option(J,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(Ce,-1)},navigateToFuture:function(){this._navigate(Te,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(se)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,r=n.options.depth;if(e)return i===Re[r]?(T(n._value,n._current)&&T(n._value,e)||(n.value(e),n.trigger(ie)),t):(n.navigate(e,--i),t)},navigate:function(n,i){var r,o,s,l,d,u,c,h,p,f,m,g,b,k,w,y;i=isNaN(i)?Re[i]:i,r=this,o=r.options,s=o.culture,l=o.min,d=o.max,u=r._title,c=r._table,h=r._oldTable,p=r._current,f=n&&+n>+p,m=i!==t&&i!==r._index,n||(n=p),r._current=n=new Ie((+a(n,l,d))),i===t?i=r._index:r._index=i,r._view=b=S.views[i],k=b.compare,w=i===Re[ne],u.toggleClass(se,w).attr(Se,w),w=k(n,l)<1,r[Ce].toggleClass(se,w).attr(Se,w),r[Ce].hasClass(se)&&r[Ce].removeClass(ae),w=k(n,d)>-1,r[Te].toggleClass(se,w).attr(Se,w),r[Te].hasClass(se)&&r[Te].removeClass(ae),c&&h&&h.data("animating")&&(h.kendoStop(!0,!0),c.kendoStop(!0,!0)),r._oldTable=c,c&&!r._changeView||(u.html(b.title(n,l,d,s)),r._table=g=e(b.content(Ae({min:l,max:d,date:n,url:o.url,dates:o.dates,format:o.format,culture:s,disableDates:o.disableDates,isWeekColumnVisible:o.weekNumber,messages:o.messages},r[b.name]))),_(g,b.name),v(g),y=c&&c.data("start")===g.data("start"),r._animate({from:c,to:g,vertical:m,future:f,replace:y}),r.trigger(re),r._focus(n)),i===Re[o.depth]&&r._selectDates.length>0&&r._visualizeSelectedDatesInView(),"single"===r.options.selectable&&i===Re[o.depth]&&r._value&&!r.options.disableDates(r._value)&&r._class("k-state-selected",r._value),r._class(le,n),!c&&r._cell&&r._cell.removeClass(le),r._changeView=!0},selectDates:function(n){var i,r,o=this;return n===t?o._selectDates:(r=n.map(function(e){return e.getTime()}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return new Date(e)}),i=e.grep(r,function(e){if(e)return+o._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),o._selectDates=i.length>0?i:o._selectDates,o._visualizeSelectedDatesInView(),t)},value:function(e){var n,i=this,r=i._view,o=i._view;return e===t?i._value:(e=i._validateValue(e),e&&i._isMultipleSelection()&&(n=new Date((+e)),n.setHours(0,0,0,0),i._selectDates=[n],i.selectable._lastActive=null),r&&null===e&&i._cell?i._cell.removeClass(me):(i._changeView=!e||o&&0!==o.compare(e,i._current),i.navigate(e)),t)},_validateValue:function(e){var n=this,i=n.options,r=i.min,o=i.max;return null===e&&(n._current=f(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),e=R(e,i.format,i.culture),null!==e&&(e=new Ie((+e)),s(e,r,o)||(e=null)),null!==e&&n.options.disableDates(new Date((+e)))?n._value===t&&(n._value=null):n._value=e,n._value},_visualizeSelectedDatesInView:function(){var t,n=this,i={};e.each(n._selectDates,function(e,t){i[D.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n._table.find(he).filter(function(t,n){return i[e(n.firstChild).attr(D.attr(oe))]}),t.length>0&&n.selectable._selectElement(t,!0); },_isMultipleSelection:function(){var e=this;return"multiple"===e.options.selectable},_selectable:function(){var e,t,n=this;n._isMultipleSelection()&&(e=n.options.selectable,t=H.parseOptions(e),t.multiple&&n.element.attr("aria-multiselectable","true"),n.selectable=new H(n.wrapper,{aria:!0,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",multiple:t.multiple,filter:"table.k-month:eq(0) "+pe,change:Ee(n._onSelect,n),relatedTarget:Ee(n._onRelatedTarget,n)}))},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(pe)&&(t._current=t._toDateObject(e.find("a")),t._class(le,t._toDateObject(e.find("a"))))},_onSelect:function(n){var i=this,r=n,o=H.parseOptions(i.options.selectable);return o.multiple?(r.event.ctrlKey?e(r.event.currentTarget).is(pe)?i._toggleSelection(e(r.event.currentTarget)):(i._cellsBySelector(pe).each(function(t,n){var r=i._toDateObject(e(n).find("a"));i._deselect(r)}),i._addSelectedCellsToArray()):r.event.shiftKey?i._rangeSelection(i._cell):e(r.event.currentTarget).is(he)?i.value(i._toDateObject(e(r.event.currentTarget).find("a"))):(i._selectDates=[],i._addSelectedCellsToArray()),i.trigger(ie),t):(e(r.event.currentTarget).is("td")&&!e(r.event.currentTarget).hasClass("k-state-selected")?e(r.event.currentTarget).addClass("k-state-selected"):i._click(e(r.event.currentTarget).find("a")),t)},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=this,n=t._toDateObject(e.find("a"));e.hasClass("k-state-selected")?t._selectDates.push(n):t._deselect(n)},_rangeSelection:function(e,t){var n,i=this,r=t||i._toDateObject(i.selectable.value().first().find("a")),o=i._toDateObject(e.find("a"));i.selectable._lastActive||i._value?r=i.selectable._lastActive?i._toDateObject(i.selectable._lastActive.find("a")):new Date((+i._value)):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),pe):i.selectable.value().first(),i._selectDates=[],n=u(r,o),c(i._selectDates,n,r,i.options.disableDates),i._visualizeSelectedDatesInView()},_cellsBySelector:function(e){var t=this;return t._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each(function(n,i){var r=t._toDateObject(e(i.firstChild));t.options.disableDates(r)||t._selectDates.push(r)})},_deselect:function(e){var t=this,n=t._selectDates.map(Number).indexOf(+e);n!=-1&&t._selectDates.splice(n,1)},_dateInView:function(e){var t=this,n=t._toDateObject(t._cellsBySelector(he+":first").find("a")),i=t._toDateObject(t._cellsBySelector(he+":last").find("a"));return+e<=+i&&+e>=+n},_move:function(n){var i,r,o,l,d,u=this,c=u.options,h=n.keyCode,p=u._view,m=u._index,g=u.options.min,v=u.options.max,_=new Ie((+u._current)),b=D.support.isRtl(u.wrapper),k=u.options.disableDates;return n.target===u._table[0]&&(u._active=!0),h==I.RIGHT&&!b||h==I.LEFT&&b?(i=1,r=!0):h==I.LEFT&&!b||h==I.RIGHT&&b?(i=-1,r=!0):h==I.UP?(i=0===m?-7:-4,r=!0):h==I.DOWN?(i=0===m?7:4,r=!0):h==I.SPACEBAR?(i=0,r=!0):h!=I.HOME&&h!=I.END||(o=h==I.HOME?"first":"last",l=p[o](_),_=new Ie(l.getFullYear(),l.getMonth(),l.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds()),_.setFullYear(l.getFullYear()),r=!0),n.ctrlKey?h==I.RIGHT&&!b||h==I.LEFT&&b?(u.navigateToFuture(),r=!0):h==I.LEFT&&!b||h==I.RIGHT&&b?(u.navigateToPast(),r=!0):h==I.UP?(u.navigateUp(),r=!0):h==I.DOWN?(u._click(e(u._cell[0].firstChild)),r=!0):h!=I.ENTER&&h!=I.SPACEBAR||!u._isMultipleSelection()||(u._keyboardToggleSelection(n),d=u._toDateObject(e(u._cell[0]).find("a")),u._class(le,d)):n.shiftKey?(i!==t||o)&&(o||p.setDate(_,i),k(_)&&(_=u._nextNavigatable(_,i)),g=f(g.getFullYear(),g.getMonth(),g.getDate()),s(_,g,v)&&(u._isMultipleSelection()?u._keyboardRangeSelection(n,_):u._focus(a(_,c.min,c.max)))):(h==I.ENTER||h==I.SPACEBAR?("month"==p.name&&u._isMultipleSelection()?(u.value(u._toDateObject(e(u._cell.find("a")))),u.selectable._lastActive=e(u._cell[0]),u.trigger(ie)):u._click(e(u._cell[0].firstChild)),r=!0):h==I.PAGEUP?(r=!0,u.navigateToPast()):h==I.PAGEDOWN&&(r=!0,u.navigateToFuture()),(i||o)&&(o||p.setDate(_,i),k(_)&&(_=u._nextNavigatable(_,i)),g=f(g.getFullYear(),g.getMonth(),g.getDate()),s(_,g,v)&&(u._isMultipleSelection()?u._dateInView(_)?(u._current=_,u._class(le,_)):u.navigate(_):u._focus(a(_,c.min,c.max))))),r&&n.preventDefault(),u._current},_keyboardRangeSelection:function(e,n){var i,r,o=this;return o._dateInView(n)?(o.selectable.options.filter=o.wrapper.find("table").length>1&&+n>+o._current?"table.k-month:eq(1) "+pe:"table.k-month:eq(0) "+pe,o._class(le,n),o._current=n,o._rangeSelection(o._cellByDate(o._view.toDateString(n),pe),n),o.trigger(ie),o.selectable.options.filter="table.k-month:eq(0) "+pe,t):(o._selectDates=[],i=o.selectable._lastActive?o._toDateObject(o.selectable._lastActive.find("a")):n,r=u(i,new Date((+n))),c(o._selectDates,r,i,o.options.disableDates),o.navigate(n),o._current=n,o.selectable._lastActive=o.selectable._lastActive||o._cellByDate(o._view.toDateString(n),pe),o.trigger(ie),t)},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(me)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(ie,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,r=n._view,o=n.options.min,a=n.options.max,l=n.options.disableDates,d=new Date(e.getTime());for(r.setDate(d,-t);i;){if(r.setDate(e,t),!s(e,o,a)){e=d;break}i=l(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,r=t._active;n?n.parent().data("animating")?(n.off(K),n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(r)):!n.is(":visible")||t.options.animation===!1||e.replace?(i.insertAfter(n),n.off(K).remove(),t._focusView(r)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,r=i._active,o=i.options.animation.horizontal,a=o.effects,s=$(e);a&&a.indexOf(ee)!=-1&&(e.add(t).css({width:s}),e.wrap("
      "),i._focusView(r,e),e.parent().css({position:"relative",width:2*s,"float":Z,"margin-left":n?0:-s}),t[n?"insertAfter":"insertBefore"](e),Ae(o,{effects:ee+":"+(n?"right":Z),complete:function(){e.off(K).remove(),i._oldTable=null,t.unwrap(),i._focusView(r)}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,t){var n,i,r=this,o=r.options.animation.vertical,a=o.effects,s=r._active;a&&a.indexOf("zoom")!=-1&&(t.css({position:"absolute",top:G(e.prev()),left:0}).insertBefore(e),O&&(n=r._cellByDate(r._view.toDateString(r._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),t.css(O,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(K).remove(),r._oldTable=null,t.css({position:"static",top:0,left:0}),r._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t,n){return this._table.find(n?n:"td:not(."+de+")").filter(function(){return e(this.firstChild).attr(D.attr(oe))===t})},_class:function(e,t){var n,i=this,r=i._cellID,o=i._cell,a=i._view.toDateString(t);o&&o.removeAttr(De).removeAttr(Fe).removeAttr(X),t&&"month"==i._view.name&&(n=i.options.disableDates(t)),i._cellsBySelector(i._isMultipleSelection()?he:"td:not(."+de+")").removeClass(e),o=i._cellByDate(a,"multiple"==i.options.selectable?he:"td:not(."+de+")").attr(De,!0),(e===le&&!i._active&&i.options.focusOnNav!==!1||n)&&(e=""),o.addClass(e),o[0]&&(i._cell=o),r&&(o.attr(X,r),i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(e){e.on(_e,this._addClassProxy).on(ge,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date((+t._current)),r=t._toDateObject(e);M(r,0),"month"==t._view.name&&t.options.disableDates(r)&&(r=t._value),t._view.setDate(i,r),t.navigateDown(a(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(le,e))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,r=o(),a=i.element,s=a.find(".k-footer");return n?(s[0]||(s=e('').appendTo(a)),i._today=s.show().find(".k-link").html(n(r)).attr("title",D.toString(r,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),s.hide(),t)},_header:function(){var e,t=this,n=t.element;n.find(".k-header")[0]||n.html('
      '),e=n.find(".k-link").on(ke+" "+we+" "+_e+" "+ge,h).click(!1),t._title=e.eq(1).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[Ce]=e.eq(0).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[Te]=e.eq(2).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var n,i=this,r=i._index+1,o=new Ie((+i._current));i._isMultipleSelection()&&(n=i._table.find("td:not(.k-other-month)").has(".k-link").first(),o=i._toDateObject(n.find("a")),i._current=new Date((+o))),e=i[e],e.hasClass(se)||(r>3?o.setFullYear(o.getFullYear()+100*t):S.views[r].setDate(o,t),i.navigate(o))},_option:function(e,n){var i,r=this,o=r.options,a=r._value||r._current;return n===t?o[e]:(n=R(n,o.format,o.culture),n&&(o[e]=new Ie((+n)),i=e===J?n>a:a>n,(i||w(a,n))&&(i&&(r._value=null),r._changeView=!0),r._changeView||(r._changeView=!(!o.month.content&&!o.month.empty)),r.navigate(r._value),r._toggle()),t)},_toggle:function(e){var n=this,i=n.options,r=n.options.disableDates(o()),a=n._today;e===t&&(e=s(o(),i.min,i.max)),a&&(a.off(Y),e&&!r?a.addClass(ce).removeClass(se).on(Y,Ee(n._todayClick,n)):a.removeClass(ce).addClass(se).on(Y,p))},_todayClick:function(e){var t=this,n=Re[t.options.depth],i=t.options.disableDates,r=o();e.preventDefault(),i(r)||(0===t._view.compare(t._current,r)&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[r],t.selectable._lastActive=null),t._value=r,t.navigate(r,n),t.trigger(ie))},_toDateObject:function(t){var n=e(t).attr(D.attr(oe)).split("/");return n=f(n[0],n[1],n[2])},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,r=i.content,o=i.weekNumber,a=i.empty;e.month={content:B(''+(r||"#=data.value#")+"",{useWithBlock:!!r}),empty:B(''+(a||" ")+"",{useWithBlock:!!a}),weekNumber:B(''+(o||"#= data.weekNumber #")+"",{useWithBlock:!!o})},e.footer=n!==!1?B(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}):null}});E.plugin(Me),S={firstDayOfMonth:function(e){return f(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||D.culture().calendar;var n=t.firstDay,i=new Ie(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=n;)S.setTime(i,-1*xe);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new Ie(e.getTime()+t),r=i.getTimezoneOffset()-n;e.setTime(i.getTime()+r*ye)},views:[{name:te,title:function(e,t,n,i){return m(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,n=0,r=e.min,a=e.max,s=e.date,d=e.dates,u=e.format,c=e.culture,h=e.url,p=e.isWeekColumnVisible,g=h&&d[0],v=m(c),_=v.firstDay,k=v.days,w=l(k.names,_),y=l(k.namesShort,_),x=S.firstVisibleDay(s,v),C=t.first(s),T=t.last(s),F=t.toDateString,E=o(),A='';for(p&&(A+='");n<7;n++)A+='";return M(E,0),E=+E,i({cells:42,perRow:7,html:A+='',start:x,isWeekColumnVisible:p,weekNumber:e.weekNumber,min:f(r.getFullYear(),r.getMonth(),r.getDate()),max:f(a.getFullYear(),a.getMonth(),a.getDate()),content:e.content,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,n){var i=[],r=e.getDay(),o="",a="#";return(eT)&&i.push(de),n(e)&&i.push(se),+e===E&&i.push("k-today"),0!==r&&6!==r||i.push("k-weekend"),g&&b(+e,d)&&(a=h.replace("{0}",D.toString(e,u,c)),o=" k-action-link"),{date:e,dates:d,ns:D.ns,title:D.toString(e,"D",c),value:e.getDate(),dateString:F(e),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:o,url:a}},weekNumberBuild:function(e){return{weekNumber:z(e,D.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return S.firstDayOfMonth(e)},last:function(e){var t=f(e.getFullYear(),e.getMonth()+1,0),n=S.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),r=e.getFullYear(),o=t.getMonth(),a=t.getFullYear();return n=r>a?1:ro?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof Ie?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):S.setTime(e,t*xe),M(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=m(e.culture).months.namesAbbr,n=this.toDateString,r=e.min,o=e.max;return i({min:f(r.getFullYear(),r.getMonth(),1),max:f(o.getFullYear(),o.getMonth(),1),start:f(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:D.ns,dateString:n(e),cssClass:""}}})},first:function(e){return f(e.getFullYear(),0,e.getDate())},last:function(e){return f(e.getFullYear(),11,e.getDate())},compare:function(e,t){return r(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof Ie?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),M(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:f(t-t%10-1,0,1),min:f(e.min.getFullYear(),0,1),max:f(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:D.ns,dateString:n(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:ne,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),r=e.max.getFullYear(),o=this.toDateString,a=n,s=r;return a-=a%10,s-=s%10,s-a<10&&(s=a+9),i({start:f(t-t%100-10,0,1),min:f(a,0,1),max:f(s,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),a=i+9;return ir&&(a=r),{ns:D.ns,value:i+" - "+a,dateString:o(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,100)},setDate:function(e,t){d(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},S.isEqualDatePart=k,S.isEqualDate=T,S.makeUnselectable=v,S.restrictValue=a,S.isInRange=s,S.addClassToViewContainer=_,S.normalize=g,S.viewsEnum=Re,S.disabled=y,D.calendar=S}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dateinput.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var r,o,a,s,l=e[i+e.length-n.length];if(e=e.substring(0,i+e.length-n.length),n=n.substring(0,i),r=[],e===n&&i>0)return r.push([t[i-1],n[i-1]]),r;if(0===e.indexOf(n)&&(0===n.length||t[n.length-1]!==t[n.length])){for(a="",o=n.length;o=0&&(a=t[o],r.push([a,""]));return r}if(" "===n[n.length-1]||n[n.length-1]===l)return[[t[i-1]," "]];if(0===n.indexOf(e)||k.indexOf(t[i-1])===-1){for(s=t[0],o=Math.max(0,e.length-1);o=0){s=t[o];break}return[[s,n[i-1]]]}return[[t[i-1],n[i-1]]]}var i,r=window,o=r.kendo,a=o.caret,s=o.ui,l=s.Widget,d=o.keys,u=".kendoDateInput",c=e.proxy,h={}.toString,p=(o.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+u,f="k-state-disabled",m="k-state-default",g="k-state-invalid",v="disabled",_="readonly",b="change",k="dMyHhmftsz",w=l.extend({init:function(t,n){var i,r,a=this;l.fn.init.call(a,t,n),t=a.element,n=a.options,n.format=o._extractFormat(n.format||o.getCulture(n.culture).calendars.standard.patterns.d),n.min=o.parseDate(t.attr("min"))||o.parseDate(n.min),n.max=o.parseDate(t.attr("max"))||o.parseDate(n.max),i=(t.parent().attr("class")||"").indexOf("k-picker-wrap")>=0,i?a.wrapper=t.parent():(a.wrapper=t.wrap("").parent(),a.wrapper.addClass(t[0].className),a.wrapper[0].style.cssText=t[0].style.cssText,t.css({width:"100%",height:t[0].style.height})),e("").insertAfter(t),a._form(),a.element.addClass(i?" ":"k-textbox").attr("autocomplete","off").on("focusout"+u,function(){a._change()});try{t[0].setAttribute("type","text")}catch(s){t[0].type="text"}r=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),r?a.enable(!1):a.readonly(t.is("[readonly]")),a.value(a.options.value||t.val()),o.notify(a)},options:{name:"DateInput",culture:"",value:"",format:"",min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:"year",month:"month",day:"day",weekday:"day of the week",hour:"hours",minute:"minutes",second:"seconds",dayperiod:"AM/PM"}},events:[b],min:function(e){return e===t?this.options.min:(this.options.min=e,t)},max:function(e){return e===t?this.options.max:(this.options.max=e,t)},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),this._unbindInput(),this._bindInput(),this._updateElementValue()},destroy:function(){var e=this;e.element.off(u),e._formElement&&e._formElement.off("reset",e._resetHandler),l.fn.destroy.call(e)},value:function(e){return e===t?this._dateTime.getDateObject():(null===e&&(e=""),"[object Date]"!==h.call(e)&&(e=o.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this._dateTime=new i(e,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=e,t)},_updateElementValue:function(){var e=this._dateTime.toPair(this.options.format,this.options.culture,this.options.messages);this.element.val(e[0]),this._oldText=e[0],this._format=e[1]},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e=this;e.element.on("paste"+u,c(e._paste,e)).on("keydown"+u,c(e._keydown,e)).on(p,c(e._input,e)).on("mouseup"+u,c(e._mouseUp,e)).on("DOMMouseScroll"+u+" mousewheel"+u,c(e._scroll,e))},_unbindInput:function(){this.element.off("keydown"+u).off("paste"+u).off(p).off("mouseup"+u).off("DOMMouseScroll"+u+" mousewheel"+u)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t.wrapper;t._unbindInput(),r||i?(i&&(o.addClass(f).removeClass(m),n.attr(v,i),n.removeAttr(_)),r&&n.attr(_,r)):(o.addClass(m).removeClass(f),n.removeAttr(v).removeAttr(_),t._bindInput())},_change:function(){var e=this,t=e._oldValue,n=e.value();n&&e.min()&&ne.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(b),e.element.trigger(b))},_input:function(){var e,t,i,r,s,l,d,u=this,c=u.element[0],h=!1;if(o._activeElement()===c){if(e=n(this._oldText,this._format,this.element[0].value,a(this.element[0])[0]),t=1===e.length&&" "===e[0][1],!t)for(i=0;i0?37:39:(e.wheelDelta||-e.detail)>0?38:40,this._keydown(t),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},_form:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value)})},t._formElement=r.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,n,i,r,s,l,u=e.keyCode;if(37==u||39==u)for(e.preventDefault(),t=a(this.element[0]),t[0]!=t[1]&&this._selectNearestSegment(),n=37==u?-1:1,i=n==-1?a(this.element[0])[0]-1:a(this.element[0])[1]+1;i>=0&&i=0){this._selectSegment(this._format[i]);break}i+=n}38!=u&&40!=u||(e.preventDefault(),t=a(this.element[0]),r=this._format[t[0]],k.indexOf(r)>=0&&(this._dateTime.modifyPart(r,38==u?1:-1),this._updateElementValue(),this._selectSegment(r))),o.support.browser.msie&&o.support.browser.version<10&&(s=e.keyCode?e.keyCode:e.which,8!==s&&46!==s||(l=this,setTimeout(function(){l._input()},0))),u===d.ENTER&&this._change()},_selectNearestSegment:function(){var e,n,i=a(this.element[0]),r=i[0];for(e=r,n=r-1;e=0;e++,n--){if(e=0&&k.indexOf(this._format[n])!==-1)return this._selectSegment(this._format[n]),t}},_selectSegment:function(e){var t,n=-1,i=0;for(t=0;t99&&(r=Math.floor(r/10)),r=_?a(r):e;break;case"fff":r=_?a(c.getMilliseconds(),3):e;break;case"tt":r=m?c.getHours()<12?T.AM[0]:T.PM[0]:w.dayperiod;break;case"zzz":n=c.getTimezoneOffset(),i=n<0,r=(""+Math.abs(n/60)).split(".")[0],n=Math.abs(n)-60*r,r=(i?"+":"-")+a(r),r+=":"+a(n);break;case"z":case"zz":r=c.getTimezoneOffset()/60,i=r<0,r=(""+Math.abs(r)).split(".")[0],r=(i?"+":"-")+("zz"===e?a(r):r)}if(r=r!==t?r:e.slice(1,e.length-1),D){for(r=""+r,o="","ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE"),s=0;s0&&(l(e,!0),c=i)},this.parsePart=function(e,t){var n,i,r,o,a,s,d,u,_;if(!t)return l(e,!1),!0;switch(n=new Date(c&&c.getTime?c.getTime():c),e){case"d":if(r=(f?10*n.getDate():0)+parseInt(t,10),isNaN(r))return;for(;r>31;)r=parseInt((""+r).slice(1),10);if(r<1)f=!1;else{if(n.setDate(r),n.getMonth()!==c.getMonth())return;f=!0}break;case"M":if(o=(p?10*(n.getMonth()+1):0)+parseInt(t,10),isNaN(o)){for(a=T.months.names,b+=t.toLowerCase();b.length>0;){for(s=0;s12;)o=parseInt((""+o).slice(1),10);o<1?p=!1:(n.setMonth(o-1),n.getMonth()!==o-1&&(n.setDate(1),n.setMonth(o-1)),p=!0);break;case"y":if(d=(h?10*n.getFullYear():0)+parseInt(t,10),isNaN(d))return;for(;d>9999;)d=parseInt((""+d).slice(1),10);d<1?h=!1:(n.setFullYear(d),h=!0);break;case"h":if(i=(m?10*(n.getHours()%12||12):0)+parseInt(t,10),isNaN(i))return;for(;i>12;)i=parseInt((""+i).slice(1),10);n.setHours(12*Math.floor(n.getHours()/12)+i%12),m=!0;break;case"H":if(i=(m?10*n.getHours():0)+parseInt(t,10),isNaN(i))return;for(;i>23;)i=parseInt((""+i).slice(1),10);n.setHours(i),m=!0;break;case"m":if(u=(g?10*n.getMinutes():0)+parseInt(t,10),isNaN(u))return;for(;u>59;)u=parseInt((""+u).slice(1),10);n.setMinutes(u),g=!0;break;case"s":if(_=(v?10*n.getSeconds():0)+parseInt(t,10),isNaN(_))return;for(;_>59;)_=parseInt((""+_).slice(1),10);n.setSeconds(_),v=!0;break;case"t":if(m){for(k+=t.toLowerCase();k.length>0;){if(0===T.AM[0].toLowerCase().indexOf(k)&&n.getHours()>=12||0===T.PM[0].toLowerCase().indexOf(k)&&n.getHours()<12)return n.setHours((n.getHours()+12)%24),c=n,!0;k=k.substring(1,k.length)}return!1}}return c=n,!0},this.toPair=function(e,t,n){return e?(t=o.getCulture(t),T=t.calendars.standard,e=T.patterns[e]||e,S=T.days,C=T.months,w=n,[e.replace(x,s(!1)),e.replace(x,s(!0))]):["",""]},this.getDateObject=function(){return h&&p&&f&&m&&g&&v&&_?new Date(c.getTime()):null},e)c=new Date(e.getTime());else for(c=new Date,d=this.toPair(n,i,r)[1],u=0;u",p="",f=".kendoDatePicker",m="click"+f,g="open",v="close",_="change",b="disabled",k="readonly",w="k-state-default",y="k-state-focused",x="k-state-selected",C="k-state-disabled",T="k-state-hover",S="mouseenter"+f+" mouseleave"+f,D="mousedown"+f,F="id",E="min",A="max",I="month",R="aria-disabled",M="aria-expanded",z="aria-hidden",H=o.calendar,N=H.isInRange,B=H.restrictValue,P=H.isEqualDatePart,L=e.extend,O=e.proxy,V=Date,W=function(t){var n,i=this,r=document.body,s=e(h).attr(z,"true").addClass("k-calendar-container").appendTo(r);i.options=t=t||{},n=t.id,n&&(n+="_dateview",s.attr(F,n),i._dateViewID=n),i.popup=new a.Popup(s,L(t.popup,t,{name:"Popup",isRtl:o.support.isRtl(t.anchor)})),i.div=s,i.value(t.value)};W.prototype={_calendar:function(){var t,n=this,r=n.calendar,s=n.options;r||(t=e(h).attr(F,o.guid()).appendTo(n.popup.element).on(D,i).on(m,"td:has(.k-link)",O(n._click,n)),n.calendar=r=new a.Calendar(t),n._setOptions(s),o.calendar.makeUnselectable(r.element),r.navigate(n._value||n._current,s.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,disableDates:e.disableDates})},setOptions:function(e){var t=this.options,n=e.disableDates;n&&(e.disableDates=H.disabled(n)),this.options=L(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(E,e)},max:function(e){this._option(A,e)},toggle:function(){var e=this;e[e.popup.visible()?v:g]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,r=e.ctrlKey&&n==d.DOWN||n==d.ENTER,o=!1;if(e.altKey)n==d.DOWN?(t.open(),e.preventDefault(),o=!0):n==d.UP&&(t.close(),e.preventDefault(),o=!0);else if(t.popup.visible()){if(n==d.ESC||r&&i._cell.hasClass(x))return t.close(),e.preventDefault(),!0;n!=d.SPACEBAR&&(t._current=i._move(e)),o=!0}return o},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,r=i.disableDates;r&&r(e)&&(e=null),t._value=e,t._current=new V((+B(e,i.min,i.max))),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(x)!==-1&&this.close()},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},W.normalize=n,o.DateView=W,r=s.extend({init:function(t,i){var r,d,u=this;s.fn.init.call(u,t,i),t=u.element,i=u.options,i.disableDates=o.calendar.disabled(i.disableDates),i.min=l(t.attr("min"))||l(i.min),i.max=l(t.attr("max"))||l(i.max),n(i),u._initialOptions=L({},i),u._wrapper(),u.dateView=new W(L({},i,{id:t.attr(F),anchor:u.wrapper,change:function(){u._change(this.value()),u.close()},close:function(e){u.trigger(v)?e.preventDefault():(t.attr(M,!1),d.attr(z,!0))},open:function(e){var n,i=u.options;u.trigger(g)?e.preventDefault():(u.element.val()!==u._oldText&&(n=l(t.val(),i.parseFormats,i.culture),u.dateView[n?"current":"value"](n)),t.attr(M,!0),d.attr(z,!1),u._updateARIA(n))}})),d=u.dateView.div,u._icon();try{t[0].setAttribute("type","text")}catch(c){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":u.dateView._dateViewID}),u._reset(),u._template(),r=t.is("[disabled]")||e(u.element).parents("fieldset").is(":disabled"),r?u.enable(!1):u.readonly(t.is("[readonly]")),i.dateInput&&(u._dateInput=new a.DateInput(t,{culture:i.culture,format:i.format,min:i.min,max:i.max,value:i.value})),u._old=u._update(i.value||u.element.val()),u._oldText=t.val(),o.notify(u)},events:[g,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:I,depth:I,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#',dateInput:!1,weekNumber:!1},setOptions:function(e){var t=this,i=t._value;s.fn.setOptions.call(t,e),e=t.options, e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),t._dateInput&&t._dateInput.setOptions({culture:e.culture,format:e.format,min:e.min,max:e.max,value:e.value}),i&&(t.element.val(o.toString(i,e.format,e.culture)),t._updateARIA(i))},_editable:function(e){var t=this,n=t._dateIcon.off(f),r=t.element.off(f),o=t._inputWrapper.off(f),a=e.readonly,s=e.disable;a||s?(o.addClass(s?C:w).removeClass(s?w:C),r.attr(b,s).attr(k,a).attr(R,s)):(o.addClass(w).removeClass(C).on(S,t._toggleHover),r.removeAttr(b).removeAttr(k).attr(R,!1).on("keydown"+f,O(t._keydown,t)).on("focusout"+f,O(t._blur,t)).on("focus"+f,function(){t._inputWrapper.addClass(y)}),n.on(m,O(t._click,t)).on(D,i))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(f),e._dateIcon.off(f),e._inputWrapper.off(f),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(E,e)},max:function(e){return this._option(A,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(y)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),o.support.touch||t[0]===c()||t.focus()},_change:function(e){var t,n,i,r=this,a=r.element.val();e=r._update(e),t=!o.calendar.isEqualDate(r._old,e),n=t&&!r._typing,i=a!==r.element.val(),(n||i)&&r.element.trigger(_),t&&(r._old=e,r._oldText=r.element.val(),r.trigger(_)),r._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),r=!1;n.popup.visible()||e.keyCode!=d.ENTER||i===t._oldText?(r=n.move(e),t._updateARIA(n._current),r?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():t._typing=!0):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=l(n,r.parseFormats,r.culture),n&&(r[e]=new V((+n)),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,a=i.max,s=n._value,d=l(e,i.parseFormats,i.culture),u=null===d&&null===s||d instanceof Date&&s instanceof Date;return i.disableDates(d)&&(d=null,n._old||n.element.val()||(e=null)),+d===+s&&u?(t=o.toString(d,i.format,i.culture),t!==e&&n.element.val(null===d?e:t),d):(null!==d&&P(d,r)?d=B(d,r,a):N(d,r,a)||(d=null),n._value=d,n.dateView.value(d),n._dateInput&&d?n._dateInput.value(d||e):n.element.val(o.toString(d||e,i.format,i.culture)),n._updateARIA(d),d)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(p).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(p).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),a.plugin(r)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.virtuallist.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e){return e[e.length-1]}function i(e){return e instanceof Array?e:[e]}function r(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function o(e,t,n){return Math.ceil(e*t/n)}function a(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function s(){var t,n=e('
      ');return n.css({position:"absolute",left:"-200000px",visibility:"hidden"}),n.appendTo(document.body),t=parseFloat(_.getComputedStyles(n.find(".k-item")[0],["line-height"])["line-height"]),n.remove(),t}function l(e,t,n){return{down:e*n,up:e*(t-1-n)}}function d(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,r){return t>r?t-e.topi}}function u(e,t){return function(n){return t(e.scrollTop,n)}}function c(e){return function(t,n){return e(t.items,t.index,n),t}}function h(e,t){_.support.browser.msie&&_.support.browser.version<10?e.style.top=t+"px":(e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)")}function p(t,n){return function(i,r){for(var o=0,a=i.length;o0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}function m(n,i,r){var o=r.template;n=e(n),i.item||(o=r.placeholderTemplate),0===i.index&&this.header&&i.group&&this.header.html(r.fixedGroupTemplate(i.group)),this.angular("cleanup",function(){return{elements:[n]}}),n.attr("data-uid",i.item?i.item.uid:"").attr("data-offset-index",i.index).html(o(i.item||{})),n.toggleClass(M,i.current),n.toggleClass(R,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup&&e("
      ").appendTo(n).html(r.groupTemplate(i.group)),i.top!==t&&h(n[0],i.top),this.angular("compile",function(){return{elements:[n],data:[{dataItem:i.item,group:i.group,newGroup:i.newGroup}]}})}function g(e,t){var n,i,r,o,a=t.length,s=e.length,l=[],d=[];if(s)for(r=0;r").parent(),r.wrapper=r.content.wrap("
      ").parent(),r.header=r.content.before("
      ").prev(),r.element.on("mouseenter"+V,"li:not(.k-loading-item)",function(){e(this).addClass(z)}).on("mouseleave"+V,"li",function(){e(this).removeClass(z)}),r._values=i(r.options.value),r._selectedDataItems=[],r._selectedIndexes=[],r._rangesList={},r._promisesList=[],r._optionID=_.guid(),r._templates(),r.setDataSource(n.dataSource),r.content.on("scroll"+V,_.throttle(function(){r._renderItems(),r._triggerListBound()},n.delay)),r._selectable()},options:{name:"VirtualList",autoBind:!0,delay:100,height:null,listScreens:4,threshold:.5,itemHeight:null,oppositeBuffer:1,type:"flat",selectable:!1,value:[],dataValueField:null,template:"#:data#",placeholderTemplate:"loading...",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",mapValueTo:"index",valueMapper:null},events:[H,N,B,P,L,O],setOptions:function(e){k.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(N,"."+F,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(V),this.dataSource.unbind(H,this._refreshHandler),k.fn.destroy.call(this)},setDataSource:function(t){var n,i=this,r=t||{};r=e.isArray(r)?{data:r}:r,r=_.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(H,i._refreshHandler),i._clean(),i.bound(!1),i._deferValueSet=!0,n=i.value(),i.value([]),i.mute(function(){i.value(n)})):i._refreshHandler=e.proxy(i.refresh,i),i.dataSource=r.bind(H,i._refreshHandler),i.setDSFilter(r.filter()),0!==r.view().length?i.refresh():i.options.autoBind&&r.fetch()},skip:function(){return this.dataSource.currentRangeStart()},_triggerListBound:function(){var e=this,t=e.skip();e.bound()&&!e._selectingValue&&e._skip!==t&&(e._skip=t,e.trigger(B))},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},refresh:function(e){var t,n=this,i=e&&e.action,r="itemchange"===i,o=this.isFiltered();n._mute||(n._deferValueSet=!1,n._fetching?(n._renderItems&&n._renderItems(!0),n._triggerListBound()):(o&&n.focus(0),n._createList(),i||!n._values.length||o||n.options.skipUpdateOnBind?(n.bound(!0),n._triggerListBound()):(n._selectingValue=!0,n.value(n._values,!0).done(function(){n.bound(!0),n._selectingValue=!1,n._triggerListBound()}))),(r||"remove"===i)&&(t=g(n._selectedDataItems,e.items),t.changed.length&&(r?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))),n._fetching=!1)},removeAt:function(e){return this._selectedIndexes.splice(e,1),this._values.splice(e,1),{position:e,dataItem:this._selectedDataItems.splice(e,1)[0]}},setValue:function(e){this._values=i(e)},value:function(n,r){var o,a=this;return n===t?a._values.slice():(null===n&&(n=[]),n=i(n),a._valueDeferred&&"resolved"!==a._valueDeferred.state()||(a._valueDeferred=e.Deferred()),o="multiple"===a.options.selectable&&a.select().length&&n.length,!o&&n.length||a.select(-1),a._values=n,(a.bound()&&!a._mute&&!a._deferValueSet||r)&&a._prefetchByValue(n),a._valueDeferred)},_prefetchByValue:function(e){var n,i,o,a=this,s=a._dataView,l=a._valueGetter,d=a.options.mapValueTo,u=!1,c=[];for(i=0;i0?(t-=1,this.focus(t),e=this.focus(),e&&e.hasClass("k-loading-item")&&(t+=1,this.focus(t)),t):(t=this.dataSource.total()-1,this.focus(t),t)},focusNext:function(){var e,t=this._focusedIndex,n=this.dataSource.total()-1;return!isNaN(t)&&ti&&(t=i*n):t=0,t},setScreenHeight:function(){var e=this._height();this.content.height(e),this._screenHeight=e},screenHeight:function(){return this._screenHeight},_getElementLocation:function(e){var t,n=this.content.scrollTop(),i=this._screenHeight,r=this.options.itemHeight,o=e*r,a=o+r,s=n+i;return t=o===n-r||a>n&&o=n&&o<=n+(i-r)?"inScreen":"outScreen"},_templates:function(){var e,t=this.options,n={template:t.template,placeholderTemplate:t.placeholderTemplate,groupTemplate:t.groupTemplate,fixedGroupTemplate:t.fixedGroupTemplate};for(e in n)"function"!=typeof n[e]&&(n[e]=_.template(n[e]||""));this.templates=n},_generateItems:function(e,t){for(var n,i=[],r=this.options.itemHeight+"px";t-- >0;)n=document.createElement("li"),n.tabIndex=-1,n.className=F+" "+E,n.setAttribute("role","option"),n.style.height=r,n.style.minHeight=r,e.appendChild(n),i.push(n);return i},_saveInitialRanges:function(){var t,n=this.dataSource._ranges,i=e.Deferred();for(i.resolve(),this._rangesList={},t=0;tr.total()&&(t.itemCount=r.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(i.itemHeight*r.total()),t.options.type=(r.group()||[]).length?"group":"flat","flat"===t.options.type?t.header.hide():t.header.show(),t.getter=t._getter(function(){t._renderItems(!0)}),t._onScroll=function(e,n){var i=t._listItems(t.getter);return t._fixedHeader(e,i(e,n))},t._renderItems=t._whenChanged(u(n,t._onScroll),c(t._reorderList(t._items,e.proxy(m,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight)},_setHeight:function(e){var t,n,i=this.heightContainer;if(i?t=i.offsetHeight:i=this.heightContainer=a(this.content[0],A),e!==t)for(i.innerHTML="";e>0;)n=Math.min(e,25e4),a(i).style.height=n+"px",e-=n},_getter:function(){var e=null,t=this.dataSource,n=t.skip(),i=this.options.type,r=this.itemCount,o={};return t.pageSize()=r?(l=t,d=e):(l=f(t,u),d=u>0?e.slice(-u):e.slice(0,-u)),n(l,d,i.bound()),o=a}},_bufferSizes:function(){var e=this.options;return l(this._screenHeight,e.listScreens,e.oppositeBuffer)},_indexConstraint:function(e){var t=this.itemCount,n=this.options.itemHeight,i=this.dataSource.total();return Math.min(Math.max(i-t,0),Math.max(0,Math.floor(e/n)))},_listIndex:function(e,t){var n,i=this._bufferSizes();return n=e-(e>t?i.down:i.up),this._indexConstraint(n)},_selectable:function(){this.options.selectable&&(this._selectProxy=e.proxy(this,"_clickHandler"),this.element.on(N+V,"."+F,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n,i,r=[];if("function"==typeof e)for(t=this.dataSource.flatView(),n=0;n-1&&(l.push(this.removeAt(r)),e(a[i]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var n=e=o.minLength)&&(r._open=!0,r._mute(function(){this.listView.value([])}),r._filterSource({value:a?t.toLowerCase():t,operator:o.filter,field:o.dataTextField,ignoreCase:a}),r.one("close",e.proxy(r._unifySeparators,r))),r._toggleCloseVisibility()},suggest:function(e){var i,r=this,o=r._last,a=r._accessor(),d=r.element[0],u=s(d)[0],p=r._separator(),f=a.split(p),m=n(u,a,p),g=u;return o==h.BACKSPACE||o==h.DELETE?(r._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=r.dataSource.view()[c.inArray(e[0],r.ul[0])]),e=e?r._text(e):""),u<=0&&(u=a.toLowerCase().indexOf(e.toLowerCase())+1),i=a.substring(0,u).lastIndexOf(p),i=i>-1?u-(i+p.length):u,a=f[m].substring(0,i),e&&(e=""+e,i=e.toLowerCase().indexOf(a.toLowerCase()),i>-1&&(e=e.substring(i+a.length),g=u+e.length,a+=e),p&&""!==f[f.length-1]&&f.push("")),f[m]=a,r._accessor(f.join(p||"")),d===l()&&s(d,u,g),t)},value:function(e){return e===t?this._accessor():(this.listView.value(e),this._accessor(e),this._old=this._accessor(),this._oldText=this._accessor(),t)},_click:function(e){var n=e.item,i=this,r=i.element,o=i.listView.dataItemByIndex(i.listView.getElementIndex(n));return e.preventDefault(),i._active=!0,i.trigger("select",{dataItem:o,item:n})?(i.close(),t):(i._oldText=r.val(),i._select(n).done(function(){i._blur(),s(r,r.val().length)}),t)},_clearText:e.noop,_resetFocusItem:function(){var e=this.options.highlightFirst?0:-1;this.options.virtual&&this.listView.scrollTo(0),this.listView.focus(e)},_listBound:function(){var e,n=this,i=n.popup,r=n.options,o=n.dataSource.flatView(),a=o.length,s=n.dataSource._group.length,d=n.element[0]===l();n._renderFooter(),n._renderNoData(),n._toggleNoData(!a),n._toggleHeader(!!s&&!!a),n._resizePopup(),i.position(),a&&r.suggest&&d&&n.suggest(o[0]),n._open&&(n._open=!1,e=n._allowOpening()?"open":"close",n._typingTimeout&&!d&&(e="close"),a&&(n._resetFocusItem(),r.virtual&&n.popup.unbind("activate",n._resetFocusItemHandler).one("activate",n._resetFocusItemHandler)),i[e](),n._typingTimeout=t),n._touchScroller&&n._touchScroller.reset(),n._hideBusy(),n._makeUnselectable(),n.trigger("dataBound")},_mute:function(e){this._muted=!0,e.call(this),this._muted=!1},_listChange:function(){var e=this._active||this.element[0]===l();e&&!this._muted&&this._selectValue(this.listView.selectedDataItems()[0])},_selectValue:function(e){var t=this._separator(),n="";e&&(n=this._text(e)),null===n&&(n=""),t&&(n=r(s(this.element)[0],this._accessor(),n,t,this._defaultSeparator())),this._prev=n,this._accessor(n),this._placeholder()},_unifySeparators:function(){return this._accessor(this.value().split(this._separator()).join(this._defaultSeparator())),this},_preselect:function(e,t){this._inputValue(t),this._accessor(e),this._old=this.oldText=this._accessor(),this.listView.setValue(e),this._placeholder()},_change:function(){var e=this,t=e._unifySeparators().value(),n=t!==c.unifyType(e._old,typeof t),i=n&&!e._typing,r=e._oldText!==t;e._old=t,e._oldText=t,(i||r)&&e.element.trigger(g),n&&e.trigger(g),e.typing=!1,e._toggleCloseVisibility()},_accessor:function(e){var n=this,i=n.element[0];return e===t?(e=i.value,i.className.indexOf("k-readonly")>-1&&e===n.options.placeholder?"":e):(i.value=null===e?"":e,n._placeholder(),t)},_keydown:function(e){var t,n,i=this,r=e.keyCode,o=i.listView,a=i.popup.visible(),s=o.focus();if(i._last=r,r===h.DOWN)a?this._move(s?"focusNext":"focusFirst"):i.value()&&i._filterSource({value:i.ignoreCase?i.value().toLowerCase():i.value(),operator:i.options.filter,field:i.options.dataTextField,ignoreCase:i.ignoreCase}).done(function(){i._resetFocusItem(),i.popup.open()}),e.preventDefault();else if(r===h.UP)a&&this._move(s?"focusPrev":"focusLast"),e.preventDefault();else if(r===h.HOME)this._move("focusFirst");else if(r===h.END)this._move("focusLast");else if(r===h.ENTER||r===h.TAB){ if(r===h.ENTER&&a&&e.preventDefault(),a&&s){if(t=o.dataItemByIndex(o.getElementIndex(s)),i.trigger("select",{dataItem:t,item:s}))return;this._select(s)}this._blur()}else r===h.ESC?(a?e.preventDefault():i._clearValue(),i.close()):!i.popup.visible()||r!==h.PAGEDOWN&&r!==h.PAGEUP?(i.popup._hovered=!0,i._search()):(e.preventDefault(),n=r===h.PAGEDOWN?1:-1,o.scrollWith(n*o.screenHeight()))},_keypress:function(){this._oldText=this.element.val(),this._typing=!0},_move:function(e){this.listView[e](),this.options.suggest&&this.suggest(this.listView.focus())},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._loading.hide(),e.element.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(){var e=this;e._busy||(e._busy=setTimeout(function(){e.element.attr("aria-busy",!0),e._loading.show(),e._hideClear()},100))},_placeholder:function(e){if(!d){var n,i=this,r=i.element,o=i.options.placeholder;if(o){if(n=r.val(),e===t&&(e=!n),e||(o=n!==o?n:""),n===i._old&&!e)return;r.toggleClass("k-readonly",e).val(o),o||r[0]!==document.activeElement||s(r[0],0,0)}}},_separator:function(){var e=this.options.separator;return e instanceof Array?RegExp(e.join("|"),"gi"):e},_defaultSeparator:function(){var e=this.options.separator;return e instanceof Array?e[0]:e},_inputValue:function(){return this.element.val()},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())},e.options.delay)},_select:function(e){var t=this;return t._active=!0,t.listView.select(e).done(function(){t._active=!1})},_loader:function(){this._loading=e('').insertAfter(this.element)},_clearButton:function(){c.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.element),this.wrapper.addClass("k-autocomplete-clearable"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_toggleCloseVisibility:function(){this.value()?this._showClear():this._hideClear()},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=i.style.cssText,n.css({width:"",height:i.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(i.className)}});u.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t,n){for(var i,r=0,o=t.length-1;r=t&&(e-=t),e}function r(e,t){for(var n=0;n0;e.popup.visible()||(e.listView.bound()&&e._state!==C?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.popup.open(),e._resizeFilterInput(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e.filterInput&&1!==e.options.minLength&&!t?(e.refresh(),e.popup.one("activate",e._focusInputHandler),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e,t,n=this.filterInput,i=this._prevent;n&&(e=this.filterInput[0]===u(),t=o.caret(this.filterInput[0])[0],this._prevent=!0,n.css("display","none").css("width",this.popup.element.css("width")).css("display","inline-block"),e&&(n.focus(),o.caret(n[0],t)),this._prevent=i)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||l.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;return e===t?(n=this.listView.focus(),!n&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n):(this._focus(e),t)},dataItem:function(n){var i=this,r=null;if(null===n)return n;if(n===t)r=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:e(i.items()).index(n)}else i.hasOptionLabel()&&(n-=1);r=i.dataSource.flatView()[n]}return r||(r=i._optionLabelDataItem()),r},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,r=i.options.ignoreCase;return e=null===e?"":e,e===t?i._textAccessor():"string"!=typeof e?(i._textAccessor(e),t):(n=r?e.toLowerCase():e,i._select(function(e){return e=i._text(e),r&&(e=(e+"").toLowerCase()),e===n}).done(function(){i._textAccessor(i.dataItem()||e)}),t)},_clearFilter:function(){e(this.filterInput).val(""),l.fn._clearFilter.call(this)},value:function(e){var n=this,i=n.listView,r=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),!e&&n.hasOptionLabel()||(n._initialIndex=null),this.trigger("set",{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()?(n._valueSetter&&r.unbind(g,n._valueSetter),n._valueSetter=S(function(){n.value(e)},n),r.one(g,n._valueSetter),t):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),i.value(e).done(function(){n._old=n._accessor(),n._oldIndex=n.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var n=this,i=n.options,r=i.optionLabel,a=i.optionLabelTemplate;return r?(a||(a="#:",a+="string"==typeof r?"data":o.expr(i.dataTextField,"data"),a+="#"),"function"!=typeof a&&(a=o.template(a)),n.optionLabelTemplate=a,n.hasOptionLabel()||(n.optionLabel=e('
      ').prependTo(n.list)),n.optionLabel.html(a(r)).off().click(S(n._click,n)).on(w,n._toggleHover),n.angular("compile",function(){return{elements:n.optionLabel,data:[{dataItem:n._optionLabelDataItem()}]}}),t):(n.optionLabel.off().remove(),n.optionLabel=e(),t)},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_optionLabelDataItem:function(){var n=this,i=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(i)?new c(i):n._assignInstance(n._optionLabelText(),""):t},_buildOptions:function(e){var n,i,r,o=this;o._isSelect&&(n=o.listView.value()[0],i=o._optionLabelDataItem(),r=i&&o._value(i),n!==t&&null!==n||(n=""),i&&(r!==t&&null!==r||(r=""),i='"),o._options(e,i,n),n!==s.unifyType(o._accessor(),typeof n)&&(o._customOption=null,o._custom(n)))},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===x,r=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!r.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(r),t._makeUnselectable(),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(r.length?(!t.listView.value().length&&n>-1&&null!==n&&t.select(n),t._initialIndex=null,e=t.listView.selectedDataItems()[0],e&&t.text()!==t._text(e)&&t._selectValue(e)):t._textAccessor()!==t._optionLabelText()&&(t.listView.value(""),t._selectValue(null),t._oldIndex=t.selectedIndex))),t._hideBusy(),t.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(v),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),d.mobileOS.ios&&t?e._change():e._blur(),e._inputWrapper.removeClass(v),e._prevent=!0,e._open=!1,e.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t.wrapper.add(t.filterInput).off(p),a=t._inputWrapper.off(w);r||i?i?(o.removeAttr(y),a.addClass(b).removeClass(_)):(a.addClass(_).removeClass(b),o.on("focusin"+p,S(t._focusinHandler,t)).on("focusout"+p,S(t._focusoutHandler,t))):(n.removeAttr(f).removeAttr(m),a.addClass(_).removeClass(b).on(w,t._toggleHover),o.attr(y,o.data(y)).attr(k,!1).on("keydown"+p,S(t._keydown,t)).on("focusin"+p,S(t._focusinHandler,t)).on("focusout"+p,S(t._focusoutHandler,t)).on("mousedown"+p,S(t._wrapperMousedown,t)).on("paste"+p,S(t._filterPaste,t)),t.wrapper.on("click"+p,S(t._wrapperClick,t)),t.filterInput||o.on("keypress"+p,S(t._keypress,t))),n.attr(f,i).attr(m,r),o.attr(k,i)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=e.altKey,l=o.popup.visible();if(o.filterInput&&(n=o.filterInput[0]===u()),a===h.LEFT?(a=h.UP,i=!0):a===h.RIGHT&&(a=h.DOWN,i=!0),!i||!n){if(e.keyCode=a,(s&&a===h.UP||a===h.ESC)&&o._focusElement(o.wrapper),o._state===x&&a===h.ESC&&(o._clearFilter(),o._open=!1,o._state=C),a===h.ENTER&&o._typingTimeout&&o.filterInput&&l)return e.preventDefault(),t;if(a!==h.SPACEBAR||n||(o.toggle(!l),e.preventDefault()),i=o._move(e),!i){if((!l||!o.filterInput)&&(r=o._focus(),a===h.HOME?(i=!0,o._firstItem()):a===h.END&&(i=!0,o._lastItem()),i)){if(o.trigger("select",{dataItem:o._getElementDataItem(o._focus()),item:o._focus()}))return o._focus(r),t;o._select(o._focus(),!0).done(function(){l||o._blur()}),e.preventDefault()}s||i||!o.filterInput||o._search()}}},_matchText:function(e,n){var i=this.options.ignoreCase;return e!==t&&null!==e&&(e+="",i&&(e=e.toLowerCase()),0===e.indexOf(n))},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e,t,n,o=this,a=o.dataSource.flatView(),s=a.length+(o.hasOptionLabel()?1:0),l=r(o._word,o._last),d=o.selectedIndex;for(d===-1?d=0:(d+=l?1:0,d=i(d,s)),a=a.toJSON?a.toJSON():a.slice(),a=o._shuffleData(a,d),n=0;n-1&&(t-=1):a.hasClass("k-list-optionlabel")&&(t=-1)),o){for(n=this.dataSource.flatView(),r=0;r
      ',this.filterInput=e('').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.list.prepend(e('').append(this.filterInput.add(t))))},_span:function(){var t,n=this,i=n.wrapper,r="span.k-input";t=i.find(r),t[0]||(i.append(' ').append(n.element),t=i.find(r)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-select"),n._arrowIcon=n._arrow.find(".k-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),n.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;if(n=n?o.template(n):e.proxy(o.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=n,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(i){throw Error(T)}},_textAccessor:function(n){var i,r=null,o=this.valueTemplate,a=this._optionLabelText(),s=this.span;if(n===t)return s.text();e.isPlainObject(n)||n instanceof c?r=n:a&&a===n&&(r=this.options.optionLabel),r||(r=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(r!==a&&this._text(r)!==a||(o=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(r=a))),i=function(){return{elements:s.get(),data:[{dataItem:r}]}},this.angular("cleanup",i);try{s.html(o(r))}catch(l){s.html("")}this.angular("compile",i)},_preselect:function(e,t){e||t||(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var i=this.options.dataTextField,r={};return i?(n(r,i.split("."),e),n(r,this.options.dataValueField.split("."),t),r=new c(r)):r=e,r}});a.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.List,o=i.Select,a=n.caret,s=n.support,l=s.placeholder,d=n._activeElement,u=n.keys,c=".kendoComboBox",h="click"+c,p="mousedown"+c,f="disabled",m="readonly",g="change",v="k-i-loading",_="k-state-default",b="k-state-focused",k="k-state-disabled",w="aria-disabled",y="filter",x="accept",C="rebind",T="mouseenter"+c+" mouseleave"+c,S=e.proxy,D=/(\r\n|\n|\r)/gm,F=o.extend({init:function(t,i){var r,a,s=this;s.ns=c,i=e.isArray(i)?{dataSource:i}:i,o.fn.init.call(s,t,i),i=s.options,t=s.element.on("focus"+c,S(s._focusHandler,s)),i.placeholder=i.placeholder||t.attr("placeholder"),s._reset(),s._wrapper(),s._input(),s._clearButton(),s._tabindex(s.input),s._popup(),s._dataSource(),s._ignoreCase(),s._enable(),s._oldIndex=s.selectedIndex=-1,s._aria(),s._initialIndex=i.index,s.requireValueMapper(s.options),s._initList(),s._cascade(),i.autoBind?s._filterSource():(r=i.text,!r&&s._isSelect&&(r=t.children(":selected").text()),r&&s._setText(r)),r||s._placeholder(),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),n.notify(s),s._toggleCloseVisibility()},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:1,enforceMinLength:!1,height:200,highlightFirst:!0,filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){var t=this._listOptions(e);o.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._clearButton()},destroy:function(){var e=this;e.input.off(c),e.element.off(c),e._inputWrapper.off(c),clearTimeout(e._pasteTimeout),e._arrow.off(h+" "+p),e._clear.off(h+" "+p),o.fn.destroy.call(e)},_change:function(){var e=this,n=e.text(),i=n&&n!==e._oldText&&n!==e.options.placeholder,r=e.selectedIndex,a=r===-1;return!e.options.syncValueAndText&&!e.value()&&a&&i?(e._old="",e._oldIndex=r,e._oldText=n,e._typing||e.element.trigger(g),e.trigger(g),e._typing=!1,t):(o.fn._change.call(e),e._toggleCloseVisibility(),t)},_focusHandler:function(){this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(b),this._placeholder(!1)},_inputFocusout:function(){var e,n,i=this,r=i.value();return i._userTriggered=!0,i._inputWrapper.removeClass(b),clearTimeout(i._typingTimeout),i._typingTimeout=null,i.text(i.text()),e=i._focus(),n=this.listView.dataItemByIndex(this.listView.getElementIndex(e)),r!==i.value()&&i.trigger("select",{dataItem:n,item:e})?(i.value(r),t):(i._placeholder(),i._blur(),i.element.blur(),t)},_inputPaste:function(){var e=this;clearTimeout(e._pasteTimeout),e._pasteTimeout=null,e._pasteTimeout=setTimeout(function(){e.search()})},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._inputWrapper.off(c),o=t.element.add(t.input.off(c)),a=t._arrow.off(h+" "+p),s=t._clear;i||n?(r.addClass(n?k:_).removeClass(n?_:k),o.attr(f,n).attr(m,i).attr(w,n)):(r.addClass(_).removeClass(k).on(T,t._toggleHover),o.removeAttr(f).removeAttr(m).attr(w,!1),a.on(h,S(t._arrowClick,t)).on(p,function(e){e.preventDefault()}),s.on(h,S(t._clearValue,t)).on(p,function(e){e.preventDefault()}),t.input.on("keydown"+c,S(t._keydown,t)).on("focus"+c,S(t._inputFocus,t)).on("focusout"+c,S(t._inputFocusout,t)).on("paste"+c,S(t._inputPaste,t)))},open:function(){var e=this,t=e._state,n=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0;e.popup.visible()||(!e.listView.bound()&&t!==y||t===x?(e._open=!0,e._state=C,1!==e.options.minLength&&!e.value()||n&&e.selectedIndex===-1?(e.refresh(),e._openPopup(),e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual&&e._focusItem()))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",S(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var e=this,n=e.options.text,i=e.options.value;e.listView.isFiltered()||(e.selectedIndex===-1?(n!==t&&null!==n||(n=i),e._accessor(i),e.input.val(n||e.input.val()),e._placeholder()):e._oldIndex===-1&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var n,i=this;i._isSelect&&(n=i._customOption,i._state===C&&(i._state=""),i._customOption=t,i._options(e,"",i.value()),n&&n[0].selected&&i._custom(n.val()))},_updateSelection:function(){var n,i=this,r=i.listView,o=i._initialIndex,a=null!==o&&o>-1,s=i._state===y;return s?(e(r.focus()).removeClass("k-state-selected"),t):(i._fetch||(r.value().length||(a?i.select(o):i._accessor()&&r.value(i._accessor())),i._initialIndex=null,n=r.selectedDataItems()[0],n&&(i._value(n)!==i.value()&&i._custom(i._value(n)),i.text()&&i.text()!==i._text(n)&&i._selectValue(n))),t)},_updateItemFocus:function(){var e=this.listView;this.options.highlightFirst?e.focus()||e.focusIndex()||e.focus(0):e.focus(-1)},_listBound:function(){var e=this,n=e.input[0]===d(),i=e.dataSource.flatView(),r=e.listView.skip(),o=i.length,a=e.dataSource._group?e.dataSource._group.length:0,s=r===t||0===r;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!o),e._toggleHeader(!!a&&!!o),e._resizePopup(),e.popup.position(),e._buildOptions(i),e._makeUnselectable(),e._updateSelection(),i.length&&s&&(e._updateItemFocus(),e.options.suggest&&n&&e.input.val()&&e.suggest(i[0])),e._open&&(e._open=!1,e._typingTimeout&&!n?e.popup.close():e.toggle(e._allowOpening()),e._typingTimeout=null),e._hideBusy(),e.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(e){var t,n,i;if("function"==typeof e){for(t=this.dataSource.flatView(),i=0;i-1&&(s+=e.substring(n+s.length))):s=s.substring(0,l),s.length===l&&e||(o.value=s,o===d()&&a(o,l,s.length)),t)},text:function(e){var n,i,o,a,s,l;return e=null===e?"":e,n=this,i=n.input[0],o=n.options.ignoreCase,a=e,e===t?i.value:n.options.autoBind!==!1||n.listView.bound()?(s=n.dataItem(),s&&n._text(s).replace&&n._text(s).replace(D,"")===e&&(l=n._value(s),l===r.unifyType(n._old,typeof l))?(n._triggerCascade(),t):(o&&(a=a.toLowerCase()),n._select(function(e){return e=n._text(e),o&&(e=(e+"").toLowerCase()),e===a}).done(function(){n.selectedIndex<0&&(i.value=e,n.options.syncValueAndText&&n._accessor(e),n._cascadeTriggered=!0,n._triggerCascade()),n._prev=i.value}),t)):(n._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,r=n.listView;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n._toggleCloseVisibility(),n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),e===i.value&&n.input.val()===i.text||(n._accessor(e),n._isFilterEnabled()&&r.bound()&&r.isFiltered()?n._clearFilter():n._fetchData(),r.value(e).done(function(){n.selectedIndex===-1&&(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._old=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n.input.val(),n._state===y&&(n._state=x)})),t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(v),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var n=this,i=e.item,r=n.listView.dataItemByIndex(n.listView.getElementIndex(i));return e.preventDefault(),n.trigger("select",{dataItem:r,item:i})?(n.close(),t):(n._userTriggered=!0,n._select(i).done(function(){n._blur()}),t)},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var n,i=this,r=i.options,o=i.dataSource,a=r.ignoreCase,s=function(n){var r=i._text(n);if(r!==t)return r+="",(""===r||""!==e)&&(a&&(r=r.toLowerCase()),0===r.indexOf(e))};return a&&(e=e.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(s)),n=this.listView.focus(),n&&(r.suggest&&i.suggest(n),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(o.one(g,function(){o.view()[0]&&i.search(e)}).fetch(),t)},_input:function(){var t,n,i=this,r=i.element.removeClass("k-input")[0],o=r.accessKey,a=i.wrapper,s="input.k-input",d=r.name||"";d&&(d='name="'+d+'_input" '),t=a.find(s),t[0]||(a.append('').append(i.element),t=a.find(s)),t[0].style.cssText=r.style.cssText,t[0].title=r.title,n=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),n>-1&&(t[0].maxLength=n),t.addClass(r.className).css({width:"",height:r.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),l&&t.attr("placeholder",i.options.placeholder),o&&(r.accessKey="",t[0].accessKey=o),i._focused=i.input=t,i._inputWrapper=e(a[0].firstChild),i._arrow=a.find(".k-select").attr({role:"button",tabIndex:-1}),i._arrowIcon=i._arrow.find(".k-icon"),r.id&&i._arrow.attr("aria-controls",i.ul[0].id)},_clearButton:function(){r.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t=this,n=e.keyCode;t._last=n,clearTimeout(t._typingTimeout),t._typingTimeout=null,n===u.HOME?t._firstItem():n===u.END?t._lastItem():n==u.TAB||t._move(e)?n!==u.ESC||t.popup.visible()||t._clearValue():t._search()},_placeholder:function(e){if(!l){var n,i=this,r=i.input,o=i.options.placeholder;if(o){if(n=i.value(),e===t&&(e=!n),r.toggleClass("k-readonly",e),!e){if(n)return;o=""}r.val(o),o||r[0]!==d()||a(r[0],0,0)}}},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e.text();e._prev!==t&&(e._prev=t,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(t),e._toggleCloseVisibility()),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("").parent(),n[0].style.cssText=t[0].style.cssText),e.wrapper=n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")},_clearSelection:function(e,t){var n=this,i=e.value(),r=i&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!i||r)&&(n.options.value="",n.value(""))},_preselect:function(e,t){this.input.val(t),this._accessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._placeholder(),this._initialIndex=null,this._presetValue=!0,this._toggleCloseVisibility()}}); i.plugin(F)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multiselect.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t){var n;if(null===e&&null!==t||null!==e&&null===t)return!1;if(n=e.length,n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0}var i=window.kendo,r=i.ui,o=r.List,a=e.extend({A:65},i.keys),s=i._activeElement,l=i.data.ObservableArray,d=e.proxy,u="id",c="li",h="accept",p="filter",f="rebind",m="open",g="close",v="change",_="progress",b="select",k="deselect",w="aria-disabled",y="k-state-focused",x="k-state-selected",C="k-hidden",T="k-state-hover",S="k-state-disabled",D="disabled",F="readonly",E=".kendoMultiSelect",A="click"+E,I="keydown"+E,R="mouseenter"+E,M="mouseleave"+E,z=R+" "+M,H=/"/g,N=e.isArray,B=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],P=o.extend({init:function(t,n){var r,a,s=this;s.ns=E,o.fn.init.call(s,t,n),s._optionsMap={},s._customOptions={},s._wrapper(),s._tagList(),s._input(),s._textContainer(),s._loader(),s._clearButton(),s._tabindex(s.input),t=s.element.attr("multiple","multiple").hide(),n=s.options,n.placeholder||(n.placeholder=t.data("placeholder")),r=t.attr(u),r&&(s._tagID=r+"_tag_active",r+="_taglist",s.tagList.attr(u,r)),s._aria(r),s._dataSource(),s._ignoreCase(),s._popup(),s._tagTemplate(),s.requireValueMapper(s.options),s._initList(),s._reset(),s._enable(),s._placeholder(),n.autoBind?s.dataSource.fetch():n.value&&s._preselect(n.value),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),i.notify(s),s._toggleCloseVisibility()},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0},events:[m,g,v,b,k,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),this.persistTagList=!1,this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(e){var t=this._listOptions(e);o.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(u)),this._tagTemplate(),this._placeholder(),this._clearButton()},currentTag:function(e){var n=this;return e===t?n._currentTag:(n._currentTag&&(n._currentTag.removeClass(y).removeAttr(u),n.input.removeAttr("aria-activedescendant")),e&&(e.addClass(y).attr(u,n._tagID),n.input.attr("aria-activedescendant",n._tagID)),n._currentTag=e,t)},dataItems:function(){return this.listView.selectedDataItems()},destroy:function(){var e=this,t=e.ns;clearTimeout(e._busy),clearTimeout(e._typingTimeout),e.wrapper.off(t),e.tagList.off(t),e.input.off(t),e._clear.off(t),o.fn.destroy.call(e)},_activateItem:function(){o.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var n=this,r=o.fn._listOptions.call(n,e.extend(t,{selectedItemChange:d(n._selectedItemChange,n),selectable:"multiple"})),a=this.options.itemTemplate||this.options.template,s=r.itemTemplate||a||r.template;return s||(s="#:"+i.expr(r.dataTextField,"data")+"#"),r.template=s,r},_setListValue:function(){o.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n,i=this.dataSource.flatView(),r=this._optionsMap,o=this._value;for(this._state===f&&(this._state=""),n=0;no&&(e=e.slice(0,o)),a&&n._clearFilter(),i.value(e),n._old=i.value(),a||n._fetchData(),t)},_preselect:function(t,n){var r=this;N(t)||t instanceof i.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof i.data.ObservableObject||!r.options.dataValueField)&&(r.dataSource.data(t),r.value(n||r._initialValues),r._retrieveData=!0)},_setOption:function(e,t){var n=this.element[0].children[this._optionsMap[e]];n&&(n.selected=t)},_fetchData:function(){var e=this,t=!!e.dataSource.view().length,n=0===e.listView.value().length;n||e._request||(e._retrieveData||!e._fetch&&!t)&&(e._fetch=!0,e._retrieveData=!1,e.dataSource.read().done(function(){e._fetch=!1}))},_isBound:function(){return this.listView.bound()&&!this._retrieveData},_dataSource:function(){var e=this,t=e.element,n=e.options,r=n.dataSource||{};r=N(r)?{data:r}:r,r.select=t,r.fields=[{field:n.dataTextField},{field:n.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=d(e._showBusy,e),e._errorHandler=d(e._hideBusy,e)),e.dataSource=i.data.DataSource.create(r).bind(_,e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initialValues),t._placeholder()})},t._form=r.on("reset",t._resetHandler))},_initValue:function(){var e=this.options.value||this.element.val();this._old=this._initialValues=this._normalizeValues(e)},_normalizeValues:function(t){var n=this;return null===t?t=[]:t&&e.isPlainObject(t)?t=[n._value(t)]:t&&e.isPlainObject(t[0])?t=e.map(t,function(e){return n._value(e)}):N(t)||t instanceof l?N(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();n(t,e._old)||(e._old=t.slice(),e.trigger(v),e.element.trigger(v)),e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item;e.preventDefault(),t._select(n).done(function(){t._activeItem=n,t._change(),t._close()})},_getActiveItem:function(){return this._activeItem||e(this.listView.items()[this._getSelectedIndices().length-1])||this.listView.focus()},_getSelectedIndices:function(){return this.listView._selectedIndices||this.listView._selectedIndexes},_keydown:function(n){var r,o,s,l,d=this,u=n.keyCode,c=d._currentTag,p=d.listView,f=d.input.val(),m=i.support.isRtl(d.wrapper),g=d.popup.visible(),_=0;if(u===a.DOWN){if(n.preventDefault(),!g)return d.open(),p.focus()||p.focusFirst(),t;p.focus()?(!d._activeItem&&n.shiftKey&&(d._activeItem=p.focus(),_=-1),r=p.getElementIndex(d._getActiveItem()[0]),p.focusNext(),p.focus()?n.shiftKey&&d._selectRange(r,p.getElementIndex(p.focus()[0])+_):p.focusLast()):p.focusFirst()}else if(u===a.UP)g&&(!d._activeItem&&n.shiftKey&&(d._activeItem=p.focus(),_=1),r=p.getElementIndex(d._getActiveItem()[0]),p.focusPrev(),p.focus()?n.shiftKey&&d._selectRange(r,p.getElementIndex(p.focus()[0])+_):d.close()),n.preventDefault();else if(u===a.LEFT&&!m||u===a.RIGHT&&m)f||(c=c?c.prev():e(d.tagList[0].lastChild),c[0]&&d.currentTag(c));else if(u===a.RIGHT&&!m||u===a.LEFT&&m)!f&&c&&(c=c.next(),d.currentTag(c[0]?c:null));else if(n.ctrlKey&&u===a.A&&g)this._getSelectedIndices().length===p.items().length&&(d._activeItem=null),p.items().length&&d._selectRange(0,p.items().length-1);else if(u===a.ENTER&&g)d._select(p.focus()).done(function(){d._change(),d._close()}),n.preventDefault();else if(u===a.SPACEBAR&&n.ctrlKey&&g)d._activeItem&&p.focus()&&p.focus()[0]===d._activeItem[0]&&(d._activeItem=null),e(p.focus()).hasClass(x)||(d._activeItem=p.focus()),d._select(p.focus()).done(function(){d._change()}),n.preventDefault();else if(u===a.SPACEBAR&&n.shiftKey&&g)o=p.getElementIndex(d._getActiveItem()),s=p.getElementIndex(p.focus()),o!==t&&s!==t&&d._selectRange(o,s),n.preventDefault();else if(u===a.ESC)g?n.preventDefault():(d.tagList.children().each(function(t,n){d._removeTag(e(n),!1)}),d.trigger(v)),d.close();else if(u===a.HOME)g?p.focus()?(n.ctrlKey&&n.shiftKey&&d._selectRange(p.getElementIndex(p.focus()[0]),0),p.focusFirst()):d.close():f||(c=d.tagList[0].firstChild,c&&d.currentTag(e(c)));else if(u===a.END)g?p.focus()?(n.ctrlKey&&n.shiftKey&&d._selectRange(p.getElementIndex(p.focus()[0]),p.element.children().length-1),p.focusLast()):d.close():f||(c=d.tagList[0].lastChild,c&&d.currentTag(e(c)));else if(u!==a.DELETE&&u!==a.BACKSPACE||f)!d.popup.visible()||u!==a.PAGEDOWN&&u!==a.PAGEUP?(clearTimeout(d._typingTimeout),setTimeout(function(){d._scale()}),d._search()):(n.preventDefault(),l=u===a.PAGEDOWN?1:-1,p.scrollWith(l*p.screenHeight()));else{if(d._state=h,"single"===d.options.tagMode)return p.value([]),d._change(),d._close(),t;u!==a.BACKSPACE||c||(c=e(d.tagList[0].lastChild)),c&&c[0]&&d._removeTag(c,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr("aria-busy",!1),e._loading.addClass(C),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(C),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(d(e._showBusyHandler,e),100))},_placeholder:function(e,n){var r=this,o=r.input,a=s(),l=r.options.placeholder,d=o.val(),u=o[0]===a,c=d.length;u&&!r.options.autoClose&&d!==l||(c=0,d=""),e===t&&(e=!1,o[0]!==a&&(e=!r.listView.selectedDataItems()[0])),r._prev=d,o.toggleClass("k-readonly",e).val(e?l:d),u&&!n&&i.caret(o[0],c,c),r._scale()},_scale:function(){var e,t=this,n=t.wrapper.find(".k-multiselect-wrap"),i=n.width(),r=t._span.text(t.input.val());n.is(":visible")?e=r.width()+25:(r.appendTo(document.documentElement),i=e=r.width()+25,r.appendTo(n)),t.input.width(e>i?i:e)},_option:function(e,n,r){var o=""},_render:function(e){var t,n,i,r,o,a,s=this.listView.selectedDataItems(),l=this.listView.value(),d=e.length,u="";for(l.length!==s.length&&(s=this._buildSelectedItems(l)),o={},a={},r=0;rthis.listView.value().length},_angularTagItems:function(t){var n=this;n.angular(t,function(){return{elements:n.tagList[0].children,data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})},updatePersistTagList:function(e,t){this.persistTagList=(!this.persistTagList.added||this.persistTagList.added.length!==t.length||!this.persistTagList.removed||this.persistTagList.removed.length!==e.length)&&{added:e,removed:t}},_selectValue:function(e,n){var i,r,o,a=this,s=a.value(),l=a.dataSource.total(),d=a.tagList,u=a._value;if(this.persistTagList)return this.updatePersistTagList(e,n),t;if(a._angularTagItems("cleanup"),"multiple"===a.options.tagMode){for(o=n.length-1;o>-1;o--)i=n[o],d[0].removeChild(d[0].children[i.position]),a._setOption(u(i.dataItem),!1);for(o=0;o-1;o--)a._setOption(u(n[o].dataItem),!1);for(o=0;o=i;r--)u.push(r);for(null!==l&&u.length>l&&(u=u.slice(0,l)),r=0;r').appendTo(t._innerWrapper)),n.removeAttr("accesskey"),t._focused=t.input=r.attr({accesskey:i,autocomplete:"off",role:"listbox",title:n[0].title,"aria-expanded":!1})},_tagList:function(){var t=this,n=t._innerWrapper.children("ul");n[0]||(n=e('
        ').appendTo(t._innerWrapper)),t.tagList=n},_tagTemplate:function(){var e,t=this,n=t.options,r=n.tagTemplate,o=n.dataSource,a="multiple"===n.tagMode;t.element[0].length&&!o&&(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"),e=a?i.template("#:"+i.expr(n.dataTextField,"data")+"#",{useWithBlock:!1}):i.template("#:values.length# item(s) selected"),t.tagTextTemplate=r=r?i.template(r):e,t.tagTemplate=function(e){return'
      • '+r(e)+'
      • '}},_loader:function(){this._loading=e('').insertAfter(this.input)},_clearButton:function(){o.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-multiselect-clearable"))},_textContainer:function(){var t=i.getComputedStyles(this.input[0],B);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=e("").css(t).appendTo(this.wrapper)},_wrapper:function(){var t=this,n=t.element,i=n.parent("span.k-multiselect");i[0]||(i=n.wrap('
        ').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('
        ').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display",""),t._innerWrapper=e(i[0].firstChild)}});r.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.slider.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e,t,n){var i=n?" k-slider-horizontal":" k-slider-vertical",r=e.style?e.style:t.attr("style"),o=t.attr("class")?" "+t.attr("class"):"",a="";return"bottomRight"==e.tickPlacement?a=" k-slider-bottomright":"topLeft"==e.tickPlacement&&(a=" k-slider-topleft"),r=r?" style='"+r+"'":"","
        "}function i(e,t,n,i){var r="";return r=n?!i&&"increase"==t||i&&"increase"!=t?"k-i-arrow-60-right":"k-i-arrow-60-left":"increase"==t?"k-i-arrow-60-up":"k-i-arrow-60-down",""}function r(e,t){var n,i="
          ",r=T.floor(u(t/e.smallStep))+1;for(n=0;n ";return i+="
        "}function o(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return"
        Drag"+(n>1?"Drag":"")+"
        "}function a(e){return function(t){return t+e}}function s(e){return function(){return e}}function l(e){return(e+"").replace(".",m.cultures.current.numberFormat["."])}function d(e){var t=""+e,n=0;return t=t.split("."),t[1]&&(n=t[1].length),n=n>10?10:n}function u(e){var t,n;return e=parseFloat(e,10),t=d(e),n=T.pow(10,t||0),T.round(e*n)/n}function c(e,n){var i=y(e.getAttribute(n));return null===i&&(i=t),i}function h(e){return typeof e!==Q}function p(e){return 1e4*e}var f,m=window.kendo,g=m.ui.Widget,v=m.ui.Draggable,_=m._outerWidth,b=m._outerHeight,k=e.extend,w=m.format,y=m.parseFloat,x=e.proxy,C=e.isArray,T=Math,S=m.support,D=S.pointers,F=S.msPointers,E="change",A="slide",I=".slider",R="touchstart"+I+" mousedown"+I,M=D?"pointerdown"+I:F?"MSPointerDown"+I:R,z="touchend"+I+" mouseup"+I,H=D?"pointerup":F?"MSPointerUp"+I:z,N="moveSelection",B="keydown"+I,P="click"+I,L="mouseover"+I,O="focus"+I,V="blur"+I,W=".k-draghandle",U=".k-slider-track",q=".k-tick",j="k-state-selected",G="k-state-focused",$="k-state-default",K="k-state-disabled",Y="disabled",Q="undefined",X="tabindex",J=m.getTouches,Z=g.extend({init:function(e,t){var n,i=this;if(g.fn.init.call(i,e,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&m.support.isRtl(e),i._position=i._isHorizontal?"left":"bottom",i._sizeFn=i._isHorizontal?"width":"height",i._outerSize=i._isHorizontal?_:b,t.tooltip.format=t.tooltip.enabled?t.tooltip.format||"{0}":"{0}",t.smallStep<=0)throw Error("Kendo UI Slider smallStep must be a positive number.");i._createHtml(),i.wrapper=i.element.closest(".k-slider"),i._trackDiv=i.wrapper.find(U),i._setTrackDivWidth(),i._maxSelection=i._trackDiv[i._sizeFn](),i._sliderItemsInit(),i._reset(),i._tabindex(i.wrapper.find(W)),i[t.enabled?"enable":"disable"](),n=m.support.isRtl(i.wrapper)?-1:1,i._keyMap={37:a(-1*n*t.smallStep),40:a(-t.smallStep),39:a(1*n*t.smallStep),38:a(+t.smallStep),35:s(t.max),36:s(t.min),33:a(+t.largeStep),34:a(-t.largeStep)},m.notify(i)},events:[E,A],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return u(this.options.max-this.options.min)},_resize:function(){this._setTrackDivWidth(),this.wrapper.find(".k-slider-items").remove(),this._maxSelection=this._trackDiv[this._sizeFn](),this._sliderItemsInit(),this._refresh(),this.options.enabled&&this.enable(!0)},_sliderItemsInit:function(){var t=this,n=t.options,i=t._maxSelection/((n.max-n.min)/n.smallStep),o=t._calculateItemsWidth(T.floor(t._distance()/n.smallStep));"none"!=n.tickPlacement&&i>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(r(n,t._distance())),t._setItemsWidth(o),t._setItemsTitle()),t._calculateSteps(o),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.smallStep&&t._setItemsLargeTick()},getSize:function(){return m.dimensions(this.wrapper)},_setTrackDivWidth:function(){var e=this,t=2*parseFloat(e._trackDiv.css(e._isRtl?"right":e._position),10);e._trackDiv[e._sizeFn](e.wrapper[e._sizeFn]()-2-t)},_setItemsWidth:function(t){var n,i=this,r=i.options,o=0,a=t.length-1,s=i.wrapper.find(q),l=0,d=2,u=s.length,c=0;for(n=0;n=3)for(r._isHorizontal||r._isRtl||(a=e.makeArray(a).reverse()),s=0;s"+t.attr("title")+""),0!==s&&s!==a.length-1&&t.css("line-height",t[r._sizeFn]()+"px"))},_calculateItemsWidth:function(e){var t,n,i,r=this,o=r.options,a=parseFloat(r._trackDiv.css(r._sizeFn))+1,s=r._distance(),l=a/s;for(s/o.smallStep-T.floor(s/o.smallStep)>0&&(a-=s%o.smallStep*l),t=a/e,n=[],i=0;i=i.min&&e<=i.max&&i.value!=e&&(n.element.prop("value",l(e)),i.value=e,n._refreshAriaAttr(e),n._refresh()),t)},_refresh:function(){this.trigger(N,{value:this.options.value})},_refreshAriaAttr:function(e){var t,n=this,i=n._drag;t=i&&i._tooltipDiv?i._tooltipDiv.text():n._getFormattedValue(e,null),this.wrapper.find(W).attr("aria-valuenow",e).attr("aria-valuetext",t)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer); },_keydown:function(e){var t=this;e.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[e.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),e.preventDefault())},_setValueInRange:function(e){var n=this,i=n.options;return e=u(e),isNaN(e)?(n._update(i.min),t):(e=T.max(T.min(e,i.max),i.min),n._update(e),t)},_nextValueByIndex:function(e){var t=this._values.length;return this._isRtl&&(e=t-1-e),this._values[T.max(0,T.min(e,t-1))]},_formResetHandler:function(){var e=this,t=e.options.min;setTimeout(function(){var n=e.element[0].value;e.value(""===n||isNaN(n)?t:n)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(I).find(".k-button").off(I).end().find(W).off(I).end().find(q+", "+U).off(I).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});ee.Selection=function(e,t,n){function i(i){var r=i-n.min,o=t._valueIndex=T.ceil(u(r/n.smallStep)),a=parseInt(t._pixelSteps[o],10),s=t._trackDiv.find(".k-slider-selection"),l=parseInt(t._outerSize(e)/2,10),d=t._isRtl?2:0;s[t._sizeFn](t._isRtl?t._maxSelection-a:a),e.css(t._position,a-l-d)}i(n.value),t.bind([A,N],function(e){i(parseFloat(e.value,10))}),t.bind(E,function(e){i(parseFloat(e.sender.value(),10))})},ee.Drag=function(e,t,n,i){var r=this;r.owner=n,r.options=i,r.element=e,r.type=t,r.draggable=new v(e,{distance:0,dragstart:x(r._dragstart,r),drag:x(r.drag,r),dragend:x(r.dragend,r),dragcancel:x(r.dragcancel,r)}),e.click(!1)},ee.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(n){var i=this,r=i.owner,o=i.options;return o.enabled?(this.owner._activeDragHandle=this,r.element.off(L),r.wrapper.find("."+G).removeClass(G+" "+j),i.element.addClass(G+" "+j),e(document.documentElement).css("cursor","pointer"),i.dragableArea=r._getDraggableArea(),i.step=T.max(o.smallStep*(r._maxSelection/r._distance()),0),i.type?(i.selectionStart=o.selectionStart,i.selectionEnd=o.selectionEnd,r._setZIndex(i.type)):i.oldVal=i.val=o.value,i._removeTooltip(!0),i._createTooltip(),t):(n.preventDefault(),t)},_createTooltip:function(){var t,n,i=this,r=i.owner,o=i.options.tooltip,a="",s=e(window);o.enabled&&(o.template&&(t=i.tooltipTemplate=m.template(o.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("
        ").appendTo(document.body),a=r._getFormattedValue(i.val||r.value(),i),i.type||(n="k-callout-"+(r._isHorizontal?"s":"e"),i.tooltipInnerDiv="
        ",a+=i.tooltipInnerDiv),i.tooltipDiv.html(a),i._scrollOffset={top:s.scrollTop(),left:s.scrollLeft()},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,r=e.x.location,o=e.y.location,a=n.dragableArea.startPoint,s=n.dragableArea.endPoint;e.preventDefault(),n.val=i._isHorizontal?i._isRtl?n.constrainValue(r,a,s,r=s):n.constrainValue(o,s,a,o<=s),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.selectionStart=n.valn.selectionStart?n.selectionEnd=n.val:n.selectionStart=n.selectionEnd=n.val,t={values:[n.selectionStart,n.selectionEnd],value:[n.selectionStart,n.selectionEnd]}):t={value:n.val},i.trigger(A,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n=t.options,i=n.tooltip,r="";i.enabled&&(t.tooltipDiv||t._createTooltip(),r=t.owner._getFormattedValue(u(e),t),t.type||(r+=t.tooltipInnerDiv),t.tooltipDiv.html(r),t.moveTooltip())},dragcancel:function(){return this.owner._refresh(),e(document.documentElement).css("cursor",""),this._end()},dragend:function(){var t=this,n=t.owner;return e(document.documentElement).css("cursor",""),t.type?n._update(t.selectionStart,t.selectionEnd):(n._update(t.val),t.draggable.userEvents._disposeAll()),t.draggable.userEvents.cancel(),t._end()},_end:function(){var e=this,t=e.owner;return t._focusWithMouse(e.element),t.element.on(L),!1},_removeTooltip:function(t){var n=this,i=n.owner;n.tooltipDiv&&i.options.tooltip.enabled&&i.options.enabled&&(t?(n.tooltipDiv.remove(),n.tooltipDiv=null):n.tooltipDiv.fadeOut("slow",function(){e(this).remove(),n.tooltipDiv=null}))},moveTooltip:function(){var t,n,i,r,o=this,a=o.owner,s=0,l=0,d=o.element,u=m.getOffset(d),c=8,h=e(window),p=o.tooltipDiv.find(".k-callout"),f=_(o.tooltipDiv),g=b(o.tooltipDiv);o.type?(t=a.wrapper.find(W),u=m.getOffset(t.eq(0)),n=m.getOffset(t.eq(1)),a._isHorizontal?(s=n.top,l=u.left+(n.left-u.left)/2):(s=u.top+(n.top-u.top)/2,l=n.left),r=_(t.eq(0))+2*c):(s=u.top,l=u.left,r=_(d)+2*c),a._isHorizontal?(l-=parseInt((f-a._outerSize(d))/2,10),s-=g+p.height()+c):(s-=parseInt((g-a._outerSize(d))/2,10),l-=f+p.width()+c),a._isHorizontal?(i=o._flip(s,g,r,b(h)+o._scrollOffset.top),s+=i,l+=o._fit(l,f,_(h)+o._scrollOffset.left)):(i=o._flip(l,f,r,_(h)+o._scrollOffset.left),s+=o._fit(s,g,b(h)+o._scrollOffset.top),l+=i),i>0&&p&&(p.removeClass(),p.addClass("k-callout k-callout-"+(a._isHorizontal?"n":"w"))),o.tooltipDiv.css({top:s,left:l})},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i){var r=0;return e+t>i&&(r+=-(n+t)),e+r<0&&(r+=n+t),r},constrainValue:function(e,t,n,i){var r=this,o=0;return o=tr.selectionEnd?(d=o.selectionStart,u=s,c=r._lastHandleDrag):s-o.selectionStart<=o.selectionEnd-s?(d=s,u=o.selectionEnd,c=r._firstHandleDrag):(d=o.selectionStart,u=s,c=r._lastHandleDrag),c.dragstart(n),r._setValueInRange(d,u),r._focusWithMouse(c.element)}},r.wrapper.find(q+", "+U).on(M,i).end().on(M,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(H,function(){r._activeDragHandle&&r._activeDragHandle._end()}),r.wrapper.find(W).attr(X,0).on(z,function(){r._setTooltipTimeout()}).on(P,function(e){r._focusWithMouse(e.target),e.preventDefault()}).on(O,x(r._focus,r)).on(V,x(r._blur,r)),r.wrapper.find(W).off(B,m.preventDefault).eq(0).on(B,x(function(e){this._keydown(e,"firstHandle")},r)).end().eq(1).on(B,x(function(e){this._keydown(e,"lastHandle")},r)),r.options.enabled=!0)},disable:function(){var e=this;e.wrapper.removeClass($).addClass(K),e.wrapper.find("input").prop(Y,Y),e.wrapper.find(q+", "+U).off(M).off(H),e.wrapper.find(W).attr(X,-1).off(z).off(B).off(P).off(O).off(V),e.options.enabled=!1},_keydown:function(e,t){var n,i,r,o=this,a=o.options.selectionStart,s=o.options.selectionEnd;e.keyCode in o._keyMap&&(o._clearTooltipTimeout(),"firstHandle"==t?(r=o._activeHandleDrag=o._firstHandleDrag,a=o._keyMap[e.keyCode](a),a>s&&(s=a)):(r=o._activeHandleDrag=o._lastHandleDrag,s=o._keyMap[e.keyCode](s),a>s&&(a=s)),o._setValueInRange(u(a),u(s)),n=Math.max(a,o.options.selectionStart),i=Math.min(s,o.options.selectionEnd),r.selectionEnd=Math.max(i,o.options.selectionStart),r.selectionStart=Math.min(n,o.options.selectionEnd),r._updateTooltip(o.value()[o._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),r=i[0]!=e||i[1]!=t;n.value([e,t]),r&&n.trigger(E,{values:[e,t],value:[e,t]})},value:function(e){return e&&e.length?this._value(e[0],e[1]):this._value()},_value:function(e,n){var i=this,r=i.options,o=r.selectionStart,a=r.selectionEnd;return isNaN(e)&&isNaN(n)?[o,a]:(e=u(e),n=u(n),e>=r.min&&e<=r.max&&n>=r.min&&n<=r.max&&e<=n&&(o==e&&a==n||(i.element.find("input").eq(0).prop("value",l(e)).end().eq(1).prop("value",l(n)),r.selectionStart=e,r.selectionEnd=n,i._refresh(),i._refreshAriaAttr(e,n))),t)},values:function(e,t){return C(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(N,{values:[t.selectionStart,t.selectionEnd],value:[t.selectionStart,t.selectionEnd]}),t.selectionStart==t.max&&t.selectionEnd==t.max&&e._setZIndex("firstHandle")},_refreshAriaAttr:function(e,t){var n,i=this,r=i.wrapper.find(W),o=i._activeHandleDrag;n=i._getFormattedValue([e,t],o),r.eq(0).attr("aria-valuenow",e),r.eq(1).attr("aria-valuenow",t),r.attr("aria-valuetext",n)},_setValueInRange:function(e,t){var n=this.options;e=T.max(T.min(e,n.max),n.min),t=T.max(T.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(T.min(e,t),T.max(e,t))},_setZIndex:function(t){this.wrapper.find(W).each(function(n){e(this).css("z-index","firstHandle"==t?1-n:n)})},_formResetHandler:function(){var e=this,t=e.options;setTimeout(function(){var n=e.element.find("input"),i=n[0].value,r=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===r||isNaN(r)?t.max:r)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(I).find(q+", "+U).off(I).end().find(W).off(I),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),f.Selection=function(e,t,n){function i(i){i=i||[];var o=i[0]-n.min,a=i[1]-n.min,s=T.ceil(u(o/n.smallStep)),l=T.ceil(u(a/n.smallStep)),d=t._pixelSteps[s],c=t._pixelSteps[l],h=parseInt(t._outerSize(e.eq(0))/2,10),p=t._isRtl?2:0;e.eq(0).css(t._position,d-h-p).end().eq(1).css(t._position,c-h-p),r(d,c)}function r(e,n){var i,r,o=t._trackDiv.find(".k-slider-selection");i=T.abs(e-n),o[t._sizeFn](i),t._isRtl?(r=T.max(e,n),o.css("right",t._maxSelection-r-1)):(r=T.min(e,n),o.css(t._position,r-1))}i(t.value()),t.bind([E,A,N],function(e){i(e.values)})},m.ui.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.colorpicker.min",["kendo.core.min","kendo.color.min","kendo.popup.min","kendo.slider.min","kendo.userevents.min","kendo.button.min"],e)}(function(){return function(e,t,n){function i(e,t,n){n=u(n),n&&!n.equals(e.color())&&("change"==t&&(e._value=n),n=1!=n.a?n.toCssRgba():n.toCss(),e.trigger(t,{value:n}))}function r(e,t,n){var i,r;return e=Array.prototype.slice.call(e),i=e.length,r=e.indexOf(t),r<0?n<0?e[i-1]:e[0]:(r+=n,r<0?r+=i:r%=i,e[r])}function o(e){e.preventDefault()}function a(e,t){return function(){return e.apply(t,arguments)}}var s=window.kendo,l=s.ui,d=l.Widget,u=s.parseColor,c=s.Color,h=s.keys,p="background-color",f="k-state-selected",m="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",g="FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",v="#ffffff",_={apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:"Color Hexadecimal Code"},b=".kendoColorTools",k="click"+b,w="keydown"+b,y=s.support.browser,x=y.msie&&y.version<9,C=d.extend({init:function(e,t){var n,i=this;d.fn.init.call(i,e,t),e=i.element,t=i.options,i._value=t.value=u(t.value),i._tabIndex=e.attr("tabIndex")||0,n=i._ariaId=t.ariaId,n&&e.attr("aria-labelledby",n),t._standalone&&(i._triggerSelect=i._triggerChange)},options:{name:"ColorSelector",value:null,_standalone:!0},events:["change","select","cancel"],color:function(e){return e!==n&&(this._value=u(e),this._updateUI(this._value)),this._value},value:function(e){return e=this.color(e),e&&(e=this.options.opacity?e.toCssRgba():e.toCss()),e||null},enable:function(t){0===arguments.length&&(t=!0),e(".k-disabled-overlay",this.wrapper).remove(),t||this.wrapper.append("
        "),this._onEnable(t)},_select:function(e,t){var n=this._value;e=this.color(e),t||(this.element.trigger("change"),e.equals(n)?this._standalone||this.trigger("cancel"):this.trigger("change",{value:this.value()}))},_triggerSelect:function(e){i(this,"select",e)},_triggerChange:function(e){i(this,"change",e)},destroy:function(){this.element&&this.element.off(b),this.wrapper&&this.wrapper.off(b).find("*").off(b),this.wrapper=null,d.fn.destroy.call(this)},_updateUI:e.noop,_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}}),T=C.extend({init:function(t,n){var i,r,o,l,d=this;if(C.fn.init.call(d,t,n),t=d.wrapper=d.element,n=d.options,i=n.palette,"websafe"==i?(i=g,n.columns=18):"basic"==i&&(i=m),"string"==typeof i&&(i=i.split(",")),e.isArray(i)&&(i=e.map(i,function(e){return u(e)})),d._selectedID=(n.ariaId||s.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(d._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:d._value,id:n.ariaId}))).on(k,".k-item",function(t){d._select(e(t.currentTarget).css(p))}).attr("tabIndex",d._tabIndex).on(w,a(d._keydown,d)),r=n.tileSize){if(/number|string/.test(typeof r))o=l=parseFloat(r);else{if("object"!=typeof r)throw Error("Unsupported value for the 'tileSize' argument");o=parseFloat(r.width),l=parseFloat(r.height)}t.find(".k-item").css({width:o,height:l})}},focus:function(){this.wrapper&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.focus()},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_onEnable:function(e){e?this.wrapper.attr("tabIndex",this._tabIndex):this.wrapper.removeAttr("tabIndex")},_keydown:function(t){var n,i,a=this.wrapper,s=a.find(".k-item"),l=s.filter("."+f).get(0),d=t.keyCode;if(d==h.LEFT?n=r(s,l,-1):d==h.RIGHT?n=r(s,l,1):d==h.DOWN?n=r(s,l,this.options.columns):d==h.UP?n=r(s,l,-this.options.columns):d==h.ENTER?(o(t),l&&this._select(e(l).css(p))):d==h.ESC&&this._cancel(),n){o(t),this._current(n);try{i=u(n.css(p)),this._triggerSelect(i)}catch(c){}}},_current:function(t){this.wrapper.find("."+f).removeClass(f).attr("aria-selected",!1).removeAttr("id"),e(t).addClass(f).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var n=null;this.wrapper.find(".k-item").each(function(){var i=u(e(this).css(p));if(i&&i.equals(t))return n=this,!1}),this._current(n)},_template:s.template('
      '+e.messages.weekColumnHeader+"'+y[n]+"
      # for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # # } ## } #')}),S=C.extend({init:function(t,n){var i=this;C.fn.init.call(i,t,n),n=i.options,n.messages=n.options?e.extend(i.options.messages,n.options.messages):i.options.messages,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||u("#f00")),t.find("input.k-color-value").on(w,function(t){var n,r,o=this;if(t.keyCode==h.ENTER)try{n=u(o.value),r=i.color(),i._select(n,n.equals(r))}catch(a){e(o).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=u(o.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(k,".k-controls button.apply",function(){i.options._clearedColor?i.trigger("change"):i._select(i._getHSV())}).on(k,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),x&&i._applyIEFilter()},destroy:function(){this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,C.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,autoupdate:!0,messages:_},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element,r=i.find(".k-hue-slider"),o=i.find(".k-transparency-slider");r.attr("aria-label","hue saturation"),n._hueSlider=r.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),o.attr("aria-label","opacity"),n._opacitySlider=o.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,r=e-i.left,o=n-i.top,a=this.width,s=this.height;r=r<0?0:r>a?a:r,o=o<0?0:o>s?s:o,t._svChange(r/a,1-o/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),r=i.find(".k-draghandle").attr("tabIndex",0).on(w,a(t._keydown,t));t._hsvEvents=new s.UserEvents(i,{global:!0,press:function(t){this.offset=s.getOffset(i),this.width=i.width(),this.height=i.height(),r.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),r.focus()},move:function(t){t.preventDefault(),e.call(this,t.x.location,t.y.location)},end:function(){i.removeClass("k-dragging")}}),t._hsvRect=i,t._hsvHandle=r},_onEnable:function(e){this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),this.wrapper.find("input").attr("disabled",!e);var t=this._hsvRect.find(".k-draghandle");e?t.attr("tabIndex",this._tabIndex):t.removeAttr("tabIndex")},_keydown:function(e){function t(t,n){var r=i._getHSV();r[t]+=n*(e.shiftKey?.01:.05),r[t]<0&&(r[t]=0),r[t]>1&&(r[t]=1),i._updateUI(r),o(e)}function n(t){var n=i._getHSV();n.h+=t*(e.shiftKey?1:5),n.h<0&&(n.h=0),n.h>359&&(n.h=359),i._updateUI(n),o(e)}var i=this;switch(e.keyCode){case h.LEFT:e.ctrlKey?n(-1):t("s",-1);break;case h.RIGHT:e.ctrlKey?n(1):t("s",1);break;case h.UP:t(e.ctrlKey&&i._opacitySlider?"a":"v",1);break;case h.DOWN:t(e.ctrlKey&&i._opacitySlider?"a":"v",-1);break;case h.ENTER:i._select(i._getHSV());break;case h.F2:i.wrapper.find("input.k-color-value").focus().select();break;case h.ESC:i._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,n,i){var r=this._hsvRect,o=r.width(),a=r.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/o),null==n&&(n=1-s.top/a),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),c.fromHSV(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.attr("title",n.options.messages.previewInput),this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(p,e.toDisplay()),t||n._colorAsText.val(n._opacitySlider?e.toCssRgba():e.toCss()),n._triggerSelect(e),e=e.toHSV(),n._hsvHandle.css({left:e.s*i.width()+"px",top:(1-e.v)*i.height()+"px"}),n._hueElements.css(p,c.fromHSV(e.h,1,1,1).toCss()),n._hueSlider.value(e.h),n._opacitySlider&&n._opacitySlider.value(100*e.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:s.template('# if (preview) { #
      # if (clearButton && !_standalone) { ## } #
      # } ## if (clearButton && !_standalone && !preview) { #
      #: messages.clearColor #
      # } #
      # if (opacity) { ## } ## if (buttons) { #
      # } #')}),D=d.extend({init:function(t,n){var i,r,o,a,s,l=this;d.fn.init.call(l,t,n),n=l.options,t=l.element,i=t.attr("value")||t.val(),i=i?u(i,!0):u(n.value,!0),l._value=n.value=i,r=l.wrapper=e(l._template(n)),t.hide().after(r),t.is("input")&&(t.appendTo(r),o=t.closest("label"),a=t.attr("id"),a&&(o=o.add('label[for="'+a+'"]')),o.click(function(e){l.open(),e.preventDefault()})),l._tabIndex=t.attr("tabIndex")||0,l.enable(!t.attr("disabled")),s=t.attr("accesskey"),s&&(t.attr("accesskey",null),r.attr("accesskey",s)),l.bind("activate",function(e){e.isDefaultPrevented()||l.toggle()}),l._updateUI(i)},destroy:function(){this.wrapper.off(b).find("*").off(b),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,d.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),r=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),r.off(b).on("mousedown"+b,o),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(b),e?n.removeClass("k-state-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+b,function(){i.addClass("k-state-hover")}).on("mouseleave"+b,function(){i.removeClass("k-state-hover")}).on("focus"+b,function(){i.addClass("k-state-focused")}).on("blur"+b,function(){i.removeClass("k-state-focused")}).on(w,a(t._keydown,t)).on(k,".k-select",a(t.toggle,t)).on(k,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")}):t.close()},_template:s.template('# if (toolIcon) { ## } else { ## } #'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:_,opacity:!1,buttons:!0,preview:!0,clearButton:!1,ARIATemplate:'Current selected color is #=data || ""#'},events:["activate","change","select","open","close"],open:function(){this.element.prop("disabled")||this._getPopup().open()},close:function(){var e=this._selector&&this._selector.options||{};e._closing=!0,this._getPopup().close(),delete e._closing},toggle:function(){this.element.prop("disabled")||this._getPopup().toggle()},_noColorIcon:function(){return this.wrapper.find(".k-picker-wrap > .k-selected-color > .k-icon.k-i-line")},color:C.fn.color,value:C.fn.value,_select:C.fn._select,_triggerSelect:C.fn._triggerSelect,_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_updateUI:function(e){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=s.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(p,e?e.toDisplay():v),this._noColorIcon()[t?"hide":"show"]()},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==h.ESC?this._selector._cancel():this._selector._keydown(e),o(e)):t!=h.ENTER&&t!=h.DOWN||(this.open(),o(e))},_getPopup:function(){var t,i,r,o,a=this,l=a._popup;return l||(t=a.options,i=t.palette?T:S,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,r=s.guid(),o=a._selector=new i(e('
      ').appendTo(document.body),t),a.wrapper.attr("aria-owns",r),a._popup=l=o.wrapper.kendoPopup({anchor:a.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),o.element.find(".k-clear-color").kendoButton({icon:"reset-color",click:function(e){o.options._clearedColor=!0,a.value(null),a.element.val(null),a._updateUI(null),o._colorAsText.val(""),o._hsvHandle.css({top:"0px",left:"0px"}),o._selectedColor.css(p,v),a.trigger("change",{value:a.value()}),e.preventDefault()}}),o.bind({select:function(e){a._updateUI(u(e.value)),delete o.options._clearedColor},change:function(){o.options._clearedColor||a._select(o.color()),a.close()},cancel:function(){o.options._clearedColor&&!a.value()&&o.value()&&a._select(o.color(),!0),a.close()}}),l.bind({close:function(e){var t,i,r,s;return a.trigger("close")?(e.preventDefault(),n):(a.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=o._selectOnHide(),i=o.value(),r=a.value(),s=o.options,t?s._clearedColor&&!r||a._select(t):(setTimeout(function(){a.wrapper&&!a.wrapper.is("[unselectable='on']")&&a.wrapper.focus()}),!s._closing&&s._clearedColor&&!r&&i?a._select(i,!0):a._updateUI(a.color())),n)},open:function(e){a.trigger("open")?e.preventDefault():a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){o._select(a.color(),!0),o.focus(),a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),l}});l.plugin(T),l.plugin(S),l.plugin(D)}(jQuery,parseInt),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){var n="k-i-arrow-"+("increase"===e?"60-up":"60-down");return''}function i(e,t){var n=(""+parseFloat(e,10)).split(D);return n[1]&&(n[1]=n[1].substring(0,t)),n.join(D)}var r=window.kendo,o=r.caret,a=r.keys,s=r.ui,l=s.Widget,d=r._activeElement,u=r._extractFormat,c=r.parseFloat,h=r.support.placeholder,p=r.getCulture,f="change",m="disabled",g="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",k="touchend",w="mouseleave"+b,y="mouseenter"+b+" "+w,x="k-state-default",C="k-state-focused",T="k-state-hover",S="focus",D=".",F="k-icon",E="k-state-selected",A="k-state-disabled",I="k-state-invalid",R="aria-disabled",M=/^(-)?(\d*)$/,z=null,H=e.proxy,N=e.extend,B=l.extend({init:function(n,i){var o,a,s,d,c,h=this,p=i&&i.step!==t;l.fn.init.call(h,n,i),i=h.options,n=h.element.on("focusout"+b,H(h._focusout,h)).attr("role","spinbutton"),i.placeholder=i.placeholder||n.attr("placeholder"),h._initialOptions=N({},i),o=h.min(n.attr("min")),a=h.max(n.attr("max")),s=h._parse(n.attr("step")),i.min===z&&o!==z&&(i.min=o),i.max===z&&a!==z&&(i.max=a),p||s===z||(i.step=s),h._reset(),h._wrapper(),h._arrows(),h._validation(),h._input(),r.support.mobileOS?h._text.on(k+b+" "+S+b,function(){r.support.browser.edge?h._text.one(S+b,function(){h._toggleText(!1),n.focus()}):(h._toggleText(!1),n.focus())}):h._text.on(S+b,H(h._click,h)),n.attr("aria-valuemin",i.min!==z?i.min*i.factor:i.min).attr("aria-valuemax",i.max!==z?i.max*i.factor:i.max),i.format=u(i.format),d=i.value,h.value(d!==z?d:n.val()),c=n.is("[disabled]")||e(h.element).parents("fieldset").is(":disabled"),c?h.enable(!1):h.readonly(n.is("[readonly]")),r.notify(h)},options:{name:"NumericTextBox",decimals:z,restrictDecimals:!1,min:z,max:z,value:z,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value"},events:[f,_],_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t._text.add(n),a=t._inputWrapper.off(y);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("keypress"+b).off("keyup"+b).off("paste"+b),r||i?(a.addClass(i?A:x).removeClass(i?x:A),o.attr(m,i).attr(g,r).attr(R,i)):(a.addClass(x).removeClass(A).on(y,t._toggleHover),o.removeAttr(m).removeAttr(g).attr(R,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(E)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(E)}),t.element.on("keydown"+b,H(t._keydown,t)).on("keypress"+b,H(t._keypress,t)).on("keyup"+b,H(t._keyup,t)).on("paste"+b,H(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),l.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n,i=this;return e===t?i._value:(e=i._parse(e),n=i._adjust(e),e===n&&(i._update(e),i._old=i._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,i=n.min,r=n.max;return e===z?e:(i!==z&&er&&(e=r),e)},_arrows:function(){var t,i=this,o=function(){clearTimeout(i._spinning),t.removeClass(E)},a=i.options,s=a.spinners,l=i.element;t=l.siblings("."+F),t[0]||(t=e(n("increase",a.upArrowText)+n("decrease",a.downArrowText)).insertAfter(l),t.wrapAll('')),s||(t.parent().toggle(s),i._inputWrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0), i._upArrowEventHandler=new r.UserEvents(i._upArrow,{release:o}),i._downArrow=t.eq(1),i._downArrowEventHandler=new r.UserEvents(i._downArrow,{release:o})},_validation:function(){var t=this,n=t.element;t._validationIcon=e("").hide().insertAfter(n)},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,i,r,a=e.target,s=o(a)[0],l=a.value.substring(0,s),d=t._format(t.options.format),u=d[","],c=0;u&&(i=RegExp("\\"+u,"g"),r=RegExp("([\\d\\"+u+"]+)(\\"+d[D]+")?(\\d+)?")),r&&(n=r.exec(l)),n&&(c=n[0].replace(i,"").length,l.indexOf("(")!=-1&&t._value<0&&c++),t._focusin(),o(t.element[0],c)})},_change:function(e){var t=this,n=t.options.factor;n&&1!==n&&(e=r.parseFloat(e),null!==e&&(e/=n)),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(f),t.trigger(f)),t._typing=!1},_culture:function(e){return e||p(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(C),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(C).removeClass(T),e._blur(),e._removeInvalidState()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,i=n.options,r="k-formatted-value",o=n.element.addClass(v).show()[0],a=o.accessKey,s=n.wrapper;t=s.find(D+r),t[0]||(t=e('').insertBefore(o).addClass(r));try{o.setAttribute("type","text")}catch(l){o.type="text"}n._initialTitle=o.title,t[0].title=o.title,t[0].tabIndex=o.tabIndex,t[0].style.cssText=o.style.cssText,t.prop("placeholder",i.placeholder),a&&(t.attr("accesskey",a),o.accessKey=""),n._text=t.addClass(o.className).attr({role:"spinbutton","aria-valuemin":i.min!==z?i.min*i.factor:i.min,"aria-valuemax":i.max!==z?i.max*i.factor:i.max})},_keydown:function(e){var t=this,n=e.keyCode;t._key=n,n==a.DOWN?t._step(-1):n==a.UP?t._step(1):n==a.ENTER?t._change(t.element.val()):t._typing=!0},_keypress:function(e){var t,n,i,r,s,l,d,u,c,h,p;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===a.BACKSPACE||e.keyCode===a.ENTER||(t=this,n=t.options.min,i=t.element,r=o(i),s=r[0],l=r[1],d=String.fromCharCode(e.which),u=t._format(t.options.format),c=t._key===a.NUMPAD_DOT,h=i.val(),c&&(d=u[D]),h=h.substring(0,s)+d+h.substring(l),p=t._numericRegex(u).test(h),p&&c?(i.val(h),o(i,s+d.length),e.preventDefault()):(null!==n&&n>=0&&"-"===h.charAt(0)||!p)&&(t._addInvalidState(),e.preventDefault()),t._key=0)},_keyup:function(){this._removeInvalidState()},_addInvalidState:function(){var e=this;e._inputWrapper.addClass(I),e._validationIcon.show()},_removeInvalidState:function(){var e=this;e._inputWrapper.removeClass(I),e._validationIcon.hide()},_numericRegex:function(e){var t=this,n=e[D],i=t.options.decimals,r="*";return n===D&&(n="\\"+n),i===z&&(i=e.decimals),0===i?M:(t.options.restrictDecimals&&(r="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d"+r+")?)|("+n+"\\d"+r+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,r=t._format(t.options.format);setTimeout(function(){var e=t._parse(n.value);e===z?t._update(i):(n.value=(""+e).replace(D,r[D]),t._adjust(e)===e&&t._numericRegex(r).test(n.value)||t._update(i))})},_option:function(e,n){var i=this,r=i.element,o=i.options;return n===t?o[e]:(n=i._parse(n),(n||"step"!==e)&&(o[e]=n,r.add(i._text).attr("aria-value"+e,n),r.attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._parse(n.val())||0;d()!=n[0]&&t._focusin(),t.options.factor&&i&&(i/=t.options.factor),i+=t.options.step*e,t._update(t._adjust(i)),t._typing=!1,t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return c(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?r._round:i;return n(e,t)},_update:function(e){var t,n=this,i=n.options,o=i.factor,a=i.format,s=i.decimals,l=n._culture(),d=n._format(a,l);s===z&&(s=d.decimals),e=n._parse(e,l),t=e!==z,t&&(e=parseFloat(n._round(e,s),10)),n._value=e=n._adjust(e),n._placeholder(r.toString(e,a,l)),t?(o&&(e=parseFloat(n._round(e*o,s),10)),e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,s)),e=e.replace(D,d[D])):e=null,n.element.val(e),n.element.add(n._text).attr("aria-valuenow",e)},_placeholder:function(e){var t=this._text;t.val(e),h||e||t.val(this.options.placeholder),t.attr("title",this._initialTitle||t.val())},_wrapper:function(){var t,n=this,i=n.element,r=i[0];t=i.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=i.hide().wrap('').parent(),t=t.wrap("").parent()),t[0].style.cssText=r.style.cssText,r.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=r.on("reset",t._resetHandler))}});s.plugin(B)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filtermenu.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.dropdownlist.min","kendo.binder.min"],e)}(function(){return function(e,t){function n(t,i){t.filters&&(t.filters=e.grep(t.filters,function(e){return n(e,i),e.filters?e.filters.length:e.field!=i}))}function i(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t1?[]:n.filters?e.map(n.filters,function(e){return a(e)}):n.value!==t?[n.value]:[]}function s(e,n){for(var i,r,o=d.getter(n,!0),a=[],s=0,l={};s
      #=messages.info#
      ',T='
      #=messages.info#
      #if(values){##}else{##}##if(extra){##if(values){##}else{##}##}#
      ',S='
      #=title#
      • #=messages.info#
        • #if(extra){#
        • #}#
      ',D='
      #=title#
      • #=messages.info#
      ',F=x.extend({init:function(t,n){var i,r,o,a,s=this,l="string";x.fn.init.call(s,t,n),i=s.operators=n.operators||{},t=s.element,n=s.options,n.appendToElement||(o=t.addClass("k-with-icon k-filterable").find(".k-grid-filter"),o[0]||(o=t.prepend('').find(".k-grid-filter")),o.attr("tabindex",-1).on("click"+v,c(s._click,s))),s.link=o||e(),s.dataSource=A.create(n.dataSource),s.field=n.field||t.attr(d.attr("field")),s.model=s.dataSource.reader.model,s._parse=function(e){return null!=e?e+"":e},s.model&&s.model.fields&&(a=s.model.fields[s.field],a&&(l=a.type||"string",a.parse&&(s._parse=c(a.parse,a)))),n.values&&(l="enums"),s.type=l,i=i[l]||n.operators[l];for(r in i)break;s._defaultFilter=function(){return{field:s.field,operator:r||"eq",value:""}},s._refreshHandler=c(s.refresh,s),s.dataSource.bind(g,s._refreshHandler),n.appendToElement?s._init():s.refresh()},_init:function(){var t,n=this,i=n.options.ui,r=y(i);n.pane=n.options.pane,n.pane&&(n._isMobile=!0),r||(t=i||k[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+v,c(n._submit,n)).on("reset"+v,c(n._reset,n)),r&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.form.find("["+d.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+d.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+d.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+d.attr("role")+"=datepicker]").removeClass("k-textbox"),n.refresh(),n.trigger(p,{field:n.field,container:n.form}),d.cycleForm(n.form)},_createForm:function(t){var n=this,r=n.options,o=n.operators||{},a=n.type;o=o[a]||r.operators[a],n.form=e('
      ').html(d.template("boolean"===a?C:T)({field:n.field,format:r.format,ns:d.ns,messages:r.messages,extra:r.extra,operators:o,type:a,role:t,values:i(r.values)})),r.appendToElement?(n.element.append(n.form),n.popup=n.element.closest(".k-popup").data(h)):n.popup=n.form[h]({anchor:n.link,open:c(n._open,n),activate:c(n._activate,n),close:function(){n.options.closeCallback&&n.options.closeCallback(n.element)}}).data(h),n.form.on("keydown"+v,c(n._keydown,n))},_createMobileForm:function(t){var n=this,r=n.options,o=n.operators||{},a=n.type;o=o[a]||r.operators[a],n.form=e("
      ").html(d.template("boolean"===a?D:S)({field:n.field,title:r.title||n.field,format:r.format,ns:d.ns,messages:r.messages,extra:r.extra,operators:o,type:a,role:t,useRole:!d.support.input.date&&"date"===a||"number"===a,inputType:w[a],values:i(r.values)})),n.view=n.pane.append(n.form.html()),n.form=n.view.element.find("form"),n.view.element.on("click",".k-submit",function(e){n.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){n._closeForm(),e.preventDefault()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},n=[e._defaultFilter()],i=e._defaultFilter().operator;(e.options.extra||"isnull"!==i&&"isnotnull"!==i)&&n.push(e._defaultFilter()),e.filterModel=d.observable({logic:"and",filters:n}),e.form&&d.bind(e.form.children().first(),e.filterModel),e._bind(t)?e.link.addClass("k-state-active"):e.link.removeClass("k-state-active")},destroy:function(){var e=this;x.fn.destroy.call(e),e.form&&(d.unbind(e.form),d.destroy(e.form),e.form.unbind(v),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.unbind(v),e._refreshHandler&&(e.dataSource.unbind(g,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,n,i,r,o=this,a=e.filters,s=!1,l=0,d=o.filterModel;for(t=0,n=a.length;t1?e:s[0])):(l.filters=s,l.logic=a)),l},filter:function(e){var t=this._stripFilters(e.filters);t.length&&this.trigger("change",{filter:{logic:e.logic,filters:t},field:this.field})||(e=this._merge(e),e.filters.length&&this.dataSource.filter(e))},clear:function(){var e=this,t=e.dataSource.filter()||{filters:[]};this.trigger("change",{filter:null,field:e.field})||e._removeFilter(t)},_removeFilter:function(t){var n=this;t.filters=e.grep(t.filters,function(e){return e.filters?(e.filters=r(e.filters,n.field),e.filters.length):e.field!=n.field}),t.filters.length||(t=null),n.dataSource.filter(t)},_submit:function(t){var n,i;t.preventDefault(),t.stopPropagation(),n=this.filterModel.toJSON(),i=e.grep(n.filters,function(e){return""!==e.value}),this._checkForNullOrEmptyFilter(n)||i&&i.length?this.filter(n):this._removeFilter(n),this._closeForm()},_checkForNullOrEmptyFilter:function(e){var t,n,i;return!!(e&&e.filters&&e.filters.length)&&(t=!1,n=!1,e.filters[0]&&(i=e.filters[0].operator,t="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i),e.filters[1]&&(i=e.filters[1].operator,n="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i),!this.options.extra&&t||this.options.extra&&(t||n))},_reset:function(){this.clear(),this.options.search&&this.container&&this.container.find("label").parent().show(),this._closeForm()},_closeForm:function(){this._isMobile?this.pane.navigate("",this.options.animations.right):this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(h),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(f,{field:this.field,container:this.form})},_keydown:function(e){e.keyCode==d.keys.ESC&&this.popup.close()},events:[p,"change",f],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:_,neq:b,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty"},number:{eq:_,neq:b,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than",isnull:"Is null",isnotnull:"Is not null"},date:{eq:_,neq:b,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before",isnull:"Is null",isnotnull:"Is not null"},enums:{eq:_,neq:b,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"Show items with value that:",title:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-",operator:"Operator",value:"Value",additionalValue:"Additional value",additionalOperator:"Additional operator",logic:"Filters logic",cancel:"Cancel"},animations:{left:"slide",right:"slide:right"}}}),E=".kendoFilterMultiCheck",A=d.data.DataSource,I='
      #=title#
      #if(search){#
      #}#
      • #if(messages.selectedItemsFormat){#
        #}#
      ',R=x.extend({init:function(t,n){var i,r;x.fn.init.call(this,t,n),n=this.options,this.element=e(t),i=this.field=this.options.field||this.element.attr(d.attr("field")),r=n.checkSource,this._foreignKeyValues()?(this.checkSource=A.create(n.values),this.checkSource.fetch()):n.forceUnique?(r=e.extend(!0,{},n.dataSource.options),delete r.pageSize,this.checkSource=A.create(r),this.checkSource.reader.data=l(this.checkSource.reader.data,this.field)):this.checkSource=A.create(r),this.dataSource=n.dataSource,this.model=this.dataSource.reader.model,this._parse=function(e){return e+""},this.model&&this.model.fields&&(i=this.model.fields[this.field],i&&("number"==i.type?this._parse=function(e){return"string"==typeof e&&"null"===e.toLowerCase()?null:parseFloat(e)}:i.parse&&(this._parse=c(i.parse,i)),this.type=i.type||"string")),n.appendToElement?this._init():this._createLink(),this._refreshHandler=c(this.refresh,this),this.dataSource.bind(g,this._refreshHandler)},_createLink:function(){var e=this.element,t=e.addClass("k-with-icon k-filterable").find(".k-grid-filter");t[0]||(t=e.prepend('').find(".k-grid-filter")),this._link=t.attr("tabindex",-1).on("click"+v,c(this._click,this))},_init:function(){var e=this,t=this.options.forceUnique,n=this.options;this.pane=n.pane,this.pane&&(this._isMobile=!0),this._createForm(),this._foreignKeyValues()?this.refresh():t&&!this.checkSource.options.serverPaging&&this.dataSource.data().length?(this.checkSource.data(s(this.dataSource.data(),this.field)),this.refresh()):(this._attachProgress(),this.checkSource.fetch(function(){e.refresh.call(e)})),this.options.forceUnique||(this.checkChangeHandler=function(){e.container.empty(),e.refresh()},this.checkSource.bind(g,this.checkChangeHandler)),this.form.on("keydown"+E,c(this._keydown,this)).on("submit"+E,c(this._filter,this)).on("reset"+E,c(this._reset,this)),this.trigger(p,{field:this.field,container:this.form})},_attachProgress:function(){var e=this;this._progressHandler=function(){u.progress(e.container,!0)},this._progressHideHandler=function(){u.progress(e.container,!1)},this.checkSource.bind("progress",this._progressHandler).bind("change",this._progressHideHandler)},_input:function(){var e=this;e._clearTypingTimeout(),e._typingTimeout=setTimeout(function(){e.search()},100)},_clearTypingTimeout:function(){this._typingTimeout&&(clearTimeout(this._typingTimeout),this._typingTimeout=null)},search:function(){var e,t,n,i=this.options.ignoreCase,r=this.searchTextBox[0].value,o=this.container.find("label");for(i&&(r=r.toLowerCase()),e=0,this.options.checkAll&&o.length&&(o[0].parentNode.style.display=r?"none":"",e++);e=0?"":"none",e++},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(f,{field:this.field,container:this.form})},_createForm:function(){var t,n,i=this.options,r="";this._isMobile||(i.search&&(r+="
      "),r+="
        ",i.messages.selectedItemsFormat&&(r+="
        "+d.format(i.messages.selectedItemsFormat,0)+"
        "),r+="",r+="",this.form=e('
        ').html(r),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(t=this,t.form=e("
        ").html(d.template(I)({field:t.field,title:i.title||t.field,ns:d.ns,messages:i.messages,search:i.search})),t.view=t.pane.append(t.form.html()),t.form=t.view.element.find("form"),n=this.view.element,this.container=n.find(".k-multicheck-wrap"),n.on("click",".k-submit",function(e){t.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){t._closeForm(),e.preventDefault()})):i.appendToElement?(this.popup=this.element.closest(".k-popup").data(h),this.element.append(this.form)):this.popup=this.form.kendoPopup({anchor:this._link,activate:c(this._activate,this)}).data(h),i.search&&(this.searchTextBox=this.form.find(".k-textbox > input"),this.searchTextBox.on("input",c(this._input,this)))},createCheckAllItem:function(){var t=this.options,n=d.template(t.itemTemplate({field:"all",mobile:this._isMobile})),i=e(n({all:t.messages.checkAll}));this.container.prepend(i),this.checkBoxAll=i.find(":checkbox").eq(0).addClass("k-check-all"),this.checkAllHandler=c(this.checkAll,this),this.checkBoxAll.on(g+E,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(d.format(this.options.messages.selectedItemsFormat,this.container.find(":checked:not(.k-check-all)").length)),this.checkBoxAll){var e=this.container.find(":checkbox:not(.k-check-all)").length==this.container.find(":checked:not(.k-check-all)").length;this.checkBoxAll.prop("checked",e)}},refresh:function(e){var t=this.options.forceUnique,n=this.dataSource,i=this.getFilterArray();this._link&&this._link.toggleClass("k-state-active",0!==i.length),this.form&&(e&&t&&e.sender===n&&!n.options.serverPaging&&("itemchange"==e.action||"add"==e.action||"remove"==e.action||n.options.autoSync&&"sync"===e.action)&&!this._foreignKeyValues()&&(this.checkSource.data(s(this.dataSource.data(),this.field)),this.container.empty()),this.container.is(":empty")&&this.createCheckBoxes(),this.checkValues(i),this.trigger(m))},getFilterArray:function(){var t,n=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return o(n,this.field),t=a(n)},createCheckBoxes:function(){var e,t,n,i=this.options,r={field:this.field,format:i.format,mobile:this._isMobile,type:this.type};this.options.forceUnique?this._foreignKeyValues()?(e=this.checkSource.data(),r.valueField="value",r.field="text"):e=this.checkSource.data():e=this.checkSource.view(),t=d.template(i.itemTemplate(r)),n=d.render(t,e),i.checkAll&&this.createCheckAllItem(),this.container.on(g+E,":checkbox",c(this.updateCheckAllState,this)),this.container.append(n)},checkAll:function(){var e=this.checkBoxAll.is(":checked");this.container.find(":checkbox").prop("checked",e)},checkValues:function(t){var n=this;e(e.grep(this.container.find(":checkbox").prop("checked",!1),function(i){var r,o,a=!1;if(!e(i).is(".k-check-all"))for(r=n._parse(e(i).val()),o=0;o"},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected"},forceUnique:!0,animations:{left:"slide",right:"slide:right"}},events:[p,m,"change",f]});e.extend(R.fn,{_click:F.fn._click,_keydown:F.fn._keydown,_reset:F.fn._reset,_closeForm:F.fn._closeForm,_removeFilter:F.fn._removeFilter,clear:F.fn.clear,_merge:F.fn._merge}),u.plugin(F),u.plugin(R)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.menu.min",["kendo.popup.min"],e)}(function(){return function(e,t){function n(e,t){return e=e.split(" ")[!t+0]||e,e.replace("top","up").replace("bottom","down")}function i(e,t,n){e=e.split(" ")[!t+0]||e;var i={origin:["bottom",n?"right":"left"],position:["top",n?"right":"left"]},r=/left|right/.test(e);return r?(i.origin=["top",e],i.position[1]=S.directions[e].reverse):(i.origin[0]=e,i.position[0]=S.directions[e].reverse),i.origin=i.origin.join(" "),i.position=i.position.join(" "),i}function r(t,n){try{return e.contains(t,n)}catch(i){return!1}}function o(t){t=e(t),t.addClass("k-item").children(W).addClass(Q),t.children("a").addClass(j).children(W).addClass(Q),t.filter(":not([disabled])").addClass(ve),t.filter(".k-separator").empty().append(" "),t.filter("li[disabled]").addClass(ke).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+j).length||t.contents().filter(function(){return!(this.nodeName.match(O)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(""),a(t),l(t)}function a(t){t=e(t),t.find("> .k-link > [class*=k-i-arrow-60]:not(.k-sprite)").remove(),t.filter(":has(.k-menu-group)").children(".k-link:not(:has([class*=k-i-arrow]:not(.k-sprite)))").each(function(){var t=e(this),n=s(t);t.append("")})}function s(e){var t,n=e.parent().parent(),i=S.support.isRtl(n);return t=n.hasClass(q+"-horizontal")?" k-i-arrow-60-down":i?" k-i-arrow-60-left":" k-i-arrow-60-right"}function l(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(Y),t.filter(".k-last:not(:last-child)").removeClass(G),t.filter(":first-child").addClass(Y),t.filter(":last-child").addClass(G)}function d(e){var t,n;if(e&&e.length)for(t in e)n=e.eq(t),n.find("ul").length?n.attr("aria-haspopup",!0):n.removeAttr("aria-haspopup")}function u(e){if(!e.hasClass(q))return e.parentsUntil("."+q,"li")}function c(t,n){var i=p(n);i&&h(t,i), n.items&&e(t).children("ul").children("li").each(function(e){c(this,n.items[e])})}function h(t,n){e(t).children(".k-link").data({selectHandler:n})}function p(e){var t=e.select,n=S.isFunction;return t&&n(t)?t:null}function f(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function m(e){return e?"ul[data-group='"+e+"']":"ul[data-group]"}function g(t,n){var i=t.find(f()),r=[];return i.each(function(i,o){var a,s;for(o=e(o),a=o.data(fe),s=t;a;)s=n.find(m(a)+":visible"),s.length&&r.push(s),o=s.find(f()),a=o.data(fe)}),r}function v(t,n){var i=t.data(pe);return i?n.find(f(i)):e([])}function _(t,n){var i=t.data(fe);return i?n.children(Ce).children(m(i)):e([])}function b(t,n){var i,r,o=[],a=function(e){for(;e.parentNode&&!n.is(e.parentNode);)o.push(e.parentNode),e=e.parentNode},s=t[0]||t;for(a(s),i=o[o.length-1];e(i).is(Ce)&&(r=e(i).children("ul"),s=v(r,n)[0]);)o.push(s),a(s),i=o[o.length-1];return o}function k(e){var t=0;return e.wheelDelta&&(t=-e.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}function w(e,t){for(var n=0,i=e.parentNode;i&&!isNaN(i[t]);)n+=i[t],i=i.parentNode;return n}function y(e){return re&&e.originalEvent&&e.originalEvent.pointerType in Ne}function x(e){var t=e.originalEvent;return E&&/touch/i.test(t.type||"")}function C(e){e.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var T,S=window.kendo,D=S.ui,F=S._activeElement,E=S.support.touch&&S.support.mobileOS,A="mousedown",I="click",R=30,M=50,z=e.extend,H=e.proxy,N=e.each,B=S.template,P=S.keys,L=D.Widget,O=/^(ul|a|div)$/i,V=".kendoMenu",W="img",U="open",q="k-menu",j="k-link",G="k-last",$="close",K="timer",Y="k-first",Q="k-image",X="select",J="zIndex",Z="activate",ee="deactivate",te="touchstart"+V+" MSPointerDown"+V+" pointerdown"+V,ne=S.support.pointers,ie=S.support.msPointers,re=ie||ne,oe=ne?"pointerenter":ie?"MSPointerEnter":"mouseenter",ae=ne?"pointerleave":ie?"MSPointerLeave":"mouseleave",se="DOMMouseScroll"+V+" mousewheel"+V,le=S.support.resize+V,de="scrollWidth",ue="scrollHeight",ce="offsetWidth",he="offsetHeight",pe="group",fe="groupparent",me=e(document.documentElement),ge="kendoPopup",ve="k-state-default",_e="k-state-hover",be="k-state-focused",ke="k-state-disabled",we="k-state-selected",ye=".k-menu",xe=".k-menu-group",Ce=".k-animation-container",Te=xe+","+Ce,Se=":not(.k-list) > .k-item",De=".k-item.k-state-disabled",Fe=".k-item",Ee=".k-item:not(.k-state-disabled)",Ae=".k-item:not(.k-state-disabled) > .k-link",Ie=":not(.k-item.k-separator)",Re=Fe+Ie+":eq(0)",Me=Fe+Ie+":last",ze="div:not(.k-animation-container,.k-list-container)",He=".k-menu-scroll-button",Ne={2:1,touch:1},Be={content:B("
        #= content(item) #
        "),group:B(""),itemWrapper:B("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(data) ##= sprite(item) ##= text(item) ##= arrow(data) #"),item:B(""),scrollButton:B(""),image:B(""),arrow:B(""),sprite:B(""),empty:B("")},Pe={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(n+=" "+t.attr["class"]),t.selected&&(n+=" "+we),n},itemCssAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},imageCssAttributes:function(e){var t,n="",i=e.imageAttr||{};i["class"]?i["class"]+=" "+Q:i["class"]=Q;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},contentCssAttributes:function(e){var t,n="",i=e.contentAttr||{},r="k-content k-group k-menu-group";i["class"]?i["class"]+=" "+r:i["class"]=r;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},textClass:function(){return j},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},text:function(e){return e.encoded===!1?e.text:S.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-menu-group"},content:function(e){return e.content?e.content:" "}},Le=L.extend({init:function(e,t){var n=this;L.fn.init.call(n,e,t),e=n.wrapper=n.element,t=n.options,n._updateClasses(),n._initData(t),n._animations(t),n.nextItemZIndex=100,n._tabindex(),n._initOverflow(t),n._attachMenuEventsHandlers(),t.openOnClick&&(n.clicked=!1),e.attr("role","menubar"),e[0].id&&(n._ariaId=S.format("{0}_mn_active",e[0].id)),S.notify(n)},events:[U,$,Z,ee,X],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(e){var t=this;e.dataSource&&(t.angular("cleanup",function(){return{elements:t.element.children()}}),t.element.empty(),t.append(e.dataSource,t.element),t.angular("compile",function(){return{elements:t.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,r=t._overflowWrapper();(r||n).on(te,Fe,H(t._focusHandler,t)).on(I+V,De,!1).on(I+V,Fe,H(t._click,t)).on(te+" "+A+V,".k-content",H(t._preventClose,t)).on(oe+V,Ee,H(t._mouseenter,t)).on(ae+V,Ee,H(t._mouseleave,t)).on(A+V,Ee,H(t._mousedown,t)).on(oe+V+" "+ae+V+" "+A+V+" "+I+V,Ae,H(t._toggleHover,t)),n.on("keydown"+V,H(t._keydown,t)).on("focus"+V,H(t._focus,t)).on("focus"+V,".k-content",H(t._focus,t)).on("blur"+V,H(t._removeHoverItem,t)).on("blur"+V,"[tabindex]",H(t._checkActiveElement,t)),r&&r.on(ae+V,Te,H(t._mouseleavePopup,t)).on(oe+V,Te,H(t._mouseenterPopup,t)),i.openOnClick&&(t._documentClickHandler=H(t._documentClick,t),e(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(V),t.element.off(V),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,r,o,a=this,s="horizontal"==t.orientation;t.scrollable&&(a._openedPopups={},a._scrollWrapper=a.element.wrap("
        ").parent(),s&&C(a.element),n=e(Be.scrollButton({direction:s?"left":"up"})),i=e(Be.scrollButton({direction:s?"right":"down"})),n.add(i).appendTo(a._scrollWrapper),a._initScrolling(a.element,n,i,s),r=a.element.outerWidth(),o=a.element[0].style.width,o="auto"===o?"":o,s&&e(window).on(le,S.throttle(function(){a._setOverflowWrapperWidth(r,o),a._toggleScrollButtons(a.element,n,i,s)},100)),a._setOverflowWrapperWidth(r,o),a._toggleScrollButtons(a.element,n,i,s))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n,i,r,o,a=this,s=a._scrollWrapper.css("width");a._scrollWrapper.css({width:""}),n=a._scrollWrapper.outerWidth(),a._scrollWrapper.css({width:s}),i=a.element.outerWidth(),r=a.element[0].offsetWidth-a.element[0].clientWidth,i!=n&&n>0&&(o=t?Math.min(e,n):n,a.element.width(o-r),a._scrollWrapper.width(o))},_reinitOverflow:function(e){var t=this,n=e.scrollable&&!t.options.scrollable||!e.scrollable&&t.options.scrollable||e.scrollable&&t.options.scrollable&&e.scrollable.distance!=t.options.scrollable.distance||e.orientation!=t.options.orientation;n&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var n=this,i=n._overflowWrapper();i&&(i.off(V),i.find(He).off(V).remove(),i.children(Ce).each(function(t,n){var r,o=e(n).children(xe);o.off(se),r=v(o,i),r.length&&r.append(n)}),i.find(f()).removeAttr("data-groupparent"),i.find(m()).removeAttr("data-group"),n.element.off(se),e(window).off(le),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,n,i,r){var o=this,a=o.options.scrollable,s=e.isNumeric(a.distance)?a.distance:M,l=s/2,d="-="+s,u="+="+s,c="-="+2*s,h="+="+2*s,p=!1,f=!1,m=function(e){var a=r?{scrollLeft:e}:{scrollTop:e};t.finish().animate(a,"fast","linear",function(){p&&m(e)}),o._toggleScrollButtons(t,n,i,r)},g=function(e){p||f||(m(e.data.direction),p=!0)},v=function(a){var s=r?{scrollLeft:a.data.direction}:{scrollTop:a.data.direction};f=x(a)||y(a),t.stop().animate(s,"fast","linear",function(){f?(o._toggleScrollButtons(t,n,i,r),p=!0):e(a.currentTarget).trigger(oe)}),p=!1,a.stopPropagation(),a.preventDefault()};n.on(oe+V,{direction:d},g).on(S.eventMap.down+V,{direction:c},v),i.on(oe+V,{direction:u},g).on(S.eventMap.down+V,{direction:h},v),n.add(i).on(ae+V,function(){t.stop(),p=!1,o._toggleScrollButtons(t,n,i,r)}),t.on(se,function(e){var a,s,d,u;e.ctrlKey||e.shiftKey||e.altKey||(a=k(e.originalEvent),s=Math.abs(a)*l,d=(a>0?"+=":"-=")+s,u=r?{scrollLeft:d}:{scrollTop:d},o._closeChildPopups(t),t.finish().animate(u,"fast","linear",function(){o._toggleScrollButtons(t,n,i,r)}),e.preventDefault())})},_toggleScrollButtons:function(e,t,n,i){var r=i?e.scrollLeft():e.scrollTop(),o=i?de:ue,a=i?ce:he;t.toggle(0!==r),n.toggle(r .k-menu-group, > .k-animation-container > .k-menu-group"):null);return N(n.items,function(t){n.group.append(this),a(this),c(this,e[t]||e)}),a(t),l(n.group.find(".k-first, .k-last").add(n.items)),d(u(n.group)),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return N(n.items,function(n){t.before(this),a(this),l(this),c(this,e[n]||e)}),l(t),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return N(n.items,function(n){t.after(this),a(this),l(this),c(this,e[n]||e)}),l(t),this},_insert:function(t,n,i){var r,a,s,l,d=this;return n&&n.length||(i=d.element),s=e.isPlainObject(t),l={firstLevel:i.hasClass(q),horizontal:i.hasClass(q+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(Le.renderGroup({group:l})).appendTo(n)),s||e.isArray(t)?r=e(e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(Le.renderItem({group:l,item:z(t,{index:n})})).get()})):(r="string"==typeof t&&"<"!=t.charAt(0)?d.element.find(t):e(t),a=r.find("> ul").addClass("k-menu-group").attr("role","menu"),r=r.filter("li"),r.add(a.find("> li")).each(function(){o(this)})),{items:r,group:i}},remove:function(e){var t,n,i,r,o;return e=this.element.find(e),t=this,n=e.parentsUntil(t.element,Se),i=e.parent("ul:not(.k-menu)"),e.remove(),i&&!i.children(Se).length&&(r=u(i),o=i.parent(Ce),o.length?o.remove():i.remove(),d(r)),n.length&&(n=n.eq(0),a(n),l(n)),t},open:function(r){var o=this,a=o.options,s="horizontal"==a.orientation,l=a.direction,d=S.support.isRtl(o.wrapper),u=o._overflowWrapper();return r=(u||o.element).find(r),/^(top|bottom|default)$/.test(l)&&(l=d?s?(l+" left").replace("default","bottom"):"left":s?(l+" right").replace("default","bottom"):"right"),o.options.openOnClick&&(o.clicked=!0),r.each(function(){var r=e(this);clearTimeout(r.data(K)),r.data(K,setTimeout(function(){var c,h,p,m,g,v,_,b,k,w,y=r.find(".k-menu-group:first:hidden");!y[0]&&u&&(h=o._getPopup(r),y=h&&h.element),y.is(":visible")||y[0]&&o._triggerEvent({item:r[0],type:U})===!1&&(!y.find(".k-menu-group")[0]&&y.children(".k-item").length>1?(p=e(window).height(),m=function(){y.css({maxHeight:p-(S._outerHeight(y)-y.height())-S.getShadows(y).bottom,overflow:"auto"})},S.support.browser.msie&&S.support.browser.version<=7?setTimeout(m,0):m()):y.css({maxHeight:"",overflow:""}),r.data(J,r.css(J)),g=o.nextItemZIndex++,r.css(J,g),o.options.scrollable&&r.parent().siblings(He).css({zIndex:++g}),c=y.data(ge),v=r.parent().hasClass(q),_=v&&s,b=i(l,v,d),k=a.animation.open.effects,w=k!==t?k:"slideIn:"+n(l,v),c?(c=y.data(ge),c.options.origin=b.origin,c.options.position=b.position,c.options.animation.open.effects=w):c=y.kendoPopup({activate:function(){o._triggerEvent({item:this.wrapper.parent(),type:Z})},deactivate:function(e){e.sender.element.removeData("targetTransform").css({opacity:""}),o._triggerEvent({item:this.wrapper.parent(),type:ee})},origin:b.origin,position:b.position,collision:a.popupCollision!==t?a.popupCollision:_?"fit":"fit flip",anchor:r,appendTo:u||r,animation:{open:z(!0,{effects:w},a.animation.open),close:a.animation.close},open:H(o._popupOpen,o),close:function(e){var t,n=e.sender.wrapper.parent();u&&(t=e.sender.element.data(pe),t&&(n=(u||o.element).find(f(t))),e.sender.wrapper.children(He).hide()),o._triggerEvent({item:n[0],type:$})?e.preventDefault():(n.css(J,n.data(J)),n.removeData(J),o.options.scrollable&&n.parent().siblings(He).css({zIndex:""}),(E||re)&&(n.removeClass(_e),o._removeHoverItem()))}}).data(ge),y.removeAttr("aria-hidden"),o._configurePopupOverflow(c,r),c._hovered=!0,c.open(),o._initPopupScrolling(c))},o.options.hoverDelay))}),o},_configurePopupOverflow:function(e,t){var n,i=this;i.options.scrollable&&(i._wrapPopupElement(e),t.attr("data-groupparent")||(n=(new Date).getTime(),t.attr("data-groupparent",n),e.element.attr("data-group",n)))},_wrapPopupElement:function(e){e.element.parent().is(Ce)||(e.wrapper=S.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,n){var i=this;i.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&i._initPopupScrollButtons(e,t,n)},_initPopupScrollButtons:function(t,n,i){var r=this,o=t.wrapper.children(He),a=r.options.animation,s=(a&&a.open&&a.open.duration||0)+R;setTimeout(function(){var a,s;o.length||(a=e(Be.scrollButton({direction:n?"left":"up"})),s=e(Be.scrollButton({direction:n?"right":"down"})),o=a.add(s).appendTo(t.wrapper),r._initScrolling(t.element,a,s,n),i||o.on(oe+V,function(){var n=r._overflowWrapper();e(g(t.element,n)).each(function(e,t){var i=n.find(f(t.data(pe)));r.close(i)})}).on(ae+V,function(){setTimeout(function(){e.isEmptyObject(r._openedPopups)&&r._closeParentPopups(t.element)},R)})),r._toggleScrollButtons(t.element,o.first(),o.last(),n)},s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children("."+be).removeClass(be),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,n){var i,r,o,a,s,l,d,u,c,h=t.element,p=h.add(h.parent(Ce));p.height(h.hasClass(q)&&this._initialHeight||""),i=t._location(n),r=e(window).height(),o=i.height,a=n?0:Math.max(i.top,0),s=n?0:w(this._overflowWrapper()[0],"scrollTop"),l=window.innerHeight-r,d=r-S.getShadows(h).bottom+l,u=d+s>o+a,u||(c=Math.min(d,d-a+s),p.css({overflow:"hidden",height:c+"px"}))},close:function(t,n){var i,r,o=this,a=o._overflowWrapper(),s=a||o.element;return t=s.find(t),t.length||(t=s.find(">.k-item")),i=function(t){var n=!1;return e.isEmptyObject(o._openedPopups)?n:(e(g(t,a)).each(function(e,t){return n=!!o._openedPopups[""+t.data(pe)],!n}),n)},r=function(e){var t=e.data(fe);return!a||!t||!o._openedPopups[""+t]},t.each(function(){var s=e(this);!n&&o._isRootItem(s)&&(o.clicked=!1),clearTimeout(s.data(K)),s.data(K,setTimeout(function(){var e=o._getPopup(s);if(e&&(r(s)||o._forceClose)){if(!o._forceClose&&i(e.element))return;e.close(),e.element.attr("aria-hidden",!0),a&&o._forceClose&&t.last().is(s[0])&&delete o._forceClose}},o.options.hoverDelay))}),o},_getPopup:function(e){var t,n,i=this,r=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(ge),o=i._overflowWrapper();return!r&&o&&(t=e.data(fe),t&&(n=o.find(m(t)),r=n.data(ge))),r},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(ve,n).toggleClass(ke,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(S.eventTarget(t)||t.target).closest(Se),i=t.type==oe||A.indexOf(t.type)!==-1;n.parents("li."+ke).length||n.toggleClass(_e,i||"mousedown"==t.type||"click"==t.type),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var n=this,i=e(t?t.currentTarget:this._hoverItem()),o=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(r(o,S._activeElement())||!t||r(o,t.currentTarget))||n.close(o)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(be)&&(e.removeClass(be),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element,n=".k-menu-init div ul";t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-header k-menu-init "+q).addClass(q+"-"+this.options.orientation),t.find("li > ul").filter(function(){return!S.support.matchesSelector.call(this,n)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each(function(){o(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),o=n._itemHasChildren(i),a=i.data(fe)||i.parent().data(pe),s=y(t);a&&(n._openedPopups[""+a]=!0),t.delegateTarget!=i.parents(ye)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(Se))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(Se))||(!(n.options.openOnClick===!1||n.options.openOnClick.rootMenuItems===!1&&n._isRootItem(i.closest(Se))||n.options.openOnClick.subMenuItems===!1&&!n._isRootItem(i.closest(Se))||n.clicked)||E||s&&n._isRootItem(i.closest(Se))||!r(t.currentTarget,t.relatedTarget)&&o&&n.open(i),(n.options.openOnClick===!0&&n.clicked||E)&&i.siblings().each(H(function(e,t){n.close(t,!0)},n))))},_mousedown:function(t){var n=this,i=e(t.currentTarget);(n.options.openOnClick.subMenuItems&&!n._isRootItem(i)||E)&&i.siblings().each(H(function(e,t){n.close(t,!0)},n))},_mouseleave:function(n){var i=this,o=e(n.currentTarget),a=o.data(fe),s=o.children(Ce).length||o.children(xe).length||a,l=e(window);return a&&delete i._openedPopups[""+a],o.parentsUntil(Ce,".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):i.options.openOnClick!==!1&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(o))&&(i.options.openOnClick.subMenuItems||i._isRootItem(o))||E||y(n)||r(n.currentTarget,n.relatedTarget||n.target)||!s||r(n.currentTarget,S._activeElement())?((S.support.browser.msie&&!n.toElement&&!n.relatedTarget||n.clientX<0||n.clientY<0||n.clientY>l.height()||n.clientX>l.width())&&i.close(o),t):(i.close(o,!0),t)},_mouseenterPopup:function(t){var n,i=this,r=e(t.currentTarget);r.parent().is(Ce)||(r=r.children("ul"),n=r.data(pe),n&&(i._openedPopups[""+n]=!0))},_mouseleavePopup:function(t){var n=this,i=e(t.currentTarget);!y(t)&&i.is(Ce)&&n._closePopups(i.children("ul"))},_closePopups:function(t){var n,i=this,r=i._overflowWrapper(),o=t.data(pe);o&&(delete i._openedPopups[""+o],n=r.find(f(o)),setTimeout(function(){if(i.options.openOnClick)i._closeChildPopups(t);else if(e.isEmptyObject(i._openedPopups)){var r=i._innerPopup(t);i._closeParentPopups(r)}else i.close(n,!0)},0))},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(g(t,i)).each(function(){var e=i.find(f(this.data(pe)));n.close(e,!0)})},_innerPopup:function(e){var t=this._overflowWrapper(),n=g(e,t);return n[n.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(pe),r=n.find(f(i));for(i=r.parent().data(pe),t.close(r,!0);i&&!t._openedPopups[i]&&!r.parent().is(ye);)r=n.find(f(i)),t.close(r,!0),i=r.parent().data(pe)},_click:function(n){for(var i,r,o,a,s,l,d=this,u=d.options,c=e(S.eventTarget(n)),h=c[0],p=c[0]?c[0].nodeName.toUpperCase():"",f="INPUT"==p||"SELECT"==p||"BUTTON"==p||"LABEL"==p,g=c.closest("."+j),v=c.closest(Se),_=v[0],b=g.attr("href"),k=c.attr("href"),w=e("").attr("href"),x=!!b&&b!==w,C=x&&!!b.match(/^#/),T=!!k&&k!==w,D=d._overflowWrapper();h&&h.parentNode!=_;)h=h.parentNode;if(!e(h).is(ze)){if(v.hasClass(ke))return n.preventDefault(),t;if(n.handled||!d._triggerSelect(c,_)||f||n.preventDefault(),n.handled=!0,r=v.children(Te),D&&(s=v.data(fe),s&&(r=D.find(m(s)))),o=r.is(":visible"),a=u.openOnClick&&o&&d._isRootItem(v),u.closeOnClick&&(!x||C)&&(!r.length||a))return v.removeClass(_e).css("height"),d._oldHoverItem=d._findRootParent(v),l=d._parentsUntil(g,d.element,Se),d._forceClose=!!D,d.close(l),d.clicked=!1,"MSPointerUp".indexOf(n.type)!=-1&&n.preventDefault(),t;x&&n.enterKey&&g[0].click(),(d._isRootItem(v)&&u.openOnClick!==!1||u.openOnClick.subMenuItems||S.support.touch||y(n)&&d._isRootItem(v.closest(Se)))&&(x||f||T||n.preventDefault(),d.clicked=!0,i=r.is(":visible")?$:U,(u.closeOnClick||i!=$)&&d[i](v))}},_parentsUntil:function(n,i,r){var o,a,s=this._overflowWrapper();return s?(o=b(n,s),a=[],e(o).each(function(){var n=e(this);return!n.is(i)&&(n.is(r)&&a.push(this),t)}),e(a)):n.parentsUntil(i,r)},_triggerSelect:function(e,t){var n,i,r,o;return e=e.is(".k-link")?e:e.closest(".k-link"),n=e.data("selectHandler"),n&&(i=this._getEventData(e),n.call(this,i)),r=i&&i.isDefaultPrevented(),o=this._triggerEvent({item:t,type:X}),r||o},_getEventData:function(e){var t={sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}};return t},_documentClick:function(e){var t=this;r((t._overflowWrapper()||t.element)[0],e.target)||(t.clicked=!1)},_focus:function(n){var i=this,r=n.target,o=i._hoverItem(),a=F();return r==i.wrapper[0]||e(r).is(":kendoFocusable")?(a===n.currentTarget&&(o.length?i._moveHover([],o):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(r).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(be),i.wrapper.focus(),t)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,l=S.support.isRtl(o.wrapper);if(e.target==e.currentTarget||a==P.ESC){if(s||(s=o._oldHoverItem=o._hoverItem()),i=o._itemBelongsToVertival(s),r=o._itemHasChildren(s),o._keyTriggered=!0,a==P.RIGHT)n=o[l?"_itemLeft":"_itemRight"](s,i,r);else if(a==P.LEFT)n=o[l?"_itemRight":"_itemLeft"](s,i,r);else if(a==P.DOWN)n=o._itemDown(s,i,r);else if(a==P.UP)n=o._itemUp(s,i,r);else if(a==P.HOME)o._moveHover(s,s.parent().children().first()),e.preventDefault();else if(a==P.END)o._moveHover(s,s.parent().children().last()),e.preventDefault();else if(a==P.ESC)n=o._itemEsc(s,i);else if(a==P.ENTER||a==P.SPACEBAR)n=s.children(".k-link"),n.length>0&&(o._click({target:n[0],preventDefault:function(){},enterKey:!0}),r&&!s.hasClass(ke)?(o.open(s),o._moveHover(s,o._childPopupElement(s).children().first())):o._moveHover(s,o._findRootParent(s)));else if(a==P.TAB)return n=o._findRootParent(s),o._moveHover(s,n),o._checkActiveElement(),t;n&&n[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length?e.parent().hasClass("k-menu-group")||t:t},_itemHasChildren:function(e){return!!(e&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, div.k-animation-container").length>0||!!e.data(fe)&&!!this._overflowWrapper().children(m(e.data(fe))))},_moveHover:function(t,n){var i=this,r=i._ariaId;t.length&&n.length&&t.removeClass(be),n.length&&(n[0].id&&(r=n[0].id),n.addClass(be),i._oldHoverItem=n,r&&(i.element.removeAttr("aria-activedescendant"),e("#"+r).removeAttr("id"),n.attr("id",r),i.element.attr("aria-activedescendant",r)),i._scrollToItem(n))},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,ye,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(q)},_itemRight:function(e,t,n){var i,r,o,a,s=this;return t?n&&!e.hasClass(ke)?(s.open(e),i=s._childPopupElement(e).children().first()):"horizontal"==s.options.orientation&&(r=s._findRootParent(e),o=s._overflowWrapper(),o&&(a=_(r,o),s._closeChildPopups(a)),s.close(r),i=r.nextAll(Re)):(i=e.nextAll(Re),i.length||(i=e.prevAll(Me)),s.close(e)),i&&!i.length?i=s.wrapper.children(".k-item").first():i||(i=[]),s._moveHover(e,i),i},_itemLeft:function(e,t){var n,i,r=this;return t?(n=e.parent().closest(".k-item"),i=r._overflowWrapper(),!n.length&&i&&(n=v(e.parent(),i)),r.close(n),r._isRootItem(n)&&"horizontal"==r.options.orientation&&(n=n.prevAll(Re))):(n=e.prevAll(Re),n.length||(n=e.nextAll(Me)),r.close(e)),n.length||(n=r.wrapper.children(".k-item").last()),r._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.nextAll(Re);else{if(!n||e.hasClass(ke))return;r.open(e),i=r._childPopupElement(e).children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=r.wrapper.children(".k-item").first()),r._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(Re),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_scrollToItem:function(e){var t,n,i,r,o,a,s,l,d,u,c,h,p=this;p.options.scrollable&&e&&e.length&&(t=e.parent(),n=!!t.hasClass(q)&&"horizontal"==p.options.orientation,i=n?"scrollLeft":"scrollTop",r=n?S._outerWidth:S._outerHeight,o=t[i](),a=r(e),s=e[0][n?"offsetLeft":"offsetTop"],l=r(t),d=t.siblings(He),u=d.length?r(d.first()):0,o+ls-u&&(c=s-u),isNaN(c)||(h={},h[i]=c,t.finish().animate(h,"fast","linear",function(){p._toggleScrollButtons(t,d.first(),d.last(),n)})))},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e},_childPopupElement:function(e){var t=e.find(".k-menu-group"),n=this._overflowWrapper();return!t.length&&n&&(t=_(e,n)),t},_triggerEvent:function(e){var t=this;return t.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var n=this,i=e(S.eventTarget(t)).closest(Se);i.hasClass(ke)||setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(be)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});z(Le,{renderItem:function(e){e=z({menu:{},group:{}},e);var t=Be.empty,n=e.item;return Be.item(z(e,{image:n.imageUrl?Be.image:t,sprite:n.spriteCssClass?Be.sprite:t,itemWrapper:Be.itemWrapper,renderContent:Le.renderContent,arrow:n.items||n.content?Be.arrow:t,subGroup:Le.renderGroup},Pe))},renderGroup:function(e){return Be.group(z({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=z({length:r},e.group);n
        ").parent(),"horizontal"==t.options.orientation&&C(t.element),e.appendTo&&e.appendTo.append(t._popupsWrapper),t._initialHeight=t.element[0].style.height,t._initialWidth=t.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,target:"body"},events:[U,$,Z,ee,X],setOptions:function(t){var n=this;Le.fn.setOptions.call(n,t),n.target.off(n.showOn+V+n._marker,n._showProxy),n.userEvents&&n.userEvents.destroy(),n.target=e(n.options.target),t.orientation&&n.popup.wrapper[0]&&n.popup.element.unwrap(),n._wire(),Le.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+V+e._marker),me.off(S.support.mousedown+V+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),Le.fn.destroy.call(e)},open:function(n,i){var o,a,s=this;return n=e(n)[0],r(s.element[0],e(n)[0])||s._itemHasChildren(e(n))?Le.fn.open.call(s,n):s._triggerEvent({item:s.element,type:U})===!1&&(s.popup.visible()&&s.options.filter&&(s.popup.close(!0),s.popup.element.kendoStop(!0)),i!==t?(o=s._overflowWrapper(),o&&(a=o.offset(),n-=a.left,i-=a.top),s.popup.wrapper.hide(),s._configurePopupScrolling(n,i),s.popup.open(n,i)):(s.popup.options.anchor=(n?n:s.popup.anchor)||s.target,s.popup.element.kendoStop(!0),s._configurePopupScrolling(),s.popup.open()),me.off(s.popup.downEvent,s.popup._mousedownProxy),me.on(S.support.mousedown+V+s._marker,s._closeProxy)),s},_configurePopupScrolling:function(e,n){var i=this,r=i.popup,o="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(r),r.element.parent().css({position:"",height:""}),r.element.css({visibility:"hidden",display:"",position:""}),o?i._setPopupWidth(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}),r.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(r,o,!0),r.element.siblings(He).hide())},_setPopupWidth:function(t,n){var i,r,o,a,s,l,d,u,c=t.element,h=c.add(c.parent(Ce));h.width(this._initialWidth||""),i=t._location(n),r=e(window).width(),o=i.width,a=Math.max(i.left,0),s=n?0:w(this._overflowWrapper()[0],"scrollLeft"),l=S.getShadows(c),d=r-l.left-l.right,u=d+s>o+a,u||h.css({overflow:"hidden",width:d-a+s+"px"})},close:function(){var t=this;r(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?Le.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:$})===!1&&(t.popup.close(),me.off(S.support.mousedown+V,t._closeProxy),t.unbind(X,t._closeTimeoutProxy))},_showHandler:function(e){var t,n=e,i=this,o=i.options;e.event&&(n=e.event,n.pageX=e.x.location,n.pageY=e.y.location),r(i.element[0],e.relatedTarget||e.target)||(i._eventOrigin=n,n.preventDefault(),n.stopImmediatePropagation(),i.element.find("."+be).removeClass(be),(o.filter&&S.support.matchesSelector.call(n.currentTarget,o.filter)||!o.filter)&&(o.alignToAnchor?(i.popup.options.anchor=n.currentTarget,i.open(n.currentTarget)):(i.popup.options.anchor=n.currentTarget,i._targetChild?(t=i.target.offset(),i.open(n.pageX-t.left,n.pageY-t.top)):i.open(n.pageX,n.pageY))))},_closeHandler:function(t){var n,i=this,o=e(t.relatedTarget||t.target),a=o.closest(i.target.selector)[0]==i.target[0],s=o.closest(Fe),l=i._itemHasChildren(s),d=i._overflowWrapper(),u=r(i.element[0],o[0])||d&&r(d[0],o[0]);i._eventOrigin=t,n=3!==t.which,i.popup.visible()&&(n&&a||!a)&&(i.options.closeOnClick&&!l&&u||!u)&&(u?(this.unbind(X,this._closeTimeoutProxy),i.bind(X,i._closeTimeoutProxy)):i.close())},_wire:function(){var e=this,t=e.options,n=e.target;e._showProxy=H(e._showHandler,e),e._closeProxy=H(e._closeHandler,e), e._closeTimeoutProxy=H(e.close,e),n[0]&&(S.support.mobileOS&&"contextmenu"==t.showOn?(e.userEvents=new S.UserEvents(n,{filter:t.filter,allowSelection:!1}),n.on(t.showOn+V+e._marker,!1),e.userEvents.bind("hold",e._showProxy)):t.filter?n.on(t.showOn+V+e._marker,t.filter,e._showProxy):n.on(t.showOn+V+e._marker,e._showProxy))},_triggerEvent:function(n){var i=this,r=e(i.popup.options.anchor)[0],o=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,z({type:n.type,item:n.item||this.element[0],target:r},o?{event:o}:{}))},_popup:function(){var t=this,n=t._overflowWrapper();t._triggerProxy=H(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:n||t.options.appendTo,close:n?function(t){e(g(t.sender.element,n)).each(function(e,t){var n=t.data(ge);n&&n.close(!0)})}:e.noop}).data(ge),t._targetChild=r(t.target[0],t.popup.element[0])}}),D.plugin(Le),D.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.columnmenu.min",["kendo.popup.min","kendo.filtermenu.min","kendo.menu.min"],e)}(function(){return function(e,t){function n(t){return e.trim(t).replace(/ /gi,"")}function i(e,t){var n,i,r,o={};for(n=0,i=e.length;n0?t.insertAfter(n.children().eq(e-1)):n.prepend(t)}var s=window.kendo,l=s.ui,d=e.proxy,u=e.extend,c=e.grep,h=e.map,p=e.inArray,f="k-state-selected",m="asc",g="desc",v="change",_="init",b="open",k="select",w="kendoPopup",y="kendoFilterMenu",x="kendoMenu",C=".kendoColumnMenu",T=l.Widget,S=T.extend({init:function(t,n){var i,r=this;T.fn.init.call(r,t,n),t=r.element,n=r.options,r.owner=n.owner,r.dataSource=n.dataSource,r.field=t.attr(s.attr("field")),r.title=t.attr(s.attr("title")),i=t.find(".k-header-column-menu"),i[0]||(i=t.addClass("k-with-icon").prepend('').find(".k-header-column-menu")),r.link=i.attr("tabindex",-1).on("click"+C,d(r._click,r)),r.wrapper=e('
        '),r._refreshHandler=d(r.refresh,r),r.dataSource.bind(v,r._refreshHandler)},_init:function(){var e=this;e.pane=e.options.pane,e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e.owner._muteAngularRebind(function(){e._angularItems("compile")}),e._sort(),e._columns(),e._filter(),e._lockColumns(),e.trigger(_,{field:e.field,container:e.wrapper})},events:[_,b,"sort","filtering"],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings",lock:"Lock",unlock:"Unlock"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var e=this,t=e.options;e.wrapper.html(s.template(D)({uid:s.guid(),ns:s.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns})),e.popup=e.wrapper[w]({anchor:e.link,open:d(e._open,e),activate:d(e._activate,e),close:function(){e.options.closeCallback&&e.options.closeCallback(e.element)}}).data(w),e.menu=e.wrapper.children()[x]({orientation:"vertical",closeOnClick:!1}).data(x)},_createMobileMenu:function(){var e=this,t=e.options,n=s.template(F)({ns:s.ns,field:e.field,title:e.title||e.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns});e.view=e.pane.append(n),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new E(e.wrapper.children(),{pane:e.pane}),e.view.element.on("click",".k-done",function(t){e.close(),t.preventDefault()}),e.options.lockedColumns&&e.view.bind("show",function(){e._updateLockedColumns()})},_angularItems:function(t){var n=this;n.angular(t,function(){var t=n.wrapper.find(".k-columns-item input["+s.attr("field")+"]").map(function(){return e(this).closest("li")}),i=h(n._ownerColumns(),function(e){return{column:e._originalObject}});return{elements:t,data:i}})},destroy:function(){var e=this;e._angularItems("cleanup"),T.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(v,e._refreshHandler),e.options.columns&&e.owner&&(e._updateColumnsMenuHandler&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e._updateColumnsLockedStateHandler&&(e.owner.unbind("columnLock",e._updateColumnsLockedStateHandler),e.owner.unbind("columnUnlock",e._updateColumnsLockedStateHandler))),e.menu&&(e.menu.element.off(C),e.menu.destroy()),e.wrapper.off(C),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(C),e.owner=null,e.wrapper=null,e.element=null},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+C))},_click:function(e){var t,n=this;e.preventDefault(),e.stopPropagation(),t=this.options,t.filter&&this.element.is(!t.filter)||(this.popup||this.pane?n._reorderColumnList():this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_reorderColumnList:function(){var t,n,i=this,r=i._ownerColumns()||[],s=i._isMobile&&i.view?e(i.view.element).find(".k-columns-item").children("ul"):e(i.wrapper).find(".k-menu-group");for(t=0;t-1&&(i=!0,n.prop("checked",i)),n.closest("[role='menuitemcheckbox']").attr("aria-checked",i),i&&(1==f&&r&&n.prop("disabled",!0),1!=m||r||n.prop("disabled",!0))},_updateColumnsLockedState:function(){var e,t,n,r,o=s.attr("field"),a=s.attr("locked"),l=i(this._ownerColumns(),"field"),d=this.wrapper.find(".k-columns-item input[type=checkbox]");for(e=0,t=d.length;e').find(c)),i.link=n,i.element.on("click"+u,p(i._click,i))},options:{name:"ColumnSorter",mode:s,allowUnsort:!0,compare:null,filter:"",initialDirection:a,showIndexes:!1},events:["change"],destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(u),e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=e.element=e.link=e.dataSource=null},refresh:function(){var i,r,s,u,c,p,f=this,m=f.dataSource.sort()||[],g=f.element,v=g.attr(n.attr(l));for(g.removeAttr(n.attr(o)),g.removeAttr(h),i=0,r=m.length;i table"):p.parent().hasClass("k-grid")||(p=null),p&&(g.toggleClass("k-sorted",u!==t),p.children("colgroup").children().eq(g.index()).toggleClass("k-sorted",u!==t))),g.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order").remove(),u===a?(e('').appendTo(f.link),g.attr(h,"ascending")):u===d&&(e('').appendTo(f.link),g.attr(h,"descending")),f.options.showIndexes&&m.length>1&&c&&e('').html(c).appendTo(f.link)},_toggleSortDirection:function(e){var n=this.directions;return e===n[n.length-1]&&this.options.allowUnsort?t:n[0]===e?n[1]:n[0]},_click:function(e){var i,r,a=this,d=a.element,u=d.attr(n.attr(l)),c=d.attr(n.attr(o)),h=a.options,p=null===a.options.compare?t:a.options.compare,f=a.dataSource.sort()||[];if(e.preventDefault(),(!h.filter||d.is(h.filter))&&(c=this._toggleSortDirection(c),!this.trigger("change",{sort:{field:u,dir:c,compare:p}}))){if(h.mode===s)f=[{field:u,dir:c,compare:p}];else if("multiple"===h.mode){for(i=0,r=f.length;i=0?u[l]=t:h(i)||(u[t]=p(i)?i.value||t:i),u[s.attr(t+"-msg")]=i.message;return f(o,_)>=0&&(u[l]=o),u[d]=("boolean"===o?"checked:":"value:")+e.field,u}function o(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,g='
        #=message#
        ',v="change",_=["url","email","number","date","boolean"],b={number:function(t,n){var i=r(n);e('').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("').hide().appendTo(t)},date:function(t,n){var i=r(n),o=n.format;o&&(o=s._extractFormat(o)),i[s.attr("format")]=o,e('').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("').hide().appendTo(t)},string:function(t,n){var i=r(n);e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=r(n);e('').attr(i).appendTo(t)},values:function(t,n){var i=r(n),a=s.stringify(o(n.values));e("',Zt='# var checkboxGuid = kendo.guid(); #',en=!1,tn=fe.support.browser,nn=tn.msie&&7==tn.version,rn=tn.msie&&8==tn.version,on=ke.extend({init:function(e,t){var n=this;ke.fn.init.call(n,e,t),n._refreshHandler=Ie(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(rt,t._refreshHandler),t.dataSource=e,t.dataSource.bind(rt,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[pt,ht,ft],destroy:function(){var e=this;ke.fn.destroy.call(e),e.dataSource.unbind(rt,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off($e),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,n=this,i=fe.support.scrollbar()+1,r=n.element;r.css({width:"auto",overflow:"hidden"}).css(en?"padding-left":"padding-right",i),n.content=r.children().first(),t=n.wrapper=n.content.wrap('
        ').parent().bind("DOMMouseScroll"+$e+" mousewheel"+$e,Ie(n._wheelScroll,n)),fe.support.kineticScrollNeeded&&(n.drag=new fe.UserEvents(n.wrapper,{global:!0,allowSelection:!0,start:function(e){e.sender.capture()},move:function(e){n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),n.verticalScrollbar=e('
        ').css({width:i}).appendTo(r).bind("scroll"+$e,Ie(n._scroll,n))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,n=t.scrollTop(),i=fe.wheelDeltaY(e);!i||i>0&&0===n||i<0&&n+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(n+-i))}},_scroll:function(e){var n=this,i=!n.options.prefetch,r=e.currentTarget.scrollTop,o=n.dataSource,a=n.itemHeight,s=o.skip()||0,l=n._rangeStart||s,d=n.element.innerHeight(),u=!!(n._scrollbarTop&&n._scrollbarTop>r),c=He.max(He.floor(r/a),0),h=u?He.ceil(d/a):He.floor(d/a),p=He.max(c+h,0);return n._preventScroll?(n._preventScroll=!1,t):(n._scrollTop=r-l*a,n._scrollbarTop=r,n._scrolling=i,n._fetch(c,p,u)||(n.wrapper[0].scrollTop=n._scrollTop),n.trigger(ft),i&&(n._scrollingTimeout&&clearTimeout(n._scrollingTimeout),n._scrollingTimeout=setTimeout(function(){n._scrolling=!1,n._page(n._rangeStart,n.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,n=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?e._wrapperScrolled&&!e._isScrolledToBottom()||(t.scrollTop(n+fe.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(n-fe.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,n=t.verticalScrollbar;n.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),n.scrollTop(e),t._scrollbarTop=n.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},_isElementVisible:function(e){return this._isElementVisibleInWrapper(e)},_isElementVisibleInWrapper:function(t){var n,i,r=this,o=r.wrapper;return t=e(t),!!(t[0]&&ze(o[0],t[0])&&(n=parseInt(t.position().top,10),i=t.outerHeight()/2,(n>=0||He.abs(n)<=i)&&n+i<=o.height()))},position:function(e){var t,n=this._rangeStart||this.dataSource.skip()||0,i=this.dataSource.pageSize();return t=e>n?e-n+1:n-e-1,t>i?i:t},scrollIntoView:function(e){var t=this.wrapper[0],n=t.clientHeight,i=this._isScrolledToBottom()?t.scrollTop:this._scrollTop||t.scrollTop,r=e[0].offsetTop,o=e[0].offsetHeight;i>r?this.verticalScrollbar[0].scrollTop-=n/2:r+o>=i+n&&(this.verticalScrollbar[0].scrollTop+=n/2)},_fetch:function(t,n,i){var r=this,o=r.dataSource,a=r.itemHeight,s=o.take(),l=r._rangeStart||o.skip()||0,d=He.floor(t/s)*s,u=!1,c=.33,h=r.verticalScrollbar,p=tn.webkit?1:0;return t=l+s&&!i?(u=!0,l=He.min(t,o.total()-s),r._scrollTop=h.scrollTop()>=h[0].scrollHeight-h.height()-p?r.wrapper[0].scrollHeight-r.wrapper.height():a,r._page(l,s)):!r._fetching&&r.options.prefetch&&(ts&&o.prefetch(d-s,s,e.noop),n>d+s*c&&o.prefetch(d+s,s,e.noop)),u},fetching:function(){return this._fetching},_page:function(t,n,i){var r=this,o=!r.options.prefetch,a=r.dataSource;i=Re(i)?i:e.noop,r.trigger(pt,{skip:t,take:n})||(clearTimeout(r._timeout),r._fetching=!0,r._rangeStart=t,a.inRange(t,n)?(fe.ui.progress(e(r.wrapper).parent(),!0),a.range(t,n,function(){fe.ui.progress(e(r.wrapper).parent(),!1),i(),r.trigger(ht)})):(o||fe.ui.progress(r.wrapper.parent(),!0),r._timeout=setTimeout(function(){r._scrolling||(o&&fe.ui.progress(r.wrapper.parent(),!0),a.range(t,n,function(){fe.ui.progress(r.wrapper.parent(),!1),i(),r.trigger(ht)}))},100)))},repaintScrollbar:function(e){var n,i=this,r="",o=i.options.maxScrollHeight,a=i.dataSource,s=fe.support.kineticScrollNeeded?0:fe.support.scrollbar(),l=i.wrapper[0],d=i._isScrolledToBottom(),u=i.itemHeight=i.options.itemHeight()||0,c=l.scrollWidth>l.offsetWidth?s:0,h=a.total()*u+c;for(n=0;n
        ';h%o&&(r+='
        '),i.verticalScrollbar.html(r),d&&!i._isScrolledToBottom()&&i.scrollToBottom(),t!==i._scrollTop&&e&&(l.scrollTop=i._scrollTop,i._scrollWrapperOnColumnResize())},refresh:function(e){var n=this,i=n.dataSource,r=n._rangeStart,o=(e||{}).action,a=n._isScrolledToBottom()||!o||o!==ct&&o!==Xe&&o!==mt;fe.ui.progress(n.wrapper.parent(),!1),clearTimeout(n._timeout),n.repaintScrollbar(a),n.drag&&n.drag.cancel(),t===r||n._fetching||((!o||o!==mt&&o!==ct)&&(n._rangeStart=i.skip()),1!==i.page()||o&&(o===mt||o===ct)||(n.verticalScrollbar[0].scrollTop=0)),n._fetching=!1}}),an={create:{text:"Add new record",className:"k-grid-add",iconClass:"k-icon k-i-plus"},cancel:{text:"Cancel changes",className:"k-grid-cancel-changes",iconClass:"k-icon k-i-cancel"},save:{text:"Save changes",className:"k-grid-save-changes",iconClass:"k-icon k-i-check"},destroy:{text:"Delete",className:"k-grid-delete",iconClass:"k-icon k-i-close"},edit:{text:"Edit",className:"k-grid-edit",iconClass:"k-icon k-i-edit"},update:{text:"Update",className:"k-primary k-grid-update",iconClass:"k-icon k-i-check"},canceledit:{text:"Cancel",className:"k-grid-cancel",iconClass:"k-icon k-i-cancel"},excel:{text:"Export to Excel",className:"k-grid-excel",iconClass:"k-icon k-i-file-excel"},pdf:{text:"Export to PDF",className:"k-grid-pdf",iconClass:"k-icon k-i-file-pdf"}},sn=fe.ui.DataBoundWidget.extend({init:function(t,n,i){var r=this;n=Fe(n)?{dataSource:n}:n,ke.fn.init.call(r,t,n),i&&(r._events=i),en=fe.support.isRtl(t),r._element(),r._aria(),r._columns(e.extend(!0,[],r.options.columns)),r._dataSource(),r._tbody(),r._pageable(),r._thead(),r._groupable(),r._toolbar(),r._setContentHeight(),r._templates(),r._navigatable(),r._selectable(),r._clipboard(),r._details(),r._editable(),r._attachCustomCommandsEvent(),r._minScreenSupport(),r.options.autoBind?r.dataSource.fetch():(r._group=r._groups()>0,r._footer()),r.lockedContent&&(r.wrapper.addClass("k-grid-lockedcolumns"),r._resizeHandler=function(){r.resize()},e(window).on("resize"+$e,r._resizeHandler)),fe.notify(r)},events:[rt,"dataBinding","cancel",lt,dt,ut,Je,Ze,tt,et,nt,Ke,Ye,Qe,Xe,st,it,yt,xt,at,ot,Ct,Tt,St,"page","sort","filter","group","groupExpand","groupCollapse"],setDataSource:function(e){var t=this,n=t.options.scrollable;t.options.dataSource=e,t._dataSource(),t._pageable(),t._thead(),n&&(n.virtual?t.content.find(">.k-virtual-scrollable-wrap").scrollLeft(0):t.content.scrollLeft(0)),t.options.groupable&&t._groupable(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.navigatable&&t._navigatable(),t.options.selectable&&t._selectable(),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:Wt,confirmation:Lt,confirmDelete:Vt},commands:{create:an.create.text,cancel:an.cancel.text,save:an.save.text,destroy:an.destroy.text,edit:an.edit.text,update:an.update.text,canceledit:an.canceledit.text,excel:an.excel.text,pdf:an.pdf.text},noRecords:Ot,expandCollapseColumnHeader:""}},destroy:function(){var t,n=this;n._angularItems("cleanup"),n._destroyColumnAttachments(),ke.fn.destroy.call(n),this._navigatableTables=null,n._resizeHandler&&e(window).off("resize"+$e,n._resizeHandler),n.pager&&n.pager.element&&n.pager.destroy(),n.pager=null,n.groupable&&n.groupable.element&&n.groupable.element.kendoGroupable("destroy"),n.groupable=null,n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.selectable&&n.selectable.element&&(n.selectable.destroy(),n.clearArea(),n.options.persistSelection===!0&&(n._selectedIds=null),n.copyHandler&&(n.wrapper.off("keydown",n.copyHandler),n.unbind(n.copyHandler)),n.updateClipBoardState&&(n.unbind(n.updateClipBoardState),n.updateClipBoardState=null),n.clearAreaHandler&&n.wrapper.off("keyup",n.clearAreaHandler)),n.selectable=null,n.resizable&&(n.resizable.destroy(),n._resizeUserEvents&&(n._resizeHandleDocumentClickHandler&&e(document).off("click",n._resizeHandleDocumentClickHandler),n._resizeUserEvents.destroy(),n._resizeUserEvents=null),n.resizable=null),n._destroyVirtualScrollable(),n._destroyEditable(),n.dataSource&&(n.dataSource.unbind(rt,n._refreshHandler).unbind(Ne,n._progressHandler).unbind(Be,n._errorHandler),n._refreshHandler=n._progressHandler=n._errorHandler=null),t=n.element.add(n.wrapper).add(n.table).add(n.thead).add(n.wrapper.find(">.k-grid-toolbar")),n.content&&(t=t.add(n.content).add(n.content.find(">.k-virtual-scrollable-wrap"))),n.lockedHeader&&n._removeLockedContainers(),n.pane&&n.pane.destroy(),n.minScreenResizeHandler&&e(window).off("resize",n.minScreenResizeHandler),n._draggableInstance&&n._draggableInstance.element&&n._draggableInstance.destroy(),n._draggableInstance=null,t.off($e),fe.destroy(n.wrapper),n.rowTemplate=n.altRowTemplate=n.lockedRowTemplate=n.lockedAltRowTemplate=n.detailTemplate=n.footerTemplate=n.groupFooterTemplate=n.lockedGroupFooterTemplate=n.noRecordsTemplate=null,n.scrollables=n.thead=n.tbody=n.element=n.table=n.content=n.footer=n.wrapper=n.lockedTable=n.lockedContent=n.lockedHeader=n.lockedFooter=n._groupableClickHandler=n._groupRows=n._setContentWidthHandler=null},getOptions:function(){var n,i,r,o=this.options;return o.dataSource=null,n=Te(!0,{},this.options),n.columns=fe.deepExtend([],this.columns),i=this.dataSource,r=i.options.data&&i._data,i.options.data=null,n.dataSource=e.extend(!0,{},i.options),i.options.data=r,n.dataSource.data=r,n.dataSource.page=i.page(),n.dataSource.filter=i.filter(),n.dataSource.pageSize=i.pageSize(),n.dataSource.sort=i.sort(),n.dataSource.group=i.group(),n.dataSource.aggregate=i.aggregate(),n.dataSource.transport&&(n.dataSource.transport.dataSource=null),n.pageable&&n.pageable.pageSize&&(n.pageable.pageSize=i.pageSize()),n.$angular=t,n},setOptions:function(e){var t,n,i,r,o=this.getOptions();fe.deepExtend(o,e),e.dataSource||(o.dataSource=this.dataSource),t=this.wrapper,n=this._events,i=this.element,this.destroy(),this.options=null,this._isMobile&&(r=t.closest(fe.roleSelector("pane")).parent(),r.after(t),r.remove(),t.removeClass("k-grid-mobile")),t[0]!==i[0]&&(t.before(i),t.remove()),i.empty(),this.init(i,o,n),this._setEvents(o)},items:function(){return this.lockedContent?this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))):this._items(this.tbody)},_items:function(t){return t.children().filter(function(){var t=e(this);return!t.hasClass("k-grouping-row")&&!t.hasClass("k-detail-row")&&!t.hasClass("k-group-footer")})},dataItems:function(){var e,t,n,i=fe.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(e=i.length,t=Array(2*e),n=e;--n>=0;)t[n]=t[n+e]=i[n];i=t}return i},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead&&(this.angular("cleanup",function(){return{elements:t.thead.get()}}),t.thead.add(t.lockedHeader).find("th").each(function(){var t=e(this),n=t.data("kendoFilterMenu"),i=t.data("kendoColumnSorter"),r=t.data("kendoColumnMenu");n&&n.destroy(),i&&i.destroy(),r&&r.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,n,i=this,r=O(i.columns||[]);for(t=0,n=r.length;t .k-grid-content > table"):t.element.children("table"),n.length||(n=e("").appendTo(t.element))),nn&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,r,o,a,s,l,d,u=this,c=u.options.columnResizeHandleWidth,h=u.options.scrollable,p=u.resizeHandle,f=this._groups();if(p&&u.lockedContent&&p.data("th")[0]!==n[0]&&(p.off($e).remove(),p=null),p||(p=u.resizeHandle=e('
        '),t.append(p)),en)i=n.position().left,h&&(a=n.closest(".k-grid-header-wrap, .k-grid-header-locked"),s=tn.msie?a.scrollLeft():0,l=tn.webkit?a[0].scrollWidth-a[0].offsetWidth-a.scrollLeft():0,d=tn.mozilla?a[0].scrollWidth-a[0].offsetWidth-(a[0].scrollWidth-a[0].offsetWidth-a.scrollLeft()):0,i-=l-d+s);else{for(i=n[0].offsetWidth,r=V(n.closest("thead")).filter(":visible"),o=0;o0&&(i+=we(t.find(".k-group-cell:first"))*f),u._hasDetails()&&(i+=we(t.find(".k-hierarchy-cell:first")))}p.css({top:n.position().top,left:i-c,height:ye(n),width:3*c}).data("th",n).show(),p.off("dblclick"+$e).on("dblclick"+$e,function(){u._autoFitLeafColumn(n.data("index"))})},_positionColumnResizeHandle:function(){var n=this,i=n.lockedHeader?n.lockedHeader.find("thead:first"):e(); n.thead.add(i).on("mousemove"+$e,"th",function(i){var r=t!==i.buttons?i.buttons:i.which||i.button,o=e(this);o.hasClass("k-group-cell")||o.hasClass("k-hierarchy-cell")||t!==r&&0!==r||n._createResizeHandle(o.closest("div"),o)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off($e).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,n=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new fe.UserEvents(n.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,hold:function(n){var i=e(n.target);n.preventDefault(),i.addClass("k-column-active"),t._createResizeHandle(i.closest("div"),i),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=Ie(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},_resizable:function(){var t,n,i,r,a,s,l,d,u=this,c=u.options,h=this._isMobile,p=fe.support.mobileOS?0:fe.support.scrollbar();c.resizable&&(t=c.scrollable?u.wrapper.find(".k-grid-header-wrap:first"):u.wrapper,h?u._positionColumnResizeHandleTouch(t):u._positionColumnResizeHandle(t),u.resizable&&u.resizable.destroy(),u.resizable=new me.Resizable(t.add(u.lockedHeader),{handle:(c.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('
        ').css({height:ye(t.data("th"))+u.tbody.attr("clientHeight")})},start:function(t){var p,f,m,g;d=e(t.currentTarget).data("th"),h&&u._hideResizeHandle(),p=d.closest("table"),f=e.inArray(d[0],V(d.closest("thead")).filter(":visible")),s=p.parent().hasClass("k-grid-header-locked"),m=s?u.lockedTable:u.table,g=u.footer||e(),u.footer&&u.lockedContent&&(g=u.footer.children(s?".k-grid-footer-locked":".k-grid-footer-wrap")),o(u.wrapper,"col-resize"),l=c.scrollable?p.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")").add(m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")):m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")"),n=t.x.location,i=we(d),r=O(u.columns)[f].minResizableWidth||10,a=we(s?m.children("tbody"):u.tbody),tn.webkit&&u.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var o,h,f,m,g,v,_=en?-1:1,b=i+t.x.location*_-n*_;c.scrollable?(s&&u.lockedFooter?o=u.lockedFooter.children("table"):u.footer&&(o=u.footer.find(">.k-grid-footer-wrap>table")),o&&o[0]||(o=e()),h=d.closest("table"),f=s?u.lockedTable:u.table,m=!1,g=u.wrapper.width()-p,v=b,s&&a-i+v>g&&(v=i+(g-a-2*p),v<0&&(v=b),m=!0),v>10&&v>=r&&(l.css("width",v),a&&(v=m?g-2*p:a+t.x.location*_-n*_,f.add(h).add(o).css("width",v),s||(u._footerWidth=v))),u._scrollVirtualWrapperOnColumnResize()):b>10&&b>=r&&l.css("width",b)},resizeend:function(){var e,t,n,r=we(d);o(u.wrapper,""),tn.webkit&&u.wrapper.removeClass("k-grid-column-resizing"),i!=r&&(t=u.lockedHeader?u.lockedHeader.find("thead:first tr:first").add(u.thead.find("tr:first")):d.parent(),n=d.attr(fe.attr("index")),n||(n=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(d)),e=O(u.columns)[n],e.width=r,u.trigger(yt,{column:e,oldWidth:i,newWidth:r}),u._applyLockedContainersWidth(),u._syncLockedContentHeight(),u._syncLockedHeaderHeight()),u._hideResizeHandle(),d=null}}))},_draggable:function(){var t,n=this;n.options.reorderable&&(n._draggableInstance&&n._draggableInstance.destroy(),t=n.wrapper.children(".k-grid-header"),n._draggableInstance=n.wrapper.kendoDraggable({group:fe.guid(),autoScroll:!0,filter:n.content?".k-grid-header:first "+Ge:"table:first>.k-grid-header "+Ge,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+$e+"scrolling").bind("scroll"+$e+"scrolling",function(e){n.virtualScrollable?n.content.find(">.k-virtual-scrollable-wrap").scrollLeft(this.scrollLeft):n.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)})},dragend:function(){t.children(".k-grid-header-wrap").unbind("scroll"+$e+"scrolling")},drag:function(){n._hideResizeHandle()},hint:function(t){var n=t.attr(fe.attr("title"));return n&&(n=fe.htmlEncode(n)),e('
        ').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(n||t.attr(fe.attr("field"))||t.text()).prepend('')}}).data("kendoDraggable"))},_reorderable:function(){var t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(e,n){var i=S(t.columns);return i[e].lockable!==!1&&D(i,t.columns,e,n)>-1},inSameContainer:function(n){return e(n.source).parent()[0]===e(n.target).parent()[0]&&D(S(t.columns),t.columns,n.sourceIndex,n.targetIndex)>-1},change:function(e){var n=S(t.columns),i=n[e.oldIndex],r=D(n,t.columns,e.oldIndex,e.newIndex);t.trigger(xt,{newIndex:r,oldIndex:Ee(i,n),column:i}),t.reorderColumn(r,i,"before"===e.position)}}))},_reorderHeader:function(e,t,n){var i,r,o,l,d=this,u=y(e[0],d.columns),c=y(t,d.columns),h=[];for(i=0;ith.k-header:not(.k-group-cell,.k-hierarchy-cell)"),o=H(e).length,l=H([t]).length,h.length?(o>0&&0===l?_(e,t,h,d.columns,d.lockedHeader.find("thead"),d.thead,this._groups()):0===o&&l>0&&_(e,t,h,d.columns,d.thead,d.lockedHeader.find("thead"),this._groups()),(t.columns||u.cell-c.cell>1||c.cell-u.cell>1)&&(t=C(d.columns,t,e[0],n),t&&d._reorderHeader(h,t,n))):o!==l&&v(r[u.cell],d.columns,o),a(r,u.cell,c.cell,n,e.length)},_reorderContent:function(t,n,i){var r,o,l,d,u=this,c=e(),h=t[0],p=m(t),f=Ee(h,O(u.columns)),g=Ee(n,O(u.columns)),v=Ee(h,L(u.columns)),_=Ee(n,L(u.columns)),b=H(u.columns).length,k=!!n.locked,w=u.footer||u.wrapper.find(".k-grid-footer"),y=r=_;for(n.hidden&&(k?(_=u.lockedTable.find("colgroup"),y=u.lockedHeader.find("colgroup"),r=e(u.lockedFooter).find(">table>colgroup")):(_=u.tbody.prev(),y=u.thead.prev(),r=w.find(".k-grid-footer-wrap").find(">table>colgroup"))),u._hasFilterRow()&&a(u.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),f,g,i,t.length),a(s(u.lockedHeader,u.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),v,y,i,p.length),u.options.scrollable&&a(s(u.lockedTable,u.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),v,_,i,p.length),w&&w.length&&(a(s(u.lockedFooter,w.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),v,r,i,p.length),a(w.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),f,g,i,t.length)),o=u.tbody.children(":not(.k-grouping-row,.k-detail-row)"),u.lockedTable&&(b>g?b<=f&&ne(u.lockedTable.find(">tbody>tr.k-grouping-row"),u.table.find(">tbody>tr.k-grouping-row"),t.length):b>f&&ne(u.table.find(">tbody>tr.k-grouping-row"),u.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),c=u.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),l=0,d=o.length;ltd:not(.k-group-cell,.k-hierarchy-cell)"),f,g,i,t.length)},_autoFitLeafColumn:function(e){this.autoFitColumn(O(this.columns)[e])},autoFitColumn:function(t){var n,i,r,o,a,s,l,d,u,c,h,m,g,v,_,b,k,w,y,x,C=this,T=C.options,S=C.columns,D=C.lockedHeader?V(C.lockedHeader.find(">table>thead")).filter(p).length:0,E="col:not(.k-group-col):not(.k-hierarchy-col)",A="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?S[t]:Ce(t)?De(F(S),function(e){return e===t})[0]:De(F(S),function(e){return e.field===t})[0],t&&f(t)){for(s=t.minResizableWidth,n=Ee(t,O(S)),o=t.locked,r=o?C.lockedHeader.children("table"):C.thead.parent(),i=r.find("[data-index='"+n+"']"),u=o?C.lockedTable:C.table,c=C.footer||e(),C.footer&&C.lockedContent&&(c=C.footer.children(o?".k-grid-footer-locked":".k-grid-footer-wrap")),h=c.find("table").first(),C.lockedHeader&&!o&&(n-=D),m=0;m_&&(_=s),a.width(_),t.width=_,T.scrollable){for(b=r.find("col"),w=0,y=0,x=b.length;y td",function(t){var r=e(this),o=n.lockedTable&&r.closest("table")[0]===n.lockedTable[0];r.hasClass("k-hierarchy-cell")||r.hasClass("k-detail-cell")||r.hasClass("k-group-cell")||r.hasClass("k-edit-cell")||r.has("a.k-grid-delete").length||r.has("button.k-grid-delete").length||r.closest("tbody")[0]!==n.tbody[0]&&!o||e(t.target).is(":input")||(n.editable?n.editable.end()?(i&&e(be()).blur(),n.closeCell(),n.editCell(r)):n._scrollVirtualWrapper():n.editCell(r))}).on("focusin"+$e,function(){e.contains(this,be())||(clearTimeout(n.timer),n.timer=null)}).on("focusout"+$e,function(){n.timer=setTimeout(o,1)}):r.update!==!1&&(n.wrapper.on(Dt+$e,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),n._isVirtualInlineEditable()&&n.wrapper.on("focusout"+$e,"tr:not(.k-grouping-row) > td",function(){n.editable&&!n.editable.end()&&n._scrollVirtualWrapper()})),r.destroy!==!1?n.wrapper.on(Dt+$e,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(t){t.preventDefault(),t.stopPropagation(),n.removeRow(e(this).closest("tr"))}):n.wrapper.on(Dt+$e,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){e.stopPropagation(),n._confirmation()||e.preventDefault()}))},editCell:function(t){var n,i,r,o;if(t=e(t),n=this,i=O(n.columns)[n.cellIndex(t)],r=n._modelForContainer(t),n.closeCell(),r&&le(i,r)&&!i.command){if(n.trigger(Ye,{model:r}))return;n._attachModelChange(r),n._editContainer=t,n._shouldClearEditableState&&n._clearEditableState(),n.editable=t.addClass("k-edit-cell").kendoEditable({fields:{field:i.field,format:i.format,editor:i.editor,values:i.values},model:r,target:n,change:function(e){n.trigger(Qe,{values:e.values,container:t,model:r})&&e.preventDefault()},skipFocus:!(!n._isVirtualIncellEditable()||!n._editableState)}).data("kendoEditable"),o=t.parent().addClass("k-grid-edit-row"),n.lockedContent&&oe(o[0],n._relatedRow(o).addClass("k-grid-edit-row")[0]),n.trigger(Ke,{container:t,model:r})}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?fe.support.scrollbar():0;this.lockedContent.height(t.height()-n)},_syncLockedContentHeight:function(){this.lockedTable&&(this.touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var e,t;this.lockedHeader&&(e=this.lockedHeader.children("table"),t=this.thead.parent(),this._adjustRowsHeight(e,t),re(e,t))},_syncLockedFooterHeight:function(){this.lockedFooter&&this.footer&&this.footer.length&&this._adjustRowsHeight(this.lockedFooter.children("table"),this.footer.find(".k-grid-footer-wrap > table"))},_destroyEditable:function(){var e=this,t=function(){if(e.editable){var t=e.editView?e.editView.element:e._editContainer;t&&(t.off(Dt+$e,"a.k-grid-cancel",e._editCancelClickHandler),t.off(Dt+$e,"a.k-grid-update",e._editUpdateClickHandler)),e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView()}};e.editable&&("popup"!==e._editMode()||e._isMobile?t():e._editContainer.data("kendoWindow").bind("deactivate",t).close()),e._actionSheet&&(e._actionSheet.destroy(),e._actionSheet=null)},_destroyEditView:function(){this.editView&&(this.editView.purge(),this.editView=null,this.pane.navigate(""))},_attachModelChange:function(e){var t=this;t._modelChangeHandler=function(e){t._modelChange({field:e.field,model:this})},e.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t);n&&n.unbind(rt,e._modelChangeHandler)},closeCell:function(e){var t,n,i,r=this,o=r._editContainer;o&&(i=r._modelForContainer(o),e&&r.trigger("cancel",{container:o,model:i})||(r.trigger(it,{type:e?"cancel":"save",model:i,container:o}),o.removeClass("k-edit-cell"),t=O(r.columns)[r.cellIndex(o)],n=o.parent().removeClass("k-grid-edit-row"),r.lockedContent&&r._relatedRow(n).removeClass("k-grid-edit-row"),r._destroyEditable(),r._displayCell(o,t,i),r._shouldClearEditableState&&r._clearEditableState(),r.trigger("itemChange",{item:n,data:i,ns:me}),r.lockedContent&&oe(n.css("height","")[0],r._relatedRow(n).css("height","")[0])))},_displayCell:function(e,t,n){var i=this,r={storage:{},count:0},o=Te({},fe.Template,i.options.templateSettings),a=fe.template(i._cellTmpl(t,r),o);r.count>0&&(a=Ie(a,r.storage)),e.empty().html(a(n)),i.angular("compile",function(){return{elements:e,data:[{dataItem:n}]}})},removeRow:function(e){this._confirmation(e)&&this._removeRow(e)},_removeRow:function(t){var n,i,r,o=this,a=o._editMode();"incell"!==a&&o.cancelRow(),t=e(t),o.lockedContent&&(t=t.add(o._relatedRow(t))),t=t.hide(),n=o._modelForContainer(t),n&&!o.trigger(Xe,{row:t,model:n})?(o.options.persistSelection&&(i=o.dataSource.options.schema.model.id,r=n[i],delete o._selectedIds[r]),o.dataSource.remove(n),"inline"!==a&&"popup"!==a||o.dataSource.sync()):"incell"===a&&o._destroyEditable()},_editMode:function(){var e="incell",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e},editRow:function(t){var n,i,r,o=this;t instanceof ve?n=t:(t=e(t),n=o._modelForContainer(t)),i=o._editMode(),o.cancelRow(),n&&(t=o.tbody.children("["+fe.attr("uid")+"="+n.uid+"]"),o._attachModelChange(n),"popup"===i?o._createPopupEditor(n):"inline"===i?o._createInlineEditor(t,n):"incell"===i&&e(t).children(Pe).each(function(){var t=e(this),i=O(o.columns)[o.cellIndex(t)];if(n=o._modelForContainer(t),n&&(!n.editable||n.editable(i.field))&&i.field&&!i.selectable)return o.editCell(t),!1}),r=o.editView?o.editView.element:o._editContainer,r&&(this._editCancelClickHandler||(this._editCancelClickHandler=Ie(this._editCancelClick,this)),r.on(Dt+$e,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=Ie(this._editUpdateClick,this)),r.on(Dt+$e,"a.k-grid-update",this._editUpdateClickHandler)))},_editUpdateClick:function(e){e.preventDefault(),e.stopPropagation(),this.saveRow()},_editCancelClick:function(t){var n,i=this,r=i.options.navigatable,o=i.editable.options.model,a=i.editView?i.editView.element:i._editContainer;t.preventDefault(),t.stopPropagation(),i.trigger("cancel",{container:a,model:o})||(n=i.items().index(e(i.current()).parent()),i.cancelRow(),r&&(i._setCurrent(i.items().eq(n).children().filter(Ve).first()),se(i.table,!0)))},_createPopupEditor:function(n){var i,r,o,a,s,l,d,u,c,h,p,f,m,g=this,v="
        ',_=[],b=O(g.columns),k=g.options.editable,w=k.template,y=Ce(k)?k.window:{},x=Te({},fe.Template,g.options.templateSettings);if(!g.trigger(Ye,{model:n})){if(y=y||{},w)for(typeof w===It&&(w=window.unescape(w)),v+=fe.template(w,x)(n),o=0,a=b.length;o
        ",le(i,n)?(_.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),v+="
        '):(f={storage:{},count:0},s=fe.template(g._cellTmpl(i,f),x),f.count>0&&(s=Ie(s,f.storage)),v+='
        '+s(n)+"
        ")));r&&Ce(r)&&(Ce(r.text)&&(l=r.text.update,d=r.text.cancel),Ce(r.iconClass)&&(u=r.iconClass.update,c=r.iconClass.cancel),r.attr&&(p=r.attr)),g._isMobile?(v+="
        ",g.editView=g.pane.append("
        '+g._createButton({name:"update",text:l,attr:p})+(y.title||"Edit")+g._createButton({name:"canceledit",text:d,attr:p})+"
        "+v+"
        "),m=g._editContainer=g.editView.element.find(".k-popup-edit-form")):(v+='
        ',v+=g._createButton({name:"update",text:l,attr:p,iconClass:u})+g._createButton({name:"canceledit",text:d,attr:p,iconClass:c}),v+="
        ",m=g._editContainer=e(v).appendTo(g.wrapper).eq(0).kendoWindow(Te({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),g.trigger("cancel",{container:m,model:n}))return i.preventDefault(),t;var r=g.items().index(e(g.current()).parent());g.cancelRow(),g.options.navigatable&&(g._setCurrent(g.items().eq(r).children().filter(Ve).first()),se(g.table,!0))}}},y))),g.editable=g._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1,target:g}).data("kendoEditable"),g._isMobile&&m.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),g._openPopUpEditor(),g.trigger(Ke,{container:m,model:n})}},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,n){var i,r,o,a=this,s=[];a.trigger(Ye,{model:n})||(a.lockedContent&&(t=t.add(a._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(r=e(this),i=O(a.columns)[a.cellIndex(r)],!i.command&&le(i,n))s.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),r.attr(fe.attr("container-for"),i.field),r.empty();else if(i.command&&(o=ae(i.command,"edit"))){r.empty();var t,l,d,u,c;Ce(o)&&(Ce(o.text)&&(t=o.text.update,l=o.text.cancel),Ce(o.iconClass)&&(d=o.iconClass.update,u=o.iconClass.cancel),o.attr&&(c=o.attr)),e(a._createButton({name:"update",text:t,attr:c,iconClass:d})+a._createButton({name:"canceledit",text:l,attr:c,iconClass:u})).appendTo(r)}}),a._editContainer=t,a._editContainer.addClass("k-grid-edit-row"),a._shouldClearEditableState&&a._clearEditableState(),a.editable=new fe.ui.Editable(a._editContainer,{target:a,fields:s,model:n,skipFocus:!!(a._isVirtualInlineEditable()&&a._editableState&&a._editableState.field),clearContainer:!1}),t.length>1&&(oe(t[0],t[1]),a._applyLockedContainersWidth()),a.trigger(Ke,{container:t,model:n}))},cancelRow:function(e){var t,n=this,i=n._editContainer,r=n.virtualScrollable,o=r&&r._isScrolledToBottom();if(i){if(t=n._modelForContainer(i),!t||e&&n.trigger("cancel",{container:i,model:t}))return;n._destroyEditable(),n.dataSource.cancelChanges(t),n._isVirtualEditable()&&o&&n._restoreVirtualView(),n._clearEditableState(),n._displayRow("popup"!==n._editMode()?i:n.tbody.find("["+fe.attr("uid")+"="+t.uid+"]"))}},saveRow:function(){var t,n=this,i=this._editContainer,r=this._modelForContainer(i),o=e.Deferred();return i&&this.editable?(t=n.editable&&n.editable.end(),!t||this.trigger(Qe,{container:i,model:r})?(t||n._scrollVirtualWrapper(),o.reject().promise()):(n._clearEditableState(),this.dataSource.sync())):o.resolve().promise()},_displayRow:function(t){var n,i,r,o,a,s=this,l=s._modelForContainer(t),d=t.hasClass("k-state-selected"),u=t.hasClass("k-alt");l&&(s.lockedContent&&(n=e((u?s.lockedAltRowTemplate:s.lockedRowTemplate)(l)),s._relatedRow(t.last()).replaceWith(n)),s.angular("cleanup",function(){return{elements:t.get()}}),i=e((u?s.altRowTemplate:s.rowTemplate)(l)),t.is(":visible")||i.hide(),t.replaceWith(i),s.trigger("itemChange",{item:i,data:l,ns:me}),n&&n.length&&s.trigger("itemChange",{item:n,data:l,ns:me}),o=i,a=[{dataItem:l}],n&&n.length&&(o=i.add(n),a.push({dataItem:l})),s.angular("compile",function(){return{elements:o.get(),data:a}}),d&&(s.options.selectable||s._checkBoxSelection)&&s.select(i.add(n)),n&&oe(i[0],n[0]),r=i.next(),r.hasClass("k-detail-row")&&r.is(":visible")&&i.find(".k-hierarchy-cell .k-icon").removeClass("k-i-expand").addClass("k-i-collapse"))},_showMessage:function(t,n){var i,r,o,a=this;return a._isMobile?(i=fe.template(''),r=e(i(t)).appendTo(a.view.element),o=a._actionSheet=new fe.mobile.ui.ActionSheet(r,{cancel:t.cancelDelete,cancelTemplate:'
      • #:cancel#
      • ',close:function(){this.destroy()},command:function(t){var i=e(t.currentTarget).parent();i.hasClass("km-actionsheet-cancel")||a._removeRow(n)},popup:a._actionSheetPopupOptions}),o.open(n),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===It?t.options.messages.editable.confirmation:n.confirmation;return Ce(n)&&typeof n.mode===It&&typeof i!==At&&typeof i!==It&&i!==!1&&(i=t.options.messages.editable.confirmation),i===!1||null==i||(typeof i===At&&(i=i(t._modelForContainer(e))),t._showMessage({confirmDelete:n.confirmDelete||t.options.messages.editable.confirmDelete,cancelDelete:n.cancelDelete||t.options.messages.editable.cancelDelete,title:i===!0?t.options.messages.editable.confirmation:i},e))},cancelChanges:function(){var e=this;e.dataSource.cancelChanges(),e._isVirtualEditable()&&e._virtualPageToTop(function(){e.virtualScrollable.scrollToTop()})},saveChanges:function(){var e=this,t=e.editable&&e.editable.end();!t&&e.editable||e.trigger(st)?t||e._scrollVirtualWrapper():e.dataSource.sync()},addRow:function(){var e,t,n=this,i=n.dataSource,r=n._editMode(),o=n.options.editable.createAt||"",a=i.pageSize(),s=i.view()||[],l=o.toLowerCase()===Rt,d=n._isVirtualEditable();n.editable&&n.editable.end()||!n.editable?("incell"!=r&&n.cancelRow(),e=i.indexOf(s[0]),l&&(e+=s.length,a&&!i.options.serverPaging&&a<=s.length&&(e-=1)),e<0&&(e=i.page()>i.totalPages()?(i.page()-1)*a:0),n.options.navigatable&&"incell"==r&&n._removeCurrent(),d?n._virtualAddRow():(t=i.insert(e,{}),n._editModel(t))):n._scrollVirtualWrapper()},_editModel:function(e){var t,n,i,r,o=this,a=o.options.editable.createAt||"",s=o._editMode();e&&(t=e.uid,n=o.lockedContent?o.lockedTable:o.table,i=n.find("tr["+fe.attr("uid")+"="+t+"]"),r=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(o._firstEditableColumnIndex(i)),"inline"===s&&i.length?o.editRow(i):"popup"===s?o.editRow(e):r.length&&o.editCell(r),"bottom"==a.toLowerCase()&&o.lockedContent&&(o.lockedContent[0].scrollTop=o.content[0].scrollTop=o.table[0].offsetHeight))},_virtualAddRow:function(){var e=this,t=(e.options.editable.createAt||"").toLowerCase()===Rt;e._clearEditableState(),t?e._virtualAddRowAtBottom():e._virtualAddRowAtTop()},_virtualAddRowAtTop:function(){var e,t=this,n=t.dataSource,i=t.virtualScrollable;1===n.page()?(e=n.insert(0,{}),t._editModel(e),i.scrollToTop()):t._virtualPageToTop(function(){e=n.insert(0,{}),t._editModel(e),i.scrollToTop()})},_virtualAddRowAtBottom:function(){var e,t=this,n=t.dataSource,i=t.virtualScrollable,r=n.total();n.at(r-1)instanceof ve?(e=n.insert(r,{}),t._virtualPageToBottom(function(){t._editModel(e),i.scrollToBottom()})):t._virtualPageToBottom(function(){e=n.insert(r,{}),t._editModel(e),i.scrollToBottom()})},_virtualPageToTop:function(e){var t=this;t._virtualPage(0,t.dataSource.take(),function(){e()})},_virtualPageToBottom:function(e){var t=this,n=t.dataSource,i=n.take(),r=n.total(),o=r>i?r-i:0;t._virtualPage(o,i,function(){e()})},_virtualPage:function(e,t,n){var i=this;i._isVirtualEditable()&&(i.virtualScrollable._preventScroll=!0,i.virtualScrollable._page(e,t,n))},_restoreVirtualView:function(){var e=this,t=e.dataSource,n=e.virtualScrollable,i=n.verticalScrollbar,r=n.wrapper,o=t.take(),a=t.total(),s=t.currentRangeStart(),l=a>=o?He.min(s,a-o):s,d=n.itemHeight,u=i.scrollTop()/d;e._virtualPage(l,o,function(){var e=n.itemHeight,t=u*e;n._isScrolledToBottom()?n.scrollToBottom():(n._preventScroll=i.scrollTop()!==t,i.scrollTop(t),r.scrollTop(i.scrollTop()-l*e))})},_firstEditableColumnIndex:function(e){var t,n,i,r=this,o=O(r.columns),a=r._modelForContainer(e);for(n=0,i=o.length;n').html(r({})).prependTo(i),n.angular("compile",function(){return{elements:t.get()}})),o&&o.create!==!1&&t.on(Dt+$e,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(Dt+$e,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(Dt+$e,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}),t.on(Dt+$e,".k-grid-excel",function(e){e.preventDefault(),n.saveAsExcel()}),t.on(Dt+$e,".k-grid-pdf",function(e){e.preventDefault(),n.saveAsPDF()}))},_toolbarTmpl:function(e){var t,n,i=this,r="";if(Fe(e))for(t=0,n=e.length;t0||this.wrapper.find(".k-grid-footer").length>0},_groupable:function(){var t=this;t._groupableClickHandler?t.table.add(t.lockedTable).off(Dt+$e,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),r=i.closest("tr"),o=t._groupRows?t._groupRows[t.wrapper.find(".k-grouping-row").index(r)]:{};i.hasClass("k-i-collapse")?t.trigger("groupCollapse",{group:o,element:r})||t.collapseGroup(r):t.trigger("groupExpand",{group:o,element:r})||t.expandGroup(r),n.preventDefault(),n.stopPropagation()},t._isLocked()?t.lockedTable.on(Dt+$e,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(Dt+$e,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,n=t.wrapper,i=t.options.groupable,r=Ge+"["+fe.attr("field")+"]",o=t.content?".k-grid-header:first "+r:"table:first>.k-grid-header "+r;i&&i.enabled!==!1&&(n.has("div.k-grouping-header")[0]||e("
         
        ").addClass("k-grouping-header").prependTo(n),t.groupable&&t.groupable.destroy(),t.groupable=new me.Groupable(n,Te({},i,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:o,filter:o,allowDrag:t.options.reorderable,change:function(e){t.trigger("group",{groups:e.groups})?e.preventDefault():(t._clearEditableState(),t.dataSource.options.endless&&(t.dataSource.options.endless=null,t._endlessPageSize=t.dataSource.options.pageSize,t.dataSource.pageSize(t.dataSource.options.pageSize)))}})))},_continuousItems:function(t,n){var i,r,o,a,s,l,d,u;if(this.lockedContent){for(i=this,r=i.table.add(i.lockedTable),o=e(t,r[0]),a=e(t,r[1]),s=n?H(i.columns).length:1,l=n?i.columns.length-s:1,d=[],u=0;u"+(i?Le:"tbody>tr"+s),a.selectable=new fe.ui.Selectable(r,{filter:o,aria:!0,multiple:n,change:function(){a.options.persistSelection&&!i&&a._persistSelectedRows(),a.trigger(rt)},useAllItems:l&&n&&i,relatedTarget:function(t){var n,r,o,s;if(!i&&l){for(r=e(),o=0,s=t.length;o-1&&!s.is(".k-edit-cell,.k-header")&&s.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(o.preventDefault(),o.stopPropagation(),s=i?s:s.parent(),l&&!i&&(s=s.add(a._relatedRow(s))),n)if(o.ctrlKey){if(s.hasClass(_t))return s.removeClass(_t),a.trigger(rt),t}else a.selectable.clear();else a.selectable.clear();i||(a.selectable._lastActive=s),a.selectable.value(s)}else!i&&(o.shiftKey&&o.keyCode==xe.LEFT||o.shiftKey&&o.keyCode==xe.RIGHT||o.shiftKey&&o.keyCode==xe.UP||o.shiftKey&&o.keyCode==xe.DOWN||o.keyCode===xe.SPACEBAR&&o.shiftKey)&&(o.preventDefault(),o.stopPropagation(),s=s.parent(),l&&(s=s.add(a._relatedRow(s))),n?(a.selectable._lastActive||(a.selectable._lastActive=s),a.selectable.selectRange(a.selectable._firstSelectee(),s)):(a.selectable.clear(),a.selectable.value(s)))}))},_clipboard:function(){var e,t=this.options,n=t.selectable;n&&t.allowCopy&&(e=this,t.navigatable||e.table.add(e.lockedTable).attr("tabindex",0).on("mousedown"+$e+" keydown"+$e,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}).on("mousedown"+$e,Oe+">"+Ve,Ie(ue,e)),e.copyHandler=Ie(e.copySelection,e),e.updateClipBoardState=function(){e.areaClipBoard&&e.areaClipBoard.val(e.getTSV()).focus().select()},e.bind("change",e.updateClipBoardState),e.wrapper.on("keydown",e.copyHandler),e.clearAreaHandler=Ie(e.clearArea,e),e.wrapper.on("keyup",e.clearAreaHandler))},copySelection:function(t){t instanceof jQuery.Event&&!t.ctrlKey&&!t.metaKey||e(t.target).is("input:visible,textarea:visible")||window.getSelection&&""+window.getSelection()||document.selection&&document.selection.createRange().text||(this.areaClipBoard||(this.areaClipBoard=e("
        ",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"\n").replace(/<(ul|ol)([^>]*)>
      • \n/gi,"
        \n").replace(/\n$/,"")}}),n.ui.editor.ViewHtmlCommand=d,r.EditorUtils.registerTool("viewHtml",new s({command:d,template:new l({template:o.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/format.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Tool,o=i.Command,a=i.EditorUtils,s=o.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&a.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),o.fn.init.call(this,e)}}),l=r.extend({init:function(e){r.fn.init.call(this,e)},command:function(e){var t=this;return new s(n(e,{formatter:t.options.formatter}))},update:function(e,t){var n=this.options.finder.isFormatted(t);e.toggleClass("k-state-selected",n),e.attr("aria-pressed",n)}});e.extend(i,{FormatCommand:s,FormatTool:l})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/inlineformat.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=t.ui.Editor.fn.options.formats,o=i.EditorUtils,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,u=i.RangeUtils,c=e.extend,h=i.EditorUtils.registerTool,p=i.EditorUtils.registerFormat,f=function(e){e.preventDefault()},m="mousedown.kendoEditor",g="keydown.kendoEditor",v="k-marker",_=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,r=0,o=e.parentNode;for(t=o.firstChild;t;t=t.nextSibling)t!=e&&(t.className==v?r++:3==t.nodeType?n++:i++);return r>1&&o.firstChild.className==v&&o.lastChild.className==v?0:i+n},findSuitable:function(e,t){var n,i;if(!t&&this.numberOfSiblings(e)>0)return null;for(n=e.parentNode,i=this.format[0].tags;!d.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,r,o,a=this.format,s=d.attrEquals;for(t=0,n=a.length;t0&&this.activate(e,n)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,r,o=[],a=this.attributes,s=a?a.style||{}:{};for(t=0,n=e.length;t0)for(t=0;t1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==v&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),k=_.extend({init:function(e,t){this.format=e,this.greedyProperty=t,_.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,r,o,a,s,l,u,c,h,p,f,m=t.attributes,g=e.trim;if(m)for(n=0,i=m.length;n=0?d.toHex(f):f}},getFormatInner:function(t){var n,i,r,o=e(d.isDataNode(t)?t.parentNode:t),a=o.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=a.length;n
        ")({messages:this.editor.options.messages})},exec:function(){var t,n,i,r,o=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables(),t=v(this._range),n=t.length?this.formatter.finder.findSuitable(t[0]):null,i=t.length&&"img"==d.name(t[0]),r=this.createDialog(this._dialogTemplate(),{title:o.createLink,close:s(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),t=v(this._range)),this._initialText=this.linkText(t),r.find(".k-dialog-insert").click(s(this._apply,this)).end().find(".k-dialog-close").click(s(this._close,this)).end().find(".k-edit-field input").keydown(s(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n?n.title:"").end().find("#k-editor-link-target").attr("checked",!!n&&"_blank"==n.target).end().find(".k-editor-link-text-row").toggle(!i),this._dialog=r.data("kendoWindow").center().open(),e("#k-editor-link-url",r).focus().select()},_keydown:function(e){var t=r.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var n,i,r,o=this._dialog.element,a=e("#k-editor-link-url",o).val(),s=e("#k-editor-link-text",o);a&&a!=w&&(a.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(a)&&(a="mailto:"+a),this.attributes={href:a},n=e("#k-editor-link-title",o).val(),n&&(this.attributes.title=n),s.is(":visible")&&(i=s.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerHTML=d.stripBom(i)):this.attributes.innerHTML=a),r=e("#k-editor-link-target",o).is(":checked"),this.attributes.target=r?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),d.windowFromDocument(u.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):w},linkText:function(e){var t,n="";for(t=0;t-1)return this.end.node=t,this.end.offset=i+1,!1},_detectStart:function(e,t){var i=n(e,/\s/),r=i+1;if(this.text=e.substring(r)+this.text,this.start.node=t,this.start.offset=r,i>-1)return!1},_skipStartPuntuation:function(e,t,n){var r=i(e,/\w/),o=r;if(r===-1&&(o=e.length),this.text=this.text.substring(o),this.start.node=t,this.start.offset=o+(0|n),r>-1)return!1}}),I=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},R=o.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?d.isDataNode(this.node)&&this.node.length||0:n.offset,this.cancelAtNode=n.cancelAtNode||this.cancelAtNode||e.noop},traverse:function(e){e&&(this.cancel=!1,this._traverse(e,this.node,this.offset))},_traverse:function(e,n,i){var r,o,a,s;if(n&&!this.cancel){if(3!==n.nodeType)return o=this.edgeNode(n),this.cancel=this.cancel||this.cancelAtNode(o),this._traverse(e,o);if(r=n.data,i!==t&&(r=this.subText(r,i)),this.cancel=e(r,n,i)===!1,a=this.next(n),!a)for(s=n.parentNode;!a&&d.isInline(s);)a=this.next(s),s=s.parentNode;this.cancel=this.cancel||this.cancelAtNode(a),this._traverse(e,a)}},extendOptions:function(t){return e.extend({node:this.node,offset:this.offset,cancelAtNode:this.cancelAtNode},t||{})},edgeNode:function(e){},next:function(e){},subText:function(e,t){}}),M=R.extend({subText:function(e,t){return e.substring(0,t)},next:function(e){return e.previousSibling},edgeNode:function(e){return e.lastChild},clone:function(e){var t=this.extendOptions(e);return new M(t)}}),z=R.extend({subText:function(e,t){return e.substring(t)},next:function(e){return e.nextSibling},edgeNode:function(e){return e.firstChild},clone:function(e){var t=this.extendOptions(e);return new z(t)}});a(r.ui.editor,{LinkFormatFinder:C,LinkFormatter:T,UnlinkCommand:S,LinkCommand:D,AutoLinkCommand:F,UnlinkTool:E,DomTextLinkDetection:A,LeftDomTextTraverser:M,RightDomTextTraverser:z}),b("createLink",new p({key:"K",ctrl:!0,command:D,template:new f({template:c.buttonTemplate,title:"Create Link"})})),b("unlink",new E({key:"K",ctrl:!0,shift:!0,template:new f({template:c.buttonTemplate,title:"Remove Link"})})),b("autoLink",new p({key:[k.ENTER,k.SPACEBAR],keyPressCommand:!0,command:F}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatblock.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t,n=window.kendo,i=n.Class,r=e.extend,o=n.ui.editor,a=n.ui.Editor.fn.options.formats,s=o.Dom,l=o.ToolTemplate,d=o.FormatTool,u=o.EditorUtils,c=u.registerTool,h=u.registerFormat,p=o.RangeUtils,f=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,r;for(n=0,i=t.length;n=0&&!(r=s.ofType(t[n],a[o].tags)?t[n]:s.closestEditableOfType(t[n],a[o].tags));o--);if(!r||"true"===r.contentEditable)return[];e.inArray(r,l)<0&&l.push(r)}for(this._resolveListsItems(l),n=0,i=l.length;n=0;a--)l=i.immutableParent(e[a]),l&&(l!==e[a+1]&&(t?s.attr(l,n.attr):s.unstyle(l,n.attr.style)),e.splice(a,1))},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,n,i,r,o;for(this._handleImmutables(e,!1),t=0,n=e.length;t=0?new i.GreedyInlineFormatter(a):new i.GreedyBlockFormatter(a),t.editor=n.editor,t}})},initialize:function(e,t){var i=t.editor,o=this.options,a=o.name,s=this;s.editor=i,e.width(o.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:o.items||i.options[a],title:i.options.messages[a],autoSize:!0,change:function(){var e=this.dataItem();e&&r.exec(i,a,e.toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e#:data.text#')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+a).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){var i,r,o,a,s,l,d;for(i=0;i=0;t--)n=e[t],this.immutableParent(n)||this.clean(n);this.releaseRange(i)},clean:function(n){var r,o,a,s,d;if(n&&!l.isMarker(n)){if(r=l.name(n),"ul"==r||"ol"==r)for(o=new i.ListFormatter(r),a=n.previousSibling,s=n.nextSibling,o.unwrap(n);a&&a!=s;a=a.nextSibling)this.clean(a);else if("blockquote"==r)l.changeTag(n,"p");else if(1!=n.nodeType||l.insignificant(n))t(n);else{for(d=n.childNodes.length-1;d>=0;d--)this.clean(n.childNodes[d]);n.removeAttribute("style"),n.removeAttribute("class")}e.inArray(r,this.tagsToClean)>-1&&l.unwrap(n)}},immutableParent:function(e){return this.immutables()&&i.Immutables.immutableParent(e)}});e.extend(i,{FormattingTool:h,CleanFormatCommand:p}),c("formatting",new h({template:new o({template:d.dropDownListTemplate,title:"Format"})})),c("cleanFormatting",new r({command:p,template:new o({template:d.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/image.min",["kendo.imagebrowser.min","editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,u=r.Command,c=n.keys,h="#k-editor-image-url",p="#k-editor-image-title",f="#k-editor-image-width",m="#k-editor-image-height",g=u.extend({init:function(e){var t=this;u.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,r=d.documentFromRange(t);if(i.src&&"http://"!=i.src){if(n=function(){setTimeout(function(){i.width||e.removeAttribute("width"),i.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=a.create(r,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(r.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;e.onload=e.onerror=n,a.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('
        # if (showBrowser) { #
        # } #
        ')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=parseInt(t.find(f).val(),10),i=parseInt(t.find(m).val(),10);g.attributes={src:t.find(h).val().replace(/ /g,"%20"),alt:t.find(p).val()},g.attributes.width=null,g.attributes.height=null,!isNaN(n)&&n>0&&(g.attributes.width=n),!isNaN(i)&&i>0&&(g.attributes.height=i),_=g.insertImage(b,v),r(e),g.change&&g.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),_||g.releaseRange(v)}function o(t){t.keyCode==c.ENTER?e(t):t.keyCode==c.ESC&&r(t)}var s,l,u,g=this,v=g.lockRange(),_=!1,b=d.image(v),k=b&&b.getAttribute("width")||"",w=b&&b.getAttribute("height")||"",y=n.support.browser.msie,x=g.editor.options,C=x.messages,T=x.imageBrowser,S=!!(n.ui.ImageBrowser&&T&&T.transport&&T.transport.read!==t),D={title:C.insertImage,visible:!1,resizable:S};this.expandImmutablesIn(v),D.close=r,S&&(D.width=750),s=this.createDialog(g._dialogTemplate(S),D).toggleClass("k-filebrowser-dialog",S).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(h).val(b?b.getAttribute("src",2):"http://").end().find(p).val(b?b.alt:"").end().find(f).val(k).end().find(m).val(w).end().data("kendoWindow"),l=s.element,S&&(this._imageBrowser=new n.ui.ImageBrowser(l.find(".k-imagebrowser"),i({},T)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(h).val(this.value())}),this._imageBrowser.bind("apply",e)),y&&(u=l.closest(".k-window").height(),l.css("max-height",u)),s.center().open(),l.find(h).focus().select()}});n.ui.editor.ImageCommand=g,s("insertImage",new r.Tool({command:g,template:new l({template:o.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/import.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.EditorUtils,s=o.Command,l=o.Tool,d=a.registerTool,u=o.ToolTemplate,c='
        ',h=s.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options["import"],o=e('').kendoUpload({success:r(t._onUploadSuccess,t),progress:r(t._onUploadProgress,t),select:r(t._onUploadSelect,t),error:r(t._onUploadError,t),complete:r(t._onUploadComplete,t),showFileList:!1,multiple:!1,async:{saveUrl:i.proxyUrl,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return n._uploadWidget=o,o},_onUploadComplete:function(e){this._trigger("complete",e),e.sender.clearAllFiles(),this._removeLoadingOverlay()},_onUploadSuccess:function(e){this.editor.value(e.response.html.replace(/<\/?body>/gi,"")),this._trigger("success",e)},_onUploadProgress:function(e){this._trigger("progress",e)},_onUploadSelect:function(e){this._trigger("select",e),e.files[0].validationErrors||this._initLoadingOverlay()},_onUploadError:function(e){this._trigger("error",e)},_trigger:function(e,t){var n=this.editor,i=n.options["import"];"function"==typeof i[e]&&i[e].call(n,t)},_initLoadingOverlay:function(){var t=this.editor.body;o.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(c):this._container=e(t).append(c),n.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){n.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});i(o,{ImportCommand:h}),d("import",new l({command:h,template:new u({template:a.buttonTemplate,title:"Import"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/insert.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.GenericCommand,o=n.EditorUtils,a=o.registerTool,s=n.Tool,l=n.ToolTemplate,d=n.RestorePoint,u=e.extend,c=i.extend({init:function(e){i.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e,t=this.editor,n=this.options,i=n.range,o=t.body,a=new d(i,o),s=n.html||n.value||"";t.selectRange(i),t.clipboard.paste(s,n),n.postProcess&&n.postProcess(t,t.getRange()),e=new r(a,new d(t.getRange(),o)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),h=s.extend({initialize:function(e,t){var i=t.editor,r=this.options,o=r.items?r.items:i.options.insertHtml;this._selectBox=new n.SelectBox(e,{dataSource:o,dataTextField:"text",dataValueField:"value",change:function(){s.exec(i,"insertHtml",this.value())},title:i.options.messages.insertHtml,highlightFirst:!1})},command:function(e){return new c(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});u(n,{InsertHtmlCommand:c,InsertHtmlTool:h}),a("insertHtml",new h({template:new l({template:o.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/export.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.EditorUtils,s=o.Command,l=o.Tool,d=a.registerTool,u=o.ToolTemplate,c=[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}],h=s.extend({init:function(e){var t=this;t.options=e,s.fn.init.call(t,e),t.attributes=null,t.exportType=e.exportType},exec:function(){var e=this,t=this.lockRange(!0);e.postToProxy(),e.releaseRange(t)},postToProxy:function(){this.generateForm().appendTo("body").submit().remove()},generateForm:function(){var t=this,n=t.editor.options.exportAs,i=e("").attr({action:n&&n.proxyURL||"",method:"POST"});return i.append([t.valueInput(),t.exportTypeInput(),t.fileNameInput()]),i},valueInput:function(){var t=this.editor;return e("").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){var t=this;return e("").attr({value:t.exportType,name:"exportType",type:"hidden"})},fileNameInput:function(){var t=this.editor,n=t.options.exportAs,i=n&&n.fileName||t.element.attr("id")||"editor";return e("").attr({value:i,name:"fileName",type:"hidden"})}}),p=l.extend({init:function(e){var t=this;l.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoSelectBox"},options:{items:c,width:115},command:function(e){var t=e.value;return new o.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var i=this,o=t.editor,a=i.options,s=a.name,l=r(i.changeHandler,i),d=a.items||o.options[s];d.unshift({text:o.options.messages[s],value:""}),i.editor=o,e.width(a.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:d,autoSize:!0,change:l,open:function(e){var t=e.sender;t.items()[0].style.display="none",t.unbind("open")},highlightFirst:!1,template:n.template('#:data.text#')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+s).find("*").addBack().attr("unselectable","on")},changeHandler:function(e){var t=e.sender,n=t.dataItem(),i=n&&n.value;this._exec(i),t.value("")},_exec:function(e){e&&l.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});i(o,{ExportAsTool:p,ExportAsCommand:h}),d("exportAs",new p({template:new u({template:a.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/indent.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){function n(n,i){var r="rtl"==e(n).css("direction"),o=r?"Right":"Left",a="td"!=s.name(n)?"margin"+o:"padding"+o;return i===t?n.style[a]||0:(i>0?n.style[a]=i+"px":(n.style[a]="",n.style.cssText||n.removeAttribute("style")),t)}var i=window.kendo,r=i.Class,o=e.extend,a=i.ui.editor,s=a.Dom,l=a.EditorUtils,d=l.registerTool,u=a.Command,c=a.Tool,h=a.ToolTemplate,p=a.RangeUtils,f=s.blockElements,m=a.BlockFormatFinder,g=a.BlockFormatter,v=r.extend({init:function(){this.finder=new m([{tags:s.blockElements}])},apply:function(t){var i,r,o,a,l,d,u,c,h,p,f,m;if(t=s.filterBy(t,s.htmlIndentSpace,!0),i=this.finder.findSuitable(t),r=[],i=this.mapImmutables(i),i.length){for(o=0,a=i.length;o1||n(c.parentNode))||s.ofType(c,["ul","ol"])&&l>0),o)return i.removeClass("k-state-disabled"),t;i.addClass("k-state-disabled").removeClass("k-state-hover")}});o(a,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:k}),d("indent",new c({command:_,template:new h({template:l.buttonTemplate,title:"Indent"})})),d("outdent",new k({command:b,template:new h({template:l.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/linebreak.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Dom,o=i.Command,a=i.Tool,s=i.BlockFormatter,l=r.normalize,d=i.RangeUtils,u=i.EditorUtils.registerTool,c=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=r.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){var n,i;if(r.isEmpty(t))e.setStartBefore(t);else{if(e.selectNodeContents(t),n=d.textNodes(e)[0],!n){for(;t.childNodes.length&&!r.is(t.firstChild,"br");)t=t.firstChild;n=t}r.isEmpty(n)?e.setStartBefore(n):(r.emptyNode(n)&&(n.innerHTML="\ufeff"),i=n.firstChild||n,r.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=r.parentOfType(e.startContainer,t),i=r.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(r.isMarker(e)||""===r.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,o,a,u,c,h,p,f,m,g,v,_,b,k=this.getRange(),w=d.documentFromRange(k),y=i.emptyElementContent;this.expandImmutablesIn(k),m=this.shouldTrim(k),k.deleteContents(),u=this._insertMarker(w,k),r.stripBomNode(u.previousSibling),r.stripBomNode(u.nextSibling),c=r.closestEditableOfType(u,["li"]),h=r.closestEditableOfType(u,"h1,h2,h3,h4,h5,h6".split(",")),p=r.is(u.parentNode,"table")&&u.parentNode,c?r.emptyNode(c)&&(a=r.create(w,"p"),r.next(c)&&(f=k.cloneRange(),f.selectNode(c),d.split(f,c.parentNode)),g=e("br",c),1==g.length&&g.remove(),v=c.parentNode,_=c.parentNode.children.length,b=_>1&&1==c.childNodes.length&&c.children[0],r.insertAfter(a,v),r.remove(1==_?c.parentNode:c),b&&b!==u?(a.appendChild(b),a.appendChild(u)):a.innerHTML=y,o=a):h&&this._blankAfter(u)?(a=this._insertParagraphAfter(h),r.remove(u),o=a):p&&(a=this._insertParagraphAfter(p),r.remove(u),o=a),o||(c||h||new s([{tags:["p"]}]).apply([u]),k.selectNode(u),t=r.parentOfType(u,[c?"li":h?r.name(h):"p"]),d.split(k,t,m),n=t.previousSibling,r.is(n,"li")&&n.firstChild&&!r.is(n.firstChild,"br")&&(n=n.firstChild),o=t.nextSibling,this.clean(n),this.clean(o,{links:!0}),r.is(o,"li")&&o.firstChild&&!r.is(o.firstChild,"br")&&(o=o.firstChild),r.remove(t),l(n)),l(o),this._moveFocus(k,o),k.collapse(!0),r.scrollTo(o,!0),d.selectRange(k)},_insertParagraphAfter:function(e){var t=this.getRange(),n=d.documentFromRange(t),o=i.emptyElementContent,a=r.create(n,"p");return r.insertAfter(a,e),a.innerHTML=o,a},clean:function(t,n){var o,a=t;if(t.firstChild&&r.is(t.firstChild,"br")&&r.remove(t.firstChild),r.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(o=!1;t.firstChild&&1==t.firstChild.nodeType;)o=o||r.significantNodes(t.childNodes).length>1, t=t.firstChild;if(r.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||o||(e(a).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=a;){if(r.is(t,"a")&&r.emptyNode(t)){r.unwrap(t);break}t=t.parentNode}}}}),h=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},exec:function(){var e,n,i,o,a,s,u=this.getRange();this.expandImmutablesIn(u),e=r.create(d.documentFromRange(u),"br"),n=u.startContainer,o=t.support.browser,a=o.msie&&o.version<11,s=r.is(n,"table")&&n,u.deleteContents(),s?r.insertAfter(e,s):u.insertNode(e),l(e.parentNode),a||e.nextSibling&&!r.isWhitespace(e.nextSibling)||(i=e.cloneNode(!0),i.className="k-br",r.insertAfter(i,e)),u.setStartAfter(e),u.collapse(!0),r.scrollTo(e.nextSibling||e,!0),d.selectRange(u)}});n(i,{ParagraphCommand:c,NewLineCommand:h}),u("insertLineBreak",new a({key:13,shift:!0,command:h})),u("insertParagraph",new a({key:13,command:c}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/file.min",["kendo.filebrowser.min","editor/plugins/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,u=r.Command,c=r.LinkFormatter,h=d.textNodes,p=n.keys,f="#k-editor-file-url",m="#k-editor-file-text",g="#k-editor-file-title",v=u.extend({init:function(e){var t=this;u.fn.init.call(t,e),t.formatter=new c,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=d.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=a.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,e.title=n.title,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('
        # if (showBrowser) { #
        # } #
        ')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();this.formatter.apply(t,this.attributes),e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=t.find(f).val().replace(/ /g,"%20"),i=t.find(m).val(),o=t.find(g).val();c.attributes={href:n,innerHTML:""!==i?i:n,title:o},b=c.insertFile(k,v),r(e),c.change&&c.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),b||c.releaseRange(v)}function o(t){t.keyCode==p.ENTER?e(t):t.keyCode==p.ESC&&r(t)}var s,l,u,c=this,v=c.lockRange(),_=h(v),b=!1,k=_.length?this.formatter.finder.findSuitable(_[0]):null,w=n.support.browser.msie,y=c.editor.options,x=y.messages,C=y.fileBrowser,T=!!(n.ui.FileBrowser&&C&&C.transport&&C.transport.read!==t),S={title:x.insertFile,visible:!1,resizable:T};this.expandImmutablesIn(v),S.close=r,T&&(S.width=750),s=this.createDialog(c._dialogTemplate(T),S).toggleClass("k-filebrowser-dialog",T).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(f).val(k?k.getAttribute("href",2):"http://").end().find(m).val(k?k.innerText:"").end().find(g).val(k?k.title:"").end().data("kendoWindow"),l=s.element,T&&(c._fileBrowser=new n.ui.FileBrowser(l.find(".k-filebrowser"),i({},C)),c._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(f).val(this.value())}),c._fileBrowser.bind("apply",e)),w&&(u=l.closest(".k-window").height(),l.css("max-height",u)),s.center().open(),l.find(f).focus().select()}});n.ui.editor.FileCommand=v,s("insertFile",new r.Tool({command:v,template:new l({template:o.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/tables.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.Dom,s=o.EditorUtils,l=o.RangeUtils,d=o.Command,u="kendoEditor",c="k-state-active",h="k-state-selected",p=o.Tool,f=o.ToolTemplate,m=o.InsertHtmlCommand,g=o.BlockFormatFinder,v=o.EditorUtils.registerTool,_=n.getTouches,b=n.template,k="
      • ",w=new g([{tags:["table"]}]),y=m.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});m.fn.init.call(this,n)},_tableHtml:function(e,t){var n,i;return e=e||1,t=t||1,n=b(k)({width:100/t,content:o.emptyTableCellContent}),i=100/e,"
        #=content#
        "+Array(e+1).join(""+Array(t+1).join(n)+"")+"
        "},postProcess:function(t,n){var i=e("table[data-last]",t.document).removeAttr("data-last");n.setStart(i.find("td")[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),m.fn.exec.call(this)}}),x=p.extend({initialize:function(t,n){var i,a,l,d;p.fn.initialize.call(this,t,n),i=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:r(this._open,this),activate:r(this._activate,this),close:r(this._close,this)}).data("kendoPopup"),t.click(r(this._toggle,this)).keydown(r(this._keydown,this)),a=this._editor=n.editor,this._popup=i,l=new o.TableWizardTool({template:new f({template:s.buttonTemplate,title:a.options.messages.tableWizard}),command:o.TableWizardCommand,insertNewTable:!0}),v("tableWizardInsert",l),d=e("
        "+l.options.template.getHtml()+"
        "),d.appendTo(i.element),a.toolbar&&a.toolbar.attachToolsEvents(d)},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(c)},_close:function(){this._popup.options.anchor.removeClass(c)},_keydown:function(e){var t=n.keys,i=e.keyCode;i==t.DOWN&&e.altKey?this._popup.open():i==t.ESC&&this._popup.close()},_toggle:function(t){var n=e(t.target).closest(".k-tool");n.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),e.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),C=x.extend({init:function(t){this.cols=8,this.rows=6,x.fn.init.call(this,e.extend(t,{command:y,popupTemplate:"
        "+Array(this.cols*this.rows+1).join("")+"
        "}))},_activate:function(){function t(t){var n=e(window);return{row:Math.floor((t.clientY+n.scrollTop()-c.top)/r)+1,col:Math.floor((t.clientX+n.scrollLeft()-c.left)/i)+1}}var i,r,o=this,a=o._popup.element,s=a.find(".k-ct-cell"),l=s.eq(0),d=s.eq(s.length-1),c=n.getOffset(l),h=n.getOffset(d),p=o.cols,f=o.rows;a.find("*").addBack().attr("unselectable","on"),h.left+=d[0].offsetWidth,h.top+=d[0].offsetHeight,i=(h.left-c.left)/p,r=(h.top-c.top)/f,a.autoApplyNS(u).on("mousemove",function(e){o._setTableSize(t(e))}).on("mouseleave",function(){o._setTableSize()}).on("down",function(e){e.preventDefault();var n=_(e)[0];o._exec(t(n.location))})},_valid:function(e){return e&&e.row>0&&e.col>0&&e.row<=this.rows&&e.col<=this.cols},_exec:function(e){this._valid(e)&&(this._editor.exec("createTable",{rows:e.row,columns:e.col}),this._popup.close())},_setTableSize:function(t){var i=this._popup.element,r=i.find(".k-status"),o=i.find(".k-ct-cell"),a=this.cols,s=this._editor.options.messages;this._valid(t)?(r.text(n.format(s.createTableHint,t.row,t.col)),o.each(function(n){e(this).toggleClass(h,n%a10))return t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},n=t.items||t.files,this._insertImages(n)},_insertImages:function(t){var n,i,r;if(t&&(n=e.grep(t,function(e){return/^image\//i.test(e.type)}),i=e.grep(t,function(e){return/^text\/html/i.test(e.type)}),!i.length&&n.length&&(r=this._startModification())))return e.when.apply(e,e.map(n,this._fileToDataURL)).done(e.proxy(function(){var t=Array.prototype.slice.call(arguments),n=e.map(t,function(e){return''}).join("");this._triggerPaste(n),this._endModification(r)},this)),!0},onpaste:function(n){return this._handleImagePaste(n)?void n.preventDefault():(this.expandImmutablesIn(),void this._contentModification(function(i,r){var a,s,l,d=o.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),u=t.support.browser,c=i.body;this._decoreateClipboardNode(d,c),c.appendChild(d),u.webkit&&this._moveToCaretPosition(d,r),u.msie&&u.version<11?(n.preventDefault(),a=i.createRange(),a.selectNodeContents(d),i.selectRange(a),s=i.document.body.createTextRange(),s.moveToElementText(d),e(c).unbind("paste"),s.execCommand("Paste"),e(c).bind("paste",e.proxy(this.onpaste,this))):(l=i.createRange(),l.selectNodeContents(d),i.selectRange(l)),r.deleteContents()},function(t,n){var i,r="";t.selectRange(n),i=e(t.body).children(".k-paste-container"),i.each(function(){var e=this.lastChild;e&&o.is(e,"br")&&o.remove(e),r+=this.innerHTML}),i.remove(),this._triggerPaste(r,{clean:!0})}))},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){var t,n;"FileReader"in window&&(t=(e.originalEvent||e).dataTransfer||{},n=t.items||t.files,this._insertImages(n)&&e.preventDefault())},_decoreateClipboardNode:function(t,n){var i,r,o,a;(l.msie||l.webkit)&&(t=e(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.msie&&(i=e(n.ownerDocument.documentElement),t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"}),r=i.css("color"),r&&t.css("color",r),o=i.css("fontFamily"),o&&t.css("fontFamily",o),a=i.css("fontSize"),a&&t.css("fontSize",a)))},_moveToCaretPosition:function(t,n){var i=this,r=i.editor.body,a=o.offset(t,r),s=i._caretOffset(n,r),l=s.left-a.left,d=s.top-a.top,u="translate("+l+"px,"+d+"px)";e(t).css({"-webkit-transform":u,transform:u})},_caretOffset:function(e,t){var n,i,r,a,s,l,d=this.editor,u=o.create(d.document,"span",{innerHTML:"\ufeff"}),c=e.startContainer;return e.collapsed?(i=o.isDataNode(c),i&&(o.isBom(c)||0===e.startOffset)?o.insertBefore(u,c):i&&e.startOffset===c.length?o.insertAfter(u,c):(e.insertNode(u),n=!0)):(c=c===t?c.childNodes[e.startOffset]:c,o.insertBefore(u,c)),r=o.offset(u,t),a=u.previousSibling,s=u.nextSibling,o.remove(u),n&&o.isDataNode(a)&&o.isDataNode(s)&&!o.isBom(a)&&!o.isBom(s)&&(l=a.length,s.data=a.data+s.data,e.setStart(s,l),o.remove(a),e.collapse(!0),d.selectRange(e)),r},expandImmutablesIn:function(e){var n,i,r,o=this.editor;o&&o.options.immutables&&(n=o.body,e=e||o.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===n&&0===e.startOffset&&(i=n.ownerDocument,r=i.createTextNode("\ufeff"),n.insertBefore(r,n.childNodes[0]),e.setStartBefore(r)),o.selectRange(e))},splittableParent:function(e,t){var n,i;if(e)return o.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,o.isInline(n))for(;n.parentNode!=i&&!o.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,a,l,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C=this.editor;if(this.expandImmutablesIn(),n=d({clean:!1,split:!0},n),!n.skipCleaners)for(i=0,a=this.cleaners.length;i(\s| )*)+(<\/?(div|p|li|col|t))/gi,"$3"),t=t.replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=t.replace(/^
      • $/g,"li>"),u=this.isBlock(t),C.focus(),c=C.getRange(),c.deleteContents(),c.startContainer==C.document&&c.selectNodeContents(C.body),h=new s,p=h.addCaret(c),f=this.splittableParent(u,p),m=!1,g=f!=C.body&&!o.is(f,"td"),n.split&&g&&(u||o.isInline(f))&&(c.selectNode(p),r.split(c,f,!0),m=!0),v=this.htmlToFragment(t),v.firstChild&&"k-paste-container"===v.firstChild.className){for(_=[],i=0,a=v.childNodes.length;i"))}if(l=v.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each(function(e,t){o.isBlock(t)&&""===t.innerHTML&&t.appendChild(C.document.createTextNode("\ufeff"))}),c.insertNode(v),f=this.splittableParent(u,p),m){for(;p.parentNode!=f;)o.unwrap(p.parentNode);o.unwrap(p.parentNode)}if(o.normalize(c.commonAncestorContainer),p.style.display="inline",o.restoreScrollTop(C.document),o.scrollTo(p),h.removeCaret(c),b=c.commonAncestorContainer.parentNode,c.collapsed&&"tbody"==o.name(b)&&(c.setStartAfter(e(b).closest("table")[0]),c.collapse(!0)),k=e(c.commonAncestorContainer.parentNode).closest("table"),k.get(0)){for(w=k.parent().contents(),y=w.length-1,x=w.get(y);null!==x.nodeValue&&(" "===x.nodeValue||""===x.nodeValue);)y-=1,x=w.get(y);x===k.get(0)&&o.insertAfter(o.createEmptyNode(C.document,"p"),k[0])}C.selectRange(c)}}),c=n.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,r=this,o=t||r.replacements;for(n=0,i=o.length;n]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/]*>/i.test(e)}}),p=c.extend({init:function(e){c.fn.init.call(this,e);var t=" ";this.replacements=[/]*>\s*<\/span>/gi,t,/\t/gi,t,/    /gi,t]},applicable:function(e){return/    |class="?Apple-tab-span/i.test(e)}}),f=c.extend({init:function(e){c.fn.init.call(this,e),this.junkReplacements=[/<\?xml[^>]*>/gi,"",//g,"",/"/g,"'",/ <\/o:p>/gi," ",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,""],this.replacements=this.junkReplacements.concat([/(?:
         [\s\r\n]+|
        )*(<\/?(h[1-6]|hr|p|div|table|tbody|thead|tfoot|th|tr|td|li|ol|ul|caption|address|pre|form|blockquote|dl|dt|dd|dir|fieldset)[^>]*>)(?:
         [\s\r\n]+|
        )*/g,"$1",/

        /g,"

        ",/
        (?!\n)/g," ",/]*)>(\s| )+]*>(\s| )*<\/tr>/gi,"",/]*>(\s| )*<\/tbody>/gi,"",/]*>(\s| )*<\/table>/gi,"",/

        /g,"
        ",/^\s*( )+/gi,"",/( |]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/style=(["|'])\s*\1/g,"",/(]*>)?\n/g,function(e,t){return t?e:" "}])},convertFontMatch:function(e,t,n){var i=/face=['"]([^'"]+)['"]/i,r=i.exec(n),o=n&&r&&r[1];return t?"":o?'':""},applicable:function(e){return/class="?Mso/i.test(e)||/style="[^"]*mso-/i.test(e)||/urn:schemas-microsoft-com:office/.test(e)},stripEmptyAnchors:function(e){return e.replace(/]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e,t){var n,i=e.innerHTML,r=o.innerText(e),a=i.match(/^(?:]*texhtml[^>]*>)?]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=a&&a[1],l=/^[a-z\d]/i.test(s),d=function(e){return e.replace(/^(?: |[\u00a0\n\r\s])+/,"")};return a&&(n=!0),i=i.replace(/<\/?\w+[^>]*>/g,"").replace(/ /g," "),!n&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(i)||n&&/^.\u00a0+/.test(i)||s&&!l&&t?{tag:"ul",style:this._guessUnorderedListStyle(d(r))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(d(r))}:void 0},_convertToLi:function(e){var t,n=o.name(e);return 1==e.childNodes.length?t=e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(o.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&o.remove(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&o.remove(e.firstChild),t="p"!=n?"<"+n+">"+e.innerHTML+"":e.innerHTML),o.remove(e),o.create(document,"li",{innerHTML:t})},_guessUnorderedListStyle:function(e){return/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(e)?null:/^o/.test(e)?"circle":"square"},_guessOrderedListStyle:function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},extractListLevels:function(e){var n=/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;return e=e.replace(n,function(e,n,i){return t.format('data-list="{0}" data-level="{1}" {2}',n,i,e)})},_createList:function(e,t){return o.create(document,e,{style:{listStyleType:t}})},lists:function(t){var n,i,r,a,s,l,d,u,c,h,p,f,m,g,v,_,b=e(t).find(o.blockElements.join(",")),k=-1,w={},y=["p","h1","h2","h3","h4","h5","h6"];for(u=0;uk||!f)&&(f=this._createList(h,v.style),w[p][_]=f,i.appendChild(f)),i=this._convertToLi(c),f.appendChild(i),l?r=k=-1:k=p))},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=o.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(n){var i=n.cells,r=e(n).closest("table"),o=r.children("colgroup");i.length<2||(o.length&&(i=o.children(),o[0].parentNode.removeChild(o[0])),o=e(e.map(i,function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('',n):""}).join("")),o.is("colgroup")||(o=e("").append(o)),o.prependTo(r))},convertHeaders:function(t){var n,i=t.cells,r=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==o.name(n))return n});if(r.length==i.length){for(n=0;n").end().find("thead").append(t),n=0;nr.cells.length&&(r=n[a]);l.createColGroup(r),l.convertHeaders(i),l.removeAttributes(s[o]),l.removeParagraphs(s.eq(o).find("td,th")),l.removeDefaultColors(s.eq(o).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;n]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),m=c.extend({init:function(e){c.fn.init.call(this,e),this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^
        (.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),g=c.extend({clean:function(e){var t=o.create(document,"div",{innerHTML:e});return t=this.cleanDom(t),t.innerHTML},cleanDom:function(e){return e}}),v=g.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each(function(){o.unwrap(this)}),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=g.extend({cleanDom:function(t){var n=this.collectAttr(),i=e(t).find("["+n.join("],[")+"]");return i.removeAttr(n.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),b=function(){this.text="",this.add=function(e){this.text+=e}},k=n.extend({init:function(e){this.separators=e||{text:" ",line:"
        "},this.lines=[],this.inlineBlockText=[],this.resetLine()},appendText:function(e){3===e.nodeType&&(e=e.nodeValue),this.textContainer.add(e)},appendInlineBlockText:function(e){this.inlineBlockText.push(e)},flashInlineBlockText:function(){this.inlineBlockText.length&&(this.appendText(this.inlineBlockText.join(" ")),this.inlineBlockText=[])},endLine:function(){this.flashInlineBlockText(),this.resetLine()},html:function(){var e,t,n,i,r,o,a,s,l=this.separators,d="",u=this.lines;for(this.flashInlineBlockText(),e=0,t=u.length,n=t-1;e"}},actions:{ul:e.noop,ol:e.noop,table:e.noop,thead:e.noop,tbody:e.noop,td:function(e,t){var n=new y({all:!0}),i=n.cleanDom(t);return e.htmlLines.appendInlineBlockText(i),!0},block:function(e){e.htmlLines.endLine()}}}),x=c.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}});d(i,{Clipboard:u,Cleaner:c,ScriptCleaner:h,TabCleaner:p,MSWordFormatCleaner:f,WebkitFormatCleaner:m,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:y,HtmlTextLines:k,CustomCleaner:x})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/keyboard.min",["editor/command.min"],e)}(function(){!function(e){function t(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}function n(e,t,n){for(var i=e?e[t]:null;i&&!n(i);)i=i[t];return i}var i=window.kendo,r=i.Class,o=i.ui.editor,a=o.RangeUtils,s=o.Dom,l=o.RestorePoint,d=o.Marker,u=i.support.browser,c='
        ',h=e.extend,p=s.nodeTypes,f="previousSibling",m="td,th,caption",g="table,tbody,thead,tfoot,tr",v=g+","+m,_=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(g)},b=r.extend({remove:function(t){var n,i,r,o,l,u,c,h=this,p=new d;p.add(t,!1),n=a.getAll(t,function(t){return e(t).is(v)}),i=a.documentFromRange(t),r=p.start,o=p.end,l=m.split(","),u=s.parentOfType(r,l),c=s.parentOfType(o,l),h._removeContent(r,u,!0),h._removeContent(o,c,!1),e(n).each(function(t,n){n=e(n),(n.is(m)?n:n.find(m)).each(function(e,t){t.innerHTML=""})}),u&&!r.previousSibling&&s.insertBefore(i.createTextNode("\ufeff"),r),c&&!o.nextSibling&&s.insertAfter(i.createTextNode("\ufeff"),o),u?t.setStartBefore(r):n[0]&&(u=e(n[0]),u=u.is(m)?u:u.find(m).first(),u.length&&t.setStart(u.get(0),0)),t.collapse(!0),s.remove(r),s.remove(o)},_removeContent:function(t,n,i){if(n){var r,o=i?"nextSibling":"previousSibling",a=function(t){for(;t&&!t[o];)t=t.parentNode;return t&&e.contains(n,t)?t[o]:null};for(t=a(t);t;)r=a(t),s.remove(t),t=r}}}),k=r.extend({init:function(e){this.editor=e},keydown:function(n){var i,r,a,s,d=this,c=d.editor,p=c.keyboard,f=p.isTypingKey(n),m=h(e.Event(),n);return d.editor.trigger("keydown",m),m.isDefaultPrevented()?(n.preventDefault(),!0):!(m.isDefaultPrevented()||!f||p.isTypingInProgress())&&(i=c.getRange(),r=c.body,d.startRestorePoint=new l(i,r),_(i)&&(a=new b(c),a.remove(i),c.selectRange(i)),u.webkit&&!i.collapsed&&t(r,i)&&(r.innerHTML=""),c.immutables&&o.Immutables.immutablesContext(i)&&(s=new o.BackspaceHandler(c),s.deleteSelection(i)),p.startTyping(function(){d.endRestorePoint=o._finishUpdate(c,d.startRestorePoint)}),!0)},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),w=r.extend({init:function(e){this.editor=e},_addCaret:function(e){var t=s.create(this.editor.document,"a");return s.insertAt(e,t,0),s.stripBomNode(t.previousSibling),s.stripBomNode(t.nextSibling),t},_restoreCaret:function(e){var t=this.editor.createRange();!e.nextSibling&&s.isDataNode(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.length):t.setStartAfter(e), t.collapse(!0),this.editor.selectRange(t),s.remove(e)},_handleDelete:function(e){var t,n,i=e.endContainer,r=s.closestEditableOfType(i,s.blockElements);return!(!r||!o.RangeUtils.isEndOf(e,r))&&(t=s.next(r),!(!t||"p"!=s.name(t))&&(n=this._addCaret(t),this._merge(r,t),this._restoreCaret(n),!0))},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,r=0;t-r>=0&&"\ufeff"==i[t-r-1];)r++;r>0&&(n.deleteData(t-r,r),e.setStart(n,Math.max(0,t-r)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var i,r,a,l,d,u,c,h,p,m,g,v,_,b=t.startContainer,k=s.closestEditableOfType(b,["li"]),w=s.closestEditableOfType(b,"p,h1,h2,h3,h4,h5,h6".split(",")),y=this.editor;if(s.isDataNode(b)){if(t.collapsed&&/^\s[\ufeff]+$/.test(b.nodeValue))return t.setStart(b,0),t.setEnd(b,b.length),y.selectRange(t),!1;this._cleanBomBefore(t)}return i=n(w,f,function(e){return!s.htmlIndentSpace(e)}),t.collapsed&&t.startOffset!==t.endOffset&&t.startOffset<0&&(t.startOffset=0,t.endOffset=0,y.selectRange(t)),r=k&&o.RangeUtils.isStartOf(t,k),a=k&&e(k).index(),l=r&&a>0,l&&(w=k,i=s.prev(k)),w&&i&&s.is(i,"table")&&o.RangeUtils.isStartOf(t,w)?(""===w.innerText&&(w.innerHTML="\ufeff"),!0):w&&i&&o.RangeUtils.isStartOf(t,w)||l?(d=this._addCaret(w),this._merge(i,w),this._restoreCaret(d),!0):r&&0===a?(u=k.firstChild,u||(k.innerHTML=o.emptyElementContent,u=k.firstChild),c=new o.ListFormatter(s.name(k.parentNode),"p"),t.selectNodeContents(k),c.toggle(t),s.insignificant(u)?t.setStartBefore(u):t.setStart(u,0),y.selectRange(t),!0):(h=b.childNodes[t.startOffset-1],p=t,m=h&&s.closestEditableOfType(h,["a"]),g=n(h||b,f,function(e){return!s.isDataNode(e)||!s.isBom(e)&&e.length>0}),(m||(0===t.startOffset||h)&&s.is(g,"a"))&&(m=m||g,p=y.createRange(),p.setStart(m,m.childNodes.length),p.collapse(!0)),m=m||s.closestEditableOfType(h||p.startContainer,["a"]),v=m&&o.RangeUtils.isEndOf(p,m),v&&(_=new o.UnlinkCommand({range:p,body:y.body,immutables:!!y.immutables}),y.execCommand(_),y._selectionChange()),!1)},_handleSelection:function(t){var n,i,r,a,l=t.commonAncestorContainer,u=s.closest(l,"table"),c=o.emptyElementContent,h=this.editor;return _(t)?(n=new b(h),n.remove(t),h.selectRange(t),!0):(i=new d,i.add(t,!1),h.immutables&&this._handleImmutables(i),this._surroundFullySelectedAnchor(i,t),t.setStartAfter(i.start),t.setEndBefore(i.end),r=t.startContainer,a=t.endContainer,t.deleteContents(),u&&""===e(u).text()&&(t.selectNode(u),t.deleteContents()),l=t.commonAncestorContainer,"p"===s.name(l)&&""===l.innerHTML&&(l.innerHTML=c,t.setStart(l,0)),this._join(r,a),s.insertAfter(h.document.createTextNode("\ufeff"),i.start),i.remove(t),r=t.startContainer,"tr"==s.name(r)&&(r=r.childNodes[Math.max(0,t.startOffset-1)],t.setStart(r,s.getNodeLength(r))),t.collapse(!0),h.selectRange(t),!0)},_handleImmutables:function(e){var t=o.Immutables.immutableParent,n=t(e.start),i=t(e.start);n&&s.insertBefore(e.start,n),i&&s.insertAfter(e.end,i),n&&s.remove(n),i&&i.parentNode&&s.remove(i)},_surroundFullySelectedAnchor:function(t,n){var i=t.start,r=e(i).closest("a").get(0),o=t.end,l=e(o).closest("a").get(0);r&&a.isStartOf(n,r)&&s.insertBefore(i,r),l&&a.isEndOf(n,l)&&s.insertAfter(o,l)},_root:function(e){for(;e&&"body"!=s.name(e)&&e.parentNode&&"body"!=s.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){e=this._root(e),t=this._root(t),e!=t&&s.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(s.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=s.list(e)?e.children[e.children.length-1]:e,e&&e.appendChild(t.firstChild)):e.nodeType===p.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);s.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===p.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?s.insertAfter(t,e.nextSibling):s.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var t,n,r=this.editor,a=r.getRange(),s=e.keyCode,d=i.keys,u=s===d.BACKSPACE,c=s==d.DELETE;r.immutables&&r.immutables.keydown(e,a)||(!u&&!c||a.collapsed?u?t="_handleBackspace":c&&(t="_handleDelete"):t="_handleSelection",t&&(n=new l(a,r.body),this[t](a)&&(e.preventDefault(),o._finishUpdate(r,n))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),y=r.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=o._finishUpdate(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML},keydown:function(e){var t=this,n=t.editor,i=n.keyboard;return i.isModifierKey(e)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new l(n.getRange(),n.body),!0):!!i.isSystem(e)&&(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0)},keyup:function(){var e=this;return!(!e.systemCommandIsInProgress||!e.changed())&&(e.systemCommandIsInProgress=!1,e.createUndoCommand(),!0)}}),x=r.extend({init:function(e){this.editor=e},keydown:function(e){!u.webkit||e.isDefaultPrevented()||!e.ctrlKey||65!=e.keyCode||e.altKey||e.shiftKey||(this.editor.options.immutables&&this._toSelectableImmutables(),this._selectEditorBody())},_selectEditorBody:function(){var e=this.editor,t=e.getRange();t.selectNodeContents(e.body),e.selectRange(t)},_toSelectableImmutables:function(){for(var t=this.editor,n=t.body,i=o.Immutables.immutable,r=s.emptyTextNode,a=n.firstChild,l=n.lastChild;r(a);)a=a.nextSibling;for(;r(l);)l=l.previousSibling;a&&i(a)&&e(c).prependTo(n),l&&i(l)&&e(c).appendTo(n)},keyup:e.noop}),C=r.extend({init:function(e){this.handlers=e,this.typingInProgress=!1},isCharacter:function(e){return e>=48&&e<=90||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||229==e},toolFromShortcut:function(t,n){var i,r,o=String.fromCharCode(n.keyCode),a=this._getShortcutModifier(n,navigator.platform);for(i in t)if(r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(r.key==o||r.key==n.keyCode)&&r.ctrl==a&&r.alt==n.altKey&&r.shift==n.shiftKey)return i},_getShortcutModifier:function(e,t){var n=t.toUpperCase().indexOf("MAC")>=0;return n?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,n){var i,r,o,a=String.fromCharCode(n.keyCode),s=[],l=function(e){return e==a||e==n.keyCode||e==n.charCode};for(i in t)r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),o=e.isArray(r.key)?e.grep(r.key,l).length>0:l(r.key),o&&r.ctrl==n.ctrlKey&&r.alt==n.altKey&&r.shift==n.shiftKey&&s.push(t[i]);return s},isTypingKey:function(e){var t=e.keyCode;return this.isCharacter(t)&&!e.ctrlKey&&!e.altKey||32==t||13==t||8==t||46==t&&!e.shiftKey&&!e.ctrlKey&&!e.altKey},isModifierKey:function(e){var t=e.keyCode;return 17==t&&!e.shiftKey&&!e.altKey||16==t&&!e.ctrlKey&&!e.altKey||18==t&&!e.ctrlKey&&!e.shiftKey},isSystem:function(e){return 46==e.keyCode&&e.ctrlKey&&!e.altKey&&!e.shiftKey},startTyping:function(e){this.onEndTyping=e,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress&&this.onEndTyping&&this.onEndTyping(),this.typingInProgress=!1},endTyping:function(t){var n=this;n.clearTimeout(),t?n.stopTyping():n.timeout=window.setTimeout(e.proxy(n.stopTyping,n),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var n,i=this.handlers;for(n=0;nt.clientHeight?e.support.scrollbar():0}function r(e,t){return o(e)?p(e):p(e)/t*100}function o(e){return typeof e===w&&b.test(e)}function a(e){return typeof e===w&&k.test(e)}function s(e){return p(e)+v}function l(e){return p(e)+_}var d=window,u=d.Math,c=u.min,h=u.max,p=d.parseFloat,f=e.jQuery,m=f.extend,g=e.ui.editor,v="%",_="px",b=/(\d+)(\.?)(\d*)%/,k=/(\d+)(\.?)(\d*)px/,w="string",y={constrain:n,getScrollBarWidth:i,calculatePercentageRatio:r,inPercentages:o,inPixels:a,toPercentages:s,toPixels:l};m(g,{ResizingUtils:y})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-element-resizing.min",["editor/main.min","kendo.resizable.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var n=e.jQuery,i=n.extend,r=n.noop,o=n.proxy,a=e.ui.editor,s=e.Class,l="keydown",d="mousedown",u="mouseenter",c="mouseleave",h="mousemove",p="mouseup",f=",",m=".",g=":last-child",v="table",_=s.extend({init:function(e,t){var r=this;r.options=i({},r.options,t),r.options.tags=n.isArray(r.options.tags)?r.options.tags:[r.options.tags],n(e).is(v)&&(r.element=e,r._attachEventHandlers())},destroy:function(){var e=this,t=e.options.eventNamespace;e.element&&(n(e.element).off(t),e.element=null),n(e.options.rootElement).off(l+t),e._destroyResizeHandle()},options:{tags:[],min:0,rootElement:null,eventNamespace:"",rtl:!1,handle:{dataAttribute:"",height:0,width:0,classNames:{},template:""}},_attachEventHandlers:function(){var e=this,t=e.options;n(e.element).on(h+t.eventNamespace,t.tags.join(f),o(e.detectElementBorderHovering,e))},resizingInProgress:function(){var e=this,t=e._resizable;return!!t&&!!t.resizing},resize:r,detectElementBorderHovering:function(e){var t=this,i=t.options,r=i.handle,o=n(e.currentTarget),a=t.resizeHandle,s=r.dataAttribute;t.resizingInProgress()||(!o.is(g)&&t.elementBorderHovered(o,e)?a?a.data(s)&&a.data(s)!==o[0]&&t.showResizeHandle(o,e):t.showResizeHandle(o,e):a&&t._destroyResizeHandle())},elementBorderHovered:r,showResizeHandle:function(e,t){var n=this;0===t.buttons&&(n._initResizeHandle(),n.setResizeHandlePosition(e),n.setResizeHandleDimensions(),n.setResizeHandleDataAttributes(e[0]),n._attachResizeHandleEventHandlers(),n._initResizable(e),n._hideResizeMarker(),n.resizeHandle.show())},_initResizeHandle:function(){var e=this,t=e.options;e._destroyResizeHandle(),e.resizeHandle=n(t.handle.template).appendTo(t.rootElement)},setResizeHandlePosition:r,setResizeHandleDimensions:r,setResizeHandleDataAttributes:function(e){var t=this;t.resizeHandle.data(t.options.handle.dataAttribute,e)},_attachResizeHandleEventHandlers:function(){var e=this,t=e.options,n=t.eventNamespace,i=t.handle.classNames.marker,r=e.resizeHandle;e.resizeHandle.on(d+n,function(){r.find(m+i).show()}).on(p+n,function(){r.find(m+i).hide()})},_hideResizeMarker:function(){var e=this;e.resizeHandle.find(m+e.options.handle.classNames.marker).hide()},_destroyResizeHandle:function(){var e=this;e.resizeHandle&&(e._destroyResizable(),e.resizeHandle.off(e.options.eventNamespace).remove(),e.resizeHandle=null)},_initResizable:function(t){var n=this;n.resizeHandle&&(n._destroyResizable(),n._resizable=new e.ui.Resizable(t,{draggableElement:n.resizeHandle[0],start:o(n.onResizeStart,n),resize:o(n.onResize,n),resizeend:o(n.onResizeEnd,n)}))},_destroyResizable:function(){var e=this;e._resizable&&(e._resizable.destroy(),e._resizable=null)},onResizeStart:function(){this._disableKeyboard()},onResize:function(e){this.setResizeHandleDragPosition(e)},setResizeHandleDragPosition:r,onResizeEnd:function(e){var t=this;t.resize(e),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var e=this.options;n(e.rootElement).off(l+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;n(e.rootElement).on(l+e.eventNamespace,function(e){e.preventDefault()})},_forceResizing:function(e){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(e)}}),b=s.extend({create:function(e,t){var i=this,r=t.name,o=t.eventNamespace;n(e.body).on(u+o,v,function(n){var o=n.currentTarget,a=e[r];n.stopPropagation(),a?a.element===o||a.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,o,t)):i._initResizing(e,o,t)}).on(c+o,v,function(o){var a,s=e[r];o.stopPropagation(),!s||s.resizingInProgress()||s.resizeHandle||(a=n(s.element).parents(v)[0],a&&(i._destroyResizing(e,t),i._initResizing(e,a,t)))}).on(c+o,function(){var n=e[r];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)}).on(p+o,function(o){var a,s=e[r];s&&s.resizingInProgress()&&(a=n(o.target).parents(v)[0],a&&(s._forceResizing(o),i._destroyResizing(e,t),i._initResizing(e,a,t)))})},dispose:function(e,t){n(e.body).off(t.eventNamespace)},_initResizing:function(t,n,i){var r=i.name,o=i.type;t[r]=new o(n,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var n=t.name;e[n]&&(e[n].destroy(),e[n]=null)}});b.current=new b,_.create=function(e,t){b.current.create(e,t)},_.dispose=function(e,t){b.current.dispose(e,t)},i(a,{TableElementResizing:_})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/column-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],e)}(function(){!function(e,t){var n=window,i=n.Math,r=i.abs,o=e.jQuery,a=o.extend,s=e.ui.editor,l=s.TableElementResizing,d=s.ResizingUtils,u=d.constrain,c=d.calculatePercentageRatio,h=d.getScrollBarWidth,p=d.inPercentages,f=d.toPercentages,m=d.toPixels,g=e._outerWidth,v=".kendoEditorColumnResizing",_="k-column-resize-handle",b="k-column-resize-marker",k="body",w="tbody",y="td",x="th",C="tr",T=",",S="width",D=l.extend({options:{tags:[y,x],min:20,rootElement:null,eventNamespace:v,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:_,marker:b},template:'
        '}},elementBorderHovered:function(e,t){var n=this,i=n.options,r=i.handle.width,a=e.offset().left+(i.rtl?0:g(e)),s=t.clientX+o(e[0].ownerDocument).scrollLeft();return s>a-r&&s
        '}},elementBorderHovered:function(e,t){var n=this,i=n.options.handle[x],o=e.offset().top+m(e),a=t.clientY+r(e[0].ownerDocument).scrollTop();return a>o-i&&a
      • "},events:[B,P,L,V,W],show:function(){this._setPosition()},_setPosition:function(){var e=this,t=e._positioningStrategy.getPosition();C(e.element).css({top:t.top,left:t.left,position:"absolute"})},_attachEventHandlers:function(){var e=this;C(e.element).on(V+H,D(e._onMouseOver,e)).on(W+H,D(e._onMouseOut,e))},_onMouseOver:function(){this.trigger(V)},_onMouseOut:function(){this.trigger(W)},_addStyles:function(){var e=this;C(e.element).children(Z+N).addClass("k-resize-"+e.options.direction)},_initPositioningStrategy:function(){var e=this,t=e.options;e._positioningStrategy=n.create({name:t.direction,handle:e.element,resizableElement:t.resizableElement,rootElement:t.rootElement,rtl:t.rtl})},_initDraggable:function(){var e=this,t=e.element;!e._draggable&&t&&(e._draggable=new A(t,{dragstart:D(e._onDragStart,e),drag:D(e._onDrag,e),dragend:D(e._onDragEnd,e)}))},_onDragStart:function(){this.trigger(B)},_onDrag:function(e){var t=this;t.trigger(P,t._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(L)},_destroyDraggable:function(){var e=this;e._draggable&&(e._draggable.destroy(),e._draggable=null)},_initDraggingStrategy:function(){var e=this;e._draggingStrategy=h.create({name:e.options.direction})}}),te=E.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e){var t,n,i,r=this._items,o=r.length,a=e.name?e.name.toLowerCase():"";for(i=0;if?(r=a(d,f),l=o(d,f)):(r=o(d,f),l=a(d,f)),i=k(g(r,l))):i=w(d),u._setColumnsWidth(),c[0].style[L]=i)},_resizeHeight:function(e,t){var i,r,l,d,u=this,c=s(u.element),h=c[0].style[O],p=x(c),f=c.parent(),m=f.height(),b=u._getMaxDimensionValue(O),y=u.options.minHeight,C=u._hasRowsInPixels();0!==e&&(n(u._initialElementHeight)&&(u._initialElementHeight=p),d=v({value:u._initialElementHeight+t,min:y,max:b}),C&&e<0&&u._setRowsHeightInPercentages(),_(h)?(p+e>m?(r=a(d,m),l=o(d,m)):(r=o(d,m),l=a(d,m)),i=k(g(r,l))):i=w(d),c[0].style[O]=i,C&&e<0&&u._setRowsHeightInPixels())},_getMaxDimensionValue:function(e){var t=this,n=s(t.element),i=e.toLowerCase(),r=t.options.rtl?-1:1,o=s(t.element).parent(),a=o[0],l=o[i](),d=r*(e===L?o.scrollLeft():o.scrollTop());return a===n.closest(H)[0]?""!==a.style[i]||_(t.element.style[i])?l+d:1/0:l+d},_setColumnsWidth:function(){function e(e){var t=e.style.width;return""!==t?!!_(t):!!s(e).hasClass(S)}var t,n=this,i=s(n.element),r=i.parent()[0],o=i.closest(H),a=o.closest(N).children(),l=a.length;if(e(i[0])&&r===o[0]&&""===r.style[L])for(t=0;t0)){for(e=0;e0;!n||i===r||l(i,r)||o||e._destroyTableResizing()})},dispose:function(e){s(e.body).off(C)},_initResizing:function(t,n){c.msie||c.mozilla||(t.tableResizing=new Q(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body}))}});X.current=new X,Q.create=function(e){X.current.create(e)},Q.dispose=function(e){X.current.dispose(e)},d(h,{TableResizing:Q})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/table-wizard/table-wizard-command.min",["editor/plugins/tables.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.editor,r=i.EditorUtils,o=i.RangeUtils,a=i.Dom,s=r.registerTool,l=i.ToolTemplate,d=i.Command,u=new i.BlockFormatFinder([{tags:["table"]}]),c=new i.BlockFormatFinder([{tags:["td","th"]}]),h=/([a-z]+|%)$/i,p=d.extend({exec:function(){var r=this,o=r.editor,a=r.range=r.lockRange(),s=r._sourceTable=r.options.insertNewTable?t:r._selectedTable(a),l=r._selectedTableCells=s?r._selectedCells(a):t,d={visible:!1,messages:o.options.messages,closeCallback:e.proxy(r.onDialogClose,r),table:r.parseTable(s,l),dialogOptions:o.options.dialogOptions,isRtl:n.support.isRtl(o.wrapper)},u=new i.TableWizardDialog(d);u.open()},onDialogClose:function(e){var t=this;t.releaseRange(t.range),e&&(t.options.insertNewTable?t.insertTable(t.createNewTable(e)):t.updateTable(e,t._sourceTable,t._selectedTableCells))},releaseRange:function(e){var t=this,n=t.editor.document;a.windowFromDocument(n).focus(),d.fn.releaseRange.call(t,e)},insertTable:function(e){var t=this.range;t.insertNode(e),t.collapse(!0),this.editor.selectRange(t),this._ensureFocusableAfterTable(e)},_ensureFocusableAfterTable:function(t){for(var n=e(t).parent().contents(),i=n.length-1,r=n.get(i);null!==r.nodeValue&&(" "===r.nodeValue||""===r.nodeValue);)i-=1,r=n.get(i);r===t&&a.insertAfter(a.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,n,i){for(var r,o,s,l,d,u,c,h,p=this,f=e(n.rows).toArray(),m=t.tableProperties,g=m.rows,v=m.columns,_=function(e){return e[e.length-1]};i.length>1;)i.pop();if(r=i.length?_(i).parentNode:_(f),p._deleteTableRows(f,f.length-g),f.lengthv&&e(f).each(function(e,t){for(;t.cells.length>v;)t.deleteCell(-1)}),f[0].cells.length-1}),!!n.length},_insertCells:function(e,t,n){n=isNaN(n)?-1:n;for(var i,r=0;r
        ",valueTemplate:""},s={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-middle-left",value:"left middle"},{className:"k-icon k-i-table-align-middle-center",value:"center middle"},{className:"k-icon k-i-table-align-middle-right",value:"right middle"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"",valueTemplate:""},l={dataSource:[{className:"k-icon k-i-table-align-top-left",value:"left top"},{className:"k-icon k-i-table-align-top-center",value:"center top"},{className:"k-icon k-i-table-align-top-right",value:"right top"},{className:"k-icon k-i-table-align-bottom-left",value:"left bottom"},{className:"k-icon k-i-table-align-bottom-center",value:"center bottom"},{className:"k-icon k-i-table-align-bottom-right",value:"right bottom"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"",valueTemplate:""},d='
        • #= messages.tableTab #
        • #= messages.cellTab #
        • #= messages.accessibilityTab #
         
         
         
        ',u=n.Class.extend({init:function(e){this.options=e},open:function(){function t(e){e.preventDefault(),l.destroy(),o.destroy()}function i(e){l.collectDialogValues(c),t(e),l.change&&l.change(),d.closeCallback(c)}function r(e){t(e),d.closeCallback()}var o,a,s,l=this,d=l.options,u=d.dialogOptions,c=d.table,h=d.messages,p=n.support.browser.msie;u.close=r,u.title=h.tableWizard,u.visible=d.visible,o=e(l._dialogTemplate(h)).appendTo(document.body).kendoWindow(u).closest(".k-window").toggleClass("k-rtl",d.isRtl).end().find(".k-dialog-ok").click(i).end().find(".k-dialog-close").click(r).end().data("kendoWindow"),a=o.element,l._initTabStripComponent(a),l._initTableViewComponents(a,c),l._initCellViewComponents(a,c),l._initAccessibilityViewComponents(a,c),o.center(),o.open(),p&&(s=a.closest(".k-window").height(),a.css("max-height",s))},_initTabStripComponent:function(e){var t=this.components={};t.tabStrip=e.find("#k-table-wizard-tabs").kendoTabStrip({animation:!1}).data("kendoTabStrip")},collectDialogValues:function(){var e=this,t=e.options.table;e._collectTableViewValues(t),e._collectCellViewValues(t),e._collectAccessibilityViewValues(t)},_collectTableViewValues:function(e){var t=this.components.tableView,n=e.tableProperties;n.width=t.width.value(),n.widthUnit=t.widthUnit.value(),n.height=t.height.value(),n.columns=t.columns.value(),n.rows=t.rows.value(),n.heightUnit=t.heightUnit.value(),n.cellSpacing=t.cellSpacing.value(),n.cellPadding=t.cellPadding.value(),n.alignment=t.alignment.value(),n.bgColor=t.bgColor.value(),n.className=t.className.value,n.id=t.id.value,n.borderWidth=t.borderWidth.value(),n.borderColor=t.borderColor.value(),n.borderStyle=t.borderStyle.value(),n.collapseBorders=t.collapseBorders.checked},_collectCellViewValues:function(e){var t=e.cellProperties={},n=this.components.cellView;t.selectAllCells=n.selectAllCells.checked,t.width=n.width.value(),t.widthUnit=n.widthUnit.value(),t.height=n.height.value(),t.heightUnit=n.heightUnit.value(),t.cellMargin=n.cellMargin.value(),t.cellPadding=n.cellPadding.value(),t.alignment=n.alignment.value(),t.bgColor=n.bgColor.value(),t.className=n.className.value,t.id=n.id.value,t.borderWidth=n.borderWidth.value(),t.borderColor=n.borderColor.value(),t.borderStyle=n.borderStyle.value(),t.wrapText=n.wrapText.checked,t.width||(t.selectAllCells=!0,t.width=100/e.tableProperties.columns,t.widthUnit="%")},_collectAccessibilityViewValues:function(e){var t=e.tableProperties,n=this.components.accessibilityView;t.captionContent=n.captionContent.value,t.captionAlignment=n.captionAlignment.value(),t.summary=n.summary.value,t.cellsWithHeaders=n.cellsWithHeaders.checked},_addUnit:function(t,n){n&&e.inArray(n,t)==-1&&t.push(n)},_initTableViewComponents:function(e,t){var n=this.components,i=n.tableView={},a=t.tableProperties=t.tableProperties||{};a.borderStyle=a.borderStyle||"",this._addUnit(r,a.widthUnit),this._addUnit(r,a.heightUnit),this._initNumericTextbox(e.find("#k-editor-table-width"),"width",a,i),this._initNumericTextbox(e.find("#k-editor-table-height"),"height",a,i),this._initNumericTextbox(e.find("#k-editor-table-columns"),"columns",a,i,{min:1,value:4}),this._initNumericTextbox(e.find("#k-editor-table-rows"),"rows",a,i,{min:1,value:4}),this._initDropDownList(e.find("#k-editor-table-width-type"),"widthUnit",a,i,r),this._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",a,i,r),this._initNumericTextbox(e.find("#k-editor-table-cell-spacing"),"cellSpacing",a,i),this._initNumericTextbox(e.find("#k-editor-table-cell-padding"),"cellPadding",a,i),this._initTableAlignmentDropDown(e.find("#k-editor-table-alignment"),a),this._initColorPicker(e.find("#k-editor-table-bg"),"bgColor",a,i),this._initInput(e.find("#k-editor-css-class"),"className",a,i),this._initInput(e.find("#k-editor-id"),"id",a,i),this._initNumericTextbox(e.find("#k-editor-border-width"),"borderWidth",a,i),this._initColorPicker(e.find("#k-editor-border-color"),"borderColor",a,i),this._initDropDownList(e.find("#k-editor-border-style"),"borderStyle",a,i,o),this._initCheckbox(e.find("#k-editor-collapse-borders"),"collapseBorders",a,i)},_initCellViewComponents:function(e,t){var n,i=this.components,a=i.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[],n=t.selectedCells[0]||{borderStyle:"",wrapText:!0},this._addUnit(r,n.widthUnit),this._addUnit(r,n.heightUnit),this._initCheckbox(e.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,a),this._initNumericTextbox(e.find("#k-editor-cell-width"),"width",n,a),this._initNumericTextbox(e.find("#k-editor-cell-height"),"height",n,a),this._initDropDownList(e.find("#k-editor-cell-width-type"),"widthUnit",n,a,r),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",n,a,r),this._initNumericTextbox(e.find("#k-editor-table-cell-margin"),"cellMargin",n,a),this._initNumericTextbox(e.find("#k-editor-table-cells-padding"),"cellPadding",n,a),this._initCellAlignmentDropDown(e.find("#k-editor-cell-alignment"),n),this._initColorPicker(e.find("#k-editor-cell-bg"),"bgColor",n,a),this._initInput(e.find("#k-editor-cell-css-class"),"className",n,a),this._initInput(e.find("#k-editor-cell-id"),"id",n,a),this._initNumericTextbox(e.find("#k-editor-cell-border-width"),"borderWidth",n,a),this._initColorPicker(e.find("#k-editor-cell-border-color"),"borderColor",n,a),this._initDropDownList(e.find("#k-editor-cell-border-style"),"borderStyle",n,a,o),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",n,a)},_initAccessibilityViewComponents:function(e,t){var n=this.components,i=n.accessibilityView={},r=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",r,i),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),r),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",r,i),this._initCheckbox(e.find("#k-editor-cells-headers"),"cellsWithHeaders",r,i)},_initNumericTextbox:function(t,n,r,o,a){var s=o[n]=t.kendoNumericTextBox(a?e.extend({},i,a):i).data("kendoNumericTextBox");n in r&&s.value(parseInt(r[n],10))},_initDropDownList:function(e,t,n,i,r){var o=i[t]=e.kendoDropDownList({dataSource:r}).data("kendoDropDownList");this._setComponentValue(o,n,t)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,r=a.dataSource;r[0].tooltip=n.alignLeft,r[1].tooltip=n.alignCenter,r[2].tooltip=n.alignRight,r[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,a,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,r=s.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftMiddle,r[4].tooltip=n.alignCenterMiddle,r[5].tooltip=n.alignRightMiddle,r[6].tooltip=n.alignLeftBottom,r[7].tooltip=n.alignCenterBottom,r[8].tooltip=n.alignRightBottom,r[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,r=l.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftBottom,r[4].tooltip=n.alignCenterBottom,r[5].tooltip=n.alignRightBottom,r[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,l,"captionAlignment",t,i)},_initAlignmentDropDown:function(e,t,n,i,r){var o=r[n]=e.kendoDropDownList(t).data("kendoDropDownList");o.list.addClass("k-align").css("width","110px"),this._setComponentValue(o,i,n)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var r=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&r.value(n[t])},_initInput:function(e,t,n,i){var r=i[t]=e.get(0);t in n&&(r.value=n[t])},_initCheckbox:function(e,t,n,i){var r=i[t]=e.get(0);t in n&&(r.checked=n[t])},destroy:function(){this._destroyComponents(this.components.tableView),this._destroyComponents(this.components.cellView),this._destroyComponents(this.components.accessibilityView),this._destroyComponents(this.components),delete this.components},_destroyComponents:function(e){for(var t in e)e[t].destroy&&e[t].destroy(),delete e[t]},_dialogTemplate:function(e){return n.template(d)({messages:e})}});n.ui.editor.TableWizardDialog=u}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.editor.min",["kendo.combobox.min","kendo.dropdownlist.min","kendo.resizable.min","kendo.window.min","kendo.colorpicker.min","kendo.imagebrowser.min","kendo.tabstrip.min","kendo.numerictextbox.min","util/undoredostack.min","editor/main.min","editor/dom.min","editor/serializer.min","editor/range.min","editor/command.min","editor/components.min","editor/toolbar.min","editor/immutables.min","editor/plugins/viewhtml.min","editor/plugins/link.min","editor/plugins/lists.min","editor/plugins/formatting.min","editor/plugins/image.min","editor/plugins/import.min","editor/plugins/insert.min","editor/plugins/export.min","editor/plugins/indent.min","editor/plugins/linebreak.min","editor/plugins/format.min","editor/plugins/inlineformat.min","editor/plugins/formatblock.min","editor/plugins/file.min","editor/plugins/tables.min","editor/plugins/clipboard.min","editor/plugins/keyboard.min","editor/plugins/exportpdf.min","editor/plugins/print.min","editor/resizing/column-resizing.min","editor/resizing/row-resizing.min","editor/resizing/table-resizing.min","editor/resizing/table-resize-handle.min","editor/table-wizard/table-wizard-command.min","editor/table-wizard/table-wizard-dialog.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.maskedtextbox.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){return e+c}function i(e,t){for(var n=0;n
        ").insertAfter(t),a.notify(o)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:""},events:[_],rules:{0:/\d/,9:/\d|\s/,"#":/\d|\s|\+|\-/,L:/[a-zA-Z]/,"?":/[a-zA-Z]|\s/,"&":/\S/,C:/./,A:/[a-zA-Z0-9]/,a:/[a-zA-Z0-9]|\s/},setOptions:function(t){var n=this;u.fn.setOptions.call(n,t),n._rules=e.extend({},n.rules,n.options.rules),n._tokenize(),this._unbindInput(),this._bindInput(),n.value(n.element.val())},destroy:function(){var e=this;e.element.off(c),e._formElement&&(e._formElement.off("reset",e._resetHandler),e._formElement.off("submit",e._submitHandler)),u.fn.destroy.call(e)},raw:function(){var e=this._unmask(this.element.val(),0);return e.replace(RegExp(this.options.promptChar,"g"),"")},value:function(e){var n=this.element,i=this._emptyMask;return e===t?this.element.val():(null===e&&(e=""),i?(e=this._unmask(e+""),n.val(e?i:""),this._mask(0,this._maskLength,e),this._unmaskedValue=null,e=n.val(),this._oldValue=e,a._activeElement()!==n&&(e===i?n.val(""):this._togglePrompt()),t):(this._oldValue=e,n.val(e),t))},_togglePrompt:function(e){var t=this.element[0],n=t.value;this.options.clearPromptChar&&(n=e?this._oldValue:n.replace(RegExp(this.options.promptChar,"g")," "),t.value=this._old=n)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e,t,i=this;i._maskLength&&(i.options.$angular&&i.element.off(x),i.element.on(n(w),h(i._keydown,i)).on(n(k),h(i._drop,i)).on(n(_),h(i._trackChange,i)).on(C,h(i._inputHandler,i)),a.support.browser.msie&&(e=a.support.browser.version,e>8&&e<11&&(t=[n(b),n(k),n(w),n(y)].join(" "),i.element.on(t,h(i._legacyIEInputHandler,i)))))},_unbindInput:function(){var e=[C,n(w),n(b),n(k),n(y)].join(" ");this.element.off(e)},_editable:function(e){var t=this,n=t.element,i=t.wrapper,r=e.disable,o=e.readonly;t._unbindInput(),o||r?(n.attr(g,r).attr(v,o),i.toggleClass(f,r)):(n.removeAttr(g).removeAttr(v),i.removeClass(f),t._bindInput())},_change:function(){var e=this,t=e.value();t!==e._oldValue?(e._oldValue=t,e.trigger(_),e.element.trigger(_)):""===t&&e.__changing&&e.element.trigger(_)},inputChange:function(e){var t,n,r,l,d,u=this,c=u._old,h=u.element[0],p=h.value,f=s(h),m=f[1],g=p.length-c.length,v=a.support.mobileOS;u.__dropping&&g<0||(g===-1&&v.android&&"chrome"===v.browser&&(e=!0),t=o(m,i(p,c)),n=p.substring(t,m),h.value=p.substring(0,t)+u._emptyMask.substring(t),r=u._mask(t,m,n),l=u._trimStartPromptChars(p.substring(m),o(g,r-t)),d=u._unmask(l,c.length-l.length),u._mask(r,r,d),e&&(r=u._findCaretPosBackwards(t)),s(h,r),u.__dropping=!1)},_trimStartPromptChars:function(e,t){for(var n=this.options.promptChar;t-- >0&&0===e.indexOf(n);)e=e.substring(1);return e},_findCaretPosBackwards:function(e){var t=this._find(e,!0);return t-1||e<=this._maskLength;){if(n.charAt(e)!==this.tokens[e])return e;e+=i}return-1},_mask:function(e,n,i,r){var o,l,d,u,c=this.element[0],h=c.value||this._emptyMask,p=this.options.promptChar,f=0;for(e=this._find(e,r),e>n&&(n=e),l=this._unmask(h.substring(n),n),i=this._unmask(i,e),o=i.length,i&&(l=l.replace(RegExp("^_{0,"+o+"}"),"")),i+=l,h=h.split(""),d=i.charAt(f);eo&&(u=e),e=this._find(e+1);return c.value=this._old=h.join(""),a._activeElement()===c&&(u===t&&(u=this._maskLength),s(c,u)),u},_unmask:function(t,n){var i,r,o,a,s,l,d,u;if(!t)return"";if(this._unmaskedValue===t)return this._unmaskedValue;for(t=(t+"").split(""),o=0,a=n||0,s=this.options.promptChar,l=t.length,d=this.tokens.length,u="";a=l)););return this._unmaskedValue=u,u},_wrapper:function(){var e=this,t=e.element,n=t[0],i=t.wrap("").parent();i[0].style.cssText=n.style.cssText,n.style.width="100%",e.wrapper=i.addClass(n.className)},_blinkInvalidState:function(){var e=this;e.wrapper.addClass(m),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=p(h(e._removeInvalidState,e),100)},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(m),e._invalidStateTimeout=null},_tokenize:function(){for(var e,t,n,i,r=[],o=0,s=this.options.mask||"",l=s.split(""),d=l.length,u=0,c="",h=this.options.promptChar,p=a.getCulture(this.options.culture).numberFormat,f=this._rules;u
        ').parent().wrap('
        ').parent()}function r(e){e.preventDefault()}function o(t,n){var i="next"===n?e.fn.next:e.fn.prev,r="next"===n?e.fn.first:e.fn.last,a=i.call(t);return a.is(":kendoFocusable")||!a.length?a:a.find(":kendoFocusable").length?r.call(a.find(":kendoFocusable")):o(a,n)}var a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y=window.kendo,x=y.Class,C=y.ui.Widget,T=e.proxy,S=y.isFunction,D=y.keys,F=y._outerWidth,E="k-toolbar",A="k-button",I="k-overflow-button",R="k-toggle-button",M="k-button-group",z="k-split-button",H="k-separator",N="k-popup",B="k-toolbar-resizable",P="k-state-active",L="k-state-disabled",O="k-state-hidden",V="k-group-start",W="k-group-end",U="k-primary",q="k-icon",j="k-i-",G="k-button-icon",$="k-button-icontext",K="k-list-container k-split-container",Y="k-split-button-arrow",Q="k-overflow-anchor",X="k-overflow-container",J="k-toolbar-first-visible",Z="k-toolbar-last-visible",ee="click",te="toggle",ne="open",ie="close",re="overflowOpen",oe="overflowClose",ae="never",se="auto",le="always",de="k-overflow-hidden",ue="_optionlist",ce=y.attr("uid");y.toolbar={},a={overflowAnchor:'
        ',overflowContainer:'
          '},y.toolbar.registerComponent=function(e,t,n){a[e]={toolbar:t,overflow:n}},s=y.Class.extend({addOverflowAttr:function(){this.element.attr(y.attr("overflow"),this.options.overflow||se)},addUidAttr:function(){this.element.attr(ce,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(O).show(),this.options.hidden=!1},hide:function(){this.element.addClass(O).hide(),this.overflow&&this.overflowHidden&&this.overflowHidden(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(e){e===t&&(e=!0),this.element.toggleClass(L,!e),this.options.enable=e},twin:function(){var n=this.element.attr(ce);return this.overflow&&this.options.splitContainerId?e("#"+this.options.splitContainerId).find("["+ce+"='"+n+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+ce+"='"+n+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ce+"='"+n+"']").data(this.options.type):t}}),y.toolbar.Item=s,l=s.extend({init:function(n,i){var r=e(n.useButtonTag?'':'');this.element=r,this.options=n,this.toolbar=i,this.attributes(),n.primary&&r.addClass(U),n.togglable&&(r.addClass(R),this.toggle(n.selected)),n.url===t||n.useButtonTag||(r.attr("href",n.url),n.mobile&&r.attr(y.attr("role"),"button")),n.group&&(r.attr(y.attr("group"),n.group),this.group=this.toolbar.addToGroup(this,n.group)),!n.togglable&&n.click&&S(n.click)&&(this.clickHandler=n.click),n.togglable&&n.toggle&&S(n.toggle)&&(this.toggleHandler=n.toggle)},toggle:function(e,t){e=!!e,this.group&&e?this.group.select(this):this.group||this.select(e),t&&this.twin()&&this.twin().toggle(e)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+M).data("buttonGroup")},_addGraphics:function(){var t,n,i,r=this.element,o=this.options.icon,a=this.options.spriteCssClass,s=this.options.imageUrl;(a||s||o)&&(t=!0,r.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass(q)&&!e(this).hasClass("k-image")}).each(function(n,i){(1==i.nodeType||3==i.nodeType&&e.trim(i.nodeValue).length>0)&&(t=!1)}),r.addClass(t?G:$)),o?(n=r.children("span."+q).first(),n[0]||(n=e('').prependTo(r)),n.addClass(j+o)):a?(n=r.children("span.k-sprite").first(),n[0]||(n=e('').prependTo(r)),n.addClass(a)):s&&(i=r.children("img.k-image").first(),i[0]||(i=e('icon').prependTo(r)),i.attr("src",s))}}),y.toolbar.Button=l,d=l.extend({init:function(e,t){l.fn.init.call(this,e,t);var n=this.element;n.addClass(A),this.addIdAttr(),e.align&&n.addClass("k-align-"+e.align),"overflow"!=e.showText&&e.text&&n.html(e.mobile?''+e.text+"":e.text),e.hasIcon="overflow"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),e.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(e){e===t&&(e=!1),this.element.toggleClass(P,e),this.options.selected=e}}),y.toolbar.ToolBarButton=d,u=l.extend({init:function(t,n){this.overflow=!0,l.fn.init.call(this,e.extend({},t),n);var i=this.element;"toolbar"!=t.showText&&t.text&&i.html(t.mobile?''+t.text+"":''+t.text+""),t.hasIcon="toolbar"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),t.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),i.addClass(I+" "+A),t.hidden&&this.hide(),t.togglable&&this.toggle(t.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("
        • ").parent()},overflowHidden:function(){this.element.addClass(de)},select:function(e){e===t&&(e=!1),this.options.isChild?this.element.toggleClass(P,e):this.element.find(".k-button").toggleClass(P,e),this.options.selected=e}}),y.toolbar.OverflowButton=u,y.toolbar.registerComponent("button",d,u),c=s.extend({createButtons:function(t){var n,i,r=this.options,o=r.buttons||[];for(i=0;i
          ");this.options=t,this.toolbar=n,this.addIdAttr(),t.align&&i.addClass("k-align-"+t.align),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(M),this.element.data({type:"buttonGroup",buttonGroup:this})}}),y.toolbar.ToolBarButtonGroup=h,p=c.extend({init:function(t,n){var i=this.element=e("
        • ");this.options=t,this.toolbar=n,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(u),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((t.mobile?"":M)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.OverflowButtonGroup=p,y.toolbar.registerComponent("buttonGroup",h,p),f=s.extend({init:function(t,n){var i=this.element=e('
          ');this.options=t,this.toolbar=n,this.mainButton=new d(e.extend({},t,{hidden:!1}),n),this.arrowButton=e(''),this.popupElement=e('
            '),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),t.align&&i.addClass("k-align-"+t.align),t.id||(t.id=t.uid),i.attr("id",t.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(t.enable),t.hidden&&this.hide(),i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var t=this;t.popupElement.on("keydown","."+A,function(n){var i=e(n.target).parent();n.preventDefault(),n.keyCode===D.ESC||n.keyCode===D.TAB||n.altKey&&n.keyCode===D.UP?(t.toggle(),t.focus()):n.keyCode===D.DOWN?o(i,"next").focus():n.keyCode===D.UP?o(i,"prev").focus():n.keyCode===D.SPACEBAR||n.keyCode===D.ENTER?t.toolbar.userEvents.trigger("tap",{target:e(n.target)}):n.keyCode===D.HOME?i.parent().find(":kendoFocusable").first().focus():n.keyCode===D.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var t,n,i=this.options,r=i.menuButtons;for(n=0;n").parent().appendTo(this.popupElement)},createPopup:function(){var n=this,o=this.options,a=this.element;this.popupElement.attr("id",o.id+ue).attr(ce,o.rootUid),o.mobile&&(this.popupElement=i(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:o.mobile?e(o.mobile).children(".km-pane"):null,anchor:a,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:o.animation,open:function(e){var i=n.toolbar.trigger(ne,{target:a});return i?(e.preventDefault(),t):(n.adjustPopupWidth(e.sender),t)},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){var t=n.toolbar.trigger(ie,{target:a});t&&e.preventDefault(),a.focus()}}).data("kendoPopup"),this.popup.element.on(ee,"a.k-button",r)},adjustPopupWidth:function(e){var t,n=e.options.anchor,i=F(n);y.wrap(e.element).addClass("k-split-wrapper"),t="border-box"!==e.element.css("box-sizing")?i-(F(e.element)-e.element.width()):i,e.element.css({fontFamily:n.css("font-family"),"min-width":t})},remove:function(){this.popup.element.off(ee,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(e){e===t&&(e=!0),this.mainButton.enable(e),this.options.enable=e},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(O).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(O).hide(),this.options.hidden=!1}}),y.toolbar.ToolBarSplitButton=f,m=s.extend({init:function(t,n){var i,r,o,a=this.element=e('
          • '),s=t.menuButtons;for(this.options=t,this.toolbar=n,this.overflow=!0,r=(t.id||t.uid)+ue,this.mainButton=new u(e.extend({},t)),this.mainButton.element.appendTo(a),o=0;o 
            ");this.element=i,this.options=t,this.toolbar=n,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(H),i.data({type:"separator",separator:this})}}),v=s.extend({init:function(t,n){var i=this.element=e("
          •  
          • ");this.element=i,this.options=t,this.toolbar=n,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(H),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.registerComponent("separator",g,v),_=s.extend({init:function(t,n,i){var r=S(t)?t(n):t;r=r instanceof jQuery?r.wrap("
            ").parent():e("
            ").html(r),this.element=r,this.options=n,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),r.data({type:"template",template:this})}}),y.toolbar.TemplateItem=_,b=s.extend({init:function(t,n,i){var r=e(S(t)?t(n):t);r=r instanceof jQuery?r.wrap("
          • ").parent():e("
          • ").html(r),this.element=r,this.options=n,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),r.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.OverflowTemplateItem=b,k=x.extend({init:function(e){this.name=e,this.buttons=[]},add:function(e){this.buttons[this.buttons.length]=e},remove:function(t){var n=e.inArray(t,this.buttons);this.buttons.splice(n,1)},select:function(e){var t,n;for(n=0;n'),n=i(n)):t.overflowAnchor.append(''),t.popup=new y.ui.Popup(n,{origin:"bottom "+s,position:"top "+s,anchor:t.overflowAnchor,isRtl:r,animation:t.animation,appendTo:t.isMobile?e(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(n){var i=y.wrap(t.popup.element).addClass("k-overflow-wrapper");t.isMobile?t.popup.container.css("max-height",parseFloat(e(".km-content:visible").innerHeight())-15+"px"):i.css("margin-left",(r?-1:1)*((F(i)-i.width())/2+1)),t.trigger(re)&&n.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){t.trigger(oe)&&e.preventDefault(),this.element.focus()}}),t.popup.element.on("keydown","."+A,function(n){var i,r=e(n.target),a=r.parent(),s=a.is("."+M)||a.is("."+z);n.preventDefault(),n.keyCode===D.ESC||n.keyCode===D.TAB||n.altKey&&n.keyCode===D.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):n.keyCode===D.DOWN?(i=!s||s&&r.is(":last-child")?a:r,o(i,"next").focus()):n.keyCode===D.UP?(i=!s||s&&r.is(":first-child")?a:r,o(i,"prev").focus()):n.keyCode===D.SPACEBAR||n.keyCode===D.ENTER?(t.userEvents.trigger("tap",{target:e(n.target)}),t.overflowAnchor.focus()):n.keyCode===D.HOME?a.parent().find(":kendoFocusable").first().focus():n.keyCode===D.END&&a.parent().find(":kendoFocusable").last().focus()}),t.popup.container=t.isMobile?t.popup.element.find("."+X):t.popup.element,t.popup.container.attr(ce,this.uid)},_toggleOverflowAnchor:function(){var e=!1;e=this.options.mobile?this.popup.element.find("."+X).children(":not(."+de+", ."+N+")").length>0:this.popup.element.children(":not(."+de+", ."+N+")").length>0,this.overflowAnchor.css(e?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(n){var i,r,o,a,s,l,d,u=this,c=n.target.closest("."+Y).length;return n.preventDefault(),c?(u._toggle(n),t):(r=e(n.target).closest("."+A,u.element),r.hasClass(Q)||(o=r.data("button"),!o&&u.popup&&(r=e(n.target).closest("."+I,u.popup.container),o=r.parent("li").data("button")),o&&o.options.enable&&(o.options.togglable?(s=S(o.toggleHandler)?o.toggleHandler:null,o.toggle(!o.options.selected,!0),l={target:r,group:o.options.group,checked:o.options.selected,id:o.options.id},s&&s.call(u,l),u.trigger(te,l)):(s=S(o.clickHandler)?o.clickHandler:null,l={sender:u,target:r,id:o.options.id},s&&s.call(u,l),u.trigger(ee,l)),o.options.url&&(o.options.attributes&&o.options.attributes.target&&(d=o.options.attributes.target),window.open(o.options.url,d||"_self")),r.hasClass(I)&&u.popup.close(),a=r.closest(".k-split-container"),a[0]&&(i=a.data("kendoPopup"),(i?i:a.parents(".km-popup-wrapper").data("kendoPopup")).close()))),t)},_navigatable:function(){var t=this;t.element.attr("tabindex",0).focus(function(){var t=e(this).find(":kendoFocusable:first");0!==t.length&&(t.is("."+Q)&&(t=o(t,"next")),t[0].focus())}).on("keydown",T(t._keydown,t))},_keydown:function(n){var i,r,o,a,s,l,d,u=e(n.target),c=n.keyCode,h=this.element.children(":not(.k-separator):visible"),p=this._isRtl?-1:1;if(c===D.TAB&&(i=u.parentsUntil(this.element).last(),r=!1,o=!1,i.length||(i=u),i.is("."+Q)&&(n.shiftKey&&n.preventDefault(),h.last().is(":kendoFocusable")?h.last().focus():h.last().find(":kendoFocusable").last().focus()),n.shiftKey||h.index(i)!==h.length-1||(r=!i.is("."+M)||u.is(":last-child")),a=h.index(i)===h.not(".k-overflow-anchor").first().index(),n.shiftKey&&a&&(o=!i.is("."+M)||u.is(":first-child")),r&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(n.preventDefault(),this.overflowAnchor.focus()),o&&(n.preventDefault(),s=this._getPrevFocusable(this.wrapper),s&&s.focus()),this._preventNextFocus=!1),n.altKey&&c===D.DOWN)return l=e(document.activeElement).data("splitButton"),d=e(document.activeElement).is("."+Q),l?l.toggle():d&&this._toggleOverflow(),t;if((c===D.SPACEBAR||c===D.ENTER)&&!u.is("input, checkbox"))return n.preventDefault(),u.is("."+z)&&(u=u.children().first()),this.userEvents.trigger("tap",{target:u}),t;if(c===D.HOME){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor?h.eq(1).focus():h.first().focus(),n.preventDefault()}else if(c===D.END){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor&&"hidden"!=e(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():h.last().focus(),n.preventDefault()}else c!==D.RIGHT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(n.target,1*p)?c!==D.LEFT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(n.target,-1*p)||(this._getNextElement(n.target,-1*p).focus(),n.preventDefault()):(this._getNextElement(n.target,1*p).focus(),n.preventDefault())},_getNextElement:function(t,n){var i=this.element.children(":not(.k-separator):visible"),r=i.index(i.index(t)===-1?t.parentElement:t),o=this.overflowAnchor?1:0,a=n,s=1===n?i.length-1:o,l=1===n?o:i.length-1,d=i[r+n];if(this._preventNextFocus=!1,e(t).closest("."+M).length&&!e(t).is(1===n?":last-child":":first-child"))return e(t).closest("."+M).children()[e(t).closest("."+M).children().index(t)+n];for(this.overflowAnchor&&t===this.overflowAnchor[0]&&n===-1&&(d=i[i.length-1]),r===s&&(d=!this.overflowAnchor||this.overflowAnchor&&"hidden"===e(this.overflowAnchor).css("visibility")?i[l]:this.overflowAnchor);!e(d).is(":kendoFocusable");){if(d=n===-1&&e(d).closest("."+M).length?e(d).children(":not(label, div)").last():e(d).children(":not(label, div)").first(),!d.length&&(a+=n,d=i[r+a],!d))return this.overflowAnchor;this._preventNextFocus=!e(d).closest("."+M).length}return d},_getPrevFocusable:function(n){if(n.is("html"))return n;var i,r,o=n.prevAll();return o.each(function(){return r=e(this),r.is(":kendoFocusable")?(i=r,!1):r.find(":kendoFocusable").length>0?(i=r.find(":kendoFocusable").last(),!1):t}),i?i:this._getPrevFocusable(n.parent())},_toggle:function(t){var n=e(t.target).closest("."+z).data("splitButton");t.preventDefault(),n.options.enable&&n.toggle()},_toggleOverflow:function(){this.popup.toggle()},_resize:function(e){var t=e.width;this.options.resizable&&(this.popup.close(),this._shrink(t),this._stretch(t),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var t=0;return this.element.children(":visible:not('."+O+"')").each(function(){t+=F(e(this),!0)}),Math.ceil(t)},_shrink:function(e){var t,n,i;if(e=0&&(t=n.eq(i),!(e>this._childrenWidth()));i--)this._hideItem(t)},_stretch:function(e){var t,n,i;if(e>this._childrenWidth())for(n=this.element.children(":hidden:not('."+O+"')"),i=0;ili[data-uid='"+e.data("uid")+"']").removeClass(de)},_showItem:function(e,t){return!!(e.length&&t>this._childrenWidth()+F(e,!0))&&(e.show(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(de),!0)},_markVisibles:function(){var e=this.popup.container.children(),t=this.element.children(":not(.k-overflow-anchor)"),n=e.filter(":not(.k-overflow-hidden)"),i=t.filter(":visible");e.add(t).removeClass(J+" "+Z),n.first().add(i.first()).addClass(J),n.last().add(i.last()).addClass(Z)}}),y.ui.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mediaplayer.min",["kendo.slider.min","kendo.toolbar.min","kendo.dropdownlist.min","kendo.tooltip.min"],e)}(function(){return function(e,t){var n=window.kendo,i="end",r="pause",o="play",a="ready",s="timeChange",l="volumeChange",d="k-i-full-screen",u="k-i-full-screen-exit",c="k-i-volume-off",h="k-i-volume-down",p="k-i-volume-up",f="k-mediaplayer-quality",m="k-i-play",g="k-i-pause",v="k-mediaplayer-titlebar",_="k-title",b="k-mediaplayer-toolbar-wrap",k="k-mediaplayer-toolbar",w="k-mediaplayer-seekbar",y="k-mediaplayer-volume",x="k-mediaplayer-media",C="k-mediaplayer-overlay",T="k-mediaplayer-yt",S=".",D=n.ui,F=".kendoMediaPlayer",E=new Date(1970,0,1),A=60*E.getTimezoneOffset(),I=n.ui.Widget,R=e.isArray,M={shortTime:"mm:ss",longTime:"HH:mm:ss"},z=n.template,H=e.proxy,N=n.keys,B={htmlPlayer:"",titleBar:z("
            Video Title
            "),toolBar:"
            ",youtubePlayer:"
            ",toolBarTime:"00:00:00 / 00:00:00",slider:"",volumeSlider:"",qualityDropDown:"",toolTip:"#= kendo.toString(new Date(value), 'HH:mm:ss') #"},P=I.extend({init:function(t,i){this.wrapper=e(t),I.fn.init.call(this,t,i),this.wrapper.addClass("k-mediaplayer k-widget"),i=this.options,this._currentIndex=0,this._createTitlebar(),this._createToolbar(),this._createDropDown(),this._createSlider(),this._createVolumeSlider(),this._timers={},this._aria(),this._navigatable(),i.media&&this.media(this.options.media),n.notify(this)},events:[i,r,o,a,s,l],options:{name:"MediaPlayer",autoPlay:!1,autoRepeat:!1,volume:100,fullScreen:!1,mute:!1,navigatable:!1,forwardSeek:!0,media:null,messages:{pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",quality:"Quality",fullscreen:"Full Screen"}},_msToTime:function(e){var t=new Date(E.getTime());return t.setSeconds(e),t},_timeToSec:function(e){var t=new Date(e).getTime();return t/1e3},_createTitlebar:function(){this._titleBar=this.wrapper.find(S+v),0===this._titleBar.length&&(this.wrapper.append(B.titleBar),this._titleBar=this.wrapper.find(S+v))},_createSlider:function(){var e=this.wrapper.find(S+w);this._slider||(this._sliderDragChangeHandler=H(this._sliderDragChange,this),this._sliderDraggingHandler=H(this._sliderDragging,this),e=this.wrapper.find(S+w),this._slider=new D.Slider(e[0],{smallStep:1e3,tickPlacement:"none",showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:B.toolTip},dragHandleTitle:""}))},_createVolumeSlider:function(){var e=this.wrapper.find(S+y);this._volumeSlider||(this._volumeDraggingHandler=H(this._volumeDragging,this),this._volumeChangeHandler=H(this._volumeChange,this),e.width(87),this._volumeSlider=new D.Slider(e[0],{smallStep:1,min:0,max:100,value:this.options.volume,slide:this._volumeDraggingHandler,change:this._volumeChangeHandler,tickPlacement:"none",showButtons:!1,tooltip:{enabled:!1},dragHandleTitle:""}))},_resetTime:function(){this._youTubeVideo?this._ytmedia.seekTo(0,!0):this._media.currentTime=0,this._mediaTimeUpdate(),e.grep(this._toolBar.options.items,function(e){return!!e.template}).template=B.toolBarTime},_currentUrl:function(){var e=this.media();return R(e.source)?e.source[this._currentIndex].url:e.source},_isYouTubeUrl:function(){return!!this._currentUrl().match("youtube.com/|youtu.be/")},_setPlayerUrl:function(){var e,t=this._youTubeVideo;this.stop(),this._youTubeVideo=this._isYouTubeUrl(),t!==this._youTubeVideo&&(this.wrapper.find(S+T).toggle(),this.wrapper.find(S+x).toggle()),e=this._media||this._ytmedia,this._initializePlayer(),e&&(this.mute(this.mute()),this.volume(this.volume())),this._youTubeVideo?this._ytmedia&&(this._videoOverlay&&this._videoOverlay.hide(),this.options.autoPlay?(this._ytmedia.loadVideoById(this._getMediaId()),this._playStateToggle(!0)):(this._ytmedia.cueVideoById(this._getMediaId()),this._playStateToggle(!0))):(this._videoOverlay.show(),this.wrapper.find(S+x+" > source").remove(),this.wrapper.find(S+x).attr("src",this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(S+k);0===t.length&&(this._toolbarClickHandler=H(this._toolbarClick,this),this.wrapper.append(B.toolBar),t=this.wrapper.find(S+k),t.width(this.wrapper.find(S+x).width()),this._toolBar=new D.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:"button",attributes:{"class":"k-play-button"},icon:"play"},{template:B.toolBarTime,attributes:{"class":"k-mediaplayer-currenttime-wrap"}},{type:"separator",attributes:{"class":"k-toolbar-spacer"}},{type:"button",attributes:{"class":"k-volume-button"},icon:"volume-up"},{template:B.volumeSlider,attributes:{"class":"k-mediaplayer-volume-wrap"}},{template:B.qualityDropDown,attributes:{"class":"k-mediaplayer-quality-wrap"}},{type:"button",attributes:{"class":"k-fullscreen-button"},icon:"full-screen"}]}),this._toolBar.wrapper.off("keydown"),t.before(B.slider),this._volumeButton=t.find(".k-volume-button"), this._fullscreenButton=t.find(".k-fullscreen-button"),this._volumeButton.attr("title",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._volumeButton.attr("aria-label",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._fullscreenButton.attr("title",this.options.messages.fullscreen),this._fullscreenButton.attr("aria-label",this.options.messages.fullscreen),t.width("auto"),this._currentTimeElement=t.find(".k-mediaplayer-currenttime"),this._durationElement=t.find(".k-mediaplayer-duration"),this._playButton=t.find(".k-play-button"),this._playButtonSpan=this._playButton.find(".k-i-play"),this.options.autoPlay&&this._playStateToggle(!0),e([this._volumeButton[0],t.find(".k-mediaplayer-volume-wrap")[0],t.find(".k-mediaplayer-quality-wrap")[0],this._fullscreenButton[0]]).wrapAll("
            "),t.find(".k-button").addClass("k-bare"))},_createDropDown:function(){var e=this.wrapper.find(S+f),n=this.media();t===e.data("kendoDropDownList")&&(this._dropDownSelectHandler=H(this._dropDownSelect,this),this._dropDown=new D.DropDownList(e,{dataTextField:"quality",dataValueField:"url",popup:{position:"bottom",origin:"top",appendTo:this.wrapper},animation:{open:{effects:"slideIn:up",duration:1}},select:this._dropDownSelectHandler}),n&&R(n.source)&&(this._dropDown.setDataSource(n.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass("k-button k-bare"),this._dropDown.wrapper.attr("title",this.options.messages.quality).hide(),this._dropDown.wrapper.find("span.k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-icon k-i-hd"),this._dropDown.list.addClass("k-quality-list"))},_dropDownSelect:function(e){this._currentIndex!==e.item.index()&&(this._currentIndex=e.item.index(),this._setPlayerUrl())},_toolbarClick:function(t){var n,i=e(t.target).children().first(),r=i.hasClass(m);this.media()&&((i.hasClass(m)||i.hasClass(g))&&(r?this.play():this.pause()),(i.hasClass(d)||i.hasClass(u))&&(this._isInFullScreen?(i.removeClass(u).addClass(d),this.fullScreen(!1)):(i.removeClass(d).addClass(u),this.fullScreen(!0))),(i.hasClass(c)||i.hasClass(h)||i.hasClass(p))&&(n=this.mute(),this.mute(!n)))},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(e){var t=this,n=e.sender,i=1e3*A;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&n.value()>this._seekBarLastPosition?setTimeout(function(){n.value(t._seekBarLastPosition)},1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(e.value-i)):t._media.currentTime=t._timeToSec(e.value-i),t.trigger(s),t._preventPlay=!0)},_changeVolumeButtonImage:function(e){var t=this._volumeButton,n=t.find("span"),i=n.attr("class");i=i.substring(0,i.lastIndexOf(" ")),0===e?(n.attr("class",i+" "+c),t.attr("title",this.options.messages.unmute),t.attr("aria-label",this.options.messages.unmute)):e>0&&e<51?(n.attr("class",i+" "+h),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute)):(n.attr("class",i+" "+p),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute))},_volumeDragging:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_volumeChange:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_mediaTimeUpdate:function(){var e=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime,t=this._msToTime(e);return this._currentTimeElement.text(n.toString(t,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=1e3*(e+A),this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(e){t===e&&(e=this._playButtonSpan.is(S+m)),e?(this._playButtonSpan.removeClass(m).addClass(g),this._playButton.attr("title",this.options.messages.pause),this._playButton.attr("aria-label",this.options.messages.pause)):(this._playButtonSpan.removeClass(g).addClass(m),this._playButton.attr("title",this.options.messages.play),this._playButton.attr("aria-label",this.options.messages.play))},_mediaEnded:function(){this._playStateToggle(!1),this._currentTimeElement.text(n.toString(this._msToTime(0),this._timeFormat)),this._slider.value(1e3*(0+A)),this.trigger(i)},_mediaPlay:function(){this.trigger(o)},_mediaReady:function(){this.trigger(a)},_mediaDurationChange:function(){var e=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=0===e.getHours()?M.shortTime:M.longTime,this._durationElement.text(n.toString(e,this._timeFormat)),this._slider.setOptions({min:E.getTime(),max:e.getTime()}),this._isFirstRun||(this._resetTime(),this._isFirstRun=!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=H(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=H(this._mediaDurationChange,this),this.wrapper.prepend(B.youtubePlayer),this._ytPlayer=this.wrapper.find(S+T)[0],e(this._ytPlayer).css({width:this.wrapper.width(),height:this.wrapper.height()}),window.YT&&window.YT.Player?this._configurePlayer():(window.onYouTubeIframeAPIReadyRegister||(window.onYouTubeIframeAPIReadyRegister=[],e.getScript("https://www.youtube.com/iframe_api"),window.onYouTubeIframeAPIReady=function(){if(window.onYouTubeIframeAPIReadyRegister)for(var e=0;e
            "),this._videoOverlay=this.wrapper.find(".k-mediaplayer-overlay").on("click"+F,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=H(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=H(this._mediaDurationChange,this),this._mediaEndedHandler=H(this._mediaEnded,this),this._mediaCanPlayHandler=H(this._mediaReady,this),this._mediaPlayHandler=H(this._mediaPlay,this),this._videoOverlay.after(B.htmlPlayer),this._media=this.wrapper.find(S+x)[0],e(this._media).css({width:"100%",height:"100%"}),this.options.mute&&this.mute(!0),this._media.ontimeupdate=this._mediaTimeUpdateHandler,this._media.ondurationchange=this._mediaDurationChangeHandler,this._media.oncanplay=this._mediaCanPlayHandler,this._media.onplay=this._mediaPlayHandler,this._media.onended=this._mediaEndedHandler,this._media.loop=this.options.autoRepeat},_mouseIn:function(){this._uiDisplay(!0)},_mouseOut:function(){this._poll("mouseIdle",this._mouseIdle,3e3,this)},_mouseIdle:function(){return this._uiDisplay(!1),!1},_mouseMove:function(){this._titleBar.is(":animated")||this._toolBar.element.is(":animated")||this._slider.wrapper.is(":animated")||this._uiDisplay(!0),this._poll("mouseIdle",this._mouseIdle,3e3,this)},_uiDisplay:function(e){var t="slow",n=this._titleBar.add(this._toolBar.element.parent());e?n.fadeIn(t):(n.fadeOut(t),this.options.navigatable&&this.wrapper.focus())},setOptions:function(e){I.fn.setOptions.call(this,e)},destroy:function(){I.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(F),this.element.find(S+C).off(F),this._timers=null,this._mouseMoveHandler=null,this._mouseOutHandler=null,this._mouseInHandler=null,this._mouseClickHanlder=null,this._keyDownHandler=null,this._fullscreenHandler=null,this._toolbarClickHandler=null,this._sliderDragChangeHandler=null,this._sliderDraggingHandler=null,this._volumeDraggingHandler=null,this._volumeChangeHandler=null,this._youtubeApiReadyHandler=null,this._onYouTubePlayerReady=null,this._onPlayerStateChangeHandler=null,this._dropDownSelectHandler=null,this._youTubeVideo?this._ytmedia.destroy():(this._media.ontimeupdate=this._mediaTimeUpdateHandler=null,this._media.ondurationchange=this._mediaDurationChangeHandler=null,this._media.oncanplay=this._mediaCanPlayHandler=null,this._media.onplay=this._mediaPlayHandler=null,this._media.onended=this._mediaEndedHandler=null,this._media.src="",this._media.remove()),this._mouseMoveTimer=null,clearTimeout(this._mouseMoveTimer),n.destroy(this.element)},seek:function(e){if(t===e)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var n=e/1e3;return this._youTubeVideo?n+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(n,!0):this._media.currentTime=n,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(n.support.mobileOS&&this._uiDisplay(!1),this._media.play()),this._paused=!1,this._playStateToggle(!0),this},stop:function(){return this._youTubeVideo&&this._ytmedia?this._ytmedia.stopVideo():this._media&&!this._youTubeVideo&&(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause(),this._media.currentTime=0),this._paused=!0,this._playStateToggle(!1),this},pause:function(){return this._youTubeVideo?this._ytmedia.pauseVideo():(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause()),this._paused=!0,this._playStateToggle(!1),this.trigger(r),this},toolbar:function(){return this._toolBar},dropdown:function(){return this._dropDown},titlebar:function(){return this._titleBar},fullScreen:function(e){if(t===e)return this._isInFullScreen||!1;var n=this.element.get(0);e?(this.element.addClass("k-mediaplayer-fullscreen"),n.requestFullscreen?n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen(),this._isInFullScreen=!0):(document.cancelFullscreen?document.cancelFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msCancelFullscreen?document.msCancelFullscreen():document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),this.element.removeClass("k-mediaplayer-fullscreen"),this._isInFullScreen=!1),this._slider.resize()},volume:function(e){return t===e?t!==this._volume?this._volume:this._volume=this.options.volume:(this._volume=e,this.mute(e<=0),this._youTubeVideo?this._ytmedia.setVolume(this._volume):this._media.volume=this._volume/100,this._volumeSlider.value(e),t)},mute:function(e){var n=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;return t===e||e===n?n:(this._youTubeVideo?e?this._ytmedia.mute():this._ytmedia.unMute():this._media.muted=e,this._volumeSlider.value(e?0:this._media&&100*this._media.volume||this._ytmedia&&this._ytmedia.getVolume()),this.trigger(l),this._changeVolumeButtonImage(this._volumeSlider.value()),t)},isEnded:function(){return this._youTubeVideo?0===this._ytmedia.getPlayerState():this._media.ended},media:function(e){var n=this.dropdown();return t===e?t!==this._mediaData?this._mediaData:this._mediaData=this.options.media:(R(e.source)?(n.setDataSource(e.source),n.wrapper.show()):n.wrapper.hide(),this._mediaData=e,this._updateTitle(),this._setPlayerUrl(),t)},isPaused:function(){return this._paused},isPlaying:function(){return!this.isEnded()&&!this._paused},_aria:function(){this.wrapper.attr("role","region")},_navigatable:function(){this._fullscreenHandler=H(this._fullscreen,this),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+F,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=H(this._keyDown,this),this.wrapper.on("keydown"+F,this._keyDownHandler))},_fullscreen:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;this._uiDisplay(!0),this._slider.resize(),e||(this.wrapper.find('span[class*="k-i-fullscreen"]').removeClass(u).addClass(d),this.fullScreen(!1))},_keyDown:function(e){var t,n;e.preventDefault(),t=this.wrapper.find('span[class*="k-i-fullscreen"]'),e.keyCode===N.SPACEBAR?this.isPlaying()?this.pause():this.play():e.keyCode!==N.ENTER||this._isInFullScreen?77===e.keyCode?(n=this.mute(),this.mute(!n)):e.keyCode===N.ESC&&this._isInFullScreen&&(t.removeClass(u).addClass(d),this.fullScreen(!1)):(t.removeClass(d).addClass(u),this.fullScreen(!0))},_error:function(){},_progress:function(){}});D.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pivotgrid.min",["kendo.dom.min","kendo.data.min"],e)}(function(){return function(e,t){function n(e){var n="string"==typeof e?[{name:e}]:e,i="[object Array]"===ke.call(n)?n:n!==t?[n]:[];return ye(i,function(e){return"string"==typeof e?{name:e}:{name:e.name,type:e.type}})}function i(e){var n="string"==typeof e?[{name:[e],expand:!1}]:e,i="[object Array]"===ke.call(n)?n:n!==t?[n]:[];return ye(i,function(e){return"string"==typeof e?{name:[e],expand:!1}:{name:"[object Array]"===ke.call(e.name)?e.name.slice():[e.name],expand:e.expand}})}function r(e){return e.indexOf(" ")!==-1&&(e='["'+e+'"]'),e}function o(e,t,n,i){var r,a,s,l;if(n||(n=t),i||(i=0),l=n.members[i],l&&!l.measure){if(s=l.children,a=s.length,n===t?e[pe.stringify([l.name])]=!!a:a&&(e[pe.stringify(se(n,i))]=!0),a)for(r=0;r0});return n}function d(e,t,n){var r,o;return e=e||{},s(t,e),n.length>1&&t.push({name:De,measure:!0,children:i(n)}),r={members:t},e.tuples&&(o=x(e.tuples,r),o.tuple&&(t=l(o.tuple))),t}function u(e){var t=pe.getter(e.field,!0);return function(n,i){return e.aggregate(t(n.dataItem),i,n)}}function c(e){return"number"==typeof e&&!isNaN(e)}function h(e){return e&&e.getTime}function p(e){return e[e.length]={value:"",fmtValue:"",ordinal:e.length},e}function f(e,t,n){if(e.tuples.length<_(t.tuples,n))return t}function m(e,t,n,i,r){var o,a,s,l=e.length,d=_(t,i),u=i.length||1;for(a=0;a2?t[0]+"."+t[1]:e}function M(e,t){var n=e.length-1,i=e[n],r=z(t,i);return r&&r.dir?i="ORDER("+i+".Children,"+r.field+".CurrentMember.MEMBER_CAPTION,"+r.dir+")":i+=".Children",e[n]=i,e}function z(e,t){for(var n=0,i=e.length;n2?(t=e.pop(),n+=H(e)):(n+=e.shift(),t=e.pop()),n+="},{",n+=t,n+="})"}function N(e,t){var n=e.slice(0);return t.length>1&&n.push("{"+B(t).join(",")+"}"),H(n)}function B(e){for(var n,i=0,r=e.length,o=[];i1)l.push(t);else{for(o=R(r[0]),n=0,i=d.length;n1||t.length>1){for(a.push(N(o,t));l=0;i--)n="SELECT (",n+=U(o[i]),n+=") ON 0",i==a-1?(n+=" FROM ["+t+"]",r=n):r=n+" FROM ( "+r+" )";return r}function j(e,t,n){var i,r,o="";if(t){o+="<"+e+">";for(r in t)i=t[r],n&&(r=r.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),o+="<"+r+">"+i+"";o+=""}else o+="<"+e+"/>";return o}function G(e){if(null==e)return[];var t=ke.call(e);return"[object Array]"!==t?[e]:e}function $(e){var t,n,i,r,o={tuples:[]},a=G(pe.getter("Tuples.Tuple",!0)(e)),s=pe.getter("Caption['#text']"),l=pe.getter("UName['#text']"),d=pe.getter("LName['#text']"),u=pe.getter("LNum['#text']"),c=pe.getter("CHILDREN_CARDINALITY['#text']",!0),h=pe.getter("['@Hierarchy']"),p=pe.getter("PARENT_UNIQUE_NAME['#text']",!0);for(t=0;t0,parentName:p(i[r]),hierarchy:h(i[r])});o.tuples.push({members:n})}return o}var K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de,ue,ce,he,pe=window.kendo,fe=pe.ui,me=pe.Class,ge=fe.Widget,ve=pe.data.DataSource,_e=pe._outerWidth,be=pe._outerHeight,ke={}.toString,we=function(e){return e},ye=e.map,xe=e.extend,Ce=pe.isFunction,Te="change",Se="error",De="Measures",Fe="progress",Ee="stateReset",Ae="auto",Ie="
            ",Re=".kendoPivotGrid",Me="__row_total__",ze="dataBinding",He="dataBound",Ne="expandMember",Be="collapseMember",Pe="k-i-collapse",Le="k-i-expand",Oe="#: data.member.caption || data.member.name #",Ve='',We='',Ue='#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || " " : " " #',qe='
            ',je="rows",Ge="columns",$e={sum:function(e,t){var n=t.accumulator;return c(n)?c(e)&&(n+=e):n=e,n},count:function(e,t){return(t.accumulator||0)+1},average:{aggregate:function(e,n){var i=n.accumulator;return n.count===t&&(n.count=0),c(i)?c(e)&&(i+=e):i=e,c(e)&&n.count++,i},result:function(e){var t=e.accumulator;return c(t)&&(t/=e.count),t}},max:function(e,t){var n=t.accumulator;return c(n)||h(n)||(n=e),ne&&(c(e)||h(e))&&(n=e),n}},Ke=me.extend({init:function(e){this.options=xe({},this.options,e),this.dimensions=this._normalizeDescriptors("field",this.options.dimensions),this.measures=this._normalizeDescriptors("name",this.options.measures)},_normalizeDescriptors:function(e,t){var n,i,r,o;if(t=t||{},n={},"[object Array]"===ke.call(t)){for(r=0,o=t.length;r1?o[0]:t,hierarchy:r};s>1&&(i.members[i.members.length]={children:[],caption:n[d].caption,name:n[d].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),c[c.length]=i}h.push(Me)}return{keys:h,tuples:c}},_expandedTuples:function(e,n,i){var r,o,a,s,l,d,u,c,h,p,f,m=i.length||1,g=this.dimensions||[],v=[],_=[];for(a in e){for(s=e[a],u=this._findExpandedMember(n,s.uniquePath),l=v[u.index]||[],d=_[u.index]||[],c=u.member.names,r=0;r1?h[0]:t,hierarchy:p});m>1&&(o.members[o.members.length]={children:[],caption:i[r].caption,name:i[r].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!0,parentName:t,hierarchy:"MEASURES"}),l[l.length]=o}v[u.index]=l,_[u.index]=d}return{keys:_,tuples:v}},_findExpandedMember:function(e,t){for(var n=0;n0;)if(r=l[--d].split("&"),r.length>1&&(o=r[0],a=r[1],s=i[o](e),s=s!==t&&null!==s?""+s:s,s!=a))return!1;return!0},_calculateAggregate:function(e,t,n){var i,r,o,a={};for(o=0;o1?o[t[0]]=pe.getter(t[0],!0):o[n]=pe.getter(r(n),!0);return o},_parseDescriptors:function(e){var t,n=V(e),i=L(n.root),r=n.expanded,o=[];for(t=0;t1)||n.columns&&n.columns.length||(a={root:[],expanded:[]}),A=this._asTuples(d,a,o?[]:p),I=this._asTuples(u,s,o?p:[]),d=A.tuples,u=I.tuples,l=this._toDataArray(l,this._measuresInfo(p,o),I.keys,A.keys)):l=d=u=[],{axes:{columns:{tuples:d},rows:{tuples:u}},data:l}}}),Ye=me.extend({init:function(e,t){this.transport=t,this.options=t.options||{},this.transport.discover||Ce(e.discover)&&(this.discover=e.discover)},read:function(e){return this.transport.read(e)},update:function(e){return this.transport.update(e)},create:function(e){return this.transport.create(e)},destroy:function(e){return this.transport.destroy(e)},discover:function(e){return this.transport.discover?this.transport.discover(e):(e.success({}),t)},catalog:function(n){var i,r=this.options||{};return n===t?(r.connection||{}).catalog:(i=r.connection||{},i.catalog=n,this.options.connection=i,e.extend(this.transport.options,{connection:i}),t)},cube:function(e){var n,i=this.options||{};return e===t?(i.connection||{}).cube:(n=i.connection||{}, n.cube=e,this.options.connection=n,xe(!0,this.transport.options,{connection:n}),t)}}),Qe=ve.extend({init:function(t){var r,o=((t||{}).schema||{}).cube,a="columns",s={axes:we,cubes:we,catalogs:we,measures:we,dimensions:we,hierarchies:we,levels:we,members:we};o&&(s=e.extend(s,this._cubeSchema(o)),this.cubeBuilder=new Ke(o)),ve.fn.init.call(this,xe(!0,{},{schema:s},t)),this.transport=new Ye(this.options.transport||{},this.transport),this._columns=i(this.options.columns),this._rows=i(this.options.rows),r=this.options.measures||[],"[object Object]"===ke.call(r)&&(a=r.axis||"columns",r=r.values||[]),this._measures=n(r),this._measuresAxis=a,this._skipNormalize=0,this._axes={}},_cubeSchema:function(t){return{dimensions:function(){var e,n=[],i=t.dimensions;for(e in i)n.push({name:e,caption:i[e].caption||e,uniqueName:e,defaultHierarchy:e,type:1});return t.measures&&n.push({name:De,caption:De,uniqueName:De,type:2}),n},hierarchies:function(){return[]},measures:function(){var e,n=[],i=t.measures;for(e in i)n.push({name:e,caption:e,uniqueName:e,aggregator:e});return n},members:e.proxy(function(e,n){var i,o,a=n.levelUniqueName||n.memberUniqueName,s=this.options.schema.data,l=Ce(s)?s:pe.getter(s,!0),d=this.options.data&&l(this.options.data)||this._rawData||[],u=[],c=0,h={};if(a&&(a=a.split(".")[0]),!n.treeOp)return u.push({caption:t.dimensions[a].caption||a,childrenCardinality:"1",dimensionUniqueName:a,hierarchyUniqueName:a,levelUniqueName:a,name:a,uniqueName:a}),u;for(i=pe.getter(r(a),!0);c0&&(this._skipNormalize-=1),this.cubeBuilder||(e=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:i,rowIndexes:r,data:e})),"rows"==this._lastExpanded?(o=t.columns.tuples,s=this._columnMeasures(),a=f(t.columns,this._axes.columns,s),a&&(l="columns",t.columns=a,m(o,a.tuples,t.rows.tuples.length,s,e),this.cubeBuilder||(e=this._normalizeData({columnsLength:_(t.columns.tuples,s),rowsLength:t.rows.tuples.length,data:e})))):"columns"==this._lastExpanded&&(o=t.rows.tuples,s=this._rowMeasures(),a=f(t.rows,this._axes.rows,s),a&&(l="rows",t.rows=a,g(o,a.tuples,t.columns.tuples.length,s,e),this.cubeBuilder||(e=this._normalizeData({columnsLength:_(t.rows.tuples,s),rowsLength:t.columns.tuples.length,data:e})))),this._lastExpanded=null,h=this._mergeAxes(t,e,l),this._axes=h.axes,h.data},_readData:function(e){var t=this.reader.axes(e),n=this.reader.data(e);return this.cubeBuilder&&(this._rawData=n),this._processResult(n,t)},_createTuple:function(e,t,n){var i,r,o,a,s,l,d,u,c=e.members,h=c.length,p={members:[]},f=0;for(t&&(h-=1);f0&&(d=u,r-=u),o=0;o0&&(n-=l,e.splice(0,i*l)),r=0;r1&&(t=e)),t},_rowMeasures:function(){var e=this.measures(),t=[];return"rows"===this.measuresAxis()&&(0===this.rows().length?t=e:e.length>1&&(t=e)),t},_updateLocalData:function(e,t){this.cubeBuilder&&(t&&(this._requestData=t),e=this._processResult(e)),this._data=this._observe(e),this._ranges=[],this._addRange(this._data),this._total=this._data.length,this._pristineTotal=this._total,this._process(this._data)},data:function(e){var n=this;return e===t?n._data:(this._pristineData=e.slice(0),this._updateLocalData(e,{columns:this.columns(),rows:this.rows(),measures:this.measures()}),t)},_normalizeTuples:function(e,t,n,i){var r,o,a,s=i.length||1,l=0,d=[],u={},c=0;if(e.length){if(this._skipNormalize<=0&&!this._hasRoot(e[0],t,n)){for(this._skipNormalize=0;l=s&&(c=0),r.members[o].name!==i[c].name&&(e.splice(l,0,this._createTuple(r,i[c])),u[l]=l),l+=1,c+=1,r=e[l],s>c&&(!r||le(a,o-1)!==le(r,o-1))){for(;c1)for(i+=1;i 0',doesnotcontain:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}")',startswith:', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',endswith:', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',eq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',neq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"'},Y={schemaCubes:"MDSCHEMA_CUBES",schemaCatalogs:"DBSCHEMA_CATALOGS",schemaMeasures:"MDSCHEMA_MEASURES",schemaDimensions:"MDSCHEMA_DIMENSIONS",schemaHierarchies:"MDSCHEMA_HIERARCHIES",schemaLevels:"MDSCHEMA_LEVELS",schemaMembers:"MDSCHEMA_MEMBERS",schemaKPIs:"MDSCHEMA_KPIS"},Q={read:function(e){var t,n,i,r,o,a='
            ';return a+="SELECT NON EMPTY {",t=e.columns||[],n=e.rows||[],i=e.measures||[],r="rows"===e.measuresAxis,o=e.sort||[],!t.length&&n.length&&(!i.length||i.length&&r)&&(t=n,n=[],r=!1),t.length||n.length||(r=!1),t.length?a+=W(t,r?[]:i,o):i.length&&!r&&(a+=B(i).join(",")),a+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(n.length||r&&i.length>1)&&(a+=", NON EMPTY {",a+=n.length?W(n,r?i:[],o):B(i).join(","),a+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),e.filter?(a+=" FROM ",a+="(",a+=q(e.filter,e.connection.cube),a+=")"):a+=" FROM ["+e.connection.cube+"]",1==i.length&&t.length&&(a+=" WHERE ("+B(i).join(",")+")"),a+=""+e.connection.catalog+"Multidimensional",a.replace(/\&/g,"&")},discover:function(t){t=t||{};var n='
            ';return n+=""+(Y[t.command]||t.command)+"",n+=""+j("RestrictionList",t.restrictions,!0)+"",t.connection&&t.connection.catalog&&(t.properties=e.extend({},{Catalog:t.connection.catalog},t.properties)),n+=""+j("PropertyList",t.properties)+"",n+=""}},X=pe.data.RemoteTransport.extend({init:function(e){var t=e;e=this.options=xe(!0,{},this.options,e),pe.data.RemoteTransport.call(this,e),Ce(t.discover)?this.discover=t.discover:"string"==typeof t.discover?this.options.discover={url:t.discover}:t.discover||(this.options.discover=this.options.read)},setup:function(t,n){return t.data=t.data||{},e.extend(!0,t.data,{connection:this.options.connection}),pe.data.RemoteTransport.fn.setup.call(this,t,n)},options:{read:{dataType:"text",contentType:"text/xml",type:"POST"},discover:{dataType:"text",contentType:"text/xml",type:"POST"},parameterMap:function(e,t){return Q[t](e,t)}},discover:function(t){return e.ajax(this.setup(t,"discover"))}}),J={cubes:{name:pe.getter("CUBE_NAME['#text']",!0),caption:pe.getter("CUBE_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),type:pe.getter("CUBE_TYPE['#text']",!0)},catalogs:{name:pe.getter("CATALOG_NAME['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0)},measures:{name:pe.getter("MEASURE_NAME['#text']",!0),caption:pe.getter("MEASURE_CAPTION['#text']",!0),uniqueName:pe.getter("MEASURE_UNIQUE_NAME['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),aggregator:pe.getter("MEASURE_AGGREGATOR['#text']",!0),groupName:pe.getter("MEASUREGROUP_NAME['#text']",!0),displayFolder:pe.getter("MEASURE_DISPLAY_FOLDER['#text']",!0),defaultFormat:pe.getter("DEFAULT_FORMAT_STRING['#text']",!0)},kpis:{name:pe.getter("KPI_NAME['#text']",!0),caption:pe.getter("KPI_CAPTION['#text']",!0),value:pe.getter("KPI_VALUE['#text']",!0),goal:pe.getter("KPI_GOAL['#text']",!0),status:pe.getter("KPI_STATUS['#text']",!0),trend:pe.getter("KPI_TREND['#text']",!0),statusGraphic:pe.getter("KPI_STATUS_GRAPHIC['#text']",!0),trendGraphic:pe.getter("KPI_TREND_GRAPHIC['#text']",!0),description:pe.getter("KPI_DESCRIPTION['#text']",!0),groupName:pe.getter("MEASUREGROUP_NAME['#text']",!0)},dimensions:{name:pe.getter("DIMENSION_NAME['#text']",!0),caption:pe.getter("DIMENSION_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),defaultHierarchy:pe.getter("DEFAULT_HIERARCHY['#text']",!0),type:pe.getter("DIMENSION_TYPE['#text']",!0)},hierarchies:{name:pe.getter("HIERARCHY_NAME['#text']",!0),caption:pe.getter("HIERARCHY_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:pe.getter("HIERARCHY_DISPLAY_FOLDER['#text']",!0),origin:pe.getter("HIERARCHY_ORIGIN['#text']",!0),defaultMember:pe.getter("DEFAULT_MEMBER['#text']",!0)},levels:{name:pe.getter("LEVEL_NAME['#text']",!0),caption:pe.getter("LEVEL_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("LEVEL_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:pe.getter("LEVEL_DISPLAY_FOLDER['#text']",!0),orderingProperty:pe.getter("LEVEL_ORDERING_PROPERTY['#text']",!0),origin:pe.getter("LEVEL_ORIGIN['#text']",!0),hierarchyUniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0)},members:{name:pe.getter("MEMBER_NAME['#text']",!0),caption:pe.getter("MEMBER_CAPTION['#text']",!0),uniqueName:pe.getter("MEMBER_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),hierarchyUniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),levelUniqueName:pe.getter("LEVEL_UNIQUE_NAME['#text']",!0),childrenCardinality:pe.getter("CHILDREN_CARDINALITY['#text']",!0)}},Z=["axes","catalogs","cubes","dimensions","hierarchies","levels","measures"],ee=pe.data.XmlDataReader.extend({init:function(e){pe.data.XmlDataReader.call(this,e),this._extend(e)},_extend:function(e){for(var t,n,i=0,r=Z.length;i${data.name || data}'+(i.options.enabled?'':"")+"
            "),i.template=pe.template(i.options.template),i.emptyTemplate=pe.template(i.options.emptyTemplate),i._sortable(),i.element.on("click"+Re,".k-button,.k-item",function(t){var n=e(t.target),r=n.closest("["+pe.attr("name")+"]").attr(pe.attr("name"));r&&(n.hasClass("k-i-close")?i.remove(r):i.options.sortable&&n[0]===t.currentTarget&&i.sort({field:r,dir:n.find(".k-i-sort-asc-sm")[0]?"desc":"asc"}))}),(n.filterable||n.sortable)&&(i.fieldMenu=new fe.PivotFieldMenu(i.element,{messages:i.options.messages.fieldMenu,filter:".k-setting-fieldmenu",filterable:n.filterable,sortable:n.sortable,dataSource:i.dataSource})),i.refresh()},options:{name:"PivotSettingTarget",template:null,filterable:!1,sortable:!1,emptyTemplate:"
            ${data}
            ",setting:"columns",enabled:!0,messages:{empty:"Drop Fields Here"}},setDataSource:function(e){this.dataSource.unbind(Te,this._refreshHandler),this.dataSource=this.options.dataSource=e,this.fieldMenu&&this.fieldMenu.setDataSource(e),e.first(Te,this._refreshHandler),this.refresh()},_sortable:function(){var e=this;e.options.enabled&&(this.sortable=this.element.kendoSortable({connectWith:this.options.connectWith,hint:e.options.hint,cursor:"move",start:function(e){e.item.focus().blur()},change:function(t){var n=t.item.attr(pe.attr("name"));"receive"==t.action?e.add(n):"remove"==t.action?e.remove(n):"sort"==t.action&&e.move(n,t.newIndex)}}).data("kendoSortable"))},_indexOf:function(e,t){var n,i,r=-1;for(n=0,i=t.length;n-1)&&(t=this.dataSource["columns"===this.options.setting?"rows":"columns"](),!(this._indexOf(n,t)>-1)))},add:function(t){var n,i,r=this.dataSource[this.options.setting]();for(t=e.isArray(t)?t.slice(0):[t],n=0,i=t.length;n-1&&(e=n.splice(i,1)[0],n.splice(t,0,e),this.dataSource[this.options.setting](n))},remove:function(e){var t=this.dataSource[this.options.setting](),n=this._indexOf(e,t),i=this.dataSource.sort(),r=this.dataSource.filter();n>-1&&(r&&(r.filters=ne(r.filters,e),this.dataSource._filter.filters=r.filters,r.filters.length||(this.dataSource._filter=null)),i&&(i=ne(i,e),this.dataSource._sort=i),t.splice(n,1),this.dataSource[this.options.setting](t))},sort:function(e){var t=this.options.sortable,n=t===!0||t.allowUnsort,i=n&&"asc"===e.dir,r=this.dataSource.sort()||[],o=ne(r,e.field);i&&r.length!==o.length&&(e=null),e&&o.push(e),this.dataSource.sort(o)},refresh:function(){var e,n="",i=this.dataSource[this.options.setting](),r=i.length,o=0;if(r)for(;os.children,a.trigger(n,p)||(u.metadata[h].expanded=!i,d.toggleClass(Pe,!i).toggleClass(Le,i),!i&&l?a.dataSource[c](p.path):a.refresh())}),a._scrollable(),a.options.autoBind&&a.dataSource.fetch(),pe.notify(a)},events:[ze,He,Ne,Be],options:{name:"PivotGrid",autoBind:!0,reorderable:!0,filterable:!1,sortable:!1,height:null,columnWidth:100,configurator:"",columnHeaderTemplate:null,rowHeaderTemplate:null,dataCellTemplate:null,kpiStatusTemplate:null,kpiTrendTemplate:null,messages:{measureFields:"Drop Data Fields Here",columnFields:"Drop Column Fields Here",rowFields:"Drop Rows Fields Here"}},_templates:function(){var e=this.options.columnHeaderTemplate,t=this.options.rowHeaderTemplate,n=this.options.dataCellTemplate,i=this.options.kpiStatusTemplate,r=this.options.kpiTrendTemplate;this._columnBuilder.template=pe.template(e||Oe,{useWithBlock:!!e}),this._contentBuilder.dataTemplate=pe.template(n||Ue,{useWithBlock:!!n}),this._contentBuilder.kpiStatusTemplate=pe.template(i||Ve,{useWithBlock:!!i}),this._contentBuilder.kpiTrendTemplate=pe.template(r||We,{useWithBlock:!!r}),this._rowBuilder.template=pe.template(t||Oe,{useWithBlock:!!t})},_bindConfigurator:function(){var t=this.options.configurator;t&&e(t).kendoPivotConfigurator("setDataSource",this.dataSource)},cellInfoByElement:function(t){return t=e(t),this.cellInfo(t.index(),t.parent("tr").index())},cellInfo:function(e,t){var n,i=this._contentBuilder,r=i.columnIndexes[e||0],o=i.rowIndexes[t||0];return r&&o?(n=o.index*i.rowLength+r.index,{columnTuple:r.tuple,rowTuple:o.tuple,measure:r.measure||o.measure,dataItem:this.dataSource.view()[n]}):null},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.measuresTarget&&this.measuresTarget.setDataSource(e),this.rowsTarget&&this.rowsTarget.setDataSource(e),this.columnsTarget&&this.columnsTarget.setDataSource(e),this._bindConfigurator(),this.options.autoBind&&e.fetch()},setOptions:function(e){ge.fn.setOptions.call(this,e),this._templates()},destroy:function(){ge.fn.destroy.call(this),clearTimeout(this._headerReflowTimeout)},_dataSource:function(){var t=this,n=t.options.dataSource;n=e.isArray(n)?{data:n}:n,t.dataSource&&this._refreshHandler?t.dataSource.unbind(Te,t._refreshHandler).unbind(Ee,t._stateResetHandler).unbind(Fe,t._progressHandler).unbind(Se,t._errorHandler):(t._refreshHandler=e.proxy(t.refresh,t),t._progressHandler=e.proxy(t._requestStart,t),t._stateResetHandler=e.proxy(t._stateReset,t),t._errorHandler=e.proxy(t._error,t)),t.dataSource=pe.data.PivotDataSource.create(n).bind(Te,t._refreshHandler).bind(Fe,t._progressHandler).bind(Ee,t._stateResetHandler).bind(Se,t._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_stateReset:function(){this._columnBuilder.reset(),this._rowBuilder.reset()},_wrapper:function(){var e=this.options.height;this.wrapper=this.element.addClass("k-widget k-pivot"),e&&this.wrapper.css("height",e)},_measureFields:function(){this.measureFields=e(Ie).addClass("k-pivot-toolbar k-header k-settings-measures"),this.measuresTarget=this._createSettingTarget(this.measureFields,{setting:"measures",messages:{empty:this.options.messages.measureFields}})},_createSettingTarget:function(t,n){var i='${data.name}',r=n.sortable,o="";return r&&(o+="#if (data.sortIcon) {#",o+='',o+="#}#"),(n.filterable||r)&&(o+=''),this.options.reorderable&&(o+=''),o&&(i+=''+o+""),i+="",new pe.ui.PivotSettingTarget(t,e.extend({template:i,emptyTemplate:'${data}',enabled:this.options.reorderable,dataSource:this.dataSource},n))},_initSettingTargets:function(){this.columnsTarget=this._createSettingTarget(this.columnFields,{connectWith:this.rowFields,setting:"columns",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.columnFields,fieldMenu:this.options.messages.fieldMenu}}),this.rowsTarget=this._createSettingTarget(this.rowFields,{connectWith:this.columnFields,setting:"rows",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.rowFields,fieldMenu:this.options.messages.fieldMenu}})},_createLayout:function(){var t=this,n=e(qe),i=n.find(".k-pivot-rowheaders"),r=n.find(".k-pivot-table"),o=e(Ie).addClass("k-grid k-widget");t._measureFields(),t.columnFields=e(Ie).addClass("k-pivot-toolbar k-header k-settings-columns"),t.rowFields=e(Ie).addClass("k-pivot-toolbar k-header k-settings-rows"),t.columnsHeader=e('
            ').wrap('
            '),t.columnsHeader.parent().css("padding-right",pe.support.scrollbar()),t.rowsHeader=e('
            '),t.content=e('
            '),i.append(t.measureFields),i.append(t.rowFields),i.append(t.rowsHeader),o.append(t.columnsHeader.parent()),o.append(t.content),r.append(t.columnFields),r.append(o),t.wrapper.append(n),t.columnsHeaderTree=new pe.dom.Tree(t.columnsHeader[0]),t.rowsHeaderTree=new pe.dom.Tree(t.rowsHeader[0]),t.contentTree=new pe.dom.Tree(t.content[0]),t._initSettingTargets()},_progress:function(e){pe.ui.progress(this.wrapper,e)},_resize:function(){this.content[0].firstChild&&(this._setSectionsWidth(),this._setSectionsHeight(),this._setContentWidth(),this._setContentHeight(),this._columnHeaderReflow())},_columnHeaderReflow:function(){var e=this.columnsHeader.children("table");pe.support.browser.mozilla&&(clearTimeout(this._headerReflowTimeout),e.css("table-layout","auto"),this._headerReflowTimeout=setTimeout(function(){e.css("table-layout","")}))},_setSectionsWidth:function(){var e=this.rowsHeader,t=e.parent(".k-pivot-rowheaders").width(Ae),n=Math.max(_e(this.measureFields),_e(this.rowFields));n=Math.max(e.children("table").width(),n),t.width(n)},_setSectionsHeight:function(){var e=this.measureFields.height(Ae).height(),t=this.columnFields.height(Ae).height(),n=this.rowFields.height(Ae).innerHeight(),i=this.columnsHeader.height(Ae).innerHeight(),r=n-this.rowFields.height(),o=t>e?t:e,a=i>n?i:n;this.measureFields.height(o),this.columnFields.height(o),this.rowFields.height(a-r),this.columnsHeader.height(a)},_setContentWidth:function(){var e=this.content.find("table"),t=this.columnsHeader.children("table"),n=e.children("colgroup").children().length,i=n*this.options.columnWidth,r=Math.ceil(i/this.content.width()*100); r<100&&(r=100),e.add(t).css("width",r+"%"),this._resetColspan(t)},_setContentHeight:function(){var e=this,n=e.content,i=e.rowsHeader,r=e.wrapper.innerHeight(),o=pe.support.scrollbar(),a=n[0].offsetHeight===n[0].clientHeight,s=e.options.height;if(e.wrapper.is(":visible")){if(!r||!s)return a&&(o=0),n.height("auto"),i.height(n.height()-o),t;r-=be(e.columnFields),r-=be(e.columnsHeader),r<=2*o&&(r=2*o+1,a||(r+=o)),n.height(r),a&&(o=0),i.height(r-o)}},_resetColspan:function(e){var n=this,i=e.children("tbody").children(":first").children(":first");n._colspan===t&&(n._colspan=i.attr("colspan")),i.attr("colspan",1),clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){i.attr("colspan",n._colspan),n._colspan=t})},_axisMeasures:function(e){var t=[],n=this.dataSource,i=n.measures(),r=i.length>1||i[0]&&i[0].type;return n.measuresAxis()===e&&(0===n[e]().length||r)&&(t=i),t},items:function(){return[]},refresh:function(){var e,t=this,n=t.dataSource,i=n.axes(),r=(i.columns||{}).tuples||[],o=(i.rows||{}).tuples||[],a=t._columnBuilder,s=t._rowBuilder,l={},d={};t.trigger(ze,{action:"rebind"})||(a.measures=t._axisMeasures(Ge),s.measures=t._axisMeasures(je),t.columnsHeaderTree.render(a.build(r)),t.rowsHeaderTree.render(s.build(o)),l={indexes:a._indexes,measures:a.measures,metadata:a.metadata},d={indexes:s._indexes,measures:s.measures,metadata:s.metadata},t.contentTree.render(t._contentBuilder.build(n.view(),l,d)),t._resize(),t.touchScroller?t.touchScroller.contentResized():(e=pe.touchScroller(t.content),e&&e.movable&&(t.touchScroller=e,e.movable.bind("change",function(e){t.columnsHeader.scrollLeft(-e.sender.x),t.rowsHeader.scrollTop(-e.sender.y)}))),t._progress(!1),t.trigger(He))},_scrollable:function(){var t=this,n=t.columnsHeader,i=t.rowsHeader;t.content.scroll(function(){n.scrollLeft(this.scrollLeft),i.scrollTop(this.scrollTop)}),i.bind("DOMMouseScroll"+Re+" mousewheel"+Re,e.proxy(t._wheelScroll,t))},_wheelScroll:function(t){var n,i;t.ctrlKey||(n=pe.wheelDeltaY(t),i=this.content.scrollTop(),n&&(t.preventDefault(),e(t.currentTarget).one("wheel"+Re,!1),this.rowsHeader.scrollTop(i+-n),this.content.scrollTop(i+-n)))}}),re=pe.dom.element,oe=pe.dom.html,ae=function(e,t){return{maxChildren:0,children:0,maxMembers:0,members:0,measures:1,levelNum:e,parentMember:0!==t}},se=function(e,t){for(var n=[],i=0;i<=t;i++)n.push(e.members[i].name);return n},le=function(e,t){for(var n="",i=0;i<=t;i++)n+=e.members[i].name;return n},de=me.extend({init:function(){this.measures=1,this.metadata={}},build:function(e){var t=this._tbody(e),n=this._colGroup();return[re("table",null,[n,t])]},reset:function(){this.metadata={}},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n1&&(l.attr.colSpan=p,r.colSpan+=p-1));return h.maxMembers1&&(i.attr.rowSpan=y.rowSpan),s.children=y.rowSpan,r=this._cell("k-grid-footer",[this._content(p,e)],p),r.colSpan=x,a=this._row([r]),a.colSpan["dim"+t]=r,a.allCell=!0,c[b+p.name+"all"]=a,f&&(o=this._buildRows(e,t+1),r.attr.rowSpan=o.rowSpan),y.rowSpan+=a.rowSpan,s.members=a.rowSpan}else f&&(y.hasChild=!1,this._buildRows(e,t+1),(r||i).attr.rowSpan=y.rowSpan,s.members=y.rowSpan);return s.maxChildren-1){for(o=0;o.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right";i.HierarchicalDragAndDrop=n.Class.extend({init:function(t,a){this.element=t,this.hovered=t,this.options=o({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},a),this._draggable=new i.Draggable(t,{ignore:l,filter:a.filter,autoScroll:a.autoScroll,cursorOffset:{left:10,top:n.support.mobileOS?-40/n.support.zoomLevel():10},hint:r(this._hint,this),dragstart:r(this.dragstart,this),dragcancel:r(this.dragcancel,this),drag:r(this.drag,this),dragend:r(this.dragend,this),$angular:a.$angular})},_hint:function(e){return"
            "+this.options.hintText(e)+"
            "},_removeTouchHover:function(){n.support.touch&&this.hovered&&(this.hovered.find("."+s).removeClass(s),this.hovered=!1)},_hintStatus:function(n){var i=this._draggable.hint.find(".k-drag-status")[0];return n?(i.className="k-icon k-drag-status "+n,t):e.trim(i.className.replace(/(p|k)-(icon|drag-status)/g,""))},dragstart:function(t){this.source=t.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&t.preventDefault(),this.dropHint=this.options.reorderable?e("
            ").css(a,"hidden").appendTo(this.element):e()},drag:function(t){var i,r,o,l,d,u,c,h,p,f,m,g=this.options,v=this.source,_=this.dropTarget=e(n.eventTarget(t)),b=_.closest(g.allowedContainers);b.length?v[0]==_[0]||g.contains(v[0],_[0])?m="k-i-cancel":(m="k-i-insert-middle",p=g.itemFromTarget(_),i=p.item,i.length?(this._removeTouchHover(),r=n._outerHeight(i),l=p.content,g.reorderable?(d=r/(l.length>0?4:2),o=n.getOffset(i).top,u=t.y.location div .k-checkbox-wrapper [type=checkbox]")}function o(e){return function(t,n){n=n.closest(U);var i,r=n.parent();return r.parent().is("li")&&(i=r.parent()),this._dataSourceMove(t,r,i,function(t,i){return this._insert(t.data(),i,n.index()+e)})}}function a(t,n){for(var i;t&&"ul"!=t.nodeName.toLowerCase();)i=t,t=t.nextSibling,3==i.nodeType&&(i.nodeValue=e.trim(i.nodeValue)),h.test(i.className)?n.insertBefore(i,n.firstChild):n.appendChild(i)}function s(t){var n=t.children("div"),i=t.children("ul"),r=n.children(".k-icon"),o=t.children(":checkbox"),s=n.children(".k-in");t.hasClass("k-treeview")||(n.length||(n=e("
            ").prependTo(t)),!r.length&&i.length?r=e("").prependTo(n):i.length&&i.children().length||(r.remove(),i.remove()),o.length&&e("").appendTo(n).append(o),s.length||(s=t.children("a").eq(0).addClass("k-in k-link"),s.length||(s=e("")),s.appendTo(n),n.length&&a(n[0].nextSibling,s[0])))}var l,d,u,c,h,p=window.kendo,f=p.ui,m=p.data,g=e.extend,v=p.template,_=e.isArray,b=f.Widget,k=m.HierarchicalDataSource,w=e.proxy,y=p.keys,x=".kendoTreeView",C="select",T="check",S="navigate",D="expand",F="change",E="error",A="checked",I="indeterminate",R="collapse",M="dragstart",z="drag",H="drop",N="dragend",B="dataBound",P="click",L="undefined",O="k-state-hover",V="k-treeview",W=":visible",U=".k-item",q="string",j="aria-selected",G="aria-disabled",$="k-state-disabled",K={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},Y=function(e){return e instanceof p.jQuery||e instanceof window.jQuery},Q=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===q};d=n(".k-group"),u=n(".k-group,.k-content"),c=function(e){return e.children("div").children(".k-icon")},h=/k-sprite/,l=p.ui.DataBoundWidget.extend({init:function(e,t){var n,i=this,r=!1,o=t&&!!t.dataSource;_(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==L&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(i,e,t),e=i.element,t=i.options,n=e.is("ul")&&e||e.hasClass(V)&&e.children("ul"),r=!o&&n.length,r&&(t.dataSource.list=n),i._animation(),i._accessors(),i._templates(),e.hasClass(V)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),n&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.root.attr("role","tree"),i._dataSource(r),i._attachEvents(),i._dragging(),r?i._syncHtmlAndDataSource():t.autoBind&&(i._progress(!0),i.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&i.updateIndeterminate(),i.element[0].id&&(i._ariaId=p.format("{0}_tv_active",i.element[0].id)),p.notify(i)},_attachEvents:function(){var t=this,n=".k-in:not(.k-state-selected,.k-state-disabled)",i="mouseenter";t.wrapper.on(i+x,".k-in.k-state-selected",function(e){e.preventDefault()}).on(i+x,n,function(){e(this).addClass(O)}).on("mouseleave"+x,n,function(){e(this).removeClass(O)}).on(P+x,n,w(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",w(t._toggleButtonClick,t)).on(P+x,".k-i-expand,.k-i-collapse",w(t._toggleButtonClick,t)).on("keydown"+x,w(t._keydown,t)).on("keypress"+x,w(t._keypress,t)).on("focus"+x,w(t._focus,t)).on("blur"+x,w(t._blur,t)).on("mousedown"+x,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",w(t._mousedown,t)).on("change"+x,".k-checkbox-wrapper :checkbox",w(t._checkboxChange,t)).on("click"+x,".checkbox-span",w(t._checkboxLabelClick,t)).on("click"+x,".k-request-retry",w(t._retryRequest,t)).on("click"+x,".k-link.k-state-disabled",function(e){e.preventDefault()}).on("click"+x,function(n){e(n.target).is(":kendoFocusable")||t.focus()})},_checkboxLabelClick:function(t){var n=e(t.target.previousSibling);n.is("[disabled]")||(n.prop("checked",!n.prop("checked")),n.trigger("change"))},_syncHtmlAndDataSource:function(e,t){e=e||this.root,t=t||this.dataSource;var n,i,o,a,s,l=t.view(),d=p.attr("uid"),u=p.attr("expanded"),c=this.options.checkboxes,h=e.children("li");for(n=0;n0?"after":"before"},dragstart:function(e){return t.trigger(M,{sourceNode:e[0]})},drag:function(e){t.trigger(z,{originalEvent:e.originalEvent,sourceNode:e.source[0],dropTarget:e.target[0],pageY:e.pageY,pageX:e.pageX,statusClass:e.status,setStatusClass:e.setStatus})},drop:function(e){return t.trigger(H,{originalEvent:e.originalEvent,sourceNode:e.source,destinationNode:e.destination,valid:e.valid,setValid:function(t){this.valid=t,e.setValid(t)},dropTarget:e.dropTarget,dropPosition:e.position})},dragend:function(e){function n(n){t.options.checkboxes&&t.options.checkboxes.checkChildren&&t.updateIndeterminate(),t.trigger(N,{originalEvent:e.originalEvent,sourceNode:n&&n[0],destinationNode:r[0],dropPosition:o})}var i=e.source,r=e.destination,o=e.position;"over"==o?t.append(i,r,n):("before"==o?i=t.insertBefore(i,r):"after"==o&&(i=t.insertAfter(i,r)),n(i))}})):!n&&i&&(i.destroy(),this.dragging=null)},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=w(e._fieldAccessor,e);t.template&&typeof t.template==q?t.template=v(t.template):t.template||(t.template=i("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e._checkboxes(),e.templates={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},cssClass:function(e,t){var n="",i=t.index,r=e.length-1;return e.firstLevel&&0===i&&(n+="k-top "),n+=0===i&&i!=r?"k-top":i==r?"k-bot":"k-mid"},textClass:function(e,t){var n="k-in";return t&&(n+=" k-link"),e.enabled===!1&&(n+=" k-state-disabled"),e.selected===!0&&(n+=" k-state-selected"),n},toggleButtonClass:function(e){var t="k-icon";return t+=e.expanded!==!0?" k-i-expand":" k-i-collapse"},groupAttributes:function(e){var t="";return e.firstLevel||(t="role='group'"),t+(e.expanded!==!0?" style='display:none'":"")},groupCssClass:function(e){var t="k-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:i("#= data.treeview.template(data) #"),group:i("
              #= data.renderItems(data) #
            "),itemContent:i("# var imageUrl = "+n("imageUrl")+"(data.item); ## var spriteCssClass = "+n("spriteCssClass")+"(data.item); ## if (imageUrl) { ## } ## if (spriteCssClass) { ## } ##= data.treeview.template(data) #"),itemElement:i("# var item = data.item, r = data.r; ## var url = "+n("url")+"(item); #
            # if (item.hasChildren) { ## } ## if (data.treeview.checkboxes) { ##= data.treeview.checkboxes.template(data) ## } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #
            "),item:i("# var item = data.item, r = data.r; #
          • #= r.itemElement(data) #
          • "),loading:i("
            #: data.messages.loading #"),retry:i("#: data.messages.requestFailed # ")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(t){var n=this.options;n.dataSource=t,this._dataSource(),n.checkboxes&&n.checkboxes.checkChildren&&this.dataSource.one("change",e.proxy(this.updateIndeterminate,this,null)),this.options.autoBind&&this.dataSource.fetch()},_bindDataSource:function(){this._refreshHandler=w(this.refresh,this),this._errorHandler=w(this._error,this),this.dataSource.bind(F,this._refreshHandler),this.dataSource.bind(E,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(F,this._refreshHandler),e.unbind(E,this._errorHandler))},_dataSource:function(e){function t(e){for(var n=0;n1){for(i=1;in.clientHeight&&(i.push(n),r.push(n.scrollTop));while(n!=o);for(t.focus(),e=0;et&&e(r).is(":visible")&&!e(r).hasClass($)&&0===e(r).text().toLowerCase().indexOf(n)}).closest(U)[0]},_click:function(t){var n,i=this,r=e(t.currentTarget),o=u(r.closest(U)),a=r.attr("href");n=a?"#"==a||a.indexOf("#"+this.element.id+"-")>=0:o.length&&!o.children().length,n&&t.preventDefault(),r.hasClass(".k-state-selected")||i._trigger(C,r)||i.select(r)},_wrapper:function(){var e,t,n=this,i=n.element,r="k-widget k-treeview";i.is("ul")?(e=i.wrap("
            ").parent(),t=i):(e=i,t=e.children("ul").eq(0)),n.wrapper=e.addClass(r),n.root=t},_getSelectedNode:function(){return this.element.find(".k-state-selected").closest(U)},_group:function(e){var t=this,n=e.hasClass(V),i={firstLevel:n,expanded:n||t._expanded(e)},r=e.children("ul");r.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),t._nodes(r,i)},_nodes:function(t,n){var i,r=this,o=t.children("li");n=g({length:o.length},n),o.each(function(t,o){o=e(o),i={index:t,expanded:r._expanded(o)},s(o),r._updateNodeClasses(o,n,i),r._group(o)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;n&&(e="=r.length?t.appendTo(n):t.insertBefore(r.eq(e))},o),this._expanded(n)&&(this._updateNodeClasses(n),d(n).css("display","block"))},_refreshChildren:function(e,t,n){var i,r,o,a=this.options,l=a.loadOnDemand,u=a.checkboxes&&a.checkboxes.checkChildren;if(d(e).empty(),t.length)for(this._appendItems(n,t,e),r=d(e).children(),l&&u&&this._bubbleIndeterminate(r.last()),i=0;i0&&n&&n.length?(r&&(r[0].id===a&&r.removeAttr("id"),r.find(".k-in:first").removeClass("k-state-focused")),r=i._current=e(n,o).closest(U),r.find(".k-in:first").addClass("k-state-focused"),a=r[0].id||a,a&&(i.wrapper.removeAttr("aria-activedescendant"),r.attr("id",a),i.wrapper.attr("aria-activedescendant",a)),t):(r||(r=i._nextVisible(e())),r)},select:function(n){var i=this,r=i.element;return arguments.length?(n=e(n,r).closest(U),r.find(".k-state-selected").each(function(){var t=i.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-state-selected")}),n.length&&(i.dataItem(n).set("selected",!0),i._clickTarget=n),i.trigger(F),t):r.find(".k-state-selected").closest(U)},_toggle:function(e,t,n){var i,r=this.options,o=u(e),a=n?"expand":"collapse";o.data("animating")||this._trigger(a,e)||(this._expanded(e,n),i=t&&t.loaded(),n&&!i?(r.loadOnDemand&&this._progress(e,!0),o.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:n}),n||o.css("height",o.height()).css("height"),o.kendoStop(!0,!0).kendoAnimate(g({reset:!0},r.animation[a],{complete:function(){n&&o.css("height","")}}))))},toggle:function(t,n){t=e(t),c(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;b.fn.destroy.call(e),e.wrapper.off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),p.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,n){var i=p.attr("expanded"),r=this.dataItem(e),o=n;return 1==arguments.length?"true"===e.attr(i)||r&&r.expanded:(u(e).data("animating")||(r&&(r.set("expanded",o),o=r.expanded),o?(e.attr(i,"true"),e.attr("aria-expanded","true")):(e.removeAttr(i),e.attr("aria-expanded","false"))),t)},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?n.html(i):n.empty()):c(e).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(e,n){var i=this.dataItem(e),r=this.options[K.text],o=i.level(),a=r.length,s=r[Math.min(o,a-1)];return n?(i.set(s,n),t):i[s]},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,r){var o,a=this._objectOrSelf(i||n),s=a.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=a.element[0]&&(o=a.dataItem(i),o.loaded()||(a._progress(i,!0),l=o.load()),i!=this.root&&(s=o.children,s&&s instanceof k||(o._initChildren(),o.loaded(!0),s=o.children))),t=this._toObservableData(t),r.call(a,s,t,l)},_toObservableData:function(t){var n,i,r=t;return(Y(t)||Q(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(p.attr("uid")),r=n.getByUid(i),r&&(r=n.remove(r))),r},_insert:function(e,t,n){t instanceof p.data.ObservableArray?t=t.toJSON():_(t)||(t=[t]);var i=e.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),e.splice.apply(e,[n,0].concat(t)),this.findByUid(e[n].uid)},insertAfter:o(1),insertBefore:o(0),append:function(t,n,i){var r=this.root;return n&&(r=d(n)),this._dataSourceMove(t,r,n,function(t,r,o){function a(){n&&l._expanded(n,!0);var e=t.data(),i=Math.max(e.length,0);return l._insert(e,r,i)}var s,l=this;return o.done(function(){s=a(),(i=i||e.noop)(s)}),s||null})},_remove:function(t,n){var i,r,o,a=this;return t=e(t,a.element),this.angular("cleanup",function(){return{elements:t.get()}}),i=t.parent().parent(),r=t.prev(),o=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(s(i),a._updateNodeClasses(i)),a._updateNodeClasses(r),a._updateNodeClasses(o),t},remove:function(e){var t=this.dataItem(e);t&&this.dataSource.remove(t)},detach:function(e){return this._remove(e,!0)},findByText:function(t){return e(this.element).find(".k-in").filter(function(n,i){return e(i).text()==t}).closest(U)},findByUid:function(t){var n,i,r=this.element.find(".k-item"),o=p.attr("uid");for(i=0;i=0;else for(;a0}}},transport:{read:function(t){var n={},i=e.treeView.dataSource.get(t.data.uniqueName),o=t.data.uniqueName;o?(n.memberUniqueName=i.uniqueName.replace(/\&/g,"&"),n.treeOp=1):n.levelUniqueName=e.currentMember+".[(ALL)]",e.dataSource.schemaMembers(n).done(function(n){r(e.dataSource.filter(),e.currentMember,n),t.success(n)}).fail(t.error)}}})},_createTreeView:function(e){var t=this;t.treeView=new s.TreeView(e,{autoBind:!1,dataSource:t._treeViewDataSource(),dataTextField:"caption",template:"#: data.item.caption || data.item.name #",checkboxes:{checkChildren:!0},dataBound:function(){s.progress(t.includeWindow.element,!1)}})},_menuOpen:function(t){if(t.event){var n=a.attr("name");this.currentMember=e(t.event.target).closest("["+n+"]").attr(n),this.options.filterable&&this._setFilterForm(i(this.dataSource.filter(),this.currentMember)[0])}},_select:function(t){var n=e(t.item);e(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"),n.hasClass("k-include-item")?this.includeWindow.center().open():n.hasClass("k-sort-asc")?this._sort("asc"):n.hasClass("k-sort-desc")?this._sort("desc"):n.hasClass(h)&&this._updateFilterAriaLabel()},_windowOpen:function(){this.treeView||this._createTreeView(this.includeWindow.element.find(".k-treeview")),s.progress(this.includeWindow.element,!0),this.treeView.dataSource.read()},destroy:function(){c.fn.destroy.call(this),this.menu&&(this.menu.destroy(),this.menu=null),this.treeView&&(this.treeView.destroy(),this.treeView=null),this.includeWindow&&(this.includeWindow.destroy(),this.includeWindow=null),this.wrapper=null,this.element=null}}),m='
            #=messages.info#
            ',g='
              # if (sortable) {#
            • ${messages.sortAscending}
            • ${messages.sortDescending}
            • # if (filterable) {#
            • # } ## } ## if (filterable) {#
            • ${messages.include}
            • ${messages.filterFields}
              • '+m+"
            • # } #
            ",v='
            ';s.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filtercell.min",["kendo.autocomplete.min","kendo.datepicker.min","kendo.numerictextbox.min","kendo.combobox.min","kendo.dropdownlist.min"],e)}(function(){return function(e,t){function n(t){var n="string"==typeof t?t:t.operator;return e.inArray(n,v)>-1}function i(t,n){var r,o,a=[];if(e.isPlainObject(t))if(t.hasOwnProperty("filters"))a=t.filters;else if(t.field==n)return t;for(e.isArray(t)&&(a=t),r=0;r").appendTo(i),s=this,m=r,b=s.operators=r.operators||{},k=s.input=e("").attr(a.attr("bind"),"value: value").appendTo(o),w=r?r.suggestDataSource:null,w&&(r=e.extend({},r,{suggestDataSource:{}})),d.fn.init.call(s,i[0],r),w&&(s.options.suggestDataSource=w),r=s.options,l=s.dataSource=r.dataSource,s.model=l.reader.model,_=r.type=p,y=a.getter("reader.model.fields",!0)(l)||{},x=y[r.field],x&&x.type&&(_=r.type=x.type),r.values&&(r.type=_=h),b=b[_]||r.operators[_],!m.operator)for(v in b){r.operator=v;break}s._parse=function(e){return null!=e?e+"":e},s.model&&s.model.fields&&(C=s.model.fields[r.field],C&&C.parse&&(s._parse=g(C.parse,C))),s.defaultOperator=r.operator,s.viewModel=f=a.observable({operator:r.operator,value:null,operatorVisible:function(){var e=this.get("value");return null!==e&&e!==t&&"undefined"!=e||n(this.get("operator"))&&!s._clearInProgress}}),f.bind(u,g(s.updateDsFilter,s)),_==p&&s.initSuggestDataSource(r),null!==r.inputWidth&&k.width(r.inputWidth),k.attr("aria-label",s._getColumnTitle()),s._setInputType(r,_),_!=c&&r.showOperators!==!1?s._createOperatorDropDown(b):(e('
            ').css("display","none").text("eq").appendTo(o),o.addClass("k-operator-hidden")),s._createClearIcon(),a.bind(this.wrapper,f),_==p&&(r.template||s.setAutoCompleteSource()),_==h&&s.setComboBoxSource(s.options.values),s._refreshUI(),s._refreshHandler=g(s._refreshUI,s),s.dataSource.bind(u,s._refreshHandler)},_setInputType:function(t,n){var i,r,o,s,l,d=this,u=d.input;"function"==typeof t.template?(t.template.call(d.viewModel,{element:d.input,dataSource:d.suggestDataSource}),d._angularItems("compile")):n==p?u.attr(a.attr("role"),"autocomplete").attr(a.attr("text-field"),t.dataTextField||t.field).attr(a.attr("filter"),t.suggestionOperator).attr(a.attr("delay"),t.delay).attr(a.attr("min-length"),t.minLength).attr(a.attr("value-primitive"),!0):"date"==n?u.attr(a.attr("role"),"datepicker"):n==c?(u.remove(),i=e(""),r=d.wrapper,o=a.guid(),s=e("