/** * Kendo UI v2019.3.917 (http://www.telerik.com/kendo-ui) * Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. 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 o(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 r(e,t,n){return e+="",t=t||2,n=t-e.length,n?q[t].substring(0,n)+e:e}function a(e){var t=e.css(be.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Ie)||[0,0,0,0,0]:[0,0,0,0,0],i=Se.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function s(n,i){var o,r,a,s,c,d,u=De.browser,h=be._outerWidth,p=be._outerHeight,f=n.parent(),g=h(t);return f.removeClass("k-animation-container-sm"),f.hasClass("k-animation-container")?l(n,i):(r=n[0].style.width,a=n[0].style.height,s=Ae.test(r),c=Ae.test(a),d=n.hasClass("k-tooltip")||n.is(".k-menu-horizontal.k-context-menu"),o=s||c,!s&&(!i||i&&r||d)&&(r=i?h(n)+1:h(n)),(!c&&(!i||i&&a)||n.is(".k-menu-horizontal.k-context-menu"))&&(a=p(n)),n.wrap(e("
").addClass("k-animation-container").css({width:r,height:a})),f=n.parent(),o&&n.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),g-1)return!0;var t=f(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function m(t,i){var o,r=De.browser.webkit,a=De.browser.mozilla,s=t instanceof e?t[0]:t;if(t)return o=De.isRtl(t),i===n?o&&r?s.scrollWidth-s.clientWidth-s.scrollLeft:Math.abs(s.scrollLeft):(s.scrollLeft=o&&r?s.scrollWidth-s.clientWidth-i:o&&a?-i:i,n)}function v(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function _(e,n,i){var o,r,a;return n||(n="offset"),o=e[n](),r={top:o.top,right:o.right,bottom:o.bottom,left:o.left},De.browser.msie&&(De.pointers||De.msPointers)&&!i&&(a=De.isRtl(e)?1:-1,r.top-=t.pageYOffset-document.documentElement.scrollTop,r.left-=t.pageXOffset+a*document.documentElement.scrollLeft),r}function b(e){var t={};return ke("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function w(e){return new be.effects.Element(e)}function k(e,t,n,i){return typeof e===Re&&(P(t)&&(i=t,t=400,n=!1),P(n)&&(i=n,n=!1),typeof t===Le&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),we({effects:{},duration:400,reverse:!1,init:Ce,teardown:Ce,hide:!1},e,{completeCallback:e.complete,complete:Ce})}function y(t,n,i,o,r){for(var a,s=0,l=t.length;s-1||t.is(":visible")}function I(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&M(e)}function M(t){return e.expr.pseudos.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function F(e,t){return new F.fn.init(e,t)}var R,P,z,B,L,H,N,O,V,W,U,q,j,G,$,Y,K,Q,X,J,Z,ee,te,ne,ie,oe,re,ae,se,le,ce,de,ue,he,pe,fe,ge,me,ve,_e,be=t.kendo=t.kendo||{cultures:{}},we=e.extend,ke=e.each,ye=e.isArray,xe=e.proxy,Ce=e.noop,Se=Math,Te=t.JSON||{},De={},Ae=/%/,Ee=/\{(\d+)(:[^\}]+)?\}/g,Ie=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Me=/^(\+|-?)\d+(\.?)\d*$/,Fe="function",Re="string",Pe="number",ze="object",Be="null",Le="boolean",He="undefined",Ne={},Oe={},Ve=[].slice,We=function(){var e,t,i,o,r,a,s=arguments[0]||{},l=1,c=arguments.length,d=!1;for("boolean"==typeof s&&(d=s,s=arguments[l]||{},l++),"object"==typeof s||jQuery.isFunction(s)||(s={}),l===c&&(s=this,l--);l=0;i--)r[i]!==t&&r[i].original!==t||r.splice(i,1);else o._events[e]=[];return o}}),H=/^\w+/,N=/\$\{([^}]*)\}/g,O=/\\\}/g,V=/__CURLY__/g,W=/\\#/g,U=/__SHARP__/g,q=["","0","00","000","0000"],R={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,o="";for(n=0,i=t.length;n99&&(o=Se.floor(o/10)),o=r(o)):"fff"===t?o=r(e.getMilliseconds(),3):"tt"===t?o=e.getHours()<12?a.AM[0]:a.PM[0]:"zzz"===t?(i=e.getTimezoneOffset(),c=i<0,o=(""+Se.abs(i/60)).split(".")[0],i=Se.abs(i)-60*o,o=(c?"+":"-")+r(o),o+=":"+r(i)):"zz"!==t&&"z"!==t||(o=e.getTimezoneOffset()/60,c=o<0,o=(""+Se.abs(o)).split(".")[0],o=(c?"+":"-")+("zz"===t?r(o):o)),o!==n?o:t.slice(1,t.length-1)})}function a(e,t,o){var r,a,c,d,w,k,y,x,C,S,T,D,A,E,I,M,F,R,P,z,B,L,H,N,O,V,W,U,q,j,G,$,Y,K;if(o=i(o),r=o.numberFormat,a=r[g],c=r.decimals,d=r.pattern[0],w=[],T=e<0,M=f,F=f,G=-1,e===n)return f;if(!isFinite(e))return e;if(!t)return o.name.length?e.toLocaleString():""+e;if(S=u.exec(t)){if(t=S[1].toLowerCase(),y="c"===t,x="p"===t,(y||x)&&(r=y?r.currency:r.percent,a=r[g],c=r.decimals,k=r.symbol,d=r.pattern[T?0:1]),C=S[2],C&&(c=+C),"e"===t)return Y=C?e.toExponential(c):e.toExponential(),Y.replace(g,r[g]);if(x&&(e*=100),e=l(e,c),T=e<0,e=e.split(g),D=e[0],A=e[1],T&&(D=D.substring(1)),F=s(D,0,D.length,r),A&&(F+=a+A),"n"===t&&!T)return F;for(e=f,R=0,P=d.length;R-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 w.push(n),b})),t=t.split(";"),T&&t[1])t=t[1],L=!0;else if(0===e&&t[2]){if(t=t[2],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(U=t.indexOf("%"),q=t.indexOf("$"),x=U!=-1,y=q!=-1,x&&(e*=100),y&&"\\"===t[q-1]&&(t=t.split("\\").join(""),y=!1),(y||x)&&(r=y?r.currency:r.percent,a=r[g],c=r.decimals,k=r.symbol),B=t.indexOf(m)>-1,B&&(t=t.replace(p,f)),H=t.indexOf(g),P=t.length,H!=-1)if(A=(""+e).split("e"),A=A[1]?l(e,Math.abs(A[1])):A[0],A=A.split(g)[1]||f,O=t.lastIndexOf(_)-H,N=t.lastIndexOf(v)-H,V=O>-1,W=N>-1,R=A.length,V||W||(t=t.substring(0,H)+t.substring(H+1),P=t.length,H=-1,R=0),V&&O>N)R=O;else if(N>O)if(W&&R>N){for(K=l(e,N,T);K.charAt(K.length-1)===_&&N>0&&N>O;)N--,K=l(e,N,T);R=N}else V&&RO?O:N,N=t.lastIndexOf(v),O=t.lastIndexOf(_),$=N==-1&&O!=-1?O:N!=-1&&O==-1?N:N>O?N:O,G==P&&($=G),G!=-1){for(F=(""+e).split(g),D=F[0],A=F[1]||f,E=D.length,I=A.length,T&&e*-1>=0&&(T=!1),e=t.substring(0,G),T&&!L&&(e+="-"),R=G;R-1&&(e+=D,R=H),H===R){e+=(A?a:f)+A,R+=$-H+1;continue}z===_?(e+=z,M=z):z===v&&(e+=M)}if(B&&(e=s(e,G+(T&&!L?1:0),Math.max($,E+G),r)),$>=G&&(e+=t.substring($+1)),y||x){for(F=f,R=0,P=e.length;R=p){for(s=a,l=[];s>-1;)if(c=r.substring(s-p,s),c&&l.push(c),s-=p,d=h.shift(),p=d!==n?d:p,0===p){s>0&&l.push(r.substring(0,s));break}r=l.reverse().join(o[m]),e=e.substring(0,t)+r+e.substring(i)}return e},l=function(e,t,n){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),n&&(e=-e),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},c=function(e,t,i){if(t){if("[object Date]"===k.call(e))return o(e,t,i);if(typeof e===Pe)return a(e,t,i)}return e!==n?e:""},be.format=function(e){var t=arguments;return e.replace(Ee,function(e,n,i){var o=t[parseInt(n,10)+1];return c(o,i?i.substring(1):"")})},be._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},be._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},be._round=l,be._outerWidth=function(t,n){return e(t).outerWidth(n||!1)||0},be._outerHeight=function(t,n){return e(t).outerHeight(n||!1)||0},be.toString=c}(),function(){function t(e,t,n){return!(e>=t&&e<=n)}function i(e){return e.charAt(0)}function o(t){return e.map(t,i)}function r(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function a(e){for(var t=0,n=e.length,i=[];t0&&(L-=1),t},T=function(t){var n=w[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(H,t).match(n);return i?(i=i[0],H+=i.length,parseInt(i,10)):null},D=function(t,n){for(var i,o,r,a=0,s=t.length,l=0,c=0;al&&(l=o,c=a);return l?(H+=l,c+1):null},A=function(){var t=!1;return e.charAt(H)===i[L]&&(H++,t=!0),t},E=a.calendars.standard,I=null,M=null,F=null,R=null,P=null,z=null,B=null,L=0,H=0,N=!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(""),u=i.length;L2)continue;if(F=d<3?T(2):D(E._lowerDays[3==d?"namesAbbr":"names"],!0),null===F||t(F,1,31))return null}else if("M"===c){if(d=S("M"),E._lowerMonths||(E._lowerMonths=s(E.months)),M=d<3?T(2):D(E._lowerMonths[3==d?"namesAbbr":"names"],!0),null===M||t(M,1,12))return null;M-=1}else if("y"===c){if(d=S("y"),I=T(d),null===I)return null;2==d&&("string"==typeof V&&(V=W+parseInt(V,10)),I=W-W%100+I,I>V&&(I-=100))}else if("h"===c){if(S("h"),R=T(2),12==R&&(R=0),null===R||t(R,0,11))return null}else if("H"===c){if(S("H"),R=T(2),null===R||t(R,0,23))return null}else if("m"===c){if(S("m"),P=T(2),null===P||t(P,0,59))return null}else if("s"===c){if(S("s"),z=T(2),null===z||t(z,0,59))return null}else if("f"===c){if(d=S("f"),C=e.substr(H,d).match(w[3]),B=T(d),null!==B&&(B=parseFloat("0."+C[0],10),B=be._round(B,3),B*=1e3),null===B||t(B,0,999))return null}else if("t"===c){if(d=S("t"),_=E.AM,b=E.PM,1===d&&(_=o(_),b=o(b)),p=D(b),!p&&!D(_))return null}else if("z"===c){if(m=!0,d=S("z"),"Z"===e.substr(H,1)){A();continue}if(v=e.substr(H,6).match(d>2?g:f),!v)return null;if(v=v[0].split(":"),k=v[0],y=v[1],!y&&k.length>3&&(H=k.length-2,y=k.substring(H),k=k.substring(0,H)),k=parseInt(k,10),t(k,-12,13))return null;if(d>2&&(y=v[0][0]+y,y=parseInt(y,10),isNaN(y)||t(y,-59,59)))return null}else if("'"===c)N=!0,A();else if(!A())return null;return l&&!/^\s*$/.test(e.substr(H))?null:(x=null!==R||null!==P||z||null,null===I&&null===M&&null===F&&x?(I=W,M=O.getMonth(),F=O.getDate()):(null===I&&(I=W),null===F&&(F=1)),p&&R<12&&(R+=12),m?(k&&(R+=-k),y&&(P+=-y),e=new Date(Date.UTC(I,M,F,R,P,z,B))):(e=new Date(I,M,F,R,P,z,B),r(e,R)),I<100&&e.setFullYear(I),e.getDate()!==F&&m===n?null:e)}function c(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 d(e){var t,n,i,o=Se.max(_.length,b.length),r=e.calendar||e.calendars.standard,a=r.patterns,s=[];for(i=0;i0?null:(d=d>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(r=s,i=r.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),d=!0)):e.indexOf(c)>-1&&(o=!0,r=a,l=c),e=e.replace("-","").replace(l,"").replace(h," ").split(r[","].replace(h," ")).join("").replace(r["."],"."),e=parseFloat(e),isNaN(e)?e=null:d&&(e*=-1),e&&o&&(e/=100),e)}}(),function(){var i,o,r,a,s,l,c,d,h,p;De._scrollbar=n,De.scrollbar=function(e){if(isNaN(De._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),De._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return De._scrollbar},De.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="",De.tbodyInnerHtml=!0}catch(f){De.tbodyInnerHtml=!1}De.touch="ontouchstart"in t,o=document.documentElement.style,r=De.transitions=!1,a=De.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[],De.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in o||"msPerspective"in o,De.cssFlexbox="flexWrap"in o||"WebkitFlexWrap"in o||"msFlexWrap"in o,ke(["Moz","webkit","O","ms"],function(){var e,t=""+this,n=typeof i.style[t+"Transition"]===Re;if(n||typeof i.style[t+"Transform"]===Re)return e=t.toLowerCase(),a={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},n&&(r=a,r.event=r.event?r.event+"TransitionEnd":"transitionend"),!1}),i=null,De.transforms=a,De.transitions=r,De.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{De.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,De.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(f){De.screenWidth=t.screen.availWidth,De.screenHeight=t.screen.availHeight}De.detectOS=function(e){var n,i,o=!1,r=[],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/},c={tablet:/playbook|ipad|fire/i},d={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)&&(r=e.match(s[i]))){if("windows"==i&&"plugins"in navigator)return!1;o={},o.device=i,o.tablet=u(i,c,!1),o.browser=u(e,d,"default"),o.name=u(i,l),o[o.name]=!0,o.majorVersion=r[2],o.minorVersion=(r[3]||"0").replace("_","."),n=o.minorVersion.replace(".","").substr(0,2),o.flatVersion=o.majorVersion+n+Array(3-(n.length<3?n.length:2)).join("0"),o.cordova=typeof t.PhoneGap!==He||typeof t.cordova!==He,o.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||o.cordova,o.android&&(De.devicePixelRatio<1.5&&o.flatVersion<400||a)&&(De.screenWidth>800||De.screenHeight>800)&&(o.tablet=i);break}return o},l=De.mobileOS=De.detectOS(navigator.userAgent),De.wpDevicePixelRatio=l.wp?screen.width/320:0,De.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(De.hasNativeScrolling=l),De.delayedClick=function(){if(De.touch){if(l.ios)return!0;if(l.android)return!De.browser.chrome||!(De.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},De.mouseAndTouchPresent=De.touch&&!(De.mobileOS.ios||De.mobileOS.android),De.detectBrowser=function(e){var t,n=!1,i=[],o={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\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 o)if(o.hasOwnProperty(t)&&(i=e.match(o[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},De.browser=De.detectBrowser(navigator.userAgent),De.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return De.browser.chrome&&(e.paste=!1,De.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},De.clipboard=De.detectClipboardAccess(),De.zoomLevel=function(){var e,n,i;try{return e=De.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!De.touch&&(n=De.scrollbar()),De.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(o){return 1}},De.cssBorderSpacing=n!==o.borderSpacing&&!(De.browser.msie&&De.browser.version<8),function(t){var n="",i=e(document.documentElement),o=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+o),De.mobileOS&&(n+=" k-mobile"),De.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(De.browser),De.eventCapture=document.documentElement.addEventListener,c=document.createElement("input"),De.placeholder="placeholder"in c,De.propertyChangeEvent="onpropertychange"in c,De.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",o={},r=0;rt.field?1:e.field/g,J=function(e){return e.target},De.touch&&(J=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},ke(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),De.touch?De.mobileOS?(De.mousedown="touchstart",De.mouseup="touchend",De.mousemove="touchmove",De.mousecancel="touchcancel",De.click="touchend",De.resize="orientationchange"):(De.mousedown="mousedown touchstart",De.mouseup="mouseup touchend",De.mousemove="mousemove touchmove",De.mousecancel="mouseleave touchcancel",De.click="click",De.resize="resize"):De.pointers?(De.mousemove="pointermove",De.mousedown="pointerdown",De.mouseup="pointerup",De.mousecancel="pointercancel",De.click="pointerup",De.resize="orientationchange resize"):De.msPointers?(De.mousemove="MSPointerMove",De.mousedown="MSPointerDown",De.mouseup="MSPointerUp",De.mousecancel="MSPointerCancel",De.click="MSPointerUp",De.resize="orientationchange resize"):(De.mousemove="mousemove",De.mousedown="mousedown",De.mouseup="mouseup",De.mousecancel="mouseleave",De.click="click",De.resize="resize"),Z=function(e,t){var n,i,o,r,a=t||"d",s=1;for(i=0,o=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 be.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}}),ne=te.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}})}})}}),be.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},be.notify=Ce,ie=/template$/i,oe=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,re=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,ae=/([A-Z])/g,be.initWidget=function(i,o,r){var a,s,l,c,d,u,h,p,f,g,m,v,_;if(r?r.roles&&(r=r.roles):r=be.ui.roles,i=i.nodeType?i:i[0],u=i.getAttribute("data-"+be.ns+"role")){f=u.indexOf(".")===-1,l=f?r[u]:be.getter(u)(t),m=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",g=f?RegExp("^kendo.*"+u+"$","i"):RegExp("^"+v+"$","i");for(_ in m)if(_.match(g)){if(_!==v)return m[_];a=m[_]}if(l){for(p=T(i,"dataSource"),o=e.extend({},D(i,l.fn.options),o),p&&(o.dataSource=typeof p===Re?be.getter(p)(t):p),c=0,d=l.fn.events.length;c{1}
",l,be.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(r,Math.abs(s)+a).prependTo(t)):c&&c.remove()},plugin:function(t,i,o){var r,a,s,l,c=t.fn.options.name;for(i=i||be.ui,o=o||"",i[c]=t,i.roles[c.toLowerCase()]=t,r="getKendo"+o+c,c="kendo"+o+c,a={name:c,widget:t,prefix:o||""},be.widgets.push(a),s=0,l=be._widgetRegisteredCallbacks.length;s=0&&(c=[be.getter(l)(t)]),i=0,o=c.length;i-1)}}),ce=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],de="label, input, [data-rel=external]",ue={setupMouseMute:function(){var t,n=0,i=ce.length,o=document.documentElement;if(!ue.mouseTrap&&De.eventCapture)for(ue.mouseTrap=!0,ue.bustClick=!1,ue.captureMouse=!1,t=function(t){ue.captureMouse&&("click"===t.type?ue.bustClick&&!e(t.target).is(de)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};n-1&&this[0]!==document.documentElement&&(ue.setupMouseMute(),o=2===t.length?null:t[1],r=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,ge.call(this,{touchstart:ue.muteMouse,touchend:ue.unMuteMouse},o,{bustClick:r})),typeof n===Re&&(e=a.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,ge.apply(a,t),a)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),be.jQuery=F,be.eventMap=he,be.timezone=function(){function e(e,t){var n,i,o,r=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,d[r]+1,1,s[0]-24,s[1],s[2],0)),i=u[a.substr(4,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o-(i>o?7:0))):a.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,d[r],a.substr(5),s[0],s[1],s[2],0)),i=u[a.substr(0,3)],o=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-o+(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):(o=i.split(":"),r=0,o.length>1&&(r=60*o[0]+ +o[1]),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"])}function n(e,t,n){var i,o,r,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&&(o=a[i][3],!(o&&e>o));i--);if(r=a[i+1],!r)throw Error('Timezone "'+n+'" not found on '+e+".");return r}function i(e,i,o,r){typeof e!=Pe&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,i,r);return{zone:a,rule:t(e,o,a[1])}}function o(e,t){var n,o,r;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),o=n.zone,r=n.rule,be.parseFloat(r?o[0]-r[6]:o[0]))}function r(e,t){var n=i(e,this.zones,this.rules,t),o=n.zone,r=n.rule,a=o[2];return a.indexOf("/")>=0?a.split("/")[r&&+r[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",r&&"-"!=r[7]?r[7]:""):a}function a(e,t,n){var i,o,r,a=n;return typeof t==Re&&(t=this.offset(e,t)),typeof n==Re&&(n=this.offset(e,n)),o=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),r=e.getTimezoneOffset(),typeof a==Re&&(a=this.offset(e,a)),i=r-o+(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 c(e){return this.apply(new Date(e),"Etc/UTC")}var d={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},u={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:o,convert:a,apply:s,remove:l,abbr:r,toLocalDate:c}}(),be.date=function(){function e(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function t(t,n,i){var o=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,o)}function i(e,n,i){return e=new Date(e),t(e,n,i),e}function o(e){return new Date(e.getFullYear(),e.getMonth(),1)}function r(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=o(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),o=i.getTime()-n.getTime(),r=Math.floor(o/k);return 1+Math.floor(r/7)}function l(e,t){var i,o,r;return t===n&&(t=be.culture().calendar.firstDay),i=f(e,-7),o=f(e,7),r=s(e,t),0===r?s(i,t)+1:53===r&&s(o,t)>1?1:r}function c(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function d(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function u(e){return b(e).getTime()-c(b(e))}function h(e,t,n){var i,o=u(t),r=u(n);return!e||o==r||(t>=n&&(n+=k),i=u(e),o>i&&(i+=k),r=o&&i<=r)}function p(e,t,n){var i,o=t.getTime(),r=n.getTime();return o>=r&&(r+=k),i=e.getTime(),i>=o&&i<=r}function f(t,n){var i=t.getHours();return t=new Date(t),g(t,n*k),e(t,i),t}function g(e,t,n){var i,o=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-o,e.setTime(e.getTime()+i*w))}function m(t,n){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e(t,n.getHours()),t}function v(){return c(new Date)}function _(e){return c(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 w=6e4,k=864e5;return{adjustDST:e,dayOfWeek:i,setDayOfWeek:t,getDate:c,isInDateRange:p,isInTimeRange:h,isToday:_,nextDay:function(e){return f(e,1)},previousDay:function(e){return f(e,-1)},toUtcTime:d,MS_PER_DAY:k,MS_PER_HOUR:60*w,MS_PER_MINUTE:w,setTime:g,setHours:m,addDays:f,today:v,toInvariantTime:b,firstDayOfMonth:o,lastDayOfMonth:r,weekInYear:l,getMilliseconds:u}}(),be.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?o():i=setTimeout(o,t-s),n):o()},o.cancel=function(){clearTimeout(i)},o)},be.caret=function(t,i,o){var r,a,s,l,c,d=i!==n;if(o===n&&(o=i),t[0]&&(t=t[0]),!d||!t.disabled){try{t.selectionStart!==n?d?(t.focus(),a=De.mobileOS,a.wp||a.android?setTimeout(function(){t.setSelectionRange(i,o)},0):t.setSelectionRange(i,o)):i=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),r=t.createTextRange(),d?(r.collapse(!0),r.moveStart("character",i),r.moveEnd("character",o-i),r.select()):(s=r.duplicate(),r.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",r),l=s.text.length,c=l+r.text.length,i=[l,c]))}catch(u){i=[]}return i}},be.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+be.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()}]),be.widgetInstance(e,be.mobile.ui)},be.antiForgeryTokens=function(){var t={},i=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),o=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),o!==n&&i!==n&&(t[o]=i),t},be.cycleForm=function(e){function t(e){var t=be.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!=be.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==be.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},be.focusElement=function(n){var i=[],o=n.parentsUntil("body").filter(function(e,t){var n=be.getComputedStyles(t,["overflow"]);return"visible"!==n.overflow}).add(t);o.each(function(t,n){i[t]=e(n).scrollTop()});try{n[0].setActive()}catch(r){n[0].focus()}o.each(function(t,n){e(n).scrollTop(i[t])})},be.matchesMedia=function(e){var n=be._bootstrapToMedia(e)||e;return De.matchMedia&&t.matchMedia(n).matches},be._bootstrapToMedia=function(e){return{xs:"(max-width: 576px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}[e]},function(){function n(t,n,i,o){var r,a,s=e("
").attr({action:i,method:"POST",target:o}),l=be.antiForgeryTokens();l.fileName=n,r=t.split(";base64,"),l.contentType=r[0].replace("data:",""),l.base64=r[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,o,r,a,s=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],o=atob(n[1]),r=new Uint8Array(o.length),a=0;a-1&&t.indexOf("#!")<0?null:t.split(e)[1]||""}function r(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,c="change",d="back",u="same",h=l.support,p=window.location,f=window.history,g=50,m=l.support.browser.msie,v=/^#*/,_=window.document,b=l.Class.extend({back:function(){m?setTimeout(function(){f.back()}):f.back()},forward:function(){m?setTimeout(function(){f.forward()}):f.forward()},length:function(){return f.length},replaceLocation:function(e){p.replace(e)}}),w=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 r(this.root,e)},current:function(){var e=p.pathname;return p.search&&(e+=p.search),r(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,r=e.root,a=p.pathname,s=o(i(e.hashBang));r===a+"/"&&(t=r),r===a&&s&&(t=n(s.replace(v,""),r)),t&&f.pushState({},_.title,t)}}),k=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,g)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return o(this.prefix)},normalizeCurrent:function(e){var t=p.pathname,n=e.root;return!(!e.pushState||n===t)&&(this.replaceLocation(n+this.prefix+r(n,t)),!0)}}),y=l.Observable.extend({start:function(t){if(t=t||{},this.bind([c,d,u],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 w(e.root):new k(e.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(c),this._started=!1)},change:function(e){this.bind(c,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 o=this.adapter;return e=o.normalize(e),this.current===e||this.current===decodeURIComponent(e)?(this.trigger(u),t):(!n&&this.trigger(c,{url:e,decode:!1})||(this.current=e,i.call(this,o),this.historyLength=o.length()),t)},_checkUrl:function(){var e=this.adapter,n=e.current(),i=e.length(),o=this.historyLength===i,r=n===this.locations[this.locations.length-2]&&o,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,r&&this.trigger("back",{url:s,to:n})?(e.forward(),this.current=s,t):this.trigger(c,{url:n,backButtonPressed:!a})?(r?e.forward():(e.back(),this.historyLength--),this.current=s,t):(r?this.locations.pop():this.locations.push(n),t))}});l.History=y,l.History.HistoryAdapter=b,l.History.HashAdapter=k,l.History.PushStateAdapter=w,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(u,"(?:$1)?").replace(h,e).replace(p,"(.*?)")+"$",n?"i":"")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,o=i.history,r=i.Observable,a="init",s="routeMissing",l="change",c="back",d="same",u=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,g=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,o){var r,a,s=0,l=i.parseQueryStringParams(e);if(l._back=t,e=n(e),r=this.route.exec(e).slice(1),a=r.length,o)for(;s3?"substringof"!==i?c="{0}({2},"+c+")":(c="{0}("+c+",{2})","doesnotcontain"===d&&(o?(c="{0}({2},'{1}') eq -1",i="indexof"):c+=" eq false")):c="{2} {0} "+c,i=g.format(c,i,u,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 o(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function r(e){return e+o()+"-"+o()+"-"+o()}function a(e,t){var n=v+"--"+e;return t&&(n+="--"),n}function s(e,t,n,i){var o=e.options[i].url,r=g.format("{0} ",n);return b(o)?r+o(t):r+o}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 c(e){var t="";return t+=v+"Content-Type: application/json;odata=minimalmetadata",t+=v+"Prefer: return=representation",t+=_+g.stringify(e)}function d(e,t,n,i,o,r){var a,d="";for(a=0;a=200&&i<=299?(r=t.match(/\{.*\}/gm),r&&c[c.length-1].models.push(JSON.parse(r[0]))):c[c.length-1].passed=!1);return c}var g=window.kendo,m=e.extend,v="\r\n",_="\r\n\r\n",b=g.isFunction,w={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isnullorempty:"eq",isnotnullorempty:"ne",isempty:"eq",isnotempty:"ne"},k=m({},w,{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"}};m(!0,g.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,o,r,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(r in e)y[r]?y[r](i,e[r],n):i[r]=e[r]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(r in e)o=e[r],"number"==typeof o&&(e[r]=o+"");i=g.stringify(e)}}return i}}}}),m(!0,g.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:d,readers:{xml:d}})}(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(o){var r,a={};for(r in o)a[r]=o[r];a.field=i?n+"."+o.field:n,t==Pe&&e._notifyChange&&e._notifyChange(a),e.trigger(t,a)}}function i(t,n){if(t===n)return!0;var o,r=e.type(t),a=e.type(n);if(r!==a)return!1;if("date"===r)return t.getTime()===n.getTime();if("object"!==r&&"array"!==r)return!1;for(o in t)if(!i(t[o],n[o]))return!1;return!0}function o(e,t){var n,i;for(i in e){if(n=e[i],me(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function r(e){this.data=e||[]}function a(e,n){if(e){var i=typeof e===De?{field:e,dir:n}:e,o=_e(i)?i:i!==t?[i]:[];return be(o,function(e){return!!e.dir})}}function s(e){var t,n,i,o,r=e.filters;if(r)for(t=0,n=r.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,o=[],r=this.length,a=t||window;i=0;if(a)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),o=xe.getter(i,!0)(r),o instanceof K)return o.set(n.join("."),t),a;i+="."}return xe.setter(e)(r,t),a},set:function(e,t){var n=this,i=!1,o=e.indexOf(".")>=0,r=xe.getter(e,!0)(n);return r!==t&&(r instanceof Se&&this._handlers[e]&&(this._handlers[e].get&&r.unbind(Be,this._handlers[e].get),r.unbind(Pe,this._handlers[e].change)),i=n.trigger("set",{field:e,value:t}),i||(o||(t=n.wrap(t,e,function(){return n})),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(Pe,{field:e}))),i},parent:ye,wrap:function(e,t,i){var o,r,a,s,l=this,c=Ze.call(e);return null==e||"[object Object]"!==c&&"[object Array]"!==c||(a=e instanceof nt,s=e instanceof le,"[object Object]"!==c||s||a?("[object Array]"===c||a||s)&&(a||s||(e=new nt(e)),r=n(l,Pe,t,!1),e.bind(Pe,r),l._handlers[t]={change:r}):(e instanceof K||(e=new K(e)),o=n(l,Be,t,!0),e.bind(Be,o),r=n(l,Pe,t,!0),e.bind(Pe,r),l._handlers[t]={get:o,change:r}),e.parent=i),e}}),Q={number:function(e){return typeof e===De&&"null"===e.toLowerCase()?null:xe.parseFloat(e)},date:function(e){return typeof e===De&&"null"===e.toLowerCase()?null:xe.parseDate(e)},"boolean":function(e){return typeof e===De?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===De&&"null"===e.toLowerCase()?null:null!=e?e+"":e},"default":function(e){return e}},X={string:"",number:0,date:new Date,"boolean":!1,"default":""},J=K.extend({init:function(n){var i,o,r=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},r.defaults,n),r._initializers))for(i=0;i0&&(u._initializers=f),i=e.extend(u),i.define=function(e){return J.define(i,e)},u.fields&&(i.fields=u.fields,i.idField=u.idField),i},Z={selector:function(e){return Ce(e)?e:Ue(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:eo?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),o=t(n);return i&&i.getTime&&o&&o.getTime&&(i=i.getTime(),o=o.getTime()),i===o?e.__position-n.__position:null==i?1:null==o?-1:o.localeCompare?o.localeCompare(i):i=0?"\\"+o:o}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i,o){return n("==",e,t,i,o)},neq:function(e,t,i,o){return n("!=",e,t,i,o)},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)"},isnullorempty:function(e){return"("+e+" === null) || ("+e+" === '')"},isnotnullorempty:function(e){return"("+e+" !== null) && ("+e+" !== '')"}}}(),r.filterExpr=function(e){var n,i,o,a,s,l,c=[],d={and:" && ",or:" || "},u=[],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"},r.normalizeFilter=l,r.compareFilters=h,r.prototype={toArray:function(){return this.data},range:function(e,t){return new r(this.data.slice(e,e+t))},skip:function(e){return new r(this.data.slice(e))},take:function(e){return new r(this.data.slice(0,e))},select:function(e){return new r($(this.data,e))},order:function(e,t,n){var i={dir:t};return e&&(e.compare?i.compare=e.compare:i.field=e),new r(n?this.data.sort(Z.create(i)):this.data.slice(0).sort(Z.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 o,r,s=a(e,t),l=[];if(n=n||Z,s.length){for(o=0,r=s.length;o0&&(n=e[0],o=o.groupBy(n).select(function(i){var o=new r(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new r(i.items).group(e.slice(1),o.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:o.aggregate(n.aggregates)}})),o},groupBy:function(e){var t,n,i,o,a,s,l,c,d,u,h=this;if(ve(e)||!this.data.length)return new r([]);for(t=e.field,n=e.skipItemSorting?this.data:this._sortForGrouping(t,e.dir||"asc"),i=xe.accessor(t),a=i.get(n[0],t),s={field:t,value:a,items:[]},u=[s],c=0,d=n.length;ci&&(b(i)||w(i))&&(e=i),e}},r.normalizeGroup=f,r.normalizeSort=a,r.process=function(e,n,i){var o,s,l,c,d,u,h,p,v,_,b,w;return n=n||{},o=n.group,s=m(f(o||[])),l=new r(e),c=g(o||[]),d=a(n.sort||[]),u=s?d:c.concat(d),v=n.filterCallback,_=n.filter,b=n.skip,w=n.take,u&&i&&(l=l.sort(u,t,t,i)),_&&(l=l.filter(_),v&&(l=v(l)),p=l.toArray().length),u&&!i&&(l=l.sort(u),o&&(e=l.toArray())),s?(l=l.group(o,e),b!==t&&w!==t&&(l=new r(E(l.toArray())).range(b,w),h=$(c,function(e){return fe({},e,{skipItemSorting:!0})}),l=l.group(h,e))):(b!==t&&w!==t&&(l=l.range(b,w)),o&&(l=l.group(o,e))),{total:p,data:l.toArray()}},oe=Te.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)}}),re=Te.extend({init:function(e){var t,n=this;e=n.options=fe({},n.options,e),ke(Ve,function(t,n){typeof e[n]===De&&(e[n]={url:e[n]})}),n.cache=e.cache?ae.create(e.cache):{find:ye,add:ye},t=e.parameterMap,e.submit&&(n.submit=e.submit),Ce(e.push)&&(n.push=e.push),n.push||(n.push=We),n.parameterMap=Ce(t)?t:function(e){var n={};return ke(e,function(e,i){e in t&&(e=t[e],me(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:We},create:function(e){return we(this.setup(e,Ie))},read:function(n){var i,o,r,a=this,s=a.cache;n=a.setup(n,Me),i=n.success||ye,o=n.error||ye,r=s.find(n.data),r!==t?i(r):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return we(this.setup(e,Fe))},destroy:function(e){return we(this.setup(e,Re))},setup:function(e,t){e=e||{};var n,i=this,o=i.options[t],r=Ce(o.data)?o.data(e.data):o.data;return e=fe(!0,{},o,e),n=fe(!0,{},r,e.data),e.data=i.parameterMap(n,t),Ce(e.url)&&(e.url=e.url(n)),e}}),ae=Te.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[qe(e)]=n)},find:function(e){return this._store[qe(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[qe(e)]}}),ae.create=function(e){var t={inmemory:function(){return new ae}};return me(e)&&Ce(e.find)?e:e===!0?new ae:t[e]()},se=Te.extend({init:function(e){var t,n,i,o,r,a,s,l,c,d,u,h,p,f,g=this;e=e||{};for(t in e)n=e[t],g[t]=typeof n===De?Ue(n):n;o=e.modelBase||J,me(g.model)&&(g.model=i=o.define(g.model)),r=ge(g.data,g),g._dataAccessFunction=r,g.model&&(a=ge(g.groups,g),s=ge(g.serialize,g),l={},c={},d={},u={},h=!1,i=g.model,i.fields&&(ke(i.fields,function(e,t){var n;p=e,me(t)&&t.field?p=t.field:typeof t===De&&(p=t),me(t)&&t.from&&(n=t.from),h=h||n&&n!==e||p!==e,f=n||p,c[e]=f.indexOf(".")!==-1?Ue(f,!0):Ue(f),d[e]=Ue(e),l[n||p]=e,u[e]=n||p}),!e.serialize&&h&&(g.serialize=S(s,i,y,d,l,u))),g._dataAccessFunction=r,g._wrapDataAccessBase=T(i,x,c,l,u),g.data=S(r,i,x,c,l,u),g.groups=S(a,i,C,c,l,u))},errors:function(e){return e?e.errors:null},parse:We,data:We,total:function(e){return e.length},groups:We,aggregates:function(){return{}},serialize:function(e){return e}}),le=Se.extend({init:function(e){var n,i,o,r=this;e&&(i=e.data),e=r.options=fe({},r.options,e),r._map={},r._prefetch={},r._data=[],r._pristineData=[],r._ranges=[],r._view=[],r._pristineTotal=0,r._destroyed=[],r._pageSize=e.pageSize,r._page=e.page||(e.pageSize?1:t),r._sort=a(e.sort),r._filter=l(e.filter),r._group=f(e.group),r._aggregate=e.aggregate,r._total=e.total,r._shouldDetachObservableParents=!0,Se.fn.init.call(r),r.transport=ce.create(e,i,r),Ce(r.transport.push)&&r.transport.push({pushCreate:ge(r._pushCreate,r),pushUpdate:ge(r._pushUpdate,r),pushDestroy:ge(r._pushDestroy,r)}),null!=e.offlineStorage&&("string"==typeof e.offlineStorage?(o=e.offlineStorage,r._storage={getItem:function(){return JSON.parse(localStorage.getItem(o))},setItem:function(e){localStorage.setItem(o,qe(r.reader.serialize(e)))}}):r._storage=e.offlineStorage),r.reader=new xe.data.readers[e.schema.type||"json"](e.schema),n=r.reader.model||{},r._detachObservableParents(),r._data=r._observe(r._data),r._online=!0,r.bind(["push",Le,Pe,He,ze,Oe,Ne],e)},options:{data:null,schema:{modelBase:J},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 I(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){var t=this,n=t.options,i=t._getCurrentRangeSpan();t._eachItem(t._pristineData,e),n.serverPaging&&n.useRanges&&ke(i,function(n,i){t._eachItem(i.pristineData,e)})},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?F(e,t):t(e))},_pristineForModel:function(e){var t,n,i=function(i){if(n=L(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 o=H(i,e);o>=0&&(!n||e.isNew()&&!n.__state__?(t._modelCanceled(e),i.splice(o,1),t._removeModelFromRanges(e)):(i[o].accept(n),"update"==n.__state__&&(i[o].dirty=!0)))})},_modelCanceled:ye,_submit:function(t,n){var i=this;i.trigger(He,{type:"submit"}),i.trigger(Ne),i.transport.submit(fe({success:function(n,i){var o=e.grep(t,function(e){return e.type==i})[0];o&&o.resolve({response:n,models:o.models,type:i})},error:function(e,n,o){for(var r=0;rp._total&&(p._pageSize=p._total,p.options.pageSize&&p.options.pageSize>p._pageSize&&(p._pageSize=p.options.pageSize)),p._aggregate&&f.serverAggregates&&(p._aggregateResult=p._readAggregates(e)),e=p._readData(e),p._destroyed=[]}else{for(e=p._readData(e),n=[],o={},r=p.reader.model,a=r?r.idField:"id",s=0;s=0;t--)n=e[t],n.hasSubgroups?this._clearEmptyGroups(n.items):n.items&&!n.items.length&&Ke.apply(n.parent(),[t,1])},_queryProcess:function(e,t){return this.options.inPlaceSort?r.process(e,t,this.options.inPlaceSort):r.process(e,t)},_mergeState:function(n){var i=this;return n!==t&&(i._pageSize=n.pageSize,i._page=n.page,i._sort=n.sort,i._filter=n.filter,i._group=n.group,i._aggregate=n.aggregate,i._skip=i._currentRangeStart=n.skip,i._take=n.take,i._skip===t&&(i._skip=i._currentRangeStart=i.skip(),n.skip=i.skip()),i._take===t&&i._pageSize!==t&&(i._take=i._pageSize,n.take=i._take),n.sort&&(i._sort=n.sort=a(n.sort)),n.filter&&(i._filter=n.filter=i.options.accentFoldingFiltering&&!e.isEmptyObject(n.filter)?e.extend({},l(n.filter),{accentFoldingFiltering:i.options.accentFoldingFiltering}):l(n.filter)),n.group&&(i._group=n.group=f(n.group)),n.aggregate&&(i._aggregate=n.aggregate=p(n.aggregate))),n},query:function(n){var i,o,r,a=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates;return a||(this._data===t||0===this._data.length)&&!this._destroyed.length?(this.options.endless&&(o=n.pageSize-this.pageSize(),o>0?(o=this.pageSize(),n.page=n.pageSize/o,n.pageSize=o):(n.page=1,this.options.endless=!1)),this.read(this._mergeState(n))):(r=this.trigger(He,{type:"read"}),r||(this.trigger(Ne),i=this._queryProcess(this._data,this._mergeState(n)),this._setFilterTotal(i.total,!0),this._aggregateResult=this._calculateAggregates(i.dataToAggregate||this._data,n),this.view(i.data),this.trigger(Oe,{type:"read"}),this.trigger(Pe,{items:i.data})),e.Deferred().resolve(r).promise())},_setFilterTotal:function(e,n){var i=this;i.options.serverFiltering||(e!==t?i._total=e:n&&(i._total=i._data.length))},fetch:function(e){var t=this,n=function(n){n!==!0&&Ce(e)&&e.call(t)};return this._query().done(n)},_query:function(e){var t=this;return t.query(fe({},{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=je.max(je.min(je.max(e,1),i.totalPages()),1),i._query(i._pageableQueryOptions({page:e})),t):(n=i.skip(),n!==t?je.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query(n._pageableQueryOptions({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 ve(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!ve(e))for(t={},_e(e)||(e=[e]),n=0;n=o;i--)n=r[i],t={value:e.get?e.get(n.field):e[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 je.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=je.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){this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=je.min(e||0,this.total()),i=Ce(i)?i:ye;var o,r=this,a=je.max(je.floor(e/n),0)*n,s=je.min(a+n,r.total());return o=r._findRange(e,je.min(e+n,r.total())),o.length||0===r.total()?(r._processRangeData(o,e,n,a,s),i(),t):(n!==t&&(r._rangeExists(a,s)?aa&&s=i.start&&e<=i.end){for(p=0,r=o;r=i.start&&(c=i.data,d=i.end,k||(w.inPlaceSort?u=v._queryProcess(i.data,{filter:v.filter()}):(m=g(v.group()||[]).concat(a(v.sort()||[])),u=v._queryProcess(i.data,{sort:m,filter:v.filter()})),h=c=u.data,u.total!==t&&(d=u.total)),s=0,e+p>i.start&&(s=e+p-i.start),l=h.length,d>n&&(l-=d-n),p+=l-s,b=v._mergeGroups(b,c,s,l),n<=i.end&&p==n-e))return b;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var o,r=t.toJSON();return e.length&&(o=e[e.length-1]),A(o,r,n,i),e.concat(r)}return e.concat(t.slice(n,i))},_processRangeData:function(e,n,i,o,r){var a,s,l,c,d=this;d._pending=t,d._skip=n>d.skip()?je.min(r,(d.totalPages()-1)*d.take()):o,d._currentRangeStart=n,d._take=i,a=d.options.serverPaging,s=d.options.serverSorting,l=d.options.serverFiltering,c=d.options.serverAggregates;try{d.options.serverPaging=!0,d._isServerGrouped()||d.group()&&d.group().length||(d.options.serverSorting=!0),d.options.serverFiltering=!0,d.options.serverPaging=!0,d.options.serverAggregates=!0,a&&(d._detachObservableParents(),d._data=e=d._observe(e)),d._process(e)}finally{d.options.serverPaging=a,d.options.serverSorting=s,d.options.serverFiltering=l,d.options.serverAggregates=c}},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 o=this,r=o._timeStamp();return function(a){var s,l,c,d=!1,u={start:e,end:t,data:[],timestamp:o._timeStamp()};if(o._dequeueRequest(),o.trigger(Oe,{response:a,type:"read"}),a=o.reader.parse(a),c=o._readData(a),c.length){for(s=0,l=o._ranges.length;s=o._currentRequestTimeStamp||!o._skipRequestsInProgress)&&(n&&c.length?n():o.trigger(Pe,{}))}},prefetch:function(e,t,n){var i=this,o=je.min(e+t,i.total()),r={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,o)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(r,function(){i.trigger(He,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n),error:function(){var e=Xe.call(arguments);i.error.apply(i,e)}})})},100))},_multiplePrefetch:function(e,t,n){var i=this,o=je.min(e+t,i.total()),r={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,o)?n&&n():i.trigger(He,{type:"read"})||i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,o,n,!0)})},_rangeExists:function(e,t){var n,i,o=this,r=o._ranges;for(n=0,i=r.length;n=t)return!0;return!1},_getCurrentRangeSpan:function(){var e,t,n=this,i=n._ranges,o=n.currentRangeStart(),r=o+(n.take()||0),a=[],s=i.length;for(t=0;t=o||e.start>=o&&e.start<=r)&&a.push(e);return a},_removeModelFromRanges:function(e){var t,n,i,o=this;for(n=0,i=this._ranges.length;n=e){o._getByUid(t.uid,n.data)||(o._isServerGrouped()?n.data.splice(e,0,o._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}o._updateRangesLength()},_updateRangesLength:function(){var e,t,n=this,i=n._ranges||[],o=i.length,r=!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=le.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:j("success"),data:j("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),le.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(t){var n,i,o,a,s,c=this.options.accentFoldingFiltering;return t=c?e.extend({},l(t),{accentFoldingFiltering:c}):l(t),t&&0!==t.filters.length?(n=r.filterExpr(t),o=n.fields,a=n.operators,i=s=Function("d, __f, __o","return "+n.expression),(o.length||a.length)&&(s=function(e){return i(e,o,a)}),this._updateHierarchicalFilter(s),!0):(this._updateHierarchicalFilter(function(){return!0}),!1)},_updateHierarchicalFilter:function(e){var t,n,i=this._data,o=!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=je.max(je.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,o=je.max(je.floor(e/i),0)*i,r=this.dataSource;return t&&(o+=i),r.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(r.prefetch(o,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}}),pe=xe.Observable.extend({init:function(e,t){var n=this;xe.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new he(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,o=e*this.batchSize,r=this.batchSize,a=[];for(i.offset>o&&i.at(i.offset-1),n=0;n0&&(n=n.get(o.substring(0,i))),e.start(n),r=n!==e.source?r.call(n,e.source):r.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(N,e._change).bind(N,e._change)),e.stop(e.source),r},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(N,this._change),this.currentSource&&this.currentSource.unbind(N,this._change)),this.unbind()}}),g=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 T&&(e=t.get(n));return M(e,t)}}),m=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=I.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(N,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],o=this.classes[t]=i.get();o?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],o=this.handlers[t];o&&n.off(t,o),o=this.handlers[t]=i.get(),n.on(t,i.source,o)},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=M(this.change,this),this.eventName=i.valueUpdate||N,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=N,this.bindings[F].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[F].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,o,r,s,l=this.container(),c=l.cloneNode(!1),d=l.children[t];if(e(c).html(C.render(this.template(),n)),c.children.length)for(i=this.bindings.source._parents(),o=0,r=n.length;o-1?e.splice(t,1):e.push(o)}else this.bindings[z].set(o)},refresh:function(){var e,n,i=this.bindings[z].get(),o=i,r=this.dataType(),a=this.element;if("checkbox"==a.type)if(o instanceof D){if(e=-1,i=this.parsedValue(),i instanceof Date){for(n=0;n=0}else a.checked=o;else"radio"==a.type&&("date"==r?i=C.toString(i,"yyyy-MM-dd"):"datetime-local"==r&&(i=C.toString(i,"yyyy-MM-ddTHH:mm:ss")),a.checked=null!==i&&t!==i&&a.value===""+i)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(N,this._change)}})},E.select={source:E.source.extend({refresh:function(n){var i,o=this,r=o.bindings.source.get();r instanceof D||r instanceof C.data.DataSource?(n=n||{},"add"==n.action?o.add(n.index,n.items):"remove"==n.action?o.remove(n.index,n.items):"itemchange"!=n.action&&n.action!==t||(o.render(),o.bindings.value&&o.bindings.value&&(i=p(o.bindings.value.get(),e(o.element).data("valueField")),null===i?o.element.selectedIndex=-1:o.element.value=i))):o.render()}}),value:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=M(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,o=this.dataType(),r=[];for(n=0,i=this.element.options.length;n1&&(l.direction=t&&o?he[s].reverse:s),n[a[0]]=l}):T(e,function(e){var i=this.direction;i&&t&&!O.test(e)&&(this.direction=he[i].reverse),n[e]=this}),n},F&&D(S,{transition:function(t,n,i){var r,s,l,c,d=0,u=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,c=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,r=a(t,n),e.merge(u,o(r)),e.hasOwnProperty("uniqueSort")?t.data("keys",e.uniqueSort(u)).height():t.data("keys",e.unique(u)).height(),t.css(ae,i.exclusive+" "+i.duration+"ms "+i.ease).css(ae),t.css(r).css(se),F.event&&(t.one(F.event,c),0!==i.duration&&(d=500)),s=setTimeout(c,i.duration+d),t.data(te,s),t.data(re,c)},stopQueue:function(e,t,n){var i,o=e.data("keys"),r=!n&&o,a=e.data(re);return r&&(i=C.getComputedStyles(e[0],o)),a&&a(),r&&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,o,s,l,c,d,u=this,h=t.length,p=u.element,f=u.options,g=e.Deferred(),m={},v={};for(u.effects=t,g.done(e.proxy(u,"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,o){return o=1.70158,n*((e=e/i-1)*e*((o+1)*e+o)+1)+t}}),S.Animation=y,S.Transition=x,S.createEffect=c,S.box=function(t){t=e(t);var n=t.offset();return n.width=C._outerWidth(t),n.height=C._outerHeight(t),n},S.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}},S.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},S.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(R)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var i=window.kendo,o=i.attr,r=i.ui,a=i.attrValue,s=i.directiveSelector,l=i.Observable,c=i.ui.Widget,d=i.roleSelector,u="SCRIPT",h="init",p="transitionStart",f="transitionEnd",g="show",m="hide",v="attach",_="detach",b=/unrecognized expression/,w=/]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,k="loadStart",y="loadComplete",x="showStart",C="sameViewRequested",S="viewShow",T="viewTypeDetermined",D="after",A={content:"k-content",view:"k-view",stretchedView:"k-stretched-view",widget:"k-widget",header:"k-header",footer:"k-footer"},E=i.ui.Widget.extend({init:function(t,n){var o=this;n=n||{},o.id=i.guid(),l.fn.init.call(o),this.options=e.extend({},this.options,n),o.content=t,o.options.renderOnInit&&c.fn.init.call(o,o._createElement(),n),o.options.wrapInSections&&o._renderSections(),o.tagName=n.tagName||"div",o.model=n.model,o._wrap=n.wrap!==!1,this._evalTemplate=n.evalTemplate||!1,o._fragments={},o.bind([h,g,m,p,f],n)},options:{name:"View",renderOnInit:!1,wrapInSections:!1,detachOnHide:!0,detachOnDestroy:!0},render:function(t){var n=this,o=!n.element;return o&&(n.element=n._createElement()),t&&e(t).append(n.element),o&&(i.bind(n.element,n.model),n.trigger(h)),t&&(n._eachFragment(v),n.trigger(g)),n.element},clone:function(){return new I(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){var e=this,t=e.render();t&&t.css("display",""),this.trigger(x,{view:this})},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(p,{type:e})},afterTransition:function(e){this.trigger(f,{type:e})},hide:function(){this.options.detachOnHide&&(this._eachFragment(_),e(this.element).detach()),this.trigger(m)},destroy:function(){var e=this,t=e.element;t&&(c.fn.destroy.call(e),i.unbind(t),i.destroy(t),e.options.detachOnDestroy&&t.remove())},purge:function(){var t=this;t.destroy(),e(t.element).add(t.content).add(t.wrapper).off().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,o,r=this,a="<"+r.tagName+" />";try{n=e(document.getElementById(r.content)||r.content),n[0].tagName===u&&(n=n.html())}catch(s){b.test(s.message)&&(n=r.content)}return"string"==typeof n?(n=n.replace(/^\s+|\s+$/g,""),r._evalTemplate&&(n=i.template(n)(r.model||{})),t=e(a).append(n),r._wrap||(t=t.contents())):(t=n,r._evalTemplate&&(o=e(i.template(e("
    ").append(t.clone(!0)).html())(r.model||{})),e.contains(document,t[0])&&t.replaceWith(o),t=o),r._wrap&&(t=t.wrapAll(a).parent())),t},_renderSections:function(){var e=this;e.options.wrapInSections&&(e._wrapper(),e._createContent(),e._createHeader(),e._createFooter())},_wrapper:function(){var e,t=this,n=t.content;t.wrapper=n.is(d("view"))?t.content:n.wrap("
    ').parent(),e=t.wrapper,e.attr("id",t.id),e.addClass(A.view),e.addClass(A.widget),e.attr("role","view")},_createContent:function(){var t,n=this,i=e(n.wrapper),r=d("content");i.children(r)[0]||(t=i.children().filter(function(){var t=e(this);if(!t.is(d("header"))&&!t.is(d("footer")))return t}),t.wrap("
    ')),this.contentElement=i.children(d("content")),this.contentElement.addClass(A.stretchedView).addClass(A.content)},_createHeader:function(){var e=this,t=e.wrapper;this.header=t.children(d("header")).addClass(A.header)},_createFooter:function(){var e=this,t=e.wrapper;this.footer=t.children(d("footer")).addClass(A.footer)}}),I=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}),M=E.extend({init:function(e,t){E.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 P(i),t.bind("accepted",function(e){e.view.render(i)}),t}}),F=E.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),R=/^(\w+)(:(\w+))?( (\w+))?$/,P=l.extend({init:function(e){l.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,o){if(!e.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;o=o||e.id;var r=this,a=e===r.view?e.clone():r.view,s=r.history,l=s[s.length-2]||{},c=l.id===o,d=t||(c?s[s.length-1].transition:e.transition),u=n(d);return r.running&&r.effect.stop(),"none"===d&&(d=null),r.trigger("accepted",{view:e}),r.view=e,r.previous=a,r.running=!0,c?s.pop():s.push({id:o,transition:d}),a?(d&&i.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),c&&!t&&(u.reverse=!u.reverse),r.effect=i.fx(e.element).replace(a.element,u.type).beforeTransition(function(){e.beforeTransition("show"),a.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),a.afterTransition("hide")}).direction(u.direction).setReverse(u.reverse),r.effect.run().then(function(){r.end()})):(e.showStart(),r.end()),!0):(e.showStart(),e.showEnd(),r.after(),!0)},destroy:function(){var e=this,t=e.view;t&&t.destroy&&t.destroy()}}),z=l.extend({init:function(t){var n,o,r=this;l.fn.init.call(r),r.options=t,e.extend(r,t),r.sandbox=e("
    "),o=r.container,n=r._hideViews(o),r.rootView=n.first(),r.layouts={},r.viewContainer=new i.ViewContainer(r.container),r.viewContainer.bind("accepted",function(e){e.view.params=r.params}),r.viewContainer.bind("complete",function(e){r.trigger(S,{view:e.view})}),r.viewContainer.bind(D,function(){r.trigger(D)}),this.bind(this.events,t)},events:[x,D,S,k,y,C,T],destroy:function(){var e,t=this,n=t.viewContainer;i.destroy(t.container);for(e in t.layouts)this.layouts[e].destroy();n&&n.destroy()},view:function(){return this.viewContainer.view},showView:function(e,t,n){if(e=e.replace(RegExp("^"+this.remoteViewURLPrefix),""),""===e&&this.remoteViewURLPrefix&&(e="/"),e.replace(/^#/,"")===this.url)return this.trigger(C),!1;this.trigger(x);var o=this,r=o._findViewElement(e),a=i.widgetInstance(r);return o.url=e.replace(/^#/,""),o.params=n,a&&a.reload&&(a.purge(),r=[]),this.trigger(T,{remote:0===r.length,url:e}),!r[0]||(a||(a=o._createView(r)),o.viewContainer.show(a,t,e))},append:function(e,t){var n,i,r=this.sandbox,a=(t||"").split("?")[0],s=this.container;return w.test(e)&&(e=RegExp.$1),r[0].innerHTML=e,s.append(r.children("script, style")),n=this._hideViews(r),i=n.first(),i.length||(n=i=r.wrapInner("
    ").children()),a&&i.hide().attr(o("url"),a),s.append(n),this._createView(i)},_locate:function(e){return this.$angular?s(e):d(e)},_findViewElement:function(e){var t,n=e.split("?")[0];return n?(t=this.container.children("["+o("url")+"='"+n+"']"),t[0]||n.indexOf("/")!==-1||(t=this.container.children("#"===n.charAt(0)?n:"#"+n)),t[0]||(t=this._findViewElementById(e)),t):this.rootView},_findViewElementById:function(e){var t=this.container.children("[id='"+e+"']");return t},_createView:function(e){return this._createSpaView(e)},_createMobileView:function(e){return i.initWidget(e,{defaultTransition:this.transition,loader:this.loader,container:this.container,getLayout:this.getLayoutProxy,modelScope:this.modelScope,reload:a(e,"reload")},r.roles)},_createSpaView:function(e){var t=(this.options||{}).viewOptions||{};return new i.View(e,{renderOnInit:t.renderOnInit,wrap:t.wrap||!1,wrapInSections:t.wrapInSections,detachOnHide:t.detachOnHide,detachOnDestroy:t.detachOnDestroy})},_hideViews:function(e){return e.children(this._locate("view")).hide()}});i.ViewEngine=z,i.ViewContainer=P,i.Fragment=F,i.Layout=M,i.View=E,i.ViewClone=I}(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 o(e){this.nodeValue=e+""}function r(e){this.html=e}function a(e,t){for(h.innerHTML=t;h.firstChild;)e.appendChild(h.firstChild)}function s(e){return new r(e)}function l(e,t,n){return new i(e,t,n)}function c(e){return new o(e)}function d(e){this.root=e,this.children=[]}var u,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(){}},u=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)}},u);for(i=0;i/g,">").replace(/\"/g,""").replace(/\'/g,"'")}function l(e,t){var n,i="";for(n=0;n"+s(e)+"":''+s(e.src)+""}function u(e){var t=Math.floor(e/26)-1;return(t>=0?u(t):"")+String.fromCharCode(65+e%26)}function h(e,t){return u(t)+(e+1)}function p(e,t){return"$"+u(t)+"$"+(e+1)}function f(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function g(e){var t=7;return e/t-Math.floor(128/t)/256}function m(e){return.75*e}function v(e){return(e+"").replace(/[\x00-\x09\x0B\x0C\x0E-\x1F]/g,"").replace(/\r?\n/g,"\r\n")}function _(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 b(e){var t="thin";return 2===e?t="medium":3===e&&(t="thick"),t}function w(e,t){var n="";return t&&(n+="<"+e+' style="'+b(t.size)+'">',t.color&&(n+=''),n+=""),n}function k(e){return""+w("left",e.left)+w("right",e.right)+w("top",e.top)+w("bottom",e.bottom)+""}function y(e,t){var n,i,o,r=[],a=[];for(x(e,function(e,t){var n={_source:e,index:t,height:e.height,level:e.level,cells:[]};r.push(n),a[t]=n}),n=C(r).slice(0),i={rowData:r,rowsByIndex:a,mergedCells:t},o=0;o1||r>1)&&S(t.mergedCells,s+":"+h(p+o-1,a+r-1)),o>1)for(c=p+1;c\r',Y=$+'\n \n \n \n \n ',K=function(e){var t=e.creator,n=e.lastModifiedBy,i=e.created,o=e.modified;return $+'\n \n '+s(t)+"\n "+s(n)+'\n '+s(i)+'\n '+s(o)+"\n"},Q=function(e){var t=e.sheets;return $+'\n\n Microsoft Excel\n 0\n false\n \n \n \n Worksheets\n \n \n '+t.length+'\n \n \n \n \n '+c(t,function(e,t){return e.options.title?""+s(e.options.title)+"":"Sheet"+(t+1)+""})+"\n \n false\n false\n false\n 14.0300\n"},X=function(e){var t=e.sheetCount,n=e.commentFiles,i=e.drawingFiles;return $+'\n\n \n \n \n \n \n \n \n \n \n '+l(t,function(e){return''})+"\n "+c(n,function(e){return''})+"\n "+c(i,function(e){return''})+'\n \n \n'},J=function(e){var t=e.sheets,n=e.filterNames,i=e.userNames;return $+'\n\n \n \n \n \n \n \n '+c(t,function(e,t){var n=e.options,i=n.name||n.title||"Sheet"+(t+1);return''})+"\n \n "+(n.length||i.length?"\n \n "+c(n,function(e){return'\n "})+"\n "+c(i,function(e){return'\n "})+"\n ":"")+'\n \n'},Z=function(e){var t=e.frozenColumns,n=e.frozenRows,i=e.columns,o=e.defaults,r=e.data,a=e.index,l=e.mergeCells,u=e.autoFilter,h=e.filter,p=e.showGridLines,f=e.hyperlinks,v=e.validations,_=e.defaultCellStyleId,b=e.rtl,w=e.legacyDrawing,k=e.drawing,y=e.lastRow;return $+'\n\n \n\n \n \n "+(n||t?'\n ':"")+'\n \n \n\n \n\n "+(null!=_||i&&i.length>0?"\n \n "+(i&&i.length?"":'\n ")+"\n "+c(i,function(e,t){ var n="number"==typeof e.index?e.index+1:t+1;return 0===e.width?"':""})+"\n ":"")+"\n\n \n "+c(r,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return'\n \n "+c(e.data,function(e){return'\n \n "+(null!=e.formula?d(e.formula):"")+"\n "+(null!=e.value?""+s(e.value)+"":"")+"\n "})+"\n \n "})+"\n \n\n "+(u?'':h?P(h):"")+"\n\n "+(l.length?'\n \n '+c(l,function(e){return''})+"\n ":"")+"\n\n "+(v.length?"\n \n "+c(v,function(e){return'\n \n "+(e.formula1?""+s(e.formula1)+"":"")+"\n "+(e.formula2?""+s(e.formula2)+"":"")+"\n "})+"\n ":"")+"\n\n "+(f.length?"\n \n "+c(f,function(e){return'\n '})+"\n ":"")+'\n\n \n '+(w?'':"")+"\n "+(k?'':"")+"\n"},ee=function(e){var t=e.count;return $+'\n\n '+l(t,function(e){return'\n '})+'\n \n \n'},te=function(e){var t=e.hyperlinks,n=e.comments,i=e.sheetIndex,o=e.drawings;return $+'\n\n '+c(t,function(e){return'\n '})+"\n "+(n.length?'\n \n ':"")+"\n "+(o.length?'\n ':"")+"\n"},ne=function(e){var t=e.comments;return $+'\n\n \n \n \n \n '+c(t,function(e){return'\n \n \n \n \n \n \n \n \n \n '+s(e.text)+"\n \n \n "})+"\n \n"},ie=function(e){var t=e.comments;return'\n \n '+c(t,function(e){return'\n \n \n \n \n \n '+e.anchor+"\n False\n "+e.row+"\n "+e.col+"\n \n "})+"\n"},oe=function(e){return $+'\n\n '+c(e,function(e,t){return'\n \n \n '+e.col+"\n "+e.colOffset+"\n "+e.row+"\n "+e.rowOffset+'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '})+"\n"},re=function(e){return $+'\n\n '+c(e,function(e){return'\n '})+"\n"},ae=function(e){var t=e.count,n=e.uniqueCount,i=e.indexes;return $+'\n\n '+c(Object.keys(i),function(e){return'\n '+s(e.substring(1))+""})+"\n"},se=function(e){var t=e.formats,n=e.fonts,i=e.fills,o=e.borders,r=e.styles;return $+'\n\n \n '+c(t,function(e,t){return'\n '})+'\n \n \n \n \n \n \n \n \n \n '+c(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 '+c(i,function(e){return"\n "+(e.background?'\n \n \n \n \n \n ':"")})+'\n \n \n \n '+c(o,k)+'\n \n \n \n \n \n \n '+c(r,function(e){return'\n \n "+(e.textAlign||e.verticalAlign||e.wrap?"\n \n ":"")+"\n \n "})+'\n \n \n \n \n \n \n'},le=kendo.Class.extend({init:function(t,n,i,o){this.options=t,this._strings=n,this._styles=i,this._borders=o,this._validations={},this._comments=[],this._drawings=t.drawings||[],this._hyperlinks=(this.options.hyperlinks||[]).map(function(t,n){return e.extend({},t,{rId:"link"+n})})},relsToXML:function(){var e=this._hyperlinks,t=this._comments,n=this._drawings;if(e.length||t.length||n.length)return te({hyperlinks:e,comments:t,sheetIndex:this.options.sheetIndex,drawings:n})},toXML:function(e){var t,n,i,o,r,a,s,l,c=this,d=this.options.mergedCells||[],u=this.options.rows||[],p=y(u,d);this._readCells(p),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:h(f(this.options),t.from),to:h(f(this.options),t.to)}:t&&t.ref&&t.columns&&(n=t,t=null),i=[];for(o in this._validations)Object.prototype.hasOwnProperty.call(c._validations,o)&&i.push(c._validations[o]);return r=null,this.options.defaultCellStyle&&(r=this._lookupStyle(this.options.defaultCellStyle)),a=this.options.freezePane||{},s=this.options.defaults||{},l=this.options.rows?this._getLastRow():1,Z({frozenColumns:this.options.frozenColumns||a.colSplit,frozenRows:this.options.frozenRows||a.rowSplit,columns:this.options.columns,defaults:s,data:p,index:e,mergeCells:d,autoFilter:t,filter:n,showGridLines:this.options.showGridLines,hyperlinks:this._hyperlinks,validations:i,defaultCellStyleId:r,rtl:void 0!==this.options.rtl?this.options.rtl:s.rtl,legacyDrawing:this._comments.length?"vml"+this.options.sheetIndex:null,drawing:this._drawings.length?"drw"+this.options.sheetIndex:null,lastRow:l})},commentsXML:function(){if(this._comments.length)return ne({comments:this._comments})},drawingsXML:function(e){var t,n;if(this._drawings.length)return t={},n=this._drawings.map(function(n){var i=D(n.topLeftCell),o=t[n.image];return o||(o=t[n.image]={rId:"img"+n.image,target:e[n.image].target}),{col:i.col,colOffset:A(n.offsetX),row:i.row,rowOffset:A(n.offsetY),width:A(n.width),height:A(n.height),imageId:o.rId}}),{main:oe(n),rels:re(t)}},legacyDrawing:function(){if(this._comments.length)return ie({comments:this._comments})},_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,n=JSON.stringify(e);return"{}"===n?0:(t=a(n,this._styles),t<0&&(t=this._styles.push(n)-1),t+1)},_lookupBorder:function(e){var t,n=JSON.stringify(e);if("{}"!==n)return t=a(n,this._borders),t<0&&(t=this._borders.push(n)-1),t+1},_readCells:function(e){var t,n,i,o,r,a=this;for(t=0;t=t&&(t=e.index+1)}),t}}),ce={greaterThanOrEqualTo:"greaterThanOrEqual",lessThanOrEqualTo:"lessThanOrEqual"},de={number:"decimal"},ue={General:0,0:1,"0.00":2,"#,##0":3,"#,##0.00":4,"0%":9,"0.00%":10,"0.00E+00":11,"# ?/?":12,"# ??/??":13,"mm-dd-yy":14,"d-mmm-yy":15,"d-mmm":16,"mmm-yy":17,"h:mm AM/PM":18,"h:mm:ss AM/PM":19,"h:mm":20,"h:mm:ss":21,"m/d/yy h:mm":22,"#,##0 ;(#,##0)":37,"#,##0 ;[Red](#,##0)":38,"#,##0.00;(#,##0.00)":39,"#,##0.00;[Red](#,##0.00)":40,"mm:ss":45,"[h]:mm:ss":46,"mmss.0":47,"##0.0E+0":48,"@":49,"[$-404]e/m/d":27,"m/d/yy":30,t0:59,"t0.00":60,"t#,##0":61,"t#,##0.00":62,"t0%":67,"t0.00%":68,"t# ?/?":69,"t# ??/??":70},he=kendo.Class.extend({init:function(e){var t=this;this.options=e||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._borders=[],this._images=this.options.images,this._imgId=0,this._sheets=B(this.options.sheets||[],function(e,n){return e.defaults=t.options,e.sheetIndex=n+1,new le(e,t._strings,t._styles,t._borders)})},imageFilename:function(e){var t=++this._imgId;switch(e){case"image/jpg":case"image/jpeg":return"image"+t+".jpg";case"image/png":return"image"+t+".png";case"image/gif":return"image"+t+".gif";default:return"image"+t+".bin"}},toZIP:function(){var e,t,n,i,o,r,s,l,c,d,u,h,g,m,v,b,w,k,y,x,C,S,T,A,E,I,M,F,R,P=this,z=L(),H=z.folder("docProps");for(H.file("core.xml",K({creator:this.options.creator||"Kendo UI",lastModifiedBy:this.options.creator||"Kendo UI",created:this.options.date||(new Date).toJSON(),modified:this.options.date||(new Date).toJSON()})),e=this._sheets.length,H.file("app.xml",Q({sheets:this._sheets})),t=z.folder("_rels"),t.file(".rels",Y),n=z.folder("xl"),i=n.folder("_rels"),i.file("workbook.xml.rels",ee({count:e})),this._images&&(o=n.folder("media"),Object.keys(this._images).forEach(function(e){var t=P._images[e],n=P.imageFilename(t.type);o.file(n,t.data),t.target="../media/"+n})),r={},n.file("workbook.xml",J({sheets:this._sheets,filterNames:B(this._sheets,function(e,t){var n,i,o,a,s=e.options,l=s.name||s.title||"Sheet"+(t+1);if(r[l.toLowerCase()]=t,n=s.filter){if(n.ref)return i=n.ref.split(":"),o=D(i[0]),a=D(i[1]),{localSheetId:t,name:l,from:p(o.row,o.col),to:p(a.row,a.col)};if(void 0!==n.from&&void 0!==n.to)return{localSheetId:t,name:l,from:p(f(s),n.from),to:p(f(s),n.to)}}}),userNames:B(this.options.names||[],function(e){return{name:e.localName,localSheetId:e.sheet?r[e.sheet.toLowerCase()]:null,value:e.value,hidden:e.hidden}})})),s=n.folder("worksheets"),l=n.folder("drawings"),c=l.folder("_rels"),d=s.folder("_rels"),u=[],h=[],g=0;g\n '+c(n,function(e){return'\n \n '+i[e.filter](e)+"\n \n "})+"\n"},ge=function(e){var t=e.logic,n=e.criteria;return"\n\n"+c(n,function(e){var t=P.customOperator(e),n=P.customValue(e);return"'})+"\n"},me=function(e){var t=e.type;return''},ve=function(e){var t=e.type,n=e.value;return''},_e=function(e){var t=e.blanks,n=e.values;return"\n "+c(n,function(e){return'\n '})+"\n "},P.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()]},P.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}},P.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:N,Workbook:he,Worksheet:le})}(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?u.push({id:e,level:h}):i=t;)i=e.pop(),r.push(o._hierarchyFooter(o.aggregates[i.id],i.level+1,n));return r},_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 o=this,r=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&&(r[0].colSpan=this._depth()+1),{type:"header",cells:n(i.length,function(){return e.extend({background:"#7a7a7a",color:"#fff"},o.options.headerPaddingCellOptions)}).concat(r)}},_prependHeaderRows:function(e){var t,n=this,i=this.groups,o=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(o,this.options.columns),t=o.length-1;t>=0;t--)e.unshift(n._headerRow(o[t],i))},_prepareHeaderRows:function(t,n,i,o){var r,a,s,l=this,c=o||t[t.length-1],d=t[c.index+1],u=0;for(r=0;rr&&(r=n));return o+r},_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,o,r,a;if(this.options=e,n=e.dataSource,n instanceof t.data.DataSource){if(n.filter()||(n.options.filter=void 0),this.dataSource=new n.constructor(i({},n.options,{page:e.allPages?0:n.page(),filter:n.filter(),pageSize:e.allPages?n.total():n.pageSize()||n.total(),sort:n.sort(),group:n.group(),aggregate:n.aggregate()})),o=n.data(),o.length>0){if(e.hierarchy)for(r=0;rt&&(t=n);o.depth=t+1}else o=!1;return{hierarchy:o}},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",collapsible:!1},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,collapsible:n.collapsible});i.workbook().then(e.proxy(function(e,i){if(!this.trigger("excelExport",{workbook:e,data:i})){var o=new t.ooxml.Workbook(e);o.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){function t(e){return e&&o(e.done)&&o(e.fail)}function n(e){return e&&o(e.then)&&o(e["catch"])}var i=window.kendo,o=i.isFunction,r=i.data.RemoteTransport.extend({init:function(e){var o,r=e&&e.signalr?e.signalr:{},a=r.promise;if(!a)throw Error('The "promise" option must be set.');if(!t(a)&&!n(a))throw Error('The "promise" option must be a Promise.');if(this.promise=a,o=r.hub,!o)throw Error('The "hub" option must be set.'); if("function"!=typeof o.on||"function"!=typeof o.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=o,i.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(o,r){var a,s,l=this.hub,c=this.promise,d=this.options.signalr.server;if(!d||!d[r])throw Error(i.format('The "server.{0}" option must be set.',r));a=[d[r]],s=this.parameterMap(o.data,r),e.isEmptyObject(s)||a.push(s),t(c)?c.done(function(){l.invoke.apply(l,a).done(o.success).fail(o.error)}):n(c)&&c.then(function(){l.invoke.apply(l,a).then(o.success)["catch"](o.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,i.data,{transports:{signalr:r}})}(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,o,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 c(1,1,1,0):n(r[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))?o=new d(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))?o=new d(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))?o=new d(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))?o=new d(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))?o=new c(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))&&(o=new c(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),o)o.match=i;else if(!t)throw Error("Cannot parse color: "+a);return o}var i,o,r,a,s,l,c,d,u,h,p;window.kendo=window.kendo||{},i=kendo.Class,o=kendo.support,r={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=o.browser,s=function(e){var t,n=Object.keys(r);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 d(e.r,e.g,e.b,e.a)),e}}),c=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,o=n.g,r=n.b,a=Math.min(i,o,r),s=Math.max(i,o,r),l=s-a,c=s;return 0===l?new u(0,0,c,this.a):(0!==s?(t=l/s,e=i===s?(o-r)/l:o===s?2+(r-i)/l:4+(i-o)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new u(e,t,c,this.a))},toHSL:function(){var e,t,n,i=this,o=i.r,r=i.g,a=i.b,s=Math.max(o,r,a),l=Math.min(o,r,a),c=(s+l)/2;if(s===l)e=t=0;else switch(n=s-l,t=c>.5?n/(2-s-l):n/(s+l),s){case o:e=(r-a)/n+(r255?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 d(e,t,n,null!=i?i:1)},p.fromRGB=function(e,t,n,i){return new c(e,t,n,null!=i?i:1)},p.fromHSV=function(e,t,n,i){return new u(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=r,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 o(){return{width:0,height:0,baseline:0}}function r(e,t,n){return u.current.measure(e,t,n)}var a,s,l,c,d,u;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=" ",c={baselineMarkerSize:1},"undefined"!=typeof document&&(d=document.createElement("div"),d.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;"),u=kendo.Class.extend({init:function(t){this._cache=new a(1e3),this.options=e.extend({},c,t)},measure:function(e,r,a){var s,l,c,u,h,p,f,g,m;if(void 0===a&&(a={}),!e)return o();if(s=n(r),l=i(e+s),c=this._cache.get(l))return c;u=o(),h=a.box||d,p=this._baselineMarker().cloneNode(!1);for(f in r)g=r[f],void 0!==g&&(h.style[f]=g);return m=a.normalizeText!==!1?t(e):e+"",h.textContent=m,h.appendChild(p),document.body.appendChild(h),m.length&&(u.width=h.offsetWidth-this.options.baselineMarkerSize,u.height=h.offsetHeight,u.baseline=p.offsetTop+this.options.baselineMarkerSize),u.width>0&&u.height>0&&this._cache.put(l,u),h.parentNode.removeChild(h),u},_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}}),u.current=new u,kendo.deepExtend(kendo.util,{LRUCache:a,TextMetrics:u,measureText:r,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,o,r,s,l,c="",d=0,u=a(e);d>2,r=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,l=63&i,isNaN(n)?s=l=64:isNaN(i)&&(l=64),c=c+nn.charAt(o)+nn.charAt(r)+nn.charAt(s)+nn.charAt(l);return c}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 c(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function d(e){return""===e||null===e||"none"===e||"transparent"===e||!i(e)}function u(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=[],o=0,r=0,a=0;o=0&&u<=1&&h>=0&&h<=1)return new cn(e.x+h*o,e.y+h*a)}function z(e,t,n,i,o,a){var s=m((o-e)/n,3),l=m((a-t)/i,3);return m(r(Math.atan2(l,s)))}function B(e){var t,n,i,o,a,s,l,c,d,u,h,p,g,v,_,b,w,k,y,x,C,S,T,D,A,E=e.x1,I=e.y1,M=e.x2,F=e.y2,R=e.rx,P=e.ry,z=e.largeArc,B=e.swipe,L=e.rotation;return void 0===L&&(L=0),t=f(L),n=Math.cos(t),i=Math.sin(t),o=n*(E-M)/2+i*(I-F)/2,a=-i*(E-M)/2+n*(I-F)/2,s=z!==B?1:-1,l=Math.pow(o,2),c=Math.pow(a,2),d=Math.pow(R,2),u=Math.pow(P,2),h=l/d+c/u,h>1&&(h=Math.sqrt(l/d+c/u),R=h*R,d=Math.pow(R,2),P=h*P,u=Math.pow(P,2)),p=s*Math.sqrt((d*u-d*c-u*l)/(d*c+u*l)),isNaN(p)&&(p=0),g=p*(R*a)/P,v=-p*(P*o)/R,_=n*g-i*v+(E+M)/2,b=i*g+n*v+(I+F)/2,w=(o-g)/R,k=(a-v)/P,y=-(o+g)/R,x=-(a+v)/P,C=(k>=0?1:-1)*r(Math.acos(w/Math.sqrt(w*w+k*k))),S=m((w*y+k*x)/(Math.sqrt(w*w+k*k)*Math.sqrt(y*y+x*x)),10),T=(w*x-k*y>=0?1:-1)*r(Math.acos(S)),!B&&T>0&&(T-=360),B&&T<0&&(T+=360),D=C+T,A=D>=0?1:-1,D=Math.abs(D)%360*A,{center:new cn(_,b),startAngle:C,endAngle:D,radiusX:R,radiusY:P,xRotation:L}}function L(e,t){for(var n=e;nt.y,o&&((0===s[r]||1===s[r])&&n.bottomRight().x>t.x||00?n.x-o:r-n.x)/(r-o)+a-n.y>=0),i?1:0}function K(e){var t,n=e.length,i=en,o=tn;for(t=0;t1)for(o=new cn,r=e[0].bbox,a=1;as?c.length?(l.push(c),c=[],u(),d=a):(u(),l.push(c),c=[],d=0):(u(),d+=a));return c.length&&l.push(c),l}function pe(e,t,n,i,o){var r,a,s,l,c=he(e,t,o),d=t.origin.clone(),u=[];for(r=0;r"+o.render()+"",o.destroy(),i}function Ie(e,t){var n,i,o,r,a,s,l=t.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),e.moveTo(i.x,i.y),o=1;ot._zIndex?-1:0}function Fe(e,t){var n,i,o;for(n=0;n=r-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 d(e){var t,i,o,a,s,l,u;if("TABLE"==e.tagName&&He(e,{tableLayout:"fixed"}),!c(e)){for(t=rt(e),i=parseFloat(at(t,"padding-bottom")),o=parseFloat(at(t,"border-bottom-width")),a=y,y+=i+o,s=!0,l=e.firstChild;l;l=l.nextSibling)if(1==l.nodeType){if(s=!1,Ao(l,n)){h(l);continue}if(!r){d(l);continue}if(!/^(?:static|relative)$/.test(at(rt(l),"position")))continue;u=f(l),1==u?h(l):u&&c(l)?h(l):d(l)}else 3==l.nodeType&&r&&(g(l,s),s=!1);y=a}}function u(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,o,r,a,l;return 1==e.nodeType&&e!==w&&u(e)?h(e.parentNode):(t=Ne(e,"table"),n=t&&t.querySelector("colgroup"),s.repeatHeaders&&(i=t&&t.querySelector("thead"),o=Ne(e,".k-grid.k-widget"),o&&o.querySelector(".k-auto-scrollable")&&(r=o.querySelector(".k-grid-header"))),a=p(),l=_.createRange(),l.setStartBefore(w),l.setEndBefore(e),a.appendChild(l.extractContents()),w.parentNode.insertBefore(a,w),m(e.parentNode),t&&(t=Ne(e,"table"),s.repeatHeaders&&i&&t.insertBefore(i.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),void(s.repeatHeaders&&r&&(o=Ne(e,".k-grid.k-widget"),o.insertBefore(r.cloneNode(!0),o.firstChild))))}function p(){var e=_.createElement("KENDO-PDF-PAGE");return He(e,{display:"block",boxSizing:"content-box",width:o?o+"px":"auto",padding:a.top+"px "+a.right+"px "+a.bottom+"px "+a.left+"px",position:"relative",height:r?r+"px":"auto",overflow:r||o?"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=w.getBoundingClientRect().top,n=r-y,i.height>n?3:i.top-t>n?1:i.bottom-t>n?2:0)}function g(e,t){var n,i,o,r,a;/\S/.test(e.data)&&(n=e.data.length,i=_.createRange(),i.selectNodeContents(e),o=f(i),o&&(r=e,1==o?h(t?e.parentNode:e):(!function s(t,n,o){return i.setEnd(e,n),t==n||n==o?n:f(i)?s(t,t+n>>1,n):s(n,n+o>>1,o)}(0,n>>1,n),!/\S/.test(""+i)&&t?h(e.parentNode):(r=e.splitText(i.endOffset),a=p(),i.setStartBefore(w),a.appendChild(i.extractContents()),w.parentNode.insertBefore(a,w),m(r.parentNode))),g(r)))}function m(e){var t=Ne(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),m(t.parentNode))}var v=i(s.template),_=t.ownerDocument,b=[],w=s._destructive?t:Eo(t),k=_.createElement("KENDO-PDF-DOCUMENT"),y=0;ze(w.querySelectorAll("tfoot")).forEach(function(e){e.parentNode.appendChild(e)}),ze(w.querySelectorAll("ol")).forEach(function(e){ze(e.children).forEach(function(e,t){e.setAttribute("kendo-split-index",t)})}),He(k,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),o&&(He(k,{width:o+"px",paddingLeft:a.left+"px",paddingRight:a.right+"px"}),He(w,{overflow:"hidden"})),t.parentNode.insertBefore(k,t),k.appendChild(w),s.beforePageBreak?setTimeout(function(){s.beforePageBreak(k,l)},15):setTimeout(l,15)}var r,a;if(t||(t={}),r=$t(),!e)return r.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(We(e.ownerDocument)),a=Oe(t.scale||1),Je(e,function(){var i,s=t&&t.forcePageBreak,l=t&&t.paperSize&&"auto"!=t.paperSize,c=kendo.pdf.getPaperOptions(function(e,n){return"paperSize"==e?l?t[e]:"A4":e in t?t[e]:n}),d=l&&c.paperSize[0],u=l&&c.paperSize[1],h=t.margin&&c.margin,p=!!h;s||u?(h||(h={left:0,top:0,right:0,bottom:0}),d&&(d/=a.x),u&&(u/=a.y),h.left/=a.x,h.right/=a.x,h.top/=a.y,h.bottom/=a.y,i=new Jn({pdf:{multiPage:!0,paperSize:l?c.paperSize:"auto",_ignoreMargin:p}}),o(function(e){if(t.progress){var o=!1,a=0;!function s(){if(a0&&o(e,l,c,d,u[0])}}function o(e,t,n,i,o){/^data:/i.test(o)||/^[^\/:]+:\/\//.test(o)||/^\//.test(o)||(o=(e.href+"").replace(/[^\/]*$/,"")+o),t.forEach(function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),n&&(e+="|bold"),i&&(e+="|italic"),r[e]=o})}var r,a;for(null==e&&(e=document),r={},a=0;a0);return n}function et(e,t,n){var i,o;Co=Object.create(Co),Co[e.tagName.toLowerCase()]={element:e,style:t},i=at(t,"text-decoration"),i&&"none"!=i&&(o=at(t,"color"),i.split(/\s+/g).forEach(function(e){Co[e]||(Co[e]=o)})),ot(t)&&(Co._stackingContext={element:e,group:n})}function tt(){Co=Object.getPrototypeOf(Co)}function nt(e){if(null!=Co._clipbox){var t=e.bbox(Co._matrix);Co._clipbox=Co._clipbox?un.intersect(Co._clipbox,t):t}}function it(){var e=Co._clipbox;return null==e||(e?0===e.width()||0===e.height():void 0)}function ot(e){function t(t){return at(e,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0}function rt(e,t){return window.getComputedStyle(e,t||null)}function at(e,t,n){var i=e.getPropertyValue(t);return null!=i&&""!==i||(ko.webkit?i=e.getPropertyValue("-webkit-"+t):ko.mozilla?i=e.getPropertyValue("-moz-"+t):ko.opera?i=e.getPropertyValue("-o-"+t):To&&(i=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==i||""===i)?n:i}function st(e,t,n,i){e.setProperty(t,n,i),ko.webkit?e.setProperty("-webkit-"+t,n,i):ko.mozilla?e.setProperty("-moz-"+t,n,i):ko.opera?e.setProperty("-o-"+t,n,i):To&&(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 lt(e,t){return t="border-"+t,{width:parseFloat(at(e,t+"-width")),style:at(e,t+"-style"),color:Qe(at(e,t+"-color"),!0)}}function ct(e,t){var n=e.style.cssText,i=t();return e.style.cssText=n,i}function dt(e,t){var n=at(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),bt({x:n[0],y:n[1]})}function ut(e){var t=e.getBoundingClientRect();return t=ht(t,"border-*-width",e),t=ht(t,"padding-*",e)}function ht(e,t,n){var i,o,r,a,s;return"string"==typeof t?(i=rt(n),o=parseFloat(at(i,t.replace("*","top"))),r=parseFloat(at(i,t.replace("*","right"))),a=parseFloat(at(i,t.replace("*","bottom"))),s=parseFloat(at(i,t.replace("*","left")))):"number"==typeof t&&(o=r=a=s=t),{top:e.top+o,right:e.right-r,bottom:e.bottom-a,left:e.left+s,width:e.right-e.left-r-s,height:e.bottom-e.top-a-o}}function pt(e){var t,n,i=at(e,"transform");return"none"==i?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),t?(n=at(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 ft(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 mt(e,t){return t=new ln(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function vt(e,t){e.clip(t)}function _t(e,t,n,i){for(var o=new Sn([t,n],i).curvePoints(),r=1;r0?(o=e.className,e.className+=" kendo-pdf-hide-pseudo-elements",Dt(e,t),e.className=o,i.forEach(function(t){e.removeChild(t)})):Dt(e,t)))}function Dt(e,t){function i(t){var n,i,o,r,a,s;if(/^td$/i.test(e.tagName)&&(n=Co.table,n&&"collapse"==at(n.style,"border-collapse"))){if(i=lt(n.style,"left").width,o=lt(n.style,"top").width,0===i&&0===o)return t;if(r=n.element.getBoundingClientRect(),a=n.element.rows[0].cells[0],s=a.getBoundingClientRect(),s.top==r.top||s.left==r.left)return ze(t).map(function(e){return{left:e.left+i,top:e.top+o,right:e.right+i,bottom:e.bottom+o,height:e.height,width:e.width}})}return t}function o(e,n,i,o,r,a,s,l){function c(t,n,o){var r=Math.PI/2*t/(t+i),a={x:n.x-t,y:n.y-i},s=new qn({fill:{color:e},stroke:null}).moveTo(0,0);mt(s,o),_t(s,0,n.y,{startAngle:-90,endAngle:-ft(r),radiusX:n.x,radiusY:n.y}),a.x>0&&a.y>0?(s.lineTo(a.x*Math.cos(r),n.y-a.y*Math.sin(r)),_t(s,0,n.y,{startAngle:-ft(r),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),u.append(s.close())}if(!(i<=0)){var d,u=new Jn;mt(u,l),t.append(u),bt(a),bt(s),d=new qn({fill:{color:e},stroke:null}),u.append(d),d.moveTo(a.x?Math.max(a.x,o):0,0).lineTo(n-(s.x?Math.max(s.x,r):0),0).lineTo(n-Math.max(s.x,r),i).lineTo(Math.max(a.x,o),i).close(),a.x&&c(o,a,[-1,0,0,1,a.x,0]),s.x&&c(r,s,[1,0,0,1,n-s.x,0])}}function r(e){var n,i,o=new Jn;for(vt(o,yt(e,D,A,I,E)),t.append(o),F&&(n=new qn({fill:{color:F.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(),o.append(n)),i=c.length;--i>=0;)a(o,e,c[i],d[i%d.length],u[i%u.length],h[i%h.length],p[i%p.length])}function a(t,n,i,o,r,a,s){function l(t,n,i,l,c){function d(){for(;m.origin.x>n.left;)m.origin.x-=i}function u(){for(;m.origin.y>n.top;)m.origin.y-=l}function h(){for(;m.origin.x0&&c.height>0&&l(t,n,c.width,c.height,function(e,t){e.append(new Qn(i.url,t))})}else{if("linear"!=i.type)return;l(t,n,n.width,n.height,At(i))}}function s(){function i(n){ct(e,function(){e.style.position="relative";var i=e.ownerDocument.createElement(yo);i.style.position="absolute",i.style.boxSizing="border-box","outside"==r?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",n(i),e.insertBefore(i,e.firstChild),Nt(i,t),e.removeChild(i)})}function o(t){var n,i=e.parentNode.children,o=e.getAttribute("kendo-split-index");if(null!=o)return t(0|o,i.length);for(n=0;n0&&(i&&"ltr"==M||a&&"rtl"==M),c=C.width>0&&(a&&"ltr"==M||i&&"rtl"==M),0!==x.width||0!==T.width||0!==C.width||0!==S.width)){if(x.color==C.color&&x.color==S.color&&x.color==T.color&&x.width==C.width&&x.width==S.width&&x.width==T.width&&l&&c)return n=ht(n,x.width/2),d=kt(e,n,x.width/2),d.options.stroke={color:x.color,width:x.width},void t.append(d);if(0===D.x&&0===A.x&&0===I.x&&0===E.x&&x.width<2&&T.width<2&&C.width<2&&S.width<2)return x.width>0&&t.append(new qn({stroke:{width:x.width,color:x.color}}).moveTo(n.left,n.top+x.width/2).lineTo(n.right,n.top+x.width/2)),S.width>0&&t.append(new qn({stroke:{width:S.width,color:S.color}}).moveTo(n.left,n.bottom-S.width/2).lineTo(n.right,n.bottom-S.width/2)),l&&t.append(new qn({stroke:{width:T.width,color:T.color}}).moveTo(n.left+T.width/2,n.top).lineTo(n.left+T.width/2,n.bottom)),void(c&&t.append(new qn({stroke:{width:C.width,color:C.color}}).moveTo(n.right-C.width/2,n.top).lineTo(n.right-C.width/2,n.bottom)));u=wt(n,D,A,I,E),h=u.tl,p=u.tr,f=u.br,g=u.bl,o(x.color,n.width,x.width,T.width,C.width,h,p,[1,0,0,1,n.left,n.top]),o(S.color,n.width,S.width,C.width,T.width,f,g,[-1,0,0,-1,n.right,n.bottom]),o(T.color,n.height,T.width,S.width,x.width,s(g),s(h),[0,-1,1,0,n.left,n.bottom]),o(C.color,n.height,C.width,x.width,S.width,s(p),s(f),[0,1,-1,0,n.right,n.top])}}var c,d,u,h,p,f,g,m,v,_,b,w,k,y=rt(e),x=lt(y,"top"),C=lt(y,"right"),S=lt(y,"bottom"),T=lt(y,"left"),D=dt(y,"top-left"),A=dt(y,"top-right"),E=dt(y,"bottom-left"),I=dt(y,"bottom-right"),M=at(y,"direction"),F=at(y,"background-color");if(F=Qe(F),c=Io(at(y,"background-image")),d=Mo(at(y,"background-repeat")),u=Mo(at(y,"background-position")),h=Mo(at(y,"background-origin")),p=Mo(at(y,"background-size")),To&&(f=y.textOverflow,"ellipsis"==f&&(g=e.style.textOverflow,e.style.textOverflow="clip")),ko.msie&&ko.version<10&&(u=Mo(e.currentStyle.backgroundPosition)),m=ht(e.getBoundingClientRect(),"border-*-width",e),function(){var e,n,i,o,r,a,s,l=at(y,"clip"),c=/^\s*rect\((.*)\)\s*$/.exec(l);c&&(e=c[1].split(/[ ,]+/g),n="auto"==e[0]?m.top:parseFloat(e[0])+m.top,i="auto"==e[1]?m.right:parseFloat(e[1])+m.left,o="auto"==e[2]?m.bottom:parseFloat(e[2])+m.top,r="auto"==e[3]?m.left:parseFloat(e[3])+m.left,a=new Jn,s=(new qn).moveTo(r,n).lineTo(i,n).lineTo(i,o).lineTo(r,o).close(),vt(a,s),t.append(a),t=a,nt(s))}(),w=at(y,"display"),"table-row"==w)for(v=[],_=0,b=e.children;_0&&"list-item"==w&&!e.getAttribute("kendo-no-bullet")&&s(v[0]),function(){function n(){var n=kt(e,m,"padding"),i=new Jn;vt(i,n),t.append(i),t=i,nt(n)}Ft(e)?n():/^(hidden|auto|scroll)/.test(at(y,"overflow"))?n():/^(hidden|auto|scroll)/.test(at(y,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(at(y,"overflow-y"))&&n()}(),Et(e,t)||Bt(e,t),To&&"ellipsis"==f&&(e.style.textOverflow=g),t}function At(e){return function(t,n){var i,o,r,a,s,l,c,d,u,h,p,f,g,m=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,m);break;case"top right":case"right top":i=Math.atan2(v,m);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,m);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,m)}e.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),o=Math.abs(m*Math.sin(i))+Math.abs(v*Math.cos(i)),r=Math.atan(m*Math.tan(i)/v),a=Math.sin(r),s=Math.cos(r),l=Math.abs(a)+Math.abs(s),c=l/2*a,d=l/2*s,i>Math.PI/2&&i<=3*Math.PI/2&&(c=-c,d=-d),u=[],h=0,p=e.stops.map(function(t,n){var i,r=t.percent;return r?r=parseFloat(r)/100:t.length?r=parseFloat(t.length)/o:0===n?r=0:n==e.stops.length-1&&(r=1),i={color:t.color.toCssRgba(),offset:r},null!=r?(h=r,u.forEach(function(e,t){var n=e.stop;n.offset=e.left+(h-e.left)*(t+1)/(u.length+1)}),u=[]):u.push({left:h,stop:i}),i}),f=[.5-c,.5+d],g=[.5+c,.5-d],t.append(qn.fromRect(n).stroke(null).fill(new si({start:f,end:g,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 Et(e,t){var n,i,o,r;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&&(o=new Jn,o.children.push(n),r=e.getBoundingClientRect(),o.transform(A().translate(r.left,r.top)),t.append(o),!0)}function It(e,t,n){var i=ut(e),o=new un([i.left,i.top],[i.width,i.height]),r=new Qn(t,o);vt(r,kt(e,i,"content")),n.append(r)}function Mt(e,t){var n=rt(e),i=rt(t),o=parseFloat(at(n,"z-index")),r=parseFloat(at(i,"z-index")),a=at(n,"position"),s=at(i,"position");return isNaN(o)&&isNaN(r)?/static|absolute/.test(a)&&/static|absolute/.test(s)?0:"static"==a?-1:"static"==s?1:0:isNaN(o)?0===r?0:r>0?-1:1:isNaN(r)?0===o?0:o>0?1:-1:parseFloat(o)-parseFloat(r)}function Ft(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function Rt(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function Pt(e,t){var n=rt(e),i=at(n,"color"),o=e.getBoundingClientRect();"checkbox"==e.type?(t.append(qn.fromRect(new un([o.left+1,o.top+1],[o.width-2,o.height-2])).stroke(i,1)),e.checked&&t.append((new qn).stroke(i,1.2).moveTo(o.left+.22*o.width,o.top+.55*o.height).lineTo(o.left+.45*o.width,o.top+.75*o.height).lineTo(o.left+.78*o.width,o.top+.22*o.width))):(t.append(new kn(new gn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-2,o.height-2)/2)).stroke(i,1)),e.checked&&t.append(new kn(new gn([(o.left+o.right)/2,(o.top+o.bottom)/2],Math.min(o.width-8,o.height-8)/2)).fill(i).stroke(null)))}function zt(e,t){var n,i,o,r,a,s=e.tagName.toLowerCase();if("input"==s&&("checkbox"==e.type||"radio"==e.type))return Pt(e,t);if(n=e.parentNode,i=e.ownerDocument,o=i.createElement(yo),o.style.cssText=St(rt(e)),"input"==s&&(o.style.whiteSpace="pre"),"select"!=s&&"textarea"!=s||(o.style.overflow="auto"),"select"==s)if(e.multiple)for(a=0;a=d)return!0;if(g.setStart(t,c),g.setEnd(t,c+1),e=i(g),n=!1,(v||_>1)&&(f=l.substr(c).search(/\s/),f>=0&&(g.setEnd(t,c+f),o=i(g),o.bottom==e.bottom&&(e=o,n=!0,c+=f))),!n){if(f=function m(n,o,r){g.setEnd(t,o);var a=i(g);return a.bottom!=e.bottom&&n>1,o):a.right!=e.right?(e=a,o>1,r):o):o}(c,Math.min(d,c+k),d),f==c)return!0;if(c=f,f=(""+g).search(/\s+$/),0===f)return!1;f>0&&(g.setEnd(t,g.startOffset+f),e=i(g))}if(To&&(e=g.getClientRects()[0]),a=""+g,/^(?: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||(y=e.bottom),r(a,e)}function r(e,t){var i,o,r;switch(To&&!isNaN(h)&&(i=Ro(p),o=(t.top+t.bottom-i)/2,t={top:o,right:t.right,bottom:o+i,left:t.left,height:i,width:t.right-t.left}),w){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()})}r=new Do(e,new un([t.left,t.top],[t.width,t.height]),{font:p,fill:{color:f}}),n.append(r)}function a(e){function t(t,i){var o,r;t&&(o=u/12,r=new qn({stroke:{width:o,color:t}}),i-=o,r.moveTo(e.left,i).lineTo(e.right,i),n.append(r))}t(x,e.bottom),t(C,e.bottom-e.height/2.7),t(S,e.top)}var s,l,c,d,u,h,p,f,g,m,v,_,b,w,k,y,x,C,S,T;if(!it()&&(s=rt(e),!(parseFloat(at(s,"text-indent"))<-500)&&(l=t.data,c=0,d=l.search(/\S\s*$/)+1,d&&(u=at(s,"font-size"),h=at(s,"line-height"),p=[at(s,"font-style"),at(s,"font-variant"),at(s,"font-weight"),u,at(s,"font-family")].join(" "),u=parseFloat(u),h=parseFloat(h),0!==u)))){for(f=at(s,"color"),g=e.ownerDocument.createRange(),m=at(s,"text-align"),v="justify"==m,_=at(s,"column-count",1),b=at(s,"white-space"),w=at(s,"text-transform"),k=e.getBoundingClientRect().width/u*5,0===k&&(k=500),y=null,x=Co.underline,C=Co["line-through"],S=Co.overline,T=x||C||S;!o(););T&&(g.selectNode(t),ze(g.getClientRects()).forEach(a))}}function Ht(e,t,n){var i,o,r,a,s,l;for("auto"!=n?(i=Co._stackingContext.group,n=parseFloat(n)):(i=t,n=0),o=i.children,r=0;rn);++r);return a=new Jn,i.insert(r,a),a._dom_zIndex=n,i!==t&&Co._clipbox&&(s=Co._matrix.invert(),l=Co._clipbox.transformCopy(s),vt(a,qn.fromRect(l))),a}function Nt(e,t){var n,i,o,r,a,s,l=rt(e);Ke(l),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=Co._clipbox&&(n=parseFloat(at(l,"opacity")),i=at(l,"visibility"),o=at(l,"display"),0!==n&&"hidden"!=i&&"none"!=o&&(r=pt(l),s=at(l,"z-index"),(r||n<1)&&"auto"==s&&(s=0),a=Ht(e,t,s),n<1&&a.opacity(n*a.opacity()),et(e,l,a),r?ct(e,function(){var t,n,i,o;st(e.style,"transform","none","important"),st(e.style,"transition","none","important"),"static"==at(l,"position")&&st(e.style,"position","relative","important"),t=e.getBoundingClientRect(),n=t.left+r.origin[0],i=t.top+r.origin[1],o=[1,0,0,1,-n,-i],o=Ot(o,r.matrix),o=Ot(o,[1,0,0,1,n,i]),o=mt(a,o),Co._matrix=Co._matrix.multiplyCopy(o),Tt(e,a)}):Tt(e,a),tt()))}function Ot(e,t){var n=e[0],i=e[1],o=e[2],r=e[3],a=e[4],s=e[5],l=t[0],c=t[1],d=t[2],u=t[3],h=t[4],p=t[5];return[n*l+i*d,n*c+i*u,o*l+r*d,o*c+r*u,a*l+s*d+h,a*c+s*u+p]}var Vt,Wt,Ut,qt,jt,Gt,$t,Yt,Kt,Qt,Xt,Jt,Zt,en,tn,nn,on,rn,an,sn,ln,cn,dn,un,hn,pn,fn,gn,mn,vn,_n,bn,wn,kn,yn,xn,Cn,Sn,Tn,Dn,An,En,In,Mn,Fn,Rn,Pn,zn,Bn,Ln,Hn,Nn,On,Vn,Wn,Un,qn,jn,Gn,$n,Yn,Kn,Qn,Xn,Jn,Zn,ei,ti,ni,ii,oi,ri,ai,si,li,ci,di,ui,hi,pi,fi,gi,mi,vi,_i,bi,wi,ki,yi,xi,Ci,Si,Ti,Di,Ai,Ei,Ii,Mi,Fi,Ri,Pi,zi,Bi,Li,Hi,Ni,Oi,Vi,Wi,Ui,qi,ji,Gi,$i,Yi,Ki,Qi,Xi,Ji,Zi,eo,to,no,io,oo,ro,ao,so,lo,co,uo,ho,po,fo,go,mo,vo,_o,bo,wo,ko,yo,xo,Co,So,To,Do,Ao,Eo,Io,Mo,Fo,Ro,Po;window.kendo=window.kendo||{},Vt=kendo.drawing,Wt=Vt.util,Ut=kendo.Class,qt=kendo.util,jt=kendo.support,Gt=jt.browser,$t=Wt.createPromise,Yt=Wt.promiseAll,Kt={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,o=this._observers;if(o&&!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+".",o=s[l],o||(o=new sn({},i),o.addObserver(r),s[l]=o),s=o;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=an.call(e),o=e;return null!==o&&i(o)&&"[object Object]"===n&&(e instanceof sn||e instanceof Ut||(o=new sn(o,this.prefix+t+".")),o.addObserver(this)),o}}),Kt.extend(sn.prototype),ln=Ut.extend({init:function(e,t,n,i,o,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),this.a=e,this.b=t,this.c=n,this.d=i,this.e=o,this.f=r},multiplyCopy:function(e){return new ln(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,o=e.d,r=e.e,a=e.f,s=t*o-n*i;return 0===s?null:new ln(o/s,-n/s,-i/s,t/s,(i*a-o*r)/s,(n*r-t*a)/s)},clone:function(){return new ln(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=m(this.a,e),this.b=m(this.b,e),this.c=m(this.c,e),this.d=m(this.d,e),this.e=m(this.e,e),this.f=m(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&&!d(e.color)},_clippedBBox:function(e){return this.bbox(e)}}),pn.prototype.nodeType="Element",Kt.extend(pn.prototype),fn=Math.PI/2,gn=Ut.extend({init:function(e,t){void 0===e&&(e=new cn),void 0===t&&(t=0),this.setCenter(e),this.setRadius(t)},setCenter:function(e){return this._observerField("center",cn.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,o,r=this,a=E(this.center,this.radius,this.radius,e),s=cn.maxPoint(),l=cn.minPoint();for(t=0;t<4;t++)n=r._pointAt(a.x+t*fn).transformCopy(e),i=r._pointAt(a.y+t*fn).transformCopy(e),o=new cn(n.x,i.y),s=cn.min(s,o),l=cn.max(l,o);return un.fromPoints(s,l)},_pointAt:function(e){var t=this,n=t.center,i=t.radius;return new cn(n.x+i*Math.cos(e),n.y+i*Math.sin(e))},containsPoint:function(e){var t=this,n=t.center,i=t.radius,o=Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)<=Math.pow(i,2);return o},_isOnPath:function(e,t){var n=this,i=n.center,o=n.radius,r=i.distanceTo(e);return o-t<=r&&r<=o+t}}),T(gn.prototype,["radius"]),Kt.extend(gn.prototype),mn="Gradient",vn={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var n,o=this.options;return i(e)?(e&&e.nodeType!==mn?(n={color:e},i(t)&&(n.opacity=t),o.set("fill",n)):o.set("fill",e),this):o.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")}},_n=""+ln.IDENTITY,bn={extend:function(e){e.bbox=this.bbox,e.geometryChange=this.geometryChange},bbox:function(e){var t,n,i=D(this.currentTransform(e)),o=i?""+i:_n;return this._bboxCache&&this._matrixHash===o?t=this._bboxCache.clone():(t=this._bbox(i),this._bboxCache=t?t.clone():null,this._matrixHash=o),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",kn=pn.extend({init:function(e,t){void 0===e&&(e=new gn),void 0===t&&(t={}),pn.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)}}),kn.prototype.nodeType="Circle",vn.extend(kn.prototype),bn.extend(kn.prototype),M(kn.prototype,["geometry"]),yn=10,xn=45,Cn=Math.pow,Sn=Ut.extend({init:function(e,t){void 0===e&&(e=new cn),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",cn.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(e){var t=this.center,n=f(e);return new cn(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))},curvePoints:function(){var e,t,n,i,o=this,r=this.startAngle,a=this.anticlockwise?-1:1,s=[this.pointAt(r)],l=this._arcInterval(),c=l.endAngle-l.startAngle,d=Math.ceil(c/xn),u=c/d,h=r;for(this.xRotation&&(e=A().rotate(this.xRotation,this.center)),t=1;t<=d;t++)n=h+a*u,i=o._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,o=this._arcInterval(),a=o.startAngle,s=o.endAngle,l=E(this.center,this.radiusX,this.radiusY,e),c=r(l.x),d=r(l.y),u=this.pointAt(s).transformCopy(e),h=L(c,a),p=L(d,a),f=this.pointAt(a).transformCopy(e),g=cn.min(f,u),m=cn.max(f,u);hi||o&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(e,t,n){var i=this.pointAt(e),o=this.pointAt(t),r=this._derivativeAt(e),a=this._derivativeAt(t),s=(f(t)-f(e))/3,l=new cn(i.x+s*r.x,i.y+s*r.y),c=new cn(o.x-s*a.x,o.y-s*a.y);return n&&(i.transform(n),o.transform(n),l.transform(n),c.transform(n)),{p1:i,cp1:l,cp2:c,p2:o}},_derivativeAt:function(e){var t=f(e);return new cn(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},containsPoint:function(e){var t,n,i,o=this._arcInterval(),r=o.endAngle-o.startAngle,a=this,s=a.center,l=a.radiusX,c=a.radiusY,d=s.distanceTo(e),u=Math.atan2(e.y-s.y,e.x-s.x),h=l*c/Math.sqrt(Cn(l,2)*Cn(Math.sin(u),2)+Cn(c,2)*Cn(Math.cos(u),2)),p=this.pointAt(this.startAngle).round(yn),f=this.pointAt(this.endAngle).round(yn),g=P(s,e.round(yn),p,f);return r<180?t=g&&R(s.distanceTo(g),d)&&R(d,h):(n=z(s.x,s.y,l,c,e.x,e.y),360!==n&&(n=(360+n)%360),i=o.startAngle<=n&&n<=o.endAngle,t=i&&R(d,h)||!i&&(!g||g.equals(e))),t},_isOnPath:function(e,t){var n,i=this._arcInterval(),o=this.center,r=z(o.x,o.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==r&&(r=(360+r)%360),n=i.startAngle<=r&&r<=i.endAngle,n&&this.pointAt(r).distanceTo(e)<=t}}),Sn.fromPoints=function(e,t,n,i,o,r,a){var s=B({x1:e.x,y1:e.y,x2:t.x,y2:t.y,rx:n,ry:i,largeArc:o,swipe:r,rotation:a});return new Sn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:s.radiusX,radiusY:s.radiusY,xRotation:s.xRotation,anticlockwise:0===r})},T(Sn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Kt.extend(Sn.prototype),Tn=[].push,Dn=[].pop,An=[].splice,En=[].shift,In=[].slice,Mn=[].unshift,Fn=Ut.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=Tn.apply(this,e);return this._add(e),t},slice:function(){return In.call(this)},pop:function(){var e=this.length,t=Dn.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=En.apply(this);return e&&this._remove([t]),t},unshift:function(){var e=arguments,t=Mn.apply(this,e);return this._add(e),t},indexOf:function(e){var t,n=this,i=this.length;for(t=0;t1)&&(o=0),r=Math.min(Math.max(d,u),1),(r>1||r<0)&&(r=1),{min:o,max:r}},_intersectionsTo:function(e,t){var n;return n=this.controlOut()&&e.controlIn()?$([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):Y(this.anchor(),e.anchor(),t)},_isOnCurveTo:function(e,t,n,i){var o,r,a,s,l,c,d,u=this.bboxTo(e).expand(n,n);if(u.containsPoint(t))return o=this.anchor(),r=this.controlOut(),a=e.controlIn(),s=e.anchor(),"start"===i&&o.distanceTo(t)<=n?!O(o,r,t):"end"===i&&s.distanceTo(t)<=n?!O(s,a,t):(l=[o,r,a,s],!(!G(l,t,"x","y",n)&&!G(l,t,"y","x",n))||(c=A().rotate(45,t),d=[o.transformCopy(c),r.transformCopy(c),a.transformCopy(c),s.transformCopy(c)],G(d,t,"x","y",n)||G(d,t,"y","x",n)))},_isOnLineTo:function(e,t,n){var i=this.anchor(),o=e.anchor(),a=r(Math.atan2(o.y-i.y,o.x-i.x)),s=new un([i.x,i.y-n/2],[i.distanceTo(o),n]);return s.containsPoint(t.transformCopy(A().rotate(-a,i)))},_isOnPathTo:function(e,t,n,i){var o;return o=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,i):this._isOnLineTo(e,t,n)}}),N(zn.prototype,["anchor","controlIn","controlOut"]),Kt.extend(zn.prototype),Bn=pn.extend({init:function(e){pn.fn.init.call(this,e),this.paths=new Rn,this.paths.addObserver(this),i(this.options.stroke)||this.stroke("#000")},moveTo:function(e,t){var n=new qn;return n.moveTo(e,t),this.paths.push(n),this},lineTo:function(e,t){return this.paths.length>0&&u(this.paths).lineTo(e,t),this},curveTo:function(e,t,n){return this.paths.length>0&&u(this.paths).curveTo(e,t,n),this},arc:function(e,t,n,i,o){return this.paths.length>0&&u(this.paths).arc(e,t,n,i,o),this},arcTo:function(e,t,n,i,o,r){return this.paths.length>0&&u(this.paths).arcTo(e,t,n,i,o,r),this},close:function(){return this.paths.length>0&&u(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;t2&&(s="l",c.splice(0,2))),Ln[s])Ln[s](i,{parameters:c,position:o,isRelative:l,previousCommand:n}),a&&a.toLowerCase()===Wn&&i.close();else if(s!==Vn)throw Error("Error while parsing SVG path. Unsupported command: "+s);n=s}),i}}),Un.current=new Un,qn=pn.extend({init:function(e){pn.fn.init.call(this,e),this.segments=new Rn,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 cn(e,t):e,o=new zn(n);return this.segments.push(o),this},curveTo:function(e,t,n){var i,o;return this.segments.length>0&&(i=u(this.segments),o=new zn(n,t),this.suspend(),i.controlOut(e),this.resume(),this.segments.push(o)),this},arc:function(e,t,n,i,o){var r,a,s,l,c;return this.segments.length>0&&(r=u(this.segments),a=r.anchor(),s=f(e),l=new cn(a.x-n*Math.cos(s),a.y-i*Math.sin(s)),c=new Sn(l,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:o}),this._addArcSegments(c)),this},arcTo:function(e,t,n,i,o,r){var a,s,l;return this.segments.length>0&&(a=u(this.segments),s=a.anchor(),l=Sn.fromPoints(s,e,t,n,i,o,r),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,r,"start"))return!0;for(n=2;n<=o-2;n++)if(i[n-1]._isOnPathTo(i[n],e,r))return!0;if(i[o-2]._isOnPathTo(i[o-1],e,r,"end"))return!0}return!1},_bbox:function(e){var t,n,i,o,r=this.segments,a=r.length;if(1===a)n=r[0].anchor().transformCopy(e),t=new un(n,dn.ZERO);else if(a>0)for(i=1;i0)for(t.moveTo(n[0].x,n[0].y),e=1;e=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)},ni=Jn.extend({init:function(t,n){Jn.fn.init.call(this,e.extend({},Zn,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=ti,this.justifyAlign=oe):(this.forEach=ei,this.justifyAlign=ie)},reflow:function(){var e,t,n,i,o,r,a,s,l,c,d,u,h,p,f,g,m,v,_,b,w,k,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,o=n.groupsSize,r=this._fieldMap,a=r.sizeField,s=r.groupsSizeField,l=r.groupAxis,c=r.groupsAxis,d=new cn,u=new cn,h=new dn,p=ie(o,t,e.alignContent,c,s),v=function(t,n){var i=g.elements[n];u[l]=f,u[c]=ie(t.size[s],m,e.alignItems,c,s),ne(u,t,i),f+=t.size[a]+e.spacing},_=0;_t.size[a]&&(b=t.size[a]/m.size[a],w=m.topLeft().scale(b,b),k=m.size[s]*b,y=ie(k,t,e.alignContent,c,s),x=A(),"x"===l?x.translate(t.origin.x-w.x,y-w.y):x.translate(y-w.x,t.origin.y-w.y),x.scale(b,b),this.transform(x))}},_initGroups:function(){var e,t,n,i=this,o=this,r=o.options,a=o.children,s=r.lineSpacing,l=r.wrap,c=r.spacing,d=this._fieldMap.sizeField,u=this._newGroup(),h=[],p=function(){h.push(u),f+=u.lineSize+s},f=-s;for(e=0;ei._rect.size[d]?0===u.bboxes.length?(i._addToGroup(u,n,t),p(),u=i._newGroup()):(p(),u=i._newGroup(),i._addToGroup(u,n,t)):i._addToGroup(u,n,t));return u.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:[]}}}),ii=pn.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t={}),pn.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)}}),ii.prototype.nodeType="Rect",vn.extend(ii.prototype),bn.extend(ii.prototype),M(ii.prototype,["geometry"]),oi=Fn.extend({_change:function(){this.optionsChange({field:"stops"})}}),ri=Ut.extend({init:function(e,t,n){this.options=new sn({offset:e,color:t,opacity:i(n)?n:1}),this.options.addObserver(this)}}),ri.create=function(e){if(i(e)){var t;return t=e instanceof ri?e:e.length>1?new ri(e[0],e[1],e[2]):new ri(e.offset,e.color,e.opacity)}},_e(ri.prototype,["offset","color","opacity"]),Kt.extend(ri.prototype),ai=Ut.extend({init:function(e){void 0===e&&(e={}),this.stops=new oi(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=o()},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)}}),ai.prototype.nodeType="Gradient",Kt.extend(ai.prototype),e.extend(ai.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),si=ai.extend({init:function(e){void 0===e&&(e={}),ai.fn.init.call(this,e),this.start(e.start||new cn),this.end(e.end||new cn(1,0))}}),N(si.prototype,["start","end"]),li=ai.extend({init:function(e){void 0===e&&(e={}),ai.fn.init.call(this,e),this.center(e.center||new cn),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}}),N(li.prototype,["center"]),ci={swing:be,linear:we,easeOutElastic:ke},di=Ut.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e,t){var n,i,o,r=this._items;if(t&&t.type)for(i=t.type.toLowerCase(),o=0;o0||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=w(e,["paddingLeft","paddingTop"]),n=t.paddingLeft,i=t.paddingTop,o=b(e),r=o.left,a=o.top;return{left:r+parseInt(n,10),top:a+parseInt(i,10)}},_surfacePoint:function(e){var t=this._elementOffset(),n=l(e),i=n.x-t.left,o=n.y-t.top;return new cn(i,o)}}),gi.create=function(e,t){return pi.current.create(e,t)},gi.support={},mi=Ut.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",yi=document.createElement("div"), xi="undefined"!=typeof DOMParser,yi.innerHTML=ki,xi&&yi.firstChild.namespaceURI!==_i&&(wi=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),o=document.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(o)})),Ci=wi,Si="transform",Ti={clip:"clip-path",fill:"fill"},Di=mi.extend({init:function(e,t){mi.fn.init.call(this,e),this.definitions={},this.options=t},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),mi.fn.destroy.call(this)},load:function(e,t){var n,o,r,a,s,l=this;for(n=0;n0&&a.load(r),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,o=document.createElement("div");Ci(o,""+this.render()+""),n=o.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)}}),Ei=Di.extend({init:function(e){Di.fn.init.call(this,e),this.id=e.id,this.loadStops()},loadStops:function(){var e,t,n=this,i=this.srcElement.stops,o=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}}),Mi=Ei.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}}),Fi=Di.extend({init:function(e){Di.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:function(){return""+this.renderChildren()+""}}),Ri=Di.extend({init:function(){Di.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=Fi:"fill"===e&&(t instanceof si?n=Ii:t instanceof li&&(n=Mi)),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,o=i.element,r=i.definitionMap,a=t.id,s=r[a];s?s.count++:(n=this.createDefinition(e,t),r[a]={element:n,count:1},this.append(n),o&&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]))}}),Pi=Di.extend({init:function(e){Di.fn.init.call(this),this.options=e,this.defs=new Ri},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){mi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(e){this.defs.definitionChange(e)}}),zi="rtl",Bi=gi.extend({init:function(t,n){gi.fn.init.call(this,t,n),this._root=new Pi(e.extend({rtl:w(t,"direction").direction===zi},this.options)),Ci(this.element,this._template()),this._rootElement=this.element.firstElementChild,De(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 Jn,e.children.push(n),e.transform(A().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,pi.current.register("svg",Bi,10)),Li=Di.extend({template:function(){return""+this.renderChildren()+""},optionsChange:function(e){"transform"===e.field&&this.transformChange(e.value),Di.fn.optionsChange.call(this,e)}}),vi.Group=Li,Hi={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]},Ni="solid",Oi="butt",Vi={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Wi=" ",Ui=Di.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=Vi[e.field];t&&this.attr(t,e.value)}Di.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,o,r,a=this,s=e.segments,l=s.length;if(l>0){for(t=[],o=1;o"}}),vi.Path=Ui,qi=Ui.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),vi.Arc=qi,ji=Ui.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""}}),vi.Circle=ji,Gi=Ui.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""}}),vi.Rect=Gi,$i=Ui.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),Ui.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""}}),vi.Image=$i,Yi=/&(?:[a-zA-Z]+|#\d+);/g,"undefined"!=typeof document&&(Ae._element=document.createElement("span")),Ki=Ui.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&&Ui.fn.content.call(this,this.srcElement.content()),Ui.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=Ui.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=Ae(e),e=kendo.htmlEncode(e),qt.normalizeText(e)},renderTextAnchor:function(){var e;return!(this.options||{}).rtl||Gt.msie||Gt.edge||(e="end"),ye("text-anchor",e)},template:function(){return""+this.renderContent()+""}}),vi.Text=Ki,Qi=Ui.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}}),to=eo.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,o,r=e.bbox();r&&(t=this.getSectors(r),n=t[0][0],i=t[1][0],this.inRoot(t)?this.root.insert(e,r):(o=this.rootMap,o[n]||(o[n]={}),o[n][i]||(o[n][i]=new ro(new un([n*ao,i*ao],[ao,ao]))),o[n][i].insert(e,r)))},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(),o=Math.floor(i.x/ao),r=Math.floor(i.y/ao),a=[[],[]];for(t=Math.floor(e.origin.x/ao);t<=o;t++)a[0].push(t);for(n=Math.floor(e.origin.y/ao);n<=r;n++)a[1].push(n);return a}}),uo=Ut.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)}}),ho=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 io(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,o=n._rootElement,r=[];return i.traverse(function(e){e.loading&&r.push(e.loading)}),e=$t(),t=function(){i._invalidate();try{var t=o.toDataURL();e.resolve(t)}catch(n){e.reject(n)}},Yt(r).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 co,e=this._root.childNodes,t=[],n=0;n"},_enableTracking:function(){this._searchTree=new co,this._cursor=new uo(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"}))}}),ho.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(gi.support.canvas=!0,pi.current.register("canvas",ho,20)),po=eo.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):d(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,o,r,a=this.srcElement.rawBBox();t instanceof si?(i=t.start(),o=t.end(),n=e.createLinearGradient(i.x,i.y,o.x,o.y)):t instanceof li&&(r=t.center(),n=e.createRadialGradient(r.x,r.y,0,r.x,r.y,t.radius())),Fe(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&&!d(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!==Ni&&(t=Hi[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!==Ni?e.lineCap=Oi: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)}}),Zi.Path=po,fo=po.extend({renderPoints:function(e){var t=this.srcElement.toPath();Ie(e,t)}}),Zi.Arc=fo,go=po.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)}}),Zi.Circle=go,mo=po.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)}}),Zi.Rect=mo,vo=po.extend({init:function(e,t){po.fn.init.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=$t();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=$t(),this.img.src=this.srcElement.src()):po.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())}}),Zi.Image=vo,_o=po.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()}}),Zi.Text=_o,bo=po.extend({renderPoints:function(e){var t,n=this.srcElement.paths;for(t=0;ts&&(a.push(o(t.substring(s,l))),s=l+u[0].length),l+=u[0].length):l++;return s0)&&t.preventDefault()}).on("mouseleave"+U,function(){o._hovered=!1}),o.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),W(n.animation.open,{complete:function(){o.wrapper.css({overflow:E}),o._activated=!0,o._trigger(_)}}),W(n.animation.close,{complete:function(){o._animationClose()}}),o._mousedownProxy=function(e){o._mousedown(e)},o._resizeProxy=u.mobileOS.android?function(e){setTimeout(function(){o._resize(e)},600)}:function(e){o._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+U,e.proxy(o.toggle,o))},events:[g,_,m,v],options:{name:"Popup",toggleEvent:"click",origin:x+" "+w,position:y+" "+w,anchor:T,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!=T&&e._hideDirClass(),e._closing=!1,e._trigger(v)},destroy:function(){var t,n=this,i=n.options,o=n.element.off(U);c.fn.destroy.call(n),i.toggleTarget&&e(i.toggleTarget).off(U),i.modal||(B.off(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),s.destroy(n.element.children()),o.removeData(),i.appendTo[0]===document.body&&(t=o.parent(".k-animation-container"),t[0]?t.remove():o.remove())},open:function(t,n){var i,o,r=this,a={isFixed:!isNaN(parseInt(n,10)),x:t,y:n},l=r.element,c=r.options,d=e(c.anchor),h=l[0]&&l.hasClass("km-widget");if(!r.visible()){if(c.copyAnchorStyles&&(h&&"font-size"==q[0]&&q.shift(),l.css(s.getComputedStyles(d[0],q))),l.data("animating")||r._trigger(g))return;r._activated=!1,c.modal||(B.off(r.downEvent,r._mousedownProxy).on(r.downEvent,r._mousedownProxy),r._toggleResize(!1),r._toggleResize(!0)),r.wrapper=o=s.wrap(l,c.autosize).css({overflow:S,display:"block",position:C}).attr("aria-hidden",!1),u.mobileOS.android&&o.css(V,"translatez(0)"),o.css(A),e(c.appendTo)[0]==document.body&&o.css(y,"-10000px"),r.flipped=r._position(a),i=r._openAnimation(),c.anchor!=T&&r._showDirClass(i),l.data(I,i.effects).kendoStop(!0).kendoAnimate(i).attr("aria-hidden",!1)}},_location:function(t){var n,i,o=this,r=o.element,a=o.options,l=e(a.anchor),c=r[0]&&r.hasClass("km-widget");return a.copyAnchorStyles&&(c&&"font-size"==q[0]&&q.shift(),r.css(s.getComputedStyles(l[0],q))),o.wrapper=n=s.wrap(r,a.autosize).css({overflow:S,display:"block",position:C}),u.mobileOS.android&&n.css(V,"translatez(0)"),n.css(A),e(a.appendTo)[0]==document.body&&n.css(y,"-10000px"),o._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(R)||["","down"])[1],i=F+"-"+n;t.removeClass(i).children(P).removeClass(M).removeClass(i),this.element.removeClass(F+"-"+s.directions[n].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",i=F+"-"+n;e(this.options.anchor).addClass(i).children(P).addClass(M).addClass(i),this.element.addClass(F+"-"+s.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?m:g]()},visible:function(){return this.element.is(":"+E)},close:function(n){var i,o,r,a,l=this,c=l.options;if(l.visible()){if(i=l.wrapper[0]?l.wrapper:s.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(m))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),B.off(l.downEvent,l._mousedownProxy),n?o={hide:!0,effects:{}}:(o=W(!0,{},c.animation.close),r=l.element.data(I),a=o.effects,!a&&!s.size(a)&&r&&s.size(r)&&(o.effects=r,o.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),i.css({overflow:S}).attr("aria-hidden",!0),l.element.kendoAnimate(o),n&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;u.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=u.resize;u.mobileOS.ios||u.mobileOS.android||(n+=" "+N),e&&!this.scrollableParents&&(this.scrollableParents=this._scrollableParents()),this.scrollableParents&&this.scrollableParents.length&&this.scrollableParents[t](N,this._resizeProxy),H[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,o=i.element[0],r=i.options,a=e(r.anchor)[0],l=r.toggleTarget,c=s.eventTarget(t),d=e(c).closest(".k-popup"),u=d.parent().parent(".km-shim").length;d=d[0],!u&&d&&d!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(n(o,c)||n(a,c)||l&&n(e(l)[0],c)||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,o,r,a){var s=0;return a=a||t,r!==o&&r!==b&&o!==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,o,r,a,l,c,d,g,m,v,_,b,w,k,y,x,S=this,T=S.element,E=S.wrapper,I=S.options,M=e(I.viewport),F=u.zoomLevel(),R=!!(M[0]==window&&window.innerWidth&&F<=1.02),P=e(I.anchor),z=I.origin.toLowerCase().split(" "),B=I.position.toLowerCase().split(" "),L=S.collisions,H=10002,N=0,O=document.documentElement;if(a=I.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:M.offset(),R?(l=window.innerWidth,c=window.innerHeight):(l=M.width(),c=M.height()),R&&O.scrollHeight-O.clientHeight>0&&(d=I.isRtl?-1:1,l-=d*s.support.scrollbar()),n=P.parents().filter(E.siblings()),n[0])if(o=Math.max(+n.css("zIndex"),0))H=o+10;else for(i=P.parentsUntil(n),r=i.length;N=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,o=n.drawing.util,r=o.defined,a=o.limitValue,s=o.eventCoordinates,l=n._outerWidth,c=n._outerHeight,d=e.proxy,u='
    ',h='',p=n.Class.extend({init:function(t,n){this.element=e(u),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=d(this._showEvent,this),this._surfaceLeaveHandler=d(this._surfaceLeave,this),this._mouseleaveHandler=d(this._mouseleave,this),this._mousemoveHandler=d(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",d(this._hideClick,this)),this.element.on("mouseleave"+t,d(this._tooltipLeave,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),this.element.off("mouseleave"+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 o=i.content;if(n.isFunction(o)&&(o=o({element:t,target:e})),o)return this.content.html(o),!0},_position:function(e,t,n,i){var o,r=t.position,l=t.offset||0,c=this.surface,d=c._instance._elementOffset(),u=c.getSize(),h=c._instance._offset,p=e.bbox(),f=n.width,g=n.height,m=0,v=0;return p.origin.translate(d.left,d.top),h&&p.origin.translate(-h.x,-h.y),"cursor"==r&&i?(o=s(i),m=o.x-f/2,v=o.y-g-l):"left"==r?(m=p.origin.x-f-l,v=p.center().y-g/2):"right"==r?(m=p.bottomRight().x+l,v=p.center().y-g/2):"bottom"==r?(m=p.center().x-f/2,v=p.bottomRight().y+l):(m=p.center().x-f/2,v=p.origin.y-g-l),{left:a(m,d.left,d.left+u.width),top:a(v,d.top,d.top+u.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,o){var r,a,s=this._current;clearTimeout(this._timeout),s&&(s.shape===t&&n.shared||s.target===e)||(clearTimeout(this._showTimeout),r=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:t,target:e,popup:r})&&this._updateContent(e,t,n)&&(this._autoHide(n),a=this._measure(n),r.visible()&&r.close(!0),this._current={options:n,elementSize:a,shape:t,target:e,position:this._position(n.shared?t:e,n,a,i)},o?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,o=this.getPopup();return this.element.css({width:"auto",height:"auto"}),i=o.visible(),i||o.wrapper.show(),this.element.css({width:r(e.width)?e.width:"auto",height:r(e.height)?e.height:"auto"}),t=l(this.element),n=c(this.element),i||o.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},_tooltipLeave:function(){var e=this,t=e._current;t&&t.options.autoHide&&(e._timeout=setTimeout(function(){e.hide()},t.options.hideDelay||0))}});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,o=i.drawing,r=o.Surface,a=i.ui.Widget,s=i.deepExtend,l=e.proxy;i.support.svg=r.support.svg,i.support.canvas=r.support.canvas,n=a.extend({init:function(e,n){a.fn.init.call(this,e,{}),this.options=s({},this.options,n),this._instance=r.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 o.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||{},o={};for(n in i)e.extend(!0,o,i[n].resolve(t));return o}function i(e){return e.replace(/&/g,"&").replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">")}function o(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function r(t){return e(e.parseHTML?e.parseHTML(t):t)}function a(t,n){var i,o,r,a,s=e();for(r=0,a=t.length;r #=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!(I(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()||A(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,r=parseFloat(e.val()),a=o(i);return a?(t=Math.pow(10,a),Math.floor((r-n)*t)%(i*t)/Math.pow(100,a)===0):(r-n)%i===0}return!0},email:function(e){return E(e,"[type=email],["+l.attr("type")+"=email]",g)},url:function(e){return E(e,"[type=url],["+l.attr("type")+"=url]",m)},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(){c.fn.destroy.call(this),this.element.off(d)},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(S)},_attachEvents:function(){var t=this;t.element.is(y)&&t.element.on("submit"+d,D(t._submit,t)),t.options.validateOnBlur&&(t.element.is(v)?(t.element.on(w+d,function(){t._checkElement(t.element)}),t.element.is(_)&&t.element.on("click"+d,function(){t._checkElement(t.element)})):(t.element.on(w+d,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+d,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,n,i,o=!1,r=this.value();if(this._errors={},this.element.is(v))o=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(_,{event:e})||e.preventDefault()},_start:function(t){var n,o,r=this,a=0,s=r.filter,l=i(t),c=l.length,d=t.which;if(!(d&&d>1||r._maxTouchesReached()))for(P.current=null,r.currentTarget=t.currentTarget,r.stopPropagation&&t.stopPropagation();a1){for(n=0;nthis.max||eo,e||t.trigger(P,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(P,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(P)}}),$=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,o=t.movable,r=o[i]+e;n.enabled&&((rn.max&&e>0)&&(e*=t.resistance),o.translateAxis(i,e),t.trigger(P,t))}}),Y=y.extend({init:function(t){var n,i,o,r,a=this;D(a,{elastic:!0},t),o=a.elastic?.5:0,r=a.movable,a.x=n=new $({axis:"x",dimension:a.dimensions.x,resistance:o,movable:r}),a.y=i=new $({axis:"y",dimension:a.dimensions.y,resistance:o,movable:r}),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,o,s,l=a.gesture,c=l.center,d=e.center,u=e.distance/l.distance,h=a.dimensions.minScale,p=a.dimensions.maxScale;r.scale<=h&&u<1&&(u+=.8*(1-u)),r.scale*u>=p&&(u=p/r.scale),o=r.x+a.offset.left,s=r.y+a.offset.top,t={x:(o-c.x)*u+d.x-o,y:(s-c.y)*u+d.y-s},r.scaleWith(u),n.dragMove(t.x),i.dragMove(t.y),a.dimensions.rescale(r.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()}})}}),K=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[K]=e,t._saveCoordinates(e),t.trigger(P))},_saveCoordinates:function(e){this.coordinates=e}}),g=x.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in I?I[n].push(i):I[n]=[i]},events:[V,W,U],options:{name:"DropTarget",group:"default"},destroy:function(){s(I,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))}}),g.destroyGroup=function(e){var t,n=I[e]||M[e];if(n){for(t=0;tk.height(),n=w.body.scrollWidth>k.width()):(t=l.offsetHeight<=l.scrollHeight,n=l.offsetWidth<=l.scrollWidth),o=l.scrollTop+d.y,r=t&&o>0&&o0&&at.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:m,ease:p.easeOutExpo})}}),F=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 g(this.offset.y)');s(n,t,{element:o,elementSize:0,movable:new d(o),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(T,a(n.refresh,n)),n.container.append(o),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,o=e.scrollMovable,r=i/n.total,a=Math.round(-o[t]*r),s=Math.round(i*r);r>=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})}}),P=l.extend({init:function(i,o){var r,c,p,f,m,v,_,b,w,k=this;return l.fn.init.call(k,i,o),i=k.element,(k._native=k.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('
    '),s(k,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('
    ').prepend('
    '),r=i.children().eq(1),c=new n.TapCapture(i),p=new d(r),f=new h({element:r,container:i,forcedEnabled:k.options.zoom}),m=this.options.avoidScrolling,v=new n.UserEvents(i,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:k.options.zoom,supportDoubleTap:k.options.supportDoubleTap,start:function(t){f.refresh();var n=g(t.x.velocity),i=g(t.y.velocity),o=2*n>=i,r=e.contains(k.fixedContainer[0],t.event.target),a=2*i>=n;!r&&!m(t)&&k.enabled&&(f.x.enabled&&o||f.y.enabled&&a)?v.capture():v.cancel()}}),_=new u({movable:p,dimensions:f,userEvents:v,elastic:k.options.elastic}),b=new I({movable:p,dimensions:f,userEvents:v,tapCapture:c}),w=new F({moveTo:function(e){k.scrollTo(e.x,e.y)}}),p.bind(T,function(){k.scrollTop=-p.y,k.scrollLeft=-p.x,k.trigger(A,{scrollTop:k.scrollTop,scrollLeft:k.scrollLeft})}),k.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",a(this,"_wheelScroll")),s(k,{movable:p,dimensions:f,zoomSnapBack:b,animatedScroller:w,userEvents:v,pane:_,tapCapture:c,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),k._initAxis("x"),k._initAxis("y"),k._wheelEnd=function(){k._wheel=!1,k.userEvents.end(0,k._wheelY)},f.refresh(),k.options.pullToRefresh&&k._initPullToRefresh(),t)},_wheelScroll:function(e){if(!e.ctrlKey){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:[S,A,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(g(e)),this.scrollElement.scrollTop(g(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,o;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},o={x:e,y:t},this.animatedScroller.setCoordinates(i,o),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/k>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],o=t.tapCapture,r=t.pane[e],a=new R({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(T,function(){a.refresh()}),r.bind(T,function(){a.show()}),t[e+"inertia"]=new M({axis:e,paneAxis:r,movable:n,tapCapture:o,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})}})}});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.groupable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=n._outerWidth,r=n.attr,a=e.extend,s=e.each,l=e.proxy,c=!1,d="dir",u="field",h="title",p="asc",f="desc",g="group-sort",m=".kendoGroupable",v="change",_=n.template('',{useWithBlock:!1}),b=function(t){var i=t.attr(n.attr("title"));return i&&(i=n.htmlEncode(i)),e('
    ').html(i||t.attr(n.attr("field"))).prepend('')},w=e('
    '),k=i.extend({init:function(s,u){var h,_,k=this,y=n.guid(),x=l(k._intializePositions,k),C=k._dropCuePositions=[];i.fn.init.call(k,s,u),c=n.support.isRtl(s),_=c?"right":"left",k.draggable=h=k.options.draggable||new n.ui.Draggable(k.element,{filter:k.options.draggableElements,hint:b,group:y}),k.groupContainer=e(k.options.groupContainer,k.element).kendoDropTarget({group:h.options.group,dragenter:function(e){k._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus"),w.css(_,0).appendTo(k.groupContainer))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"),w.remove()},drop:function(t){var i,o=t.draggable.currentTarget,r=o.attr(n.attr("field")),s=o.attr(n.attr("title")),l=k.indicator(r),d=k._dropCuePositions,u=d[d.length-1],h=a({},k.options.sort,o.data(g)),p=h.dir;(o.hasClass("k-group-indicator")||k._canDrag(o))&&(u?(i=k._dropCuePosition(n.getOffset(w).left+parseInt(u.element.css("marginLeft"),10)*(c?-1:1)+parseInt(u.element.css("marginRight"),10)),i&&k._canDrop(e(l),i.element,i.left)&&(i.before?i.element.before(l||k.buildIndicator(r,s,p)):i.element.after(l||k.buildIndicator(r,s,p)),k._setIndicatorSortOptions(r,h),k._change())):(k.groupContainer.empty(),k.groupContainer.append(k.buildIndicator(r,s,p)),k._setIndicatorSortOptions(r,h),k._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:b,group:h.options.group,dragcancel:l(k._dragCancel,k),dragstart:function(e){var t=e.currentTarget,n=parseInt(t.css("marginLeft"),10),i=t.position(),r=c?i.left-n:i.left+o(t);x(),w.css("left",r).appendTo(k.groupContainer),this.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")},dragend:function(){k._dragEnd(this)},drag:l(k._drag,k)}).on("click"+m,".k-button",function(t){t.preventDefault(),k._removeIndicator(e(this).parent())}).on("click"+m,".k-link",function(t){var n=e(this).parent(),i=n.attr(r(d))===p?f:p;n.attr(r(d),i),k._change(),t.preventDefault()}),h.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){k._dragEnd(this)},dragcancel:l(k._dragCancel,k),dragstart:function(e){var n,i,r;return k.options.allowDrag||k._canDrag(e.currentTarget)?(x(),C.length?(n=C[C.length-1].element,i=parseInt(n.css("marginRight"),10),r=n.position().left+o(n)+i):r=0,t):(e.preventDefault(),t)},drag:l(k._drag,k)}),k.dataSource=k.options.dataSource,k.dataSource&&k._refreshHandler?k.dataSource.unbind(v,k._refreshHandler):k._refreshHandler=l(k.refresh,k),k.dataSource&&(k.dataSource.bind("change",k._refreshHandler),k.refresh())},refresh:function(){var t,n=this,i=n.dataSource,o=i.group()||[],l=r(u),c=r(h);n.groupContainer&&(n.groupContainer.empty(),s(o,function(i,o){var r=o.field,s=o.dir,d=n.element.find(n.options.filter).filter(function(){return e(this).attr(l)===r});t=n.buildIndicator(r,d.attr(c),s),n.groupContainer.append(t),n._setIndicatorSortOptions(r,a({},n.options.sort,{dir:s,compare:o.compare}))})),n._invalidateGroupContainer()},destroy:function(){var e=this;i.fn.destroy.call(e),e.groupContainer.off(m),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"},sort:{dir:p,compare:null}},indicator:function(t){var i=e(".k-group-indicator",this.groupContainer);return e.grep(i,function(i){return e(i).attr(n.attr("field"))===t})[0]},buildIndicator:function(e,t,i){var o=this,r=_({ns:n.ns,field:e.replace(/"/g,"'"),title:t,dir:i||(o.options.sort||{}).dir||p});return r},_setIndicatorSortOptions:function(t,n){var i=e(this.indicator(t));i.data(g,n)},aggregates:function(){var t,i,o,r=this;return r.element.find(r.options.filter).map(function(){var r=e(this),a=r.attr(n.attr("aggregates")),s=r.attr(n.attr("field"));if(a&&""!==a)for(t=a.split(","),a=[],i=0,o=t.length;i=r&&!c||te.right})[0],t&&(t={left:c?t.element.position().left+o(t.element)+s:t.element.position().left-a,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&w.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(n.attr("field"));return"false"!=e.attr(n.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next(),o=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!c&&n>i.position().left||c&&n
    '),t.find(u.options.filter).kendoDropTarget({group:u.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,d.inSameContainer&&!d.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+=o(t)),h.reorderDropCue.css({height:r(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"}))}}),u.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=o(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(),o=!1;if(!t)return!1;for(;!o&&i.length>0;)e=i.pop(),o=n!==e&&t({source:n,target:e,sourceIndex:this._index(n),targetIndex:this._index(e)});return!o},_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(d)}(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,o=i.Widget,r=e.proxy,a=n.isFunction,s=e.extend,l="horizontal",c="vertical",d="start",u="resize",h="resizeend",p=o.extend({init:function(e,t){var n=this;o.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=c?l:c,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:r(n._resize,n),dragcancel:r(n._cancel,n),dragstart:r(n._start,n),dragend:r(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[u,h,d],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,o=n.options.max;return a(o)?o(e):o!==t?n._initialElementPosition+o-i:o},_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,o=e(t.currentTarget);n._initialElementPosition=o.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=a(i)?e(i(o)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(d,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",o.css("cursor"))},_resize:function(e){var n,i=this,o=i._maxPosition,r=i._minPosition,a=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=r!==t?Math.max(r,a):a,i.position=n=o!==t?Math.min(o,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==o||n==r).css(i._position,n),i.resizing=!0,i.trigger(u,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;o.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,o=n.targetPosition,r=n.position;r===t&&(r=o[i]),o[i]=r+e,n.userEvents.move(o.left,o.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 o(e){return e.clone().removeAttr("id").css("visibility","hidden")}var r=window.kendo,a=r.ui.Widget,s=r._outerWidth,l=r._outerHeight,c="start",d="beforeMove",u="move",h="end",p="change",f="cancel",g="sort",m="remove",v="receive",_=">*",b=-1,w=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n.options.placeholder||(n.options.placeholder=o),n.options.hint||(n.options.hint=i),n.draggable=n._createDraggable()},events:[c,d,u,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 r.ui.Draggable(n,{filter:i.filter,hint:r.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,o=this.options.handler,a=this.options.placeholder,s=this.placeholder=e(r.isFunction(a)?a.call(this,n):a);i&&n.is(i)?t.preventDefault():o&&!e(t.initialTarget).is(o)?t.preventDefault():this.trigger(c,{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,o,r,a,s,l=this.draggedElement,c=this._findTarget(n),d={left:n.x.location,top:n.y.location},u={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,d,u[h],f),t;if(c){if(i=this._getElementCenter(c.element),o={left:Math.round(d.left-i.left),top:Math.round(d.top-i.top)},e.extend(f,{target:c.element}),c.appendToBottom)return this._movePlaceholder(c,null,f),t;if(c.appendAfterHidden&&this._movePlaceholder(c,"next",f),this._isFloating(c.element)?u.x<0&&p||!p&&o.left<0?r="prev":(u.x>0&&p||!p&&o.left>0)&&(r="next"):u.y<0&&p||!p&&o.top<0?r="prev":(u.y>0&&p||!p&&o.top>0)&&(r="next"),r){for(s="prev"===r?jQuery.fn.prev:jQuery.fn.next,a=s.call(c.element);a.length&&!a.is(":visible");)a=s.call(a);a[0]!=this.placeholder[0]&&this._movePlaceholder(c,r,f)}}},_dragend:function(n){var i,o,r,a,s=this.placeholder,l=this.draggedElement,c=this.indexOf(l),d=this.indexOf(s),u=this.options.connectWith;return this._resetCursor(),r={action:g,item:l,oldIndex:c,newIndex:d,draggableEvent:n},d>=0?o=this.trigger(h,r):(i=s.parents(u).getKendoSortable(),r.action=m,a=e.extend({},r,{action:v,oldIndex:b,newIndex:i.indexOf(s)}),o=!(!this.trigger(h,r)&&!i.trigger(h,a))),o||d===c?(this._cancel(),t):(s.replaceWith(l),l.show(),this.draggable.dropped=!0,r={action:this.indexOf(l)!=b?g:m,item:l,oldIndex:c,newIndex:this.indexOf(l),draggableEvent:n},this.trigger(p,r),i&&(a=e.extend({},r,{action:v,oldIndex:b,newIndex:i.indexOf(l)}),i.trigger(p,a)),t)},_findTarget:function(n){var i,o,r=this._findElementUnderCursor(n),a=this.options.connectWith;return e.contains(this.element[0],r)?(i=this.items(),o=i.filter(r)[0]||i.has(r)[0],o?{element:e(o),sortable:this}:null):this.element[0]==r&&this._isEmpty()?{element:this.element,sortable:this,appendToBottom:!0}:this.element[0]==r&&this._isLastHidden()?(o=this.items().eq(0),{element:o,sortable:this,appendAfterHidden:!0}):a?this._searchConnectedTargets(r,n):t},_findElementUnderCursor:function(e){var t=r.elementUnderCursor(e),i=e.sender;return n(i.hint[0],t)&&(i.hint.hide(),t=r.elementUnderCursor(e),t||(t=r.elementUnderCursor(e)),i.hint.show()),t},_searchConnectedTargets:function(t,n){var i,o,r,a,s=e(this.options.connectWith);for(a=0;a0&&a-r>0&&this._movePlaceholder({element:s,sortable:this},"next",o))},_movePlaceholder:function(e,t,n){var i=this.placeholder;e.sortable.trigger(d,n)||(t?"prev"===t?e.element.before(i):"next"===t&&e.element.after(i):e.element.append(i),e.sortable.trigger(u,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?r.getOffset(e):null;return t&&(t.top+=l(e)/2,t.left+=s(e)/2),t},_isFloating:function(e){var t=/left|right/.test(e.css("float")),n=/inline|table-cell/.test(e.css("display")),i=/flex/.test(e.parent().css("display"))&&(/row|row-reverse/.test(e.parent().css("flex-direction"))||!e.parent().css("flex-direction"));return t||n||i},_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")}});r.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.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=o.getOffset(e),i=t.left+t.width,r=t.top+t.height;return n.right=n.left+o._outerWidth(e),n.bottom=n.top+o._outerHeight(e),!(n.left>i||n.rightr||n.bottomspan,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up,label.k-checkbox-label.k-no-text,.k-icon.k-i-collapse,.k-icon.k-i-expand,span.k-numeric-wrap",v=o.support.browser.msie,_=!1;!function(e){!function(){e('
    ').on("click",">*",function(){_=!0}).find("span").trigger("click").end().off()}()}(e),i=r.extend({init:function(t,n){var i,s=this;r.fn.init.call(s,t,n),s._marquee=e("
    "),s._lastActive=null,s.element.addClass(u),s.relatedTarget=s.options.relatedTarget,i=s.options.multiple,this.options.aria&&i&&s.element.attr("aria-multiselectable",!0),s.userEvents=new o.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(_?"":"."+u+" ")+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,f],options:{name:"Selectable",filter:">*",inputSelectors:m,multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,o=!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+"."+g)).removeClass(g),t=n.element.find(n.options.filter+"."+d),t=t.add(n.relatedTarget(t)),n.value(t,e),n._lastActive=n._downTarget,n._items=null},_invalidateSelectables:function(e,t){var i,o,r,a,s=this._downTarget[0],l=this._items;for(i=0,o=l.length;i0?e[0]:t.element.find(t.options.filter)[0])},_selectElement:function(t,n){var i=e(t),o=!n&&this._notify("select",{element:t});i.removeClass(d),o||(i.addClass(c),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){if(!this.trigger(f,{element:e}))return e.removeClass(c),this.options.aria&&e.attr(l,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!v||v&&!e(o._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+"."+c);this._unselect(e)},selectRange:function(t,n,i){var o,r,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&&(r=t,t=n,n=r),s.options.useAllItems||(n+=s.element.length-1),o=t;o<=n;o++)s._selectElement(a[o]);s._notify(h,i)},destroy:function(){var e=this;r.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}},o.ui.plugin(i)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("chat/messageBox.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,o=e.extend,r=e.proxy,a=".",s=".kendoChat",l=n.keys,c='',d=' ',u={input:"k-input",button:"k-button",buttonFlat:"k-flat",buttonIcon:"k-button-icon",buttonSend:"k-button-send",buttonToggle:"k-button-toggle",iconAdd:"k-icon k-i-add",hidden:"k-hidden"},h=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._wrapper(),this._attachEvents(),this._typing=!1},events:[],options:{messages:{placeholder:"Type a message..."}},destroy:function(){i.fn.destroy.call(this),this.input&&(this.input.off(s),this.input.remove(),this.input=null),this.element.off(s),this.element.empty()},_wrapper:function(){var t=h.styles,i=this.options,o=i.messages,r="inputId_"+n.guid();e("
    ";this.wrapper=this.element.addClass(e.wrapper).append(o),t.toolbar&&t.toolbar.buttons&&t.toolbar.buttons.length&&this.wrapper.find(r+e.toolbarBoxWrapper).show(),n&&this.wrapper.height(n),i&&this.wrapper.css("max-width",i)},_view:function(){var e=this,t=s.styles,i=o(!0,{},this.options),a=this.wrapper.find(r+t.viewWrapper+"");this.view=new n.chat.ChatView(a,i),this.view.bind("actionClick",function(t){e.trigger("actionClick",t),e.postMessage(t.text)})},_messageBox:function(){var e=this,t=s.styles,i=o(!0,{},this.options),a=this.wrapper.find(r+t.messageBoxWrapper+"");this.messageBox=new n.chat.ChatMessageBox(a,i),this.messageBox.bind("typingStart",function(t){e.trigger("typingStart",t)}).bind("typingEnd",function(t){e.trigger("typingEnd",t)}).bind("sendMessage",function(t){e.trigger("sendMessage",t),e.postMessage(t.text)}).bind("toggleToolbar",function(){e.toggleToolbar()})},_toolbar:function(){var e=this,i=s.styles,a=o(!0,{},e.options),l=e.wrapper.find(r+i.toolbarBoxWrapper+"");a.toolbar.scrollable===t&&(this.options.toolbar.scrollable=a.toolbar.scrollable=!0),a.toolbar.toggleable===t&&(this.options.toolbar.toggleable=a.toolbar.toggleable=!1),e.toolbar=new n.chat.ChatToolBar(l,a),e.toolbar.bind("click",function(t){e.trigger("toolClick",{sender:e,name:t.name,button:t.button,messageBox:e.messageBox.input[0],originalEvent:t.originalEvent})})},postMessage:function(e){var t=o(!0,{},{text:e,type:"message",timestamp:new Date,from:this.getUser()});this.trigger("post",t),this.renderMessage(t,t.from)},renderMessage:function(e,t){this.view.renderMessage(e,t)},renderSuggestedActions:function(e){this.view.renderSuggestedActions(e)},renderAttachments:function(e,t){this.view.renderAttachments(e,t)},toggleToolbar:function(e){this.toolbar.toggle(e)},renderUserTypingIndicator:function(e){this.view._renderTypingIndicator(e)},clearUserTypingIndicator:function(e){this.view._removeTypingParticipant(e)},removeTypingIndicator:function(){this.view._removeTypingIndicator()}});n.ui.plugin(s),o(!0,s,{styles:a})}(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,o=e.proxy,r=n.keys,a="click",s=n.support.mousedown,l=n.support.mouseup,c="k-button",d="k-button-icon",u="k-button-icontext",h=".kendoButton",p="disabled",f="k-state-disabled",g="k-state-focused",m="k-state-active",v=i.extend({init:function(e,t){var r=this;i.fn.init.call(r,e,t),e=r.wrapper=r.element,t=r.options,e.addClass(c).attr("role","button"),t.enable=t.enable&&!e.attr(p),r.enable(t.enable),t.enable&&r._tabindex(),r.iconElement(),e.on(a+h,o(r._click,r)).on("focus"+h,o(r._focus,r)).on("blur"+h,o(r._blur,r)).on("keydown"+h,o(r._keydown,r)).on("keyup"+h,o(r._removeActive,r)).on(s+h,o(r._addActive,r)).on(l+h,o(r._removeActive,r)),n.notify(r)},destroy:function(){var e=this;e.wrapper.off(h),i.fn.destroy.call(e)},events:[a],options:{name:"Button",icon:"",iconClass:"",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(g)},_blur:function(){var e=this;e.element.removeClass(g),setTimeout(function(){e.element.removeClass(m)})},_keydown:function(e){var t=this;e.keyCode!=r.ENTER&&e.keyCode!=r.SPACEBAR||(t._addActive(),t._isNativeButton()||(e.keyCode==r.SPACEBAR&&e.preventDefault(),t._click(e)))},_removeActive:function(){this.element.removeClass(m)},_addActive:function(){this.options.enable&&this.element.addClass(m)},iconElement:function(){var t,n,i,o=this,r=o.element,a=o.options,s=a.icon,l=a.iconClass,c=a.spriteCssClass,h=a.imageUrl;(c||h||s||l)&&(i=!0,r.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)}),r.addClass(i?d:u)),h?(n=r.children("img.k-image").first(),n[0]||(n=e('icon').prependTo(r)),n.attr("src",h)):s||l?(t=r.children("span.k-icon").first(),t[0]||(t=e("").prependTo(r)),t.attr("class",s?"k-icon k-i-"+s:l)):c&&(t=r.children("span.k-sprite").first(),t[0]||(t=e('').prependTo(r)),t.addClass(c))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(f,!e).attr("aria-disabled",!e).attr(p,!e),e&&n._tabindex();try{i.blur()}catch(o){}}});n.ui.plugin(v)}(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,o){n!==t&&e(''+i.htmlEncode(n)+"").appendTo(o)}var i=window.kendo,o=i.ui,r=o.Widget,a=i.keys,s=e.proxy,l=i.template,c=".kendoButtonGroup",d="k-widget",u="k-button-group",h="k-button",p="k-button-icontext",f="k-button-icon",g="k-state-active",m="k-state-focused",v="k-state-disabled",_="select",b="click",w="keydown",k="focus",y="blur",x="mousedown",C={item:l('#= icon(iconClass) ##= image(item) ##= text #'),image:l('icon'),icon:l(''),empty:l("")},S=r.extend({init:function(t,n){var i=this;r.fn.init.call(i,t,n),i.wrapper=i.element,i.options.items&&i._renderItems(i.options.items),i.selectedIndices=[],i.element.addClass(d+" "+u).attr("role","group").attr("tabindex",i.element.attr("tabindex")||"0").children().each(function(){var t=e(this);i._updateClasses.bind(i)(t)}),i._enable=!0,i.options.enable||(i._enable=!1,i.element.attr("aria-disabled",!0).addClass(v)),i.select(i.options.index),i.element.on(b+c,"."+h,s(i._click,i)).on(k+c,s(i._focus,i)).on(w+c,s(i._keyDown,i)).on(y+c,function(){i.preventFocus=!1,i.element.find("."+h).removeClass(m)}).on(x+c,function(){i.preventFocus=!0})},events:[_],options:{name:"ButtonGroup",selection:"single",index:-1,enable:!0},current:function(){return this.element.find("."+g)},_renderItems:function(t){var n=this;t.forEach(function(t){var o=e(C.item({image:t.imageUrl?C.image:C.empty,icon:t.imageUrl||!t.iconClass&&!t.icon?C.empty:C.icon,iconClass:t.iconClass||"k-icon k-i-"+t.icon,item:t,text:t.text?t.encoded===!1?t.text:i.htmlEncode(t.text):""}));t.attributes&&o.attr(t.attributes),t.selected&&o.addClass(g),(t.iconClass||t.icon||t.imageUrl)&&o.addClass(t.text?"k-button-icontext":"k-button-icon"),o.appendTo(n.element)})},_focus:function(){var t=e(this.element);this.preventFocus||(t.find("."+g).length?t.find("."+g).first().focus().addClass(m):t.children().first().focus().addClass(m))},_keyDown:function(t){var n,o=this,r=e(o.element),s=r.find("."+h),l=r.find("."+m),c=s.index(l),d=i.support.isRtl(o.element);t.keyCode===a.LEFT&&!d||t.keyCode===a.RIGHT&&d?(l.removeClass(m),n=0===c?s.eq(s.length-1):e(s[c-1]),n.focus().addClass(m),t.preventDefault()):t.keyCode===a.LEFT&&d||t.keyCode===a.RIGHT&&!d?(l.removeClass(m),n=c+1===s.length?s.eq(0):e(s[c+1]),n.focus().addClass(m),t.preventDefault()):t.keyCode!==a.ENTER&&t.keyCode!==a.SPACEBAR||(o._select(l),t.preventDefault())},select:function(n){var i,o=this,r=-1;n!==t&&n!==-1&&(o.element.find("."+h).removeClass(m),"number"==typeof n?(r=n,n=o.element.children().eq(n)):n.nodeType&&(n=e(n),r=n.index()),"multiple"===o.options.selection?(i="true"===n.attr("aria-pressed"),n.attr("aria-pressed",!i).toggleClass(g),o.selectedIndices.indexOf(r)===-1?o.selectedIndices.push(r):o.selectedIndices.splice(o.selectedIndices.indexOf(r),1)):(o.selectedIndices=[],o.current().attr("aria-pressed",!1).removeClass(g),n.attr("aria-pressed",!0).addClass(g),o.selectedIndices.push(r)),o.trigger(_,{indices:o.selectedIndices}))},badge:function(e,o){var r,a=this.element,s=isNaN(e)?a.find(e):a.children().eq(e),l=o||0===o;if(s.length){if(r=s.children(".k-badge").eq(0),!r.length&&l)return n(i.htmlEncode(o),s),i.htmlEncode(o);if(l)r.html(i.htmlEncode(o));else if(o===!1)return r.empty().remove(),t;return r.html()}},enable:function(e){t===e&&(e=!0),this.element.attr("aria-disabled",!e).toggleClass(v,!e),this._enable=this.options.enable=e},destroy:function(){var e=this;e.element.off(c),r.fn.destroy.call(e)},_updateClasses:function(t){var o=i.attrValue(t,"icon"),r=i.attrValue(t,"badge"),a=t.find("img").addClass("k-image"),s=!0;t.attr("aria-pressed",!1).attr("role","button").addClass(h),(t.is("[disabled]")||t.hasClass(v))&&t.addClass(v).attr("aria-disabled",!0).removeAttr("disabled"),t.is("."+g)&&(t.removeClass(g),(!t.hasClass(v)&&"single"===this.options.selection||"multiple"===this.options.selection)&&this.select(t[0])),!a[0]&&o&&t.prepend(e(C.icon("k-icon k-i-"+o))),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]||o)&&t.addClass(s?f:p),(r||0===r)&&n(r,t)},_click:function(t){var n=e(t.target).closest("."+h);t.isDefaultPrevented()||this._select(n)},_select:function(e){var n=e;return this.element.find("."+h).removeClass(m),!this._enable||n.is("."+v)?(n.addClass(m),t):(this.select(e[0]),n.addClass(m),t)}});o.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.switch.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=".kendoSwitch",r=i.Widget,a=n.support,s="change",l={widget:"k-switch k-widget",container:"k-switch-container",handle:"k-switch-handle",checked:"k-switch-on",checkedLabel:"k-switch-label-on",unchecked:"k-switch-off",uncheckedLabel:"k-switch-label-off",disabled:"k-state-disabled",readonly:"k-state-readonly",active:"k-state-active"},c="disabled",d="aria-disabled",u="readonly",h="aria-readonly",p="aria-checked",f="checked",g=a.click+o,m=a.pointers?"pointerup":"touchend",v="keydown"+o,_="_label",b=e.proxy,w=n.template(''),k=n.template("#=checked##=unchecked#"),y=r.extend({init:function(t,i){var o,a=this;r.fn.init.call(a,t,i),i=a.options,t=a.element[0],t.type="checkbox",o=e(w({styles:l})),a.wrapper=a.element.wrap(o).parent(),a.wrapper.append(e(k({styles:l,checked:i.messages.checked,unchecked:i.messages.unchecked}))).addClass(t.className),a.wrapper.on(g,b(a._click,a)).on(m,b(a._touchEnd,a)).on(v,b(a._keydown,a)),a.options.enabled&&a._tabindex(),a._initSettings(),a._aria(),n.notify(a,n.ui)},setOptions:function(n){var i,o,r=this,a=n.messages;r.options=e.extend(r.options,n),a&&a.checked!==t&&(i=r.wrapper.find("."+l.checkedLabel),i.text(a.checked)),a&&a.unchecked!==t&&(o=r.wrapper.find("."+l.uncheckedLabel),o.text(a.unchecked)),n.width&&r.wrapper.css({width:n.width}),n.enabled!==t&&r.enable(n.enabled),n.readonly!==t&&r.readonly(n.readonly),r.check(n.checked)},_initSettings:function(){var e=this,t=e.element[0],n=e.options;n.width&&e.wrapper.css({width:n.width}),null===n.checked&&(n.checked=t.checked),e.check(n.checked),n.enabled=n.enabled&&!e.element.attr(c),e.enable(n.enabled),n.readonly=n.readonly||!!e.element.attr(u),e.readonly(n.readonly)},_aria:function(){var t,i=this,o=i.element,r=i.wrapper,a=o.attr("id"),s=e('label[for="'+a+'"]'),l=o.attr("aria-label"),c=o.attr("aria-labelledby");l?r.attr("aria-label",l):c?r.attr("aria-labelledby",c):s.length&&(t=s.attr("id"),t||(t=(a||n.guid())+_,s.attr("id",t)),r.attr("aria-labelledby",t))},events:[s],options:{name:"Switch",messages:{checked:"On",unchecked:"Off"},width:null,checked:null,enabled:!0,readonly:!1},check:function(e){var n=this,i=n.element[0];return e===t?i.checked:(i.checked!==e&&(n.options.checked=i.checked=e),n.wrapper.attr(p,e).toggleClass(l.checked,e).toggleClass(l.unchecked,!e),e?n.element.attr(f,f):n.element.removeAttr(f),t)},value:function(e){return"string"==typeof e&&(e="true"===e),this.check.apply(this,[e])},destroy:function(){r.fn.destroy.call(this),this.wrapper.off(o)},toggle:function(){var e=this;e.check(!e.element[0].checked)},enable:function(e){var n=this.element,i=this.wrapper;t===e&&(e=!0),this.options.enabled=e,e?(n.removeAttr(c),i.removeAttr(d)):(n.attr(c,c),i.attr(d,!0)),i.toggleClass(l.disabled,!e)},readonly:function(e){var n=this,i=n.element,o=n.wrapper;t===e&&(e=!0),n.options.readonly=e,e?(i.attr(u,!0),o.attr(h,!0)):(i.removeAttr(u),o.removeAttr(h)),o.toggleClass(l.readonly,e)},_check:function(){var e=this,n=e.element[0].checked=!e.element[0].checked;return e.wrapper.focus(),!e.options.enabled||e.options.readonly||e.trigger(s,{checked:n})?(e.element[0].checked=!n,t):(e.check(n),t)},_keydown:function(e){e.keyCode===n.keys.SPACEBAR&&(this._check(),e.preventDefault())},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_click:function(e){this._isTouch(e)||1!==e.which||this._check()},_touchEnd:function(e){this._isTouch(e)&&(this._check(),e.preventDefault())}});i.plugin(y)}(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,o){return e({idx:t,text:n,ns:c.ns,numeric:i,title:o||""})}function i(e,t,n){return T({className:e.substring(1),text:t,wrapClassName:n||""})}function o(e,t,n,i){e.find(t).parent().attr(c.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function r(e,t){o(e,p,1,t<=1)}function a(e,t){o(e,g,Math.max(1,t-1),t<=1)}function s(e,t,n){o(e,m,Math.min(n,t+1),t>=n)}function l(e,t,n){o(e,f,n,t>=n)}var c=window.kendo,d=c.ui,u=d.Widget,h=e.proxy,p=".k-i-arrow-end-left",f=".k-i-arrow-end-right",g=".k-i-arrow-60-left",m=".k-i-arrow-60-right",v="k-pager-lg k-pager-md k-pager-sm",_="change",b=".kendoPager",w="click",k="keydown",y="disabled",x="down",C=e(document.documentElement),S=Number.MAX_VALUE,T=c.template(''),D=u.extend({init:function(t,n){var o,d,v,y,C=this,S=null;u.fn.init.call(C,t,n),n=C.options,C._createDataSource(n),C.linkTemplate=c.template(C.options.linkTemplate),C.selectTemplate=c.template(C.options.selectTemplate),C.currentPageTemplate=c.template(C.options.currentPageTemplate),o=C.page(),d=C.totalPages(),C._refreshHandler=h(C.refresh,C),C.dataSource.bind(_,C._refreshHandler),C.downEvent=c.applyEventMap(x,c.guid()),n.previousNext&&(C.element.find(p).length||(C.element.append(i(p,n.messages.first,"k-pager-first")),r(C.element,o,d)),C.element.find(g).length||(C.element.append(i(g,n.messages.previous)),a(C.element,o,d))),n.numeric&&(C.list=C.element.find(".k-pager-numbers"),C.list.length||(C.list=e('
      ').appendTo(C.element)),n.dataSource&&!n.dataSource.total()&&C.list.empty().append(C.currentPageTemplate({text:0})).append(C.selectTemplate({text:0})),C.list.wrap('
      ')),n.input&&(C.element.find(".k-pager-input").length||C.element.append(''+n.messages.page+''+c.format(n.messages.of,d)+""),C.element.on(k+b,".k-pager-input input",h(C._keydown,C))),n.previousNext&&(C.element.find(m).length||(C.element.append(i(m,n.messages.next)),s(C.element,o,d)),C.element.find(f).length||(C.element.append(i(f,n.messages.last,"k-pager-last")),l(C.element,o,d))),n.pageSizes&&(C.element.find(".k-pager-sizes").length||(v=n.pageSizes.length?n.pageSizes:["all",5,10,20],y=e.map(v,function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"":""}),e(''+c.format(_.messages.of,x)).find("input").val(m).attr(y,k<1).toggleClass("k-state-disabled",k<1),_.previousNext&&(r(f.element,m,x),a(f.element,m,x),s(f.element,m,x),l(f.element,m,x)),_.pageSizes&&(u=f.element.find(".k-pager-sizes option[value='all']").length>0,h=u&&(b===this.dataSource.total()||b==S),p=b,h&&(b="all",p=_.messages.allPages),f.element.find(".k-pager-sizes select").val(b).attr("aria-label",b).filter("["+c.attr("role")+"=dropdownlist]").kendoDropDownList("value",b).kendoDropDownList("text",p))}},_collapsedTotal:function(){return this.dataSource.total()},_keydown:function(e){if(e.keyCode===c.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 n=e.currentTarget.value,i=parseInt(n,10),o=this.dataSource;isNaN(i)?"all"==(n+"").toLowerCase()&&(o._pageSize=t,o._take=t,o._skip=0,o.fetch()):o.pageSize(i)},_toggleActive:function(){var t=this;t.list.hasClass("k-state-expanded")?C.unbind(t.downEvent,e.proxy(t._hideList,t)):C.bind(t.downEvent,e.proxy(t._hideList,t)),t.list.toggleClass("k-state-expanded")},_hideList:function(t){var n=this,i=c.eventTarget(t);e.contains(n.list[0],i)||(C.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(parseInt(n.attr(c.attr("page")),10))},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?(this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(_,{index:e})),t):this.dataSource.total()>0?this.dataSource.page():0},_getWidthSizeClass:function(e){var t=this,n=v.split(" ");return t.options.responsive?e<=480?n[2]:e<=640?n[1]:e<=1024?n[0]:null:null}});d.plugin(D)}(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,o=e.proxy,r=e.extend,a=window.setTimeout,s="click",l="show",c="hide",d="k-notification",u=".k-notification-wrap .k-i-close",h="k-hiding",p="info",f="success",g="warning",m="error",v="top",_="left",b="bottom",w="right",k="up",y=".kendoNotification",x='
      ',C='
      #=content#
      ',S=C.replace("#=content#","#:content#"),T=i.extend({init:function(t,o){var r=this;i.fn.init.call(r,t,o),o=r.options,o.appendTo&&e(o.appendTo).is(t)||r.element.hide(),r._compileTemplates(o.templates),r._guid="_"+n.guid(),r._isRtl=n.support.isRtl(t),r._compileStacking(o.stacking,o.position.top,o.position.left),n.notify(r)},events:[l,c],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,o=n.template;i._compiled={},e.each(t,function(t,n){i._compiled[n.type]=o(n.template||e("#"+n.templateId).html())}),i._defaultCompiled=o(C),i._safeCompiled=o(S)},_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,o,r=this,a={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},s=null!==n?_:w;switch(e){case"down":i=b+" "+s,o=v+" "+s,delete a.paddingBottom;break;case w:i=v+" "+w,o=v+" "+_,delete a.paddingRight;break;case _:i=v+" "+_,o=v+" "+w,delete a.paddingLeft;break;case k:i=v+" "+s,o=b+" "+s,delete a.paddingTop;break;default:null!==t?(i=b+" "+s,o=v+" "+s,delete a.paddingBottom):(i=v+" "+s,o=b+" "+s,delete a.paddingTop)}r._popupOrigin=i,r._popupPosition=o,r._popupPaddings=a},_attachPopupEvents:function(e,t){function n(e){e.on(s+y,function(){o._hidePopup(t)})}var i,o=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?t.bind("activate",function(){l?a(function(){n(t.element)},r):n(t.element)}):e.button&&(i=t.element.find(u),l?a(function(){n(i)},r):n(i))},_showPopup:function(t,i){var o,s,l=this,c=i.autoHideAfter,d=i.position.left,p=i.position.top;s=e("."+l._guid+":not(."+h+")").last(),o=new n.ui.Popup(t,{anchor:s[0]?s:document.body,origin:l._popupOrigin,position:l._popupPosition,animation:i.animation,copyAnchorStyles:!1,modal:!0,collision:"",isRtl:l._isRtl,close:function(){l._triggerHide(this.element)},deactivate:function(e){e.sender.element.off(y),e.sender.element.find(u).off(y),e.sender.destroy()}}),l._attachPopupEvents(i,o),t.removeClass("k-group k-reset"),s[0]?o.open():(null===d&&(d=e(window).width()-t.outerWidth()-i.position.right),null===p&&(p=e(window).height()-t.outerHeight()-i.position.bottom),o.open(d,p)),o.wrapper.addClass(l._guid).css(r({margin:0,zIndex:10050},l._popupPaddings)),i.position.pinned?(o.wrapper.css("position","fixed"),s[0]&&l._togglePin(o.wrapper,!0)):s[0]||l._togglePin(o.wrapper,!1),c>0&&a(function(){l._hidePopup(o)},c)},_hidePopup:function(e){e.wrapper.addClass(h),e.close()},_togglePin:function(t,n){var i=e(window),o=n?-1:1;t.css({top:parseInt(t.css(v),10)+o*i.scrollTop(),left:parseInt(t.css(_),10)+o*i.scrollLeft() })},_attachStaticEvents:function(e,t){function n(e){e.on(s+y,o(i._hideStatic,i,t))}var i=this,r=e.allowHideAfter,l=!isNaN(r)&&r>0;e.hideOnClick?l?a(function(){n(t)},r):n(t):e.button&&(l?a(function(){n(t.find(u))},r):n(t.find(u)))},_showStatic:function(t,n){var i,o=this,r=n.autoHideAfter,s=n.animation,l=n.stacking==k||n.stacking==_?"prependTo":"appendTo";t.removeClass("k-popup").addClass(o._guid)[l](n.appendTo).hide().kendoAnimate(s.open||!1),i=o.getNotifications(),i.each(function(t,i){o._attachStaticEvents(n,e(i)),r>0&&a(function(){o._hideStatic(e(i))},r)})},_hideStatic:function(e){e.kendoAnimate(r(this.options.animation.close||!1,{complete:function(){e.off(y).find(u).off(y),e.remove()}})),this._triggerHide(e)},_triggerHide:function(e){this.trigger(c,{element:e}),this.angular("cleanup",function(){return{elements:e}})},show:function(i,o,a){var s,c,u=this,h=u.options,f=e(x);return o||(o=p),null!==i&&i!==t&&""!==i&&(n.isFunction(i)&&(i=i()),c={typeIcon:o,content:""},s=e.isPlainObject(i)?r(c,i):r(c,{content:i}),f.addClass(d+"-"+o).toggleClass(d+"-button",h.button).toggleClass(d+"-closable",h.button).attr("data-role","alert").css({width:h.width,height:h.height}).append(u._getCompiled(o,a)(s)),u.angular("compile",function(){return{elements:f,data:[{dataItem:s}]}}),e(h.appendTo)[0]?u._showStatic(f,h):u._showPopup(f,h),u.trigger(l,{element:f})),u},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,g)},error:function(e){return this.show(e,m)},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 o=e(i).data("kendoPopup");o&&t._hidePopup(o)}),t},getNotifications:function(){var t=this,n=e("."+t._guid+":not(."+h+")");return t.options.appendTo?n:n.children("."+d)},setOptions:function(e){var n,o=this;i.fn.setOptions.call(o,e),n=o.options,e.templates!==t&&o._compileTemplates(n.templates),e.stacking===t&&e.position===t||o._compileStacking(n.stacking,n.position.top,n.position.left)},destroy:function(){i.fn.destroy.call(this),this.getNotifications().off(y).find(u).off(y)}});n.ui.plugin(T)}(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","kendo.fx.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 o(e){var t=e.attr("title");if(t)return e.data(a.ns+"title",t),e.attr("title",""),!0}function r(e){for(;e.length&&!e.is("body")&&!o(e);)e=e.parent()}var a=window.kendo,s=a.ui.Widget,l=a.ui.Popup,c=a.isFunction,d=e.isPlainObject,u=e.extend,h=e.proxy,p=e(document),f=a.isLocalUrl,g="_tt_active",m="aria-describedby",v="show",_="hide",b="error",w="contentLoad",k="requestStart",y="k-content-frame",x='',C=a.template(""),S=".kendoTooltip",T={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"},A={bottom:"n",top:"s",left:"e",right:"w",center:"n"},E={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},I=function(e){return e.target.data(a.ns+"title")},M=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+S,i.options.filter,h(i._showOn,i)),(this._isShownOnMouseEnter()||this._isShownOnClick())&&i.element.on("mouseenter"+S,i.options.filter,h(i._mouseenter,i)),this.options.autoHide&&this._isShownOnMouseEnter()&&i.element.on("mouseleave"+S,i.options.filter,h(i._mouseleave,i)),this.options.autoHide&&this._isShownOnFocus()&&i.element.on("blur"+S,i.options.filter,h(i._blur,i))},options:{name:"Tooltip",filter:"",content:I,showAfter:100,hideAfter:100,callout:!0,offset: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,_,w,b,k],_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_isShownOnMouseEnter:function(){return this.options.showOn&&this.options.showOn.match(/mouseenter/)},_isShownOnClick:function(){return this.options.showOn&&this.options.showOn.match(/click/)},_mouseenter:function(t){r(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n._isShownOnClick()&&!n._isShownOnMouseEnter()?n._show(i):n._isShownOnFocus()?(r(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,o=n.content,r=n.options.iframe;d(i)&&i.url?("iframe"in n.options||(r=!f(i.url)),n.trigger(k,{options:i,target:e}),r?(o.hide(),t=o.find("."+y)[0],t?t.src=i.url||t.src:o.html(C({content:i})),o.find("."+y).off("load"+S).on("load"+S,function(){n.trigger(w),o.show()})):(o.empty(),a.ui.progress(o,!0),n._ajaxRequest(i))):i&&c(i)?(i=i({sender:this,target:e}),o.html(i||"")):o.html(i),n.angular("compile",function(){return{elements:o}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(u({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(w)},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,r(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(m),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+S,t._documentKeyDownHandler)}),t.popup._hovered=!0,t.popup.open()},_initPopup:function(){var n=this,i=n.options,o=e(a.template(x)({callout:i.callout&&"center"!==i.position,dir:A[i.position],autoHide:i.autoHide}));n.popup=new l(o,u({autosize:!0,activate:function(){var e=this.options.anchor,o=e[0].id||n.element[0].id;o&&(e.attr(m,o+g),this.element.attr("id",o+g)),i.callout?n._positionCallout():n._offset(n.options.position,n.options.offset),this.element.removeAttr("aria-hidden"),p.on("keydown"+S,n._documentKeyDownHandler),n.trigger(v),n.popup._hovered=t},close:function(){n.trigger(_)},copyAnchorStyles:!1,animation:i.animation},T[i.position])),o.css({width:i.width,height:i.height}),n.content=o.find(".k-tooltip-content"),n.arrow=o.find(".k-callout"),i.autoHide&&this._isShownOnMouseEnter()?o.on("mouseleave"+S,h(n._mouseleave,n)):o.on("click"+S,".k-tooltip-button",h(n._closeButtonClick,n))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){var t=this;clearTimeout(t.timeout),t.timeout=setTimeout(function(){t._closePopup(e.currentTarget)},t.options.hideAfter)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup&&!this.popup._hovered?this.popup.close():n(e(t))},target:function(){return this.popup?this.popup.options.anchor:null},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,o=i.offset,r=t.popup,a=r.options.anchor,s=e(a).offset(),l=e(r.element).offset(),c=A[r.flipped?D[n]:n],d=s[o]-l[o]+e(a)[i.size]()/2;t._offset(n,t.options.offset),t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+c).css(o,d)},destroy:function(){var e=this.popup;e&&(e.element.off(S),e.destroy()),clearTimeout(this.timeout),this.element.off(S),p.off("keydown"+S,this._documentKeyDownHandler),s.fn.destroy.call(this)},_offset:function(e,t){var n=this,i="top"==e||"left"==e,o=n.popup.flipped,r=i&&o||!i&&!o?1:-1,s=i?"margin-"+e:"margin-"+D[e],l=a._outerWidth(n.arrow)/2+t;n.popup.wrapper.css(s,l*r+"px")}});a.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.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?("boolean"!=typeof e&&(e="true"===e.toLowerCase()),e=!!e):"number"===n?e=+e:"string"===n&&(e=""+e)),e}function i(e){return e[e.length-1]}function o(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function r(e,t){var n,i,o,r,a=t.length,s=e.length,l=[],c=[];if(s)for(o=0;o').attr({tabIndex:-1,"aria-hidden":!0}),o.list=e("
      ").append(o.ul).on("mousedown"+r,L(o._listMousedown,o)),i=t.attr(k),i||(i=d.guid()),o.list.attr(k,i+"-list"),o.ul.attr(k,i+"_listbox"),n.columns&&n.columns.length&&(o.ul.removeClass("k-list").addClass("k-grid-list"),o._columnsHeader()),o._header(),o._noData(),o._footer(),o._accessors(),o._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:!0,messages:{noData:"No data found.",clear:"clear"}},setOptions:function(e){f.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},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)})},_header:function(){var n,i=this,o=e(i.header),r=i.options.headerTemplate;return this._angularElement(o,"cleanup"),d.destroy(o),o.remove(),r?(n="function"!=typeof r?d.template(r):r,o=e(n({})),i.header=o[0]?o:null,i.list.prepend(o),this._angularElement(i.header,"compile"),t):(i.header=null,t)},_columnsHeader:function(){var t,n,i,o,r,a,s,l,c,u,h,f=this,g=e(f.columnsHeader);for(this._angularElement(g,"cleanup"),d.destroy(g),g.remove(),t="
      ",n="",i="",o=0;o",i+="";n+="",i+="",t+=n,t+=i,t+="
      ",i+=l(r),i+="
      ",f.columnsHeader=g=e(t),f.list.prepend(g),this._angularElement(f.columnsHeader,"compile")},_noData:function(){var n=this,i=e(n.noData),o=n.options.noDataTemplate===!0?n.options.messages.noData:n.options.noDataTemplate;return n.angular("cleanup",function(){return{elements:i}}),d.destroy(i),i.remove(),o?(n.noData=e('').appendTo(n.list),n.noDataTemplate="function"!=typeof o?d.template(o):o,t):(n.noData=null,t)},_footer:function(){var n=this,i=e(n.footer),o=n.options.footerTemplate;return this._angularElement(i,"cleanup"),d.destroy(i),i.remove(),o?(n.footer=e('').appendTo(n.list),n.footerTemplate="function"!=typeof o?d.template(o):o,t):(n.footer=null,t)},_listOptions:function(t){var n=this,i=n.options,o=i.virtual,r={change:L(n._listChange,n)},a=L(n._listBound,n);return o="object"==typeof o?o:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:L(n._click,n),activate:L(n._activateItem,n),columns:i.columns,deactivate:L(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,o,r),t.template||(t.template="#:"+d.expr(t.dataTextField,"data")+"#"),i.$angular&&(t.$angular=i.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:L(e._listChange,e)});e.listView=e.options.virtual?new d.ui.VirtualList(e.ul,t):new d.ui.StaticList(e.ul,t),e.listView.bind("listBound",L(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(L(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&&e._clear.addClass(O)},_showClear:function(){this._clear&&this._clear.removeClass(O)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(e,t){var n,i,o=this,r=o.options,l=r.filterFields&&e&&e.logic&&e.filters&&e.filters.length,c=o.dataSource,d=B({},c.filter()||{}),u=e||d.filters&&d.filters.length&&!e,h=s(d,r.dataTextField);if(this._clearFilterExpressions(d),!e&&!h||!o.trigger("filtering",{filter:e}))return n={filters:[],logic:"and"},l?n.filters.push(e):this._pushFilterExpression(n,e),a(d)&&(n.logic===d.logic?n.filters=n.filters.concat(d.filters):n.filters.push(d)),o._cascading&&this.listView.setDSFilter(n),i=B({},{page:u?1:c.page(),pageSize:u?c.options.pageSize:c.pageSize(),sort:c.sort(),filter:c.filter(),group:c.group(),aggregate:c.aggregate()},{filter:n}),c[t?"read":"query"](c._mergeState(i))},_pushFilterExpression:function(e,t){a(t)&&""!==t.value&&e.filters.push(t)},_clearFilterExpressions:function(e){var t,n;if(e.filters){for(n=0;n').attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},search:function(t){var n=this.options;t="string"==typeof t?t:this._inputValue(),clearTimeout(this._typingTimeout),(!n.enforceMinLength&&!t.length||t.length>=n.minLength)&&(this._state="filter",this.listView&&(this.listView._emptySearch=!e.trim(t).length),this._isFilterEnabled()?this._filter({word:t,open:!0}):this._searchByWord(t))},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=d.getter,o=t.attr(d.attr("text-field")),r=t.attr(d.attr("value-field"));!n.dataTextField&&o&&(n.dataTextField=o),!n.dataValueField&&r&&(n.dataValueField=r),e._text=i(n.dataTextField),e._value=i(n.dataValueField)},_aria:function(e){var n=this,i=n.options,o=n._focused.add(n.filterInput);i.suggest!==t&&o.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,o.attr("aria-owns",e),n.ul.attr("aria-live",n._isFilterEnabled()?"polite":"off"),n._ariaLabel()},_ariaLabel:function(){var t,n=this,i=n._focused,o=n.element,r=o.attr("id"),a=e('label[for="'+r+'"]'),s=o.attr("aria-label"),l=o.attr("aria-labelledby");i!==o&&(s?i.attr("aria-label",s):l?i.attr("aria-labelledby",l):a.length&&(t=a.attr("id")||n._generateLabelId(a,r||d.guid()),i.attr("aria-labelledby",t)))},_generateLabelId:function(e,t){var n=t+A;return e.attr("id",n),n},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,i=this,o=i.selectedIndex,r=i.options.value,a=i.value();i._isSelect&&!i.listView.bound()&&r&&(a=r),a!==n(i._old,typeof a)&&a!==n(i._oldText,typeof a)?e=!0:i._valueBeforeCascade!==t&&i._valueBeforeCascade!==n(i._old,typeof i._valueBeforeCascade)&&i._userTriggered?e=!0:o===t||o===i._oldIndex||i.listView.isFiltered()||(e=!0),e&&(i._valueBeforeCascade=i._old=null===i._old||""===i._old||""===a?a:i.dataItem()?i.options.dataValueField?i.dataItem()[i.options.dataValueField]:i.dataItem():null,i._oldIndex=o,i._oldText=i.text&&i.text(),i._typing||i.element.trigger(y),i.trigger(y)),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+=h(n,!0)}),t},_height:function(n){var i,o,r,a=this,s=a.list,l=a.options.height,c=a.popup.visible();if(n||a.options.noDataTemplate){if(o=s.add(s.parent(".k-animation-container")).show(),!s.is(":visible"))return o.hide(),t;l=a.listView.content[0].scrollHeight>l?l:"auto",o.height(l),"auto"!==l&&(i=a._offsetHeight(),r=h(e(a.footer))||0,l=l-i-r),a.listView.content.height(l),c||o.hide()}return l},_openHandler:function(e){this._adjustListWidth(),this.trigger(E)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_adjustListWidth:function(){var e,t,n=this,i=n.list,o=i[0].style.width,r=n.wrapper;if(i.data(V)||!o)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||b(r),e&&N.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==i.css("box-sizing")?t-(b(i)-i.width()):t,i.css({fontFamily:r.css("font-family"),width:n.options.autoWidth?"auto":o,minWidth:o,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(V,o),!0},_closeHandler:function(e){this.trigger(I)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,n=!e.focus(),o=i(e.select());o===t&&this.options.highlightFirst&&n&&(o=0),o!==t?e.focus(o):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),n=this.listView.content.prev(T),i=0,o="right";n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=d.support.scrollbar()),this.element.parents(".k-rtl").length&&(o="left"),i+=parseFloat(t.css("border-"+o+"-width"),10)+parseFloat(t.children(".k-group").css("padding-"+o),10),n.css("padding-"+o,i))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){var t,n,i;this.options.columns&&this.options.columns.length&&(t=this,n=m.isRtl(t.wrapper),i=d.support.scrollbar(),t.columnsHeader.css(n?"padding-left":"padding-right","auto"!==e?i:0))},_refreshScroll:function(){var e=this.listView,t=e.element.height()>e.content.height();this.options.autoWidth&&e.content.css({overflowX:"hidden",overflowY:t?"scroll":"auto"})},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):(this.popup.one("open",function(e){return L(function(){this._calculatePopupHeight(e)},this)}.call(this,e)),this.popup.one("activate",L(this._refreshScroll,this))))},_popup:function(){var e=this;e.popup=new u.Popup(e.list,B({},e.options.popup,{anchor:e.wrapper,open:L(e._openHandler,e),close:L(e._closeHandler,e),animation:e.options.animation,isRtl:m.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_makeUnselectable:function(){U&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(C,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,o=m.mobileOS&&(m.touch||m.MSPointers||m.pointers);e=e!==t?e:!i.popup.visible(),n||o||i._focused[0]===_()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?E:I]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===n(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(M,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(y)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(P,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")}});B(G,{inArray:function(e,t){var n,i,o=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=o.length;n"),n._customOption=o,i.append(o)),o.text(t),o[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(S),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(S),t._hideClear())},100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,n=this,i=n.element,o=n.options,r=o.dataSource||{};r=e.isArray(r)?{data:r}:r,n._isSelect&&(t=i[0].selectedIndex,t>-1&&(o.index=t),r.select=i,r.fields=[{field:o.dataTextField},{field:o.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=L(n._showBusy,n),n._requestEndHandler=L(n._requestEnd,n),n._errorHandler=L(n._hideBusy,n)),n.dataSource=d.data.DataSource.create(r).bind(P,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,o,r,a,s,l,c=this,d=c.listView,u=e.keyCode,h=u===g.DOWN;if(u===g.UP||h){if(e.altKey)c.toggle(h);else{if(!d.bound()&&!c.ul[0].firstChild)return c._fetch||(c.dataSource.one(y,function(){c._fetch=!1,c._move(e)}),c._fetch=!0,c._filterSource()),e.preventDefault(),!0;if(o=c._focus(),c._fetch||o&&!o.hasClass("k-state-selected")||(h?(c._nextItem(),c._focus()||c._lastItem()):(c._prevItem(),c._focus()||c._firstItem())),n=d.dataItemByIndex(d.getElementIndex(c._focus())),c.trigger(F,{dataItem:n,item:c._focus()}))return c._focus(o),t;c._select(c._focus(),!0).done(function(){c.popup.visible()||c._blur(),c._cascadedValue=null===c._cascadedValue?c.value():c.dataItem()?c.dataItem()[c.options.dataValueField]||c.dataItem():null})}e.preventDefault(),i=!0}else if(u===g.ENTER||u===g.TAB){if(c.popup.visible()&&e.preventDefault(),o=c._focus(),n=c.dataItem(),c.popup.visible()||n&&c.text()===c._text(n)||(o=null),r=c.filterInput&&c.filterInput[0]===_(),o){if(n=d.dataItemByIndex(d.getElementIndex(o)),s=!0,n&&(s=c._value(n)!==G.unifyType(c.value(),typeof c._value(n))),s&&c.trigger(F,{dataItem:n,item:o}))return;a=c._select(o)}else c.input&&((c._syncValueAndText()||c._isSelect)&&c._accessor(c.input.val()),c.listView.value(c.input.val()));c._focusElement&&c._focusElement(c.wrapper),r&&u===g.TAB?c.wrapper.focusout():a&&"function"==typeof a.done?a.done(function(){c._blur()}):c._blur(),c.close(),i=!0}else u===g.ESC?(c.popup.visible()&&e.preventDefault(),c.close(),i=!0):!c.popup.visible()||u!==g.PAGEDOWN&&u!==g.PAGEUP||(e.preventDefault(),l=u===g.PAGEDOWN?1:-1,d.scrollWith(l*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 r,a,s,l,c=this,d=c.element,u=d[0],h=e.length,p="",f=0;for(n&&(p=n);f",p+=r;d.html(p),i!==t&&(u.value=i,u.value&&!i&&(u.selectedIndex=-1)),u.selectedIndex!==-1&&(r=o(u),r&&r.setAttribute(R,R))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=o.on("reset",t._resetHandler))},_parentWidget:function(){var t,n,i,o=this.options.name;if(this.options.cascadeFrom){if(t=e("#"+this.options.cascadeFrom),n=t.data("kendo"+o),!n)for(i=0;i
      ").parent(),this.header=this.content.before('').prev(),this.bound(!1),this._optionID=d.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=L(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",y,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=d.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(y,i._refreshHandler),n=i.value(),i.value([]),i.bound(!1),i.value(n)):i._refreshHandler=L(i.refresh,i),i.setDSFilter(o.filter()),i.dataSource=o.bind(y,i._refreshHandler),i._fixedHeader()},_touchHandlers:function(){var t,n,i=this,o=function(e){return(e.originalEvent||e).changedTouches[0].pageY};i.element.on("touchstart"+l,function(e){t=o(e)}),i.element.on("touchend"+l,function(r){r.isDefaultPrevented()||(n=o(r),Math.abs(n-t)<10&&(i._touchTriggered=!0,i._triggerClick(e(r.target).closest(D).get(0))))})},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(y,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,o=t.scrollTop,r=t.clientHeight,a=n+i;o>n?o=n:a>o+r&&(o=a-r),t.scrollTop=o}},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 o,r=this,a=r._optionID;return n===t?r._current:(n=i(r._get(n)),n=e(this.element[0].children[n]),r._current&&(r._current.removeClass(x).removeAttr(k),r.trigger("deactivate")),o=!!n[0],o&&(n.addClass(x),r.scroll(n),n.attr("id",a)),r._current=o?n:null,r.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var o,r,a,s=this,l=s.options.selectable,c="multiple"!==l&&l!==!1,d=s._selectedIndices,u=[this.element.find(".k-state-selected").index()],h=[],p=[];return n===t?d.slice():(n=s._get(n),1===n.length&&n[0]===-1&&(n=[]),r=e.Deferred().resolve(),a=s.isFiltered(),a&&!c&&s._deselectFiltered(n)?r:c&&!a&&e.inArray(i(n),d)!==-1&&e.inArray(i(n),u)!==-1?(s._dataItems.length&&s._view.length&&(s._dataItems=[s._view[d[0]].item]),r):(o=s._deselect(n),p=o.removed,n=o.indices,n.length&&(c&&(n=[i(n)]),h=s._select(n)),(h.length||p.length)&&(s._valueComparer=null,s.trigger(y,{added:h,removed:p})),r))},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 w?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(n){var i,o=this,r=o._valueDeferred;return n===t?o._values.slice():(o.setValue(n),r&&"resolved"!==r.state()||(o._valueDeferred=r=e.Deferred()),o.bound()&&(i=o._valueIndices(o._values),"multiple"===o.options.selectable&&o.select(-1),o.select(i),r.resolve()),o._skipUpdate=!1,r)},items:function(){return this.element.children(D)},_click:function(e){return this._touchTriggered?(this._touchTriggered=!1,t):(e.isDefaultPrevented()||this._triggerClick(e.currentTarget),t)},_triggerClick:function(t){this.trigger("click",{item:e(t)})||this.select(t)},_valueExpr:function(e,t){var i,o,r=this,a=0,s=[];if(!r._valueComparer||r._valueType!==e){for(r._valueType=e;a-1&&(a.push(this.removeAt(o)),e(r[i]).removeClass("k-state-selected"));return!!a.length&&(this.trigger(y,{added:[],removed:a}),!0)},_select:function(t){var n,o,r=this,a=r.element[0].children,s=r._view,l=[],c=0;for(i(t)!==-1&&r.focus(t);c'+n(e)+""}):n=d.template('
    • ${'+d.expr(t.dataTextField,"data")+"}
    • ",{useWithBlock:!1}),n},_templates:function(){var e,t,n,i,o,r=this.options,a={template:r.template,groupTemplate:r.groupTemplate,fixedGroupTemplate:r.fixedGroupTemplate};if(r.columns)for(t=0;ti||!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&&(""+e.group).length&&this.header.html(t(e.group)))},_renderItem:function(e){var t='
    • ',t+=a?this._renderColumns(n):this.templates.template(n),i&&e.newGroup?t+=a?'
      '+this.templates.groupTemplate(e.group)+"
      ":'
      '+this.templates.groupTemplate(e.group)+"
      ":r&&a&&(t+="
      "),t+"
    • "},_renderColumns:function(e){var t,n,i,o,r="";for(t=0;t",r+=this.templates["column"+t](e),r+="
      ";return r},_render:function(){var e,t,n,i,o="",r=0,a=0,s=[],l=this.dataSource.view(),c=this.value(),d=this.isGrouped();if(d)for(r=0;rs&&(o=s),r+"-"+o}function i(e){var t,n=0,i=e.min,o=e.max,r=e.start,a=e.setter,l=e.build,c=e.weekNumberBuild,d=e.cells||12,u=e.isWeekColumnVisible,h=e.perRow||4,p=e.otherMonth,g=e.lastDayOfMonth,m=e.weekNumber||j,v=e.content||W,_=e.empty||U,b=e.otherMonthCellTemplate||q,w=e.html||'';for(u&&(w+=m(c(r)));n0&&n%h===0&&(w+='',u&&(w+=m(p||+r<=+g?c(r):{weekNumber:" "}))),r=f(r.getFullYear(),r.getMonth(),r.getDate()),P(r,0),t=l(r,n,e.disableDates),w+=t.cssClass.indexOf(de)===-1||p?s(r,i,o)?v(t):_(t):b(t),a(r,1);return w+"
      "}function o(e,t,n){var i=e.getFullYear(),o=t.getFullYear(),r=o,a=0;return n&&(o-=o%n,r=o-o%n+n-1),i>r?a=1:ii?i=new Re((+t)):n=+t&&+e<=+n}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function c(e,t,n){t=t instanceof Re?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function d(e,t){var n,i,o;return+t<+e&&(n=+e,D.views[0].setDate(e,t),D.views[0].setDate(t,new Date(n))),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),o=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+o-+i)/A.date.MS_PER_DAY)}function u(e,t,n,i){var o,r;for(o=0;o<=t;o++)r=new Date(n.getTime()),r=new Date(r.setDate(r.getDate()+o)),i(r)||e.push(r)}function h(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(se,ke.indexOf(t.type)>-1||t.type==be)}function p(e){e.preventDefault()}function f(e,t,n){var i=new Re(e,t,n);return i.setFullYear(e,t,n),i}function g(e){return N(e).calendars.standard}function m(e){var n=Pe[e.start],i=Pe[e.depth],o=N(e.culture);e.format=L(e.format||o.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=ne),(i===t||i>n)&&(e.depth=ne),null===e.dates&&(e.dates=[])}function v(e){$&&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;"+c;else{for(o=0;o-1&&s.push(a);n="var found = date && window.kendo.jQuery.inArray(date.getDay(),["+s+"]) > -1;"+c}return i=Function("date",n)}function S(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function T(t){var n=e(t).attr(A.attr(ae)).split("/");return n=f(n[0],n[1],n[2])}var D,A=window.kendo,E=A.support,I=A.ui,M=I.Widget,F=A.keys,R=A.parseDate,P=A.date.adjustDST,z=A.date.weekInYear,B=A.ui.Selectable,L=A._extractFormat,H=A.template,N=A.getCulture,O=A.support.transitions,V=O?O.css+"transform-origin":"",W=H('#=data.value#',{useWithBlock:!1}),U=H('',{useWithBlock:!1}),q=H(' ',{useWithBlock:!1}),j=H('#= data.weekNumber #',{useWithBlock:!1}),G=A.support.browser,$=G.msie&&G.version<9,Y=A._outerWidth,K=".kendoCalendar",Q="click"+K,X="keydown"+K,J="id",Z="min",ee="left",te="slideIn",ne="month",ie="century",oe="change",re="navigate",ae="value",se="k-state-hover",le="k-state-disabled",ce="k-state-focused",de="k-other-month",ue=' class="'+de+'"',he="k-out-of-range",pe="k-nav-today",fe="td:has(.k-link)",ge="td:has(.k-link):not(."+le+"):not(."+he+")",me="td:not(:has(.k-link))",ve="k-state-selected",_e="blur"+K,be="focus",we=be+K,ke=E.touch?"touchstart":"mouseenter",ye=E.touch?"touchstart"+K:"mouseenter"+K,xe=E.touch?"touchend"+K+" touchmove"+K:"mouseleave"+K,Ce=6e4,Se=864e5,Te="_prevArrow",De="_nextArrow",Ae="aria-disabled",Ee="aria-selected",Ie="aria-label",Me=e.proxy,Fe=e.extend,Re=Date,Pe={month:0,year:1,decade:2,century:3},ze=M.extend({init:function(t,n){var i,o,s=this;M.fn.init.call(s,t,n),t=s.wrapper=s.element,n=s.options,n.url=A.unescape(n.url),s.options.disableDates=y(s.options.disableDates),s._templates(),s._selectable(),s._header(),s._viewWrapper(),s._footer(s.footer),o=t.addClass("k-widget k-calendar "+(n.weekNumber?" k-week-number":"")).on(ye+" "+xe,fe,h).on(X,"table.k-content",Me(s._move,s)).on(Q,fe,function(t){var i=t.currentTarget.firstChild,o=T(i);i.href.indexOf("#")!=-1&&t.preventDefault(),"month"==s._view.name&&s.options.disableDates(o)||"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(J),o&&(s._cellID=o+"_cell_selected"),s._isMultipleSelection()&&s.options.weekNumber&&t.on(Q,me,function(t){var n=e(t.currentTarget).closest("tr").find(ge).first(),i=s.selectable._lastActive=e(t.currentTarget).closest("tr").find(ge).last();s.selectable.selectRange(n,i,{event:t}),s._current=s._value=T(i.find("a")),s._class(ce,s._current)}),m(n),i=R(n.value,n.format,n.culture),s._selectDates=[],s._index=Pe[n.start],s._current=new Re((+a(i,n.min,n.max))),s._addClassProxy=function(){if(s._active=!0,s._cell.hasClass(le)){var e=s._view.toDateString(r());s._cell=s._cellByDate(e)}s._cell.addClass(ce)},s._removeClassProxy=function(){s._active=!1,s._cell.removeClass(ce)},s.value(i),s._isMultipleSelection()&&n.selectDates.length>0&&s.selectDates(n.selectDates),A.notify(s)},options:{name:"Calendar",value:null,min:new Re(1900,0,1),max:new Re(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:ne,depth:ne,animation:{horizontal:{effects:te,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:""}},events:[oe,re],setOptions:function(e){var t=this;m(e),e.disableDates=y(e.disableDates),M.fn.setOptions.call(t,e),t._templates(),t._selectable(),t._viewWrapper(),t._footer(t.footer),t._index=Pe[t.options.start],t.navigate(),e.weekNumber&&t.element.addClass("k-week-number")},destroy:function(){var e=this,t=e._today;e.element.off(K),e._title.off(K),e[Te].off(K),e[De].off(K),e._destroySelectable(),A.destroy(e._table),t&&A.destroy(t.off(K)),M.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.trigger("focus")},min:function(e){return this._option(Z,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(Te,-1)},navigateToFuture:function(){this._navigate(De,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(le)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,o=n.options.depth;if(e)return i===Pe[o]?(S(n._value,n._current)&&S(n._value,e)||(n.value(e),n.trigger(oe)),t):(n.navigate(e,--i),t)},navigate:function(n,i){var o,r,s,l,c,d,u,h,p,f,g,m,b,w,k,y;i=isNaN(i)?Pe[i]:i,o=this,r=o.options,s=r.culture,l=r.min,c=r.max,d=o._title,u=o._table,h=o._oldTable,p=o._current,f=n&&+n>+p,g=i!==t&&i!==o._index,n||(n=p),o._current=n=new Re((+a(n,l,c))),i===t?i=o._index:o._index=i,o._view=b=D.views[i],w=b.compare,k=i===Pe[ie],d.toggleClass(le,k).attr(Ae,k),k=w(n,l)<1,o[Te].toggleClass(le,k).attr(Ae,k),o[Te].hasClass(le)&&o[Te].removeClass(se),k=w(n,c)>-1,o[De].toggleClass(le,k).attr(Ae,k),o[De].hasClass(le)&&o[De].removeClass(se),u&&h&&h.data("animating")&&(h.kendoStop(!0,!0),u.kendoStop(!0,!0)),o._oldTable=u,u&&!o._changeView||(d.html(b.title(n,l,c,s)),o._table=m=e(b.content(Fe({min:l,max:c,date:n,url:r.url,dates:r.dates,format:r.format,otherMonth:!0,culture:s,disableDates:r.disableDates,isWeekColumnVisible:r.weekNumber,messages:r.messages},o[b.name]))),_(m,b.name),v(m),y=u&&u.data("start")===m.data("start"),o._animate({from:u,to:m,vertical:g,future:f,replace:y}),o.trigger(re),o._focus(n)),i===Pe[r.depth]&&o._selectDates.length>0&&o._visualizeSelectedDatesInView(),"single"===o.options.selectable&&i===Pe[r.depth]&&o._value&&!o.options.disableDates(o._value)&&o._class("k-state-selected",o._value),o._class(ce,n),!u&&o._cell&&o._cell.removeClass(ce),o._changeView=!0},selectDates:function(n){var i,o,r=this;return n===t?r._selectDates:(o=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(o,function(e){if(e)return+r._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),r._selectDates=i.length>0?i:0===o.length?o:r._selectDates,r._visualizeSelectedDatesInView(),t)},value:function(e){var n,i=this,o=i._view,r=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),o&&null===e&&i._cell?i._cell.removeClass(ve):(i._changeView=!e||r&&0!==r.compare(e,i._current),i.navigate(e)),t)},_validateValue:function(e){var n=this,i=n.options,o=i.min,r=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 Re((+e)),s(e,o,r)||(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[A.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n._table.find(fe).filter(function(t,n){return i[e(n.firstChild).attr(A.attr(ae))]}),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=B.parseOptions(e),t.multiple&&n.element.attr("aria-multiselectable","true"),n.selectable=new B(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) "+ge,change:Me(n._onSelect,n),relatedTarget:Me(n._onRelatedTarget,n)}))},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(ge)&&(t._current=T(e.find("a")),t._class(ce,T(e.find("a"))))},_onSelect:function(n){var i=this,o=n,r=B.parseOptions(i.options.selectable);return r.multiple?(o.event.ctrlKey||o.event.metaKey?e(o.event.currentTarget).is(ge)?i._toggleSelection(e(o.event.currentTarget)):(i._cellsBySelector(ge).each(function(t,n){var o=T(e(n).find("a"));i._deselect(o)}),i._addSelectedCellsToArray()):o.event.shiftKey?i._rangeSelection(i._cell):e(o.event.currentTarget).is(fe)?i.value(T(e(o.event.currentTarget).find("a"))):(i._selectDates=[],i._addSelectedCellsToArray()),i.trigger(oe),t):(e(o.event.currentTarget).is("td")&&!e(o.event.currentTarget).hasClass("k-state-selected")?e(o.event.currentTarget).addClass("k-state-selected"):i._click(e(o.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(e.find("a"));e.hasClass("k-state-selected")?t._selectDates.push(n):t._deselect(n)},_rangeSelection:function(e,t){var n,i=this,o=t||T(i.selectable.value().first().find("a")),r=T(e.find("a"));i.selectable._lastActive||i._value?o=i.selectable._lastActive?T(i.selectable._lastActive.find("a")):new Date((+i._value)):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),ge):i.selectable.value().first(),i._selectDates=[],n=d(o,r),u(i._selectDates,n,o,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 o=T(e(i.firstChild));t.options.disableDates(o)||t._selectDates.push(o)})},_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(t._cellsBySelector(ge+":first").find("a")),i=T(t._cellsBySelector(ge+":last").find("a"));return+e<=+i&&+e>=+n},_isNavigatable:function(e,t){var n,i,o=this,r=o.options.disableDates;return"month"==o._view.name?!r(e):(i=o.wrapper.find("."+ce).index(),n=o.wrapper.find(".k-content td:eq("+(i+t)+")"),n.is(ge)||!r(e))},_move:function(n){var i,o,r,l,c,d=this,u=d.options,h=n.keyCode,p=d._view,g=d._index,m=d.options.min,v=d.options.max,_=new Re((+d._current)),b=A.support.isRtl(d.wrapper),w=d.options.disableDates;return n.target===d._table[0]&&(d._active=!0),h==F.RIGHT&&!b||h==F.LEFT&&b?(i=1,o=!0):h==F.LEFT&&!b||h==F.RIGHT&&b?(i=-1,o=!0):h==F.UP?(i=0===g?-7:-4,o=!0):h==F.DOWN?(i=0===g?7:4,o=!0):h==F.SPACEBAR?(i=0,o=!0):h!=F.HOME&&h!=F.END||(r=h==F.HOME?"first":"last",l=p[r](_),_=new Re(l.getFullYear(),l.getMonth(),l.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds()),_.setFullYear(l.getFullYear()),o=!0),n.ctrlKey||n.metaKey?h==F.RIGHT&&!b||h==F.LEFT&&b?(d.navigateToFuture(),o=!0):h==F.LEFT&&!b||h==F.RIGHT&&b?(d.navigateToPast(),o=!0):h==F.UP?(d.navigateUp(),o=!0):h==F.DOWN?(d._click(e(d._cell[0].firstChild)),o=!0):h!=F.ENTER&&h!=F.SPACEBAR||!d._isMultipleSelection()||(d._keyboardToggleSelection(n),c=T(e(d._cell[0]).find("a")),d._class(ce,c)):n.shiftKey?(i!==t||r)&&(r||p.setDate(_,i),s(_,m,v)||(_=a(_,u.min,u.max)),w(_)&&(_=d._nextNavigatable(_,i)),m=f(m.getFullYear(),m.getMonth(),m.getDate()),d._isMultipleSelection()?d._keyboardRangeSelection(n,_):d._focus(_)):(h==F.ENTER||h==F.SPACEBAR?("month"==p.name&&d._isMultipleSelection()?(d.value(T(e(d._cell.find("a")))),d.selectable._lastActive=e(d._cell[0]),d.trigger(oe)):d._click(e(d._cell[0].firstChild)),o=!0):h==F.PAGEUP?(o=!0,d.navigateToPast()):h==F.PAGEDOWN&&(o=!0,d.navigateToFuture()),(i||r)&&(r||p.setDate(_,i),m=f(m.getFullYear(),m.getMonth(),m.getDate()),s(_,m,v)||(_=a(_,u.min,u.max)),d._isNavigatable(_,i)||(_=d._nextNavigatable(_,i)),d._isMultipleSelection()?d._dateInView(_)?(d._current=_,d._class(ce,_)):d.navigate(_):d._focus(_))),o&&n.preventDefault(),d._current},_keyboardRangeSelection:function(e,n){var i,o,r=this;return r._dateInView(n)?(r.selectable.options.filter=r.wrapper.find("table").length>1&&+n>+r._current?"table.k-month:eq(1) "+ge:"table.k-month:eq(0) "+ge,r._class(ce,n),r._current=n,r._rangeSelection(r._cellByDate(r._view.toDateString(n),ge),n),r.trigger(oe),r.selectable.options.filter="table.k-month:eq(0) "+ge,t):(r._selectDates=[],i=r.selectable._lastActive?T(r.selectable._lastActive.find("a")):n,o=d(i,new Date((+n))),u(r._selectDates,o,i,r.options.disableDates),r.navigate(n),r._current=n,r.selectable._lastActive=r.selectable._lastActive||r._cellByDate(r._view.toDateString(n),ge),r.trigger(oe),t)},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(ve)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(oe,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,o=n._view,r=n.options.min,a=n.options.max,l=n.options.disableDates,c=new Date(e.getTime());for(o.setDate(c,-t);i;){if(o.setDate(e,t),!s(e,r,a)){e=c;break}i=l(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,o=t._active,r=t.element.children(".k-calendar-view");n?n.parent().data("animating")?(n.off(K),n.parent().kendoStop(!0,!0).remove(),n.remove(),r.append(i),t._focusView(o)):!n.is(":visible")||t.options.animation===!1||e.replace?(i.insertAfter(n),n.off(K).remove(),t._focusView(o)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(r.append(i),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,o=i._active,r=i.options.animation.horizontal,a=r.effects,s=Y(e);a&&a.indexOf(te)!=-1&&(e.add(t).css({width:s}),e.wrap("
      "),i._focusView(o,e),e.parent().css({position:"relative",width:2*s,"float":ee,"margin-left":n?0:-s}),t[n?"insertAfter":"insertBefore"](e),Fe(r,{effects:te+":"+(n?"right":ee),complete:function(){e.off(K).remove(),i._oldTable=null,t.unwrap(),i._focusView(o)}}),e.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(e,t){var n,i,o=this,r=o.options.animation.vertical,a=r.effects,s=o._active;a&&a.indexOf("zoom")!=-1&&(t.insertBefore(e),e.css({position:"absolute",width:t.width()}),V&&(n=o._cellByDate(o._view.toDateString(o._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),t.css(V,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(K).remove(),o._oldTable=null,o._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(t,n){return this._table.find(n?n:"td:not(."+de+")").filter(function(){return e(this.firstChild).attr(A.attr(ae))===t})},_class:function(e,t){var n,i=this,o=i._cellID,r=i._cell,a=i._view.toDateString(t);r&&r.length&&(r[0].removeAttribute(Ee),r[0].removeAttribute(Ie),r[0].removeAttribute(J)),t&&"month"==i._view.name&&(n=i.options.disableDates(t)),i._cellsBySelector(i._isMultipleSelection()?fe:"td:not(."+de+")").removeClass(e),r=i._cellByDate(a,"multiple"==i.options.selectable?fe:"td:not(."+de+")").attr(Ee,!0),(e===ce&&!i._active&&i.options.focusOnNav!==!1||n)&&(e=""),r.addClass(e),r[0]&&(i._cell=r),o&&(r.attr(J,o),i._table[0].removeAttribute("aria-activedescendant"),i._table.attr("aria-activedescendant",o))},_bindTable:function(e){e.on(we,this._addClassProxy).on(_e,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date((+t._current)),o=T(e);P(o,0),"month"==t._view.name&&t.options.disableDates(o)&&(o=t._value),t._view.setDate(i,o),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(ce,e))},_focusView:function(e,t){e&&this.focus(t)},_viewWrapper:function(){var t=this,n=t.element,i=n.children(".k-calendar-view");i[0]||(i=e("
      ").insertAfter(n.find(".k-header")))},_footer:function(n){var i=this,o=r(),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(o)).attr("title",A.toString(o,"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(ye+" "+xe+" "+we+" "+_e,h).on("click",function(){return!1}),t._title=e.eq(1).on(Q,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[Te]=e.eq(0).on(Q,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[De]=e.eq(2).on(Q,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var n,i=this,o=i._index+1,r=new Re((+i._current));i._isMultipleSelection()&&(n=i._table.find("td:not(.k-other-month):not(.k-out-of-range)").has(".k-link").first(),r=T(n.find("a")),i._current=new Date((+r))),e=i[e],e.hasClass(le)||(o>3?r.setFullYear(r.getFullYear()+100*t):D.views[o].setDate(r,t),i.navigate(r))},_option:function(e,n){var i,o=this,r=o.options,a=o._value||o._current;return n===t?r[e]:(n=R(n,r.format,r.culture),n&&(r[e]=new Re((+n)),i=e===Z?n>a:a>n,(i||k(a,n))&&(i&&(o._value=null),o._changeView=!0),o._changeView||(o._changeView=!(!r.month.content&&!r.month.empty)),o.navigate(o._value),o._toggle()),t)},_toggle:function(e){var n=this,i=n.options,o=n.options.disableDates(r()),a=n._today;e===t&&(e=s(r(),i.min,i.max)), a&&(a.off(Q),e&&!o?a.addClass(pe).removeClass(le).on(Q,Me(n._todayClick,n)):a.removeClass(pe).addClass(le).on(Q,p))},_todayClick:function(e){var t=this,n=Pe[t.options.depth],i=t.options.disableDates,o=r();e.preventDefault(),i(o)||(0===t._view.compare(t._current,o)&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[o],t.selectable._lastActive=null),t._value=o,t.navigate(o,n),t.trigger(oe))},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,o=i.content,r=i.weekNumber,a=i.empty,s='#= kendo.toString(data,"D","'+t.culture+'") #';e.month={content:H(''+(o||"#=data.value#")+"",{useWithBlock:!!o}),empty:H(''+(a||" ")+"",{useWithBlock:!!a}),weekNumber:H(''+(r||"#= data.weekNumber #")+"",{useWithBlock:!!r})},n&&n!==!0&&(s=n),e.footer=n!==!1?H(s,{useWithBlock:!1}):null}});I.plugin(ze),D={firstDayOfMonth:function(e){return f(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||A.culture().calendar;var n=t.firstDay,i=new Re(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=n;)D.setTime(i,-1*Se);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new Re(e.getTime()+t),o=i.getTimezoneOffset()-n;e.setTime(i.getTime()+o*Ce)},views:[{name:ne,title:function(e,t,n,i){return g(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,n=0,o=e.min,a=e.max,s=e.date,c=e.dates,d=e.format,u=e.culture,h=e.url,p=e.showHeader,m=e.otherMonth,v=e.isWeekColumnVisible,_=h&&c[0],w=g(u),k=w.firstDay,y=w.days,x=l(y.names,k),C=l(y.namesShort,k),S=D.firstVisibleDay(s,w),T=t.first(s),E=t.last(s),I=t.toDateString,M=r(),F='';for(F+=p?'':'',v&&(F+='");n<7;n++)F+='";return P(M,0),M=+M,i({cells:42,perRow:7,html:F+='',start:S,isWeekColumnVisible:v,weekNumber:e.weekNumber,min:f(o.getFullYear(),o.getMonth(),o.getDate()),max:f(a.getFullYear(),a.getMonth(),a.getDate()),otherMonth:m,content:e.content,lastDayOfMonth:E,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,n){var i=[],o=e.getDay(),r="",a="#";return(eE)&&i.push(de),n(e)&&i.push(le),+e===M&&i.push("k-today"),0!==o&&6!==o||i.push("k-weekend"),_&&b(+e,c)&&(a=h.replace("{0}",A.toString(e,d,u)),r=" k-action-link"),{date:e,dates:c,ns:A.ns,title:A.toString(e,"D",u),value:e.getDate(),dateString:I(e),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:r,url:a}},weekNumberBuild:function(e){return{weekNumber:z(e,A.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return D.firstDayOfMonth(e)},last:function(e){var t=f(e.getFullYear(),e.getMonth()+1,0),n=D.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(),o=e.getFullYear(),r=t.getMonth(),a=t.getFullYear();return n=o>a?1:or?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof Re?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):D.setTime(e,t*Se),P(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=g(e.culture).months.namesAbbr,n=this.toDateString,o=e.min,r=e.max,a="";return e.showHeader&&(a+='
      '+this.title(s,o,a,u)+'
      '+e.messages.weekColumnHeader+"'+C[n]+"
      '),i({min:f(o.getFullYear(),o.getMonth(),1),max:f(r.getFullYear(),r.getMonth(),1),start:f(e.date.getFullYear(),0,1),html:a,setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:A.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 o(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof Re?(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)),P(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,o="";return e.showHeader&&(o+='
      ',a+=this.title(e.date),a+='
      '),i({start:f(t-t%10-1,0,1),min:f(e.min.getFullYear(),0,1),max:f(e.max.getFullYear(),0,1),otherMonth:e.otherMonth,html:o,setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:A.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 o(e,t,10)},setDate:function(e,t){c(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:ie,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),o=e.max.getFullYear(),r=this.toDateString,a=n,s=o,l="";return a-=a%10,s-=s%10,s-a<10&&(s=a+9),e.showHeader&&(l+='
      ',o+=this.title(e.date,e.min,e.max),o+='
      '),i({start:f(t-t%100-10,0,1),min:f(a,0,1),max:f(s,0,1),otherMonth:e.otherMonth,html:l,setter:this.setDate,build:function(e,t){var i=e.getFullYear(),a=i+9;return io&&(a=o),{ns:A.ns,value:i+" - "+a,dateString:r(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 o(e,t,100)},setDate:function(e,t){c(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},D.isEqualDatePart=w,D.isEqualDate=S,D.makeUnselectable=v,D.restrictValue=a,D.isInRange=s,D.addClassToViewContainer=_,D.normalize=m,D.viewsEnum=Pe,D.disabled=y,D.toDateObject=T,D.getToday=r,D.createDate=f,A.calendar=D}(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 o,r,a,s,l=e[i+e.length-n.length];if(e=e.substring(0,i+e.length-n.length),n=n.substring(0,i),o=[],e===n&&i>0)return o.push([t[i-1],n[i-1]]),o;if(0===e.indexOf(n)&&(0===n.length||t[n.length-1]!==t[n.length])){for(a="",r=n.length;r=0&&(a=t[r],o.push([a,""]));return o}if(" "===n[n.length-1]||n[n.length-1]===l)return[[t[i-1]," "]];if(0===n.indexOf(e)||w.indexOf(t[i-1])===-1){for(s=t[0],r=Math.max(0,e.length-1);r=0){s=t[r];break}return[[s,n[i-1]]]}return[[t[i-1],n[i-1]]]}var i,o=window,r=o.kendo,a=r.caret,s=r.ui,l=s.Widget,c=r.keys,d=".kendoDateInput",u=e.proxy,h={}.toString,p=(r.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+d,f="k-state-disabled",g="k-state-default",m="k-state-invalid",v="disabled",_="readonly",b="change",w="dMyHhmftsz",k=l.extend({init:function(t,n){var i,o,a=this;l.fn.init.call(a,t,n),t=a.element,n=a.options,n.format=r._extractFormat(n.format||r.getCulture(n.culture).calendars.standard.patterns.d),n.min=r.parseDate(t.attr("min"))||r.parseDate(n.min),n.max=r.parseDate(t.attr("max"))||r.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})),a._inputWrapper=e(a.wrapper[0]),e("").insertAfter(t),a._form(),a.element.addClass(i?" ":"k-textbox").attr("autocomplete","off").on("focusout"+d,function(){a._change()});try{t[0].setAttribute("type","text")}catch(s){t[0].type="text"}o=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),o?a.enable(!1):a.readonly(t.is("[readonly]")),a.value(a.options.value||t.val()),r.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(d),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=r.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("focusout"+d,function(){e._change()}).on("paste"+d,u(e._paste,e)).on("keydown"+d,u(e._keydown,e)).on(p,u(e._input,e)).on("mouseup"+d,u(e._mouseUp,e)).on("DOMMouseScroll"+d+" mousewheel"+d,u(e._scroll,e))},_unbindInput:function(){this.element.off("keydown"+d).off("paste"+d).off("focusout"+d).off(p).off("mouseup"+d).off("DOMMouseScroll"+d+" mousewheel"+d)},_editable:function(e){var t=this,n=t.element,i=e.disable,o=e.readonly,r=t.wrapper;t._unbindInput(),o||i?(i&&(r.addClass(f).removeClass(g),n.attr(v,i),n&&n.length&&n[0].removeAttribute(_)),o&&n.attr(_,o)):(r.addClass(g).removeClass(f),n&&n.length&&(n[0].removeAttribute(v),n[0].removeAttribute(_)),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,o,s,l,c,d=this,u=d.element[0],h=!1;if(r._activeElement()===u){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"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value)})},t._formElement=o.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,n,i,o,s,l,d,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]),o=this._format[t[0]],w.indexOf(o)>=0&&(s=1,"m"==o&&(s=this.options.interval||1),this._dateTime.modifyPart(o,38==u?1*s:s*-1),this._updateElementValue(),this._selectSegment(o),this.element.trigger(b))),r.support.browser.msie&&r.support.browser.version<10&&(l=e.keyCode?e.keyCode:e.which,8!==l&&46!==l||(d=this,setTimeout(function(){d._input()},0))),u===c.ENTER&&this._change()},_selectNearestSegment:function(){var e,n,i=a(this.element[0]),o=i[0];for(e=o,n=o-1;e=0;e++,n--){if(e=0&&w.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&&(o=Math.floor(o/10)),o=_?a(o):e;break;case"fff":o=_?a(u.getMilliseconds(),3):e;break;case"tt":o=g?u.getHours()<12?S.AM[0]:S.PM[0]:k.dayperiod;break;case"zzz":n=u.getTimezoneOffset(),i=n<0,o=(""+Math.abs(n/60)).split(".")[0],n=Math.abs(n)-60*o,o=(i?"+":"-")+a(o),o+=":"+a(n);break;case"z":case"zz":o=u.getTimezoneOffset()/60,i=o<0,o=(""+Math.abs(o)).split(".")[0],o=(i?"+":"-")+("zz"===e?a(o):o)}if(o=o!==t?o:e.slice(1,e.length-1),D){for(o=""+o,r="","ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE"),s=0;s0&&(l(e,!0),u=i)},this.parsePart=function(e,t){var n,i,o,r,a,s,c,d,_;if(!t)return l(e,!1),!0;switch(n=new Date(u&&u.getTime?u.getTime():u),e){case"d":if(o=(f?10*n.getDate():0)+parseInt(t,10),isNaN(o))return;for(;o>31;)o=parseInt((""+o).slice(1),10);if(o<1)f=!1;else{if(n.setDate(o),n.getMonth()!==u.getMonth())return;f=!0}break;case"M":if(r=(p?10*(n.getMonth()+1):0)+parseInt(t,10),isNaN(r)){for(a=S.months.names,b+=t.toLowerCase();b.length>0;){for(s=0;s12;)r=parseInt((""+r).slice(1),10);r<1?p=!1:(n.setMonth(r-1),n.getMonth()!==r-1&&(n.setDate(1),n.setMonth(r-1)),p=!0);break;case"y":if(c=(h?10*n.getFullYear():0)+parseInt(t,10),isNaN(c))return;for(;c>9999;)c=parseInt((""+c).slice(1),10);c<1?h=!1:(n.setFullYear(c),h=!0);break;case"h":if(i=(g?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),g=!0;break;case"H":if(i=(g?10*n.getHours():0)+parseInt(t,10),isNaN(i))return;for(;i>23;)i=parseInt((""+i).slice(1),10);n.setHours(i),g=!0;break;case"m":if(d=(m?10*n.getMinutes():0)+parseInt(t,10),isNaN(d))return;for(;d>59;)d=parseInt((""+d).slice(1),10);n.setMinutes(d),m=!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(g){for(w+=t.toLowerCase();w.length>0;){if(0===S.AM[0].toLowerCase().indexOf(w)&&n.getHours()>=12||0===S.PM[0].toLowerCase().indexOf(w)&&n.getHours()<12)return n.setHours((n.getHours()+12)%24),u=n,!0;w=w.substring(1,w.length)}return!1}}return u=n,!0},this.toPair=function(e,t,n){return e?(t=r.getCulture(t),S=t.calendars.standard,e=S.patterns[e]||e,T=S.days,C=S.months,k=n,[e.replace(x,s(!1)),e.replace(x,s(!0))]):["",""]},this.getDateObject=function(){return h&&p&&f&&g&&m&&v&&_?new Date(u.getTime()):null},e)u=new Date(e.getTime());else for(u=new Date,c=this.toPair(n,i,o)[1],d=0;d",f="",g=".kendoDatePicker",m="click"+g,v=d.mouseAndTouchPresent?r.applyEventMap("up",g.slice(1)):m,_="open",b="close",w="change",k="disabled",y="readonly",x="k-state-default",C="k-state-focused",S="k-state-selected",T="k-state-disabled",D="k-state-hover",A="mouseenter"+g+" mouseleave"+g,E="mousedown"+g,I="id",M="min",F="max",R="month",P="aria-disabled",z="aria-expanded",B="aria-hidden",L=r.calendar,H=L.isInRange,N=L.restrictValue,O=L.isEqualDatePart,V=e.extend,W=e.proxy,U=Date,q=function(t){var n,i=this,o=document.body,s=e(p).attr(B,"true").addClass("k-calendar-container").appendTo(o);i.options=t=t||{},n=t.id,n&&(n+="_dateview",s.attr(I,n),i._dateViewID=n),i.popup=new a.Popup(s,V(t.popup,t,{name:"Popup",isRtl:r.support.isRtl(t.anchor)})),i.div=s,i.value(t.value)};q.prototype={_calendar:function(){var t,n=this,o=n.calendar,s=n.options;o||(t=e(p).attr(I,r.guid()).appendTo(n.popup.element).on(E,i).on(m,"td:has(.k-link)",W(n._click,n)),n.calendar=o=new a.Calendar(t),n._setOptions(s),r.calendar.makeUnselectable(o.element),o.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=L.disabled(n)),this.options=V(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,t=this;t._calendar(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout(function(){t.popup._hovered=e},1)},close:function(){this.popup.close()},min:function(e){this._option(M,e)},max:function(e){this._option(F,e)},toggle:function(){var e=this;e[e.popup.visible()?b:_]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,o=e.ctrlKey&&n==c.DOWN||n==c.ENTER,r=!1;if(e.altKey)n==c.DOWN?(t.open(),e.preventDefault(),r=!0):n==c.UP&&(t.close(),e.preventDefault(),r=!0);else if(t.popup.visible()){if(n==c.ESC||o&&i._cell.hasClass(S))return t.close(),e.preventDefault(),!0;n!=c.SPACEBAR&&(t._current=i._move(e)),r=!0}return r},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,o=i.disableDates;o&&o(e)&&(e=null),t._value=e,t._current=new U((+N(e,i.min,i.max))),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(S)!==-1&&(this.calendar.trigger("change"),this.close())},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},q.normalize=n,r.DateView=q,o=s.extend({init:function(t,i){var o,a,c=this;s.fn.init.call(c,t,i),t=c.element,i=c.options,i.disableDates=r.calendar.disabled(i.disableDates),i.min=l(t.attr("min"))||l(i.min),i.max=l(t.attr("max"))||l(i.max),n(i),c._initialOptions=V({},i),c._wrapper(),c.dateView=new q(V({},i,{id:t.attr(I),anchor:c.wrapper,change:function(){c._change(this.value()),c.close()},close:function(e){c.trigger(b)?e.preventDefault():(t.attr(z,!1),a.attr(B,!0))},open:function(e){var n,i=c.options;c.trigger(_)?e.preventDefault():(c.element.val()!==c._oldText&&(n=l(t.val(),i.parseFormats,i.culture),c.dateView[n?"current":"value"](n)),t.attr(z,!0),a.attr(B,!1),c._updateARIA(n))}})),a=c.dateView.div,c._icon();try{t[0].setAttribute("type","text")}catch(d){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":c.dateView._dateViewID,autocomplete:"off"}),c._reset(),c._template(),o=t.is("[disabled]")||e(c.element).parents("fieldset").is(":disabled"),o?c.enable(!1):c.readonly(t.is("[readonly]")),c._createDateInput(i),c._old=c._update(i.value||c.element.val()),c._oldText=t.val(),r.notify(c)},events:[_,b,w],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:R,depth:R,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._createDateInput(e),t._dateInput||t.element.val(r.toString(i,e.format,e.culture)),i&&t._updateARIA(i)},_editable:function(e){var t=this,n=t._dateIcon.off(g),o=t.element.off(g),r=t._inputWrapper.off(g),a=e.readonly,s=e.disable;a||s?(r.addClass(s?T:x).removeClass(s?x:T),o.attr(k,s).attr(y,a).attr(P,s)):(r.addClass(x).removeClass(T).on(A,t._toggleHover),o&&o.length&&(o[0].removeAttribute(k),o[0].removeAttribute(y)),o.attr(P,!1).on("keydown"+g,W(t._keydown,t)).on("focusout"+g,W(t._blur,t)).on("focus"+g,function(){t._inputWrapper.addClass(C)}),n.on(v,W(t._click,t)).on(E,i))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(g),e._dateIcon.off(g),e._inputWrapper.off(g),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(M,e)},max:function(e){return this._option(F,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(D,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(C)},_click:function(e){var t=this;t.dateView.toggle(),t._focusElement(e.type)},_focusElement:function(e){var t=this.element;d.touch&&(!d.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===h()||t.trigger("focus")},_change:function(e){var t,n,i,o=this,a=o.element.val();e=o._update(e),t=!r.calendar.isEqualDate(o._old,e),n=t&&!o._typing,i=a!==o.element.val(),(n||i)&&o.element.trigger(w),t&&(o._old=e,o._oldText=o.element.val(),o.trigger(w)),o._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),o=!1;n.popup.visible()||e.keyCode!=c.ENTER||i===t._oldText?(o=n.move(e),t._updateARIA(n._current),o?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,o=i.options;return n===t?o[e]:(n=l(n,o.parseFormats,o.culture),n&&(o[e]=new U((+n)),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,o=i.min,a=i.max,s=n._value,c=l(e,i.parseFormats,i.culture),d=null===c&&null===s||c instanceof Date&&s instanceof Date;return i.disableDates(c)&&(c=null,n._old||n.element.val()||(e=null)),+c===+s&&d?(t=r.toString(c,i.format,i.culture),t!==e&&n.element.val(null===c?e:t),c):(null!==c&&O(c,o)?c=N(c,o,a):H(c,o,a)||(c=null),n._value=c,n.dateView.value(c),n._dateInput&&c?n._dateInput.value(c||e):n.element.val(r.toString(c||e,i.format,i.culture)),n._updateARIA(c),c)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(f).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(f).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").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=o.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new a.DateInput(this.element,{culture:e.culture,format:e.format,min:e.min,max:e.max}))},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element&&n.element.length&&n.element[0].removeAttribute("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(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.drawer.min",["kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.Widget,r="show",a="hide",s="itemClick",l="push",c="overlay",d="left",u="right",h=n.ui.Widget.extend({init:function(t,i){var r,a,s=this;o.fn.init.call(this,t,i),i=s.options,s._element(t),s._wrapper(t),s.position(),s._mode(),i.mini&&s._miniMode(),s._initDrawerItems(),i.mini&&i.mode!=l&&s._setBodyOffset(),r=this.userEvents=new n.UserEvents(i.mode!=l?e(document.body):this.drawerContainer,{fastTap:!0,allowSelection:!0}),a=function(t){e.contains(s.drawerItemsWrapper[0],t.event.target)&&s._itemClick(t),s.visible&&!s.trigger("hide",{sender:this})&&(s.hide(),t.preventDefault())},this.options.swipeToOpen?(r.bind("start",function(e){s._start(e)}),r.bind("move",function(e){s._update(e)}),r.bind("end",function(e){s._end(e)}),r.bind("tap",a)):r.bind("press",a),i.minHeight&&i.mode==l&&s.drawerContainer.css("min-height",i.minHeight)},_element:function(){var t=this,n=t.element,i=t.options,o=t.contentElement=n.children().first();t.drawerElement=e(i.template),o.addClass("k-drawer-content"),n.addClass("k-widget k-drawer")},_wrapper:function(){var t=this.options,n=this.drawerElement,i=this.element,o=this.contentElement,r=this.drawerItemsWrapper=n.wrap("
      ").parent(),a=this.drawerWrapper=r.wrap("
      ").parent(),s=this.drawerContainer=i.wrap("
      ").parent();t.mini?t.mini.width&&a.width(t.mini.width):a.width(0),t.mode===l?s.append(o):t.mode===c&&(s.after(o),e(document.body).prepend(s)),i.append(a)},_setBodyOffset:function(){var t=this.element.outerWidth();this.leftPositioned?e(document.body).css("padding-left",t):e(document.body).css("padding-right",t)},_initDrawerItems:function(){var e=this.drawerItemsWrapper,t=e.find("[data-role='drawer-item']"),n=e.find("[data-role='drawer-separator']");t.addClass("k-drawer-item"),n.addClass("k-drawer-item k-drawer-separator"),this._selectedItemIndex>=0&&(t.removeClass("k-state-selected"),t.eq(this._selectedItemIndex).addClass("k-state-selected"))},_mode:function(){var t,n=this.options,i=this.drawerContainer;n.mode==l?i.addClass("k-drawer-"+l):(i.addClass("k-drawer-"+c),t=this.overlayContainer=e('
      '),t.hide(),i.prepend(t))},_miniMode:function(){var t=this.options,n=this.drawerContainer,i=t.mini.width,o=this._miniTemplate=t.mini.template&&e(t.mini.template),r=this.drawerItemsWrapper,a=this.drawerWrapper;n.addClass("k-drawer-mini"),o&&r.html(o),i&&a.width(i),this.minWidth=t.mini.width||this.drawerWrapper.width()},show:function(){var e=this.drawerWrapper,t=this.drawerContainer,n=this.options,i=t.hasClass("k-drawer-expanded"),o=this._miniTemplate,r=this.drawerElement,a=this.drawerItemsWrapper;i||(t.addClass("k-drawer-expanded"),this.visible=!0),o&&(a.html(r),this._initDrawerItems(),this._selectItem()),e.width(n.width),n.mode===c&&(this.overlayContainer.show(),this.visible=!0)},hide:function(){var e=this,t=e.drawerWrapper,n=e.drawerContainer,i=this.options,o=this.drawerItemsWrapper,r=this._miniTemplate,a=i.mini&&i.mini.width;this._miniTemplate&&(o.html(r),e._initDrawerItems(),this._selectItem()),t.width(i.mini?a?a:"":0),this.visible&&(n.removeClass("k-drawer-expanded"),this.visible=!1),i.mode===c&&this.overlayContainer.hide()},position:function(e){var t=this,n=t.options,i=e||n.position,o=t.drawerContainer;i==u?(o.removeClass("k-drawer-"+d),o.addClass("k-drawer-"+u)):(o.removeClass("k-drawer-"+u),o.addClass("k-drawer-"+d)),this.leftPositioned=i===d},_start:function(e){var i=this,o=this.options,r=this.drawerWrapper,a=this.drawerItemsWrapper,s=e.sender;return Math.abs(e.x.velocity)i.width/2,s=.8;o.css("transition","all .3s ease-out"),t=this.leftPositioned?n>-s&&(n>s||a):n0?n=e(t.event.target).find(".k-drawer-item"):e(t.event.target).closest(".k-drawer-item").length>0?n=e(t.event.target).closest(".k-drawer-item"):e(t.event.target).hasClass(".k-drawer-item")&&(n=e(t.event.target)),i.drawerItemsWrapper.find(".k-drawer-item").removeClass("k-state-selected"),i._selectItem(n)},destroy:function(){var t=this.options;t.mode!=l&&(this.leftPositioned?e(document.body).css("padding-left",0):e(document.body).css("padding-right",0)),o.fn.destroy.call(this),this.userEvents.destroy(),n.destroy(this.element),this.element=this.drawerWrapper=this.drawerElement=this.drawerContainer=this.drawerItemsWrapper=this._miniTemplate=null},options:{name:"Drawer",position:d,mode:"overlay",swipeToOpen:!0,width:280,mini:!1,template:""},events:[a,r,s]});n.ui.plugin(h)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multiviewcalendar.min",["kendo.core.min","kendo.selectable.min","kendo.calendar.min"],e)}(function(){return function(e,t){function n(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(N,Y.indexOf(t.type)>-1||t.type==$)}function i(e,t,n,i){var o,r;for(o=0;o<=t;o++)r=new Date(n.getTime()),r=new Date(r.setDate(r.getDate()+o)),i(r)||e.push(r)}function o(e,t){var n,i,o;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()),o=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+o-+i)/a.date.MS_PER_DAY)}function r(e,n,i){var o;return"month"===n?(o=new ie(e.getFullYear(),e.getMonth()+i,e.getDate()),o.setFullYear(e.getFullYear()),(Math.abs(o.getMonth()-e.getMonth())>i||i>10)&&(o.setMonth(e.getMonth()+i),o=s.views[0].last(o)),o):"year"===n?(o=new ie(1,e.getMonth(),e.getDate()),o.setFullYear(e.getFullYear()+i),Math.abs(o.getFullYear()-e.getFullYear())>i&&(o=new ie(1,e.getMonth(),1),o.setFullYear(e.getFullYear()+i),o=s.views[1].last(o)),o):"decade"===n?(o=new ie(1,e.getMonth(),e.getDate()),o.setFullYear(e.getFullYear()+10*i),Math.abs(o.getFullYear()-e.getFullYear())>10*i&&(o=new ie(1,e.getMonth(),1),o.setFullYear(e.getFullYear()+10*i),o=s.views[2].last(o)),o):"century"===n?(o=new ie(1,e.getMonth(),e.getDate()),o.setFullYear(e.getFullYear()+100*i),Math.abs(o.getFullYear()-e.getFullYear())>100*i&&(o=new ie(1,e.getMonth(),1),o.setFullYear(e.getFullYear()+100*i),o=s.views[3].last(o)),o):t}var a=window.kendo,s=a.calendar,l=a.support,c=s.isInRange,d=s.toDateObject,u=s.createDate,h=s.isEqualDate,p=s.getToday,f=a.keys,g=a.ui,m=g.Widget,v=g.Selectable,_=a.template,b=l.mobileOS,w=".kendoMultiViewCalendar",k="click",y="keydown",x="id",C="min",S="month",T=".",D="century",A="decade",E="change",I="navigate",M="value",F="k-state-focused",R="k-state-selected",P="k-range-mid",z="k-range-split-end",B="k-range-split-start",L="k-range-start",H="k-range-end",N="k-state-hover",O="k-state-disabled",V="k-nav-today",W="k-other-month",U="k-out-of-range",q="td:has(.k-link):not(."+U+")",j="td:has(.k-link):not(."+O+"):not(."+U+")",G="blur",$="focus",Y=l.touch?"touchstart":"mouseenter",K=l.touch?"touchend"+w+" touchmove"+w:"mouseleave"+w,Q="_prevArrow",X="_nextArrow",J="aria-selected",Z="input,a,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",ee="aria-disabled",te="aria-label",ne=e.proxy,ie=Date,oe={month:0,year:1,decade:2,century:3},re=m.extend({init:function(e,t){var n=this;m.fn.init.call(n,e,t),n.userEvents=new a.UserEvents(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,tap:ne(n._tap,n),touchAction:"none"})},events:[E],options:{name:"RangeSelectable",filter:">*",inputSelectors:Z,multiple:!1,dragToSelect:!0,relatedTarget:e.noop},destroy:function(){var e=this;m.fn.destroy.call(e),e.userEvents.destroy(),e._lastActive=e.element=e.userEvents=e._start=e._end=null},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),!1)},start:function(e){return e===t?this._start:(e.addClass(L+" "+R),this._start=e,t)},end:function(e){return e===t?this._start:(e.addClass(H+" "+R),this._end=e,t)},mid:function(t){var n=this.element.find("table.k-month");t.addClass(P),n.each(function(){var t=e(this),n=t.find(j+":last"),i=t.find(j+":first");n.hasClass(P)&&n.addClass(z),i.hasClass(P)&&i.addClass(B)})},clear:function(e){this.element.find(q).removeClass(H+" "+R+" "+L+" "+P+" "+z+" "+B),e&&(this._start=this._end=null)},selectFrom:function(t){var n=this,i=n.element.find(q),o=e.inArray(e(t)[0],i);n.clear(),n.start(t),i=i.filter(function(e){return e>o}),n.mid(i)},selectTo:function(t){var n=this,i=n.element.find(q),o=e.inArray(e(t)[0],i);n.clear(),i=i.filter(function(e){return ea&&(s=i,i=n,n=s,s=r,r=a,a=s),l.clear(),n.addClass(L+" "+R),l._start=n,o=o.filter(function(e){return e>r&&e+d(e(a).find("a"))?(s.clear(),s.start(a),s.trigger(E),t):(i=i.filter(function(e){return e>o&&e-1,i&&o?a._navContainer&&(a._navContainer.remove(),a._navContainer=null):(a._navContainer||(a._navContainer=e('').appendTo(a.header),a[Q]=a._navContainer.find(".k-prev-view"),a[X]=a._navContainer.find(".k-next-view")),a[Q].toggleClass(O,i).attr(ee,i),a[Q].hasClass(O)&&a[Q].removeClass(N),a[X].toggleClass(O,o).attr(ee,o),a[X].hasClass(O)&&a[X].removeClass(N))},_mouseEnter:function(t){var n,i,o,r,a=this,s=e(t.currentTarget);if(s.addClass(N),a.rangeSelectable&&"month"===a._currentView.name&&(n=a.selectRange(),n.start&&!n.end)){if(a._dateInViews(a.selectRange().start)){if(i=a.element.find(a.rangeSelectable.options.filter),o=e.inArray(e(a.rangeSelectable._start)[0],i),r=e.inArray(e(s)[0],i),o>r)return;a.rangeSelectable.range(a.rangeSelectable._start,s)}else+d(a.element.find(q+":first").find("a"))>+n.start&&a.rangeSelectable.selectTo(s);a.rangeSelectable._end=null}},_move:function(n,i){var o,r,s,l,h,p,g=this,m=g.options,v=n.keyCode,_=g._index,b=m.min,w=m.max,k=g.element.find(T+F),y=k.closest("table"),x=new ie((+(g._current||d(k.find("a"))))),C=a.support.isRtl(g.wrapper),S=!1;if(v==f.RIGHT&&!C||v==f.LEFT&&C?(o=1,r=!0):v==f.LEFT&&!C||v==f.RIGHT&&C?(o=-1,r=!0):v==f.UP?(o=0===_?-7:-4,r=!0):v==f.DOWN?(o=0===_?7:4,r=!0):v==f.SPACEBAR?(o=0,r=!0):v==f.HOME?(r=!0,l=y.find(j).eq(0),l.hasClass(F)?(y=y.prev(),y.length?g._focusCell(y.find(j).eq(0)):(S=g[Q]&&!g[Q].hasClass(O),g._navigate(Q,-1,i),g._focusCell(g.element.find("table:first "+j+":first")))):g._focusCell(l)):v==f.END&&(r=!0,l=y.find(j).last(),l.hasClass(F)?(y=y.next(),y.length?g._focusCell(y.find(j).last()):(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i),g._focusCell(g.element.find("table:last "+j+":last")))):g._focusCell(l)),n.ctrlKey||n.metaKey)v==f.RIGHT&&!C||v==f.LEFT&&C?(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i),r=!0):v==f.LEFT&&!C||v==f.RIGHT&&C?(S=g[Q]&&!g[Q].hasClass(O),g._navigate(Q,-1,i),r=!0):v==f.UP?(S=!g._title.hasClass(O),g.navigateUp(),g._focusCell(g._cellByDate(g._current),!i),r=!0):v==f.DOWN?("month"===g._currentView.name?g.value(x):(g.navigateDown(x),g._focusCell(g._cellByDate(g._current),!i),S=!0),r=!0):v!=f.ENTER&&v!=f.SPACEBAR||"multiple"===m.selectable&&g._toggleSelection(n);else if(n.shiftKey&&"single"!==m.selectable){if(o!==t||s){if(s||g._currentView.setDate(x,o),"month"!==g._currentView.name)return;m.disableDates(x)&&(x=g._nextNavigatable(x,o)),b=u(b.getFullYear(),b.getMonth(),b.getDate()),c(x,b,w)&&(g._dateInViews(x)||(o>0?(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i)):(S=g[Q]&&!g[Q].hasClass(O),g._navigate(Q,-1,i))),l=g._cellByDate(x),g._current=x,g.selectable&&(g._selectRange(d((g.selectable._lastActive||k).find("a")),x),g.selectable._lastActive||(g.selectable._lastActive=k),g.trigger(E),g._focusCell(l)),g.rangeSelectable&&(h=d((g.rangeSelectable._lastActive||k).find("a")),g._dateInViews(h)?(g.rangeSelectable._lastActive=g.rangeSelectable._end&&g.rangeSelectable._end.is(T+F)?g.rangeSelectable._start:g._cellByDate(h),g.rangeSelectable.range(g.rangeSelectable._lastActive,l)):+h>+x?(g.rangeSelectable._end=g.rangeSelectable._lastActive,g.rangeSelectable.selectFrom(l)):g.rangeSelectable.selectTo(l),g.rangeSelectable.change(),g._focusCell(l)))}}else v==f.ENTER||v==f.SPACEBAR?("month"===g._currentView.name?(g.selectable&&(g.selectable._lastActive=g._cellByDate(x)),g.value(x),g.rangeSelectable&&g.rangeSelectable.change()):g._click(e(g._cell[0].firstChild),i),r=!0):v!=f.PAGEUP&&v!=f.PAGEDOWN||(r=!0,p=y.find(j).index(k),y=v==f.PAGEUP?y.prev():y.next(),y.length||(v==f.PAGEUP?(S=g[Q]&&!g[Q].hasClass(O),g.navigateToPast(),y=g.element.find("table:first")):(S=g[X]&&!g[X].hasClass(O),g.navigateToFuture(),y=g.element.find("table:last"))),l=y.find(j).eq(p),g._focusCell(l.length?l:y.find(j).last())),(o||s)&&(s||g._currentView.setDate(x,o),b=u(b.getFullYear(),b.getMonth(),b.getDate()),c(x,b,w)&&(g.selectable&&m.disableDates(x)&&(x=g._nextNavigatable(x,o)),g._dateInViews(x)||(o>0?(S=g[X]&&!g[X].hasClass(O),g._navigate(X,1,i)):(S=g[Q]&&!g[Q].hasClass(O),g._navigate(X,-1,i))),l=g._cellByDate(x),g._current=x,g._focusCell(l,!i)));return S&&g.trigger(I),r&&n.preventDefault(),g._current},_visualizeSelectedDatesInView:function(){var t,n=this,i={};e.each(n._selectDates,function(e,t){i[a.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n.element.find("table").find(q).filter(function(t,n){return i[e(n.firstChild).attr(a.attr(M))]}),t.length>0&&n.selectable._selectElement(t,!0)},_nextNavigatable:function(e,t){var n=this,i=!0,o=n._currentView,r=n.options.min,a=n.options.max,s=n.options.disableDates,l=new Date(e.getTime());for(o.setDate(l,-t);i;){if(o.setDate(e,t),!c(e,r,a)){e=l;break}i=s(e)}return e},_toggleSelection:function(t){var n=this;n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(R)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(E,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_option:function(e,n){var i,o=this,r=o.options,s=o._value||o._current;return n===t?r[e]:(n=a.parseDate(n,r.format,r.culture),n&&(r[e]=new ie((+n)),i=e===C?n>s:s>n,i&&(o._value=null),o.navigate(o._value),o._toggle()),t)},_cellByDate:function(t){return t instanceof Date&&(t=this._currentView.toDateString(t)),this.element.find("table").find("td:not(."+W+")").filter(function(){return e(this.firstChild).attr(a.attr(M))===t})},_selectable:function(){var e=this,t=e.options.selectable;e.selectable&&(e.selectable.destroy(),e.selectable=null),e.rangeSelectable&&(e.rangeSelectable.destroy(),e.rangeSelectable=null),"range"===t.toLowerCase()?e.rangeSelectable=new re(e.wrapper,{filter:"table.k-month "+j,change:ne(e._rangeSelection,e)}):e.selectable=new v(e.wrapper,{aria:!0,dragToSelect:!1,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:v.parseOptions(t).multiple,filter:"table.k-content "+j,change:ne(e._selection,e),relatedTarget:ne(e._onRelatedTarget,e),unselect:ne(e._unselecting,e)})},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(j)&&e.length>1&&t._focusCell(e.first(),!0)},_getFirstViewDate:function(e){var t,n,i,o=this,a=o.options,s=[],l=new Date((+o._current));for(i=0;i+a.max){+t<=+a.max&&s.push({start:t,end:new Date((+a.max))});break}s.push({start:t,end:n}),l=new Date((+r(n,e.name,1)))}for(l=new Date((+o._current)),i=0;i=+a.min&&s.push({start:new Date((+a.min)),end:n});break}s.push({start:t,end:n}),l=new Date((+r(t,e.name,-1)))}for(t=s[0].start,i=0;i+s[i].start&&(t=s[i].start);return new Date((+t))},_canRenderNextView:function(e){var t=e.getFullYear(),n=e.getMonth(),i=e.getDate(),o=this.options.max,r=o.getFullYear(),a=o.getMonth();return t=+i},_fillRange:function(e,t){var n,r=this;r._selectDates=[],n=o(e,t),i(r._selectDates,n,e,r.options.disableDates)},_selectRange:function(e,t){var n,i=this;+t<+e&&(n=t,t=e,e=n),i._fillRange(e,t),i._visualizeSelectedDatesInView()},_header:function(){var t,i=this,o=i.element,r=o.find(".k-calendar-header");r.length||(r=e('
      ').prependTo(o)),i.header=r,r.on(Y+w+" "+K+" "+$+w+" "+G+w,".k-button",n).on("click",function(){return!1}).on(k+w,".k-button.k-title",function(){i.navigateUp(),i._focusCell(i._cellByDate(i._current),!0),i.trigger(I)}).on(k+w,".k-button.k-prev-view",function(e){e.preventDefault(),i.navigateToPast(),i.trigger(I)}).on(k+w,".k-button.k-next-view",function(e){e.preventDefault(),i.navigateToFuture(),i.trigger(I)}),t=r.find(".k-button"),i._title=t.filter(".k-title"),i._navContainer=r.find(".k-calendar-nav"),i[Q]=t.filter(".k-prev-view"),i[X]=t.filter(".k-next-view")},_wrapper:function(){this.tablesWrapper=e('
      ').insertAfter(this.element[0].firstChild)},_templates:function(){var e=this,t=e.options,n=t.month,i=n.content,o=n.weekNumber,r=n.empty;e.month={content:_(''+(i||"#=data.value#")+"",{useWithBlock:!!i}),empty:_('
      ",{useWithBlock:!!r}),weekNumber:_('",{useWithBlock:!!o})}},_footer:function(){var n=this,i=n.options,o=i.footer!==!1?a.template(n.options.footer||'#= kendo.toString(data,"D","'+i.culture+'") #',{useWithBlock:!1}):null,r=p(),s=n.element,l=s.find(".k-footer");return o?(l[0]||(l=e('').appendTo(s)),n._today=l.show().find(".k-link").html(o(r)).attr("title",a.toString(r,"D",n.options.culture)),n._toggle(),t):(n._toggle(!1),l.hide(),t)},_navigate:function(e,t,n){var i,o=this,r=o._index+1,a=new ie((+o._current)),l=new ie((+o._current));e=o[e],i=o._cellByDate(a).closest("table").index(),t>0?i=1-i:i+=1,e&&e.hasClass(O)||(r>3?a.setFullYear(a.getFullYear()+100*(t*i)):s.views[r].setDate(a,t*i),o.navigate(a),o._dateInViews(l)?(o._focusCell(o._cellByDate(l),!n),o._current=l):(r>3?l.setFullYear(l.getFullYear()+100*t):s.views[r].setDate(l,t),o._focusCell(o._cellByDate(l),!n),o._current=l))},_toggle:function(e){var n=this,i=n.options,o="range"!==i.selectable&&n.options.disableDates(p()),r=n._today;e===t&&(e=c(p(),i.min,i.max)),r&&(r.off(k+w),e&&!o?r.addClass(V).removeClass(O).on(k+w,ne(n._todayClick,n)):r.removeClass(V).addClass(O).on(k+w,function(e){e.preventDefault()}))},_click:function(e,t){var n=this,i=n.options,o=new Date((+n._current)),r=d(e);a.date.adjustDST(r,0),n._currentView.setDate(o,r),n._current=r,n._currentView.name!==i.depth?(n.navigateDown(s.restrictValue(o,i.min,i.max)),n._focusCell(n._cellByDate(n._current),!t),n.trigger(I)):n._focusCell(e.closest("td"),!t)},_blur:function(){var e=this;e._cell&&e._cell.removeClass(F)},_focus:function(t){var n=this,i=e(t.currentTarget),o=n._cell;o&&e.contains(i[0],o[0])||(o=i.find(j+":first")),n._focusCell(o)},_focusCell:function(e,t){var n=this,i=n._cellID,o=e.closest("table");n._cell&&n._cell.length&&(n._cell[0].removeAttribute(J),n._cell[0].removeAttribute(te),n._cell.removeClass(F),n._cell[0].removeAttribute(x),n._cell.closest("table")[0].removeAttribute("aria-activedescendant")),n._cell=e,t&&o.trigger("focus"),i&&(e.attr(x,i),o.attr("aria-activedescendant",i)),e.attr(J,!0).addClass(F),e.length&&"month"==n._currentView.name&&(n._current=d(e.find("a")))},_todayClick:function(e){var t=this,n=t.options.disableDates,i=p(),o=!1;e.preventDefault(),n(i)||(t._value=i,"multiple"===t.options.selectable&&(t._selectDates=[i]),"range"===t.options.selectable&&(t.rangeSelectable.clear(!0),t._range={start:i,end:null}),"month"==t._currentView.name&&t._dateInViews(i)||(o=!0),t.navigate(i,t.options.depth),"single"===t.options.selectable&&(t.selectable._lastActive=null),o&&t.trigger(I),t.trigger(E))},_validateValue:function(e){var n=this,i=n.options,o=i.min,r=i.max;return e=a.parseDate(e,i.format,i.culture),null!==e&&(e=new ie((+e)),c(e,o,r)||(e=null)),null!==e&&n.options.disableDates(new Date((+e)))?n._value===t&&(n._value=null):n._value=e,n._value},clearSelection:function(){var e=this;e.selectable&&e.element.find(T+R).removeClass(R),e.rangeSelectable&&e.rangeSelectable.clear(!0)},_restoreSelection:function(){var e,n=this,i=n.options.selectable;if(n._currentView.name===n.options.depth){if(n._preventChange=!0,"range"===i){if(e=n.selectRange(),!e||!e.start)return n._preventChange=!1,t;n.selectRange(e)}"single"===i&&n.value()&&n.selectable.value(n._cellByDate(n.value())),"multiple"===i&&n._visualizeSelectedDatesInView(),n._preventChange=!1}},value:function(e){var n,i=this;return e===t?i._value:(e=i._validateValue(e),i.clearSelection(),e&&!i._dateInViews(e)&&i.navigate(e),null!==e&&i._currentView.name===S&&(n=i._cellByDate(e),i.selectable&&i.selectable.value(n),i.rangeSelectable&&(i.rangeSelectable.start(n),i.rangeSelectable._lastActive=n)),t)},selectDates:function(n){var i,o,r=this;return n===t?r._selectDates:(o=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(o,function(e){if(e)return+r._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),r._selectDates=i.length>0?i:0===o.length?o:r._selectDates,r._visualizeSelectedDatesInView(),t)},selectRange:function(e){var n,i,o,r=this;return e===t?r._range:(r._range=e,e.start&&(o=r._visibleRange(),n=r._dateInViews(e.start),i=e.end&&r._dateInViews(e.end),!n&&i&&r.rangeSelectable.selectTo(r._cellByDate(e.end)),n&&i&&r.rangeSelectable.range(r._cellByDate(e.start),r._cellByDate(e.end)),e.end&&n&&!i&&r.rangeSelectable.selectFrom(r._cellByDate(e.start)),!e.end&&n&&r.rangeSelectable.start(r._cellByDate(e.start)),+o.start>+e.start&&+o.end<+e.end&&r.rangeSelectable.mid(r.element.find(j))),t)}});a.ui.plugin(ae)}(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 o(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function r(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(b.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 c(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,o){return t>o?t-e.topi}}function d(e,t){return function(n){return t(e.scrollTop,n)}}function u(e){return function(t,n){return e(t.items,t.index,n),t}}function h(e,t){b.support.browser.msie&&b.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,o){for(var r=0,a=i.length;r0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}function g(n,i,o){var r=o.template;n=e(n),i.item||(r=o.placeholderTemplate),0===i.index&&this.header&&i.group&&this.header.html(o.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),n.html(this.options.columns&&this.options.columns.length&&i.item?m(this.options,i.item,o):r(i.item||{})),n.toggleClass(z,i.current),n.toggleClass(P,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-last",i.isLastGroupedItem),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup&&e("
      ").appendTo(n).html(o.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 m(e,t,n){var i,o,r,a,s="";for(i=0;i",s+=n["column"+i](t),s+="";return s}function v(e,t){var n,i,o,r,a=t.length,s=e.length,l=[],c=[];if(s)for(o=0;o").parent(),o.wrapper=o.content.wrap("
      ").parent(),o.header=o.content.before("
      ").prev(),n.columns&&n.columns.length&&o.element.removeClass(A),o.element.on("mouseenter"+U,"li:not(.k-loading-item)",function(){e(this).addClass(B)}).on("mouseleave"+U,"li",function(){e(this).removeClass(B)}),o._values=i(o.options.value),o._selectedDataItems=[],o._selectedIndexes=[],o._rangesList={},o._promisesList=[],o._optionID=b.guid(),o._templates(),o.setDataSource(n.dataSource),o.content.on("scroll"+U,b.throttle(function(){o._renderItems(),o._triggerListBound()},n.delay)),o._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:[L,H,N,O,V,W],setOptions:function(e){k.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(H,"."+I,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(U),this.dataSource.unbind(L,this._refreshHandler),k.fn.destroy.call(this)},setDataSource:function(t){var n,i=this,o=t||{};o=e.isArray(o)?{data:o}:o,o=b.data.DataSource.create(o),i.dataSource?(i.dataSource.unbind(L,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=o.bind(L,i._refreshHandler),i.setDSFilter(o.filter()),0!==o.view().length?i.refresh():i.options.autoBind&&o.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(N))},_getValues:function(t){var n=this._valueGetter; return e.map(t,function(e){return n(e)})},_highlightSelectedItems:function(){var e,t;for(e=0;e0?(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,o=this.options.itemHeight,r=e*o,a=r+o,s=n+i;return t=r===n-o||a>n&&r=n&&r<=n+(i-o)?"inScreen":"outScreen"},_templates:function(){var e,t,n,i,o=this.options,r={template:o.template,placeholderTemplate:o.placeholderTemplate,groupTemplate:o.groupTemplate,fixedGroupTemplate:o.fixedGroupTemplate};if(o.columns)for(e=0;e0;)n=document.createElement("li"),n.tabIndex=-1,n.className=I+" "+M,n.setAttribute("role","option"),n.style.height=o,n.style.minHeight=o,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;to.total()&&(t.itemCount=o.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(i.itemHeight*o.total()),t.options.type=(o.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(d(n,t._onScroll),u(t._reorderList(t._items,e.proxy(g,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight),t._calculateColumnsHeaderPadding()},_setHeight:function(e){var t,n,i=this.heightContainer;if(i?t=i.offsetHeight:i=this.heightContainer=a(this.content[0],F),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,o=this.itemCount,r={};return t.pageSize()=o?(l=t,c=e):(l=f(t,d),c=d>0?e.slice(-d):e.slice(0,-d)),n(l,c,i.bound()),r=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(H+U,"."+I,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n,i,o=[];if("function"==typeof e)for(t=this.dataSource.flatView(),n=0;n-1&&(l.push(this.removeAt(o)),e(a[i]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var n=e=r.minLength)&&(o._open=!0,o._mute(function(){this.listView.value([])}),o._filterSource({value:a?c?t.toLocaleLowerCase(c):t.toLowerCase():t,operator:r.filter,field:r.dataTextField,ignoreCase:a}),o.one("close",e.proxy(o._unifySeparators,o))),o._toggleCloseVisibility()},suggest:function(e){var i,o=this,r=o._last,a=o._accessor(),c=o.element[0],d=s(c)[0],p=o._separator(),f=a.split(p),g=n(d,a,p),m=d,v=o.dataSource.options.accentFoldingFiltering;return r==h.BACKSPACE||r==h.DELETE?(o._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=o.dataSource.view()[u.inArray(e[0],o.ul[0])]),e=e?o._text(e):""),d<=0&&(d=(v?a.toLocaleLowerCase(v):a.toLowerCase()).indexOf(v?e.toLocaleLowerCase(v):e.toLowerCase())+1),i=a.substring(0,d).lastIndexOf(p),i=i>-1?d-(i+p.length):d,a=f[g].substring(0,i),e&&(e=""+e,i=(v?e.toLocaleLowerCase(v):e.toLowerCase()).indexOf(v?a.toLocaleLowerCase(v):a.toLowerCase()),i>-1&&(e=e.substring(i+a.length),m=d+e.length,a+=e),p&&""!==f[f.length-1]&&f.push("")),f[g]=a,o._accessor(f.join(p||"")),c===l()&&s(c,d,m),t)},value:function(e){return e===t?this._accessor():(this.listView.value(e),this._accessor(e),this._old=this._accessor(),this._oldText=this._accessor(),this._toggleCloseVisibility(),t)},_click:function(e){var n=e.item,i=this,o=i.element,r=i.listView.dataItemByIndex(i.listView.getElementIndex(n));return e.preventDefault(),i._active=!0,i.trigger("select",{dataItem:r,item:n})?(i.close(),t):(i._oldText=o.val(),i._select(n).done(function(){i._blur(),s(o,o.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,o=n.options,r=n.dataSource.flatView(),a=r.length,s=n.dataSource._group.length,c=n.element[0]===l();n._renderFooter(),n._renderNoData(),n._toggleNoData(!a),n._toggleHeader(!!s&&!!a),n._resizePopup(),i.position(),a&&o.suggest&&c&&n.suggest(r[0]),n._open&&(n._open=!1,e=n._allowOpening()?"open":"close",n._typingTimeout&&!c&&(e="close"),a&&(n._resetFocusItem(),o.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=o(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!==u.unifyType(e._old,typeof t),i=n&&!e._typing,o=e._oldText!==t;e._old=t,e._oldText=t,(i||o)&&e.element.trigger(m),n&&e.trigger(m),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,o=e.keyCode,r=i.listView,a=i.popup.visible(),s=r.focus();if(i._last=o,o===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._allowOpening()&&(i._resetFocusItem(),i.popup.open())}),e.preventDefault();else if(o===h.UP)a&&this._move(s?"focusPrev":"focusLast"),e.preventDefault();else if(o===h.HOME)this._move("focusFirst");else if(o===h.END)this._move("focusLast");else if(o===h.ENTER||o===h.TAB){if(o===h.ENTER&&a&&e.preventDefault(),a&&s){if(t=r.dataItemByIndex(r.getElementIndex(s)),i.trigger("select",{dataItem:t,item:s}))return;this._select(s)}this._blur()}else o===h.ESC?(a?e.preventDefault():i._clearValue(),i.close()):!i.popup.visible()||o!==h.PAGEDOWN&&o!==h.PAGEUP?(i.popup._hovered=!0,i._search()):(e.preventDefault(),n=o===h.PAGEDOWN?1:-1,r.scrollWith(n*r.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(!c){var n,i=this,o=i.element,r=i.options.placeholder;if(r){if(n=o.val(),e===t&&(e=!n),e||(r=n!==r?n:""),n===i._old&&!e)return;o.toggleClass("k-readonly",e).val(r),r||o[0]!==document.activeElement||s(o[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(){u.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(C,"mouseenter"===t.type)},_toggleCloseVisibility:function(){this.value()?this._showClear():this._hideClear()},_wrapper:function(){var t,n=this,i=n.element,o=i[0];t=i.parent(),t.is("span.k-widget")||(t=i.wrap("").parent()),t.attr("tabindex",-1),t.attr("role","presentation"),t[0].style.cssText=o.style.cssText,i.css({width:"",height:o.style.height}),n._focused=n.element,n.wrapper=t.addClass("k-widget k-autocomplete").addClass(o.className),n._inputWrapper=e(t[0])}});d.plugin(A)}(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,o=0,r=t.length-1;o=t&&(e-=t),e}function o(e,t){for(var n=0;n0;e.popup.visible()||(e.listView.bound()&&e._state!==T?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]===d(),t=r.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(),r.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,o=null;if(null===n)return n;if(n===t)o=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);o=i.dataSource.flatView()[n]}return o||(o=i._optionLabelDataItem()),o},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,o=i.options.ignoreCase;return e=null===e?"":e, e===t?i._textAccessor():"string"!=typeof e?(i._textAccessor(e),t):(n=o?e.toLowerCase():e,i._select(function(e){return e=i._text(e),o&&(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,o=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&&o.unbind(v,n._valueSetter),n._valueSetter=A(function(){n.value(e)},n),o.one(v,n._valueSetter),t):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),i.value(e).done(function(){n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var n=this,i=n.options,o=i.optionLabel,a=i.optionLabelTemplate;return o?(a||(a="#:",a+="string"==typeof o?"data":r.expr(i.dataTextField,"data"),a+="#"),"function"!=typeof a&&(a=r.template(a)),n.optionLabelTemplate=a,n.hasOptionLabel()||(n.optionLabel=e('
      ').prependTo(n.list)),n.optionLabel.html(a(o)).off().on(y,A(n._click,n)).on(x,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 u(i):n._assignInstance(n._optionLabelText(),""):t},_buildOptions:function(e){var n,i,o,r=this;r._isSelect&&(n=r.listView.value()[0],i=r._optionLabelDataItem(),o=i&&r._value(i),n!==t&&null!==n||(n=""),i&&(o!==t&&null!==o||(o=""),i='"),r._options(e,i,n),n!==s.unifyType(r._accessor(),typeof n)&&(r._customOption=null,r._custom(n)))},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===S,o=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!o.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(o),t._makeUnselectable(),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(o.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()},_attachFocusHandlers:function(){var e=this,t=e.wrapper;t.on("focusin"+f,A(e._focusinHandler,e)).on("focusout"+f,A(e._focusoutHandler,e)),e.filterInput&&e.filterInput.on("focusin"+f,A(e._focusinHandler,e)).on("focusout"+f,A(e._focusoutHandler,e))},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(_),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),c.mobileOS.ios&&t?e._change():e._blur(),e._inputWrapper.removeClass(_),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,o=e.readonly,a=t.wrapper.add(t.filterInput).off(p),s=t._inputWrapper.off(x);o||i?i?(a.removeAttr(C),s.addClass(w).removeClass(b)):s.addClass(b).removeClass(w):(n.removeAttr(g).removeAttr(m),s.addClass(b).removeClass(w).on(x,t._toggleHover),a.attr(C,a.data(C)).attr(k,!1).on("keydown"+p,A(t._keydown,t)).on(r.support.mousedown+p,A(t._wrapperMousedown,t)).on("paste"+p,A(t._filterPaste,t)),t.wrapper.on("click"+p,A(t._wrapperClick,t)),t.filterInput?a.on("input"+p,A(t._search,t)):a.on("keypress"+p,A(t._keypress,t))),n.attr(g,i).attr(m,o),a.attr(k,i)},_keydown:function(e){var n,i,o,r=this,a=e.keyCode,s=e.altKey,l=r.popup.visible();if(r.filterInput&&(n=r.filterInput[0]===d()),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)&&r._focusElement(r.wrapper),r._state===S&&a===h.ESC&&(r._clearFilter(),r._open=!1,r._state=T),a===h.ENTER&&r._typingTimeout&&r.filterInput&&l)return e.preventDefault(),t;if(a!==h.SPACEBAR||n||(r.toggle(!l),e.preventDefault()),i=r._move(e),!i){if((!l||!r.filterInput)&&(o=r._focus(),a===h.HOME?(i=!0,r._firstItem()):a===h.END&&(i=!0,r._lastItem()),i)){if(r.trigger("select",{dataItem:r._getElementDataItem(r._focus()),item:r._focus()}))return r._focus(o),t;r._select(r._focus(),!0).done(function(){l||r._blur()}),e.preventDefault()}s||i||!r.filterInput||r._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,r=this,a=r.dataSource.flatView(),s=a.length+(r.hasOptionLabel()?1:0),l=o(r._word,r._last),c=r.selectedIndex;for(c===-1?c=0:(c+=l?1:0,c=i(c,s)),a=a.toJSON?a.toJSON():a.slice(),a=r._shuffleData(a,c),n=0;n-1&&(t-=1):a.hasClass("k-list-optionlabel")&&(t=-1)),r){for(n=this.dataSource.flatView(),o=0;o
      ',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,o="span.k-input";t=i.find(o),t[0]||(i.append(' ').append(n.element),t=i.find(o)),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").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?r.template(n):e.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=n,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(i){throw Error(D)}},_textAccessor:function(n){var i,o=null,r=this.valueTemplate,a=this._optionLabelText(),s=this.span;if(n===t)return s.text();e.isPlainObject(n)||n instanceof u?o=n:a&&a===n&&(o=this.options.optionLabel),o||(o=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(o!==a&&this._text(o)!==a||(r=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(o=a))),i=function(){return{elements:s.get(),data:[{dataItem:o}]}},this.angular("cleanup",i);try{s.html(r(o))}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,o={};return i?(n(o,i.split("."),e),n(o,this.options.dataValueField.split("."),t),o=new u(o)):o=e,o}});a.plugin(E)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.treeview.draganddrop.min",["kendo.data.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=e.proxy,r=e.extend,a="visibility",s="k-state-hover",l="input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.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=r({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:o(this._hint,this),dragstart:o(this.dragstart,this),dragcancel:o(this.dragcancel,this),drag:o(this.drag,this),dragend:o(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,o,r,l,c,d,u,h,p,f,g,m=this.options,v=this.source,_=this.dropTarget=e(n.eventTarget(t)),b=_.closest(m.allowedContainers);b.length?v[0]==_[0]||m.contains(v[0],_[0])?g="k-i-cancel":(g="k-i-insert-middle",p=m.itemFromTarget(_),i=p.item,i.length?(this._removeTouchHover(),o=n._outerHeight(i),l=p.content,m.reorderable?(c=o/(l.length>0?4:2),r=n.getOffset(i).top,d=t.y.location").prependTo(t)),!o.length&&i.length?o=e("").prependTo(n):i.length&&i.children().length||(o.remove(),i.remove()),r.length&&e("").appendTo(n).append(r),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,c,d,u,h,p=window.kendo,f=p.ui,g=p.data,m=e.extend,v=p.template,_=e.isArray,b=f.Widget,w=g.HierarchicalDataSource,k=e.proxy,y=p.keys,x=".kendoTreeView",C=".kendoTreeViewTemp",S="select",T="check",D="navigate",A="expand",E="change",I="error",M="checked",F="indeterminate",R="collapse",P="dragstart",z="drag",B="drop",L="dragend",H="dataBound",N="click",O="undefined",V="k-state-hover",W="k-treeview",U=":visible",q=".k-item",j="string",G="aria-checked",$="aria-selected",Y="aria-disabled",K="k-state-disabled",Q={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},X=function(e){return e instanceof p.jQuery||window.jQuery&&e instanceof window.jQuery},J=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===j};c=n(".k-group"),d=n(".k-group,.k-content"),u=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,o=!1,r=t&&!!t.dataSource;_(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==O&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(i,e,t),e=i.element,t=i.options,i._dataSourceUids={},n=e.is("ul")&&e||e.hasClass(W)&&e.children("ul"),o=!r&&n.length,o&&(t.dataSource.list=n),i._animation(),i._accessors(),i._templates(),e.hasClass(W)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),n&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.wrapper.attr("role","tree"),i._dataSource(o),i._attachEvents(),i._dragging(),o?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(V)}).on("mouseleave"+x,n,function(){e(this).removeClass(V)}).on(N+x,n,k(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",k(t._toggleButtonClick,t)).on(N+x,".k-i-expand,.k-i-collapse",k(t._toggleButtonClick,t)).on("keydown"+x,k(t._keydown,t)).on("keypress"+x,k(t._keypress,t)).on("focus"+x,k(t._focus,t)).on("blur"+x,k(t._blur,t)).on("mousedown"+x,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",k(t._mousedown,t)).on("change"+x,".k-checkbox-wrapper :checkbox",k(t._checkboxChange,t)).on("click"+x,".checkbox-span",k(t._checkboxLabelClick,t)).on("click"+x,".k-request-retry",k(t._retryRequest,t)).on("click"+x,".k-link.k-state-disabled",function(e){e.preventDefault()}).on("click"+x,function(n){var i=e(n.target);i.is(":kendoFocusable")||i.find("input,select,textarea,button,object").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,r,a,s,l=t.view(),c=p.attr("uid"),d=p.attr("expanded"),u=this.options.checkboxes,h=e.children("li");for(n=0;n0?"after":"before"},dragstart:function(e){return t.trigger(P,{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(n){var i=e(n.dropTarget),o=i.closest("a");return o&&o.attr("href")&&t._tempPreventNavigation(o),t.trigger(B,{originalEvent:n.originalEvent,sourceNode:n.source,destinationNode:n.destination,valid:n.valid,setValid:function(e){this.valid=e,n.setValid(e)},dropTarget:n.dropTarget,dropPosition:n.position})},dragend:function(e){function n(n){t.options.checkboxes&&t.options.checkboxes.checkChildren&&t.updateIndeterminate(),t.trigger(L,{originalEvent:e.originalEvent,sourceNode:n&&n[0],destinationNode:o[0],dropPosition:r})}var i=e.source,o=e.destination,r=e.position;"over"==r?t.append(i,o,n):("before"==r?i=t.insertBefore(i,o):"after"==r&&(i=t.insertAfter(i,o)),n(i))}})):!n&&i&&(i.destroy(),this.dragging=null)},_tempPreventNavigation:function(e){e.on(N+x+C,function(t){t.preventDefault(),e.off(N+x+C)})},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=k(e._fieldAccessor,e);t.template&&typeof t.template==j?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={setAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},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,o=e.length-1;return e.firstLevel&&0===i&&(n+="k-top "),n+=0===i&&i!=o?"k-top":i==o?"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._dataSourceUids={},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=k(this.refresh,this),this._errorHandler=k(this._error,this),this.dataSource.bind(E,this._refreshHandler),this.dataSource.bind(I,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(E,this._refreshHandler),e.unbind(I,this._errorHandler))},_dataSource:function(e){function t(e){for(var n=0;n1){for(i=1;in.clientHeight&&(i.push(n),o.push(n.scrollTop));while(n!=r);for(p.focusElement(t),e=0;et&&e(o).is(":visible")&&0===e(o).text().toLowerCase().indexOf(n)});return o.eq(0).closest(q)},_click:function(t){var n,i=this,o=e(t.currentTarget),r=d(o.closest(q)),a=o.attr("href");n=a?"#"==a||a.indexOf("#"+this.element.id+"-")>=0:r.length&&!r.children().length,n&&t.preventDefault(),o.hasClass(".k-state-selected")||i._trigger(S,o)||i.select(o)},_wrapper:function(){var e,t,n=this,i=n.element,o="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(o),n.root=t},_getSelectedNode:function(){return this.element.find(".k-state-selected").closest(q)},_group:function(e){var t=this,n=e.hasClass(W),i={firstLevel:n,expanded:n||t._expanded(e)},o=e.children("ul");o.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),t._nodes(o,i)},_nodes:function(t,n){var i,o=this,r=t.children("li");n=m({length:r.length},n),r.each(function(t,r){r=e(r),i={index:t,expanded:o._expanded(r)},s(r),o._updateNodeClasses(r,n,i),o._group(r)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;n&&(e="=s.length?t.appendTo(n):t.insertBefore(s.eq(e))},l),l||(this._updateNodeClasses(n,{},{expanded:!l}),c(n).css("display","block"))},_refreshChildren:function(e,t,n){var i,o,r,a=this.options,l=a.loadOnDemand,d=a.checkboxes&&a.checkboxes.checkChildren;if(c(e).empty(),t.length)for(this._appendItems(n,t,e),o=c(e).children(),l&&d&&this._bubbleIndeterminate(o.last()),i=0;i0&&n&&n.length?(o&&(o[0].id===a&&o.removeAttr("id"),o.find(".k-in:first").removeClass("k-state-focused")),o=i._current=e(n,r).closest(q),o.find(".k-in:first").addClass("k-state-focused"),a=o[0].id||a,a&&(i.wrapper.removeAttr("aria-activedescendant"),o.attr("id",a),i.wrapper.attr("aria-activedescendant",a)),t):(o||(o=i._nextVisible(e())),o)},select:function(n){var i=this,o=i.element;return arguments.length?(n=e(n,o).closest(q),o.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(E),t):o.find(".k-state-selected").closest(q)},_toggle:function(e,t,n){var i,o=this.options,r=d(e),a=n?"expand":"collapse";r.data("animating")||(i=t&&t.loaded(),n&&!i?(o.loadOnDemand&&this._progress(e,!0),r.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:n}),n||r.css("height",r.height()).css("height"),r.kendoStop(!0,!0).kendoAnimate(m({reset:!0},o.animation[a],{complete:function(){n&&r.css("height","")}}))))},toggle:function(t,n){t=e(t),u(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.wrapper.find(".k-checkbox-wrapper :checkbox").off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),e._dataSourceUids={},p.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,n,i){var o,r=p.attr("expanded"),a=n,s=a?"expand":"collapse";return 1==arguments.length?(o=this._dataItem(e),"true"===e.attr(r)||o&&o.expanded):(o=this.dataItem(e),d(e).data("animating")||!i&&this._trigger(s,e)||(a?(e.attr(r,"true"),e.attr("aria-expanded","true")):(e.removeAttr(r),e.attr("aria-expanded","false")),o&&(o.set("expanded",a),a=o.expanded)),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()):u(e).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(e,n){var i=this.dataItem(e),o=this.options[Q.text],r=i.level(),a=o.length,s=o[Math.min(r,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,o){var r,a=this._objectOrSelf(i||n),s=a.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=a.element[0]&&(r=a.dataItem(i),r.loaded()||(a._progress(i,!0),l=r.load()),i!=this.root&&(s=r.children,s&&s instanceof w||(r._initChildren(),r.loaded(!0),s=r.children))),t=this._toObservableData(t),o.call(a,s,t,l)},_toObservableData:function(t){var n,i,o=t;return(X(t)||J(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(p.attr("uid")),o=n.getByUid(i),o&&(o=n.remove(o))),o},_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:r(1),insertBefore:r(0),append:function(t,n,i){var o=this.root;if(!(n&&t instanceof jQuery&&n[0]===t[0]))return n=n&&n.length?n:null,n&&(o=c(n)),this._dataSourceMove(t,o,n,function(t,o,r){function a(){n&&l._expanded(n,!0,!0);var e=t.data(),i=Math.max(e.length,0);return l._insert(e,o,i)}var s,l=this;return r.done(function(){s=a(),(i=i||e.noop)(s)}),s||null})},_remove:function(t,n){var i,o,r,a=this;return t=e(t,a.element),this.angular("cleanup",function(){return{elements:t.get()}}),i=t.parent().parent(),o=t.prev(),r=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(s(i),a._updateNodeClasses(i)),a._updateNodeClasses(o),a._updateNodeClasses(r),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(q)},findByUid:function(t){var n,i,o=this.element.find(".k-item"),r=p.attr("uid");for(i=0;i").attr({tabIndex:-1,"aria-hidden":!0}),this.list=e("
      ").append(this.tree),this._header(),this._noData(),this._footer(),this._reset(),this._popup(),this.popup.one("open",P(this._popupOpen,this)),this._clearButton(),this._filterHeader(),this._treeview(),this._renderFooter(),this._checkAll(),this._enable(),this._toggleCloseVisibility(),this.options.autoBind||(o=n.text||"",this._isNullorUndefined(n.value)?o?this._textAccessor(o):n.placeholder&&this._placeholder(!0):this._preselect(n.value)),a=e(this.element).parents("fieldset").is(":disabled"),a&&this.enable(!1),this._valueMethodCalled=!1,r.notify(this)},_preselect:function(e,t){this._selection._preselect(e,t)},_setTreeViewOptions:function(t){var n={autoBind:t.autoBind,checkboxes:t.checkboxes,dataImageUrlField:t.dataImageUrlField,dataSpriteCssClassField:t.dataSpriteCssClassField,dataTextField:t.dataTextField,dataUrlField:t.dataUrlField,loadOnDemand:t.loadOnDemand};this.options.treeview=e.extend({},n,this.options.treeview),t.template&&(this.options.treeview.template=t.template)},_dataSource:function(){var t=this.options.dataSource;this.dataSource=r.data.HierarchicalDataSource.create(t),t&&e.extend(this.options.treeview,{dataSource:this.dataSource})},_popupOpen:function(){var e=this.popup;e.wrapper=r.wrap(e.element)},_getSelection:function(){return this._isMultipleSelection()?new a.DropDownTree.MultipleSelection(this):new a.DropDownTree.SingleSelection(this)},setDataSource:function(e){this._noInitialValue=!0,this._clearTextAndValue(),this.dataSource=e,this.treeview.setDataSource(e)},_isMultipleSelection:function(){return this.options&&(this.options.treeview.checkboxes||this.options.checkboxes)},options:{name:"DropDownTree",animation:{},autoBind:!0,autoClose:!0,autoWidth:!1,clearButton:!0,dataTextField:"",dataValueField:"",dataImageUrlField:"",dataSpriteCssClassField:"",dataUrlField:"",delay:500,enabled:!0,enforceMinLength:!1,filter:"none",height:200,ignoreCase:!0,index:0,loadOnDemand:!1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found."},minLength:1,checkboxes:!1,noDataTemplate:!0,placeholder:"",checkAll:!1,checkAllTemplate:"Check all",tagMode:"multiple",template:null,text:null,treeview:{},valuePrimitive:!1,footerTemplate:"",headerTemplate:"",value:null,valueTemplate:null,popup:null},events:["open","close","dataBound",F,"select","filtering"],focus:function(){this.wrapper.focus()},dataItem:function(e){return this.treeview.dataItem(e)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._toggleCloseVisibility()},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._toggleCloseVisibility()},toggle:function(e){this._toggle(e)},open:function(){var e=this.popup;this.options.autoBind||this.dataSource.data().length||(this.treeview._progress(!0),this._isFilterEnabled()?this._search():this.dataSource.fetch()),!e.visible()&&this._allowOpening()&&(this._isMultipleSelection()&&e.element.addClass("k-multiple-selection"),e.element.addClass("k-popup-dropdowntree"),e.one("activate",this._focusInputHandler),e._hovered=!0,e.open())},close:function(){this.popup.close()},search:function(t){var n,i=this.options;if(clearTimeout(this._typingTimeout),!i.enforceMinLength&&!t.length||t.length>=i.minLength){if(n=this._getFilter(t),this.trigger("filtering",{filter:n})||e.isArray(this.options.dataTextField))return;this._filtering=!0,this.treeview.dataSource.filter(n)}},_getFilter:function(e){return{field:this.options.dataTextField,operator:this.options.filter,value:e,ignoreCase:this.options.ignoreCase}},refresh:function(){var t=this.treeview.dataSource.flatView();this._renderFooter(),this._renderNoData(),this.filterInput&&this.checkAll&&this.checkAll.toggle(!this.filterInput.val().length),this.tree.toggle(!!t.length),e(this.noData).toggle(!t.length)},setOptions:function(e){s.fn.setOptions.call(this,e),this._setTreeViewOptions(e),this._dataSource(),this.options.treeview&&this.treeview.setOptions(this.options.treeview),e.height&&this.tree&&this.tree.css("max-height",e.height),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),this.span&&(this._isMultipleSelection()||this.span.hasClass("k-readonly"))&&this._placeholder(!0),this._inputTemplate(),this._accessors(),this._filterHeader(),this._checkAll(),this._enable(),e&&(e.enable||e.enabled)&&this.enable(!0),this._clearButton()},destroy:function(){r.ui.Widget.fn.destroy.call(this),this.treeview&&this.treeview.destroy(),this.popup.destroy(),this.wrapper.off(p),this._clear.off(p),this._inputWrapper.off(p),this.filterInput&&this.filterInput.off(p),this.tagList&&this.tagList.off(p),r.unbind(this.tagList),this.options.checkAll&&this.checkAll&&this.checkAll.off(p),this._form&&this._form.off("reset",this._resetHandler)},setValue:function(t){t=e.isArray(t)||t instanceof c?t.slice(0):[t],this._values=t},items:function(){return this.treeview.items()},value:function(e){var n=this;if(e)if(n.filterInput&&n.dataSource._filter)n._filtering=!0,n.dataSource.filter({});else if(!n.dataSource.data().length)return n.dataSource.fetch(function(){n._selection._setValue(e)}),t;return n._selection._setValue(e)},text:function(e){var n,i=this.options.ignoreCase;return e=null===e?"":e,e===t||this._isMultipleSelection()?this._textAccessor():"string"!=typeof e?(this._textAccessor(e),t):(n=i?e:e.toLowerCase(),this._selectItemByText(n),this._textAccessor(n),t)},_header:function(){var n,i=this,o=e(i.header),a=i.options.headerTemplate;return this._angularElement(o,"cleanup"),r.destroy(o),o.remove(),a?(n="function"!=typeof a?r.template(a):a,o=e(n({})),i.header=o[0]?o:null,i.list.prepend(o),this._angularElement(i.header,"compile"),t):(i.header=null,t)},_noData:function(){var n=this,i=e(n.noData),o=n.options.noDataTemplate===!0?n.options.messages.noData:n.options.noDataTemplate;return n.angular("cleanup",function(){return{elements:i}}),r.destroy(i),i.remove(),o?(n.noData=e('').appendTo(n.list),n.noDataTemplate="function"!=typeof o?r.template(o):o,t):(n.noData=null,t)},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.children(":first").html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_footer:function(){var n=this,i=e(n.footer),o=n.options.footerTemplate;return this._angularElement(i,"cleanup"),r.destroy(i),i.remove(),o?(n.footer=e('').appendTo(n.list),n.footerTemplate="function"!=typeof o?r.template(o):o,t):(n.footer=null,t)},_renderFooter:function(){var e=this,t=e.footer;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_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]"))},_adjustListWidth:function(){var e,t,n=this,i=n.list,o=i[0].style.width,r=n.wrapper;if(i.data(v)||!o)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||b(r),e&&_.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),o="border-box"!==i.css("box-sizing")?t-(b(i)-i.width()):t,i.css({fontFamily:r.css("font-family"),width:n.options.autoWidth?"auto":o,minWidth:o,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(v,o),!0},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=o.on("reset",t._resetHandler))},_popup:function(){var e=this;e.popup=new a.Popup(e.list,u({},e.options.popup,{anchor:e.wrapper,open:P(e._openHandler,e),close:P(e._closeHandler,e),animation:e.options.animation,isRtl:g.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_allowOpening:function(){return this.options.noDataTemplate||this.treeview.dataSource.flatView().length},_placeholder:function(e){this.span&&this.span.toggleClass("k-readonly",e).text(e?this.options.placeholder:"")},_currentValue:function(e){var t=this._value(e);return t||0===t||(t=e),t},_checkValue:function(n){var i,o,r,a,s="",l=-1,c=this.value(),u="multiple"===this.options.tagMode;if((n||0===n)&&(n.level&&(n._level=n.level()),s=this._currentValue(n),l=c.indexOf(s)),n.checked){if(i=e.grep(this._tags,function(e){return e.uid===n._tagUid}),i.length)return;o=new d(n.toJSON()),n._tagUid=o.uid,this._tags.push(o),1===this._tags.length&&(this.span.hide(),u||this._multipleTags.push(o)),l===-1&&(c.push(s),this.setValue(c))}else{if(r=this._tags.find(function(e){return e.uid===n._tagUid}),a=this._tags.indexOf(r),a===-1)return this._treeViewCheckAllCheck(n),t;this._tags.splice(a,1),0===this._tags.length&&(this.span.show(),u||this._multipleTags.splice(0,1)),l!==-1&&(c.splice(l,1),this.setValue(c))}this._treeViewCheckAllCheck(n),this._preventChangeTrigger||this._valueMethodCalled||this._noInitialValue||this.trigger(F),this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.focus()),this.popup.position(),this._toggleCloseVisibility(),this._updateSelectedOptions()},_updateSelectedOptions:function(){var e,t,n,i,o;if("select"===this.element[0].tagName.toLowerCase()){if(e=this._tags,t="",n=null,i=null,e.length)for(o=0;o"},_selectValue:function(e){var t="",n="";(e||0===e)&&(e.level&&(e._level=e.level()),n=this._text(e)||e,t=this._currentValue(e)),null===t&&(t=""),this.setValue(t),this._textAccessor(n,e),this._accessor(t),this._valueMethodCalled||this.trigger(F),this._valueMethodCalled=!1,this.options.autoClose&&this.popup.visible()&&(this.close(),this.wrapper.focus()),this.popup.position(),this._toggleCloseVisibility()},_clearClick:function(e){e.stopPropagation(),this._clearTextAndValue()},_clearTextAndValue:function(){this.setValue([]),this._clearInput(),this._clearText(),this._selection._clearValue(),this.popup.position(),this._toggleCloseVisibility()},_clearText:function(){this.options.placeholder?this._placeholder(!0):this.span&&this.span.html("")},_inputTemplate:function(){var t=this.options.valueTemplate;t=t?r.template(t):e.proxy(r.template("#:this._text(data)#",{useWithBlock:!1}),this),this.valueTemplate=t},_assignInstance:function(e,t){var i=this.options.dataTextField,o={};return i?(n(o,i.split(w),e),n(o,this.options.dataValueField.split(w),t),o=new d(o)):o=e,o},_textAccessor:function(n,i){var o,r=this.valueTemplate,a=this.span;if(n===t)return a.text();a.removeClass("k-readonly"),!i&&(e.isPlainObject(n)||n instanceof d)&&(i=n),i||(i=this._assignInstance(n,this._accessor())),o=function(){return{elements:a.get(),data:[{dataItem:i}]}},this.angular("cleanup",o);try{a.html(r(i))}catch(s){a&&a.html("")}this.angular("compile",o)},_accessors:function(){var t=this.element,n=this.options,i=r.getter,o=t.attr(r.attr("text-field")),a=t.attr(r.attr("value-field")),s=function(t){var n,o;return e.isArray(t)?(n=t.length,o=e.map(t,function(e){return function(t){return t[e]}}),function(e){var t=e._level;if(t||0===t)return o[Math.min(t,n-1)](e)}):i(t)};!n.dataTextField&&o&&(n.dataTextField=o),!n.dataValueField&&a&&(n.dataValueField=a),n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value",this._text=s(n.dataTextField),this._value=s(n.dataValueField)},_accessor:function(e,t){return this._accessorInput(e,t)},_accessorInput:function(e){var n=this.element[0];return e===t?n.value:(null===e&&(e=""),n.value=e,t)},_clearInput:function(){var e=this.element[0];e.value=""},_clearButton:function(){var t=this.options.messages.clear;this._clear||(this._clear=e('').attr({role:"button",tabIndex:-1})),this.options.clearButton?(this._clear.insertAfter(this.span),this.wrapper.addClass("k-dropdowntree-clearable")):this.options.clearButton||this._clear.remove()},_toggleCloseVisibility:function(){var e=this.element.attr(y),t=this.value()&&!this._isMultipleSelection()||this.value().length,n=this.element.val()&&this.element.val()!==this.options.placeholder;e||!t&&!n?this._hideClear():this._showClear()},_showClear:function(){this._clear&&this._clear.removeClass(m)},_hideClear:function(){this._clear&&this._clear.addClass(m)},_openHandler:function(e){this._adjustListWidth(),this.trigger(I)?e.preventDefault():(this.wrapper.attr("aria-expanded",!0),this.tree.attr("aria-hidden",!1).attr("role","tree")); },_closeHandler:function(e){this.trigger(M)?e.preventDefault():(this.wrapper.attr("aria-expanded",!1),this.tree.attr("aria-hidden",!0))},_treeview:function(){var e=this;e.options.height&&e.tree.css("max-height",e.options.height),e.tree.attr("id",r.guid()),e.treeview=new l(e.tree,u({},e.options.treeview),e),e.dataSource=e.treeview.dataSource,e.treeview.bind("select",function(t){e.trigger("select",t)})},_treeViewDataBound:function(e){var n,i,o;return e.node&&this._prev&&this._prev.length&&e.sender.expand(e.node),this._filtering?(e.node||(this._filtering=!1),this._isMultipleSelection()||this._deselectItem(e),t):(this.treeview||(this.treeview=e.sender),e.node?(i=e.sender.dataItem(e.node),i&&(o=i.children.data(),this._checkLoadedItems(o))):(n=e.sender.dataSource.data(),this._checkLoadedItems(n),this._noInitialValue&&(this._noInitialValue=!1)),this.trigger("dataBound",e),t)},_deselectItem:function(e){var t,n,i=[];for(e.node?(t=e.sender.dataItem(e.node),t&&(i=t.children.data())):i=e.sender.dataSource.data(),n=0;n',this.filterInput=e('').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.filterInput.on("input",P(this._filterChange,this)),e('').insertBefore(this.tree).append(this.filterInput.add(t)))},_filterChange:function(){this.filterInput&&this._search()},_disableCheckChildren:function(){this._isMultipleSelection()&&this.options.treeview.checkboxes&&this.options.treeview.checkboxes.checkChildren&&(this.options.treeview.checkboxes.checkChildren=!1)},_checkAll:function(){this.checkAll&&(this.checkAll.find(".k-checkbox-label, .k-checkbox").off(p),this.checkAll.remove(),this.checkAll=null),this._isMultipleSelection()&&this.options.checkAll&&(this.checkAll=e('
      Check All
      ').insertBefore(this.tree),this.checkAll.find(".k-checkbox-label").html(r.template(this.options.checkAllTemplate)({instance:this})),this.checkAll.find(".k-checkbox-label").on(E+p,P(this._clickCheckAll,this)),this.checkAll.find(".k-checkbox").on("change"+p,P(this._changeCheckAll,this)).on("keydown"+p,P(this._keydownCheckAll,this)),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[],this._getAllChecked(),this._allItemsAreUnchecked||this._checkCheckAll())},_changeCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");_.msie||_.edge||this._updateCheckAll(t)},_updateCheckAll:function(e){var t=this.checkAll.find(".k-checkbox");this._toggleCheckAllItems(e),t.prop("checked",e),this._disabledCheckedItems.length&&this._disabledUnCheckedItems.length?t.prop("indeterminate",!0):this._disabledCheckedItems.length?t.prop("indeterminate",!e):this._disabledUnCheckedItems.length?t.prop("indeterminate",e):t.prop("indeterminate",!1),this._disabledCheckedItems=[],this._disabledUnCheckedItems=[]},_keydownCheckAll:function(e){var n=e.keyCode,i=e.altKey;return i&&n===f.UP||n===f.ESC?(this.close(),this.wrapper.focus(),e.preventDefault(),t):(n===f.UP&&(this.filterInput?this.filterInput.focus():this.wrapper.focus(),e.preventDefault()),n===f.DOWN&&(this.tree&&this.tree.is(":visible")&&this.tree.focus(),e.preventDefault()),n===f.SPACEBAR&&(_.msie||_.edge)&&(this._clickCheckAll(),e.preventDefault()),t)},_clickCheckAll:function(){var e=this.checkAll.find(".k-checkbox"),t=e.prop("checked");this._updateCheckAll(!t),e.focus()},_dfs:function(e,t,n){for(var i=0;i").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdowntree").addClass(i.className).css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),n.hide().removeAttr("accesskey")},_span:function(){var t,n=this._dropdowntree,i=n.wrapper,o="span.k-input";t=i.find(o),t[0]||(i.append(' ').append(n.element),t=i.find(o)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-select"),n._arrowIcon=n._arrow.find(".k-icon")},_setValue:function(e){var n,i=this._dropdowntree;return e===t||null===e?(n=i._values.slice()[0],e="object"==typeof n?n:i._accessor()||n,e===t||null===e?"":e):(i._valueMethodCalled=!0,0===e.length?(i._clearTextAndValue(),i._valueMethodCalled=!1,t):(i._selectItemByValue(e),i._toggleCloseVisibility(),t))},_clearValue:function(){var e=this._dropdowntree,t=e.treeview.select();e.treeview.dataItem(t)&&(e.treeview.dataItem(t).set("selected",!1),e._valueMethodCalled||e.trigger(F))},_checkLoadedItem:function(e,t){var n=this._dropdowntree;(!n._isNullorUndefined(t)&&""!==t&&n._valueComparer(e,t)||!t&&e.selected)&&n.treeview.select(n.treeview.findByUid(e.uid))}}),o=r.Class.extend({init:function(e){this._dropdowntree=e},_initWrapper:function(){var t=this._dropdowntree;this._tagTemplate(),t.element.attr("multiple","multiple").hide(),this._wrapper(),t._tags=new c([]),t._multipleTags=new c([]),this._tagList(),t.span=e(' ').insertAfter(t.tagList),t._inputWrapper=e(t.wrapper[0].firstChild)},_preselect:function(t,n){var i=this._dropdowntree,o=n||i.options.value;e.isArray(t)||t instanceof r.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof r.data.ObservableObject||!i.options.dataValueField)&&(i.dataSource.data(t),i.value(o))},_tagTemplate:function(){var e=this._dropdowntree,t=e.options,n=t.valueTemplate,i="multiple"===t.tagMode,o=t.messages.singleTag;n=n?r.template(n):e.valueTemplate,e.valueTemplate=function(t){return i?'
    • '+n(t)+'
    • ':'
    •  '+o+"
    • "}},_wrapper:function(){var t=this._dropdowntree,n=t.element,i=n.parent("span.k-dropdowntree");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","").attr({role:"listbox","aria-activedescendant":r.guid(),"aria-haspopup":!0,"aria-expanded":!1}),t._innerWrapper=e(i[0].firstChild)},_tagList:function(){var t,n,i,o=this._dropdowntree,a=o._innerWrapper.children("ul");a[0]||(t="multiple"===o.options.tagMode,n=t?"tags":"multipleTag",a=e('
        ').appendTo(o._innerWrapper)),o.tagList=a,o.tagList.attr("id",r.guid()+"_tagList"),o.wrapper.attr("aria-owns",o.tagList.attr("id")),i=r.observable({multipleTag:o._multipleTags,tags:o._tags,tagTemplate:o.valueTemplate}),r.bind(o.tagList,i),o.tagList.attr("data-stop",!0)},_setValue:function(e){var n=this._dropdowntree,i=n._values;return e===t||null===e?n._values.slice():(n.setValue(e),n._valueMethodCalled=!0,e.length?(this._removeValues(i,e),n._checkItemByValue(e)):n._clearTextAndValue(),n._valueMethodCalled=!1,n._toggleCloseVisibility(),t)},_removeValues:function(e,t){var n,i,o=this._dropdowntree,r=this._getNewValues(e,t);for(n=0;n0,i=!e.ul.find(e.listView.focus()).length;e.popup.visible()||(!e.listView.bound()&&t!==C||t===S?(e._open=!0,e._state=T,1!==e.options.minLength&&!n||n&&e.value()&&e.selectedIndex===-1?(e.refresh(),e._openPopup(),this.options.virtual||e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual?e._focusItem():i&&e.options.highlightFirst&&e.listView.focus(0)))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",A(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===T&&(i._state=""),i._customOption=t,i._options(e,"",i.value()),n&&n[0].selected&&!i.listView._emptySearch&&i._custom(n.val()))},_updateSelection:function(){var n,i=this,o=i.listView,r=i._initialIndex,a=null!==r&&r>-1,s=i._state===C;return s?(e(o.focus()).removeClass("k-state-selected"),t):(i._fetch||(o.value().length||(a?i.select(r):i._accessor()&&o.value(i._accessor())),i._initialIndex=null,n=o.selectedDataItems()[0],n&&(i._value(n)!==i.value()?i._custom(i._value(n)):i._value(n)!==i.element[0].value&&i._accessor(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]===c(),i=e.dataSource.flatView(),o=e.listView.skip(),r=i.length,a=e.dataSource._group?e.dataSource._group.length:0,s=o===t||0===o;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!r),e._toggleHeader(!!a&&!!r),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||(r.value=s,r===c()&&a(r,l,s.length)),t)},text:function(e){var n,i,r,a,s,l;return e=null===e?"":e,n=this,i=n.input[0],r=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(E,"")===e&&(l=n._value(s),l===o.unifyType(n._old,typeof l))?(n._triggerCascade(),t):(r&&(a=a.toLowerCase()),n.dataItem()&&n._text(n.dataItem())===e||(n._select(function(e){return e=n._text(e),r&&(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}),n._toggleCloseVisibility()),t)):(n._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,o=n.listView;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),e===i.value&&n.input.val()===i.text||(n._accessor(e),n._isFilterEnabled()&&o.bound()&&o.isFiltered()?n._clearFilter():n._fetchData(),o.value(e).done(function(){n.selectedIndex!==-1||o._selectedDataItems&&o._selectedDataItems.length||(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n.input.val(),n._state===C&&(n._state=S),n._toggleCloseVisibility()})),t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(_),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)),a=!0;return e.preventDefault(),r&&(a=n._value(r)!==o.unifyType(n.value(),typeof n._value(r)),a||n.input.val(n._text(r))),a&&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,o=i.options,r=i.dataSource,a=o.ignoreCase,s=function(n){var o=i._text(n);if(o!==t)return o+="",(""===o||""!==e)&&(a&&(o=o.toLowerCase()),0===o.indexOf(e))};return a&&(e=e.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(s)),n=this.listView.focus(),n&&(o.suggest&&i.suggest(n),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(r.one(v,function(){r.view()[0]&&i.search(e)}).fetch(),t)},_input:function(){var t,n,i=this,o=i.element.removeClass("k-input")[0],r=o.accessKey,a=i.wrapper,s="input.k-input",c=o.name||"";c&&(c='name="'+c+'_input" '),t=a.find(s),t[0]||(a.append('').append(i.element),t=a.find(s)),t[0].style.cssText=o.style.cssText,t[0].title=o.title,n=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),n>-1&&(t[0].maxLength=n),t.addClass(o.className).css({width:"",height:o.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),l&&t.attr("placeholder",i.options.placeholder),r&&(o.accessKey="",t[0].accessKey=r),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"),o.id&&i._arrow.attr("aria-controls",i.ul[0].id)},_clearButton:function(){o.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t,n,i,r=this,a=e.keyCode;if(r._last=a,clearTimeout(r._typingTimeout),r._typingTimeout=null,a===d.HOME)r._firstItem();else if(a===d.END)r._lastItem();else if(a===d.ENTER||a===d.TAB&&r.popup.visible())if(t=r.listView.focus(),n=r.dataItem(),i=!0,r.popup.visible()||n&&r.text()===r._text(n)||(t=null),t){if(r.popup.visible()&&e.preventDefault(),n=r.listView.dataItemByIndex(r.listView.getElementIndex(t)),n&&(i=r._value(n)!==o.unifyType(r.value(),typeof r._value(n))),i&&r.trigger("select",{dataItem:n,item:t}))return;r._userTriggered=!0,r._select(t).done(function(){r._blur(),r._valueBeforeCascade=r._old=r.value()})}else(r._syncValueAndText()||r._isSelect)&&r._accessor(r.input.val()),r.listView.value(r.input.val()),r._blur();else a==d.TAB||r._move(e)?a===d.ESC&&!r.popup.visible()&&r.text()&&r._clearValue():r._search()},_placeholder:function(e){if(!l){var n,i=this,o=i.input,r=i.options.placeholder;if(r){if(n=i.value(),e===t&&(e=!n),o.toggleClass("k-readonly",e),!e){if(n)return;r=""}o.val(r),r||o[0]!==c()||a(o[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typingTimeout),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").addClass(t[0].className).css("display","")},_clearSelection:function(e,t){var n=this,i=e.value(),o=i&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!i||o)&&(n.options.value="",n.value(""),n._selectedValue=null)},_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(I)}(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,o=i.ui,r=o.List,a=e.extend({A:65},i.keys),s=i._activeElement,l=i.data.ObservableArray,c=e.proxy,d="id",u="li",h="accept",p="filter",f="rebind",g="open",m="close",v="change",_="progress",b="select",w="deselect",k="aria-disabled",y="k-state-focused",x="k-state-selected",C="k-hidden",S="k-state-hover",T="k-state-disabled",D="k-no-click",A="disabled",E="readonly",I="off",M=".kendoMultiSelect",F="click"+M,R="keydown"+M,P="mouseenter"+M,z="mouseleave"+M,B=P+" "+z,L=/"/g,H=e.isArray,N=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],O=r.extend({init:function(t,n){var o,a,s=this;s.ns=M,r.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")),o=t.attr(d),o&&(s._tagID=o+"_tag_active",o+="_taglist",s.tagList.attr(d,o),s.input.attr("aria-describedby",o)),s._initialOpen=!0,s._ariaLabel(),s._ariaSetLive(),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),s._ariaSetSize(s.value().length),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,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found."},enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,autoWidth:!1,popup:null},events:[g,m,v,b,w,"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);r.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(d)),this._tagTemplate(),this._placeholder(),this._clearButton()},currentTag:function(e){var n=this;return e===t?n._currentTag:(n._currentTag&&(n._currentTag.removeClass(y).removeAttr(d),n._currentTag.find(".k-select").attr("aria-hidden",!0),n.input.removeAttr("aria-activedescendant")),e&&(e.addClass(y).attr(d,n._tagID),e.find(".k-select").removeAttr("aria-hidden"),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),r.fn.destroy.call(e)},_activateItem:function(){this.popup.visible()&&r.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var n=this,o=r.fn._listOptions.call(n,e.extend(t,{selectedItemChange:c(n._selectedItemChange,n),selectable:"multiple"})),a=this.options.itemTemplate||this.options.template,s=o.itemTemplate||a||o.template;return s||(s="#:"+i.expr(o.dataTextField,"data")+"#"),o.template=s,o},_setListValue:function(){r.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n,i=this.dataSource.flatView(),o=this._optionsMap,r=this._value;for(this._state===f&&(this._state=""),n=0;nr&&(e=e.slice(0,r)),a&&n._clearFilter(),i.value(e),n._old=n._valueBeforeCascade=e.slice(),a||n._fetchData(),n._ariaSetSize(n.value().length),n._toggleCloseVisibility(),t)},_preselect:function(t,n){var o=this;H(t)||t instanceof i.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof i.data.ObservableObject||!o.options.dataValueField)&&(o.dataSource.data(t),o.value(n||o._initialValues),o._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,o=n.dataSource||{};o=H(o)?{data:o}:o,o.select=t,o.fields=[{field:n.dataTextField},{field:n.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=c(e._showBusy,e),e._errorHandler=c(e._hideBusy,e)),e.dataSource=i.data.DataSource.create(o).bind(_,e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initialValues),t._placeholder()})},t._form=o.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)}):H(t)||t instanceof l?H(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.popup.position(),e._ariaSetSize(t.length),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 o,r,s,l,c=this,d=n.keyCode,u=c._currentTag,p=c.listView,f=c.input.val(),g=i.support.isRtl(c.wrapper),m=c.popup.visible(),v=0;if(d!==a.ENTER&&(this._multipleSelection=!1),d===a.DOWN){if(n.preventDefault(),!m)return c.open(),p.focus()||p.focusFirst(),t;p.focus()?(!c._activeItem&&n.shiftKey&&(c._activeItem=p.focus(),v=-1),o=p.getElementIndex(c._getActiveItem().first()),p.focusNext(),p.focus()?n.shiftKey&&(this._multipleSelection=!0,c._selectRange(o,p.getElementIndex(p.focus().first())+v)):p.focusLast()):p.focusFirst()}else if(d===a.UP)m&&(!c._activeItem&&n.shiftKey&&(c._activeItem=p.focus(),v=1),o=p.getElementIndex(c._getActiveItem().first()),p.focusPrev(),p.focus()?n.shiftKey&&(this._multipleSelection=!0,c._selectRange(o,p.getElementIndex(p.focus().first())+v)):c.close()),n.preventDefault();else if(d===a.LEFT&&!g||d===a.RIGHT&&g)f||(u=u?u.prev():e(c.tagList[0].lastChild),u[0]&&c.currentTag(u));else if(d===a.RIGHT&&!g||d===a.LEFT&&g)!f&&u&&(u=u.next(),c.currentTag(u[0]?u:null));else if(n.ctrlKey&&!n.altKey&&d===a.A&&m&&!c.options.virtual)this._multipleSelection=!0,this._getSelectedIndices().length===p.items().length&&(c._activeItem=null),p.items().length&&c._selectRange(0,p.items().length-1);else if(d===a.ENTER&&m){if(!p.focus())return;if(n.preventDefault(),this._multipleSelection&&(this._multipleSelection=!1,p.focus().hasClass(x)))return c._close(),t;c._select(p.focus()).done(function(){c._change(),c._close()})}else if(d===a.SPACEBAR&&n.ctrlKey&&m)c._activeItem&&p.focus()&&p.focus()[0]===c._activeItem[0]&&(c._activeItem=null),e(p.focus()).hasClass(x)||(c._activeItem=p.focus()),c._select(p.focus()).done(function(){c._change()}),n.preventDefault();else if(d===a.SPACEBAR&&n.shiftKey&&m)r=p.getElementIndex(c._getActiveItem()),s=p.getElementIndex(p.focus()),r!==t&&s!==t&&c._selectRange(r,s),n.preventDefault();else if(d===a.ESC)m?n.preventDefault():(c.tagList.children().each(function(t,n){c._removeTag(e(n),!1)}),c._change()),c.close();else if(d===a.HOME)m?p.focus()?(n.ctrlKey&&n.shiftKey&&!c.options.virtual&&c._selectRange(p.getElementIndex(p.focus()[0]),0),p.focusFirst()):c.close():f||(u=c.tagList[0].firstChild,u&&c.currentTag(e(u)));else if(d===a.END)m?p.focus()?(n.ctrlKey&&n.shiftKey&&!c.options.virtual&&c._selectRange(p.getElementIndex(p.focus()[0]),p.element.children().length-1),p.focusLast()):c.close():f||(u=c.tagList[0].lastChild,u&&c.currentTag(e(u)));else if(d!==a.DELETE&&d!==a.BACKSPACE||f)!c.popup.visible()||d!==a.PAGEDOWN&&d!==a.PAGEUP?(clearTimeout(c._typingTimeout),setTimeout(function(){c._scale()}),c._search()):(n.preventDefault(),l=d===a.PAGEDOWN?1:-1,p.scrollWith(l*p.screenHeight()));else{if(c._state=h,"single"===c.options.tagMode)return c._clearSingleTagValue(),c._change(),c._close(),t;d!==a.BACKSPACE||u||(u=e(c.tagList[0].lastChild)),u&&u[0]&&c._removeTag(u,!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(c(e._showBusyHandler,e),100))},_placeholder:function(e,n){var o=this,r=o.input,a=s(),l=o.options.placeholder,c=r.val(),d=r[0]===a,u=c.length;d&&!o.options.autoClose&&c!==l||(u=0,c=""),e===t&&(e=!1,r[0]!==a&&(e=!o.listView.selectedDataItems()[0])),o._prev=c,r.toggleClass("k-readonly",e).val(e?l:c),d&&!n&&i.caret(r[0],u,u),o._scale()},_scale:function(){var e,t=this,n=t.wrapper.find(".k-multiselect-wrap"),i=n.width(),o=t._span.text(t.input.val());n.is(":visible")?e=o.width()+25:(o.appendTo(document.documentElement),i=e=o.width()+25,o.appendTo(n)),t.input.width(e>i?i:e)},_option:function(e,n,o){var r=""},_render:function(e){var t,n,i,o,r,a,s=this.listView.selectedDataItems(),l=this.listView.value(),c=e.length,d="";for(l.length!==s.length&&(s=this._buildSelectedItems(l)),r={},a={},o=0;othis.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.added&&this.persistTagList.added.length===t.length&&this.persistTagList.removed&&this.persistTagList.removed.length===e.length?this.persistTagList=!1:(this.listView._removedAddedIndexes=this._old.slice(),this.persistTagList={added:e,removed:t})},_selectValue:function(e,n){var i,o,r,a=this,s=a.dataSource.total(),l=a.tagList,c=a._value;if(this.persistTagList)return this.updatePersistTagList(e,n),t;if(a._angularTagItems("cleanup"),"multiple"===a.options.tagMode){for(r=n.length-1;r>-1;r--)i=n[r],l.children().length&&(l[0].removeChild(l[0].children[i.position]),a._setOption(c(i.dataItem),!1));for(r=0;r-1;r--)a._setOption(c(n[r].dataItem),!1);for(r=0;r=i;o--)d.push(o);for(null!==l&&d.length>l&&(d=d.slice(0,l)),o=0;o').appendTo(t._innerWrapper)),n.removeAttr("accesskey"),t._focused=t.input=o.attr({accesskey:i,autocomplete:I,role:"listbox",title:n[0].title,"aria-expanded":!1,"aria-haspopup":"listbox","aria-autocomplete":"list"})},_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,o=n.tagTemplate,r=n.dataSource,a="multiple"===n.tagMode,s=n.messages.singleTag;t.element[0].length&&!r&&(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# "+s),t.tagTextTemplate=o=o?i.template(o):e,t.tagTemplate=function(e){return'
        • '+o(e)+'
        • '}},_loader:function(){this._loading=e('').insertAfter(this.input)},_clearButton:function(){r.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],N);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)},_ariaSetSize:function(e){var t=this,n=t.tagList.children();e&&n.length&&n.attr("aria-setsize",e)},_ariaSetLive:function(){var e=this;e.ul.attr("aria-live",e._isFilterEnabled()?"polite":"off")}});o.plugin(O)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multicolumncombobox.min",["kendo.combobox.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,o=i.ComboBox,r=/^\d+(\.\d+)?%$/i,a="k-dropdowngrid",s="k-dropdowngrid-popup k-popup-flush",l=o.extend({init:function(e,t){o.fn.init.call(this,e,t),this.list.addClass(s),this._allColumnsWidthsAreSet(this.options)?this.list.width(this._calculateDropDownWidth(this.options)):this.options.dropDownWidth&&this.list.width(this.options.dropDownWidth)},options:{name:"MultiColumnComboBox",ns:".kendoMultiColumnComboBox",columns:[],dropDownWidth:null,filterFields:[]},setOptions:function(e){o.fn.setOptions.call(this,e),this._allColumnsWidthsAreSet(e)?this.list.width(this._calculateDropDownWidth(e)):this.options.dropDownWidth&&this.list.width(this.options.dropDownWidth)},_allColumnsWidthsAreSet:function(e){var t,n,i=e.columns;if(!i||!i.length)return!1;for(t=0;t
          "}function i(e,t,n,i){var o="";return o=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 o(e,t){var n,i="
            ",o=S.floor(d(t/e.smallStep))+1;for(n=0;n ";return i+="
          "}function r(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return"
          "+(n>1?"":"")+"
          "}function a(e){return function(t){return t+e}}function s(e){return function(){return e}}function l(e){return(e+"").replace(".",g.cultures.current.numberFormat["."])}function c(e){var t=""+e,n=0;return t=t.split("."),t[1]&&(n=t[1].length),n=n>10?10:n}function d(e){var t,n;return e=parseFloat(e,10),t=c(e),n=S.pow(10,t||0),S.round(e*n)/n}function u(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,g=window.kendo,m=g.ui.Widget,v=g.ui.Draggable,_=g._outerWidth,b=g._outerHeight,w=e.extend,k=g.format,y=g.parseFloat,x=e.proxy,C=e.isArray,S=Math,T=g.support,D=T.pointers,A=T.msPointers,E="change",I="slide",M=".slider",F="touchstart"+M+" mousedown"+M,R=D?"pointerdown"+M:A?"MSPointerDown"+M:F,P="touchend"+M+" mouseup"+M,z=D?"pointerup":A?"MSPointerUp"+M:P,B="moveSelection",L="keydown"+M,H="click"+M,N="mouseover"+M,O="focus"+M,V="blur"+M,W=".k-draghandle",U=".k-slider-track",q=".k-tick",j="k-state-selected",G="k-state-focused",$="k-state-default",Y="k-state-disabled",K="disabled",Q="undefined",X="tabindex",J=g.getTouches,Z=m.extend({init:function(e,t){var n,i=this;if(m.fn.init.call(i,e,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&g.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=g.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)},g.notify(i)},events:[E,I],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return d(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),r=t._calculateItemsWidth(S.floor(t._distance()/n.smallStep));"none"!=n.tickPlacement&&i>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(o(n,t._distance())),t._setItemsWidth(r),t._setItemsTitle()),t._calculateSteps(r),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.smallStep&&t._setItemsLargeTick()},getSize:function(){return g.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,o=i.options,r=0,a=t.length-1,s=i.wrapper.find(q),l=0,c=2,d=s.length,u=0;for(n=0;n=3)for(o._isHorizontal||o._isRtl||(a=e.makeArray(a).reverse()),s=0;s"+t.attr("title")+""),0!==s&&s!==a.length-1&&t.css("line-height",t[o._sizeFn]()+"px"))},_calculateItemsWidth:function(e){var t,n,i,o=this,r=o.options,a=parseFloat(o._trackDiv.css(o._sizeFn))+1,s=o._distance(),l=a/s;for(s/r.smallStep-S.floor(s/r.smallStep)>0&&(a-=s%r.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(B,{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=d(e),isNaN(e)?(n._update(i.min),t):(e=S.max(S.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[S.max(0,S.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(M).find(".k-button").off(M).end().find(W).off(M).end().find(q+", "+U).off(M).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});ee.Selection=function(e,t,n){function i(i){var o=i-n.min,r=t._valueIndex=S.ceil(d(o/n.smallStep)),a=parseInt(t._pixelSteps[r],10),s=t._trackDiv.find(".k-slider-selection"),l=parseInt(t._outerSize(e)/2,10),c=t._isRtl?2:0;s[t._sizeFn](t._isRtl?t._maxSelection-a:a),e.css(t._position,a-l-c)}i(n.value),t.bind([I,B],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 o=this;o.owner=n,o.options=i,o.element=e,o.type=t,o.draggable=new v(e,{distance:0,dragstart:x(o._dragstart,o),drag:x(o.drag,o),dragend:x(o.dragend,o),dragcancel:x(o.dragcancel,o)}),e.click(!1),e.on("dragstart",function(e){e.preventDefault()})},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,o=i.owner,r=i.options;return r.enabled?(this.owner._activeDragHandle=this,o.element.off(N),o.wrapper.find("."+G).removeClass(G+" "+j),i.element.addClass(G+" "+j),e(document.documentElement).css("cursor","pointer"),i.dragableArea=o._getDraggableArea(),i.step=S.max(r.smallStep*(o._maxSelection/o._distance()),0),i.type?(i.selectionStart=r.selectionStart,i.selectionEnd=r.selectionEnd,o._setZIndex(i.type)):i.oldVal=i.val=r.value,i._removeTooltip(!0),i._createTooltip(),t):(n.preventDefault(),t)},_createTooltip:function(){var t,n,i=this,o=i.owner,r=i.options.tooltip,a="",s=e(window);r.enabled&&(r.template&&(t=i.tooltipTemplate=g.template(r.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("
          ").appendTo(document.body),a=o._getFormattedValue(i.val||o.value(),i),i.type||(n="k-callout-"+(o._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,o=e.x.location,r=e.y.location,a=n.dragableArea.startPoint,s=n.dragableArea.endPoint;e.preventDefault(),n.val=i._isHorizontal?i._isRtl?n.constrainValue(o,a,s,o=s):n.constrainValue(r,s,a,r<=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(I,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n=t.options,i=n.tooltip,o="";i.enabled&&(t.tooltipDiv||t._createTooltip(),o=t.owner._getFormattedValue(d(e),t),t.type||(o+=t.tooltipInnerDiv),t.tooltipDiv.html(o),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(N),!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,o,r=this,a=r.owner,s=0,l=0,c=r.element,d=g.getOffset(c),u=8,h=e(window),p=r.tooltipDiv.find(".k-callout"),f=_(r.tooltipDiv),m=b(r.tooltipDiv);r.type?(t=a.wrapper.find(W),d=g.getOffset(t.eq(0)),n=g.getOffset(t.eq(1)),a._isHorizontal?(s=n.top,l=d.left+(n.left-d.left)/2):(s=d.top+(n.top-d.top)/2,l=n.left),o=_(t.eq(0))+2*u):(s=d.top,l=d.left,o=_(c)+2*u),a._isHorizontal?(l-=parseInt((f-a._outerSize(c))/2,10),s-=m+u+(p.length?p.height():0)):(s-=parseInt((m-a._outerSize(c))/2,10),l-=f+u+(p.length?p.width():0)),a._isHorizontal?(i=r._flip(s,m,o,b(h)+r._scrollOffset.top),s+=i,l+=r._fit(l,f,_(h)+r._scrollOffset.left)):(i=r._flip(l,f,o,_(h)+r._scrollOffset.left),s+=r._fit(s,m,b(h)+r._scrollOffset.top),l+=i),i>0&&p&&(p.removeClass(),p.addClass("k-callout k-callout-"+(a._isHorizontal?"n":"w"))),r.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 o=0;return e+t>i&&(o+=-(n+t)),e+o<0&&(o+=n+t),o},constrainValue:function(e,t,n,i){var o=this,r=0;return r=to.selectionEnd?(c=r.selectionStart,d=s,u=o._lastHandleDrag):s-r.selectionStart<=r.selectionEnd-s?(c=s,d=r.selectionEnd,u=o._firstHandleDrag):(c=r.selectionStart,d=s,u=o._lastHandleDrag),u.dragstart(n),o._setValueInRange(c,d),o._focusWithMouse(u.element)}},o.wrapper.find(q+", "+U).on(R,i).end().on(R,function(){e(document.documentElement).one("selectstart",g.preventDefault)}).on(z,function(){o._activeDragHandle&&o._activeDragHandle._end()}),o.wrapper.find(W).attr(X,0).on(P,function(){o._setTooltipTimeout()}).on(H,function(e){o._focusWithMouse(e.target),e.preventDefault()}).on(O,x(o._focus,o)).on(V,x(o._blur,o)),o.wrapper.find(W).off(L,g.preventDefault).eq(0).on(L,x(function(e){this._keydown(e,"firstHandle")},o)).end().eq(1).on(L,x(function(e){this._keydown(e,"lastHandle")},o)),o.options.enabled=!0)},disable:function(){var e=this;e.wrapper.removeClass($).addClass(Y),e.wrapper.find("input").prop(K,K),e.wrapper.find(q+", "+U).off(R).off(z),e.wrapper.find(W).attr(X,-1).off(P).off(L).off(H).off(O).off(V),e.options.enabled=!1},_keydown:function(e,t){var n,i,o,r=this,a=r.options.selectionStart,s=r.options.selectionEnd;e.keyCode in r._keyMap&&(r._clearTooltipTimeout(),"firstHandle"==t?(o=r._activeHandleDrag=r._firstHandleDrag,a=r._keyMap[e.keyCode](a),a>s&&(s=a)):(o=r._activeHandleDrag=r._lastHandleDrag,s=r._keyMap[e.keyCode](s),a>s&&(a=s)),r._setValueInRange(d(a),d(s)),n=Math.max(a,r.options.selectionStart),i=Math.min(s,r.options.selectionEnd),o.selectionEnd=Math.max(i,r.options.selectionStart),o.selectionStart=Math.min(n,r.options.selectionEnd),o._updateTooltip(r.value()[r._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),o=i[0]!=e||i[1]!=t;n.value([e,t]),o&&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,o=i.options,r=o.selectionStart,a=o.selectionEnd;return isNaN(e)&&isNaN(n)?[r,a]:(e=d(e),n=d(n),e>=o.min&&e<=o.max&&n>=o.min&&n<=o.max&&e<=n&&(r==e&&a==n||(i.element.find("input").eq(0).prop("value",l(e)).end().eq(1).prop("value",l(n)),o.selectionStart=e,o.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(B,{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,o=i.wrapper.find(W),r=i._activeHandleDrag;n=i._getFormattedValue([e,t],r),o.eq(0).attr("aria-valuenow",e),o.eq(1).attr("aria-valuenow",t),o.attr("aria-valuetext",n)},_setValueInRange:function(e,t){var n=this.options;e=S.max(S.min(e,n.max),n.min),t=S.max(S.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(S.min(e,t),S.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,o=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===o||isNaN(o)?t.max:o)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(M).find(q+", "+U).off(M).end().find(W).off(M),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),f.Selection=function(e,t,n){function i(i){i=i||[];var r=i[0]-n.min,a=i[1]-n.min,s=S.ceil(d(r/n.smallStep)),l=S.ceil(d(a/n.smallStep)),c=t._pixelSteps[s],u=t._pixelSteps[l],h=parseInt(t._outerSize(e.eq(0))/2,10),p=t._isRtl?2:0;e.eq(0).css(t._position,c-h-p).end().eq(1).css(t._position,u-h-p),o(c,u)}function o(e,n){var i,o,r=t._trackDiv.find(".k-slider-selection");i=S.abs(e-n),r[t._sizeFn](i),t._isRtl?(o=S.max(e,n),r.css("right",t._maxSelection-o-1)):(o=S.min(e,n),r.css(t._position,o-1))}i(t.value()),t.bind([E,I,B],function(e){i(e.values)})},g.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=d(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 o(e,t,n){var i,o;return e=Array.prototype.slice.call(e),i=e.length,o=e.indexOf(t),o<0?n<0?e[i-1]:e[0]:(o+=n,o<0?o+=i:o%=i,e[o])}function r(e){e.preventDefault()}function a(e,t){return function(){return e.apply(t,arguments)}}var s=window.kendo,l=s.ui,c=l.Widget,d=s.parseColor,u=s.Color,h=s.keys,p="background-color",f="k-state-selected",g="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",m="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",w="click"+b,k="keydown"+b,y=s.support.browser,x=y.msie&&y.version<9,C=c.extend({init:function(e,t){var n,i=this;c.fn.init.call(i,e,t),e=i.element,t=i.options,i._value=t.value=d(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=d(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,c.fn.destroy.call(this)},_updateUI:e.noop,_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}}),S=C.extend({init:function(t,n){var i,o,r,l,c=this;if(C.fn.init.call(c,t,n),t=c.wrapper=c.element,n=c.options,i=n.palette,"websafe"==i?(i=m,n.columns=18):"basic"==i&&(i=g),"string"==typeof i&&(i=i.split(",")),e.isArray(i)&&(i=e.map(i,function(e){return d(e)})),c._selectedID=(n.ariaId||s.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(c._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:c._value,id:n.ariaId}))).on(w,".k-item",function(t){c._select(e(t.currentTarget).css(p))}).attr("tabIndex",c._tabIndex).on(k,a(c._keydown,c)),o=n.tileSize){if(/number|string/.test(typeof o))r=l=parseFloat(o);else{if("object"!=typeof o)throw Error("Unsupported value for the 'tileSize' argument");r=parseFloat(o.width),l=parseFloat(o.height)}t.find(".k-item").css({width:r,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),c=t.keyCode;if(c==h.LEFT?n=o(s,l,-1):c==h.RIGHT?n=o(s,l,1):c==h.DOWN?n=o(s,l,this.options.columns):c==h.UP?n=o(s,l,-this.options.columns):c==h.ENTER?(r(t),l&&this._select(e(l).css(p))):c==h.ESC&&this._cancel(),n){r(t),this._current(n);try{i=d(n.css(p)),this._triggerSelect(i)}catch(u){}}},_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=d(e(this).css(p));if(i&&i.equals(t))return n=this,!1}),this._current(n)},_template:s.template('
      ',l+=this.title(e.date,e.min,e.max),l+='
      ":' class="k-out-of-range">')+(r||"")+"'+(o||"#= data.weekNumber #")+"
      # for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # # } ## } #')}),T=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-alpha-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||d("#f00")),t.find("input.k-color-value").on(k,function(t){var n,o,r=this;if(t.keyCode==h.ENTER)try{n=d(r.value),o=i.color(),i._select(n,n.equals(o))}catch(a){e(r).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=d(r.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(w,".k-controls button.apply",function(){i.options._clearedColor?i.trigger("change"):i._select(i._getHSV())}).on(w,".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,o=i.find(".k-hue-slider"),r=i.find(".k-alpha-slider");o.attr("aria-label","hue saturation"),n._hueSlider=o.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),r.attr("aria-label","opacity"),n._opacitySlider=r.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,o=e-i.left,r=n-i.top,a=this.width,s=this.height;o=o<0?0:o>a?a:o,r=r<0?0:r>s?s:r,t._svChange(o/a,1-r/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),o=i.find(".k-draghandle").attr("tabIndex",0).on(k,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(),o.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),o.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=o},_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 o=i._getHSV();o[t]+=n*(e.shiftKey?.01:.05),o[t]<0&&(o[t]=0),o[t]>1&&(o[t]=1),i._updateUI(o),r(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),r(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 o=this._hsvRect,r=o.width(),a=o.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/r),null==n&&(n=1-s.top/a),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),u.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,u.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=c.extend({init:function(t,n){var i,o,r,a,s,l=this;c.fn.init.call(l,t,n),n=l.options,t=l.element,i=t.attr("value")||t.val(),i=i?d(i,!0):d(n.value,!0),l._value=n.value=i,o=l.wrapper=e(l._template(n)),t.hide().after(o),t.is("input")&&(t.appendTo(o),r=t.closest("label"),a=t.attr("id"),a&&(r=r.add('label[for="'+a+'"]')),r.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),o.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,c.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),o=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),o.off(b).on("mousedown"+b,r),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(k,a(t._keydown,t)).on(w,".k-select",a(t.toggle,t)).on(w,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),r(e)):t!=h.ENTER&&t!=h.DOWN||(this.open(),r(e))},_getPopup:function(){var t,i,o,r,a=this,l=a._popup;return l||(t=a.options,i=t.palette?S:T,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,o=s.guid(),r=a._selector=new i(e('
      ').appendTo(document.body),t),a.wrapper.attr("aria-owns",o),a._popup=l=r.wrapper.kendoPopup({anchor:a.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),r.element.find(".k-clear-color").kendoButton({icon:"reset-color",click:function(e){r.options._clearedColor=!0,a.value(null),a.element.val(null),a._updateUI(null),r._colorAsText.val(""),r._hsvHandle.css({top:"0px",left:"0px"}),r._selectedColor.css(p,v),a.trigger("change",{value:a.value()}),e.preventDefault()}}),r.bind({select:function(e){a._updateUI(d(e.value)),delete r.options._clearedColor},change:function(){r.options._clearedColor||a._select(r.color()),a.close()},cancel:function(){r.options._clearedColor&&!a.value()&&r.value()&&a._select(r.color(),!0),a.close()}}),l.bind({close:function(e){var t,i,o,s;return a.trigger("close")?(e.preventDefault(),n):(a.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=r._selectOnHide(),i=r.value(),o=a.value(),s=r.options,t?s._clearedColor&&!o||a._select(t):(setTimeout(function(){a.wrapper&&!a.wrapper.is("[unselectable='on']")&&a.wrapper.focus()}),!s._closing&&s._clearedColor&&!o&&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(){r._select(a.color(),!0),r.focus(),a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),l}});l.plugin(S),l.plugin(T),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 o=window.kendo,r=o.caret,a=o.keys,s=o.ui,l=s.Widget,c=o._activeElement,d=o._extractFormat,u=o.parseFloat,h=o.support.placeholder,p=o.getCulture,f="change",g="disabled",m="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",w="touchend",k="mouseleave"+b,y="mouseenter"+b+" "+k,x="k-state-default",C="k-state-focused",S="k-state-hover",T="focus",D=".",A="k-icon",E="k-state-selected",I="k-state-disabled",M="k-state-invalid",F="aria-disabled",R=/^(-)?(\d*)$/,P=null,z=e.proxy,B=e.extend,L=l.extend({init:function(n,i){var r,a,s,c,u,h,p=this,f=i&&i.step!==t;l.fn.init.call(p,n,i),i=p.options,n=p.element.on("focusout"+b,z(p._focusout,p)).attr("role","spinbutton"),i.placeholder=i.placeholder||n.attr("placeholder"),r=p.min(n.attr("min")),a=p.max(n.attr("max")),s=p._parse(n.attr("step")),i.min===P&&r!==P&&(i.min=r),i.max===P&&a!==P&&(i.max=a),f||s===P||(i.step=s),p._initialOptions=B({},i),h=n.attr("type"),p._reset(),p._wrapper(),p._arrows(),p._validation(),p._input(),o.support.mobileOS?p._text.on(w+b+" "+T+b,function(){o.support.browser.edge?p._text.one(T+b,function(){p._toggleText(!1),n.focus()}):(p._toggleText(!1),n.focus())}):p._text.on(T+b,z(p._click,p)),n.attr("aria-valuemin",i.min!==P?i.min*i.factor:i.min).attr("aria-valuemax",i.max!==P?i.max*i.factor:i.max),i.format=d(i.format),c=i.value,c==P&&(c="number"==h?parseFloat(n.val()):n.val()),p.value(c),u=n.is("[disabled]")||e(p.element).parents("fieldset").is(":disabled"), u?p.enable(!1):p.readonly(n.is("[readonly]")),p.angular("compile",function(){return{elements:p._text.get()}}),o.notify(p)},options:{name:"NumericTextBox",decimals:P,restrictDecimals:!1,min:P,max:P,value:P,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,o=e.readonly,r=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),o||i?(a.addClass(i?I:x).removeClass(i?x:I),r.attr(g,i).attr(m,o).attr(F,i)):(a.addClass(x).removeClass(I).on(y,t._toggleHover),r.removeAttr(g).removeAttr(m).attr(F,!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,z(t._keydown,t)).on("keypress"+b,z(t._keypress,t)).on("keyup"+b,z(t._keyup,t)).on("paste"+b,z(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)})},setOptions:function(e){var n=this;l.fn.setOptions.call(n,e),n._arrowsWrap.toggle(n.options.spinners),n._inputWrapper.toggleClass("k-expand-padding",!n.options.spinners),n._text.prop("placeholder",n.options.placeholder),n._placeholder(n.options.placeholder),n.element.attr({"aria-valuemin":n.options.min!==P?n.options.min*n.options.factor:n.options.min,"aria-valuemax":n.options.max!==P?n.options.max*n.options.factor:n.options.max}),n.options.format=d(n.options.format),e.value!==t&&n.value(e.value)},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,o=n.max;return e===P?e:(i!==P&&eo&&(e=o),e)},_arrows:function(){var t,i=this,r=function(){clearTimeout(i._spinning),t.removeClass(E)},a=i.options,s=a.spinners,l=i.element;t=l.siblings("."+A),t[0]||(t=e(n("increase",a.upArrowText)+n("decrease",a.downArrowText)).insertAfter(l),i._arrowsWrap=t.wrapAll('').parent()),s||(t.parent().toggle(s),i._inputWrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),i._upArrowEventHandler=new o.UserEvents(i._upArrow,{release:r}),i._downArrow=t.eq(1),i._downArrowEventHandler=new o.UserEvents(i._downArrow,{release:r})},_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,o,a=e.target,s=r(a)[0],l=a.value.substring(0,s),c=t._format(t.options.format),d=c[","],u=0;d&&(i=RegExp("\\"+d,"g"),o=RegExp("(^(-)$)|(^(-)?([\\d\\"+d+"]+)(\\"+c[D]+")?(\\d+)?)")),o&&(n=o.exec(l)),n&&(u=n[0].replace(i,"").length,l.indexOf("(")!=-1&&t._value<0&&u++),t._focusin(),r(t.element[0],u)})},_change:function(e){var t=this,n=t.options.factor;n&&1!==n&&(e=o.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(S),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,o="k-formatted-value",r=n.element.addClass(v).show()[0],a=r.accessKey,s=n.wrapper;t=s.find(D+o),t[0]||(t=e('').insertBefore(r).addClass(o));try{r.setAttribute("type","text")}catch(l){r.type="text"}t[0].title=r.title,t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",i.placeholder),a&&(t.attr("accesskey",a),r.accessKey=""),n._text=t.addClass(r.className).attr({role:"spinbutton","aria-valuemin":i.min!==P?i.min*i.factor:i.min,"aria-valuemax":i.max!==P?i.max*i.factor:i.max,autocomplete:"off"})},_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()):n!=a.TAB&&(t._typing=!0)},_keypress:function(e){var t,n,i,o,s,l,c,d,u,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,o=r(i),s=o[0],l=o[1],c=String.fromCharCode(e.which),d=t._format(t.options.format),u=t._key===a.NUMPAD_DOT,h=i.val(),u&&(c=d[D]),h=h.substring(0,s)+c+h.substring(l),p=t._numericRegex(d).test(h),p&&u?(i.val(h),r(i,s+c.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(M),e._validationIcon.show()},_removeInvalidState:function(){var e=this;e._inputWrapper.removeClass(M),e._validationIcon.hide()},_numericRegex:function(e){var t=this,n=e[D],i=t.options.decimals,o="*";return n===D&&(n="\\"+n),i===P&&(i=e.decimals),0===i&&t.options.restrictDecimals?R:(t.options.restrictDecimals&&(o="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d"+o+")?)|("+n+"\\d"+o+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,o=t._format(t.options.format);setTimeout(function(){var e=t._parse(n.value);e===P?t._update(i):(n.value=(""+e).replace(D,o[D]),t._adjust(e)===e&&t._numericRegex(o).test(n.value)||t._update(i))})},_option:function(e,n){var i=this,o=i.element,r=i.options;return n===t?r[e]:(n=i._parse(n),(n||"step"!==e)&&(r[e]=n,o.add(i._text).attr("aria-value"+e,n),o.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._value,o=t._parse(n.val())||0,r=t.options.decimals||2;c()!=n[0]&&t._focusin(),t.options.factor&&o&&(o/=t.options.factor),o=+(o+t.options.step*e).toFixed(r),o=t._adjust(o),t._update(o),t._typing=!1,i!==o&&t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return u(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?o._round:i;return n(e,t)},_update:function(e){var t,n=this,i=n.options,r=i.factor,a=i.format,s=i.decimals,l=n._culture(),c=n._format(a,l);s===P&&(s=c.decimals),e=n._parse(e,l),t=e!==P,t&&(e=parseFloat(n._round(e,s),10)),n._value=e=n._adjust(e),n._placeholder(o.toString(e,a,l)),t?(r&&(e=parseFloat(n._round(e*r,s),10)),e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,s)),e=e.replace(D,c[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.element.attr("title")||t.val())},_wrapper:function(){var t,n=this,i=n.element,o=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=o.style.cssText,o.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(o.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),o=i?e("#"+i):n.closest("form");o[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=o.on("reset",t._resetHandler))}});s.plugin(L)}(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,o,r,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,o,r=c.getter(n,!0),a=[],s=0,l={};s
      #=messages.info#
      ',D='
      #=messages.info#
      ',A='
      #=messages.info#
      #if(values){##}else{##}##if(extra){##if(values){##}else{##}##}#
      ',E='
      #=messages.filter# #=messages.into# #=title#
      • #=messages.info#
        #if(extra){#
        #}#
      • #=messages.clear#
      ',I='
      #=messages.filter# #=messages.into# #=title#
      • #=messages.info#
      • #=messages.clear#
      ',M=S.extend({init:function(t,n){var i,o,r,a,s=this,l="string";S.fn.init.call(s,t,n),i=s.operators=n.operators||{},t=s.element,n=s.options,n.appendToElement||(r=t.addClass("k-with-icon k-filterable").find(".k-grid-filter"),r[0]||(r=t.prepend('').find(".k-grid-filter")),r.attr("tabindex",-1).on("click"+b,u(s._click,s))),s.link=r||e(),s.dataSource=R.create(n.dataSource),s.field=n.field||t.attr(c.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=u(a.parse,a)))),n.values&&(l="enums"),s.type=l,i=i[l]||n.operators[l];for(o in i)break;s._defaultFilter=function(){return{field:s.field,operator:o||"eq",value:""}},s._refreshHandler=u(s.refresh,s),s.dataSource.bind(_,s._refreshHandler),n.appendToElement?s._init():s.refresh()},_init:function(){var t,n=this,i=n.options.ui,o=C(i);n.pane=n.options.pane,n.pane&&(n._isMobile=!0),o||(t=i||y[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+b,u(n._submit,n)).on("reset"+b,u(n._reset,n)),o&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.form.find("["+c.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+c.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+c.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+c.attr("role")+"=datepicker]").removeClass("k-textbox"),n.refresh(),n.trigger(g,{field:n.field,container:n.form}),c.cycleForm(n.form)},_createForm:function(t){var n=this,o=n.options,r=n.operators||{},a=n.type,s=C(n.options.ui);r=r[a]||o.operators[a],n.form=e('
      ').html(c.template("boolean"===a?s?D:T:A)({field:n.field,format:o.format,ns:c.ns,messages:o.messages,extra:o.extra,operators:r,type:a,role:t,values:i(o.values)})),o.appendToElement?(n.element.append(n.form),n.popup=n.element.closest(".k-popup").data(f)):n.popup=n.form[f]({anchor:n.link,open:u(n._open,n),activate:u(n._activate,n),close:function(){n.options.closeCallback&&n.options.closeCallback(n.element)}}).data(f),n.form.on("keydown"+b,u(n._keydown,n))},_createMobileForm:function(t){var n=this,o=n.options,r=n.operators||{},a=c.guid(),s=n.type;r=r[s]||o.operators[s],n.form=e("
      ").html(c.template("boolean"===s?I:E)({field:n.field,title:o.title||n.field,format:o.format,ns:c.ns,messages:o.messages,extra:o.extra,operators:r,filterMenuGuid:a,type:s,role:t,inputType:x[s],values:i(o.values)})),n.view=n.pane.append(n.form.html()),n.form=n.view.element.find("form"),n.view.element.on("click",".k-header-done",function(e){n.form.submit(),e.preventDefault()}).on("click",".k-header-cancel",function(e){n._closeForm(),e.preventDefault()}).on("click",".k-clear",function(e){n._mobileClear(),e.preventDefault()}),n.view.bind("showStart",function(){n.refresh()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},n=[e._defaultFilter()],i=e._defaultFilter().operator;(e.options.extra||"isnull"!==i&&"isnullorempty"!==i&&"isnotnullorempty"!==i&&"isnotnull"!==i&&"isempty"!==i&&"isnotempty"!==i)&&n.push(e._defaultFilter()),e.filterModel=c.observable({logic:"and",filters:n}),e.form&&c.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;S.fn.destroy.call(e),e.form&&(c.unbind(e.form),c.destroy(e.form),e.form.unbind(b),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.unbind(b),e._refreshHandler&&(e.dataSource.unbind(_,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,n,i,o,r=this,a=e.filters,s=!1,l=0,c=r.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)},_mobileClear:function(){var t,n,i,o,r,a=this,s=a.view.element;"boolean"===a.type?(t=s.find(".k-check:checked"),n=t.val(),t.val(""),t.trigger("change"),t.val(n),t.prop("checked",!1)):(i=s.find("select"),i.each(function(t,n){var i=e(n);i.val(i.find("option:first").val()),i.trigger("change")}),"string"!==a.type&&"date"!==a.type&&"number"!==a.type||(o=s.find(".k-value-input"),o.each(function(t,n){var i=e(n);i.val(""),i.trigger("change")})),a.options.extra&&(r=s.find("[name=logic]").first(),r.prop("checked",!0),r.trigger("change")))},_removeFilter:function(t){var n=this;t.filters=e.grep(t.filters,function(e){return e.filters?(e.filters=o(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,o;t.preventDefault(),t.stopPropagation(),n=this.filterModel.toJSON(),i=e.grep(n.filters,function(e){return""!==e.value&&null!==e.value}),this._checkForNullOrEmptyFilter(n)||i&&i.length?this.filter(n):(o=this.dataSource.filter(),o&&(o.filters.push(n),n=o),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||"isnullorempty"==i||"isnotnullorempty"==i),e.filters[1]&&(i=e.filters[1].operator,n="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i||"isnullorempty"==i||"isnotnullorempty"==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(f),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(m,{field:this.field,container:this.form})},_keydown:function(e){e.keyCode==c.keys.ESC&&this.popup.close()},events:[g,"change",m],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:w,neq:k,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",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:w,neq:k,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:w,neq:k,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:w,neq:k,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",done:"Done",into:"in"},animations:{left:"slide",right:"slide:right"}}}),F=".kendoFilterMultiCheck",R=c.data.DataSource,P='
      #=messages.filter# #=messages.into# #=title#
        #if(search){#
      • #}#
      • #=messages.checkAll##=messages.clearAll#
      • #if(messages.selectedItemsFormat){#
      • #}#
        ',z=S.extend({init:function(t,n){var i,o;S.fn.init.call(this,t,n),n=this.options,this.element=e(t),i=this.field=this.options.field||this.element.attr(c.attr("field")),o=n.checkSource,this._foreignKeyValues()?(this.checkSource=R.create(n.values),this.checkSource.fetch()):n.forceUnique?(o=e.extend(!0,{},n.dataSource.options),delete o.pageSize,this.checkSource=R.create(o),this.checkSource.reader.data=l(this.checkSource.reader.data,this.field)):this.checkSource=R.create(o),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=u(i.parse,i)),this.type=i.type||"string")),n.appendToElement?this._init():this._createLink(),this._refreshHandler=u(this.refresh,this),this.dataSource.bind(_,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"+b,u(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(_,this.checkChangeHandler)),this.form.on("keydown"+F,u(this._keydown,this)).on("submit"+F,u(this._filter,this)).on("reset"+F,u(this._reset,this)),this.trigger(g,{field:this.field,container:this.form})},_attachProgress:function(){var e=this;this._progressHandler=function(){d.progress(e.container,!0)},this._progressHideHandler=function(){d.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,o=this.searchTextBox[0].value,r=this.container.find("label");for(i&&(o=o.toLowerCase()),e=0,this.options.checkAll&&r.length&&(this._isMobile?this.view.element.find(".k-select-all")[0].style.visibility=o?"hidden":"":(r[0].parentNode.style.display=o?"none":"",e++));e=0?"":"none",e++},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(m,{field:this.field,container:this.form})},_createForm:function(){var t,n=this.options,i="",o=this;this._isMobile||(i+="
        ",n.search&&(i+="
        "),i+="
          ",n.messages.selectedItemsFormat&&(i+="
          "+c.format(n.messages.selectedItemsFormat,0)+"
          "),i+="
          ",i+="",i+="",i+="
          ",i+="
          ",this.form=e('
          ').html(i),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(o.form=e("
          ").html(c.template(P)({field:o.field,title:n.title||o.field,ns:c.ns,messages:n.messages,search:n.search,checkAll:n.checkAll})),o.view=o.pane.append(o.form.html()),o.form=o.view.element.find("form"),t=this.view.element,this.container=t.find(".k-multicheck-wrap"),t.on("click",".k-header-done",function(e){o.form.submit(),e.preventDefault()}).on("click",".k-header-cancel",function(e){o._closeForm(),e.preventDefault()}).on("click",".k-clear-all",function(e){o._mobileCheckAll(!1), e.preventDefault()}).on("click",".k-select-all",function(e){o._mobileCheckAll(!0),e.preventDefault()}),o.view.bind("showStart",function(){o.refresh()})):n.appendToElement?(this.popup=this.element.closest(".k-popup").data(f),this.element.append(this.form)):o.popup=o.form.kendoPopup({anchor:o._link,open:u(o._open,o),activate:u(o._activate,o),close:function(){o.options.closeCallback&&o.options.closeCallback(o.element)}}).data(f),n.search&&(this.searchTextBox=this.form.find(".k-textbox > input"),this.searchTextBox.on("input",u(this._input,this)))},createCheckAllItem:function(){var t=this.options,n=c.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=u(this.checkAll,this),this.checkBoxAll.on(_+F,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(c.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(v))},getFilterArray:function(){var t,n=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return r(n,this.field),t=a(n)},createCheckBoxes:function(){var e,t,n,i=this.options,o={field:this.field,format:i.format,mobile:this._isMobile,type:this.type};this.options.forceUnique?this._foreignKeyValues()?(e=this.checkSource.data(),o.valueField="value",o.field="text"):e=this.checkSource.data():e=this.checkSource.view(),t=c.template(i.itemTemplate(o)),n=c.render(t,e),i.checkAll&&!this._isMobile&&this.createCheckAllItem(),this.container.on(_+F,":checkbox",u(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 o,r,a=!1;if(!e(i).is(".k-check-all"))for(o=n._parse(e(i).val()),r=0;r"},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",clearAll:"Clear All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected",done:"Done",into:"in"},forceUnique:!0,animations:{left:"slide",right:"slide:right"}},events:[g,v,"change",m]});e.extend(z.fn,{_click:M.fn._click,_keydown:M.fn._keydown,_reset:M.fn._reset,_closeForm:M.fn._closeForm,_removeFilter:M.fn._removeFilter,clear:M.fn.clear,_merge:M.fn._merge}),d.plugin(M),d.plugin(z)}(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","kendo.data.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"]},o=/left|right/.test(e);return o?(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 o(t,n){try{return e.contains(t,n)}catch(i){return!1}}function r(t){t=e(t),t.addClass("k-item").children(U).addClass(Z),t.children("a").addClass(G).children(U).addClass(Z),t.filter(":not([disabled])").addClass(xe),t.filter(".k-separator").empty().append(" "),t.filter("li[disabled]").addClass(Te).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children($).length||t.contents().filter(function(){return!(this.nodeName.match(V)||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(j+"-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(J),t.filter(".k-last:not(:last-child)").removeClass(K),t.filter(":first-child").addClass(J),t.filter(":last-child").addClass(K)}function c(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 d(e){if(!e.hasClass(j))return e.parentsUntil("."+j,"li")}function u(t,n){var i=p(n);i&&h(t,i),n.items&&e(t).children("ul").children("li").each(function(e){u(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 g(e){return e?"ul[data-group='"+e+"']":"ul[data-group]"}function m(t,n){var i=t.find(f()),o=[];return i.each(function(i,r){var a,s;for(r=e(r),a=r.data(we),s=t;a;)s=n.find(g(a)+":visible"),s.length&&o.push(s),r=s.find(f()),a=r.data(we)}),o}function v(t,n){var i=t.data(be);return i?n.find(f(i)):e([])}function _(t,n){var i=t.data(we);return i?n.children(Ie).children(g(i)):e([])}function b(t,n){var i,o,r=[],a=function(e){for(;e.parentNode&&!n.is(e.parentNode);)r.push(e.parentNode),e=e.parentNode},s=t[0]||t;for(a(s),i=r[r.length-1];e(i).is(Ie)&&(o=e(i).children("ul"),s=v(o,n)[0]);)r.push(s),a(s),i=r[r.length-1];return r}function w(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 k(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 se&&e.originalEvent&&e.originalEvent.pointerType in We}function x(e){var t=e.originalEvent;return A&&/touch/i.test(t.type||"")}function C(e){e.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var S=window.kendo,T=S.ui,D=S._activeElement,A=S.support.touch&&S.support.mobileOS,E=e.isArray,I=S.data.HierarchicalDataSource,M="mousedown",F="click",R=30,P=50,z=e.extend,B=e.proxy,L=e.each,H=S.template,N=S.keys,O=T.Widget,V=/^(ul|a|div)$/i,W=".kendoMenu",U="img",q="open",j="k-menu",G="k-link k-menu-link",$=".k-link",Y=".k-menu-expand-arrow",K="k-last",Q="close",X="timer",J="k-first",Z="k-image",ee="select",te="zIndex",ne="activate",ie="deactivate",oe="touchstart"+W+" MSPointerDown"+W+" pointerdown"+W,re=S.support.pointers,ae=S.support.msPointers,se=ae||re,le="change",ce="error",de=S.support.touch?"touchstart":"",ue=re?"pointerover":ae?"MSPointerOver":"mouseenter",he=re?"pointerout":ae?"MSPointerOut":"mouseleave",pe="DOMMouseScroll"+W+" mousewheel"+W,fe=S.support.resize+W,ge="scrollWidth",me="scrollHeight",ve="offsetWidth",_e="offsetHeight",be="group",we="groupparent",ke=e(document.documentElement),ye="kendoPopup",xe="k-state-default",Ce="k-state-hover",Se="k-state-focused",Te="k-state-disabled",De="k-state-selected",Ae=".k-menu",Ee=".k-menu-group",Ie=".k-animation-container",Me=Ee+","+Ie,Fe=":not(.k-list) > .k-item",Re=".k-item.k-state-disabled",Pe=".k-item",ze=".k-item:not(.k-state-disabled)",Be=".k-item:not(.k-state-disabled) > .k-link",Le=":not(.k-item.k-separator)",He=Pe+Le+":eq(0)",Ne=Pe+Le+":last",Oe="div:not(.k-animation-container,.k-list-container)",Ve=".k-menu-scroll-button",We={2:1,touch:1},Ue="string",qe="dataBound",je={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField",imageAttr:"dataImageAttrField",content:"dataContentField"},Ge={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+=" "+De),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&&e.toJSON?e.toJSON():{};i["class"]?i["class"]+=" "+Z:i["class"]=Z;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},contentCssAttributes:function(e){var t,n="",i=e.contentAttr||{},o="k-content k-group k-menu-group";i["class"]?i["class"]+=" "+o:i["class"]=o;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},textClass:function(){return G},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},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:" "}},$e=S.ui.DataBoundWidget.extend({init:function(e,t){var n=this;O.fn.init.call(n,e,t),e=n.wrapper=n.element,t=n.options,n._accessors(),n._templates(),n._dataSource(),n._updateClasses(),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:[q,Q,ne,ie,ee,qe],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(){var e=this;e.dataSource&&(e.angular("cleanup",function(){return{elements:e.element.children()}}),e.element.empty(),e.append(e.dataSource.view(),e.element),e.angular("compile",function(){return{elements:e.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,o=t._overflowWrapper();(o||n).on(oe,Pe,B(t._focusHandler,t)).on(F+W,Re,!1).on(F+W,Pe,B(t._click,t)).on(oe+" "+M+W,".k-content",B(t._preventClose,t)).on(ue+W,ze,B(t._mouseenter,t)).on(he+W,ze,B(t._mouseleave,t)).on(M+W,ze,B(t._mousedown,t)).on(de+W+" "+ue+W+" "+he+W+" "+M+W+" "+F+W,Be,B(t._toggleHover,t)),n.on("keydown"+W,B(t._keydown,t)).on("focus"+W,B(t._focus,t)).on("focus"+W,".k-content",B(t._focus,t)).on("blur"+W,B(t._removeHoverItem,t)).on("blur"+W,"[tabindex]",B(t._checkActiveElement,t)),o&&o.on(he+W,Me,B(t._mouseleavePopup,t)).on(ue+W,Me,B(t._mouseenterPopup,t)),i.openOnClick&&(t._documentClickHandler=B(t._documentClick,t),e(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(W),t.element.off(W),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,o,r,a=this,s="horizontal"==t.orientation;t.scrollable&&(a._openedPopups={},a._scrollWrapper=a.element.wrap("
          ").parent(),s&&C(a.element),n=e(a.templates.scrollButton({direction:s?"left":"up"})),i=e(a.templates.scrollButton({direction:s?"right":"down"})),n.add(i).appendTo(a._scrollWrapper),a._initScrolling(a.element,n,i,s),o=a.element.outerWidth(),r=a.element[0].style.width,r="auto"===r?"":r,s&&e(window).on(fe,S.throttle(function(){a._setOverflowWrapperWidth(o,r),a._toggleScrollButtons(a.element,n,i,s)},100)),a._setOverflowWrapperWidth(o,r),a._toggleScrollButtons(a.element,n,i,s))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n,i,o,r,a=this,s=a._scrollWrapper.css("width");a._scrollWrapper.css({width:""}),n=a._scrollWrapper.outerWidth(),a._scrollWrapper.css({width:s}),i=a.element.outerWidth(),o=a.element[0].offsetWidth-a.element[0].clientWidth,i!=n&&n>0&&(r=t?Math.min(e,n):n,a.element.width(r-o),a._scrollWrapper.width(r))},_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(W),i.find(Ve).off(W).remove(),i.children(Ie).each(function(t,n){var o,r=e(n).children(Ee);r.off(pe),o=v(r,i),o.length&&o.append(n)}),i.find(f()).removeAttr("data-groupparent"),i.find(g()).removeAttr("data-group"),n.element.off(pe),e(window).off(fe),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,n,i,o){var r=this,a=r.options.scrollable,s=e.isNumeric(a.distance)?a.distance:P,l=s/2,c="-="+s,d="+="+s,u="-="+2*s,h="+="+2*s,p=!1,f=!1,g=function(e){var a=o?{scrollLeft:e}:{scrollTop:e};t.finish().animate(a,"fast","linear",function(){p&&g(e)}),r._toggleScrollButtons(t,n,i,o)},m=function(e){p||f||(g(e.data.direction),p=!0)},v=function(a){var s=o?{scrollLeft:a.data.direction}:{scrollTop:a.data.direction};f=x(a)||y(a),t.stop().animate(s,"fast","linear",function(){f?(r._toggleScrollButtons(t,n,i,o),p=!0):e(a.currentTarget).trigger(ue)}),p=!1,a.stopPropagation(),a.preventDefault()};n.on(ue+W,{direction:c},m).on(S.eventMap.down+W,{direction:u},v),i.on(ue+W,{direction:d},m).on(S.eventMap.down+W,{direction:h},v),n.add(i).on(he+W,function(){t.stop(),p=!1,r._toggleScrollButtons(t,n,i,o)}),t.on(pe,function(e){var a,s,c,d;e.ctrlKey||e.shiftKey||e.altKey||(a=w(e.originalEvent),s=Math.abs(a)*l,c=(a>0?"+=":"-=")+s,d=o?{scrollLeft:c}:{scrollTop:c},r._closeChildPopups(t),t.finish().animate(d,"fast","linear",function(){r._toggleScrollButtons(t,n,i,o)}),e.preventDefault())})},_toggleScrollButtons:function(e,t,n,i){var o=i?e.scrollLeft():e.scrollTop(),r=i?ge:me,a=i?ve:_e;t.toggle(0!==o),n.toggle(o .k-menu-group, > .k-animation-container > .k-menu-group"):null);return L(n.items,function(t){n.group.append(this),a(this),u(this,e[t]||e)}),a(t),l(n.group.find(".k-first, .k-last").add(n.items)),c(d(n.group)),this},insertBefore:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.parent());return L(n.items,function(n){t.before(this),a(this),l(this),u(this,e[n]||e)}),l(t),this},insertAfter:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.parent());return L(n.items,function(n){t.after(this),a(this),l(this),u(this,e[n]||e)}),l(t),this},_insert:function(t,n,i){var o,a,s,l,c=this;return n&&n.length||(i=c.element),s=e.isPlainObject(t)||t instanceof S.data.ObservableObject,l={firstLevel:i.hasClass(j),horizontal:i.hasClass(j+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(c.renderGroup({group:l,options:c.options})).appendTo(n)),s||E(t)||t instanceof S.data.ObservableArray?o=e(e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(c.renderItem({group:l,item:z(t,{index:n})})).get()})):(o="string"==typeof t&&"<"!=t.charAt(0)?c.element.find(t):e(t),a=o.find("> ul").addClass("k-menu-group").attr("role","menu"),o=o.filter("li"),o.add(a.find("> li")).each(function(){r(this)})),{items:o,group:i}},remove:function(e){var t,n,i,o,r;return e=this.attemptGetItem(e),t=this,n=e.parentsUntil(t.element,Fe),i=e.parent("ul:not(.k-menu)"),e.remove(),i&&!i.children(Fe).length&&(o=d(i),r=i.parent(Ie),r.length?r.remove():i.remove(),c(o)),n.length&&(n=n.eq(0),a(n),l(n)),t},_openAfterLoad:function(e,t){var n=this;t.loaded()?(n.open(e),n._loading=!1):t.one(le,function(){e.find(Y).removeClass("k-i-loading"),n._loading&&(n.open(e),n._loading=!1)})},open:function(o){var r,a,s,l=this,c=l.options,d="horizontal"==c.orientation,u=c.direction,h=S.support.isRtl(l.wrapper),p=l._overflowWrapper();return o=(p||l.element).find(o),r=l.dataSource&&l.dataSource.getByUid(o.data(S.ns+"uid")),r&&r.hasChildren&&!r.loaded()&&!l._loading?(l._loading=!0,o.find(Y).addClass("k-i-loading"),r.load(),l._openAfterLoad(o,r),t):(/^(top|bottom|default)$/.test(u)&&(u=h?d?(u+" left").replace("default","bottom"):"left":d?(u+" right").replace("default","bottom"):"right"),a=">.k-popup:visible,>.k-animation-container>.k-popup:visible",s=function(){var t=e(this).data(ye);t&&l.close(e(this).closest("li.k-item"),!0)},o.siblings().find(a).each(s),p&&o.find(a).each(s),l.options.openOnClick&&(l.clicked=!0),o.each(function(){var o=e(this);clearTimeout(o.data(X)),o.data(X,setTimeout(function(){var r,a,s,g,m,v,_,b,w,k,y=o.find(".k-menu-group:first:hidden");!y[0]&&p&&(a=l._getPopup(o),y=a&&a.element),y.is(":visible")||y[0]&&l._triggerEvent({item:o[0],type:q})===!1&&(!y.find(".k-menu-group")[0]&&y.children(".k-item").length>1?(s=e(window).height(),g=function(){y.css({maxHeight:s-(S._outerHeight(y)-y.height())-S.getShadows(y).bottom,overflow:"auto"})},S.support.browser.msie&&S.support.browser.version<=7?setTimeout(g,0):g()):y.css({maxHeight:"",overflow:""}),o.data(te,o.css(te)),m=l.nextItemZIndex++,o.css(te,m),l.options.scrollable&&o.parent().siblings(Ve).css({zIndex:++m}),r=y.data(ye),v=o.parent().hasClass(j),_=v&&d,b=i(u,v,h),w=c.animation.open.effects,k=w!==t?w:"slideIn:"+n(u,v),r?(r=y.data(ye),r.options.origin=b.origin,r.options.position=b.position,r.options.animation.open.effects=k):r=y.kendoPopup({activate:function(){l._triggerEvent({item:this.wrapper.parent(),type:ne})},deactivate:function(e){l._closing=!1,e.sender.element.removeData("targetTransform").css({opacity:""}),l._triggerEvent({item:this.wrapper.parent(),type:ie})},origin:b.origin,position:b.position,collision:c.popupCollision!==t?c.popupCollision:_?"fit":"fit flip",anchor:o,appendTo:p||o,animation:{open:z(!0,{effects:k},c.animation.open),close:c.animation.close},open:B(l._popupOpen,l),close:function(e){var t,n;l._closing=!0,t=e.sender.wrapper.parent(),p&&(n=e.sender.element.data(be),n&&(t=(p||l.element).find(f(n))),e.sender.wrapper.children(Ve).hide()),l._triggerEvent({item:t[0],type:Q})?e.preventDefault():(t.css(te,t.data(te)),t.removeData(te),l.options.scrollable&&t.parent().siblings(Ve).css({zIndex:""}),(A||se||S.support.mouseAndTouchPresent)&&(t.removeClass(Ce),l._removeHoverItem()))}}).data(ye),y.removeAttr("aria-hidden"),l._configurePopupOverflow(r,o),r._hovered=!0,r.open(),l._initPopupScrolling(r))},l.options.hoverDelay))}),l)},_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(Ie)||(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 o=this,r=t.wrapper.children(Ve),a=o.options.animation,s=(a&&a.open&&a.open.duration||0)+R;setTimeout(function(){var a,s;r.length||(a=e(o.templates.scrollButton({direction:n?"left":"up"})),s=e(o.templates.scrollButton({direction:n?"right":"down"})),r=a.add(s).appendTo(t.wrapper),o._initScrolling(t.element,a,s,n),i||r.on(ue+W,function(){var n=o._overflowWrapper();e(m(t.element,n)).each(function(e,t){var i=n.find(f(t.data(be)));o.close(i)})}).on(he+W,function(){setTimeout(function(){e.isEmptyObject(o._openedPopups)&&o._closeParentPopups(t.element)},R)})),o._toggleScrollButtons(t.element,r.first(),r.last(),n)},s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children("."+Se).removeClass(Se),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,n){var i,o,r,a,s,l,c,d,u,h=t.element,p=h.add(h.parent(Ie));p.height(h.hasClass(j)&&this._initialHeight||""),i=t._location(n),o=e(window).height(),r=i.height,a=n?0:Math.max(i.top,0),s=n?0:k(this._overflowWrapper()[0],"scrollTop"),l=window.innerHeight-o,c=o-S.getShadows(h).bottom+l,d=c+s>r+a,d||(u=Math.min(c,c-a+s),p.css({overflow:"hidden",height:u+"px"}))},close:function(t,n){var i,o,r=this,a=r._overflowWrapper(),s=a||r.element;return t=s.find(t),t.length||(t=s.find(">.k-item")),i=function(t){var n=!1;return e.isEmptyObject(r._openedPopups)?n:(e(m(t,a)).each(function(e,t){return n=!!r._openedPopups[""+t.data(be)],!n}),n)},o=function(e){var t=e.data(we);return!a||!t||!r._openedPopups[""+t]},t.each(function(){var s=e(this);!n&&r._isRootItem(s)&&(r.clicked=!1),clearTimeout(s.data(X)),s.data(X,setTimeout(function(){var e=r._getPopup(s);if(e&&(o(s)||r._forceClose)){if(!r._forceClose&&i(e.element))return;e.close(),e.element.attr("aria-hidden",!0),a&&r._forceClose&&t.last().is(s[0])&&delete r._forceClose}},r.options.hoverDelay))}),r},_getPopup:function(e){var t,n,i=this,o=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(ye),r=i._overflowWrapper();return!o&&r&&(t=e.data(we),t&&(n=r.find(g(t)),o=n.data(ye))),o},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(xe,n).toggleClass(Te,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(S.eventTarget(t)||t.target).closest(Fe),i=t.type==ue||M.indexOf(t.type)!==-1;n.siblings().removeClass(Ce),n.parents("li."+Te).length||n.toggleClass(Ce,i||"mousedown"==t.type||"pointerover"==t.type||t.type==de),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var n=this,i=e(t?t.currentTarget:this._hoverItem()),r=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(o(r,S._activeElement())||!t||o(r,t.currentTarget))||n.close(r)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(Se)&&(e.removeClass(Se),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 "+j).addClass(j+"-"+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(){r(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),r=n._itemHasChildren(i),a=i.data(we)||i.parent().data(be),s=y(t);a&&(n._openedPopups[""+a]=!0),n._closing||t.delegateTarget!=i.parents(Ae)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(Fe))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(Fe))||(!(n.options.openOnClick===!1||n.options.openOnClick.rootMenuItems===!1&&n._isRootItem(i.closest(Fe))||n.options.openOnClick.subMenuItems===!1&&!n._isRootItem(i.closest(Fe))||n.clicked)||A||s&&n._isRootItem(i.closest(Fe))||!o(t.currentTarget,t.relatedTarget)&&r&&n.open(i),(n.options.openOnClick===!0&&n.clicked||A)&&i.siblings().each(B(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)||A)&&i.siblings().each(B(function(e,t){n.close(t,!0)},n))},_mouseleave:function(n){var i=this,r=e(n.currentTarget),a=r.data(we),s=r.children(Ie).length||r.children(Ee).length||a,l=e(window);return a&&delete i._openedPopups[""+a],r.parentsUntil(Ie,".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):i.options.openOnClick!==!1&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(r))&&(i.options.openOnClick.subMenuItems||i._isRootItem(r))||A||y(n)||o(n.currentTarget,n.relatedTarget||n.target)||!s||o(n.currentTarget,S._activeElement())?((S.support.browser.msie&&!n.toElement&&!n.relatedTarget&&!y(n)||n.clientX<0||n.clientY<0||n.clientY>l.height()||n.clientX>l.width())&&i.close(r),t):(i.close(r,!0),i._loading=!1,t)},_mouseenterPopup:function(t){var n,i=this,o=e(t.currentTarget);o.parent().is(Ie)||(o=o.children("ul"),n=o.data(be),n&&(i._openedPopups[""+n]=!0))},_mouseleavePopup:function(t){var n=this,i=e(t.currentTarget);!y(t)&&i.is(Ie)&&n._closePopups(i.children("ul"))},_closePopups:function(t){var n,i=this,o=i._overflowWrapper(),r=t.data(be);r&&(delete i._openedPopups[""+r],n=o.find(f(r)),setTimeout(function(){if(i.options.openOnClick)i._closeChildPopups(t);else if(e.isEmptyObject(i._openedPopups)){var o=i._innerPopup(t);i._closeParentPopups(o)}else i.close(n,!0)},0))},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(m(t,i)).each(function(){var e=i.find(f(this.data(be)));n.close(e,!0)})},_innerPopup:function(e){var t=this._overflowWrapper(),n=m(e,t);return n[n.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(be),o=n.find(f(i));for(i=o.parent().data(be),t.close(o,!0);i&&!t._openedPopups[i]&&!o.parent().is(Ae);)o=n.find(f(i)),t.close(o,!0),i=o.parent().data(be)},_click:function(n){for(var i,o,r,a,s,l,c=this,d=c.options,u=e(S.eventTarget(n)),h=u[0],p=u[0]?u[0].nodeName.toUpperCase():"",f="INPUT"==p||"SELECT"==p||"BUTTON"==p||"LABEL"==p,m=u.closest($),v=u.closest(Fe),_=v[0],b=m.attr("href"),w=u.attr("href"),k=e("").attr("href"),x=!!b&&b!==k,C=x&&!!b.match(/^#/),T=!!w&&w!==k,D=c._overflowWrapper();h&&h.parentNode!=_;)h=h.parentNode;if(!e(h).is(Oe)){if(v.hasClass(Te))return n.preventDefault(),t;if(n.handled||!c._triggerSelect(u,_)||f||n.preventDefault(),n.handled=!0,o=v.children(Me),D&&(s=v.data(we),s&&(o=D.find(g(s)))),r=o.is(":visible"),a=d.openOnClick&&r&&c._isRootItem(v),d.closeOnClick&&(!x||C)&&(!o.length||a))return v.removeClass(Ce).css("height"),c._oldHoverItem=c._findRootParent(v),l=c._parentsUntil(m,c.element,Fe),c._forceClose=!!D,c.close(l),c.clicked=!1,"MSPointerUp".indexOf(n.type)!=-1&&n.preventDefault(),t;x&&n.enterKey&&m[0].click(),(c._isRootItem(v)&&d.openOnClick!==!1||d.openOnClick.subMenuItems||S.support.touch||y(n)&&c._isRootItem(v.closest(Fe)))&&(x||f||T||n.preventDefault(),c.clicked=!0,i=o.is(":visible")?Q:q,(d.closeOnClick||i!=Q)&&c[i](v))}},_parentsUntil:function(n,i,o){var r,a,s=this._overflowWrapper();return s?(r=b(n,s),a=[],e(r).each(function(){var n=e(this);return!n.is(i)&&(n.is(o)&&a.push(this),t)}),e(a)):n.parentsUntil(i,o)},_triggerSelect:function(e,t){var n,i,o,r;return e=e.is(".k-link")?e:e.closest(".k-link"),n=e.data("selectHandler"),n&&(i=this._getEventData(e),n.call(this,i)),o=i&&i.isDefaultPrevented(),r=this._triggerEvent({item:t,type:ee}),o||r},_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;o((t._overflowWrapper()||t.element)[0],e.target)||(t.clicked=!1)},_focus:function(n){var i=this,o=n.target,r=i._hoverItem(),a=D();return o==i.wrapper[0]||e(o).is(":kendoFocusable")?(a===n.currentTarget&&(r.length?i._moveHover([],r):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(o).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(Se),i.wrapper.focus(),t)},_keydown:function(e){var n,i,o,r=this,a=e.keyCode,s=r._oldHoverItem,l=S.support.isRtl(r.wrapper);if(e.target==e.currentTarget||a==N.ESC){if(s||(s=r._oldHoverItem=r._hoverItem()),i=r._itemBelongsToVertival(s),o=r._itemHasChildren(s),r._keyTriggered=!0,a==N.RIGHT)n=r[l?"_itemLeft":"_itemRight"](s,i,o);else if(a==N.LEFT)n=r[l?"_itemRight":"_itemLeft"](s,i,o);else if(a==N.DOWN)n=r._itemDown(s,i,o);else if(a==N.UP)n=r._itemUp(s,i,o);else if(a==N.HOME)r._moveHover(s,s.parent().children().first()),e.preventDefault();else if(a==N.END)r._moveHover(s,s.parent().children().last()),e.preventDefault();else if(a==N.ESC)n=r._itemEsc(s,i);else if(a==N.ENTER||a==N.SPACEBAR)n=s.children(".k-link"),n.length>0&&(r._click({target:n[0],preventDefault:function(){},enterKey:!0}),o&&!s.hasClass(Te)?(r.open(s),r._moveHover(s,r._childPopupElement(s).children().first())):r._moveHover(s,r._findRootParent(s)));else if(a==N.TAB)return n=r._findRootParent(s),r._moveHover(s,n),r._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(we)&&!!this._overflowWrapper().children(g(e.data(we)))); },_moveHover:function(t,n){var i=this,o=i._ariaId;t.length&&n.length&&t.removeClass(Se),n.length&&(n[0].id&&(o=n[0].id),n.addClass(Se),i._oldHoverItem=n,o&&(i.element.removeAttr("aria-activedescendant"),e("#"+o).removeAttr("id"),n.attr("id",o),i.element.attr("aria-activedescendant",o)),i._scrollToItem(n))},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,Ae,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(j)},_itemRight:function(e,t,n){var i,o,r,a,s=this;return t?n&&!e.hasClass(Te)?(s.open(e),i=s._childPopupElement(e).children().first()):"horizontal"==s.options.orientation&&(o=s._findRootParent(e),r=s._overflowWrapper(),r&&(a=_(o,r),s._closeChildPopups(a)),s.close(o),i=o.nextAll(He)):(i=e.nextAll(He),i.length||(i=e.prevAll(Ne)),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,o=this;return t?(n=e.parent().closest(".k-item"),i=o._overflowWrapper(),!n.length&&i&&(n=v(e.parent(),i)),o.close(n),o._isRootItem(n)&&"horizontal"==o.options.orientation&&(n=n.prevAll(He))):(n=e.prevAll(He),n.length||(n=e.nextAll(Ne)),o.close(e)),n.length||(n=o.wrapper.children(".k-item").last()),o._moveHover(e,n),n},_itemDown:function(e,t,n){var i,o=this;if(t)i=e.nextAll(He);else{if(!n||e.hasClass(Te))return;o.open(e),i=o._childPopupElement(e).children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=o.wrapper.children(".k-item").first()),o._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(He),!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,o,r,a,s,l,c,d,u,h,p=this;p.options.scrollable&&e&&e.length&&(t=e.parent(),n=!!t.hasClass(j)&&"horizontal"==p.options.orientation,i=n?"scrollLeft":"scrollTop",o=n?S._outerWidth:S._outerHeight,r=t[i](),a=o(e),s=e[0][n?"offsetLeft":"offsetTop"],l=o(t),c=t.siblings(Ve),d=c.length?o(c.first()):0,r+ls-d&&(u=s-d),isNaN(u)||(h={},h[i]=u,t.finish().animate(h,"fast","linear",function(){p._toggleScrollButtons(t,c.first(),c.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(Fe);i.hasClass(Te)||setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(Se)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},_dataSource:function(e){var t=this,n=e?e.dataSource:t.options.dataSource;n&&(n=E(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"uid"},{field:"text"},{field:"url"},{field:"cssClass"},{field:"spriteCssClass"},{field:"imageUrl"},{field:"imageAttr"},{field:"attr"},{field:"contentAttr"},{field:"content"},{field:"encoded"},{field:"items"},{field:"select"}]),t.dataSource=I.create(n),t._bindDataSource(),t.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=B(this.refresh,this),this._errorHandler=B(this._error,this),this.dataSource.bind(le,this._refreshHandler),this.dataSource.bind(ce,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(le,this._refreshHandler),e.unbind(ce,this._errorHandler))},_error:function(){},findByUid:function(e){var t=this._overflowWrapper()||this.element;return t.find("["+S.attr("uid")+"="+e+"]")},refresh:function(t){var n=this,i=t.node,o=t.action,r=i?n.findByUid(i.uid):n.element,a=t.items,s=t.index,l=e.proxy(n._updateItem,n),c=e.proxy(n._removeItem,n);"add"==o?n._appendItems(a,s,r):"remove"==o?a.forEach(c):"itemchange"==o?a.forEach(l):"itemloaded"===o?n.append(t.items,r):this._initData(),this.trigger(qe,{item:r,dataItem:i})},_appendItems:function(e,t,n){var i=this,o=n.find(Pe).eq(t);o.length?i.insertBefore(e,o):i.append(e,n)},_removeItem:function(e){var t=this,n=t.findByUid(e.uid);t.remove(n)},_updateItem:function(e){var t=this,n=t.findByUid(e.uid),i=n.next(),o=e.parentNode();t.remove(n),i.length?t.insertBefore(e,i):t.append(e,o&&t.findByUid(o.uid))},_accessors:function(){var e,t,n,i=this,o=i.options,r=i.element;for(e in je)t=o[je[e]],n=r.attr(S.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),E(t)||(t=[t]),o[je[e]]=t},_fieldAccessor:function(t){var n=this.options[je[t]]||[],i=n.length,o="(function(item) {";return 0===i?o+="return item['"+t+"'];":(o+="var levels = ["+e.map(n,function(e){return"function(d){ return "+S.expr(e)+"}"}).join(",")+"];",o+="if(item.level){return levels[Math.min(item.level(), "+i+"-1)](item);}else",o+="{return levels["+i+"-1](item)}"),o+="})"},_templates:function(){var e=this,t=e.options,n=B(e._fieldAccessor,e);t.template&&typeof t.template==Ue?t.template=H(t.template):t.template||(t.template=H("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e.templates={content:H("#var contentHtml = "+n("content")+"(item);#
          #= contentHtml || '' #
          "),group:H(""),itemWrapper:H("# var url = "+n("url")+"(item); ## var imageUrl = "+n("imageUrl")+"(item); ## var imgAttributes = "+n("imageAttr")+"(item);## var tag = url ? 'a' : 'span' #<#= tag # class='#= textClass(item) #' #if(url){#href='#= url #'#}#># if (imageUrl) { ## } ##= sprite(item) ##= data.menu.options.template(data) ##= arrow(data) #"),item:H("#var contentHtml = "+n("content")+"(item);#"),scrollButton:H(""),arrow:H(""),sprite:H("# var spriteCssClass = "+n("spriteCssClass")+"(data); if(spriteCssClass) {##}#"),empty:H("")}},renderItem:function(e){var t,n,i=this;return e=z({menu:i,group:{}},e),t=i.templates.empty,n=e.item,i.templates.item(z(e,{sprite:i.templates.sprite,itemWrapper:i.templates.itemWrapper,renderContent:i.renderContent,arrow:n.items||n.content||n[i.options.dataContentField[0]]?i.templates.arrow:t,subGroup:i.renderGroup},Ge))},renderGroup:function(e){var t=this,n=t.templates||e.menu.templates;return n.group(z({renderItems:function(e){for(var t="",n=0,i=e.items,o=i?i.length:0,r=z({length:o},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,copyAnchorStyles:!0,target:"body"},events:[q,Q,ne,ie,ee],setOptions:function(t){var n=this;$e.fn.setOptions.call(n,t),n.target.off(n.showOn+W+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(),$e.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+W+e._marker),ke.off(S.support.mousedown+W+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),$e.fn.destroy.call(e)},open:function(n,i){var r,a,s=this;return n=e(n)[0],o(s.element[0],e(n)[0])||s._itemHasChildren(e(n))?$e.fn.open.call(s,n):s._triggerEvent({item:s.element,type:q})===!1&&(s.popup.visible()&&s.options.filter&&(s.popup.close(!0),s.popup.element.kendoStop(!0)),i!==t?(r=s._overflowWrapper(),r&&(a=r.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()),ke.off(s.popup.downEvent,s.popup._mousedownProxy),ke.on(S.support.mousedown+W+s._marker,s._closeProxy)),s},_configurePopupScrolling:function(e,n){var i=this,o=i.popup,r="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(o),o.element.parent().css({position:"",height:""}),o.element.css({visibility:"hidden",display:"",position:""}),r?i._setPopupWidth(o,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(o,isNaN(e)?t:{isFixed:!0,x:e,y:n}),o.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(o,r,!0),o.element.siblings(Ve).hide())},_setPopupWidth:function(t,n){var i,o,r,a,s,l,c,d,u=t.element,h=u.add(u.parent(Ie));h.width(this._initialWidth||""),i=t._location(n),o=e(window).width(),r=i.width,a=Math.max(i.left,0),s=n?0:k(this._overflowWrapper()[0],"scrollLeft"),l=S.getShadows(u),c=o-l.left-l.right,d=c+s>r+a,d||h.css({overflow:"hidden",width:c-a+s+"px"})},close:function(){var t=this;o(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?$e.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:Q})===!1&&(t.popup.close(),ke.off(S.support.mousedown+W+t._marker,t._closeProxy),t.unbind(ee,t._closeTimeoutProxy))},_showHandler:function(t){var n,i=t,r=this,a=r.options,s=e(S.support.mobileOS?i.target:i.currentTarget);t.event&&(i=t.event,i.pageX=t.x.location,i.pageY=t.y.location),o(r.element[0],t.relatedTarget||t.target)||(r._eventOrigin=i,i.preventDefault(),i.stopImmediatePropagation(),r.element.find("."+Se).removeClass(Se),(a.filter&&s.is(a.filter)||!a.filter)&&(a.alignToAnchor?(r.popup.options.anchor=i.currentTarget,r.open(i.currentTarget)):(r.popup.options.anchor=i.currentTarget,r._targetChild?(n=r.target.offset(),r.open(i.pageX-n.left,i.pageY-n.top)):r.open(i.pageX,i.pageY))))},_closeHandler:function(t){var n,i=this,r=e(t.relatedTarget||t.target),a=r.closest(i.target.selector)[0]==i.target[0],s=r.closest(Pe),l=i._itemHasChildren(s),c=i._overflowWrapper(),d=o(i.element[0],r[0])||c&&o(c[0],r[0]);i._eventOrigin=t,n=3!==t.which,i.popup.visible()&&(n&&a||!a)&&(i.options.closeOnClick&&!l&&d||!d)&&(d?(this.unbind(ee,this._closeTimeoutProxy),i.bind(ee,i._closeTimeoutProxy)):i.close())},_wire:function(){var e=this,t=e.options,n=e.target;e._showProxy=B(e._showHandler,e),e._closeProxy=B(e._closeHandler,e),e._closeTimeoutProxy=B(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+W+e._marker,!1),e.userEvents.bind("hold",e._showProxy)):t.filter?n.on(t.showOn+W+e._marker,t.filter,e._showProxy):n.on(t.showOn+W+e._marker,e._showProxy))},_triggerEvent:function(n){var i=this,o=e(i.popup.options.anchor)[0],r=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,z({type:n.type,item:n.item||this.element[0],target:o},r?{event:r}:{}))},_popup:function(){var t=this,n=t._overflowWrapper();t._triggerProxy=B(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({autosize:"horizontal"===t.options.orientation,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(m(t.sender.element,n)).each(function(e,t){var n=t.data(ye);n&&n.close(!0)})}:e.noop}).data(ye),t._targetChild=o(t.target[0],t.popup.element[0])}});T.plugin($e),T.plugin(Ye)}(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,o,r={};for(n=0,i=e.length;n0?t.insertAfter(n.children().eq(e-1)):n.prepend(t)}var s=window.kendo,l=s.ui,c=e.proxy,d=e.extend,u=e.grep,h=e.map,p=e.inArray,f="k-state-selected",g="asc",m="desc",v="change",_="init",b="open",w="select",k="kendoPopup",y="kendoFilterMenu",x="kendoMenu",C=".kendoColumnMenu",S=l.Widget,T=S.extend({init:function(t,n){var i,o=this;S.fn.init.call(o,t,n),t=o.element,n=o.options,o.owner=n.owner,o.dataSource=n.dataSource,o.field=t.attr(s.attr("field")),o.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")),o.link=i.attr("tabindex",-1).on("click"+C,c(o._click,o)),o.wrapper=e('
          '),o._refreshHandler=c(o.refresh,o),o.dataSource.bind(v,o._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",column:"Column",columns:"Columns",columnVisibility:"Column Visibility",clear:"Clear",cancel:"Cancel",done:"Done",settings:"Edit 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[k]({anchor:e.link,open:c(e._open,e),activate:c(e._activate,e),deactivate:c(e._deactivate,e),close:function(){e.menu._closing=!0,e.options.closeCallback&&e.options.closeCallback(e.element)}}).data(k),e.menu=e.wrapper.children()[x]({orientation:"vertical",closeOnClick:!1,open:function(){e._updateMenuItems()}}).data(x)},_deactivate:function(){this.menu._closing=!1},_createMobileMenu:function(){var e,t=this,n=t.options,i=s.template(A)({ns:s.ns,field:t.field,title:t.title||t.field,messages:n.messages,sortable:n.sortable,filterable:n.filterable,columns:t._ownerColumns(),showColumns:n.columns,lockedColumns:n.lockedColumns});t.view=t.pane.append(i),t.view.state={columns:{}},t.wrapper=t.view.element.find(".k-column-menu"),t.menu=new E(t.wrapper.children(),{pane:t.pane,columnMenu:t}),t.menu.element.on("transitionend"+C,function(e){e.stopPropagation()}),e=t.view.wrapper&&t.view.wrapper[0]?t.view.wrapper:t.view.element,e.on("click",".k-header-done",function(e){e.preventDefault(),t.menu._applyChanges(),t.menu._cancelChanges(!1),t.close()}),e.on("click",".k-header-cancel",function(e){e.preventDefault(),t.menu._cancelChanges(!0),t.close()}),t.view.bind("showStart",function(){var e=t.view||{columns:{}};t.options.lockedColumns&&t._updateLockedColumns(),e.element.find(".k-sort-asc.k-state-selected").length?e.state.initialSort="asc":e.element.find(".k-sort-desc.k-state-selected").length&&(e.state.initialSort="desc")})},_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"),S.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._updateMenuItems():this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_updateMenuItems:function(){var e=this;e._setMenuItemsVisibility(),e._reorderMenuItems()},_setMenuItemsVisibility:function(){var e=this;e._eachRenderedMenuItem(function(e,t,n){t.matchesMedia===!1?n.hide():n.show()})},_reorderMenuItems:function(){var e=this;e._eachRenderedMenuItem(function(e,t,n,i){n[0]&&n.index()!==e&&a(e,n,i)})},_eachRenderedMenuItem:function(t){var i,a,s,l,c,d,h=this,p=u(o(h.owner.columns),function(e){var t=!0,i=n(e.title||"");return e.menu!==!1&&(e.field||i.length)||(t=!1),t}).map(function(e){return{field:e.field,title:e.title,matchesMedia:e.matchesMedia}}),f=h._isMobile&&h.view?e(h.view.element).find(".k-columns-item").children("ul"):e(h.wrapper).find(".k-menu-group").first(),g=function(t,n,i){return t.find(n).filter(function(){return m(p[i],e(this).text())})},m=function(e,t){return v(e,t)},v=function(e,t){return e.title?t===e.title:t===e.field},_=function(e){return u(p,function(t){return JSON.stringify(p[e])==JSON.stringify(t)})};for(d=0;d#=columns[idx].title##}#
        #if(filterable || lockedColumns){##}##}##if(filterable){#
      • ${messages.filter}
      • #if(lockedColumns){##}##}##if(lockedColumns){#
      • ${messages.lock}
      • ${messages.unlock}
      • #}#',A='
        ${messages.settings}
        • #=messages.column#: ${title}
            #if(sortable){#
          • ${messages.sortAscending}
          • ${messages.sortDescending}
          • #}##if(lockedColumns){#
          • ${messages.lock}
          • ${messages.unlock}
          • #}##if(filterable){#
          • ${messages.filter}
          • #}#
        • #if(showColumns){#
        • ${messages.columnVisibility}
            #for (var idx = 0; idx < columns.length; idx++) {#
          • #=columns[idx].title#
          • #}#
        • #}#
        • #=messages.clear#
        ',E=S.extend({init:function(e,t){var n=this;S.fn.init.call(n,e,t),n._createCheckBoxes(),n.element.on("click"+C,"li.k-item:not(.k-separator):not(.k-state-disabled):not(:has(.k-switch))","_click")},events:[w],_click:function(n){var i=this;return e(n.target).is("[type=checkbox]")||n.preventDefault(),e(n.target).hasClass("k-clear")?(i._cancelChanges(!0),t):e(n.target).hasClass("k-filterable")?(i._cancelChanges(!0),i.trigger(w,{item:n.currentTarget}),t):(i._updateSelectedItems(n.currentTarget),t)},_updateSelectedItems:function(t){var n,i,o,r=this,a=e(t),s=r.options.columnMenu.view.state||{columns:{}},l=a.prop("id");a.hasClass("k-filter-item")||(s[l]=!s[l],(a.hasClass("k-sort-asc")||a.hasClass("k-sort-desc"))&&(a.hasClass("k-sort-asc")?(n="asc",i=r.element.find(".k-sort-desc")):(n="desc",i=r.element.find(".k-sort-asc")),o=i.prop("id"),n!==s.initialSort||a.hasClass("k-state-selected")||(s[l]=!1),s[o]&&(s[o]=!1),i.removeClass(f)),a.hasClass(f)?a.removeClass(f):a.addClass(f))},_cancelChanges:function(e){var t,n,i,o,r=this,a=r.options.columnMenu,s=a.view,l=s.state||{columns:{}},c=l.columns;if(r.element.find("."+f).removeClass(f),a.refresh(),e){t=[];for(n in c)c.hasOwnProperty(n)&&c[n]===!0&&(i=s.element.find("#"+n),t.push(i[0]));for(o=t.length-1;o>=0;o--)r.trigger(w,{item:t[o]});a.options.lockedColumns&&a._updateLockedColumns()}r.options.columnMenu.view.state={columns:{}}},_applyChanges:function(){var e,t,n=this,i=n.options.columnMenu.view,o=i.state||{columns:{}};for(e in o)o.hasOwnProperty(e)&&"initialSort"!==e&&"columns"!==e&&o[e]===!0&&(t=i.element.find("#"+e),t.hasClass(f)?t.removeClass(f):t.addClass(f),n.trigger(w,{item:t[0]}))},_createCheckBoxes:function(){var e=this;e.element.find(".k-columns-item").find("[type='checkbox']").kendoSwitch({messages:{checked:"",unchecked:""},change:function(t){var n=t.sender.element.closest(".k-item"),i=e.options.columnMenu.view.state||{columns:{}},o=n.prop("id");i.columns[o]=!i.columns[o],e.trigger(w,{item:n})}})},_destroyCheckBoxes:function(){var e,t,n=this,i=n.element.find(".k-columns-item").find("[type='checkbox']");for(t=0;t1&&(s=r.find("th:visible").filter(a).filter(function(){return this.rowSpan>1})),s=s.add(r.last().find("th:visible").filter(a)),o=i.attr("index"),s.sort(function(n,i){var r,a;return n=e(n),i=e(i),r=n.attr(o),a=i.attr(o),r===t&&(r=e(n).index()),a===t&&(a=e(i).index()),r=parseInt(r,10),a=parseInt(a,10),r>a?1:r').find(h)),i.link=n,i.element.on("click"+u,f(i._click,i))},options:{name:"ColumnSorter",mode:l,allowUnsort:!0,compare:null,filter:"",initialDirection:s,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 o,r,l,u,h,f,g,m,v=this,_=v.dataSource.sort()||[],b=v.element,w=b.attr(i.attr(c)); for(b.removeAttr(i.attr(a)),b.removeAttr(p),o=0,r=_.length;o table"):m.parent().hasClass("k-grid-header-locked")?m=m.closest(".k-grid").find(".k-grid-content-locked > table"):m.parent().hasClass("k-grid")||(m=null),m&&(b.attr(i.attr("index"))?(g=n(b.closest(".k-grid-header")),h=g.index(b)):h=b.parent().children(":visible").index(b),b.toggleClass("k-sorted",u!==t),m.children("colgroup").children(":not(.k-group-col):not(.k-hierarchy-col)").eq(h).toggleClass("k-sorted",u!==t))),b.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order").remove(),u===s?(e('').appendTo(v.link),b.attr(p,"ascending")):u===d&&(e('').appendTo(v.link),b.attr(p,"descending")),v.options.showIndexes&&_.length>1&&f&&e('').html(f).appendTo(v.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 n,o,r=this,s=r.element,d=s.attr(i.attr(c)),u=s.attr(i.attr(a)),h=r.options,p=null===r.options.compare?t:r.options.compare,f=r.dataSource.sort()||[];if(e.preventDefault(),(!h.filter||s.is(h.filter))&&(u=this._toggleSortDirection(u),!this.trigger("change",{sort:{field:d,dir:u,compare:p}}))){if(h.mode===l)f=[{field:d,dir:u,compare:p}];else if("multiple"===h.mode){for(n=0,o=f.length;n=0?v[u]=t:p(i)||(o=l.getCulture(),"number"==typeof i&&o.name.length?(r=o.numberFormat,a=(""+i).replace(m,r[m]),v[t]=a):v[t]=f(i)?i.value||t:i),v[l.attr(t+"-msg")]=i.message,v.autocomplete=_;return g(c,x)>=0&&(v[u]=c),v[h]=("boolean"===c?"checked:":"value:")+e.field,v}function r(e,t){var n=e.attr("id");return n&&(t.id=n,e.removeAttr("id")),t}function a(e){var t,n,i,o,r,a;if(e&&e.length)for(a=[],t=0,n=e.length;t|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,w='
        #=message#
        ',k="change",y="equalSet",x=["url","email","number","date","boolean"],C={number:function(t,n){var i=o(n);e('').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("').hide().appendTo(t)},date:function(t,n){var i=o(n),r=n.format;r&&(r=l._extractFormat(r)),i[l.attr("format")]=r,e('').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("').hide().appendTo(t)},string:function(t,n){var i=o(n);e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=o(n);e('').attr(i).appendTo(t)},values:function(t,n){var i=o(n),r=l.stringify(a(n.values));e("').attr(i).appendTo(t)},date:function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},string:function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},"boolean":function(t,n){var i=o(n);i=r(t,i),e('').attr(i).appendTo(t)},values:function(t,n){var i,a=o(n),s=n.values,l=e("
        ")},p.alert=l,p.confirm=d,p.prompt=h}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.grid.min",["kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.columnmenu.min","kendo.groupable.min","kendo.pager.min","kendo.selectable.min","kendo.sortable.min","kendo.reorderable.min","kendo.resizable.min","kendo.ooxml.min","kendo.excel.min","kendo.pane.min","kendo.progressbar.min","kendo.pdf.min","kendo.dialog.min","kendo.pane.min","kendo.switch.min"],e)}(function(){return function(e,t){function n(e,t){return"["+Ae.attr(e)+"="+t+"]"}function i(e){return Array(e+1).join(' ')}function o(e){var t,n=" ";if(e){if(typeof e===nn)return e;for(t in e)""!==e[t]&&(n+=t+'="'+e[t]+'"')}return n}function r(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function a(t,n,i,o,r){var a,s=n;for(n=e(),r=r||1,a=0;a0}function w(e){return Ve(e,function(e){var t=!e.hidden&&e.matchesMedia!==!1;return t&&e.columns&&(t=w(e.columns).length>0),t})}function k(e){var t,n,i=[];for(n=0;no?r-(i-o)||1:r+(o-i):i>o?r+(i-o):r-(o-i)||1}function S(t,n,i,o,r,a,s,l){var c,d,u=D(t),h=D([n]);u>h&&(c=Array(s+1).join(' '),d=a.children(":not(.k-filter-row)"),e(Array(u-h+1).join(""+c+"")).insertAfter(d.last())),N(a,u-h),A(i,o,r,a,l)}function T(t,n,i){var o,r,a,s,l,c,d,u;for(i=i||0,a=n,n=Y(n),s={},l=t.find(">tr:not(.k-filter-row)"),c=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},d=0,u=n.length;do&&(o=n));return i+o}function A(t,n,i,o,r){var a,s,l=F(t[0],n),c=i.find(">tr:not(.k-filter-row):eq("+l.row+")>th.k-header"),d=e(),u=l.cell;for(a=0;atr:not(.k-filter-row)").eq(l.row)[r](d),s=[],a=0;a-1&&t0||0===s&&!i)&&s++,l=Ue(n,a),t=I(a,s,n,l>s),c=Ue(t,o),(!t.columns||c&&c!==a.length-1)&&t&&t!=n&&t.columns?M(e,t,n,i,o):null)}function F(e,t,n,i){var o,r;for(n=n||0,i=i||{},i[n]=i[n]||0,r=0;r1&&(o[i].rowSpan=n-t||1)}function N(e,t){var n,i=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n1&&(r[n].rowSpan-=o);return i.length-o}function V(e,t,n,i,o){var r,a,s,l=[];for(r=0,s=e.length;rtr:not(.k-filter-row)"),r=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return o.length>1&&(a=o.find("th").filter(r).filter(function(){return this.rowSpan>1})),a=a.add(o.last().find("th").filter(r)),i=Ae.attr("index"),a.sort(function(n,o){var r,a;return n=e(n),o=e(o),r=n.attr(i),a=o.attr(i),r===t&&(r=e(n).index()),a===t&&(a=e(o).index()),r=parseInt(r,10),a=parseInt(a,10),r>a?1:r0){for(n=h.eq(p-1),i=n.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!e(this).attr("rowspan")}),o=0,r=u.find("th:not(.k-group-cell,.k-hierarchy-cell)").index(t),a=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return this.colSpan>1}),s=0;s=s&&r1&&(s-=l-1),o++}return d}function Z(t,n,i,o){var r,a=t;return o&&t.empty(),Fe?t[0].innerHTML=i:(r=document.createElement("div"),r.innerHTML=""+i+"
        ",t=r.firstChild.firstChild,n[0].replaceChild(t,a[0]),t=e(t)),t}function ee(e){e=e||{};var t=e.style;return t?(t=t.replace(/display:[^;]*/i,"display:none"),t.match(/display:/i)||(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",Ne({},e,{style:t})}function te(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function ne(t,n,i,o){var r,a=t.find(">colgroup"),s=Oe(n,function(e){return r=e.width,r&&0!==parseInt(r,10)?Ae.format('',typeof r===nn?r:r+"px"):""});(i||a.find(".k-hierarchy-col").length)&&s.splice(0,0,''),a.length&&a.remove(),a=e(Array(o+1).join('')+s.join("")),a.is("colgroup")||(a=e("").append(a)),t.prepend(a),Fn.msie&&8==Fn.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function ie(e,t){var n,i,o=0,r=e.find("th:not(.k-group-cell)");for(n=0,i=t.length;nform>table"),w(r),!1,0),o=i.find("tr:first")),ae(o[0].cells,n,!0))}function ue(e,t,n){n=n||1;var i,o,r;for(o=0,r=e.length;ocolgroup>col");for(t=0,n=o.length;ti?(o=t.rows[t.rows.length-1],Dn.test(o.className)&&(o=t.rows[t.rows.length-2]),r=n-i):(o=e.rows[e.rows.length-1],Dn.test(o.className)&&(o=e.rows[e.rows.length-2]),r=i-n),o.style.height=o.offsetHeight+r+"px")}function fe(e,t){var n,i=e.offsetHeight,o=t.offsetHeight;i>o?n=i+"px":i.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function ke(n){var i=e(n.currentTarget),o=i.is("th"),r=this.table.add(this.lockedTable),a=this.thead.parent().add(e(">table",this.lockedHeader)),s=we(n.target),l=e(n.target).is(".k-checkbox-label, .k-checkbox"),c=e(n.target),d=i.closest("table")[0];return s&&i.find(Ae.roleSelector("filtercell")).length?(this._setCurrent(i),t):(d!==r[0]&&d!==r[1]&&d!==a[0]&&d!==a[1]||c.is("a.k-i-expand, a.k-i-collapse")||(this.options.navigatable&&this._setCurrent(i,!1,l),!o&&s||setTimeout(function(){Pn&&e(Ae._activeElement()).hasClass("k-widget")||!e(Ae._activeElement()).is(Ht)&&we(Ae._activeElement())&&e.contains(d,Ae._activeElement())||me(d,!0)}),o&&!Ae.support.touch&&n.preventDefault()),t)}function ye(e,t){if(!t)return 0;var n=0;return Ae.support.browser.webkit&&(n=e.width()),n}function xe(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function Ce(e){return'

        #=data.text#

        '}function Se(e){return'

         

        '}function Te(e,t,n){return''+i(t)+'

        '+n+"

        "}function De(e){return'

         

        '}var Ae=window.kendo,Ee=Ae.ui,Ie=Ae.data.DataSource,Me=Ae.data.ObservableObject,Fe=Ae.support.tbodyInnerHtml,Re=Ae._activeElement,Pe=Ee.Widget,ze=Ae._outerWidth,Be=Ae._outerHeight,Le=Ae.keys,He=e.isPlainObject,Ne=e.extend,Oe=e.map,Ve=e.grep,We=e.isArray,Ue=e.inArray,qe=Array.prototype.push,je=e.proxy,Ge=Ae.isFunction,$e=e.isEmptyObject,Ye=e.contains,Ke=Math,Qe=".",Xe="progress",Je="error",Ze="k-hierarchy-cell",et=":not(.k-group-cell):not(.k-hierarchy-cell:not(:has(.k-icon.k-i-collapse,.k-icon.k-i-expand))):visible",tt="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",nt="tr:not(.k-footer-template):visible",it=":not(.k-group-cell):not(.k-detail-cell):not(.k-hierarchy-cell):visible",ot="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",rt=ot+":first",at=ot+":last",st=nt+":first>"+it+":first",lt="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",ct=".kendoGrid",dt="k-grid-content-locked",ut="k-group-cell",ht="edit",pt="beforeEdit",ft="save",gt="remove",mt="detailInit",vt="filterMenuInit",_t="columnMenuInit",bt="filterMenuOpen",wt="columnMenuOpen",kt="cellClose",yt="change",xt="columnHide",Ct="columnShow",St="saveChanges",Tt="dataBound",Dt="detailExpand",At="detailCollapse",Et="itemchange",It="page",Mt="paging",Ft="scroll",Rt="sync",Pt="k-state-focused",zt=":kendoFocusable",Bt="k-state-selected",Lt="k-checkbox",Ht="input[data-role='checkbox']."+Lt,Nt="k-grid-norecords",Ot="k-link",Vt="k-icon",Wt="k-sort-order",Ut="k-header-column-menu",qt="k-grid-filter",jt="resize",Gt="columnResize",$t="columnReorder",Yt="columnLock",Kt="columnUnlock",Qt="navigate",Xt="click",Jt="mousedown",Zt="height",en="tabIndex",tn="function",nn="string",on="bottom",rn="container-for",an="field",sn="input",ln="incell",cn="inline",dn="uid",un=1,hn="colSpan",pn="overflow",fn="hidden",gn="group-sort",mn="Are you sure you want to delete this record?",vn="No records available.",_n="Delete",bn="Cancel",wn="Collapse",kn="Expand",yn="aria-label",xn=/(\}|\#)/gi,Cn=/#/gi,Sn="[\\x20\\t\\r\\n\\f]",Tn=RegExp("(^|"+Sn+")(k-group-cell|k-hierarchy-cell)("+Sn+"|$)"),Dn=RegExp("(^|"+Sn+")(k-filter-row)("+Sn+"|$)"),An='# if (iconClass) {##=text## } else { ##=text## } #',En='# var checkboxGuid = kendo.guid(); #',In='# var checkboxGuid = kendo.guid(); #',Mn=!1,Fn=Ae.support.browser,Rn=Fn.msie&&7==Fn.version,Pn=Fn.msie&&8==Fn.version,zn=Fn.msie&&11===Fn.version,Bn=/Mac OS/.test(navigator.userAgent),Ln={content:"k-content",widget:"k-widget",scrollContainer:"k-scroll-container"},Hn=Pe.extend({init:function(e,t){var n=this;Pe.fn.init.call(n,e,t),n._refreshHandler=je(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(yt,t._refreshHandler),t.dataSource=e,t.dataSource.bind(yt,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[Mt,It,Ft],destroy:function(){var e=this;Pe.fn.destroy.call(e),e.dataSource.unbind(yt,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off(ct),clearTimeout(e._timeout),e._scrollingTimeout&&clearTimeout(e._scrollingTimeout),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,n=this,i=Ae.support.scrollbar()+1,o=n.element;o.css({width:"auto",overflow:"hidden"}).css(Mn?"padding-left":"padding-right",i),n.content=o.children().first(),t=n.wrapper=n.content.wrap('
        ').parent().bind("DOMMouseScroll"+ct+" mousewheel"+ct,je(n._wheelScroll,n)),n._wrapper(),Ae.support.kineticScrollNeeded&&(n.drag=new Ae.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(o).bind("scroll"+ct,je(n._scroll,n))},_wrapper:function(){var e=this;zn&&(e.wrapper.css({"overflow-y":Ft}),e.element.css(Mn?"padding-left":"padding-right",0))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,n=t.scrollTop(),i=Ae.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,o=e.currentTarget.scrollTop,r=n.dataSource,a=n.itemHeight,s=r.skip()||0,l=n._rangeStart||s,c=n.element.innerHeight(),d=!!(n._scrollbarTop&&n._scrollbarTop>o),u=Ke.max(Ke.floor(o/a),0),h=d?Ke.ceil(c/a):Ke.floor(c/a),p=Ke.max(u+h,0);return n._preventScroll?(n._preventScroll=!1,t):(n._scrollTop=o-l*a,n._scrollbarTop=o,n._scrolling=i,n._fetch(u,p,d)||(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&&n||e._isScrolledToBottom())&&(t.scrollTop(n+Ae.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(n-Ae.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,o=this,r=o.wrapper;return t=e(t),!!(t[0]&&Ye(r[0],t[0])&&(n=t.offset().top-r.offset().top,i=t.outerHeight()/2,(n>=0||Ke.abs(n)<=i)&&Ke.floor(n+i)<=r.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,o=e[0].offsetTop,r=e[0].offsetHeight;i>o?this.verticalScrollbar[0].scrollTop-=n/2:o+r>=i+n&&(this.verticalScrollbar[0].scrollTop+=n/2)},_fetch:function(t,n,i){var o=this,r=o.dataSource,a=o.itemHeight,s=r.take(),l=o._rangeStart||r.skip()||0,c=Ke.floor(t/s)*s,d=!1,u=.33,h=o.verticalScrollbar,p=Fn.webkit?1:0;return t=l+s&&!i?(d=!0,l=Ke.min(t,r.total()-s),o._scrollTop=h.scrollTop()>=h[0].scrollHeight-h[0].offsetHeight-p?o.wrapper[0].scrollHeight-o.wrapper[0].offsetHeight:a,o._page(l,s)):!o._fetching&&o.options.prefetch&&(ts&&r.prefetch(c-s,s,e.noop),n>c+s*u&&r.prefetch(c+s,s,e.noop)),d},fetching:function(){return this._fetching},_page:function(t,n,i){var o=this,r=!o.options.prefetch,a=o.dataSource;i=Ge(i)?i:e.noop,o.trigger(Mt,{skip:t,take:n})||(clearTimeout(o._timeout),o._fetching=!0,o._rangeStart=t,a.inRange(t,n)?(Ae.ui.progress(e(o.wrapper).parent(),!0),a.range(t,n,function(){Ae.ui.progress(e(o.wrapper).parent(),!1),i(),o.trigger(It)})):(r||Ae.ui.progress(o.wrapper.parent(),!0),o._timeout=setTimeout(function(){o._scrolling||(r&&Ae.ui.progress(o.wrapper.parent(),!0),a.range(t,n,function(){Ae.ui.progress(o.wrapper.parent(),!1),i(),o.trigger(It)}))},100)))},repaintScrollbar:function(e){var n,i=this,o="",r=i.options.maxScrollHeight,a=i.dataSource,s=Ae.support.kineticScrollNeeded?0:Ae.support.scrollbar(),l=i.wrapper[0],c=i._isScrolledToBottom(),d=i.itemHeight=i.options.itemHeight()||0,u=l.scrollWidth>l.offsetWidth?s:0,h=a.total()*d+u;for(n=0;n
        ';h%r&&(o+='
        '),i.verticalScrollbar.html(o),c&&!i._isScrolledToBottom()&&i.scrollToBottom(),t!==i._scrollTop&&e&&(l.scrollTop=i._scrollTop,i._scrollWrapperOnColumnResize())},refresh:function(e){var n=this,i=n.dataSource,o=n._rangeStart,r=(e||{}).action,a=n._isScrolledToBottom()||!r||r!==Et&&r!==gt&&r!==Rt;Ae.ui.progress(n.wrapper.parent(),!1),clearTimeout(n._timeout),n.repaintScrollbar(a),n.drag&&n.drag.cancel(),t===o||n._fetching||((!r||r!==Rt&&r!==Et)&&(n._rangeStart=i.skip()),1!==i.page()||r&&(r===Rt||r===Et)||(n.verticalScrollbar[0].scrollTop=0)),n._fetching=!1}}),Nn={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"}},On=Ae.ui.DataBoundWidget.extend({init:function(t,n,i){var o=this;n=We(n)?{dataSource:n}:n,Pe.fn.init.call(o,t,n),i&&(o._events=i),Mn=Ae.support.isRtl(t),o._element(),o._aria(),o._columns(e.extend(!0,[],o.options.columns)),o._dataSource(),o._tbody(),o._pageable(),o._thead(),o._groupable(),o._toolbar(),o._setContentHeight(),o._templates(),o._navigatable(),o._selectable(),o._clipboard(),o._details(),o._editable(),o._attachCustomCommandsEvent(),o._adaptiveColumns(),o._minScreenSupport(),o.options.autoBind?o.dataSource.fetch():(o._group=o._groups()>0,o._footer()),o.lockedContent&&(o.wrapper.addClass("k-grid-lockedcolumns"),o._resizeHandler=function(){o.resize()},e(window).on("resize"+ct,o._resizeHandler)),Ae.notify(o)},events:[yt,"dataBinding","cancel",Tt,Dt,At,mt,vt,bt,_t,wt,ht,pt,ft,gt,St,kt,Gt,$t,Ct,xt,Yt,Kt,Qt,"page","sort","filter","group","groupExpand","groupCollapse"],setDataSource:function(e){var t,n=this,i=n.options.scrollable;n.options.dataSource=e,n._dataSource(),n._pageable(),n._thead(),i&&(i.virtual?(t=n.content.find(">.k-virtual-scrollable-wrap"),t.scrollLeft(ye(t,Mn))):(t=n.tbody,n.content.scrollLeft(ye(t,Mn)))),n.options.groupable&&n._groupable(),n.virtualScrollable&&n.virtualScrollable.setDataSource(n.options.dataSource),n.options.navigatable&&n._navigatable(),n.options.selectable&&n._selectable(),n.options.autoBind&&n.dataSource.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:"",search:!1,noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:bn,confirmation:mn,confirmDelete:_n},commands:{create:Nn.create.text,cancel:Nn.cancel.text,save:Nn.save.text,destroy:Nn.destroy.text,edit:Nn.edit.text,update:Nn.update.text,canceledit:Nn.canceledit.text,excel:Nn.excel.text,pdf:Nn.pdf.text},search:"Search...",noRecords:vn,expandCollapseColumnHeader:"",groupHeader:"Press ctrl + space to group",ungroupHeader:"Press ctrl + space to ungroup"}},destroy:function(){var t,n=this;n._angularItems("cleanup"),n._destroyColumnAttachments(),Pe.fn.destroy.call(n),this._navigatableTables&&(this._navigatableTables.off(ct),this._navigatableTables=null),n._resizeHandler&&e(window).off("resize"+ct,n._resizeHandler),n.pager&&n.pager.element&&n.pager.destroy(),n.timer&&clearTimeout(n.timer),n._progressTimeOut&&clearTimeout(n._progressTimeOut),n._collapseGroupsTimeOut&&clearTimeout(n._collapseGroupsTimeOut),n._endlessFetchTimeOut&&clearTimeout(n._endlessFetchTimeOut),n.pager=null,n._destroyGroupable(),n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.selectable&&n.selectable.element&&(n.selectable.destroy(),n.clearArea(),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(yt,n._refreshHandler).unbind(Xe,n._progressHandler).unbind(Je,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._isMobile&&(n.wrapper.off("transitionend"+ct),n.wrapper.off("contextmenu"+ct)),n.minScreenResizeHandler&&e(window).off("resize",n.minScreenResizeHandler),n._detachColumnMediaResizeHandler(),n._draggableInstance&&n._draggableInstance.element&&n._draggableInstance.destroy(),n._draggableInstance=null,t.off(ct),Ae.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,o,r=this.options;return r.dataSource=null,n=Ne(!0,{},this.options),n.columns=Ae.deepExtend([],this.columns),i=this.dataSource,o=i.options.data&&i._data,i.options.data=null,n.dataSource=e.extend(!0,{},i.options),i.options.data=o,n.dataSource.data=o,n.dataSource.page=i.page(),n.dataSource.filter=e.extend(!0,{},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,o,r=this.getOptions();Ae.deepExtend(r,e),e.dataSource||(r.dataSource=this.dataSource),t=this.wrapper,n=this._events,i=this.element,this.destroy(),this.options=null,this._isMobile&&(o=t.closest(Ae.roleSelector("pane")).parent(),o.after(t),o.remove(),t.removeClass("k-grid-mobile")),t[0]!==i[0]&&(t.before(i),t.remove()),i.empty(),this.init(i,r,n),this._setEvents(r)},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=Ae.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"),o=t.data("kendoColumnMenu");n&&n.destroy(),i&&i.destroy(),o&&o.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,n,i=this,o=Y(i.columns||[]);for(t=0,n=o.length;t .k-grid-content > table"):t.element.children("table"),n.length||(n=e("").appendTo(t.element))),Rn&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,o,r,a,s,l,c=this,d=c.options.columnResizeHandleWidth,u=c.options.scrollable,h=c.resizeHandle;h&&c.lockedContent&&h.data("th")[0]!==n[0]&&(h.off(ct).remove(),h=null),h||(h=c.resizeHandle=e('
        '),t.append(h)),i=n.offset().left+t.scrollLeft()-parseFloat(n.css("marginLeft"))-(t.offset().left+parseFloat(t.css("borderLeftWidth"))),Mn?u&&(r=n.closest(".k-grid-header-wrap, .k-grid-header-locked"),a=Fn.msie?r.scrollLeft():0,s=Fn.webkit?r[0].scrollWidth-r[0].offsetWidth-r.scrollLeft():0,l=Fn.mozilla?r[0].scrollWidth-r[0].offsetWidth-(r[0].scrollWidth-r[0].offsetWidth-r.scrollLeft()):0,i-=s-l+a):i+=n[0].offsetWidth,o=n.offset().top-parseFloat(n.css("marginTop"))-(t.offset().top+parseFloat(t.css("borderTopWidth"))),h.css({top:o,left:i-3*d/2,height:Be(n),width:3*d}).data("th",n).show(),h.off("dblclick"+ct).on("dblclick"+ct,function(){c._autoFitLeafColumn(n.data("index"))})},_positionColumnResizeHandle:function(){var n=this,i=n.lockedHeader?n.lockedHeader.find("thead:first"):e();n.thead.add(i).on("mousemove"+ct,"tr:not(.k-filter-row) > th",function(i){var o=t!==i.buttons?i.buttons:i.which||i.button,r=e(this);r.hasClass("k-group-cell")||r.hasClass("k-hierarchy-cell")||t!==o&&0!==o||r[0].hasAttribute(Ae.attr(hn))||n._createResizeHandle(r.closest("div"),r)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._resetResizeHandleHeader(),this._hideResizeHandle())},_resetResizeHandleHeader:function(){var t;this.resizeHandle&&(t=e(this.resizeHandle).data("th"),t&&(t.find(Qe+Ot).find(Qe+Vt).show(),t.find(Qe+Wt).show(),t.find(Qe+Ut).show(),t.find(Qe+qt).show()))},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off(ct).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,n=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new Ae.UserEvents(n.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,minHold:500,hold:function(n){var i=e(n.target);n.preventDefault(),t.resizeHandle&&(t.resizeHandle.data("th").removeClass("k-column-active"),t._resetResizeHandleHeader()),i.addClass("k-column-active"),i.find(Qe+Ot).find(Qe+Vt).hide(),i.find(Qe+Wt).hide(),i.find(Qe+Ut).hide(),i.find(Qe+qt).hide(),t._createResizeHandle(i.closest("div"),i),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=je(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},resizeColumn:function(n,i){var o,r,a,s,l=this,c=!!n.locked,d=!!n.hidden,u=this.options,h=Ae.support.mobileOS?0:Ae.support.scrollbar(),p=c?Ue(n,j(l.columns)):Ue(n,q(l.columns)),f=c?l.lockedTable:l.table,g=l.footer||e(),m=c?l.lockedHeader.find("table"):l.thead.closest("table"),v=n.minResizableWidth||10,_=ze(c?f.find("tbody"):l.tbody);return d?(n.width=i>v?i:v,t):(l.footer&&l.lockedContent&&(g=l.footer.children(c?".k-grid-footer-locked":".k-grid-footer-wrap")),o=u.scrollable?m.find("col:not(.k-group-col,.k-hierarchy-col):eq("+p+")").add(f.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")")):f.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+p+")"),u.scrollable?(r=!1,a=l.wrapper.width()-h,s=i=i>v?i:v,c&&_-i+s>a&&(s=i+(a-_-2*h),s<0&&(s=i),r=!0),s>10&&s>=v&&(o.css("width",s),_&&(s=r?a-2*h:_+(i-n.width),f.add(m).add(g).css("width",s),c||(l._footerWidth=s))),l._scrollVirtualWrapperOnColumnResize()):i>10&&i>=v&&o.css("width",i),n.width=i,l._applyLockedContainersWidth(),l._syncLockedContentHeight(),l._syncLockedHeaderHeight(),t)},_resizable:function(){var t,n,i,o,a,s,l,c,d=this,u=d.options,h=this._isMobile,p=Ae.support.mobileOS?0:Ae.support.scrollbar();u.resizable&&(t=u.scrollable?d.wrapper.find(".k-grid-header-wrap:first"):d.wrapper,h?d._positionColumnResizeHandleTouch(t):d._positionColumnResizeHandle(t),d.resizable&&d.resizable.destroy(),d.resizable=new Ee.Resizable(t.add(d.lockedHeader),{handle:(u.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('
        ').css({height:Be(t.data("th"))+d.tbody.attr("clientHeight")})},start:function(t){var p,f,g,m,v;c=e(t.currentTarget).data("th"),h&&d._hideResizeHandle(),p=c.closest("table"),f=e.inArray(c[0],Q(c.closest("thead")).filter(":visible")),s=p.parent().hasClass("k-grid-header-locked"),g=s?d.lockedTable:d.table,m=d.footer||e(),d.footer&&d.lockedContent&&(m=d.footer.children(s?".k-grid-footer-locked":".k-grid-footer-wrap")),r(d.wrapper,"col-resize"),l=u.scrollable?p.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")").add(g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")).add(m.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")):g.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")"),v=e.map(d.columns,function(e){return!e.hidden&&(s&&e.locked||!s&&!e.locked)?e:null}),n=t.x.location,i=ze(c),o=Y(v)[f].minResizableWidth||10,a=ze(s?g.children("tbody"):d.tbody),Fn.webkit&&d.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var r,h,f,g,m,v,_=Mn?-1:1,b=i+t.x.location*_-n*_;u.scrollable?(s&&d.lockedFooter?r=d.lockedFooter.children("table"):d.footer&&(r=d.footer.find(">.k-grid-footer-wrap>table")),r&&r[0]||(r=e()),h=c.closest("table"),f=s?d.lockedTable:d.table,g=!1,m=d.wrapper.width()-p,v=b,s&&a-i+v>m&&(v=i+(m-a-2*p),v<0&&(v=b),g=!0),v>10&&v>=o&&(l.css("width",v),a&&(v=g?m-2*p:a+t.x.location*_-n*_,f.add(h).add(r).css("width",v),s||(d._footerWidth=v))),d._scrollVirtualWrapperOnColumnResize()):b>10&&b>=o&&l.css("width",b)},resizeend:function(){var e,t,n,o=ze(c);r(d.wrapper,""),Fn.webkit&&d.wrapper.removeClass("k-grid-column-resizing"),i!=o&&(t=d.lockedHeader?d.lockedHeader.find("thead:first tr:first").add(d.thead.find("tr:first")):c.parent(),n=c.attr(Ae.attr("index")),n||(n=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(c)),e=Y(d.columns)[n],e.width=o,d.trigger(Gt,{column:e,oldWidth:i,newWidth:o}),d._applyLockedContainersWidth(),d._syncLockedContentHeight(),d._syncLockedHeaderHeight()),d._resetResizeHandleHeader(),d._hideResizeHandle(),c=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:Ae.guid(),autoScroll:!0,filter:n.content?".k-grid-header:first "+lt:"table:first>.k-grid-header "+lt,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+ct+"scrolling").bind("scroll"+ct+"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(){n._resetResizeHandleHeader(),t.children(".k-grid-header-wrap").unbind("scroll"+ct+"scrolling")},drag:function(){n._hideResizeHandle()},hint:function(t){var n=t.attr(Ae.attr("title"));return n&&(n=Ae.htmlEncode(n)),e('
        ').html(n||t.attr(Ae.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=R(t.columns);return i[e].lockable!==!1&&P(i,t.columns,e,n)>-1},inSameContainer:function(n){return e(n.source).parent()[0]===e(n.target).parent()[0]&&P(R(t.columns),t.columns,n.sourceIndex,n.targetIndex)>-1},change:function(e){var n=R(t.columns),i=n[e.oldIndex],o=P(n,t.columns,e.oldIndex,e.newIndex);t.trigger($t,{newIndex:o,oldIndex:Ue(i,n),column:i}),t.reorderColumn(o,i,"before"===e.position)}}))},_reorderHeader:function(e,t,n,i){var o,r,l,c,d,u=this,h=E(e[0],u.columns),p=E(t,u.columns),f=[];for(l=0;lth.k-header:not(.k-group-cell,.k-hierarchy-cell)"):s(u.lockedHeader,u.thead,"tr:eq("+h.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),c=W(e).length,d=W([t]).length,f.length?(c>0&&0===d?(o="prepend",S(e,t,f,u.columns,u.lockedHeader.find("thead"),u.thead,this._groups(),o)):0===c&&d>0&&(o=0!==p.cell||!e[0].columns||t.columns||u._group?"append":"prepend",S(e,t,f,U(u.columns),u.thead,u.lockedHeader.find("thead"),this._groups(),o)),(t.columns||h.cell-p.cell>1||p.cell-h.cell>1)&&(t=M(u.columns,t,e[0],n,u.columns),t&&(c>0&&0===d?u._reorderHeader(f,t,n,u.thead):0===c&&d>0?u._reorderHeader(f,t,n,u.lockedHead):u._reorderHeader(f,t,n)))):c!==d&&C(r[h.cell],u.columns,c),a(r,h.cell,p.cell,n,e.length)},_reorderContent:function(t,n,i){var o,r,l,c,d,u,h=this,p=e(),f=t[0],g=w(t),m=Ue(f,Y(h.columns)),v=Ue(n,Y(h.columns)),_=Ue(g[0],G(h.columns)),b=Ue(n,G(h.columns)),k=W(h.columns).length,y=!!n.locked,x=h.footer||h.wrapper.find(".k-grid-footer"),C=o=b;for(n.hidden&&(l=y?W(h.columns):U(h.columns),w(l).length>0?(C=o=b=this._findClosestVisibleColumnIndex(l,v),r=w(l.slice(v)).length>0):y?(b=h.lockedTable.find("colgroup"),C=h.lockedHeader.find("colgroup"),o=e(h.lockedFooter).find(">table>colgroup")):(b=h.tbody.prev(),C=h.thead.prev(),o=x.find(".k-grid-footer-wrap").find(">table>colgroup"))),h._hasFilterRow()&&a(h.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),m,v,i,t.length),_>=0&&a(s(h.lockedHeader,h.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,C,r?r:i,g.length),h.options.scrollable&&_>=0&&a(s(h.lockedTable,h.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),_,b,r?r:i,g.length),x&&x.length&&(_>=0&&a(s(h.lockedFooter,x.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),_,o,r?r:i,g.length),a(x.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),m,v,i,t.length)),c=h.tbody.children(":not(.k-grouping-row,.k-detail-row)"),h.lockedTable&&(k>v?k<=m&&ue(h.lockedTable.find(">tbody>tr.k-grouping-row"),h.table.find(">tbody>tr.k-grouping-row"),t.length):k>m&&ue(h.table.find(">tbody>tr.k-grouping-row"),h.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),p=h.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),d=0,u=c.length;dtd:not(.k-group-cell,.k-hierarchy-cell)"),m,v,i,t.length)},_findClosestVisibleColumnIndex:function(e,t){var n=w(e.slice(t)).length>0?e.slice(t):e.slice(0,t+1).reverse(),i=w(n)[0]; return Ue(i,w(this.columns))},_autoFitLeafColumn:function(e){this.autoFitColumn(Y(this.columns)[e])},autoFitColumn:function(t){var n,i,o,r,a,s,l,c,d,u,h,p,f,g,m,_,w,k,y,x,C=this,S=C.options,T=C.columns,D=C.lockedHeader?Q(C.lockedHeader.find(">table>thead")).filter(v).length:0,A="col:not(.k-group-col):not(.k-hierarchy-col)",E="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?T[t]:He(t)?Ve(z(T),function(e){return e===t})[0]:Ve(z(T),function(e){return e.field===t})[0],t&&b(t)){for(s=t.minResizableWidth,n=Ue(t,Y(T)),r=t.locked,o=r?C.lockedHeader.children("table"):C.thead.parent(),i=o.find("[data-index='"+n+"']"),d=r?C.lockedTable:C.table,u=C.footer||e(),C.footer&&C.lockedContent&&(u=C.footer.children(r?".k-grid-footer-locked":".k-grid-footer-wrap")),h=u.find("table").first(),C.lockedHeader&&!r&&(n-=D),p=0;pm&&(m=s),a.width(m),t.width=m,S.scrollable){for(_=o.find("col"),k=0,y=0,x=_.length;y0&&a._renderGroupRows(),a._updateTablesWidth(),a._applyLockedContainersWidth(),a._syncLockedHeaderHeight(),a._syncLockedContentHeight(),a._updateFirstColumnClass(),o&&(h?a.trigger(Yt,{column:n}):a.trigger(Kt,{column:n}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=T(e,W(this.columns))),T(this.thead,U(this.columns),t)},lockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:Ve(n,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(t=W(n).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:Ve(n,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=W(n).length,this.reorderColumn(t,e,!0))},cellIndex:function(t){var n=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(n=Y(W(this.columns)).length),e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t)+n},_modelForContainer:function(t){t=e(t),t.is("tr")||"popup"===this._editMode()||(t=t.closest("tr"));var n=t.attr(Ae.attr("uid"));return this.dataSource.getByUid(n)},_editable:function(){var t,n=this,i=n.selectable&&n.selectable.options.multiple,o=n.options.editable,r=function(){var t=Re(),i=n._editContainer;i&&i[0]&&!e.contains(i[0],t)&&i[0]!==t&&!e(t).closest(".k-animation-container").length&&(n.editable.end()?n.closeCell():n._scrollVirtualWrapper())};o&&(this.wrapper.addClass("k-editable"),t=n._editMode(),"incell"===t?(n.table.add(n.lockedTable).on("mousedown"+ct,nt+">"+it,function(t){var i=e(t.target);"incell"===n._editMode()&&i.hasClass("k-checkbox-label")&&i.prev().attr(Ae.attr("bind"))&&t.preventDefault()}),o.update!==!1&&(Bn&&n.wrapper.on(Xt+ct,".k-edit-cell > input[type='checkbox']",function(t){e(t.target).focus()}).on(Xt+ct,".k-edit-cell",function(t){e(t.target).is("input")||e(t.currentTarget).find("input[type='checkbox']").focus()}).on(Jt+ct,"tr:not(.k-grouping-row) > td",function(t){var i=n._editContainer;n._mousedownOnEditCell=!(!i||!i[0]||!e.contains(i[0],t.target)&&i[0]!==t.target)}),n.wrapper.on(Ae.support.touch?"touchstart"+ct:Xt+ct,"tr:not(.k-grouping-row) > td",function(t){var o=e(this),r=n.lockedTable&&o.closest("table")[0]===n.lockedTable[0];n._mousedownOnEditCell=!1,o.hasClass("k-hierarchy-cell")||o.hasClass("k-detail-cell")||o.hasClass("k-group-cell")||o.hasClass("k-edit-cell")||o.has("a.k-grid-delete").length||o.has("button.k-grid-delete").length||o.closest("tbody")[0]!==n.tbody[0]&&!r||e(t.target).is(":input")||(n.editable?n.editable.end()?(i&&e(Re()).blur(),n.closeCell(),n.editCell(o)):n._scrollVirtualWrapper():n.editCell(o))}).on("focusin"+ct,function(){e.contains(this,Re())||(clearTimeout(n.timer),n.timer=null)}).on("focusout"+ct,function(e){var t=!0;Bn&&n._mousedownOnEditCell&&(t=!1),n._mousedownOnEditCell=!1,t&&(n.timer=setTimeout(function(){r(e)},1))}))):o.update!==!1&&(n.wrapper.on(Xt+ct,"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"+ct,"tr:not(.k-grouping-row) > td",function(){n.editable&&!n.editable.end()&&n._scrollVirtualWrapper()})),o.destroy!==!1?n.wrapper.on(Xt+ct,"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(Xt+ct,"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,o,r;if(t=e(t),n=this,i=Y(n.columns)[n.cellIndex(t)],o=n._modelForContainer(t),n.closeCell(),o&&be(i,o)&&!i.command){if(n.trigger(pt,{model:o}))return;n._attachModelChange(o),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:o,target:n,change:function(e){n.trigger(ft,{values:e.values,container:t,model:o})&&e.preventDefault()},skipFocus:!(!n._isVirtualIncellEditable()||!n._editableState)}).data("kendoEditable"),r=t.parent().addClass("k-grid-edit-row"),n.lockedContent&&(fe(r[0],n._relatedRow(r).addClass("k-grid-edit-row")[0]),n._syncLockedScroll()),n.trigger(ht,{container:t,model:o})}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?Ae.support.scrollbar():0;this.lockedContent.height(t[0].offsetHeight-n)},_syncLockedScroll:function(){this.lockedContent[0].scrollTop=this.content[0].scrollTop,this.virtualScrollable&&(this.lockedContent[0].scrollTop=this.wrapper.find(".k-virtual-scrollable-wrap")[0].scrollTop)},_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),pe(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(Xt+ct,"a.k-grid-cancel",e._editCancelClickHandler),t.off(Xt+ct,"a.k-grid-update",e._editUpdateClickHandler)),e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView(),e._editableIsClosing=null}};e.editable&&("popup"!==e._editMode()||e._isMobile?t():e._editableIsClosing?e._editContainer.data("kendoWindow").bind("deactivate",t):(e._editableIsClosing=!0,e._editContainer.data("kendoWindow").bind("deactivate",t).close())),e._confirmDialog&&(e._confirmDialog.close(),e._confirmDialog.destroy(),e._confirmDialog=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(yt,e._modelChangeHandler)},closeCell:function(e){var t,n,i,o=this,r=o._editContainer;r&&(i=o._modelForContainer(r),e&&o.trigger("cancel",{container:r,model:i})||(o.trigger(kt,{type:e?"cancel":"save",model:i,container:r}),r.removeClass("k-edit-cell"),t=Y(o.columns)[o.cellIndex(r)],n=r.parent().removeClass("k-grid-edit-row"),o.lockedContent&&o._relatedRow(n).removeClass("k-grid-edit-row"),o._destroyEditable(),o._displayCell(r,t,i),o._shouldClearEditableState&&o._clearEditableState(),o.trigger("itemChange",{item:n,data:i,ns:Ee}),o.lockedContent&&fe(n.css("height","")[0],o._relatedRow(n).css("height","")[0])))},_displayCell:function(e,t,n){var i=this,o={storage:{},count:0},r=Ne({},Ae.Template,i.options.templateSettings),a=Ae.template(i._cellTmpl(t,o),r);o.count>0&&(a=je(a,o.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,o,r,a=this,s=a._editMode();"incell"!==s&&a.cancelRow(),t=e(t),a.lockedContent&&(t=t.add(a._relatedRow(t))),t=t.hide(),n=a._modelForContainer(t),n&&!a.trigger(gt,{row:t,model:n})?(r=a.dataSource.options.schema,a._selectedIds&&r&&r.model&&(i=Ge(a.dataSource.options.schema.model)?a.dataSource.options.schema.model.fn.idField:a.dataSource.options.schema.model.id,o=n[i],delete a._selectedIds[o]),a.dataSource.remove(n),"inline"!==s&&"popup"!==s||a.dataSource.sync()):"incell"===s&&a._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,o,r=this;t instanceof Me?n=t:(t=e(t),n=r._modelForContainer(t)),i=r._editMode(),r.cancelRow(),n&&(t=r.tbody.children("["+Ae.attr("uid")+"="+n.uid+"]"),r._attachModelChange(n),"popup"===i?r._createPopupEditor(n):"inline"===i?r._createInlineEditor(t,n):"incell"===i&&e(t).children(et).each(function(){var t=e(this),i=Y(r.columns)[r.cellIndex(t)];if(n=r._modelForContainer(t),n&&(!n.editable||n.editable(i.field))&&i.field&&!i.selectable)return r.editCell(t),!1}),o=r.editView?r.editView.element:r._editContainer,o&&(this._editCancelClickHandler||(this._editCancelClickHandler=je(this._editCancelClick,this)),o.on(Xt+ct,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=je(this._editUpdateClick,this)),o.on(Xt+ct,"a.k-grid-update",this._editUpdateClickHandler)))},_editUpdateClick:function(e){e.preventDefault(),e.stopPropagation(),this.saveRow()},_editCancelClick:function(t){var n,i=this,o=i.options.navigatable,r=i.editable.options.model,a=i.editView?i.editView.element:i._editContainer;t.preventDefault(),t.stopPropagation(),i.trigger("cancel",{container:a,model:r})||(n=i.items().index(e(i.current()).parent()),i.cancelRow(),o&&(i._setCurrent(i.items().eq(n).children().filter(it).first()),me(i.table,!0)))},_createPopupEditor:function(n){var i,o,r,a,s,l,c,d,u,h,p,f,g,m=this,v="
        <'+(m._isMobile?"ul":"div")+' class="k-edit-form-container">',_=[],b=Y(m.columns),w=Ae.guid(),k=m.options.editable,y=k.template,x=He(k)?k.window:{},C=Ne({},Ae.Template,m.options.templateSettings);if(!m.trigger(pt,{model:n})){if(x=x||{},y)for(typeof y===nn&&(y=Ae.unescape(y)),v+=Ae.template(y,C)(n),r=0,a=b.length;r',be(i,n)?(_.push({field:i.field,title:i.title,format:i.format,editor:i.editor,values:i.values}),v+='
        ",m.editView=m.pane.append("
        '+(m.options.messages.commands.edit||"Edit")+'
        '+v+"
        "),g=m._editContainer=m.editView.element.find(".k-popup-edit-form")):(v+='
        ',v+=m._createButton({name:"update",text:l,attr:p,iconClass:d})+m._createButton({name:"canceledit",text:c,attr:p,iconClass:u}),v+="
        ",g=m._editContainer=e(v).appendTo(m.wrapper).eq(0).kendoWindow(Ne({modal:!0,resizable:!1,draggable:!0,title:m.options.messages.commands.edit||"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),m.trigger("cancel",{container:g,model:n}))return i.preventDefault(),t;var o=m.items().index(e(m.current()).parent());m._editableIsClosing=!0,m.cancelRow(),m.options.navigatable&&(m._setCurrent(m.items().eq(o).children().filter(it).first()),me(m.table,!0))}}},x))),m.editable=m._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1,target:m}).data("kendoEditable"),m._openPopUpEditor(),m.trigger(ht,{container:g,model:n})}},_openPopUpEditor:function(){var e=this,t=e._editContainer?e._editContainer.data("kendoWindow"):null,n=(e.options.editable||{}).window||{};this._isMobile?this.pane.navigate(this.editView,this._editAnimation):t&&(n.position||t.center(),t.open())},_createInlineEditor:function(t,n){var i,o,r,a=this,s=[];a.trigger(pt,{model:n})||(a.lockedContent&&(t=t.add(a._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(o=e(this),i=Y(a.columns)[a.cellIndex(o)],!i.command&&be(i,n))s.push({field:i.field,title:i.title,format:i.format,editor:i.editor,values:i.values}),o.attr(Ae.attr("container-for"),i.field),o.empty();else if(i.command&&(r=ge(i.command,"edit"))){o.empty();var t,l,c,d,u;He(r)&&(He(r.text)&&(t=r.text.update,l=r.text.cancel),He(r.iconClass)&&(c=r.iconClass.update,d=r.iconClass.cancel),r.attr&&(u=r.attr)),e(a._createButton({name:"update",text:t,attr:u,iconClass:c})+a._createButton({name:"canceledit",text:l,attr:u,iconClass:d})).appendTo(o)}}),a._editContainer=t,a._editContainer.addClass("k-grid-edit-row"),a._shouldClearEditableState&&a._clearEditableState(),a.editable=new Ae.ui.Editable(a._editContainer,{target:a,fields:s,model:n,skipFocus:!!(a._isVirtualInlineEditable()&&a._editableState&&a._editableState.field),clearContainer:!1}),t.length>1&&(fe(t[0],t[1]),a._applyLockedContainersWidth()),a.trigger(ht,{container:t,model:n}))},cancelRow:function(e){var t,n=this,i=n._editContainer;if(i){if(t=n._modelForContainer(i),!t||e&&n.trigger("cancel",{container:i,model:t}))return;n._destroyEditable(),n.dataSource.cancelChanges(t),n._clearEditableState(),n._displayRow("popup"!==n._editMode()?i:n.tbody.find("["+Ae.attr("uid")+"="+t.uid+"]"))}},saveRow:function(){var t,n=this,i=this._editContainer,o=this._modelForContainer(i),r=e.Deferred();return i&&this.editable?(t=n.editable&&n.editable.end(),!t||this.trigger(ft,{container:i,model:o})?(t||n._scrollVirtualWrapper(),r.reject().promise()):(n._clearEditableState(),this.dataSource.sync())):r.resolve().promise()},_displayRow:function(t){var n,i,o,r,a,s=this,l=s._modelForContainer(t),c=t.hasClass("k-state-selected"),d=t.hasClass("k-alt");l&&(s.lockedContent&&(n=e((d?s.lockedAltRowTemplate:s.lockedRowTemplate)(l)),s._relatedRow(t.last()).replaceWith(n)),s.angular("cleanup",function(){return{elements:t.get()}}),i=e((d?s.altRowTemplate:s.rowTemplate)(l)),t.is(":visible")||i.hide(),t.replaceWith(i),s.trigger("itemChange",{item:i,data:l,ns:Ee}),n&&n.length&&s.trigger("itemChange",{item:n,data:l,ns:Ee}),r=i,a=[{dataItem:l}],n&&n.length&&(r=i.add(n),a.push({dataItem:l})),s.angular("compile",function(){return{elements:r.get(),data:a}}),c&&(s.options.selectable||s._checkBoxSelection)&&s.select(i.add(n)),n&&fe(i[0],n[0]),o=i.next(),o.hasClass("k-detail-row")&&o.is(":visible")&&i.find(".k-hierarchy-cell .k-icon").removeClass("k-i-expand").addClass("k-i-collapse"))},_showMessage:function(t,n){var i,o=this;return o._isMobile?(i=o._confirmDialog=new Ae.ui.Confirm(e("
        ").appendTo(document.body),{modal:{preventScroll:!0},closable:!1,title:!1,content:t.title,messages:{okText:t.confirmDelete,cancel:t.cancelDelete},open:function(){o.content.data(pn,o.content.css(pn)),o.content.css(pn,fn)},close:function(){o.content.css(pn,o.content.data(pn))}}),i.result.done(function(){o._removeRow(n)}).fail(function(){var e=o._confirmDialog;e&&(e.close(),e.destroy())}),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===nn?t.options.messages.editable.confirmation:n.confirmation;return He(n)&&typeof n.mode===nn&&typeof i!==tn&&typeof i!==nn&&i!==!1&&(i=t.options.messages.editable.confirmation),i===!1||null==i||(typeof i===tn&&(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,o=n._editMode(),r=n.options.editable.createAt||"",a=i.pageSize(),s=i.view()||[],l=r.toLowerCase()===on,c=n._isVirtualEditable();n.editable&&n.editable.end()||!n.editable?("incell"!=o&&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"==o&&n._removeCurrent(),c?n._virtualAddRow():(t=i.insert(e,{}),n._editModel(t))):n._scrollVirtualWrapper()},_editModel:function(e){var t,n,i,o,r=this,a=r.options.editable.createAt||"",s=r._editMode();e&&(t=e.uid,n=r.lockedContent?r.lockedTable:r.table,i=n.find("tr["+Ae.attr("uid")+"="+t+"]"),o=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(r._firstEditableColumnIndex(i)),"inline"===s&&i.length?r.editRow(i):"popup"===s?r.editRow(e):o.length&&r.editCell(o),"bottom"==a.toLowerCase()&&r.lockedContent&&(r.lockedContent[0].scrollTop=r.content[0].scrollTop=r.table[0].offsetHeight))},_virtualAddRow:function(){var e=this,t=(e.options.editable.createAt||"").toLowerCase()===on;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,o=n.total();n.at(o-1)instanceof Me?(e=n.insert(o,{}),t._virtualPageToBottom(function(){t._editModel(e),i.scrollToBottom()})):t._virtualPageToBottom(function(){e=n.insert(o,{}),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(),o=n.total(),r=o>i?o-i:0;t._virtualPage(r,i,function(){e()})},_virtualPage:function(e,t,n){var i=this;i._isVirtualEditable()&&(i.virtualScrollable._preventScroll=!0,i.virtualScrollable._page(e,t,n))},_firstEditableColumnIndex:function(e){var t,n,i,o=this,r=Y(o.columns),a=o._modelForContainer(e);for(n=0,i=r.length;n').html(o({})).prependTo(i),n.angular("compile",function(){return{elements:t.get()}})),r&&r.create!==!1&&t.on(Xt+ct,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(Xt+ct,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(Xt+ct,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}),t.on(Xt+ct,".k-grid-excel",function(e){e.preventDefault(),n.saveAsExcel()}),t.on(Xt+ct,".k-grid-pdf",function(e){e.preventDefault(),n.saveAsPDF()}),t.on(sn+ct,".k-grid-search input",function(e){var t=e.currentTarget;clearTimeout(n._searchTimeOut),n._searchTimeOut=setTimeout(function(){var e,i,o,r,a;if(n._searchTimeOut=null,e=n.options,i=e.search?e.search.fields:null,o={filters:[],logic:"or"},r=t.value,i||(i=K(e.columns)),n.dataSource.options.endless&&(n.dataSource.options.endless=null,n._endlessPageSize=n.dataSource.options.pageSize),r)for(a=0;a",r+="",r+="",r+=""):r+=o._createButton(e[t]);return r},_createButton:function(e){var n,i=e.template||An,r=typeof e===nn?e:e.name||e.text,a=Nn[r]?Nn[r].className:"k-grid-"+(r||"").replace(/\s/g,""),s={className:a,text:r,attr:"",iconClass:""},l=this.options.messages.commands;if(!(r||He(e)&&e.template))throw Error("Custom commands should have name specified");return He(e)?(e=Ne(!0,{},e),e.className&&Ue(s.className,e.className.split(" "))<0?e.className+=" "+s.className:e.className===t&&(e.className=s.className),"edit"===r&&(e=Ne(!0,{},e),e.text=He(e.text)?e.text.edit:e.text,e.iconClass=He(e.iconClass)?e.iconClass.edit:e.iconClass),e.attr&&(He(e.attr)&&(e.attr=o(e.attr)),typeof e.attr===nn&&(n=e.attr.match(/class="(.+?)"/),n&&Ue(n[1],e.className.split(" "))<0&&(e.className+=" "+n[1]))),s=Ne(!0,s,Nn[r],{text:l[r]},e)):s=Ne(!0,s,Nn[r],{text:l[r]}),Ae.template(i)(s)},_hasFooters:function(){return!!this.footerTemplate||!!this.groupFooterTemplate||this.footer&&this.footer.length>0||this.wrapper.find(".k-grid-footer").length>0},_groupable:function(){var t=this;t._groupableClickHandler?t.table.add(t.lockedTable).off(Xt+ct,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),o=i.closest("tr"),r=t._groupRows?t._groupRows[t.wrapper.find(".k-grouping-row").index(o)]:{};i.hasClass("k-i-collapse")?t.trigger("groupCollapse",{group:r,element:o})||t.collapseGroup(o):t.trigger("groupExpand",{group:r,element:o})||t.expandGroup(o),n.preventDefault(),n.stopPropagation()},t._isLocked()?t.lockedTable.on(Xt+ct,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(Xt+ct,".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,o=lt+"["+Ae.attr("field")+"]",r=t.content?".k-grid-header:first "+o:"table:first>.k-grid-header "+o;i&&i.enabled!==!1&&(n.has("div.k-grouping-header")[0]||e("
         
        ").addClass("k-grouping-header").prependTo(n),t.groupable&&t._destroyGroupable(),t.groupable=new Ee.Groupable(n,Ne({},i,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:r,filter:r,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._skip=0,t.dataSource._pageSize=t.dataSource._take=t._endlessPageSize,t.dataSource._page=1))}})),t._addGroupableOptionsToHeader())},_addGroupableOptionsToHeader:function(){var e,t,n,i=this,o=z(i.columns),r={},a="",s=i._headerCells(),l="";for(n=0;n"+(i?tt:"tbody>tr"+s),a.selectable=new Ae.ui.Selectable(o,{filter:r,aria:!0,multiple:n,change:function(){var e;i||a._persistSelectedRows(),a._checkBoxSelection&&(e=a.selectable.value(),a._uncheckCheckBoxes(),a._checkRows(e),a._toggleHeaderCheckState(e.length&&e.length===a.items().length?!0:!1)),a.trigger(yt)},useAllItems:l&&n&&i,relatedTarget:function(t){var n,o,r,s;if(!i&&l){for(o=e(),r=0,s=t.length;r-1&&!s.is(".k-edit-cell,.k-header")&&s.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(r.preventDefault(),r.stopPropagation(),s=i?s:s.parent(),l&&!i&&(s=s.add(a._relatedRow(s))),n)if(r.ctrlKey){if(s.hasClass(Bt))return a._deselectCheckRows(s),t}else a.selectable.clear();else a.selectable.clear();i||(a.selectable._lastActive=s),a.selectable.value(s)}else!i&&(e(c).is("td")||e(c).is("table")&&Ue(c,this._navigatableTables))&&(r.shiftKey&&r.keyCode==Le.LEFT||r.shiftKey&&r.keyCode==Le.RIGHT||r.shiftKey&&r.keyCode==Le.UP||r.shiftKey&&r.keyCode==Le.DOWN||r.keyCode===Le.SPACEBAR&&r.shiftKey)&&(r.preventDefault(),r.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"+ct+" keydown"+ct,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}).on("mousedown"+ct,nt+">"+it,je(ke,e)),e.copyHandler=je(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=je(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,o.EditorUtils.registerTool("viewHtml",new s({command:d,template:new l({template:r.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,o=i.Tool,r=i.Command,a=i.EditorUtils,s=r.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&a.formatByName("immutable",t.format)&&t._initOptions({ immutables:e.immutables}),r.fn.init.call(this,e)}}),l=o.extend({init:function(e){o.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,o=t.ui.Editor.fn.options.formats,r=i.EditorUtils,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,c=i.Dom,d=i.RangeUtils,u=e.extend,h=i.EditorUtils.registerTool,p=i.EditorUtils.registerFormat,f="mousedown.kendoEditor",g="keydown.kendoEditor",m="k-marker",v=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,o=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==m?o++:3==t.nodeType?n++:i++);return o>1&&r.firstChild.className==m&&r.lastChild.className==m?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;!c.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,o,r,a=this.format,s=c.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,o,r=[];if(e.length>1)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==m&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText&&t.className===n.className){for(;t.firstChild;)n.appendChild(t.firstChild);c.remove(t)}}}),b=v.extend({init:function(e,t){this.format=e,this.greedyProperty=t,v.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,o,r,a,s,l,d,u,h,p,f,g=t.attributes,m=e.trim;if(g)for(n=0,i=g.length;n=0?c.toHex(f):f}},getFormatInner:function(t){var n,i,o,r=e(c.isDataNode(t)?t.parentNode:t),a=r.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=a.length;n
        ")({messages:this.editor.options.messages})},exec:function(){var t,n,i,o,r=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"==c.name(t[0]),o=this.createDialog(this._dialogTemplate(),{title:r.createLink,close:s(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),t=v(this._range)),this._initialText=this.linkText(t),o.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=o.data("kendoWindow").center().open(),e("#k-editor-link-url",o).focus().select()},_keydown:function(e){var t=o.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var n,i,o,r=this._dialog.element,a=e("#k-editor-link-url",r).val(),s=e("#k-editor-link-text",r);a&&a!=k&&(a.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(a)&&(a="mailto:"+a),this.attributes={href:a},n=e("#k-editor-link-title",r).val(),n&&(this.attributes.title=n),s.is(":visible")&&(i=s.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerText=c.stripBom(i)):this.attributes.innerText=a),o=e("#k-editor-link-target",r).is(":checked"),this.attributes.target=o?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),c.windowFromDocument(d.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):k},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/),o=i+1;if(this.text=e.substring(o)+this.text,this.start.node=t,this.start.offset=o,i>-1)return!1},_skipStartPuntuation:function(e,t,n){var o=i(e,/\w/),r=o;if(o===-1&&(r=e.length),this.text=this.text.substring(r),this.start.node=t,this.start.offset=r+(0|n),o>-1)return!1}}),M=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},F=r.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?c.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 o,r,a,s;if(n&&!this.cancel){if(3!==n.nodeType)return r=this.edgeNode(n),this.cancel=this.cancel||this.cancelAtNode(r),this._traverse(e,r);if(o=n.data,i!==t&&(o=this.subText(o,i)),this.cancel=e(o,n,i)===!1,a=this.next(n),!a)for(s=n.parentNode;!a&&c.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){}}),R=F.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 R(t)}}),P=F.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 P(t)}});a(o.ui.editor,{LinkFormatFinder:C,LinkFormatter:S,UnlinkCommand:T,LinkCommand:D,AutoLinkCommand:A,UnlinkTool:E,DomTextLinkDetection:I,LeftDomTextTraverser:R,RightDomTextTraverser:P}),b("createLink",new p({key:"K",ctrl:!0,command:D,template:new f({template:u.buttonTemplate,title:"Create Link"})})),b("unlink",new E({key:"K",ctrl:!0,shift:!0,template:new f({template:u.buttonTemplate,title:"Remove Link"})})),b("autoLink",new p({key:[w.ENTER,w.SPACEBAR],keyPressCommand:!0,command:A}))}(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,o=e.extend,r=n.ui.editor,a=n.ui.Editor.fn.options.formats,s=r.Dom,l=r.ToolTemplate,c=r.FormatTool,d=r.EditorUtils,u=d.registerTool,h=d.registerFormat,p=r.RangeUtils,f=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,o;for(n=0,i=t.length;n=0&&!(o=s.ofType(t[n],a[r].tags)?t[n]:s.closestEditableOfType(t[n],a[r].tags));r--);if(!o||"true"===o.contentEditable)return[];e.inArray(o,l)<0&&l.push(o)}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,o,r;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,r=this.options,a=r.name,s=this;s.editor=i,e.width(r.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:r.items||i.options[a],title:i.options.messages[a],autoSize:!0,change:function(){var e=this.dataItem();e&&o.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,o,r,a,s,l,c;for(i=0;i=0;t--)n=e[t],this.immutableParent(n)||this.clean(n);this.releaseRange(i)},clean:function(n){var o,r,a,s,c;if(n&&!l.isMarker(n)){if(o=l.name(n),"ul"==o||"ol"==o)for(r=new i.ListFormatter(o),a=n.previousSibling,s=n.nextSibling,r.unwrap(n);a&&a!=s;a=a.nextSibling)this.clean(a);else if("blockquote"==o)l.changeTag(n,"p");else if(1!=n.nodeType||l.insignificant(n))t(n);else{for(c=n.childNodes.length-1;c>=0;c--)this.clean(n.childNodes[c]);n.removeAttribute("style"),n.removeAttribute("class")}e.inArray(o,this.tagsToClean)>-1&&l.unwrap(n)}},immutableParent:function(e){return this.immutables()&&i.Immutables.immutableParent(e)}});e.extend(i,{FormattingTool:h,CleanFormatCommand:p}),u("formatting",new h({template:new r({template:c.dropDownListTemplate,title:"Format"})})),u("cleanFormatting",new o({command:p,template:new r({template:c.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,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,d=o.Command,u=n.keys,h="#k-editor-image-url",p="#k-editor-image-title",f="#k-editor-image-width",g="#k-editor-image-height",m=d.extend({init:function(e){var t=this;d.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,o=c.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(o,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(o.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),c.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(c.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(g).val(),10);m.attributes={src:t.find(h).val().replace(/ /g,"%20"),alt:t.find(p).val()},m.attributes.width=null,m.attributes.height=null,!isNaN(n)&&n>0&&(m.attributes.width=n),!isNaN(i)&&i>0&&(m.attributes.height=i),_=m.insertImage(b,v),o(e),m.change&&m.change()}function o(e){e.preventDefault(),s.destroy(),a.windowFromDocument(c.documentFromRange(v)).focus(),_||m.releaseRange(v)}function r(t){t.keyCode==u.ENTER?e(t):t.keyCode==u.ESC&&o(t)}var s,l,d,m=this,v=m.lockRange(),_=!1,b=c.image(v),w=b&&b.getAttribute("width")||"",k=b&&b.getAttribute("height")||"",y=n.support.browser.msie,x=m.editor.options,C=x.messages,S=x.imageBrowser,T=!!(n.ui.ImageBrowser&&S&&S.transport&&S.transport.read!==t),D={title:C.insertImage,visible:!1,resizable:T};this.expandImmutablesIn(v),D.close=o,T&&(D.width=750),s=this.createDialog(m._dialogTemplate(T),D).toggleClass("k-filebrowser-dialog",T).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(h).val(b?b.getAttribute("src",2):"http://").end().find(p).val(b?b.alt:"").end().find(f).val(w).end().find(g).val(k).end().data("kendoWindow"),l=s.element,T&&(this._imageBrowser=new n.ui.ImageBrowser(l.find(".k-imagebrowser"),i({},S)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(h).val(this.value())}),this._imageBrowser.bind("apply",e)),y&&(d=l.closest(".k-window").height(),l.css("max-height",d)),s.center().open(),l.find(h).focus().select()}});n.ui.editor.ImageCommand=m,s("insertImage",new o.Tool({command:m,template:new l({template:r.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,o=e.proxy,r=n.ui.editor,a=r.EditorUtils,s=r.Command,l=r.Tool,c=a.registerTool,d=r.ToolTemplate,u='
        ',h=s.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options["import"],r=e('').kendoUpload({success:o(t._onUploadSuccess,t),progress:o(t._onUploadProgress,t),select:o(t._onUploadSelect,t),error:o(t._onUploadError,t),complete:o(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=r,r},_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;r.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(u):this._container=e(t).append(u),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(r,{ImportCommand:h}),c("import",new l({command:h,template:new d({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,o=n.GenericCommand,r=n.EditorUtils,a=r.registerTool,s=n.Tool,l=n.ToolTemplate,c=n.RestorePoint,d=e.extend,u=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,r=t.body,a=new c(i,r),s=n.html||n.value||"";t.selectRange(i),t.clipboard.paste(s,n),n.postProcess&&n.postProcess(t,t.getRange()),e=new o(a,new c(t.getRange(),r)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),h=s.extend({initialize:function(e,t){var i=t.editor,o=this.options,r=o.items?o.items:i.options.insertHtml;this._selectBox=new n.SelectBox(e,{dataSource:r,dataTextField:"text",dataValueField:"value",change:function(){s.exec(i,"insertHtml",this.value())},title:i.options.messages.insertHtml,highlightFirst:!1})},command:function(e){return new u(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});d(n,{InsertHtmlCommand:u,InsertHtmlTool:h}),a("insertHtml",new h({template:new l({template:r.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,o=e.proxy,r=n.ui.editor,a=r.EditorUtils,s=r.Command,l=r.Tool,c=a.registerTool,d=r.ToolTemplate,u=[{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:u,width:115},command:function(e){var t=e.value;return new r.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var i=this,r=t.editor,a=i.options,s=a.name,l=o(i.changeHandler,i),c=a.items||r.options[s];c.unshift({text:r.options.messages[s],value:""}),i.editor=r,e.width(a.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:c,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(r,{ExportAsTool:p,ExportAsCommand:h}),c("exportAs",new p({template:new d({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 o="rtl"==e(n).css("direction"),r=o?"Right":"Left",a="td"!=s.name(n)?"margin"+r:"padding"+r;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,o=i.Class,r=e.extend,a=i.ui.editor,s=a.Dom,l=a.EditorUtils,c=l.registerTool,d=a.Command,u=a.Tool,h=a.ToolTemplate,p=a.RangeUtils,f=s.blockElements,g=a.BlockFormatFinder,m=a.BlockFormatter,v=o.extend({init:function(){this.finder=new g([{tags:s.blockElements}])},apply:function(t){var i,o,r,a,l,c,d,u,h,p,f,g;if(t=s.filterBy(t,s.htmlIndentSpace,!0),i=this.finder.findSuitable(t),o=[],i=this.mapImmutables(i),i.length){for(r=0,a=i.length;r1||n(u.parentNode))||s.ofType(u,["ul","ol"])&&l>0),r)return i.removeClass("k-state-disabled"),t;i.addClass("k-state-disabled").removeClass("k-state-hover")}});r(a,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:w}),c("indent",new u({command:_,template:new h({template:l.buttonTemplate,title:"Indent"})})),c("outdent",new w({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,o=i.Dom,r=i.Command,a=i.Tool,s=i.BlockFormatter,l=o.normalize,c=i.RangeUtils,d=i.EditorUtils.registerTool,u=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=o.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(o.isEmpty(t))e.setStartBefore(t);else{if(e.selectNodeContents(t),n=c.textNodes(e)[0],!n){for(;t.childNodes.length&&!o.is(t.firstChild,"br");)t=t.firstChild;n=t}o.isEmpty(n)?e.setStartBefore(n):(o.emptyNode(n)&&(n.innerHTML="\ufeff"),i=n.firstChild||n,o.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=o.parentOfType(e.startContainer,t),i=o.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(o.isMarker(e)||""===o.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,r,a,d,u,h,p,f,g,m,v,_,b,w=this.getRange(),k=c.documentFromRange(w),y=i.emptyElementContent;this.expandImmutablesIn(w),g=this.shouldTrim(w),w.deleteContents(),d=this._insertMarker(k,w),o.stripBomNode(d.previousSibling),o.stripBomNode(d.nextSibling),u=o.closestEditableOfType(d,["li"]),h=o.closestEditableOfType(d,"h1,h2,h3,h4,h5,h6".split(",")),p=o.is(d.parentNode,"table")&&d.parentNode,u?o.emptyNode(u)&&(a=o.create(k,"p"),o.next(u)&&(f=w.cloneRange(),f.selectNode(u),c.split(f,u.parentNode)),m=e("br",u),1==m.length&&m.remove(),v=u.parentNode,_=u.parentNode.children.length,b=_>1&&1==u.childNodes.length&&u.children[0],o.insertAfter(a,v),o.remove(1==_?u.parentNode:u),b&&b!==d?(a.appendChild(b),a.appendChild(d)):a.innerHTML=y,r=a):h&&this._blankAfter(d)?(a=this._insertParagraphAfter(h),o.remove(d),r=a):p&&(a=this._insertParagraphAfter(p),o.remove(d),r=a),r||(u||h||new s([{tags:["p"]}]).apply([d]),w.selectNode(d),t=o.parentOfType(d,[u?"li":h?o.name(h):"p"]),c.split(w,t,g),n=t.previousSibling,o.is(n,"li")&&n.firstChild&&!o.is(n.firstChild,"br")&&(n=n.firstChild),r=t.nextSibling,this.clean(n,{links:!0}),this.clean(r,{links:!0}),o.is(r,"li")&&r.firstChild&&!o.is(r.firstChild,"br")&&(r=r.firstChild),o.remove(t),l(n)),l(r),this._moveFocus(w,r),w.collapse(!0),o.scrollTo(r,!0),c.selectRange(w)},_insertParagraphAfter:function(e){var t=this.getRange(),n=c.documentFromRange(t),r=i.emptyElementContent,a=o.create(n,"p");return o.insertAfter(a,e),a.innerHTML=r,a},clean:function(t,n){var r,a=t;if(t.firstChild&&o.is(t.firstChild,"br")&&o.remove(t.firstChild),o.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(r=!1;t.firstChild&&1==t.firstChild.nodeType;)r=r||o.significantNodes(t.childNodes).length>1,t=t.firstChild;if(o.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||r||(e(a).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=a;){if(o.is(t,"a")&&o.emptyNode(t)){o.unwrap(t);break}t=t.parentNode}}}}),h=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var e,n,i,r,a,s,d=this.getRange();this.expandImmutablesIn(d),e=o.create(c.documentFromRange(d),"br"),n=d.startContainer,r=t.support.browser,a=r.msie&&r.version<11,s=o.is(n,"table")&&n,d.deleteContents(),s?o.insertAfter(e,s):d.insertNode(e),l(e.parentNode),a||e.nextSibling&&!o.isWhitespace(e.nextSibling)||(i=e.cloneNode(!0),i.className="k-br",o.insertAfter(i,e)),d.setStartAfter(e),d.collapse(!0),o.scrollTo(e.nextSibling||e,!0),c.selectRange(d)}});n(i,{ParagraphCommand:u,NewLineCommand:h}),d("insertLineBreak",new a({key:13,shift:!0,command:h})),d("insertParagraph",new a({key:13,command:u}))}(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,o=n.ui.editor,r=o.EditorUtils,a=o.Dom,s=r.registerTool,l=o.ToolTemplate,c=o.RangeUtils,d=o.Command,u=o.LinkFormatter,h=c.textNodes,p=n.keys,f="#k-editor-file-url",g="#k-editor-file-text",m="#k-editor-file-title",v=d.extend({init:function(e){var t=this;d.fn.init.call(t,e),t.formatter=new u,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=c.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),c.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(g).val(),r=t.find(m).val();u.attributes={href:n,innerHTML:""!==i?i:n,title:r},b=u.insertFile(w,v),o(e),u.change&&u.change()}function o(e){e.preventDefault(),s.destroy(),a.windowFromDocument(c.documentFromRange(v)).focus(),b||u.releaseRange(v)}function r(t){t.keyCode==p.ENTER?e(t):t.keyCode==p.ESC&&o(t)}var s,l,d,u=this,v=u.lockRange(),_=h(v),b=!1,w=_.length?this.formatter.finder.findSuitable(_[0]):null,k=n.support.browser.msie,y=u.editor.options,x=y.messages,C=y.fileBrowser,S=!!(n.ui.FileBrowser&&C&&C.transport&&C.transport.read!==t),T={title:x.insertFile,visible:!1,resizable:S};this.expandImmutablesIn(v),T.close=o,S&&(T.width=750),s=this.createDialog(u._dialogTemplate(S),T).toggleClass("k-filebrowser-dialog",S).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(o).end().find(".k-edit-field input").keydown(r).end().find(f).val(w?w.getAttribute("href",2):"http://").end().find(g).val(w?w.innerText:"").end().find(m).val(w?w.title:"").end().data("kendoWindow"),l=s.element,S&&(u._fileBrowser=new n.ui.FileBrowser(l.find(".k-filebrowser"),i({},C)),u._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(f).val(this.value())}),u._fileBrowser.bind("apply",e)),k&&(d=l.closest(".k-window").height(),l.css("max-height",d)),s.center().open(),l.find(f).focus().select()}});n.ui.editor.FileCommand=v,s("insertFile",new o.Tool({command:v,template:new l({template:r.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","editor/plugins/insert.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,o=e.proxy,r=n.ui.editor,a=r.Dom,s=r.EditorUtils,l=r.RangeUtils,c=r.Command,d="kendoEditor",u="k-state-active",h="k-state-selected",p=r.Tool,f=r.ToolTemplate,g=r.InsertHtmlCommand,m=r.BlockFormatFinder,v=r.EditorUtils.registerTool,_=n.getTouches,b=n.template,w="
      • ",k=new m([{tags:["table"]}]),y=g.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});g.fn.init.call(this,n)},_tableHtml:function(e,t){var n,i;return e=e||1,t=t||1,n=b(w)({width:100/t,content:r.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),g.fn.exec.call(this)}}),x=p.extend({initialize:function(t,n){var i,a,l,c;p.fn.initialize.call(this,t,n),i=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:o(this._open,this),activate:o(this._activate,this),close:o(this._close,this)}).data("kendoPopup"),t.click(o(this._toggle,this)).keydown(o(this._keydown,this)),a=this._editor=n.editor,this._popup=i,l=new r.TableWizardTool({template:new f({template:s.tableWizardButtonTemplate,title:a.options.messages.tableWizard}),command:r.TableWizardCommand,insertNewTable:!0}),v("tableWizardInsert",l),c=e("
        "+l.options.template.getHtml()+"
        "),c.appendTo(i.element),a.toolbar&&a.toolbar.attachToolsEvents(c)},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(u)},_close:function(){this._popup.options.anchor.removeClass(u)},_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()-u.top)/o)+1,col:Math.floor((t.clientX+n.scrollLeft()-u.left)/i)+1}}var i,o,r=this,a=r._popup.element,s=a.find(".k-ct-cell"),l=s.eq(0),c=s.eq(s.length-1),u=n.getOffset(l),h=n.getOffset(c),p=r.cols,f=r.rows;a.find("*").addBack().attr("unselectable","on"),h.left+=c[0].offsetWidth,h.top+=c[0].offsetHeight,i=(h.left-u.left)/p,o=(h.top-u.top)/f,a.autoApplyNS(d).on("mousemove",".k-ct-cell",function(e){r._setTableSize(t(e))}).on("mouseleave",".k-ct-cell",function(){r._setTableSize()}).on("down",".k-ct-cell",function(e){e.preventDefault();var n=_(e)[0];r._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,o=i.find(".k-status"),r=i.find(".k-ct-cell"),a=this.cols,s=this._editor.options.messages;this._valid(t)?(o.text(n.format(s.createTableHint,t.row,t.col)),r.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,o;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&&(o=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(o)},this)),!0},onpaste:function(n){if("false"!==this.editor.body.contentEditable){if(this._handleImagePaste(n))return void n.preventDefault();this.expandImmutablesIn(),this._contentModification(function(i,o){var a,s,l,c=r.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),d=t.support.browser,u=i.body;this._decoreateClipboardNode(c,u),u.appendChild(c),d.webkit&&this._moveToCaretPosition(c,o),d.msie&&d.version<11?(n.preventDefault(),a=i.createRange(),a.selectNodeContents(c),i.selectRange(a),s=i.document.body.createTextRange(),s.moveToElementText(c),e(u).unbind("paste"),s.execCommand("Paste"),e(u).bind("paste",e.proxy(this.onpaste,this))):(l=i.createRange(),l.selectNodeContents(c),i.selectRange(l)),o.deleteContents()},function(t,n){var i,o="";t.selectRange(n),i=e(t.body).children(".k-paste-container"),i.each(function(){var e=this.lastChild;e&&r.is(e,"br")&&r.remove(e),o+=this.innerHTML}),i.remove(),this._triggerPaste(o,{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,o,r,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"}),o=i.css("color"),o&&t.css("color",o),r=i.css("fontFamily"),r&&t.css("fontFamily",r),a=i.css("fontSize"),a&&t.css("fontSize",a)))},_moveToCaretPosition:function(t,n){var i=this,o=i.editor.body,a=r.offset(t,o),s=i._caretOffset(n,o),l=s.left-a.left,c=s.top-a.top,d="translate("+l+"px,"+c+"px)";e(t).css({"-webkit-transform":d,transform:d})},_caretOffset:function(e,t){var n,i,o,a,s,l,c=this.editor,d=r.create(c.document,"span",{innerHTML:"\ufeff"}),u=e.startContainer;return e.collapsed?(i=r.isDataNode(u),i&&(r.isBom(u)||0===e.startOffset)?r.insertBefore(d,u):i&&e.startOffset===u.length?r.insertAfter(d,u):(e.insertNode(d),n=!0)):(u=u===t?u.childNodes[e.startOffset]:u,r.insertBefore(d,u)),o=r.offset(d,t),a=d.previousSibling,s=d.nextSibling,r.remove(d),n&&r.isDataNode(a)&&r.isDataNode(s)&&!r.isBom(a)&&!r.isBom(s)&&(l=a.length,s.data=a.data+s.data,e.setStart(s,l),r.remove(a),e.collapse(!0),c.selectRange(e)),o},expandImmutablesIn:function(e){var n,i,o,r=this.editor;r&&r.options.immutables&&(n=r.body,e=e||r.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===n&&0===e.startOffset&&(i=n.ownerDocument,o=i.createTextNode("\ufeff"),n.insertBefore(o,n.childNodes[0]),e.setStartBefore(o)),r.selectRange(e))},splittableParent:function(e,t){var n,i;if(e)return r.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,r.isInline(n))for(;n.parentNode!=i&&!r.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,a,l,d,u,h,p,f,g,m,v,_,b,w,k,y,x,C=this.editor;if(this.expandImmutablesIn(),n=c({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(/<(a|span|font)([^>]*)> <\/\1>/gi,"<$1$2> "),t=t.replace(/^
      • $/g,"li>"),d=this.isBlock(t),C.focus(),u=C.getRange(),u.deleteContents(),u.startContainer==C.document&&u.selectNodeContents(C.body),h=new s,p=h.addCaret(u),f=this.splittableParent(d,p),g=!1,m=f!=C.body&&!r.is(f,"td"),n.split&&m&&(d||r.isInline(f))&&(u.selectNode(p),o.split(u,f,!0),g=!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){r.isBlock(t)&&!r.isSelfClosing(t)&&""===t.innerHTML&&t.appendChild(C.document.createTextNode("\ufeff"))}),u.insertNode(v),f=this.splittableParent(d,p),g){for(;p.parentNode!=f;)r.unwrap(p.parentNode);r.unwrap(p.parentNode)}if(r.normalize(u.commonAncestorContainer),p.style.display="inline",r.restoreScrollTop(C.document),r.scrollTo(p),h.removeCaret(u),b=u.commonAncestorContainer.parentNode,u.collapsed&&"tbody"==r.name(b)&&(u.setStartAfter(e(b).closest("table")[0]),u.collapse(!0)),w=e(u.commonAncestorContainer.parentNode).closest("table"),w.get(0)){for(k=w.parent().contents(),y=k.length-1,x=k.get(y);null!==x.nodeValue&&(" "===x.nodeValue||""===x.nodeValue);)y-=1,x=k.get(y);x===w.get(0)&&r.insertAfter(r.createEmptyNode(C.document,"p"),w[0])}C.selectRange(u)}}),u=n.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,o=this,r=t||o.replacements;for(n=0,i=r.length;n]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/]*>/i.test(e)}}),p=u.extend({init:function(e){u.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=u.extend({init:function(e){u.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,o=i.exec(n),r=n&&o&&o[1];return t?"":r?'':""},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,o=r.innerText(e),a=i.match(/^(?:]*texhtml[^>]*>)?]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=a&&a[1],l=/^[a-z\d]/i.test(s),c=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(c(o))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(c(o))}:void 0},_convertToLi:function(e){var t,n=r.name(e);return 1==e.childNodes.length?t=e.firstChild.nodeType===r.nodeTypes.TEXT_NODE?r.innerText(e):e.firstChild.innerHTML.replace(/^\w+[\.\)]( )+ /,""):(r.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&r.remove(e.firstChild),/^( |\s)+$/i.test(e.firstChild.innerHTML)&&r.remove(e.firstChild),t="p"!=n?"<"+n+">"+e.innerHTML+"":e.innerHTML),r.remove(e),r.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 r.create(document,e,{style:{listStyleType:t}})},lists:function(t){var n,i,o,a,s,c,d,u,h,p,f,g,m,v,_,b,w=e(t).find(r.blockElements.join(",")),k=-1,y={},x=["p","h1","h2","h3","h4","h5","h6"],C=!1;for(u=0;uk||!g)&&(g=this._createList(p,_.style),y[f][b]=g,i.appendChild(g)),i=this._convertToLi(h),g.appendChild(i),c?o=k=-1:k=f))},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=r.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(n){var i=n.cells,o=e(n).closest("table"),r=o.children("colgroup");i.length<2||(r.length&&(i=r.children(),r[0].parentNode.removeChild(r[0])),r=e(e.map(i,function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('',n):""}).join("")),r.is("colgroup")||(r=e("").append(r)),r.prependTo(o))},convertHeaders:function(t){var n,i=t.cells,o=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==r.name(n))return n});if(o.length==i.length){for(n=0;n").end().find("thead").append(t),n=0;no.cells.length&&(o=n[a]);l.createColGroup(o),l.convertHeaders(i),l.removeAttributes(s[r]),l.removeParagraphs(s.eq(r).find("td,th")),l.removeDefaultColors(s.eq(r).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;n]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),g=u.extend({init:function(e){u.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)}}),m=u.extend({clean:function(e){var t=r.create(document,"div",{innerHTML:e});return t=this.cleanDom(t),t.innerHTML},cleanDom:function(e){return e}}),v=m.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each(function(){r.unwrap(this)}),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=m.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}},w=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,o,r,a,s,l=this.separators,c="",d=this.lines;for(this.flashInlineBlockText(),e=0,t=d.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=u.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}});c(i,{Clipboard:d,Cleaner:u,ScriptCleaner:h,TabCleaner:p,MSWordFormatCleaner:f,WebkitFormatCleaner:g,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:y,HtmlTextLines:w,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,o=i.Class,r=i.ui.editor,a=r.RangeUtils,s=r.Dom,l=r.RestorePoint,c=r.Marker,d=i.support.browser,u='
        ',h=e.extend,p=s.nodeTypes,f="previousSibling",g="td,th,caption",m="table,tbody,thead,tfoot,tr",v=m+","+g,_=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(m)},b=o.extend({remove:function(t){var n,i,o,r,l,d,u,h=this,p=new c;p.add(t,!1),n=a.getAll(t,function(t){return e(t).is(v)}),i=a.documentFromRange(t),o=p.start,r=p.end,l=g.split(","),d=s.parentOfType(o,l),u=s.parentOfType(r,l),h._removeContent(o,d,!0),h._removeContent(r,u,!1),e(n).each(function(t,n){n=e(n),(n.is(g)?n:n.find(g)).each(function(e,t){t.innerHTML=""})}),d&&!o.previousSibling&&s.insertBefore(i.createTextNode("\ufeff"),o),u&&!r.nextSibling&&s.insertAfter(i.createTextNode("\ufeff"),r),d?t.setStartBefore(o):n[0]&&(d=e(n[0]),d=d.is(g)?d:d.find(g).first(),d.length&&t.setStart(d.get(0),0)),t.collapse(!0),s.remove(o),s.remove(r)},_removeContent:function(t,n,i){if(n){var o,r=i?"nextSibling":"previousSibling",a=function(t){for(;t&&!t[r];)t=t.parentNode;return t&&e.contains(n,t)?t[r]:null};for(t=a(t);t;)o=a(t),s.remove(t),t=o}}}),w=o.extend({init:function(e){this.editor=e},keydown:function(n){var i,o,a,s,c=this,u=c.editor,p=u.keyboard,f=p.isTypingKey(n),g=h(e.Event(),n);return c.editor.trigger("keydown",g),g.isDefaultPrevented()?(n.preventDefault(),!0):!(g.isDefaultPrevented()||!f||p.isTypingInProgress())&&(i=u.getRange(),o=u.body,c.startRestorePoint=new l(i,o),_(i)&&(a=new b(u),a.remove(i),u.selectRange(i)),d.webkit&&!i.collapsed&&t(o,i)&&(o.innerHTML=""),u.immutables&&r.Immutables.immutablesContext(i)&&(s=new r.BackspaceHandler(u),s.deleteSelection(i)),p.startTyping(function(){c.endRestorePoint=r._finishUpdate(u,c.startRestorePoint)}),!0)},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),k=o.extend({init:function(e){this.editor=e},_addCaret:function(e){var t=s.create(this.editor.document,"a");return!i.support.browser.chrome&&e.firstChild&&e.firstChild.nodeType===p.ELEMENT_NODE&&(e=e.firstChild),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,o=s.closestEditableOfType(i,s.blockElements);return!(!o||!r.RangeUtils.isEndOf(e,o))&&(t=s.next(o),!(!t||"p"!=s.name(t))&&(n=this._addCaret(t),this._merge(o,t),this._restoreCaret(n),!0))},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,o=0;t-o>=0&&"\ufeff"==i[t-o-1];)o++;o>0&&(n.deleteData(t-o,o),e.setStart(n,Math.max(0,t-o)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var i,o,a,l,c,d,u,h,p,g,m,v,_,b=t.startContainer,w=s.closestEditableOfType(b,["li"]),k=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(k,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)),o=w&&r.RangeUtils.isStartOf(t,w),a=w&&e(w).index(),l=o&&a>0,l&&(k=w,i=s.prev(w)),k&&i&&s.is(i,"table")&&r.RangeUtils.isStartOf(t,k)?(""===k.innerText&&(k.innerHTML="\ufeff"),!0):r.RangeUtils.isStartOf(t,k)&&(parseInt(k.style.marginLeft,10)>0||parseInt(k.style.marginRight,10)>0)?(y.exec("outdent"),!0):k&&i&&r.RangeUtils.isStartOf(t,k)||l?(c=this._addCaret(k),this._merge(i,k),this._restoreCaret(c),!0):o&&0===a?(d=w.firstChild,d||(w.innerHTML=r.emptyElementContent,d=w.firstChild),u=new r.ListFormatter(s.name(w.parentNode),"p"),t.selectNodeContents(w),u.toggle(t),s.insignificant(d)?t.setStartBefore(d):t.setStart(d,0),y.selectRange(t),!0):(h=b.childNodes[t.startOffset-1],p=t,g=h&&s.closestEditableOfType(h,["a"]),m=n(h||b,f,function(e){return!s.isDataNode(e)||!s.isBom(e)&&e.length>0}),(g||(0===t.startOffset||h)&&s.is(m,"a"))&&(g=g||m,p=y.createRange(),p.setStart(g,g.childNodes.length),p.collapse(!0)),g=g||s.closestEditableOfType(h||p.startContainer,["a"]),v=g&&r.RangeUtils.isEndOf(p,g),v&&(_=new r.UnlinkCommand({range:p,body:y.body,immutables:!!y.immutables}),y.execCommand(_),y._selectionChange()),!1)},_handleSelection:function(t){var n,i,o,a,l=t.commonAncestorContainer,d=s.closest(l,"table"),u=r.emptyElementContent,h=this.editor;return _(t)?(n=new b(h),n.remove(t),h.selectRange(t),!0):(i=new c,i.add(t,!1),t.commonAncestorContainer===h.body&&this._surroundFullyContent(i,t),h.immutables&&this._handleImmutables(i),this._surroundFullySelectedAnchor(i,t),t.setStartAfter(i.start),t.setEndBefore(i.end),o=t.startContainer,a=t.endContainer,t.deleteContents(),"li"===a.tagName.toLocaleLowerCase()&&s.emptyNode(a)&&(t.selectNode(a),t.deleteContents()),d&&""===e(d).text()&&(t.selectNode(d),t.deleteContents()),l=t.commonAncestorContainer,"p"===s.name(l)&&""===l.innerHTML&&(l.innerHTML=u,t.setStart(l,0)),this._join(o,a),s.insertAfter(h.document.createTextNode("\ufeff"),i.start),i.remove(t),o=t.startContainer,"tr"==s.name(o)&&(o=o.childNodes[Math.max(0,t.startOffset-1)],t.setStart(o,s.getNodeLength(o))),t.collapse(!0),h.selectRange(t),!0)},_handleImmutables:function(e){var t=r.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)},_surroundFullyContent:function(e,t){var n=t.commonAncestorContainer.children,i=n[0],o=n[n.length-1];this._moveMarker(e,t,i,o)},_surroundFullySelectedAnchor:function(t,n){var i=t.start,o=e(i).closest("a").get(0),r=t.end,a=e(r).closest("a").get(0);this._moveMarker(t,n,o,a)},_moveMarker:function(e,t,n,i){var o=e.start,r=e.end;n&&a.isStartOf(t,n)&&s.insertBefore(o,n),i&&a.isEndOf(t,i)&&s.insertAfter(r,i)},_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,o=this.editor,a=o.getRange(),s=e.keyCode,c=i.keys,d=s===c.BACKSPACE,u=s==c.DELETE;o.immutables&&o.immutables.keydown(e,a)||(!d&&!u||a.collapsed?d?t="_handleBackspace":u&&(t="_handleDelete"):t="_handleSelection",t&&(n=new l(a,o.body),this[t](a)&&(e.preventDefault(),r._finishUpdate(o,n))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),y=o.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=r._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=o.extend({init:function(e){this.editor=e},keydown:function(e){!d.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=r.Immutables.immutable,o=s.emptyTextNode,a=n.firstChild,l=n.lastChild;o(a);)a=a.nextSibling;for(;o(l);)l=l.previousSibling;a&&i(a)&&e(u).prependTo(n),l&&i(l)&&e(u).appendTo(n)},keyup:e.noop}),C=o.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,o,r=String.fromCharCode(n.keyCode),a=this._getShortcutModifier(n,navigator.platform);for(i in t)if(o=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(o.key==r||o.key==n.keyCode)&&o.ctrl==a&&o.alt==n.altKey&&o.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,o,r,a=String.fromCharCode(n.keyCode),s=[],l=function(e){return e==a||e==n.keyCode||e==n.charCode};for(i in t)o=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),r=e.isArray(o.key)?e.grep(o.key,l).length>0:l(o.key),r&&o.ctrl==n.ctrlKey&&o.alt==n.altKey&&o.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 o(e,t){return r(e)?p(e):p(e)/t*100}function r(e){return typeof e===k&&b.test(e)}function a(e){return typeof e===k&&w.test(e)}function s(e){return p(e)+v}function l(e){return p(e)+_}var c=window,d=c.Math,u=d.min,h=d.max,p=c.parseFloat,f=e.jQuery,g=f.extend,m=e.ui.editor,v="%",_="px",b=/(\d+)(\.?)(\d*)%/,w=/(\d+)(\.?)(\d*)px/,k="string",y={constrain:n,getScrollBarWidth:i,calculatePercentageRatio:o,inPercentages:r,inPixels:a,toPercentages:s,toPixels:l};g(m,{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,o=n.noop,r=n.proxy,a=e.ui.editor,s=e.Class,l="keydown",c="mousedown",d="mouseenter",u="mouseleave",h="mousemove",p="mouseup",f=",",g=".",m=":last-child",v="table",_=s.extend({init:function(e,t){var o=this;o.options=i({},o.options,t),o.options.tags=n.isArray(o.options.tags)?o.options.tags:[o.options.tags],n(e).is(v)&&(o.element=e,o._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),r(e.detectElementBorderHovering,e))},resizingInProgress:function(){var e=this,t=e._resizable;return!!t&&!!t.resizing},resize:o,detectElementBorderHovering:function(e){var t=this,i=t.options,o=i.handle,r=n(e.currentTarget),a=t.resizeHandle,s=o.dataAttribute;t.resizingInProgress()||(!r.is(m)&&t.elementBorderHovered(r,e)?a?a.data(s)&&a.data(s)!==r[0]&&t.showResizeHandle(r,e):t.showResizeHandle(r,e):a&&t._destroyResizeHandle())},elementBorderHovered:o,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:o,setResizeHandleDimensions:o,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,o=e.resizeHandle;e.resizeHandle.on(c+n,function(){o.find(g+i).show()}).on(p+n,function(){o.find(g+i).hide()})},_hideResizeMarker:function(){var e=this;e.resizeHandle.find(g+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:r(n.onResizeStart,n),resize:r(n.onResize,n),resizeend:r(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:o,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,o=t.name,r=t.eventNamespace;n(e.body).on(d+r,v,function(n){var r=n.currentTarget,a=e[o];n.stopPropagation(),a?a.element===r||a.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,r,t)):i._initResizing(e,r,t)}).on(u+r,v,function(r){var a,s=e[o];r.stopPropagation(),!s||s.resizingInProgress()||s.resizeHandle||(a=n(s.element).parents(v)[0],a&&(i._destroyResizing(e,t),i._initResizing(e,a,t)))}).on(u+r,function(){var n=e[o];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)}).on(p+r,function(r){var a,s=e[o];s&&s.resizingInProgress()&&(a=n(r.target).parents(v)[0],a&&(s._forceResizing(r),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 o=i.name,r=i.type;t[o]=new r(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,o=i.abs,r=e.jQuery,a=r.extend,s=e.ui.editor,l=s.TableElementResizing,c=s.ResizingUtils,d=c.constrain,u=c.calculatePercentageRatio,h=c.getScrollBarWidth,p=c.inPercentages,f=c.toPercentages,g=c.toPixels,m=e._outerWidth,v=".kendoEditorColumnResizing",_="k-column-resize-handle",b="k-column-resize-marker",w="body",k="tbody",y="td",x="th",C="tr",S=",",T="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,o=i.handle.width,a=e.offset().left+(i.rtl?0:m(e)),s=t.clientX+r(e[0].ownerDocument).scrollLeft();return s>a-o&&s
        '}},elementBorderHovered:function(e,t){var n=this,i=n.options.handle[x],r=e.offset().top+g(e),a=t.clientY+o(e[0].ownerDocument).scrollTop();return a>r-i&&a
      • "},events:[L,H,N,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+z,D(e._onMouseOver,e)).on(W+z,D(e._onMouseOut,e))},_onMouseOver:function(){this.trigger(V)},_onMouseOut:function(){this.trigger(W)},_addStyles:function(){var e=this;C(e.element).children(Z+B).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 I(t,{dragstart:D(e._onDragStart,e),drag:D(e._onDrag,e),dragend:D(e._onDragEnd,e)}))},_onDragStart:function(){this.trigger(L)},_onDrag:function(e){var t=this;t.trigger(H,t._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(N)},_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,o=this._items,r=o.length,a=e.name?e.name.toLowerCase():"";for(i=0;if?(o=a(c,f),l=r(c,f)):(o=r(c,f),l=a(c,f)),i=w(m(o,l))):i=k(c),d._setColumnsWidth(),u[0].style[N]=i)},_resizeHeight:function(e,t){var i,o,l,c,d=this,u=s(d.element),h=u[0].style[O],p=x(u),f=u.parent(),g=f.height(),b=d._getMaxDimensionValue(O),y=d.options.minHeight,C=d._hasRowsInPixels();0!==e&&(n(d._initialElementHeight)&&(d._initialElementHeight=p),c=v({value:d._initialElementHeight+t,min:y,max:b}),C&&e<0&&d._setRowsHeightInPercentages(),_(h)?(p+e>g?(o=a(c,g),l=r(c,g)):(o=r(c,g),l=a(c,g)),i=w(m(o,l))):i=k(c),u[0].style[O]=i,C&&e<0&&d._setRowsHeightInPixels())},_getMaxDimensionValue:function(e){var t=this,n=s(t.element),i=e.toLowerCase(),o=t.options.rtl?-1:1,r=s(t.element).parent(),a=r[0],l=r[i](),c=o*(e===N?r.scrollLeft():r.scrollTop());return a===n.closest(z)[0]?""!==a.style[i]||_(t.element.style[i])?l+c:1/0:l+c},_setColumnsWidth:function(){function e(e){var t=e.style.width;return""!==t?!!_(t):!!s(e).hasClass(T)}var t,n=this,i=s(n.element),o=i.parent()[0],r=i.closest(z),a=r.closest(B).children(),l=a.length;if(e(i[0])&&o===r[0]&&""===o.style[N])for(t=0;t0)){for(e=0;e0;!n||i===o||l(i,o)||r||e._destroyTableResizing()})},dispose:function(e){s(e.body).off(C)},_initResizing:function(t,n){u.msie||u.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)},c(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,o=i.EditorUtils,r=i.RangeUtils,a=i.Dom,s=o.registerTool,l=i.ToolTemplate,c=i.Command,d=new i.BlockFormatFinder([{tags:["table"]}]),u=new i.BlockFormatFinder([{tags:["td","th"]}]),h=/([a-z]+|%)$/i,p=c.extend({exec:function(){var o=this,r=o.editor,a=o.range=o.lockRange(),s=o._sourceTable=o.options.insertNewTable?t:o._selectedTable(a),l=o._selectedTableCells=s?o._selectedCells(a):t,c={visible:!1,messages:r.options.messages,closeCallback:e.proxy(o.onDialogClose,o),table:o.parseTable(s,l),dialogOptions:r.options.dialogOptions,isRtl:n.support.isRtl(r.wrapper)},d=new i.TableWizardDialog(c);d.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(),c.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,o=n.get(i);null!==o.nodeValue&&(" "===o.nodeValue||""===o.nodeValue);)i-=1,o=n.get(i);o===t&&a.insertAfter(a.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,n,i){for(var o,r,s,l,c,d,u,h,p=this,f=e(n.rows).toArray(),g=t.tableProperties,m=g.rows,v=g.columns,_=function(e){return e[e.length-1]};i.length>1;)i.pop();if(o=i.length?_(i).parentNode:_(f),p._deleteTableRows(f,f.length-m),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,o=0;o")})}function i(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(I),t.filter(".k-last:not(:last-child)").removeClass(S),t.filter(":first-child").addClass(I),t.filter(":last-child").addClass(S)}function o(e,t){return""}var r=window.kendo,a=r.ui,s=r.keys,l=e.map,c=e.each,d=e.trim,u=e.extend,h=r.isFunction,p=r.template,f=r._outerWidth,g=r._outerHeight,m=a.Widget,v=/^(a|div)$/i,_=".kendoTabStrip",b="img",w="href",k="prev",y="next",x="show",C="k-link",S="k-last",T="click",D="error",A=":empty",E="k-image",I="k-first",M="select",F="activate",R="k-content",P="contentUrl",z="mouseenter",B="mouseleave",L="contentLoad",H="k-state-disabled",N="k-state-default",O="k-state-active",V="k-state-focused",W="k-state-hover",U="k-tab-on-top",q=".k-item:not(."+H+")",j=".k-item",G=".k-tabstrip-items > "+q+":not(."+O+")",$=200,Y={content:p("
        #= content(item) #
        "),itemWrapper:p("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #"), item:p(""),image:p(""),sprite:p(""),empty:p("")},K={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return e.encoded===!1?e.text:r.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return e.active!==!0?" style='display:none' aria-hidden='true' aria-expanded='false'":""},content:function(e){return e.content?e.content:e.contentUrl?"":" "},contentUrl:function(e){return e.contentUrl?r.attr("content-url")+'="'+e.contentUrl+'"':""}},Q=m.extend({init:function(t,n){var i,o,a,s=this;m.fn.init.call(s,t,n),s._animations(s.options),n=s.options,s._contentUrls=n.contentUrls||[],s._wrapper(),s._isRtl=r.support.isRtl(s.wrapper),s._tabindex(),s._updateClasses(),s._dataSource(),n.dataSource&&s.dataSource.fetch(),s._tabPosition(),s._scrollable(),s._contentUrls.length?s.wrapper.find(".k-tabstrip-items > .k-item").each(function(t,n){var i=s._contentUrls[t];"string"==typeof i&&e(n).find(">."+C).data(P,i)}):s._contentUrls.length=s.tabGroup.find("li.k-item").length,s.wrapper.on(z+_+" "+B+_,G,s._toggleHover).on("focus"+_,e.proxy(s._active,s)).on("blur"+_,function(){s._current(null)}),s._keyDownProxy=e.proxy(s._keydown,s),n.navigatable&&s.wrapper.on("keydown"+_,s._keyDownProxy),s.options.value&&(i=s.options.value),s.wrapper.children(".k-tabstrip-items").on(T+_,".k-state-disabled .k-link",!1).on(T+_," > "+q,function(t){var n,i=s.wrapper[0];if(i!==document.activeElement)if(n=r.support.browser.msie)try{i.setActive()}catch(o){i.focus()}else i.focus();s._click(e(t.currentTarget))&&t.preventDefault()}),o=s.tabGroup.children("li."+O),a=s.contentHolder(o.index()),o[0]&&a.length>0&&0===a[0].childNodes.length&&s.activateTab(o.eq(0)),s.element.attr("role","tablist"),s.element[0].id&&(s._ariaId=s.element[0].id+"_ts_active"),s.value(i),r.notify(s)},_active:function(){var e=this.tabGroup.children().filter("."+O);e=e[0]?e:this._endItem("first"),e[0]&&this._current(e)},_endItem:function(e){return this.tabGroup.children(q)[e]()},_getItem:function(e){return this.tabGroup.children(j)[e]()},_item:function(e,t){var n;return n=t===k?"last":"first",e?(e=e[t](),e[0]||(e=this.tabGroup.children(j)[n]()),e.hasClass(H)&&e.addClass(V),(e.hasClass(H)||e.hasClass(O))&&(this._focused=e),e):this._endItem(n)},_current:function(e){var n=this,i=n._focused,o=n._ariaId;return e===t?i:(i&&(n.tabGroup.children("#"+o).removeAttr("id"),i.removeClass(V)),e&&(e.hasClass(O)||e.addClass(V),n.element.removeAttr("aria-activedescendant"),o=e[0].id||o,o&&(e.attr("id",o),n.element.attr("aria-activedescendant",o))),n._focused=e,t)},_keydown:function(e){var n,i=this,o=e.keyCode,r=i._current(),a=i._isRtl,l=/top|bottom/.test(i.options.tabPosition);if(e.target==e.currentTarget&&r){if(o!==s.DOWN||l)if(o!==s.UP||l)if(o===s.RIGHT&&l)n=a?k:y;else if(o===s.LEFT&&l)n=a?y:k;else if(o==s.ENTER||o==s.SPACEBAR)i._click(r),e.preventDefault();else{if(o==s.HOME)return i._click(i._getItem("first")),e.preventDefault(),t;if(o==s.END)return i._click(i._getItem("last")),e.preventDefault(),t}else n=k;else n=y;n&&(i._click(i._item(r,n)),e.preventDefault())}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler):t._refreshHandler=e.proxy(t.refresh,t),t.dataSource=r.data.DataSource.create(t.options.dataSource).bind("change",t._refreshHandler)},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t.dataSource.fetch()},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{effects:{}}})},refresh:function(e){var t,n,i,o,a=this,s=a.options,l=r.getter(s.dataEncodedField),c=r.getter(s.dataTextField),d=r.getter(s.dataContentField),u=r.getter(s.dataContentUrlField),h=r.getter(s.dataImageUrlField),p=r.getter(s.dataUrlField),f=r.getter(s.dataSpriteCssClass),g=[],m=a.dataSource.view();for(e=e||{},i=e.action,i&&(m=e.items),t=0,o=m.length;t");o=o.add(a)}),n(i)),{tabs:i,contents:o,newTabsCreated:c}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(N,n).toggleClass(H,!n).attr("aria-disabled",!n)})},_updateClasses:function(){var o,r,a,s=this;s.wrapper.addClass("k-widget k-header k-tabstrip"),s.tabGroup=s.wrapper.children("ul").addClass("k-tabstrip-items k-reset"),s.tabGroup[0]||(s.tabGroup=e("
          ").appendTo(s.wrapper)),o=s.tabGroup.find("li").addClass("k-item"),o.length&&(r=o.filter("."+O).index(),a=r>=0?r:t,s.tabGroup.contents().filter(function(){return 3==this.nodeType&&!d(this.nodeValue)}).remove()),r>=0&&o.eq(r).addClass(U),s.contentElements=s.wrapper.children("div"),s.contentElements.addClass(R).eq(a).addClass(O).css({display:"block"}),o.length&&(n(o),i(s.tabGroup),s._updateContentElements(!0))},_elementId:function(e,t){var n,i=e.attr("id"),o=this.element.attr("id");return!i||i.indexOf(o+"-")>-1?(n=(o||r.guid())+"-",n+(t+1)):i},_updateContentElements:function(t){var n=this,i=n._contentUrls,o=n.tabGroup.children(".k-item"),a=n.wrapper.children("div"),s=n._elementId.bind(n);a.length&&o.length>a.length?a.each(function(n){var i=s(e(this),n),r=o.filter("[aria-controls="+(this.id||0)+"]")[0];!r&&t&&(r=o[n]),r&&r.setAttribute("aria-controls",i),this.setAttribute("id",i)}):o.each(function(t){var o=a.eq(t),r=s(o,t);this.setAttribute("aria-controls",r),!o.length&&i[t]?e("
          ").appendTo(n.wrapper).attr("id",r):(o.attr("id",r),e(this).children(".k-loading")[0]||i[t]||e("").prependTo(this)),o.attr("role","tabpanel"),o.filter(":not(."+O+")").attr("aria-hidden",!0).attr("aria-expanded",!1),o.filter("."+O).attr("aria-expanded",!0)}),n.contentElements=n.contentAnimators=n.wrapper.children("div"),n.tabsHeight=g(n.tabGroup)+parseInt(n.wrapper.css("border-top-width"),10)+parseInt(n.wrapper.css("border-bottom-width"),10),r.kineticScrollNeeded&&r.mobile.ui.Scroller&&(r.touchScroller(n.contentElements),n.contentElements=n.contentElements.children(".km-scroll-container"))},_wrapper:function(){var e=this;e.wrapper=e.element.is("ul")?e.element.wrapAll("
          ").parent():e.element,e.scrollWrap=e.wrapper.parent(".k-tabstrip-wrapper"),e.scrollWrap[0]||(e.scrollWrap=e.wrapper.wrapAll("
          ").parent())},_tabPosition:function(){var e=this,t=e.options.tabPosition;e.wrapper.addClass("k-floatwrap k-tabstrip-"+t),"bottom"==t&&e.tabGroup.appendTo(e.wrapper),e.resize(!0)},_setContentElementsDimensions:function(){var e,t,n,i,o,r,a=this,s=a.options.tabPosition;"left"!=s&&"right"!=s||(e=a.wrapper.children(".k-content"),t=e.filter(":visible"),n="margin-"+s,i=a.tabGroup,o=f(i),r=Math.ceil(i.height())-parseInt(t.css("padding-top"),10)-parseInt(t.css("padding-bottom"),10)-parseInt(t.css("border-top-width"),10)-parseInt(t.css("border-bottom-width"),10),setTimeout(function(){e.css(n,o).css("min-height",r)}))},_resize:function(){this._setContentElementsDimensions(),this._scrollable()},_sizeScrollWrap:function(e){var t,n;e.is(":visible")&&(t=this.options.tabPosition,n=Math.floor(g(e,!0))+("left"===t||"right"===t?2:this.tabsHeight),this.scrollWrap.css("height",n).css("height"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(W,t.type==z)},_click:function(e){var t,n,i=this,o=e.find("."+C),r=o.attr(w),a=i.options.collapsible,s=e.index(),l=i.contentHolder(s),c=e.parent().children(),d=c.filter("."+V);if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+H+(a?"":",."+O)))return d.removeClass(V),i._focused=e,e.addClass(V),i._current(e),i._scrollableModeActive&&i._scrollTabsToItem(e),!0;if(n=o.data(P)||i._contentUrls[s]||r&&("#"==r.charAt(r.length-1)||r.indexOf("#"+i.element[0].id+"-")!=-1),t=!r||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(M,{item:e[0],contentElement:l[0]}))return!0;if(t!==!1)return a&&e.is("."+O)?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},_scrollable:function(){var e,t,n,i,a,s,l,c,d=this,u=d.options;d._scrollableAllowed()&&(d.wrapper.addClass("k-tabstrip-scrollable"),e=d.wrapper[0].offsetWidth,t=d.tabGroup[0].scrollWidth,t>e&&!d._scrollableModeActive?(d._nowScrollingTabs=!1,d._isRtl=r.support.isRtl(d.element),a=r.support.mobileOS?"touchstart":"mousedown",s=r.support.mobileOS?"touchend":"mouseup",l=r.support.browser,c=d._isRtl&&!l.msie&&!l.edge,d.wrapper.append(o("prev","k-i-arrow-60-left")+o("next","k-i-arrow-60-right")),n=d._scrollPrevButton=d.wrapper.children(".k-tabstrip-prev"),i=d._scrollNextButton=d.wrapper.children(".k-tabstrip-next"),d.tabGroup.css({marginLeft:f(n)+9,marginRight:f(i)+12}),n.on(a+_,function(){d._nowScrollingTabs=!0,d._scrollTabsByDelta(u.scrollable.distance*(c?1:-1))}),i.on(a+_,function(){d._nowScrollingTabs=!0,d._scrollTabsByDelta(u.scrollable.distance*(c?-1:1))}),n.add(i).on(s+_,function(){d._nowScrollingTabs=!1}),d._scrollableModeActive=!0,d._toggleScrollButtons()):d._scrollableModeActive&&t<=e?(d._scrollableModeActive=!1,d.wrapper.removeClass("k-tabstrip-scrollable"),d._scrollPrevButton.off().remove(),d._scrollNextButton.off().remove(),d.tabGroup.css({marginLeft:"",marginRight:""})):d._scrollableModeActive?d._toggleScrollButtons():d.wrapper.removeClass("k-tabstrip-scrollable"))},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!e.scrollable.distance&&(e.scrollable={distance:$}),e.scrollable&&!isNaN(e.scrollable.distance)&&("top"==e.tabPosition||"bottom"==e.tabPosition)},_scrollTabsToItem:function(e){var t,n=this,i=n.tabGroup,o=i.scrollLeft(),r=f(e),a=n._isRtl?e.position().left:e.position().left-i.children().first().position().left,s=i[0].offsetWidth,l=Math.ceil(parseFloat(i.css("padding-left")));n._isRtl?a<0?t=o+a-(s-o)-l:a+r>s&&(t=o+a-r+2*l):o+sa&&(t=a-l),i.finish().animate({scrollLeft:t},"fast","linear",function(){n._toggleScrollButtons()})},_scrollTabsByDelta:function(e){var t=this,n=t.tabGroup,i=n.scrollLeft();n.finish().animate({scrollLeft:i+e},"fast","linear",function(){t._nowScrollingTabs&&!jQuery.fx.off?t._scrollTabsByDelta(e):t._toggleScrollButtons()})},_toggleScrollButtons:function(){var e=this,t=e.tabGroup,n=r.scrollLeft(t);e._scrollPrevButton.toggle(0!==n),e._scrollNextButton.toggle(n").prependTo(t)),f=2*d-p.width(),g=function(){p.animate({marginLeft:(parseInt(p.css("marginLeft"),10)||0)",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:""},c='
          • #= messages.tableTab #
          • #= messages.cellTab #
          • #= messages.accessibilityTab #
           
           
           
          ',d=n.Class.extend({init:function(e){this.options=e},open:function(){function t(e){e.preventDefault(),l.destroy(),r.destroy()}function i(e){l.collectDialogValues(u),t(e),l.change&&l.change(),c.closeCallback(u)}function o(e){t(e),c.closeCallback()}var r,a,s,l=this,c=l.options,d=c.dialogOptions,u=c.table,h=c.messages,p=n.support.browser.msie;d.close=o,d.title=h.tableWizard,d.visible=c.visible,r=e(l._dialogTemplate(h)).appendTo(document.body).kendoWindow(d).closest(".k-window").toggleClass("k-rtl",c.isRtl).end().find(".k-dialog-ok").click(i).end().find(".k-dialog-close").click(o).end().data("kendoWindow"),a=r.element,l._initTabStripComponent(a),l._initTableViewComponents(a,u),l._initCellViewComponents(a,u),l._initAccessibilityViewComponents(a,u),r.center(),r.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(o,a.widthUnit),this._addUnit(o,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,o),this._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",a,i,o),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,r),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(o,n.widthUnit),this._addUnit(o,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,o),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",n,a,o),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,r),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",n,a)},_initAccessibilityViewComponents:function(e,t){var n=this.components,i=n.accessibilityView={},o=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",o,i),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),o),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",o,i),this._initCheckbox(e.find("#k-editor-cells-headers"),"cellsWithHeaders",o,i)},_initNumericTextbox:function(t,n,o,r,a){var s=r[n]=t.kendoNumericTextBox(a?e.extend({},i,a):i).data("kendoNumericTextBox");n in o&&s.value(parseInt(o[n],10))},_initDropDownList:function(e,t,n,i,o){var r=i[t]=e.kendoDropDownList({dataSource:o}).data("kendoDropDownList");this._setComponentValue(r,n,t)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,o=a.dataSource;o[0].tooltip=n.alignLeft,o[1].tooltip=n.alignCenter,o[2].tooltip=n.alignRight,o[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,a,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,o=s.dataSource;o[0].tooltip=n.alignLeftTop,o[1].tooltip=n.alignCenterTop,o[2].tooltip=n.alignRightTop,o[3].tooltip=n.alignLeftMiddle,o[4].tooltip=n.alignCenterMiddle,o[5].tooltip=n.alignRightMiddle,o[6].tooltip=n.alignLeftBottom,o[7].tooltip=n.alignCenterBottom,o[8].tooltip=n.alignRightBottom,o[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,o=l.dataSource;o[0].tooltip=n.alignLeftTop,o[1].tooltip=n.alignCenterTop,o[2].tooltip=n.alignRightTop,o[3].tooltip=n.alignLeftBottom,o[4].tooltip=n.alignCenterBottom,o[5].tooltip=n.alignRightBottom,o[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,l,"captionAlignment",t,i)},_initAlignmentDropDown:function(e,t,n,i,o){var r=o[n]=e.kendoDropDownList(t).data("kendoDropDownList");r.list.addClass("k-align").css("width","110px"),this._setComponentValue(r,i,n)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var o=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&o.value(n[t])},_initInput:function(e,t,n,i){var o=i[t]=e.get(0);t in n&&(o.value=n[t])},_initCheckbox:function(e,t,n,i){var o=i[t]=e.get(0);t in n&&(o.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(c)({messages:e})}});n.ui.editor.TableWizardDialog=d}(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.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+h}function i(e,t){for(var n=0;n").insertAfter(t),s.notify(r)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:""},events:[b],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(h),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(o(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,s._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(o(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(C),i.element.on(n(y),p(i._keydown,i)).on(n(k),p(i._drop,i)).on(n(b),p(i._trackChange,i)).on(S,p(i._inputHandler,i)),s.support.browser.msie&&(e=s.support.browser.version,e>8&&e<11&&(t=[n(w),n(k),n(y),n(x)].join(" "),i.element.on(t,p(i._legacyIEInputHandler,i)))))},_unbindInput:function(){var e=[S,n(y),n(w),n(k),n(x)].join(" ");this.element.off(e)},_editable:function(e){var t=this,n=t.element,i=t.wrapper,o=e.disable,r=e.readonly;t._unbindInput(),r||o?(n.attr(v,o).attr(_,r),i.toggleClass(g,o)):(n.removeAttr(v).removeAttr(_),i.removeClass(g),t._bindInput())},_change:function(){var e=this,t=e.value();t!==e._oldValue?(e._oldValue=t,e.trigger(b),e.element.trigger(b)):""===t&&e.__changing&&e.element.trigger(b)},inputChange:function(e){var t,n,o,r,c,d=this,u=d._old,h=d.element[0],p=h.value,f=l(h),g=f[1],m=p.length-u.length,v=s.support.mobileOS;d.__dropping&&m<0||(m===-1&&v.android&&"chrome"===v.browser&&(e=!0),t=a(g,i(p,u)),n=p.substring(t,g),h.value=p.substring(0,t)+d._emptyMask.substring(t),o=d._mask(t,g,n),r=d._trimStartPromptChars(p.substring(g),a(m,o-t)),c=d._unmask(r,u.length-r.length),d._mask(o,o,c),e&&(o=d._findCaretPosBackwards(t)),l(h,o),d.__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,o){var r,a,c,d,u=this.element[0],h=u.value||this._emptyMask,p=this.options.promptChar,f=0;for(e=this._find(e,o),e>n&&(n=e),a=this._unmask(h.substring(n),n),i=this._unmask(i,e),r=i.length,i&&(a=a.replace(RegExp("^_{0,"+r+"}"),"")),i+=a,h=h.split(""),c=i.charAt(f);er&&(d=e),e=this._find(e+1);return u.value=this._old=h.join(""),s._activeElement()===u&&(d===t&&(d=this._maskLength),l(u,d)),d},_unmask:function(t,n){var i,o,r,a,s,l,c,d;if(!t)return"";if(this._unmaskedValue===t)return this._unmaskedValue;for(t=(t+"").split(""),r=0,a=n||0,s=this.options.promptChar,l=t.length,c=this.tokens.length,d="";a=l)););return this._unmaskedValue=d,d},_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=f(p(e._removeInvalidState,e),100)},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(m),e._invalidStateTimeout=null},_tokenize:function(){for(var e,t,n,i,o=[],r=0,a=this.options.mask||"",l=a.split(""),c=l.length,d=0,u="",h=this.options.promptChar,p=s.getCulture(this.options.culture).numberFormat,f=this._rules;d
          ').parent().wrap('
          ').parent()}function o(t){e(t.target).closest("a.k-button").length&&t.preventDefault()}function r(t,n){var i="next"===n?e.fn.next:e.fn.prev,o="next"===n?e.fn.first:e.fn.last,a=i.call(t);return!a.length&&t.is("."+Z)?t:a.is(":kendoFocusable")||!a.length?a:a.find(":kendoFocusable").length?o.call(a.find(":kendoFocusable")):r(a,n)}var a,s,l,c,d,u,h,p,f,g,m,v,_,b,w,k,y,x=window.kendo,C=x.Class,S=x.ui.Widget,T=e.proxy,D=x.isFunction,A=x.keys,E=x._outerWidth,I="k-toolbar",M="k-button",F="k-overflow-button",R="k-toggle-button",P="k-button-group",z="k-split-button",B="k-separator",L="k-spacer",H="spacer",N="k-popup",O="k-toolbar-resizable",V="k-state-active",W="k-state-disabled",U="k-state-hidden",q="k-group-start",j="k-group-end",G="k-primary",$="k-icon",Y="k-i-",K="k-button-icon",Q="k-button-icontext",X="k-list-container k-split-container",J="k-split-button-arrow",Z="k-overflow-anchor",ee="k-overflow-container",te="k-toolbar-first-visible",ne="k-toolbar-last-visible",ie="click",oe="toggle",re="open",ae="close",se="overflowOpen",le="overflowClose",ce="never",de="auto",ue="always",he="k-overflow-hidden",pe="_optionlist",fe=x.attr("uid");x.toolbar={},a={overflowAnchor:'
          ',overflowContainer:'
            '},x.toolbar.registerComponent=function(e,t,n){a[e]={toolbar:t,overflow:n}},s=x.Class.extend({addOverflowAttr:function(){this.element.attr(x.attr("overflow"),this.options.overflow||de)},addUidAttr:function(){this.element.attr(fe,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(U).show(),this.options.hidden=!1},hide:function(){this.element.addClass(U).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(W,!e),this.options.enable=e},twin:function(){var n=this.element.attr(fe);return this.overflow&&this.options.splitContainerId?e("#"+this.options.splitContainerId).find("["+fe+"='"+n+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+fe+"='"+n+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+fe+"='"+n+"']").data(this.options.type):t}}),x.toolbar.Item=s,l=s.extend({init:function(n,i){var o=e(n.useButtonTag?'':'');this.element=o,this.options=n,this.toolbar=i,this.attributes(),n.primary&&o.addClass(G),n.togglable&&(o.addClass(R),this.toggle(n.selected)),n.url===t||n.useButtonTag||(o.attr("href",n.url),n.mobile&&o.attr(x.attr("role"),"button")),n.group&&(o.attr(x.attr("group"),n.group),this.group=this.toolbar.addToGroup(this,n.group)),!n.togglable&&n.click&&D(n.click)&&(this.clickHandler=n.click),n.togglable&&n.toggle&&D(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("."+P).data("buttonGroup")},_addGraphics:function(){var t,n,i,o=this.element,r=this.options.icon,a=this.options.spriteCssClass,s=this.options.imageUrl;(a||s||r)&&(t=!0,o.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass($)&&!e(this).hasClass("k-image")}).each(function(n,i){(1==i.nodeType||3==i.nodeType&&e.trim(i.nodeValue).length>0)&&(t=!1)}),o.addClass(t?K:Q)),r?(n=o.children("span."+$).first(),n[0]||(n=e('').prependTo(o)),n.addClass(Y+r)):a?(n=o.children("span.k-sprite").first(),n[0]||(n=e('').prependTo(o)),n.addClass(a)):s&&(i=o.children("img.k-image").first(),i[0]||(i=e('icon').prependTo(o)),i.attr("src",s))}}),x.toolbar.Button=l,c=l.extend({init:function(e,t){l.fn.init.call(this,e,t);var n=this.element;n.addClass(M),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(V,e),this.options.selected=e}}),x.toolbar.ToolBarButton=c,d=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(F+" "+M),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(he)},select:function(e){e===t&&(e=!1),this.options.isChild?this.element.toggleClass(V,e):this.element.find(".k-button").toggleClass(V,e),this.options.selected=e}}),x.toolbar.OverflowButton=d,x.toolbar.registerComponent("button",c,d),u=s.extend({createButtons:function(t){var n,i,o=this.options,r=o.buttons||[];for(i=0;i
            ");this.options=t,this.toolbar=n,this.addIdAttr(),t.align&&i.addClass("k-align-"+t.align),this.createButtons(c),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(P),this.element.data({type:"buttonGroup",buttonGroup:this})}}),x.toolbar.ToolBarButtonGroup=h,p=u.extend({init:function(t,n){var i=this.element=e("
          • ");this.options=t,this.toolbar=n,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((t.mobile?"":P)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(he)}}),x.toolbar.OverflowButtonGroup=p,x.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 c(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","."+M,function(n){var i=e(n.target).parent();n.preventDefault(),n.keyCode===A.ESC||n.keyCode===A.TAB||n.altKey&&n.keyCode===A.UP?(t.toggle(),t.focus()):n.keyCode===A.DOWN?r(i,"next").focus():n.keyCode===A.UP?r(i,"prev").focus():n.keyCode===A.SPACEBAR||n.keyCode===A.ENTER?t.toolbar.userEvents.trigger("tap",{target:e(n.target)}):n.keyCode===A.HOME?i.parent().find(":kendoFocusable").first().focus():n.keyCode===A.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var t,n,i=this.options,o=i.menuButtons;for(n=0;n").parent().appendTo(this.popupElement)},createPopup:function(){var n=this,r=this.options,a=this.element;this.popupElement.attr("id",r.id+pe).attr(fe,r.rootUid),r.mobile&&(this.popupElement=i(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:r.mobile?e(r.mobile).children(".km-pane"):null,anchor:a,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:r.animation,open:function(e){var i=n.toolbar.trigger(re,{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(ae,{target:a});t&&e.preventDefault(),a.focus()}}).data("kendoPopup"),this.popup.element.on(ie,"a.k-button",o)},adjustPopupWidth:function(e){var t,n=e.options.anchor,i=E(n);x.wrap(e.element).addClass("k-split-wrapper"),t="border-box"!==e.element.css("box-sizing")?i-(E(e.element)-e.element.width()):i,e.element.css({fontFamily:n.css("font-family"),"min-width":t})},remove:function(){this.popup.element.off(ie,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){(this.options.enable||this.popup.visible())&&this.popup.toggle()},enable:function(e){e===t&&(e=!0),this.mainButton.enable(e),this.element.toggleClass(W,!e),this.options.enable=e},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(U).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(U).hide(),this.options.hidden=!1}}),x.toolbar.ToolBarSplitButton=f,g=s.extend({init:function(t,n){var i,o,r,a=this.element=e('
            • '),s=t.menuButtons;for(this.options=t,this.toolbar=n,this.overflow=!0,o=(t.id||t.uid)+pe,this.mainButton=new d(e.extend({},t)),this.mainButton.element.appendTo(a),r=0;r 
              ");this.element=i,this.options=t,this.toolbar=n,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(B),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(B),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(he)}}),x.toolbar.registerComponent("separator",m,v),_=s.extend({init:function(t,n){var i=this.element=e("
               
              ");this.element=i,this.options=t,this.toolbar=n,i.addClass(L),i.data({type:H})}}),x.toolbar.registerComponent(H,_),b=s.extend({init:function(t,n,i){var o=D(t)?t(n):t;o=o instanceof jQuery?o.wrap("
              ").parent():e("
              ").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})}}),x.toolbar.TemplateItem=b,w=s.extend({init:function(t,n,i){var o=e(D(t)?t(n):t);o=o instanceof jQuery?o.wrap("
            • ").parent():e("
            • ").html(o),this.element=o,this.options=n,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),o.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(he)}}),x.toolbar.OverflowTemplateItem=w,k=C.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 x.ui.Popup(n,{origin:"bottom "+s,position:"top "+s,anchor:t.overflowAnchor,isRtl:o,animation:t.animation,appendTo:t.isMobile?e(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(n){var i=x.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",(o?-1:1)*((E(i)-i.width())/2+1)),t.trigger(se)&&n.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){t.trigger(le)&&e.preventDefault(),this.element.focus()}}),t.popup.element.on("keydown","."+M,function(n){var i,o=e(n.target),a=o.parent(),s=a.is("."+P)||a.is("."+z);n.preventDefault(),n.keyCode===A.ESC||n.keyCode===A.TAB||n.altKey&&n.keyCode===A.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):n.keyCode===A.DOWN?(i=!s||s&&o.is(":last-child")?a:o,r(i,"next").focus()):n.keyCode===A.UP?(i=!s||s&&o.is(":first-child")?a:o,r(i,"prev").focus()):n.keyCode===A.SPACEBAR||n.keyCode===A.ENTER?(t.userEvents.trigger("tap",{target:e(n.target)}),t.overflowAnchor.focus()):n.keyCode===A.HOME?a.parent().find(":kendoFocusable").first().focus():n.keyCode===A.END&&a.parent().find(":kendoFocusable").last().focus()}),t.popup.container=t.isMobile?t.popup.element.find("."+ee):t.popup.element,t.popup.container.attr(fe,this.uid)},_toggleOverflowAnchor:function(){var e=!1,t=this._isRtl?"padding-left":"padding-right";e=this.options.mobile?this.popup.element.find("."+ee).children(":not(."+he+", ."+N+")").length>0:this.popup.element.children(":not(."+he+", ."+N+")").length>0,e?(this.overflowAnchor.css({visibility:"visible",width:""}),this.wrapper.css(t,this.overflowAnchor.outerWidth(!0))):(this.overflowAnchor.css({visibility:"hidden",width:"1px"}),this.wrapper.css(t,""))},_buttonClick:function(n){var i,o,r,a,s,l,c,d=this,u=n.target.closest("."+J).length;return n.preventDefault(),u?(d._toggle(n),t):(o=e(n.target).closest("."+M,d.element),o.hasClass(Z)||(r=o.data("button"),!r&&d.popup&&(o=e(n.target).closest("."+F,d.popup.container),r=o.parent("li").data("button")),r&&r.options.enable&&(r.options.togglable?(s=D(r.toggleHandler)?r.toggleHandler:null,r.toggle(!r.options.selected,!0),l={target:o,group:r.options.group,checked:r.options.selected,id:r.options.id,item:r},s&&s.call(d,l),d.trigger(oe,l)):(s=D(r.clickHandler)?r.clickHandler:null,l={sender:d,target:o,id:r.options.id,item:r},s&&s.call(d,l),d.trigger(ie,l)),r.options.url&&(r.options.attributes&&r.options.attributes.target&&(c=r.options.attributes.target),window.open(r.options.url,c||"_self")),o.hasClass(F)&&d.popup.close(),a=o.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).on("focusin",function(t){var n=e(t.target),i=e(this).find(":kendoFocusable:first");n.is("."+I)&&0!==i.length&&(i.is("."+Z)&&(i=r(i,"next")),i.length&&i[0].focus())}).on("keydown",T(t._keydown,t))},_keydown:function(n){var i,o,r,a,s,l,c,d,u,h=e(n.target),p=n.keyCode,f=this.element.children(":not(.k-separator):visible"),g=this._isRtl?-1:1;if(p===A.TAB&&(i=h.parentsUntil(this.element).last(),o=!1,r=!1,a=!1,f.not("."+Z).length||(a=!0),i.length||(i=h),i.is("."+Z)&&!a&&(s=f.last(),n.shiftKey&&n.preventDefault(),s.is(":kendoFocusable")?f.last().focus():f.last().find(":kendoFocusable").last().focus()),n.shiftKey||f.index(i)!==f.length-1||(o=!i.is("."+P)||h.is(":last-child")),l=f.index(i)===f.not(".k-overflow-anchor").first().index(),n.shiftKey&&l&&(r=!i.is("."+P)||h.is(":first-child")),o&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&!a&&(n.preventDefault(),this.overflowAnchor.focus()),(r||a&&n.shiftKey)&&(n.preventDefault(),c=this._getPrevFocusable(this.wrapper),c&&c.focus()),this._preventNextFocus=!1),n.altKey&&p===A.DOWN)return d=e(document.activeElement).data("splitButton"),u=e(document.activeElement).is("."+Z),d?d.toggle():u&&this._toggleOverflow(),t;if((p===A.SPACEBAR||p===A.ENTER)&&!h.is("input, checkbox"))return p===A.SPACEBAR&&n.preventDefault(),h.is("."+z)?(h=h.children().first(),this.userEvents.trigger("tap",{target:h})):p===A.SPACEBAR&&this.userEvents.trigger("tap",{target:h}),t;if(p===A.HOME){if(h.is(".k-dropdown")||h.is("input"))return;this.overflowAnchor?f.eq(1).focus():f.first().focus(),n.preventDefault()}else if(p===A.END){if(h.is(".k-dropdown")||h.is("input"))return;this.overflowAnchor&&"hidden"!=e(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():f.last().focus(),n.preventDefault()}else p!==A.RIGHT||this._preventNextFocus||h.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(n.target,1*g)?p!==A.LEFT||this._preventNextFocus||h.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(n.target,-1*g)||(this._getNextElement(n.target,-1*g).focus(),n.preventDefault()):(this._getNextElement(n.target,1*g).focus(),n.preventDefault())},_getNextElement:function(t,n){var i=this.element.children(":not(.k-separator):visible"),o=i.index(i.index(t)===-1?t.parentElement:t),r=this.overflowAnchor?1:0,a=n,s=1===n?i.length-1:r,l=1===n?r:i.length-1,c=i[o+n];if(this._preventNextFocus=!1,e(t).closest("."+P).length&&!e(t).is(1===n?":last-child":":first-child"))return e(t).closest("."+P).children()[e(t).closest("."+P).children().index(t)+n];for(this.overflowAnchor&&t===this.overflowAnchor[0]&&n===-1&&(c=i[i.length-1]),o===s&&(c=!this.overflowAnchor||this.overflowAnchor&&"hidden"===e(this.overflowAnchor).css("visibility")?i[l]:this.overflowAnchor);!e(c).is(":kendoFocusable");){if(c=n===-1&&e(c).closest("."+P).length?e(c).children(":not(label, div)").last():e(c).children(":not(label, div)").first(),!c.length&&(a+=n,c=i[o+a],!c))return this.overflowAnchor;this._preventNextFocus=!e(c).closest("."+P).length}return c},_getPrevFocusable:function(n){if(n.is("html"))return n;var i,o,r=n.prevAll();return r.each(function(){return o=e(this),o.is(":kendoFocusable")?(i=o,!1):o.find(":kendoFocusable").length>0?(i=o.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(."+U+", ."+L+")").each(function(){t+=E(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('."+U+"')"),i=0;ili[data-uid='"+e.data("uid")+"']").removeClass(he)},_showItem:function(e,t){return!!(e.length&&t>this._childrenWidth()+E(e,!0))&&(e.show(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(he),!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(te+" "+ne),n.first().add(i.first()).addClass(te),n.last().add(i.last()).addClass(ne)}}),x.ui.plugin(y)}(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",o="pause",r="play",a="ready",s="timeChange",l="volumeChange",c="k-i-full-screen",d="k-i-full-screen-exit",u="k-i-volume-off",h="k-i-volume-down",p="k-i-volume-up",f="k-mediaplayer-quality",g="k-i-play",m="k-i-pause",v="k-mediaplayer-titlebar",_="k-title",b="k-mediaplayer-toolbar-wrap",w="k-mediaplayer-toolbar",k="k-mediaplayer-seekbar",y="k-mediaplayer-volume",x="k-mediaplayer-media",C="k-mediaplayer-overlay",S="k-mediaplayer-yt",T=".",D=n.ui,A=".kendoMediaPlayer",E=new Date(1970,0,1),I=60*E.getTimezoneOffset(),M=n.ui.Widget,F=e.isArray,R={shortTime:"mm:ss",longTime:"HH:mm:ss"},P=n.template,z=e.proxy,B=n.keys,L={htmlPlayer:"",titleBar:P("
              Video Title
              "),toolBar:"
              ",youtubePlayer:"
              ",toolBarTime:"00:00:00 / 00:00:00",slider:"",volumeSlider:"",qualityDropDown:"",toolTip:"#= kendo.toString(new Date(value), 'HH:mm:ss') #"},H=M.extend({init:function(t,i){this.wrapper=e(t),M.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.fullScreen&&this.fullScreen(!0),i.media&&this.media(this.options.media),n.notify(this)},events:[i,o,r,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(T+v),0===this._titleBar.length&&(this.wrapper.append(L.titleBar),this._titleBar=this.wrapper.find(T+v))},_createSlider:function(){var e=this.wrapper.find(T+k);this._slider||(this._sliderDragChangeHandler=z(this._sliderDragChange,this),this._sliderDraggingHandler=z(this._sliderDragging,this),e=this.wrapper.find(T+k),this._slider=new D.Slider(e[0],{smallStep:1e3,tickPlacement:"none",showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:L.toolTip},dragHandleTitle:""}))},_createVolumeSlider:function(){var e=this.wrapper.find(T+y);this._volumeSlider||(this._volumeDraggingHandler=z(this._volumeDragging,this),this._volumeChangeHandler=z(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=L.toolBarTime},_currentUrl:function(){var e=this.media();return F(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(T+S).toggle(),this.wrapper.find(T+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(T+x+" > source").remove(),this.wrapper.find(T+x).attr("src",this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(T+w);0===t.length&&(this._toolbarClickHandler=z(this._toolbarClick,this),this.wrapper.append(L.toolBar),t=this.wrapper.find(T+w),t.width(this.wrapper.find(T+x).width()),this._toolBar=new D.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:"button",attributes:{"class":"k-play-button"},icon:"play"},{template:L.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:L.volumeSlider,attributes:{"class":"k-mediaplayer-volume-wrap"}},{template:L.qualityDropDown,attributes:{"class":"k-mediaplayer-quality-wrap"}},{type:"button",attributes:{"class":"k-fullscreen-button"},icon:"full-screen"}]}),this._toolBar.wrapper.off("keydown"),t.before(L.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(T+f),n=this.media();t===e.data("kendoDropDownList")&&(this._dropDownSelectHandler=z(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&&F(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(),o=i.hasClass(g);this.media()&&((i.hasClass(g)||i.hasClass(m))&&(o?this.play():this.pause()),(i.hasClass(c)||i.hasClass(d))&&(this._isInFullScreen?(i.removeClass(d).addClass(c),this.fullScreen(!1)):(i.removeClass(c).addClass(d),this.fullScreen(!0))),(i.hasClass(u)||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*I;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+" "+u),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,t=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime;return t=t?t:0,e=this._msToTime(t),this._currentTimeElement.text(n.toString(e,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=1e3*(t+I),this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(e){t===e&&(e=this._playButtonSpan.is(T+g)),e?(this._playButtonSpan.removeClass(g).addClass(m),this._playButton.attr("title",this.options.messages.pause),this._playButton.attr("aria-label",this.options.messages.pause)):(this._playButtonSpan.removeClass(m).addClass(g),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+I)),this.trigger(i)},_mediaPlay:function(){this.trigger(r)},_mediaReady:function(){this.trigger(a)},_mediaDurationChange:function(){var e=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=0===e.getHours()?R.shortTime:R.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=z(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=z(this._mediaDurationChange,this),this.wrapper.prepend(L.youtubePlayer),this._ytPlayer=this.wrapper.find(T+S)[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"+A,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=z(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=z(this._mediaDurationChange,this),this._mediaEndedHandler=z(this._mediaEnded,this),this._mediaCanPlayHandler=z(this._mediaReady,this),this._mediaPlayHandler=z(this._mediaPlay,this),this._videoOverlay.after(L.htmlPlayer),this._media=this.wrapper.find(T+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){M.fn.setOptions.call(this,e)},destroy:function(){M.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(A),this.element.find(T+C).off(A),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(o),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:(F(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=z(this._fullscreen,this),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+A,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=z(this._keyDown,this),this.wrapper.on("keydown"+A,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(d).addClass(c),this.fullScreen(!1))},_keyDown:function(e){var t,n;e.preventDefault(),t=this.wrapper.find('span[class*="k-i-fullscreen"]'),e.keyCode===B.SPACEBAR?this.isPlaying()?this.pause():this.play():e.keyCode!==B.ENTER||this._isInFullScreen?77===e.keyCode?(n=this.mute(),this.mute(!n)):e.keyCode===B.ESC&&this._isInFullScreen&&(t.removeClass(d).addClass(c),this.fullScreen(!1)):(t.removeClass(c).addClass(d),this.fullScreen(!0))},_error:function(){},_progress:function(){}});D.plugin(H)}(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]"===we.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]"===we.call(n)?n:n!==t?[n]:[];return ye(i,function(e){return"string"==typeof e?{name:[e],expand:!1}:{name:"[object Array]"===we.call(e.name)?e.name.slice():[e.name],expand:e.expand}})}function o(e){return e.indexOf(" ")!==-1&&(e='["'+e+'"]'),e}function r(e,t,n,i){var o,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(o=0;o0});return n}function c(e,t,n){var o,r;return e=e||{},s(t,e),n.length>1&&t.push({name:De,measure:!0,children:i(n)}),o={members:t},e.tuples&&(r=x(e.tuples,o),r.tuple&&(t=l(r.tuple))),t}function d(e){var t=pe.getter(e.field,!0);return function(n,i){return e.aggregate(t(n.dataItem),i,n)}}function u(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 g(e,t,n,i,o){var r,a,s,l=e.length,c=_(t,i),d=i.length||1;for(a=0;a2?t[0]+"."+t[1]:e}function R(e,t){var n=e.length-1,i=e[n],o=P(t,i);return o&&o.dir?i="ORDER("+i+".Children,"+o.field+".CurrentMember.MEMBER_CAPTION,"+o.dir+")":i+=".Children",e[n]=i,e}function P(e,t){for(var n=0,i=e.length;n2?(t=e.pop(),n+=z(e)):(n+=e.shift(),t=e.pop()),n+="},{",n+=t,n+="})"}function B(e,t){var n=e.slice(0);return t.length>1&&n.push("{"+L(t).join(",")+"}"),z(n)}function L(e){for(var n,i=0,o=e.length,r=[];i1)l.push(t);else{for(r=F(o[0]),n=0,i=c.length;n1||t.length>1){for(a.push(B(r,t));l=0;i--)n="SELECT (",n+=U(r[i]),n+=") ON 0",i==a-1?(n+=" FROM ["+t+"]",o=n):o=n+" FROM ( "+o+" )";return o}function j(e,t,n){var i,o,r="";if(t){r+="<"+e+">";for(o in t)i=t[o],n&&(o=o.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),r+="<"+o+">"+i+"";r+=""}else r+="<"+e+"/>";return r}function G(e){if(null==e)return[];var t=we.call(e);return"[object Array]"!==t?[e]:e}function $(e){var t,n,i,o,r={tuples:[]},a=G(pe.getter("Tuples.Tuple",!0)(e)),s=pe.getter("Caption['#text']"),l=pe.getter("UName['#text']"),c=pe.getter("LName['#text']"),d=pe.getter("LNum['#text']"),u=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[o]),hierarchy:h(i[o])});r.tuples.push({members:n})}return r}var Y,K,Q,X,J,Z,ee,te,ne,ie,oe,re,ae,se,le,ce,de,ue,he,pe=window.kendo,fe=pe.ui,ge=pe.Class,me=fe.Widget,ve=pe.data.DataSource,_e=pe._outerWidth,be=pe._outerHeight,we={}.toString,ke=function(e){return e},ye=e.map,xe=e.extend,Ce=pe.isFunction,Se="change",Te="error",De="Measures",Ae="progress",Ee="stateReset",Ie="auto",Me="
              ",Fe=".kendoPivotGrid",Re="__row_total__",Pe="dataBinding",ze="dataBound",Be="expandMember",Le="collapseMember",He="k-i-collapse",Ne="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 u(n)?u(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),u(i)?u(e)&&(i+=e):i=e,u(e)&&n.count++,i},result:function(e){var t=e.accumulator;return u(t)&&(t/=e.count),t}},max:function(e,t){var n=t.accumulator;return u(n)||h(n)||(n=e),ne&&(u(e)||h(e))&&(n=e),n}},Ye=ge.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,o,r;if(t=t||{},n={},"[object Array]"===we.call(t)){for(o=0,r=t.length;o1?r[0]:t,hierarchy:o};s>1&&(i.members[i.members.length]={children:[],caption:n[c].caption,name:n[c].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),u[u.length]=i}h.push(Re)}return{keys:h,tuples:u}},_expandedTuples:function(e,n,i){var o,r,a,s,l,c,d,u,h,p,f,g=i.length||1,m=this.dimensions||[],v=[],_=[];for(a in e){for(s=e[a],d=this._findExpandedMember(n,s.uniquePath),l=v[d.index]||[],c=_[d.index]||[],u=d.member.names,o=0;o1?h[0]:t,hierarchy:p});g>1&&(r.members[r.members.length]={children:[],caption:i[o].caption,name:i[o].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!0,parentName:t,hierarchy:"MEASURES"}),l[l.length]=r}v[d.index]=l,_[d.index]=c}return{keys:_,tuples:v}},_findExpandedMember:function(e,t){for(var n=0;n0;)if(o=l[--c].split("&"),o.length>1&&(r=o[0],a=o[1],s=i[r](e),s=s!==t&&null!==s?""+s:s,s!=a))return!1;return!0},_calculateAggregate:function(e,t,n){var i,o,r,a={};for(r=0;r1?r[t[0]]=pe.getter(t[0],!0):r[n]=pe.getter(o(n),!0);return r},_parseDescriptors:function(e){var t,n=V(e),i=N(n.root),o=n.expanded,r=[];for(t=0;t1)||n.columns&&n.columns.length||(a={root:[],expanded:[]}),I=this._asTuples(c,a,r?[]:p),M=this._asTuples(d,s,r?p:[]),c=I.tuples,d=M.tuples,l=this._toDataArray(l,this._measuresInfo(p,r),M.keys,I.keys)):l=c=d=[],{axes:{columns:{tuples:c},rows:{tuples:d}},data:l}}}),Ke=ge.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,o=this.options||{};return n===t?(o.connection||{}).catalog:(i=o.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 o,r=((t||{}).schema||{}).cube,a="columns",s={axes:ke,cubes:ke,catalogs:ke,measures:ke,dimensions:ke,hierarchies:ke,levels:ke,members:ke};r&&(s=e.extend(s,this._cubeSchema(r)),this.cubeBuilder=new Ye(r)),ve.fn.init.call(this,xe(!0,{},{schema:s},t)),this.transport=new Ke(this.options.transport||{},this.transport),this._columns=i(this.options.columns),this._rows=i(this.options.rows),o=this.options.measures||[],"[object Object]"===we.call(o)&&(a=o.axis||"columns",o=o.values||[]),this._measures=n(o),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,r,a=n.levelUniqueName||n.memberUniqueName,s=this.options.schema.data,l=Ce(s)?s:pe.getter(s,!0),c=this.options.data&&l(this.options.data)||this._rawData||[],d=[],u=0,h={};if(a&&(a=a.split(".")[0]),!n.treeOp)return d.push({caption:t.dimensions[a].caption||a,childrenCardinality:"1",dimensionUniqueName:a,hierarchyUniqueName:a,levelUniqueName:a,name:a,uniqueName:a}),d;for(i=pe.getter(o(a),!0);u0&&(this._skipNormalize-=1),this.cubeBuilder||(e=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:i,rowIndexes:o,data:e})),"rows"==this._lastExpanded?(r=t.columns.tuples,s=this._columnMeasures(),a=f(t.columns,this._axes.columns,s),a&&(l="columns",t.columns=a,g(r,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&&(r=t.rows.tuples,s=this._rowMeasures(),a=f(t.rows,this._axes.rows,s),a&&(l="rows",t.rows=a,m(r,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,o,r,a,s,l,c,d,u=e.members,h=u.length,p={members:[]},f=0;for(t&&(h-=1);f0&&(c=d,o-=d),r=0;r0&&(n-=l,e.splice(0,i*l)),o=0;o1&&(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 o,r,a,s=i.length||1,l=0,c=[],d={},u=0;if(e.length){if(this._skipNormalize<=0&&!this._hasRoot(e[0],t,n)){for(this._skipNormalize=0;l=s&&(u=0),o.members[r].name!==i[u].name&&(e.splice(l,0,this._createTuple(o,i[u])),d[l]=l),l+=1,u+=1,o=e[l],s>u&&(!o||le(a,r-1)!==le(o,r-1))){for(;u1)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}"'},K={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,o,r,a='
              ';return a+="SELECT NON EMPTY {",t=e.columns||[],n=e.rows||[],i=e.measures||[],o="rows"===e.measuresAxis,r=e.sort||[],!t.length&&n.length&&(!i.length||i.length&&o)&&(t=n,n=[],o=!1),t.length||n.length||(o=!1),t.length?a+=W(t,o?[]:i,r):i.length&&!o&&(a+=L(i).join(",")),a+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(n.length||o&&i.length>1)&&(a+=", NON EMPTY {",a+=n.length?W(n,o?i:[],r):L(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 ("+L(i).join(",")+")"),a+=""+e.connection.catalog+"Multidimensional",a.replace(/\&/g,"&")},discover:function(t){t=t||{};var n='
              ';return n+=""+(K[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,o=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"+Fe,".k-button,.k-item",function(t){var n=e(t.target),o=n.closest("["+pe.attr("name")+"]").attr(pe.attr("name"));o&&(n.hasClass("k-i-close")?i.remove(o):i.options.sortable&&n[0]===t.currentTarget&&i.sort({field:o,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(Se,this._refreshHandler),this.dataSource=this.options.dataSource=e,this.fieldMenu&&this.fieldMenu.setDataSource(e),e.first(Se,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,o=-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,o=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(),o=this.dataSource.filter();n>-1&&(o&&(o.filters=ne(o.filters,e),this.dataSource._filter.filters=o.filters,o.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,o=this.dataSource.sort()||[],r=ne(o,e.field);i&&o.length!==r.length&&(e=null),e&&r.push(e),this.dataSource.sort(r)},refresh:function(){var e,n="",i=this.dataSource[this.options.setting](),o=i.length,r=0;if(o)for(;rs.children,a.trigger(n,p)||(d.metadata[h].expanded=!i,c.toggleClass(He,!i).toggleClass(Ne,i),!i&&l?a.dataSource[u](p.path):a.refresh())}),a._scrollable(),a.options.autoBind&&a.dataSource.fetch(),pe.notify(a)},events:[Pe,ze,Be,Le],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,o=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(o||We,{useWithBlock:!!o}),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,o=i.columnIndexes[e||0],r=i.rowIndexes[t||0];return o&&r?(n=r.index*i.rowLength+o.index,{columnTuple:o.tuple,rowTuple:r.tuple,measure:o.measure||r.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){me.fn.setOptions.call(this,e),this._templates()},destroy:function(){me.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(Se,t._refreshHandler).unbind(Ee,t._stateResetHandler).unbind(Ae,t._progressHandler).unbind(Te,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(Se,t._refreshHandler).bind(Ae,t._progressHandler).bind(Ee,t._stateResetHandler).bind(Te,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(Me).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}',o=n.sortable,r="";return o&&(r+="#if (data.sortIcon) {#",r+='',r+="#}#"),(n.filterable||o)&&(r+=''),this.options.reorderable&&(r+=''),r&&(i+=''+r+""),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"),o=n.find(".k-pivot-table"),r=e(Me).addClass("k-grid k-widget");t._measureFields(),t.columnFields=e(Me).addClass("k-pivot-toolbar k-header k-settings-columns"),t.rowFields=e(Me).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),r.append(t.columnsHeader.parent()),r.append(t.content),o.append(t.columnFields),o.append(r),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(Ie),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(Ie).height(),t=this.columnFields.height(Ie).height(),n=this.rowFields.height(Ie).innerHeight(),i=this.columnsHeader.height(Ie).innerHeight(),o=n-this.rowFields.height(),r=t>e?t:e,a=i>n?i:n;this.measureFields.height(r),this.columnFields.height(r),this.rowFields.height(a-o),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,o=Math.ceil(i/this.content.width()*100);o<100&&(o=100),e.add(t).css("width",o+"%"),this._resetColspan(t)},_setContentHeight:function(){var e=this,n=e.content,i=e.rowsHeader,o=e.wrapper.innerHeight(),r=pe.support.scrollbar(),a=n[0].offsetHeight===n[0].clientHeight,s=e.options.height;if(e.wrapper.is(":visible")){if(!o||!s)return a&&(r=0),n.height("auto"),i.height(n.height()-r),t;o-=be(e.columnFields),o-=be(e.columnsHeader.parent()),o<=2*r&&(o=2*r+1,a||(o+=r)),n.height(o),a&&(r=0),i.height(o-r)}},_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(),o=i.length>1||i[0]&&i[0].type;return n.measuresAxis()===e&&(0===n[e]().length||o)&&(t=i),t},items:function(){return[]},refresh:function(){var e,t=this,n=t.dataSource,i=n.axes(),o=(i.columns||{}).tuples||[],r=(i.rows||{}).tuples||[],a=t._columnBuilder,s=t._rowBuilder,l={},c={};t.trigger(Pe,{action:"rebind"})||(a.measures=t._axisMeasures(Ge),s.measures=t._axisMeasures(je),t.columnsHeaderTree.render(a.build(o)),t.rowsHeaderTree.render(s.build(r)),l={indexes:a._indexes,measures:a.measures,metadata:a.metadata},c={indexes:s._indexes,measures:s.measures,metadata:s.metadata},t.contentTree.render(t._contentBuilder.build(n.view(),l,c)),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(ze))},_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"+Fe+" mousewheel"+Fe,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"+Fe,!1),this.rowsHeader.scrollTop(i+-n),this.content.scrollTop(i+-n)))}}),oe=pe.dom.element,re=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},ce=ge.extend({init:function(){this.measures=1,this.metadata={}},build:function(e){var t=this._tbody(e),n=this._colGroup();return[oe("table",null,[n,t])]},reset:function(){this.metadata={}},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n1&&(l.attr.colSpan=p,o.colSpan+=p-1));return h.maxMembers1&&(i.attr.rowSpan=y.rowSpan),s.children=y.rowSpan,o=this._cell("k-grid-footer",[this._content(p,e)],p),o.colSpan=x,a=this._row([o]),a.colSpan["dim"+t]=o,a.allCell=!0,u[b+p.name+"all"]=a,f&&(r=this._buildRows(e,t+1),o.attr.rowSpan=r.rowSpan),y.rowSpan+=a.rowSpan,s.members=a.rowSpan}else f&&(y.hasChild=!1,this._buildRows(e,t+1),(o||i).attr.rowSpan=y.rowSpan,s.members=y.rowSpan);return s.maxChildren-1){for(r=0;r=0;else for(;a0}}},transport:{read:function(t){var n={},i=e.treeView.dataSource.get(t.data.uniqueName),r=t.data.uniqueName;r?(n.memberUniqueName=i.uniqueName.replace(/\&/g,"&"),n.treeOp=1):n.levelUniqueName=e.currentMember+".[(ALL)]",e.dataSource.schemaMembers(n).done(function(n){o(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(){u.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}}),g='
              #=messages.info#
              ',m='
                # if (sortable) {#
              • ${messages.sortAscending}
              • ${messages.sortDescending}
              • # if (filterable) {#
              • # } ## } ## if (filterable) {#
              • ${messages.include}
              • ${messages.filterFields}
                • '+g+"
              • # } #
              ",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.filter.min",["kendo.core.min","kendo.buttongroup.min"],e)}(function(){var e={number:"",string:"","boolean":"# var checkboxGuid = kendo.guid(); # ",date:""},t="",n="
              #for(var op in operators){##=operators[op]##}#
              ",i="
              ",o="
              "+n+"
              ",r="
            • "+n+"
            • ",a="
            • ";return function(n){function s(e,t){var n,i;if(e.uid===t)return e;if(e.filters)for(n=0;n
              ').insertAfter(o.element.children().eq(0))),i=o._createPreview(o.filterModel.toJSON()),o._previewContainer.html(i)),o._attachEvents()},events:[h],options:{name:"Filter",dataSource:null,expression:null,applyButton:!1,fields:[],mainLogic:"and",messages:{and:"And",or:"Or",apply:"Apply",close:"Close",addExpression:"Add Expression",fields:"Fields",operators:"Operators",addGroup:"Add Group"},operators:{string:{eq:f,neq:g,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",isnullorempty:"Has no value",isnotnullorempty:"Has value"},number:{eq:f,neq:g,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:f,neq:g,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"},"boolean":{eq:f,neq:g}}},applyFilter:function(){var e=this.filterModel.toJSON();this.dataSource.filter(this._hasFieldsFilter(e.filters||[])?e:{})},destroy:function(){this.element.off(p),l.destroy(this.element.find(".k-filter-group-main")),this._previewContainer=null,this._applyButton=null,this._modelChangeHandler=null,d.fn.destroy.call(this)},setOptions:function(e){l.deepExtend(this.options,e),this.destroy(),this.element.empty(),this.init(this.element,this.options)},getOptions:function(){var e=n.extend(!0,{},this.options);return delete e.dataSource,e.expression=this.filterModel.toJSON(),e},_addExpressionTree:function(e){var t,n;if(e.filters)for(t=this.element.find("[id="+e.uid+"]"),n=0;n
            ").appendTo(e.closest("li"))),u=n(l.template(a)({fields:o._fields,operators:o.operators[d.type],close:o.options.messages.close,fieldsLabel:o.options.messages.fields,uid:i.uid,ns:l.ns})).appendTo(c),o._addExpressionControls(u.find(".k-toolbar"),d,i),t||o._expressionChange()},_addExpressionControls:function(e,t,n){var i=e.find(".k-filter-toolbar-item"),o=i.eq(1),r=i.eq(2);l.destroy(o),l.destroy(r),o.empty(),r.empty(),this._appendOperators(o,t),this._appendEditor(r,t),this._bindModel(e,n),this._showHideEditor(e,n)},_appendOperators:function(e,i){n(l.template(t)({operators:this.operators[i.type],operatorsLabel:this.options.messages.operators,ns:l.ns})).appendTo(e)},_appendEditor:function(e,t){l.isFunction(t.editor)?t.editor(e,n.extend(!0,{},{field:t.name})):n(l.template(t.editor)({ns:l.ns,field:t.name})).appendTo(e)},_addNewModel:function(e,t){var n;return e.push({field:t.name}),n=e[e.length-1],n.set("value",t.defaultValue),n.set("operator","eq"),n},_addGroup:function(e,t){var i,o=this,a=o.filterModel,c=e.attr("id"),d=e.closest(".k-filter-toolbar").next("ul.k-filter-lines");t?a=t:(a=s(a,c),a.filters||a.set("filters",[]),a.filters.push({logic:o.options.mainLogic}),a=a.filters[a.filters.length-1]),d.length||(d=n("
              ").appendTo(e.closest("li"))),i=n(l.template(r)({operators:{and:o.options.messages.and,or:o.options.messages.or},addExpression:o.options.messages.addExpression,addGroup:o.options.messages.addGroup,close:o.options.messages.close,ns:l.ns})).appendTo(d),o._bindModel(i.find(".k-toolbar"),a),t||o._expressionChange()},_bindModel:function(e,t){e.attr("id",t.uid),t.bind("change",this._modelChangeHandler),l.bind(e,t),e.parent().attr(l.attr("stop"),!0)},_createPreview:function(e){var t,n,i="",o=!1,r=this._hasFieldsFilter(e.filters||[]),a="";if(!e.filters||!e.filters.length||!r)return"";for(i+='(',n=0;n '+e.logic.toLocaleUpperCase()+" "),o=!0),i+=a),t.field&&(o&&(i+=' '+e.logic.toLocaleUpperCase()+" "),o=!0,i+=''+this._fields[t.field].label+"",i+=' '+this._getOperatorText(t.field,t.operator),t.operator.indexOf("is")<0?(i+=" ",i+="'"+l.htmlEncode(t.value)+"'"):i+="");return i+=')'},_expressionChange:function(){var e=this,t=e.filterModel.toJSON(),n="";e.options.expressionPreview&&(n=e._createPreview(t),e._previewContainer.html(n)),e.trigger(h,{expression:t})},_getOperatorText:function(e,t){var n=this._fields[e].type;return this.options.operators[n][t]},_getFieldsInfo:function(){var t,i,o=this,r=o.options.fields.length?o.options.fields:(o.options.dataSource.options.schema.model||{}).fields;o._fields={};for(i in r)t=r[i],t=n.extend(!0,{},{name:t.name||i,editor:t.editorTemplate||e[t.type||"string"],defaultValue:t.defaultValue||"",type:t.type||"string",label:t.label||t.name||i}),o._fields[t.name]=t,o._defaultField||(o._defaultField=t)},_hasFieldsFilter:function(e,t){t=!!t;for(var n=0;n{0}',e.options.messages.apply)).appendTo(e.element)))},_showHideEditor:function(e,t){var n,i;t.logic||(n=t.operator,i=e.find(".k-filter-toolbar-item:eq(2)"),"isnull"==n||"isnotnull"==n||"isempty"==n||"isnotempty"==n||"isnullorempty"==n||"isnotnullorempty"==n?i.hide():i.show())}});c.plugin(_),c.plugin(v)}(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 o,r,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),o=0;o").appendTo(i),s=this,g=o,b=s.operators=o.operators||{},w=s.input=e("").attr(a.attr("bind"),"value: value").appendTo(r),k=o?o.suggestDataSource:null,k&&(o=e.extend({},o,{suggestDataSource:{}})),c.fn.init.call(s,i[0],o),k&&(s.options.suggestDataSource=k),o=s.options,l=s.dataSource=o.dataSource,s.model=l.reader.model,_=o.type=p,y=a.getter("reader.model.fields",!0)(l)||{},x=y[o.field],x&&x.type&&(_=o.type=x.type),o.values&&(o.type=_=h),b=b[_]||o.operators[_],!g.operator)for(v in b){o.operator=v;break}s._parse=function(e){return null!=e?e+"":e},s.model&&s.model.fields&&(C=s.model.fields[o.field],C&&C.parse&&(s._parse=m(C.parse,C))),s.defaultOperator=o.operator,s.viewModel=f=a.observable({operator:o.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(d,m(s.updateDsFilter,s)),_==p&&s.initSuggestDataSource(o),null!==o.inputWidth&&(w.addClass("k-sized-input"),w.width(o.inputWidth)),w.attr("aria-label",s._getColumnTitle()),w.attr("title",s._getColumnTitle()),s._setInputType(o,_),_!=u&&o.showOperators!==!1?s._createOperatorDropDown(b):(e('
              ').css("display","none").text("eq").appendTo(r),r.addClass("k-operator-hidden")),s._createClearIcon(),a.bind(this.wrapper,f),_==p&&(o.template||s.setAutoCompleteSource()),_==h&&s.setComboBoxSource(s.options.values),s._refreshUI(),s._refreshHandler=m(s._refreshUI,s),s.dataSource.bind(d,s._refreshHandler)},_setInputType:function(t,n){var i,o,r,s,l,c=this,d=c.input;"function"==typeof t.template?(t.template.call(c.viewModel,{element:c.input,dataSource:c.suggestDataSource}),c._angularItems("compile")):n==p?d.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?d.attr(a.attr("role"),"datepicker"):n==u?(d.remove(),i=e(""),o=c.wrapper,r=a.guid(),s=e("