Files
Giacomo c807c474c4 Init
- aggiunto un po di tutto comeil progetto del prof
2018-09-14 19:38:02 +02:00

102 lines
2.3 MiB
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Kendo UI v2018.1.117 (http://www.telerik.com/kendo-ui)
* Copyright 2018 Telerik AD. All rights reserved.
*
* Kendo UI commercial licenses may be obtained at
* http://www.telerik.com/purchase/license-agreement/kendo-ui-complete
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
!function(e,define){define("kendo.core.min",["jquery"],e)}(function(){return function(e,t,n){function i(){}function r(e,t){if(t)return"'"+e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t")+"'";var n=e.charAt(0),i=e.substring(1);return"="===n?"+("+i+")+":":"===n?"+$kendoHtmlEncode("+i+")+":";"+e+";$kendoOutput+="}function o(e,t,n){return e+="",t=t||2,n=t-e.length,n?W[t].substring(0,n)+e:e}function a(e){var t=e.css(ve.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t?t.match(Fe)||[0,0,0,0,0]:[0,0,0,0,0],i=xe.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}}function s(t,n){var i,r,o,a,s,l,d,u=Te.browser,c=ve._outerWidth,h=ve._outerHeight;return t.parent().hasClass("k-animation-container")?(l=t.parent(".k-animation-container"),d=l[0].style,l.is(":hidden")&&l.css({display:"",position:""}),i=Se.test(d.width)||Se.test(d.height),i||l.css({width:n?c(t)+1:c(t),height:h(t),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})):(r=t[0].style.width,o=t[0].style.height,a=Se.test(r),s=Se.test(o),i=a||s,!a&&(!n||n&&r)&&(r=n?c(t)+1:c(t)),!s&&(!n||n&&o)&&(o=h(t)),t.wrap(e("<div/>").addClass("k-animation-container").css({width:r,height:o})),i&&t.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})),u.msie&&xe.floor(u.version)<=7&&(t.css({zoom:1}),t.children(".k-menu").width(t.width())),t.parent()}function l(e){var t=1,n=arguments.length;for(t=1;t<n;t++)d(e,arguments[t]);return e}function d(e,t){var n,i,r,o,a,s=ve.data.ObservableArray,l=ve.data.LazyObservableArray,u=ve.data.DataSource,c=ve.data.HierarchicalDataSource;for(n in t)i=t[n],r=typeof i,o=r===Me&&null!==i?i.constructor:null,o&&o!==Array&&o!==s&&o!==l&&o!==u&&o!==c&&o!==RegExp?i instanceof Date?e[n]=new Date(i.getTime()):R(i.clone)?e[n]=i.clone():(a=e[n],e[n]=typeof a===Me?a||{}:{},d(e[n],i)):r!==Ne&&(e[n]=i);return e}function u(e,t,i){for(var r in t)if(t.hasOwnProperty(r)&&t[r].test(e))return r;return i!==n?i:e}function c(e){return e.replace(/([a-z][A-Z])/g,function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()})}function h(e){return e.replace(/\-(\w)/g,function(e,t){return t.toUpperCase()})}function p(t,n){var i,r={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(t,""),n&&e.each(n,function(e,t){r[t]=i.getPropertyValue(t)})):(i=t.currentStyle,n&&e.each(n,function(e,t){r[t]=i[h(t)]})),ve.size(r)||(r=i),r}function f(e){if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=p(e,["overflow"]).overflow;return"auto"==t||"scroll"==t}function m(t,i){var r,o=Te.browser.webkit,a=Te.browser.mozilla,s=t instanceof e?t[0]:t;if(t)return r=Te.isRtl(t),i===n?r&&o?s.scrollWidth-s.clientWidth-s.scrollLeft:Math.abs(s.scrollLeft):(s.scrollLeft=r&&o?s.scrollWidth-s.clientWidth-i:r&&a?-i:i,n)}function g(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n}function v(e,n,i){var r,o,a;return n||(n="offset"),r=e[n](),o={top:r.top,right:r.right,bottom:r.bottom,left:r.left},Te.browser.msie&&(Te.pointers||Te.msPointers)&&!i&&(a=Te.isRtl(e)?1:-1,o.top-=t.pageYOffset-document.documentElement.scrollTop,o.left-=t.pageXOffset+a*document.documentElement.scrollLeft),o}function _(e){var t={};return be("string"==typeof e?e.split(" "):e,function(e){t[e]=this}),t}function b(e){return new ve.effects.Element(e)}function k(e,t,n,i){return typeof e===Ie&&(R(t)&&(i=t,t=400,n=!1),R(n)&&(i=n,n=!1),typeof t===He&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),_e({effects:{},duration:400,reverse:!1,init:ye,teardown:ye,hide:!1},e,{completeCallback:e.complete,complete:ye})}function w(t,n,i,r,o){for(var a,s=0,l=t.length;s<l;s++)a=e(t[s]),a.queue(function(){q.promise(a,k(n,i,r,o))});return t}function y(e,t,n,i){return t&&(t=t.split(" "),be(t,function(t,n){e.toggleClass(n,i)})),e}function x(e){return(""+e).replace(j,"&amp;").replace(G,"&lt;").replace(Y,"&gt;").replace($,"&quot;").replace(K,"&#39;")}function C(e,t){var i;return 0===t.indexOf("data")&&(t=t.substring(4),t=t.charAt(0).toLowerCase()+t.substring(1)),t=t.replace(re,"-$1"),i=e.getAttribute("data-"+ve.ns+t),null===i?i=n:"null"===i?i=null:"true"===i?i=!0:"false"===i?i=!1:Ee.test(i)?i=parseFloat(i):ne.test(i)&&!ie.test(i)&&(i=Function("return ("+i+")")()),i}function T(t,i){var r,o,a={};for(r in i)o=C(t,r),o!==n&&(te.test(r)&&(o="string"==typeof o?ve.template(e("#"+o).html()):t.getAttribute(r)),a[r]=o);return a}function S(t,n){return e.contains(t,n)?-1:1}function D(){var t=e(this);return e.inArray(t.attr("data-"+ve.ns+"role"),["slider","rangeslider"])>-1||t.is(":visible")}function F(e,t){var n=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(n)?!e.disabled:"a"===n?e.href||t:t)&&E(e)}function E(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}function A(e,t){return new A.fn.init(e,t)}var I,R,M,z,H,N,B,P,L,O,V,W,U,q,j,G,$,K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de,ue,ce,he,pe,fe,me,ge,ve=t.kendo=t.kendo||{cultures:{}},_e=e.extend,be=e.each,ke=e.isArray,we=e.proxy,ye=e.noop,xe=Math,Ce=t.JSON||{},Te={},Se=/%/,De=/\{(\d+)(:[^\}]+)?\}/g,Fe=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,Ee=/^(\+|-?)\d+(\.?)\d*$/,Ae="function",Ie="string",Re="number",Me="object",ze="null",He="boolean",Ne="undefined",Be={},Pe={},Le=[].slice;ve.version="2018.1.117".replace(/^\s+|\s+$/g,""),i.extend=function(e){var t,n,i=function(){},r=this,o=e&&e.init?e.init:function(){r.apply(this,arguments)};i.prototype=r.prototype,n=o.fn=o.prototype=new i;for(t in e)n[t]=null!=e[t]&&e[t].constructor===Object?_e(!0,{},i.prototype[t],e[t]):e[t];return n.constructor=o,o.extend=r.extend,o},i.prototype._initOptions=function(e){this.options=l({},this.options,e)},R=ve.isFunction=function(e){return"function"==typeof e},M=function(){this._defaultPrevented=!0},z=function(){return this._defaultPrevented===!0},H=i.extend({init:function(){this._events={}},bind:function(e,t,i){var r,o,a,s,l,d=this,u=typeof e===Ie?[e]:e,c=typeof t===Ae;if(t===n){for(r in e)d.bind(r,e[r]);return d}for(r=0,o=u.length;r<o;r++)e=u[r],s=c?t:t[e],s&&(i&&(a=s,s=function(){d.unbind(e,s),a.apply(d,arguments)},s.original=a),l=d._events[e]=d._events[e]||[],l.push(s));return d},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,r,o,a=this,s=typeof e===Ie?[e]:e,l=typeof t===Ae;for(n=0,i=s.length;n<i;n++)e=s[n],r=l?t:t[e],r&&(o=a._events[e]=a._events[e]||[],o.unshift(r));return a},trigger:function(e,t){var n,i,r=this,o=r._events[e];if(o){for(t=t||{},t.sender=r,t._defaultPrevented=!1,t.preventDefault=M,t.isDefaultPrevented=z,o=o.slice(),n=0,i=o.length;n<i;n++)o[n].call(r,t);return t._defaultPrevented===!0}return!1},unbind:function(e,t){var i,r=this,o=r._events[e];if(e===n)r._events={};else if(o)if(t)for(i=o.length-1;i>=0;i--)o[i]!==t&&o[i].original!==t||o.splice(i,1);else r._events[e]=[];return r}}),N=/^\w+/,B=/\$\{([^}]*)\}/g,P=/\\\}/g,L=/__CURLY__/g,O=/\\#/g,V=/__SHARP__/g,W=["","0","00","000","0000"],I={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,r="";for(n=0,i=t.length;n<i;n++)r+=e(t[n]);return r},compile:function(e,t){var n,i,o,a=_e({},this,t),s=a.paramName,l=s.match(N)[0],d=a.useWithBlock,u="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(R(e))return e;for(u+=d?"with("+s+"){":"",u+="$kendoOutput=",i=e.replace(P,"__CURLY__").replace(B,"#=$kendoHtmlEncode($1)#").replace(L,"}").replace(O,"__SHARP__").split("#"),o=0;o<i.length;o++)u+=r(i[o],o%2===0);u+=d?";}":";",u+="return $kendoOutput;",u=u.replace(V,"#");try{return n=Function(l,u),n._slotCount=Math.floor(i.length/2),n}catch(c){throw Error(ve.format("Invalid template:'{0}' Generated code:'{1}'",e,u))}}},function(){function e(e){return a.lastIndex=0,a.test(e)?'"'+e.replace(a,function(e){var t=s[e];return typeof t===Ie?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function t(o,a){var s,d,u,c,h,p,f=n,m=a[o];if(m&&typeof m===Me&&typeof m.toJSON===Ae&&(m=m.toJSON(o)),typeof r===Ae&&(m=r.call(a,o,m)),p=typeof m,p===Ie)return e(m);if(p===Re)return isFinite(m)?m+"":ze;if(p===He||p===ze)return m+"";if(p===Me){if(!m)return ze;if(n+=i,h=[],"[object Array]"===l.apply(m)){for(c=m.length,s=0;s<c;s++)h[s]=t(s,m)||ze;return u=0===h.length?"[]":n?"[\n"+n+h.join(",\n"+n)+"\n"+f+"]":"["+h.join(",")+"]",n=f,u}if(r&&typeof r===Me)for(c=r.length,s=0;s<c;s++)typeof r[s]===Ie&&(d=r[s],u=t(d,m),u&&h.push(e(d)+(n?": ":":")+u));else for(d in m)Object.hasOwnProperty.call(m,d)&&(u=t(d,m),u&&h.push(e(d)+(n?": ":":")+u));return u=0===h.length?"{}":n?"{\n"+n+h.join(",\n"+n)+"\n"+f+"}":"{"+h.join(",")+"}",n=f,u}}var n,i,r,a=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},l={}.toString;typeof Date.prototype.toJSON!==Ae&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?o(e.getUTCFullYear(),4)+"-"+o(e.getUTCMonth()+1)+"-"+o(e.getUTCDate())+"T"+o(e.getUTCHours())+":"+o(e.getUTCMinutes())+":"+o(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof Ce.stringify!==Ae&&(Ce.stringify=function(e,o,a){var s;if(n="",i="",typeof a===Re)for(s=0;s<a;s+=1)i+=" ";else typeof a===Ie&&(i=a);if(r=o,o&&typeof o!==Ae&&(typeof o!==Me||typeof o.length!==Re))throw Error("JSON.stringify");return t("",{"":e})})}(),function(){function t(e){if(e){if(e.numberFormat)return e;if(typeof e===Ie){var t=ve.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function i(e){return e&&(e=t(e)),e||ve.cultures.current}function r(e,t,r){r=i(r);var a=r.calendars.standard,s=a.days,l=a.months;return t=a.patterns[t]||t,t.replace(u,function(t){var i,r,d;return"d"===t?r=e.getDate():"dd"===t?r=o(e.getDate()):"ddd"===t?r=s.namesAbbr[e.getDay()]:"dddd"===t?r=s.names[e.getDay()]:"M"===t?r=e.getMonth()+1:"MM"===t?r=o(e.getMonth()+1):"MMM"===t?r=l.namesAbbr[e.getMonth()]:"MMMM"===t?r=l.names[e.getMonth()]:"yy"===t?r=o(e.getFullYear()%100):"yyyy"===t?r=o(e.getFullYear(),4):"h"===t?r=e.getHours()%12||12:"hh"===t?r=o(e.getHours()%12||12):"H"===t?r=e.getHours():"HH"===t?r=o(e.getHours()):"m"===t?r=e.getMinutes():"mm"===t?r=o(e.getMinutes()):"s"===t?r=e.getSeconds():"ss"===t?r=o(e.getSeconds()):"f"===t?r=xe.floor(e.getMilliseconds()/100):"ff"===t?(r=e.getMilliseconds(),r>99&&(r=xe.floor(r/10)),r=o(r)):"fff"===t?r=o(e.getMilliseconds(),3):"tt"===t?r=e.getHours()<12?a.AM[0]:a.PM[0]:"zzz"===t?(i=e.getTimezoneOffset(),d=i<0,r=(""+xe.abs(i/60)).split(".")[0],i=xe.abs(i)-60*r,r=(d?"+":"-")+o(r),r+=":"+o(i)):"zz"!==t&&"z"!==t||(r=e.getTimezoneOffset()/60,d=r<0,r=(""+xe.abs(r)).split(".")[0],r=(d?"+":"-")+("zz"===t?o(r):r)),r!==n?r:t.slice(1,t.length-1)})}function a(e,t,r){r=i(r);var o,a,d,u,k,w,y,x,C,T,S,D,F,E,A,I,R,M,z,H,N,B,P,L=r.numberFormat,O=L[m],V=L.decimals,W=L.pattern[0],U=[],q=e<0,j=f,G=f,$=-1;if(e===n)return f;if(!isFinite(e))return e;if(!t)return r.name.length?e.toLocaleString():""+e;if(k=c.exec(t)){if(t=k[1].toLowerCase(),a="c"===t,d="p"===t,(a||d)&&(L=a?L.currency:L.percent,O=L[m],V=L.decimals,o=L.symbol,W=L.pattern[q?0:1]),u=k[2],u&&(V=+u),"e"===t)return u?e.toExponential(V):e.toExponential();if(d&&(e*=100),e=l(e,V),q=e<0,e=e.split(m),w=e[0],y=e[1],q&&(w=w.substring(1)),G=s(w,0,w.length,L),y&&(G+=O+y),"n"===t&&!q)return G;for(e=f,T=0,S=W.length;T<S;T++)D=W.charAt(T),e+="n"===D?G:"$"===D||"%"===D?o:D;return e}if(q&&(e=-e),(t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(h,function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return U.push(n),b})),t=t.split(";"),q&&t[1])t=t[1],E=!0;else if(0===e){if(t=t[2]||t[0],t.indexOf(v)==-1&&t.indexOf(_)==-1)return t}else t=t[0];if(H=t.indexOf("%"),N=t.indexOf("$"),d=H!=-1,a=N!=-1,d&&(e*=100),a&&"\\"===t[N-1]&&(t=t.split("\\").join(""),a=!1),(a||d)&&(L=a?L.currency:L.percent,O=L[m],V=L.decimals,o=L.symbol),F=t.indexOf(g)>-1,F&&(t=t.replace(p,f)),A=t.indexOf(m),S=t.length,A!=-1?(y=(""+e).split("e"),y=y[1]?l(e,Math.abs(y[1])):y[0],y=y.split(m)[1]||f,R=t.lastIndexOf(_)-A,I=t.lastIndexOf(v)-A,M=R>-1,z=I>-1,T=y.length,M||z||(t=t.substring(0,A)+t.substring(A+1),S=t.length,A=-1,T=0),M&&R>I?T=R:I>R&&(z&&T>I?T=I:M&&T<R&&(T=R)),T>-1&&(e=l(e,T))):e=l(e),I=t.indexOf(v),B=R=t.indexOf(_),$=I==-1&&R!=-1?R:I!=-1&&R==-1?I:I>R?R:I,I=t.lastIndexOf(v),R=t.lastIndexOf(_),P=I==-1&&R!=-1?R:I!=-1&&R==-1?I:I>R?I:R,$==S&&(P=$),$!=-1){for(G=(""+e).split(m),w=G[0],y=G[1]||f,x=w.length,C=y.length,q&&e*-1>=0&&(q=!1),e=t.substring(0,$),q&&!E&&(e+="-"),T=$;T<S;T++){if(D=t.charAt(T),A==-1){if(P-T<x){e+=w;break}}else if(R!=-1&&R<T&&(j=f),A-T<=x&&A-T>-1&&(e+=w,T=A),A===T){e+=(y?O:f)+y,T+=P-A+1;continue}D===_?(e+=D,j=D):D===v&&(e+=j)}if(F&&(e=s(e,$+(q&&!E?1:0),Math.max(P,x+$),L)),P>=$&&(e+=t.substring(P+1)),a||d){for(G=f,T=0,S=e.length;T<S;T++)D=e.charAt(T),G+="$"===D||"%"===D?o:D;e=G}if(S=U.length)for(T=0;T<S;T++)e=e.replace(b,U[T])}return e}var s,l,d,u=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,c=/^(n|c|p|e)(\d*)$/i,h=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,p=/\,/g,f="",m=".",g=",",v="#",_="0",b="??",k="en-US",w={}.toString;ve.cultures["en-US"]={name:k,numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSize:[3],percent:{pattern:["-n %","n %"],decimals:2,",":",",".":".",groupSize:[3],symbol:"%"},currency:{name:"US Dollar",abbr:"USD",pattern:["($n)","$n"],decimals:2,",":",",".":".",groupSize:[3],symbol:"$"}},calendars:{standard:{days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December"],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]},AM:["AM","am","AM"],PM:["PM","pm","PM"],patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",F:"dddd, MMMM dd, yyyy h:mm:ss tt",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt",m:"MMMM dd",M:"MMMM dd",s:"yyyy'-'MM'-'ddTHH':'mm':'ss",t:"h:mm tt",T:"h:mm:ss tt",u:"yyyy'-'MM'-'dd HH':'mm':'ss'Z'",y:"MMMM, yyyy",Y:"MMMM, yyyy"},"/":"/",":":":",firstDay:0,twoDigitYearMax:2029}}},ve.culture=function(e){var i,r=ve.cultures;return e===n?r.current:(i=t(e)||r[k],i.calendar=i.calendars.standard,r.current=i,n)},ve.findCulture=t,ve.getCulture=i,ve.culture(k),s=function(e,t,i,r){var o,a,s,l,d,u,c=e.indexOf(r[m]),h=r.groupSize.slice(),p=h.shift();if(i=c!==-1?c:i+1,o=e.substring(t,i),a=o.length,a>=p){for(s=a,l=[];s>-1;)if(d=o.substring(s-p,s),d&&l.push(d),s-=p,u=h.shift(),p=u!==n?u:p,0===p){s>0&&l.push(o.substring(0,s));break}o=l.reverse().join(r[g]),e=e.substring(0,t)+o+e.substring(i)}return e},l=function(e,t){return t=t||0,e=(""+e).split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),e=(""+e).split("e"),e=+(e[0]+"e"+(e[1]?+e[1]-t:-t)),e.toFixed(Math.min(t,20))},d=function(e,t,i){if(t){if("[object Date]"===w.call(e))return r(e,t,i);if(typeof e===Re)return a(e,t,i)}return e!==n?e:""},ve.format=function(e){var t=arguments;return e.replace(De,function(e,n,i){var r=t[parseInt(n,10)+1];return d(r,i?i.substring(1):"")})},ve._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},ve._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},ve._round=l,ve._outerWidth=function(t,n){return e(t).outerWidth(n||!1)||0},ve._outerHeight=function(t,n){return e(t).outerHeight(n||!1)||0},ve.toString=d}(),function(){function t(e,t,n){return!(e>=t&&e<=n)}function i(e){return e.charAt(0)}function r(t){return e.map(t,i)}function o(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}function a(e){for(var t=0,n=e.length,i=[];t<n;t++)i[t]=(e[t]+"").toLowerCase();return i}function s(e){var t,n={};for(t in e)n[t]=a(e[t]);return n}function l(e,i,a,l){if(!e)return null;var d,u,c,h,p,g,v,_,b,w,y,x,C,T=function(e){for(var t=0;i[B]===e;)t++,B++;return t>0&&(B-=1),t},S=function(t){var n=k[t]||RegExp("^\\d{1,"+t+"}"),i=e.substr(P,t).match(n);return i?(i=i[0],P+=i.length,parseInt(i,10)):null},D=function(t,n){for(var i,r,o,a=0,s=t.length,l=0,d=0;a<s;a++)i=t[a],r=i.length,o=e.substr(P,r),n&&(o=o.toLowerCase()),o==i&&r>l&&(l=r,d=a);return l?(P+=l,d+1):null},F=function(){var t=!1;return e.charAt(P)===i[B]&&(P++,t=!0),t},E=a.calendars.standard,A=null,I=null,R=null,M=null,z=null,H=null,N=null,B=0,P=0,L=!1,O=new Date,V=E.twoDigitYearMax||2029,W=O.getFullYear();for(i||(i="d"),h=E.patterns[i],h&&(i=h),i=i.split(""),c=i.length;B<c;B++)if(d=i[B],L)"'"===d?L=!1:F();else if("d"===d){if(u=T("d"),E._lowerDays||(E._lowerDays=s(E.days)),null!==R&&u>2)continue;if(R=u<3?S(2):D(E._lowerDays[3==u?"namesAbbr":"names"],!0),null===R||t(R,1,31))return null}else if("M"===d){if(u=T("M"),E._lowerMonths||(E._lowerMonths=s(E.months)),I=u<3?S(2):D(E._lowerMonths[3==u?"namesAbbr":"names"],!0),null===I||t(I,1,12))return null;I-=1}else if("y"===d){if(u=T("y"),A=S(u),null===A)return null;2==u&&("string"==typeof V&&(V=W+parseInt(V,10)),A=W-W%100+A,A>V&&(A-=100))}else if("h"===d){if(T("h"),M=S(2),12==M&&(M=0),null===M||t(M,0,11))return null}else if("H"===d){if(T("H"),M=S(2),null===M||t(M,0,23))return null}else if("m"===d){if(T("m"),z=S(2),null===z||t(z,0,59))return null}else if("s"===d){if(T("s"),H=S(2),null===H||t(H,0,59))return null}else if("f"===d){if(u=T("f"),C=e.substr(P,u).match(k[3]),N=S(u),null!==N&&(N=parseFloat("0."+C[0],10),N=ve._round(N,3),N*=1e3),null===N||t(N,0,999))return null}else if("t"===d){if(u=T("t"),_=E.AM,b=E.PM,1===u&&(_=r(_),b=r(b)),p=D(b),!p&&!D(_))return null}else if("z"===d){if(g=!0,u=T("z"),"Z"===e.substr(P,1)){F();continue}if(v=e.substr(P,6).match(u>2?m:f),!v)return null;if(v=v[0].split(":"),w=v[0],y=v[1],!y&&w.length>3&&(P=w.length-2,y=w.substring(P),w=w.substring(0,P)),w=parseInt(w,10),t(w,-12,13))return null;if(u>2&&(y=parseInt(y,10),isNaN(y)||t(y,0,59)))return null}else if("'"===d)L=!0,F();else if(!F())return null;return l&&!/^\s*$/.test(e.substr(P))?null:(x=null!==M||null!==z||H||null,null===A&&null===I&&null===R&&x?(A=W,I=O.getMonth(),R=O.getDate()):(null===A&&(A=W),null===R&&(R=1)),p&&M<12&&(M+=12),g?(w&&(M+=-w),y&&(z+=-y),e=new Date(Date.UTC(A,I,R,M,z,H,N))):(e=new Date(A,I,R,M,z,H,N),o(e,M)),A<100&&e.setFullYear(A),e.getDate()!==R&&g===n?null:e)}function d(e){var t="-"===e.substr(0,1)?-1:1;return e=e.substring(1),e=60*parseInt(e.substr(0,2),10)+parseInt(e.substring(2),10),t*e}function u(e){var t,n,i,r=xe.max(_.length,b.length),o=e.calendar.patterns,a=[];for(i=0;i<r;i++){for(t=_[i],n=0;n<t.length;n++)a.push(o[t[n]]);a=a.concat(b[i])}return a}function c(e,t,n,i){var r,o,a,s;if("[object Date]"===w.call(e))return e;if(r=0,o=null,e&&0===e.indexOf("/D")&&(o=g.exec(e)))return o=o[1],s=v.exec(o.substring(1)),o=new Date(parseInt(o,10)),s&&(s=d(s[0]),o=ve.timezone.apply(o,0),o=ve.timezone.convert(o,0,-1*s)),o;for(n=ve.getCulture(n),t||(t=u(n)),t=ke(t)?t:[t],a=t.length;r<a;r++)if(o=l(e,t[r],n,i))return o;return o}var h=/\u00A0/g,p=/[eE][\-+]?[0-9]+/,f=/[+|\-]\d{1,2}/,m=/[+|\-]\d{1,2}:?\d{2}/,g=/^\/Date\((.*?)\)\/$/,v=/[+-]\d*/,_=[[],["G","g","F"],["D","d","y","m","T","t"]],b=[["yyyy-MM-ddTHH:mm:ss.fffffffzzz","yyyy-MM-ddTHH:mm:ss.fffffff","yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:ss.fff","ddd MMM dd yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mmzzz","yyyy-MM-ddTHH:mmzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ss","yyyy/MM/dd HH:mm:ss"],["yyyy-MM-ddTHH:mm","yyyy-MM-dd HH:mm","yyyy/MM/dd HH:mm"],["yyyy/MM/dd","yyyy-MM-dd","HH:mm:ss","HH:mm"]],k={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},w={}.toString;ve.parseDate=function(e,t,n){return c(e,t,n,!1)},ve.parseExactDate=function(e,t,n){return c(e,t,n,!0)},ve.parseInt=function(e,t){var n=ve.parseFloat(e,t);return n&&(n=0|n),n},ve.parseFloat=function(e,t,n){if(!e&&0!==e)return null;if(typeof e===Re)return e;e=""+e,t=ve.getCulture(t);var i,r,o=t.numberFormat,a=o.percent,s=o.currency,l=s.symbol,d=a.symbol,u=e.indexOf("-");return p.test(e)?(e=parseFloat(e.replace(o["."],".")),isNaN(e)&&(e=null),e):u>0?null:(u=u>-1,e.indexOf(l)>-1||n&&n.toLowerCase().indexOf("c")>-1?(o=s,i=o.pattern[0].replace("$",l).split("n"),e.indexOf(i[0])>-1&&e.indexOf(i[1])>-1&&(e=e.replace(i[0],"").replace(i[1],""),u=!0)):e.indexOf(d)>-1&&(r=!0,o=a,l=d),e=e.replace("-","").replace(l,"").replace(h," ").split(o[","].replace(h," ")).join("").replace(o["."],"."),e=parseFloat(e),isNaN(e)?e=null:u&&(e*=-1),e&&r&&(e/=100),e)}}(),function(){var i,r,o,a,s,l,d,c,h;Te._scrollbar=n,Te.scrollbar=function(e){if(isNaN(Te._scrollbar)||e){var t,n=document.createElement("div");return n.style.cssText="overflow:scroll;overflow-x:hidden;zoom:1;clear:both;display:block",n.innerHTML="&nbsp;",document.body.appendChild(n),Te._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return Te._scrollbar},Te.isRtl=function(t){return e(t).closest(".k-rtl").length>0},i=document.createElement("table");try{i.innerHTML="<tr><td></td></tr>",Te.tbodyInnerHtml=!0}catch(p){Te.tbodyInnerHtml=!1}Te.touch="ontouchstart"in t,r=document.documentElement.style,o=Te.transitions=!1,a=Te.transforms=!1,s="HTMLElement"in t?HTMLElement.prototype:[],Te.hasHW3D="WebKitCSSMatrix"in t&&"m11"in new t.WebKitCSSMatrix||"MozPerspective"in r||"msPerspective"in r,Te.cssFlexbox="flexWrap"in r||"WebkitFlexWrap"in r||"msFlexWrap"in r,be(["Moz","webkit","O","ms"],function(){var e,t=""+this,n=typeof i.style[t+"Transition"]===Ie;if(n||typeof i.style[t+"Transform"]===Ie)return e=t.toLowerCase(),a={css:"ms"!=e?"-"+e+"-":"",prefix:t,event:"o"===e||"webkit"===e?e:""},n&&(o=a,o.event=o.event?o.event+"TransitionEnd":"transitionend"),!1}),i=null,Te.transforms=a,Te.transitions=o,Te.devicePixelRatio=t.devicePixelRatio===n?1:t.devicePixelRatio;try{Te.screenWidth=t.outerWidth||t.screen?t.screen.availWidth:t.innerWidth,Te.screenHeight=t.outerHeight||t.screen?t.screen.availHeight:t.innerHeight}catch(p){Te.screenWidth=t.screen.availWidth,Te.screenHeight=t.screen.availHeight}Te.detectOS=function(e){var n,i,r=!1,o=[],a=!/mobile safari/i.test(e),s={wp:/(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/,fire:/(Silk)\/(\d+)\.(\d+(\.\d+)?)/,android:/(Android|Android.*(?:Opera|Firefox).*?\/)\s*(\d+)\.(\d+(\.\d+)?)/,iphone:/(iPhone|iPod).*OS\s+(\d+)[\._]([\d\._]+)/,ipad:/(iPad).*OS\s+(\d+)[\._]([\d_]+)/,meego:/(MeeGo).+NokiaBrowser\/(\d+)\.([\d\._]+)/,webos:/(webOS)\/(\d+)\.(\d+(\.\d+)?)/,blackberry:/(BlackBerry|BB10).*?Version\/(\d+)\.(\d+(\.\d+)?)/,playbook:/(PlayBook).*?Tablet\s*OS\s*(\d+)\.(\d+(\.\d+)?)/,windows:/(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/,tizen:/(tizen).*?Version\/(\d+)\.(\d+(\.\d+)?)/i,sailfish:/(sailfish).*rv:(\d+)\.(\d+(\.\d+)?).*firefox/i,ffos:/(Mobile).*rv:(\d+)\.(\d+(\.\d+)?).*Firefox/},l={ios:/^i(phone|pad|pod)$/i,android:/^android|fire$/i,blackberry:/^blackberry|playbook/i,windows:/windows/,wp:/wp/,flat:/sailfish|ffos|tizen/i,meego:/meego/},d={tablet:/playbook|ipad|fire/i},c={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(i in s)if(s.hasOwnProperty(i)&&(o=e.match(s[i]))){if("windows"==i&&"plugins"in navigator)return!1;r={},r.device=i,r.tablet=u(i,d,!1),r.browser=u(e,c,"default"),r.name=u(i,l),r[r.name]=!0,r.majorVersion=o[2],r.minorVersion=o[3].replace("_","."),n=r.minorVersion.replace(".","").substr(0,2),r.flatVersion=r.majorVersion+n+Array(3-(n.length<3?n.length:2)).join("0"),r.cordova=typeof t.PhoneGap!==Ne||typeof t.cordova!==Ne,r.appMode=t.navigator.standalone||/file|local|wmapp/.test(t.location.protocol)||r.cordova,r.android&&(Te.devicePixelRatio<1.5&&r.flatVersion<400||a)&&(Te.screenWidth>800||Te.screenHeight>800)&&(r.tablet=i);break}return r},l=Te.mobileOS=Te.detectOS(navigator.userAgent),Te.wpDevicePixelRatio=l.wp?screen.width/320:0,Te.hasNativeScrolling=!1,(l.ios||l.android&&l.majorVersion>2||l.wp)&&(Te.hasNativeScrolling=l),Te.delayedClick=function(){if(Te.touch){if(l.ios)return!0;if(l.android)return!Te.browser.chrome||!(Te.browser.version<32)&&!(e("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},Te.mouseAndTouchPresent=Te.touch&&!(Te.mobileOS.ios||Te.mobileOS.android),Te.detectBrowser=function(e){var t,n=!1,i=[],r={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(t in r)if(r.hasOwnProperty(t)&&(i=e.match(r[t]))){n={},n[t]=!0,n[i[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,n.version=parseInt(document.documentMode||i[2],10);break}return n},Te.browser=Te.detectBrowser(navigator.userAgent),Te.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return Te.browser.chrome&&(e.paste=!1,Te.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},Te.clipboard=Te.detectClipboardAccess(),Te.zoomLevel=function(){var e,n,i;try{return e=Te.browser,n=0,i=document.documentElement,e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!Te.touch&&(n=Te.scrollbar()),Te.touch?i.clientWidth/t.innerWidth:e.msie&&e.version>=10?((top||t).document.documentElement.offsetWidth+n)/(top||t).innerWidth:1}catch(r){return 1}},Te.cssBorderSpacing=n!==r.borderSpacing&&!(Te.browser.msie&&Te.browser.version<8),function(t){var n="",i=e(document.documentElement),r=parseInt(t.version,10);t.msie?n="ie":t.mozilla?n="ff":t.safari?n="safari":t.webkit?n="webkit":t.opera?n="opera":t.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+r),Te.mobileOS&&(n+=" k-mobile"),Te.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(Te.browser),Te.eventCapture=document.documentElement.addEventListener,d=document.createElement("input"),Te.placeholder="placeholder"in d,Te.propertyChangeEvent="onpropertychange"in d,Te.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",r={},o=0;o<n;o++)e=t[o],d.setAttribute("type",e),d.value=i,r[e.replace("-","")]="text"!==d.type&&d.value!==i;return r}(),d.style.cssText="float:left;",Te.cssFloat=!!d.style.cssFloat,d=null,Te.stableSort=function(){var e,t=513,n=[{index:0,field:"b"}];for(e=1;e<t;e++)n.push({index:e,field:"a"});return n.sort(function(e,t){return e.field>t.field?1:e.field<t.field?-1:0}),1===n[0].index}(),Te.matchesSelector=s.webkitMatchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.matchesSelector||s.matches||function(t){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(t)||[]:e(t),i=n.length;i--;)if(n[i]==this)return!0;return!1},Te.pushState=t.history&&t.history.pushState,c=document.documentMode,Te.hashChange="onhashchange"in t&&!(Te.browser.msie&&(!c||c<=8)),Te.customElements="registerElement"in t.document,h=Te.browser.chrome,Te.msPointers=!h&&t.MSPointerEvent,Te.pointers=!h&&t.PointerEvent,Te.kineticScrollNeeded=l&&(Te.touch||Te.msPointers||Te.pointers)}(),U={left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out"},out:{reverse:"in"}},q={},e.extend(q,{enabled:!0,Element:function(t){this.element=e(t)},promise:function(e,t){e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.hide&&e.data("olddisplay",e.css("display")).hide(),t.init&&t.init(),t.completeCallback&&t.completeCallback(e),e.dequeue()},disable:function(){this.enabled=!1,this.promise=this.promiseShim},enable:function(){this.enabled=!0,this.promise=this.animatedPromise}}),q.promiseShim=q.promise,"kendoAnimate"in e.fn||_e(e.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return w(this,e,t,n,i)},kendoAddClass:function(e,t){return ve.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return ve.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return ve.toggleClass(this,e,t,n)}}),j=/&/g,G=/</g,$=/"/g,K=/'/g,Y=/>/g,Q=function(e){return e.target},Te.touch&&(Q=function(e){var t="originalEvent"in e?e.originalEvent.changedTouches:"changedTouches"in e?e.changedTouches:null;return t?document.elementFromPoint(t[0].clientX,t[0].clientY):e.target},be(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],function(t,n){e.fn[n]=function(e){return this.bind(n,e)}})),Te.touch?Te.mobileOS?(Te.mousedown="touchstart",Te.mouseup="touchend",Te.mousemove="touchmove",Te.mousecancel="touchcancel",Te.click="touchend",Te.resize="orientationchange"):(Te.mousedown="mousedown touchstart",Te.mouseup="mouseup touchend",Te.mousemove="mousemove touchmove",Te.mousecancel="mouseleave touchcancel",Te.click="click",Te.resize="resize"):Te.pointers?(Te.mousemove="pointermove",Te.mousedown="pointerdown",Te.mouseup="pointerup",Te.mousecancel="pointercancel",Te.click="pointerup",Te.resize="orientationchange resize"):Te.msPointers?(Te.mousemove="MSPointerMove",Te.mousedown="MSPointerDown",Te.mouseup="MSPointerUp",Te.mousecancel="MSPointerCancel",Te.click="MSPointerUp",Te.resize="orientationchange resize"):(Te.mousemove="mousemove",Te.mousedown="mousedown",Te.mouseup="mouseup",Te.mousecancel="mouseleave",Te.click="click",Te.resize="resize"),X=function(e,t){var n,i,r,o,a=t||"d",s=1;for(i=0,r=e.length;i<r;i++)o=e[i],""!==o&&(n=o.indexOf("["),0!==n&&(n==-1?o="."+o:(s++,o="."+o.substring(0,n)+" || {})"+o.substring(n))),s++,a+=o+(i<r-1?" || {})":")"));return Array(s).join("(")+a},J=/^([a-z]+:)?\/\//i,_e(ve,{widgets:[],_widgetRegisteredCallbacks:[],ui:ve.ui||{},fx:ve.fx||b,effects:ve.effects||q,mobile:ve.mobile||{},data:ve.data||{},dataviz:ve.dataviz||{},drawing:ve.drawing||{},spreadsheet:{messages:{}},keys:{INSERT:45,DELETE:46,BACKSPACE:8,TAB:9,ENTER:13,ESC:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,END:35,HOME:36,SPACEBAR:32,PAGEUP:33,PAGEDOWN:34,F2:113,F10:121,F12:123,NUMPAD_PLUS:107,NUMPAD_MINUS:109,NUMPAD_DOT:110},support:ve.support||Te,animate:ve.animate||w,ns:"",attr:function(e){return"data-"+ve.ns+e},getShadows:a,wrap:s,deepExtend:l,getComputedStyles:p,webComponents:ve.webComponents||[],isScrollable:f,scrollLeft:m,size:g,toCamelCase:h,toHyphens:c,getOffset:ve.getOffset||v,parseEffects:ve.parseEffects||_,toggleClass:ve.toggleClass||y,directions:ve.directions||U,Observable:H,Class:i,Template:I,template:we(I.compile,I),render:we(I.render,I),stringify:we(Ce.stringify,Ce),eventTarget:Q,htmlEncode:x,isLocalUrl:function(e){return e&&!J.test(e)},expr:function(e,t,n){return e=e||"",typeof t==Ie&&(n=t,t=!1),n=n||"d",e&&"["!==e.charAt(0)&&(e="."+e),t?(e=e.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"'),e=e.replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'"),e=X(e.split("."),n),e=e.replace(/_\$DOT\$_/g,".")):e=n+e,e},getter:function(e,t){var n=e+t;return Be[n]=Be[n]||Function("d","return "+ve.expr(e,t))},setter:function(e){return Pe[e]=Pe[e]||Function("d,value",ve.expr(e)+"=value")},accessor:function(e){return{get:ve.getter(e),set:ve.setter(e)}},guid:function(){var e,t,n="";for(e=0;e<32;e++)t=16*xe.random()|0,8!=e&&12!=e&&16!=e&&20!=e||(n+="-"),n+=(12==e?4:16==e?3&t|8:t).toString(16);return n},roleSelector:function(e){return e.replace(/(\S+)/g,"["+ve.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(e){var t,n=e.split(" ");if(n)for(t=0;t<n.length;t++)"view"!=n[t]&&(n[t]=n[t].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return n.join(" ").replace(/(\S+)/g,"kendo-mobile-$1,").slice(0,-1)},triggeredByInput:function(e){return/^(label|input|textarea|select)$/i.test(e.target.tagName)},onWidgetRegistered:function(e){for(var t=0,n=ve.widgets.length;t<n;t++)e(ve.widgets[t]);ve._widgetRegisteredCallbacks.push(e);
},logToConsole:function(e,i){var r=t.console;!ve.suppressLog&&n!==r&&r.log&&r[i||"log"](e)}}),Z=H.extend({init:function(e,t){var n,i=this;i.element=ve.jQuery(e).handler(i),i.angular("init",t),H.fn.init.call(i),n=t?t.dataSource:null,n&&(t=_e({},t,{dataSource:{}})),t=i.options=_e(!0,{},i.options,t),n&&(t.dataSource=n),i.element.attr(ve.attr("role"))||i.element.attr(ve.attr("role"),(t.name||"").toLowerCase()),i.element.data("kendo"+t.prefix+t.name,i),i.bind(i.events,t)},events:[],options:{prefix:""},_hasBindingTarget:function(){return!!this.element[0].kendoBindingTarget},_tabindex:function(e){e=e||this.wrapper;var t=this.element,n="tabindex",i=e.attr(n)||t.attr(n);t.removeAttr(n),e.attr(n,isNaN(i)?0:i)},setOptions:function(t){this._setEvents(t),e.extend(this.options,t)},_setEvents:function(e){for(var t,n=this,i=0,r=n.events.length;i<r;i++)t=n.events[i],n.options[t]&&e[t]&&n.unbind(t,n.options[t]);n.bind(n.events,e)},resize:function(e){var t=this.getSize(),n=this._size;(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this._size=t,this._resize(t,e),this.trigger("resize",t))},getSize:function(){return ve.dimensions(this.element)},size:function(e){return e?(this.setSize(e),n):this.getSize()},setSize:e.noop,_resize:e.noop,destroy:function(){var e=this;e.element.removeData("kendo"+e.options.prefix+e.options.name),e.element.removeData("handler"),e.unbind()},_destroy:function(){this.destroy()},angular:function(){},_muteAngularRebind:function(e){this._muteRebind=!0,e.call(this),this._muteRebind=!1}}),ee=Z.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(t){var n=this;n.angular(t,function(){return{elements:n.items(),data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})}}),ve.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},ve.notify=ye,te=/template$/i,ne=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ie=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,re=/([A-Z])/g,ve.initWidget=function(i,r,o){var a,s,l,d,u,c,h,p,f,m,g,v,_;if(o?o.roles&&(o=o.roles):o=ve.ui.roles,i=i.nodeType?i:i[0],c=i.getAttribute("data-"+ve.ns+"role")){f=c.indexOf(".")===-1,l=f?o[c]:ve.getter(c)(t),g=e(i).data(),v=l?"kendo"+l.fn.options.prefix+l.fn.options.name:"",m=f?RegExp("^kendo.*"+c+"$","i"):RegExp("^"+v+"$","i");for(_ in g)if(_.match(m)){if(_!==v)return g[_];a=g[_]}if(l){for(p=C(i,"dataSource"),r=e.extend({},T(i,l.fn.options),r),p&&(r.dataSource=typeof p===Ie?ve.getter(p)(t):p),d=0,u=l.fn.events.length;d<u;d++)s=l.fn.events[d],h=C(i,s),h!==n&&(r[s]=ve.getter(h)(t));return a?e.isEmptyObject(r)||a.setOptions(r):a=new l(i,r),a}}},ve.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[ve.ui,ve.dataviz.ui]),t=0,n=e.length;t<n;t++)i[t]=e[t].roles;return _e.apply(null,[{}].concat(i.reverse()))},ve.init=function(t){var n=ve.rolesFromNamespaces(Le.call(arguments,1));e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){ve.initWidget(this,{},n)})},ve.destroy=function(t){e(t).find("[data-"+ve.ns+"role]").addBack().each(function(){var t,n=e(this).data();for(t in n)0===t.indexOf("kendo")&&typeof n[t].destroy===Ae&&n[t].destroy()})},ve.resize=function(t,n){var i,r=e(t).find("[data-"+ve.ns+"role]").addBack().filter(D);r.length&&(i=e.makeArray(r),i.sort(S),e.each(i,function(){var t=ve.widgetInstance(e(this));t&&t.resize(n)}))},ve.parseOptions=T,_e(ve.ui,{Widget:Z,DataBoundWidget:ee,roles:{},progress:function(t,n,i){var r,o,a,s,l,d=t.find(".k-loading-mask"),u=ve.support,c=u.browser;i=e.extend({},{width:"100%",height:"100%",top:t.scrollTop(),opacity:!1},i),l=i.opacity?"k-loading-mask k-opaque":"k-loading-mask",n?d.length||(r=u.isRtl(t),o=r?"right":"left",s=t.scrollLeft(),a=c.webkit&&r?t[0].scrollWidth-t.width()-2*s:0,d=e(ve.format("<div class='{0}'><span class='k-loading-text'>{1}</span><div class='k-loading-image'/><div class='k-loading-color'/></div>",l,ve.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(o,Math.abs(s)+a).prependTo(t)):d&&d.remove()},plugin:function(t,i,r){var o,a,s,l,d=t.fn.options.name;for(i=i||ve.ui,r=r||"",i[d]=t,i.roles[d.toLowerCase()]=t,o="getKendo"+r+d,d="kendo"+r+d,a={name:d,widget:t,prefix:r||""},ve.widgets.push(a),s=0,l=ve._widgetRegisteredCallbacks.length;s<l;s++)ve._widgetRegisteredCallbacks[s](a);e.fn[d]=function(i){var r,o=this;return typeof i===Ie?(r=Le.call(arguments,1),this.each(function(){var t,a,s=e.data(this,d);if(!s)throw Error(ve.format("Cannot call method '{0}' of {1} before it is initialized",i,d));if(t=s[i],typeof t!==Ae)throw Error(ve.format("Cannot find method '{0}' of {1}",i,d));if(a=t.apply(s,r),a!==n)return o=a,!1})):this.each(function(){return new t(this,i)}),o},e.fn[d].widget=t,e.fn[o]=function(){return this.data(d)}}}),ve.ui.progress.messages={loading:"Loading..."},oe={bind:function(){return this},nullObject:!0,options:{}},ae=Z.extend({init:function(e,t){Z.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){Z.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(ve.roleSelector("view splitview modalview drawer"));return ve.widgetInstance(e,ve.mobile.ui)||oe},viewHasNativeScrolling:function(){var e=this.view();return e&&e.options.useNativeScrolling},container:function(){var e=this.element.closest(ve.roleSelector("view layout modalview drawer splitview"));return ve.widgetInstance(e.eq(0),ve.mobile.ui)||oe}}),_e(ve.mobile,{init:function(e){ve.init(e,ve.mobile.ui,ve.ui,ve.dataviz.ui)},appLevelNativeScrolling:function(){return ve.mobile.application&&ve.mobile.application.options&&ve.mobile.application.options.useNativeScrolling},roles:{},ui:{Widget:ae,DataBoundWidget:ee.extend(ae.prototype),roles:{},plugin:function(e){ve.ui.plugin(e,ve.mobile.ui,"Mobile")}}}),l(ve.dataviz,{init:function(e){ve.init(e,ve.dataviz.ui)},ui:{roles:{},themes:{},views:[],plugin:function(e){ve.ui.plugin(e,ve.dataviz.ui)}},roles:{}}),ve.touchScroller=function(t,n){return n||(n={}),n.useNative=!0,e(t).map(function(t,i){return i=e(i),!(!Te.kineticScrollNeeded||!ve.mobile.ui.Scroller||i.data("kendoMobileScroller"))&&(i.kendoMobileScroller(n),i.data("kendoMobileScroller"))})[0]},ve.preventDefault=function(e){e.preventDefault()},ve.widgetInstance=function(e,n){var i,r,o,a,s=e.data(ve.ns+"role"),l=[];if(s){if("content"===s&&(s="scroller"),n)if(n[0])for(i=0,r=n.length;i<r;i++)l.push(n[i].roles[s]);else l.push(n.roles[s]);else l=[ve.ui.roles[s],ve.dataviz.ui.roles[s],ve.mobile.ui.roles[s]];for(s.indexOf(".")>=0&&(l=[ve.getter(s)(t)]),i=0,r=l.length;i<r;i++)if(o=l[i],o&&(a=e.data("kendo"+o.fn.options.prefix+o.fn.options.name)))return a}},ve.onResize=function(n){var i=n;return Te.mobileOS.android&&(i=function(){setTimeout(n,600)}),e(t).on(Te.resize,i),i},ve.unbindResize=function(n){e(t).off(Te.resize,n)},ve.attrValue=function(e,t){return e.data(ve.ns+t)},ve.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},e.extend(e.expr[":"],{kendoFocusable:function(t){var n=e.attr(t,"tabindex");return F(t,!isNaN(n)&&n>-1)}}),se=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],le="label, input, [data-rel=external]",de={setupMouseMute:function(){var t,n=0,i=se.length,r=document.documentElement;if(!de.mouseTrap&&Te.eventCapture)for(de.mouseTrap=!0,de.bustClick=!1,de.captureMouse=!1,t=function(t){de.captureMouse&&("click"===t.type?de.bustClick&&!e(t.target).is(le)&&(t.preventDefault(),t.stopPropagation()):t.stopPropagation())};n<i;n++)r.addEventListener(se[n],t,!0)},muteMouse:function(e){de.captureMouse=!0,e.data.bustClick&&(de.bustClick=!0),clearTimeout(de.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(de.mouseTrapTimeoutID),de.mouseTrapTimeoutID=setTimeout(function(){de.captureMouse=!1,de.bustClick=!1},400)}},ue={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"},Te.touch&&(Te.mobileOS.ios||Te.mobileOS.android)?ue={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:Te.pointers?ue={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:Te.msPointers&&(ue={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),!Te.msPointers||"onmspointerenter"in t||e.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},function(t,n){e.event.special[t]={delegateType:n,bindType:n,handle:function(t){var i,r=this,o=t.relatedTarget,a=t.handleObj;return o&&(o===r||e.contains(r,o))||(t.type=a.origType,i=a.handler.apply(this,arguments),t.type=n),i}}}),ce=function(e){return ue[e]||e},he=/([^ ]+)/g,ve.applyEventMap=function(e,t){return e=e.replace(he,ce),t&&(e=e.replace(he,"$1."+t)),e},pe=e.fn.on,_e(!0,A,e),A.fn=A.prototype=new e,A.fn.constructor=A,A.fn.init=function(t,n){return n&&n instanceof e&&!(n instanceof A)&&(n=A(n)),e.fn.init.call(this,t,n,fe)},A.fn.init.prototype=A.fn,fe=A(document),_e(A.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||ve.guid()),this},on:function(){var e,t,n,i,r,o,a=this,s=a.data("kendoNS");return 1===arguments.length?pe.call(a,arguments[0]):(e=a,t=Le.call(arguments),typeof t[t.length-1]===Ne&&t.pop(),n=t[t.length-1],i=ve.applyEventMap(t[0],s),Te.mouseAndTouchPresent&&i.search(/mouse|click/)>-1&&this[0]!==document.documentElement&&(de.setupMouseMute(),r=2===t.length?null:t[1],o=i.indexOf("click")>-1&&i.indexOf("touchend")>-1,pe.call(this,{touchstart:de.muteMouse,touchend:de.unMuteMouse},r,{bustClick:o})),typeof n===Ie&&(e=a.data("handler"),n=e[n],t[t.length-1]=function(t){n.call(e,t)}),t[0]=i,pe.apply(a,t),a)},kendoDestroy:function(e){return e=e||this.data("kendoNS"),e&&this.off("."+e),this}}),ve.jQuery=A,ve.eventMap=ue,ve.timezone=function(){function e(e,t){var n,i,r,o=t[3],a=t[4],s=t[5],l=t[8];return l||(t[8]=l={}),l[e]?l[e]:(isNaN(a)?0===a.indexOf("last")?(n=new Date(Date.UTC(e,u[o]+1,1,s[0]-24,s[1],s[2],0)),i=c[a.substr(4,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r-(i>r?7:0))):a.indexOf(">=")>=0&&(n=new Date(Date.UTC(e,u[o],a.substr(5),s[0],s[1],s[2],0)),i=c[a.substr(0,3)],r=n.getUTCDay(),n.setUTCDate(n.getUTCDate()+i-r+(i<r?7:0))):n=new Date(Date.UTC(e,u[o],a,s[0],s[1],s[2],0)),l[e]=n)}function t(t,n,i){var r,o,a,s;return(n=n[i])?(a=new Date(t).getUTCFullYear(),n=jQuery.grep(n,function(e){var t=e[0],n=e[1];return t<=a&&(n>=a||t==a&&"only"==n||"max"==n)}),n.push(t),n.sort(function(t,n){return"number"!=typeof t&&(t=+e(a,t)),"number"!=typeof n&&(n=+e(a,n)),t-n}),s=n[jQuery.inArray(t,n)-1]||n[n.length-1],isNaN(s)?s:null):(r=i.split(":"),o=0,r.length>1&&(o=60*r[0]+ +r[1]),[-1e6,"max","-","Jan",1,[0,0,0],o,"-"])}function n(e,t,n){var i,r,o,a=t[n];if("string"==typeof a&&(a=t[a]),!a)throw Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(i=a.length-1;i>=0&&(r=a[i][3],!(r&&e>r));i--);if(o=a[i+1],!o)throw Error('Timezone "'+n+'" not found on '+e+".");return o}function i(e,i,r,o){typeof e!=Re&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var a=n(e,i,o);return{zone:a,rule:t(e,r,a[1])}}function r(e,t){var n,r,o;return"Etc/UTC"==t||"Etc/GMT"==t?0:(n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,ve.parseFloat(o?r[0]-o[6]:r[0]))}function o(e,t){var n=i(e,this.zones,this.rules,t),r=n.zone,o=n.rule,a=r[2];return a.indexOf("/")>=0?a.split("/")[o&&+o[6]?1:0]:a.indexOf("%s")>=0?a.replace("%s",o&&"-"!=o[7]?o[7]:""):a}function a(e,t,n){var i,r,o,a=n;return typeof t==Ie&&(t=this.offset(e,t)),typeof n==Ie&&(n=this.offset(e,n)),r=e.getTimezoneOffset(),e=new Date(e.getTime()+6e4*(t-n)),o=e.getTimezoneOffset(),typeof a==Ie&&(a=this.offset(e,a)),i=o-r+(n-a),new Date(e.getTime()+6e4*i)}function s(e,t){return this.convert(e,e.getTimezoneOffset(),t)}function l(e,t){return this.convert(e,t,e.getTimezoneOffset())}function d(e){return this.apply(new Date(e),"Etc/UTC")}var u={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},c={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};return{zones:{},rules:{},offset:r,convert:a,apply:s,remove:l,abbr:o,toLocalDate:d}}(),ve.date=function(){function e(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function t(t,n,i){var r=t.getHours();i=i||1,n=(n-t.getDay()+7*i)%7,t.setDate(t.getDate()+n),e(t,r)}function i(e,n,i){return e=new Date(e),t(e,n,i),e}function r(e){return new Date(e.getFullYear(),e.getMonth(),1)}function o(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=r(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t}function a(e,t){return 1!==t?f(i(e,t,-1),4):f(e,4-(e.getDay()||7))}function s(e,t){var n=new Date(e.getFullYear(),0,1,(-6)),i=a(e,t),r=i.getTime()-n.getTime(),o=Math.floor(r/w);return 1+Math.floor(o/7)}function l(e,t){var i,r,o;return t===n&&(t=ve.culture().calendar.firstDay),i=f(e,-7),r=f(e,7),o=s(e,t),0===o?s(i,t)+1:53===o&&s(r,t)>1?1:o}function d(t){return t=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0),e(t,0),t}function u(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}function c(e){return b(e).getTime()-d(b(e))}function h(e,t,n){var i,r=c(t),o=c(n);return!e||r==o||(t>=n&&(n+=w),i=c(e),r>i&&(i+=w),o<r&&(o+=w),i>=r&&i<=o)}function p(e,t,n){var i,r=t.getTime(),o=n.getTime();return r>=o&&(o+=w),i=e.getTime(),i>=r&&i<=o}function f(t,n){var i=t.getHours();return t=new Date(t),m(t,n*w),e(t,i),t}function m(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*k))}function g(t,n){return t=new Date(ve.date.getDate(t).getTime()+ve.date.getMilliseconds(n)),e(t,n.getHours()),t}function v(){return d(new Date)}function _(e){return d(e).getTime()==v().getTime()}function b(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}var k=6e4,w=864e5;return{adjustDST:e,dayOfWeek:i,setDayOfWeek:t,getDate:d,isInDateRange:p,isInTimeRange:h,isToday:_,nextDay:function(e){return f(e,1)},previousDay:function(e){return f(e,-1)},toUtcTime:u,MS_PER_DAY:w,MS_PER_HOUR:60*k,MS_PER_MINUTE:k,setTime:m,setHours:g,addDays:f,today:v,toInvariantTime:b,firstDayOfMonth:r,lastDayOfMonth:o,weekInYear:l,getMilliseconds:c}}(),ve.stripWhitespace=function(e){var t,n,i;if(document.createNodeIterator)for(t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,function(t){return t.parentNode==e?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT},!1);t.nextNode();)t.referenceNode&&!t.referenceNode.textContent.trim()&&t.referenceNode.parentNode.removeChild(t.referenceNode);else for(n=0;n<e.childNodes.length;n++)i=e.childNodes[n],3!=i.nodeType||/\S/.test(i.nodeValue)||(e.removeChild(i),n--),1==i.nodeType&&ve.stripWhitespace(i)},me=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.oRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)},ve.animationFrame=function(e){me.call(t,e)},ge=[],ve.queueAnimation=function(e){ge[ge.length]=e,1===ge.length&&ve.runNextAnimation()},ve.runNextAnimation=function(){ve.animationFrame(function(){ge[0]&&(ge.shift()(),ge[0]&&ve.runNextAnimation())})},ve.parseQueryStringParams=function(e){for(var t=e.split("?")[1]||"",n={},i=t.split(/&|=/),r=i.length,o=0;o<r;o+=2)""!==i[o]&&(n[decodeURIComponent(i[o])]=decodeURIComponent(i[o+1]));return n},ve.elementUnderCursor=function(e){if(n!==e.x.client)return document.elementFromPoint(e.x.client,e.y.client)},ve.wheelDeltaY=function(e){var t,i=e.originalEvent,r=i.wheelDeltaY;return i.wheelDelta?(r===n||r)&&(t=i.wheelDelta):i.detail&&i.axis===i.VERTICAL_AXIS&&(t=10*-i.detail),t},ve.throttle=function(e,t){var i,r,o=0;return!t||t<=0?e:(r=function(){function r(){e.apply(a,l),o=+new Date}var a=this,s=+new Date-o,l=arguments;return o?(i&&clearTimeout(i),s>t?r():i=setTimeout(r,t-s),n):r()},r.cancel=function(){clearTimeout(i)},r)},ve.caret=function(t,i,r){var o,a,s,l,d,u=i!==n;if(r===n&&(r=i),t[0]&&(t=t[0]),!u||!t.disabled){try{t.selectionStart!==n?u?(t.focus(),a=Te.mobileOS,a.wp||a.android?setTimeout(function(){t.setSelectionRange(i,r)},0):t.setSelectionRange(i,r)):i=[t.selectionStart,t.selectionEnd]:document.selection&&(e(t).is(":visible")&&t.focus(),o=t.createTextRange(),u?(o.collapse(!0),o.moveStart("character",i),o.moveEnd("character",r-i),o.select()):(s=o.duplicate(),o.moveToBookmark(document.selection.createRange().getBookmark()),s.setEndPoint("EndToStart",o),l=s.text.length,d=l+o.text.length,i=[l,d]))}catch(c){i=[]}return i}},ve.compileMobileDirective=function(e,n){var i=t.angular;return e.attr("data-"+ve.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(e).injector().invoke(["$compile",function(t){t(e)(n),/^\$(digest|apply)$/.test(n.$$phase)||n.$digest()}]),ve.widgetInstance(e,ve.mobile.ui)},ve.antiForgeryTokens=function(){var t={},i=e("meta[name=csrf-token],meta[name=_csrf]").attr("content"),r=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").each(function(){t[this.name]=this.value}),r!==n&&i!==n&&(t[r]=i),t},ve.cycleForm=function(e){function t(e){var t=ve.widgetInstance(e);t&&t.focus?t.focus():e.focus()}var n=e.find("input, .k-widget").first(),i=e.find("button, .k-button").last();i.on("keydown",function(e){e.keyCode!=ve.keys.TAB||e.shiftKey||(e.preventDefault(),t(n))}),n.on("keydown",function(e){e.keyCode==ve.keys.TAB&&e.shiftKey&&(e.preventDefault(),t(i))})},ve.focusElement=function(n){var i=[],r=n.parentsUntil("body").filter(function(e,t){var n=ve.getComputedStyles(t,["overflow"]);return"visible"!==n.overflow}).add(t);r.each(function(t,n){i[t]=e(n).scrollTop()});try{n[0].setActive()}catch(o){n[0].focus()}r.each(function(t,n){e(n).scrollTop(i[t])})},function(){function n(t,n,i,r){var o,a,s=e("<form>").attr({action:i,method:"POST",target:r}),l=ve.antiForgeryTokens();l.fileName=n,o=t.split(";base64,"),l.contentType=o[0].replace("data:",""),l.base64=o[1];for(a in l)l.hasOwnProperty(a)&&e("<input>").attr({value:l[a],name:a,type:"hidden"}).appendTo(s);s.appendTo("body").submit().remove()}function i(e,t){var n,i,r,o,a,s=e;if("string"==typeof e){for(n=e.split(";base64,"),i=n[0],r=atob(n[1]),o=new Uint8Array(r.length),a=0;a<r.length;a++)o[a]=r.charCodeAt(a);s=new Blob([o.buffer],{type:i})}navigator.msSaveBlob(s,t)}function r(e,n){t.Blob&&e instanceof Blob&&(e=URL.createObjectURL(e)),o.download=n,o.href=e;var i=document.createEvent("MouseEvents");i.initMouseEvent("click",!0,!1,t,0,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(i),setTimeout(function(){URL.revokeObjectURL(e)})}var o=document.createElement("a"),a="download"in o&&!ve.support.browser.edge;ve.saveAs=function(e){var t=n;e.forceProxy||(a?t=r:navigator.msSaveBlob&&(t=i)),t(e.dataURI,e.fileName,e.proxyURL,e.proxyTarget)}}(),ve.proxyModelSetters=function(e){var t={};return Object.keys(e||{}).forEach(function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t,e.dirty=!0}})}),t}}(jQuery,window),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.router.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t){if(!t)return e;e+"/"===t&&(e=t);var n=RegExp("^"+t,"i");return n.test(e)||(e=t+"/"+e),p.protocol+"//"+(p.host+"/"+e).replace(/\/\/+/g,"/")}function i(e){return e?"#!":"#"}function r(e){var t=p.href;return"#!"===e&&t.indexOf("#")>-1&&t.indexOf("#!")<0?null:t.split(e)[1]||""}function o(e,t){return 0===t.indexOf(e)?t.substr(e.length).replace(/\/\//g,"/"):t}function a(e){return e.replace(/^(#)?/,"#")}function s(e){return e.replace(/^(#(!)?)?/,"#!")}var l=window.kendo,d="change",u="back",c="same",h=l.support,p=window.location,f=window.history,m=50,g=l.support.browser.msie,v=/^#*/,_=window.document,b=l.Class.extend({back:function(){g?setTimeout(function(){f.back()}):f.back()},forward:function(){g?setTimeout(function(){f.forward()}):f.forward()},length:function(){return f.length},replaceLocation:function(e){p.replace(e)}}),k=b.extend({init:function(e){this.root=e},navigate:function(e){f.pushState({},_.title,n(e,this.root))},replace:function(e){f.replaceState({},_.title,n(e,this.root))},normalize:function(e){return o(this.root,e)},current:function(){var e=p.pathname;return p.search&&(e+=p.search),o(this.root,e)},change:function(t){e(window).bind("popstate.kendo",t)},stop:function(){e(window).unbind("popstate.kendo")},normalizeCurrent:function(e){var t,o=e.root,a=p.pathname,s=r(i(e.hashBang));o===a+"/"&&(t=o),o===a&&s&&(t=n(s.replace(v,""),o)),t&&f.pushState({},_.title,t)}}),w=b.extend({init:function(e){this._id=l.guid(),this.prefix=i(e),this.fix=e?s:a},navigate:function(e){p.hash=this.fix(e)},replace:function(e){this.replaceLocation(this.fix(e))},normalize:function(e){return e.indexOf(this.prefix)<0?e:e.split(this.prefix)[1]},change:function(t){h.hashChange?e(window).on("hashchange."+this._id,t):this._interval=setInterval(t,m)},stop:function(){e(window).off("hashchange."+this._id),clearInterval(this._interval)},current:function(){return r(this.prefix)},normalizeCurrent:function(e){var t=p.pathname,n=e.root;return!(!e.pushState||n===t)&&(this.replaceLocation(n+this.prefix+o(n,t)),!0)}}),y=l.Observable.extend({start:function(t){if(t=t||{},this.bind([d,u,c],t),!this._started){this._started=!0,t.root=t.root||"/";var n,i=this.createAdapter(t);i.normalizeCurrent(t)||(n=i.current(),e.extend(this,{adapter:i,root:t.root,historyLength:i.length(),current:n,locations:[n]}),i.change(e.proxy(this,"_checkUrl")))}},createAdapter:function(e){return h.pushState&&e.pushState?new k(e.root):new w(e.hashBang)},stop:function(){this._started&&(this.adapter.stop(),this.unbind(d),this._started=!1)},change:function(e){this.bind(d,e)},replace:function(e,t){this._navigate(e,t,function(t){t.replace(e),this.locations[this.locations.length-1]=this.current})},navigate:function(e,n){return"#:back"===e?(this.backCalled=!0,this.adapter.back(),t):(this._navigate(e,n,function(t){t.navigate(e),this.locations.push(this.current)}),t)},_navigate:function(e,n,i){var r=this.adapter;return e=r.normalize(e),this.current===e||this.current===decodeURIComponent(e)?(this.trigger(c),t):(!n&&this.trigger(d,{url:e,decode:!1})||(this.current=e,i.call(this,r),this.historyLength=r.length()),t)},_checkUrl:function(){var e=this.adapter,n=e.current(),i=e.length(),r=this.historyLength===i,o=n===this.locations[this.locations.length-2]&&r,a=this.backCalled,s=this.current;return null===n||this.current===n||this.current===decodeURIComponent(n)||(this.historyLength=i,this.backCalled=!1,this.current=n,o&&this.trigger("back",{url:s,to:n})?(e.forward(),this.current=s,t):this.trigger(d,{url:n,backButtonPressed:!a})?(o?e.forward():(e.back(),this.historyLength--),this.current=s,t):(o?this.locations.pop():this.locations.push(n),t))}});l.History=y,l.History.HistoryAdapter=b,l.History.HashAdapter=w,l.History.PushStateAdapter=k,l.absoluteURL=n,l.history=new y}(window.kendo.jQuery),function(){function e(e,t){return t?e:"([^/]+)"}function t(t,n){return RegExp("^"+t.replace(f,"\\$&").replace(c,"(?:$1)?").replace(h,e).replace(p,"(.*?)")+"$",n?"i":"")}function n(e){return e.replace(/(\?.*)|(#.*)/g,"")}var i=window.kendo,r=i.history,o=i.Observable,a="init",s="routeMissing",l="change",d="back",u="same",c=/\((.*?)\)/g,h=/(\(\?)?:\w+/g,p=/\*\w+/g,f=/[\-{}\[\]+?.,\\\^$|#\s]/g,m=i.Class.extend({init:function(e,n,i){e instanceof RegExp||(e=t(e,i)),this.route=e,this._callback=n},callback:function(e,t,r){var o,a,s=0,l=i.parseQueryStringParams(e);if(l._back=t,e=n(e),o=this.route.exec(e).slice(1),a=o.length,r)for(;s<a;s++)void 0!==o[s]&&(o[s]=decodeURIComponent(o[s]));o.push(l),this._callback.apply(null,o)},worksWith:function(e,t,i){return!!this.route.test(n(e))&&(this.callback(e,t,i),!0)}}),g=o.extend({init:function(e){e||(e={}),o.fn.init.call(this),this.routes=[],this.pushState=e.pushState,this.hashBang=e.hashBang,this.root=e.root,this.ignoreCase=e.ignoreCase!==!1,this.bind([a,s,l,u],e)},destroy:function(){r.unbind(l,this._urlChangedProxy),r.unbind(u,this._sameProxy),r.unbind(d,this._backProxy),this.unbind()},start:function(){var e,t=this,n=function(){t._same()},i=function(e){t._back(e)},o=function(e){t._urlChanged(e)};r.start({same:n,change:o,back:i,pushState:t.pushState,hashBang:t.hashBang,root:t.root}),e={url:r.current||"/",preventDefault:$.noop},t.trigger(a,e)||t._urlChanged(e),this._urlChangedProxy=o,this._backProxy=i},route:function(e,t){this.routes.push(new m(e,t,this.ignoreCase))},navigate:function(e,t){i.history.navigate(e,t)},replace:function(e,t){i.history.replace(e,t)},_back:function(e){this.trigger(d,{url:e.url,to:e.to})&&e.preventDefault()},_same:function(){this.trigger(u)},_urlChanged:function(e){var t,n,r,o,a=e.url,d=!!e.decode,u=e.backButtonPressed;if(a||(a="/"),this.trigger(l,{url:e.url,params:i.parseQueryStringParams(e.url),backButtonPressed:u}))return void e.preventDefault();for(t=0,n=this.routes,o=n.length;t<o;t++)if(r=n[t],r.worksWith(a,u,d))return;this.trigger(s,{url:a,params:i.parseQueryStringParams(a),backButtonPressed:u})&&e.preventDefault()}});i.Router=g}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.odata.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(i,r){var o,a,s,l,d,u,c,h,p=[],f=i.logic||"and",g=i.filters;for(o=0,a=g.length;o<a;o++)i=g[o],s=i.field,c=i.value,u=i.operator,i.filters?i=n(i,r):(h=i.ignoreCase,s=s.replace(/\./g,"/"),i=k[u],r&&(i=w[u]),"isnull"===u||"isnotnull"===u?i=m.format("{0} {1} null",s,i):"isempty"===u||"isnotempty"===u?i=m.format("{0} {1} ''",s,i):i&&c!==t&&(l=e.type(c),"string"===l?(d="'{1}'",c=c.replace(/'/g,"''"),h===!0&&(s="tolower("+s+")")):"date"===l?r?(d="{1:yyyy-MM-ddTHH:mm:ss+00:00}",c=m.timezone.apply(c,"Etc/UTC")):d="datetime'{1:yyyy-MM-ddTHH:mm:ss}'":d="{1}",i.length>3?"substringof"!==i?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===u&&(r?(d="{0}({2},'{1}') eq -1",i="indexof"):d+=" eq false")):d="{2} {0} "+d,i=m.format(d,i,c,s))),p.push(i);return i=p.join(" "+f+" "),p.length>1&&(i="("+i+")"),i}function i(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function r(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function o(e){return e+r()+"-"+r()+"-"+r()}function a(e,t){var n=v+"--"+e;return t&&(n+="--"),n}function s(e,t,n,i){var r=e.options[i].url,o=m.format("{0} ",n);return b(r)?o+r(t):o+r}function l(e,t){var n="";return n+=a(e,!1),n+=v+"Content-Type: application/http",n+=v+"Content-Transfer-Encoding: binary",n+=v+"Content-ID: "+t}function d(e){var t="";return t+=v+"Content-Type: application/json;odata=minimalmetadata",t+=v+"Prefer: return=representation",t+=_+m.stringify(e)}function u(e,t,n,i,r,o){var a,u="";for(a=0;a<e.length;a++)u+=l(t,n),u+=_+s(r,e[a],r.options[i].type,i)+" HTTP/1.1",o||(u+=d(e[a])),u+=v,n++;return u}function c(e,t,n,i,r,o,s){var l="";return l+=h(t,n),l+=u(e,n,i,o,r,s),l+=a(n,!0),l+=v}function h(e,t){var n="";return n+="--"+e+v,n+="Content-Type: multipart/mixed; boundary="+t+v}function p(e,t){var n={},i=o("sf_batch_"),r="",s=0,l=e.options.batch.url,d=o("sf_changeset_");return n.type=e.options.batch.type,n.url=b(l)?l():l,n.headers={"Content-Type":"multipart/mixed; boundary="+i},t.updated.length&&(r+=c(t.updated,i,d,s,e,"update",!1),s+=t.updated.length,d=o("sf_changeset_")),t.destroyed.length&&(r+=c(t.destroyed,i,d,s,e,"destroy",!0),s+=t.destroyed.length,d=o("sf_changeset_")),t.created.length&&(r+=c(t.created,i,d,s,e,"create",!1)),r+=a(i,!0),n.data=r,n}function f(e){var t,n,i,r,o,a,s=e.match(/--changesetresponse_[a-z0-9-]+$/gm),l=0,d=[];for(d.push({models:[],passed:!0}),a=0;a<s.length;a++)r=s[a],r.lastIndexOf("--",r.length-1)?a<s.length-1&&d.push({models:[],passed:!0}):(l=l?e.indexOf(r,l+r.length):e.indexOf(r),t=e.substring(l,e.indexOf("--",l+1)),n=t.match(/^HTTP\/1\.\d (\d{3}) (.*)$/gm).pop(),i=m.parseFloat(n.match(/\d{3}/g).pop()),i>=200&&i<=299?(o=t.match(/\{.*\}/gm),o&&d[d.length-1].models.push(JSON.parse(o[0]))):d[d.length-1].passed=!1);return d}var m=window.kendo,g=e.extend,v="\r\n",_="\r\n\r\n",b=m.isFunction,k={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isempty:"eq",isnotempty:"ne"},w=g({},k,{contains:"contains"}),y={pageSize:e.noop,page:e.noop,filter:function(e,t,i){t&&(t=n(t,i),t&&(e.$filter=t))},sort:function(t,n){var i=e.map(n,function(e){var t=e.field.replace(/\./g,"/");return"desc"===e.dir&&(t+=" desc"),t}).join(",");i&&(t.$orderby=i)},skip:function(e,t){t&&(e.$skip=t)},take:function(e,t){t&&(e.$top=t)}},x={read:{dataType:"jsonp"}};g(!0,m.data,{schemas:{odata:{type:"json",data:function(e){return e.d.results||[e.d]},total:"d.__count"}},transports:{odata:{read:{cache:!0,dataType:"jsonp",jsonp:"$callback"},update:{cache:!0,dataType:"json",contentType:"application/json",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t,n){var i,r,o,a;if(e=e||{},t=t||"read",a=(this.options||x)[t],a=a?a.dataType:"json","read"===t){i={$inlinecount:"allpages"},"json"!=a&&(i.$format="json");for(o in e)y[o]?y[o](i,e[o],n):i[o]=e[o]}else{if("json"!==a)throw Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(o in e)r=e[o],"number"==typeof r&&(e[o]=r+"");i=m.stringify(e)}}return i}}}}),g(!0,m.data,{schemas:{"odata-v4":{type:"json",data:function(t){if(e.isArray(t)){for(var n=0;n<t.length;n++)i(t[n]);return t}return t=e.extend({},t),i(t),t.value?t.value:[t]},total:function(e){return e["@odata.count"]}}},transports:{"odata-v4":{batch:{type:"POST"},read:{cache:!0,dataType:"json"},update:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"PUT"},create:{cache:!0,dataType:"json",contentType:"application/json;IEEE754Compatible=true",type:"POST"},destroy:{cache:!0,dataType:"json",type:"DELETE"},parameterMap:function(e,t){var n=m.data.transports.odata.parameterMap(e,t,!0);return"read"==t&&(n.$count=!0,delete n.$inlinecount),n},submit:function(t){var n=this,i=p(n,t.data),r=t.data;(r.updated.length||r.destroyed.length||r.created.length)&&e.ajax(g(!0,{},{success:function(e){var n,i=f(e),o=0;r.updated.length&&(n=i[o],n.passed&&t.success(n.models.length?n.models:[],"update"),o++),r.destroyed.length&&(n=i[o],n.passed&&t.success([],"destroy"),o++),r.created.length&&(n=i[o],n.passed&&t.success(n.models,"create"))},error:function(e,n,i){t.error(e,n,i)}},i))}}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.xml.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=e.isArray,r=e.isPlainObject,o=e.map,a=e.each,s=e.extend,l=n.getter,d=n.Class,u=d.extend({init:function(t){var l,d,u,c,h=this,p=t.total,f=t.model,m=t.parse,g=t.errors,v=t.serialize,_=t.data;f&&(r(f)&&(l=t.modelBase||n.data.Model,f.fields&&a(f.fields,function(t,n){r(n)&&n.field?e.isFunction(n.field)||(n=s(n,{field:h.getter(n.field)})):n={field:h.getter(n)},f.fields[t]=n}),d=f.id,d&&(u={},u[h.xpathToMember(d,!0)]={field:h.getter(d)},f.fields=s(u,f.fields),f.id=h.xpathToMember(d)),f=l.define(f)),h.model=f),p&&("string"==typeof p?(p=h.getter(p),h.total=function(e){return parseInt(p(e),10)}):"function"==typeof p&&(h.total=p)),g&&("string"==typeof g?(g=h.getter(g),h.errors=function(e){return g(e)||null}):"function"==typeof g&&(h.errors=g)),_&&("string"==typeof _?(_=h.xpathToMember(_),h.data=function(e){var t,n=h.evaluate(e,_);return n=i(n)?n:[n],h.model&&f.fields?(t=new h.model,o(n,function(e){if(e){var n,i={};for(n in f.fields)i[n]=t._parse(n,f.fields[n].field(e));
return i}})):n}):"function"==typeof _&&(h.data=_)),"function"==typeof m&&(c=h.parse,h.parse=function(e){var t=m.call(h,e);return c.call(h,t)}),"function"==typeof v&&(h.serialize=v)},total:function(e){return this.data(e).length},errors:function(e){return e?e.errors:null},serialize:function(e){return e},parseDOM:function(e){var n,r,o,a,s,l,d,u={},c=e.attributes,h=c.length;for(d=0;d<h;d++)l=c[d],u["@"+l.nodeName]=l.nodeValue;for(r=e.firstChild;r;r=r.nextSibling)o=r.nodeType,3===o||4===o?u["#text"]=r.nodeValue:1===o&&(n=this.parseDOM(r),a=r.nodeName,s=u[a],i(s)?s.push(n):s=s!==t?[s,n]:n,u[a]=s);return u},evaluate:function(e,t){for(var n,r,o,a,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(r=[],t=l.join("."),s=0,o=e.length;s<o;s++)a=this.evaluate(e[s],t),a=i(a)?a:[a],r.push.apply(r,a);return r}return e},parse:function(t){var n,i,r={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),r[n.nodeName]=i,r},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,"."),e.indexOf("@")>=0?e.replace(/\.?(@.*)/,t?"$1":'["$1"]'):e.indexOf("text()")>=0?e.replace(/(\.?text\(\))/,t?"#text":'["#text"]'):e):""},getter:function(e){return l(this.xpathToMember(e),!0)}});e.extend(!0,n.data,{XmlDataReader:u,readers:{xml:u}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.min",["kendo.core.min","kendo.data.odata.min","kendo.data.xml.min"],e)}(function(){return function(e,t){function n(e,t,n,i){return function(r){var o,a={};for(o in r)a[o]=r[o];a.field=i?n+"."+r.field:n,t==Fe&&e._notifyChange&&e._notifyChange(a),e.trigger(t,a)}}function i(t,n){if(t===n)return!0;var r,o=e.type(t),a=e.type(n);if(o!==a)return!1;if("date"===o)return t.getTime()===n.getTime();if("object"!==o&&"array"!==o)return!1;for(r in t)if(!i(t[r],n[r]))return!1;return!0}function r(e,t){var n,i;for(i in e){if(n=e[i],ce(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}function o(e){this.data=e||[]}function a(e,n){if(e){var i=typeof e===ye?{field:e,dir:n}:e,r=pe(i)?i:i!==t?[i]:[];return fe(r,function(e){return!!e.dir})}}function s(e){var t,n,i,r,o=e.filters;if(o)for(t=0,n=o.length;t<n;t++)i=o[t],r=i.operator,r&&typeof r===ye&&(i.operator=X[r.toLowerCase()]||r),s(i)}function l(e){if(e&&!he(e))return!pe(e)&&e.filters||(e={logic:"and",filters:pe(e)?e:[e]}),s(e),e}function d(e,t){return!e.logic&&!t.logic&&(e.field===t.field&&e.value===t.value&&e.operator===t.operator)}function u(e){return e=e||{},he(e)?{logic:"and",filters:[]}:l(e)}function c(e,t){return t.logic||e.field>t.field?1:e.field<t.field?-1:0}function h(e,t){var n,i,r,o,a;if(e=u(e),t=u(t),e.logic!==t.logic)return!1;if(r=(e.filters||[]).slice(),o=(t.filters||[]).slice(),r.length!==o.length)return!1;for(r=r.sort(c),o=o.sort(c),a=0;a<r.length;a++)if(n=r[a],i=o[a],n.logic&&i.logic){if(!h(n,i))return!1}else if(!d(n,i))return!1;return!0}function p(e){return pe(e)?e:[e]}function f(e,n){var i=typeof e===ye?{field:e,dir:n}:e,r=pe(i)?i:i!==t?[i]:[];return W(r,function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates}})}function m(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function g(e,t,n,i,r,o){var a,s,l,d,u;for(t=t||[],d=t.length,a=0;a<d;a++)s=t[a],l=s.aggregate,u=s.field,e[u]=e[u]||{},o[u]=o[u]||{},o[u][l]=o[u][l]||{},e[u][l]=J[l.toLowerCase()](e[u][l],n,_e.accessor(u),i,r,o[u][l])}function v(e){return"number"==typeof e&&!isNaN(e)}function _(e){return e&&e.getTime}function b(e){var t,n=e.length,i=Array(n);for(t=0;t<n;t++)i[t]=e[t].toJSON();return i}function k(e,t,n,i,r){var o,a,s,l,d,u={};for(l=0,d=e.length;l<d;l++){o=e[l];for(a in t)s=r[a],s&&s!==a&&(u[s]||(u[s]=_e.setter(s)),u[s](o,t[a](o)),delete o[a])}}function w(e,t,n,i,r){var o,a,s,l,d;for(l=0,d=e.length;l<d;l++){o=e[l];for(a in t)o[a]=n._parse(a,t[a](o)),s=r[a],s&&s!==a&&delete o[s]}}function y(e,t,n,i,r){var o,a,s,l;for(a=0,l=e.length;a<l;a++)o=e[a],s=i[o.field],s&&s!=o.field&&(o.field=s),o.value=n._parse(o.field,o.value),o.hasSubgroups?y(o.items,t,n,i,r):w(o.items,t,n,i,r)}function x(e,t,n,i,r,o){return function(a){return a=e(a),a&&!he(i)&&("[object Array]"===$e.call(a)||a instanceof Qe||(a=[a]),n(a,i,new t,r,o)),a||[]}}function C(e,t,n,i){for(var r,o,a,s=0;t.length&&i&&(r=t[s],o=r.items,a=o.length,e&&e.field===r.field&&e.value===r.value?(e.hasSubgroups&&e.items.length?C(e.items[e.items.length-1],r.items,n,i):(o=o.slice(n,n+i),e.items=e.items.concat(o)),t.splice(s--,1)):r.hasSubgroups&&o.length?(C(r,o,n,i),r.items.length||t.splice(s--,1)):(o=o.slice(n,n+i),r.items=o,r.items.length||t.splice(s--,1)),0===o.length?n-=a:(n=0,i-=o.length),!(++s>=t.length)););s<t.length&&t.splice(s,t.length-s)}function T(e){var t,n,i,r,o,a=[];for(t=0,n=e.length;t<n;t++)if(o=e.at(t),o.hasSubgroups)a=a.concat(T(o.items));else for(i=o.items,r=0;r<i.length;r++)a.push(i.at(r));return a}function S(e,t){var n,i,r;if(t)for(n=0,i=e.length;n<i;n++)r=e.at(n),r.hasSubgroups?S(r.items,t):r.items=new U(r.items,t)}function D(e,t){for(var n=0,i=e.length;n<i;n++)if(e[n].hasSubgroups){if(D(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function F(e,t,n,i){for(var r=0;r<e.length&&e[r].data!==t&&!E(e[r].data,n,i);r++);}function E(e,t,n){for(var i=0,r=e.length;i<r;i++){if(e[i]&&e[i].hasSubgroups)return E(e[i].items,t,n);if(e[i]===t||e[i]===n)return e[i]=n,!0}}function A(e,n,i,r,o){var a,s,l,d;for(a=0,s=e.length;a<s;a++)if(l=e[a],l&&!(l instanceof r))if(l.hasSubgroups===t||o){for(d=0;d<n.length;d++)if(n[d]===l){e[a]=n.at(d),F(i,n,l,e[a]);break}}else A(l.items,n,i,r,o)}function I(e,t){var n,i,r=e.length;for(i=0;i<r;i++)if(n=e[i],n.uid&&n.uid==t.uid)return e.splice(i,1),n}function R(e,t){return t?z(e,function(e){return e.uid&&e.uid==t.uid||e[t.idField]===t.id&&t.id!==t._defaultId}):-1}function M(e,t){return t?z(e,function(e){return e.uid==t.uid}):-1}function z(e,t){var n,i;for(n=0,i=e.length;n<i;n++)if(t(e[n]))return n;return-1}function H(e,t){var n,i;return e&&!he(e)?(n=e[t],i=ce(n)?n.from||n.field||t:e[t]||t,be(i)?t:i):t}function N(e,t){var n,i,r,o={};for(r in e)"filters"!==r&&(o[r]=e[r]);if(e.filters)for(o.filters=[],n=0,i=e.filters.length;n<i;n++)o.filters[n]=N(e.filters[n],t);else o.field=H(t.fields,o.field);return o}function B(e,t){var n,i,r,o,a,s=[];for(n=0,i=e.length;n<i;n++){r={},o=e[n];for(a in o)r[a]=o[a];r.field=H(t.fields,r.field),r.aggregates&&pe(r.aggregates)&&(r.aggregates=B(r.aggregates,t)),s.push(r)}return s}function P(t,n){var i,r,o,a,s,l,d,u,c,h;for(t=e(t)[0],i=t.options,r=n[0],o=n[1],a=[],s=0,l=i.length;s<l;s++)c={},u=i[s],d=u.parentNode,d===t&&(d=null),u.disabled||d&&d.disabled||(d&&(c.optgroup=d.label),c[r.field]=u.text,h=u.attributes.value,h=h&&h.specified?u.value:u.text,c[o.field]=h,a.push(c));return a}function L(t,n){var i,r,o,a,s,l,d,u=e(t)[0].tBodies[0],c=u?u.rows:[],h=n.length,p=[];for(i=0,r=c.length;i<r;i++){for(s={},d=!0,a=c[i].cells,o=0;o<h;o++)l=a[o],"th"!==l.nodeName.toLowerCase()&&(d=!1,s[n[o].field]=l.innerHTML);d||p.push(s)}return p}function O(e){return function(){var t=this._data,n=ie.fn[e].apply(this,je.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}function V(t,n){function i(e,t){return e.filter(t).add(e.find(t))}var r,o,a,s,l,d,u,c,h=e(t).children(),p=[],f=n[0].field,m=n[1]&&n[1].field,g=n[2]&&n[2].field,v=n[3]&&n[3].field;for(r=0,o=h.length;r<o;r++)a={_loaded:!0},s=h.eq(r),d=s[0].firstChild,c=s.children(),t=c.filter("ul"),c=c.filter(":not(ul)"),l=s.attr("data-id"),l&&(a.id=l),d&&(a[f]=3==d.nodeType?d.nodeValue:c.text()),m&&(a[m]=i(c,"a").attr("href")),v&&(a[v]=i(c,"img").attr("src")),g&&(u=i(c,".k-sprite").prop("className"),a[g]=u&&e.trim(u.replace("k-sprite",""))),t.length&&(a.items=V(t.eq(0),n)),"true"==s.attr("data-hasChildren")&&(a.hasChildren=!0),p.push(a);return p}var W,U,q,j,G,$,K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de=e.extend,ue=e.proxy,ce=e.isPlainObject,he=e.isEmptyObject,pe=e.isArray,fe=e.grep,me=e.ajax,ge=e.each,ve=e.noop,_e=window.kendo,be=_e.isFunction,ke=_e.Observable,we=_e.Class,ye="string",xe="function",Ce="create",Te="read",Se="update",De="destroy",Fe="change",Ee="sync",Ae="get",Ie="error",Re="requestStart",Me="progress",ze="requestEnd",He=[Ce,Te,Se,De],Ne=function(e){return e},Be=_e.getter,Pe=_e.stringify,Le=Math,Oe=[].push,Ve=[].join,We=[].pop,Ue=[].splice,qe=[].shift,je=[].slice,Ge=[].unshift,$e={}.toString,Ke=_e.support.stableSort,Ye=/^\/Date\((.*?)\)\/$/,Qe=ke.extend({init:function(e,t){var n=this;n.type=t||q,ke.fn.init.call(n),n.length=e.length,n.wrapAll(e,n)},at:function(e){return this[e]},toJSON:function(){var e,t,n=this.length,i=Array(n);for(e=0;e<n;e++)t=this[e],t instanceof q&&(t=t.toJSON()),i[e]=t;return i},parent:ve,wrapAll:function(e,t){var n,i,r=this,o=function(){return r};for(t=t||[],n=0,i=e.length;n<i;n++)t[n]=r.wrap(e[n],o);return t},wrap:function(e,t){var n,i=this;return null!==e&&"[object Object]"===$e.call(e)&&(n=e instanceof i.type||e instanceof $,n||(e=e instanceof q?e.toJSON():e,e=new i.type(e)),e.parent=t,e.bind(Fe,function(e){i.trigger(Fe,{field:e.field,node:e.node,index:e.index,items:e.items||[this],action:e.node?e.action||"itemloaded":"itemchange"})})),e},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=Oe.apply(this,n),this.trigger(Fe,{action:"add",index:t,items:n}),e},slice:je,sort:[].sort,join:Ve,pop:function(){var e=this.length,t=We.apply(this);return e&&this.trigger(Fe,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,r,o,a=this.wrapAll(je.call(arguments,2));if(i=Ue.apply(this,[e,t].concat(a)),i.length)for(this.trigger(Fe,{action:"remove",index:e,items:i}),r=0,o=i.length;r<o;r++)i[r]&&i[r].children&&i[r].unbind(Fe);return n&&this.trigger(Fe,{action:"add",index:e,items:a}),i},shift:function(){var e=this.length,t=qe.apply(this);return e&&this.trigger(Fe,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=Ge.apply(this,t),this.trigger(Fe,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n,i=this;for(t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1},forEach:function(e,t){for(var n=0,i=this.length,r=t||window;n<i;n++)e.call(r,this[n],n,this)},map:function(e,t){for(var n=0,i=[],r=this.length,o=t||window;n<r;n++)i[n]=e.call(o,this[n],n,this);return i},reduce:function(e){var t,n=0,i=this.length;for(2==arguments.length?t=arguments[1]:n<i&&(t=this[n++]);n<i;n++)t=e(t,this[n],n,this);return t},reduceRight:function(e){var t,n=this.length-1;for(2==arguments.length?t=arguments[1]:n>0&&(t=this[n--]);n>=0;n--)t=e(t,this[n],n,this);return t},filter:function(e,t){for(var n,i=0,r=[],o=this.length,a=t||window;i<o;i++)n=this[i],e.call(a,n,i,this)&&(r[r.length]=n);return r},find:function(e,t){for(var n,i=0,r=this.length,o=t||window;i<r;i++)if(n=this[i],e.call(o,n,i,this))return n},every:function(e,t){for(var n,i=0,r=this.length,o=t||window;i<r;i++)if(n=this[i],!e.call(o,n,i,this))return!1;return!0},some:function(e,t){for(var n,i=0,r=this.length,o=t||window;i<r;i++)if(n=this[i],e.call(o,n,i,this))return!0;return!1},remove:function(e){var t=this.indexOf(e);t!==-1&&this.splice(t,1)},empty:function(){this.splice(0,this.length)}});"undefined"!=typeof Symbol&&Symbol.iterator&&!Qe.prototype[Symbol.iterator]&&(Qe.prototype[Symbol.iterator]=[][Symbol.iterator]),U=Qe.extend({init:function(e,t){ke.fn.init.call(this),this.type=t||q;for(var n=0;n<e.length;n++)this[n]=e[n];this.length=n,this._parent=ue(function(){return this},this)},at:function(e){var t=this[e];return t instanceof this.type?t.parent=this._parent:t=this[e]=this.wrap(t,this._parent),t}}),q=ke.extend({init:function(e){var t,n,i=this,r=function(){return i};ke.fn.init.call(this),this._handlers={};for(n in e)t=e[n],"object"==typeof t&&t&&!t.getTime&&"_"!=n.charAt(0)&&(t=i.wrap(t,n,r)),i[n]=t;i.uid=_e.guid()},shouldSerialize:function(e){return this.hasOwnProperty(e)&&"_handlers"!==e&&"_events"!==e&&typeof this[e]!==xe&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(){var e,t,n={};for(t in this)this.shouldSerialize(t)&&(e=this[t],(e instanceof q||e instanceof Qe)&&(e=e.toJSON()),n[t]=e);return n},get:function(e){var t,n=this;return n.trigger(Ae,{field:e}),t="this"===e?n:_e.getter(e,!0)(n)},_set:function(e,t){var n,i,r,o=this,a=e.indexOf(".")>=0;if(a)for(n=e.split("."),i="";n.length>1;){if(i+=n.shift(),r=_e.getter(i,!0)(o),r instanceof q)return r.set(n.join("."),t),a;i+="."}return _e.setter(e)(o,t),a},set:function(e,t){var n=this,i=!1,r=e.indexOf(".")>=0,o=_e.getter(e,!0)(n);return o!==t&&(o instanceof ke&&this._handlers[e]&&(this._handlers[e].get&&o.unbind(Ae,this._handlers[e].get),o.unbind(Fe,this._handlers[e].change)),i=n.trigger("set",{field:e,value:t}),i||(r||(t=n.wrap(t,e,function(){return n})),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(Fe,{field:e}))),i},parent:ve,wrap:function(e,t,i){var r,o,a,s,l=this,d=$e.call(e);return null==e||"[object Object]"!==d&&"[object Array]"!==d||(a=e instanceof Qe,s=e instanceof ie,"[object Object]"!==d||s||a?("[object Array]"===d||a||s)&&(a||s||(e=new Qe(e)),o=n(l,Fe,t,!1),e.bind(Fe,o),l._handlers[t]={change:o}):(e instanceof q||(e=new q(e)),r=n(l,Ae,t,!0),e.bind(Ae,r),o=n(l,Fe,t,!0),e.bind(Fe,o),l._handlers[t]={get:r,change:o}),e.parent=i),e}}),j={number:function(e){return typeof e===ye&&"null"===e.toLowerCase()?null:_e.parseFloat(e)},date:function(e){return typeof e===ye&&"null"===e.toLowerCase()?null:_e.parseDate(e)},"boolean":function(e){return typeof e===ye?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===ye&&"null"===e.toLowerCase()?null:null!=e?e+"":e},"default":function(e){return e}},G={string:"",number:0,date:new Date,"boolean":!1,"default":""},$=q.extend({init:function(n){var i,r,o=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},o.defaults,n),o._initializers))for(i=0;i<o._initializers.length;i++)r=o._initializers[i],n[r]=o.defaults[r]();q.fn.init.call(o,n),o.dirty=!1,o.dirtyFields={},o.idField&&(o.id=o.get(o.idField),o.id===t&&(o.id=o._defaultId))},shouldSerialize:function(e){return q.fn.shouldSerialize.call(this,e)&&"uid"!==e&&!("id"!==this.idField&&"id"===e)&&"dirty"!==e&&"dirtyFields"!==e&&"_accessors"!==e},_parse:function(e,t){var n,i=this,o=e,a=i.fields||{};return e=a[e],e||(e=r(a,o)),e&&(n=e.parse,!n&&e.type&&(n=j[e.type.toLowerCase()])),n?n(t):t},_notifyChange:function(e){var t=e.action;"add"!=t&&"remove"!=t||(this.dirty=!0,this.dirtyFields[e.field]=!0)},editable:function(e){return e=(this.fields||{})[e],!e||e.editable!==!1},set:function(e,t,n){var r=this,o=r.dirty;r.editable(e)&&(t=r._parse(e,t),i(t,r.get(e))||(r.dirty=!0,r.dirtyFields[e]=!0,q.fn.set.call(r,e,t,n)&&!o&&(r.dirty=o,r.dirty||(r.dirtyFields[e]=!1))))},accept:function(e){var t,n,i=this,r=function(){return i};for(t in e)n=e[t],"_"!=t.charAt(0)&&(n=i.wrap(e[t],t,r)),i._set(t,n);i.idField&&(i.id=i.get(i.idField)),i.dirty=!1,i.dirtyFields={}},isNew:function(){return this.id===this._defaultId}}),$.define=function(e,n){n===t&&(n=e,e=$);var i,r,o,a,s,l,d,u,c=de({defaults:{}},n),h={},p=c.id,f=[];if(p&&(c.idField=p),c.id&&delete c.id,p&&(c.defaults[p]=c._defaultId=""),"[object Array]"===$e.call(c.fields)){for(l=0,d=c.fields.length;l<d;l++)o=c.fields[l],typeof o===ye?h[o]={}:o.field&&(h[o.field]=o);c.fields=h}for(r in c.fields)o=c.fields[r],a=o.type||"default",s=null,u=r,r=typeof o.field===ye?o.field:r,o.nullable||(s=c.defaults[u!==r?u:r]=o.defaultValue!==t?o.defaultValue:G[a.toLowerCase()],"function"==typeof s&&f.push(r)),n.id===r&&(c._defaultId=s),c.defaults[u!==r?u:r]=s,o.parse=o.parse||j[a];return f.length>0&&(c._initializers=f),i=e.extend(c),i.define=function(e){return $.define(i,e)},c.fields&&(i.fields=c.fields,i.idField=c.idField),i},K={selector:function(e){return be(e)?e:Be(e)},compare:function(e){var t=this.selector(e);return function(e,n){return e=t(e),n=t(n),null==e&&null==n?0:null==e?-1:null==n?1:e.localeCompare?e.localeCompare(n):e>n?1:e<n?-1:0}},create:function(e){var t=e.compare||this.compare(e.field);return"desc"==e.dir?function(e,n){return t(n,e,!0)}:t},combine:function(e){return function(t,n){var i,r,o=e[0](t,n);for(i=1,r=e.length;i<r;i++)o=o||e[i](t,n);return o}}},Y=de({},K,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?-1:null==r?1:i.localeCompare?i.localeCompare(r):i>r?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),r=t(n);return i&&i.getTime&&r&&r.getTime&&(i=i.getTime(),r=r.getTime()),i===r?e.__position-n.__position:null==i?1:null==r?-1:r.localeCompare?r.localeCompare(i):i<r?1:-1}},create:function(e){return this[e.dir](e.field)}}),W=function(e,t){var n,i=e.length,r=Array(i);for(n=0;n<i;n++)r[n]=t(e[n],n,e);return r},Q=function(){function e(e){return"string"==typeof e&&(e=e.replace(/[\r\n]+/g,"")),JSON.stringify(e)}function t(t){return function(n,i,r){return i+="",r&&(n="("+n+" || '').toLowerCase()",i=i.toLowerCase()),t(n,e(i),r)}}function n(t,n,i,r){if(null!=i){if(typeof i===ye){var o=Ye.exec(i);o?i=new Date((+o[1])):r?(i=e(i.toLowerCase()),n="(("+n+" || '')+'').toLowerCase()"):i=e(i)}i.getTime&&(n="("+n+"&&"+n+".getTime?"+n+".getTime():"+n+")",i=i.getTime())}return n+" "+t+" "+i}function i(e){var t,n,i,r;for(t="/^",n=!1,i=0;i<e.length;++i){if(r=e.charAt(i),n)t+="\\"+r;else{if("~"==r){n=!0;continue}t+="*"==r?".*":"?"==r?".":".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(r)>=0?"\\"+r:r}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i){return n("==",e,t,i)},neq:function(e,t,i){return n("!=",e,t,i)},gt:function(e,t,i){return n(">",e,t,i)},gte:function(e,t,i){return n(">=",e,t,i)},lt:function(e,t,i){return n("<",e,t,i)},lte:function(e,t,i){return n("<=",e,t,i)},startswith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == 0"}),doesnotstartwith:t(function(e,t){return e+".lastIndexOf("+t+", 0) == -1"}),endswith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") >= 0"}),doesnotendwith:t(function(e,t){var n=t?t.length-2:0;return e+".indexOf("+t+", "+e+".length - "+n+") < 0"}),contains:t(function(e,t){return e+".indexOf("+t+") >= 0"}),doesnotcontain:t(function(e,t){return e+".indexOf("+t+") == -1"}),matches:t(function(e,t){return t=t.substring(1,t.length-1),i(t)+".test("+e+")"}),doesnotmatch:t(function(e,t){return t=t.substring(1,t.length-1),"!"+i(t)+".test("+e+")"}),isempty:function(e){return e+" === ''"},isnotempty:function(e){return e+" !== ''"},isnull:function(e){return"("+e+" == null)"},isnotnull:function(e){return"("+e+" != null)"}}}(),o.filterExpr=function(e){var n,i,r,a,s,l,d=[],u={and:" && ",or:" || "},c=[],h=[],p=e.filters;for(n=0,i=p.length;n<i;n++)r=p[n],s=r.field,l=r.operator,r.filters?(a=o.filterExpr(r),r=a.expression.replace(/__o\[(\d+)\]/g,function(e,t){return t=+t,"__o["+(h.length+t)+"]"}).replace(/__f\[(\d+)\]/g,function(e,t){return t=+t,"__f["+(c.length+t)+"]"}),h.push.apply(h,a.operators),c.push.apply(c,a.fields)):(typeof s===xe?(a="__f["+c.length+"](d)",c.push(s)):a=_e.expr(s),typeof l===xe?(r="__o["+h.length+"]("+a+", "+Q.quote(r.value)+")",h.push(l)):r=Q[(l||"eq").toLowerCase()](a,r.value,r.ignoreCase===t||r.ignoreCase)),d.push(r);return{expression:"("+d.join(u[e.logic])+")",fields:c,operators:h}},X={"==":"eq",equals:"eq",isequalto:"eq",equalto:"eq",equal:"eq","!=":"neq",ne:"neq",notequals:"neq",isnotequalto:"neq",notequalto:"neq",notequal:"neq","<":"lt",islessthan:"lt",lessthan:"lt",less:"lt","<=":"lte",le:"lte",islessthanorequalto:"lte",lessthanequal:"lte",">":"gt",isgreaterthan:"gt",greaterthan:"gt",greater:"gt",">=":"gte",isgreaterthanorequalto:"gte",greaterthanequal:"gte",ge:"gte",notsubstringof:"doesnotcontain",isnull:"isnull",isempty:"isempty",isnotempty:"isnotempty"},o.normalizeFilter=l,o.compareFilters=h,o.prototype={toArray:function(){return this.data},range:function(e,t){return new o(this.data.slice(e,e+t))},skip:function(e){return new o(this.data.slice(e))},take:function(e){return new o(this.data.slice(0,e))},select:function(e){return new o(W(this.data,e))},order:function(e,t,n){var i={dir:t};return e&&(e.compare?i.compare=e.compare:i.field=e),new o(n?this.data.sort(K.create(i)):this.data.slice(0).sort(K.create(i)))},orderBy:function(e,t){return this.order(e,"asc",t)},orderByDescending:function(e,t){return this.order(e,"desc",t)},sort:function(e,t,n,i){var r,o,s=a(e,t),l=[];if(n=n||K,s.length){for(r=0,o=s.length;r<o;r++)l.push(n.create(s[r]));return this.orderBy({compare:n.combine(l)},i)}return this},filter:function(e){var t,n,i,r,a,s,d,u,c=this.data,h=[];if(e=l(e),!e||0===e.filters.length)return this;for(r=o.filterExpr(e),s=r.fields,d=r.operators,a=u=Function("d, __f, __o","return "+r.expression),(s.length||d.length)&&(u=function(e){return a(e,s,d)}),t=0,i=c.length;t<i;t++)n=c[t],u(n)&&h.push(n);return new o(h)},group:function(e,t){e=f(e||[]),t=t||this.data;var n,i=this,r=new o(i.data);return e.length>0&&(n=e[0],r=r.groupBy(n).select(function(i){var r=new o(t).filter([{field:i.field,operator:"eq",value:i.value,ignoreCase:!1}]);return{field:i.field,value:i.value,items:e.length>1?new o(i.items).group(e.slice(1),r.toArray()).toArray():i.items,hasSubgroups:e.length>1,aggregates:r.aggregate(n.aggregates)}})),r},groupBy:function(e){if(he(e)||!this.data.length)return new o([]);var t,n,i,r,a=e.field,s=this._sortForGrouping(a,e.dir||"asc"),l=_e.accessor(a),d=l.get(s[0],a),u={field:a,value:d,items:[]},c=[u];for(i=0,r=s.length;i<r;i++)t=s[i],n=l.get(t,a),m(d,n)||(d=n,u={field:a,value:d,items:[]},c.push(u)),u.items.push(t);return new o(c)},_sortForGrouping:function(e,t){var n,i,r=this.data;if(!Ke){for(n=0,i=r.length;n<i;n++)r[n].__position=n;for(r=new o(r).sort(e,t,Y).toArray(),n=0,i=r.length;n<i;n++)delete r[n].__position;return r}return this.sort(e,t).toArray()},aggregate:function(e){var t,n,i={},r={};if(e&&e.length)for(t=0,n=this.data.length;t<n;t++)g(i,e,this.data[t],t,n,r);return i}},J={sum:function(e,t,n){var i=n.get(t);return v(e)?v(i)&&(e+=i):e=i,e},count:function(e){return(e||0)+1},average:function(e,n,i,r,o,a){var s=i.get(n);return a.count===t&&(a.count=0),v(e)?v(s)&&(e+=s):e=s,v(s)&&a.count++,r==o-1&&v(e)&&(e/=a.count),e},max:function(e,t,n){var i=n.get(t);return v(e)||_(e)||(e=i),e<i&&(v(i)||_(i))&&(e=i),e},min:function(e,t,n){var i=n.get(t);return v(e)||_(e)||(e=i),e>i&&(v(i)||_(i))&&(e=i),e}},o.process=function(e,n,i){n=n||{};var r,s=new o(e),l=n.group,d=f(l||[]).concat(a(n.sort||[])),u=n.filterCallback,c=n.filter,h=n.skip,p=n.take;return c&&(s=s.filter(c),u&&(s=u(s)),r=s.toArray().length),d&&(s=i?s.sort(d,t,t,i):s.sort(d),l&&(e=s.toArray())),h!==t&&p!==t&&(s=s.range(h,p)),l&&(s=s.group(l,e)),{total:r,data:s.toArray()}},Z=we.extend({init:function(e){this.data=e.data},read:function(e){e.success(this.data)},update:function(e){e.success(e.data)},create:function(e){e.success(e.data)},destroy:function(e){e.success(e.data)}}),ee=we.extend({init:function(e){var t,n=this;e=n.options=de({},n.options,e),ge(He,function(t,n){typeof e[n]===ye&&(e[n]={url:e[n]})}),n.cache=e.cache?te.create(e.cache):{find:ve,add:ve},t=e.parameterMap,n.submit=e.submit,be(e.push)&&(n.push=e.push),n.push||(n.push=Ne),n.parameterMap=be(t)?t:function(e){var n={};return ge(e,function(e,i){e in t&&(e=t[e],ce(e)&&(i=e.value(i),e=e.key)),n[e]=i}),n}},options:{parameterMap:Ne},create:function(e){return me(this.setup(e,Ce))},read:function(n){var i,r,o,a=this,s=a.cache;n=a.setup(n,Te),i=n.success||ve,r=n.error||ve,o=s.find(n.data),o!==t?i(o):(n.success=function(e){s.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return me(this.setup(e,Se))},destroy:function(e){return me(this.setup(e,De))},setup:function(e,t){e=e||{};var n,i=this,r=i.options[t],o=be(r.data)?r.data(e.data):r.data;return e=de(!0,{},r,e),n=de(!0,{},o,e.data),e.data=i.parameterMap(n,t),be(e.url)&&(e.url=e.url(n)),e}}),te=we.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[Pe(e)]=n)},find:function(e){return this._store[Pe(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[Pe(e)]}}),te.create=function(e){var t={inmemory:function(){return new te}};return ce(e)&&be(e.find)?e:e===!0?new te:t[e]()},ne=we.extend({init:function(e){var t,n,i,r,o,a,s,l,d,u,c,h,p,f=this;e=e||{};for(t in e)n=e[t],f[t]=typeof n===ye?Be(n):n;r=e.modelBase||$,ce(f.model)&&(f.model=i=r.define(f.model)),o=ue(f.data,f),f._dataAccessFunction=o,f.model&&(a=ue(f.groups,f),s=ue(f.serialize,f),l={},d={},u={},c={},h=!1,i=f.model,i.fields&&(ge(i.fields,function(e,t){var n;p=e,ce(t)&&t.field?p=t.field:typeof t===ye&&(p=t),ce(t)&&t.from&&(n=t.from),h=h||n&&n!==e||p!==e,d[e]=Be(n||p),u[e]=Be(e),l[n||p]=e,c[e]=n||p}),!e.serialize&&h&&(f.serialize=x(s,i,k,u,l,c))),f._dataAccessFunction=o,f.data=x(o,i,w,d,l,c),f.groups=x(a,i,y,d,l,c))},errors:function(e){return e?e.errors:null},parse:Ne,data:Ne,total:function(e){return e.length},groups:Ne,aggregates:function(){return{}},serialize:function(e){return e}}),ie=ke.extend({init:function(e){var n,i,r,o=this;e&&(i=e.data),e=o.options=de({},o.options,e),o._map={},o._prefetch={},o._data=[],o._pristineData=[],o._ranges=[],o._view=[],o._pristineTotal=0,o._destroyed=[],o._pageSize=e.pageSize,o._page=e.page||(e.pageSize?1:t),o._sort=a(e.sort),o._filter=l(e.filter),o._group=f(e.group),o._aggregate=e.aggregate,o._total=e.total,o._shouldDetachObservableParents=!0,ke.fn.init.call(o),o.transport=re.create(e,i,o),be(o.transport.push)&&o.transport.push({pushCreate:ue(o._pushCreate,o),pushUpdate:ue(o._pushUpdate,o),pushDestroy:ue(o._pushDestroy,o)}),null!=e.offlineStorage&&("string"==typeof e.offlineStorage?(r=e.offlineStorage,o._storage={getItem:function(){return JSON.parse(localStorage.getItem(r))},setItem:function(e){localStorage.setItem(r,Pe(o.reader.serialize(e)))}}):o._storage=e.offlineStorage),o.reader=new _e.data.readers[e.schema.type||"json"](e.schema),n=o.reader.model||{},o._detachObservableParents(),o._data=o._observe(o._data),o._online=!0,o.bind(["push",Ie,Fe,Re,Ee,ze,Me],e)},options:{data:null,schema:{modelBase:$},offlineStorage:null,serverSorting:!1,serverPaging:!1,serverFiltering:!1,serverGrouping:!1,serverAggregates:!1,batch:!1,inPlaceSort:!1},clone:function(){return this},online:function(n){return n!==t?this._online!=n&&(this._online=n,n)?this.sync():e.Deferred().resolve().promise():this._online},offlineData:function(e){return null==this.options.offlineStorage?null:e!==t?this._storage.setItem(e):this._storage.getItem()||[]},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_pushCreate:function(e){this._push(e,"pushCreate")},_pushUpdate:function(e){this._push(e,"pushUpdate")},_pushDestroy:function(e){this._push(e,"pushDestroy")},_push:function(e,t){var n=this._readData(e);n||(n=e),this[t](n)},_flatData:function(e,t){if(e){if(this._isServerGrouped())return T(e);if(!t)for(var n=0;n<e.length;n++)e.at(n)}return e},parent:ve,get:function(e){var t,n,i=this._flatData(this._data,this.options.useRanges);for(t=0,n=i.length;t<n;t++)if(i[t].id==e)return i[t]},getByUid:function(e){return this._getByUid(e,this._data)},_getByUid:function(e,t){var n,i,r=this._flatData(t,this.options.useRanges);if(r)for(n=0,i=r.length;n<i;n++)if(r[n].uid==e)return r[n]},indexOf:function(e){return M(this._data,e)},at:function(e){return this._data.at(e)},data:function(e){var n,i=this;if(e===t){if(i._data)for(n=0;n<i._data.length;n++)i._data.at(n);return i._data}i._detachObservableParents(),i._data=this._observe(e),i._pristineData=e.slice(0),i._storeData(),i._ranges=[],i.trigger("reset"),i._addRange(i._data),i._total=i._data.length,i._pristineTotal=i._total,i._process(i._data)},view:function(e){return e===t?this._view:(this._view=this._observeView(e),t)},_observeView:function(e){var t,n=this;return A(e,n._data,n._ranges,n.reader.model||q,n._isServerGrouped()),t=new U(e,n.reader.model),t.parent=function(){return n.parent()},t},flatView:function(){var e=this.group()||[];return e.length?T(this._view):this._view},add:function(e){return this.insert(this._data.length,e)},_createNewModel:function(e){return this.reader.model?new this.reader.model(e):e instanceof q?e:new q(e)},insert:function(e,t){return t||(t=e,e=0),t instanceof $||(t=this._createNewModel(t)),this._isServerGrouped()?this._data.splice(e,0,this._wrapInEmptyGroup(t)):this._data.splice(e,0,t),this._insertModelInRange(e,t),t},pushInsert:function(e,t){var n,i,r,o,a,s;t||(t=e,e=0),pe(t)||(t=[t]),n=[],i=this.options.autoSync,this.options.autoSync=!1;try{for(r=0;r<t.length;r++)o=t[r],a=this.insert(e,o),n.push(a),s=a.toJSON(),this._isServerGrouped()&&(s=this._wrapInEmptyGroup(s)),this._pristineData.push(s),e++}finally{this.options.autoSync=i}n.length&&this.trigger("push",{type:"create",items:n})},pushCreate:function(e){this.pushInsert(this._data.length,e)},pushUpdate:function(e){var t,n,i,r,o;for(pe(e)||(e=[e]),t=[],n=0;n<e.length;n++)i=e[n],r=this._createNewModel(i),o=this.get(r.id),o?(t.push(o),o.accept(i),o.trigger(Fe),this._updatePristineForModel(o,i)):this.pushCreate(i);t.length&&this.trigger("push",{type:"update",items:t})},pushDestroy:function(e){var t=this._removeItems(e);t.length&&this.trigger("push",{type:"destroy",items:t})},_removeItems:function(e){var t,n,i,r,o,a;pe(e)||(e=[e]),t=[],n=this.options.autoSync,this.options.autoSync=!1;try{for(i=0;i<e.length;i++)r=e[i],o=this._createNewModel(r),a=!1,this._eachItem(this._data,function(e){var n,i;for(n=0;n<e.length;n++)if(i=e.at(n),i.id===o.id){t.push(i),e.splice(n,1),a=!0;break}}),a&&(this._removePristineForModel(o),this._destroyed.pop())}finally{this.options.autoSync=n}return t},remove:function(e){var t,n=this,i=n._isServerGrouped();return this._eachItem(n._data,function(r){if(t=I(r,e),t&&i)return t.isNew&&t.isNew()||n._destroyed.push(t),!0}),this._removeModelFromRanges(e),e},destroyed:function(){return this._destroyed},created:function(){var e,t,n=[],i=this._flatData(this._data,this.options.useRanges);for(e=0,t=i.length;e<t;e++)i[e].isNew&&i[e].isNew()&&n.push(i[e]);return n},updated:function(){var e,t,n=[],i=this._flatData(this._data,this.options.useRanges);for(e=0,t=i.length;e<t;e++)i[e].isNew&&!i[e].isNew()&&i[e].dirty&&n.push(i[e]);return n},sync:function(){var t,n=this,i=[],r=[],o=n._destroyed,a=e.Deferred().resolve().promise();if(n.online()){if(!n.reader.model)return a;i=n.created(),r=n.updated(),t=[],n.options.batch&&n.transport.submit?t=n._sendSubmit(i,r,o):(t.push.apply(t,n._send("create",i)),t.push.apply(t,n._send("update",r)),t.push.apply(t,n._send("destroy",o))),a=e.when.apply(null,t).then(function(){var e,t;for(e=0,t=arguments.length;e<t;e++)arguments[e]&&n._accept(arguments[e]);n._storeData(!0),n._change({action:"sync"}),n.trigger(Ee)})}else n._storeData(!0),n._change({action:"sync"});return a},cancelChanges:function(e){var t=this;e instanceof _e.data.Model?t._cancelModel(e):(t._destroyed=[],t._detachObservableParents(),t._data=t._observe(t._pristineData),t.options.serverPaging&&(t._total=t._pristineTotal),t._ranges=[],t._addRange(t._data,0),t._change(),t._markOfflineUpdatesAsDirty())},_markOfflineUpdatesAsDirty:function(){var e=this;null!=e.options.offlineStorage&&e._eachItem(e._data,function(e){var t,n;for(t=0;t<e.length;t++)n=e.at(t),"update"!=n.__state__&&"create"!=n.__state__||(n.dirty=!0)})},hasChanges:function(){var e,t,n=this._flatData(this._data,this.options.useRanges);if(this._destroyed.length)return!0;for(e=0,t=n.length;e<t;e++)if(n[e].isNew&&n[e].isNew()||n[e].dirty)return!0;return!1},_accept:function(t){var n,i=this,r=t.models,o=t.response,a=0,s=i._isServerGrouped(),l=i._pristineData,d=t.type;if(i.trigger(ze,{response:o,type:d}),o&&!he(o)){if(o=i.reader.parse(o),i._handleCustomErrors(o))return;o=i.reader.data(o),pe(o)||(o=[o])}else o=e.map(r,function(e){return e.toJSON()});for("destroy"===d&&(i._destroyed=[]),a=0,n=r.length;a<n;a++)"destroy"!==d?(r[a].accept(o[a]),"create"===d?l.push(s?i._wrapInEmptyGroup(r[a]):o[a]):"update"===d&&i._updatePristineForModel(r[a],o[a])):i._removePristineForModel(r[a]);
},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,function(e,n){_e.deepExtend(n[e],t)})},_executeOnPristineForModel:function(e,t){this._eachPristineItem(function(n){var i=R(n,e);if(i>-1)return t(i,n),!0})},_removePristineForModel:function(e){this._executeOnPristineForModel(e,function(e,t){t.splice(e,1)})},_readData:function(e){var t=this._isServerGrouped()?this.reader.groups:this.reader.data;return t.call(this.reader,e)},_eachPristineItem:function(e){this._eachItem(this._pristineData,e)},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?D(e,t):t(e))},_pristineForModel:function(e){var t,n,i=function(i){if(n=R(i,e),n>-1)return t=i[n],!0};return this._eachPristineItem(i),t},_cancelModel:function(e){var t=this,n=this._pristineForModel(e);this._eachItem(this._data,function(i){var r=M(i,e);r>=0&&(!n||e.isNew()&&!n.__state__?(i.splice(r,1),t._removeModelFromRanges(e)):(i[r].accept(n),"update"==n.__state__&&(i[r].dirty=!0)))})},_submit:function(t,n){var i=this;i.trigger(Re,{type:"submit"}),i.trigger(Me),i.transport.submit(de({success:function(n,i){var r=e.grep(t,function(e){return e.type==i})[0];r&&r.resolve({response:n,models:r.models,type:i})},error:function(e,n,r){for(var o=0;o<t.length;o++)t[o].reject(e);i.error(e,n,r)}},n))},_sendSubmit:function(t,n,i){var r=this,o=[];return r.options.batch&&(t.length&&o.push(e.Deferred(function(e){e.type="create",e.models=t})),n.length&&o.push(e.Deferred(function(e){e.type="update",e.models=n})),i.length&&o.push(e.Deferred(function(e){e.type="destroy",e.models=i})),r._submit(o,{data:{created:r.reader.serialize(b(t)),updated:r.reader.serialize(b(n)),destroyed:r.reader.serialize(b(i))}})),o},_promise:function(t,n,i){var r=this;return e.Deferred(function(e){r.trigger(Re,{type:i}),r.trigger(Me),r.transport[i].call(r.transport,de({success:function(t){e.resolve({response:t,models:n,type:i})},error:function(t,n,i){e.reject(t),r.error(t,n,i)}},t))}).promise()},_send:function(e,t){var n,i,r=this,o=[],a=r.reader.serialize(b(t));if(r.options.batch)t.length&&o.push(r._promise({data:{models:a}},t,e));else for(n=0,i=t.length;n<i;n++)o.push(r._promise({data:a[n]},[t[n]],e));return o},read:function(t){var n=this,i=n._params(t),r=e.Deferred();return n._queueRequest(i,function(){var e=n.trigger(Re,{type:"read"});e?(n._dequeueRequest(),r.resolve(e)):(n.trigger(Me),n._ranges=[],n.trigger("reset"),n.online()?n.transport.read({data:i,success:function(e){n._ranges=[],n.success(e,i),r.resolve()},error:function(){var e=je.call(arguments);n.error.apply(n,e),r.reject.apply(r,e)}}):null!=n.options.offlineStorage&&(n.success(n.offlineData(),i),r.resolve()))}),r.promise()},_readAggregates:function(e){return this.reader.aggregates(e)},success:function(e){var n,i,r,o,a,s,l,d,u,c,h=this,p=h.options;if(h.trigger(ze,{response:e,type:"read"}),h.online()){if(e=h.reader.parse(e),h._handleCustomErrors(e))return h._dequeueRequest(),t;h._total=h.reader.total(e),h._aggregate&&p.serverAggregates&&(h._aggregateResult=h._readAggregates(e)),n=arguments.length>1?arguments[1]:t,e=h._readData(e,n),h._destroyed=[]}else{for(e=h._readData(e),i=[],r={},o=h.reader.model,a=o?o.idField:"id",s=0;s<this._destroyed.length;s++)l=this._destroyed[s][a],r[l]=l;for(s=0;s<e.length;s++)d=e[s],u=d.__state__,"destroy"==u?r[d[a]]||this._destroyed.push(this._createNewModel(d)):i.push(d);e=i,h._total=e.length}if(h._pristineTotal=h._total,h._pristineData=e.slice(0),h._detachObservableParents(),h.options.endless){for(h._data.unbind(Fe,h._changeHandler),e=h._observe(e),c=0;c<e.length;c++)h._data.push(e[c]);h._data.bind(Fe,h._changeHandler)}else h._data=h._observe(e);h._markOfflineUpdatesAsDirty(),h._storeData(),h._addRange(h._data),h._process(h._data),h._dequeueRequest()},_detachObservableParents:function(){if(this._data&&this._shouldDetachObservableParents)for(var e=0;e<this._data.length;e++)this._data[e].parent&&(this._data[e].parent=ve)},_storeData:function(e){function t(e){var n,i,r,o=[];for(n=0;n<e.length;n++)i=e.at(n),r=i.toJSON(),a&&i.items?r.items=t(i.items):(r.uid=i.uid,s&&(i.isNew()?r.__state__="create":i.dirty&&(r.__state__="update"))),o.push(r);return o}var n,i,r,o,a=this._isServerGrouped(),s=this.reader.model;if(null!=this.options.offlineStorage){for(n=t(this._data),i=[],r=0;r<this._destroyed.length;r++)o=this._destroyed[r].toJSON(),o.__state__="destroy",i.push(o);this.offlineData(n.concat(i)),e&&(this._pristineData=this._readData(n))}},_addRange:function(e,n){var i=this,r=t!==n?n:i._skip||0,o=r+i._flatData(e,!0).length;i._ranges.push({start:r,end:o,data:e,timestamp:(new Date).getTime()}),i._ranges.sort(function(e,t){return e.start-t.start})},error:function(e,t,n){this._dequeueRequest(),this.trigger(ze,{}),this.trigger(Ie,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=de({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate},e);return t.options.serverPaging||(delete n.take,delete n.skip,delete n.page,delete n.pageSize),t.options.serverGrouping?t.reader.model&&n.group&&(n.group=B(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=N(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=B(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=B(n.aggregate,t.reader.model)):delete n.aggregate,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:ue(n,i),options:e}:(i._requestInProgress=!0,i._pending=t,n())},_dequeueRequest:function(){var e=this;e._requestInProgress=!1,e._pending&&e._queueRequest(e._pending.options,e._pending.callback)},_handleCustomErrors:function(e){if(this.reader.errors){var t=this.reader.errors(e);if(t)return this.trigger(Ie,{xhr:null,status:"customerror",errorThrown:"custom error",errors:t}),!0}return!1},_shouldWrap:function(e){var t=this.reader.model;return!(!t||!e.length)&&!(e[0]instanceof t)},_observe:function(e){var t,n=this,i=n.reader.model;return n._shouldDetachObservableParents=!0,e instanceof Qe?(n._shouldDetachObservableParents=!1,n._shouldWrap(e)&&(e.type=n.reader.model,e.wrapAll(e,e))):(t=n.pageSize()&&!n.options.serverPaging?U:Qe,e=new t(e,n.reader.model),e.parent=function(){return n.parent()}),n._isServerGrouped()&&S(e,i),n._changeHandler&&n._data&&n._data instanceof Qe?n._data.unbind(Fe,n._changeHandler):n._changeHandler=ue(n._change,n),e.bind(Fe,n._changeHandler)},_updateTotalForAction:function(e,t){var n=this,i=parseInt(n._total,10);v(n._total)||(i=parseInt(n._pristineTotal,10)),"add"===e?i+=t.length:"remove"===e?i-=t.length:"itemchange"===e||"sync"===e||n.options.serverPaging?"sync"===e&&(i=n._pristineTotal=parseInt(n._total,10)):i=n._pristineTotal,n._total=i},_change:function(e){var t,n,i,r=this,o=e?e.action:"";if("remove"===o)for(t=0,n=e.items.length;t<n;t++)e.items[t].isNew&&e.items[t].isNew()||r._destroyed.push(e.items[t]);!r.options.autoSync||"add"!==o&&"remove"!==o&&"itemchange"!==o?(r._updateTotalForAction(o,e?e.items:[]),r._process(r._data,e)):(i=function(t){"sync"===t.action&&(r.unbind("change",i),r._updateTotalForAction(o,e.items))},r.first("change",i),r.sync())},_calculateAggregates:function(e,t){t=t||{};var n=new o(e),i=t.aggregate,r=t.filter;return r&&(n=n.filter(r)),n.aggregate(i)},_process:function(e,n){var i,r=this,o={};r.options.serverPaging!==!0&&(o.skip=r._skip,o.take=r._take||r._pageSize,o.skip===t&&r._page!==t&&r._pageSize!==t&&(o.skip=(r._page-1)*r._pageSize)),r.options.serverSorting!==!0&&(o.sort=r._sort),r.options.serverFiltering!==!0&&(o.filter=r._filter),r.options.serverGrouping!==!0&&(o.group=r._group),r.options.serverAggregates!==!0&&(o.aggregate=r._aggregate,r._aggregateResult=r._calculateAggregates(e,o)),i=r._queryProcess(e,o),r.view(i.data),i.total===t||r.options.serverFiltering||(r._total=i.total),n=n||{},n.items=n.items||r._view,r.trigger(Fe,n)},_queryProcess:function(e,t){return this.options.inPlaceSort?o.process(e,t,this.options.inPlaceSort):o.process(e,t)},_mergeState:function(e){var n=this;return e!==t&&(n._pageSize=e.pageSize,n._page=e.page,n._sort=e.sort,n._filter=e.filter,n._group=e.group,n._aggregate=e.aggregate,n._skip=n._currentRangeStart=e.skip,n._take=e.take,n._skip===t&&(n._skip=n._currentRangeStart=n.skip(),e.skip=n.skip()),n._take===t&&n._pageSize!==t&&(n._take=n._pageSize,e.take=n._take),e.sort&&(n._sort=e.sort=a(e.sort)),e.filter&&(n._filter=e.filter=l(e.filter)),e.group&&(n._group=e.group=f(e.group)),e.aggregate&&(n._aggregate=e.aggregate=p(e.aggregate))),e},query:function(n){var i,r,o,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&&(r=n.pageSize-this.pageSize(),r>0?(r=this.pageSize(),n.page=n.pageSize/r,n.pageSize=r):(n.page=1,this.options.endless=!1)),this.read(this._mergeState(n))):(o=this.trigger(Re,{type:"read"}),o||(this.trigger(Me),i=this._queryProcess(this._data,this._mergeState(n)),this.options.serverFiltering||(this._total=i.total!==t?i.total:this._data.length),this._aggregateResult=this._calculateAggregates(this._data,n),this.view(i.data),this.trigger(ze,{type:"read"}),this.trigger(Fe,{items:i.data})),e.Deferred().resolve(o).promise())},fetch:function(e){var t=this,n=function(n){n!==!0&&be(e)&&e.call(t)};return this._query().then(n)},_query:function(e){var t=this;return t.query(de({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate()},e))},next:function(e){var t=this,n=t.page(),i=t.total();if(e=e||{},n&&!(i&&n+1>t.totalPages()))return t._skip=t._currentRangeStart=n*t.take(),n+=1,e.page=n,t._query(e),n},prev:function(e){var t=this,n=t.page();if(e=e||{},n&&1!==n)return t._skip=t._currentRangeStart=t._skip-t.take(),n-=1,e.page=n,t._query(e),n},page:function(e){var n,i=this;return e!==t?(e=Le.max(Le.min(Le.max(e,1),i.totalPages()),1),i._query({page:e}),t):(n=i.skip(),n!==t?Le.round((n||0)/(i.take()||1))+1:t)},pageSize:function(e){var n=this;return e!==t?(n._query({pageSize:e,page:1}),t):n.take()},sort:function(e){var n=this;return e!==t?(n._query({sort:e}),t):n._sort},filter:function(e){var n=this;return e===t?n._filter:(n.trigger("reset"),n._query({filter:e,page:1}),t)},group:function(e){var n=this;return e!==t?(n._query({group:e}),t):n._group},total:function(){return parseInt(this._total||0,10)},aggregate:function(e){var n=this;return e!==t?(n._query({aggregate:e}),t):n._aggregate},aggregates:function(){var e=this._aggregateResult;return he(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t,n,i={};if(!he(e))for(t={},pe(e)||(e=[e]),n=0;n<e.length;n++)t[e[n].aggregate]=0,i[e[n].field]=t;return i},_wrapInEmptyGroup:function(e){var t,n,i,r,o=this.group();for(i=o.length-1,r=0;i>=r;i--)n=o[i],t={value:e.get(n.field),field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total();return Le.ceil((e.total()||0)/t)},inRange:function(e,t){var n=this,i=Le.min(e+t,n.total());return!n.options.serverPaging&&n._data.length>0||n._findRange(e,i).length>0},lastRange:function(){var e=this._ranges;return e[e.length-1]||{start:0,end:0,data:[]}},firstItemUid:function(){var e=this._ranges;return e.length&&e[0].data.length&&e[0].data[0].uid},enableRequestsInProgress:function(){this._skipRequestsInProgress=!1},_timeStamp:function(){return(new Date).getTime()},range:function(e,n,i){var r,o,a,s,l,d,u,c;if(this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0,e=Le.min(e||0,this.total()),r=this,o=Le.max(Le.floor(e/n),0)*n,a=Le.min(o+n,r.total()),s=r._findRange(e,Le.min(e+n,r.total())),s.length){r._pending=t,r._skip=e>r.skip()?Le.min(a,(r.totalPages()-1)*r.take()):o,r._currentRangeStart=e,r._take=n,l=r.options.serverPaging,d=r.options.serverSorting,u=r.options.serverFiltering,c=r.options.serverAggregates;try{r.options.serverPaging=!0,r._isServerGrouped()||r.group()&&r.group().length||(r.options.serverSorting=!0),r.options.serverFiltering=!0,r.options.serverPaging=!0,r.options.serverAggregates=!0,l&&(r._detachObservableParents(),r._data=s=r._observe(s)),r._process(s)}finally{r.options.serverPaging=l,r.options.serverSorting=d,r.options.serverFiltering=u,r.options.serverAggregates=c}return be(i)&&i(),t}n!==t&&(r._rangeExists(o,a)?o<e&&r.prefetch(a,n,function(){r.range(e,n,i)}):r.prefetch(o,n,function(){e>o&&a<r.total()&&!r._rangeExists(a,Le.min(a+n,r.total()))?r.prefetch(a,n,function(){r.range(e,n,i)}):r.range(e,n,i)}))},_findRange:function(e,n){var i,r,o,s,l,d,u,c,h,p,m,g,v=this,_=v._ranges,b=[],k=v.options,w=k.serverSorting||k.serverPaging||k.serverFiltering||k.serverGrouping||k.serverAggregates;for(r=0,m=_.length;r<m;r++)if(i=_[r],e>=i.start&&e<=i.end){for(p=0,o=r;o<m;o++)if(i=_[o],h=v._flatData(i.data,!0),h.length&&e+p>=i.start&&(d=i.data,u=i.end,w||(k.inPlaceSort?c=v._queryProcess(i.data,{filter:v.filter()}):(g=f(v.group()||[]).concat(a(v.sort()||[])),c=v._queryProcess(i.data,{sort:g,filter:v.filter()})),h=d=c.data,c.total!==t&&(u=c.total)),s=0,e+p>i.start&&(s=e+p-i.start),l=h.length,u>n&&(l-=u-n),p+=l-s,b=v._mergeGroups(b,d,s,l),n<=i.end&&p==n-e))return b;break}return[]},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var r,o=t.toJSON();return e.length&&(r=e[e.length-1]),C(r,o,n,i),e.concat(o)}return e.concat(t.slice(n,i))},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var r=this,o=r._timeStamp();return function(a){var s,l,d,u=!1,c={start:e,end:t,data:[],timestamp:r._timeStamp()};if(r._dequeueRequest(),r.trigger(ze,{response:a,type:"read"}),a=r.reader.parse(a),d=r._readData(a),d.length){for(s=0,l=r._ranges.length;s<l;s++)if(r._ranges[s].start===e){u=!0,c=r._ranges[s];break}u||r._ranges.push(c)}c.data=r._observe(d),c.end=c.start+r._flatData(c.data,!0).length,r._ranges.sort(function(e,t){return e.start-t.start}),r._total=r.reader.total(a),(i||o>=r._currentRequestTimeStamp||!r._skipRequestsInProgress)&&(n&&d.length?n():r.trigger(Fe,{}))}},prefetch:function(e,t,n){var i=this,r=Le.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():(clearTimeout(i._timeout),i._timeout=setTimeout(function(){i._queueRequest(o,function(){i.trigger(Re,{type:"read"})?i._dequeueRequest():i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n),error:function(){var e=je.call(arguments);i.error.apply(i,e)}})})},100))},_multiplePrefetch:function(e,t,n){var i=this,r=Le.min(e+t,i.total()),o={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,r)?n&&n():i.trigger(Re,{type:"read"})||i.transport.read({data:i._params(o),success:i._prefetchSuccessHandler(e,r,n,!0)})},_rangeExists:function(e,t){var n,i,r=this,o=r._ranges;for(n=0,i=o.length;n<i;n++)if(o[n].start<=e&&o[n].end>=t)return!0;return!1},_removeModelFromRanges:function(e){var t,n,i,r,o=this;for(i=0,r=this._ranges.length;i<r&&(n=this._ranges[i],this._eachItem(n.data,function(n){t=I(n,e)}),!t);i++);o._updateRangesLength()},_insertModelInRange:function(e,t){var n,i,r=this,o=r._ranges||[],a=o.length;for(i=0;i<a;i++)if(n=o[i],n.start<=e&&n.end>=e){r._getByUid(t.uid,n.data)||(r._isServerGrouped()?n.data.splice(e,0,r._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}r._updateRangesLength()},_updateRangesLength:function(){var e,t,n=this,i=n._ranges||[],r=i.length,o=!1,a=0,s=0;for(t=0;t<r;t++)e=i[t],s=n._flatData(e.data,!0).length-Le.abs(e.end-e.start),o||0===s?o&&(e.start+=a,e.end+=a):(o=!0,a=s,e.end+=a)}}),re={},re.create=function(t,n,i){var r,o=t.transport?e.extend({},t.transport):null;return o?(o.read=typeof o.read===ye?{url:o.read}:o.read,"jsdo"===t.type&&(o.dataSource=i),t.type&&(_e.data.transports=_e.data.transports||{},_e.data.schemas=_e.data.schemas||{},_e.data.transports[t.type]?ce(_e.data.transports[t.type])?o=de(!0,{},_e.data.transports[t.type],o):r=new _e.data.transports[t.type](de(o,{data:n})):_e.logToConsole("Unknown DataSource transport type '"+t.type+"'.\nVerify that registration scripts for this type are included after Kendo UI on the page.","warn"),t.schema=de(!0,{},_e.data.schemas[t.type],t.schema)),r||(r=be(o.read)?o:new ee(o))):r=new Z({data:t.data||[]}),r},ie.create=function(e){(pe(e)||e instanceof Qe)&&(e={data:e});var n,i,r,o=e||{},a=o.data,s=o.fields,l=o.table,d=o.select,u={};if(a||!s||o.transport||(l?a=L(l,s):d&&(a=P(d,s),o.group===t&&a[0]&&a[0].optgroup!==t&&(o.group="optgroup"))),_e.data.Model&&s&&(!o.schema||!o.schema.model)){for(n=0,i=s.length;n<i;n++)r=s[n],r.type&&(u[r.field]=r);he(u)||(o.schema=de(!0,o.schema,{model:{fields:u}}))}return o.data=a,d=null,o.select=null,l=null,o.table=null,o instanceof ie?o:new ie(o)},oe=$.define({idField:"id",init:function(e){var t,n=this,i=n.hasChildren||e&&e.hasChildren,r="items",o={};_e.data.Model.fn.init.call(n,e),typeof n.children===ye&&(r=n.children),o={schema:{data:r,model:{hasChildren:i,id:n.idField,fields:n.fields}}},typeof n.children!==ye&&de(o,n.children),o.data=e,i||(i=o.schema.data),typeof i===ye&&(i=_e.getter(i)),be(i)&&(t=i.call(n,n),n.hasChildren=(!t||0!==t.length)&&!!t),n._childrenOptions=o,n.hasChildren&&n._initChildren(),n._loaded=!(!e||!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof ae||(e=i.children=new ae(i._childrenOptions),t=e.transport,n=t.parameterMap,t.parameterMap=function(e,t){return e[i.idField||"id"]=i.id,n&&(e=n(e,t)),e},e.parent=function(){return i},e.bind(Fe,function(e){e.node=e.node||i,i.trigger(Fe,e)}),e.bind(Ie,function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(Ie,e))}),i._updateChildrenField())},append:function(e){this._initChildren(),this.loaded(!0),this.children.add(e)},hasChildren:!1,level:function(){for(var e=this.parentNode(),t=0;e&&e.parentNode;)t++,e=e.parentNode?e.parentNode():null;return t},_updateChildrenField:function(){var e=this._childrenOptions.schema.data;this[e||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var n,i,r={},o="_query";return this.hasChildren?(this._initChildren(),n=this.children,r[this.idField||"id"]=this.id,this._loaded||(n._data=t,o="read"),n.one(Fe,ue(this._childrenLoaded,this)),this._matchFilter&&(r.filter={field:"_matchFilter",operator:"eq",value:!0}),i=n[o](r)):this.loaded(!0),i||e.Deferred().resolve().promise()},parentNode:function(){var e=this.parent();return e.parent()},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return $.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}}),ae=ie.extend({init:function(e){var t=oe.define({children:e});e.filter&&!e.serverFiltering&&(this._hierarchicalFilter=e.filter,e.filter=null),ie.fn.init.call(this,de(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(Ie,function(t){e.trigger(Ie,t)})},read:function(e){var t=ie.fn.read.call(this,e);return this._hierarchicalFilter&&(this._data&&this._data.length>0?this.filter(this._hierarchicalFilter):(this.options.filter=this._hierarchicalFilter,this._filter=l(this.options.filter),this._hierarchicalFilter=null)),t},remove:function(e){var t,n=e.parentNode(),i=this;return n&&n._initChildren&&(i=n.children),t=ie.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:O("success"),data:O("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),ie.fn.insert.call(this,e,t)},filter:function(e){return e===t?this._filter:(!this.options.serverFiltering&&this._markHierarchicalQuery(e)&&(e={logic:"or",filters:[e,{field:"_matchFilter",operator:"equals",value:!0}]}),this.trigger("reset"),this._query({filter:e,page:1}),t)},_markHierarchicalQuery:function(e){var t,n,i,r,a;return e=l(e),e&&0!==e.filters.length?(t=o.filterExpr(e),i=t.fields,r=t.operators,n=a=Function("d, __f, __o","return "+t.expression),(i.length||r.length)&&(a=function(e){return n(e,i,r)}),this._updateHierarchicalFilter(a),!0):(this._updateHierarchicalFilter(function(){return!0}),!1)},_updateHierarchicalFilter:function(e){var t,n,i=this._data,r=!1;for(n=0;n<i.length;n++)t=i[n],t.hasChildren?(t._matchFilter=t.children._updateHierarchicalFilter(e),t._matchFilter||(t._matchFilter=e(t))):t._matchFilter=e(t),t._matchFilter&&(r=!0);return r},_find:function(e,t){var n,i,r,o,a=this._data;if(a){if(r=ie.fn[e].call(this,t))return r;for(a=this._flatData(this._data),n=0,i=a.length;n<i;n++)if(o=a[n].children,o instanceof ae&&(r=o[e](t)))return r}},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}}),ae.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data,i=t.fields,r=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||r&&(n=V(r,i)),t.data=n,t instanceof ae?t:new ae(t))},se=_e.Observable.extend({init:function(e,t,n){_e.Observable.fn.init.call(this),this._prefetching=!1,this.dataSource=e,this.prefetch=!n;var i=this;e.bind("change",function(){i._change()}),e.bind("reset",function(){i._reset()}),this._syncWithDataSource(),this.setViewSize(t)},setViewSize:function(e){this.viewSize=e,this._recalculate()},at:function(e){var n=this.pageSize,i=!0;return e>=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e<this.dataOffset||e>=this.skip+n)&&(i=this.range(Math.floor(e/n)*n)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&this.range(this.offset===this.skip?this.previousMidRange:this.previousFullRange),i?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):t:this.dataSource.view()[e]},indexOf:function(e){return this.dataSource.data().indexOf(e)+this.dataOffset},total:function(){return parseInt(this.dataSource.total(),10)},next:function(){var e=this,t=e.pageSize,n=e.skip-e.viewSize+t,i=Le.max(Le.floor(n/t),0)*t;this.offset=n,this.dataSource.prefetch(i,t,function(){e._goToRange(n,!0)})},range:function(e,t){if(this.offset===e)return!0;var n=this,i=this.pageSize,r=Le.max(Le.floor(e/i),0)*i,o=this.dataSource;return t&&(r+=i),o.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(o.prefetch(r,i,function(){n.offset=e,n._recalculate(),n._goToRange(e,!0)}),!1)},syncDataSource:function(){var e=this.offset;this.offset=null,this.range(e)},destroy:function(){this.unbind()},_prefetch:function(){var e=this,t=this.pageSize,n=this.skip+t,i=this.dataSource;i.inRange(n,t)||this._prefetching||!this.prefetch||(this._prefetching=!0,this.trigger("prefetching",{skip:n,take:t}),i.prefetch(n,t,function(){e._prefetching=!1,e.trigger("prefetched",{skip:n,take:t})}))},_goToRange:function(e,t){this.offset===e&&(this.dataOffset=e,this._expanding=t,this.dataSource.range(e,this.pageSize),this.dataSource.enableRequestsInProgress())},_reset:function(){this._syncPending=!0},_change:function(){var e=this.dataSource;this.length=this.useRanges?e.lastRange().end:e.view().length,this._syncPending&&(this._syncWithDataSource(),this._recalculate(),this._syncPending=!1,this.trigger("reset",{offset:this.offset})),this.trigger("resize"),this._expanding&&this.trigger("expand"),delete this._expanding},_syncWithDataSource:function(){var e=this.dataSource;this._firstItemUid=e.firstItemUid(),this.dataOffset=this.offset=e.skip()||0,this.pageSize=e.pageSize(),this.useRanges=e.options.serverPaging},_recalculate:function(){var e=this.pageSize,t=this.offset,n=this.viewSize,i=Math.ceil(t/e)*e;this.skip=i,this.midPageThreshold=i+e-1,this.nextPageThreshold=i+n-1,this.prefetchThreshold=i+Math.floor(e/3*2),this.pullBackThreshold=this.offset-1,this.nextMidRange=i+e-n,this.nextFullRange=i,this.previousMidRange=t-n,this.previousFullRange=i-e}}),le=_e.Observable.extend({init:function(e,t){var n=this;_e.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new se(e,3*t),this.buffer.bind({endreached:function(e){n.trigger("endreached",{index:e.index})},prefetching:function(e){n.trigger("prefetching",{skip:e.skip,take:e.take})},prefetched:function(e){n.trigger("prefetched",{skip:e.skip,take:e.take})},reset:function(){n._total=0,n.trigger("reset")},resize:function(){n._total=Math.ceil(this.length/n.batchSize),n.trigger("resize",{total:n.total(),offset:this.offset})}})},syncDataSource:function(){this.buffer.syncDataSource()},at:function(e){var t,n,i=this.buffer,r=e*this.batchSize,o=this.batchSize,a=[];for(i.offset>r&&i.at(i.offset-1),n=0;n<o&&(t=i.at(r+n),null!==t);n++)a.push(t);return a},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}}),de(!0,_e.data,{readers:{json:ne},Query:o,DataSource:ie,HierarchicalDataSource:ae,Node:oe,ObservableObject:q,ObservableArray:Qe,LazyObservableArray:U,LocalTransport:Z,RemoteTransport:ee,Cache:te,DataReader:ne,Model:$,Buffer:se,BatchBuffer:le})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.binder.min",["kendo.core.min","kendo.data.min"],e)}(function(){return function(e,t){function n(t,n,i){return v.extend({init:function(e,t,n){var i=this;v.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=I(i.dataBinding,i),i._dataBound=I(i.dataBound,i),i._itemChange=I(i.itemChange,i)},itemChange:function(e){a(e.item[0],e.data,this._ns(e.ns),[e.data].concat(this.bindings[t]._parents()))},dataBinding:function(e){var t,n,i=this.widget,r=e.removedItems||i.items();for(t=0,n=r.length;t<n;t++)d(r[t],!1)},_ns:function(t){t=t||C.ui;var n=[C.ui,C.dataviz.ui,C.mobile.ui];return n.splice(e.inArray(t,n),1),n.unshift(t),C.rolesFromNamespaces(n)},dataBound:function(e){var i,r,o,s,l=this.widget,d=e.addedItems||l.items(),u=l[n],c=C.data.HierarchicalDataSource;if(!(c&&u instanceof c)&&d.length)for(o=e.addedDataItems||u.flatView(),s=this.bindings[t]._parents(),i=0,r=o.length;i<r;i++)d[i]&&a(d[i],o[i],this._ns(e.ns),[o[i]].concat(s))},refresh:function(e){var r,o,a,s=this,l=s.widget;e=e||{},e.action||(s.destroy(),l.bind("dataBinding",s._dataBinding),l.bind("dataBound",s._dataBound),l.bind("itemChange",s._itemChange),r=s.bindings[t].get(),l[n]instanceof C.data.DataSource&&l[n]!=r&&(r instanceof C.data.DataSource?l[i](r):r&&r._dataSource?l[i](r._dataSource):(l[n].data(r),o=C.ui.Select&&l instanceof C.ui.Select,a=C.ui.MultiSelect&&l instanceof C.ui.MultiSelect,s.bindings.value&&(o||a)&&l.value(p(s.bindings.value.get(),l.options.dataValueField)))))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}})}function i(e,t){var n=C.initWidget(e,{},t);if(n)return new w(n)}function r(e){var t,n,i,o,a,s,l,d={};for(l=e.match(y),t=0,n=l.length;t<n;t++)i=l[t],o=i.indexOf(":"),a=i.substring(0,o),s=i.substring(o+1),"{"==s.charAt(0)&&(s=r(s)),d[a]=s;return d}function o(e,t,n){var i,r={};for(i in e)r[i]=new n(t,e[i]);return r}function a(e,t,n,s){var d,u,c,h,p=e.getAttribute("data-"+C.ns+"role"),v=e.getAttribute("data-"+C.ns+"bind"),_=[],b=!0,w={};if(s=s||[t],(p||v)&&l(e,!1),p&&(c=i(e,n)),v&&(v=r(v.replace(x,"")),c||(w=C.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:L,valuePrimitive:!1,autoBind:!0}),w.roles=n,c=new k(e,w)),c.source=t,u=o(v,s,f),w.template&&(u.template=new g(s,"",w.template)),u.click&&(v.events=v.events||{},v.events.click=v.click,u.click.destroy(),delete u.click),u.source&&(b=!1),v.attr&&(u.attr=o(v.attr,s,f)),v.style&&(u.style=o(v.style,s,f)),v.events&&(u.events=o(v.events,s,m)),v.css&&(u.css=o(v.css,s,f)),c.bind(u)),c&&(e.kendoBindingTarget=c),h=e.children,b&&h){for(d=0;d<h.length;d++)_[d]=h[d];for(d=0;d<_.length;d++)a(_[d],t,n,s)}}function s(t,n){var i,r,o,s=C.rolesFromNamespaces([].slice.call(arguments,2));for(n=C.observable(n),t=e(t),i=0,r=t.length;i<r;i++)o=t[i],1===o.nodeType&&a(o,n,s)}function l(t,n){var i,r=t.kendoBindingTarget;r&&(r.destroy(),B?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),n&&(i=C.widgetInstance(e(t)),i&&typeof i.destroy===P&&i.destroy())}function d(e,t){l(e,t),u(e,t)}function u(e,t){var n,i,r=e.children;if(r)for(n=0,i=r.length;n<i;n++)d(r[n],t)}function c(t){var n,i;for(t=e(t),n=0,i=t.length;n<i;n++)d(t[n],!1)}function h(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&s(n,i.source,t)}function p(e,t){var n,i,r=[],o=0;if(!t)return e;if(e instanceof D){for(n=e.length;o<n;o++)i=e[o],r[o]=i.get?i.get(t):i[t];e=r}else e instanceof S&&(e=e.get(t));return e}var f,m,g,v,_,b,k,w,y,x,C=window.kendo,T=C.Observable,S=C.data.ObservableObject,D=C.data.ObservableArray,F={}.toString,E={},A=C.Class,I=e.proxy,R="value",M="source",z="events",H="checked",N="css",B=!0,P="function",L="change";!function(){var e=document.createElement("a");try{delete e.test}catch(t){B=!1}}(),f=T.extend({init:function(e,t){var n=this;T.fn.init.call(n),n.source=e[0],n.parents=e,n.path=t,n.dependencies={},n.dependencies[t]=!0,n.observable=n.source instanceof T,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(L,n._change))},_parents:function(){var t,n=this.parents,i=this.get();return i&&"function"==typeof i.parent&&(t=i.parent(),e.inArray(t,n)<0&&(n=[t].concat(n))),n},change:function(e){var t,n,i=e.field,r=this;if("this"===r.path)r.trigger(L,e);else for(t in r.dependencies)if(0===t.indexOf(i)&&(n=t.charAt(i.length),!n||"."===n||"["===n)){r.trigger(L,e);break}},start:function(e){e.bind("get",this._access)},stop:function(e){e.unbind("get",this._access)},get:function(){var e=this,n=e.source,i=0,r=e.path,o=n;if(!e.observable)return o;for(e.start(e.source),o=n.get(r);o===t&&n;)n=e.parents[++i],n instanceof S&&(o=n.get(r));if(o===t)for(n=e.source;o===t&&n;)n=n.parent(),n instanceof S&&(o=n.get(r));return"function"==typeof o&&(i=r.lastIndexOf("."),i>0&&(n=n.get(r.substring(0,i))),e.start(n),o=n!==e.source?o.call(n,e.source):o.call(n),e.stop(n)),n&&n!==e.source&&(e.currentSource=n,n.unbind(L,e._change).bind(L,e._change)),e.stop(e.source),o},set:function(e){var t=this.currentSource||this.source,n=C.getter(this.path)(t);"function"==typeof n?t!==this.source?n.call(t,this.source,e):n.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(L,this._change),this.currentSource&&this.currentSource.unbind(L,this._change)),this.unbind()}}),m=f.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)t=this.parents[++i],t instanceof S&&(e=t.get(n));return I(e,t)}}),g=f.extend({init:function(e,t,n){var i=this;f.fn.init.call(i,e,t),i.template=n},render:function(e){var t;return this.start(this.source),t=C.render(this.template,e),this.stop(this.source),t}}),v=A.extend({init:function(e,t,n){this.element=e,this.bindings=t,this.options=n},bind:function(e,t){var n=this;e=t?e[t]:e,e.bind(L,function(e){n.refresh(t||e)}),n.refresh(t)},destroy:function(){}}),_=v.extend({dataType:function(){var e=this.element.getAttribute("data-type")||this.element.type||"text";return e.toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=C.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=C.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=C.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==C.parseFloat(e)?!!C.parseFloat(e):"true"===e.toLowerCase()),e}}),E.attr=v.extend({refresh:function(e){
this.element.setAttribute(e,this.bindings.attr[e].get())}}),E.css=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.classes={}},refresh:function(t){var n=e(this.element),i=this.bindings.css[t],r=this.classes[t]=i.get();r?n.addClass(t):n.removeClass(t)}}),E.style=v.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),E.enabled=v.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),E.readonly=v.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),E.disabled=v.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),E.events=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],r=this.handlers[t];r&&n.off(t,r),r=this.handlers[t]=i.get(),n.on(t,i.source,r)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),E.text=v.extend({refresh:function(){var t=this.bindings.text.get(),n=this.element.getAttribute("data-format")||"";null==t&&(t=""),e(this.element).text(C.toString(t,n))}}),E.visible=v.extend({refresh:function(){this.element.style.display=this.bindings.visible.get()?"":"none"}}),E.invisible=v.extend({refresh:function(){this.element.style.display=this.bindings.invisible.get()?"none":""}}),E.html=v.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),E.value=_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=I(this.change,this),this.eventName=i.valueUpdate||L,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=L,this.bindings[R].set(this.parsedValue()),this._initChange=!1},refresh:function(){var e,t;this._initChange||(e=this.bindings[R].get(),null==e&&(e=""),t=this.dataType(),"date"==t?e=C.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=C.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e),this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),E.source=v.extend({init:function(e,t,n){v.fn.init.call(this,e,t,n);var i=this.bindings.source.get();i instanceof C.data.DataSource&&n.autoBind!==!1&&i.fetch()},refresh:function(e){var t=this,n=t.bindings.source.get();n instanceof D||n instanceof C.data.DataSource?(e=e||{},"add"==e.action?t.add(e.index,e.items):"remove"==e.action?t.remove(e.index,e.items):"itemchange"!=e.action&&t.render()):t.render()},container:function(){var e=this.element;return"table"==e.nodeName.toLowerCase()&&(e.tBodies[0]||e.appendChild(document.createElement("tbody")),e=e.tBodies[0]),e},template:function(){var e=this.options,t=e.template,n=this.container().nodeName.toLowerCase();return t||(t="select"==n?e.valueField||e.textField?C.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==n?"<tr><td>#:data#</td></tr>":"ul"==n||"ol"==n?"<li>#:data#</li>":"#:data#",t=C.template(t)),t},add:function(t,n){var i,r,o,s,l=this.container(),d=l.cloneNode(!1),u=l.children[t];if(e(d).html(C.render(this.template(),n)),d.children.length)for(i=this.bindings.source._parents(),r=0,o=n.length;r<o;r++)s=d.children[0],l.insertBefore(s,u||null),a(s,n[r],this.options.roles,[n[r]].concat(i))},remove:function(e,t){var n,i,r=this.container();for(n=0;n<t.length;n++)i=r.children[e],d(i,!0),i.parentNode==r&&r.removeChild(i)},render:function(){var t,n,i,r=this.bindings.source.get(),o=this.container(),s=this.template();if(null!=r)if(r instanceof C.data.DataSource&&(r=r.view()),r instanceof D||"[object Array]"===F.call(r)||(r=[r]),this.bindings.template){if(u(o,!0),e(o).html(this.bindings.template.render(r)),o.children.length)for(t=this.bindings.source._parents(),n=0,i=r.length;n<i;n++)a(o.children[n],r[n],this.options.roles,[r[n]].concat(t))}else e(o).html(C.render(s,r))}}),E.input={checked:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=I(this.change,this),e(this.element).change(this._change)},change:function(){var e,t,n,i=this.element,r=this.value();if("radio"==i.type)r=this.parsedValue(),this.bindings[H].set(r);else if("checkbox"==i.type)if(e=this.bindings[H].get(),e instanceof D){if(r=this.parsedValue(),r instanceof Date){for(n=0;n<e.length;n++)if(e[n]instanceof Date&&+e[n]===+r){t=n;break}}else t=e.indexOf(r);t>-1?e.splice(t,1):e.push(r)}else this.bindings[H].set(r)},refresh:function(){var e,t,n=this.bindings[H].get(),i=n,r=this.dataType(),o=this.element;if("checkbox"==o.type)if(i instanceof D){if(e=-1,n=this.parsedValue(),n instanceof Date){for(t=0;t<i.length;t++)if(i[t]instanceof Date&&+i[t]===+n){e=t;break}}else e=i.indexOf(n);o.checked=e>=0}else o.checked=i;else"radio"==o.type&&null!=n&&("date"==r?n=C.toString(n,"yyyy-MM-dd"):"datetime-local"==r&&(n=C.toString(n,"yyyy-MM-ddTHH:mm:ss")),o.checked=o.value===""+n)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(L,this._change)}})},E.select={source:E.source.extend({refresh:function(n){var i,r=this,o=r.bindings.source.get();o instanceof D||o instanceof C.data.DataSource?(n=n||{},"add"==n.action?r.add(n.index,n.items):"remove"==n.action?r.remove(n.index,n.items):"itemchange"!=n.action&&n.action!==t||(r.render(),r.bindings.value&&r.bindings.value&&(i=p(r.bindings.value.get(),e(r.element).data("valueField")),null===i?r.element.selectedIndex=-1:r.element.value=i))):r.render()}}),value:_.extend({init:function(t,n,i){_.fn.init.call(this,t,n,i),this._change=I(this.change,this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,r=this.dataType(),o=[];for(n=0,i=this.element.options.length;n<i;n++)t=this.element.options[n],t.selected&&(e=t.attributes.value,e=e&&e.specified?t.value:t.text,o.push(this._parseValue(e,r)));return o},change:function(){var e,n,i,r,o,a,s,l,d=[],u=this.element,c=this.options.valueField||this.options.textField,h=this.options.valuePrimitive;for(o=0,a=u.options.length;o<a;o++)n=u.options[o],n.selected&&(r=n.attributes.value,r=r&&r.specified?n.value:n.text,d.push(c?r:this._parseValue(r,this.dataType())));if(c)for(e=this.bindings.source.get(),e instanceof C.data.DataSource&&(e=e.view()),i=0;i<d.length;i++)for(o=0,a=e.length;o<a;o++)if(s=e[o].get(c),l=s+""===d[i]){d[i]=e[o];break}r=this.bindings[R].get(),r instanceof D?r.splice.apply(r,[0,r.length].concat(d)):this.bindings[R].set(h||!(r instanceof S||null===r||r===t)&&c?d[0].get(c):d[0])},refresh:function(){var e,t,n,i=this.element,r=i.options,o=this.bindings[R].get(),a=o,s=this.options.valueField||this.options.textField,l=!1,d=this.dataType();for(a instanceof D||(a=new D([o])),i.selectedIndex=-1,n=0;n<a.length;n++)for(o=a[n],s&&o instanceof S&&(o=o.get(s)),"date"==d?o=C.toString(a[n],"yyyy-MM-dd"):"datetime-local"==d&&(o=C.toString(a[n],"yyyy-MM-ddTHH:mm:ss")),e=0;e<r.length;e++)t=r[e].value,""===t&&""!==o&&(t=r[e].text),null!=o&&t==""+o&&(r[e].selected=!0,l=!0)},destroy:function(){e(this.element).off(L,this._change)}})},E.widget={events:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this.handlers={}},refresh:function(e){var t=this.bindings.events[e],n=this.handlers[e];n&&this.widget.unbind(e,n),n=t.get(),this.handlers[e]=function(e){e.data=t.source,n(e),e.data===t.source&&delete e.data},this.widget.bind(e,this.handlers[e])},destroy:function(){var e;for(e in this.handlers)this.widget.unbind(e,this.handlers[e])}}),checked:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=I(this.change,this),this.widget.bind(L,this._change)},change:function(){this.bindings[H].set(this.value())},refresh:function(){this.widget.check(this.bindings[H].get()===!0)},value:function(){var e=this.element,t=e.value;return"on"!=t&&"off"!=t||(t=e.checked),t},destroy:function(){this.widget.unbind(L,this._change)}}),visible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.visible.get();this.widget.wrapper[0].style.display=e?"":"none"}}),invisible:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.invisible.get();this.widget.wrapper[0].style.display=e?"none":""}}),enabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(this.bindings.enabled.get())}}),disabled:v.extend({init:function(e,t,n){v.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){this.widget.enable&&this.widget.enable(!this.bindings.disabled.get())}}),source:n("source","dataSource","setDataSource"),value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(L,this._change);var r=this.bindings.value.get();this._valueIsObservableObject=!i.valuePrimitive&&(null==r||r instanceof S),this._valueIsObservableArray=r instanceof D,this._initChange=!1},_source:function(){var e;return this.widget.dataItem&&(e=this.widget.dataItem(),e&&e instanceof S)?[e]:(this.bindings.source&&(e=this.bindings.source.get()),(!e||e instanceof C.data.DataSource)&&(e=this.widget.dataSource.flatView()),e)},change:function(){var e,t,n,i,r,o,a,s=this.widget.value(),l=this.options.dataValueField||this.options.dataTextField,d="[object Array]"===F.call(s),u=this._valueIsObservableObject,c=[];if(this._initChange=!0,l)if(""===s&&(u||this.options.valuePrimitive))s=null;else{for(a=this._source(),d&&(t=s.length,c=s.slice(0)),r=0,o=a.length;r<o;r++)if(n=a[r],i=n.get(l),d){for(e=0;e<t;e++)if(i==c[e]){c[e]=n;break}}else if(i==s){s=u?n:i;break}c[0]&&(s=this._valueIsObservableArray?c:u||!l?c[0]:c[0].get(l))}this.bindings.value.set(s),this._initChange=!1},refresh:function(){var e,n,i,r,o,a,s,l,d;if(!this._initChange){if(e=this.widget,n=e.options,i=n.dataTextField,r=n.dataValueField||i,o=this.bindings.value.get(),a=n.text||"",s=0,d=[],o===t&&(o=null),r)if(o instanceof D){for(l=o.length;s<l;s++)d[s]=o[s].get(r);o=d}else o instanceof S&&(a=o.get(i),o=o.get(r));n.autoBind!==!1||n.cascadeFrom||!e.listView||e.listView.bound()?e.value(o):(i!==r||a||(a=o),a||!o&&0!==o||!n.valuePrimitive?e._preselect(o,a):e.value(o))}this._initChange=!1},destroy:function(){this.widget.unbind(L,this._change)}}),gantt:{dependencies:n("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:v.extend({init:function(t,n,i){v.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=e.proxy(this.change,this),this.widget.first(L,this._change),this._initChange=!1},change:function(){var e,n,i,r,o,a,s,l,d,u=this,c=u.bindings[R].get(),h=u.options.valuePrimitive,p=h?u.widget.value():u.widget.dataItems(),f=this.options.dataValueField||this.options.dataTextField;if(p=p.slice(0),u._initChange=!0,c instanceof D){for(e=[],n=p.length,i=0,r=0,o=c[i],a=!1;o!==t;){for(d=!1,r=0;r<n;r++)if(h?a=p[r]==o:(l=p[r],l=l.get?l.get(f):l,a=l==(o.get?o.get(f):o)),a){p.splice(r,1),n-=1,d=!0;break}d?i+=1:(e.push(o),b(c,i,1),s=i),o=c[i]}b(c,c.length,0,p),e.length&&c.trigger("change",{action:"remove",items:e,index:s}),p.length&&c.trigger("change",{action:"add",items:p,index:c.length-1})}else u.bindings[R].set(p);u._initChange=!1},refresh:function(){if(!this._initChange){var e,n,i=this.options,r=this.widget,o=i.dataValueField||i.dataTextField,a=this.bindings.value.get(),s=a,l=0,d=[];if(a===t&&(a=null),o)if(a instanceof D){for(e=a.length;l<e;l++)n=a[l],d[l]=n.get?n.get(o):n;a=d}else a instanceof S&&(a=a.get(o));i.autoBind!==!1||i.valuePrimitive===!0||r._isBound()?r.value(a):r._preselect(s,a)}},destroy:function(){this.widget.unbind(L,this._change)}})},scheduler:{source:n("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,r,o=this.widget,s=e.addedItems||o.items();if(s.length)for(i=e.addedDataItems||o.dataItems(),r=this.bindings.source._parents(),t=0,n=i.length;t<n;t++)a(s[t],i[t],this._ns(e.ns),[i[t]].concat(r))}})}},b=function(e,t,n,i){var r,o,a,s,l;if(i=i||[],n=n||0,r=i.length,o=e.length,a=[].slice.call(e,t+n),s=a.length,r){for(r=t+r,l=0;t<r;t++)e[t]=i[l],l++;e.length=r}else if(n)for(e.length=t,n+=t;t<n;)delete e[--n];if(s){for(s=t+s,l=0;t<s;t++)e[t]=a[l],l++;e.length=s}for(t=e.length;t<o;)delete e[t],t++},k=A.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,r,o,a,s=this instanceof w,l=this.binders();for(t in e)t==R?n=!0:t==M?i=!0:t!=z||s?t==H?o=!0:t==N?a=!0:this.applyBinding(t,e,l):r=!0;i&&this.applyBinding(M,e,l),n&&this.applyBinding(R,e,l),o&&this.applyBinding(H,e,l),r&&!s&&this.applyBinding(z,e,l),a&&!s&&this.applyBinding(N,e,l)},binders:function(){return E[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,r=n[e]||E[e],o=this.toDestroy,a=t[e];if(r)if(r=new r(this.target,t,this.options),o.push(r),a instanceof f)r.bind(a),o.push(a);else for(i in a)r.bind(a,i),o.push(a[i]);else if("template"!==e)throw Error("The "+e+" binding is not supported by the "+this.target.nodeName.toLowerCase()+" element")},destroy:function(){var e,t,n=this.toDestroy;for(e=0,t=n.length;e<t;e++)n[e].destroy()}}),w=k.extend({binders:function(){return E.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,r=n[e]||E.widget[e],o=this.toDestroy,a=t[e];if(!r)throw Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(r=new r(this.target,t,this.target.options),o.push(r),a instanceof f)r.bind(a),o.push(a);else for(i in a)r.bind(a,i),o.push(a[i])}}),y=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,x=/\s/g,C.unbind=c,C.bind=s,C.data.binders=E,C.data.Binder=v,C.notify=h,C.observable=function(e){return e instanceof S||(e=new S(e)),e},C.observableHierarchy=function(e){function t(e){var n,i;for(n=0;n<e.length;n++)e[n]._initChildren(),i=e[n].children,i.fetch(),e[n].items=i.data(),t(e[n].items)}var n=C.data.HierarchicalDataSource.create(e);return n.fetch(),t(n.data()),n._data._dataSource=n,n._data}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.fx.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){return parseInt(e,10)}function i(e,t){return n(e.css(t))}function r(e){var t,n=[];for(t in e)n.push(t);return n}function o(e){for(var t in e)W.indexOf(t)!=-1&&U.indexOf(t)==-1&&delete e[t];return e}function a(e,t){var n,i,r,o,a=[],s={};for(i in t)n=i.toLowerCase(),o=I&&W.indexOf(n)!=-1,!E.hasHW3D&&o&&U.indexOf(n)==-1?delete t[i]:(r=t[i],o?a.push(i+"("+r+")"):s[i]=r);return a.length&&(s[se]=a.join(" ")),s}function s(e,t){var i,r,o;return I?(i=e.css(se),i==Y?"scale"==t?1:0:(r=i.match(RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),o=0,r?o=n(r[1]):(r=i.match(N)||[0,0,0,0,0],t=t.toLowerCase(),P.test(t)?o=parseFloat(r[3]/r[2]):"translatey"==t?o=parseFloat(r[4]/r[2]):"scale"==t?o=parseFloat(r[2]):"rotate"==t&&(o=parseFloat(Math.atan2(r[2],r[1])))),o)):parseFloat(e.css(t))}function l(e){return e.charAt(0).toUpperCase()+e.substring(1)}function d(e,t){var n=f.extend(t),i=n.prototype.directions;T[l(e)]=n,T.Element.prototype[e]=function(e,t,i,r){return new n(this.element,e,t,i,r)},S(i,function(t,i){T.Element.prototype[e+l(i)]=function(e,t,r){return new n(this.element,i,e,t,r)}})}function u(e,n,i,r){d(e,{directions:g,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,o){var a,s,l=this,d="out"===this._direction,u=l.element.data(n),c=!(isNaN(u)||u==i);a=c?u:t!==this._startValue?this._startValue:d?i:r,s=t!==this._endValue?this._endValue:d?r:i,this._reverse?(e[n]=s,o[n]=a):(e[n]=a,o[n]=s),l._shouldHide=o[n]===r}})}function c(e,t){var n=C.directions[t].vertical,i=e[n?J:X]()/2+"px";return _[t].replace("$size",i)}var h,p,f,m,g,v,_,b,k,w,y,x,C=window.kendo,T=C.effects,S=e.each,D=e.extend,F=e.proxy,E=C.support,A=E.browser,I=E.transforms,R=E.transitions,M={scale:0,scalex:0,scaley:0,scale3d:0},z={translate:0,translatex:0,translatey:0,translate3d:0},H=t!==document.documentElement.style.zoom&&!I,N=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,B=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,P=/translatex?$/i,L=/(zoom|fade|expand)(\w+)/,O=/(zoom|fade|expand)/,V=/[xy]$/i,W=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],U=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],q={rotate:"deg",scale:"",skew:"px",translate:"px"},j=I.css,G=Math.round,$="",K="px",Y="none",Q="auto",X="width",J="height",Z="hidden",ee="origin",te="abortId",ne="overflow",ie="translate",re="position",oe="completeCallback",ae=j+"transition",se=j+"transform",le=j+"backface-visibility",de=j+"perspective",ue="1500px",ce="perspective("+ue+")",he={left:{reverse:"right",property:"left",transition:"translatex",vertical:!1,modifier:-1},right:{reverse:"left",property:"left",transition:"translatex",vertical:!1,modifier:1},down:{reverse:"up",property:"top",transition:"translatey",vertical:!0,modifier:1},up:{reverse:"down",property:"top",transition:"translatey",vertical:!0,modifier:-1},top:{reverse:"bottom"},bottom:{reverse:"top"},"in":{reverse:"out",modifier:-1},out:{reverse:"in",modifier:1},vertical:{reverse:"vertical"},horizontal:{reverse:"horizontal"}};C.directions=he,D(e.fn,{kendoStop:function(e,t){return R?T.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),I&&!R&&(S(U,function(n,i){e.fn[i]=function(n){if(t===n)return s(this,i);var r=e(this)[0],o=i+"("+n+q[i.replace(V,"")]+")";return r.style.cssText.indexOf(se)==-1?e(this).css(se,o):r.style.cssText=r.style.cssText.replace(RegExp(i+"\\(.*?\\)","i"),o),this},e.fx.step[i]=function(t){e(t.elem)[i](t.now)}}),h=e.fx.prototype.cur,e.fx.prototype.cur=function(){return U.indexOf(this.prop)!=-1?parseFloat(e(this.elem)[this.prop]()):h.apply(this,arguments)}),C.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),R&&(n=D({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(ae,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout(function(){e.css(ae,"").css(J)},n.duration)),S(t,function(t,n){e.toggleClass(n,i)})),e},C.parseEffects=function(e,t){var n={};return"string"==typeof e?S(e.split(" "),function(e,i){var r=!O.test(i),o=i.replace(L,function(e,t,n){return t+":"+n.toLowerCase()}),a=o.split(":"),s=a[1],l={};a.length>1&&(l.direction=t&&r?he[s].reverse:s),n[a[0]]=l}):S(e,function(e){var i=this.direction;i&&t&&!O.test(e)&&(this.direction=he[i].reverse),n[e]=this}),n},R&&D(T,{transition:function(t,n,i){var o,s,l,d,u=0,c=t.data("keys")||[];i=D({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i),l=!1,d=function(){l||(l=!0,s&&(clearTimeout(s),s=null),t.removeData(te).dequeue().css(ae,"").css(ae),i.complete.call(t))},i.duration=e.fx?e.fx.speeds[i.duration]||i.duration:i.duration,o=a(t,n),e.merge(c,r(o)),t.data("keys",e.unique(c)).height(),t.css(ae,i.exclusive+" "+i.duration+"ms "+i.ease).css(ae),t.css(o).css(se),R.event&&(t.one(R.event,d),0!==i.duration&&(u=500)),s=setTimeout(d,i.duration+u),t.data(te,s),t.data(oe,d)},stopQueue:function(e,t,n){var i,r=e.data("keys"),o=!n&&r,a=e.data(oe);return o&&(i=C.getComputedStyles(e[0],r)),a&&a(),o&&e.css(i),e.removeData("keys").stop(t)}}),p=C.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,i,r,s,l,d,u,c=this,h=t.length,p=c.element,f=c.options,m=e.Deferred(),g={},v={};for(c.effects=t,m.then(e.proxy(c,"complete")),p.data("animating",!0),i=0;i<h;i++)for(n=t[i],n.setReverse(f.reverse),n.setOptions(f),c.addRestoreProperties(n.restore),n.prepare(g,v),l=n.children(),r=0,d=l.length;r<d;r++)l[r].duration(f.duration).run();for(u in f.effects)D(v,f.effects[u].properties);for(p.is(":visible")||D(g,{display:p.data("olddisplay")||"block"}),I&&!f.reset&&(s=p.data("targetTransform"),s&&(g=D(s,g))),g=a(p,g),I&&!R&&(g=o(g)),p.css(g).css(se),i=0;i<h;i++)t[i].setup();return f.init&&f.init(),p.data("targetTransform",v),T.animate(p,v,D({},f,{complete:m.resolve})),m.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,r=e.length;i<r;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;e<t;e++)n=this.restore[e],i.css(n,i.data(n))},complete:function(){var t=this,n=0,i=t.element,r=t.options,o=t.effects,a=o.length;for(i.removeData("animating").dequeue(),r.hide&&i.data("olddisplay",i.css("display")).hide(),this.restoreCallback(),H&&!I&&setTimeout(e.proxy(this,"restoreCallback"),0);n<a;n++)o[n].teardown();r.completeCallback&&r.completeCallback(i)}}),T.promise=function(e,t){var n,i,r,o=[],a=new p(e,t),s=C.parseEffects(t.effects);t.effects=s;for(r in s)n=T[l(r)],n&&(i=new n(e,s[r].direction),o.push(i));o[0]?a.run(o):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),a.complete())},D(T,{animate:function(n,r,a){var s=a.transition!==!1;delete a.transition,R&&"transition"in T&&s?T.transition(n,r,a):I?n.animate(o(r),{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete}):n.each(function(){var n=e(this),o={};S(W,function(e,a){var s,l,d,u,c,h,p,f=r?r[a]+" ":null;f&&(l=r,a in M&&r[a]!==t?(s=f.match(B),I&&D(l,{scale:+s[0]})):a in z&&r[a]!==t&&(d=n.css(re),u="absolute"==d||"fixed"==d,n.data(ie)||(u?n.data(ie,{top:i(n,"top")||0,left:i(n,"left")||0,bottom:i(n,"bottom"),right:i(n,"right")}):n.data(ie,{top:i(n,"marginTop")||0,left:i(n,"marginLeft")||0})),c=n.data(ie),s=f.match(B),s&&(h=a==ie+"y"?0:+s[1],p=a==ie+"y"?+s[1]:+s[2],u?(isNaN(c.right)?isNaN(h)||D(l,{left:c.left+h}):isNaN(h)||D(l,{right:c.right-h}),isNaN(c.bottom)?isNaN(p)||D(l,{top:c.top+p}):isNaN(p)||D(l,{bottom:c.bottom-p})):(isNaN(h)||D(l,{marginLeft:c.left+h}),isNaN(p)||D(l,{marginTop:c.top+p})))),!I&&"scale"!=a&&a in l&&delete l[a],l&&D(o,l))}),A.msie&&delete o.scale,n.animate(o,{queue:!1,show:!1,hide:!1,duration:a.duration,complete:a.complete})})}}),T.animatedPromise=T.promise,f=C.Class.extend({init:function(e,t){var n=this;n.element=e,n._direction=t,n.options={},n._additionalEffects=[],n.restore||(n.restore=[])},reverse:function(){return this._reverse=!0,this.run()},play:function(){return this._reverse=!1,this.run()},add:function(e){return this._additionalEffects.push(e),this},direction:function(e){return this._direction=e,this},duration:function(e){return this._duration=e,this},compositeRun:function(){var e=this,t=new p(e.element,{reverse:e._reverse,duration:e._duration}),n=e._additionalEffects.concat([e]);return t.run(n)},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n,i=this,r=i.element,s=0,l=i.restore,d=l.length,u=e.Deferred(),c={},h={},p=i.children(),f=p.length;for(u.then(e.proxy(i,"_complete")),r.data("animating",!0),s=0;s<d;s++)t=l[s],r.data(t)||r.data(t,r.css(t));for(s=0;s<f;s++)p[s].duration(i._duration).run();return i.prepare(c,h),r.is(":visible")||D(c,{display:r.data("olddisplay")||"block"}),I&&(n=r.data("targetTransform"),n&&(c=D(n,c))),c=a(r,c),I&&!R&&(c=o(c)),r.css(c).css(se),i.setup(),r.data("targetTransform",h),T.animate(r,h,{duration:i._duration,complete:u.resolve}),u.promise()},stop:function(){var t=0,n=this.children(),i=n.length;for(t=0;t<i;t++)n[t].stop();return e(this.element).kendoStop(!0,!0),this},restoreCallback:function(){var e,t,n,i=this.element;for(e=0,t=this.restore.length;e<t;e++)n=this.restore[e],i.css(n,i.data(n))},_complete:function(){var t=this,n=t.element;n.removeData("animating").dequeue(),t.restoreCallback(),t.shouldHide()&&n.data("olddisplay",n.css("display")).hide(),H&&!I&&setTimeout(e.proxy(t,"restoreCallback"),0),t.teardown()},setOptions:function(e){D(!0,this.options,e)},children:function(){return[]},shouldHide:e.noop,setup:e.noop,prepare:e.noop,teardown:e.noop,directions:[],setReverse:function(e){return this._reverse=e,this}}),m=["left","right","up","down"],g=["in","out"],d("slideIn",{directions:m,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var n,i=this,r=i.element,o=C._outerWidth,a=C._outerHeight,s=he[i._direction],l=-s.modifier*(s.vertical?a(r):o(r)),d=l/(i.options&&i.options.divisor||1)+K,u="0px";i._reverse&&(n=e,e=t,t=n),I?(e[s.transition]=d,t[s.transition]=u):(e[s.property]=d,t[s.property]=u)}}),d("tile",{directions:m,init:function(e,t,n){f.prototype.init.call(this,e,t),this.options={previous:n}},previousDivisor:function(e){return this.options.previousDivisor=e,this},children:function(){var e=this,t=e._reverse,n=e.options.previous,i=e.options.previousDivisor||1,r=e._direction,o=[C.fx(e.element).slideIn(r).setReverse(t)];return n&&o.push(C.fx(n).slideIn(he[r].reverse).divisor(i).setReverse(!t)),o}}),u("fade","opacity",1,0),u("zoom","scale",1,.01),d("slideMargin",{prepare:function(e,t){var n,i=this,r=i.element,o=i.options,a=r.data(ee),s=o.offset,l=i._reverse;l||null!==a||r.data(ee,parseFloat(r.css("margin-"+o.axis))),n=r.data(ee)||0,t["margin-"+o.axis]=l?n:n+s}}),d("slideTo",{prepare:function(e,t){var n=this,i=n.element,r=n.options,o=r.offset.split(","),a=n._reverse;I?(t.translatex=a?0:o[0],t.translatey=a?0:o[1]):(t.left=a?0:o[0],t.top=a?0:o[1]),i.css("left")}}),d("expand",{directions:["horizontal","vertical"],restore:[ne],prepare:function(e,n){var i=this,r=i.element,o=i.options,a=i._reverse,s="vertical"===i._direction?J:X,l=r[0].style[s],d=r.data(s),u=parseFloat(d||l),c=G(r.css(s,Q)[s]());e.overflow=Z,u=o&&o.reset?c||u:u||c,n[s]=(a?0:u)+K,e[s]=(a?u:0)+K,d===t&&r.data(s,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this,t=e.element,n="vertical"===e._direction?J:X,i=t.data(n);i!=Q&&i!==$||setTimeout(function(){t.css(n,Q).css(n)},0)}}),v={position:"absolute",marginLeft:0,marginTop:0,scale:1},d("transfer",{init:function(e,t){this.element=e,this.options={target:t},this.restore=[]},setup:function(){this.element.appendTo(document.body)},prepare:function(e,t){var n=this,i=n.element,r=T.box(i),o=T.box(n.options.target),a=s(i,"scale"),l=T.fillScale(o,r),d=T.transformOrigin(o,r);D(e,v),t.scale=1,i.css(se,"scale(1)").css(se),i.css(se,"scale("+a+")"),e.top=r.top,e.left=r.left,e.transformOrigin=d.x+K+" "+d.y+K,n._reverse?e.scale=l:t.scale=l}}),_={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},b={top:{start:"rotatex(0deg)",end:"rotatex(180deg)"},bottom:{start:"rotatex(-180deg)",end:"rotatex(0deg)"},left:{start:"rotatey(0deg)",end:"rotatey(-180deg)"},right:{start:"rotatey(180deg)",end:"rotatey(0deg)"}},d("turningPage",{directions:m,init:function(e,t,n){f.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var n=this,i=n._reverse,r=i?he[n._direction].reverse:n._direction,o=b[r];e.zIndex=1,n._clipInHalf&&(e.clip=c(n._container,C.directions[r].reverse)),e[le]=Z,t[se]=ce+(i?o.start:o.end),e[se]=ce+(i?o.end:o.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),d("staticPage",{directions:m,init:function(e,t,n){f.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?he[n._direction].reverse:n._direction;e.clip=c(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this,t=e._reverse,n=e._face;return t&&!n||!t&&n},face:function(e){return this._face=e,this}}),d("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){f.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",r=C.directions[i].reverse,o=t._reverse,a=n.face.clone(!0).removeAttr("id"),s=n.back.clone(!0).removeAttr("id"),l=t.element;return o&&(e=i,i=r,r=e),[C.fx(n.face).staticPage(i,l).face(!0).setReverse(o),C.fx(n.back).staticPage(r,l).setReverse(o),C.fx(a).turningPage(i,l).face(!0).clipInHalf(!0).temporary().setReverse(o),C.fx(s).turningPage(r,l).clipInHalf(!0).temporary().setReverse(o)]},prepare:function(e,t){e[de]=ue,e.transformStyle="preserve-3d",e.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),d("flip",{directions:["horizontal","vertical"],init:function(e,t,n,i){f.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,n=t.options,i="horizontal"===t._direction?"left":"top",r=C.directions[i].reverse,o=t._reverse,a=t.element;return o&&(e=i,i=r,r=e),[C.fx(n.face).turningPage(i,a).face(!0).setReverse(o),C.fx(n.back).turningPage(r,a).setReverse(o)]},prepare:function(e){e[de]=ue,e.transformStyle="preserve-3d"}}),k=!E.mobileOS.android,w=".km-touch-scrollbar, .km-actionsheet-wrapper",d("replace",{_before:e.noop,_after:e.noop,init:function(t,n,i){f.prototype.init.call(this,t),this._previous=e(n),this._transitionClass=i},duration:function(){throw Error("The replace effect does not support duration setting; the effect duration may be customized through the transition class rule")},beforeTransition:function(e){return this._before=e,this},afterTransition:function(e){return this._after=e,this},_both:function(){return e().add(this._element).add(this._previous)},_containerClass:function(){var e=this._direction,t="k-fx k-fx-start k-fx-"+this._transitionClass;return e&&(t+=" k-fx-"+e),this._reverse&&(t+=" k-fx-reverse"),t},complete:function(t){if(!(!this.deferred||t&&e(t.target).is(w))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(R.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),k&&n.css(ne,""),this.isAbsolute||this._both().css(re,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t,n=this,i=n.element,r=n._previous,o=i.parents().filter(r.parents()).first(),a=n._both(),s=e.Deferred(),l=i.css(re);return o.length||(o=i.parent()),this.container=o,this.deferred=s,this.isAbsolute="absolute"==l,this.isAbsolute||a.css(re,"absolute"),k&&(t=o.css(ne),o.css(ne,"hidden")),R?(i.addClass("k-fx-hidden"),o.addClass(this._containerClass()),this.completeProxy=e.proxy(this,"complete"),o.on(R.event,this.completeProxy),C.animationFrame(function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),r.css("display","").addClass("k-fx-current"),n._before(r,i),C.animationFrame(function(){o.removeClass("k-fx-start").addClass("k-fx-end"),n._after(r,i)})})):this.complete(),s.promise()},stop:function(){this.complete()}}),y=C.Class.extend({init:function(){var e=this;e._tickProxy=F(e._tick,e),e._started=!1},tick:e.noop,done:e.noop,onEnd:e.noop,onCancel:e.noop,start:function(){this.enabled()&&(this.done()?this.onEnd():(this._started=!0,C.animationFrame(this._tickProxy)))},enabled:function(){return!0},cancel:function(){this._started=!1,this.onCancel()},_tick:function(){var e=this;e._started&&(e.tick(),e.done()?(e._started=!1,e.onEnd()):C.animationFrame(e._tickProxy))}}),x=y.extend({init:function(e){var t=this;D(t,e),y.fn.init.call(t)},done:function(){return this.timePassed()>=this.duration},timePassed:function(){return Math.min(this.duration,new Date-this.startDate)},moveTo:function(e){var t=this,n=t.movable;t.initial=n[t.axis],t.delta=e.location-t.initial,
t.duration="number"==typeof e.duration?e.duration:300,t.tick=t._easeProxy(e.ease),t.startDate=new Date,t.start()},_easeProxy:function(e){var t=this;return function(){t.movable.moveAxis(t.axis,e(t.timePassed(),t.initial,t.delta,t.duration))}}}),D(x,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(-Math.pow(2,-10*e/i)+1)+t},easeOutBack:function(e,t,n,i,r){return r=1.70158,n*((e=e/i-1)*e*((r+1)*e+r)+1)+t}}),T.Animation=y,T.Transition=x,T.createEffect=d,T.box=function(t){t=e(t);var n=t.offset();return n.width=C._outerWidth(t),n.height=C._outerHeight(t),n},T.transformOrigin=function(e,t){var n=(e.left-t.left)*t.width/(t.width-e.width),i=(e.top-t.top)*t.height/(t.height-e.height);return{x:isNaN(n)?0:n,y:isNaN(i)?0:i}},T.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},T.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.view.min",["kendo.core.min","kendo.binder.min","kendo.fx.min"],e)}(function(){return function(e,t){function n(e){if(!e)return{};var t=e.match(_)||[];return{type:t[1],direction:t[3],reverse:"reverse"===t[5]}}var i=window.kendo,r=i.Observable,o="SCRIPT",a="init",s="show",l="hide",d="transitionStart",u="transitionEnd",c="attach",h="detach",p=/unrecognized expression/,f=r.extend({init:function(e,t){var n=this;t=t||{},r.fn.init.call(n),n.content=e,n.id=i.guid(),n.tagName=t.tagName||"div",n.model=t.model,n._wrap=t.wrap!==!1,this._evalTemplate=t.evalTemplate||!1,n._fragments={},n.bind([a,s,l,d,u],t)},render:function(t){var n=this,r=!n.element;return r&&(n.element=n._createElement()),t&&e(t).append(n.element),r&&(i.bind(n.element,n.model),n.trigger(a)),t&&(n._eachFragment(c),n.trigger(s)),n.element},clone:function(){return new m(this)},triggerBeforeShow:function(){return!0},triggerBeforeHide:function(){return!0},showStart:function(){this.element.css("display","")},showEnd:function(){},hideEnd:function(){this.hide()},beforeTransition:function(e){this.trigger(d,{type:e})},afterTransition:function(e){this.trigger(u,{type:e})},hide:function(){this._eachFragment(h),this.element.detach(),this.trigger(l)},destroy:function(){var e=this.element;e&&(i.unbind(e),i.destroy(e),e.remove())},fragments:function(t){e.extend(this._fragments,t)},_eachFragment:function(e){for(var t in this._fragments)this._fragments[t][e](this,t)},_createElement:function(){var t,n,r,a=this,s="<"+a.tagName+" />";try{n=e(document.getElementById(a.content)||a.content),n[0].tagName===o&&(n=n.html())}catch(l){p.test(l.message)&&(n=a.content)}return"string"==typeof n?(n=n.replace(/^\s+|\s+$/g,""),a._evalTemplate&&(n=i.template(n)(a.model||{})),t=e(s).append(n),a._wrap||(t=t.contents())):(t=n,a._evalTemplate&&(r=e(i.template(e("<div />").append(t.clone(!0)).html())(a.model||{})),e.contains(document,t[0])&&t.replaceWith(r),t=r),a._wrap&&(t=t.wrapAll(s).parent())),t}}),m=i.Class.extend({init:function(t){e.extend(this,{element:t.element.clone(!0),transition:t.transition,id:t.id}),t.element.parent().append(this.element)},hideEnd:function(){this.element.remove()},beforeTransition:e.noop,afterTransition:e.noop}),g=f.extend({init:function(e,t){f.fn.init.call(this,e,t),this.containers={}},container:function(e){var t=this.containers[e];return t||(t=this._createContainer(e),this.containers[e]=t),t},showIn:function(e,t,n){this.container(e).show(t,n)},_createContainer:function(e){var t,n=this.render(),i=n.find(e);if(!i.length&&n.is(e)){if(!n.is(e))throw Error("can't find a container with the specified "+e+" selector");i=n}return t=new b(i),t.bind("accepted",function(e){e.view.render(i)}),t}}),v=f.extend({attach:function(e,t){e.element.find(t).replaceWith(this.render())},detach:function(){}}),_=/^(\w+)(:(\w+))?( (\w+))?$/,b=r.extend({init:function(e){r.fn.init.call(this),this.container=e,this.history=[],this.view=null,this.running=!1},after:function(){this.running=!1,this.trigger("complete",{view:this.view}),this.trigger("after")},end:function(){this.view.showEnd(),this.previous.hideEnd(),this.after()},show:function(e,t,r){if(!e.triggerBeforeShow()||this.view&&!this.view.triggerBeforeHide())return this.trigger("after"),!1;r=r||e.id;var o=this,a=e===o.view?e.clone():o.view,s=o.history,l=s[s.length-2]||{},d=l.id===r,u=t||(d?s[s.length-1].transition:e.transition),c=n(u);return o.running&&o.effect.stop(),"none"===u&&(u=null),o.trigger("accepted",{view:e}),o.view=e,o.previous=a,o.running=!0,d?s.pop():s.push({id:r,transition:u}),a?(u&&i.effects.enabled?(e.element.addClass("k-fx-hidden"),e.showStart(),d&&!t&&(c.reverse=!c.reverse),o.effect=i.fx(e.element).replace(a.element,c.type).beforeTransition(function(){e.beforeTransition("show"),a.beforeTransition("hide")}).afterTransition(function(){e.afterTransition("show"),a.afterTransition("hide")}).direction(c.direction).setReverse(c.reverse),o.effect.run().then(function(){o.end()})):(e.showStart(),o.end()),!0):(e.showStart(),e.showEnd(),o.after(),!0)}});i.ViewContainer=b,i.Fragment=v,i.Layout=g,i.View=f,i.ViewClone=m}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dom.min",["kendo.core.min"],e)}(function(){return function(e){function t(){this.node=null}function n(){}function i(e,t,n){this.nodeName=e,this.attr=t||{},this.children=n||[]}function r(e){this.nodeValue=e+""}function o(e){this.html=e}function a(e,t){for(h.innerHTML=t;h.firstChild;)e.appendChild(h.firstChild)}function s(e){return new o(e)}function l(e,t,n){return new i(e,t,n)}function d(e){return new r(e)}function u(e){this.root=e,this.children=[]}var c,h;t.prototype={remove:function(){this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.attr={}},attr:{},text:function(){return""}},n.prototype={nodeName:"#null",attr:{style:{}},children:[],remove:function(){}},c=new n,i.prototype=new t,i.prototype.appendTo=function(e){var t,n=document.createElement(this.nodeName),i=this.children;for(t=0;t<i.length;t++)i[t].render(n,c);return e.appendChild(n),n},i.prototype.render=function(e,t){var n,i,r,o,a,s;if(t.nodeName!==this.nodeName)t.remove(),n=this.appendTo(e);else{if(n=t.node,r=this.children,o=r.length,a=t.children,s=a.length,Math.abs(s-o)>2)return void this.render({appendChild:function(n){e.replaceChild(n,t.node)}},c);for(i=0;i<o;i++)r[i].render(n,a[i]||c);for(i=o;i<s;i++)a[i].remove()}this.node=n,this.syncAttributes(t.attr),this.removeAttributes(t.attr)},i.prototype.syncAttributes=function(e){var t,n,i,r=this.attr;for(t in r)n=r[t],i=e[t],"style"===t?this.setStyle(n,i):n!==i&&this.setAttribute(t,n,i)},i.prototype.setStyle=function(e,t){var n,i=this.node;if(t)for(n in e)e[n]!==t[n]&&(i.style[n]=e[n]);else for(n in e)i.style[n]=e[n]},i.prototype.removeStyle=function(e){var t,n=this.attr.style||{},i=this.node;for(t in e)void 0===n[t]&&(i.style[t]="")},i.prototype.removeAttributes=function(e){var t,n=this.attr;for(t in e)"style"===t?this.removeStyle(e.style):void 0===n[t]&&this.removeAttribute(t)},i.prototype.removeAttribute=function(e){var t=this.node;"style"===e?t.style.cssText="":"className"===e?t.className="":t.removeAttribute(e)},i.prototype.setAttribute=function(e,t){var n=this.node;void 0!==n[e]?n[e]=t:n.setAttribute(e,t)},i.prototype.text=function(){var e,t="";for(e=0;e<this.children.length;++e)t+=this.children[e].text();return t},r.prototype=new t,r.prototype.nodeName="#text",r.prototype.render=function(e,t){var n;t.nodeName!==this.nodeName?(t.remove(),n=document.createTextNode(this.nodeValue),e.appendChild(n)):(n=t.node,this.nodeValue!==t.nodeValue&&n.parentNode&&(n.nodeValue=this.nodeValue)),this.node=n},r.prototype.text=function(){return this.nodeValue},o.prototype={nodeName:"#html",attr:{},remove:function(){var e,t;for(e=0;e<this.nodes.length;e++)t=this.nodes[e],t.parentNode&&t.parentNode.removeChild(t)},render:function(e,t){var n,i;if(t.nodeName!==this.nodeName||t.html!==this.html)for(t.remove(),n=e.lastChild,a(e,this.html),this.nodes=[],i=n?n.nextSibling:e.firstChild;i;i=i.nextSibling)this.nodes.push(i);else this.nodes=t.nodes.slice(0)}},h=document.createElement("div"),u.prototype={html:s,element:l,text:d,render:function(e){var t,n,i,r=this.children;for(t=0,n=e.length;t<n;t++)i=r[t],i?i.node&&i.node.parentNode||(i.remove(),i=c):i=c,e[t].render(this.root,i);for(t=n;t<r.length;t++)r[t].remove();this.children=e}},e.dom={html:s,text:d,element:l,Tree:u,Node:t}}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("ooxml/utils.min",["kendo.core.min"],e)}(function(){!function(){kendo.ooxml=kendo.ooxml||{},kendo.ooxml.createZip=function(){if("undefined"==typeof JSZip)throw Error("JSZip not found. Check http://docs.telerik.com/kendo-ui/framework/excel/introduction#requirements for more details.");return new JSZip}}()},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("ooxml/kendo-ooxml.min",["kendo.core.min","ooxml/utils.min"],e)}(function(){!function(e){function t(e){return H+e}function n(e,t){return t.indexOf(e)}function i(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\"/g,"&quot;").replace(/\'/g,"&#39;")}function r(e,t){var n,i="";for(n=0;n<e;++n)i+=t(n);return i}function o(e,t){var n,i="";for(n=0;n<e.length;++n)i+=t(e[n],n);return i}function a(e){return"string"==typeof e?"<f>"+i(e)+"</f>":'<f t="array" ref="'+e.ref+'">'+i(e.src)+"</f>"}function s(e){var t=Math.floor(e/26)-1;return(t>=0?s(t):"")+String.fromCharCode(65+e%26)}function l(e,t){return s(t)+(e+1)}function d(e,t){return s(t)+"$"+(e+1)}function u(e){var t=e.frozenRows||(e.freezePane||{}).rowSplit||1;return t-1}function c(e){return(e/7*100+.5)/100}function h(e){return.75*e}function p(e){return(e+"").replace(/[\x00-\x08]/g,"").replace(/\n/g,"\r\n")}function f(e){var t=e;return t.length<6&&(t=t.replace(/(\w)/g,function(e,t){return t+t})),t=t.substring(1).toUpperCase(),t.length<8&&(t="FF"+t),t}function m(e){var t="thin";return 2===e?t="medium":3===e&&(t="thick"),t}function g(e,t){var n="";return t&&(n+="<"+e+' style="'+m(t.size)+'">',t.color&&(n+='<color rgb="'+f(t.color)+'"/>'),n+="</"+e+">"),n}function v(e){return"<border>"+g("left",e.left)+g("right",e.right)+g("top",e.top)+g("bottom",e.bottom)+"</border>"}function _(e,t){var n,i,r,o=[],a=[];for(b(e,function(e,t){var n={_source:e,index:t,height:e.height,cells:[]};o.push(n),a[t]=n}),n=k(o).slice(0),i={rowData:o,rowsByIndex:a,mergedCells:t},r=0;r<n.length;r++)C(n[r],i),delete n[r]._source;return k(o)}function b(e,t){var n,i,r;for(n=0;n<e.length;n++)i=e[n],i&&(r=i.index,"number"!=typeof r&&(r=n),t(i,r))}function k(e){return e.sort(function(e,t){return e.index-t.index})}function w(e,t){e.indexOf(t)<0&&e.push(t)}function y(e,t){var n,i,r,o,a;for(n=0;n<e.length;++n)if(i=e[n],r=i.split(":"),o=r[0],o===t)return a=r[1],o=x(o),a=x(a),{rowSpan:a.row-o.row+1,colSpan:a.col-o.col+1}}function x(e){function t(e){var t,n=e.toUpperCase(),i=0;for(t=0;t<n.length;++t)i=26*i+n.charCodeAt(t)-64;return i-1}function n(e){return parseInt(e,10)-1}var i=/^([a-z]+)(\d+)$/i.exec(e);return{row:n(i[2]),col:t(i[1])}}function C(e,t){var n,i,r,o,a,s,d,u,c,h=e._source,p=e.index,f=h.cells,m=e.cells;if(f)for(n=0;n<f.length;n++)if(i=f[n]||ie,r=i.rowSpan||1,o=i.colSpan||1,a=T(m,i),s=l(p,a),1===r&&1===o&&(d=y(t.mergedCells,s),d&&(o=d.colSpan,r=d.rowSpan)),F(i,m,a,o),(r>1||o>1)&&w(t.mergedCells,s+":"+l(p+r-1,a+o-1)),r>1)for(u=p+1;u<p+r;u++)c=t.rowsByIndex[u],c||(c=t.rowsByIndex[u]={index:u,cells:[]},t.rowData.push(c)),F(i,c.cells,a-1,o+1)}function T(e,t){var n;return"number"==typeof t.index?(n=t.index,S(e,t,t.index)):n=D(e,t),n}function S(e,t,n){e[n]=t}function D(e,t){var n,i=e.length;for(n=0;n<e.length+1;n++)if(!e[n]){e[n]=t,i=n;break}return i}function F(e,t,n,i){var r,o;for(r=1;r<i;r++)o={borderTop:e.borderTop,borderRight:e.borderRight,borderBottom:e.borderBottom,borderLeft:e.borderLeft},S(t,o,n+r)}function E(e){return re({ref:e.ref,columns:e.columns,generators:{custom:oe,dynamic:ae,top:se,value:le}})}var A,I,R,M,z,H,N,B,P,L,O,V,W,U,q,j,G,$,K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le;window.kendo.ooxml=window.kendo.ooxml||{},A=kendo.ooxml,I=e.map,R=A.createZip,M={toString:function(e){return e}},z=kendo.Class.extend({}),z.register=function(e){M=e},z.toString=function(e,t){return M.toString(e,t)},H="data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64,",N={compression:"DEFLATE",type:"base64"},B=6e4,P=864e5,L=JSON.parse.bind(JSON),O='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r',V=O+'\n <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>\n <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/>\n <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>\n </Relationships>',W=function(e){var t=e.creator,n=e.lastModifiedBy,r=e.created,o=e.modified;return O+'\n <cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties"\n xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/"\n xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">\n <dc:creator>'+i(t)+"</dc:creator>\n <cp:lastModifiedBy>"+i(n)+'</cp:lastModifiedBy>\n <dcterms:created xsi:type="dcterms:W3CDTF">'+i(r)+'</dcterms:created>\n <dcterms:modified xsi:type="dcterms:W3CDTF">'+i(o)+"</dcterms:modified>\n</cp:coreProperties>"},U=function(e){var t=e.sheets;return O+'\n<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes">\n <Application>Microsoft Excel</Application>\n <DocSecurity>0</DocSecurity>\n <ScaleCrop>false</ScaleCrop>\n <HeadingPairs>\n <vt:vector size="2" baseType="variant">\n <vt:variant>\n <vt:lpstr>Worksheets</vt:lpstr>\n </vt:variant>\n <vt:variant>\n <vt:i4>'+t.length+'</vt:i4>\n </vt:variant>\n </vt:vector>\n </HeadingPairs>\n <TitlesOfParts>\n <vt:vector size="'+t.length+'" baseType="lpstr">'+o(t,function(e,t){return e.options.title?"<vt:lpstr>"+i(e.options.title)+"</vt:lpstr>":"<vt:lpstr>Sheet"+(t+1)+"</vt:lpstr>"})+"</vt:vector>\n </TitlesOfParts>\n <LinksUpToDate>false</LinksUpToDate>\n <SharedDoc>false</SharedDoc>\n <HyperlinksChanged>false</HyperlinksChanged>\n <AppVersion>14.0300</AppVersion>\n</Properties>"},q=function(e){var t=e.count;return O+'\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\n <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" />\n <Default Extension="xml" ContentType="application/xml" />\n <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" />\n <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>\n <Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/>\n '+r(t,function(e){return'<Override PartName="/xl/worksheets/sheet'+(e+1)+'.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />'})+'\n <Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />\n <Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" />\n</Types>'},j=function(e){var t=e.sheets,n=e.filterNames,r=e.userNames;return O+'\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n <fileVersion appName="xl" lastEdited="5" lowestEdited="5" rupBuild="9303" />\n <workbookPr defaultThemeVersion="124226" />\n <bookViews>\n <workbookView xWindow="240" yWindow="45" windowWidth="18195" windowHeight="7995" />\n </bookViews>\n <sheets>\n '+o(t,function(e,t){var n=e.options,r=n.name||n.title||"Sheet"+(t+1);return'<sheet name="'+i(r)+'" sheetId="'+(t+1)+'" r:id="rId'+(t+1)+'" />'})+"\n </sheets>\n "+(n.length||r.length?"\n <definedNames>\n "+o(n,function(e){return'\n <definedName name="_xlnm._FilterDatabase" hidden="1" localSheetId="'+e.localSheetId+'">'+i(e.name)+"!$"+i(e.from)+":$"+i(e.to)+"</definedName>"})+"\n "+o(r,function(e){return'\n <definedName name="'+e.name+'" hidden="'+(e.hidden?1:0)+'"'+(null!=e.localSheetId?'localSheetId="'+e.localSheetId+'"':"")+"</definedName>"})+"\n </definedNames>":"")+'\n <calcPr fullCalcOnLoad="1" calcId="145621" />\n</workbook>'},G=function(e){var t=e.frozenColumns,n=e.frozenRows,r=e.columns,s=e.defaults,l=e.data,d=e.index,u=e.mergeCells,p=e.autoFilter,f=e.filter,m=e.showGridLines,g=e.hyperlinks,v=e.validations,_=e.defaultCellStyleId,b=e.rtl;return O+'\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" mc:Ignorable="x14ac">\n <dimension ref="A1" />\n\n <sheetViews>\n <sheetView '+(b?'rightToLeft="1"':"")+" "+(0===d?'tabSelected="1"':"")+' workbookViewId="0" '+(m===!1?'showGridLines="0"':"")+">\n "+(n||t?'\n <pane state="frozen"\n '+(t?'xSplit="'+t+'"':"")+"\n "+(n?'ySplit="'+n+'"':"")+'\n topLeftCell="'+(String.fromCharCode(65+(t||0))+((n||0)+1))+'"\n />':"")+'\n </sheetView>\n </sheetViews>\n\n <sheetFormatPr x14ac:dyDescent="0.25" defaultRowHeight="'+(s.rowHeight?.75*s.rowHeight:15)+'"\n '+(s.columnWidth?'defaultColWidth="'+c(s.columnWidth)+'"':"")+" />\n\n "+(null!=_||r&&r.length>0?"\n <cols>\n "+(r&&r.length?"":'\n <col min="1" max="16384" style="'+_+'"\n '+(s.columnWidth?'width="'+c(s.columnWidth)+'"':"")+" /> ")+"\n "+o(r,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return 0===e.width?"<col "+(null!=_?'style="'+_+'"':"")+'\n min="'+n+'" max="'+n+'" hidden="1" customWidth="1" />':"<col "+(null!=_?'style="'+_+'"':"")+'\n min="'+n+'" max="'+n+'" customWidth="1"\n '+(e.autoWidth?'width="'+(7*e.width+5)/7*256/256+'" bestFit="1"':'width="'+c(e.width)+'"')+" />"})+"\n </cols>":"")+"\n\n <sheetData>\n "+o(l,function(e,t){var n="number"==typeof e.index?e.index+1:t+1;return'\n <row r="'+n+'" x14ac:dyDescent="0.25"\n '+(0===e.height?'hidden="1"':e.height?'ht="'+h(e.height)+'" customHeight="1"':"")+">\n "+o(e.data,function(e){return'\n <c r="'+e.ref+'" '+(e.style?'s="'+e.style+'"':"")+" "+(e.type?'t="'+e.type+'"':"")+">\n "+(null!=e.formula?a(e.formula):"")+"\n "+(null!=e.value?"<v>"+i(e.value)+"</v>":"")+"\n </c>"})+"\n </row>\n "})+"\n </sheetData>\n\n "+(p?'<autoFilter ref="'+p.from+":"+p.to+'"/>':f?E(f):"")+"\n\n "+(u.length?'\n <mergeCells count="'+u.length+'">\n '+o(u,function(e){return'<mergeCell ref="'+e+'"/>'})+"\n </mergeCells>":"")+"\n\n "+(v.length?"\n <dataValidations>\n "+o(v,function(e){return'\n <dataValidation sqref="'+e.sqref.join(" ")+'"\n showErrorMessage="'+e.showErrorMessage+'"\n type="'+i(e.type)+'"\n '+("list"!==e.type?'operator="'+i(e.operator)+'"':"")+'\n allowBlank="'+e.allowBlank+'"\n showDropDown="'+e.showDropDown+'"\n '+(e.error?'error="'+i(e.error)+'"':"")+"\n "+(e.errorTitle?'errorTitle="'+i(e.errorTitle)+'"':"")+">\n "+(e.formula1?"<formula1>"+i(e.formula1)+"</formula1>":"")+"\n "+(e.formula2?"<formula2>"+i(e.formula2)+"</formula2>":"")+"\n </dataValidation>"})+"\n </dataValidations>":"")+"\n\n "+(g.length?"\n <hyperlinks>\n "+o(g,function(e,t){return'\n <hyperlink ref="'+e.ref+'" r:id="rId'+t+'"/>'})+"\n </hyperlinks>":"")+'\n\n <pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3" />\n</worksheet>'},$=function(e){var t=e.count;return O+'\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n '+r(t,function(e){return'\n <Relationship Id="rId'+(e+1)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet'+(e+1)+'.xml" />'})+'\n <Relationship Id="rId'+(t+1)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />\n <Relationship Id="rId'+(t+2)+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />\n</Relationships>'},K=function(e){var t=e.hyperlinks;return O+'\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n '+o(t,function(e,t){return'\n <Relationship Id="rId'+t+'" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="'+i(e.target)+'" TargetMode="External" />'})+"\n</Relationships>"},Y=function(e){var t=e.count,n=e.uniqueCount,r=e.indexes;return O+'\n<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="'+t+'" uniqueCount="'+n+'">\n '+o(Object.keys(r),function(e){return'\n <si><t xml:space="preserve">'+i(e.substring(1))+"</t></si>"})+"\n</sst>"},Q=function(e){var t=e.formats,n=e.fonts,r=e.fills,a=e.borders,s=e.styles;return O+'\n<styleSheet\n xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"\n xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"\n mc:Ignorable="x14ac"\n xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">\n <numFmts count="'+t.length+'">\n '+o(t,function(e,t){return'\n <numFmt formatCode="'+i(e.format)+'" numFmtId="'+(165+t)+'" />'})+'\n </numFmts>\n <fonts count="'+(n.length+1)+'" x14ac:knownFonts="1">\n <font>\n <sz val="11" />\n <color theme="1" />\n <name val="Calibri" />\n <family val="2" />\n <scheme val="minor" />\n </font>\n '+o(n,function(e){return'\n <font>\n <sz val="'+(e.fontSize||11)+'" />\n '+(e.bold?"<b/>":"")+"\n "+(e.italic?"<i/>":"")+"\n "+(e.underline?"<u/>":"")+"\n "+(e.color?'<color rgb="'+i(e.color)+'" />':'<color theme="1" />')+"\n "+(e.fontFamily?'\n <name val="'+i(e.fontFamily)+'" />\n <family val="2" />\n ':'\n <name val="Calibri" />\n <family val="2" />\n <scheme val="minor" />\n ')+"\n </font>"})+'\n </fonts>\n <fills count="'+(r.length+2)+'">\n <fill><patternFill patternType="none"/></fill>\n <fill><patternFill patternType="gray125"/></fill>\n '+o(r,function(e){return"\n "+(e.background?'\n <fill>\n <patternFill patternType="solid">\n <fgColor rgb="'+i(e.background)+'"/>\n </patternFill>\n </fill>\n ':"")})+'\n </fills>\n <borders count="'+(a.length+1)+'">\n <border><left/><right/><top/><bottom/><diagonal/></border>\n '+o(a,v)+'\n </borders>\n <cellStyleXfs count="1">\n <xf borderId="0" fillId="0" fontId="0" />\n </cellStyleXfs>\n <cellXfs count="'+(s.length+1)+'">\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />\n '+o(s,function(e){return'\n <xf xfId="0"\n '+(e.fontId?'fontId="'+e.fontId+'" applyFont="1"':"")+"\n "+(e.fillId?'fillId="'+e.fillId+'" applyFill="1"':"")+"\n "+(e.numFmtId?'numFmtId="'+e.numFmtId+'" applyNumberFormat="1"':"")+"\n "+(e.textAlign||e.verticalAlign||e.wrap?'applyAlignment="1"':"")+"\n "+(e.borderId?'borderId="'+e.borderId+'" applyBorder="1"':"")+">\n "+(e.textAlign||e.verticalAlign||e.wrap?"\n <alignment\n "+(e.textAlign?'horizontal="'+i(e.textAlign)+'"':"")+"\n "+(e.verticalAlign?'vertical="'+i(e.verticalAlign)+'"':"")+"\n "+(e.wrap?'wrapText="1"':"")+" />\n ":"")+"\n </xf>\n "})+'\n </cellXfs>\n <cellStyles count="1">\n <cellStyle name="Normal" xfId="0" builtinId="0"/>\n </cellStyles>\n <dxfs count="0" />\n <tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleMedium9" />\n</styleSheet>'},X=new Date(1900,0,0),J=kendo.Class.extend({init:function(e,t,n,i){this.options=e,this._strings=t,this._styles=n,this._borders=i,this._validations={}},relsToXML:function(){var e=this.options.hyperlinks||[];return e.length?K({hyperlinks:e}):""},toXML:function(e){var t,n,i,r,o,a,s,d=this,c=this.options.mergedCells||[],h=this.options.rows||[],p=_(h,c);this._readCells(p),t=this.options.filter,t&&"number"==typeof t.from&&"number"==typeof t.to?t={from:l(u(this.options),t.from),to:l(u(this.options),t.to)}:t&&t.ref&&t.columns&&(n=t,t=null),i=[];for(r in this._validations)Object.prototype.hasOwnProperty.call(d._validations,r)&&i.push(d._validations[r]);return o=null,this.options.defaultCellStyle&&(o=this._lookupStyle(this.options.defaultCellStyle)),a=this.options.freezePane||{},s=this.options.defaults||{},G({frozenColumns:this.options.frozenColumns||a.colSplit,frozenRows:this.options.frozenRows||a.rowSplit,columns:this.options.columns,defaults:s,data:p,index:e,mergeCells:c,autoFilter:t,filter:n,showGridLines:this.options.showGridLines,hyperlinks:this.options.hyperlinks||[],validations:i,defaultCellStyleId:o,rtl:void 0!==this.options.rtl?this.options.rtl:s.rtl})},_lookupString:function(e){var t,n="$"+e,i=this._strings.indexes[n];return void 0!==i?t=i:(t=this._strings.indexes[n]=this._strings.uniqueCount,this._strings.uniqueCount++),this._strings.count++,t},_lookupStyle:function(e){var t,i=JSON.stringify(e);return"{}"===i?0:(t=n(i,this._styles),t<0&&(t=this._styles.push(i)-1),t+1)},_lookupBorder:function(e){var t,i=JSON.stringify(e);if("{}"!==i)return t=n(i,this._borders),t<0&&(t=this._borders.push(i)-1),t+1},_readCells:function(e){var t,n,i,r,o,a=this;for(t=0;t<e.length;t++)for(n=e[t],i=n.cells,n.data=[],r=0;r<i.length;r++)o=a._cell(i[r],n.index,r),o&&n.data.push(o)},_cell:function(e,t,n){var i,r,o,a,s,d,u,c,h,f;return e&&e!==ie?(i=e.value,r={},e.borderLeft&&(r.left=e.borderLeft),e.borderRight&&(r.right=e.borderRight),e.borderTop&&(r.top=e.borderTop),e.borderBottom&&(r.bottom=e.borderBottom),r=this._lookupBorder(r),o=this.options.defaultCellStyle||{},a={borderId:r},function(e){e("color"),e("background"),e("bold"),e("italic"),e("underline"),e("fontFamily")||e("fontName","fontFamily"),e("fontSize"),e("format"),e("textAlign")||e("hAlign","textAlign"),e("verticalAlign")||e("vAlign","verticalAlign"),e("wrap")}(function(t,n){var i=e[t];if(void 0===i&&(i=o[t]),void 0!==i)return a[n||t]=i,!0}),s=this.options.columns||[],d=s[n],u=typeof i,d&&d.autoWidth&&(c=i,"number"===u&&(c=z.toString(i,e.format)),d.width=Math.max(d.width||0,(c+"").length)),"string"===u?(i=p(i),i=this._lookupString(i),u="s"):"number"===u?u="n":"boolean"===u?(u="b",i=+i):i&&i.getTime?(u=null,h=(i.getTimezoneOffset()-X.getTimezoneOffset())*B,i=(i-X-h)/P+1,a.format||(a.format="mm-dd-yy")):(u=null,i=null),a=this._lookupStyle(a),f=l(t,n),e.validation&&this._addValidation(e.validation,f),{value:i,formula:e.formula,type:u,style:a,ref:f}):null},_addValidation:function(e,t){var n={showErrorMessage:"reject"===e.type?1:0,formula1:e.from,formula2:e.to,type:ee[e.dataType]||e.dataType,operator:Z[e.comparerType]||e.comparerType,allowBlank:e.allowNulls?1:0,showDropDown:e.showButton?0:1,error:e.messageTemplate,errorTitle:e.titleTemplate},i=JSON.stringify(n);this._validations[i]||(this._validations[i]=n,n.sqref=[]),this._validations[i].sqref.push(t)}}),Z={greaterThanOrEqualTo:"greaterThanOrEqual",lessThanOrEqualTo:"lessThanOrEqual"},ee={number:"decimal"},te={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},ne=kendo.Class.extend({init:function(e){var t=this;this.options=e||{},this._strings={indexes:{},count:0,uniqueCount:0},this._styles=[],this._borders=[],this._sheets=I(this.options.sheets||[],function(e){return e.defaults=t.options,new J(e,t._strings,t._styles,t._borders)})},toZIP:function(){var e,t,i,r,o,a,s,l,c,h,p,m,g,v,_,b,k,w=this,y=R(),x=y.folder("docProps");for(x.file("core.xml",W({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,x.file("app.xml",U({sheets:this._sheets})),t=y.folder("_rels"),t.file(".rels",V),i=y.folder("xl"),r=i.folder("_rels"),r.file("workbook.xml.rels",$({count:e})),o={},i.file("workbook.xml",j({sheets:this._sheets,filterNames:I(this._sheets,function(e,t){var n,i=e.options,r=i.name||i.title||"Sheet"+(t+1);if(o[r.toLowerCase()]=t,n=i.filter,n&&void 0!==n.from&&void 0!==n.to)return{localSheetId:t,name:r,from:d(u(i),n.from),to:d(u(i),n.to)}}),userNames:I(this.options.names||[],function(e){return{name:e.localName,localSheetId:e.sheet?o[e.sheet.toLowerCase()]:null,value:e.value,hidden:e.hidden}})})),a=i.folder("worksheets"),s=a.folder("_rels"),l=0;l<e;l++)c=w._sheets[l],h="sheet"+(l+1)+".xml",p=c.relsToXML(),p&&s.file(h+".rels",p),a.file(h,c.toXML(l));return m=I(this._borders,L),g=I(this._styles,L),v=function(e){return e.underline||e.bold||e.italic||e.color||e.fontFamily||e.fontSize},_=I(g,function(e){if(e.color&&(e.color=f(e.color)),v(e))return e}),b=I(g,function(e){if(e.format&&void 0===te[e.format])return e}),k=I(g,function(e){if(e.background)return e.background=f(e.background),e}),i.file("styles.xml",Q({fonts:_,fills:k,formats:b,borders:m,styles:I(g,function(e){var t={};return v(e)&&(t.fontId=n(e,_)+1),e.background&&(t.fillId=n(e,k)+2),t.textAlign=e.textAlign,t.verticalAlign=e.verticalAlign,t.wrap=e.wrap,t.borderId=e.borderId,e.format&&(t.numFmtId=void 0!==te[e.format]?te[e.format]:165+n(e,b)),t})})),i.file("sharedStrings.xml",Y(this._strings)),y.file("[Content_Types].xml",q({count:e})),y},toDataURL:function(){var e=this.toZIP();return e.generateAsync?e.generateAsync(N).then(t):t(e.generate(N))}}),ie={},re=function(e){var t=e.ref,n=e.columns,i=e.generators;return'\n<autoFilter ref="'+t+'">\n '+o(n,function(e){return'\n <filterColumn colId="'+e.index+'">\n '+i[e.filter](e)+"\n </filterColumn>\n "})+"\n</autoFilter>"},oe=function(e){var t=e.logic,n=e.criteria;return"\n<customFilters "+("and"===t?'and="1"':"")+">\n"+o(n,function(e){var t=E.customOperator(e),n=E.customValue(e);return"<customFilter "+(t?'operator="'+t+'"':"")+' val="'+n+'"/>'})+"\n</customFilters>"},ae=function(e){var t=e.type;return'<dynamicFilter type="'+E.dynamicFilterType(t)+'" />'},se=function(e){var t=e.type,n=e.value;return'<top10 percent="'+(/percent$/i.test(t)?1:0)+'"\n top="'+(/^top/i.test(t)?1:0)+'"\n val="'+n+'" />'},le=function(e){var t=e.blanks,n=e.values;return"<filters "+(t?'blank="1"':"")+">\n "+o(n,function(e){
return'\n <filter val="'+e+'" />'})+"\n </filters>"},E.customOperator=function(e){return{eq:"equal",gt:"greaterThan",gte:"greaterThanOrEqual",lt:"lessThan",lte:"lessThanOrEqual",ne:"notEqual",doesnotstartwith:"notEqual",doesnotendwith:"notEqual",doesnotcontain:"notEqual",doesnotmatch:"notEqual"}[e.operator.toLowerCase()]},E.customValue=function(e){function t(e){return e.replace(/([*?])/g,"~$1")}switch(e.operator.toLowerCase()){case"startswith":case"doesnotstartwith":return t(e.value)+"*";case"endswith":case"doesnotendwith":return"*"+t(e.value);case"contains":case"doesnotcontain":return"*"+t(e.value)+"*";default:return e.value}},E.dynamicFilterType=function(e){return{quarter1:"Q1",quarter2:"Q2",quarter3:"Q3",quarter4:"Q4",january:"M1",february:"M2",march:"M3",april:"M4",may:"M5",june:"M6",july:"M7",august:"M8",september:"M9",october:"M10",november:"M11",december:"M12"}[e.toLowerCase()]||e},kendo.deepExtend(kendo.ooxml,{IntlService:z,Workbook:ne,Worksheet:J})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("ooxml/main.min",["kendo.core.min","ooxml/kendo-ooxml.min"],e)}(function(){!function(e){var t=kendo.ooxml.Workbook;kendo.ooxml.IntlService.register({toString:kendo.toString}),kendo.ooxml.Workbook=t.extend({toDataURL:function(){var e=t.fn.toDataURL.call(this);if("string"!=typeof e)throw Error("The toDataURL method can be used only with jsZip 2. Either include jsZip 2 or use the toDataURLAsync method.");return e},toDataURLAsync:function(){var n=e.Deferred(),i=t.fn.toDataURL.call(this);return"string"==typeof i?i=n.resolve(i):i&&i.then&&i.then(function(e){n.resolve(e)},function(){n.reject()}),n.promise()}})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.ooxml.min",["ooxml/main.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/kendo-excel.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e.title+": "+e.value}function n(e,t){var n,i=[];for(n=0;n<e;n++)i.push(t(n));return i}var i,r,o,a,s;window.kendo.excel=window.kendo.excel||{},i=kendo.getter,r=e.map,o={compile:function(e){return e}},a=kendo.Class.extend({}),a.register=function(e){o=e},a.compile=function(e){return o.compile(e)},s=kendo.Class.extend({init:function(e){e.columns=this._trimColumns(e.columns||[]),this.allColumns=r(this._leafColumns(e.columns||[]),this._prepareColumn),this.columns=this.allColumns.filter(function(e){return!e.hidden}),this.options=e,this.data=e.data||[],this.aggregates=e.aggregates||{},this.groups=[].concat(e.groups||[]),this.hierarchy=e.hierarchy},workbook:function(){var e={sheets:[{columns:this._columns(),rows:this.hierarchy?this._hierachyRows():this._rows(),freezePane:this._freezePane(),filter:this._filter()}]};return e},_trimColumns:function(e){var t=this;return e.filter(function(e){var n=!!e.field;return!n&&e.columns&&(n=t._trimColumns(e.columns).length>0),n})},_leafColumns:function(e){var t,n=this,i=[];for(t=0;t<e.length;t++)e[t].columns?i=i.concat(n._leafColumns(e[t].columns)):i.push(e[t]);return i},_prepareColumn:function(n){var r,o;return n.field?(r=function(e){return i(n.field)(e)},o=null,n.values&&(o={},n.values.forEach(function(e){o[e.value]=e.text}),r=function(e){return o[i(n.field)(e)]}),e.extend({},n,{value:r,values:o,groupHeaderTemplate:n.groupHeaderTemplate?a.compile(n.groupHeaderTemplate):t,groupFooterTemplate:n.groupFooterTemplate?a.compile(n.groupFooterTemplate):null,footerTemplate:n.footerTemplate?a.compile(n.footerTemplate):null})):null},_filter:function(){if(!this.options.filterable)return null;var e=this._depth();return{from:e,to:e+this.columns.length-1}},_createPaddingCells:function(t){var i=this;return n(t,function(){return e.extend({background:"#dfdfdf",color:"#333"},i.options.paddingCellOptions)})},_dataRow:function(t,n,i){var r,o,a,s,l,d,u,c,h=this,p=this._createPaddingCells(n);if(i&&t.items)return r=this.allColumns.filter(function(e){return e.field===t.field})[0],o=r&&r.title?r.title:t.field,a=r?r.groupHeaderTemplate:null,s=e.extend({title:o,field:t.field,value:r&&r.values?r.values[t.value]:t.value,aggregates:t.aggregates,items:t.items},t.aggregates[t.field]),l=o+": "+t.value,a&&(l=a(s)),p.push(e.extend({value:l,background:"#dfdfdf",color:"#333",colSpan:this.columns.length+i-n},(r||{}).groupHeaderCellOptions)),d=this._dataRows(t.items,n+1),d.unshift({type:"group-header",cells:p}),d.concat(this._footer(t));for(u=[],c=0;c<this.columns.length;c++)u[c]=h._cell(t,h.columns[c]);return this.hierarchy&&(u[0].colSpan=i-n+1),[{type:"data",cells:p.concat(u)}]},_dataRows:function(e,t){var n,i=this,r=this._depth(),o=[];for(n=0;n<e.length;n++)o.push.apply(o,i._dataRow(e[n],t,r));return o},_hierachyRows:function(){var e,t,n,i,r,o=this,a=this._depth(),s=this.data,l=this.hierarchy.itemLevel,d=this._hasFooterTemplate(),u=[],c=[],h=0;for(t=0;t<s.length;t++)n=s[t],i=l(n),d&&(i>h?c.push({id:e,level:h}):i<h&&u.push.apply(u,o._hierarchyFooterRows(c,i,a)),h=i,e=n.id),u.push.apply(u,o._dataRow(n,i+1,a));return d&&(u.push.apply(u,this._hierarchyFooterRows(c,0,a)),r=s.length?this.aggregates[s[0].parentId]:{},u.push(this._hierarchyFooter(r,0,a))),this._prependHeaderRows(u),u},_hierarchyFooterRows:function(e,t,n){for(var i,r=this,o=[];e.length&&e[e.length-1].level>=t;)i=e.pop(),o.push(r._hierarchyFooter(r.aggregates[i.id],i.level+1,n));return o},_hasFooterTemplate:function(){var e,t=this.columns;for(e=0;e<t.length;e++)if(t[e].footerTemplate)return!0},_hierarchyFooter:function(t,n,i){var r=this.columns.map(function(r,o){var a=o?1:i-n+1;return r.footerTemplate?e.extend({background:"#dfdfdf",color:"#333",colSpan:a,value:r.footerTemplate(e.extend({},(t||{})[r.field]))},r.footerCellOptions):e.extend({background:"#dfdfdf",color:"#333",colSpan:a},r.footerCellOptions)});return{type:"footer",cells:this._createPaddingCells(n).concat(r)}},_footer:function(t){var n=this,i=[],r=!1,o=this.columns.map(function(i){if(i.groupFooterTemplate){var o=e.extend({},n.aggregates,t.aggregates,t.aggregates[i.field],{group:{items:t.items,field:t.field,value:t.value}});return o[t.field]=o,r=!0,e.extend({background:"#dfdfdf",color:"#333",value:i.groupFooterTemplate(o)},i.groupFooterCellOptions)}return e.extend({background:"#dfdfdf",color:"#333"},i.groupFooterCellOptions)});return r&&i.push({type:"group-footer",cells:this._createPaddingCells(this.groups.length).concat(o)}),i},_isColumnVisible:function(e){return this._visibleColumns([e]).length>0&&(e.field||e.columns)},_visibleColumns:function(e){var t=this;return e.filter(function(e){var n=!e.hidden;return n&&e.columns&&(n=t._visibleColumns(e.columns).length>0),n})},_headerRow:function(t,i){var r=this,o=t.cells.map(function(n){return e.extend(n,{colSpan:n.colSpan>1?n.colSpan:1,rowSpan:t.rowSpan>1&&!n.colSpan?t.rowSpan:1})});return this.hierarchy&&(o[0].colSpan=this._depth()+1),{type:"header",cells:n(i.length,function(){return e.extend({background:"#7a7a7a",color:"#fff"},r.options.headerPaddingCellOptions)}).concat(o)}},_prependHeaderRows:function(e){var t,n=this,i=this.groups,r=[{rowSpan:1,cells:[],index:0}];for(this._prepareHeaderRows(r,this.options.columns),t=r.length-1;t>=0;t--)e.unshift(n._headerRow(r[t],i))},_prepareHeaderRows:function(t,n,i,r){var o,a,s,l=this,d=r||t[t.length-1],u=t[d.index+1],c=0;for(o=0;o<n.length;o++)a=n[o],l._isColumnVisible(a)&&(s=e.extend({background:"#7a7a7a",color:"#fff",value:a.title||a.field,colSpan:0},a.headerCellOptions),d.cells.push(s),a.columns&&a.columns.length&&(u||(u={rowSpan:0,cells:[],index:t.length},t.push(u)),s.colSpan=l._trimColumns(l._visibleColumns(a.columns)).length,l._prepareHeaderRows(t,a.columns,s,u),c+=s.colSpan-1,d.rowSpan=t.length-d.index));i&&(i.colSpan+=c)},_rows:function(){var t,n,i=this,r=this._dataRows(this.data,0);return this.columns.length&&(this._prependHeaderRows(r),t=!1,n=this.columns.map(function(n){return n.footerTemplate?(t=!0,e.extend({background:"#dfdfdf",color:"#333",value:n.footerTemplate(e.extend({},i.aggregates,i.aggregates[n.field]))},n.footerCellOptions)):e.extend({background:"#dfdfdf",color:"#333"},n.footerCellOptions)}),t&&r.push({type:"footer",cells:this._createPaddingCells(this.groups.length).concat(n)})),r},_headerDepth:function(e){var t,n,i=this,r=1,o=0;for(t=0;t<e.length;t++)e[t].columns&&(n=i._headerDepth(e[t].columns),n>o&&(o=n));return r+o},_freezePane:function(){var e=this._visibleColumns(this.options.columns||[]),t=this._visibleColumns(this._trimColumns(this._leafColumns(e.filter(function(e){return e.locked})))).length;return{rowSplit:this._headerDepth(e),colSplit:t?t+this.groups.length:0}},_cell:function(t,n){return e.extend({value:n.value(t)},n.cellOptions)},_depth:function(){var e=0;return e=this.hierarchy?this.hierarchy.depth:this.groups.length},_columns:function(){var e=this._depth(),t=n(e,function(){return{width:20}});return t.concat(this.columns.map(function(e){return{width:parseInt(e.width,10),autoWidth:!e.width}}))}}),kendo.deepExtend(kendo.excel,{ExcelExporter:s,TemplateService:a})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/main.min",["kendo.core.min","kendo.data.min","excel/kendo-excel.min"],e)}(function(){return function(e,t){var n=t.excel.ExcelExporter,i=e.extend;t.excel.TemplateService.register({compile:t.template}),t.ExcelExporter=t.Class.extend({init:function(e){var n,r,o;this.options=e,n=e.dataSource,n instanceof t.data.DataSource?(this.dataSource=new n.constructor(i({},n.options,{page:e.allPages?0:n.page(),filter:n.filter(),pageSize:e.allPages?n.total():n.pageSize(),sort:n.sort(),group:n.group(),aggregate:n.aggregate()})),r=n.data(),r.length>0&&(this.dataSource._data=r,o=this.dataSource.transport,n._isServerGrouped()&&o.options&&o.options.data&&(o.options.data=null))):this.dataSource=t.data.DataSource.create(n)},_hierarchy:function(){var e,t,n,i,r=this.options.hierarchy,o=this.dataSource;if(r&&o.level){for(r={itemLevel:function(e){return o.level(e)}},e=o.view(),t=0,i=0;i<e.length;i++)n=o.level(e[i]),n>t&&(t=n);r.depth=t+1}else r=!1;return{hierarchy:r}},workbook:function(){return e.Deferred(e.proxy(function(t){this.dataSource.fetch().then(e.proxy(function(){var e=new n(i({},this.options,this._hierarchy(),{data:this.dataSource.view(),groups:this.dataSource.group(),aggregates:this.dataSource.aggregates()})).workbook();t.resolve(e,this.dataSource.view())},this))},this)).promise()}})}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("excel/mixins.min",["excel/main.min","kendo.ooxml.min"],e)}(function(){return function(e,t){t.ExcelMixin={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",allPages:!1,filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var n=this.options.excel||{},i=new t.ExcelExporter({columns:this.columns,dataSource:this.dataSource,allPages:n.allPages,filterable:n.filterable,hierarchy:n.hierarchy});i.workbook().then(e.proxy(function(e,i){if(!this.trigger("excelExport",{workbook:e,data:i})){var r=new t.ooxml.Workbook(e);r.toDataURLAsync().then(function(i){t.saveAs({dataURI:i,fileName:e.fileName||n.fileName,proxyURL:n.proxyURL,forceProxy:n.forceProxy})})}},this))}}}(kendo.jQuery,kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.excel.min",["excel/main.min","excel/mixins.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.data.signalr.min",["kendo.data.min"],e)}(function(){return function(e){var t=kendo.data.RemoteTransport.extend({init:function(e){var t,n=e&&e.signalr?e.signalr:{},i=n.promise;if(!i)throw Error('The "promise" option must be set.');if("function"!=typeof i.done||"function"!=typeof i.fail)throw Error('The "promise" option must be a Promise.');if(this.promise=i,t=n.hub,!t)throw Error('The "hub" option must be set.');if("function"!=typeof t.on||"function"!=typeof t.invoke)throw Error('The "hub" option is not a valid SignalR hub proxy.');this.hub=t,kendo.data.RemoteTransport.fn.init.call(this,e)},push:function(e){var t=this.options.signalr.client||{};t.create&&this.hub.on(t.create,e.pushCreate),t.update&&this.hub.on(t.update,e.pushUpdate),t.destroy&&this.hub.on(t.destroy,e.pushDestroy)},_crud:function(t,n){var i,r,o=this.hub,a=this.options.signalr.server;if(!a||!a[n])throw Error(kendo.format('The "server.{0}" option must be set.',n));i=[a[n]],r=this.parameterMap(t.data,n),e.isEmptyObject(r)||i.push(r),this.promise.done(function(){o.invoke.apply(o,i).done(t.success).fail(t.error)})},read:function(e){this._crud(e,"read")},create:function(e){this._crud(e,"create")},update:function(e){this._crud(e,"update")},destroy:function(e){this._crud(e,"destroy")}});e.extend(!0,kendo.data,{transports:{signalr:t}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/util.min",["kendo.core.min"],e)}(function(){return function(e){function t(){return e.Deferred()}function n(t){return e.when.apply(e,t)}kendo.drawing.util=kendo.drawing.util||{},kendo.deepExtend(kendo.drawing.util,{createPromise:t,promiseAll:n})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.color.min",["kendo.core.min"],e)}(function(){function e(e,t,n){void 0===n&&(n="0");for(var i=e.toString(16);t>i.length;)i=n+i;return i}function t(e,t,n){var i=n;return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function n(e,t){var i,r,a;if(null==e||"none"===e)return null;if(e instanceof l)return e;if(a=e.toLowerCase(),i=s(a))return a="transparent"===i[1]?new d(1,1,1,0):n(o[i[1]],t),a.match=[i[1]],a;if((i=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(a))?r=new u(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16),1):(i=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(a))?r=new u(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16),1):(i=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(a))?r=new u(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),1):(i=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(a))?r=new u(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4])):(i=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(a))?r=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,1):(i=/^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(a))&&(r=new d(parseFloat(i[1])/100,parseFloat(i[2])/100,parseFloat(i[3])/100,parseFloat(i[4]))),r)r.match=i;else if(!t)throw Error("Cannot parse color: "+a);return r}var i,r,o,a,s,l,d,u,c,h,p;window.kendo=window.kendo||{},i=kendo.Class,r=kendo.support,o={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgrey:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",grey:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightslategrey:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},a=r.browser,s=function(e){var t,n=Object.keys(o);return n.push("transparent"),t=RegExp("^("+n.join("|")+")(\\W|$)","i"),s=function(e){return t.exec(e)},t.exec(e)},l=i.extend({init:function(){},toHSV:function(){return this},toRGB:function(){return this},toHex:function(){return this.toBytes().toHex()},toBytes:function(){return this},toCss:function(){return"#"+this.toHex()},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat((+this.a).toFixed(3))+")"},toDisplay:function(){return a.msie&&a.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!==e&&this.toCssRgba()===n(e).toCssRgba()},diff:function(e){var t,n;return null===e?NaN:(t=this.toBytes(),n=e.toBytes(),Math.sqrt(Math.pow(.3*(t.r-n.r),2)+Math.pow(.59*(t.g-n.g),2)+Math.pow(.11*(t.b-n.b),2)))},clone:function(){var e=this.toBytes();return e===this&&(e=new u(e.r,e.g,e.b,e.a)),e}}),d=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.r=e,this.g=t,this.b=n,this.a=i},toHSV:function(){var e,t,n=this,i=n.r,r=n.g,o=n.b,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,d=s;return 0===l?new c(0,0,d,this.a):(0!==s?(t=l/s,e=i===s?(r-o)/l:r===s?2+(o-i)/l:4+(i-r)/l,e*=60,e<0&&(e+=360)):(t=0,e=-1),new c(e,t,d,this.a))},toHSL:function(){var e,t,n,i=this,r=i.r,o=i.g,a=i.b,s=Math.max(r,o,a),l=Math.min(r,o,a),d=(s+l)/2;if(s===l)e=t=0;else{switch(n=s-l,t=d>.5?n/(2-s-l):n/(s+l),s){case r:e=(o-a)/n+(o<a?6:0);break;case o:e=(a-r)/n+2;break;case a:e=(r-o)/n+4}e*=60,t*=100,d*=100}return new h(e,t,d,this.a)},toBytes:function(){return new u(255*this.r,255*this.g,255*this.b,this.a)}}),u=d.extend({init:function(e,t,n,i){d.fn.init.call(this,Math.round(e),Math.round(t),Math.round(n),i)},toRGB:function(){return new d(this.r/255,this.g/255,this.b/255,this.a)},toHSV:function(){return this.toRGB().toHSV()},toHSL:function(){return this.toRGB().toHSL()},toHex:function(){return e(this.r,2)+e(this.g,2)+e(this.b,2)},toBytes:function(){return this}}),c=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i,r,o,a,s,l=this,u=l.h,c=l.s,h=l.v;if(0===c)e=t=n=h;else switch(u/=60,i=Math.floor(u),r=u-i,o=h*(1-c),a=h*(1-c*r),s=h*(1-c*(1-r)),i){case 0:e=h,t=s,n=o;break;case 1:e=a,t=h,n=o;break;case 2:e=o,t=h,n=s;break;case 3:e=o,t=a,n=h;break;case 4:e=s,t=o,n=h;break;default:e=h,t=o,n=a}return new d(e,t,n,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),h=l.extend({init:function(e,t,n,i){l.fn.init.call(this),this.h=e,this.s=t,this.l=n,this.a=i},toRGB:function(){var e,n,i,r,o,a=this,s=a.h,l=a.s,u=a.l;return 0===l?e=n=i=u:(s/=360,l/=100,u/=100,r=u<.5?u*(1+l):u+l-u*l,o=2*u-r,e=t(o,r,s+1/3),n=t(o,r,s),i=t(o,r,s-1/3)),new d(e,n,i,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}}),p=i.extend({init:function(e){var t,n,i,r,o,a,s,l=this;if(1===arguments.length)for(t=p.formats,n=this.resolveColor(e),i=0;i<t.length;i++)r=t[i].re,o=t[i].process,a=r.exec(n),a&&(s=o(a),l.r=s[0],l.g=s[1],l.b=s[2]);else this.r=arguments[0],this.g=arguments[1],this.b=arguments[2];this.r=this.normalizeByte(this.r),this.g=this.normalizeByte(this.g),this.b=this.normalizeByte(this.b)},toHex:function(){var e=this.padDigit,t=this.r.toString(16),n=this.g.toString(16),i=this.b.toString(16);return"#"+e(t)+e(n)+e(i)},resolveColor:function(e){var t=e||"black";return"#"===t.charAt(0)&&(t=t.substr(1,6)),t=t.replace(/ /g,""),t=t.toLowerCase(),t=p.namedColors[t]||t},normalizeByte:function(e){return e<0||isNaN(e)?0:e>255?255:e},padDigit:function(e){return 1===e.length?"0"+e:e},brightness:function(e){var t=Math.round;return this.r=t(this.normalizeByte(this.r*e)),this.g=t(this.normalizeByte(this.g*e)),this.b=t(this.normalizeByte(this.b*e)),this},percBrightness:function(){return Math.sqrt(.241*this.r*this.r+.691*this.g*this.g+.068*this.b*this.b)}}),p.fromBytes=function(e,t,n,i){return new u(e,t,n,null!=i?i:1)},p.fromRGB=function(e,t,n,i){return new d(e,t,n,null!=i?i:1)},p.fromHSV=function(e,t,n,i){return new c(e,t,n,null!=i?i:1)},p.fromHSL=function(e,t,n,i){return new h(e,t,n,null!=i?i:1)},p.formats=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,process:function(e){return[parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)]}},{re:/^(\w{2})(\w{2})(\w{2})$/,process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],p.namedColors=o,kendo.deepExtend(kendo,{parseColor:n,Color:p})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/text-metrics.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return(e+"").replace(s,l)}function n(e){var t,n=[];for(t in e)n.push(t+e[t]);return n.sort().join("")}function i(e){var t,n=2166136261;for(t=0;t<e.length;++t)n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24),n^=e.charCodeAt(t);return n>>>0}function r(){return{width:0,height:0,baseline:0}}function o(e,t,n){return c.current.measure(e,t,n)}var a,s,l,d,u,c;window.kendo.util=window.kendo.util||{},a=kendo.Class.extend({init:function(e){this._size=e,this._length=0,this._map={}},put:function(e,t){var n=this._map,i={key:e,value:t};n[e]=i,this._head?(this._tail.newer=i,i.older=this._tail,this._tail=i):this._head=this._tail=i,this._length>=this._size?(n[this._head.key]=null,this._head=this._head.newer,this._head.older=null):this._length++},get:function(e){var t=this._map[e];if(t)return t===this._head&&t!==this._tail&&(this._head=t.newer,this._head.older=null),t!==this._tail&&(t.older&&(t.older.newer=t.newer,t.newer.older=t.older),t.older=this._tail,t.newer=null,this._tail.newer=t,this._tail=t),t.value}}),s=/\r?\n|\r|\t/g,l=" ",d={baselineMarkerSize:1},"undefined"!=typeof document&&(u=document.createElement("div"),u.style.cssText="position: absolute !important; top: -4000px !important; width: auto !important; height: auto !important;padding: 0 !important; margin: 0 !important; border: 0 !important;line-height: normal !important; visibility: hidden !important; white-space: pre!important;"),c=kendo.Class.extend({init:function(t){this._cache=new a(1e3),this.options=e.extend({},d,t)},measure:function(e,o,a){var s,l,d,c,h,p,f,m,g;if(void 0===a&&(a={}),!e)return r();if(s=n(o),l=i(e+s),d=this._cache.get(l))return d;c=r(),h=a.box||u,p=this._baselineMarker().cloneNode(!1);for(f in o)m=o[f],void 0!==m&&(h.style[f]=m);return g=a.normalizeText!==!1?t(e):e+"",h.textContent=g,h.appendChild(p),document.body.appendChild(h),g.length&&(c.width=h.offsetWidth-this.options.baselineMarkerSize,c.height=h.offsetHeight,c.baseline=p.offsetTop+this.options.baselineMarkerSize),c.width>0&&c.height>0&&this._cache.put(l,c),h.parentNode.removeChild(h),c},_baselineMarker:function(){var e=document.createElement("div");return e.style.cssText="display: inline-block; vertical-align: baseline;width: "+this.options.baselineMarkerSize+"px; height: "+this.options.baselineMarkerSize+"px;overflow: hidden;",e}}),c.current=new c,kendo.deepExtend(kendo.util,{LRUCache:a,TextMetrics:c,measureText:o,objectKey:n,hashKey:i,normalizeText:t})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/kendo-drawing.min",["drawing/util.min","kendo.color.min","util/text-metrics.min"],e)}(function(){!function(e){function t(e,t){return e.push.apply(e,t),e}function n(e){for(var t=[1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],n="";e>0;)e<t[0]?t.shift():(n+=Xt[t[0]],e-=t[0]);return n}function i(e){return typeof e!==Jt}function r(){return"kdef"+Zt++}function o(e){return e/en}function a(e){var t,n,i="";for(t=0;t<e.length;t++)n=e.charCodeAt(t),n<128?i+=on(n):n<2048?(i+=on(192|n>>>6),i+=on(128|63&n)):n<65536&&(i+=on(224|n>>>12),i+=on(128|n>>>6&63),i+=on(128|63&n));return i}function s(e){for(var t,n,i,r,o,s,l,d="",u=0,c=a(e);u<c.length;)t=c.charCodeAt(u++),n=c.charCodeAt(u++),i=c.charCodeAt(u++),r=t>>2,o=(3&t)<<4|n>>4,s=(15&n)<<2|i>>6,l=63&i,isNaN(n)?s=l=64:isNaN(i)&&(l=64),d=d+rn.charAt(r)+rn.charAt(o)+rn.charAt(s)+rn.charAt(l);return d}function l(e){return i((e.x||{}).location)?{x:e.x.location,y:e.y.location}:{x:e.pageX||e.clientX||0,y:e.pageY||e.clientY||0}}function d(e){return void 0===e&&(e={}),e.touch?e.touch.initialTouch:e.target}function u(e){return""===e||null===e||"none"===e||"transparent"===e||!i(e)}function c(e){if(e)return e[e.length-1]}function h(e,t,n){return Math.max(Math.min(e,n),t)}function p(e,t){function n(e,n){for(var i=[],r=0,o=0,a=0;r<e.length&&o<n.length;)t(e[r],n[o])<=0?i[a++]=e[r++]:i[a++]=n[o++];return r<e.length&&i.push.apply(i,e.slice(r)),o<n.length&&i.push.apply(i,n.slice(o)),i}return e.length<2?e.slice():function i(e){var t,r,o;return e.length<=1?e:(t=Math.floor(e.length/2),r=e.slice(0,t),o=e.slice(t),r=i(r),o=i(o),n(r,o))}(e)}function f(e){return e*en}function m(e){return e?Math.pow(10,e):1}function g(e,t){var n=m(t);return Math.round(e*n)/n}function v(e,t){return i(e)?e:t}function _(e,t){var n,i,r;for(n in t)for(i=n.trim().split(" "),r=0;r<i.length;r++)e.addEventListener(i[r],t[n],!1)}function b(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||0),left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}}function k(e,t){var n,i,r={},o=window.getComputedStyle(e),a=Array.isArray(t)?t:[t];for(n=0;n<a.length;n++)i=a[n],r[i]=o[i];return r}function w(e){return isNaN(e)?e:e+"px"}function y(e,t){var n,r,o;return t?(n=t.width,r=t.height,i(n)&&(e.style.width=w(n)),i(r)&&(e.style.height=w(r)),void 0):(o=k(e,["width","height"]),{width:parseInt(o.width,10),height:parseInt(o.height,10)})}function x(e,t){var n,i,r;void 0===t&&(t={});for(n in t)for(i=n.trim().split(" "),r=0;r<i.length;r++)e.removeEventListener(i[r],t[n],!1)}function C(e){return function(t){return this[e]!==t&&(this[e]=t,this.geometryChange()),this}}function T(e){return function(){return this[e]}}function S(e,t){var n,i,r;for(n=0;n<t.length;n++)i=t[n],r=i.charAt(0).toUpperCase()+i.substring(1,i.length),e["set"+r]=C(i),e["get"+r]=T(i)}function D(e){return e&&"function"==typeof e.matrix?e.matrix():e}function F(e){return null===e?null:e instanceof pn?e:new pn(e)}function E(e,t,n,i){var r=0,o=0;return i&&(r=Math.atan2(i.c*n,i.a*t),0!==i.b&&(o=Math.atan2(i.d*n,i.b*t))),{x:r,y:o}}function A(e){var t="_"+e;return function(e){return i(e)?(this._observerField(t,e),this.geometryChange(),this):this[t]}}function I(e,t){for(var n=0;n<t.length;n++)e[t[n]]=A(t[n])}function R(e,t,n){return void 0===n&&(n=xn),0===g(Math.abs(e-t),n)}function M(e,t,n){return e<t||R(e,t,n)}function z(e,t,n,i){var r=t.x-e.x,o=i.x-n.x,a=t.y-e.y,s=i.y-n.y,l=e.x-n.x,d=e.y-n.y,u=r*s-o*a,c=(r*d-a*l)/u,h=(o*d-s*l)/u;if(c>=0&&c<=1&&h>=0&&h<=1)return new un(e.x+h*r,e.y+h*a)}function H(e,t,n,i,r,a){var s=g((r-e)/n,3),l=g((a-t)/i,3);return g(o(Math.atan2(l,s)))}function N(e){var t,n,i,r,a,s,l,d,u,c,h,p,m,v,_,b,k,w,y,x,C,T,S,D,F,E=e.x1,A=e.y1,I=e.x2,R=e.y2,M=e.rx,z=e.ry,H=e.largeArc,N=e.swipe,B=e.rotation;return void 0===B&&(B=0),t=f(B),n=Math.cos(t),i=Math.sin(t),r=n*(E-I)/2+i*(A-R)/2,a=-i*(E-I)/2+n*(A-R)/2,s=H!==N?1:-1,l=Math.pow(r,2),d=Math.pow(a,2),u=Math.pow(M,2),c=Math.pow(z,2),h=l/u+d/c,h>1&&(h=Math.sqrt(l/u+d/c),M=h*M,u=Math.pow(M,2),z=h*z,c=Math.pow(z,2)),p=s*Math.sqrt((u*c-u*d-c*l)/(u*d+c*l)),isNaN(p)&&(p=0),m=p*(M*a)/z,v=-p*(z*r)/M,_=n*m-i*v+(E+I)/2,b=i*m+n*v+(A+R)/2,k=(r-m)/M,w=(a-v)/z,y=-(r+m)/M,x=-(a+v)/z,C=(w>=0?1:-1)*o(Math.acos(k/Math.sqrt(k*k+w*w))),T=g((k*y+w*x)/(Math.sqrt(k*k+w*w)*Math.sqrt(y*y+x*x)),10),S=(k*x-w*y>=0?1:-1)*o(Math.acos(T)),!N&&S>0&&(S-=360),N&&S<0&&(S+=360),D=C+S,F=D>=0?1:-1,D=Math.abs(D)%360*F,{center:new un(_,b),startAngle:C,endAngle:D,radiusX:M,radiusY:z,xRotation:B}}function B(e,t){for(var n=e;n<t;)n+=90;return n}function P(e){var t="_"+e;return function(e){return i(e)?(this._observerField(t,un.create(e)),this.geometryChange(),this):this[t]}}function L(e,t){for(var n=0;n<t.length;n++)e[t[n]]=P(t[n])}function O(e,t,n){var i=o(Math.atan2(t.y-e.y,t.x-e.x)),r=n.transformCopy(F().rotate(-i,e));return r.x<e.x}function V(e,t,n){var i=1-e;return Math.pow(i,3)*n[0][t]+3*Math.pow(i,2)*e*n[1][t]+3*Math.pow(e,2)*i*n[2][t]+Math.pow(e,3)*n[3][t]}function W(e,t){return[-e[0][t]+3*e[1][t]-3*e[2][t]+e[3][t],3*(e[0][t]-2*e[1][t]+e[2][t]),3*(-e[0][t]+e[1][t]),e[0][t]]}function U(e){return e<0?-1:1}function q(e,t,n){var i=Math.sqrt(Math.pow(t,2)-4*e*n);return[(-t+i)/(2*e),(-t-i)/(2*e)]}function j(e,t,n,i){var r,o,a,s,l,d,u,c,h,p,f,m,v;return 0===e?q(t,n,i):(r=(3*e*n-Math.pow(t,2))/(3*Math.pow(e,2)),o=(2*Math.pow(t,3)-9*e*t*n+27*Math.pow(e,2)*i)/(27*Math.pow(e,3)),a=Math.pow(r/3,3)+Math.pow(o/2,2),s=new Hn(0,1),l=-t/(3*e),a<0?(d=new Hn(-o/2,Math.sqrt(-a)).nthRoot(3),u=new Hn(-o/2,(-Math.sqrt(-a))).nthRoot(3)):(d=-o/2+Math.sqrt(a),d=new Hn(U(d)*Math.pow(Math.abs(d),1/3)),u=-o/2-Math.sqrt(a),u=new Hn(U(u)*Math.pow(Math.abs(u),1/3))),c=d.add(u),f=d.add(u).multiplyConstant(-.5),m=d.add(u.negate()).multiplyConstant(Math.sqrt(3)/2),h=f.add(s.multiply(m)),p=f.add(s.negate().multiply(m)),v=[],c.isReal()&&v.push(g(c.real+l,xn)),h.isReal()&&v.push(g(h.real+l,xn)),p.isReal()&&v.push(g(p.real+l,xn)),v)}function G(e,t,n,i,r){var o,a,s=W(e,i),l=j(s[0],s[1],s[2],s[3]-t[i]);for(a=0;a<l.length;a++)if(0<=l[a]&&l[a]<=1&&(o=V(l[a],n,e),Math.abs(o-t[n])<=r))return!0}function $(e,t,n){var i,r,o,a=W(e,"x"),s=j(a[0],a[1],a[2],a[3]-t.x),l=0;for(o=0;o<s.length;o++)i=V(s[o],"y",e),r=R(i,t.y)||i>t.y,r&&((0===s[o]||1===s[o])&&n.bottomRight().x>t.x||0<s[o]&&s[o]<1)&&l++;return l}function K(e,t,n){var i,r,o,a,s,l;return e.x!==t.x&&(r=Math.min(e.x,t.x),o=Math.max(e.x,t.x),a=Math.min(e.y,t.y),s=Math.max(e.y,t.y),l=r<=n.x&&n.x<o,i=a===s?n.y<=a&&l:l&&(s-a)*((e.x-t.x)*(e.y-t.y)>0?n.x-r:o-n.x)/(o-r)+a-n.y>=0),i?1:0}function Y(e){var t,n=e.length,i=tn,r=nn;for(t=0;t<n;t++)r=Math.max(r,e[t]),i=Math.min(i,e[t]);return{min:i,max:r}}function Q(e,t,n){var i,r,o,a;for(r=0;r<e.length;r++)o=e[r],o.visible()&&(a=t?o.bbox(n):o.rawBBox(),a&&(i=i?hn.union(i,a):a));return i}function X(e,t){var n,i,r,o;for(i=0;i<e.length;i++)r=e[i],r.visible()&&(o=r.clippedBBox(t),o&&(n=n?hn.union(n,o):o));
return n}function J(e,t,n){var i=n.transform()||F(),r=i.matrix();r.e+=e.x-t.origin.x,r.f+=e.y-t.origin.y,i.matrix(r),n.transform(i)}function Z(e,t,n,i,r){var o;return o="start"===n?t.origin[i]:"end"===n?t.origin[i]+t.size[r]-e:t.origin[i]+(t.size[r]-e)/2}function ee(e,t,n,i,r){var o;return o="start"===n?t.origin[i]+t.size[r]-e:"end"===n?t.origin[i]:t.origin[i]+(t.size[r]-e)/2}function te(e,t,n,i,r){var o,a,s;for(o=0;o<e.length;o++)a=e[o].clippedBBox(),a&&(s=a.origin.clone(),s[i]=Z(a.size[r],t,n||"start",i,r),J(s,a,e[o]))}function ne(e,t,n){te(e,t,n,"x","width")}function ie(e,t,n){te(e,t,n,"y","height")}function re(e,t,n,i){var r,o,a,s,l;if(e.length>1)for(r=new un,o=e[0].bbox,a=1;a<e.length;a++)s=e[a].element,l=e[a].bbox,r[t]=o.origin[t]+o.size[i],r[n]=l.origin[n],J(r,l,s),l.origin[t]=r[t],o=l}function oe(e){var t,n,i,r=[];for(t=0;t<e.length;t++)n=e[t],i=n.clippedBBox(),i&&r.push({element:n,bbox:i});return r}function ae(e){re(oe(e),"x","y","width")}function se(e){re(oe(e),"y","x","height")}function le(e,t,n){var i,r,o,a,s=t.size[n],l=[],d=[],u=0,c=function(){d.push({element:i,bbox:r})};for(o=0;o<e.length;o++)i=e[o],r=i.clippedBBox(),r&&(a=r.size[n],u+a>s?d.length?(l.push(d),d=[],c(),u=a):(c(),l.push(d),d=[],u=0):(c(),u+=a));return d.length&&l.push(d),l}function de(e,t,n,i,r){var o,a,s,l,d=le(e,t,r),u=t.origin.clone(),c=[];for(o=0;o<d.length;o++)for(a=d[o],s=a[0],u[i]=s.bbox.origin[i],J(u,s.bbox,s.element),s.bbox.origin[n]=u[n],re(a,n,i,r),c.push([]),l=0;l<a.length;l++)c[o].push(a[l].element);return c}function ue(e,t){return de(e,t,"x","y","width")}function ce(e,t){return de(e,t,"y","x","height")}function he(e,t){var n,i,r,o,a=e.clippedBBox();a&&(n=a.size,i=t.size,(i.width<n.width||i.height<n.height)&&(r=Math.min(i.width/n.width,i.height/n.height),o=e.transform()||F(),o.scale(r,r),e.transform(o)))}function pe(e){return function(t){return i(t)?(this.options.set(e,t),this):this.options.get(e)}}function fe(e,t){for(var n=0;n<t.length;n++)e[t[n]]=pe(t[n])}function me(e){return.5-Math.cos(e*Math.PI)/2}function ge(e){return e}function ve(e,t,n,i){var r=1.70158,o=0,a=i;return 0===e?n:1===e?n+i:(o||(o=.5),a<Math.abs(i)?(a=i,r=o/4):r=o/(2*Math.PI)*Math.asin(i/a),a*Math.pow(2,-10*e)*Math.sin((+e-r)*(1.1*Math.PI)/o)+i+n)}function _e(e,t,n){var i,r=t?0:1;for(i=0;i<e.length;i+=2)e.splice(i+r,0,n)}function be(e,t){if(e&&t)return t.scaleCopy(2).translate(-e.x,-e.y)}function ke(e,t,n){var i=t.clone().scale(2/3);return{controlOut:i.clone().translateWith(e.scaleCopy(li)),controlIn:i.translateWith(n.scaleCopy(li))}}function we(e){var t=[];return e.replace(ui,function(e,n){t.push(parseFloat(n))}),t}function ye(e,t){return i(t)&&null!==t?" "+e+"='"+t+"' ":""}function xe(e){var t,n="";for(t=0;t<e.length;t++)n+=ye(e[t][0],e[t][1]);return n}function Ce(e){var t,n,r="";for(t=0;t<e.length;t++)n=e[t][1],i(n)&&(r+=e[t][0]+":"+n+";");if(""!==r)return r}function Te(e,t){return"clip"===e||"fill"===e&&(!t||"Gradient"===t.nodeType)}function Se(){var e=document.getElementsByTagName("base")[0],t=document.location.href,n=t.indexOf("#"),i="";return e&&!$t.msie&&(n!==-1&&(t=t.substring(0,n)),i=t),i}function De(e,t){var n=t?"":Se();return"url("+n+"#"+e+")"}function Fe(e){var t,n,i,r;try{t=e.getScreenCTM?e.getScreenCTM():null}catch(o){}t&&(n=-t.e%1,i=-t.f%1,r=e.style,0===n&&0===i||(r.left=n+"px",r.top=i+"px"))}function Ee(e){if(!e||"string"!=typeof e||!Yi.test(e))return e;var t=Ee._element;return Yi.lastIndex=0,e.replace(Yi,function(e){return t.innerHTML=e,t.textContent||t.innerText})}function Ae(e){var t,n,i,r=new Hi({skipBaseHref:!0}),o=e.clippedBBox(),a=e;return o&&(t=o.getOrigin(),n=new Gn,n.transform(F().translate(-t.x,-t.y)),n.children.push(e),a=n),r.load([a]),i="<?xml version='1.0' ?><svg xmlns='"+bi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+r.render()+"</svg>",r.destroy(),i}function Ie(e,t){var n,i,r,o,a,s,l=t.segments;if(0!==l.length){for(n=l[0],i=n.anchor(),e.moveTo(i.x,i.y),r=1;r<l.length;r++)n=l[r],i=n.anchor(),o=l[r-1],a=o.controlOut(),s=n.controlIn(),a&&s?e.bezierCurveTo(a.x,a.y,s.x,s.y,i.x,i.y):e.lineTo(i.x,i.y);t.options.closed&&e.closePath()}}function Re(e,t){return e._zIndex<t._zIndex?1:e._zIndex>t._zIndex?-1:0}function Me(e,t){var n,i,r;for(n=0;n<t.length;n++)i=t[n],r=kendo.parseColor(i.color()),r.a*=i.opacity(),e.addColorStop(i.offset(),r.toCssRgba())}function ze(t,n){var i,r,o,a,s,l,d,u,c={width:"800px",height:"600px",cors:"Anonymous"},h=t,p=t.clippedBBox();return p&&(i=p.getOrigin(),h=new Gn,h.transform(F().translate(-i.x,-i.y)),h.children.push(t),r=p.getSize(),c.width=r.width+"px",c.height=r.height+"px"),o=e.extend(c,n),a=document.createElement("div"),s=a.style,s.display="none",s.width=o.width,s.height=o.height,document.body.appendChild(a),l=new hr(a,o),l.suspendTracking(),l.draw(h),d=l.image(),u=function(){l.destroy(),document.body.removeChild(a)},d.then(u,u),d}function He(e,t){var n=Ae(e);return t&&t.raw||(n="data:image/svg+xml;base64,"+s(n)),Kt().resolve(n)}function Ne(e){return Array.prototype.slice.call(e)}function Be(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Pe(e,t){e.classList?e.classList.remove(t):e.className=e.className.split(/\s+/).reduce(function(e,n){return n!=t&&e.push(n),e},[]).join(" ")}function Le(e,t){Object.keys(t).forEach(function(n){e.style[n]=t[n]})}function Oe(e,t){if(e.closest)return e.closest(t);for(;e&&!/^\[object (?:HTML)?Document\]$/.test(e+"");){if(1==e.nodeType&&Dr(e,t))return e;e=e.parentNode}}function Ve(e){return"number"==typeof e?{x:e,y:e}:Array.isArray(e)?{x:e[0],y:e[1]}:{x:e.x,y:e.y}}function We(e,t){function n(e){var n=new Gn,i=e.getBoundingClientRect();return vt(n,[a.x,0,0,a.y,-i.left*a.x,-i.top*a.y]),Cr._clipbox=!1,Cr._matrix=dn.unit(),Cr._stackingContext={element:e,group:n},Cr._avoidLinks=t.avoidLinks===!0?"a":t.avoidLinks,Be(e,"k-pdf-export"),Ot(e,n),Pe(e,"k-pdf-export"),n}function i(e){if(null!=e)return"string"==typeof e&&(e=kendo.template(e.replace(/^\s+|\s+$/g,""))),"function"==typeof e?function(t){var n,i=e(t);return i&&"string"==typeof i&&(n=document.createElement("div"),n.innerHTML=i,i=n.firstElementChild),i}:function(){return e.cloneNode(!0)}}function r(e,t,n,r,o,a,s){function l(){("-"!=n||o)&&u(k);var t=p();k.parentNode.insertBefore(t,k),t.appendChild(k),v&&b.forEach(function(e,t){var n=v({element:e,pageNum:t+1,totalPages:b.length});n&&e.appendChild(n)}),Ze(b,function(){Je(b,function(){e({pages:b,container:w})})})}function d(e){if(s.keepTogether&&Dr(e,s.keepTogether)&&e.offsetHeight<=o-y)return!0;var t=e.tagName;return!(/^h[1-6]$/i.test(t)&&e.offsetHeight>=o-y)&&(e.getAttribute("data-kendo-chart")||/^(?:img|tr|thead|th|tfoot|iframe|svg|object|canvas|input|textarea|select|video|h[1-6])/i.test(e.tagName))}function u(e){var t,i,r,a,s,l,c;for("TABLE"==e.tagName&&Le(e,{tableLayout:"fixed"}),t=at(e),i=parseFloat(st(t,"padding-bottom")),r=parseFloat(st(t,"border-bottom-width")),a=y,y+=i+r,s=!0,l=e.firstChild;l;l=l.nextSibling)if(1==l.nodeType){if(s=!1,Dr(l,n)){h(l);continue}if(!o){u(l);continue}if(!/^(?:static|relative)$/.test(st(at(l),"position")))continue;c=f(l),1==c?h(l):c&&d(l)?h(l):u(l)}else 3==l.nodeType&&o&&(m(l,s),s=!1);y=a}function c(e){var t=e.parentNode,n=t.firstChild;if(e===n)return!0;if(e===t.children[0]){if(7==n.nodeType||8==n.nodeType)return!0;if(3==n.nodeType)return!/\S/.test(n.data)}return!1}function h(e){var t,n,i,r,o,a,l;return 1==e.nodeType&&e!==k&&c(e)?h(e.parentNode):(t=Oe(e,"table"),n=t&&t.querySelector("colgroup"),s.repeatHeaders&&(i=t&&t.querySelector("thead"),r=Oe(e,".k-grid.k-widget"),r&&r.querySelector(".k-auto-scrollable")&&(o=r.querySelector(".k-grid-header"))),a=p(),l=_.createRange(),l.setStartBefore(k),l.setEndBefore(e),a.appendChild(l.extractContents()),k.parentNode.insertBefore(a,k),g(e.parentNode),t&&(t=Oe(e,"table"),s.repeatHeaders&&i&&t.insertBefore(i.cloneNode(!0),t.firstChild),n&&t.insertBefore(n.cloneNode(!0),t.firstChild)),void(s.repeatHeaders&&o&&(r=Oe(e,".k-grid.k-widget"),r.insertBefore(o.cloneNode(!0),r.firstChild))))}function p(){var e=_.createElement("KENDO-PDF-PAGE");return Le(e,{display:"block",boxSizing:"content-box",width:r?r+"px":"auto",padding:a.top+"px "+a.right+"px "+a.bottom+"px "+a.left+"px",position:"relative",height:o?o+"px":"auto",overflow:o||r?"hidden":"visible",clear:"both"}),s&&s.pageClassName&&(e.className=s.pageClassName),b.push(e),e}function f(e){var t,n,i=e.getBoundingClientRect();return 0===i.width||0===i.height?0:(t=k.getBoundingClientRect().top,n=o-y,i.height>n?3:i.top-t>n?1:i.bottom-t>n?2:0)}function m(e,t){var n,i,r,o,a;/\S/.test(e.data)&&(n=e.data.length,i=_.createRange(),i.selectNodeContents(e),r=f(i),r&&(o=e,1==r?h(t?e.parentNode:e):(!function s(t,n,r){return i.setEnd(e,n),t==n||n==r?n:f(i)?s(t,t+n>>1,n):s(n,n+r>>1,r)}(0,n>>1,n),!/\S/.test(""+i)&&t?h(e.parentNode):(o=e.splitText(i.endOffset),a=p(),i.setStartBefore(k),a.appendChild(i.extractContents()),k.parentNode.insertBefore(a,k),g(o.parentNode))),m(o)))}function g(e){var t=Oe(e,"li");t&&(t.setAttribute("kendo-no-bullet","1"),g(t.parentNode))}var v=i(s.template),_=t.ownerDocument,b=[],k=s._destructive?t:Fr(t),w=_.createElement("KENDO-PDF-DOCUMENT"),y=0;Ne(k.querySelectorAll("tfoot")).forEach(function(e){e.parentNode.appendChild(e)}),Ne(k.querySelectorAll("ol")).forEach(function(e){Ne(e.children).forEach(function(e,t){e.setAttribute("kendo-split-index",t)})}),Le(w,{display:"block",position:"absolute",boxSizing:"content-box",left:"-10000px",top:"-10000px"}),r&&(Le(w,{width:r+"px",paddingLeft:a.left+"px",paddingRight:a.right+"px"}),Le(k,{overflow:"hidden"})),t.parentNode.insertBefore(w,t),w.appendChild(k),s.beforePageBreak?setTimeout(function(){s.beforePageBreak(w,l)},15):setTimeout(l,15)}var o,a;if(t||(t={}),o=Kt(),!e)return o.reject("No element to export");if("function"!=typeof window.getComputedStyle)throw Error("window.getComputedStyle is missing. You are using an unsupported browser, or running in IE8 compatibility mode. Drawing HTML is supported in Chrome, Firefox, Safari and IE9+.");return kendo.pdf.defineFont(Ue(e.ownerDocument)),a=Ve(t.scale||1),Ze(e,function(){var i,s=t&&t.forcePageBreak,l=t&&t.paperSize&&"auto"!=t.paperSize,d=kendo.pdf.getPaperOptions(function(e,n){return"paperSize"==e?l?t[e]:"A4":e in t?t[e]:n}),u=l&&d.paperSize[0],c=l&&d.paperSize[1],h=t.margin&&d.margin,p=!!h;s||c?(h||(h={left:0,top:0,right:0,bottom:0}),u&&(u/=a.x),c&&(c/=a.y),h.left/=a.x,h.right/=a.x,h.top/=a.y,h.bottom/=a.y,i=new Gn({pdf:{multiPage:!0,paperSize:l?d.paperSize:"auto",_ignoreMargin:p}}),r(function(e){if(t.progress){var r=!1,a=0;!function s(){if(a<e.pages.length){var l=n(e.pages[a]);i.append(l),t.progress({page:l,pageNum:++a,totalPages:e.pages.length,cancel:function(){r=!0}}),r?e.container.parentNode.removeChild(e.container):setTimeout(s)}else e.container.parentNode.removeChild(e.container),o.resolve(i)}()}else e.pages.forEach(function(e){i.append(n(e))}),e.container.parentNode.removeChild(e.container),o.resolve(i)},e,s,u?u-h.left-h.right:null,c?c-h.top-h.bottom:null,h,t)):o.resolve(n(e))}),o}function Ue(e){function t(e){if(e){var t=null;try{t=e.cssRules}catch(n){}t&&i(e,t)}}function n(e){var t,n=st(e.style,"src");return n?Ar(n).reduce(function(e,t){var n=Ir(t);return n&&e.push(n),e},[]):(t=Ir(e.cssText),t?[t]:[])}function i(e,i){var o,a,s,l,d,u,c;for(o=0;o<i.length;++o)switch(a=i[o],a.type){case 3:t(a.styleSheet);break;case 5:s=a.style,l=Ar(st(s,"font-family")),d=/^([56789]00|bold)$/i.test(st(s,"font-weight")),u="italic"==st(s,"font-style"),c=n(a),c.length>0&&r(e,l,d,u,c[0])}}function r(e,t,n,i,r){/^data:/i.test(r)||/^[^\/:]+:\/\//.test(r)||/^\//.test(r)||(r=(e.href+"").replace(/[^\/]*$/,"")+r),t.forEach(function(e){e=e.replace(/^(['"]?)(.*?)\1$/,"$2"),n&&(e+="|bold"),i&&(e+="|italic"),o[e]=r})}var o,a;for(null==e&&(e=document),o={},a=0;a<e.styleSheets.length;++a)t(e.styleSheets[a]);return o}function qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function je(e){return e="_counter_"+e,Cr[e]}function Ge(e){var t=[],n=Cr;for(e="_counter_"+e;n;)qe(n,e)&&t.push(n[e]),n=Object.getPrototypeOf(n);return t.reverse()}function $e(e,t){var n=Cr;for(e="_counter_"+e;n&&!qe(n,e);)n=Object.getPrototypeOf(n);n||(n=Cr._root),n[e]=(n[e]||0)+(null==t?1:t)}function Ke(e,t){e="_counter_"+e,Cr[e]=null==t?0:t}function Ye(e,t,n){var i,r,o;for(i=0;i<e.length;)r=e[i++],o=parseFloat(e[i]),isNaN(o)?t(r,n):(t(r,o),++i)}function Qe(e){var t,n=st(e,"counter-reset");n&&Ye(Ar(n,/^\s+/),Ke,0),t=st(e,"counter-increment"),t&&Ye(Ar(t,/^\s+/),$e,1)}function Xe(e,t){var n=kendo.parseColor(e,!0);return n&&(n=n.toRGB(),t?n=n.toCssRgba():0===n.a&&(n=null)),n}function Je(e,t){function n(){--i<=0&&t()}var i=0;e.forEach(function(e){var t,r,o=e.querySelectorAll("img");for(t=0;t<o.length;++t)r=o[t],r.complete||(i++,r.onload=r.onerror=n)}),i||n()}function Ze(e,t){function n(e){xr[e]||(xr[e]=!0,a.push(e))}function i(e){/^img$/i.test(e.tagName)&&n(e.src),Er(st(at(e),"background-image")).forEach(function(e){"url"==e.type&&n(e.url)}),e.children&&Ne(e.children).forEach(i)}function r(){--o<=0&&t()}var o,a=[];Array.isArray(e)?e.forEach(i):i(e),o=a.length,0===o&&r(),a.forEach(function(e){var t=xr[e]=new window.Image;/^data:/i.test(e)||(t.crossOrigin="Anonymous"),t.src=e,t.complete?r():(t.onload=r,t.onerror=function(){xr[e]=null,r()})})}function et(e){var t,n="";do t=e%26,n=String.fromCharCode(97+t)+n,e=Math.floor(e/26);while(e>0);return n}function tt(e,t,n){var i,r;Cr=Object.create(Cr),Cr[e.tagName.toLowerCase()]={element:e,style:t},i=st(t,"text-decoration"),i&&"none"!=i&&(r=st(t,"color"),i.split(/\s+/g).forEach(function(e){Cr[e]||(Cr[e]=r)})),ot(t)&&(Cr._stackingContext={element:e,group:n})}function nt(){Cr=Object.getPrototypeOf(Cr)}function it(e){if(null!=Cr._clipbox){var t=e.bbox(Cr._matrix);Cr._clipbox=Cr._clipbox?hn.intersect(Cr._clipbox,t):t}}function rt(){var e=Cr._clipbox;return null==e||(e?0===e.width()||0===e.height():void 0)}function ot(e){function t(t){return st(e,t)}if("none"!=t("transform")||"static"!=t("position")||"auto"!=t("z-index")||t("opacity")<1)return!0}function at(e,t){return window.getComputedStyle(e,t||null)}function st(e,t,n){var i=e.getPropertyValue(t);return null!=i&&""!==i||(wr.webkit?i=e.getPropertyValue("-webkit-"+t):wr.mozilla?i=e.getPropertyValue("-moz-"+t):wr.opera?i=e.getPropertyValue("-o-"+t):Tr&&(i=e.getPropertyValue("-ms-"+t))),arguments.length>2&&(null==i||""===i)?n:i}function lt(e,t,n,i){e.setProperty(t,n,i),wr.webkit?e.setProperty("-webkit-"+t,n,i):wr.mozilla?e.setProperty("-moz-"+t,n,i):wr.opera?e.setProperty("-o-"+t,n,i):Tr&&(e.setProperty("-ms-"+t,n,i),t="ms"+t.replace(/(^|-)([a-z])/g,function(e,t,n){return t+n.toUpperCase()}),e[t]=n)}function dt(e,t){return t="border-"+t,{width:parseFloat(st(e,t+"-width")),style:st(e,t+"-style"),color:Xe(st(e,t+"-color"),!0)}}function ut(e,t){var n=e.style.cssText,i=t();return e.style.cssText=n,i}function ct(e,t){var n=st(e,"border-"+t+"-radius").split(/\s+/g).map(parseFloat);return 1==n.length&&n.push(n[0]),kt({x:n[0],y:n[1]})}function ht(e){var t=e.getBoundingClientRect();return t=pt(t,"border-*-width",e),t=pt(t,"padding-*",e)}function pt(e,t,n){var i,r,o,a,s;return"string"==typeof t?(i=at(n),r=parseFloat(st(i,t.replace("*","top"))),o=parseFloat(st(i,t.replace("*","right"))),a=parseFloat(st(i,t.replace("*","bottom"))),s=parseFloat(st(i,t.replace("*","left")))):"number"==typeof t&&(r=o=a=s=t),{top:e.top+r,right:e.right-o,bottom:e.bottom-a,left:e.left+s,width:e.right-e.left-o-s,height:e.bottom-e.top-a-r}}function ft(e){var t,n,i=st(e,"transform");return"none"==i?null:(t=/^\s*matrix\(\s*(.*?)\s*\)\s*$/.exec(i),t?(n=st(e,"transform-origin"),t=t[1].split(/\s*,\s*/g).map(parseFloat),n=n.split(/\s+/g).map(parseFloat),{matrix:t,origin:n}):void 0)}function mt(e){return 180*e/Math.PI%360}function gt(e){var t=parseFloat(e);return/grad$/.test(e)?Math.PI*t/200:/rad$/.test(e)?t:/turn$/.test(e)?Math.PI*t*2:/deg$/.test(e)?Math.PI*t/180:void 0}function vt(e,t){return t=new dn(t[0],t[1],t[2],t[3],t[4],t[5]),e.transform(t),t}function _t(e,t){e.clip(t)}function bt(e,t,n,i){for(var r=new Sn([t,n],i).curvePoints(),o=1;o<r.length;)e.curveTo(r[o++],r[o++],r[o++])}function kt(e){return(e.x<=0||e.y<=0)&&(e.x=e.y=0),e}function wt(e,t,n,i,r){var o=Math.max(0,t.x),a=Math.max(0,t.y),s=Math.max(0,n.x),l=Math.max(0,n.y),d=Math.max(0,i.x),u=Math.max(0,i.y),c=Math.max(0,r.x),h=Math.max(0,r.y),p=Math.min(e.width/(o+s),e.height/(l+u),e.width/(d+c),e.height/(h+a));return p<1&&(o*=p,a*=p,s*=p,l*=p,d*=p,u*=p,c*=p,h*=p),{tl:{x:o,y:a},tr:{x:s,y:l},br:{x:d,y:u},bl:{x:c,y:h}}}function yt(e,t,n){var i,r,o,a,s,l,d,u,c=at(e),h=ct(c,"top-left"),p=ct(c,"top-right"),f=ct(c,"bottom-left"),m=ct(c,"bottom-right");return"padding"!=n&&"content"!=n||(i=dt(c,"top"),r=dt(c,"right"),o=dt(c,"bottom"),a=dt(c,"left"),h.x-=a.width,h.y-=i.width,p.x-=r.width,p.y-=i.width,m.x-=r.width,m.y-=o.width,f.x-=a.width,f.y-=o.width,"content"==n&&(s=parseFloat(st(c,"padding-top")),l=parseFloat(st(c,"padding-right")),d=parseFloat(st(c,"padding-bottom")),u=parseFloat(st(c,"padding-left")),h.x-=u,h.y-=s,p.x-=l,p.y-=s,m.x-=l,m.y-=d,f.x-=u,f.y-=d)),"number"==typeof n&&(h.x-=n,h.y-=n,p.x-=n,p.y-=n,m.x-=n,m.y-=n,f.x-=n,f.y-=n),xt(t,h,p,m,f)}function xt(e,t,n,i,r){var o=wt(e,t,n,i,r),a=o.tl,s=o.tr,l=o.br,d=o.bl,u=new Bn({fill:null,stroke:null});return u.moveTo(e.left,e.top+a.y),a.x&&bt(u,e.left+a.x,e.top+a.y,{startAngle:-180,endAngle:-90,radiusX:a.x,radiusY:a.y}),u.lineTo(e.right-s.x,e.top),s.x&&bt(u,e.right-s.x,e.top+s.y,{startAngle:-90,endAngle:0,radiusX:s.x,radiusY:s.y}),u.lineTo(e.right,e.bottom-l.y),l.x&&bt(u,e.right-l.x,e.bottom-l.y,{startAngle:0,endAngle:90,radiusX:l.x,radiusY:l.y}),u.lineTo(e.left+d.x,e.bottom),d.x&&bt(u,e.left+d.x,e.bottom-d.y,{startAngle:90,endAngle:180,radiusX:d.x,radiusY:d.y}),u.close()}function Ct(e,t){var i=parseFloat(e)+"";switch(t){case"decimal-leading-zero":return i.length<2&&(i="0"+i),i;case"lower-roman":return n(e).toLowerCase();case"upper-roman":return n(e).toUpperCase();case"lower-latin":case"lower-alpha":return et(e-1);case"upper-latin":case"upper-alpha":return et(e-1).toUpperCase();default:return i}}function Tt(e,t){function n(e,t,n){return n?(n=n.replace(/^\s*(["'])(.*)\1\s*$/,"$2"),Ge(e).map(function(e){return Ct(e,t)}).join(n)):Ct(je(e)||0,t)}var i,r=Ar(t,/^\s+/),o=[];return r.forEach(function(t){var r;(i=/^\s*(["'])(.*)\1\s*$/.exec(t))?o.push(i[2].replace(/\\([0-9a-f]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,16))})):(i=/^\s*counter\((.*?)\)\s*$/.exec(t))?(r=Ar(i[1]),o.push(n(r[0],r[1]))):(i=/^\s*counters\((.*?)\)\s*$/.exec(t))?(r=Ar(i[1]),o.push(n(r[0],r[2],r[1]))):o.push((i=/^\s*attr\((.*?)\)\s*$/.exec(t))?e.getAttribute(i[1])||"":t)}),o.join("")}function St(e){var t,n;if(e.cssText)return e.cssText;for(t=[],n=0;n<e.length;++n)t.push(e[n]+": "+st(e,e[n]));return t.join(";\n")}function Dt(e,t){function n(t,n){var r,o=at(e,t),a=o.content;Qe(o),a&&"normal"!=a&&"none"!=a&&"0px"!=o.width&&(r=e.ownerDocument.createElement(yr),r.style.cssText=St(o),r.textContent=Tt(e,a),e.insertBefore(r,n),i.push(r))}var i,r;return e.tagName==yr?void Ft(e,t):(i=[],n(":before",e.firstChild),n(":after",null),void(i.length>0?(r=e.className,e.className+=" kendo-pdf-hide-pseudo-elements",Ft(e,t),e.className=r,i.forEach(function(t){e.removeChild(t)})):Ft(e,t)))}function Ft(e,t){function i(t){var n,i,r,o,a,s;if(/^td$/i.test(e.tagName)&&(n=Cr.table,n&&"collapse"==st(n.style,"border-collapse"))){if(i=dt(n.style,"left").width,r=dt(n.style,"top").width,0===i&&0===r)return t;if(o=n.element.getBoundingClientRect(),a=n.element.rows[0].cells[0],s=a.getBoundingClientRect(),s.top==o.top||s.left==o.left)return Ne(t).map(function(e){return{left:e.left+i,top:e.top+r,right:e.right+i,bottom:e.bottom+r,height:e.height,width:e.width}})}return t}function r(e,n,i,r,o,a,s,l){function d(t,n,r){var o=Math.PI/2*t/(t+i),a={x:n.x-t,y:n.y-i},s=new Bn({fill:{color:e},stroke:null}).moveTo(0,0);vt(s,r),bt(s,0,n.y,{startAngle:-90,endAngle:-mt(o),radiusX:n.x,radiusY:n.y}),a.x>0&&a.y>0?(s.lineTo(a.x*Math.cos(o),n.y-a.y*Math.sin(o)),bt(s,0,n.y,{startAngle:-mt(o),endAngle:-90,radiusX:a.x,radiusY:a.y,anticlockwise:!0})):a.x>0?s.lineTo(a.x,i).lineTo(0,i):s.lineTo(a.x,i).lineTo(a.x,0),c.append(s.close())}if(!(i<=0)){var u,c=new Gn;vt(c,l),t.append(c),kt(a),kt(s),u=new Bn({fill:{color:e},stroke:null}),c.append(u),u.moveTo(a.x?Math.max(a.x,r):0,0).lineTo(n-(s.x?Math.max(s.x,o):0),0).lineTo(n-Math.max(s.x,o),i).lineTo(Math.max(a.x,r),i).close(),a.x&&d(r,a,[-1,0,0,1,a.x,0]),s.x&&d(o,s,[1,0,0,1,n-s.x,0])}}function o(e){var n,i,r=new Gn;for(_t(r,xt(e,T,S,F,D)),t.append(r),A&&(n=new Bn({fill:{color:A.toCssRgba()},stroke:null}),n.moveTo(e.left,e.top).lineTo(e.right,e.top).lineTo(e.right,e.bottom).lineTo(e.left,e.bottom).close(),r.append(n)),i=d.length;--i>=0;)a(r,e,d[i],u[i%u.length],c[i%c.length],h[i%h.length],p[i%p.length])}function a(t,n,i,r,o,a,s){function l(t,n,i,l,d){function u(){for(;g.origin.x>n.left;)g.origin.x-=i}function c(){for(;g.origin.y>n.top;)g.origin.y-=l}function h(){for(;g.origin.x<n.right;)d(t,g.clone()),g.origin.x+=i}var p,f,m,g,v,_=i/l,b=n;switch("content-box"==a?(b=pt(b,"border-*-width",e),b=pt(b,"padding-*",e)):"padding-box"==a&&(b=pt(b,"border-*-width",e)),/^\s*auto(\s+auto)?\s*$/.test(s)||("contain"==s?(p=Math.min(b.width/i,b.height/l),i*=p,l*=p):"cover"==s?(p=Math.max(b.width/i,b.height/l),i*=p,l*=p):(f=s.split(/\s+/g),i=/%$/.test(f[0])?b.width*parseFloat(f[0])/100:parseFloat(f[0]),l=1==f.length||"auto"==f[1]?i/_:/%$/.test(f[1])?b.height*parseFloat(f[1])/100:parseFloat(f[1]))),m=o+""){case"bottom":m="50% 100%";break;case"top":m="50% 0";break;case"left":m="0 50%";break;case"right":m="100% 50%";break;case"center":m="50% 50%"}if(m=m.split(/\s+/),1==m.length&&(m[1]="50%"),m[0]=/%$/.test(m[0])?parseFloat(m[0])/100*(b.width-i):parseFloat(m[0]),m[1]=/%$/.test(m[1])?parseFloat(m[1])/100*(b.height-l):parseFloat(m[1]),g=new hn([b.left+m[0],b.top+m[1]],[i,l]),"no-repeat"==r)d(t,g);else if("repeat-x"==r)u(),h();else if("repeat-y"==r)for(c();g.origin.y<n.bottom;)d(t,g.clone()),g.origin.y+=l;else if("repeat"==r)for(u(),c(),v=g.origin.clone();g.origin.y<n.bottom;)g.origin.x=v.x,h(),g.origin.y+=l}if(i&&"none"!=i)if("url"==i.type){if(/^url\(\"data:image\/svg/i.test(i.url))return;var d=xr[i.url];d&&d.width>0&&d.height>0&&l(t,n,d.width,d.height,function(e,t){e.append(new qn(i.url,t))})}else{if("linear"!=i.type)return;l(t,n,n.width,n.height,Et(i))}}function s(){function i(n){ut(e,function(){e.style.position="relative";var i=e.ownerDocument.createElement(yr);i.style.position="absolute",i.style.boxSizing="border-box","outside"==o?(i.style.width="6em",i.style.left="-6.8em",i.style.textAlign="right"):i.style.left="0px",n(i),e.insertBefore(i,e.firstChild),Ot(i,t),e.removeChild(i)})}function r(t){var n,i=e.parentNode.children,r=e.getAttribute("kendo-split-index");if(null!=r)return t(0|r,i.length);for(n=0;n<i.length;++n)if(i[n]===e)return t(n,i.length)}var o,a=st(k,"list-style-type");if("none"!=a)switch(o=st(k,"list-style-position"),a){case"circle":case"disc":case"square":i(function(e){e.style.fontSize="60%",e.style.lineHeight="200%",e.style.paddingRight="0.5em",e.style.fontFamily="DejaVu Serif",e.innerHTML={disc:"●",circle:"◯",square:"■"}[a]});break;case"decimal":case"decimal-leading-zero":i(function(e){r(function(t){++t,"decimal-leading-zero"==a&&t<10&&(t="0"+t),e.innerHTML=t+"."})});break;case"lower-roman":case"upper-roman":i(function(e){r(function(t){t=n(t+1),"upper-roman"==a&&(t=t.toUpperCase()),e.innerHTML=t+"."})});break;case"lower-latin":case"lower-alpha":case"upper-latin":case"upper-alpha":i(function(e){r(function(t){t=et(t),/^upper/i.test(a)&&(t=t.toUpperCase()),e.innerHTML=t+"."})})}}function l(n,i,a){function s(e){return{x:e.y,y:e.x}}var l,d,u,c,h,p,f,m;if(0!==n.width&&0!==n.height&&(o(n),l=C.width>0&&(i&&"ltr"==E||a&&"rtl"==E),d=y.width>0&&(a&&"ltr"==E||i&&"rtl"==E),0!==w.width||0!==C.width||0!==y.width||0!==x.width)){if(w.color==y.color&&w.color==x.color&&w.color==C.color&&w.width==y.width&&w.width==x.width&&w.width==C.width&&l&&d)return n=pt(n,w.width/2),u=yt(e,n,w.width/2),u.options.stroke={color:w.color,width:w.width},void t.append(u);if(0===T.x&&0===S.x&&0===F.x&&0===D.x&&w.width<2&&C.width<2&&y.width<2&&x.width<2)return w.width>0&&t.append(new Bn({stroke:{width:w.width,color:w.color}}).moveTo(n.left,n.top+w.width/2).lineTo(n.right,n.top+w.width/2)),x.width>0&&t.append(new Bn({stroke:{width:x.width,color:x.color}}).moveTo(n.left,n.bottom-x.width/2).lineTo(n.right,n.bottom-x.width/2)),l&&t.append(new Bn({stroke:{width:C.width,color:C.color}}).moveTo(n.left+C.width/2,n.top).lineTo(n.left+C.width/2,n.bottom)),void(d&&t.append(new Bn({stroke:{width:y.width,color:y.color}}).moveTo(n.right-y.width/2,n.top).lineTo(n.right-y.width/2,n.bottom)));c=wt(n,T,S,F,D),h=c.tl,p=c.tr,f=c.br,m=c.bl,r(w.color,n.width,w.width,C.width,y.width,h,p,[1,0,0,1,n.left,n.top]),r(x.color,n.width,x.width,y.width,C.width,f,m,[-1,0,0,-1,n.right,n.bottom]),r(C.color,n.height,C.width,x.width,w.width,s(m),s(h),[0,-1,1,0,n.left,n.bottom]),r(y.color,n.height,y.width,w.width,x.width,s(p),s(f),[0,1,-1,0,n.right,n.top])}}var d,u,c,h,p,f,m,g,v,_,b,k=at(e),w=dt(k,"top"),y=dt(k,"right"),x=dt(k,"bottom"),C=dt(k,"left"),T=ct(k,"top-left"),S=ct(k,"top-right"),D=ct(k,"bottom-left"),F=ct(k,"bottom-right"),E=st(k,"direction"),A=st(k,"background-color");if(A=Xe(A),d=Er(st(k,"background-image")),u=Ar(st(k,"background-repeat")),c=Ar(st(k,"background-position")),h=Ar(st(k,"background-origin")),p=Ar(st(k,"background-size")),wr.msie&&wr.version<10&&(c=Ar(e.currentStyle.backgroundPosition)),f=pt(e.getBoundingClientRect(),"border-*-width",e),function(){var e,n,i,r,o,a,s,l=st(k,"clip"),d=/^\s*rect\((.*)\)\s*$/.exec(l);d&&(e=d[1].split(/[ ,]+/g),n="auto"==e[0]?f.top:parseFloat(e[0])+f.top,i="auto"==e[1]?f.right:parseFloat(e[1])+f.left,r="auto"==e[2]?f.bottom:parseFloat(e[2])+f.top,o="auto"==e[3]?f.left:parseFloat(e[3])+f.left,a=new Gn,s=(new Bn).moveTo(o,n).lineTo(i,n).lineTo(i,r).lineTo(o,r).close(),_t(a,s),t.append(a),t=a,it(s))}(),_=st(k,"display"),"table-row"==_)for(m=[],g=0,v=e.children;g<v.length;++g)m.push(v[g].getBoundingClientRect());else m=e.getClientRects(),1==m.length&&(m=[e.getBoundingClientRect()]);for(m=i(m),g=0;g<m.length;++g)l(m[g],0===g,g==m.length-1);return"A"==e.tagName&&e.href&&!/^#?$/.test(e.getAttribute("href"))&&(Cr._avoidLinks&&Dr(e,Cr._avoidLinks)||(b=document.createRange(),b.selectNodeContents(e),Ne(b.getClientRects()).forEach(function(n){var i=new Gn;i._pdfLink={url:e.href,top:n.top,right:n.right,bottom:n.bottom,left:n.left},t.append(i)}))),m.length>0&&"list-item"==_&&!e.getAttribute("kendo-no-bullet")&&s(m[0]),function(){function n(){var n=yt(e,f,"padding"),i=new Gn;_t(i,n),t.append(i),t=i,it(n)}Mt(e)?n():/^(hidden|auto|scroll)/.test(st(k,"overflow"))?n():/^(hidden|auto|scroll)/.test(st(k,"overflow-x"))?n():/^(hidden|auto|scroll)/.test(st(k,"overflow-y"))&&n()}(),At(e,t)||Bt(e,t),t}function Et(e){return function(t,n){var i,r,o,a,s,l,d,u,c,h,p,f,m,g=n.width(),v=n.height();switch(e.type){case"linear":switch(i=null!=e.angle?e.angle:Math.PI,e.to){case"top":i=0;break;case"left":i=-Math.PI/2;break;case"bottom":i=Math.PI;break;case"right":i=Math.PI/2;break;case"top left":case"left top":i=-Math.atan2(v,g);break;case"top right":case"right top":i=Math.atan2(v,g);break;case"bottom left":case"left bottom":i=Math.PI+Math.atan2(v,g);break;case"bottom right":case"right bottom":i=Math.PI-Math.atan2(v,g)}e.reverse&&(i-=Math.PI),i%=2*Math.PI,i<0&&(i+=2*Math.PI),r=Math.abs(g*Math.sin(i))+Math.abs(v*Math.cos(i)),o=Math.atan(g*Math.tan(i)/v),a=Math.sin(o),s=Math.cos(o),l=Math.abs(a)+Math.abs(s),d=l/2*a,u=l/2*s,i>Math.PI/2&&i<=3*Math.PI/2&&(d=-d,u=-u),c=[],h=0,p=e.stops.map(function(t,n){var i,o=t.percent;return o?o=parseFloat(o)/100:t.length?o=parseFloat(t.length)/r:0===n?o=0:n==e.stops.length-1&&(o=1),i={color:t.color.toCssRgba(),offset:o},null!=o?(h=o,c.forEach(function(e,t){var n=e.stop;n.offset=e.left+(h-e.left)*(t+1)/(c.length+1)}),c=[]):c.push({left:h,stop:i}),i}),f=[.5-d,.5+u],m=[.5+d,.5-u],t.append(Bn.fromRect(n).stroke(null).fill(new ti({start:f,end:m,stops:p,userSpace:!1})));break;case"radial":window.console&&window.console.log&&window.console.log("Radial gradients are not yet supported in HTML renderer")}}}function At(e,t){var n,i,r,o;return e._kendoExportVisual?n=e._kendoExportVisual():window.kendo&&window.kendo.jQuery&&e.getAttribute(window.kendo.attr("role"))&&(i=window.kendo.widgetInstance(window.kendo.jQuery(e)),i&&(i.exportDOMVisual||i.exportVisual)&&(n=i.exportDOMVisual?i.exportDOMVisual():i.exportVisual())),!!n&&(r=new Gn,r.children.push(n),o=e.getBoundingClientRect(),r.transform(F().translate(o.left,o.top)),t.append(r),!0)}function It(e,t,n){var i=ht(e),r=new hn([i.left,i.top],[i.width,i.height]),o=new qn(t,r);_t(o,yt(e,i,"content")),n.append(o)}function Rt(e,t){var n=at(e),i=at(t),r=parseFloat(st(n,"z-index")),o=parseFloat(st(i,"z-index")),a=st(n,"position"),s=st(i,"position");return isNaN(r)&&isNaN(o)?/static|absolute/.test(a)&&/static|absolute/.test(s)?0:"static"==a?-1:"static"==s?1:0:isNaN(r)?0===o?0:o>0?-1:1:isNaN(o)?0===r?0:r>0?1:-1:parseFloat(r)-parseFloat(o)}function Mt(e){return/^(?:textarea|select|input)$/i.test(e.tagName)}function zt(e){return e.selectedOptions&&e.selectedOptions.length>0?e.selectedOptions[0]:e.options[e.selectedIndex]}function Ht(e,t){var n=at(e),i=st(n,"color"),r=e.getBoundingClientRect();"checkbox"==e.type?(t.append(Bn.fromRect(new hn([r.left+1,r.top+1],[r.width-2,r.height-2])).stroke(i,1)),e.checked&&t.append((new Bn).stroke(i,1.2).moveTo(r.left+.22*r.width,r.top+.55*r.height).lineTo(r.left+.45*r.width,r.top+.75*r.height).lineTo(r.left+.78*r.width,r.top+.22*r.width))):(t.append(new yn(new gn([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-2,r.height-2)/2)).stroke(i,1)),e.checked&&t.append(new yn(new gn([(r.left+r.right)/2,(r.top+r.bottom)/2],Math.min(r.width-8,r.height-8)/2)).fill(i).stroke(null)))}function Nt(e,t){var n,i,r,o,a,s=e.tagName.toLowerCase();if("input"==s&&("checkbox"==e.type||"radio"==e.type))return Ht(e,t);if(n=e.parentNode,i=e.ownerDocument,r=i.createElement(yr),r.style.cssText=St(at(e)),"input"==s&&(r.style.whiteSpace="pre"),"select"!=s&&"textarea"!=s||(r.style.overflow="auto"),"select"==s)if(e.multiple)for(a=0;a<e.options.length;++a)o=i.createElement(yr),o.style.cssText=St(at(e.options[a])),o.style.display="block",o.textContent=e.options[a].textContent,r.appendChild(o);else o=zt(e),o&&(r.textContent=o.textContent);else r.textContent=e.value;n.insertBefore(r,e),r.scrollLeft=e.scrollLeft,r.scrollTop=e.scrollTop,e.style.display="none",Bt(r,t),e.style.display="",n.removeChild(r)}function Bt(e,t){var n,i,r,o,a,s,l;switch(Cr._stackingContext.element===e&&(Cr._stackingContext.group=t),e.tagName.toLowerCase()){case"img":It(e,e.src,t);break;case"canvas":try{It(e,e.toDataURL("image/png"),t)}catch(d){}break;case"textarea":case"input":case"select":Nt(e,t);break;default:for(n=[],i=[],r=[],o=e.firstChild;o;o=o.nextSibling)switch(o.nodeType){case 3:/\S/.test(o.data)&&Pt(e,o,t);break;case 1:a=at(o),s=st(a,"float"),l=st(a,"position"),"static"!=l?r.push(o):"none"!=s?i.push(o):n.push(o)}p(n,Rt).forEach(function(e){Ot(e,t)}),p(i,Rt).forEach(function(e){Ot(e,t)}),p(r,Rt).forEach(function(e){Ot(e,t)})}}function Pt(e,t,n){function i(e){var t,n,i,r;if(Tr||wr.chrome){for(t=e.getClientRects(),n={top:1/0,right:-(1/0),bottom:-(1/0),left:1/0},i=0;i<t.length;++i)r=t[i],r.width<=1||r.bottom===C||(n.left=Math.min(r.left,n.left),n.top=Math.min(r.top,n.top),n.right=Math.max(r.right,n.right),n.bottom=Math.max(r.bottom,n.bottom));return n.width=n.right-n.left,n.height=n.bottom-n.top,n}return e.getBoundingClientRect()}function r(){var e,n,r,a,s,c,h,p=d,f=l.substr(d).search(/\S/);if(d+=f,f<0||d>=u)return!0;if(m.setStart(t,d),m.setEnd(t,d+1),e=i(m),n=!1,(v||_>1)&&(f=l.substr(d).search(/\s/),f>=0&&(m.setEnd(t,d+f),r=i(m),r.bottom==e.bottom&&(e=r,n=!0,d+=f))),!n){if(f=function g(n,r,o){m.setEnd(t,r);var a=i(m);return a.bottom!=e.bottom&&n<r?g(n,n+r>>1,r):a.right!=e.right?(e=a,r<o?g(r,r+o>>1,o):r):r}(d,Math.min(u,d+x),u),f==d)return!0;if(d=f,f=(""+m).search(/\s+$/),
0===f)return!1;f>0&&(m.setEnd(t,m.startOffset+f),e=i(m))}if(Tr&&(e=m.getClientRects()[0]),a=""+m,/^(?:pre|pre-wrap)$/i.test(b)){if(/\t/.test(a)){for(s=0,f=p;f<m.startOffset;++f)c=l.charCodeAt(f),9==c?s+=8-s%8:10==c||13==c?s=0:s++;for(;(f=a.search("\t"))>=0;)h=" ".substr(0,8-(s+f)%8),a=a.substr(0,f)+h+a.substr(f+1)}}else a=a.replace(/\s+/g," ");n||(C=e.bottom),o(a,e)}function o(e,t){var i,r,o;switch(Tr&&!isNaN(h)&&(i=Rr(p),r=(t.top+t.bottom-i)/2,t={top:r,right:t.right,bottom:r+i,left:t.left,height:i,width:t.right-t.left}),k){case"uppercase":e=e.toUpperCase();break;case"lowercase":e=e.toLowerCase();break;case"capitalize":e=e.replace(/(?:^|\s)\S/g,function(e){return e.toUpperCase()})}o=new Sr(e,new hn([t.left,t.top],[t.width,t.height]),{font:p,fill:{color:f}}),n.append(o)}function a(e){function t(t,i){var r,o;t&&(r=c/12,o=new Bn({stroke:{width:r,color:t}}),i-=r,o.moveTo(e.left,i).lineTo(e.right,i),n.append(o))}t(T,e.bottom),t(S,e.bottom-e.height/2.7),t(D,e.top)}var s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C,T,S,D,F;if(!rt()&&(s=at(e),!(parseFloat(st(s,"text-indent"))<-500)&&(l=t.data,d=0,u=l.search(/\S\s*$/)+1,u&&(c=st(s,"font-size"),h=st(s,"line-height"),p=[st(s,"font-style"),st(s,"font-variant"),st(s,"font-weight"),c,st(s,"font-family")].join(" "),c=parseFloat(c),h=parseFloat(h),0!==c)))){for(f=st(s,"color"),m=e.ownerDocument.createRange(),g=st(s,"text-align"),v="justify"==g,_=st(s,"column-count",1),b=st(s,"white-space"),k=st(s,"text-transform"),Tr&&(w=s.textOverflow,"ellipsis"==w&&(y=e.style.textOverflow,e.style.textOverflow="clip")),x=e.getBoundingClientRect().width/c*5,0===x&&(x=500),C=null,T=Cr.underline,S=Cr["line-through"],D=Cr.overline,F=T||S||D;!r(););Tr&&"ellipsis"==w&&(e.style.textOverflow=y),F&&(m.selectNode(t),Ne(m.getClientRects()).forEach(a))}}function Lt(e,t,n){var i,r,o,a,s,l;for("auto"!=n?(i=Cr._stackingContext.group,n=parseFloat(n)):(i=t,n=0),r=i.children,o=0;o<r.length&&!(null!=r[o]._dom_zIndex&&r[o]._dom_zIndex>n);++o);return a=new Gn,i.insert(o,a),a._dom_zIndex=n,i!==t&&Cr._clipbox&&(s=Cr._matrix.invert(),l=Cr._clipbox.transformCopy(s),_t(a,Bn.fromRect(l))),a}function Ot(e,t){var n,i,r,o,a,s,l=at(e);Qe(l),/^(style|script|link|meta|iframe|svg|col|colgroup)$/i.test(e.tagName)||null!=Cr._clipbox&&(n=parseFloat(st(l,"opacity")),i=st(l,"visibility"),r=st(l,"display"),0!==n&&"hidden"!=i&&"none"!=r&&(o=ft(l),s=st(l,"z-index"),(o||n<1)&&"auto"==s&&(s=0),a=Lt(e,t,s),n<1&&a.opacity(n*a.opacity()),tt(e,l,a),o?ut(e,function(){var t,n,i,r;lt(e.style,"transform","none","important"),lt(e.style,"transition","none","important"),"static"==st(l,"position")&&lt(e.style,"position","relative","important"),t=e.getBoundingClientRect(),n=t.left+o.origin[0],i=t.top+o.origin[1],r=[1,0,0,1,-n,-i],r=Vt(r,o.matrix),r=Vt(r,[1,0,0,1,n,i]),r=vt(a,r),Cr._matrix=Cr._matrix.multiplyCopy(r),Dt(e,a)}):Dt(e,a),nt()))}function Vt(e,t){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],d=t[1],u=t[2],c=t[3],h=t[4],p=t[5];return[n*l+i*u,n*d+i*c,r*l+o*u,r*d+o*c,a*l+s*u+h,a*d+s*c+p]}var Wt,Ut,qt,jt,Gt,$t,Kt,Yt,Qt,Xt,Jt,Zt,en,tn,nn,rn,on,an,sn,ln,dn,un,cn,hn,pn,fn,mn,gn,vn,_n,bn,kn,wn,yn,xn,Cn,Tn,Sn,Dn,Fn,En,An,In,Rn,Mn,zn,Hn,Nn,Bn,Pn,Ln,On,Vn,Wn,Un,qn,jn,Gn,$n,Kn,Yn,Qn,Xn,Jn,Zn,ei,ti,ni,ii,ri,oi,ai,si,li,di,ui,ci,hi,pi,fi,mi,gi,vi,_i,bi,ki,wi,yi,xi,Ci,Ti,Si,Di,Fi,Ei,Ai,Ii,Ri,Mi,zi,Hi,Ni,Bi,Pi,Li,Oi,Vi,Wi,Ui,qi,ji,Gi,$i,Ki,Yi,Qi,Xi,Ji,Zi,er,tr,nr,ir,rr,or,ar,sr,lr,dr,ur,cr,hr,pr,fr,mr,gr,vr,_r,br,kr,wr,yr,xr,Cr,Tr,Sr,Dr,Fr,Er,Ar,Ir,Rr,Mr;window.kendo=window.kendo||{},Wt=kendo.drawing,Ut=Wt.util,qt=kendo.Class,jt=kendo.util,Gt=kendo.support,$t=Gt.browser,Kt=Ut.createPromise,Yt=Ut.promiseAll,Qt={extend:function(e){var t,n=this;for(t in this)"extend"!==t&&(e[t]=n[t])},observers:function(){return this._observers=this._observers||[]},addObserver:function(e){return this._observers?this._observers.push(e):this._observers=[e],this},removeObserver:function(e){var t=this.observers(),n=t.indexOf(e);return n!==-1&&t.splice(n,1),this},trigger:function(e,t){var n,i,r=this._observers;if(r&&!this._suspended)for(n=0;n<r.length;n++)i=r[n],i[e]&&i[e](t);return this},optionsChange:function(e){void 0===e&&(e={}),e.element=this,this.trigger("optionsChange",e)},geometryChange:function(){this.trigger("geometryChange",{element:this})},suspend:function(){return this._suspended=(this._suspended||0)+1,this},resume:function(){return this._suspended=Math.max((this._suspended||0)-1,0),this},_observerField:function(e,t){this[e]&&this[e].removeObserver(this),this[e]=t,t.addObserver(this)}},Xt={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},Jt="undefined",Zt=1,en=Math.PI/180,tn=Number.MAX_VALUE,nn=-Number.MAX_VALUE,rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",on=String.fromCharCode,an={append:t,arabicToRoman:n,createPromise:Kt,defined:i,definitionId:r,deg:o,encodeBase64:s,eventCoordinates:l,eventElement:d,isTransparent:u,last:c,limitValue:h,mergeSort:p,promiseAll:Yt,rad:f,round:g,valueOrDefault:v,bindEvents:_,elementOffset:b,elementSize:y,elementStyles:k,unbindEvents:x,DEG_TO_RAD:en,MAX_NUM:tn,MIN_NUM:nn},sn={}.toString,ln=qt.extend({init:function(e,t){var n,i,r=this;void 0===t&&(t=""),this.prefix=t;for(n in e)i=e[n],i=r._wrap(i,n),r[n]=i},get:function(e){for(var t,n=e.split("."),i=this;n.length&&i;)t=n.shift(),i=i[t];return i},set:function(e,t){var n=this.get(e);n!==t&&(this._set(e,this._wrap(t,e)),this.optionsChange({field:this.prefix+e,value:t}))},_set:function(e,t){var n,i,r,o=this,a=e.indexOf(".")>=0,s=this,l=e;if(a){for(n=l.split("."),i=this.prefix;n.length>1;)l=n.shift(),i+=l+".",r=s[l],r||(r=new ln({},i),r.addObserver(o),s[l]=r),s=r;l=n[0]}s._clear(l),s[l]=t},_clear:function(e){var t=this[e];t&&t.removeObserver&&t.removeObserver(this)},_wrap:function(e,t){var n=sn.call(e),r=e;return null!==r&&i(r)&&"[object Object]"===n&&(e instanceof ln||e instanceof qt||(r=new ln(r,this.prefix+t+".")),r.addObserver(this)),r}}),Qt.extend(ln.prototype),dn=qt.extend({init:function(e,t,n,i,r,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===o&&(o=0),this.a=e,this.b=t,this.c=n,this.d=i,this.e=r,this.f=o},multiplyCopy:function(e){return new dn(this.a*e.a+this.c*e.b,this.b*e.a+this.d*e.b,this.a*e.c+this.c*e.d,this.b*e.c+this.d*e.d,this.a*e.e+this.c*e.f+this.e,this.b*e.e+this.d*e.f+this.f)},invert:function(){var e=this,t=e.a,n=e.b,i=e.c,r=e.d,o=e.e,a=e.f,s=t*r-n*i;return 0===s?null:new dn(r/s,-n/s,-i/s,t/s,(i*a-r*o)/s,(n*o-t*a)/s)},clone:function(){return new dn(this.a,this.b,this.c,this.d,this.e,this.f)},equals:function(e){return!!e&&(this.a===e.a&&this.b===e.b&&this.c===e.c&&this.d===e.d&&this.e===e.e&&this.f===e.f)},round:function(e){return this.a=g(this.a,e),this.b=g(this.b,e),this.c=g(this.c,e),this.d=g(this.d,e),this.e=g(this.e,e),this.f=g(this.f,e),this},toArray:function(e){var t,n=[this.a,this.b,this.c,this.d,this.e,this.f];if(i(e))for(t=0;t<n.length;t++)n[t]=g(n[t],e);return n},toString:function(e,t){return void 0===t&&(t=","),this.toArray(e).join(t)}}),dn.translate=function(e,t){return new dn(1,0,0,1,e,t)},dn.unit=function(){return new dn(1,0,0,1,0,0)},dn.rotate=function(e,t,n){var i=new dn;return i.a=Math.cos(f(e)),i.b=Math.sin(f(e)),i.c=-i.b,i.d=i.a,i.e=t-t*i.a+n*i.b||0,i.f=n-n*i.a-t*i.b||0,i},dn.scale=function(e,t){return new dn(e,0,0,t,0,0)},dn.IDENTITY=dn.unit(),un=qt.extend({init:function(e,t){this.x=e||0,this.y=t||0},equals:function(e){return e&&e.x===this.x&&e.y===this.y},clone:function(){return new un(this.x,this.y)},rotate:function(e,t){var n=un.create(t)||un.ZERO;return this.transform(dn.rotate(e,n.x,n.y))},translate:function(e,t){return this.x+=e,this.y+=t,this.geometryChange(),this},translateWith:function(e){return this.translate(e.x,e.y)},move:function(e,t){return this.x=this.y=0,this.translate(e,t)},scale:function(e,t){return void 0===t&&(t=e),this.x*=e,this.y*=t,this.geometryChange(),this},scaleCopy:function(e,t){return this.clone().scale(e,t)},transform:function(e){var t=D(e),n=this,i=n.x,r=n.y;return this.x=t.a*i+t.c*r+t.e,this.y=t.b*i+t.d*r+t.f,this.geometryChange(),this},transformCopy:function(e){var t=this.clone();return e&&t.transform(e),t},distanceTo:function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},round:function(e){return this.x=g(this.x,e),this.y=g(this.y,e),this.geometryChange(),this},toArray:function(e){var t=i(e),n=t?g(this.x,e):this.x,r=t?g(this.y,e):this.y;return[n,r]},toString:function(e,t){var n,r,o;return void 0===t&&(t=" "),n=this,r=n.x,o=n.y,i(e)&&(r=g(r,e),o=g(o,e)),r+t+o}}),un.create=function(e,t){if(i(e))return e instanceof un?e:1===arguments.length&&2===e.length?new un(e[0],e[1]):new un(e,t)},un.min=function(){var e,t,n=arguments,i=tn,r=tn;for(e=0;e<arguments.length;e++)t=n[e],i=Math.min(t.x,i),r=Math.min(t.y,r);return new un(i,r)},un.max=function(){var e,t,n=arguments,i=nn,r=nn;for(e=0;e<arguments.length;e++)t=n[e],i=Math.max(t.x,i),r=Math.max(t.y,r);return new un(i,r)},un.minPoint=function(){return new un(nn,nn)},un.maxPoint=function(){return new un(tn,tn)},Object.defineProperties&&Object.defineProperties(un,{ZERO:{get:function(){return new un(0,0)}}}),S(un.prototype,["x","y"]),Qt.extend(un.prototype),cn=qt.extend({init:function(e,t){this.width=e||0,this.height=t||0},equals:function(e){return e&&e.width===this.width&&e.height===this.height},clone:function(){return new cn(this.width,this.height)},toArray:function(e){var t=i(e),n=t?g(this.width,e):this.width,r=t?g(this.height,e):this.height;return[n,r]}}),cn.create=function(e,t){if(i(e))return e instanceof cn?e:1===arguments.length&&2===e.length?new cn(e[0],e[1]):new cn(e,t)},Object.defineProperties&&Object.defineProperties(cn,{ZERO:{get:function(){return new cn(0,0)}}}),S(cn.prototype,["width","height"]),Qt.extend(cn.prototype),hn=qt.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t=new cn),this.setOrigin(e),this.setSize(t)},clone:function(){return new hn(this.origin.clone(),this.size.clone())},equals:function(e){return e&&e.origin.equals(this.origin)&&e.size.equals(this.size)},setOrigin:function(e){return this._observerField("origin",un.create(e)),this.geometryChange(),this},getOrigin:function(){return this.origin},setSize:function(e){return this._observerField("size",cn.create(e)),this.geometryChange(),this},getSize:function(){return this.size},width:function(){return this.size.width},height:function(){return this.size.height},topLeft:function(){return this.origin.clone()},bottomRight:function(){return this.origin.clone().translate(this.width(),this.height())},topRight:function(){return this.origin.clone().translate(this.width(),0)},bottomLeft:function(){return this.origin.clone().translate(0,this.height())},center:function(){return this.origin.clone().translate(this.width()/2,this.height()/2)},bbox:function(e){var t=this.topLeft().transformCopy(e),n=this.topRight().transformCopy(e),i=this.bottomRight().transformCopy(e),r=this.bottomLeft().transformCopy(e);return hn.fromPoints(t,n,i,r)},transformCopy:function(e){return hn.fromPoints(this.topLeft().transform(e),this.bottomRight().transform(e))},expand:function(e,t){return void 0===t&&(t=e),this.size.width+=2*e,this.size.height+=2*t,this.origin.translate(-e,-t),this},expandCopy:function(e,t){return this.clone().expand(e,t)},containsPoint:function(e){var t=this.origin,n=this.bottomRight();return!(e.x<t.x||e.y<t.y||n.x<e.x||n.y<e.y)},_isOnPath:function(e,t){var n=this.expandCopy(t,t),i=this.expandCopy(-t,-t);return n.containsPoint(e)&&!i.containsPoint(e)}}),hn.fromPoints=function(){var e=un.min.apply(null,arguments),t=un.max.apply(null,arguments),n=new cn(t.x-e.x,t.y-e.y);return new hn(e,n)},hn.union=function(e,t){return hn.fromPoints(un.min(e.topLeft(),t.topLeft()),un.max(e.bottomRight(),t.bottomRight()))},hn.intersect=function(e,t){var n={left:e.topLeft().x,top:e.topLeft().y,right:e.bottomRight().x,bottom:e.bottomRight().y},i={left:t.topLeft().x,top:t.topLeft().y,right:t.bottomRight().x,bottom:t.bottomRight().y};if(n.left<=i.right&&i.left<=n.right&&n.top<=i.bottom&&i.top<=n.bottom)return hn.fromPoints(new un(Math.max(n.left,i.left),Math.max(n.top,i.top)),new un(Math.min(n.right,i.right),Math.min(n.bottom,i.bottom)))},Qt.extend(hn.prototype),pn=qt.extend({init:function(e){void 0===e&&(e=dn.unit()),this._matrix=e},clone:function(){return new pn(this._matrix.clone())},equals:function(e){return e&&e._matrix.equals(this._matrix)},translate:function(e,t){return this._matrix=this._matrix.multiplyCopy(dn.translate(e,t)),this._optionsChange(),this},scale:function(e,t,n){void 0===t&&(t=e),void 0===n&&(n=null);var i=n;return i&&(i=un.create(i),this._matrix=this._matrix.multiplyCopy(dn.translate(i.x,i.y))),this._matrix=this._matrix.multiplyCopy(dn.scale(e,t)),i&&(this._matrix=this._matrix.multiplyCopy(dn.translate(-i.x,-i.y))),this._optionsChange(),this},rotate:function(e,t){var n=un.create(t)||un.ZERO;return this._matrix=this._matrix.multiplyCopy(dn.rotate(e,n.x,n.y)),this._optionsChange(),this},multiply:function(e){var t=D(e);return this._matrix=this._matrix.multiplyCopy(t),this._optionsChange(),this},matrix:function(e){return e?(this._matrix=e,this._optionsChange(),this):this._matrix},_optionsChange:function(){this.optionsChange({field:"transform",value:this})}}),Qt.extend(pn.prototype),fn=qt.extend({init:function(e){this._initOptions(e)},_initOptions:function(e){var t,n;void 0===e&&(e={}),t=e.clip,n=e.transform,n&&(e.transform=F(n)),t&&!t.id&&(t.id=r()),this.options=new ln(e),this.options.addObserver(this)},transform:function(e){return i(e)?void this.options.set("transform",F(e)):this.options.get("transform")},parentTransform:function(){for(var e,t,n=this;n.parent;)n=n.parent,t=n.transform(),t&&(e=t.matrix().multiplyCopy(e||dn.unit()));if(e)return F(e)},currentTransform:function(e){var t,n,i,r;if(void 0===e&&(e=this.parentTransform()),t=this.transform(),n=D(t),i=D(e),r=n&&i?i.multiplyCopy(n):n||i)return F(r)},visible:function(e){return i(e)?(this.options.set("visible",e),this):this.options.get("visible")!==!1},clip:function(e){var t=this.options;return i(e)?(e&&!e.id&&(e.id=r()),t.set("clip",e),this):t.get("clip")},opacity:function(e){return i(e)?(this.options.set("opacity",e),this):v(this.options.get("opacity"),1)},clippedBBox:function(e){var t,n=this._clippedBBox(e);if(n)return t=this.clip(),t?hn.intersect(n,t.bbox(e)):n},containsPoint:function(e,t){var n,i;return!!this.visible()&&(n=this.currentTransform(t),i=e,n&&(i=e.transformCopy(n.matrix().invert())),this._hasFill()&&this._containsPoint(i)||this._isOnPath&&this._hasStroke()&&this._isOnPath(i))},_hasFill:function(){var e=this.options.fill;return e&&!u(e.color)},_hasStroke:function(){var e=this.options.stroke;return e&&e.width>0&&!u(e.color)},_clippedBBox:function(e){return this.bbox(e)}}),fn.prototype.nodeType="Element",Qt.extend(fn.prototype),mn=Math.PI/2,gn=qt.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t=0),this.setCenter(e),this.setRadius(t)},setCenter:function(e){return this._observerField("center",un.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},equals:function(e){return e&&e.center.equals(this.center)&&e.radius===this.radius},clone:function(){return new gn(this.center.clone(),this.radius)},pointAt:function(e){return this._pointAt(f(e))},bbox:function(e){var t,n,i,r,o=this,a=E(this.center,this.radius,this.radius,e),s=un.maxPoint(),l=un.minPoint();for(t=0;t<4;t++)n=o._pointAt(a.x+t*mn).transformCopy(e),i=o._pointAt(a.y+t*mn).transformCopy(e),r=new un(n.x,i.y),s=un.min(s,r),l=un.max(l,r);return hn.fromPoints(s,l)},_pointAt:function(e){var t=this,n=t.center,i=t.radius;return new un(n.x+i*Math.cos(e),n.y+i*Math.sin(e))},containsPoint:function(e){var t=this,n=t.center,i=t.radius,r=Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)<=Math.pow(i,2);return r},_isOnPath:function(e,t){var n=this,i=n.center,r=n.radius,o=i.distanceTo(e);return r-t<=o&&o<=r+t}}),S(gn.prototype,["radius"]),Qt.extend(gn.prototype),vn="Gradient",_n={extend:function(e){e.fill=this.fill,e.stroke=this.stroke},fill:function(e,t){var n,r=this.options;return i(e)?(e&&e.nodeType!==vn?(n={color:e},i(t)&&(n.opacity=t),r.set("fill",n)):r.set("fill",e),this):r.get("fill")},stroke:function(e,t,n){return i(e)?(this.options.set("stroke.color",e),i(t)&&this.options.set("stroke.width",t),i(n)&&this.options.set("stroke.opacity",n),this):this.options.get("stroke")}},bn=""+dn.IDENTITY,kn={extend:function(e){e.bbox=this.bbox,e.geometryChange=this.geometryChange},bbox:function(e){var t,n,i=D(this.currentTransform(e)),r=i?""+i:bn;return this._bboxCache&&this._matrixHash===r?t=this._bboxCache.clone():(t=this._bbox(i),this._bboxCache=t?t.clone():null,this._matrixHash=r),n=this.options.get("stroke.width"),n&&t&&t.expand(n/2),t},geometryChange:function(){delete this._bboxCache,this.trigger("geometryChange",{element:this})}},wn="#000",yn=fn.extend({init:function(e,t){void 0===e&&(e=new gn),void 0===t&&(t={}),fn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke(wn)},rawBBox:function(){return this._geometry.bbox()},_bbox:function(e){return this._geometry.bbox(e)},_containsPoint:function(e){return this.geometry().containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),yn.prototype.nodeType="Circle",_n.extend(yn.prototype),kn.extend(yn.prototype),I(yn.prototype,["geometry"]),xn=10,Cn=45,Tn=Math.pow,Sn=qt.extend({init:function(e,t){void 0===e&&(e=new un),void 0===t&&(t={}),this.setCenter(e),this.radiusX=t.radiusX,this.radiusY=t.radiusY||t.radiusX,this.startAngle=t.startAngle,this.endAngle=t.endAngle,this.anticlockwise=t.anticlockwise||!1,this.xRotation=t.xRotation},clone:function(){return new Sn(this.center,{radiusX:this.radiusX,radiusY:this.radiusY,startAngle:this.startAngle,endAngle:this.endAngle,anticlockwise:this.anticlockwise})},setCenter:function(e){return this._observerField("center",un.create(e)),this.geometryChange(),this},getCenter:function(){return this.center},pointAt:function(e){var t=this.center,n=f(e);return new un(t.x+this.radiusX*Math.cos(n),t.y+this.radiusY*Math.sin(n))},curvePoints:function(){var e,t,n,i,r=this,o=this.startAngle,a=this.anticlockwise?-1:1,s=[this.pointAt(o)],l=this._arcInterval(),d=l.endAngle-l.startAngle,u=Math.ceil(d/Cn),c=d/u,h=o;for(this.xRotation&&(e=F().rotate(this.xRotation,this.center)),t=1;t<=u;t++)n=h+a*c,i=r._intervalCurvePoints(h,n,e),s.push(i.cp1,i.cp2,i.p2),h=n;return s},bbox:function(e){for(var t,n,i=this,r=this._arcInterval(),a=r.startAngle,s=r.endAngle,l=E(this.center,this.radiusX,this.radiusY,e),d=o(l.x),u=o(l.y),c=this.pointAt(s).transformCopy(e),h=B(d,a),p=B(u,a),f=this.pointAt(a).transformCopy(e),m=un.min(f,c),g=un.max(f,c);h<s||p<s;)t=void 0,h<s&&(t=i.pointAt(h).transformCopy(e),h+=90),n=void 0,p<s&&(n=i.pointAt(p).transformCopy(e),p+=90),f=new un(t.x,n.y),m=un.min(m,f),g=un.max(g,f);return hn.fromPoints(m,g)},_arcInterval:function(){var e,t=this,n=t.startAngle,i=t.endAngle,r=t.anticlockwise;return r&&(e=n,n=i,i=e),(n>i||r&&n===i)&&(i+=360),{startAngle:n,endAngle:i}},_intervalCurvePoints:function(e,t,n){var i=this.pointAt(e),r=this.pointAt(t),o=this._derivativeAt(e),a=this._derivativeAt(t),s=(f(t)-f(e))/3,l=new un(i.x+s*o.x,i.y+s*o.y),d=new un(r.x-s*a.x,r.y-s*a.y);return n&&(i.transform(n),r.transform(n),l.transform(n),d.transform(n)),{p1:i,cp1:l,cp2:d,p2:r}},_derivativeAt:function(e){var t=f(e);return new un(-this.radiusX*Math.sin(t),this.radiusY*Math.cos(t))},containsPoint:function(e){var t,n,i,r=this._arcInterval(),o=r.endAngle-r.startAngle,a=this,s=a.center,l=a.radiusX,d=a.radiusY,u=s.distanceTo(e),c=Math.atan2(e.y-s.y,e.x-s.x),h=l*d/Math.sqrt(Tn(l,2)*Tn(Math.sin(c),2)+Tn(d,2)*Tn(Math.cos(c),2)),p=this.pointAt(this.startAngle).round(xn),f=this.pointAt(this.endAngle).round(xn),m=z(s,e.round(xn),p,f);return o<180?t=m&&M(s.distanceTo(m),u)&&M(u,h):(n=H(s.x,s.y,l,d,e.x,e.y),360!==n&&(n=(360+n)%360),i=r.startAngle<=n&&n<=r.endAngle,t=i&&M(u,h)||!i&&(!m||m.equals(e))),t},_isOnPath:function(e,t){var n,i=this._arcInterval(),r=this.center,o=H(r.x,r.y,this.radiusX,this.radiusY,e.x,e.y);return 360!==o&&(o=(360+o)%360),n=i.startAngle<=o&&o<=i.endAngle,n&&this.pointAt(o).distanceTo(e)<=t}}),Sn.fromPoints=function(e,t,n,i,r,o,a){var s=N({x1:e.x,y1:e.y,x2:t.x,y2:t.y,rx:n,ry:i,largeArc:r,swipe:o,rotation:a});return new Sn(s.center,{startAngle:s.startAngle,endAngle:s.endAngle,radiusX:s.radiusX,radiusY:s.radiusY,xRotation:s.xRotation,anticlockwise:0===o})},S(Sn.prototype,["radiusX","radiusY","startAngle","endAngle","anticlockwise"]),Qt.extend(Sn.prototype),Dn=[].push,Fn=[].pop,En=[].splice,An=[].shift,In=[].slice,Rn=[].unshift,Mn=qt.extend({init:function(e){void 0===e&&(e=[]),this.length=0,this._splice(0,e.length,e)},elements:function(e){return e?(this._splice(0,this.length,e),this._change(),this):this.slice(0)},push:function(){var e=arguments,t=Dn.apply(this,e);return this._add(e),t},slice:function(){return In.call(this)},pop:function(){var e=this.length,t=Fn.apply(this);return e&&this._remove([t]),t},splice:function(e,t){var n=In.call(arguments,2),i=this._splice(e,t,n);return this._change(),i},shift:function(){var e=this.length,t=An.apply(this);return e&&this._remove([t]),t},unshift:function(){var e=arguments,t=Rn.apply(this,e);return this._add(e),t},indexOf:function(e){var t,n=this,i=this.length;for(t=0;t<i;t++)if(n[t]===e)return t;return-1},_splice:function(e,t,n){var i=En.apply(this,[e,t].concat(n));return this._clearObserver(i),this._setObserver(n),i},_add:function(e){this._setObserver(e),this._change()},_remove:function(e){this._clearObserver(e),this._change()},_setObserver:function(e){var t,n=this;for(t=0;t<e.length;t++)e[t].addObserver(n)},_clearObserver:function(e){var t,n=this;for(t=0;t<e.length;t++)e[t].removeObserver(n)},_change:function(){}}),Qt.extend(Mn.prototype),zn=Mn.extend({_change:function(){this.geometryChange()}}),Hn=qt.extend({init:function(e,t){void 0===e&&(e=0),void 0===t&&(t=0),this.real=e,this.img=t},add:function(e){return new Hn(g(this.real+e.real,xn),g(this.img+e.img,xn))},addConstant:function(e){return new Hn(this.real+e,this.img)},negate:function(){return new Hn((-this.real),(-this.img))},multiply:function(e){return new Hn(this.real*e.real-this.img*e.img,this.real*e.img+this.img*e.real)},multiplyConstant:function(e){return new Hn(this.real*e,this.img*e)},nthRoot:function(e){var t=Math.atan2(this.img,this.real),n=Math.sqrt(Math.pow(this.img,2)+Math.pow(this.real,2)),i=Math.pow(n,1/e);return new Hn(i*Math.cos(t/e),i*Math.sin(t/e))},equals:function(e){return this.real===e.real&&this.img===e.img},isReal:function(){return 0===this.img}}),Nn=qt.extend({init:function(e,t,n){this.anchor(e||new un),this.controlIn(t),this.controlOut(n)},bboxTo:function(e,t){var n,i=this.anchor().transformCopy(t),r=e.anchor().transformCopy(t);return n=this.controlOut()&&e.controlIn()?this._curveBoundingBox(i,this.controlOut().transformCopy(t),e.controlIn().transformCopy(t),r):this._lineBoundingBox(i,r)},_lineBoundingBox:function(e,t){return hn.fromPoints(e,t)},_curveBoundingBox:function(e,t,n,i){var r=[e,t,n,i],o=this._curveExtremesFor(r,"x"),a=this._curveExtremesFor(r,"y"),s=Y([o.min,o.max,e.x,i.x]),l=Y([a.min,a.max,e.y,i.y]);return hn.fromPoints(new un(s.min,l.min),new un(s.max,l.max))},_curveExtremesFor:function(e,t){var n=this._curveExtremes(e[0][t],e[1][t],e[2][t],e[3][t]);return{min:V(n.min,t,e),max:V(n.max,t,e)}},_curveExtremes:function(e,t,n,i){var r,o,a=e-3*t+3*n-i,s=-2*(e-2*t+n),l=e-t,d=Math.sqrt(s*s-4*a*l),u=0,c=1;return 0===a?0!==s&&(u=c=-l/s):isNaN(d)||(u=(-s+d)/(2*a),c=(-s-d)/(2*a)),r=Math.max(Math.min(u,c),0),(r<0||r>1)&&(r=0),o=Math.min(Math.max(u,c),1),(o>1||o<0)&&(o=1),{min:r,max:o}},_intersectionsTo:function(e,t){var n;return n=this.controlOut()&&e.controlIn()?$([this.anchor(),this.controlOut(),e.controlIn(),e.anchor()],t,this.bboxTo(e)):K(this.anchor(),e.anchor(),t)},_isOnCurveTo:function(e,t,n,i){var r,o,a,s,l,d,u,c=this.bboxTo(e).expand(n,n);if(c.containsPoint(t))return r=this.anchor(),o=this.controlOut(),a=e.controlIn(),s=e.anchor(),"start"===i&&r.distanceTo(t)<=n?!O(r,o,t):"end"===i&&s.distanceTo(t)<=n?!O(s,a,t):(l=[r,o,a,s],!(!G(l,t,"x","y",n)&&!G(l,t,"y","x",n))||(d=F().rotate(45,t),u=[r.transformCopy(d),o.transformCopy(d),a.transformCopy(d),s.transformCopy(d)],G(u,t,"x","y",n)||G(u,t,"y","x",n)))},_isOnLineTo:function(e,t,n){var i=this.anchor(),r=e.anchor(),a=o(Math.atan2(r.y-i.y,r.x-i.x)),s=new hn([i.x,i.y-n/2],[i.distanceTo(r),n]);return s.containsPoint(t.transformCopy(F().rotate(-a,i)))},_isOnPathTo:function(e,t,n,i){var r;return r=this.controlOut()&&e.controlIn()?this._isOnCurveTo(e,t,n/2,i):this._isOnLineTo(e,t,n)}}),L(Nn.prototype,["anchor","controlIn","controlOut"]),Qt.extend(Nn.prototype),Bn=fn.extend({init:function(e){fn.fn.init.call(this,e),this.segments=new zn,this.segments.addObserver(this),i(this.options.stroke)||(this.stroke("#000"),i(this.options.stroke.lineJoin)||this.options.set("stroke.lineJoin","miter"))},moveTo:function(e,t){return this.suspend(),this.segments.elements([]),this.resume(),this.lineTo(e,t),this},lineTo:function(e,t){var n=i(t)?new un(e,t):e,r=new Nn(n);return this.segments.push(r),this},curveTo:function(e,t,n){var i,r;return this.segments.length>0&&(i=c(this.segments),r=new Nn(n,t),this.suspend(),i.controlOut(e),this.resume(),this.segments.push(r)),this},arc:function(e,t,n,i,r){var o,a,s,l,d;return this.segments.length>0&&(o=c(this.segments),a=o.anchor(),s=f(e),l=new un(a.x-n*Math.cos(s),a.y-i*Math.sin(s)),d=new Sn(l,{startAngle:e,endAngle:t,radiusX:n,radiusY:i,anticlockwise:r}),this._addArcSegments(d)),this},arcTo:function(e,t,n,i,r,o){var a,s,l;return this.segments.length>0&&(a=c(this.segments),s=a.anchor(),l=Sn.fromPoints(s,e,t,n,i,r,o),this._addArcSegments(l)),this},_addArcSegments:function(e){var t,n,i=this;for(this.suspend(),t=e.curvePoints(),n=1;n<t.length;n+=3)i.curveTo(t[n],t[n+1],t[n+2]);this.resume(),this.geometryChange()},close:function(){return this.options.closed=!0,this.geometryChange(),this},rawBBox:function(){return this._bbox()},_containsPoint:function(e){var t,n,i,r=this.segments,o=r.length,a=0;for(i=1;i<o;i++)t=r[i-1],n=r[i],a+=t._intersectionsTo(n,e);return!this.options.closed&&r[0].anchor().equals(r[o-1].anchor())||(a+=K(r[0].anchor(),r[o-1].anchor(),e)),a%2!==0},_isOnPath:function(e,t){var n,i=this.segments,r=i.length,o=t||this.options.stroke.width;if(r>1){if(i[0]._isOnPathTo(i[1],e,o,"start"))return!0;for(n=2;n<=r-2;n++)if(i[n-1]._isOnPathTo(i[n],e,o))return!0;if(i[r-2]._isOnPathTo(i[r-1],e,o,"end"))return!0}return!1},_bbox:function(e){var t,n,i,r,o=this.segments,a=o.length;if(1===a)n=o[0].anchor().transformCopy(e),t=new hn(n,cn.ZERO);else if(a>0)for(i=1;i<a;i++)r=o[i-1].bboxTo(o[i],e),t=t?hn.union(t,r):r;return t}}),Bn.fromRect=function(e,t){return new Bn(t).moveTo(e.topLeft()).lineTo(e.topRight()).lineTo(e.bottomRight()).lineTo(e.bottomLeft()).close()},Bn.fromPoints=function(e,t){var n,i,r;if(e){for(n=new Bn(t),i=0;i<e.length;i++)r=un.create(e[i]),r&&(0===i?n.moveTo(r):n.lineTo(r));return n}},Bn.fromArc=function(e,t){var n=new Bn(t),i=e.startAngle,r=e.pointAt(i);return n.moveTo(r.x,r.y),n.arc(i,e.endAngle,e.radiusX,e.radiusY,e.anticlockwise),n},Bn.prototype.nodeType="Path",_n.extend(Bn.prototype),kn.extend(Bn.prototype),Pn="#000",Ln=fn.extend({init:function(e,t){void 0===e&&(e=new Sn),void 0===t&&(t={}),fn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke(Pn)},_bbox:function(e){return this._geometry.bbox(e)},rawBBox:function(){return this.geometry().bbox()},toPath:function(){var e,t=new Bn,n=this.geometry().curvePoints();if(n.length>0)for(t.moveTo(n[0].x,n[0].y),e=1;e<n.length;e+=3)t.curveTo(n[e],n[e+1],n[e+2]);return t},_containsPoint:function(e){return this.geometry().containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),Ln.prototype.nodeType="Arc",_n.extend(Ln.prototype),kn.extend(Ln.prototype),I(Ln.prototype,["geometry"]),On=fn.extend({init:function(e){fn.fn.init.call(this,e),this.paths=new zn,this.paths.addObserver(this),i(this.options.stroke)||this.stroke("#000")},moveTo:function(e,t){var n=new Bn;return n.moveTo(e,t),this.paths.push(n),this},lineTo:function(e,t){return this.paths.length>0&&c(this.paths).lineTo(e,t),this},curveTo:function(e,t,n){return this.paths.length>0&&c(this.paths).curveTo(e,t,n),this},arc:function(e,t,n,i,r){return this.paths.length>0&&c(this.paths).arc(e,t,n,i,r),this},arcTo:function(e,t,n,i,r,o){return this.paths.length>0&&c(this.paths).arcTo(e,t,n,i,r,o),this},close:function(){return this.paths.length>0&&c(this.paths).close(),this},_bbox:function(e){return Q(this.paths,!0,e)},rawBBox:function(){return Q(this.paths,!1)},_containsPoint:function(e){var t,n=this.paths;for(t=0;t<n.length;t++)if(n[t]._containsPoint(e))return!0;return!1},_isOnPath:function(e){var t,n=this.paths,i=this.options.stroke.width;for(t=0;t<n.length;t++)if(n[t]._isOnPath(e,i))return!0;return!1},_clippedBBox:function(e){return X(this.paths,this.currentTransform(e))}}),On.prototype.nodeType="MultiPath",_n.extend(On.prototype),kn.extend(On.prototype),Vn="12px sans-serif",Wn="#000",Un=fn.extend({init:function(e,t,n){void 0===t&&(t=new un),void 0===n&&(n={}),fn.fn.init.call(this,n),this.content(e),this.position(t),this.options.font||(this.options.font=Vn),i(this.options.fill)||this.fill(Wn)},content:function(e){return i(e)?(this.options.set("content",e),this):this.options.get("content")},measure:function(){var e=jt.measureText(this.content(),{font:this.options.get("font")});return e},rect:function(){var e=this.measure(),t=this.position().clone();return new hn(t,[e.width,e.height])},bbox:function(e){var t=D(this.currentTransform(e));return this.rect().bbox(t)},rawBBox:function(){return this.rect().bbox()},_containsPoint:function(e){return this.rect().containsPoint(e)}}),Un.prototype.nodeType="Text",_n.extend(Un.prototype),L(Un.prototype,["position"]),qn=fn.extend({init:function(e,t,n){void 0===t&&(t=new hn),void 0===n&&(n={}),fn.fn.init.call(this,n),this.src(e),this.rect(t)},src:function(e){return i(e)?(this.options.set("src",e),this):this.options.get("src")},bbox:function(e){var t=D(this.currentTransform(e));return this._rect.bbox(t)},rawBBox:function(){return this._rect.bbox()},_containsPoint:function(e){return this._rect.containsPoint(e)},_hasFill:function(){return this.src()}}),qn.prototype.nodeType="Image",I(qn.prototype,["rect"]),jn={extend:function(e,t){e.traverse=function(e){var n,i,r=this[t];for(n=0;n<r.length;n++)i=r[n],i.traverse?i.traverse(e):e(i);return this}}},Gn=fn.extend({init:function(e){fn.fn.init.call(this,e),this.children=[]},childrenChange:function(e,t,n){this.trigger("childrenChange",{action:e,items:t,index:n})},append:function(){return t(this.children,arguments),this._reparent(arguments,this),this.childrenChange("add",arguments),this},insert:function(e,t){return this.children.splice(e,0,t),t.parent=this,this.childrenChange("add",[t],e),this},insertAt:function(e,t){return this.insert(t,e)},remove:function(e){var t=this.children.indexOf(e);return t>=0&&(this.children.splice(t,1),e.parent=null,this.childrenChange("remove",[e],t)),this},removeAt:function(e){if(0<=e&&e<this.children.length){var t=this.children[e];this.children.splice(e,1),t.parent=null,this.childrenChange("remove",[t],e)}return this},clear:function(){var e=this.children;return this.children=[],this._reparent(e,null),this.childrenChange("remove",e,0),this},bbox:function(e){return Q(this.children,!0,this.currentTransform(e))},rawBBox:function(){return Q(this.children,!1)},_clippedBBox:function(e){return X(this.children,this.currentTransform(e))},currentTransform:function(e){return fn.prototype.currentTransform.call(this,e)||null},containsPoint:function(e,t){var n,i,r;if(this.visible())for(n=this.children,i=this.currentTransform(t),r=0;r<n.length;r++)if(n[r].containsPoint(e,i))return!0;return!1},_reparent:function(e,t){var n,i,r,o=this;
for(n=0;n<e.length;n++)i=e[n],r=i.parent,r&&r!==o&&r.remove&&r.remove(i),i.parent=t}}),Gn.prototype.nodeType="Group",jn.extend(Gn.prototype,"children"),$n={alignContent:"start",justifyContent:"start",alignItems:"start",spacing:0,orientation:"horizontal",lineSpacing:0,wrap:!0,revers:!1},Kn=function(e,t){e.forEach(t)},Yn=function(e,t){var n,i=e.length;for(n=i-1;n>=0;n--)t(e[n],n)},Qn=Gn.extend({init:function(t,n){Gn.fn.init.call(this,e.extend({},$n,n)),this._rect=t,this._fieldMap={}},rect:function(e){return e?(this._rect=e,this):this._rect},_initMap:function(){var e=this.options,t=this._fieldMap;"horizontal"===e.orientation?(t.sizeField="width",t.groupsSizeField="height",t.groupAxis="x",t.groupsAxis="y"):(t.sizeField="height",t.groupsSizeField="width",t.groupAxis="y",t.groupsAxis="x"),e.reverse?(this.forEach=Yn,this.justifyAlign=ee):(this.forEach=Kn,this.justifyAlign=Z)},reflow:function(){var e,t,n,i,r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C=this;if(this._rect&&0!==this.children.length){for(this._initMap(),this.options.transform&&this.transform(null),e=this.options,t=this._rect,n=this._initGroups(),i=n.groups,r=n.groupsSize,o=this._fieldMap,a=o.sizeField,s=o.groupsSizeField,l=o.groupAxis,d=o.groupsAxis,u=new un,c=new un,h=new cn,p=Z(r,t,e.alignContent,d,s),v=function(t,n){var i=m.elements[n];c[l]=f,c[d]=Z(t.size[s],g,e.alignItems,d,s),J(c,t,i),f+=t.size[a]+e.spacing},_=0;_<i.length;_++)m=i[_],u[l]=f=C.justifyAlign(m.size,t,e.justifyContent,l,a),u[d]=p,h[a]=m.size,h[s]=m.lineSize,g=new hn(u,h),C.forEach(m.bboxes,v),p+=m.lineSize+e.lineSpacing;!e.wrap&&m.size>t.size[a]&&(b=t.size[a]/g.size[a],k=g.topLeft().scale(b,b),w=g.size[s]*b,y=Z(w,t,e.alignContent,d,s),x=F(),"x"===l?x.translate(t.origin.x-k.x,y-k.y):x.translate(y-k.x,t.origin.y-k.y),x.scale(b,b),this.transform(x))}},_initGroups:function(){var e,t,n,i=this,r=this,o=r.options,a=r.children,s=o.lineSpacing,l=o.wrap,d=o.spacing,u=this._fieldMap.sizeField,c=this._newGroup(),h=[],p=function(){h.push(c),f+=c.lineSize+s},f=-s;for(e=0;e<a.length;e++)t=a[e],n=a[e].clippedBBox(),t.visible()&&n&&(l&&c.size+n.size[u]+d>i._rect.size[u]?0===c.bboxes.length?(i._addToGroup(c,n,t),p(),c=i._newGroup()):(p(),c=i._newGroup(),i._addToGroup(c,n,t)):i._addToGroup(c,n,t));return c.bboxes.length&&p(),{groups:h,groupsSize:f}},_addToGroup:function(e,t,n){e.size+=t.size[this._fieldMap.sizeField]+this.options.spacing,e.lineSize=Math.max(t.size[this._fieldMap.groupsSizeField],e.lineSize),e.bboxes.push(t),e.elements.push(n)},_newGroup:function(){return{lineSize:0,size:-this.options.spacing,bboxes:[],elements:[]}}}),Xn=fn.extend({init:function(e,t){void 0===e&&(e=new hn),void 0===t&&(t={}),fn.fn.init.call(this,t),this.geometry(e),i(this.options.stroke)||this.stroke("#000")},_bbox:function(e){return this._geometry.bbox(e)},rawBBox:function(){return this._geometry.bbox()},_containsPoint:function(e){return this._geometry.containsPoint(e)},_isOnPath:function(e){return this.geometry()._isOnPath(e,this.options.stroke.width/2)}}),Xn.prototype.nodeType="Rect",_n.extend(Xn.prototype),kn.extend(Xn.prototype),I(Xn.prototype,["geometry"]),Jn=Mn.extend({_change:function(){this.optionsChange({field:"stops"})}}),Zn=qt.extend({init:function(e,t,n){this.options=new ln({offset:e,color:t,opacity:i(n)?n:1}),this.options.addObserver(this)}}),Zn.create=function(e){if(i(e)){var t;return t=e instanceof Zn?e:e.length>1?new Zn(e[0],e[1],e[2]):new Zn(e.offset,e.color,e.opacity)}},fe(Zn.prototype,["offset","color","opacity"]),Qt.extend(Zn.prototype),ei=qt.extend({init:function(e){void 0===e&&(e={}),this.stops=new Jn(this._createStops(e.stops)),this.stops.addObserver(this),this._userSpace=e.userSpace,this.id=r()},userSpace:function(e){return i(e)?(this._userSpace=e,this.optionsChange(),this):this._userSpace},_createStops:function(e){var t,n;for(void 0===e&&(e=[]),t=[],n=0;n<e.length;n++)t.push(Zn.create(e[n]));return t},addStop:function(e,t,n){this.stops.push(new Zn(e,t,n))},removeStop:function(e){var t=this.stops.indexOf(e);t>=0&&this.stops.splice(t,1)}}),ei.prototype.nodeType="Gradient",Qt.extend(ei.prototype),e.extend(ei.prototype,{optionsChange:function(e){this.trigger("optionsChange",{field:"gradient"+(e?"."+e.field:""),value:this})},geometryChange:function(){this.optionsChange()}}),ti=ei.extend({init:function(e){void 0===e&&(e={}),ei.fn.init.call(this,e),this.start(e.start||new un),this.end(e.end||new un(1,0))}}),L(ti.prototype,["start","end"]),ni=ei.extend({init:function(e){void 0===e&&(e={}),ei.fn.init.call(this,e),this.center(e.center||new un),this._radius=i(e.radius)?e.radius:1,this._fallbackFill=e.fallbackFill},radius:function(e){return i(e)?(this._radius=e,this.geometryChange(),this):this._radius},fallbackFill:function(e){return i(e)?(this._fallbackFill=e,this.optionsChange(),this):this._fallbackFill}}),L(ni.prototype,["center"]),ii={swing:me,linear:ge,easeOutElastic:ve},ri=Date.now||function(){return(new Date).getTime()},oi=qt.extend({init:function(t,n){this.options=e.extend({},this.options,n),this.element=t},setup:function(){},step:function(){},play:function(){var e,t,n,i=this,r=this.options,o=r.duration,a=r.delay;void 0===a&&(a=0),e=ii[r.easing],t=ri()+a,n=t+o,0===o?(this.step(1),this.abort()):setTimeout(function(){var r=function(){var a,s,l,d;i._stopped||(a=ri(),s=h(a-t,0,o),l=s/o,d=e(l,s,0,1,o),i.step(d),a<n?kendo.animationFrame(r):i.abort())};r()},a)},abort:function(){this._stopped=!0},destroy:function(){this.abort()}}),oi.prototype.options={duration:500,easing:"swing"},ai=qt.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e,t){var n,i,r,o=this._items;if(t&&t.type)for(i=t.type.toLowerCase(),r=0;r<o.length;r++)if(o[r].name.toLowerCase()===i){n=o[r];break}if(n)return new n.type(e,t)}}),ai.current=new ai,oi.create=function(e,t,n){return ai.current.create(e,t,n)},si={l:function(e,t){var n,i,r=t.parameters,o=t.position;for(n=0;n<r.length;n+=2)i=new un(r[n],r[n+1]),t.isRelative&&i.translateWith(o),e.lineTo(i.x,i.y),o.x=i.x,o.y=i.y},c:function(e,t){var n,i,r,o,a=t.parameters,s=t.position;for(n=0;n<a.length;n+=6)i=new un(a[n],a[n+1]),r=new un(a[n+2],a[n+3]),o=new un(a[n+4],a[n+5]),t.isRelative&&(r.translateWith(s),i.translateWith(s),o.translateWith(s)),e.curveTo(i,r,o),s.x=o.x,s.y=o.y},v:function(e,t){var n=t.isRelative?0:t.position.x;_e(t.parameters,!0,n),this.l(e,t)},h:function(e,t){var n=t.isRelative?0:t.position.y;_e(t.parameters,!1,n),this.l(e,t)},a:function(e,t){var n,i,r,o,a,s,l,d=t.parameters,u=t.position;for(n=0;n<d.length;n+=7)i=d[n],r=d[n+1],o=d[n+2],a=d[n+3],s=d[n+4],l=new un(d[n+5],d[n+6]),t.isRelative&&l.translateWith(u),u.x===l.x&&u.y===l.y||(e.arcTo(l,i,r,a,s,o),u.x=l.x,u.y=l.y)},s:function(e,t){var n,i,r,o,a,s=t.parameters,l=t.position,d=t.previousCommand;for("s"!==d&&"c"!==d||(n=c(c(e.paths).segments).controlIn()),i=0;i<s.length;i+=4)r=new un(s[i],s[i+1]),o=new un(s[i+2],s[i+3]),a=void 0,t.isRelative&&(r.translateWith(l),o.translateWith(l)),a=n?be(n,l):l.clone(),n=r,e.curveTo(a,r,o),l.x=o.x,l.y=o.y},q:function(e,t){var n,i,r,o,a=t.parameters,s=t.position;for(n=0;n<a.length;n+=4)i=new un(a[n],a[n+1]),r=new un(a[n+2],a[n+3]),t.isRelative&&(i.translateWith(s),r.translateWith(s)),o=ke(s,i,r),e.curveTo(o.controlOut,o.controlIn,r),s.x=r.x,s.y=r.y},t:function(e,t){var n,i,r,o,a,s=t.parameters,l=t.position,d=t.previousCommand;for("q"!==d&&"t"!==d||(i=c(c(e.paths).segments),n=i.controlIn().clone().translateWith(l.scaleCopy(-1/3)).scale(1.5)),r=0;r<s.length;r+=2)o=new un(s[r],s[r+1]),t.isRelative&&o.translateWith(l),n=n?be(n,l):l.clone(),a=ke(l,n,o),e.curveTo(a.controlOut,a.controlIn,o),l.x=o.x,l.y=o.y}},li=1/3,di=/([a-df-z]{1})([^a-df-z]*)(z)?/gi,ui=/[,\s]?([+\-]?(?:\d*\.\d+|\d+)(?:[eE][+\-]?\d+)?)/g,ci="m",hi="z",pi=qt.extend({parse:function(e,t){var n,i=new On(t),r=new un;return e.replace(di,function(e,t,o,a){var s=t.toLowerCase(),l=s===t,d=we(o.trim());if(s===ci&&(l?(r.x+=d[0],r.y+=d[1]):(r.x=d[0],r.y=d[1]),i.moveTo(r.x,r.y),d.length>2&&(s="l",d.splice(0,2))),si[s])si[s](i,{parameters:d,position:r,isRelative:l,previousCommand:n}),a&&a.toLowerCase()===hi&&i.close();else if(s!==ci)throw Error("Error while parsing SVG path. Unsupported command: "+s);n=s}),i}}),pi.current=new pi,Bn.parse=function(e,t){return pi.current.parse(e,t)},fi=qt.extend({init:function(){this._items=[]},register:function(e,t,n){var i=this._items,r=i[0],o={name:e,type:t,order:n};!r||n<r.order?i.unshift(o):i.push(o)},create:function(e,t){var n,i,r=this._items,o=r[0];if(t&&t.type)for(n=t.type.toLowerCase(),i=0;i<r.length;i++)if(r[i].name===n){o=r[i];break}return o?new o.type(e,t):void kendo.logToConsole("Warning: Unable to create Kendo UI Drawing Surface. Possible causes:\n- The browser does not support SVG and Canvas. User agent: "+navigator.userAgent)}}),fi.current=new fi,mi=["click","mouseenter","mouseleave","mousemove","resize"],gi=kendo.Observable.extend({init:function(t,n){kendo.Observable.fn.init.call(this),this.options=e.extend({},n),this.element=t,this.element._kendoExportVisual=this.exportVisual.bind(this),this._click=this._handler("click"),this._mouseenter=this._handler("mouseenter"),this._mouseleave=this._handler("mouseleave"),this._mousemove=this._handler("mousemove"),this._visual=new Gn,y(t,this.options),this.bind(mi,this.options),this._enableTracking()},draw:function(e){this._visual.children.push(e)},clear:function(){this._visual.children=[]},destroy:function(){this._visual=null,this.element._kendoExportVisual=null,this.unbind()},eventTarget:function(e){for(var t,n=this,i=d(e);!t&&i&&(t=i._kendoNode,i!==n.element);)i=i.parentElement;if(t)return t.srcElement},exportVisual:function(){return this._visual},getSize:function(){return y(this.element)},currentSize:function(e){return e?void(this._size=e):this._size},setSize:function(e){y(this.element,e),this.currentSize(e),this._resize()},resize:function(e){var t=this.getSize(),n=this.currentSize();(e||(t.width>0||t.height>0)&&(!n||t.width!==n.width||t.height!==n.height))&&(this.currentSize(t),this._resize(t,e),this.trigger("resize",t))},size:function(e){return e?void this.setSize(e):this.getSize()},suspendTracking:function(){this._suspendedTracking=!0},resumeTracking:function(){this._suspendedTracking=!1},_enableTracking:function(){},_resize:function(){},_handler:function(e){var t=this;return function(n){var i=t.eventTarget(n);i&&!t._suspendedTracking&&t.trigger(e,{element:i,originalEvent:n,type:e})}},_elementOffset:function(){var e=this.element,t=k(e,["paddingLeft","paddingTop"]),n=t.paddingLeft,i=t.paddingTop,r=b(e),o=r.left,a=r.top;return{left:o+parseInt(n,10),top:a+parseInt(i,10)}},_surfacePoint:function(e){var t=this._elementOffset(),n=l(e),i=n.x-t.left,r=n.y-t.top;return new un(i,r)}}),gi.create=function(e,t){return fi.current.create(e,t)},gi.support={},vi=qt.extend({init:function(e){this.childNodes=[],this.parent=null,e&&(this.srcElement=e,this.observe())},destroy:function(){var e,t,n=this;for(this.srcElement&&this.srcElement.removeObserver(this),e=this.childNodes,t=0;t<e.length;t++)n.childNodes[t].destroy();this.parent=null},load:function(){},observe:function(){this.srcElement&&this.srcElement.addObserver(this)},append:function(e){this.childNodes.push(e),e.parent=this},insertAt:function(e,t){this.childNodes.splice(t,0,e),e.parent=this},remove:function(e,t){var n,i=this,r=e+t;for(n=e;n<r;n++)i.childNodes[n].removeSelf();this.childNodes.splice(e,t)},removeSelf:function(){this.clear(),this.destroy()},clear:function(){this.remove(0,this.childNodes.length)},invalidate:function(){this.parent&&this.parent.invalidate()},geometryChange:function(){this.invalidate()},optionsChange:function(){this.invalidate()},childrenChange:function(e){"add"===e.action?this.load(e.items,e.index):"remove"===e.action&&this.remove(e.index,e.items.length),this.invalidate()}}),_i={},bi="http://www.w3.org/2000/svg",ki="none",wi=function(e,t){e.innerHTML=t},"undefined"!=typeof document&&(yi="<svg xmlns='"+bi+"'></svg>",xi=document.createElement("div"),Ci="undefined"!=typeof DOMParser,xi.innerHTML=yi,Ci&&xi.firstChild.namespaceURI!==bi&&(wi=function(e,t){var n=new DOMParser,i=n.parseFromString(t,"text/xml"),r=document.adoptNode(i.documentElement);e.innerHTML="",e.appendChild(r)})),Ti=wi,Si="transform",Di={clip:"clip-path",fill:"fill"},Fi=vi.extend({init:function(e,t){vi.fn.init.call(this,e),this.definitions={},this.options=t},destroy:function(){this.element&&(this.element._kendoNode=null,this.element=null),this.clearDefinitions(),vi.fn.destroy.call(this)},load:function(e,t){var n,r,o,a,s,l=this;for(n=0;n<e.length;n++)r=e[n],o=r.children,a=new _i[r.nodeType](r,l.options),i(t)?l.insertAt(a,t):l.append(a),a.createDefinitions(),o&&o.length>0&&a.load(o),s=l.element,s&&a.attachTo(s,t)},root:function(){for(var e=this;e.parent;)e=e.parent;return e},attachTo:function(e,t){var n,r=document.createElement("div");Ti(r,"<svg xmlns='"+bi+"' version='1.1'>"+this.render()+"</svg>"),n=r.firstChild.firstChild,n&&(i(t)?e.insertBefore(n,e.childNodes[t]||null):e.appendChild(n),this.setElement(n))},setElement:function(e){var t,n,i;for(this.element&&(this.element._kendoNode=null),this.element=e,this.element._kendoNode=this,t=this.childNodes,n=0;n<t.length;n++)i=e.childNodes[n],t[n].setElement(i)},clear:function(){var e,t;for(this.clearDefinitions(),this.element&&(this.element.innerHTML=""),e=this.childNodes,t=0;t<e.length;t++)e[t].destroy();this.childNodes=[]},removeSelf:function(){if(this.element){var e=this.element.parentNode;e&&e.removeChild(this.element),this.element=null}vi.fn.removeSelf.call(this)},template:function(){return this.renderChildren()},render:function(){return this.template()},renderChildren:function(){var e,t=this.childNodes,n="";for(e=0;e<t.length;e++)n+=t[e].render();return n},optionsChange:function(e){var t=e.field,n=e.value;"visible"===t?this.css("display",n?"":ki):Di[t]&&Te(t,n)?this.updateDefinition(t,n):"opacity"===t?this.attr("opacity",n):"cursor"===t?this.css("cursor",n):"id"===t&&(n?this.attr("id",n):this.removeAttr("id")),vi.fn.optionsChange.call(this,e)},attr:function(e,t){this.element&&this.element.setAttribute(e,t)},allAttr:function(e){var t,n=this;for(t=0;t<e.length;t++)n.attr(e[t][0],e[t][1])},css:function(e,t){this.element&&(this.element.style[e]=t)},allCss:function(e){var t,n=this;for(t=0;t<e.length;t++)n.css(e[t][0],e[t][1])},removeAttr:function(e){this.element&&this.element.removeAttribute(e)},mapTransform:function(e){var t=[];return e&&t.push([Si,"matrix("+e.matrix().toString(6)+")"]),t},renderTransform:function(){return xe(this.mapTransform(this.srcElement.transform()))},transformChange:function(e){e?this.allAttr(this.mapTransform(e)):this.removeAttr(Si)},mapStyle:function(){var e=this.srcElement.options,t=[["cursor",e.cursor]];return e.visible===!1&&t.push(["display",ki]),t},renderStyle:function(){return ye("style",Ce(this.mapStyle(!0)))},renderOpacity:function(){return ye("opacity",this.srcElement.options.opacity)},renderId:function(){return ye("id",this.srcElement.options.id)},createDefinitions:function(){var e,t,n,i,r=this.srcElement,o=this.definitions;if(r){e=r.options;for(n in Di)i=e.get(n),i&&Te(n,i)&&(o[n]=i,t=!0);t&&this.definitionChange({action:"add",definitions:o})}},definitionChange:function(e){this.parent&&this.parent.definitionChange(e)},updateDefinition:function(e,t){var n=this.definitions,i=n[e],r=Di[e],o={};i&&(o[e]=i,this.definitionChange({action:"remove",definitions:o}),delete n[e]),t?(o[e]=t,this.definitionChange({action:"add",definitions:o}),n[e]=t,this.attr(r,this.refUrl(t.id))):i&&this.removeAttr(r)},clearDefinitions:function(){var e=this.definitions;this.definitionChange({action:"remove",definitions:e}),this.definitions={}},renderDefinitions:function(){return xe(this.mapDefinitions())},mapDefinitions:function(){var e,t=this,n=this.definitions,i=[];for(e in n)i.push([Di[e],t.refUrl(n[e].id)]);return i},refUrl:function(e){var t=(this.options||{}).skipBaseHref;return De(e,t)}}),Ei=Fi.extend({template:function(){return"<stop "+this.renderOffset()+" "+this.renderStyle()+" />"},renderOffset:function(){return ye("offset",this.srcElement.offset())},mapStyle:function(){var e=this.srcElement;return[["stop-color",e.color()],["stop-opacity",e.opacity()]]},optionsChange:function(e){"offset"===e.field?this.attr(e.field,e.value):"color"!==e.field&&"opacity"!==e.field||this.css("stop-"+e.field,e.value)}}),Ai=Fi.extend({init:function(e){Fi.fn.init.call(this,e),this.id=e.id,this.loadStops()},loadStops:function(){var e,t,n=this,i=this.srcElement.stops,r=this.element;for(e=0;e<i.length;e++)t=new Ei(i[e]),n.append(t),r&&t.attachTo(r)},optionsChange:function(e){"gradient.stops"===e.field?(vi.prototype.clear.call(this),this.loadStops()):"gradient"===e.field&&this.allAttr(this.mapCoordinates())},renderCoordinates:function(){return xe(this.mapCoordinates())},mapSpace:function(){return["gradientUnits",this.srcElement.userSpace()?"userSpaceOnUse":"objectBoundingBox"]}}),Ii=Ai.extend({template:function(){return"<linearGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</linearGradient>"},mapCoordinates:function(){var e=this.srcElement,t=e.start(),n=e.end(),i=[["x1",t.x],["y1",t.y],["x2",n.x],["y2",n.y],this.mapSpace()];return i}}),Ri=Ai.extend({template:function(){return"<radialGradient id='"+this.id+"' "+this.renderCoordinates()+">"+this.renderChildren()+"</radialGradient>"},mapCoordinates:function(){var e=this.srcElement,t=e.center(),n=e.radius(),i=[["cx",t.x],["cy",t.y],["r",n],this.mapSpace()];return i}}),Mi=Fi.extend({init:function(e){Fi.fn.init.call(this),this.srcElement=e,this.id=e.id,this.load([e])},template:function(){return"<clipPath id='"+this.id+"'>"+this.renderChildren()+"</clipPath>"}}),zi=Fi.extend({init:function(){Fi.fn.init.call(this),this.definitionMap={}},attachTo:function(e){this.element=e},template:function(){return"<defs>"+this.renderChildren()+"</defs>"},definitionChange:function(e){var t=e.definitions,n=e.action;"add"===n?this.addDefinitions(t):"remove"===n&&this.removeDefinitions(t)},createDefinition:function(e,t){var n;return"clip"===e?n=Mi:"fill"===e&&(t instanceof ti?n=Ii:t instanceof ni&&(n=Ri)),new n(t)},addDefinitions:function(e){var t,n=this;for(t in e)n.addDefinition(t,e[t])},addDefinition:function(e,t){var n,i=this,r=i.element,o=i.definitionMap,a=t.id,s=o[a];s?s.count++:(n=this.createDefinition(e,t),o[a]={element:n,count:1},this.append(n),r&&n.attachTo(this.element))},removeDefinitions:function(e){var t,n=this;for(t in e)n.removeDefinition(e[t])},removeDefinition:function(e){var t=this.definitionMap,n=e.id,i=t[n];i&&(i.count--,0===i.count&&(this.remove(this.childNodes.indexOf(i.element),1),delete t[n]))}}),Hi=Fi.extend({init:function(e){Fi.fn.init.call(this),this.options=e,this.defs=new zi},attachTo:function(e){this.element=e,this.defs.attachTo(e.firstElementChild)},clear:function(){vi.prototype.clear.call(this)},template:function(){return this.defs.render()+this.renderChildren()},definitionChange:function(e){this.defs.definitionChange(e)}}),Ni="rtl",Bi=gi.extend({init:function(t,n){gi.fn.init.call(this,t,n),this._root=new Hi(e.extend({rtl:k(t,"direction").direction===Ni},this.options)),Ti(this.element,this._template()),this._rootElement=this.element.firstElementChild,Fe(this._rootElement),this._root.attachTo(this._rootElement),_(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove}),this.resize()},destroy:function(){this._root&&(this._root.destroy(),this._root=null,this._rootElement=null,x(this.element,{click:this._click,mouseover:this._mouseenter,mouseout:this._mouseleave,mousemove:this._mousemove})),gi.fn.destroy.call(this)},translate:function(e){var t=Math.round(e.x)+" "+Math.round(e.y)+" "+this._size.width+" "+this._size.height;this._offset=e,this._rootElement.setAttribute("viewBox",t)},draw:function(e){gi.fn.draw.call(this,e),this._root.load([e])},clear:function(){gi.fn.clear.call(this),this._root.clear()},svg:function(){return"<?xml version='1.0' ?>"+this._template()},exportVisual:function(){var e,t=this,n=t._visual,i=t._offset;return i&&(e=new Gn,e.children.push(n),e.transform(F().translate(-i.x,-i.y)),n=e),n},_resize:function(){this._offset&&this.translate(this._offset)},_template:function(){return"<svg style='width: 100%; height: 100%; overflow: hidden;' xmlns='"+bi+"' xmlns:xlink='http://www.w3.org/1999/xlink' version='1.1'>"+this._root.render()+"</svg>"}}),Bi.prototype.type="svg","undefined"!=typeof document&&document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")&&(gi.support.svg=!0,fi.current.register("svg",Bi,10)),Pi=Fi.extend({template:function(){return"<g"+(this.renderId()+this.renderTransform()+this.renderStyle()+this.renderOpacity()+this.renderDefinitions())+">"+this.renderChildren()+"</g>"},optionsChange:function(e){"transform"===e.field&&this.transformChange(e.value),Fi.fn.optionsChange.call(this,e)}}),_i.Group=Pi,Li={dot:[1.5,3.5],dash:[4,3.5],longdash:[8,3.5],dashdot:[3.5,3.5,1.5,3.5],longdashdot:[8,3.5,1.5,3.5],longdashdotdot:[8,3.5,1.5,3.5,1.5,3.5]},Oi="solid",Vi="butt",Wi={"fill.opacity":"fill-opacity","stroke.color":"stroke","stroke.width":"stroke-width","stroke.opacity":"stroke-opacity"},Ui=" ",qi=Fi.extend({geometryChange:function(){this.attr("d",this.renderData()),this.invalidate()},optionsChange:function(e){switch(e.field){case"fill":e.value?this.allAttr(this.mapFill(e.value)):this.removeAttr("fill");break;case"fill.color":this.allAttr(this.mapFill({color:e.value}));break;case"stroke":e.value?this.allAttr(this.mapStroke(e.value)):this.removeAttr("stroke");break;case"transform":this.transformChange(e.value);break;default:var t=Wi[e.field];t&&this.attr(t,e.value)}Fi.fn.optionsChange.call(this,e)},content:function(){this.element&&(this.element.textContent=this.srcElement.content())},renderData:function(){return this.printPath(this.srcElement)},printPath:function(e){var t,n,i,r,o,a=this,s=e.segments,l=s.length;if(l>0){for(t=[],r=1;r<l;r++)o=a.segmentType(s[r-1],s[r]),o!==i&&(i=o,t.push(o)),t.push("L"===o?a.printPoints(s[r].anchor()):a.printPoints(s[r-1].controlOut(),s[r].controlIn(),s[r].anchor()));return n="M"+this.printPoints(s[0].anchor())+Ui+t.join(Ui),e.options.closed&&(n+="Z"),n}},printPoints:function(){var e,t=arguments,n=t.length,i=[];for(e=0;e<n;e++)i.push(t[e].toString(3));return i.join(" ")},segmentType:function(e,t){return e.controlOut()&&t.controlIn()?"C":"L"},mapStroke:function(e){var t=[];return e&&!u(e.color)?(t.push(["stroke",e.color]),t.push(["stroke-width",e.width]),t.push(["stroke-linecap",this.renderLinecap(e)]),t.push(["stroke-linejoin",e.lineJoin]),i(e.opacity)&&t.push(["stroke-opacity",e.opacity]),i(e.dashType)&&t.push(["stroke-dasharray",this.renderDashType(e)])):t.push(["stroke",ki]),t},renderStroke:function(){return xe(this.mapStroke(this.srcElement.options.stroke))},renderDashType:function(e){var t,n,i,r=e.dashType,o=e.width;if(void 0===o&&(o=1),r&&r!==Oi){for(t=Li[r.toLowerCase()],n=[],i=0;i<t.length;i++)n.push(t[i]*o);return n.join(" ")}},renderLinecap:function(e){var t=e.dashType,n=e.lineCap;return t&&"solid"!==t?Vi:n},mapFill:function(e){var t=[];return e&&"Gradient"===e.nodeType||(e&&!u(e.color)?(t.push(["fill",e.color]),i(e.opacity)&&t.push(["fill-opacity",e.opacity])):t.push(["fill",ki])),t},renderFill:function(){return xe(this.mapFill(this.srcElement.options.fill))},template:function(){return"<path "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" "+ye("d",this.renderData())+this.renderStroke()+this.renderFill()+this.renderDefinitions()+this.renderTransform()+"></path>"}}),_i.Path=qi,ji=qi.extend({renderData:function(){return this.printPath(this.srcElement.toPath())}}),_i.Arc=ji,Gi=qi.extend({geometryChange:function(){var e=this.center();this.attr("cx",e.x),this.attr("cy",e.y),this.attr("r",this.radius()),this.invalidate()},center:function(){return this.srcElement.geometry().center},radius:function(){return this.srcElement.geometry().radius},template:function(){return"<circle "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+"cx='"+this.center().x+"' cy='"+this.center().y+"' r='"+this.radius()+"'"+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+this.renderTransform()+" ></circle>"}}),_i.Circle=Gi,$i=qi.extend({geometryChange:function(){var e=this.srcElement.geometry();this.attr("x",e.origin.x),this.attr("y",e.origin.y),this.attr("width",e.size.width),this.attr("height",e.size.height),this.invalidate()},size:function(){return this.srcElement.geometry().size},origin:function(){return this.srcElement.geometry().origin},template:function(){return"<rect "+this.renderId()+" "+this.renderStyle()+" "+this.renderOpacity()+" x='"+this.origin().x+"' y='"+this.origin().y+"' width='"+this.size().width+"' height='"+this.size().height+"' "+this.renderStroke()+" "+this.renderFill()+" "+this.renderDefinitions()+" "+this.renderTransform()+" />"}}),_i.Rect=$i,Ki=qi.extend({geometryChange:function(){this.allAttr(this.mapPosition()),this.invalidate()},optionsChange:function(e){"src"===e.field&&this.allAttr(this.mapSource()),qi.fn.optionsChange.call(this,e)},mapPosition:function(){var e=this.srcElement.rect(),t=e.topLeft();return[["x",t.x],["y",t.y],["width",e.width()+"px"],["height",e.height()+"px"]]},renderPosition:function(){return xe(this.mapPosition())},mapSource:function(e){var t=this.srcElement.src();return e&&(t=kendo.htmlEncode(t)),[["xlink:href",t]]},renderSource:function(){return xe(this.mapSource(!0))},template:function(){return"<image preserveAspectRatio='none' "+this.renderId()+" "+this.renderStyle()+" "+this.renderTransform()+" "+this.renderOpacity()+this.renderPosition()+" "+this.renderSource()+" "+this.renderDefinitions()+"></image>"}}),_i.Image=Ki,Yi=/&(?:[a-zA-Z]+|#\d+);/g,"undefined"!=typeof document&&(Ee._element=document.createElement("span")),Qi=qi.extend({geometryChange:function(){var e=this.pos();this.attr("x",e.x),this.attr("y",e.y),this.invalidate()},optionsChange:function(e){"font"===e.field?(this.attr("style",Ce(this.mapStyle())),this.geometryChange()):"content"===e.field&&qi.fn.content.call(this,this.srcElement.content()),qi.fn.optionsChange.call(this,e)},mapStyle:function(e){var t=qi.fn.mapStyle.call(this,e),n=this.srcElement.options.font;return e&&(n=kendo.htmlEncode(n)),t.push(["font",n],["white-space","pre"]),t},pos:function(){var e=this.srcElement.position(),t=this.srcElement.measure();return e.clone().setY(e.y+t.baseline)},renderContent:function(){var e=this.srcElement.content();return e=Ee(e),e=kendo.htmlEncode(e),jt.normalizeText(e)},renderTextAnchor:function(){var e;return!(this.options||{}).rtl||$t.msie||$t.edge||(e="end"),ye("text-anchor",e)},template:function(){return"<text "+this.renderId()+" "+this.renderTextAnchor()+" "+this.renderStyle()+" "+this.renderOpacity()+"x='"+this.pos().x+"' y='"+this.pos().y+"' "+this.renderStroke()+" "+this.renderTransform()+" "+this.renderDefinitions()+this.renderFill()+">"+this.renderContent()+"</text>"}}),_i.Text=Qi,Xi=qi.extend({renderData:function(){var e,t,n=this,i=this.srcElement.paths;if(i.length>0){for(e=[],t=0;t<i.length;t++)e.push(n.printPath(i[t]));return e.join(" ")}}}),_i.MultiPath=Xi,Ji={Circle:gn,Arc:Sn,Rect:hn,Point:un,Segment:Nn,Matrix:dn,Size:cn,toMatrix:D,Transformation:pn,transform:F},Zi={Surface:Bi,RootNode:Hi,Node:Fi,GroupNode:Pi,ArcNode:ji,CircleNode:Gi,RectNode:$i,ImageNode:Ki,TextNode:Qi,PathNode:qi,MultiPathNode:Xi,DefinitionNode:zi,ClipNode:Mi,GradientStopNode:Ei,LinearGradientNode:Ii,RadialGradientNode:Ri,exportGroup:Ae},er={},tr=vi.extend({init:function(e){vi.fn.init.call(this,e),e&&this.initClip()},initClip:function(){var e=this.srcElement.clip();e&&(this.clip=e,e.addObserver(this))},clear:function(){this.srcElement&&this.srcElement.removeObserver(this),this.clearClip(),vi.fn.clear.call(this)},clearClip:function(){this.clip&&(this.clip.removeObserver(this),delete this.clip)},setClip:function(e){this.clip&&(e.beginPath(),Ie(e,this.clip),e.clip())},optionsChange:function(e){"clip"===e.field&&(this.clearClip(),this.initClip()),vi.fn.optionsChange.call(this,e)},setTransform:function(e){if(this.srcElement){var t=this.srcElement.transform();t&&e.transform.apply(e,t.matrix().toArray(6))}},loadElements:function(e,t,n){var r,o,a,s,l=this;for(r=0;r<e.length;r++)o=e[r],a=o.children,s=new er[o.nodeType](o,n),a&&a.length>0&&s.load(a,t,n),i(t)?l.insertAt(s,t):l.append(s)},load:function(e,t,n){this.loadElements(e,t,n),this.invalidate()},setOpacity:function(e){if(this.srcElement){var t=this.srcElement.opacity();i(t)&&this.globalAlpha(e,t)}},globalAlpha:function(e,t){var n=t;n&&e.globalAlpha&&(n*=e.globalAlpha),e.globalAlpha=n},visible:function(){var e=this.srcElement;return!e||e&&e.options.visible!==!1}}),nr=tr.extend({renderTo:function(e){var t,n,i;if(this.visible()){for(e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),t=this.childNodes,n=0;n<t.length;n++)i=t[n],i.visible()&&i.renderTo(e);e.restore()}}}),jn.extend(nr.prototype,"childNodes"),er.Group=nr,ir=1e3/60,rr=nr.extend({init:function(e){nr.fn.init.call(this),this.canvas=e,this.ctx=e.getContext("2d");var t=this._invalidate.bind(this);this.invalidate=kendo.throttle(function(){kendo.animationFrame(t)},ir)},destroy:function(){nr.fn.destroy.call(this),this.canvas=null,this.ctx=null},load:function(e,t,n){this.loadElements(e,t,n),this._invalidate()},_invalidate:function(){this.ctx&&(this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.renderTo(this.ctx))}}),jn.extend(rr.prototype,"childNodes"),or=qt.extend({init:function(){this.shapes=[]},_add:function(e,t){this.shapes.push({bbox:t,shape:e}),e._quadNode=this},pointShapes:function(e){var t,n=this.shapes,i=n.length,r=[];for(t=0;t<i;t++)n[t].bbox.containsPoint(e)&&r.push(n[t].shape);return r},insert:function(e,t){this._add(e,t)},remove:function(e){var t,n=this.shapes,i=n.length;for(t=0;t<i;t++)if(n[t].shape===e){n.splice(t,1);break}}}),ar=or.extend({init:function(e){or.fn.init.call(this),this.children=[],this.rect=e},inBounds:function(e){var t=this.rect,n=t.bottomRight(),i=e.bottomRight(),r=t.origin.x<=e.origin.x&&t.origin.y<=e.origin.y&&i.x<=n.x&&i.y<=n.y;return r},pointShapes:function(e){var n,i=this.children,r=i.length,o=or.fn.pointShapes.call(this,e);for(n=0;n<r;n++)t(o,i[n].pointShapes(e));return o},insert:function(e,t){var n,i=this.children,r=!1;if(this.inBounds(t)){if(this.shapes.length<4)this._add(e,t);else{for(i.length||this._initChildren(),n=0;n<i.length;n++)if(i[n].insert(e,t)){r=!0;break}r||this._add(e,t)}r=!0}return r},_initChildren:function(){var e=this,t=e.rect,n=e.children,i=t.center(),r=t.width()/2,o=t.height()/2;n.push(new ar(new hn([t.origin.x,t.origin.y],[r,o])),new ar(new hn([i.x,t.origin.y],[r,o])),new ar(new hn([t.origin.x,i.y],[r,o])),new ar(new hn([i.x,i.y],[r,o])))}}),sr=3e3,lr=1e4,dr=75,ur=qt.extend({init:function(){this.initRoots()},initRoots:function(){this.rootMap={},this.root=new or,this.rootElements=[]},clear:function(){var e,t=this,n=this.rootElements;for(e=0;e<n.length;e++)t.remove(n[e]);this.initRoots()},pointShape:function(e){var t,n=(this.rootMap[Math.floor(e.x/sr)]||{})[Math.floor(e.y/sr)],i=this.root.pointShapes(e);for(n&&(i=i.concat(n.pointShapes(e))),this.assignZindex(i),i.sort(Re),t=0;t<i.length;t++)if(i[t].containsPoint(e))return i[t]},assignZindex:function(e){var t,n,i,r,o,a=this;for(t=0;t<e.length;t++){for(n=e[t],i=0,r=Math.pow(lr,dr),o=[];n;)o.push(n),n=n.parent;for(;o.length;)n=o.pop(),i+=((n.parent?n.parent.children:a.rootElements).indexOf(n)+1)*r,r/=lr;e[t]._zIndex=i}},optionsChange:function(e){"transform"!==e.field&&"stroke.width"!==e.field||this.bboxChange(e.element)},geometryChange:function(e){this.bboxChange(e.element)},bboxChange:function(e){var t,n=this;if("Group"===e.nodeType)for(t=0;t<e.children.length;t++)n.bboxChange(e.children[t]);else e._quadNode&&e._quadNode.remove(e),this._insertShape(e)},add:function(e){var n=Array.isArray(e)?e.slice(0):[e];t(this.rootElements,n),this._insert(n)},childrenChange:function(e){var t,n=this;if("remove"===e.action)for(t=0;t<e.items.length;t++)n.remove(e.items[t]);else this._insert(Array.prototype.slice.call(e.items,0));
},_insert:function(e){for(var n,i=this;e.length>0;)n=e.pop(),n.addObserver(i),"Group"===n.nodeType?t(e,n.children):i._insertShape(n)},_insertShape:function(e){var t,n,i,r,o=e.bbox();o&&(t=this.getSectors(o),n=t[0][0],i=t[1][0],this.inRoot(t)?this.root.insert(e,o):(r=this.rootMap,r[n]||(r[n]={}),r[n][i]||(r[n][i]=new ar(new hn([n*sr,i*sr],[sr,sr]))),r[n][i].insert(e,o)))},remove:function(e){var t,n,i=this;if(e.removeObserver(this),"Group"===e.nodeType)for(t=e.children,n=0;n<t.length;n++)i.remove(t[n]);else e._quadNode&&(e._quadNode.remove(e),delete e._quadNode)},inRoot:function(e){return e[0].length>1||e[1].length>1},getSectors:function(e){var t,n,i=e.bottomRight(),r=Math.floor(i.x/sr),o=Math.floor(i.y/sr),a=[[],[]];for(t=Math.floor(e.origin.x/sr);t<=r;t++)a[0].push(t);for(n=Math.floor(e.origin.y/sr);n<=o;n++)a[1].push(n);return a}}),cr=qt.extend({init:function(e){e.bind("mouseenter",this._mouseenter.bind(this)),e.bind("mouseleave",this._mouseleave.bind(this)),this.element=e.element},clear:function(){this._resetCursor()},destroy:function(){this._resetCursor(),delete this.element},_mouseenter:function(e){var t=this._shapeCursor(e);t?(this._current||(this._defaultCursor=this._getCursor()),this._setCursor(t)):this._resetCursor()},_mouseleave:function(){this._resetCursor()},_shapeCursor:function(e){for(var t=e.element;t&&!i(t.options.cursor);)t=t.parent;if(t)return t.options.cursor},_getCursor:function(){if(this.element)return this.element.style.cursor},_setCursor:function(e){this.element&&(this.element.style.cursor=e,this._current=e)},_resetCursor:function(){this._current&&(this._setCursor(this._defaultCursor||""),delete this._current)}}),hr=gi.extend({init:function(e,t){var n,i;gi.fn.init.call(this,e,t),this.element.innerHTML=this._template(this),n=this.element.firstElementChild,i=y(e),n.width=i.width,n.height=i.height,this._rootElement=n,this._root=new rr(n),this._mouseTrackHandler=this._trackMouse.bind(this),_(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},destroy:function(){gi.fn.destroy.call(this),this._root&&(this._root.destroy(),this._root=null),this._searchTree&&(this._searchTree.clear(),delete this._searchTree),this._cursor&&(this._cursor.destroy(),delete this._cursor),x(this.element,{click:this._mouseTrackHandler,mousemove:this._mouseTrackHandler})},draw:function(e){gi.fn.draw.call(this,e),this._root.load([e],void 0,this.options.cors),this._searchTree&&this._searchTree.add([e])},clear:function(){gi.fn.clear.call(this),this._root.clear(),this._searchTree&&this._searchTree.clear(),this._cursor&&this._cursor.clear()},eventTarget:function(e){var t,n;if(this._searchTree)return t=this._surfacePoint(e),n=this._searchTree.pointShape(t)},image:function(){var e,t,n=this,i=n._root,r=n._rootElement,o=[];return i.traverse(function(e){e.loading&&o.push(e.loading)}),e=Kt(),t=function(){i._invalidate();try{var t=r.toDataURL();e.resolve(t)}catch(n){e.reject(n)}},Yt(o).then(t,t),e},suspendTracking:function(){gi.fn.suspendTracking.call(this),this._searchTree&&(this._searchTree.clear(),delete this._searchTree)},resumeTracking:function(){var e,t,n;if(gi.fn.resumeTracking.call(this),!this._searchTree){for(this._searchTree=new ur,e=this._root.childNodes,t=[],n=0;n<e.length;n++)t.push(e[n].srcElement);this._searchTree.add(t)}},_resize:function(){this._rootElement.width=this._size.width,this._rootElement.height=this._size.height,this._root.invalidate()},_template:function(){return"<canvas style='width: 100%; height: 100%;'></canvas>"},_enableTracking:function(){this._searchTree=new ur,this._cursor=new cr(this),gi.fn._enableTracking.call(this)},_trackMouse:function(e){var t,n;this._suspendedTracking||(t=this.eventTarget(e),"click"!==e.type?(n=this._currentShape,n&&n!==t&&this.trigger("mouseleave",{element:n,originalEvent:e,type:"mouseleave"}),t&&n!==t&&this.trigger("mouseenter",{element:t,originalEvent:e,type:"mouseenter"}),this.trigger("mousemove",{element:t,originalEvent:e,type:"mousemove"}),this._currentShape=t):t&&this.trigger("click",{element:t,originalEvent:e,type:"click"}))}}),hr.prototype.type="canvas","undefined"!=typeof document&&document.createElement("canvas").getContext&&(gi.support.canvas=!0,fi.current.register("canvas",hr,20)),pr=tr.extend({renderTo:function(e){e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),this.renderPoints(e,this.srcElement),this.setLineDash(e),this.setLineCap(e),this.setLineJoin(e),this.setFill(e),this.setStroke(e),e.restore()},setFill:function(e){var t=this.srcElement.options.fill,n=!1;return t&&("Gradient"===t.nodeType?(this.setGradientFill(e,t),n=!0):u(t.color)||(e.fillStyle=t.color,e.save(),this.globalAlpha(e,t.opacity),e.fill(),e.restore(),n=!0)),n},setGradientFill:function(e,t){var n,i,r,o,a=this.srcElement.rawBBox();t instanceof ti?(i=t.start(),r=t.end(),n=e.createLinearGradient(i.x,i.y,r.x,r.y)):t instanceof ni&&(o=t.center(),n=e.createRadialGradient(o.x,o.y,0,o.x,o.y,t.radius())),Me(n,t.stops),e.save(),t.userSpace()||e.transform(a.width(),0,0,a.height(),a.origin.x,a.origin.y),e.fillStyle=n,e.fill(),e.restore()},setStroke:function(e){var t=this.srcElement.options.stroke;if(t&&!u(t.color)&&t.width>0)return e.strokeStyle=t.color,e.lineWidth=v(t.width,1),e.save(),this.globalAlpha(e,t.opacity),e.stroke(),e.restore(),!0},dashType:function(){var e=this.srcElement.options.stroke;if(e&&e.dashType)return e.dashType.toLowerCase()},setLineDash:function(e){var t,n=this.dashType();n&&n!==Oi&&(t=Li[n],e.setLineDash?e.setLineDash(t):(e.mozDash=t,e.webkitLineDash=t))},setLineCap:function(e){var t=this.dashType(),n=this.srcElement.options.stroke;t&&t!==Oi?e.lineCap=Vi:n&&n.lineCap&&(e.lineCap=n.lineCap)},setLineJoin:function(e){var t=this.srcElement.options.stroke;t&&t.lineJoin&&(e.lineJoin=t.lineJoin)},renderPoints:function(e,t){Ie(e,t)}}),er.Path=pr,fr=pr.extend({renderPoints:function(e){var t=this.srcElement.toPath();Ie(e,t)}}),er.Arc=fr,mr=pr.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.center,i=t.radius;e.arc(n.x,n.y,i,0,2*Math.PI)}}),er.Circle=mr,gr=pr.extend({renderPoints:function(e){var t=this.srcElement.geometry(),n=t.origin,i=t.size;e.rect(n.x,n.y,i.width,i.height)}}),er.Rect=gr,vr=pr.extend({init:function(e,t){pr.fn.init.call(this,e),this.onLoad=this.onLoad.bind(this),this.onError=this.onError.bind(this),this.loading=Kt();var n=this.img=new Image;t&&!/^data:/i.test(e.src())&&(n.crossOrigin=t),n.src=e.src(),n.complete?this.onLoad():(n.onload=this.onLoad,n.onerror=this.onError)},renderTo:function(e){"resolved"===this.loading.state()&&(e.save(),this.setTransform(e),this.setClip(e),this.drawImage(e),e.restore())},optionsChange:function(e){"src"===e.field?(this.loading=Kt(),this.img.src=this.srcElement.src()):pr.fn.optionsChange.call(this,e)},onLoad:function(){this.loading.resolve(),this.invalidate()},onError:function(){this.loading.reject(Error("Unable to load image '"+this.img.src+"'. Check for connectivity and verify CORS headers."))},drawImage:function(e){var t=this.srcElement.rect(),n=t.topLeft();e.drawImage(this.img,n.x,n.y,t.width(),t.height())}}),er.Image=vr,_r=pr.extend({renderTo:function(e){var t=this.srcElement,n=t.position(),i=t.measure();e.save(),this.setTransform(e),this.setClip(e),this.setOpacity(e),e.beginPath(),e.font=t.options.font,e.textAlign="left",this.setFill(e)&&e.fillText(t.content(),n.x,n.y+i.baseline),this.setStroke(e)&&(this.setLineDash(e),e.strokeText(t.content(),n.x,n.y+i.baseline)),e.restore()}}),er.Text=_r,br=pr.extend({renderPoints:function(e){var t,n=this.srcElement.paths;for(t=0;t<n.length;t++)Ie(e,n[t])}}),er.MultiPath=br,kr={Surface:hr,RootNode:rr,Node:tr,GroupNode:nr,ArcNode:fr,CircleNode:mr,RectNode:gr,ImageNode:vr,TextNode:_r,PathNode:pr,MultiPathNode:br},wr=$t,yr="KENDO-PSEUDO-ELEMENT",xr={},Cr={},Cr._root=Cr,Tr=wr.msie||wr.edge,Sr=Un.extend({init:function(e,t,n){Un.fn.init.call(this,e,t.getOrigin(),n),this._pdfRect=t},rect:function(){return this._pdfRect},rawBBox:function(){return this._pdfRect}}),Dr="undefined"!=typeof Element&&Element.prototype&&function(e){return e.matches?function(e,t){return e.matches(t)}:e.webkitMatchesSelector?function(e,t){return e.webkitMatchesSelector(t)}:e.mozMatchesSelector?function(e,t){return e.mozMatchesSelector(t)}:e.msMatchesSelector?function(e,t){return e.msMatchesSelector(t)}:function(e){return[].indexOf.call(document.querySelectorAll(e),this)!==-1}}(Element.prototype),Fr=function(e){return e?function t(n){var i,r,o,a,s=n.cloneNode(!1);if(1==n.nodeType){i=e(n),r=e(s),a=i.data();for(o in a)r.data(o,a[o]);for(/^canvas$/i.test(n.tagName)?s.getContext("2d").drawImage(n,0,0):/^(?:input|select|textarea|option)$/i.test(n.tagName)&&(s.removeAttribute("id"),s.removeAttribute("name"),s.value=n.value,s.checked=n.checked,s.selected=n.selected),o=n.firstChild;o;o=o.nextSibling)s.appendChild(t(o))}return s}:function(e){var t,n=function r(e){var t,n=e.cloneNode(!1);for(e._kendoExportVisual&&(n._kendoExportVisual=e._kendoExportVisual),t=e.firstChild;t;t=t.nextSibling)n.appendChild(r(t));return n}(e),i=e.querySelectorAll("canvas");return i.length&&Ne(n.querySelectorAll("canvas")).forEach(function(e,t){e.getContext("2d").drawImage(i[t],0,0)}),t=e.querySelectorAll("input, select, textarea, option"),Ne(n.querySelectorAll("input, select, textarea, option")).forEach(function(e,n){e.removeAttribute("id"),e.removeAttribute("name"),e.value=t[n].value,e.checked=t[n].checked,e.selected=t[n].selected}),n}}("undefined"!=typeof window&&window.kendo&&window.kendo.jQuery),We.getFontFaces=Ue,We.drawText=function(e){var t=new Gn;return Cr._clipbox=!1,Cr._matrix=dn.unit(),Cr._stackingContext={element:e,group:t},tt(e,at(e),t),3==e.firstChild.nodeType?Pt(e,e.firstChild,t):Ft(e,t),nt(),t},Er=function(){function e(e){function p(){var t=a.exec(e);t&&(e=e.substr(t[1].length))}function f(t){p();var n=t.exec(e);if(n)return e=e.substr(n[1].length),n[1]}function m(){var t,r,o,a=kendo.parseColor(e,!0);if(a)return o=/^#[0-9a-f]+/i.exec(e)||/^rgba?\(.*?\)/i.exec(e)||/^..*?\b/.exec(e),e=e.substr(o[0].length),a=a.toRGB(),(t=f(i))||(r=f(n)),{color:a,length:t,percent:r}}function g(t){var i,a,u,c,h,p,g=[],v=!1;if(f(s)){for(i=f(o),i?(i=gt(i),f(d)):(a=f(r),"to"==a?a=f(r):a&&/^-/.test(t)&&(v=!0),u=f(r),f(d)),/-moz-/.test(t)&&null==i&&null==a&&(c=f(n),h=f(n),v=!0,"0%"==c?a="left":"100%"==c&&(a="right"),"0%"==h?u="top":"100%"==h&&(u="bottom"),f(d));e&&!f(l)&&(p=m());)g.push(p),f(d);return{type:"linear",angle:i,to:a&&u?a+" "+u:a?a:u?u:null,stops:g,reverse:v}}}function v(){if(f(s)){var e=f(c);return e=e.replace(/^['"]+|["']+$/g,""),f(l),{type:"url",url:e}}}var _,b=e;return qe(h,b)?h[b]:((_=f(t))?_=g(_):(_=f(u))&&(_=v()),h[b]=_||{type:"none"})}var t=/^((-webkit-|-moz-|-o-|-ms-)?linear-gradient\s*)\(/,n=/^([-0-9.]+%)/,i=/^([-0-9.]+px)/,r=/^(left|right|top|bottom|to|center)\W/,o=/^([-0-9.]+(deg|grad|rad|turn))/,a=/^(\s+)/,s=/^(\()/,l=/^(\))/,d=/^(,)/,u=/^(url)\(/,c=/^(.*?)\)/,h={},p={};return function(t){return qe(p,t)?p[t]:p[t]=Ar(t).map(e)}}(),Ar=function(){var e={};return function(t,n){function i(e){return c=e.exec(t.substr(l))}function r(e){return e.replace(/^\s+|\s+$/g,"")}var o,a,s,l,d,u,c;if(n||(n=/^\s*,\s*/),o=t+n,qe(e,o))return e[o];for(a=[],s=0,l=0,d=0,u=!1;l<t.length;)!u&&i(/^[\(\[\{]/)?(d++,l++):!u&&i(/^[\)\]\}]/)?(d--,l++):!u&&i(/^[\"\']/)?(u=c[0],l++):"'"==u&&i(/^\\\'/)?l+=2:'"'==u&&i(/^\\\"/)?l+=2:"'"==u&&i(/^\'/)?(u=!1,l++):'"'==u&&i(/^\"/)?(u=!1,l++):i(n)?(!u&&!d&&l>s&&(a.push(r(t.substring(s,l))),s=l+c[0].length),l+=c[0].length):l++;return s<l&&a.push(r(t.substring(s,l))),e[o]=a}}(),Ir=function(e){return function(t){var n,i=e[t];return i||((n=/url\((['"]?)([^'")]*?)\1\)\s+format\((['"]?)truetype\3\)/.exec(t))?i=e[t]=n[2]:(n=/url\((['"]?)([^'")]*?\.ttf)\1\)/.exec(t))&&(i=e[t]=n[2])),i}}(Object.create?Object.create(null):{}),Rr=function(e){return function(t){var n=e[t];return null==n&&(n=e[t]=jt.measureText("Mapq",{font:t}).height),n}}(Object.create?Object.create(null):{}),Mr={svg:Zi,canvas:kr,util:an,PathParser:pi,Surface:gi,BaseNode:vi,SurfaceFactory:fi,OptionsStore:ln,exportImage:ze,exportSVG:He,QuadNode:ar,ShapesQuadTree:ur,ObserversMixin:Qt,Element:fn,Circle:yn,Arc:Ln,Path:Bn,MultiPath:On,Text:Un,Image:qn,Group:Gn,Layout:Qn,Rect:Xn,align:ne,vAlign:ie,stack:ae,vStack:se,wrap:ue,vWrap:ce,fit:he,LinearGradient:ti,RadialGradient:ni,GradientStop:Zn,Gradient:ei,Animation:oi,AnimationFactory:ai,drawDOM:We},kendo.deepExtend(kendo,{drawing:Mr,geometry:Ji}),kendo.drawing.Segment=kendo.geometry.Segment,kendo.dataviz.drawing=kendo.drawing,kendo.dataviz.geometry=kendo.geometry,kendo.drawing.util.measureText=kendo.util.measureText,kendo.drawing.util.objectKey=kendo.util.objectKey,kendo.drawing.Color=kendo.Color,kendo.util.encodeBase64=kendo.drawing.util.encodeBase64}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.popup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t,n){return!(!t||!n)&&(t===n||e.contains(t,n))}var i,r,o,a,s=window.kendo,l=s.ui,d=l.Widget,u=s.Class,c=s.support,h=s.getOffset,p=s._outerWidth,f=s._outerHeight,m="open",g="close",v="deactivate",_="activate",b="center",k="left",w="right",y="top",x="bottom",C="absolute",T="hidden",S="body",D="location",F="position",E="visible",A="effects",I="k-state-active",R="k-state-border",M=/k-state-border-(\w+)/,z=".k-picker-wrap, .k-dropdown-wrap, .k-link",H="down",N=e(document.documentElement),B=e.proxy,P=e(window),L="scroll",O=c.transitions.css,V=O+"transform",W=e.extend,U=".kendoPopup",q=["font-size","font-family","font-stretch","font-style","font-weight","line-height"],j=d.extend({init:function(t,n){var i,r=this;n=n||{},n.isRtl&&(n.origin=n.origin||x+" "+w,n.position=n.position||y+" "+w),d.fn.init.call(r,t,n),t=r.element,n=r.options,r.collisions=n.collision?n.collision.split(" "):[],r.downEvent=s.applyEventMap(H,s.guid()),1===r.collisions.length&&r.collisions.push(r.collisions[0]),i=e(r.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),n.appendTo=e(e(n.appendTo)[0]||i[0]||document.body),r.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!n.isRtl).css({position:C}).appendTo(n.appendTo).attr("aria-hidden",!0).on("mouseenter"+U,function(){r._hovered=!0}).on("wheel"+U,function(t){var n=e(t.target).find(".k-list"),i=n.parent();n.length&&n.is(":visible")&&(0===i.scrollTop()&&t.originalEvent.deltaY<0||i.scrollTop()===i.prop("scrollHeight")-i.prop("offsetHeight")&&t.originalEvent.deltaY>0)&&t.preventDefault()}).on("mouseleave"+U,function(){r._hovered=!1}),r.wrapper=e(),n.animation===!1&&(n.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),W(n.animation.open,{complete:function(){r.wrapper.css({overflow:E}),r._activated=!0,r._trigger(_)}}),W(n.animation.close,{complete:function(){r._animationClose()}}),r._mousedownProxy=function(e){r._mousedown(e)},r._resizeProxy=c.mobileOS.android?function(e){setTimeout(function(){r._resize(e)},600)}:function(e){r._resize(e)},n.toggleTarget&&e(n.toggleTarget).on(n.toggleEvent+U,e.proxy(r.toggle,r))},events:[m,_,g,v],options:{name:"Popup",toggleEvent:"click",origin:x+" "+k,position:y+" "+k,anchor:S,appendTo:null,collision:"flip fit",viewport:window,copyAnchorStyles:!0,autosize:!1,modal:!1,adjustSize:{width:0,height:0},animation:{open:{effects:"slideIn:down",transition:!0,duration:200},close:{duration:100,hide:!0}}},_animationClose:function(){var e=this,t=e.wrapper.data(D);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=S&&e._hideDirClass(),e._closing=!1,e._trigger(v)},destroy:function(){var t,n=this,i=n.options,r=n.element.off(U);d.fn.destroy.call(n),i.toggleTarget&&e(i.toggleTarget).off(U),i.modal||(N.unbind(n.downEvent,n._mousedownProxy),n._toggleResize(!1)),s.destroy(n.element.children()),r.removeData(),i.appendTo[0]===document.body&&(t=r.parent(".k-animation-container"),t[0]?t.remove():r.remove())},open:function(t,n){var i,r,o=this,a={isFixed:!isNaN(parseInt(n,10)),x:t,y:n},l=o.element,d=o.options,u=e(d.anchor),h=l[0]&&l.hasClass("km-widget");if(!o.visible()){if(d.copyAnchorStyles&&(h&&"font-size"==q[0]&&q.shift(),l.css(s.getComputedStyles(u[0],q))),l.data("animating")||o._trigger(m))return;o._activated=!1,d.modal||(N.unbind(o.downEvent,o._mousedownProxy).bind(o.downEvent,o._mousedownProxy),o._toggleResize(!1),o._toggleResize(!0)),o.wrapper=r=s.wrap(l,d.autosize).css({overflow:T,display:"block",position:C}).attr("aria-hidden",!1),c.mobileOS.android&&r.css(V,"translatez(0)"),r.css(F),e(d.appendTo)[0]==document.body&&r.css(y,"-10000px"),o.flipped=o._position(a),i=o._openAnimation(),d.anchor!=S&&o._showDirClass(i),l.data(A,i.effects).kendoStop(!0).kendoAnimate(i).attr("aria-hidden",!1)}},_location:function(t){var n,i,r=this,o=r.element,a=r.options,l=e(a.anchor),d=o[0]&&o.hasClass("km-widget");return a.copyAnchorStyles&&(d&&"font-size"==q[0]&&q.shift(),o.css(s.getComputedStyles(l[0],q))),r.wrapper=n=s.wrap(o,a.autosize).css({overflow:T,display:"block",position:C}),c.mobileOS.android&&n.css(V,"translatez(0)"),n.css(F),e(a.appendTo)[0]==document.body&&n.css(y,"-10000px"),r._position(t||{}),i=n.offset(),{width:s._outerWidth(n),height:s._outerHeight(n),left:i.left,top:i.top}},_openAnimation:function(){var e=W(!0,{},this.options.animation.open);return e.effects=s.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),n=((t.attr("class")||"").match(M)||["","down"])[1],i=R+"-"+n;t.removeClass(i).children(z).removeClass(I).removeClass(i),this.element.removeClass(R+"-"+s.directions[n].reverse)},_showDirClass:function(t){var n=t.effects.slideIn?t.effects.slideIn.direction:"down",i=R+"-"+n;e(this.options.anchor).addClass(i).children(z).addClass(I).addClass(i),this.element.addClass(R+"-"+s.directions[n].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){var e=this;e[e.visible()?g:m]()},visible:function(){return this.element.is(":"+E)},close:function(n){var i,r,o,a,l=this,d=l.options;if(l.visible()){if(i=l.wrapper[0]?l.wrapper:s.wrap(l.element).hide(),l._toggleResize(!1),l._closing||l._trigger(g))return l._toggleResize(!0),t;l.element.find(".k-popup").each(function(){var t=e(this),i=t.data("kendoPopup");i&&i.close(n)}),N.unbind(l.downEvent,l._mousedownProxy),n?r={hide:!0,effects:{}}:(r=W(!0,{},d.animation.close),o=l.element.data(A),a=r.effects,!a&&!s.size(a)&&o&&s.size(o)&&(r.effects=o,r.reverse=!0),l._closing=!0),l.element.kendoStop(!0).attr("aria-hidden",!0),i.css({overflow:T}).attr("aria-hidden",!0),l.element.kendoAnimate(r),n&&l._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;c.resize.indexOf(e.type)!==-1?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout(function(){t._position(),t._resizeTimeout=null},50)):(!t._hovered||t._activated&&t.element.hasClass("k-list-container"))&&t.close()},_toggleResize:function(e){var t=e?"on":"off",n=c.resize;c.mobileOS.ios||c.mobileOS.android||(n+=" "+L),this._scrollableParents()[t](L,this._resizeProxy),P[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,r=i.element[0],o=i.options,a=e(o.anchor)[0],l=o.toggleTarget,d=s.eventTarget(t),u=e(d).closest(".k-popup"),c=u.parent().parent(".km-shim").length;u=u[0],!c&&u&&u!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(n(r,d)||n(a,d)||l&&n(e(l)[0],d)||i.close())},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i,r,o,a){var s=0;return a=a||t,o!==r&&o!==b&&r!==b&&(e+a>i&&(s+=-(n+t)),e+s<0&&(s+=n+t)),s},_scrollableParents:function(){return e(this.options.anchor).parentsUntil("body").filter(function(e,t){return s.isScrollable(t)})},_position:function(t){var n,i,r,o,a,l,d,u,m,g,v,_,b,k,w,y,x,T=this,S=T.element,E=T.wrapper,A=T.options,I=e(A.viewport),R=c.zoomLevel(),M=!!(I[0]==window&&window.innerWidth&&R<=1.02),z=e(A.anchor),H=A.origin.toLowerCase().split(" "),N=A.position.toLowerCase().split(" "),B=T.collisions,P=10002,L=0,O=document.documentElement;if(a=A.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:I.offset(),M?(l=window.innerWidth,d=window.innerHeight):(l=I.width(),d=I.height()),M&&O.scrollHeight-O.clientHeight>0&&(u=A.isRtl?-1:1,l-=u*s.support.scrollbar()),n=z.parents().filter(E.siblings()),n[0])if(r=Math.max(+n.css("zIndex"),0))P=r+10;else for(i=z.parentsUntil(n),o=i.length;L<o;L++)r=+e(i[L]).css("zIndex"),r&&P<r&&(P=r+10);return E.css("zIndex",P),E.css(t&&t.isFixed?{left:t.x,top:t.y}:T._align(H,N)),m=h(E,F,z[0]===E.offsetParent()[0]),g=h(E),v=z.offsetParent().parent(".k-animation-container,.k-popup,.k-group"),v.length&&(m=h(E,F,!0),g=h(E)),g.top-=a.top,g.left-=a.left,T.wrapper.data(D)||E.data(D,W({},m)),_=W({},g),b=W({},m),k=A.adjustSize,"fit"===B[0]&&(b.top+=T._fit(_.top,f(E)+k.height,d/R)),"fit"===B[1]&&(b.left+=T._fit(_.left,p(E)+k.width,l/R)),w=W({},b),y=f(S),x=f(E),!E.height()&&y&&(x+=y),"flip"===B[0]&&(b.top+=T._flip(_.top,y,f(z),d/R,H[0],N[0],x)),"flip"===B[1]&&(b.left+=T._flip(_.left,p(S),p(z),l/R,H[1],N[1],p(E))),S.css(F,C),E.css(b),b.left!=w.left||b.top!=w.top},_align:function(t,n){var i,r=this,o=r.wrapper,a=e(r.options.anchor),s=t[0],l=t[1],d=n[0],u=n[1],c=h(a),m=e(r.options.appendTo),g=p(o),v=f(o)||f(o.children().first()),_=p(a),k=f(a),y=c.top,C=c.left,T=Math.round;return m[0]!=document.body&&(i=h(m),y-=i.top,C-=i.left),s===x&&(y+=k),s===b&&(y+=T(k/2)),d===x&&(y-=v),d===b&&(y-=T(v/2)),l===w&&(C+=_),l===b&&(C+=T(_/2)),u===w&&(C-=g),u===b&&(C-=T(g/2)),{top:y,left:C}}});l.plugin(j),i=s.support.stableSort,r="kendoTabKeyTrap",o="a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]",a=u.extend({init:function(t){this.element=e(t),this.element.autoApplyNS(r)},trap:function(){this.element.on("keydown",B(this._keepInTrap,this))},removeTrap:function(){this.element.kendoDestroy(r)},destroy:function(){this.element.kendoDestroy(r),this.element=t},shouldTrap:function(){return!0},_keepInTrap:function(e){var t,n,i;9===e.which&&this.shouldTrap()&&!e.isDefaultPrevented()&&(t=this._focusableElements(),n=this._sortFocusableElements(t),i=this._nextFocusable(e,n),this._focus(i),e.preventDefault())},_focusableElements:function(){var t=this.element.find(o).filter(function(t,n){return n.tabIndex>=0&&e(n).is(":visible")&&!e(n).is(":disabled")});return this.element.is("[tabindex]")&&t.push(this.element[0]),t},_sortFocusableElements:function(e){var t,n;return i?t=e.sort(function(e,t){return e.tabIndex-t.tabIndex}):(n="__k_index",e.each(function(e,t){t.setAttribute(n,e)}),t=e.sort(function(e,t){return e.tabIndex===t.tabIndex?parseInt(e.getAttribute(n),10)-parseInt(t.getAttribute(n),10):e.tabIndex-t.tabIndex}),e.removeAttr(n)),t},_nextFocusable:function(e,t){var n=t.length,i=t.index(e.target);return t.get((i+(e.shiftKey?-1:1))%n)},_focus:function(e){return"IFRAME"==e.nodeName?(e.contentWindow.document.body.focus(),t):(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length),t)},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}}),l.Popup.TabKeyTrap=a}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/surface-tooltip.min",["kendo.popup.min","drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=".kendo",n=window.kendo,i=n.deepExtend,r=n.drawing.util,o=r.defined,a=r.limitValue,s=r.eventCoordinates,l=n._outerWidth,d=n._outerHeight,u=e.proxy,c='<div class="k-tooltip"><div class="k-tooltip-content"></div></div>',h='<div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div>',p=n.Class.extend({init:function(t,n){this.element=e(c),this.content=this.element.children(".k-tooltip-content"),n=n||{},this.options=i({},this.options,this._tooltipOptions(n)),this.popupOptions={appendTo:n.appendTo,animation:n.animation,copyAnchorStyles:!1,collision:"fit fit"},this._openPopupHandler=e.proxy(this._openPopup,this),this.surface=t,this._bindEvents()},options:{position:"top",showOn:"mouseenter",offset:7,autoHide:!0,hideDelay:0,showAfter:100},_bindEvents:function(){this._showHandler=u(this._showEvent,this),this._surfaceLeaveHandler=u(this._surfaceLeave,this),this._mouseleaveHandler=u(this._mouseleave,this),this._mousemoveHandler=u(this._mousemove,this),this.surface.bind("click",this._showHandler),this.surface.bind("mouseenter",this._showHandler),this.surface.bind("mouseleave",this._mouseleaveHandler),this.surface.bind("mousemove",this._mousemoveHandler),this.surface.element.on("mouseleave"+t,this._surfaceLeaveHandler),this.element.on("click"+t,".k-tooltip-button",u(this._hideClick,this))},getPopup:function(){return this.popup||(this.popup=new n.ui.Popup(this.element,this.popupOptions)),this.popup},destroy:function(){var e=this.popup;this.surface.unbind("click",this._showHandler),this.surface.unbind("mouseenter",this._showHandler),this.surface.unbind("mouseleave",this._mouseleaveHandler),this.surface.unbind("mousemove",this._mousemoveHandler),this.surface.element.off("mouseleave"+t,this._surfaceLeaveHandler),this.element.off("click"+t),e&&(e.destroy(),delete this.popup),delete this.popupOptions,clearTimeout(this._timeout),delete this.element,delete this.content,delete this.surface},_tooltipOptions:function(e){return e=e||{},{position:e.position,showOn:e.showOn,offset:e.offset,autoHide:e.autoHide,width:e.width,height:e.height,content:e.content,shared:e.shared,hideDelay:e.hideDelay,showAfter:e.showAfter}},_tooltipShape:function(e){for(;e&&!e.options.tooltip;)e=e.parent;return e},_updateContent:function(e,t,i){var r=i.content;if(n.isFunction(r)&&(r=r({element:t,target:e})),r)return this.content.html(r),!0},_position:function(e,t,n,i){var r,o=t.position,l=t.offset||0,d=this.surface,u=d._instance._elementOffset(),c=d.getSize(),h=d._instance._offset,p=e.bbox(),f=n.width,m=n.height,g=0,v=0;return p.origin.translate(u.left,u.top),h&&p.origin.translate(-h.x,-h.y),"cursor"==o&&i?(r=s(i),g=r.x-f/2,v=r.y-m-l):"left"==o?(g=p.origin.x-f-l,v=p.center().y-m/2):"right"==o?(g=p.bottomRight().x+l,v=p.center().y-m/2):"bottom"==o?(g=p.center().x-f/2,v=p.bottomRight().y+l):(g=p.center().x-f/2,v=p.origin.y-m-l),{left:a(g,u.left,u.left+c.width),top:a(v,u.top,u.top+c.height)}},show:function(e,t){this._show(e,e,i({},this.options,this._tooltipOptions(e.options.tooltip),t))},hide:function(){var e=this.popup,t=this._current;delete this._current,clearTimeout(this._showTimeout),e&&e.visible()&&t&&!this.surface.trigger("tooltipClose",{element:t.shape,target:t.target,popup:e})&&e.close()},_hideClick:function(e){e.preventDefault(),this.hide()},_show:function(e,t,n,i,r){var o,a,s=this._current;clearTimeout(this._timeout),s&&(s.shape===t&&n.shared||s.target===e)||(clearTimeout(this._showTimeout),o=this.getPopup(),!this.surface.trigger("tooltipOpen",{element:t,target:e,popup:o})&&this._updateContent(e,t,n)&&(this._autoHide(n),a=this._measure(n),o.visible()&&o.close(!0),this._current={options:n,elementSize:a,shape:t,target:e,position:this._position(n.shared?t:e,n,a,i)},r?this._showTimeout=setTimeout(this._openPopupHandler,n.showAfter||0):this._openPopup()))},_openPopup:function(){var e=this._current,t=e.position;this.getPopup().open(t.left,t.top)},_autoHide:function(t){t.autoHide&&this._closeButton&&(this.element.removeClass("k-tooltip-closable"),this._closeButton.remove(),delete this._closeButton),t.autoHide||this._closeButton||(this.element.addClass("k-tooltip-closable"),this._closeButton=e(h).prependTo(this.element))},_showEvent:function(e){var t,n=this._tooltipShape(e.element);n&&(t=i({},this.options,this._tooltipOptions(n.options.tooltip)),t&&t.showOn==e.type&&this._show(e.element,n,t,e.originalEvent,!0))},_measure:function(e){var t,n,i,r=this.getPopup();return this.element.css({width:"auto",height:"auto"}),i=r.visible(),i||r.wrapper.show(),this.element.css({width:o(e.width)?e.width:"auto",height:o(e.height)?e.height:"auto"}),t=l(this.element),n=d(this.element),i||r.wrapper.hide(),{width:t,height:n}},_mouseleave:function(e){var t,n;this.popup&&!this._popupRelatedTarget(e.originalEvent)&&(t=this,n=t._current,n&&n.options.autoHide&&(t._timeout=setTimeout(function(){clearTimeout(t._showTimeout),t.hide()},n.options.hideDelay||0)))},_mousemove:function(e){var t,n,i=this._current;i&&e.element&&(t=i.options,"cursor"==t.position&&(n=this._position(e.element,t,i.elementSize,e.originalEvent),i.position=n,this.getPopup().wrapper.css({left:n.left,top:n.top})))},_surfaceLeave:function(e){this.popup&&!this._popupRelatedTarget(e)&&(clearTimeout(this._showTimeout),this.hide())},_popupRelatedTarget:function(t){return t.relatedTarget&&e(t.relatedTarget).closest(this.popup.wrapper).length}});n.drawing.SurfaceTooltip=p}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/surface.min",["drawing/kendo-drawing.min","drawing/surface-tooltip.min"],e)}(function(){!function(e){function t(e){this._instance.translate(e)}var n,i=window.kendo,r=i.drawing,o=r.Surface,a=i.ui.Widget,s=i.deepExtend,l=e.proxy;i.support.svg=o.support.svg,i.support.canvas=o.support.canvas,n=a.extend({init:function(e,n){a.fn.init.call(this,e,{}),this.options=s({},this.options,n),this._instance=o.create(this.element[0],n),this._instance.translate&&(this.translate=t),this._triggerInstanceHandler=l(this._triggerInstanceEvent,this),this._bindHandler("click"),this._bindHandler("mouseenter"),this._bindHandler("mouseleave"),this._bindHandler("mousemove"),this._enableTracking()},options:{name:"Surface",tooltip:{}},events:["click","mouseenter","mouseleave","mousemove","resize","tooltipOpen","tooltipClose"],_triggerInstanceEvent:function(e){this.trigger(e.type,e)},_bindHandler:function(e){this._instance.bind(e,this._triggerInstanceHandler)},draw:function(e){this._instance.draw(e)},clear:function(){this._instance&&this._instance.clear(),this.hideTooltip()},destroy:function(){this._instance&&(this._instance.destroy(),delete this._instance),this._tooltip&&(this._tooltip.destroy(),delete this._tooltip),a.fn.destroy.call(this)},exportVisual:function(){return this._instance.exportVisual()},eventTarget:function(e){return this._instance.eventTarget(e)},showTooltip:function(e,t){this._tooltip&&this._tooltip.show(e,t)},hideTooltip:function(){this._tooltip&&this._tooltip.hide()},suspendTracking:function(){this._instance.suspendTracking(),this.hideTooltip()},resumeTracking:function(){this._instance.resumeTracking()},getSize:function(){return{width:this.element.width(),height:this.element.height()}},setSize:function(e){this.element.css({width:e.width,height:e.height}),this._size=e,this._instance.currentSize(e),this._resize()},_resize:function(){this._instance.currentSize(this._size),this._instance._resize()},_enableTracking:function(){i.ui.Popup&&(this._tooltip=new r.SurfaceTooltip(this,this.options.tooltip||{}))}}),i.ui.plugin(n),n.create=function(e,t){return new n(e,t)},i.drawing.Surface=n}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("drawing/html.min",["drawing/kendo-drawing.min"],e)}(function(){!function(e){var t=window.kendo,n=t.drawing,i=n.drawDOM;n.drawDOM=function(t,n){return i(e(t)[0],n)},n.drawDOM.drawText=i.drawText,n.drawDOM.getFontFaces=i.getFontFaces}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.drawing.min",["drawing/util.min","drawing/kendo-drawing.min","drawing/surface-tooltip.min","drawing/surface.min","drawing/html.min"],e)}(function(){},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.validator.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){var n,i=l.ui.validator.ruleResolvers||{},r={};for(n in i)e.extend(!0,r,i[n].resolve(t));return r}function i(e){
return e.replace(/&amp/g,"&amp;").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">")}function r(e){return e=(e+"").split("."),e.length>1?e[1].length:0}function o(t){return e(e.parseHTML?e.parseHTML(t):t)}function a(t,n){var i,r,o,a,s=e();for(o=0,a=t.length;o<a;o++)i=t[o],h.test(i.className)&&(r=i.getAttribute(l.attr("for")),r===n&&(s=s.add(i)));return s}var s,l=window.kendo,d=l.ui.Widget,u=".kendoValidator",c="k-invalid-msg",h=RegExp(c,"i"),p="k-invalid",f="k-valid",m=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i,g=/^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,v=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",_=":checkbox:not([disabled],[readonly])",b="[type=number],[type=range]",k="blur",w="name",y="form",x="novalidate",C="validate",T="change",S="validateInput",D=e.proxy,F=function(e,t){return"string"==typeof t&&(t=RegExp("^(?:"+t+")$")),t.test(e)},E=function(e,t,n){var i=e.val();return!e.filter(t).length||""===i||F(i,n)},A=function(e,t){return!!e.length&&null!=e[0].attributes[t]};l.ui.validator||(l.ui.validator={rules:{},messages:{}}),s=d.extend({init:function(t,i){var r=this,o=n(t),a="["+l.attr("validate")+"!=false]";i=i||{},i.rules=e.extend({},l.ui.validator.rules,o.rules,i.rules),i.messages=e.extend({},l.ui.validator.messages,o.messages,i.messages),d.fn.init.call(r,t,i),r._errorTemplate=l.template(r.options.errorTemplate),r.element.is(y)&&r.element.attr(x,x),r._inputSelector=v+a,r._checkboxSelector=_+a,r._errors={},r._attachEvents(),r._isValidated=!1},events:[C,T,S],options:{name:"Validator",errorTemplate:'<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-i-warning"> </span> #=message#</span>',messages:{required:"{0} is required",pattern:"{0} is not valid",min:"{0} should be greater than or equal to {1}",max:"{0} should be smaller than or equal to {1}",step:"{0} is not valid",email:"{0} is not valid email",url:"{0} is not valid URL",date:"{0} is not valid date",dateCompare:"End date should be greater than or equal to the start date"},rules:{required:function(e){var t=e.filter("[type=checkbox]").length&&!e.is(":checked"),n=e.val();return!(A(e,"required")&&(!n||""===n||0===n.length||t))},pattern:function(e){return!e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===e.val()||F(e.val(),e.attr("pattern"))},min:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[min]").length&&""!==e.val()){var t=parseFloat(e.attr("min"))||0,n=l.parseFloat(e.val());return t<=n}return!0},max:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[max]").length&&""!==e.val()){var t=parseFloat(e.attr("max"))||0,n=l.parseFloat(e.val());return t>=n}return!0},step:function(e){if(e.filter(b+",["+l.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,n=parseFloat(e.attr("min"))||0,i=parseFloat(e.attr("step"))||1,o=parseFloat(e.val()),a=r(i);return a?(t=Math.pow(10,a),Math.floor((o-n)*t)%(i*t)/Math.pow(100,a)===0):(o-n)%i===0}return!0},email:function(e){return E(e,"[type=email],["+l.attr("type")+"=email]",m)},url:function(e){return E(e,"[type=url],["+l.attr("type")+"=url]",g)},date:function(e){return!e.filter("[type^=date],["+l.attr("type")+"=date]").length||""===e.val()||null!==l.parseDate(e.val(),e.attr(l.attr("format")))}},validateOnBlur:!0},destroy:function(){d.fn.destroy.call(this),this.element.off(u)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(e){return!!this.validate()||(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger(T)},_attachEvents:function(){var t=this;t.element.is(y)&&t.element.on("submit"+u,D(t._submit,t)),t.options.validateOnBlur&&(t.element.is(v)?(t.element.on(k+u,function(){t._checkElement(t.element)}),t.element.is(_)&&t.element.on("click"+u,function(){t._checkElement(t.element)})):(t.element.on(k+u,t._inputSelector,function(){t._checkElement(e(this))}),t.element.on("click"+u,t._checkboxSelector,function(){t._checkElement(e(this))})))},validate:function(){var e,t,n,i,r=!1,o=this.value();if(this._errors={},this.element.is(v))r=this.validateInput(this.element);else{for(i=!1,e=this.element.find(this._inputSelector),t=0,n=e.length;t<n;t++)this.validateInput(e.eq(t))||(i=!0);r=!i}return this.trigger(C,{valid:r}),o!==r&&this.trigger(T),r},validateInput:function(t){var n,r,a,s,d,u,h,m,g,v,_;return t=e(t),this._isValidated=!0,n=this,r=n._errorTemplate,a=n._checkValidity(t),s=a.valid,d="."+c,u=t.attr(w)||"",h=n._findMessageContainer(u).add(t.next(d).filter(function(){var t=e(this);return!t.filter("["+l.attr("for")+"]").length||t.attr(l.attr("for"))===u})).hide(),g=!t.attr("aria-invalid"),t.removeAttr("aria-invalid"),s?delete n._errors[u]:(m=n._extractMessage(t,a.key),n._errors[u]=m,v=o(r({message:i(m)})),_=h.attr("id"),n._decorateMessageContainer(v,u),_&&v.attr("id",_),h.replaceWith(v).length||v.insertAfter(t),v.show(),t.attr("aria-invalid",!0)),g!==s&&this.trigger(S,{valid:s,input:t}),t.toggleClass(p,!s),t.toggleClass(f,s),s},hideMessages:function(){var e=this,t="."+c,n=e.element;n.is(v)?n.next(t).hide():n.find(t).hide()},_findMessageContainer:function(t){var n,i,r,o=l.ui.validator.messageLocators,s=e();for(i=0,r=this.element.length;i<r;i++)s=s.add(a(this.element[i].getElementsByTagName("*"),t));for(n in o)s=s.add(o[n].locate(this.element,t));return s},_decorateMessageContainer:function(e,t){var n,i=l.ui.validator.messageLocators;e.addClass(c).attr(l.attr("for"),t||"");for(n in i)i[n].decorate(e,t);e.attr("role","alert")},_extractMessage:function(e,t){var n,i=this,r=i.options.messages[t],o=e.attr(w);return l.ui.Validator.prototype.options.messages[t]||(n=l.isFunction(r)?r(e):r),r=l.isFunction(r)?r(e):r,l.format(e.attr(l.attr(t+"-msg"))||e.attr("validationMessage")||n||e.attr("title")||r||"",o,e.attr(t)||e.attr(l.attr(t)))},_checkValidity:function(e){var t,n=this.options.rules;for(t in n)if(!n[t].call(this,e))return{valid:!1,key:t};return{valid:!0}},errors:function(){var e,t=[],n=this._errors;for(e in n)t.push(n[e]);return t}}),l.ui.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.userevents.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t){var n=e.x.location,i=e.y.location,r=t.x.location,o=t.y.location,a=n-r,s=i-o;return{center:{x:(n+r)/2,y:(i+o)/2},distance:Math.sqrt(a*a+s*s)}}function i(e){var t,n,i,r=[],o=e.originalEvent,s=e.currentTarget,l=0;if(e.api)r.push({id:2,event:e,target:e.target,currentTarget:e.target,location:e,type:"api"});else if(e.type.match(/touch/))for(n=o?o.changedTouches:[],t=n.length;l<t;l++)i=n[l],r.push({location:i,event:e,target:i.target,currentTarget:s,id:i.identifier,type:"touch"});else r.push(a.pointers||a.msPointers?{location:o,event:e,target:e.target,currentTarget:s,id:o.pointerId,type:"pointer"}:{id:1,event:e,target:e.target,currentTarget:s,location:e,type:"mouse"});return r}function r(e){for(var t=o.eventMap.up.split(" "),n=0,i=t.length;n<i;n++)e(t[n])}var o=window.kendo,a=o.support,s=o.Class,l=o.Observable,d=e.now,u=e.extend,c=a.mobileOS,h=c&&c.android,p=800,f=a.browser.msie?5:0,m="press",g="hold",v="select",_="start",b="move",k="end",w="cancel",y="tap",x="release",C="gesturestart",T="gesturechange",S="gestureend",D="gesturetap",F={api:0,touch:0,mouse:9,pointer:9},E=!a.touch||a.mouseAndTouchPresent,A=s.extend({init:function(e,t){var n=this;n.axis=e,n._updateLocationData(t),n.startLocation=n.location,n.velocity=n.delta=0,n.timeStamp=d()},move:function(e){var t=this,n=e["page"+t.axis],i=d(),r=i-t.timeStamp||1;!n&&h||(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/r,t.timeStamp=i)},_updateLocationData:function(e){var t=this,n=t.axis;t.location=e["page"+n],t.client=e["client"+n],t.screen=e["screen"+n]}}),I=s.extend({init:function(e,t,n){u(this,{x:new A("X",n.location),y:new A("Y",n.location),type:n.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||F[n.type],userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(e.proxy(this,"_hold"),this.userEvents.minHold),this._trigger(m,this.pressEvent)},_hold:function(){this._trigger(g,this.pressEvent)},move:function(e){var t=this;if(!t._finished){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(R.current&&R.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(b,e)}},end:function(e){this.endTime=d(),this._finished||(this._finished=!0,this._trigger(x,e),this._moved?this._trigger(k,e):this.useClickAsTap||this._trigger(y,e),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var t=this.userEvents,n=t.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),n.splice(e.inArray(this,n),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=d(),this._moved=!0,this._trigger(_,e)},_trigger:function(e,t){var n=this,i=t.event,r={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,r)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}}),R=l.extend({init:function(t,n){var i,s,d,c,h=this,F=o.guid();n=n||{},i=h.filter=n.filter,h.threshold=n.threshold||f,h.minHold=n.minHold||p,h.touches=[],h._maxTouches=n.multiTouch?2:1,h.allowSelection=n.allowSelection,h.captureUpIfMoved=n.captureUpIfMoved,h.useClickAsTap=!n.fastTap&&!a.delayedClick(),h.eventNS=F,t=e(t).handler(h),l.fn.init.call(h),u(h,{element:t,surface:e(n.global&&E?t[0].ownerDocument.documentElement:n.surface||t),stopPropagation:n.stopPropagation,pressed:!1}),h.surface.handler(h).on(o.applyEventMap("move",F),"_move").on(o.applyEventMap("up cancel",F),"_end"),t.on(o.applyEventMap("down",F),i,"_start"),h.useClickAsTap&&t.on(o.applyEventMap("click",F),i,"_click"),(a.pointers||a.msPointers)&&(a.browser.version<11?(s="pinch-zoom double-tap-zoom",t.css("-ms-touch-action",n.touchAction&&"none"!=n.touchAction?s+" "+n.touchAction:s)):t.css("touch-action",n.touchAction||"none")),n.preventDragEvent&&t.on(o.applyEventMap("dragstart",F),o.preventDefault),t.on(o.applyEventMap("mousedown",F),i,{root:t},"_select"),h.captureUpIfMoved&&a.eventCapture&&(d=h.surface[0],c=e.proxy(h.preventIfMoving,h),r(function(e){d.addEventListener(e,c,!0)})),h.bind([m,g,y,_,b,k,x,w,C,T,S,D,v],n)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e,t=this;t._destroyed||(t._destroyed=!0,t.captureUpIfMoved&&a.eventCapture&&(e=t.surface[0],r(function(n){e.removeEventListener(n,t.preventIfMoving)})),t.element.kendoDestroy(t.eventNS),t.surface.kendoDestroy(t.eventNS),t.element.removeData("handler"),t.surface.removeData("handler"),t._disposeAll(),t.unbind(),delete t.surface,delete t.element,delete t.currentTarget)},capture:function(){R.current=this},cancel:function(){this._disposeAll(),this.trigger(w)},notify:function(e,t){var i=this,r=i.touches;if(this._isMultiTouch()){switch(e){case b:e=T;break;case k:e=S;break;case y:e=D}u(t,{touches:r},n(r[0],r[1]))}return this.trigger(e,u(t,{type:e}))},press:function(e,t,n){this._apiCall("_start",e,t,n)},move:function(e,t){this._apiCall("_move",e,t)},end:function(e,t){this._apiCall("_end",e,t)},_isMultiTouch:function(){return this.touches.length>1},_maxTouchesReached:function(){return this.touches.length>=this._maxTouches},_disposeAll:function(){for(var e=this.touches;e.length>0;)e.pop().dispose()},_isMoved:function(){return e.grep(this.touches,function(e){return e.isMoved()}).length},_select:function(e){this.allowSelection&&!this.trigger(v,{event:e})||e.preventDefault()},_start:function(t){var n,r,o=this,a=0,s=o.filter,l=i(t),d=l.length,u=t.which;if(!(u&&u>1||o._maxTouchesReached()))for(R.current=null,o.currentTarget=t.currentTarget,o.stopPropagation&&t.stopPropagation();a<d&&!o._maxTouchesReached();a++)r=l[a],n=s?e(r.currentTarget):o.element,n.length&&(r=new I(o,n,r),o.touches.push(r),r.press(),o._isMultiTouch()&&o.notify("gesturestart",{}))},_move:function(e){this._eachTouch("move",e)},_end:function(e){this._eachTouch("end",e)},_click:function(t){var n={touch:{initialTouch:t.target,target:e(t.currentTarget),endTime:d(),x:{location:t.pageX,client:t.clientX},y:{location:t.pageY,client:t.clientY}},x:t.pageX,y:t.pageY,target:e(t.currentTarget),event:t,type:"tap"};this.trigger("tap",n)&&t.preventDefault()},_eachTouch:function(e,t){var n,r,o,a,s=this,l={},d=i(t),u=s.touches;for(n=0;n<u.length;n++)r=u[n],l[r.id]=r;for(n=0;n<d.length;n++)o=d[n],a=l[o.id],a&&a[e](o)},_apiCall:function(t,n,i,r){this[t]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:e(r||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});R.defaultThreshold=function(e){f=e},R.minHold=function(e){p=e},o.getTouches=i,o.touchDelta=n,o.UserEvents=R}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.draganddrop.min",["kendo.core.min","kendo.userevents.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,t){return parseInt(e.css(t),10)||0}function r(e,t){return Math.min(Math.max(e,t.min),t.max)}function o(e,t){var n=F(e),r=_._outerWidth,o=_._outerHeight,a=n.left+i(e,"borderLeftWidth")+i(e,"paddingLeft"),s=n.top+i(e,"borderTopWidth")+i(e,"paddingTop"),l=a+e.width()-r(t,!0),d=s+e.height()-o(t,!0);return{x:{min:a,max:l},y:{min:s,max:d}}}function a(n,i,r){for(var o,a,s=0,l=i&&i.length,d=r&&r.length;n&&n.parentNode;){for(s=0;s<l;s++)if(o=i[s],o.element[0]===n)return{target:o,targetElement:n};for(s=0;s<d;s++)if(a=r[s],e.contains(a.element[0],n)&&b.matchesSelector.call(n,a.options.filter))return{target:a,targetElement:n};n=n.parentNode}return t}function s(e,t){var n,i=t.options.group,r=e[i];if(x.fn.destroy.call(t),r.length>1){for(n=0;n<r.length;n++)if(r[n]==t){r.splice(n,1);break}}else r.length=0,delete e[i]}function l(e){var t,n,i,r=d()[0];return e[0]===r?(n=r.scrollTop,i=r.scrollLeft,{top:n,left:i,bottom:n+w.height(),right:i+w.width()}):(t=e.offset(),t.bottom=t.top+e.height(),t.right=t.left+e.width(),t)}function d(){return e(_.support.browser.chrome?k.body:k.documentElement)}function u(t){var n,i=d();if(!t||t===k.body||t===k.documentElement)return i;for(n=e(t)[0];n&&!_.isScrollable(n)&&n!==k.body;)n=n.parentNode;return n===k.body?i:e(n)}function c(e,t,n){var i={x:0,y:0},r=50;return e-n.left<r?i.x=-(r-(e-n.left)):n.right-e<r&&(i.x=r-(n.right-e)),t-n.top<r?i.y=-(r-(t-n.top)):n.bottom-t<r&&(i.y=r-(n.bottom-t)),i}var h,p,f,m,g,v,_=window.kendo,b=_.support,k=window.document,w=e(window),y=_.Class,x=_.ui.Widget,C=_.Observable,T=_.UserEvents,S=e.proxy,D=e.extend,F=_.getOffset,E={},A={},I={},R=_.elementUnderCursor,M="keyup",z="change",H="dragstart",N="hold",B="drag",P="dragend",L="dragcancel",O="hintDestroyed",V="dragenter",W="dragleave",U="drop",q=C.extend({init:function(t,n){var i=this,r=t[0];i.capture=!1,r.addEventListener?(e.each(_.eventMap.down.split(" "),function(){r.addEventListener(this,S(i._press,i),!0)}),e.each(_.eventMap.up.split(" "),function(){r.addEventListener(this,S(i._release,i),!0)})):(e.each(_.eventMap.down.split(" "),function(){r.attachEvent(this,S(i._press,i))}),e.each(_.eventMap.up.split(" "),function(){r.attachEvent(this,S(i._release,i))})),C.fn.init.call(i),i.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){var t=this;t.trigger("press"),t.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),j=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.forcedEnabled=!1,e.extend(n,t),n.scale=1,n.horizontal?(n.measure="offsetWidth",n.scrollSize="scrollWidth",n.axis="x"):(n.measure="offsetHeight",n.scrollSize="scrollHeight",n.axis="y")},makeVirtual:function(){e.extend(this,{virtual:!0,forcedEnabled:!0,_virtualMin:0,_virtualMax:0})},virtualSize:function(e,t){this._virtualMin===e&&this._virtualMax===t||(this._virtualMin=e,this._virtualMax=t,this.update())},outOfBounds:function(e){return e>this.max||e<this.min},forceEnabled:function(){this.forcedEnabled=!0},getSize:function(){return this.container[0][this.measure]},getTotal:function(){return this.element[0][this.scrollSize]},rescale:function(e){this.scale=e},update:function(e){var t=this,n=t.virtual?t._virtualMax:t.getTotal(),i=n*t.scale,r=t.getSize();(0!==n||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=r,t.total=i,t.min=Math.min(t.max,r-i),t.minScale=r/n,t.centerOffset=(i-r)/2,t.enabled=t.forcedEnabled||i>r,e||t.trigger(z,t))}}),G=C.extend({init:function(e){var t=this;C.fn.init.call(t),t.x=new j(D({horizontal:!0},e)),t.y=new j(D({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(z,e)},rescale:function(e){this.x.rescale(e),this.y.rescale(e),this.refresh()},centerCoordinates:function(){return{x:Math.min(0,-this.x.centerOffset),y:Math.min(0,-this.y.centerOffset)}},refresh:function(){var e=this;e.x.update(),e.y.update(),e.enabled=e.x.enabled||e.y.enabled,e.minScale=e.forcedMinScale||Math.min(e.x.minScale,e.y.minScale),e.fitScale=Math.max(e.x.minScale,e.y.minScale),e.trigger(z)}}),$=C.extend({init:function(e){var t=this;D(t,e),C.fn.init.call(t)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,r=t.movable,o=r[i]+e;n.enabled&&((o<n.min&&e<0||o>n.max&&e>0)&&(e*=t.resistance),r.translateAxis(i,e),t.trigger(z,t))}}),K=y.extend({init:function(t){var n,i,r,o,a=this;D(a,{elastic:!0},t),r=a.elastic?.5:0,o=a.movable,a.x=n=new $({axis:"x",dimension:a.dimensions.x,resistance:r,movable:o}),a.y=i=new $({axis:"y",dimension:a.dimensions.y,resistance:r,movable:o}),a.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){a.gesture=e,a.offset=a.dimensions.container.offset()},press:function(t){e(t.event.target).closest("a").is("[data-navigate-on-press=true]")&&t.sender.cancel()},gesturechange:function(e){var t,r,s,l=a.gesture,d=l.center,u=e.center,c=e.distance/l.distance,h=a.dimensions.minScale,p=a.dimensions.maxScale;o.scale<=h&&c<1&&(c+=.8*(1-c)),o.scale*c>=p&&(c=p/o.scale),r=o.x+a.offset.left,s=o.y+a.offset.top,t={x:(r-d.x)*c+u.x-r,y:(s-d.y)*c+u.y-s},o.scaleWith(c),n.dragMove(t.x),i.dragMove(t.y),a.dimensions.rescale(o.scale),a.gesture=e,e.preventDefault()},move:function(e){e.event.target.tagName.match(/textarea|input/i)||(n.dimension.enabled||i.dimension.enabled?(n.dragMove(e.x.delta),i.dragMove(e.y.delta),e.preventDefault()):e.touch.skip())},end:function(e){e.preventDefault()}})}}),Y=b.transitions.prefix+"Transform";p=b.hasHW3D?function(e,t,n){return"translate3d("+e+"px,"+t+"px,0) scale("+n+")"}:function(e,t,n){return"translate("+e+"px,"+t+"px) scale("+n+")"},f=C.extend({init:function(t){var n=this;C.fn.init.call(n),n.element=e(t),n.element[0].style.webkitTransformOrigin="left top",n.x=0,n.y=0,n.scale=1,n._saveCoordinates(p(n.x,n.y,n.scale))},translateAxis:function(e,t){this[e]+=t,this.refresh()},scaleTo:function(e){this.scale=e,this.refresh()},scaleWith:function(e){this.scale*=e,this.refresh()},translate:function(e){this.x+=e.x,this.y+=e.y,this.refresh()},moveAxis:function(e,t){this[e]=t,this.refresh()},moveTo:function(e){D(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,i=t.y;t.round&&(n=Math.round(n),i=Math.round(i)),e=p(n,i,t.scale),e!=t.coordinates&&(_.support.browser.msie&&_.support.browser.version<10?(t.element[0].style.position="absolute",t.element[0].style.left=t.x+"px",t.element[0].style.top=t.y+"px"):t.element[0].style[Y]=e,t._saveCoordinates(e),t.trigger(z))},_saveCoordinates:function(e){this.coordinates=e}}),m=x.extend({init:function(e,t){var n,i=this;x.fn.init.call(i,e,t),n=i.options.group,n in A?A[n].push(i):A[n]=[i]},events:[V,W,U],options:{name:"DropTarget",group:"default"},destroy:function(){s(A,this)},_trigger:function(e,t){var n=this,i=E[n.options.group];if(i)return n.trigger(e,D({},t.event,{draggable:i,dropTarget:t.dropTarget}))},_over:function(e){this._trigger(V,e)},_out:function(e){this._trigger(W,e)},_drop:function(e){var t=this,n=E[t.options.group];n&&(n.dropped=!t._trigger(U,e))}}),m.destroyGroup=function(e){var t,n=A[e]||I[e];if(n){for(t=0;t<n.length;t++)x.fn.destroy.call(n[t]);n.length=0,delete A[e],delete I[e]}},m._cache=A,g=m.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]},destroy:function(){s(I,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),v=x.extend({init:function(e,t){var n=this;x.fn.init.call(n,e,t),n._activated=!1,n.userEvents=new T(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,threshold:n.options.distance,start:S(n._start,n),hold:S(n._hold,n),move:S(n._drag,n),end:S(n._end,n),cancel:S(n._cancel,n),select:S(n._select,n)}),n._afterEndHandler=S(n._afterEnd,n),n._captureEscape=S(n._captureEscape,n)},events:[N,H,B,P,L,O],options:{name:"Draggable",distance:_.support.touch?0:5,group:"default",cursorOffset:null,axis:null,container:null,filter:null,ignore:null,holdToDrag:!1,autoScroll:!1,dropped:!1},cancelHold:function(){this._activated=!1},_captureEscape:function(e){var t=this;e.keyCode===_.keys.ESC&&(t._trigger(L,{event:e}),t.userEvents.cancel())},_updateHint:function(t){var n,i=this,o=i.options,a=i.boundaries,s=o.axis,l=i.options.cursorOffset;l?n={left:t.x.location+l.left,top:t.y.location+l.top}:(i.hintOffset.left+=t.x.delta,i.hintOffset.top+=t.y.delta,n=e.extend({},i.hintOffset)),a&&(n.top=r(n.top,a.y),n.left=r(n.left,a.x)),"x"===s?delete n.top:"y"===s&&delete n.left,i.hint.css(n)},_shouldIgnoreTarget:function(t){var n=this.options.ignore;return n&&e(t).is(n)},_select:function(e){this._shouldIgnoreTarget(e.event.target)||e.preventDefault()},_start:function(n){var i,r=this,a=r.options,s=a.container?e(a.container):null,l=a.hint;return this._shouldIgnoreTarget(n.touch.initialTouch)||a.holdToDrag&&!r._activated?(r.userEvents.cancel(),t):(r.currentTarget=n.target,r.currentTargetOffset=F(r.currentTarget),l&&(r.hint&&r.hint.stop(!0,!0).remove(),r.hint=_.isFunction(l)?e(l.call(r,r.currentTarget)):l,i=F(r.currentTarget),r.hintOffset=i,r.hint.css({position:"absolute",zIndex:2e4,left:i.left,top:i.top}).appendTo(k.body),r.angular("compile",function(){r.hint.removeAttr("ng-repeat");for(var t=e(n.target);!t.data("$$kendoScope")&&t.length;)t=t.parent();return{elements:r.hint.get(),scopeFrom:t.data("$$kendoScope")}})),E[a.group]=r,r.dropped=!1,s&&(r.boundaries=o(s,r.hint)),e(k).on(M,r._captureEscape),r._trigger(H,n)&&(r.userEvents.cancel(),r._afterEnd()),r.userEvents.capture(),t)},_hold:function(e){this.currentTarget=e.target,this._trigger(N,e)?this.userEvents.cancel():this._activated=!0},_drag:function(t){var n,i;t.preventDefault(),n=this._elementUnderCursor(t),this.options.autoScroll&&this._cursorElement!==n&&(this._scrollableParent=u(n),this._cursorElement=n),this._lastEvent=t,this._processMovement(t,n),this.options.autoScroll&&this._scrollableParent[0]&&(i=c(t.x.location,t.y.location,l(this._scrollableParent)),this._scrollCompenstation=e.extend({},this.hintOffset),this._scrollVelocity=i,0===i.y&&0===i.x?(clearInterval(this._scrollInterval),this._scrollInterval=null):this._scrollInterval||(this._scrollInterval=setInterval(e.proxy(this,"_autoScroll"),50))),this.hint&&this._updateHint(t)},_processMovement:function(n,i){this._withDropTarget(i,function(i,r){if(!i)return h&&(h._trigger(W,D(n,{dropTarget:e(h.targetElement)})),h=null),t;if(h){if(r===h.targetElement)return;h._trigger(W,D(n,{dropTarget:e(h.targetElement)}))}i._trigger(V,D(n,{dropTarget:e(r)})),h=D(i,{targetElement:r})}),this._trigger(B,D(n,{dropTarget:h,elementUnderCursor:i}))},_autoScroll:function(){var e,t,n,i,r,o,a,s,l=this._scrollableParent[0],u=this._scrollVelocity,c=this._scrollCompenstation;l&&(e=this._elementUnderCursor(this._lastEvent),this._processMovement(this._lastEvent,e),i=l===d()[0],i?(t=k.body.scrollHeight>w.height(),n=k.body.scrollWidth>w.width()):(t=l.offsetHeight<=l.scrollHeight,n=l.offsetWidth<=l.scrollWidth),r=l.scrollTop+u.y,o=t&&r>0&&r<l.scrollHeight,a=l.scrollLeft+u.x,s=n&&a>0&&a<l.scrollWidth,o&&(l.scrollTop+=u.y),s&&(l.scrollLeft+=u.x),this.hint&&i&&(s||o)&&(o&&(c.top+=u.y),s&&(c.left+=u.x),this.hint.css(c)))},_end:function(t){this._withDropTarget(this._elementUnderCursor(t),function(n,i){n&&(n._drop(D({},t,{dropTarget:e(i)})),h=null)}),this._cancel(this._trigger(P,t))},_cancel:function(e){var t=this;t._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),t._activated=!1,t.hint&&!t.dropped?setTimeout(function(){t.hint.stop(!0,!0),e?t._afterEndHandler():t.hint.animate(t.currentTargetOffset,"fast",t._afterEndHandler)},0):t._afterEnd()},_trigger:function(e,t){var n=this;return n.trigger(e,D({},t.event,{x:t.x,y:t.y,currentTarget:n.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(e){var t=R(e),i=this.hint;return i&&n(i[0],t)&&(i.hide(),t=R(e),t||(t=R(e)),i.show()),t},_withDropTarget:function(e,t){var n,i=this.options.group,r=A[i],o=I[i];(r&&r.length||o&&o.length)&&(n=a(e,r,o),n?t(n.target,n.targetElement):t())},destroy:function(){var e=this;x.fn.destroy.call(e),e._afterEnd(),e.userEvents.destroy(),this._scrollableParent=null,this._cursorElement=null,clearInterval(this._scrollInterval),e.currentTarget=null},_afterEnd:function(){var t=this;t.hint&&t.hint.remove(),delete E[t.options.group],t.trigger("destroy"),t.trigger(O),e(k).off(M,t._captureEscape)}}),_.ui.plugin(m),_.ui.plugin(g),_.ui.plugin(v),_.TapCapture=q,_.containerBoundaries=o,D(_.ui,{Pane:K,PaneDimensions:G,Movable:f}),_.ui.Draggable.utils={autoScrollVelocity:c,scrollableViewPort:l,findScrollableParent:u}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.scroller.min",["kendo.fx.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,r=n.effects,o=i.ui,a=e.proxy,s=e.extend,l=o.Widget,d=n.Class,u=n.ui.Movable,c=n.ui.Pane,h=n.ui.PaneDimensions,p=r.Transition,f=r.Animation,m=Math.abs,g=500,v=.7,_=.96,b=10,k=55,w=.5,y=5,x="km-scroller-release",C="km-scroller-refresh",T="pull",S="change",D="resize",F="scroll",E=2,A=f.extend({init:function(e){var t=this;f.fn.init.call(t),s(t,e),t.userEvents.bind("gestureend",a(t.start,t)),t.tapCapture.bind("press",a(t.cancel,t))},enabled:function(){return this.movable.scale<this.dimensions.minScale},done:function(){return this.dimensions.minScale-this.movable.scale<.01},tick:function(){var e=this.movable;e.scaleWith(1.1),this.dimensions.rescale(e.scale)},onEnd:function(){var e=this.movable;e.scaleTo(this.dimensions.minScale),this.dimensions.rescale(e.scale)}}),I=f.extend({init:function(e){var t=this;f.fn.init.call(t),s(t,e,{transition:new p({axis:e.axis,movable:e.movable,onEnd:function(){t._end()}})}),t.tapCapture.bind("press",function(){t.cancel()}),t.userEvents.bind("end",a(t.start,t)),t.userEvents.bind("gestureend",a(t.start,t)),t.userEvents.bind("tap",a(t.onEnd,t))},onCancel:function(){this.transition.cancel()},freeze:function(e){var t=this;t.cancel(),t._moveTo(e)},onEnd:function(){var e=this;e.paneAxis.outOfBounds()?e._snapBack():e._end()},done:function(){return m(this.velocity)<1},start:function(e){var t,n=this;n.dimension.enabled&&(n.paneAxis.outOfBounds()?n._snapBack():(t=e.touch.id===E?0:e.touch[n.axis].velocity,n.velocity=Math.max(Math.min(t*n.velocityMultiplier,k),-k),n.tapCapture.captureNext(),f.fn.start.call(n)))},tick:function(){var e=this,t=e.dimension,n=e.paneAxis.outOfBounds()?w:e.friction,i=e.velocity*=n,r=e.movable[e.axis]+i;!e.elastic&&t.outOfBounds(r)&&(r=Math.max(Math.min(r,t.max),t.min),e.velocity=0),e.movable.moveAxis(e.axis,r)},_end:function(){this.tapCapture.cancelCapture(),this.end()},_snapBack:function(){var e=this,t=e.dimension,n=e.movable[e.axis]>t.max?t.max:t.min;e._moveTo(n)},_moveTo:function(e){this.transition.moveTo({location:e,duration:g,ease:p.easeOutExpo})}}),R=f.extend({init:function(e){var t=this;n.effects.Animation.fn.init.call(this),s(t,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return m(this.offset.y)<y&&m(this.offset.x)<y},onEnd:function(){this.moveTo(this.destination),this.callback&&this.callback.call()},setCoordinates:function(e,t){this.offset={},this.origin=e,this.destination=t},setCallback:function(e){e&&n.isFunction(e)?this.callback=e:e=t},_updateCoordinates:function(){this.offset={x:(this.destination.x-this.origin.x)/4,y:(this.destination.y-this.origin.y)/4},this.origin={y:this.origin.y+this.offset.y,x:this.origin.x+this.offset.x}}}),M=d.extend({init:function(t){var n=this,i="x"===t.axis,r=e('<div class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');s(n,t,{element:r,elementSize:0,movable:new u(r),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(S,a(n.refresh,n)),n.container.append(r),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,r=e.scrollMovable,o=i/n.total,a=Math.round(-r[t]*o),s=Math.round(i*o);o>=1?this.element.css("display","none"):this.element.css("display",""),a+s>i?s=i-a:a<0&&(s+=a,a=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e.movable.moveAxis(t,a)},show:function(){this.element.css({opacity:v,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})}}),z=l.extend({init:function(i,r){var o,d,p,f,g,v,_,b,k,w=this;return l.fn.init.call(w,i,r),i=w.element,(w._native=w.options.useNative&&n.support.hasNativeScrolling)?(i.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),s(w,{scrollElement:i,fixedContainer:i.children().first()}),t):(i.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'),o=i.children().eq(1),d=new n.TapCapture(i),p=new u(o),f=new h({element:o,container:i,forcedEnabled:w.options.zoom}),g=this.options.avoidScrolling,v=new n.UserEvents(i,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:w.options.zoom,start:function(t){f.refresh();
var n=m(t.x.velocity),i=m(t.y.velocity),r=2*n>=i,o=e.contains(w.fixedContainer[0],t.event.target),a=2*i>=n;!o&&!g(t)&&w.enabled&&(f.x.enabled&&r||f.y.enabled&&a)?v.capture():v.cancel()}}),_=new c({movable:p,dimensions:f,userEvents:v,elastic:w.options.elastic}),b=new A({movable:p,dimensions:f,userEvents:v,tapCapture:d}),k=new R({moveTo:function(e){w.scrollTo(e.x,e.y)}}),p.bind(S,function(){w.scrollTop=-p.y,w.scrollLeft=-p.x,w.trigger(F,{scrollTop:w.scrollTop,scrollLeft:w.scrollLeft})}),w.options.mousewheelScrolling&&i.on("DOMMouseScroll mousewheel",a(this,"_wheelScroll")),s(w,{movable:p,dimensions:f,zoomSnapBack:b,animatedScroller:k,userEvents:v,pane:_,tapCapture:d,pulled:!1,enabled:!0,scrollElement:o,scrollTop:0,scrollLeft:0,fixedContainer:i.children().first()}),w._initAxis("x"),w._initAxis("y"),w._wheelEnd=function(){w._wheel=!1,w.userEvents.end(0,w._wheelY)},f.refresh(),w.options.pullToRefresh&&w._initPullToRefresh(),t)},_wheelScroll:function(e){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:[T,F,D],_resize:function(){this._native||this.contentResized()},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.pullToRefresh&&t._initPullToRefresh()},reset:function(){this._native?this.scrollElement.scrollTop(0):(this.movable.moveTo({x:0,y:0}),this._scale(1))},contentResized:function(){this.dimensions.refresh(),this.pane.x.outOfBounds()&&this.movable.moveAxis("x",this.dimensions.x.min),this.pane.y.outOfBounds()&&this.movable.moveAxis("y",this.dimensions.y.min)},zoomOut:function(){var e=this.dimensions;e.refresh(),this._scale(e.fitScale),this.movable.moveTo(e.centerCoordinates())},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},scrollTo:function(e,t){this._native?(this.scrollElement.scrollLeft(m(e)),this.scrollElement.scrollTop(m(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,r;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},r={x:e,y:t},this.animatedScroller.setCoordinates(i,r),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(C),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){l.fn.destroy.call(this),this.userEvents&&this.userEvents.destroy()},_scale:function(e){this.dimensions.rescale(e),this.movable.scaleTo(e)},_initPullToRefresh:function(){var e=this;e.dimensions.y.forceEnabled(),e.pullTemplate=n.template(e.options.messages.pullTemplate),e.releaseTemplate=n.template(e.options.messages.releaseTemplate),e.refreshTemplate=n.template(e.options.messages.refreshTemplate),e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-loading-left"></span><span class="km-loading-right"></span><span class="km-template">'+e.pullTemplate({})+"</span></span>"),e.refreshHint=e.scrollElement.children().first(),e.hintContainer=e.refreshHint.children(".km-template"),e.pane.y.bind("change",a(e._paneChange,e)),e.userEvents.bind("end",a(e._dragEnd,e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x).addClass(C),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/w>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(C).addClass(x),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(x),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t=this,n=t.movable,i=t.dimensions[e],r=t.tapCapture,o=t.pane[e],a=new M({axis:e,movable:n,dimension:i,container:t.element,alwaysVisible:t.options.visibleScrollHints});i.bind(S,function(){a.refresh()}),o.bind(S,function(){a.show()}),t[e+"inertia"]=new I({axis:e,paneAxis:o,movable:n,tapCapture:r,userEvents:t.userEvents,dimension:i,elastic:t.options.elastic,friction:t.options.friction||_,velocityMultiplier:t.options.velocityMultiplier||b,end:function(){a.hide(),t.trigger("scrollEnd",{axis:e,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft})}})}});o.plugin(z)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.groupable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return e.position().top+3}var i=window.kendo,r=i.ui.Widget,o=i._outerWidth,a=e.proxy,s=!1,l=".kendoGroupable",d="change",u=i.template('<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-i-sort-${(data.dir || "asc") == "asc" ? "asc-sm" : "desc-sm"}" title="(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})"></span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close"></span></a></div>',{useWithBlock:!1}),c=function(t){var n=t.attr(i.attr("title"));return n&&(n=i.htmlEncode(n)),e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(n||t.attr(i.attr("field"))).prepend('<span class="k-icon k-drag-status k-i-cancel" />')},h=e('<div class="k-grouping-dropclue"/>'),p=r.extend({init:function(u,p){var f,m,g=this,v=i.guid(),_=a(g._intializePositions,g),b=g._dropCuePositions=[];r.fn.init.call(g,u,p),s=i.support.isRtl(u),m=s?"right":"left",g.draggable=f=g.options.draggable||new i.ui.Draggable(g.element,{filter:g.options.draggableElements,hint:c,group:v}),g.groupContainer=e(g.options.groupContainer,g.element).kendoDropTarget({group:f.options.group,dragenter:function(e){g._canDrag(e.draggable.currentTarget)&&(e.draggable.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus"),h.css("top",n(g.groupContainer)).css(m,0).appendTo(g.groupContainer))},dragleave:function(e){e.draggable.hint.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"),h.remove()},drop:function(t){var n,r=t.draggable.currentTarget,o=r.attr(i.attr("field")),a=r.attr(i.attr("title")),l=g.indicator(o),d=g._dropCuePositions,u=d[d.length-1];(r.hasClass("k-group-indicator")||g._canDrag(r))&&(u?(n=g._dropCuePosition(i.getOffset(h).left+parseInt(u.element.css("marginLeft"),10)*(s?-1:1)+parseInt(u.element.css("marginRight"),10)),n&&g._canDrop(e(l),n.element,n.left)&&(n.before?n.element.before(l||g.buildIndicator(o,a)):n.element.after(l||g.buildIndicator(o,a)),g._change())):(g.groupContainer.append(g.buildIndicator(o,a)),g._change()))}}).kendoDraggable({filter:"div.k-group-indicator",hint:c,group:f.options.group,dragcancel:a(g._dragCancel,g),dragstart:function(e){var t=e.currentTarget,i=parseInt(t.css("marginLeft"),10),r=t.position(),a=s?r.left-i:r.left+o(t);_(),h.css({top:n(g.groupContainer),left:a}).appendTo(g.groupContainer),this.hint.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")},dragend:function(){g._dragEnd(this)},drag:a(g._drag,g)}).on("click"+l,".k-button",function(t){t.preventDefault(),g._removeIndicator(e(this).parent())}).on("click"+l,".k-link",function(t){var n=e(this).parent(),r=g.buildIndicator(n.attr(i.attr("field")),n.attr(i.attr("title")),"asc"==n.attr(i.attr("dir"))?"desc":"asc");n.before(r).remove(),g._change(),t.preventDefault()}),f.bind(["dragend","dragcancel","dragstart","drag"],{dragend:function(){g._dragEnd(this)},dragcancel:a(g._dragCancel,g),dragstart:function(e){var n,i,r;return g.options.allowDrag||g._canDrag(e.currentTarget)?(_(),b.length?(n=b[b.length-1].element,i=parseInt(n.css("marginRight"),10),r=n.position().left+o(n)+i):r=0,t):(e.preventDefault(),t)},drag:a(g._drag,g)}),g.dataSource=g.options.dataSource,g.dataSource&&g._refreshHandler?g.dataSource.unbind(d,g._refreshHandler):g._refreshHandler=a(g.refresh,g),g.dataSource&&(g.dataSource.bind("change",g._refreshHandler),g.refresh())},refresh:function(){var t=this,n=t.dataSource;t.groupContainer&&t.groupContainer.empty().append(e.map(n.group()||[],function(n){var r=n.field,o=i.attr("field"),a=t.element.find(t.options.filter).filter(function(){return e(this).attr(o)===r});return t.buildIndicator(n.field,a.attr(i.attr("title")),n.dir)}).join("")),t._invalidateGroupContainer()},destroy:function(){var e=this;r.fn.destroy.call(e),e.groupContainer.off(l),e.groupContainer.data("kendoDropTarget")&&e.groupContainer.data("kendoDropTarget").destroy(),e.groupContainer.data("kendoDraggable")&&e.groupContainer.data("kendoDraggable").destroy(),e.options.draggable||e.draggable.destroy(),e.dataSource&&e._refreshHandler&&(e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=null),e.groupContainer=e.element=e.draggable=null},events:["change"],options:{name:"Groupable",filter:"th",draggableElements:"th",messages:{empty:"Drag a column header and drop it here to group by that column"}},indicator:function(t){var n=e(".k-group-indicator",this.groupContainer);return e.grep(n,function(n){return e(n).attr(i.attr("field"))===t})[0]},buildIndicator:function(e,t,n){return u({field:e.replace(/"/g,"'"),dir:n,title:t,ns:i.ns})},descriptors:function(){var t,n,r,o,a,s=this,l=e(".k-group-indicator",s.groupContainer);return t=s.element.find(s.options.filter).map(function(){var t=e(this),r=t.attr(i.attr("aggregates")),s=t.attr(i.attr("field"));if(r&&""!==r)for(n=r.split(","),r=[],o=0,a=n.length;o<a;o++)r.push({field:s,aggregate:n[o]});return r}).toArray(),e.map(l,function(n){return n=e(n),r=n.attr(i.attr("field")),{field:r,dir:n.attr(i.attr("dir")),aggregates:t||[]}})},_removeIndicator:function(e){var t=this;e.remove(),t._invalidateGroupContainer(),t._change()},_change:function(){var e,n=this;if(n.dataSource){if(e=n.descriptors(),n.trigger("change",{groups:e}))return n.refresh(),t;n.dataSource.group(e)}},_dropCuePosition:function(t){var n,i,r,a,l,d=this._dropCuePositions;if(h.is(":visible")&&0!==d.length)return t=Math.ceil(t),n=d[d.length-1],i=n.left,r=n.right,a=parseInt(n.element.css("marginLeft"),10),l=parseInt(n.element.css("marginRight"),10),t>=r&&!s||t<i&&s?t={left:n.element.position().left+(s?-a:o(n.element)+l),element:n.element,before:!1}:(t=e.grep(d,function(e){return e.left<=t&&t<=e.right||s&&t>e.right})[0],t&&(t={left:s?t.element.position().left+o(t.element)+l:t.element.position().left-a,element:t.element,before:!0})),t},_drag:function(e){var t=this._dropCuePosition(e.x.location);t&&h.css({left:t.left,right:"auto"})},_canDrag:function(e){var t=e.attr(i.attr("field"));return"false"!=e.attr(i.attr("groupable"))&&t&&(e.hasClass("k-group-indicator")||!this.indicator(t))},_canDrop:function(e,t,n){var i=e.next(),r=e[0]!==t[0]&&(!i[0]||t[0]!==i[0]||!s&&n>i.position().left||s&&n<i.position().left);return r},_dragEnd:function(t){var n=this,r=t.currentTarget.attr(i.attr("field")),o=n.indicator(r);t!==n.options.draggable&&!t.dropped&&o&&n._removeIndicator(e(o)),n._dragCancel()},_dragCancel:function(){h.remove(),this._dropCuePositions=[]},_intializePositions:function(){var t,n=this,r=e(".k-group-indicator",n.groupContainer);n._dropCuePositions=e.map(r,function(n){return n=e(n),t=i.getOffset(n).left,{left:parseInt(t,10),right:parseInt(t+o(n),10),element:n}})},_invalidateGroupContainer:function(){var e=this.groupContainer;e&&e.is(":empty")&&e.html(this.options.messages.empty)}});i.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.reorderable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(t,n){t=e(t),n?t.find(".k-drag-status").removeClass("k-i-plus").addClass("k-i-cancel"):t.find(".k-drag-status").removeClass("k-i-cancel").addClass("k-i-plus")}var i=window.kendo,r=i._outerWidth,o=i._outerHeight,a=i.getOffset,s=i.ui.Widget,l="change",d="k-reorderable",u=s.extend({init:function(t,u){var c,h=this,p=i.guid()+"-reorderable";s.fn.init.call(h,t,u),t=h.element.addClass(d),u=h.options,h.draggable=c=u.draggable||new i.ui.Draggable(t,{group:p,autoScroll:!0,filter:u.filter,hint:u.hint}),h.reorderDropCue=e('<div class="k-reorder-cue"></div></div>'),t.find(c.options.filter).kendoDropTarget({group:c.options.group,dragenter:function(e){var t,i,s,l;h._draggable&&(t=this.element,s=!h._dropTargetAllowed(t)||h._isLastDraggable(),n(e.draggable.hint,s),s||(i=a(t),l=i.left,u.inSameContainer&&!u.inSameContainer({source:t,target:h._draggable,sourceIndex:h._index(t),targetIndex:h._index(h._draggable)})?h._dropTarget=t:h._index(t)>h._index(h._draggable)&&(l+=r(t)),h.reorderDropCue.css({height:o(t),top:i.top,left:l}).appendTo(document.body)))},dragleave:function(e){n(e.draggable.hint,!0),h.reorderDropCue.remove(),h._dropTarget=null},drop:function(){var e,t;h._dropTarget=null,h._draggable&&(e=this.element,t=h._draggable,h._dropTargetAllowed(e)&&!h._isLastDraggable()&&h.trigger(l,{element:h._draggable,target:e,oldIndex:h._index(t),newIndex:h._index(e),position:a(h.reorderDropCue).left>a(e).left?"after":"before"}))}}),c.bind(["dragcancel","dragend","dragstart","drag"],{dragcancel:function(){h.reorderDropCue.remove(),h._draggable=null,h._elements=null},dragend:function(){h.reorderDropCue.remove(),h._draggable=null,h._elements=null},dragstart:function(e){h._draggable=e.currentTarget,h._elements=h.element.find(h.draggable.options.filter)},drag:function(e){var t,n;h._dropTarget&&!this.hint.find(".k-drag-status").hasClass("k-i-cancel")&&(t=a(h._dropTarget).left,n=r(h._dropTarget),h.reorderDropCue.css(e.pageX>t+n/2?{left:t+n}:{left:t}))}})},options:{name:"Reorderable",filter:"*"},events:[l],_isLastDraggable:function(){var e,t=this.options.inSameContainer,n=this._draggable[0],i=this._elements.get(),r=!1;if(!t)return!1;for(;!r&&i.length>0;)e=i.pop(),r=n!==e&&t({source:n,target:e,sourceIndex:this._index(n),targetIndex:this._index(e)});return!r},_dropTargetAllowed:function(e){var t=this.options.inSameContainer,n=this.options.dragOverContainers,i=this._draggable;return i[0]!==e[0]&&(!t||!n||(!!t({source:i,target:e,sourceIndex:this._index(i),targetIndex:this._index(e)})||n(this._index(i),this._index(e))))},_index:function(e){return this._elements.index(e)},destroy:function(){var t=this;s.fn.destroy.call(t),t.element.find(t.draggable.options.filter).each(function(){var t=e(this);t.data("kendoDropTarget")&&t.data("kendoDropTarget").destroy()}),t.draggable&&(t.draggable.destroy(),t.draggable.element=t.draggable=null),t.elements=t.reorderDropCue=t._elements=t._draggable=null}});i.ui.plugin(u)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.resizable.min",["kendo.core.min","kendo.draganddrop.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o=e.proxy,a=n.isFunction,s=e.extend,l="horizontal",d="vertical",u="start",c="resize",h="resizeend",p=r.extend({init:function(e,t){var n=this;r.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=d?l:d,n._positionMouse=n.orientation==l?"x":"y",n._position=n.orientation==l?"left":"top",n._sizingDom=n.orientation==l?"outerWidth":"outerHeight",n.draggable=new i.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:o(n._resize,n),dragcancel:o(n._cancel,n),dragstart:o(n._start,n),dragend:o(n._stop,n)}),n.userEvents=n.draggable.userEvents},events:[c,h,u],options:{name:"Resizable",orientation:l},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,r=n.options.max;return a(r)?r(e):r!==t?n._initialElementPosition+r-i:r},_min:function(e){var n=this,i=n.options.min;return a(i)?i(e):i!==t?n._initialElementPosition+i:i},_start:function(t){var n=this,i=n.options.hint,r=e(t.currentTarget);n._initialElementPosition=r.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=a(i)?e(i(r)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(u,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",r.css("cursor"))},_resize:function(e){var n,i=this,r=i._maxPosition,o=i._minPosition,a=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=o!==t?Math.max(o,a):a,i.position=n=r!==t?Math.min(r,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==r||n==o).css(i._position,n),i.resizing=!0,i.trigger(c,s(e,{position:n}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(h,s(t,{position:n.position})),e(document.body).css("cursor","")},_cancel:function(e){var n=this;n.hint&&(n.position=t,n.hint.css(n._position,n._initialElementPosition),n._stop(e))},destroy:function(){var e=this;r.fn.destroy.call(e),e.draggable&&e.draggable.destroy()},press:function(e){if(e){var t=e.position(),n=this;n.userEvents.press(t.left,t.top,e[0]),n.targetPosition=t,n.target=e}},move:function(e){var n=this,i=n._position,r=n.targetPosition,o=n.position;o===t&&(o=r[i]),r[i]=o+e,n.userEvents.move(r.left,r.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(p)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.sortable.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(t,n){try{return e.contains(t,n)||t==n}catch(i){return!1}}function i(e){return e.clone()}function r(e){return e.clone().removeAttr("id").css("visibility","hidden")}var o=window.kendo,a=o.ui.Widget,s=o._outerWidth,l=o._outerHeight,d="start",u="beforeMove",c="move",h="end",p="change",f="cancel",m="sort",g="remove",v="receive",_=">*",b=-1,k=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n.options.placeholder||(n.options.placeholder=r),n.options.hint||(n.options.hint=i),n.draggable=n._createDraggable()},events:[d,u,c,h,p,f],options:{name:"Sortable",hint:null,placeholder:null,filter:_,holdToDrag:!1,disabled:null,container:null,connectWith:null,handler:null,cursorOffset:null,axis:null,ignore:null,autoScroll:!1,cursor:"auto",moveOnDragEnter:!1},destroy:function(){this.draggable.destroy(),a.fn.destroy.call(this)},_createDraggable:function(){var t=this,n=t.element,i=t.options;return new o.ui.Draggable(n,{filter:i.filter,hint:o.isFunction(i.hint)?i.hint:e(i.hint),holdToDrag:i.holdToDrag,container:i.container?e(i.container):null,cursorOffset:i.cursorOffset,axis:i.axis,ignore:i.ignore,autoScroll:i.autoScroll,dragstart:e.proxy(t._dragstart,t),dragcancel:e.proxy(t._dragcancel,t),drag:e.proxy(t._drag,t),dragend:e.proxy(t._dragend,t)})},_dragstart:function(t){var n=this.draggedElement=t.currentTarget,i=this.options.disabled,r=this.options.handler,a=this.options.placeholder,s=this.placeholder=e(o.isFunction(a)?a.call(this,n):a);i&&n.is(i)?t.preventDefault():r&&!e(t.initialTarget).is(r)?t.preventDefault():this.trigger(d,{item:n,draggableEvent:t})?t.preventDefault():(n.css("display","none"),n.before(s),this._setCursor())},_dragcancel:function(){this._cancel(),this.trigger(f,{item:this.draggedElement}),this._resetCursor()},_drag:function(n){var i,r,o,a,s,l=this.draggedElement,d=this._findTarget(n),u={left:n.x.location,top:n.y.location},c={x:n.x.delta,y:n.y.delta},h=this.options.axis,p=this.options.moveOnDragEnter,f={item:l,list:this,draggableEvent:n};if("x"===h||"y"===h)return this._movementByAxis(h,u,c[h],f),t;if(d){if(i=this._getElementCenter(d.element),r={left:Math.round(u.left-i.left),top:Math.round(u.top-i.top)},e.extend(f,{target:d.element}),d.appendToBottom)return this._movePlaceholder(d,null,f),t;if(d.appendAfterHidden&&this._movePlaceholder(d,"next",f),this._isFloating(d.element)?c.x<0&&p||!p&&r.left<0?o="prev":(c.x>0&&p||!p&&r.left>0)&&(o="next"):c.y<0&&p||!p&&r.top<0?o="prev":(c.y>0&&p||!p&&r.top>0)&&(o="next"),o){for(s="prev"===o?jQuery.fn.prev:jQuery.fn.next,a=s.call(d.element);a.length&&!a.is(":visible");)a=s.call(a);a[0]!=this.placeholder[0]&&this._movePlaceholder(d,o,f)}}},_dragend:function(n){var i,r,o,a,s=this.placeholder,l=this.draggedElement,d=this.indexOf(l),u=this.indexOf(s),c=this.options.connectWith;return this._resetCursor(),o={action:m,item:l,oldIndex:d,newIndex:u,draggableEvent:n},u>=0?r=this.trigger(h,o):(i=s.parents(c).getKendoSortable(),o.action=g,a=e.extend({},o,{action:v,oldIndex:b,newIndex:i.indexOf(s)}),r=!(!this.trigger(h,o)&&!i.trigger(h,a))),r||u===d?(this._cancel(),t):(s.replaceWith(l),l.show(),this.draggable.dropped=!0,o={action:this.indexOf(l)!=b?m:g,item:l,oldIndex:d,newIndex:this.indexOf(l),draggableEvent:n},this.trigger(p,o),i&&(a=e.extend({},o,{action:v,oldIndex:b,newIndex:i.indexOf(l)}),i.trigger(p,a)),t)},_findTarget:function(n){var i,r,o=this._findElementUnderCursor(n),a=this.options.connectWith;return e.contains(this.element[0],o)?(i=this.items(),r=i.filter(o)[0]||i.has(o)[0],r?{element:e(r),sortable:this}:null):this.element[0]==o&&this._isEmpty()?{element:this.element,sortable:this,appendToBottom:!0}:this.element[0]==o&&this._isLastHidden()?(r=this.items().eq(0),{element:r,sortable:this,appendAfterHidden:!0}):a?this._searchConnectedTargets(o,n):t},_findElementUnderCursor:function(e){var t=o.elementUnderCursor(e),i=e.sender;return n(i.hint[0],t)&&(i.hint.hide(),t=o.elementUnderCursor(e),t||(t=o.elementUnderCursor(e)),i.hint.show()),t},_searchConnectedTargets:function(t,n){var i,r,o,a,s=e(this.options.connectWith);for(a=0;a<s.length;a++)if(i=s.eq(a).getKendoSortable(),e.contains(s[a],t)){if(i)return r=i.items(),o=r.filter(t)[0]||r.has(t)[0],o?(i.placeholder=this.placeholder,{element:e(o),sortable:i}):null}else if(s[a]==t){if(i&&i._isEmpty())return{element:s.eq(a),sortable:i,appendToBottom:!0};if(this._isCursorAfterLast(i,n))return o=i.items().last(),{element:o,sortable:i}}},_isCursorAfterLast:function(e,t){var n,i,r=e.items().last(),a={left:t.x.location,top:t.y.location};return n=o.getOffset(r),n.top+=l(r),n.left+=s(r),i=this._isFloating(r)?n.left-a.left:n.top-a.top,i<0},_movementByAxis:function(t,n,i,r){var o,a="x"===t?n.left:n.top,s=i<0?this.placeholder.prev():this.placeholder.next();s.length&&!s.is(":visible")&&(s=i<0?s.prev():s.next()),e.extend(r,{target:s}),o=this._getElementCenter(s),o&&(o="x"===t?o.left:o.top),s.length&&i<0&&a-o<0?this._movePlaceholder({element:s,sortable:this},"prev",r):s.length&&i>0&&a-o>0&&this._movePlaceholder({element:s,sortable:this},"next",r)},_movePlaceholder:function(e,t,n){var i=this.placeholder;e.sortable.trigger(u,n)||(t?"prev"===t?e.element.before(i):"next"===t&&e.element.after(i):e.element.append(i),e.sortable.trigger(c,n))},_setCursor:function(){var t,n=this.options.cursor;n&&"auto"!==n&&(t=e(document.body),this._originalCursorType=t.css("cursor"),t.css({cursor:n}),this._cursorStylesheet||(this._cursorStylesheet=e("<style>* { cursor: "+n+" !important; }</style>")),this._cursorStylesheet.appendTo(t))},_resetCursor:function(){this._originalCursorType&&(e(document.body).css("cursor",this._originalCursorType),this._originalCursorType=null,this._cursorStylesheet.remove())},_getElementCenter:function(e){var t=e.length?o.getOffset(e):null;return t&&(t.top+=l(e)/2,t.left+=s(e)/2),t},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_cancel:function(){this.draggedElement.show(),this.placeholder.remove()},_items:function(){var e,t=this.options.filter;return e=t?this.element.find(t):this.element.children()},indexOf:function(e){var t=this._items(),n=this.placeholder,i=this.draggedElement;return n&&e[0]==n[0]?t.not(i).index(e):t.not(n).index(e)},items:function(){var e=this.placeholder,t=this._items();return e&&(t=t.not(e)),t},_isEmpty:function(){return!this.items().length},_isLastHidden:function(){return 1===this.items().length&&this.items().is(":hidden")}});o.ui.plugin(k)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){if(!e.is(":visible"))return!1;var n=r.getOffset(e),i=t.left+t.width,o=t.top+t.height;return n.right=n.left+r._outerWidth(e),n.bottom=n.top+r._outerHeight(e),!(n.left>i||n.right<t.left||n.top>o||n.bottom<t.top)}var i,r=window.kendo,o=r.ui.Widget,a=e.proxy,s=Math.abs,l="aria-selected",d="k-state-selected",u="k-state-selecting",c="k-selectable",h="change",p=".kendoSelectable",f="k-state-unselecting",m="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",g=r.support.browser.msie,v=!1;!function(e){!function(){e('<div class="parent"><span /></div>').on("click",">*",function(){v=!0}).find("span").click().end().off()}()}(e),i=o.extend({init:function(t,n){var i,s=this;o.fn.init.call(s,t,n),s._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>"),s._lastActive=null,s.element.addClass(c),s.relatedTarget=s.options.relatedTarget,i=s.options.multiple,this.options.aria&&i&&s.element.attr("aria-multiselectable",!0),s.userEvents=new r.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(v?"":"."+c+" ")+s.options.filter,tap:a(s._tap,s),touchAction:i?"none":"pan-x pan-y"}),i&&s.userEvents.bind("start",a(s._start,s)).bind("move",a(s._move,s)).bind("end",a(s._end,s)).bind("select",a(s._select,s))},events:[h],options:{name:"Selectable",filter:">*",inputSelectors:m,multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,r=!1;for(e=e[0],t=0;t<i;t++)if(n[t]===e){r=!0;break}return r},_tap:function(t){var n,i=e(t.target),r=this,o=t.event.ctrlKey||t.event.metaKey,a=r.options.multiple,s=a&&t.event.shiftKey,l=t.event.which,u=t.event.button;!r._isElement(i.closest("."+c))||l&&3==l||u&&2==u||this._allowSelection(t.event.target)&&(n=i.hasClass(d),a&&o||r.clear(),i=i.add(r.relatedTarget(i)),s?r.selectRange(r._firstSelectee(),i,t):(n&&o?(r._unselect(i),r._notify(h,t)):r.value(i,t),r._lastActive=r._downTarget=i))},_start:function(n){var i,r=this,o=e(n.target),a=o.hasClass(d),s=n.event.ctrlKey||n.event.metaKey;if(this._allowSelection(n.event.target)){if(r._downTarget=o,!r._isElement(o.closest("."+c)))return r.userEvents.cancel(),t;r.options.useAllItems?r._items=r.element.find(r.options.filter):(i=o.closest(r.element),r._items=i.find(r.options.filter)),n.sender.capture(),r._marquee.appendTo(document.body).css({left:n.x.client+1,top:n.y.client+1,width:0,height:0}),s||r.clear(),o=o.add(r.relatedTarget(o)),a&&(r._selectElement(o,!0),s&&o.addClass(f))}},_move:function(e){var t=this,n={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:s(e.x.initialDelta),height:s(e.y.initialDelta)};t._marquee.css(n),t._invalidateSelectables(n,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(e){var t,n=this;n._marquee.remove(),n._unselect(n.element.find(n.options.filter+"."+f)).removeClass(f),t=n.element.find(n.options.filter+"."+u),t=t.add(n.relatedTarget(t)),n.value(t,e),n._lastActive=n._downTarget,n._items=null},_invalidateSelectables:function(e,t){var i,r,o,a,s=this._downTarget[0],l=this._items;for(i=0,r=l.length;i<r;i++)a=l.eq(i),o=a.add(this.relatedTarget(a)),n(a,e)?a.hasClass(d)?t&&s!==a[0]&&o.removeClass(d).addClass(f):a.hasClass(u)||a.hasClass(f)||o.addClass(u):a.hasClass(u)?o.removeClass(u):t&&a.hasClass(f)&&o.removeClass(f).addClass(d)},value:function(e,n){var i=this,r=a(i._selectElement,i);return e?(e.each(function(){r(this)}),i._notify(h,n),t):i.element.find(i.options.filter+"."+d)},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value(),e.length>0?e[0]:t.element.find(t.options.filter)[0])},_selectElement:function(t,n){var i=e(t),r=!n&&this._notify("select",{element:t});i.removeClass(u),r||(i.addClass(d),this.options.aria&&i.attr(l,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){return e.removeClass(d),this.options.aria&&e.attr(l,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!g||g&&!e(r._activeElement()).is(this.options.inputSelectors))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(this.options.inputSelectors)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+d);this._unselect(e)},selectRange:function(t,n,i){var r,o,a,s=this;for(s.clear(),s.element.length>1&&(a=s.options.continuousItems()),a&&a.length||(a=s.element.find(s.options.filter)),t=e.inArray(e(t)[0],a),n=e.inArray(e(n)[0],a),t>n&&(o=t,t=n,n=o),s.options.useAllItems||(n+=s.element.length-1),r=t;r<=n;r++)s._selectElement(a[r]);s._notify(h,i)},destroy:function(){var e=this;o.fn.destroy.call(e),e.element.off(p),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),i.parseOptions=function(e){var t="string"==typeof e&&e.toLowerCase();return{multiple:t&&t.indexOf("multiple")>-1,cell:t&&t.indexOf("cell")>-1}},r.ui.plugin(i)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.button.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=n.keys,a="click",s="k-button",l="k-button-icon",d="k-button-icontext",u=".kendoButton",c="disabled",h="k-state-disabled",p="k-state-focused",f="k-state-active",m=i.extend({init:function(e,t){var o=this;i.fn.init.call(o,e,t),e=o.wrapper=o.element,t=o.options,e.addClass(s).attr("role","button"),t.enable=t.enable&&!e.attr(c),o.enable(t.enable),t.enable&&o._tabindex(),o._graphics(),e.on(a+u,r(o._click,o)).on("focus"+u,r(o._focus,o)).on("blur"+u,r(o._blur,o)).on("keydown"+u,r(o._keydown,o)).on("keyup"+u,r(o._keyup,o)),n.notify(o)},destroy:function(){var e=this;e.wrapper.off(u),i.fn.destroy.call(e)},events:[a],options:{name:"Button",icon:"",spriteCssClass:"",imageUrl:"",enable:!0},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(a,{event:e})&&e.preventDefault()},_focus:function(){this.options.enable&&this.element.addClass(p)},_blur:function(){this.element.removeClass(p)},_keydown:function(e){var t=this;e.keyCode!=o.ENTER&&e.keyCode!=o.SPACEBAR||(t.options.enable&&t.element.addClass(f),t._isNativeButton()||(e.keyCode==o.SPACEBAR&&e.preventDefault(),t._click(e)))},_keyup:function(){this.element.removeClass(f)},_graphics:function(){var t,n,i,r=this,o=r.element,a=r.options,s=a.icon,u=a.spriteCssClass,c=a.imageUrl;(u||c||s)&&(i=!0,o.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(t,n){(1==n.nodeType||3==n.nodeType&&e.trim(n.nodeValue).length>0)&&(i=!1)}),o.addClass(i?l:d)),s?(t=o.children("span.k-icon").first(),t[0]||(t=e('<span class="k-icon"></span>').prependTo(o)),t.addClass("k-i-"+s)):u?(t=o.children("span.k-sprite").first(),t[0]||(t=e('<span class="k-sprite"></span>').prependTo(o)),t.addClass(u)):c&&(n=o.children("img.k-image").first(),n[0]||(n=e('<img alt="icon" class="k-image" />').prependTo(o)),
n.attr("src",c))},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass(h,!e).attr("aria-disabled",!e).attr(c,!e),e&&n._tabindex();try{i.blur()}catch(r){}}});n.ui.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.buttongroup.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(n,r){n!==t&&e('<span class="k-badge">'+i.htmlEncode(n)+"</span>").appendTo(r)}var i=window.kendo,r=i.ui,o=r.Widget,a=i.keys,s=e.proxy,l=".kendoButtonGroup",d="k-widget",u="k-button-group",c="k-button",h="k-button-icontext",p="k-button-icon",f="k-state-active",m="k-state-focused",g="k-state-disabled",v="select",_="click",b="keydown",k="focus",w="blur",y="mousedown",x='# var item = data; ## var text = item.text; ## var selected = item.selected; ## var enabled = item.enabled; ## var icon = item.icon; ## var badge = item.badge; ## var image = item.imageUrl; #<span class="#= selected ? " '+f+'" : "" #" #= enabled === false ? "disabled" : "" # # if (icon && !image) { #'+i.attr("icon")+'="#=icon#"# } ## if (badge) { #'+i.attr("badge")+'="#=badge#"# } #># if (image) { #<img alt="icon" src="#=image#" /># } ## if (text) { ##= text ## } #</span>',C=o.extend({init:function(t,n){var i,r,a,h=this;if(o.fn.init.call(h,t,n),h.wrapper=h.element,h.options.items)for(i=0;i<h.options.items.length;i++)r=h.options.items[i],a=e(h._renderItem(h.options.items[i])),r.attributes&&a.attr(r.attributes),a.appendTo(h.element);h.selectedIndices=[],h.element.addClass(d+" "+u).attr("role","group").attr("tabindex",h.element.attr("tabindex")||"0").children().each(function(){var t=e(this);h._button.bind(h)(t)}),h._enable=!0,h.options.enable||(h._enable=!1,h.element.attr("aria-disabled",!0).addClass(g)),h.select(h.options.index),h.element.on(_+l,"."+c,s(h._click,h)).on(k+l,s(h._focus,h)).on(b+l,s(h._keyDown,h)).on(w+l,function(){h.preventFocus=!1,h.element.find("."+c).removeClass(m)}).on(y+l,function(){h.preventFocus=!0})},events:[v],options:{name:"ButtonGroup",selection:"single",index:-1,enable:!0},current:function(){return this.element.find("."+f)},_renderItem:function(e){return i.template(x,{useWithBlock:!1})(e)},_focus:function(){var t=e(this.element);this.preventFocus||(t.find("."+f).length?t.find("."+f).first().focus().addClass(m):t.children().first().focus().addClass(m))},_keyDown:function(t){var n,r=this,o=e(r.element),s=o.find("."+c),l=o.find("."+m),d=s.index(l),u=i.support.isRtl(r.element);t.keyCode===a.LEFT&&!u||t.keyCode===a.RIGHT&&u?(l.removeClass(m),n=0===d?s.eq(s.length-1):e(s[d-1]),n.focus().addClass(m),t.preventDefault()):t.keyCode===a.LEFT&&u||t.keyCode===a.RIGHT&&!u?(l.removeClass(m),n=d+1===s.length?s.eq(0):e(s[d+1]),n.focus().addClass(m),t.preventDefault()):t.keyCode!==a.ENTER&&t.keyCode!==a.SPACEBAR||(r._select(l),t.preventDefault())},select:function(n){var i,r=this,o=-1;n!==t&&n!==-1&&(r.element.find("."+c).removeClass(m),"number"==typeof n?(o=n,n=r.element.children().eq(n)):n.nodeType&&(n=e(n),o=n.index()),"multiple"===r.options.selection?(i="true"===n.attr("aria-pressed"),n.attr("aria-pressed",!i).toggleClass(f),r.selectedIndices.indexOf(o)===-1?r.selectedIndices.push(o):r.selectedIndices.splice(r.selectedIndices.indexOf(o),1)):(r.selectedIndices=[],r.current().attr("aria-pressed",!1).removeClass(f),n.attr("aria-pressed",!0).addClass(f),r.selectedIndices.push(o)),r.trigger(v,{indices:r.selectedIndices}))},badge:function(t,r){var o,a=this.element;return r=i.htmlEncode(r),isNaN(t)||(t=a.children().get(t)),t=a.find(t),o=e(t.children(".k-badge")[0]||n(r,t)),r||0===r?(o.html(r),this):r===!1?(o.empty().remove(),this):o.html()},enable:function(e){t===e&&(e=!0),this.element.attr("aria-disabled",!e).toggleClass(g,!e),this._enable=this.options.enable=e},destroy:function(){var e=this;e.element.off(l),o.fn.destroy.call(e)},_button:function(t){var r=i.attrValue(t,"icon"),o=i.attrValue(t,"badge"),a=t.find("img").addClass("k-image"),s=!0;t.attr("aria-pressed",!1).attr("role","button").addClass(c),(t.is("[disabled]")||t.hasClass(g))&&t.addClass(g).attr("aria-disabled",!0).removeAttr("disabled"),t.is("."+f)&&(t.removeClass(f),(!t.hasClass(g)&&"single"===this.options.selection||"multiple"===this.options.selection)&&this.select(t[0])),!a[0]&&r&&t.prepend(e('<span class="k-icon k-i-'+r+'" />')),t.contents().filter(function(){return!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")}).each(function(){(1==this.nodeType||3==this.nodeType&&e.trim(this.nodeValue).length>0)&&(s=!1)}),(a[0]||r)&&t.addClass(s?p:h),(o||0===o)&&n(o,t)},_click:function(t){var n=e(t.target).closest("."+c);t.isDefaultPrevented()||this._select(n)},_select:function(e){var n=e;return this.element.find("."+c).removeClass(m),!this._enable||n.is("."+g)?(n.addClass(m),t):(this.select(e[0]),n.addClass(m),t)}});r.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pager.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e,t,n,i,r){return e({idx:t,text:n,ns:d.ns,numeric:i,title:r||""})}function i(e,t,n){return C({className:e.substring(1),text:t,wrapClassName:n||""})}function r(e,t,n,i){e.find(t).parent().attr(d.attr("page"),n).attr("tabindex",-1).toggleClass("k-state-disabled",i)}function o(e,t){r(e,p,1,t<=1)}function a(e,t){r(e,m,Math.max(1,t-1),t<=1)}function s(e,t,n){r(e,g,Math.min(n,t+1),t>=n)}function l(e,t,n){r(e,f,n,t>=n)}var d=window.kendo,u=d.ui,c=u.Widget,h=e.proxy,p=".k-i-arrow-end-left",f=".k-i-arrow-end-right",m=".k-i-arrow-60-left",g=".k-i-arrow-60-right",v="change",_=".kendoPager",b="click",k="keydown",w="disabled",y="down",x=e(document.documentElement),C=d.template('<a href="\\#" aria-label="#=text#" title="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>'),T=c.extend({init:function(t,n){var r,u,w,x,C=this;c.fn.init.call(C,t,n),n=C.options,C.dataSource=d.data.DataSource.create(n.dataSource),C.linkTemplate=d.template(C.options.linkTemplate),C.selectTemplate=d.template(C.options.selectTemplate),C.currentPageTemplate=d.template(C.options.currentPageTemplate),r=C.page(),u=C.totalPages(),C._refreshHandler=h(C.refresh,C),C.dataSource.bind(v,C._refreshHandler),C.downEvent=d.applyEventMap(y,d.guid()),n.previousNext&&(C.element.find(p).length||(C.element.append(i(p,n.messages.first,"k-pager-first")),o(C.element,r,u)),C.element.find(m).length||(C.element.append(i(m,n.messages.previous)),a(C.element,r,u))),n.numeric&&(C.list=C.element.find(".k-pager-numbers"),C.list.length||(C.list=e('<ul class="k-pager-numbers k-reset" />').appendTo(C.element))),n.input&&(C.element.find(".k-pager-input").length||C.element.append('<span class="k-pager-input k-label">'+n.messages.page+'<input class="k-textbox">'+d.format(n.messages.of,u)+"</span>"),C.element.on(k+_,".k-pager-input input",h(C._keydown,C))),n.previousNext&&(C.element.find(g).length||(C.element.append(i(g,n.messages.next)),s(C.element,r,u)),C.element.find(f).length||(C.element.append(i(f,n.messages.last,"k-pager-last")),l(C.element,r,u))),n.pageSizes&&(C.element.find(".k-pager-sizes").length||(w=n.pageSizes.length?n.pageSizes:["all",5,10,20],x=e.map(w,function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"<option value='all'>"+n.messages.allPages+"</option>":"<option>"+e+"</option>"}),e('<span class="k-pager-sizes k-label"><select/>'+n.messages.itemsPerPage+"</span>").appendTo(C.element).find("select").html(x.join("")).end().appendTo(C.element)),C.element.find(".k-pager-sizes select").val(C.pageSize()),d.ui.DropDownList&&C.element.find(".k-pager-sizes select").show().kendoDropDownList(),C.element.on(v+_,".k-pager-sizes select",h(C._change,C))),n.refresh&&(C.element.find(".k-pager-refresh").length||C.element.append('<a href="#" class="k-pager-refresh k-link" title="'+n.messages.refresh+'" aria-label="'+n.messages.refresh+'"><span class="k-icon k-i-reload"></span></a>'),C.element.on(b+_,".k-pager-refresh",h(C._refreshClick,C))),n.info&&(C.element.find(".k-pager-info").length||C.element.append('<span class="k-pager-info k-label" />')),C.element.on(b+_,"a",h(C._click,C)).addClass("k-pager-wrap k-widget k-floatwrap"),C.element.on(b+_,".k-current-page",h(C._toggleActive,C)),n.autoBind&&C.refresh(),d.notify(C)},destroy:function(){var e=this;c.fn.destroy.call(e),e.element.off(_),e.dataSource.unbind(v,e._refreshHandler),e._refreshHandler=null,d.destroy(e.element),e.element=e.list=null},events:[v],options:{name:"Pager",selectTemplate:'<li><span class="k-state-selected">#=text#</span></li>',currentPageTemplate:'<li class="k-current-page"><span class="k-link k-pager-nav">#=text#</span></li>',linkTemplate:'<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',buttonCount:10,autoBind:!0,numeric:!0,info:!0,input:!1,previousNext:!0,pageSizes:!1,refresh:!1,messages:{allPages:"All",display:"{0} - {1} of {2} items",empty:"No items to display",page:"Page",of:"of {0}",itemsPerPage:"items per page",first:"Go to the first page",previous:"Go to the previous page",next:"Go to the next page",last:"Go to the last page",refresh:"Refresh",morePages:"More pages"}},setDataSource:function(e){var t=this;t.dataSource.unbind(v,t._refreshHandler),t.dataSource=t.options.dataSource=e,e.bind(v,t._refreshHandler),t.options.autoBind&&e.fetch()},refresh:function(t){var i,r,u,c,h,p,f=this,m=1,g=f.page(),v="",_=f.options,b=f.pageSize(),k=f.dataSource.total(),y=f.totalPages(),C=f.linkTemplate,T=_.buttonCount;if(x.unbind(f.downEvent,e.proxy(f._hideList,f)),!t||"itemchange"!=t.action){if(_.numeric){for(g>T&&(u=g%T,m=0===u?g-T+1:g-u+1),r=Math.min(m+T-1,y),m>1&&(v+=n(C,m-1,"...",!1,_.messages.morePages)),i=m;i<=r;i++)v+=n(i==g?f.selectTemplate:C,i,i,!0);r<y&&(v+=n(C,i,"...",!1,_.messages.morePages)),""===v&&(v=f.selectTemplate({text:0})),v=this.currentPageTemplate({text:g})+v,f.list.removeClass("k-state-expanded").html(v)}_.info&&(v=k>0?d.format(_.messages.display,f.dataSource.options.endless?1:Math.min((g-1)*b+1,k),Math.min(g*b,k),k):_.messages.empty,f.element.find(".k-pager-info").html(v)),_.input&&f.element.find(".k-pager-input").html(f.options.messages.page+'<input class="k-textbox" aria-label="'+g+'">'+d.format(_.messages.of,y)).find("input").val(g).attr(w,k<1).toggleClass("k-state-disabled",k<1),_.previousNext&&(o(f.element,g,y),a(f.element,g,y),s(f.element,g,y),l(f.element,g,y)),_.pageSizes&&(c=f.element.find(".k-pager-sizes option[value='all']").length>0,h=c&&b===this.dataSource.total(),p=b,h&&(b="all",p=_.messages.allPages),f.element.find(".k-pager-sizes select").val(b).attr("aria-label",b).filter("["+d.attr("role")+"=dropdownlist]").kendoDropDownList("value",b).kendoDropDownList("text",p))}},_keydown:function(e){if(e.keyCode===d.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),n=parseInt(t.val(),10);(isNaN(n)||n<1||n>this.totalPages())&&(n=this.page()),t.val(n),this.page(n)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var t=e.currentTarget.value,n=parseInt(t,10),i=this.dataSource;isNaN(n)?"all"==(t+"").toLowerCase()&&i.pageSize(i.total()):i.pageSize(n)},_toggleActive:function(){var t=this;t.list.hasClass("k-state-expanded")?x.unbind(t.downEvent,e.proxy(t._hideList,t)):x.bind(t.downEvent,e.proxy(t._hideList,t)),t.list.toggleClass("k-state-expanded")},_hideList:function(t){var n=this,i=d.eventTarget(t);e.contains(n.list[0],i)||(x.unbind(n.downEvent,e.proxy(n._hideList,n)),n.list.removeClass("k-state-expanded"))},_click:function(t){var n=e(t.currentTarget);t.preventDefault(),n.is(".k-state-disabled")||this.page(n.attr(d.attr("page")))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/(this.pageSize()||1))},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(e){return e===t?this.dataSource.total()>0?this.dataSource.page():0:(this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(v,{index:e})),t)}});u.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.notification.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=e.extend,a=window.setTimeout,s="click",l="show",d="hide",u="k-notification",c=".k-notification-wrap .k-i-close",h="k-hiding",p="info",f="success",m="warning",g="error",v="top",_="left",b="bottom",k="right",w="up",y=".kendoNotification",x='<div class="k-widget k-popup k-notification"></div>',C='<div class="k-notification-wrap"><span class="k-icon k-i-#=typeIcon#" title="#=typeIcon#"></span>#=content#<span class="k-icon k-i-close" title="Hide"></span></div>',T=C.replace("#=content#","#:content#"),S=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),r=o.options,r.appendTo&&e(r.appendTo).is(t)||o.element.hide(),o._compileTemplates(r.templates),o._guid="_"+n.guid(),o._isRtl=n.support.isRtl(t),o._compileStacking(r.stacking,r.position.top,r.position.left),n.notify(o)},events:[l,d],options:{name:"Notification",position:{pinned:!0,top:null,left:null,bottom:20,right:20},stacking:"default",hideOnClick:!0,button:!1,allowHideAfter:0,autoHideAfter:5e3,appendTo:null,width:null,height:null,templates:[],animation:{open:{effects:"fade:in",duration:300},close:{effects:"fade:out",duration:600,hide:!0}}},_compileTemplates:function(t){var i=this,r=n.template;i._compiled={},e.each(t,function(t,n){i._compiled[n.type]=r(n.template||e("#"+n.templateId).html())}),i._defaultCompiled=r(C),i._safeCompiled=r(T)},_getCompiled:function(e,t){var n=t?this._safeCompiled:this._defaultCompiled;return e?this._compiled[e]||n:n},_compileStacking:function(e,t,n){var i,r,o=this,a={paddingTop:0,paddingRight:0,paddingBottom:0,paddingLeft:0},s=null!==n?_:k;switch(e){case"down":i=b+" "+s,r=v+" "+s,delete a.paddingBottom;break;case k:i=v+" "+k,r=v+" "+_,delete a.paddingRight;break;case _:i=v+" "+_,r=v+" "+k,delete a.paddingLeft;break;case w:i=v+" "+s,r=b+" "+s,delete a.paddingTop;break;default:null!==t?(i=b+" "+s,r=v+" "+s,delete a.paddingBottom):(i=v+" "+s,r=b+" "+s,delete a.paddingTop)}o._popupOrigin=i,o._popupPosition=r,o._popupPaddings=a},_attachPopupEvents:function(e,t){function n(e){e.on(s+y,function(){r._hidePopup(t)})}var i,r=this,o=e.allowHideAfter,l=!isNaN(o)&&o>0;e.hideOnClick?t.bind("activate",function(){l?a(function(){n(t.element)},o):n(t.element)}):e.button&&(i=t.element.find(c),l?a(function(){n(i)},o):n(i))},_showPopup:function(t,i){var r,s,l=this,d=i.autoHideAfter,u=i.position.left,p=i.position.top;s=e("."+l._guid+":not(."+h+")").last(),r=new n.ui.Popup(t,{anchor:s[0]?s:document.body,origin:l._popupOrigin,position:l._popupPosition,animation:i.animation,modal:!0,collision:"",isRtl:l._isRtl,close:function(){l._triggerHide(this.element)},deactivate:function(e){e.sender.element.off(y),e.sender.element.find(c).off(y),e.sender.destroy()}}),l._attachPopupEvents(i,r),t.removeClass("k-group k-reset"),s[0]?r.open():(null===u&&(u=e(window).width()-t.width()-i.position.right),null===p&&(p=e(window).height()-t.height()-i.position.bottom),r.open(u,p)),r.wrapper.addClass(l._guid).css(o({margin:0,zIndex:10050},l._popupPaddings)),i.position.pinned?(r.wrapper.css("position","fixed"),s[0]&&l._togglePin(r.wrapper,!0)):s[0]||l._togglePin(r.wrapper,!1),d>0&&a(function(){l._hidePopup(r)},d)},_hidePopup:function(e){e.wrapper.addClass(h),e.close()},_togglePin:function(t,n){var i=e(window),r=n?-1:1;t.css({top:parseInt(t.css(v),10)+r*i.scrollTop(),left:parseInt(t.css(_),10)+r*i.scrollLeft()})},_attachStaticEvents:function(e,t){function n(e){e.on(s+y,r(i._hideStatic,i,t))}var i=this,o=e.allowHideAfter,l=!isNaN(o)&&o>0;e.hideOnClick?l?a(function(){n(t)},o):n(t):e.button&&(l?a(function(){n(t.find(c))},o):n(t.find(c)))},_showStatic:function(e,t){var n=this,i=t.autoHideAfter,r=t.animation,o=t.stacking==w||t.stacking==_?"prependTo":"appendTo";e.removeClass("k-popup").addClass(n._guid)[o](t.appendTo).hide().kendoAnimate(r.open||!1),n._attachStaticEvents(t,e),i>0&&a(function(){n._hideStatic(e)},i)},_hideStatic:function(e){e.kendoAnimate(o(this.options.animation.close||!1,{complete:function(){e.off(y).find(c).off(y),e.remove()}})),this._triggerHide(e)},_triggerHide:function(e){this.trigger(d,{element:e}),this.angular("cleanup",function(){return{elements:e}})},show:function(i,r,a){var s,d,c=this,h=c.options,f=e(x);return r||(r=p),null!==i&&i!==t&&""!==i&&(n.isFunction(i)&&(i=i()),d={typeIcon:r,content:""},s=e.isPlainObject(i)?o(d,i):o(d,{content:i}),f.addClass(u+"-"+r).toggleClass(u+"-button",h.button).attr("data-role","alert").css({width:h.width,height:h.height}).append(c._getCompiled(r,a)(s)),c.angular("compile",function(){return{elements:f,data:[{dataItem:s}]}}),e(h.appendTo)[0]?c._showStatic(f,h):c._showPopup(f,h),c.trigger(l,{element:f})),c},showText:function(e,t){this.show(e,t,!0)},info:function(e){return this.show(e,p)},success:function(e){return this.show(e,f)},warning:function(e){return this.show(e,m)},error:function(e){return this.show(e,g)},hide:function(){var t=this,n=t.getNotifications();return n.each(t.options.appendTo?function(n,i){t._hideStatic(e(i))}:function(n,i){var r=e(i).data("kendoPopup");r&&t._hidePopup(r)}),t},getNotifications:function(){var t=this,n=e("."+t._guid+":not(."+h+")");return t.options.appendTo?n:n.children("."+u)},setOptions:function(e){var n,r=this;i.fn.setOptions.call(r,e),n=r.options,e.templates!==t&&r._compileTemplates(n.templates),e.stacking===t&&e.position===t||r._compileStacking(n.stacking,n.position.top,n.position.left)},destroy:function(){i.fn.destroy.call(this),this.getNotifications().off(y).find(c).off(y)}});n.ui.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tooltip.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){for(;e.length&&!i(e);)e=e.parent()}function i(e){var t=e.data(a.ns+"title");if(t)return e.attr("title",t),e.removeData(a.ns+"title"),!0}function r(e){var t=e.attr("title");if(t)return e.data(a.ns+"title",t),e.attr("title",""),!0}function o(e){for(;e.length&&!e.is("body")&&!r(e);)e=e.parent()}var a=window.kendo,s=a.ui.Widget,l=a.ui.Popup,d=a.isFunction,u=e.isPlainObject,c=e.extend,h=e.proxy,p=e(document),f=a.isLocalUrl,m="_tt_active",g="aria-describedby",v="show",_="hide",b="error",k="contentLoad",w="requestStart",y="k-content-frame",x='<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close" title="Close"></a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>',C=a.template("<iframe frameborder='0' class='"+y+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),T=".kendoTooltip",S={bottom:{origin:"bottom center",position:"top center"},top:{origin:"top center",position:"bottom center"},left:{origin:"center left",position:"center right",collision:"fit flip"},right:{origin:"center right",position:"center left",collision:"fit flip"},center:{position:"center center",origin:"center center"}},D={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},F={bottom:"n",top:"s",left:"e",right:"w",center:"n"},E={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}},A=function(e){return e.target.data(a.ns+"title")},I=s.extend({init:function(e,t){var n,i=this;s.fn.init.call(i,e,t),n=i.options.position.match(/left|right/)?"horizontal":"vertical",i.dimensions=E[n],i._documentKeyDownHandler=h(i._documentKeyDown,i),i.element.on(i.options.showOn+T,i.options.filter,h(i._showOn,i)),this._isShownOnFocus()||i.element.on("mouseenter"+T,i.options.filter,h(i._mouseenter,i)),this.options.autoHide&&!this._isShownOnFocus()&&i.element.on("mouseleave"+T,i.options.filter,h(i._mouseleave,i)),this.options.autoHide&&this._isShownOnFocus()&&i.element.on("blur"+T,i.options.filter,h(i._blur,i))},options:{name:"Tooltip",filter:"",content:A,showAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[v,_,k,b,w],_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_mouseenter:function(t){o(e(t.currentTarget))},_showOn:function(t){var n=this,i=e(t.currentTarget);n.options.showOn&&n.options.showOn.match(/click/)?n._show(i):n._isShownOnFocus()?(o(i),n._show(i)):(clearTimeout(n.timeout),n.timeout=setTimeout(function(){n._show(i)},n.options.showAfter))},_appendContent:function(e){var t,n=this,i=n.options.content,r=n.content,o=n.options.iframe;u(i)&&i.url?("iframe"in n.options||(o=!f(i.url)),n.trigger(w,{options:i,target:e}),o?(r.hide(),t=r.find("."+y)[0],t?t.src=i.url||t.src:r.html(C({content:i})),r.find("."+y).off("load"+T).on("load"+T,function(){n.trigger(k),r.show()})):(r.empty(),a.ui.progress(r,!0),n._ajaxRequest(i))):i&&d(i)?(i=i({sender:this,target:e}),r.html(i||"")):r.html(i),n.angular("compile",function(){return{elements:r}})},_ajaxRequest:function(e){var t=this;jQuery.ajax(c({type:"GET",dataType:"html",cache:!1,error:function(e,n){a.ui.progress(t.content,!1),t.trigger(b,{status:n,xhr:e})},success:h(function(e){a.ui.progress(t.content,!1),t.content.html(e),t.trigger(k)},t)},e))},_documentKeyDown:function(e){e.keyCode===a.keys.ESC&&this.hide()},refresh:function(){var e=this,t=e.popup;t&&t.options.anchor&&e._appendContent(t.options.anchor)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,o(e),this._show(e)},_show:function(e){var t=this,i=t.target();t.popup||t._initPopup(),i&&i[0]!=e[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),i&&i[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",function(){n(e),e.removeAttr(g),this.element.removeAttr("id").attr("aria-hidden",!0),p.off("keydown"+T,t._documentKeyDownHandler)}),t.popup.open()},_initPopup:function(){var t=this,n=t.options,i=e(a.template(x)({callout:n.callout&&"center"!==n.position,dir:F[n.position],autoHide:n.autoHide}));t.popup=new l(i,c({activate:function(){var e=this.options.anchor,i=e[0].id||t.element[0].id;i&&(e.attr(g,i+m),this.element.attr("id",i+m)),n.callout&&t._positionCallout(),this.element.removeAttr("aria-hidden"),p.on("keydown"+T,t._documentKeyDownHandler),t.trigger(v)},close:function(){t.trigger(_)},copyAnchorStyles:!1,animation:n.animation},S[n.position])),i.css({width:n.width,height:n.height}),t.content=i.find(".k-tooltip-content"),t.arrow=i.find(".k-callout"),n.autoHide&&!this._isShownOnFocus()?i.on("mouseleave"+T,h(t._mouseleave,t)):i.on("click"+T,".k-tooltip-button",h(t._closeButtonClick,t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){this._closePopup(e.currentTarget),clearTimeout(this.timeout)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup?this.popup.close():n(e(t))},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,r=i.offset,o=t.popup,a=o.options.anchor,s=e(a).offset(),l=parseInt(t.arrow.css("border-top-width"),10),d=e(o.element).offset(),u=F[o.flipped?D[n]:n],c=s[r]-d[r]+e(a)[i.size]()/2-l;t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+u).css(r,c)},target:function(){return this.popup?this.popup.options.anchor:null},destroy:function(){var e=this.popup;e&&(e.element.off(T),e.destroy()),clearTimeout(this.timeout),this.element.off(T),p.off("keydown"+T,this._documentKeyDownHandler),s.fn.destroy.call(this)}});a.ui.plugin(I)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.list.min",["kendo.data.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&""!==e&&null!==e&&("boolean"===n?e=!!e:"number"===n?e=+e:"string"===n&&(e=""+e)),e}function i(e){return e[e.length-1]}function r(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function o(e,t){var n,i,r,o,a=t.length,s=e.length,l=[],d=[];if(s)for(r=0;r<s;r++){for(n=e[r],i=!1,o=0;o<a;o++)if(n===t[o]){i=!0,l.push({index:r,item:n});break}i||d.push(n)}return{changed:l,unchanged:d}}function a(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function s(t,n){var i,r=!1;return t.filters&&(i=e.grep(t.filters,function(e){return r=s(e,n),e.filters?e.filters.length:e.field!=n}),r||t.filters.length===i.length||(r=!0),t.filters=i),r}var l,d,u=window.kendo,c=u.ui,h=u._outerWidth,p=u._outerHeight,f=c.Widget,m=u.keys,g=u.support,v=u.htmlEncode,_=u._activeElement,b=u.data.ObservableArray,k="id",w="change",y="k-state-focused",x="k-state-hover",C="k-i-loading",T="k-hidden",S=".k-group-header",D="_label",F="open",E="close",A="cascade",I="select",R="selected",M="requestStart",z="requestEnd",H="width",N=e.extend,B=e.proxy,P=e.isArray,L=g.browser,O=L.msie,V=O&&L.version<9,W=/"/g,U={ComboBox:"DropDownList",DropDownList:"ComboBox"},q=u.ui.DataBoundWidget.extend({init:function(t,n){var i,r=this,o=r.ns;f.fn.init.call(r,t,n),t=r.element,n=r.options,r._isSelect=t.is(I),r._isSelect&&r.element[0].length&&(n.dataSource||(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value")),r.ul=e('<ul unselectable="on" class="k-list k-reset"/>').attr({tabIndex:-1,"aria-hidden":!0}),r.list=e("<div class='k-list-container'/>").append(r.ul).on("mousedown"+o,B(r._listMousedown,r)),i=t.attr(k),i&&(r.list.attr(k,i+"-list"),r.ul.attr(k,i+"_listbox")),r._header(),r._noData(),r._footer(),r._accessors(),r._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:"No data found."},setOptions:function(e){f.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData()},focus:function(){this._focused.focus()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_listOptions:function(t){var n=this,i=n.options,r=i.virtual,o={change:B(n._listChange,n)},a=B(n._listBound,n);return r="object"==typeof r?r:{},t=e.extend({autoBind:!1,selectable:!0,dataSource:n.dataSource,click:B(n._click,n),activate:B(n._activateItem,n),deactivate:B(n._deactivateItem,n),dataBinding:function(){n.trigger("dataBinding")},dataBound:a,height:i.height,dataValueField:i.dataValueField,dataTextField:i.dataTextField,groupTemplate:i.groupTemplate,fixedGroupTemplate:i.fixedGroupTemplate,template:i.template},t,r,o),t.template||(t.template="#:"+u.expr(t.dataTextField,"data")+"#"),i.$angular&&(t.$angular=i.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:B(e._listChange,e)});e.listView=e.options.virtual?new u.ui.VirtualList(e.ul,t):new u.ui.StaticList(e.ul,t),e.listView.bind("listBound",B(e._listBound,e)),e._setListValue()},_setListValue:function(e){e=e||this.options.value,e!==t&&this.listView.value(e).done(B(this._updateSelectionState,this))},_updateSelectionState:e.noop,_listMousedown:function(e){this.filterInput&&this.filterInput[0]===e.target||e.preventDefault()},_isFilterEnabled:function(){var e=this.options.filter;return e&&"none"!==e},_hideClear:function(){var e=this;e._clear&&this._clear.addClass(T)},_showClear:function(){var e=this;e._clear&&this._clear.removeClass(T)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isFilterEnabled()&&!this.options.enforceMinLength&&this._filter({word:"",open:!1}),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(e,t){var n,i,r=this,o=r.options,l=r.dataSource,d=N({},l.filter()||{}),u=e||d.filters&&d.filters.length&&!e,c=s(d,o.dataTextField);if(!e&&!c||!r.trigger("filtering",{filter:e}))return n={filters:[],logic:"and"},a(e)&&n.filters.push(e),a(d)&&(n.logic===d.logic?n.filters=n.filters.concat(d.filters):n.filters.push(d)),r._cascading&&this.listView.setDSFilter(n),i=N({},{page:u?1:l.page(),pageSize:u?l.options.pageSize:l.pageSize(),sort:l.sort(),filter:l.filter(),group:l.group(),aggregate:l.aggregate()},{filter:n}),l[t?"read":"query"](l._mergeState(i))},_angularElement:function(e,t){e&&this.angular(t,function(){return{elements:e}})},_noData:function(){var n=e(this.noData),i=this.options.noDataTemplate;return this.angular("cleanup",function(){return{elements:n}}),u.destroy(n),n.remove(),i?(this.noData=e('<div class="k-nodata" style="display:none"><div></div></div>').appendTo(this.list),this.noDataTemplate="function"!=typeof i?u.template(i):i,t):(this.noData=null,t)},_renderNoData:function(){var e=this.noData;e&&(this._angularElement(e,"cleanup"),e.children(":first").html(this.noDataTemplate({instance:this})),this._angularElement(e,"compile"))},_toggleNoData:function(t){e(this.noData).toggle(t)},_toggleHeader:function(e){var t=this.listView.content.prev(S);t.toggle(e)},_footer:function(){var n=e(this.footer),i=this.options.footerTemplate;return this._angularElement(n,"cleanup"),u.destroy(n),n.remove(),i?(this.footer=e('<div class="k-footer"></div>').appendTo(this.list),this.footerTemplate="function"!=typeof i?u.template(i):i,t):(this.footer=null,t)},_renderFooter:function(){var e=this.footer;e&&(this._angularElement(e,"cleanup"),e.html(this.footerTemplate({instance:this})),this._angularElement(e,"compile"))},_header:function(){var n,i=e(this.header),r=this.options.headerTemplate;return this._angularElement(i,"cleanup"),u.destroy(i),i.remove(),r?(n="function"!=typeof r?u.template(r):r,i=e(n({})),this.header=i[0]?i:null,this.list.prepend(i),this._angularElement(this.header,"compile"),t):(this.header=null,t)},_allowOpening:function(){return this.options.noDataTemplate||this.dataSource.flatView().length},_initValue:function(){var e=this,t=e.options.value;null!==t?e.element.val(t):(t=e._accessor(),e.options.value=t),e._old=t},_ignoreCase:function(){var e,t=this,n=t.dataSource.reader.model;n&&n.fields&&(e=n.fields[t.options.dataTextField],e&&e.type&&"string"!==e.type&&(t.options.ignoreCase=!1))},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t=this,n=t.options,i=n.ignoreCase,r=n.dataTextField,o={value:i?e.word.toLowerCase():e.word,field:r,operator:n.filter,ignoreCase:i};t._open=e.open,t._filterSource(o)},_clearButton:function(){this._clear||(this._clear=e('<span unselectable="on" class="k-icon k-clear-value k-i-close" title="clear"></span>').attr({role:"button",tabIndex:-1})),this.options.clearButton||this._clear.remove()},search:function(e){var t=this.options;e="string"==typeof e?e:this._inputValue(),clearTimeout(this._typingTimeout),(!t.enforceMinLength&&!e.length||e.length>=t.minLength)&&(this._state="filter",this._isFilterEnabled()?this._filter({word:e,open:!0}):this._searchByWord(e))},current:function(e){return this._focus(e)},items:function(){return this.ul[0].children},destroy:function(){var e=this,t=e.ns;f.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler)},dataItem:function(n){var i=this;if(n===t)return i.listView.selectedDataItems()[0];if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=e(i.items()).index(n)}return i.dataSource.flatView()[n]},_activateItem:function(){var e=this.listView.focus();e&&this._focused.add(this.filterInput).attr("aria-activedescendant",e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr("aria-activedescendant")},_accessors:function(){var e=this,t=e.element,n=e.options,i=u.getter,r=t.attr(u.attr("text-field")),o=t.attr(u.attr("value-field"));!n.dataTextField&&r&&(n.dataTextField=r),!n.dataValueField&&o&&(n.dataValueField=o),
e._text=i(n.dataTextField),e._value=i(n.dataValueField)},_aria:function(e){var n=this,i=n.options,r=n._focused.add(n.filterInput);i.suggest!==t&&r.attr("aria-autocomplete",i.suggest?"both":"list"),e=e?e+" "+n.ul[0].id:n.ul[0].id,r.attr("aria-owns",e),n.ul.attr("aria-live",n._isFilterEnabled()?"polite":"off"),n._ariaLabel()},_ariaLabel:function(){var t,n=this,i=n._focused,r=n.element,o=r.attr("id"),a=e('label[for="'+o+'"]'),s=r.attr("aria-label"),l=r.attr("aria-labelledby");i!==r&&(s?i.attr("aria-label",s):l?i.attr("aria-labelledby",l):a.length&&(t=a.attr("id")||n._generateLabelId(a,o),i.attr("aria-labelledby",t)))},_generateLabelId:function(e,t){var n=t+D;return e.attr("id",n),n},_blur:function(){var e=this;e._change(),e.close()},_change:function(){var e,i=this,r=i.selectedIndex,o=i.options.value,a=i.value();i._isSelect&&!i.listView.bound()&&o&&(a=o),a!==n(i._old,typeof a)?e=!0:i._valueBeforeCascade!==t&&i._valueBeforeCascade!==n(i._old,typeof i._valueBeforeCascade)&&i._userTriggered?e=!0:r===t||r===i._oldIndex||i.listView.isFiltered()||(e=!0),e&&(i._old=null===i._old?a:i.dataItem()?i.dataItem()[i.options.dataValueField]:null,i._oldIndex=r,i._typing||i.element.trigger(w),i.trigger(w)),i.typing=!1},_data:function(){return this.dataSource.view()},_enable:function(){var e=this,n=e.options,i=e.element.is("[disabled]");n.enable!==t&&(n.enabled=n.enable),!n.enabled||i?e.enable(!1):e.readonly(e.element.is("[readonly]"))},_dataValue:function(e){var n=this._value(e);return n===t&&(n=this._text(e)),n},_offsetHeight:function(){var t=0,n=this.listView.content.prevAll(":visible");return n.each(function(){var n=e(this);t+=p(n,!0)}),t},_height:function(n){var i,r,o,a=this,s=a.list,l=a.options.height,d=a.popup.visible();if(n||a.options.noDataTemplate){if(r=s.add(s.parent(".k-animation-container")).show(),!s.is(":visible"))return r.hide(),t;l=a.listView.content[0].scrollHeight>l?l:"auto",r.height(l),"auto"!==l&&(i=a._offsetHeight(),o=p(e(a.footer))||0,l=l-i-o),a.listView.content.height(l),d||r.hide()}return l},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,r=this.wrapper;if(n.data(H)||!i)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||h(r),e&&L.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i="border-box"!==n.css("box-sizing")?t-(h(n)-n.width()):t,n.css({fontFamily:r.css("font-family"),width:this.options.autoWidth?"auto":i,minWidth:i}).data(H,i),!0},_openHandler:function(e){this._adjustListWidth(),this.trigger(F)?e.preventDefault():(this._focused.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger(E)?e.preventDefault():(this._focused.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_focusItem:function(){var e=this.listView,n=!e.focus(),r=i(e.select());r===t&&this.options.highlightFirst&&n&&(r=0),r!==t?e.focus(r):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first:first"),n=this.listView.content.prev(S),i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=u.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("padding-right"),10),n.css("padding-right",i))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t)},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):this.popup.one("open",function(e){return B(function(){this._calculatePopupHeight(e)},this)}.call(this,e)))},_popup:function(){var e=this;e.popup=new c.Popup(e.list,N({},e.options.popup,{anchor:e.wrapper,open:B(e._openHandler,e),close:B(e._closeHandler,e),animation:e.options.animation,isRtl:g.isRtl(e.wrapper),autosize:e.options.autoWidth}))},_makeUnselectable:function(){V&&this.list.find("*").not(".k-textbox").attr("unselectable","on")},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_toggle:function(e,n){var i=this,r=g.mobileOS&&(g.touch||g.MSPointers||g.pointers);e=e!==t?e:!i.popup.visible(),n||r||i._focused[0]===_()||(i._prevent=!0,i._focused.focus(),i._prevent=!1),i[e?F:E]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===n(e._old,typeof e.value())||(e._cascadeTriggered=!0,e.trigger(A,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(w)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(M,e._requestStartHandler).unbind(z,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){var n=(e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t);if(n&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw Error("ValueMapper is not provided while the value is being set. See http://docs.telerik.com/kendo-ui/controls/editors/combobox/virtualization#the-valuemapper-function")}});N(q,{inArray:function(e,t){var n,i,r=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=r.length;n<i;n++)if(e===r[n])return n;return-1},unifyType:n}),u.ui.List=q,c.Select=q.extend({init:function(e,t){q.fn.init.call(this,e,t),this._initial=this.element.val()},setDataSource:function(e){var t,n=this;n.options.dataSource=e,n._dataSource(),n.listView.bound()&&(n._initialIndex=null,n.listView._current=null),n.listView.setDataSource(n.dataSource),n.options.autoBind&&n.dataSource.fetch(),t=n._parentWidget(),t&&n._cascadeSelect(t)},close:function(){this.popup.close()},select:function(e){var n=this;return e===t?n.selectedIndex:n._select(e).done(function(){n._old=n._accessor(),n._oldIndex=n.selectedIndex})},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var n=this.element[0];return e===t?n.value:(null===e&&(e=""),n.value=e,t)},_accessorSelect:function(e,n){var i,o=this.element[0];return e===t?r(o).value||"":(r(o).selected=!1,n===t&&(n=-1),i=null!==e&&""!==e,i&&n==-1?this._custom(e):e?o.value=e:o.selectedIndex=n,t)},_syncValueAndText:function(){return!0},_custom:function(t){var n=this,i=n.element,r=n._customOption;r||(r=e("<option/>"),n._customOption=r,i.append(r)),r.text(t),r[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(C),e._focused.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(e){var t=this;e.isDefaultPrevented()||(t._request=!0,t._busy||(t._busy=setTimeout(function(){t._arrowIcon&&(t._focused.attr("aria-busy",!0),t._arrowIcon.addClass(C),t._hideClear())},100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var t,n=this,i=n.element,r=n.options,o=r.dataSource||{};o=e.isArray(o)?{data:o}:o,n._isSelect&&(t=i[0].selectedIndex,t>-1&&(r.index=t),o.select=i,o.fields=[{field:r.dataTextField},{field:r.dataValueField}]),n.dataSource?n._unbindDataSource():(n._requestStartHandler=B(n._showBusy,n),n._requestEndHandler=B(n._requestEnd,n),n._errorHandler=B(n._hideBusy,n)),n.dataSource=u.data.DataSource.create(o).bind(M,n._requestStartHandler).bind(z,n._requestEndHandler).bind("error",n._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){this.listView.focusNext()},_prevItem:function(){this.listView.focusPrev()},_move:function(e){var n,i,r,o,a,s,l=this,d=l.listView,u=e.keyCode,c=u===m.DOWN;if(u===m.UP||c){if(e.altKey)l.toggle(c);else{if(!d.bound()&&!l.ul[0].firstChild)return l._fetch||(l.dataSource.one(w,function(){l._fetch=!1,l._move(e)}),l._fetch=!0,l._filterSource()),e.preventDefault(),!0;if(r=l._focus(),l._fetch||r&&!r.hasClass("k-state-selected")||(c?(l._nextItem(),l._focus()||l._lastItem()):(l._prevItem(),l._focus()||l._firstItem())),n=d.dataItemByIndex(d.getElementIndex(l._focus())),l.trigger(I,{dataItem:n,item:l._focus()}))return l._focus(r),t;l._select(l._focus(),!0).done(function(){l.popup.visible()||l._blur(),l._old=null===l._old?l.value():l.dataItem()?l.dataItem()[l.options.dataValueField]:null})}e.preventDefault(),i=!0}else if(u===m.ENTER||u===m.TAB){if(l.popup.visible()&&e.preventDefault(),r=l._focus(),n=l.dataItem(),l.popup.visible()||n&&l.text()===l._text(n)||(r=null),o=l.filterInput&&l.filterInput[0]===_(),r){if(n=d.dataItemByIndex(d.getElementIndex(r)),a=!0,n&&(a=l._value(n)!==q.unifyType(l.value(),typeof l._value(n))),a&&l.trigger(I,{dataItem:n,item:r}))return;l._select(r)}else l.input&&((l._syncValueAndText()||l._isSelect)&&l._accessor(l.input.val()),l.listView.value(l.input.val()));l._focusElement&&l._focusElement(l.wrapper),o&&u===m.TAB?l.wrapper.focusout():l._blur(),l.close(),i=!0}else u===m.ESC?(l.popup.visible()&&e.preventDefault(),l.close(),i=!0):!l.popup.visible()||u!==m.PAGEDOWN&&u!==m.PAGEUP||(e.preventDefault(),s=u===m.PAGEDOWN?1:-1,d.scrollWith(s*d.screenHeight()),i=!0);return i},_fetchData:function(){var e=this,t=!!e.dataSource.view().length;e._request||e.options.cascadeFrom||e.listView.bound()||e._fetch||t||(e._fetch=!0,e.dataSource.fetch().done(function(){e._fetch=!1}))},_options:function(e,n,i){var o,a,s,l,d=this,u=d.element,c=u[0],h=e.length,p="",f=0;for(n&&(p=n);f<h;f++)o="<option",a=e[f],s=d._text(a),l=d._value(a),l!==t&&(l+="",l.indexOf('"')!==-1&&(l=l.replace(W,"&quot;")),o+=' value="'+l+'"'),o+=">",s!==t&&(o+=v(s)),o+="</option>",p+=o;u.html(p),i!==t&&(c.value=i,c.value&&!i&&(c.selectedIndex=-1)),c.selectedIndex!==-1&&(o=r(c),o&&o.setAttribute(R,R))},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initial)})},t._form=r.on("reset",t._resetHandler))},_parentWidget:function(){var t,n,i=this.options.name;if(this.options.cascadeFrom)return t=e("#"+this.options.cascadeFrom),n=t.data("kendo"+i),n||(n=t.data("kendo"+U[i])),n},_cascade:function(){var e,t=this,n=t.options,i=n.cascadeFrom;if(i){if(e=t._parentWidget(),!e)return;t._cascadeHandlerProxy=B(t._cascadeHandler,t),t._cascadeFilterRequests=[],n.autoBind=!1,e.bind("set",function(){t.one("set",function(e){t._selectedValue=e.value||t._accessor()})}),e.first(A,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one("dataBound",function(){t._toggleCascadeOnFocus()}),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),n=O?"blur":"focusout";t._focused.add(t.filterInput).bind("focus",function(){t.unbind(A,e._cascadeHandlerProxy),t.first(w,e._cascadeHandlerProxy)}),t._focused.add(t.filterInput).bind(n,function(){t.unbind(w,e._cascadeHandlerProxy),t.first(A,e._cascadeHandlerProxy)})},_cascadeHandler:function(e){var t=this._parentWidget(),n=this.value();this._userTriggered=e.userTriggered,this.listView.bound()&&this._clearSelection(t,!0),this._cascadeSelect(t,n)},_cascadeChange:function(e){var t=this,n=t._accessor()||t._selectedValue;t._cascadeFilterRequests.length||(t._selectedValue=null),t._userTriggered?t._clearSelection(e,!0):n?(n!==t.listView.value()[0]&&t.value(n),t.dataSource.view()[0]&&t.selectedIndex!==-1||t._clearSelection(e,!0)):t.dataSource.flatView().length&&t.select(t.options.index),t.enable(),t._triggerCascade(),t._triggerChange(),t._userTriggered=!1},_cascadeSelect:function(e,n){var i,r,o=this,a=e.dataItem(),l=a?a[o.options.cascadeFromField]||e._value(a):null,d=o.options.cascadeFromField||e.options.dataValueField;o._valueBeforeCascade=n!==t?n:o.value(),l||0===l?(i=o.dataSource.filter()||{},s(i,d),r=function(){var t=o._cascadeFilterRequests.shift();t&&o.unbind("dataBound",t),t=o._cascadeFilterRequests[0],t&&o.first("dataBound",t),o._cascadeChange(e)},o._cascadeFilterRequests.push(r),1===o._cascadeFilterRequests.length&&o.first("dataBound",r),o._cascading=!0,o._filterSource({field:d,operator:"eq",value:l}),o._cascading=!1):(o.enable(!1),o._clearSelection(e),o._triggerCascade(),o._triggerChange(),o._userTriggered=!1)}}),l=".StaticList",d=u.ui.DataBoundWidget.extend({init:function(t,n){f.fn.init.call(this,t,n),this.element.attr("role","listbox").on("click"+l,"li",B(this._click,this)).on("mouseenter"+l,"li",function(){e(this).addClass(x)}).on("mouseleave"+l,"li",function(){e(this).removeClass(x)}),"multiple"===this.options.selectable&&this.element.attr("aria-multiselectable",!0),this.content=this.element.wrap("<div class='k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before('<div class="k-group-header" style="display:none"></div>').prev(),this.bound(!1),this._optionID=u.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var i=this.options.value;i&&(this._values=e.isArray(i)?i.slice(0):[i]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._onScroll=B(function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout(function(){e._renderHeader()},50)},this)},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null},events:["click",w,"activate","deactivate","dataBinding","dataBound","selectedItemChange"],setDataSource:function(t){var n,i=this,r=t||{};r=e.isArray(r)?{data:r}:r,r=u.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(w,i._refreshHandler),n=i.value(),i.value([]),i.bound(!1),i.value(n)):i._refreshHandler=B(i.refresh,i),i.setDSFilter(r.filter()),i.dataSource=r.bind(w,i._refreshHandler),i._fixedHeader()},skip:function(){return this.dataSource.skip()},setOptions:function(e){f.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render()},destroy:function(){this.element.off(l),this._refreshHandler&&this.dataSource.unbind(w,this._refreshHandler),clearTimeout(this._scrollId),f.fn.destroy.call(this)},dataItemByIndex:function(e){return this.dataSource.flatView()[e]},screenHeight:function(){return this.content[0].clientHeight},scrollToIndex:function(e){var t=this.element[0].children[e];t&&this.scroll(t)},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scroll:function(e){if(e){e[0]&&(e=e[0]);var t=this.content[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i;r>n?r=n:a>r+o&&(r=a-o),t.scrollTop=r}},selectedDataItems:function(e){return e===t?this._dataItems.slice():(this._dataItems=e,this._values=this._getValues(e),t)},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},focusNext:function(){var e=this.focus();e=e?e.next():0,this.focus(e)},focusPrev:function(){var e=this.focus();e=e?e.prev():this.element[0].children.length-1,this.focus(e)},focusFirst:function(){this.focus(this.element[0].children[0])},focusLast:function(){this.focus(i(this.element[0].children))},focus:function(n){var r,o=this,a=o._optionID;return n===t?o._current:(n=i(o._get(n)),n=e(this.element[0].children[n]),o._current&&(o._current.removeClass(y).removeAttr(k),o.trigger("deactivate")),r=!!n[0],r&&(n.addClass(y),o.scroll(n),n.attr("id",a)),o._current=r?n:null,o.trigger("activate"),t)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var r,o,a,s=this,l=s.options.selectable,d="multiple"!==l&&l!==!1,u=s._selectedIndices,c=[],h=[];return n===t?u.slice():(n=s._get(n),1===n.length&&n[0]===-1&&(n=[]),o=e.Deferred().resolve(),a=s.isFiltered(),a&&!d&&s._deselectFiltered(n)?o:d&&!a&&e.inArray(i(n),u)!==-1?(s._dataItems.length&&s._view.length&&(s._dataItems=[s._view[u[0]].item]),o):(r=s._deselect(n),h=r.removed,n=r.indices,n.length&&(d&&(n=[i(n)]),c=s._select(n)),(c.length||h.length)&&(s._valueComparer=null,s.trigger(w,{added:c,removed:h})),o))},removeAt:function(e){return this._selectedIndices.splice(e,1),this._values.splice(e,1),this._valueComparer=null,{position:e,dataItem:this._dataItems.splice(e,1)[0]}},setValue:function(t){t=e.isArray(t)||t instanceof b?t.slice(0):[t],this._values=t,this._valueComparer=null},value:function(n){var i,r=this,o=r._valueDeferred;return n===t?r._values.slice():(r.setValue(n),o&&"resolved"!==o.state()||(r._valueDeferred=o=e.Deferred()),r.bound()&&(i=r._valueIndices(r._values),"multiple"===r.options.selectable&&r.select(-1),r.select(i),o.resolve()),r._skipUpdate=!1,o)},items:function(){return this.element.children(".k-item")},_click:function(t){t.isDefaultPrevented()||this.trigger("click",{item:e(t.currentTarget)})||this.select(t.currentTarget)},_valueExpr:function(e,t){var i,r,o=this,a=0,s=[];if(!o._valueComparer||o._valueType!==e){for(o._valueType=e;a<t.length;a++)s.push(n(t[a],e));i="for (var idx = 0; idx < "+s.length+"; idx++) { if (current === values[idx]) { return idx; }} return -1;",r=Function("current","values",i),o._valueComparer=function(e){return r(e,s)}}return o._valueComparer},_dataItemPosition:function(e,t){var n=this._valueGetter(e),i=this._valueExpr(typeof n,t);return i(n)},_getter:function(){this._valueGetter=u.getter(this.options.dataValueField)},_deselect:function(t){var n,i,r,o=this,a=o.element[0].children,s=o.options.selectable,l=o._selectedIndices,d=o._dataItems,u=o._values,c=[],h=0,p=0;if(t=t.slice(),s!==!0&&t.length){if("multiple"===s)for(;h<t.length;h++)if(i=t[h],e(a[i]).hasClass("k-state-selected"))for(n=0;n<l.length;n++)if(r=l[n],r===i){e(a[r]).removeClass("k-state-selected").attr("aria-selected",!1),c.push({position:n+p,dataItem:d.splice(n,1)[0]}),l.splice(n,1),t.splice(h,1),u.splice(n,1),p+=1,h-=1,n-=1;break}}else{for(;h<l.length;h++)e(a[l[h]]).removeClass("k-state-selected").attr("aria-selected",!1),c.push({position:h,dataItem:d[h]});o._values=[],o._dataItems=[],o._selectedIndices=[]}return{indices:t,removed:c}},_deselectFiltered:function(t){for(var n,i,r,o=this.element[0].children,a=[],s=0;s<t.length;s++)i=t[s],n=this._view[i].item,r=this._dataItemPosition(n,this._values),r>-1&&(a.push(this.removeAt(r)),e(o[i]).removeClass("k-state-selected"));return!!a.length&&(this.trigger(w,{added:[],removed:a}),!0)},_select:function(t){var n,r,o=this,a=o.element[0].children,s=o._view,l=[],d=0;for(i(t)!==-1&&o.focus(t);d<t.length;d++)r=t[d],n=s[r],r!==-1&&n&&(n=n.item,o._selectedIndices.push(r),o._dataItems.push(n),o._values.push(o._valueGetter(n)),e(a[r]).addClass("k-state-selected").attr("aria-selected",!0),l.push({dataItem:n}));return l},getElementIndex:function(t){return e(t).data("offset-index")},_get:function(e){return"number"==typeof e?e=[e]:P(e)||(e=this.getElementIndex(e),e=[e!==t?e:-1]),e},_template:function(){var e=this,t=e.options,n=t.template;return n?(n=u.template(n),n=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-item">'+n(e)+"</li>"}):n=u.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${'+u.expr(t.dataTextField,"data")+"}</li>",{useWithBlock:!1}),n},_templates:function(){var e,t,n=this.options,i={template:n.template,groupTemplate:n.groupTemplate,fixedGroupTemplate:n.fixedGroupTemplate};for(t in i)e=i[t],e&&"function"!=typeof e&&(i[t]=u.template(e));this.templates=i},_normalizeIndices:function(e){for(var n=[],i=0;i<e.length;i++)e[i]!==t&&n.push(e[i]);return n},_valueIndices:function(e,t){var n,i=this._view,r=0;if(t=t?t.slice():[],!e.length)return[];for(;r<i.length;r++)n=this._dataItemPosition(i[r].item,e),n!==-1&&(t[n]=r);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var t=this.element[0],n=this.content[0],i=n.scrollTop,r=e(t.children[0]).height(),o=Math.floor(i/r)||0,a=t.children[o]||t.lastChild,s=a.offsetTop<i;a;)if(s){if(a.offsetTop+r>i||!a.nextSibling)break;a=a.nextSibling}else{if(a.offsetTop<=i||!a.previousSibling)break;a=a.previousSibling}return this._view[e(a).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.show(),this.content.scroll(this._onScroll)):(this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e,t=this.templates.fixedGroupTemplate;t&&(e=this._firstVisibleItem(),e&&this.header.html(t(e.group)))},_renderItem:function(e){var t='<li tabindex="-1" role="option" unselectable="on" class="k-item',n=e.item,i=0!==e.index,r=e.selected;return i&&e.newGroup&&(t+=" k-first"),r&&(t+=" k-state-selected"),t+='" aria-selected="'+(r?"true":"false")+'" data-offset-index="'+e.index+'">',t+=this.templates.template(n),i&&e.newGroup&&(t+='<div class="k-group">'+this.templates.groupTemplate(e.group)+"</div>"),t+"</li>"},_render:function(){var e,t,n,i,r="",o=0,a=0,s=[],l=this.dataSource.view(),d=this.value(),u=this.isGrouped();if(u)for(o=0;o<l.length;o++)for(t=l[o],n=!0,i=0;i<t.items.length;i++)e={selected:this._selected(t.items[i],d),item:t.items[i],group:t.value,newGroup:n,index:a},s[a]=e,a+=1,r+=this._renderItem(e),n=!1;else for(o=0;o<l.length;o++)e={selected:this._selected(l[o],d),item:l[o],index:o},s[o]=e,r+=this._renderItem(e);this._view=s,this.element[0].innerHTML=r,u&&s.length&&this._renderHeader()},_selected:function(e,t){var n=!this.isFiltered()||"multiple"===this.options.selectable;return n&&this._dataItemPosition(e,t)!==-1},setDSFilter:function(e){this._lastDSFilter=N({},e)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!u.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(e){var t,n=this,i=e&&e.action,r=n.options.skipUpdateOnBind,a="itemchange"===i;n.trigger("dataBinding"),n._angularItems("cleanup"),n._fixedHeader(),n._render(),n.bound(!0),a||"remove"===i?(t=o(n._dataItems,e.items),t.changed.length&&(a?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))):n.isFiltered()||n._skipUpdate?(n.focus(0),n._skipUpdate&&(n._skipUpdate=!1,n._selectedIndices=n._valueIndices(n._values,n._selectedIndices))):r||i&&"add"!==i||n.value(n._values),n._valueDeferred&&n._valueDeferred.resolve(),n._angularItems("compile"),n.trigger("dataBound")},bound:function(e){return e===t?this._bound:(this._bound=e,t)},isGrouped:function(){return(this.dataSource.group()||[]).length}}),c.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.calendar.min",["kendo.core.min","kendo.selectable.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var r,o=e.getFullYear(),a=t.getFullYear(),s=n.getFullYear();return o-=o%i,r=o+(i-1),o<a&&(o=a),r>s&&(r=s),o+"-"+r}function i(e){var t,n=0,i=e.min,r=e.max,o=e.start,a=e.setter,l=e.build,d=e.weekNumberBuild,u=e.cells||12,c=e.isWeekColumnVisible,h=e.perRow||4,p=e.weekNumber||U,m=e.content||V,g=e.empty||W,v=e.html||'<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">';for(c&&(v+=p(d(o)));n<u;n++)n>0&&n%h===0&&(v+='</tr><tr role="row">',c&&(v+=p(d(o)))),o=f(o.getFullYear(),o.getMonth(),o.getDate()),M(o,0),t=l(o,n,e.disableDates),v+=s(o,i,r)?m(t):g(t),a(o,1);return v+"</tr></tbody></table>"}function r(e,t,n){var i=e.getFullYear(),r=t.getFullYear(),o=r,a=0;return n&&(r-=r%n,o=r-r%n+n-1),i>o?a=1:i<r&&(a=-1),a}function o(){var e=new Ie;return new Ie(e.getFullYear(),e.getMonth(),e.getDate())}function a(e,t,n){var i=o();return e&&(i=new Ie((+e))),t>i?i=new Ie((+t)):n<i&&(i=new Ie((+n))),i}function s(e,t,n){return+e>=+t&&+e<=+n}function l(e,t){return e.slice(t).concat(e.slice(0,t))}function d(e,t,n){t=t instanceof Ie?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function u(e,t){var n,i,r;return+t<+e&&(n=+e,S.views[0].setDate(e,t),S.views[0].setDate(t,new Date(n))),i=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()),Math.ceil((+r-+i)/D.date.MS_PER_DAY)}function c(e,t,n,i){var r,o;for(r=0;r<=t;r++)o=new Date(n.getTime()),o=new Date(o.setDate(o.getDate()+r)),i(o)||e.push(o)}function h(t){var n=e(this).hasClass("k-state-disabled");n||e(this).toggleClass(ae,be.indexOf(t.type)>-1||t.type==ve)}function p(e){e.preventDefault()}function f(e,t,n){var i=1904,r=new Ie(i,t,n);return r.setFullYear(e),r}function m(e){return P(e).calendars.standard}function g(e){var n=Re[e.start],i=Re[e.depth],r=P(e.culture);e.format=N(e.format||r.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=te),(i===t||i>n)&&(e.depth=te),null===e.dates&&(e.dates=[])}function v(e){j&&e.find("*").attr("unselectable","on")}function _(e,t){e.addClass("k-"+t)}function b(e,t){for(var n=0,i=t.length;n<i;n++)if(e===+t[n])return!0;return!1}function k(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())}function w(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth())}function y(t){return D.isFunction(t)?t:e.isArray(t)?C(t):e.noop}function x(e){var t,n=[];for(t=0;t<e.length;t++)n.push(e[t].setHours(0,0,0,0));return n}function C(t){var n,i,r,o,a,s=[],l=["su","mo","tu","we","th","fr","sa"],d="if (found) { return true } else {return false}";if(t[0]instanceof Ie)s=x(t),n="var found = date && window.kendo.jQuery.inArray(date.setHours(0, 0, 0, 0),["+s+"]) > -1;"+d;else{for(r=0;r<t.length;r++)o=t[r].slice(0,2).toLowerCase(),a=e.inArray(o,l),a>-1&&s.push(a);n="var found = date && window.kendo.jQuery.inArray(date.getDay(),["+s+"]) > -1;"+d}return i=Function("date",n)}function T(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}var S,D=window.kendo,F=D.support,E=D.ui,A=E.Widget,I=D.keys,R=D.parseDate,M=D.date.adjustDST,z=D.date.weekInYear,H=D.ui.Selectable,N=D._extractFormat,B=D.template,P=D.getCulture,L=D.support.transitions,O=L?L.css+"transform-origin":"",V=B('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),W=B('<td role="gridcell">&nbsp;</td>',{useWithBlock:!1}),U=B('<td class="k-alt">#= data.weekNumber #</td>',{useWithBlock:!1}),q=D.support.browser,j=q.msie&&q.version<9,G=D._outerHeight,$=D._outerWidth,K=".kendoCalendar",Y="click"+K,Q="keydown"+K,X="id",J="min",Z="left",ee="slideIn",te="month",ne="century",ie="change",re="navigate",oe="value",ae="k-state-hover",se="k-state-disabled",le="k-state-focused",de="k-other-month",ue=' class="'+de+'"',ce="k-nav-today",he="td:has(.k-link)",pe="td:has(.k-link):not(."+se+")",fe="td:not(:has(.k-link))",me="k-state-selected",ge="blur"+K,ve="focus",_e=ve+K,be=F.touch?"touchstart":"mouseenter",ke=F.touch?"touchstart"+K:"mouseenter"+K,we=F.touch?"touchend"+K+" touchmove"+K:"mouseleave"+K,ye=6e4,xe=864e5,Ce="_prevArrow",Te="_nextArrow",Se="aria-disabled",De="aria-selected",Fe="aria-label",Ee=e.proxy,Ae=e.extend,Ie=Date,Re={month:0,year:1,decade:2,century:3},Me=A.extend({init:function(t,n){var i,r,s=this;A.fn.init.call(s,t,n),t=s.wrapper=s.element,n=s.options,n.url=window.unescape(n.url),s.options.disableDates=y(s.options.disableDates),s._templates(),s._selectable(),s._header(),s._footer(s.footer),r=t.addClass("k-widget k-calendar "+(n.weekNumber?" k-week-number":"")).on(ke+" "+we,he,h).on(Q,"table.k-content",Ee(s._move,s)).on(Y,he,function(t){var i=t.currentTarget.firstChild,r=s._toDateObject(i);i.href.indexOf("#")!=-1&&t.preventDefault(),"month"==s._view.name&&s.options.disableDates(r)||"month"==s._view.name&&"single"!=n.selectable||s._click(e(i))}).on("mouseup"+K,"table.k-content, .k-footer",function(){s._focusView(s.options.focusOnNav!==!1)}).attr(X),r&&(s._cellID=r+"_cell_selected"),s._isMultipleSelection()&&s.options.weekNumber&&t.on(Y,fe,function(t){var n=e(t.currentTarget).closest("tr").find(pe).first(),i=s.selectable._lastActive=e(t.currentTarget).closest("tr").find(pe).last();s.selectable.selectRange(n,i,{event:t}),s._current=s._value=s._toDateObject(i.find("a")),s._class(le,s._current)}),g(n),i=R(n.value,n.format,n.culture),s._selectDates=[],s._index=Re[n.start],s._current=new Ie((+a(i,n.min,n.max))),s._addClassProxy=function(){if(s._active=!0,s._cell.hasClass(se)){var e=s._view.toDateString(o());s._cell=s._cellByDate(e)}s._cell.addClass(le)},s._removeClassProxy=function(){s._active=!1,s._cell.removeClass(le)},s.value(i),s._isMultipleSelection()&&n.selectDates.length>0&&s.selectDates(n.selectDates),D.notify(s)},options:{name:"Calendar",value:null,min:new Ie(1900,0,1),max:new Ie(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:te,depth:te,animation:{horizontal:{effects:ee,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:""}},events:[ie,re],setOptions:function(e){var t=this;g(e),e.disableDates=y(e.disableDates),A.fn.setOptions.call(t,e),t._templates(),t._selectable(),t._footer(t.footer),t._index=Re[t.options.start],t.navigate()},destroy:function(){var e=this,t=e._today;e.element.off(K),e._title.off(K),e[Ce].off(K),e[Te].off(K),e._destroySelectable(),D.destroy(e._table),t&&D.destroy(t.off(K)),A.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.focus()},min:function(e){return this._option(J,e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(Ce,-1)},navigateToFuture:function(){this._navigate(Te,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(se)||e.navigate(e._current,++t)},navigateDown:function(e){var n=this,i=n._index,r=n.options.depth;if(e)return i===Re[r]?(T(n._value,n._current)&&T(n._value,e)||(n.value(e),n.trigger(ie)),t):(n.navigate(e,--i),t)},navigate:function(n,i){var r,o,s,l,d,u,c,h,p,f,m,g,b,k,w,y;i=isNaN(i)?Re[i]:i,r=this,o=r.options,s=o.culture,l=o.min,d=o.max,u=r._title,c=r._table,h=r._oldTable,p=r._current,f=n&&+n>+p,m=i!==t&&i!==r._index,n||(n=p),r._current=n=new Ie((+a(n,l,d))),i===t?i=r._index:r._index=i,r._view=b=S.views[i],k=b.compare,w=i===Re[ne],u.toggleClass(se,w).attr(Se,w),w=k(n,l)<1,r[Ce].toggleClass(se,w).attr(Se,w),r[Ce].hasClass(se)&&r[Ce].removeClass(ae),w=k(n,d)>-1,r[Te].toggleClass(se,w).attr(Se,w),r[Te].hasClass(se)&&r[Te].removeClass(ae),c&&h&&h.data("animating")&&(h.kendoStop(!0,!0),c.kendoStop(!0,!0)),r._oldTable=c,c&&!r._changeView||(u.html(b.title(n,l,d,s)),r._table=g=e(b.content(Ae({min:l,max:d,date:n,url:o.url,dates:o.dates,format:o.format,culture:s,disableDates:o.disableDates,isWeekColumnVisible:o.weekNumber,messages:o.messages},r[b.name]))),_(g,b.name),v(g),y=c&&c.data("start")===g.data("start"),r._animate({from:c,to:g,vertical:m,future:f,replace:y}),r.trigger(re),r._focus(n)),i===Re[o.depth]&&r._selectDates.length>0&&r._visualizeSelectedDatesInView(),"single"===r.options.selectable&&i===Re[o.depth]&&r._value&&!r.options.disableDates(r._value)&&r._class("k-state-selected",r._value),r._class(le,n),!c&&r._cell&&r._cell.removeClass(le),r._changeView=!0},selectDates:function(n){var i,r,o=this;return n===t?o._selectDates:(r=n.map(function(e){return e.getTime()}).filter(function(e,t,n){return n.indexOf(e)===t}).map(function(e){return new Date(e)}),i=e.grep(r,function(e){if(e)return+o._validateValue(new Date(e.setHours(0,0,0,0)))===+e}),o._selectDates=i.length>0?i:o._selectDates,o._visualizeSelectedDatesInView(),t)},value:function(e){var n,i=this,r=i._view,o=i._view;return e===t?i._value:(e=i._validateValue(e),e&&i._isMultipleSelection()&&(n=new Date((+e)),n.setHours(0,0,0,0),i._selectDates=[n],i.selectable._lastActive=null),r&&null===e&&i._cell?i._cell.removeClass(me):(i._changeView=!e||o&&0!==o.compare(e,i._current),i.navigate(e)),t)},_validateValue:function(e){var n=this,i=n.options,r=i.min,o=i.max;return null===e&&(n._current=f(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),e=R(e,i.format,i.culture),null!==e&&(e=new Ie((+e)),s(e,r,o)||(e=null)),null!==e&&n.options.disableDates(new Date((+e)))?n._value===t&&(n._value=null):n._value=e,n._value},_visualizeSelectedDatesInView:function(){var t,n=this,i={};e.each(n._selectDates,function(e,t){i[D.calendar.views[0].toDateString(t)]=t}),n.selectable.clear(),t=n._table.find(he).filter(function(t,n){return i[e(n.firstChild).attr(D.attr(oe))]}),t.length>0&&n.selectable._selectElement(t,!0);
},_isMultipleSelection:function(){var e=this;return"multiple"===e.options.selectable},_selectable:function(){var e,t,n=this;n._isMultipleSelection()&&(e=n.options.selectable,t=H.parseOptions(e),t.multiple&&n.element.attr("aria-multiselectable","true"),n.selectable=new H(n.wrapper,{aria:!0,inputSelectors:"input,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-arrow-60-down,span.k-icon.k-i-arrow-60-up",multiple:t.multiple,filter:"table.k-month:eq(0) "+pe,change:Ee(n._onSelect,n),relatedTarget:Ee(n._onRelatedTarget,n)}))},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(pe)&&(t._current=t._toDateObject(e.find("a")),t._class(le,t._toDateObject(e.find("a"))))},_onSelect:function(n){var i=this,r=n,o=H.parseOptions(i.options.selectable);return o.multiple?(r.event.ctrlKey?e(r.event.currentTarget).is(pe)?i._toggleSelection(e(r.event.currentTarget)):(i._cellsBySelector(pe).each(function(t,n){var r=i._toDateObject(e(n).find("a"));i._deselect(r)}),i._addSelectedCellsToArray()):r.event.shiftKey?i._rangeSelection(i._cell):e(r.event.currentTarget).is(he)?i.value(i._toDateObject(e(r.event.currentTarget).find("a"))):(i._selectDates=[],i._addSelectedCellsToArray()),i.trigger(ie),t):(e(r.event.currentTarget).is("td")&&!e(r.event.currentTarget).hasClass("k-state-selected")?e(r.event.currentTarget).addClass("k-state-selected"):i._click(e(r.event.currentTarget).find("a")),t)},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=this,n=t._toDateObject(e.find("a"));e.hasClass("k-state-selected")?t._selectDates.push(n):t._deselect(n)},_rangeSelection:function(e,t){var n,i=this,r=t||i._toDateObject(i.selectable.value().first().find("a")),o=i._toDateObject(e.find("a"));i.selectable._lastActive||i._value?r=i.selectable._lastActive?i._toDateObject(i.selectable._lastActive.find("a")):new Date((+i._value)):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),pe):i.selectable.value().first(),i._selectDates=[],n=u(r,o),c(i._selectDates,n,r,i.options.disableDates),i._visualizeSelectedDatesInView()},_cellsBySelector:function(e){var t=this;return t._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each(function(n,i){var r=t._toDateObject(e(i.firstChild));t.options.disableDates(r)||t._selectDates.push(r)})},_deselect:function(e){var t=this,n=t._selectDates.map(Number).indexOf(+e);n!=-1&&t._selectDates.splice(n,1)},_dateInView:function(e){var t=this,n=t._toDateObject(t._cellsBySelector(he+":first").find("a")),i=t._toDateObject(t._cellsBySelector(he+":last").find("a"));return+e<=+i&&+e>=+n},_move:function(n){var i,r,o,l,d,u=this,c=u.options,h=n.keyCode,p=u._view,m=u._index,g=u.options.min,v=u.options.max,_=new Ie((+u._current)),b=D.support.isRtl(u.wrapper),k=u.options.disableDates;return n.target===u._table[0]&&(u._active=!0),h==I.RIGHT&&!b||h==I.LEFT&&b?(i=1,r=!0):h==I.LEFT&&!b||h==I.RIGHT&&b?(i=-1,r=!0):h==I.UP?(i=0===m?-7:-4,r=!0):h==I.DOWN?(i=0===m?7:4,r=!0):h==I.SPACEBAR?(i=0,r=!0):h!=I.HOME&&h!=I.END||(o=h==I.HOME?"first":"last",l=p[o](_),_=new Ie(l.getFullYear(),l.getMonth(),l.getDate(),_.getHours(),_.getMinutes(),_.getSeconds(),_.getMilliseconds()),_.setFullYear(l.getFullYear()),r=!0),n.ctrlKey?h==I.RIGHT&&!b||h==I.LEFT&&b?(u.navigateToFuture(),r=!0):h==I.LEFT&&!b||h==I.RIGHT&&b?(u.navigateToPast(),r=!0):h==I.UP?(u.navigateUp(),r=!0):h==I.DOWN?(u._click(e(u._cell[0].firstChild)),r=!0):h!=I.ENTER&&h!=I.SPACEBAR||!u._isMultipleSelection()||(u._keyboardToggleSelection(n),d=u._toDateObject(e(u._cell[0]).find("a")),u._class(le,d)):n.shiftKey?(i!==t||o)&&(o||p.setDate(_,i),k(_)&&(_=u._nextNavigatable(_,i)),g=f(g.getFullYear(),g.getMonth(),g.getDate()),s(_,g,v)&&(u._isMultipleSelection()?u._keyboardRangeSelection(n,_):u._focus(a(_,c.min,c.max)))):(h==I.ENTER||h==I.SPACEBAR?("month"==p.name&&u._isMultipleSelection()?(u.value(u._toDateObject(e(u._cell.find("a")))),u.selectable._lastActive=e(u._cell[0]),u.trigger(ie)):u._click(e(u._cell[0].firstChild)),r=!0):h==I.PAGEUP?(r=!0,u.navigateToPast()):h==I.PAGEDOWN&&(r=!0,u.navigateToFuture()),(i||o)&&(o||p.setDate(_,i),k(_)&&(_=u._nextNavigatable(_,i)),g=f(g.getFullYear(),g.getMonth(),g.getDate()),s(_,g,v)&&(u._isMultipleSelection()?u._dateInView(_)?(u._current=_,u._class(le,_)):u.navigate(_):u._focus(a(_,c.min,c.max))))),r&&n.preventDefault(),u._current},_keyboardRangeSelection:function(e,n){var i,r,o=this;return o._dateInView(n)?(o.selectable.options.filter=o.wrapper.find("table").length>1&&+n>+o._current?"table.k-month:eq(1) "+pe:"table.k-month:eq(0) "+pe,o._class(le,n),o._current=n,o._rangeSelection(o._cellByDate(o._view.toDateString(n),pe),n),o.trigger(ie),o.selectable.options.filter="table.k-month:eq(0) "+pe,t):(o._selectDates=[],i=o.selectable._lastActive?o._toDateObject(o.selectable._lastActive.find("a")):n,r=u(i,new Date((+n))),c(o._selectDates,r,i,o.options.disableDates),o.navigate(n),o._current=n,o.selectable._lastActive=o.selectable._lastActive||o._cellByDate(o._view.toDateString(n),pe),o.trigger(ie),t)},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(me)?(n.selectable._unselect(e(n._cell[0])),n.selectable.trigger(ie,{event:t})):n.selectable.value(e(n._cell[0]),{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,r=n._view,o=n.options.min,a=n.options.max,l=n.options.disableDates,d=new Date(e.getTime());for(r.setDate(d,-t);i;){if(r.setDate(e,t),!s(e,o,a)){e=d;break}i=l(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,r=t._active;n?n.parent().data("animating")?(n.off(K),n.parent().kendoStop(!0,!0).remove(),n.remove(),i.insertAfter(t.element[0].firstChild),t._focusView(r)):!n.is(":visible")||t.options.animation===!1||e.replace?(i.insertAfter(n),n.off(K).remove(),t._focusView(r)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(i.insertAfter(t.element[0].firstChild),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,r=i._active,o=i.options.animation.horizontal,a=o.effects,s=$(e);a&&a.indexOf(ee)!=-1&&(e.add(t).css({width:s}),e.wrap("<div/>"),i._focusView(r,e),e.parent().css({position:"relative",width:2*s,"float":Z,"margin-left":n?0:-s}),t[n?"insertAfter":"insertBefore"](e),Ae(o,{effects:ee+":"+(n?"right":Z),complete:function(){e.off(K).remove(),i._oldTable=null,t.unwrap(),i._focusView(r)}}),e.parent().kendoStop(!0,!0).kendoAnimate(o))},_vertical:function(e,t){var n,i,r=this,o=r.options.animation.vertical,a=o.effects,s=r._active;a&&a.indexOf("zoom")!=-1&&(t.css({position:"absolute",top:G(e.prev()),left:0}).insertBefore(e),O&&(n=r._cellByDate(r._view.toDateString(r._current)),i=n.position(),i=i.left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10)+"px"),t.css(O,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(K).remove(),r._oldTable=null,t.css({position:"static",top:0,left:0}),r._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(o))},_cellByDate:function(t,n){return this._table.find(n?n:"td:not(."+de+")").filter(function(){return e(this.firstChild).attr(D.attr(oe))===t})},_class:function(e,t){var n,i=this,r=i._cellID,o=i._cell,a=i._view.toDateString(t);o&&o.removeAttr(De).removeAttr(Fe).removeAttr(X),t&&"month"==i._view.name&&(n=i.options.disableDates(t)),i._cellsBySelector(i._isMultipleSelection()?he:"td:not(."+de+")").removeClass(e),o=i._cellByDate(a,"multiple"==i.options.selectable?he:"td:not(."+de+")").attr(De,!0),(e===le&&!i._active&&i.options.focusOnNav!==!1||n)&&(e=""),o.addClass(e),o[0]&&(i._cell=o),r&&(o.attr(X,r),i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant",r))},_bindTable:function(e){e.on(_e,this._addClassProxy).on(ge,this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date((+t._current)),r=t._toDateObject(e);M(r,0),"month"==t._view.name&&t.options.disableDates(r)&&(r=t._value),t._view.setDate(i,r),t.navigateDown(a(i,n.min,n.max))},_focus:function(e){var t=this,n=t._view;0!==n.compare(e,t._current)?t.navigate(e):(t._current=e,t._class(le,e))},_focusView:function(e,t){e&&this.focus(t)},_footer:function(n){var i=this,r=o(),a=i.element,s=a.find(".k-footer");return n?(s[0]||(s=e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(a)),i._today=s.show().find(".k-link").html(n(r)).attr("title",D.toString(r,"D",i.options.culture)),i._toggle(),t):(i._toggle(!1),s.hide(),t)},_header:function(){var e,t=this,n=t.element;n.find(".k-header")[0]||n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev" '+Fe+'="Previous"><span class="k-icon k-i-arrow-60-left"></span></a><a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next" '+Fe+'="Next"><span class="k-icon k-i-arrow-60-right"></span></a></div>'),e=n.find(".k-link").on(ke+" "+we+" "+_e+" "+ge,h).click(!1),t._title=e.eq(1).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateUp()}),t[Ce]=e.eq(0).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToPast()}),t[Te]=e.eq(2).on(Y,function(){t._active=t.options.focusOnNav!==!1,t.navigateToFuture()})},_navigate:function(e,t){var n,i=this,r=i._index+1,o=new Ie((+i._current));i._isMultipleSelection()&&(n=i._table.find("td:not(.k-other-month)").has(".k-link").first(),o=i._toDateObject(n.find("a")),i._current=new Date((+o))),e=i[e],e.hasClass(se)||(r>3?o.setFullYear(o.getFullYear()+100*t):S.views[r].setDate(o,t),i.navigate(o))},_option:function(e,n){var i,r=this,o=r.options,a=r._value||r._current;return n===t?o[e]:(n=R(n,o.format,o.culture),n&&(o[e]=new Ie((+n)),i=e===J?n>a:a>n,(i||w(a,n))&&(i&&(r._value=null),r._changeView=!0),r._changeView||(r._changeView=!(!o.month.content&&!o.month.empty)),r.navigate(r._value),r._toggle()),t)},_toggle:function(e){var n=this,i=n.options,r=n.options.disableDates(o()),a=n._today;e===t&&(e=s(o(),i.min,i.max)),a&&(a.off(Y),e&&!r?a.addClass(ce).removeClass(se).on(Y,Ee(n._todayClick,n)):a.removeClass(ce).addClass(se).on(Y,p))},_todayClick:function(e){var t=this,n=Re[t.options.depth],i=t.options.disableDates,r=o();e.preventDefault(),i(r)||(0===t._view.compare(t._current,r)&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[r],t.selectable._lastActive=null),t._value=r,t.navigate(r,n),t.trigger(ie))},_toDateObject:function(t){var n=e(t).attr(D.attr(oe)).split("/");return n=f(n[0],n[1],n[2])},_templates:function(){var e=this,t=e.options,n=t.footer,i=t.month,r=i.content,o=i.weekNumber,a=i.empty;e.month={content:B('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+D.attr(oe)+'="#=data.dateString#" title="#=data.title#">'+(r||"#=data.value#")+"</a></td>",{useWithBlock:!!r}),empty:B('<td role="gridcell">'+(a||"&nbsp;")+"</td>",{useWithBlock:!!a}),weekNumber:B('<td class="k-alt">'+(o||"#= data.weekNumber #")+"</td>",{useWithBlock:!!o})},e.footer=n!==!1?B(n||'#= kendo.toString(data,"D","'+t.culture+'") #',{useWithBlock:!1}):null}});E.plugin(Me),S={firstDayOfMonth:function(e){return f(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){t=t||D.culture().calendar;var n=t.firstDay,i=new Ie(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(i.setFullYear(e.getFullYear());i.getDay()!=n;)S.setTime(i,-1*xe);return i},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new Ie(e.getTime()+t),r=i.getTimezoneOffset()-n;e.setTime(i.getTime()+r*ye)},views:[{name:te,title:function(e,t,n,i){return m(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,n=0,r=e.min,a=e.max,s=e.date,d=e.dates,u=e.format,c=e.culture,h=e.url,p=e.isWeekColumnVisible,g=h&&d[0],v=m(c),_=v.firstDay,k=v.days,w=l(k.names,_),y=l(k.namesShort,_),x=S.firstVisibleDay(s,v),C=t.first(s),T=t.last(s),F=t.toDateString,E=o(),A='<table tabindex="0" role="grid" class="k-content" cellspacing="0" data-start="'+F(x)+'"><thead><tr role="row">';for(p&&(A+='<th scope="col" class="k-alt">'+e.messages.weekColumnHeader+"</th>");n<7;n++)A+='<th scope="col" title="'+w[n]+'">'+y[n]+"</th>";return M(E,0),E=+E,i({cells:42,perRow:7,html:A+='</tr></thead><tbody><tr role="row">',start:x,isWeekColumnVisible:p,weekNumber:e.weekNumber,min:f(r.getFullYear(),r.getMonth(),r.getDate()),max:f(a.getFullYear(),a.getMonth(),a.getDate()),content:e.content,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,n){var i=[],r=e.getDay(),o="",a="#";return(e<C||e>T)&&i.push(de),n(e)&&i.push(se),+e===E&&i.push("k-today"),0!==r&&6!==r||i.push("k-weekend"),g&&b(+e,d)&&(a=h.replace("{0}",D.toString(e,u,c)),o=" k-action-link"),{date:e,dates:d,ns:D.ns,title:D.toString(e,"D",c),value:e.getDate(),dateString:F(e),cssClass:i[0]?' class="'+i.join(" ")+'"':"",linkClass:o,url:a}},weekNumberBuild:function(e){return{weekNumber:z(e,D.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return S.firstDayOfMonth(e)},last:function(e){var t=f(e.getFullYear(),e.getMonth()+1,0),n=S.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n,i=e.getMonth(),r=e.getFullYear(),o=t.getMonth(),a=t.getFullYear();return n=r>a?1:r<a?-1:i==o?0:i>o?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof Ie?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):S.setTime(e,t*xe),M(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=m(e.culture).months.namesAbbr,n=this.toDateString,r=e.min,o=e.max;return i({min:f(r.getFullYear(),r.getMonth(),1),max:f(o.getFullYear(),o.getMonth(),1),start:f(e.date.getFullYear(),0,1),setter:this.setDate,build:function(e){return{value:t[e.getMonth()],ns:D.ns,dateString:n(e),cssClass:""}}})},first:function(e){return f(e.getFullYear(),0,e.getDate())},last:function(e){return f(e.getFullYear(),11,e.getDate())},compare:function(e,t){return r(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof Ie?(n=t.getMonth(),e.setFullYear(t.getFullYear(),n,e.getDate()),n!==e.getMonth()&&e.setDate(0)):(n=e.getMonth()+t,e.setMonth(n),n>11&&(n-=12),n>0&&e.getMonth()!=n&&e.setDate(0)),M(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"}},{name:"decade",title:function(e,t,i){return n(e,t,i,10)},content:function(e){var t=e.date.getFullYear(),n=this.toDateString;return i({start:f(t-t%10-1,0,1),min:f(e.min.getFullYear(),0,1),max:f(e.max.getFullYear(),0,1),setter:this.setDate,build:function(e,t){return{value:e.getFullYear(),ns:D.ns,dateString:n(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,10)},setDate:function(e,t){d(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"}},{name:ne,title:function(e,t,i){return n(e,t,i,100)},content:function(e){var t=e.date.getFullYear(),n=e.min.getFullYear(),r=e.max.getFullYear(),o=this.toDateString,a=n,s=r;return a-=a%10,s-=s%10,s-a<10&&(s=a+9),i({start:f(t-t%100-10,0,1),min:f(a,0,1),max:f(s,0,1),setter:this.setDate,build:function(e,t){var i=e.getFullYear(),a=i+9;return i<n&&(i=n),a>r&&(a=r),{ns:D.ns,value:i+" - "+a,dateString:o(e),cssClass:0===t||11==t?ue:""}}})},first:function(e){var t=e.getFullYear();return f(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return f(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return r(e,t,100)},setDate:function(e,t){d(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"}}]},S.isEqualDatePart=k,S.isEqualDate=T,S.makeUnselectable=v,S.restrictValue=a,S.isInRange=s,S.addClassToViewContainer=_,S.normalize=g,S.viewsEnum=Re,S.disabled=y,D.calendar=S}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dateinput.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e,t,n,i){var r,o,a,s,l=e[i+e.length-n.length];if(e=e.substring(0,i+e.length-n.length),n=n.substring(0,i),r=[],e===n&&i>0)return r.push([t[i-1],n[i-1]]),r;if(0===e.indexOf(n)&&(0===n.length||t[n.length-1]!==t[n.length])){for(a="",o=n.length;o<e.length;o++)t[o]!==a&&k.indexOf(t[o])>=0&&(a=t[o],r.push([a,""]));return r}if(" "===n[n.length-1]||n[n.length-1]===l)return[[t[i-1]," "]];if(0===n.indexOf(e)||k.indexOf(t[i-1])===-1){for(s=t[0],o=Math.max(0,e.length-1);o<t.length;o++)if(k.indexOf(t[o])>=0){s=t[o];break}return[[s,n[i-1]]]}return[[t[i-1],n[i-1]]]}var i,r=window,o=r.kendo,a=o.caret,s=o.ui,l=s.Widget,d=o.keys,u=".kendoDateInput",c=e.proxy,h={}.toString,p=(o.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+u,f="k-state-disabled",m="k-state-default",g="k-state-invalid",v="disabled",_="readonly",b="change",k="dMyHhmftsz",w=l.extend({init:function(t,n){var i,r,a=this;l.fn.init.call(a,t,n),t=a.element,n=a.options,n.format=o._extractFormat(n.format||o.getCulture(n.culture).calendars.standard.patterns.d),n.min=o.parseDate(t.attr("min"))||o.parseDate(n.min),n.max=o.parseDate(t.attr("max"))||o.parseDate(n.max),i=(t.parent().attr("class")||"").indexOf("k-picker-wrap")>=0,i?a.wrapper=t.parent():(a.wrapper=t.wrap("<span class='k-widget k-dateinput'></span>").parent(),a.wrapper.addClass(t[0].className),a.wrapper[0].style.cssText=t[0].style.cssText,t.css({width:"100%",height:t[0].style.height})),e("<span class='k-icon k-i-warning'></span>").insertAfter(t),a._form(),a.element.addClass(i?" ":"k-textbox").attr("autocomplete","off").on("focusout"+u,function(){a._change()});try{t[0].setAttribute("type","text")}catch(s){t[0].type="text"}r=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),r?a.enable(!1):a.readonly(t.is("[readonly]")),a.value(a.options.value||t.val()),o.notify(a)},options:{name:"DateInput",culture:"",value:"",format:"",min:new Date(1900,0,1),max:new Date(2099,11,31),messages:{year:"year",month:"month",day:"day",weekday:"day of the week",hour:"hours",minute:"minutes",second:"seconds",dayperiod:"AM/PM"}},events:[b],min:function(e){return e===t?this.options.min:(this.options.min=e,t)},max:function(e){return e===t?this.options.max:(this.options.max=e,t)},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),this._unbindInput(),this._bindInput(),this._updateElementValue()},destroy:function(){var e=this;e.element.off(u),e._formElement&&e._formElement.off("reset",e._resetHandler),l.fn.destroy.call(e)},value:function(e){return e===t?this._dateTime.getDateObject():(null===e&&(e=""),"[object Date]"!==h.call(e)&&(e=o.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this._dateTime=new i(e,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=e,t)},_updateElementValue:function(){var e=this._dateTime.toPair(this.options.format,this.options.culture,this.options.messages);this.element.val(e[0]),this._oldText=e[0],this._format=e[1]},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e=this;e.element.on("paste"+u,c(e._paste,e)).on("keydown"+u,c(e._keydown,e)).on(p,c(e._input,e)).on("mouseup"+u,c(e._mouseUp,e)).on("DOMMouseScroll"+u+" mousewheel"+u,c(e._scroll,e))},_unbindInput:function(){this.element.off("keydown"+u).off("paste"+u).off(p).off("mouseup"+u).off("DOMMouseScroll"+u+" mousewheel"+u)},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t.wrapper;t._unbindInput(),r||i?(i&&(o.addClass(f).removeClass(m),n.attr(v,i),n.removeAttr(_)),r&&n.attr(_,r)):(o.addClass(m).removeClass(f),n.removeAttr(v).removeAttr(_),t._bindInput())},_change:function(){var e=this,t=e._oldValue,n=e.value();n&&e.min()&&n<e.min()&&(e.value(e.min()),n=e.value()),n&&e.max()&&n>e.max()&&(e.value(e.max()),n=e.value()),(t&&n&&n.getTime()!==t.getTime()||t&&!n||!t&&n)&&(e._oldValue=n,e.trigger(b),e.element.trigger(b))},_input:function(){var e,t,i,r,s,l,d,u=this,c=u.element[0],h=!1;if(o._activeElement()===c){if(e=n(this._oldText,this._format,this.element[0].value,a(this.element[0])[0]),t=1===e.length&&" "===e[0][1],!t)for(i=0;i<e.length;i++)r=this._dateTime.parsePart(e[i][0],e[i][1]),h=h||!r;this._updateElementValue(),e.length&&" "!==e[0][0]&&(this._selectSegment(e[0][0]),t||(s=e[0][0],setTimeout(function(){u._selectSegment(s)}))),t&&(l={keyCode:39,preventDefault:function(){}},this._keydown(l)),h&&(clearTimeout(u._blinkInvalidTimeout),d=g,u.wrapper.addClass(g),u._blinkInvalidTimeout=setTimeout(function(){u.wrapper.removeClass(d)},100))}},_mouseUp:function(){var e=a(this.element[0]);e[0]===e[1]&&this._selectNearestSegment()},_scroll:function(e){if(o._activeElement()===this.element[0]&&!this.element.is("[readonly]")){e=window.event||e;var t={keyCode:37,preventDefault:function(){}};t.keyCode=e.shiftKey?(e.wheelDelta||-e.detail)>0?37:39:(e.wheelDelta||-e.detail)>0?38:40,this._keydown(t),e.returnValue=!1,e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation()}},_form:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value)})},t._formElement=r.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,n,i,r,s,l,u=e.keyCode;if(37==u||39==u)for(e.preventDefault(),t=a(this.element[0]),t[0]!=t[1]&&this._selectNearestSegment(),n=37==u?-1:1,i=n==-1?a(this.element[0])[0]-1:a(this.element[0])[1]+1;i>=0&&i<this._format.length;){if(k.indexOf(this._format[i])>=0){this._selectSegment(this._format[i]);break}i+=n}38!=u&&40!=u||(e.preventDefault(),t=a(this.element[0]),r=this._format[t[0]],k.indexOf(r)>=0&&(this._dateTime.modifyPart(r,38==u?1:-1),this._updateElementValue(),this._selectSegment(r))),o.support.browser.msie&&o.support.browser.version<10&&(s=e.keyCode?e.keyCode:e.which,8!==s&&46!==s||(l=this,setTimeout(function(){l._input()},0))),u===d.ENTER&&this._change()},_selectNearestSegment:function(){var e,n,i=a(this.element[0]),r=i[0];for(e=r,n=r-1;e<this._format.length||n>=0;e++,n--){if(e<this._format.length&&k.indexOf(this._format[e])!==-1)return this._selectSegment(this._format[e]),t;if(n>=0&&k.indexOf(this._format[n])!==-1)return this._selectSegment(this._format[n]),t}},_selectSegment:function(e){var t,n=-1,i=0;for(t=0;t<this._format.length;t++)this._format[t]===e&&(i=t+1,n===-1&&(n=t));n<0&&(n=0),a(this.element,n,i)}});s.plugin(w),i=function(e,n,i,r){function a(e,t,n){return e+="",t=t||2,n=t-e.length,n?y[t].substring(0,n)+e:e}function s(e){return D=e,F}function l(e,t){switch(e){case"y":h=t;break;case"M":p=t,t||(c.setMonth(0),b="");break;case"d":f=t;break;case"H":case"h":m=t,t||(k="");break;case"m":g=t;break;case"s":v=t;break;default:return}}var d,u,c=null,h=!0,p=!0,f=!0,m=!0,g=!0,v=!0,_=!0,b="",k="",w={},y=["","0","00","000","0000"],x=/dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|zzz|zz|z|"[^"]*"|'[^']*'/g,C=null,T=null,S=null,D=!1,F=function(e){var n,i,r,o,s;switch(e){case"d":r=f?c.getDate():w.day;break;case"dd":r=f?a(c.getDate()):w.day;break;case"ddd":r=f&&p&&h?S.namesAbbr[c.getDay()]:w.weekday;break;case"dddd":r=f&&p&&h?S.names[c.getDay()]:w.weekday;break;case"M":r=p?c.getMonth()+1:w.month;break;case"MM":r=p?a(c.getMonth()+1):w.month;break;case"MMM":r=p?C.namesAbbr[c.getMonth()]:w.month;break;case"MMMM":r=p?C.names[c.getMonth()]:w.month;break;case"yy":r=h?a(c.getFullYear()%100):w.year;break;case"yyyy":r=h?a(c.getFullYear(),4):w.year;break;case"h":r=m?c.getHours()%12||12:w.hour;break;case"hh":r=m?a(c.getHours()%12||12):w.hour;break;case"H":r=m?c.getHours():w.hour;break;case"HH":r=m?a(c.getHours()):w.hour;break;case"m":r=g?c.getMinutes():w.minute;break;case"mm":r=g?a(c.getMinutes()):w.minute;break;case"s":r=v?c.getSeconds():w.second;break;case"ss":r=v?a(c.getSeconds()):w.second;break;case"f":r=_?Math.floor(c.getMilliseconds()/100):_;break;case"ff":r=c.getMilliseconds(),r>99&&(r=Math.floor(r/10)),r=_?a(r):e;break;case"fff":r=_?a(c.getMilliseconds(),3):e;break;case"tt":r=m?c.getHours()<12?T.AM[0]:T.PM[0]:w.dayperiod;break;case"zzz":n=c.getTimezoneOffset(),i=n<0,r=(""+Math.abs(n/60)).split(".")[0],n=Math.abs(n)-60*r,r=(i?"+":"-")+a(r),r+=":"+a(n);break;case"z":case"zz":r=c.getTimezoneOffset()/60,i=r<0,r=(""+Math.abs(r)).split(".")[0],r=(i?"+":"-")+("zz"===e?a(r):r)}if(r=r!==t?r:e.slice(1,e.length-1),D){for(r=""+r,o="","ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE"),s=0;s<r.length;s++)o+=e[0];return o}return r};if(this.setValue=function(e){f=e},this.getValue=function(){return f},this.modifyPart=function(e,t){var n,i=new Date(c&&c.getTime?c.getTime():c);switch(e){case"y":i.setFullYear(i.getFullYear()+t);break;case"M":n=i.getMonth()+t,i.setMonth(n),i.getMonth()%12!==(n+12)%12&&(i.setDate(1),i.setMonth(n));break;case"d":case"E":i.setDate(i.getDate()+t);break;case"H":case"h":i.setHours(i.getHours()+t);break;case"m":i.setMinutes(i.getMinutes()+t);break;case"s":i.setSeconds(i.getSeconds()+t);break;case"t":i.setHours((i.getHours()+12)%24)}i.getFullYear()>0&&(l(e,!0),c=i)},this.parsePart=function(e,t){var n,i,r,o,a,s,d,u,_;if(!t)return l(e,!1),!0;switch(n=new Date(c&&c.getTime?c.getTime():c),e){case"d":if(r=(f?10*n.getDate():0)+parseInt(t,10),isNaN(r))return;for(;r>31;)r=parseInt((""+r).slice(1),10);if(r<1)f=!1;else{if(n.setDate(r),n.getMonth()!==c.getMonth())return;f=!0}break;case"M":if(o=(p?10*(n.getMonth()+1):0)+parseInt(t,10),isNaN(o)){for(a=T.months.names,b+=t.toLowerCase();b.length>0;){for(s=0;s<a.length;s++)if(0===a[s].toLowerCase().indexOf(b))return n.setMonth(s),p=!0,c=n,!0;b=b.substring(1,b.length)}return!1}for(;o>12;)o=parseInt((""+o).slice(1),10);o<1?p=!1:(n.setMonth(o-1),n.getMonth()!==o-1&&(n.setDate(1),n.setMonth(o-1)),p=!0);break;case"y":if(d=(h?10*n.getFullYear():0)+parseInt(t,10),isNaN(d))return;for(;d>9999;)d=parseInt((""+d).slice(1),10);d<1?h=!1:(n.setFullYear(d),h=!0);break;case"h":if(i=(m?10*(n.getHours()%12||12):0)+parseInt(t,10),isNaN(i))return;for(;i>12;)i=parseInt((""+i).slice(1),10);n.setHours(12*Math.floor(n.getHours()/12)+i%12),m=!0;break;case"H":if(i=(m?10*n.getHours():0)+parseInt(t,10),isNaN(i))return;for(;i>23;)i=parseInt((""+i).slice(1),10);n.setHours(i),m=!0;break;case"m":if(u=(g?10*n.getMinutes():0)+parseInt(t,10),isNaN(u))return;for(;u>59;)u=parseInt((""+u).slice(1),10);n.setMinutes(u),g=!0;break;case"s":if(_=(v?10*n.getSeconds():0)+parseInt(t,10),isNaN(_))return;for(;_>59;)_=parseInt((""+_).slice(1),10);n.setSeconds(_),v=!0;break;case"t":if(m){for(k+=t.toLowerCase();k.length>0;){if(0===T.AM[0].toLowerCase().indexOf(k)&&n.getHours()>=12||0===T.PM[0].toLowerCase().indexOf(k)&&n.getHours()<12)return n.setHours((n.getHours()+12)%24),c=n,!0;k=k.substring(1,k.length)}return!1}}return c=n,!0},this.toPair=function(e,t,n){return e?(t=o.getCulture(t),T=t.calendars.standard,e=T.patterns[e]||e,S=T.days,C=T.months,w=n,[e.replace(x,s(!1)),e.replace(x,s(!0))]):["",""]},this.getDateObject=function(){return h&&p&&f&&m&&g&&v&&_?new Date(c.getTime()):null},e)c=new Date(e.getTime());else for(c=new Date,d=this.toPair(n,i,r)[1],u=0;u<d.length;u++)l(d[u],!1)}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.datepicker.min",["kendo.calendar.min","kendo.popup.min","kendo.dateinput.min"],e)}(function(){return function(e,t){function n(t){var n=t.parseFormats,i=t.format;H.normalize(t),n=e.isArray(n)?n:[n],n.length||n.push("yyyy-MM-dd"),e.inArray(i,n)===-1&&n.splice(0,0,t.format),t.parseFormats=n}function i(e){e.preventDefault()}var r,o=window.kendo,a=o.ui,s=a.Widget,l=o.parseDate,d=o.keys,u=o.template,c=o._activeElement,h="<div />",p="<span />",f=".kendoDatePicker",m="click"+f,g="open",v="close",_="change",b="disabled",k="readonly",w="k-state-default",y="k-state-focused",x="k-state-selected",C="k-state-disabled",T="k-state-hover",S="mouseenter"+f+" mouseleave"+f,D="mousedown"+f,F="id",E="min",A="max",I="month",R="aria-disabled",M="aria-expanded",z="aria-hidden",H=o.calendar,N=H.isInRange,B=H.restrictValue,P=H.isEqualDatePart,L=e.extend,O=e.proxy,V=Date,W=function(t){var n,i=this,r=document.body,s=e(h).attr(z,"true").addClass("k-calendar-container").appendTo(r);i.options=t=t||{},n=t.id,n&&(n+="_dateview",s.attr(F,n),i._dateViewID=n),i.popup=new a.Popup(s,L(t.popup,t,{name:"Popup",isRtl:o.support.isRtl(t.anchor)})),i.div=s,i.value(t.value)};W.prototype={_calendar:function(){var t,n=this,r=n.calendar,s=n.options;r||(t=e(h).attr(F,o.guid()).appendTo(n.popup.element).on(D,i).on(m,"td:has(.k-link)",O(n._click,n)),n.calendar=r=new a.Calendar(t),n._setOptions(s),o.calendar.makeUnselectable(r.element),r.navigate(n._value||n._current,s.start),n.value(n._value))},_setOptions:function(e){this.calendar.setOptions({focusOnNav:!1,change:e.change,culture:e.culture,dates:e.dates,depth:e.depth,footer:e.footer,format:e.format,max:e.max,min:e.min,month:e.month,weekNumber:e.weekNumber,start:e.start,disableDates:e.disableDates})},setOptions:function(e){var t=this.options,n=e.disableDates;n&&(e.disableDates=H.disabled(n)),this.options=L(t,e,{change:t.change,close:t.close,open:t.open}),this.calendar&&this._setOptions(this.options)},destroy:function(){this.popup.destroy()},open:function(){var e=this;e._calendar(),e.popup.open()},close:function(){this.popup.close()},min:function(e){this._option(E,e)},max:function(e){this._option(A,e)},toggle:function(){var e=this;e[e.popup.visible()?v:g]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,r=e.ctrlKey&&n==d.DOWN||n==d.ENTER,o=!1;if(e.altKey)n==d.DOWN?(t.open(),e.preventDefault(),o=!0):n==d.UP&&(t.close(),e.preventDefault(),o=!0);else if(t.popup.visible()){if(n==d.ESC||r&&i._cell.hasClass(x))return t.close(),e.preventDefault(),!0;n!=d.SPACEBAR&&(t._current=i._move(e)),o=!0}return o},current:function(e){this._current=e,this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,r=i.disableDates;r&&r(e)&&(e=null),t._value=e,t._current=new V((+B(e,i.min,i.max))),n&&n.value(e)},_click:function(e){e.currentTarget.className.indexOf(x)!==-1&&this.close()},_option:function(e,t){var n=this,i=n.calendar;n.options[e]=t,i&&i[e](t)}},W.normalize=n,o.DateView=W,r=s.extend({init:function(t,i){var r,d,u=this;s.fn.init.call(u,t,i),t=u.element,i=u.options,i.disableDates=o.calendar.disabled(i.disableDates),i.min=l(t.attr("min"))||l(i.min),i.max=l(t.attr("max"))||l(i.max),n(i),u._initialOptions=L({},i),u._wrapper(),u.dateView=new W(L({},i,{id:t.attr(F),anchor:u.wrapper,change:function(){u._change(this.value()),u.close()},close:function(e){u.trigger(v)?e.preventDefault():(t.attr(M,!1),d.attr(z,!0))},open:function(e){var n,i=u.options;u.trigger(g)?e.preventDefault():(u.element.val()!==u._oldText&&(n=l(t.val(),i.parseFormats,i.culture),u.dateView[n?"current":"value"](n)),t.attr(M,!0),d.attr(z,!1),u._updateARIA(n))}})),d=u.dateView.div,u._icon();try{t[0].setAttribute("type","text")}catch(c){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":u.dateView._dateViewID}),u._reset(),u._template(),r=t.is("[disabled]")||e(u.element).parents("fieldset").is(":disabled"),r?u.enable(!1):u.readonly(t.is("[readonly]")),i.dateInput&&(u._dateInput=new a.DateInput(t,{culture:i.culture,format:i.format,min:i.min,max:i.max,value:i.value})),u._old=u._update(i.value||u.element.val()),u._oldText=t.val(),o.notify(u)},events:[g,v,_],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:I,depth:I,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:'Current focused date is #=kendo.toString(data.current, "D")#',dateInput:!1,weekNumber:!1},setOptions:function(e){var t=this,i=t._value;s.fn.setOptions.call(t,e),e=t.options,
e.min=l(e.min),e.max=l(e.max),n(e),t.dateView.setOptions(e),t._dateInput&&t._dateInput.setOptions({culture:e.culture,format:e.format,min:e.min,max:e.max,value:e.value}),i&&(t.element.val(o.toString(i,e.format,e.culture)),t._updateARIA(i))},_editable:function(e){var t=this,n=t._dateIcon.off(f),r=t.element.off(f),o=t._inputWrapper.off(f),a=e.readonly,s=e.disable;a||s?(o.addClass(s?C:w).removeClass(s?w:C),r.attr(b,s).attr(k,a).attr(R,s)):(o.addClass(w).removeClass(C).on(S,t._toggleHover),r.removeAttr(b).removeAttr(k).attr(R,!1).on("keydown"+f,O(t._keydown,t)).on("focusout"+f,O(t._blur,t)).on("focus"+f,function(){t._inputWrapper.addClass(y)}),n.on(m,O(t._click,t)).on(D,i))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;s.fn.destroy.call(e),e.dateView.destroy(),e.element.off(f),e._dateIcon.off(f),e._inputWrapper.off(f),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open()},close:function(){this.dateView.close()},min:function(e){return this._option(E,e)},max:function(e){return this._option(A,e)},value:function(e){var n=this;return e===t?n._value:(n._old=n._update(e),null===n._old&&n.element.val(""),n._oldText=n.element.val(),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(y)},_click:function(){var e=this,t=e.element;e.dateView.toggle(),o.support.touch||t[0]===c()||t.focus()},_change:function(e){var t,n,i,r=this,a=r.element.val();e=r._update(e),t=!o.calendar.isEqualDate(r._old,e),n=t&&!r._typing,i=a!==r.element.val(),(n||i)&&r.element.trigger(_),t&&(r._old=e,r._oldText=r.element.val(),r.trigger(_)),r._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),r=!1;n.popup.visible()||e.keyCode!=d.ENTER||i===t._oldText?(r=n.move(e),t._updateARIA(n._current),r?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():t._typing=!0):t._change(i)},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-calendar"></span></span>').insertAfter(i)),n._dateIcon=t.attr({role:"button","aria-controls":n.dateView._dateViewID})},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=l(n,r.parseFormats,r.culture),n&&(r[e]=new V((+n)),i.dateView[e](n)),t)},_update:function(e){var t,n=this,i=n.options,r=i.min,a=i.max,s=n._value,d=l(e,i.parseFormats,i.culture),u=null===d&&null===s||d instanceof Date&&s instanceof Date;return i.disableDates(d)&&(d=null,n._old||n.element.val()||(e=null)),+d===+s&&u?(t=o.toString(d,i.format,i.culture),t!==e&&n.element.val(null===d?e:t),d):(null!==d&&P(d,r)?d=B(d,r,a):N(d,r,a)||(d=null),n._value=d,n.dateView.value(d),n._dateInput&&d?n._dateInput.value(d||e):n.element.val(o.toString(d||e,i.format,i.culture)),n._updateARIA(d),d)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datepicker"),t[0]||(t=i.wrap(p).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(p).parent()),t[0].style.cssText=i[0].style.cssText,i.css({width:"100%",height:i[0].style.height}),n.wrapper=t.addClass("k-widget k-datepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=u(this.options.ARIATemplate)},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr("aria-activedescendant"),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr("aria-activedescendant",t.attr("id")))}}),a.plugin(r)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.virtuallist.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(e){return e[e.length-1]}function i(e){return e instanceof Array?e:[e]}function r(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function o(e,t,n){return Math.ceil(e*t/n)}function a(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function s(){var t,n=e('<div class="k-popup"><ul class="k-list"><li class="k-item"><li></ul></div>');return n.css({position:"absolute",left:"-200000px",visibility:"hidden"}),n.appendTo(document.body),t=parseFloat(_.getComputedStyles(n.find(".k-item")[0],["line-height"])["line-height"]),n.remove(),t}function l(e,t,n){return{down:e*n,up:e*(t-1-n)}}function d(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,r){return t>r?t-e.top<n:0===e.top||t-e.top>i}}function u(e,t){return function(n){return t(e.scrollTop,n)}}function c(e){return function(t,n){return e(t.items,t.index,n),t}}function h(e,t){_.support.browser.msie&&_.support.browser.version<10?e.style.top=t+"px":(e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)")}function p(t,n){return function(i,r){for(var o=0,a=i.length;o<a;o++)t(i[o],r[o],n),r[o].item&&this.trigger(P,{item:e(i[o]),data:r[o].item,ns:_.ui})}}function f(e,t){var n;return t>0?(n=e.splice(0,t),e.push.apply(e,n)):(n=e.splice(t,-t),e.unshift.apply(e,n)),n}function m(n,i,r){var o=r.template;n=e(n),i.item||(o=r.placeholderTemplate),0===i.index&&this.header&&i.group&&this.header.html(r.fixedGroupTemplate(i.group)),this.angular("cleanup",function(){return{elements:[n]}}),n.attr("data-uid",i.item?i.item.uid:"").attr("data-offset-index",i.index).html(o(i.item||{})),n.toggleClass(M,i.current),n.toggleClass(R,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup&&e("<div class="+I+"></div>").appendTo(n).html(r.groupTemplate(i.group)),i.top!==t&&h(n[0],i.top),this.angular("compile",function(){return{elements:[n],data:[{dataItem:i.item,group:i.group,newGroup:i.newGroup}]}})}function g(e,t){var n,i,r,o,a=t.length,s=e.length,l=[],d=[];if(s)for(r=0;r<s;r++){for(n=e[r],i=!1,o=0;o<a;o++)if(n===t[o]){i=!0,l.push({index:r,item:n});break}i||d.push(n)}return{changed:l,unchanged:d}}function v(e){return e&&"resolved"!==e.state()}var _=window.kendo,b=_.ui,k=b.Widget,w=b.DataBoundWidget,y=e.proxy,x="k-virtual-wrap",C="k-virtual-list",T="k-virtual-content",S="k-list",D="k-group-header",F="k-virtual-item",E="k-item",A="k-height-container",I="k-group",R="k-state-selected",M="k-state-focused",z="k-state-hover",H="change",N="click",B="listBound",P="itemChange",L="activate",O="deactivate",V=".VirtualList",W=w.extend({init:function(t,n){var r=this;r.bound(!1),r._fetching=!1,k.fn.init.call(r,t,n),r.options.itemHeight||(r.options.itemHeight=s()),n=r.options,r.element.addClass(S+" "+C).attr("role","listbox"),r.content=r.element.wrap("<div unselectable='on' class='"+T+"'></div>").parent(),r.wrapper=r.content.wrap("<div class='"+x+"'></div>").parent(),r.header=r.content.before("<div class='"+D+"'></div>").prev(),r.element.on("mouseenter"+V,"li:not(.k-loading-item)",function(){e(this).addClass(z)}).on("mouseleave"+V,"li",function(){e(this).removeClass(z)}),r._values=i(r.options.value),r._selectedDataItems=[],r._selectedIndexes=[],r._rangesList={},r._promisesList=[],r._optionID=_.guid(),r._templates(),r.setDataSource(n.dataSource),r.content.on("scroll"+V,_.throttle(function(){r._renderItems(),r._triggerListBound()},n.delay)),r._selectable()},options:{name:"VirtualList",autoBind:!0,delay:100,height:null,listScreens:4,threshold:.5,itemHeight:null,oppositeBuffer:1,type:"flat",selectable:!1,value:[],dataValueField:null,template:"#:data#",placeholderTemplate:"loading...",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",mapValueTo:"index",valueMapper:null},events:[H,N,B,P,L,O],setOptions:function(e){k.fn.setOptions.call(this,e),this._selectProxy&&this.options.selectable===!1?this.element.off(N,"."+F,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(V),this.dataSource.unbind(H,this._refreshHandler),k.fn.destroy.call(this)},setDataSource:function(t){var n,i=this,r=t||{};r=e.isArray(r)?{data:r}:r,r=_.data.DataSource.create(r),i.dataSource?(i.dataSource.unbind(H,i._refreshHandler),i._clean(),i.bound(!1),i._deferValueSet=!0,n=i.value(),i.value([]),i.mute(function(){i.value(n)})):i._refreshHandler=e.proxy(i.refresh,i),i.dataSource=r.bind(H,i._refreshHandler),i.setDSFilter(r.filter()),0!==r.view().length?i.refresh():i.options.autoBind&&r.fetch()},skip:function(){return this.dataSource.currentRangeStart()},_triggerListBound:function(){var e=this,t=e.skip();e.bound()&&!e._selectingValue&&e._skip!==t&&(e._skip=t,e.trigger(B))},_getValues:function(t){var n=this._valueGetter;return e.map(t,function(e){return n(e)})},refresh:function(e){var t,n=this,i=e&&e.action,r="itemchange"===i,o=this.isFiltered();n._mute||(n._deferValueSet=!1,n._fetching?(n._renderItems&&n._renderItems(!0),n._triggerListBound()):(o&&n.focus(0),n._createList(),i||!n._values.length||o||n.options.skipUpdateOnBind?(n.bound(!0),n._triggerListBound()):(n._selectingValue=!0,n.value(n._values,!0).done(function(){n.bound(!0),n._selectingValue=!1,n._triggerListBound()}))),(r||"remove"===i)&&(t=g(n._selectedDataItems,e.items),t.changed.length&&(r?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged)))),n._fetching=!1)},removeAt:function(e){return this._selectedIndexes.splice(e,1),this._values.splice(e,1),{position:e,dataItem:this._selectedDataItems.splice(e,1)[0]}},setValue:function(e){this._values=i(e)},value:function(n,r){var o,a=this;return n===t?a._values.slice():(null===n&&(n=[]),n=i(n),a._valueDeferred&&"resolved"!==a._valueDeferred.state()||(a._valueDeferred=e.Deferred()),o="multiple"===a.options.selectable&&a.select().length&&n.length,!o&&n.length||a.select(-1),a._values=n,(a.bound()&&!a._mute&&!a._deferValueSet||r)&&a._prefetchByValue(n),a._valueDeferred)},_prefetchByValue:function(e){var n,i,o,a=this,s=a._dataView,l=a._valueGetter,d=a.options.mapValueTo,u=!1,c=[];for(i=0;i<e.length;i++)for(o=0;o<s.length;o++)n=s[o].item,n&&(u=r(n)?e[i]===n:e[i]===l(n),u&&c.push(s[o].index));return c.length===e.length?(a._values=[],a.select(c),t):("function"==typeof a.options.valueMapper?a.options.valueMapper({value:"multiple"===this.options.selectable?e:e[0],success:function(e){"index"===d?a.mapValueToIndex(e):"dataItem"===d&&a.mapValueToDataItem(e)}}):a.select([-1]),t)},mapValueToIndex:function(e){if(e=e===t||e===-1||null===e?[]:i(e),e.length){var n=this._deselect([]).removed;n.length&&this._triggerChange(n,[])}else e=[-1];this.select(e)},mapValueToDataItem:function(n){var r,o,a,s;if(n=n===t||null===n?[]:i(n),n.length){for(r=e.map(this._selectedDataItems,function(e,t){return{index:t,dataItem:e}}),o=e.map(n,function(e,t){return{index:t,dataItem:e}}),this._selectedDataItems=n,this._selectedIndexes=[],a=0;a<this._selectedDataItems.length;a++)s=this._getElementByDataItem(this._selectedDataItems[a]),this._selectedIndexes.push(this._getIndecies(s)[0]),s.addClass(R);this._triggerChange(r,o),this._valueDeferred&&this._valueDeferred.resolve()}else this.select([-1])},deferredRange:function(t){var n=this.dataSource,i=this.itemCount,r=this._rangesList,o=e.Deferred(),a=[],s=Math.floor(t/i)*i,l=Math.ceil(t/i)*i,d=l===s?[l]:[s,l];return e.each(d,function(t,o){var s,l=o+i,d=r[o];d&&d.end===l?s=d.deferred:(s=e.Deferred(),r[o]={end:l,deferred:s},n._multiplePrefetch(o,i,function(){s.resolve()})),a.push(s)}),e.when.apply(e,a).then(function(){o.resolve()}),o},prefetch:function(t){var n=this,i=this.itemCount,r=!n._promisesList.length;return v(n._activeDeferred)||(n._activeDeferred=e.Deferred(),n._promisesList=[]),e.each(t,function(e,t){n._promisesList.push(n.deferredRange(n._getSkip(t,i)))}),r&&e.when.apply(e,n._promisesList).done(function(){n._promisesList=[],n._activeDeferred.resolve()}),n._activeDeferred},_findDataItem:function(e,t){var n,i;if("group"===this.options.type)for(i=0;i<e.length;i++){if(n=e[i].items,!(n.length<=t))return n[t];t-=n.length}return e[t]},_getRange:function(e,t){return this.dataSource._findRange(e,Math.min(e+t,this.dataSource.total()))},dataItemByIndex:function(e){var t=this,n=t.itemCount,i=t._getSkip(e,n);return t._getRange(i,n).length?(t.mute(function(){t.dataSource.range(i,n)}),t._findDataItem(t.dataSource.view(),[e-i])):null},selectedDataItems:function(){return this._selectedDataItems.slice()},scrollWith:function(e){this.content.scrollTop(this.content.scrollTop()+e)},scrollTo:function(e){this.content.scrollTop(e)},scrollToIndex:function(e){this.scrollTo(e*this.options.itemHeight)},focus:function(i){var r,o,a,s,l,d,u=this.options.itemHeight,c=this._optionID,h=!0;if(i===t)return s=this.element.find("."+M),s.length?s:null;if("function"==typeof i)for(a=this.dataSource.flatView(),l=0;l<a.length;l++)if(i(a[l])){i=l;break}return i instanceof Array&&(i=n(i)),isNaN(i)?(r=e(i),o=parseInt(e(r).attr("data-offset-index"),10)):(o=i,r=this._getElementByIndex(o)),o===-1?(this.element.find("."+M).removeClass(M),this._focusedIndex=t,t):(r.length?(r.hasClass(M)&&(h=!1),this._focusedIndex!==t&&(s=this._getElementByIndex(this._focusedIndex),s.removeClass(M).removeAttr("id"),h&&this.trigger(O)),this._focusedIndex=o,r.addClass(M).attr("id",c),d=this._getElementLocation(o),"top"===d?this.scrollTo(o*u):"bottom"===d?this.scrollTo(o*u+u-this._screenHeight):"outScreen"===d&&this.scrollTo(o*u),h&&this.trigger(L)):(this._focusedIndex=o,this.items().removeClass(M),this.scrollToIndex(o)),t)},focusIndex:function(){return this._focusedIndex},focusFirst:function(){this.scrollTo(0),this.focus(0)},focusLast:function(){var e=this.dataSource.total();this.scrollTo(this.heightContainer.offsetHeight),this.focus(e)},focusPrev:function(){var e,t=this._focusedIndex;return!isNaN(t)&&t>0?(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)&&t<n?(t+=1,this.focus(t),e=this.focus(),e&&e.hasClass("k-loading-item")&&(t-=1,this.focus(t)),t):(t=0,this.focus(t),t)},_triggerChange:function(e,t){e=e||[],t=t||[],(e.length||t.length)&&this.trigger(H,{removed:e,added:t})},select:function(i){var r,o,a,s,l,d=this,u="multiple"!==d.options.selectable,c=v(d._activeDeferred),h=this.isFiltered(),p=[];return i===t?d._selectedIndexes.slice():(d._selectDeferred&&"resolved"!==d._selectDeferred.state()||(d._selectDeferred=e.Deferred()),r=d._getIndecies(i),o=u&&!h&&n(r)===n(this._selectedIndexes),p=d._deselectCurrentValues(r),p.length||!r.length||o?(d._triggerChange(p),d._valueDeferred&&d._valueDeferred.resolve(),d._selectDeferred.resolve().promise()):(1===r.length&&r[0]===-1&&(r=[]),s=d._deselect(r),p=s.removed,r=s.indices,u&&(c=!1,r.length&&(r=[n(r)])),l=function(){var e=d._select(r);d.focus(r),d._triggerChange(p,e),d._valueDeferred&&d._valueDeferred.resolve(),d._selectDeferred.resolve()},a=d.prefetch(r),c||(a?a.done(l):l()),d._selectDeferred.promise()))},bound:function(e){return e===t?this._listCreated:(this._listCreated=e,t)},mute:function(e){this._mute=!0,y(e(),this),this._mute=!1},setDSFilter:function(t){this._lastDSFilter=e.extend({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!_.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},skipUpdate:e.noop,_getElementByIndex:function(t){return this.items().filter(function(n,i){return t===parseInt(e(i).attr("data-offset-index"),10)})},_getElementByDataItem:function(t){var n,i,o,a=this._dataView,s=this._valueGetter;for(o=0;o<a.length;o++)if(i=a[o].item&&r(a[o].item)?a[o].item===t:a[o].item&&t&&s(a[o].item)==s(t)){n=a[o];break}return n?this._getElementByIndex(n.index):e()},_clean:function(){this.result=t,this._lastScrollTop=t,this._skip=t,e(this.heightContainer).remove(),this.heightContainer=t,this.element.empty()},_height:function(){var e=!!this.dataSource.view().length,t=this.options.height,n=this.options.itemHeight,i=this.dataSource.total();return e?t/n>i&&(t=i*n):t=0,t},setScreenHeight:function(){var e=this._height();this.content.height(e),this._screenHeight=e},screenHeight:function(){return this._screenHeight},_getElementLocation:function(e){var t,n=this.content.scrollTop(),i=this._screenHeight,r=this.options.itemHeight,o=e*r,a=o+r,s=n+i;return t=o===n-r||a>n&&o<n?"top":o===s||o<s&&s<a?"bottom":o>=n&&o<=n+(i-r)?"inScreen":"outScreen"},_templates:function(){var e,t=this.options,n={template:t.template,placeholderTemplate:t.placeholderTemplate,groupTemplate:t.groupTemplate,fixedGroupTemplate:t.fixedGroupTemplate};for(e in n)"function"!=typeof n[e]&&(n[e]=_.template(n[e]||""));this.templates=n},_generateItems:function(e,t){for(var n,i=[],r=this.options.itemHeight+"px";t-- >0;)n=document.createElement("li"),n.tabIndex=-1,n.className=F+" "+E,n.setAttribute("role","option"),n.style.height=r,n.style.minHeight=r,e.appendChild(n),i.push(n);return i},_saveInitialRanges:function(){var t,n=this.dataSource._ranges,i=e.Deferred();for(i.resolve(),this._rangesList={},t=0;t<n.length;t++)this._rangesList[n[t].start]={end:n[t].end,deferred:i}},_createList:function(){var t=this,n=t.content.get(0),i=t.options,r=t.dataSource;t.bound()&&t._clean(),t._saveInitialRanges(),t._buildValueGetter(),t.setScreenHeight(),t.itemCount=o(t._screenHeight,i.listScreens,i.itemHeight),t.itemCount>r.total()&&(t.itemCount=r.total()),t._items=t._generateItems(t.element[0],t.itemCount),t._setHeight(i.itemHeight*r.total()),t.options.type=(r.group()||[]).length?"group":"flat","flat"===t.options.type?t.header.hide():t.header.show(),t.getter=t._getter(function(){t._renderItems(!0)}),t._onScroll=function(e,n){var i=t._listItems(t.getter);return t._fixedHeader(e,i(e,n))},t._renderItems=t._whenChanged(u(n,t._onScroll),c(t._reorderList(t._items,e.proxy(m,t)))),t._renderItems(),t._calculateGroupPadding(t._screenHeight)},_setHeight:function(e){var t,n,i=this.heightContainer;if(i?t=i.offsetHeight:i=this.heightContainer=a(this.content[0],A),e!==t)for(i.innerHTML="";e>0;)n=Math.min(e,25e4),a(i).style.height=n+"px",e-=n},_getter:function(){var e=null,t=this.dataSource,n=t.skip(),i=this.options.type,r=this.itemCount,o={};return t.pageSize()<r&&this.mute(function(){t.pageSize(r)}),function(a,s){var l,d,u,c,h,p,f,m,g=this;if(t.inRange(s,r)){if(n!==s&&this.mute(function(){t.range(s,r),n=s}),"group"===i){if(!o[s])for(d=o[s]=[],u=t.view(),c=0,h=u.length;c<h;c++)for(p=u[c],f=0,m=p.items.length;f<m;f++)d.push({item:p.items[f],group:p.value});l=o[s][a-s]}else l=t.view()[a-s];return l}return e!==s&&(e=s,n=s,g._getterDeferred&&g._getterDeferred.reject(),g._getterDeferred=g.deferredRange(s),g._getterDeferred.then(function(){var e=g._indexConstraint(g.content[0].scrollTop);g._getterDeferred=null,s<=e&&e<=s+r&&(g._fetching=!0,t.range(s,r))})),null}},_fixedHeader:function(e,t){var n,i,r=this.currentVisibleGroup,o=this.options.itemHeight,a=Math.floor((e-t.top)/o),s=t.items[a];return s&&s.item&&(n=s.group,n!==r&&(i=n||"",this.header.html(this.templates.fixedGroupTemplate(i)),this.currentVisibleGroup=n)),t},_itemMapper:function(e,t,n){var i,o=this.options.type,a=this.options.itemHeight,s=this._focusedIndex,l=!1,d=!1,u=!1,c=null,h=!1,p=this._valueGetter;if("group"===o&&(e&&(u=0===t||this._currentGroup&&this._currentGroup!==e.group,this._currentGroup=e.group),c=e?e.group:null,e=e?e.item:null),!this.isFiltered()&&n.length&&e)for(i=0;i<n.length;i++)if(h=r(e)?n[i]===e:n[i]===p(e)){n.splice(i,1),l=!0;break}return s===t&&(d=!0),{item:e?e:null,group:c,newGroup:u,selected:l,current:d,index:t,top:t*a}},_range:function(e){var t,n,i,r=this.itemCount,o=this._values.slice(),a=[];for(this._view={},this._currentGroup=null,n=e,i=e+r;n<i;n++)t=this._itemMapper(this.getter(n,e),n,o),a.push(t),this._view[t.index]=t;return this._dataView=a,a},_getDataItemsCollection:function(e,t){var n=this._range(this._listIndex(e,t));return{index:n.length?n[0].index:0,top:n.length?n[0].top:0,items:n}},_listItems:function(){var t=this._screenHeight,n=this.options,i=d(n,t);return e.proxy(function(e,t){var n=this.result,r=this._lastScrollTop;return!t&&n&&i(n,e,r)||(n=this._getDataItemsCollection(e,r)),this._lastScrollTop=e,this.result=n,n},this)},_whenChanged:function(e,t){var n;return function(i){var r=e(i);r!==n&&(n=r,t(r,i))}},_reorderList:function(t,n){var i=this,r=t.length,o=-(1/0);return n=e.proxy(p(n,this.templates),this),function(e,a,s){var l,d,u=a-o;s||Math.abs(u)>=r?(l=t,d=e):(l=f(t,u),d=u>0?e.slice(-u):e.slice(0,-u)),n(l,d,i.bound()),o=a}},_bufferSizes:function(){var e=this.options;return l(this._screenHeight,e.listScreens,e.oppositeBuffer)},_indexConstraint:function(e){var t=this.itemCount,n=this.options.itemHeight,i=this.dataSource.total();return Math.min(Math.max(i-t,0),Math.max(0,Math.floor(e/n)))},_listIndex:function(e,t){var n,i=this._bufferSizes();return n=e-(e>t?i.down:i.up),this._indexConstraint(n)},_selectable:function(){this.options.selectable&&(this._selectProxy=e.proxy(this,"_clickHandler"),this.element.on(N+V,"."+F,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n,i,r=[];if("function"==typeof e)for(t=this.dataSource.flatView(),n=0;n<t.length;n++)if(e(t[n])){r.push(n);break}return"number"==typeof e&&r.push(e),i=this.getElementIndex(e),isNaN(i)||r.push(i),e instanceof Array&&(r=e),r},_deselect:function(n){var i,o,a,s,l,d,u,c=[],h=this._selectedIndexes,p=this._selectedDataItems,f=0,m=this.options.selectable,g=0,v=this._valueGetter,_=null;if(n=n.slice(),m!==!0&&n.length){if("multiple"===m)for(d=0;d<n.length;d++){if(_=null,f=e.inArray(n[d],h),o=this.dataItemByIndex(n[d]),f===-1&&o)for(u=0;u<p.length;u++)s=r(o)?p[u]===o:v(p[u])===v(o),s&&(a=this._getElementByIndex(n[d]),_=this._deselectSingleItem(a,u,n[d],g));else i=h[f],i!==t&&(a=this._getElementByIndex(i),_=this._deselectSingleItem(a,f,i,g));_&&(n.splice(d,1),c.push(_),g++,d--)}}else{for(l=0;l<h.length;l++)h[l]!==t?this._getElementByIndex(h[l]).removeClass(R):p[l]&&this._getElementByDataItem(p[l]).removeClass(R),c.push({index:h[l],position:l,dataItem:p[l]});this._values=[],this._selectedDataItems=[],this._selectedIndexes=[]}return{indices:n,removed:c}},_deselectSingleItem:function(e,t,n,i){var r;if(e.hasClass("k-state-selected"))return e.removeClass(R),this._values.splice(t,1),this._selectedIndexes.splice(t,1),r=this._selectedDataItems.splice(t,1)[0],{index:n,position:t+i,dataItem:r}},_deselectCurrentValues:function(t){var n,i,r,o,a=this.element[0].children,s=this._values,l=[],d=0;if("multiple"!==this.options.selectable||!this.isFiltered())return[];if(t[0]===-1)return e(a).removeClass("k-state-selected"),l=e.map(this._selectedDataItems.slice(0),function(e,t){return{dataItem:e,position:t}}),this._selectedIndexes=[],this._selectedDataItems=[],this._values=[],l;for(;d<t.length;d++){for(r=-1,i=t[d],n=this._valueGetter(this.dataItemByIndex(i)),o=0;o<s.length;o++)if(n==s[o]){r=o;break}r>-1&&(l.push(this.removeAt(r)),e(a[i]).removeClass("k-state-selected"))}return l},_getSkip:function(e,t){var n=e<t?1:Math.floor(e/t)+1;return(n-1)*t},_select:function(t){var n,i,o=this,a="multiple"!==this.options.selectable,s=this.dataSource,l=this.itemCount,d=this._valueGetter,u=[];return a&&(o._selectedIndexes=[],o._selectedDataItems=[],o._values=[]),i=s.skip(),e.each(t,function(e,t){var a=o._getSkip(t,l);o.mute(function(){s.range(a,l),n=o._findDataItem(s.view(),[t-a]),o._selectedIndexes.push(t),o._selectedDataItems.push(n),o._values.push(r(n)?n:d(n)),u.push({index:t,dataItem:n}),o._getElementByIndex(t).addClass(R),s.range(i,l)})}),u},_clickHandler:function(t){var n=e(t.currentTarget);!t.isDefaultPrevented()&&n.attr("data-uid")&&this.trigger(N,{item:n})},_buildValueGetter:function(){this._valueGetter=_.getter(this.options.dataValueField)},_calculateGroupPadding:function(e){var t=this.items().first(),n=this.header,i=0;n[0]&&"none"!==n[0].style.display&&("auto"!==e&&(i=_.support.scrollbar()),i+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("right"),10),n.css("padding-right",i))}});_.ui.VirtualList=W,_.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.autocomplete.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t,n){return n?t.substring(0,e).split(n).length-1:0}function i(e,t,i){return t.split(i)[n(e,t,i)]}function r(e,t,i,r,o){var a=t.split(r);return a.splice(n(e,t,r),1,i),r&&""!==a[a.length-1]&&a.push(""),a.join(o)}var o=window.kendo,a=o.support,s=o.caret,l=o._activeElement,d=a.placeholder,u=o.ui,c=u.List,h=o.keys,p=o.data.DataSource,f="aria-disabled",m="aria-readonly",g="change",v="k-state-default",_="disabled",b="readonly",k="k-state-focused",w="k-state-selected",y="k-state-disabled",x="k-state-hover",C=".kendoAutoComplete",T="mouseenter"+C+" mouseleave"+C,S=e.proxy,D=c.extend({init:function(t,n){var i,r,a=this;a.ns=C,n=e.isArray(n)?{dataSource:n}:n,c.fn.init.call(a,t,n),t=a.element,n=a.options,n.placeholder=n.placeholder||t.attr("placeholder"),d&&t.attr("placeholder",n.placeholder),a._wrapper(),a._loader(),a._clearButton(),a._dataSource(),a._ignoreCase(),t[0].type="text",i=a.wrapper,a._popup(),t.addClass("k-input").on("keydown"+C,S(a._keydown,a)).on("keypress"+C,S(a._keypress,a)).on("paste"+C,S(a._search,a)).on("focus"+C,function(){a._prev=a._accessor(),a._oldText=a._prev,a._placeholder(!1),i.addClass(k)}).on("focusout"+C,function(){a._change(),a._placeholder(),a.close(),i.removeClass(k)}).attr({autocomplete:"off",role:"textbox","aria-haspopup":!0}),a._clear.on("click"+C,S(a._clearValue,a)),a._enable(),a._old=a._accessor(),t[0].id&&t.attr("aria-owns",a.ul[0].id),a._aria(),a._placeholder(),a._initList(),r=e(a.element).parents("fieldset").is(":disabled"),r&&a.enable(!1),a.listView.bind("click",function(e){e.preventDefault()}),a._resetFocusItemHandler=e.proxy(a._resetFocusItem,a),o.notify(a),a._toggleCloseVisibility()},options:{name:"AutoComplete",enabled:!0,suggest:!1,template:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",dataTextField:"",minLength:1,enforceMinLength:!1,delay:200,height:200,filter:"startswith",ignoreCase:!0,highlightFirst:!1,separator:null,placeholder:"",animation:{},virtual:!1,value:null,clearButton:!0},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=S(e._showBusy,e),e._errorHandler=S(e._hideBusy,e)),e.dataSource=p.create(e.options.dataSource).bind("progress",e._progressHandler).bind("error",e._errorHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.listView.setDataSource(this.dataSource)},events:["open","close",g,"select","filtering","dataBinding","dataBound"],setOptions:function(e){var t=this._listOptions(e);c.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._clearButton()},_listOptions:function(t){var n=c.fn._listOptions.call(this,e.extend(t,{skipUpdateOnBind:!0}));return n.dataValueField=n.dataTextField,n.selectedItemChange=null,n},_editable:function(e){var t=this,n=t.element,i=t.wrapper.off(C),r=e.readonly,o=e.disable;r||o?(i.addClass(o?y:v).removeClass(o?v:y),n.attr(_,o).attr(b,r).attr(f,o).attr(m,r)):(i.addClass(v).removeClass(y).on(T,t._toggleHover),n.removeAttr(_).removeAttr(b).attr(f,!1).attr(m,!1))},close:function(){var e=this,t=e.listView.focus();t&&t.removeClass(w),e.popup.close()},destroy:function(){var e=this;e.element.off(C),e._clear.off(C),e.wrapper.off(C),c.fn.destroy.call(e)},refresh:function(){this.listView.refresh()},select:function(e){this._select(e)},search:function(t){var n,r=this,o=r.options,a=o.ignoreCase,l=r._separator();t=t||r._accessor(),clearTimeout(r._typingTimeout),l&&(t=i(s(r.element)[0],t,l)),n=t.length,(!o.enforceMinLength&&!n||n>=o.minLength)&&(r._open=!0,r._mute(function(){this.listView.value([])}),r._filterSource({value:a?t.toLowerCase():t,operator:o.filter,field:o.dataTextField,ignoreCase:a}),r.one("close",e.proxy(r._unifySeparators,r))),r._toggleCloseVisibility()},suggest:function(e){var i,r=this,o=r._last,a=r._accessor(),d=r.element[0],u=s(d)[0],p=r._separator(),f=a.split(p),m=n(u,a,p),g=u;return o==h.BACKSPACE||o==h.DELETE?(r._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=r.dataSource.view()[c.inArray(e[0],r.ul[0])]),e=e?r._text(e):""),u<=0&&(u=a.toLowerCase().indexOf(e.toLowerCase())+1),i=a.substring(0,u).lastIndexOf(p),i=i>-1?u-(i+p.length):u,a=f[m].substring(0,i),e&&(e=""+e,i=e.toLowerCase().indexOf(a.toLowerCase()),i>-1&&(e=e.substring(i+a.length),g=u+e.length,a+=e),p&&""!==f[f.length-1]&&f.push("")),f[m]=a,r._accessor(f.join(p||"")),d===l()&&s(d,u,g),t)},value:function(e){return e===t?this._accessor():(this.listView.value(e),this._accessor(e),this._old=this._accessor(),this._oldText=this._accessor(),t)},_click:function(e){var n=e.item,i=this,r=i.element,o=i.listView.dataItemByIndex(i.listView.getElementIndex(n));return e.preventDefault(),i._active=!0,i.trigger("select",{dataItem:o,item:n})?(i.close(),t):(i._oldText=r.val(),i._select(n).done(function(){i._blur(),s(r,r.val().length)}),t)},_clearText:e.noop,_resetFocusItem:function(){var e=this.options.highlightFirst?0:-1;this.options.virtual&&this.listView.scrollTo(0),this.listView.focus(e)},_listBound:function(){var e,n=this,i=n.popup,r=n.options,o=n.dataSource.flatView(),a=o.length,s=n.dataSource._group.length,d=n.element[0]===l();n._renderFooter(),n._renderNoData(),n._toggleNoData(!a),n._toggleHeader(!!s&&!!a),n._resizePopup(),i.position(),a&&r.suggest&&d&&n.suggest(o[0]),n._open&&(n._open=!1,e=n._allowOpening()?"open":"close",n._typingTimeout&&!d&&(e="close"),a&&(n._resetFocusItem(),r.virtual&&n.popup.unbind("activate",n._resetFocusItemHandler).one("activate",n._resetFocusItemHandler)),i[e](),n._typingTimeout=t),n._touchScroller&&n._touchScroller.reset(),n._hideBusy(),n._makeUnselectable(),n.trigger("dataBound")},_mute:function(e){this._muted=!0,e.call(this),this._muted=!1},_listChange:function(){var e=this._active||this.element[0]===l();e&&!this._muted&&this._selectValue(this.listView.selectedDataItems()[0])},_selectValue:function(e){var t=this._separator(),n="";e&&(n=this._text(e)),null===n&&(n=""),t&&(n=r(s(this.element)[0],this._accessor(),n,t,this._defaultSeparator())),this._prev=n,this._accessor(n),this._placeholder()},_unifySeparators:function(){return this._accessor(this.value().split(this._separator()).join(this._defaultSeparator())),this},_preselect:function(e,t){this._inputValue(t),this._accessor(e),this._old=this.oldText=this._accessor(),this.listView.setValue(e),this._placeholder()},_change:function(){var e=this,t=e._unifySeparators().value(),n=t!==c.unifyType(e._old,typeof t),i=n&&!e._typing,r=e._oldText!==t;e._old=t,e._oldText=t,(i||r)&&e.element.trigger(g),n&&e.trigger(g),e.typing=!1,e._toggleCloseVisibility()},_accessor:function(e){var n=this,i=n.element[0];return e===t?(e=i.value,i.className.indexOf("k-readonly")>-1&&e===n.options.placeholder?"":e):(i.value=null===e?"":e,n._placeholder(),t)},_keydown:function(e){var t,n,i=this,r=e.keyCode,o=i.listView,a=i.popup.visible(),s=o.focus();if(i._last=r,r===h.DOWN)a?this._move(s?"focusNext":"focusFirst"):i.value()&&i._filterSource({value:i.ignoreCase?i.value().toLowerCase():i.value(),operator:i.options.filter,field:i.options.dataTextField,ignoreCase:i.ignoreCase}).done(function(){i._resetFocusItem(),i.popup.open()}),e.preventDefault();else if(r===h.UP)a&&this._move(s?"focusPrev":"focusLast"),e.preventDefault();else if(r===h.HOME)this._move("focusFirst");else if(r===h.END)this._move("focusLast");else if(r===h.ENTER||r===h.TAB){
if(r===h.ENTER&&a&&e.preventDefault(),a&&s){if(t=o.dataItemByIndex(o.getElementIndex(s)),i.trigger("select",{dataItem:t,item:s}))return;this._select(s)}this._blur()}else r===h.ESC?(a?e.preventDefault():i._clearValue(),i.close()):!i.popup.visible()||r!==h.PAGEDOWN&&r!==h.PAGEUP?(i.popup._hovered=!0,i._search()):(e.preventDefault(),n=r===h.PAGEDOWN?1:-1,o.scrollWith(n*o.screenHeight()))},_keypress:function(){this._oldText=this.element.val(),this._typing=!0},_move:function(e){this.listView[e](),this.options.suggest&&this.suggest(this.listView.focus())},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._loading.hide(),e.element.attr("aria-busy",!1),e._busy=null,e._showClear()},_showBusy:function(){var e=this;e._busy||(e._busy=setTimeout(function(){e.element.attr("aria-busy",!0),e._loading.show(),e._hideClear()},100))},_placeholder:function(e){if(!d){var n,i=this,r=i.element,o=i.options.placeholder;if(o){if(n=r.val(),e===t&&(e=!n),e||(o=n!==o?n:""),n===i._old&&!e)return;r.toggleClass("k-readonly",e).val(o),o||r[0]!==document.activeElement||s(r[0],0,0)}}},_separator:function(){var e=this.options.separator;return e instanceof Array?RegExp(e.join("|"),"gi"):e},_defaultSeparator:function(){var e=this.options.separator;return e instanceof Array?e[0]:e},_inputValue:function(){return this.element.val()},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout(function(){e._prev!==e._accessor()&&(e._prev=e._accessor(),e.search())},e.options.delay)},_select:function(e){var t=this;return t._active=!0,t.listView.select(e).done(function(){t._active=!1})},_loader:function(){this._loading=e('<span class="k-icon k-i-loading" style="display:none"></span>').insertAfter(this.element)},_clearButton:function(){c.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.element),this.wrapper.addClass("k-autocomplete-clearable"))},_toggleHover:function(t){e(t.currentTarget).toggleClass(x,"mouseenter"===t.type)},_toggleCloseVisibility:function(){this.value()?this._showClear():this._hideClear()},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent()),e.attr("tabindex",-1),e.attr("role","presentation"),e[0].style.cssText=i.style.cssText,n.css({width:"",height:i.style.height}),t._focused=t.element,t.wrapper=e.addClass("k-widget k-autocomplete k-header").addClass(i.className)}});u.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dropdownlist.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t,n){for(var i,r=0,o=t.length-1;r<o;++r)i=t[r],i in e||(e[i]={}),e=e[i];e[t[o]]=n}function i(e,t){return e>=t&&(e-=t),e}function r(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}var o=window.kendo,a=o.ui,s=a.List,l=a.Select,d=o.support,u=o._activeElement,c=o.data.ObservableObject,h=o.keys,p=".kendoDropDownList",f="disabled",m="readonly",g="change",v="k-state-focused",_="k-state-default",b="k-state-disabled",k="aria-disabled",w="mouseenter"+p+" mouseleave"+p,y="tabindex",x="filter",C="accept",T="The `optionLabel` option is not valid due to missing fields. Define a custom optionLabel as shown here http://docs.telerik.com/kendo-ui/api/javascript/ui/dropdownlist#configuration-optionLabel",S=e.proxy,D=l.extend({init:function(n,i){var r,a,s,d=this,u=i&&i.index;d.ns=p,i=e.isArray(i)?{dataSource:i}:i,l.fn.init.call(d,n,i),i=d.options,n=d.element.on("focus"+p,S(d._focusHandler,d)),d._focusInputHandler=e.proxy(d._focusInput,d),d.optionLabel=e(),d._optionLabel(),d._inputTemplate(),d._reset(),d._prev="",d._word="",d._wrapper(),d._tabindex(),d.wrapper.data(y,d.wrapper.attr(y)),d._span(),d._popup(),d._mobile(),d._dataSource(),d._ignoreCase(),d._filterHeader(),d._aria(),d._enable(),d._oldIndex=d.selectedIndex=-1,u!==t&&(i.index=u),d._initialIndex=i.index,d.requireValueMapper(d.options),d._initList(),d._cascade(),i.autoBind?d.dataSource.fetch():d.selectedIndex===-1&&(a=i.text||"",a||(r=i.optionLabel,r&&0===i.index?a=r:d._isSelect&&(a=n.children(":selected").text())),d._textAccessor(a)),s=e(d.element).parents("fieldset").is(":disabled"),s&&d.enable(!1),d.listView.bind("click",function(e){e.preventDefault()}),o.notify(d)},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#"},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){l.fn.setOptions.call(this,e),this.listView.setOptions(this._listOptions(e)),this._optionLabel(),this._inputTemplate(),this._accessors(),this._filterHeader(),this._enable(),this._aria(),!this.value()&&this.hasOptionLabel()&&this.select(0)},destroy:function(){var e=this;l.fn.destroy.call(e),e.wrapper.off(p),e.element.off(p),e._inputWrapper.off(p),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off()},open:function(){var e=this,t=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0;e.popup.visible()||(e.listView.bound()&&e._state!==C?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.popup.open(),e._resizeFilterInput(),e._focusItem()):(e._open=!0,e._state="rebind",e.filterInput&&(e.filterInput.val(""),e._prev=""),e.filterInput&&1!==e.options.minLength&&!t?(e.refresh(),e.popup.one("activate",e._focusInputHandler),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e,t,n=this.filterInput,i=this._prevent;n&&(e=this.filterInput[0]===u(),t=o.caret(this.filterInput[0])[0],this._prevent=!0,n.css("display","none").css("width",this.popup.element.css("width")).css("display","inline-block"),e&&(n.focus(),o.caret(n[0],t)),this._prevent=i)},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||l.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;return e===t?(n=this.listView.focus(),!n&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n):(this._focus(e),t)},dataItem:function(n){var i=this,r=null;if(null===n)return n;if(n===t)r=i.listView.selectedDataItems()[0];else{if("number"!=typeof n){if(i.options.virtual)return i.dataSource.getByUid(e(n).data("uid"));n=n.hasClass("k-list-optionlabel")?-1:e(i.items()).index(n)}else i.hasOptionLabel()&&(n-=1);r=i.dataSource.flatView()[n]}return r||(r=i._optionLabelDataItem()),r},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,r=i.options.ignoreCase;return e=null===e?"":e,e===t?i._textAccessor():"string"!=typeof e?(i._textAccessor(e),t):(n=r?e.toLowerCase():e,i._select(function(e){return e=i._text(e),r&&(e=(e+"").toLowerCase()),e===n}).done(function(){i._textAccessor(i.dataItem()||e)}),t)},_clearFilter:function(){e(this.filterInput).val(""),l.fn._clearFilter.call(this)},value:function(e){var n=this,i=n.listView,r=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n.requireValueMapper(n.options,e),!e&&n.hasOptionLabel()||(n._initialIndex=null),this.trigger("set",{value:e}),n._request&&n.options.cascadeFrom&&n.listView.bound()?(n._valueSetter&&r.unbind(g,n._valueSetter),n._valueSetter=S(function(){n.value(e)},n),r.one(g,n._valueSetter),t):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),i.value(e).done(function(){n._old=n._accessor(),n._oldIndex=n.selectedIndex}),t))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var n=this,i=n.options,r=i.optionLabel,a=i.optionLabelTemplate;return r?(a||(a="#:",a+="string"==typeof r?"data":o.expr(i.dataTextField,"data"),a+="#"),"function"!=typeof a&&(a=o.template(a)),n.optionLabelTemplate=a,n.hasOptionLabel()||(n.optionLabel=e('<div class="k-list-optionlabel"></div>').prependTo(n.list)),n.optionLabel.html(a(r)).off().click(S(n._click,n)).on(w,n._toggleHover),n.angular("compile",function(){return{elements:n.optionLabel,data:[{dataItem:n._optionLabelDataItem()}]}}),t):(n.optionLabel.off().remove(),n.optionLabel=e(),t)},_optionLabelText:function(){var e=this.options.optionLabel;return"string"==typeof e?e:this._text(e)},_optionLabelDataItem:function(){var n=this,i=n.options.optionLabel;return n.hasOptionLabel()?e.isPlainObject(i)?new c(i):n._assignInstance(n._optionLabelText(),""):t},_buildOptions:function(e){var n,i,r,o=this;o._isSelect&&(n=o.listView.value()[0],i=o._optionLabelDataItem(),r=i&&o._value(i),n!==t&&null!==n||(n=""),i&&(r!==t&&null!==r||(r=""),i='<option value="'+r+'">'+o._text(i)+"</option>"),o._options(e,i,n),n!==s.unifyType(o._accessor(),typeof n)&&(o._customOption=null,o._custom(n)))},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===x,r=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!r.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(r),t._makeUnselectable(),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(r.length?(!t.listView.value().length&&n>-1&&null!==n&&t.select(n),t._initialIndex=null,e=t.listView.selectedDataItems()[0],e&&t.text()!==t._text(e)&&t._selectValue(e)):t._textAccessor()!==t._optionLabelText()&&(t.listView.value(""),t._selectValue(null),t._oldIndex=t.selectedIndex))),t._hideBusy(),t.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),(this._presetValue||this._old&&this._oldIndex===-1)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_focusHandler:function(){this.wrapper.focus()},_focusinHandler:function(){this._inputWrapper.addClass(v),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),d.mobileOS.ios&&t?e._change():e._blur(),e._inputWrapper.removeClass(v),e._prevent=!0,e._open=!1,e.element.blur())},_wrapperMousedown:function(){this._prevent=!!this.filterInput},_wrapperClick:function(e){e.preventDefault(),this.popup.unbind("activate",this._focusInputHandler),this._focused=this.wrapper,this._prevent=!1,this._toggle()},_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t.wrapper.add(t.filterInput).off(p),a=t._inputWrapper.off(w);r||i?i?(o.removeAttr(y),a.addClass(b).removeClass(_)):(a.addClass(_).removeClass(b),o.on("focusin"+p,S(t._focusinHandler,t)).on("focusout"+p,S(t._focusoutHandler,t))):(n.removeAttr(f).removeAttr(m),a.addClass(_).removeClass(b).on(w,t._toggleHover),o.attr(y,o.data(y)).attr(k,!1).on("keydown"+p,S(t._keydown,t)).on("focusin"+p,S(t._focusinHandler,t)).on("focusout"+p,S(t._focusoutHandler,t)).on("mousedown"+p,S(t._wrapperMousedown,t)).on("paste"+p,S(t._filterPaste,t)),t.wrapper.on("click"+p,S(t._wrapperClick,t)),t.filterInput||o.on("keypress"+p,S(t._keypress,t))),n.attr(f,i).attr(m,r),o.attr(k,i)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=e.altKey,l=o.popup.visible();if(o.filterInput&&(n=o.filterInput[0]===u()),a===h.LEFT?(a=h.UP,i=!0):a===h.RIGHT&&(a=h.DOWN,i=!0),!i||!n){if(e.keyCode=a,(s&&a===h.UP||a===h.ESC)&&o._focusElement(o.wrapper),o._state===x&&a===h.ESC&&(o._clearFilter(),o._open=!1,o._state=C),a===h.ENTER&&o._typingTimeout&&o.filterInput&&l)return e.preventDefault(),t;if(a!==h.SPACEBAR||n||(o.toggle(!l),e.preventDefault()),i=o._move(e),!i){if((!l||!o.filterInput)&&(r=o._focus(),a===h.HOME?(i=!0,o._firstItem()):a===h.END&&(i=!0,o._lastItem()),i)){if(o.trigger("select",{dataItem:o._getElementDataItem(o._focus()),item:o._focus()}))return o._focus(r),t;o._select(o._focus(),!0).done(function(){l||o._blur()}),e.preventDefault()}s||i||!o.filterInput||o._search()}}},_matchText:function(e,n){var i=this.options.ignoreCase;return e!==t&&null!==e&&(e+="",i&&(e=e.toLowerCase()),0===e.indexOf(n))},_shuffleData:function(e,t){var n=this._optionLabelDataItem();return n&&(e=[n].concat(e)),e.slice(t).concat(e.slice(0,t))},_selectNext:function(){var e,t,n,o=this,a=o.dataSource.flatView(),s=a.length+(o.hasOptionLabel()?1:0),l=r(o._word,o._last),d=o.selectedIndex;for(d===-1?d=0:(d+=l?1:0,d=i(d,s)),a=a.toJSON?a.toJSON():a.slice(),a=o._shuffleData(a,d),n=0;n<s&&(t=o._text(a[n]),!l||!o._matchText(t,o._last))&&!o._matchText(t,o._word);n++);n!==s&&(e=o._focus(),o._select(i(d+n,s)).done(function(){var t=function(){o.popup.visible()||o._change()};o.trigger("select",{dataItem:o._getElementDataItem(o._focus()),item:o._focus()})?o._select(e).done(t):t()}))},_keypress:function(e){var t,n=this;0!==e.which&&e.keyCode!==o.keys.ENTER&&(t=String.fromCharCode(e.charCode||e.keyCode),n.options.ignoreCase&&(t=t.toLowerCase())," "===t&&e.preventDefault(),n._word+=t,n._last=t,n._search())},_popupOpen:function(){var e=this.popup;e.wrapper=o.wrap(e.element),e.element.closest(".km-root")[0]&&(e.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){l.fn._popup.call(this),this.popup.one("open",S(this._popupOpen,this))},_getElementDataItem:function(e){return e&&e[0]?e[0]===this.optionLabel[0]?this._optionLabelDataItem():this.listView.dataItemByIndex(this.listView.getElementIndex(e)):null},_click:function(n){var i=this,r=n.item||e(n.currentTarget);return n.preventDefault(),i.trigger("select",{dataItem:i._getElementDataItem(r),item:r})?(i.close(),t):(i._userTriggered=!0,i._select(r).done(function(){i._focusElement(i.wrapper),i._blur()}),t)},_focusElement:function(e){var t=u(),n=this.wrapper,i=this.filterInput,r=e===i?n:i,o=d.mobileOS&&(d.touch||d.MSPointers||d.pointers);i&&i[0]===e[0]&&o||i&&(r[0]===t||this._focusFilter)&&(this._focusFilter=!1,this._prevent=!0,this._focused=e.focus())},_searchByWord:function(e){var t,n;e&&(t=this,n=t.options.ignoreCase,n&&(e=e.toLowerCase()),t._select(function(n){return t._matchText(t._text(n),e)}))},_inputValue:function(){return this.text()},_search:function(){var e=this,n=e.dataSource;if(clearTimeout(e._typingTimeout),e._isFilterEnabled())e._typingTimeout=setTimeout(function(){var t=e.filterInput.val();e._prev!==t&&(e._prev=t,e.search(t),e._resizeFilterInput()),e._typingTimeout=null},e.options.delay);else{if(e._typingTimeout=setTimeout(function(){e._word=""},e.options.delay),!e.listView.bound())return n.fetch().done(function(){e._selectNext()}),t;e._selectNext()}},_get:function(t){var n,i,r,o="function"==typeof t,a=o?e():e(t);if(this.hasOptionLabel()&&("number"==typeof t?t>-1&&(t-=1):a.hasClass("k-list-optionlabel")&&(t=-1)),o){for(n=this.dataSource.flatView(),r=0;r<n.length;r++)if(t(n[r])){t=r,i=!0;break}i||(t=-1)}return t},_firstItem:function(){this.hasOptionLabel()?this._focus(this.optionLabel):this.listView.focusFirst()},_lastItem:function(){this._resetOptionLabel(),this.listView.focusLast()},_nextItem:function(){this.optionLabel.hasClass("k-state-focused")?(this._resetOptionLabel(),this.listView.focusFirst()):this.listView.focusNext()},_prevItem:function(){this.optionLabel.hasClass("k-state-focused")||(this.listView.focusPrev(),this.listView.focus()||this._focus(this.optionLabel))},_focusItem:function(){var e=this.options,n=this.listView,i=n.focus(),r=n.select();r=r[r.length-1],r===t&&e.highlightFirst&&!i&&(r=0),r!==t?n.focus(r):!e.optionLabel||e.virtual&&"dataItem"===e.virtual.mapValueTo?n.scrollToIndex(0):(this._focus(this.optionLabel),this._select(this.optionLabel))},_resetOptionLabel:function(e){this.optionLabel.removeClass("k-state-focused"+(e||"")).removeAttr("id")},_focus:function(e){var n=this.listView,i=this.optionLabel;return e===t?(e=n.focus(),!e&&i.hasClass("k-state-focused")&&(e=i),e):(this._resetOptionLabel(),e=this._get(e),n.focus(e),e===-1&&(i.addClass("k-state-focused").attr("id",n._optionID),this._focused.add(this.filterInput).removeAttr("aria-activedescendant").attr("aria-activedescendant",n._optionID)),t)},_select:function(e,t){var n=this;return e=n._get(e),n.listView.select(e).done(function(){t||n._state!==x||(n._state=C),e===-1&&n._selectValue(null)})},_selectValue:function(e){var n=this,i=n.options.optionLabel,r=n.listView.select(),o="",a="";r=r[r.length-1],r===t&&(r=-1),this._resetOptionLabel(" k-state-selected"),e||0===e?(a=e,o=n._dataValue(e),i&&(r+=1)):i&&(n._focus(n.optionLabel.addClass("k-state-selected")),a=n._optionLabelText(),o="string"==typeof i?"":n._value(i),r=0),n.selectedIndex=r,null===o&&(o=""),n._textAccessor(a),n._accessor(o,r),n._triggerCascade()},_mobile:function(){var e=this,t=e.popup,n=d.mobileOS,i=t.element.parents(".km-root").eq(0);i.length&&n&&(t.options.animation.open.effects=n.android||n.meego?"fadeIn":n.ios||n.wp?"slideIn:up":t.options.animation.open.effects)},_filterHeader:function(){var t;this.filterInput&&(this.filterInput.off(p).parent().remove(),this.filterInput=null),this._isFilterEnabled()&&(t='<span class="k-icon k-i-zoom"></span>',this.filterInput=e('<input class="k-textbox"/>').attr({placeholder:this.element.attr("placeholder"),title:this.element.attr("title"),role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),this.list.prepend(e('<span class="k-list-filter" />').append(this.filterInput.add(t))))},_span:function(){var t,n=this,i=n.wrapper,r="span.k-input";t=i.find(r),t[0]||(i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">&nbsp;</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(n.element),t=i.find(r)),n.span=t,n._inputWrapper=e(i[0].firstChild),n._arrow=i.find(".k-select"),n._arrowIcon=n._arrow.find(".k-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];e=n.parent(),e.is("span.k-widget")||(e=n.wrap("<span />").parent(),e[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"listbox","aria-haspopup":!0,"aria-expanded":!1}),n.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_inputTemplate:function(){var t=this,n=t.options.valueTemplate;if(n=n?o.template(n):e.proxy(o.template("#:this._text(data)#",{useWithBlock:!1}),t),t.valueTemplate=n,t.hasOptionLabel()&&!t.options.optionLabelTemplate)try{t.valueTemplate(t._optionLabelDataItem())}catch(i){throw Error(T)}},_textAccessor:function(n){var i,r=null,o=this.valueTemplate,a=this._optionLabelText(),s=this.span;if(n===t)return s.text();e.isPlainObject(n)||n instanceof c?r=n:a&&a===n&&(r=this.options.optionLabel),r||(r=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(r!==a&&this._text(r)!==a||(o=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(r=a))),i=function(){return{elements:s.get(),data:[{dataItem:r}]}},this.angular("cleanup",i);try{s.html(o(r))}catch(l){s.html("")}this.angular("compile",i)},_preselect:function(e,t){e||t||(t=this._optionLabelText()),this._accessor(e),this._textAccessor(t),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._initialIndex=null,this._presetValue=!0},_assignInstance:function(e,t){var i=this.options.dataTextField,r={};return i?(n(r,i.split("."),e),n(r,this.options.dataValueField.split("."),t),r=new c(r)):r=e,r}});a.plugin(D)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.combobox.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.List,o=i.Select,a=n.caret,s=n.support,l=s.placeholder,d=n._activeElement,u=n.keys,c=".kendoComboBox",h="click"+c,p="mousedown"+c,f="disabled",m="readonly",g="change",v="k-i-loading",_="k-state-default",b="k-state-focused",k="k-state-disabled",w="aria-disabled",y="filter",x="accept",C="rebind",T="mouseenter"+c+" mouseleave"+c,S=e.proxy,D=/(\r\n|\n|\r)/gm,F=o.extend({init:function(t,i){var r,a,s=this;s.ns=c,i=e.isArray(i)?{dataSource:i}:i,o.fn.init.call(s,t,i),i=s.options,t=s.element.on("focus"+c,S(s._focusHandler,s)),i.placeholder=i.placeholder||t.attr("placeholder"),s._reset(),s._wrapper(),s._input(),s._clearButton(),s._tabindex(s.input),s._popup(),s._dataSource(),s._ignoreCase(),s._enable(),s._oldIndex=s.selectedIndex=-1,s._aria(),s._initialIndex=i.index,s.requireValueMapper(s.options),s._initList(),s._cascade(),i.autoBind?s._filterSource():(r=i.text,!r&&s._isSelect&&(r=t.children(":selected").text()),r&&s._setText(r)),r||s._placeholder(),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),n.notify(s),s._toggleCloseVisibility()},options:{name:"ComboBox",enabled:!0,index:-1,text:null,value:null,autoBind:!0,delay:200,dataTextField:"",dataValueField:"",minLength:1,enforceMinLength:!1,height:200,highlightFirst:!0,filter:"none",placeholder:"",suggest:!1,cascadeFrom:"",cascadeFromField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0},events:["open","close",g,"select","filtering","dataBinding","dataBound","cascade","set"],setOptions:function(e){var t=this._listOptions(e);o.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._clearButton()},destroy:function(){var e=this;e.input.off(c),e.element.off(c),e._inputWrapper.off(c),clearTimeout(e._pasteTimeout),e._arrow.off(h+" "+p),e._clear.off(h+" "+p),o.fn.destroy.call(e)},_change:function(){var e=this,n=e.text(),i=n&&n!==e._oldText&&n!==e.options.placeholder,r=e.selectedIndex,a=r===-1;return!e.options.syncValueAndText&&!e.value()&&a&&i?(e._old="",e._oldIndex=r,e._oldText=n,e._typing||e.element.trigger(g),e.trigger(g),e._typing=!1,t):(o.fn._change.call(e),e._toggleCloseVisibility(),t)},_focusHandler:function(){this.input.focus()},_arrowClick:function(){this._toggle()},_inputFocus:function(){this._inputWrapper.addClass(b),this._placeholder(!1)},_inputFocusout:function(){var e,n,i=this,r=i.value();return i._userTriggered=!0,i._inputWrapper.removeClass(b),clearTimeout(i._typingTimeout),i._typingTimeout=null,i.text(i.text()),e=i._focus(),n=this.listView.dataItemByIndex(this.listView.getElementIndex(e)),r!==i.value()&&i.trigger("select",{dataItem:n,item:e})?(i.value(r),t):(i._placeholder(),i._blur(),i.element.blur(),t)},_inputPaste:function(){var e=this;clearTimeout(e._pasteTimeout),e._pasteTimeout=null,e._pasteTimeout=setTimeout(function(){e.search()})},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._inputWrapper.off(c),o=t.element.add(t.input.off(c)),a=t._arrow.off(h+" "+p),s=t._clear;i||n?(r.addClass(n?k:_).removeClass(n?_:k),o.attr(f,n).attr(m,i).attr(w,n)):(r.addClass(_).removeClass(k).on(T,t._toggleHover),o.removeAttr(f).removeAttr(m).attr(w,!1),a.on(h,S(t._arrowClick,t)).on(p,function(e){e.preventDefault()}),s.on(h,S(t._clearValue,t)).on(p,function(e){e.preventDefault()}),t.input.on("keydown"+c,S(t._keydown,t)).on("focus"+c,S(t._inputFocus,t)).on("focusout"+c,S(t._inputFocusout,t)).on("paste"+c,S(t._inputPaste,t)))},open:function(){var e=this,t=e._state,n=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0;e.popup.visible()||(!e.listView.bound()&&t!==y||t===x?(e._open=!0,e._state=C,1!==e.options.minLength&&!e.value()||n&&e.selectedIndex===-1?(e.refresh(),e._openPopup(),e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual&&e._focusItem()))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",S(this._scrollToFocusedItem,this)),this.popup.open()},_updateSelectionState:function(){var e=this,n=e.options.text,i=e.options.value;e.listView.isFiltered()||(e.selectedIndex===-1?(n!==t&&null!==n||(n=i),e._accessor(i),e.input.val(n||e.input.val()),e._placeholder()):e._oldIndex===-1&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var n,i=this;i._isSelect&&(n=i._customOption,i._state===C&&(i._state=""),i._customOption=t,i._options(e,"",i.value()),n&&n[0].selected&&i._custom(n.val()))},_updateSelection:function(){var n,i=this,r=i.listView,o=i._initialIndex,a=null!==o&&o>-1,s=i._state===y;return s?(e(r.focus()).removeClass("k-state-selected"),t):(i._fetch||(r.value().length||(a?i.select(o):i._accessor()&&r.value(i._accessor())),i._initialIndex=null,n=r.selectedDataItems()[0],n&&(i._value(n)!==i.value()&&i._custom(i._value(n)),i.text()&&i.text()!==i._text(n)&&i._selectValue(n))),t)},_updateItemFocus:function(){var e=this.listView;this.options.highlightFirst?e.focus()||e.focusIndex()||e.focus(0):e.focus(-1)},_listBound:function(){var e=this,n=e.input[0]===d(),i=e.dataSource.flatView(),r=e.listView.skip(),o=i.length,a=e.dataSource._group?e.dataSource._group.length:0,s=r===t||0===r;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!o),e._toggleHeader(!!a&&!!o),e._resizePopup(),e.popup.position(),e._buildOptions(i),e._makeUnselectable(),e._updateSelection(),i.length&&s&&(e._updateItemFocus(),e.options.suggest&&n&&e.input.val()&&e.suggest(i[0])),e._open&&(e._open=!1,e._typingTimeout&&!n?e.popup.close():e.toggle(e._allowOpening()),e._typingTimeout=null),e._hideBusy(),e.trigger("dataBound")},_listChange:function(){this._selectValue(this.listView.selectedDataItems()[0]),this._presetValue&&(this._oldIndex=this.selectedIndex)},_get:function(e){var t,n,i;if("function"==typeof e){for(t=this.dataSource.flatView(),i=0;i<t.length;i++)if(e(t[i])){e=i,n=!0;break}n||(e=-1)}return e},_select:function(e,t){var n=this;return e=n._get(e),e===-1&&(n.input[0].value="",n._accessor("")),n.listView.select(e).done(function(){t||n._state!==y||(n._state=x)})},_selectValue:function(e){var n=this.listView.select(),i="",r="";n=n[n.length-1],n===t&&(n=-1),this.selectedIndex=n,this.options.autoBind&&(this._valueBeforeCascade=this._old),n!==-1||e?((e||0===e)&&(i=this._dataValue(e),r=this._text(e)),null===i&&(i="")):(r=this._accessor(),this.options.syncValueAndText&&(i=r),this.listView.focus(-1)),this._setDomInputValue(r),this._accessor(i!==t?i:r,n),this._placeholder(),this._triggerCascade()},_setDomInputValue:function(e){var t,n,i=this,r=a(this.input);r&&r.length&&(t=r[0]),this._prev=this.input[0].value=e,t&&this.selectedIndex===-1&&(n=s.mobileOS,n.wp||n.android?setTimeout(function(){i.input[0].setSelectionRange(t,t)},0):this.input[0].setSelectionRange(t,t))},refresh:function(){this.listView.refresh()},_toggleCloseVisibility:function(){this.text()?this._showClear():this._hideClear()},suggest:function(e){var n,i=this,o=i.input[0],s=i.text(),l=a(o)[0],c=i._last;return c==u.BACKSPACE||c==u.DELETE?(i._last=t,t):(e=e||"","string"!=typeof e&&(e[0]&&(e=i.dataSource.view()[r.inArray(e[0],i.ul[0])]),e=e?i._text(e):""),l<=0&&(l=s.toLowerCase().indexOf(e.toLowerCase())+1),e?(e=""+e,n=e.toLowerCase().indexOf(s.toLowerCase()),n>-1&&(s+=e.substring(n+s.length))):s=s.substring(0,l),s.length===l&&e||(o.value=s,o===d()&&a(o,l,s.length)),t)},text:function(e){var n,i,o,a,s,l;return e=null===e?"":e,n=this,i=n.input[0],o=n.options.ignoreCase,a=e,e===t?i.value:n.options.autoBind!==!1||n.listView.bound()?(s=n.dataItem(),s&&n._text(s).replace&&n._text(s).replace(D,"")===e&&(l=n._value(s),l===r.unifyType(n._old,typeof l))?(n._triggerCascade(),t):(o&&(a=a.toLowerCase()),n._select(function(e){return e=n._text(e),o&&(e=(e+"").toLowerCase()),e===a}).done(function(){n.selectedIndex<0&&(i.value=e,n.options.syncValueAndText&&n._accessor(e),n._cascadeTriggered=!0,n._triggerCascade()),n._prev=i.value}),t)):(n._setText(e),t)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,r=n.listView;return e===t?(e=n._accessor()||n.listView.value()[0],e===t||null===e?"":e):(n._toggleCloseVisibility(),n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),e===i.value&&n.input.val()===i.text||(n._accessor(e),n._isFilterEnabled()&&r.bound()&&r.isFiltered()?n._clearFilter():n._fetchData(),r.value(e).done(function(){n.selectedIndex===-1&&(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._old=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n.input.val(),n._state===y&&(n._state=x)})),t)},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(v),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var n=this,i=e.item,r=n.listView.dataItemByIndex(n.listView.getElementIndex(i));return e.preventDefault(),n.trigger("select",{dataItem:r,item:i})?(n.close(),t):(n._userTriggered=!0,n._select(i).done(function(){n._blur()}),t)},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var n,i=this,r=i.options,o=i.dataSource,a=r.ignoreCase,s=function(n){var r=i._text(n);if(r!==t)return r+="",(""===r||""!==e)&&(a&&(r=r.toLowerCase()),0===r.indexOf(e))};return a&&(e=e.toLowerCase()),i.ul[0].firstChild?(this.listView.focus(this._get(s)),n=this.listView.focus(),n&&(r.suggest&&i.suggest(n),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst(),t):(o.one(g,function(){o.view()[0]&&i.search(e)}).fetch(),t)},_input:function(){var t,n,i=this,r=i.element.removeClass("k-input")[0],o=r.accessKey,a=i.wrapper,s="input.k-input",d=r.name||"";d&&(d='name="'+d+'_input" '),t=a.find(s),t[0]||(a.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input '+d+'class="k-input" type="text" autocomplete="off"/><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span>').append(i.element),t=a.find(s)),t[0].style.cssText=r.style.cssText,t[0].title=r.title,n=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10),n>-1&&(t[0].maxLength=n),t.addClass(r.className).css({width:"",height:r.style.height}).attr({role:"combobox","aria-expanded":!1}).show(),l&&t.attr("placeholder",i.options.placeholder),o&&(r.accessKey="",t[0].accessKey=o),i._focused=i.input=t,i._inputWrapper=e(a[0].firstChild),i._arrow=a.find(".k-select").attr({role:"button",tabIndex:-1}),i._arrowIcon=i._arrow.find(".k-icon"),r.id&&i._arrow.attr("aria-controls",i.ul[0].id)},_clearButton:function(){r.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-combobox-clearable"))},_keydown:function(e){var t=this,n=e.keyCode;t._last=n,clearTimeout(t._typingTimeout),t._typingTimeout=null,n===u.HOME?t._firstItem():n===u.END?t._lastItem():n==u.TAB||t._move(e)?n!==u.ESC||t.popup.visible()||t._clearValue():t._search()},_placeholder:function(e){if(!l){var n,i=this,r=i.input,o=i.options.placeholder;if(o){if(n=i.value(),e===t&&(e=!n),r.toggleClass("k-readonly",e),!e){if(n)return;o=""}r.val(o),o||r[0]!==d()||a(r[0],0,0)}}},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e.text();e._prev!==t&&(e._prev=t,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(t),e._toggleCloseVisibility()),e._typingTimeout=null},e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this,t=e.element,n=t.parent();n.is("span.k-widget")||(n=t.hide().wrap("<span />").parent(),n[0].style.cssText=t[0].style.cssText),e.wrapper=n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display","")},_clearSelection:function(e,t){var n=this,i=e.value(),r=i&&e.selectedIndex===-1;this.selectedIndex==-1&&this.value()||(t||!i||r)&&(n.options.value="",n.value(""))},_preselect:function(e,t){this.input.val(t),this._accessor(e),this._old=this._accessor(),this._oldIndex=this.selectedIndex,this.listView.setValue(e),this._placeholder(),this._initialIndex=null,this._presetValue=!0,this._toggleCloseVisibility()}});
i.plugin(F)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.multiselect.min",["kendo.list.min","kendo.mobile.scroller.min","kendo.virtuallist.min"],e)}(function(){return function(e,t){function n(e,t){var n;if(null===e&&null!==t||null!==e&&null===t)return!1;if(n=e.length,n!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0}var i=window.kendo,r=i.ui,o=r.List,a=e.extend({A:65},i.keys),s=i._activeElement,l=i.data.ObservableArray,d=e.proxy,u="id",c="li",h="accept",p="filter",f="rebind",m="open",g="close",v="change",_="progress",b="select",k="deselect",w="aria-disabled",y="k-state-focused",x="k-state-selected",C="k-hidden",T="k-state-hover",S="k-state-disabled",D="disabled",F="readonly",E=".kendoMultiSelect",A="click"+E,I="keydown"+E,R="mouseenter"+E,M="mouseleave"+E,z=R+" "+M,H=/"/g,N=e.isArray,B=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],P=o.extend({init:function(t,n){var r,a,s=this;s.ns=E,o.fn.init.call(s,t,n),s._optionsMap={},s._customOptions={},s._wrapper(),s._tagList(),s._input(),s._textContainer(),s._loader(),s._clearButton(),s._tabindex(s.input),t=s.element.attr("multiple","multiple").hide(),n=s.options,n.placeholder||(n.placeholder=t.data("placeholder")),r=t.attr(u),r&&(s._tagID=r+"_tag_active",r+="_taglist",s.tagList.attr(u,r)),s._aria(r),s._dataSource(),s._ignoreCase(),s._popup(),s._tagTemplate(),s.requireValueMapper(s.options),s._initList(),s._reset(),s._enable(),s._placeholder(),n.autoBind?s.dataSource.fetch():n.value&&s._preselect(n.value),a=e(s.element).parents("fieldset").is(":disabled"),a&&s.enable(!1),i.notify(s),s._toggleCloseVisibility()},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0},events:[m,g,v,b,k,"filtering","dataBinding","dataBound"],setDataSource:function(e){this.options.dataSource=e,this._state="",this._dataSource(),this.persistTagList=!1,this.listView.setDataSource(this.dataSource),this.options.autoBind&&this.dataSource.fetch()},setOptions:function(e){var t=this._listOptions(e);o.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(this.tagList.attr(u)),this._tagTemplate(),this._placeholder(),this._clearButton()},currentTag:function(e){var n=this;return e===t?n._currentTag:(n._currentTag&&(n._currentTag.removeClass(y).removeAttr(u),n.input.removeAttr("aria-activedescendant")),e&&(e.addClass(y).attr(u,n._tagID),n.input.attr("aria-activedescendant",n._tagID)),n._currentTag=e,t)},dataItems:function(){return this.listView.selectedDataItems()},destroy:function(){var e=this,t=e.ns;clearTimeout(e._busy),clearTimeout(e._typingTimeout),e.wrapper.off(t),e.tagList.off(t),e.input.off(t),e._clear.off(t),o.fn.destroy.call(e)},_activateItem:function(){o.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var n=this,r=o.fn._listOptions.call(n,e.extend(t,{selectedItemChange:d(n._selectedItemChange,n),selectable:"multiple"})),a=this.options.itemTemplate||this.options.template,s=r.itemTemplate||a||r.template;return s||(s="#:"+i.expr(r.dataTextField,"data")+"#"),r.template=s,r},_setListValue:function(){o.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n,i=this.dataSource.flatView(),r=this._optionsMap,o=this._value;for(this._state===f&&(this._state=""),n=0;n<e.added.length;n++)if(r[o(e.added[n].dataItem)]===t){this._render(i);break}this.persistTagList=!1,this._selectValue(e.added,e.removed)},_selectedItemChange:function(e){var t,n,i=e.items;for(n=0;n<i.length;n++)t=i[n],this.tagList.children().eq(t.index).children("span:first").html(this.tagTextTemplate(t.item))},_wrapperMousedown:function(t){var n=this,r="input"!==t.target.nodeName.toLowerCase(),o=e(t.target),a=o.hasClass("k-select")||o.hasClass("k-icon");a&&(a=!o.closest(".k-select").children(".k-i-arrow-60-down").length),!r||a&&i.support.mobileOS||t.preventDefault(),a||(n.input[0]!==s()&&r&&n.input.focus(),1===n.options.minLength&&n.open())},_inputFocus:function(){this._placeholder(!1),this.wrapper.addClass(y)},_inputFocusout:function(){var e=this;clearTimeout(e._typingTimeout),e.wrapper.removeClass(y),e._placeholder(!e.listView.selectedDataItems()[0],!0),e.close(),e._state===p&&(e._state=h,e.listView.skipUpdate(!0)),e.listView.bound()&&e.listView.isFiltered()&&(e.persistTagList=!0,e._clearFilter()),e.element.blur()},_removeTag:function(e,n){var i,r,o=this,a=o._state,s=e.index(),l=o.listView,d=l.value()[s],u=o.listView.selectedDataItems()[s],c=o._customOptions[d];return o.trigger(k,{dataItem:u,item:e})?(o._close(),t):(c!==t||a!==h&&a!==p||(c=o._optionsMap[d]),r=function(){o.currentTag(null),n&&o._change(),o._close()},c===t?(o.persistTagList=!1,l.select(l.select()[s]).done(r)):(i=o.element[0].children[c],i.selected=!1,l.removeAt(s),e.remove(),r()),t)},_tagListClick:function(t){var n=e(t.currentTarget);n.children(".k-i-arrow-60-down").length||this._removeTag(n.closest(c),!0)},_clearClick:function(){var t=this;"single"===t.options.tagMode?t.value([]):t.tagList.children().each(function(n,i){t._removeTag(e(i),!1)}),t.input.val(""),t._search(),t.trigger(v),t.focus()},_editable:function(t){var n=this,i=t.disable,r=t.readonly,o=n.wrapper.off(E),a=n.tagList.off(E),s=n.element.add(n.input.off(E));r||i?(i?o.addClass(S):o.removeClass(S),s.attr(D,i).attr(F,r).attr(w,i)):(o.removeClass(S).on(z,n._toggleHover).on("mousedown"+E+" touchend"+E,d(n._wrapperMousedown,n)),n.input.on(I,d(n._keydown,n)).on("paste"+E,d(n._search,n)).on("focus"+E,d(n._inputFocus,n)).on("focusout"+E,d(n._inputFocusout,n)),n._clear.on("click"+E,d(n._clearClick,n)),s.removeAttr(D).removeAttr(F).attr(w,!1),a.on(R,c,function(){e(this).addClass(T)}).on(M,c,function(){e(this).removeClass(T)}).on(A,"li.k-button .k-select",d(n._tagListClick,n)))},_close:function(){var e=this;e.options.autoClose?e.close():e.popup.position()},_filterSource:function(e,t){t||(t=this._retrieveData),this._retrieveData=!1,o.fn._filterSource.call(this,e,t)},close:function(){this._activeItem=null,this.popup.close()},open:function(){var e=this;e._request&&(e._retrieveData=!1),e._retrieveData||!e.listView.bound()||e._state===h?(e._open=!0,e._state=f,e.listView.skipUpdate(!0),e.persistTagList=!0,e._filterSource(),e._focusItem()):e._allowOpening()&&(e.popup._hovered=!0,e.popup.open(),e._focusItem())},toggle:function(e){e=e!==t?e:!this.popup.visible(),this[e?m:g]()},refresh:function(){this.listView.refresh()},_listBound:function(){var e=this,n=e.dataSource.flatView(),i=e.listView.skip();e._render(n),e._renderFooter(),e._renderNoData(),e._toggleNoData(!n.length),e._resizePopup(),e._open&&(e._open=!1,e.toggle(e._allowOpening())),e.popup.position(),!e.options.highlightFirst||i!==t&&0!==i||e.listView.focusFirst(),e._touchScroller&&e._touchScroller.reset(),e._hideBusy(),e._makeUnselectable(),e.trigger("dataBound")},_inputValue:function(){var e=this,t=e.input.val();return e.options.placeholder===t&&(t=""),t},value:function(e){var n=this,i=n.listView,r=i.value().slice(),o=n.options.maxSelectedItems,a=i.bound()&&i.isFiltered();return e===t?r:(n._toggleCloseVisibility(),n.persistTagList=!1,n.requireValueMapper(n.options,e),e=n._normalizeValues(e),null!==o&&e.length>o&&(e=e.slice(0,o)),a&&n._clearFilter(),i.value(e),n._old=i.value(),a||n._fetchData(),t)},_preselect:function(t,n){var r=this;N(t)||t instanceof i.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof i.data.ObservableObject||!r.options.dataValueField)&&(r.dataSource.data(t),r.value(n||r._initialValues),r._retrieveData=!0)},_setOption:function(e,t){var n=this.element[0].children[this._optionsMap[e]];n&&(n.selected=t)},_fetchData:function(){var e=this,t=!!e.dataSource.view().length,n=0===e.listView.value().length;n||e._request||(e._retrieveData||!e._fetch&&!t)&&(e._fetch=!0,e._retrieveData=!1,e.dataSource.read().done(function(){e._fetch=!1}))},_isBound:function(){return this.listView.bound()&&!this._retrieveData},_dataSource:function(){var e=this,t=e.element,n=e.options,r=n.dataSource||{};r=N(r)?{data:r}:r,r.select=t,r.fields=[{field:n.dataTextField},{field:n.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=d(e._showBusy,e),e._errorHandler=d(e._hideBusy,e)),e.dataSource=i.data.DataSource.create(r).bind(_,e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(t._initialValues),t._placeholder()})},t._form=r.on("reset",t._resetHandler))},_initValue:function(){var e=this.options.value||this.element.val();this._old=this._initialValues=this._normalizeValues(e)},_normalizeValues:function(t){var n=this;return null===t?t=[]:t&&e.isPlainObject(t)?t=[n._value(t)]:t&&e.isPlainObject(t[0])?t=e.map(t,function(e){return n._value(e)}):N(t)||t instanceof l?N(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();n(t,e._old)||(e._old=t.slice(),e.trigger(v),e.element.trigger(v)),e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item;e.preventDefault(),t._select(n).done(function(){t._activeItem=n,t._change(),t._close()})},_getActiveItem:function(){return this._activeItem||e(this.listView.items()[this._getSelectedIndices().length-1])||this.listView.focus()},_getSelectedIndices:function(){return this.listView._selectedIndices||this.listView._selectedIndexes},_keydown:function(n){var r,o,s,l,d=this,u=n.keyCode,c=d._currentTag,p=d.listView,f=d.input.val(),m=i.support.isRtl(d.wrapper),g=d.popup.visible(),_=0;if(u===a.DOWN){if(n.preventDefault(),!g)return d.open(),p.focus()||p.focusFirst(),t;p.focus()?(!d._activeItem&&n.shiftKey&&(d._activeItem=p.focus(),_=-1),r=p.getElementIndex(d._getActiveItem()[0]),p.focusNext(),p.focus()?n.shiftKey&&d._selectRange(r,p.getElementIndex(p.focus()[0])+_):p.focusLast()):p.focusFirst()}else if(u===a.UP)g&&(!d._activeItem&&n.shiftKey&&(d._activeItem=p.focus(),_=1),r=p.getElementIndex(d._getActiveItem()[0]),p.focusPrev(),p.focus()?n.shiftKey&&d._selectRange(r,p.getElementIndex(p.focus()[0])+_):d.close()),n.preventDefault();else if(u===a.LEFT&&!m||u===a.RIGHT&&m)f||(c=c?c.prev():e(d.tagList[0].lastChild),c[0]&&d.currentTag(c));else if(u===a.RIGHT&&!m||u===a.LEFT&&m)!f&&c&&(c=c.next(),d.currentTag(c[0]?c:null));else if(n.ctrlKey&&u===a.A&&g)this._getSelectedIndices().length===p.items().length&&(d._activeItem=null),p.items().length&&d._selectRange(0,p.items().length-1);else if(u===a.ENTER&&g)d._select(p.focus()).done(function(){d._change(),d._close()}),n.preventDefault();else if(u===a.SPACEBAR&&n.ctrlKey&&g)d._activeItem&&p.focus()&&p.focus()[0]===d._activeItem[0]&&(d._activeItem=null),e(p.focus()).hasClass(x)||(d._activeItem=p.focus()),d._select(p.focus()).done(function(){d._change()}),n.preventDefault();else if(u===a.SPACEBAR&&n.shiftKey&&g)o=p.getElementIndex(d._getActiveItem()),s=p.getElementIndex(p.focus()),o!==t&&s!==t&&d._selectRange(o,s),n.preventDefault();else if(u===a.ESC)g?n.preventDefault():(d.tagList.children().each(function(t,n){d._removeTag(e(n),!1)}),d.trigger(v)),d.close();else if(u===a.HOME)g?p.focus()?(n.ctrlKey&&n.shiftKey&&d._selectRange(p.getElementIndex(p.focus()[0]),0),p.focusFirst()):d.close():f||(c=d.tagList[0].firstChild,c&&d.currentTag(e(c)));else if(u===a.END)g?p.focus()?(n.ctrlKey&&n.shiftKey&&d._selectRange(p.getElementIndex(p.focus()[0]),p.element.children().length-1),p.focusLast()):d.close():f||(c=d.tagList[0].lastChild,c&&d.currentTag(e(c)));else if(u!==a.DELETE&&u!==a.BACKSPACE||f)!d.popup.visible()||u!==a.PAGEDOWN&&u!==a.PAGEUP?(clearTimeout(d._typingTimeout),setTimeout(function(){d._scale()}),d._search()):(n.preventDefault(),l=u===a.PAGEDOWN?1:-1,p.scrollWith(l*p.screenHeight()));else{if(d._state=h,"single"===d.options.tagMode)return p.value([]),d._change(),d._close(),t;u!==a.BACKSPACE||c||(c=e(d.tagList[0].lastChild)),c&&c[0]&&d._removeTag(c,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr("aria-busy",!1),e._loading.addClass(C),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr("aria-busy",!0),this._loading.removeClass(C),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(d(e._showBusyHandler,e),100))},_placeholder:function(e,n){var r=this,o=r.input,a=s(),l=r.options.placeholder,d=o.val(),u=o[0]===a,c=d.length;u&&!r.options.autoClose&&d!==l||(c=0,d=""),e===t&&(e=!1,o[0]!==a&&(e=!r.listView.selectedDataItems()[0])),r._prev=d,o.toggleClass("k-readonly",e).val(e?l:d),u&&!n&&i.caret(o[0],c,c),r._scale()},_scale:function(){var e,t=this,n=t.wrapper.find(".k-multiselect-wrap"),i=n.width(),r=t._span.text(t.input.val());n.is(":visible")?e=r.width()+25:(r.appendTo(document.documentElement),i=e=r.width()+25,r.appendTo(n)),t.input.width(e>i?i:e)},_option:function(e,n,r){var o="<option";return e!==t&&(e+="",e.indexOf('"')!==-1&&(e=e.replace(H,"&quot;")),o+=' value="'+e+'"'),r&&(o+=" selected"),o+=">",n!==t&&(o+=i.htmlEncode(n)),o+="</option>"},_render:function(e){var t,n,i,r,o,a,s=this.listView.selectedDataItems(),l=this.listView.value(),d=e.length,u="";for(l.length!==s.length&&(s=this._buildSelectedItems(l)),o={},a={},r=0;r<d;r++)n=e[r],i=this._value(n),t=this._selectedItemIndex(i,s),t!==-1&&s.splice(t,1),a[i]=r,u+=this._option(i,this._text(n),t!==-1);if(s.length)for(r=0;r<s.length;r++)n=s[r],i=this._value(n),o[i]=d,a[i]=d,d+=1,u+=this._option(i,this._text(n),!0);this._customOptions=o,this._optionsMap=a,this.element.html(u)},_buildSelectedItems:function(e){var t,n,i=this.options.dataValueField,r=this.options.dataTextField,o=[];for(n=0;n<e.length;n++)t={},t[i]=e[n],t[r]=e[n],o.push(t);return o},_selectedItemIndex:function(e,t){for(var n=this._value,i=0;i<t.length;i++)if(e===n(t[i]))return i;return-1},_search:function(){var e=this;e._typingTimeout=setTimeout(function(){var t=e._inputValue();e._prev!==t&&(e._prev=t,e.search(t),e._toggleCloseVisibility())},e.options.delay)},_toggleCloseVisibility:function(){this.value().length||this.input.val()&&this.input.val()!==this.options.placeholder?this._showClear():this._hideClear()},_allowOpening:function(){return this._allowSelection()&&o.fn._allowOpening.call(this)},_allowSelection:function(){var e=this.options.maxSelectedItems;return null===e||e>this.listView.value().length},_angularTagItems:function(t){var n=this;n.angular(t,function(){return{elements:n.tagList[0].children,data:e.map(n.dataItems(),function(e){return{dataItem:e}})}})},updatePersistTagList:function(e,t){this.persistTagList=(!this.persistTagList.added||this.persistTagList.added.length!==t.length||!this.persistTagList.removed||this.persistTagList.removed.length!==e.length)&&{added:e,removed:t}},_selectValue:function(e,n){var i,r,o,a=this,s=a.value(),l=a.dataSource.total(),d=a.tagList,u=a._value;if(this.persistTagList)return this.updatePersistTagList(e,n),t;if(a._angularTagItems("cleanup"),"multiple"===a.options.tagMode){for(o=n.length-1;o>-1;o--)i=n[o],d[0].removeChild(d[0].children[i.position]),a._setOption(u(i.dataItem),!1);for(o=0;o<e.length;o++)r=e[o],d.append(a.tagTemplate(r.dataItem)),a._setOption(u(r.dataItem),!0)}else{for((!a._maxTotal||a._maxTotal<l)&&(a._maxTotal=l),d.html(""),s.length&&d.append(a.tagTemplate({values:s,dataItems:a.dataItems(),maxTotal:a._maxTotal,currentTotal:l})),o=n.length-1;o>-1;o--)a._setOption(u(n[o].dataItem),!1);for(o=0;o<e.length;o++)a._setOption(u(e[o].dataItem),!0)}a._angularTagItems("compile"),a._placeholder()},_select:function(t){var n,i,r,o,a=e.Deferred().resolve();return t?(n=this,i=n.listView,r=i.dataItemByIndex(i.getElementIndex(t)),o=t.hasClass("k-state-selected"),n._state===f&&(n._state=""),n._allowSelection()||o?n.trigger(o?k:b,{dataItem:r,item:t})?(n._close(),a):(n.persistTagList=!1,i.select(t).done(function(){n._placeholder(),n._state===p&&(n._state=h,i.skipUpdate(!0))})):a):a},_selectRange:function(n,i){var r,o,a=this,s=this.listView,l=this.options.maxSelectedItems,d=this._getSelectedIndices().slice(),u=[],c=function(t){s.select(t).done(function(){t.forEach(function(t){var n=s.dataItemByIndex(t),i=s.element.children()[t],r=e(i).hasClass("k-state-selected");a.trigger(r?b:k,{dataItem:n,item:i})}),a._change()})};if(d.length-1===i-n)return c(d);if(n<i)for(r=n;r<=i;r++)u.push(r);else for(r=n;r>=i;r--)u.push(r);for(null!==l&&u.length>l&&(u=u.slice(0,l)),r=0;r<u.length;r++)o=u[r],this._getSelectedIndices().indexOf(o)==-1?d.push(o):d.splice(d.indexOf(o),1);return d.length?(a.persistTagList=!1,c(d)):t},_input:function(){var t=this,n=t.element,i=n[0].accessKey,r=t._innerWrapper.children("input.k-input");r[0]||(r=e('<input class="k-input" style="width: 25px" />').appendTo(t._innerWrapper)),n.removeAttr("accesskey"),t._focused=t.input=r.attr({accesskey:i,autocomplete:"off",role:"listbox",title:n[0].title,"aria-expanded":!1})},_tagList:function(){var t=this,n=t._innerWrapper.children("ul");n[0]||(n=e('<ul role="listbox" deselectable="on" class="k-reset"/>').appendTo(t._innerWrapper)),t.tagList=n},_tagTemplate:function(){var e,t=this,n=t.options,r=n.tagTemplate,o=n.dataSource,a="multiple"===n.tagMode;t.element[0].length&&!o&&(n.dataTextField=n.dataTextField||"text",n.dataValueField=n.dataValueField||"value"),e=a?i.template("#:"+i.expr(n.dataTextField,"data")+"#",{useWithBlock:!1}):i.template("#:values.length# item(s) selected"),t.tagTextTemplate=r=r?i.template(r):e,t.tagTemplate=function(e){return'<li class="k-button" deselectable="on"><span deselectable="on">'+r(e)+'</span><span unselectable="on" aria-label="'+(a?"delete":"open")+'" class="k-select"><span class="k-icon '+(a?"k-i-close":"k-i-arrow-60-down")+'"></span></span></li>'}},_loader:function(){this._loading=e('<span class="k-icon k-i-loading '+C+'"></span>').insertAfter(this.input)},_clearButton:function(){o.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.input),this.wrapper.addClass("k-multiselect-clearable"))},_textContainer:function(){var t=i.getComputedStyles(this.input[0],B);t.position="absolute",t.visibility="hidden",t.top=-3333,t.left=-3333,this._span=e("<span/>").css(t).appendTo(this.wrapper)},_wrapper:function(){var t=this,n=t.element,i=n.parent("span.k-multiselect");i[0]||(i=n.wrap('<div class="k-widget k-multiselect k-header" deselectable="on" />').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('<div class="k-multiselect-wrap k-floatwrap" deselectable="on" />').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display",""),t._innerWrapper=e(i[0].firstChild)}});r.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.slider.min",["kendo.draganddrop.min"],e)}(function(){return function(e,t){function n(e,t,n){var i=n?" k-slider-horizontal":" k-slider-vertical",r=e.style?e.style:t.attr("style"),o=t.attr("class")?" "+t.attr("class"):"",a="";return"bottomRight"==e.tickPlacement?a=" k-slider-bottomright":"topLeft"==e.tickPlacement&&(a=" k-slider-topleft"),r=r?" style='"+r+"'":"","<div class='k-widget k-slider"+i+o+"'"+r+"><div class='k-slider-wrap"+(e.showButtons?" k-slider-buttons":"")+a+"'></div></div>"}function i(e,t,n,i){var r="";return r=n?!i&&"increase"==t||i&&"increase"!=t?"k-i-arrow-60-right":"k-i-arrow-60-left":"increase"==t?"k-i-arrow-60-up":"k-i-arrow-60-down","<a class='k-button k-button-"+t+"' title='"+e[t+"ButtonTitle"]+"' aria-label='"+e[t+"ButtonTitle"]+"'><span class='k-icon "+r+"'></span></a>"}function r(e,t){var n,i="<ul class='k-reset k-slider-items'>",r=T.floor(u(t/e.smallStep))+1;for(n=0;n<r;n++)i+="<li class='k-tick' role='presentation'>&nbsp;</li>";return i+="</ul>"}function o(e,t){var n=t.is("input")?1:2,i=2==n?e.leftDragHandleTitle:e.dragHandleTitle;return"<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='"+i+"' role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(n>1?e.selectionStart||e.min:e.value||e.min)+"'>Drag</a>"+(n>1?"<a href='#' class='k-draghandle' title='"+e.rightDragHandleTitle+"'role='slider' aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(e.selectionEnd||e.max)+"'>Drag</a>":"")+"</div>"}function a(e){return function(t){return t+e}}function s(e){return function(){return e}}function l(e){return(e+"").replace(".",m.cultures.current.numberFormat["."])}function d(e){var t=""+e,n=0;return t=t.split("."),t[1]&&(n=t[1].length),n=n>10?10:n}function u(e){var t,n;return e=parseFloat(e,10),t=d(e),n=T.pow(10,t||0),T.round(e*n)/n}function c(e,n){var i=y(e.getAttribute(n));return null===i&&(i=t),i}function h(e){return typeof e!==Q}function p(e){return 1e4*e}var f,m=window.kendo,g=m.ui.Widget,v=m.ui.Draggable,_=m._outerWidth,b=m._outerHeight,k=e.extend,w=m.format,y=m.parseFloat,x=e.proxy,C=e.isArray,T=Math,S=m.support,D=S.pointers,F=S.msPointers,E="change",A="slide",I=".slider",R="touchstart"+I+" mousedown"+I,M=D?"pointerdown"+I:F?"MSPointerDown"+I:R,z="touchend"+I+" mouseup"+I,H=D?"pointerup":F?"MSPointerUp"+I:z,N="moveSelection",B="keydown"+I,P="click"+I,L="mouseover"+I,O="focus"+I,V="blur"+I,W=".k-draghandle",U=".k-slider-track",q=".k-tick",j="k-state-selected",G="k-state-focused",$="k-state-default",K="k-state-disabled",Y="disabled",Q="undefined",X="tabindex",J=m.getTouches,Z=g.extend({init:function(e,t){var n,i=this;if(g.fn.init.call(i,e,t),t=i.options,i._isHorizontal="horizontal"==t.orientation,i._isRtl=i._isHorizontal&&m.support.isRtl(e),i._position=i._isHorizontal?"left":"bottom",i._sizeFn=i._isHorizontal?"width":"height",i._outerSize=i._isHorizontal?_:b,t.tooltip.format=t.tooltip.enabled?t.tooltip.format||"{0}":"{0}",t.smallStep<=0)throw Error("Kendo UI Slider smallStep must be a positive number.");i._createHtml(),i.wrapper=i.element.closest(".k-slider"),i._trackDiv=i.wrapper.find(U),i._setTrackDivWidth(),i._maxSelection=i._trackDiv[i._sizeFn](),i._sliderItemsInit(),i._reset(),i._tabindex(i.wrapper.find(W)),i[t.enabled?"enable":"disable"](),n=m.support.isRtl(i.wrapper)?-1:1,i._keyMap={37:a(-1*n*t.smallStep),40:a(-t.smallStep),39:a(1*n*t.smallStep),38:a(+t.smallStep),35:s(t.max),36:s(t.min),33:a(+t.largeStep),34:a(-t.largeStep)},m.notify(i)},events:[E,A],options:{enabled:!0,min:0,max:10,smallStep:1,largeStep:5,orientation:"horizontal",tickPlacement:"both",tooltip:{enabled:!0,format:"{0}"}},_distance:function(){return u(this.options.max-this.options.min)},_resize:function(){this._setTrackDivWidth(),this.wrapper.find(".k-slider-items").remove(),this._maxSelection=this._trackDiv[this._sizeFn](),this._sliderItemsInit(),this._refresh(),this.options.enabled&&this.enable(!0)},_sliderItemsInit:function(){var t=this,n=t.options,i=t._maxSelection/((n.max-n.min)/n.smallStep),o=t._calculateItemsWidth(T.floor(t._distance()/n.smallStep));"none"!=n.tickPlacement&&i>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(r(n,t._distance())),t._setItemsWidth(o),t._setItemsTitle()),t._calculateSteps(o),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.smallStep&&t._setItemsLargeTick()},getSize:function(){return m.dimensions(this.wrapper)},_setTrackDivWidth:function(){var e=this,t=2*parseFloat(e._trackDiv.css(e._isRtl?"right":e._position),10);e._trackDiv[e._sizeFn](e.wrapper[e._sizeFn]()-2-t)},_setItemsWidth:function(t){var n,i=this,r=i.options,o=0,a=t.length-1,s=i.wrapper.find(q),l=0,d=2,u=s.length,c=0;for(n=0;n<u-2;n++)e(s[n+1])[i._sizeFn](t[n]);if(i._isHorizontal?(e(s[o]).addClass("k-first")[i._sizeFn](t[a-1]),e(s[a]).addClass("k-last")[i._sizeFn](t[a])):(e(s[a]).addClass("k-first")[i._sizeFn](t[a]),e(s[o]).addClass("k-last")[i._sizeFn](t[a-1])),i._distance()%r.smallStep!==0&&!i._isHorizontal){for(n=0;n<t.length;n++)c+=t[n];l=i._maxSelection-c,l+=parseFloat(i._trackDiv.css(i._position),10)+d,i.wrapper.find(".k-slider-items").css("padding-top",l)}},_setItemsTitle:function(){for(var t=this,n=t.options,i=t.wrapper.find(q),r=n.min,o=i.length,a=t._isHorizontal&&!t._isRtl?0:o-1,s=t._isHorizontal&&!t._isRtl?o:-1,l=t._isHorizontal&&!t._isRtl?1:-1;a-s!==0;a+=l)e(i[a]).attr("title",w(n.tooltip.format,u(r))),r+=n.smallStep},_setItemsLargeTick:function(){var t,n,i,r=this,o=r.options,a=r.wrapper.find(q),s=0;if(p(o.largeStep)%p(o.smallStep)===0||r._distance()/o.largeStep>=3)for(r._isHorizontal||r._isRtl||(a=e.makeArray(a).reverse()),s=0;s<a.length;s++)t=e(a[s]),n=r._values[s],i=u(p(n-this.options.min)),i%p(o.smallStep)===0&&i%p(o.largeStep)===0&&(t.addClass("k-tick-large").html("<span class='k-label'>"+t.attr("title")+"</span>"),0!==s&&s!==a.length-1&&t.css("line-height",t[r._sizeFn]()+"px"))},_calculateItemsWidth:function(e){var t,n,i,r=this,o=r.options,a=parseFloat(r._trackDiv.css(r._sizeFn))+1,s=r._distance(),l=a/s;for(s/o.smallStep-T.floor(s/o.smallStep)>0&&(a-=s%o.smallStep*l),t=a/e,n=[],i=0;i<e-1;i++)n[i]=t;return n[e-1]=n[e]=t/2,r._roundWidths(n)},_roundWidths:function(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=e[t]-T.floor(e[t]),e[t]=T.floor(e[t]);return n=T.round(n),this._addAdditionalSize(n,e)},_addAdditionalSize:function(e,t){if(0===e)return t;var n,i=parseFloat(t.length-1)/parseFloat(1==e?e:e-1);for(n=0;n<e;n++)t[parseInt(T.round(i*n),10)]+=1;return t},_calculateSteps:function(e){var t,n=this,i=n.options,r=i.min,o=0,a=n._distance(),s=T.ceil(a/i.smallStep),l=1;if(s+=a/i.smallStep%1===0?1:0,e.splice(0,0,2*e[s-2]),e.splice(s-1,1,2*e.pop()),n._pixelSteps=[o],n._values=[r],0!==s){for(;l<s;)o+=(e[l-1]+e[l])/2,n._pixelSteps[l]=o,r+=i.smallStep,n._values[l]=u(r),l++;t=a%i.smallStep===0?s-1:s,n._pixelSteps[t]=n._maxSelection,n._values[t]=i.max,n._isRtl&&(n._pixelSteps.reverse(),n._values.reverse())}},_getValueFromPosition:function(e,t){var n,i=this,r=i.options,o=T.max(r.smallStep*(i._maxSelection/i._distance()),0),a=0,s=o/2;if(i._isHorizontal?(a=e-t.startPoint,i._isRtl&&(a=i._maxSelection-a)):a=t.startPoint-e,i._maxSelection-(parseInt(i._maxSelection%o,10)-3)/2<a)return r.max;for(n=0;n<i._pixelSteps.length;n++)if(T.abs(i._pixelSteps[n]-a)-1<=s)return u(i._values[n])},_getFormattedValue:function(e,t){var n,i,r,o=this,a="",s=o.options.tooltip;return C(e)?(i=e[0],r=e[1]):t&&t.type&&(i=t.selectionStart,r=t.selectionEnd),t&&(n=t.tooltipTemplate),!n&&s.template&&(n=m.template(s.template)),C(e)||t&&t.type?n?a=n({selectionStart:i,selectionEnd:r}):(i=w(s.format,i),r=w(s.format,r),a=i+" - "+r):(t&&(t.val=e),a=n?n({value:e}):w(s.format,e)),a},_getDraggableArea:function(){var e=this,t=m.getOffset(e._trackDiv);return{startPoint:e._isHorizontal?t.left:t.top+e._maxSelection,endPoint:e._isHorizontal?t.left+e._maxSelection:t.top}},_createHtml:function(){var e=this,t=e.element,r=e.options,a=t.find("input");2==a.length?(a.eq(0).prop("value",l(r.selectionStart)),a.eq(1).prop("value",l(r.selectionEnd))):t.prop("value",l(r.value)),t.wrap(n(r,t,e._isHorizontal)).hide(),r.showButtons&&t.before(i(r,"increase",e._isHorizontal,e._isRtl)).before(i(r,"decrease",e._isHorizontal,e._isRtl)),t.before(o(r,t))},_focus:function(t){var n=this,i=t.target,r=n.value(),o=n._drag;o||(i==n.wrapper.find(W).eq(0)[0]?(o=n._firstHandleDrag,n._activeHandle=0):(o=n._lastHandleDrag,n._activeHandle=1),r=r[n._activeHandle]),e(i).addClass(G+" "+j),o&&(n._activeHandleDrag=o,o.selectionStart=n.options.selectionStart,o.selectionEnd=n.options.selectionEnd,o._updateTooltip(r))},_focusWithMouse:function(t){t=e(t);var n=this,i=t.is(W)?t.index():0;window.setTimeout(function(){n.wrapper.find(W)[2==i?1:0].focus()},1),n._setTooltipTimeout()},_blur:function(t){var n=this,i=n._activeHandleDrag;e(t.target).removeClass(G+" "+j),i&&(i._removeTooltip(),delete n._activeHandleDrag,delete n._activeHandle)},_setTooltipTimeout:function(){var e=this;e._tooltipTimeout=window.setTimeout(function(){var t=e._drag||e._activeHandleDrag;t&&t._removeTooltip()},300)},_clearTooltipTimeout:function(){var e,t=this;window.clearTimeout(this._tooltipTimeout),e=t._drag||t._activeHandleDrag,e&&e.tooltipDiv&&e.tooltipDiv.stop(!0,!1).css("opacity",1)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._form=r.on("reset",x(t._formResetHandler,t)))},min:function(e){return e?(this.setOptions({min:e}),t):this.options.min},max:function(e){return e?(this.setOptions({max:e}),t):this.options.max},setOptions:function(e){g.fn.setOptions.call(this,e),this._sliderItemsInit(),this._refresh()},destroy:function(){this._form&&this._form.off("reset",this._formResetHandler),g.fn.destroy.call(this)}}),ee=Z.extend({init:function(n,i){var r,o=this;n.type="text",i=k({},{value:c(n,"value"),min:c(n,"min"),max:c(n,"max"),smallStep:c(n,"step")},i),n=e(n),i&&i.enabled===t&&(i.enabled=!n.is("[disabled]")),Z.fn.init.call(o,n,i),i=o.options,h(i.value)&&null!==i.value||(i.value=i.min,n.prop("value",l(i.min))),i.value=T.max(T.min(i.value,i.max),i.min),r=o.wrapper.find(W),this._selection=new ee.Selection(r,o,i),o._drag=new ee.Drag(r,"",o,i)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(n){var i,r,o,a=this,s=a.options;a.disable(),n!==!1&&(a.wrapper.removeClass(K).addClass($),a.wrapper.find("input").removeAttr(Y),i=function(n){var i,r,o,s=J(n)[0];if(s){if(i=a._isHorizontal?s.location.pageX:s.location.pageY,r=a._getDraggableArea(),o=e(n.target),o.hasClass("k-draghandle"))return o.addClass(G+" "+j),t;a._update(a._getValueFromPosition(i,r)),a._focusWithMouse(n.target),a._drag.dragstart(n),n.preventDefault()}},a.wrapper.find(q+", "+U).on(M,i).end().on(M,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(H,function(){a._drag._end()}),a.wrapper.find(W).attr(X,0).on(z,function(){a._setTooltipTimeout()}).on(P,function(e){a._focusWithMouse(e.target),e.preventDefault()}).on(O,x(a._focus,a)).on(V,x(a._blur,a)),r=x(function(e){var t=a._nextValueByIndex(a._valueIndex+1*e);a._setValueInRange(t),a._drag._updateTooltip(t)},a),s.showButtons&&(o=x(function(e,t){this._clearTooltipTimeout(),(1===e.which||S.touch&&0===e.which)&&(r(t),this.timeout=setTimeout(x(function(){this.timer=setInterval(function(){r(t)},60)},this),200))},a),a.wrapper.find(".k-button").on(z,x(function(e){this._clearTimer(),a._focusWithMouse(e.target)},a)).on(L,function(t){e(t.currentTarget).addClass("k-state-hover")}).on("mouseout"+I,x(function(t){e(t.currentTarget).removeClass("k-state-hover"),this._clearTimer()},a)).eq(0).on(R,x(function(e){o(e,1)},a)).click(!1).end().eq(1).on(R,x(function(e){o(e,-1)},a)).click(m.preventDefault)),a.wrapper.find(W).off(B,!1).on(B,x(this._keydown,a)),s.enabled=!0)},disable:function(){var t=this;t.wrapper.removeClass($).addClass(K),e(t.element).prop(Y,Y),t.wrapper.find(".k-button").off(R).on(R,function(t){t.preventDefault(),e(this).addClass("k-state-active")}).off(z).on(z,function(t){t.preventDefault(),e(this).removeClass("k-state-active")}).off("mouseleave"+I).on("mouseleave"+I,m.preventDefault).off(L).on(L,m.preventDefault),t.wrapper.find(q+", "+U).off(M).off(H),t.wrapper.find(W).attr(X,-1).off(z).off(B).off(P).off(O).off(V),t.options.enabled=!1},_update:function(e){var t=this,n=t.value()!=e;t.value(e),n&&t.trigger(E,{value:t.options.value})},value:function(e){var n=this,i=n.options;return e=u(e),isNaN(e)?i.value:(e>=i.min&&e<=i.max&&i.value!=e&&(n.element.prop("value",l(e)),i.value=e,n._refreshAriaAttr(e),n._refresh()),t)},_refresh:function(){this.trigger(N,{value:this.options.value})},_refreshAriaAttr:function(e){var t,n=this,i=n._drag;t=i&&i._tooltipDiv?i._tooltipDiv.text():n._getFormattedValue(e,null),this.wrapper.find(W).attr("aria-valuenow",e).attr("aria-valuetext",t)},_clearTimer:function(){clearTimeout(this.timeout),clearInterval(this.timer);
},_keydown:function(e){var t=this;e.keyCode in t._keyMap&&(t._clearTooltipTimeout(),t._setValueInRange(t._keyMap[e.keyCode](t.options.value)),t._drag._updateTooltip(t.value()),e.preventDefault())},_setValueInRange:function(e){var n=this,i=n.options;return e=u(e),isNaN(e)?(n._update(i.min),t):(e=T.max(T.min(e,i.max),i.min),n._update(e),t)},_nextValueByIndex:function(e){var t=this._values.length;return this._isRtl&&(e=t-1-e),this._values[T.max(0,T.min(e,t-1))]},_formResetHandler:function(){var e=this,t=e.options.min;setTimeout(function(){var n=e.element[0].value;e.value(""===n||isNaN(n)?t:n)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(I).find(".k-button").off(I).end().find(W).off(I).end().find(q+", "+U).off(I).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});ee.Selection=function(e,t,n){function i(i){var r=i-n.min,o=t._valueIndex=T.ceil(u(r/n.smallStep)),a=parseInt(t._pixelSteps[o],10),s=t._trackDiv.find(".k-slider-selection"),l=parseInt(t._outerSize(e)/2,10),d=t._isRtl?2:0;s[t._sizeFn](t._isRtl?t._maxSelection-a:a),e.css(t._position,a-l-d)}i(n.value),t.bind([A,N],function(e){i(parseFloat(e.value,10))}),t.bind(E,function(e){i(parseFloat(e.sender.value(),10))})},ee.Drag=function(e,t,n,i){var r=this;r.owner=n,r.options=i,r.element=e,r.type=t,r.draggable=new v(e,{distance:0,dragstart:x(r._dragstart,r),drag:x(r.drag,r),dragend:x(r.dragend,r),dragcancel:x(r.dragcancel,r)}),e.click(!1)},ee.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(n){var i=this,r=i.owner,o=i.options;return o.enabled?(this.owner._activeDragHandle=this,r.element.off(L),r.wrapper.find("."+G).removeClass(G+" "+j),i.element.addClass(G+" "+j),e(document.documentElement).css("cursor","pointer"),i.dragableArea=r._getDraggableArea(),i.step=T.max(o.smallStep*(r._maxSelection/r._distance()),0),i.type?(i.selectionStart=o.selectionStart,i.selectionEnd=o.selectionEnd,r._setZIndex(i.type)):i.oldVal=i.val=o.value,i._removeTooltip(!0),i._createTooltip(),t):(n.preventDefault(),t)},_createTooltip:function(){var t,n,i=this,r=i.owner,o=i.options.tooltip,a="",s=e(window);o.enabled&&(o.template&&(t=i.tooltipTemplate=m.template(o.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body),a=r._getFormattedValue(i.val||r.value(),i),i.type||(n="k-callout-"+(r._isHorizontal?"s":"e"),i.tooltipInnerDiv="<div class='k-callout "+n+"'><!-- --></div>",a+=i.tooltipInnerDiv),i.tooltipDiv.html(a),i._scrollOffset={top:s.scrollTop(),left:s.scrollLeft()},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,r=e.x.location,o=e.y.location,a=n.dragableArea.startPoint,s=n.dragableArea.endPoint;e.preventDefault(),n.val=i._isHorizontal?i._isRtl?n.constrainValue(r,a,s,r<s):n.constrainValue(r,a,s,r>=s):n.constrainValue(o,s,a,o<=s),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.selectionStart=n.val<n.selectionEnd?n.val:n.selectionEnd=n.val:n.val>n.selectionStart?n.selectionEnd=n.val:n.selectionStart=n.selectionEnd=n.val,t={values:[n.selectionStart,n.selectionEnd],value:[n.selectionStart,n.selectionEnd]}):t={value:n.val},i.trigger(A,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n=t.options,i=n.tooltip,r="";i.enabled&&(t.tooltipDiv||t._createTooltip(),r=t.owner._getFormattedValue(u(e),t),t.type||(r+=t.tooltipInnerDiv),t.tooltipDiv.html(r),t.moveTooltip())},dragcancel:function(){return this.owner._refresh(),e(document.documentElement).css("cursor",""),this._end()},dragend:function(){var t=this,n=t.owner;return e(document.documentElement).css("cursor",""),t.type?n._update(t.selectionStart,t.selectionEnd):(n._update(t.val),t.draggable.userEvents._disposeAll()),t.draggable.userEvents.cancel(),t._end()},_end:function(){var e=this,t=e.owner;return t._focusWithMouse(e.element),t.element.on(L),!1},_removeTooltip:function(t){var n=this,i=n.owner;n.tooltipDiv&&i.options.tooltip.enabled&&i.options.enabled&&(t?(n.tooltipDiv.remove(),n.tooltipDiv=null):n.tooltipDiv.fadeOut("slow",function(){e(this).remove(),n.tooltipDiv=null}))},moveTooltip:function(){var t,n,i,r,o=this,a=o.owner,s=0,l=0,d=o.element,u=m.getOffset(d),c=8,h=e(window),p=o.tooltipDiv.find(".k-callout"),f=_(o.tooltipDiv),g=b(o.tooltipDiv);o.type?(t=a.wrapper.find(W),u=m.getOffset(t.eq(0)),n=m.getOffset(t.eq(1)),a._isHorizontal?(s=n.top,l=u.left+(n.left-u.left)/2):(s=u.top+(n.top-u.top)/2,l=n.left),r=_(t.eq(0))+2*c):(s=u.top,l=u.left,r=_(d)+2*c),a._isHorizontal?(l-=parseInt((f-a._outerSize(d))/2,10),s-=g+p.height()+c):(s-=parseInt((g-a._outerSize(d))/2,10),l-=f+p.width()+c),a._isHorizontal?(i=o._flip(s,g,r,b(h)+o._scrollOffset.top),s+=i,l+=o._fit(l,f,_(h)+o._scrollOffset.left)):(i=o._flip(l,f,r,_(h)+o._scrollOffset.left),s+=o._fit(s,g,b(h)+o._scrollOffset.top),l+=i),i>0&&p&&(p.removeClass(),p.addClass("k-callout k-callout-"+(a._isHorizontal?"n":"w"))),o.tooltipDiv.css({top:s,left:l})},_fit:function(e,t,n){var i=0;return e+t>n&&(i=n-(e+t)),e<0&&(i=-e),i},_flip:function(e,t,n,i){var r=0;return e+t>i&&(r+=-(n+t)),e+r<0&&(r+=n+t),r},constrainValue:function(e,t,n,i){var r=this,o=0;return o=t<e&&e<n?r.owner._getValueFromPosition(e,r.dragableArea):i?r.options.max:r.options.min}},m.ui.plugin(ee),f=Z.extend({init:function(n,i){var r,o=this,a=e(n).find("input"),s=a.eq(0)[0],d=a.eq(1)[0];s.type="text",d.type="text",i&&i.showButtons&&(window.console&&window.console.warn("showbuttons option is not supported for the range slider, ignoring"),i.showButtons=!1),i=k({},{selectionStart:c(s,"value"),min:c(s,"min"),max:c(s,"max"),smallStep:c(s,"step")},{selectionEnd:c(d,"value"),min:c(d,"min"),max:c(d,"max"),smallStep:c(d,"step")},i),i&&i.enabled===t&&(i.enabled=!a.is("[disabled]")),Z.fn.init.call(o,n,i),i=o.options,h(i.selectionStart)&&null!==i.selectionStart||(i.selectionStart=i.min,a.eq(0).prop("value",l(i.min))),h(i.selectionEnd)&&null!==i.selectionEnd||(i.selectionEnd=i.max,a.eq(1).prop("value",l(i.max))),r=o.wrapper.find(W),this._selection=new f.Selection(r,o,i),o._firstHandleDrag=new ee.Drag(r.eq(0),"firstHandle",o,i),o._lastHandleDrag=new ee.Drag(r.eq(1),"lastHandle",o,i)},options:{name:"RangeSlider",leftDragHandleTitle:"drag",rightDragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},selectionStart:null,selectionEnd:null},enable:function(n){var i,r=this,o=r.options;r.disable(),n!==!1&&(r.wrapper.removeClass(K).addClass($),r.wrapper.find("input").removeAttr(Y),i=function(n){var i,a,s,l,d,u,c,h=J(n)[0];if(h){if(i=r._isHorizontal?h.location.pageX:h.location.pageY,a=r._getDraggableArea(),s=r._getValueFromPosition(i,a),l=e(n.target),l.hasClass("k-draghandle"))return r.wrapper.find("."+G).removeClass(G+" "+j),l.addClass(G+" "+j),t;s<o.selectionStart?(d=s,u=o.selectionEnd,c=r._firstHandleDrag):s>r.selectionEnd?(d=o.selectionStart,u=s,c=r._lastHandleDrag):s-o.selectionStart<=o.selectionEnd-s?(d=s,u=o.selectionEnd,c=r._firstHandleDrag):(d=o.selectionStart,u=s,c=r._lastHandleDrag),c.dragstart(n),r._setValueInRange(d,u),r._focusWithMouse(c.element)}},r.wrapper.find(q+", "+U).on(M,i).end().on(M,function(){e(document.documentElement).one("selectstart",m.preventDefault)}).on(H,function(){r._activeDragHandle&&r._activeDragHandle._end()}),r.wrapper.find(W).attr(X,0).on(z,function(){r._setTooltipTimeout()}).on(P,function(e){r._focusWithMouse(e.target),e.preventDefault()}).on(O,x(r._focus,r)).on(V,x(r._blur,r)),r.wrapper.find(W).off(B,m.preventDefault).eq(0).on(B,x(function(e){this._keydown(e,"firstHandle")},r)).end().eq(1).on(B,x(function(e){this._keydown(e,"lastHandle")},r)),r.options.enabled=!0)},disable:function(){var e=this;e.wrapper.removeClass($).addClass(K),e.wrapper.find("input").prop(Y,Y),e.wrapper.find(q+", "+U).off(M).off(H),e.wrapper.find(W).attr(X,-1).off(z).off(B).off(P).off(O).off(V),e.options.enabled=!1},_keydown:function(e,t){var n,i,r,o=this,a=o.options.selectionStart,s=o.options.selectionEnd;e.keyCode in o._keyMap&&(o._clearTooltipTimeout(),"firstHandle"==t?(r=o._activeHandleDrag=o._firstHandleDrag,a=o._keyMap[e.keyCode](a),a>s&&(s=a)):(r=o._activeHandleDrag=o._lastHandleDrag,s=o._keyMap[e.keyCode](s),a>s&&(a=s)),o._setValueInRange(u(a),u(s)),n=Math.max(a,o.options.selectionStart),i=Math.min(s,o.options.selectionEnd),r.selectionEnd=Math.max(i,o.options.selectionStart),r.selectionStart=Math.min(n,o.options.selectionEnd),r._updateTooltip(o.value()[o._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),r=i[0]!=e||i[1]!=t;n.value([e,t]),r&&n.trigger(E,{values:[e,t],value:[e,t]})},value:function(e){return e&&e.length?this._value(e[0],e[1]):this._value()},_value:function(e,n){var i=this,r=i.options,o=r.selectionStart,a=r.selectionEnd;return isNaN(e)&&isNaN(n)?[o,a]:(e=u(e),n=u(n),e>=r.min&&e<=r.max&&n>=r.min&&n<=r.max&&e<=n&&(o==e&&a==n||(i.element.find("input").eq(0).prop("value",l(e)).end().eq(1).prop("value",l(n)),r.selectionStart=e,r.selectionEnd=n,i._refresh(),i._refreshAriaAttr(e,n))),t)},values:function(e,t){return C(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(N,{values:[t.selectionStart,t.selectionEnd],value:[t.selectionStart,t.selectionEnd]}),t.selectionStart==t.max&&t.selectionEnd==t.max&&e._setZIndex("firstHandle")},_refreshAriaAttr:function(e,t){var n,i=this,r=i.wrapper.find(W),o=i._activeHandleDrag;n=i._getFormattedValue([e,t],o),r.eq(0).attr("aria-valuenow",e),r.eq(1).attr("aria-valuenow",t),r.attr("aria-valuetext",n)},_setValueInRange:function(e,t){var n=this.options;e=T.max(T.min(e,n.max),n.min),t=T.max(T.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(T.min(e,t),T.max(e,t))},_setZIndex:function(t){this.wrapper.find(W).each(function(n){e(this).css("z-index","firstHandle"==t?1-n:n)})},_formResetHandler:function(){var e=this,t=e.options;setTimeout(function(){var n=e.element.find("input"),i=n[0].value,r=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===r||isNaN(r)?t.max:r)})},destroy:function(){var e=this;Z.fn.destroy.call(e),e.wrapper.off(I).find(q+", "+U).off(I).end().find(W).off(I),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}}),f.Selection=function(e,t,n){function i(i){i=i||[];var o=i[0]-n.min,a=i[1]-n.min,s=T.ceil(u(o/n.smallStep)),l=T.ceil(u(a/n.smallStep)),d=t._pixelSteps[s],c=t._pixelSteps[l],h=parseInt(t._outerSize(e.eq(0))/2,10),p=t._isRtl?2:0;e.eq(0).css(t._position,d-h-p).end().eq(1).css(t._position,c-h-p),r(d,c)}function r(e,n){var i,r,o=t._trackDiv.find(".k-slider-selection");i=T.abs(e-n),o[t._sizeFn](i),t._isRtl?(r=T.max(e,n),o.css("right",t._maxSelection-r-1)):(r=T.min(e,n),o.css(t._position,r-1))}i(t.value()),t.bind([E,A,N],function(e){i(e.values)})},m.ui.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.colorpicker.min",["kendo.core.min","kendo.color.min","kendo.popup.min","kendo.slider.min","kendo.userevents.min","kendo.button.min"],e)}(function(){return function(e,t,n){function i(e,t,n){n=u(n),n&&!n.equals(e.color())&&("change"==t&&(e._value=n),n=1!=n.a?n.toCssRgba():n.toCss(),e.trigger(t,{value:n}))}function r(e,t,n){var i,r;return e=Array.prototype.slice.call(e),i=e.length,r=e.indexOf(t),r<0?n<0?e[i-1]:e[0]:(r+=n,r<0?r+=i:r%=i,e[r])}function o(e){e.preventDefault()}function a(e,t){return function(){return e.apply(t,arguments)}}var s=window.kendo,l=s.ui,d=l.Widget,u=s.parseColor,c=s.Color,h=s.keys,p="background-color",f="k-state-selected",m="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7",g="FFFFFF,FFCCFF,FF99FF,FF66FF,FF33FF,FF00FF,CCFFFF,CCCCFF,CC99FF,CC66FF,CC33FF,CC00FF,99FFFF,99CCFF,9999FF,9966FF,9933FF,9900FF,FFFFCC,FFCCCC,FF99CC,FF66CC,FF33CC,FF00CC,CCFFCC,CCCCCC,CC99CC,CC66CC,CC33CC,CC00CC,99FFCC,99CCCC,9999CC,9966CC,9933CC,9900CC,FFFF99,FFCC99,FF9999,FF6699,FF3399,FF0099,CCFF99,CCCC99,CC9999,CC6699,CC3399,CC0099,99FF99,99CC99,999999,996699,993399,990099,FFFF66,FFCC66,FF9966,FF6666,FF3366,FF0066,CCFF66,CCCC66,CC9966,CC6666,CC3366,CC0066,99FF66,99CC66,999966,996666,993366,990066,FFFF33,FFCC33,FF9933,FF6633,FF3333,FF0033,CCFF33,CCCC33,CC9933,CC6633,CC3333,CC0033,99FF33,99CC33,999933,996633,993333,990033,FFFF00,FFCC00,FF9900,FF6600,FF3300,FF0000,CCFF00,CCCC00,CC9900,CC6600,CC3300,CC0000,99FF00,99CC00,999900,996600,993300,990000,66FFFF,66CCFF,6699FF,6666FF,6633FF,6600FF,33FFFF,33CCFF,3399FF,3366FF,3333FF,3300FF,00FFFF,00CCFF,0099FF,0066FF,0033FF,0000FF,66FFCC,66CCCC,6699CC,6666CC,6633CC,6600CC,33FFCC,33CCCC,3399CC,3366CC,3333CC,3300CC,00FFCC,00CCCC,0099CC,0066CC,0033CC,0000CC,66FF99,66CC99,669999,666699,663399,660099,33FF99,33CC99,339999,336699,333399,330099,00FF99,00CC99,009999,006699,003399,000099,66FF66,66CC66,669966,666666,663366,660066,33FF66,33CC66,339966,336666,333366,330066,00FF66,00CC66,009966,006666,003366,000066,66FF33,66CC33,669933,666633,663333,660033,33FF33,33CC33,339933,336633,333333,330033,00FF33,00CC33,009933,006633,003333,000033,66FF00,66CC00,669900,666600,663300,660000,33FF00,33CC00,339900,336600,333300,330000,00FF00,00CC00,009900,006600,003300,000000",v="#ffffff",_={apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:"Color Hexadecimal Code"},b=".kendoColorTools",k="click"+b,w="keydown"+b,y=s.support.browser,x=y.msie&&y.version<9,C=d.extend({init:function(e,t){var n,i=this;d.fn.init.call(i,e,t),e=i.element,t=i.options,i._value=t.value=u(t.value),i._tabIndex=e.attr("tabIndex")||0,n=i._ariaId=t.ariaId,n&&e.attr("aria-labelledby",n),t._standalone&&(i._triggerSelect=i._triggerChange)},options:{name:"ColorSelector",value:null,_standalone:!0},events:["change","select","cancel"],color:function(e){return e!==n&&(this._value=u(e),this._updateUI(this._value)),this._value},value:function(e){return e=this.color(e),e&&(e=this.options.opacity?e.toCssRgba():e.toCss()),e||null},enable:function(t){0===arguments.length&&(t=!0),e(".k-disabled-overlay",this.wrapper).remove(),t||this.wrapper.append("<div class='k-disabled-overlay'></div>"),this._onEnable(t)},_select:function(e,t){var n=this._value;e=this.color(e),t||(this.element.trigger("change"),e.equals(n)?this._standalone||this.trigger("cancel"):this.trigger("change",{value:this.value()}))},_triggerSelect:function(e){i(this,"select",e)},_triggerChange:function(e){i(this,"change",e)},destroy:function(){this.element&&this.element.off(b),this.wrapper&&this.wrapper.off(b).find("*").off(b),this.wrapper=null,d.fn.destroy.call(this)},_updateUI:e.noop,_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}}),T=C.extend({init:function(t,n){var i,r,o,l,d=this;if(C.fn.init.call(d,t,n),t=d.wrapper=d.element,n=d.options,i=n.palette,"websafe"==i?(i=g,n.columns=18):"basic"==i&&(i=m),"string"==typeof i&&(i=i.split(",")),e.isArray(i)&&(i=e.map(i,function(e){return u(e)})),d._selectedID=(n.ariaId||s.guid())+"_selected",t.addClass("k-widget k-colorpalette").attr("role","grid").attr("aria-readonly","true").append(e(d._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:d._value,id:n.ariaId}))).on(k,".k-item",function(t){d._select(e(t.currentTarget).css(p))}).attr("tabIndex",d._tabIndex).on(w,a(d._keydown,d)),r=n.tileSize){if(/number|string/.test(typeof r))o=l=parseFloat(r);else{if("object"!=typeof r)throw Error("Unsupported value for the 'tileSize' argument");o=parseFloat(r.width),l=parseFloat(r.height)}t.find(".k-item").css({width:o,height:l})}},focus:function(){this.wrapper&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.focus()},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_onEnable:function(e){e?this.wrapper.attr("tabIndex",this._tabIndex):this.wrapper.removeAttr("tabIndex")},_keydown:function(t){var n,i,a=this.wrapper,s=a.find(".k-item"),l=s.filter("."+f).get(0),d=t.keyCode;if(d==h.LEFT?n=r(s,l,-1):d==h.RIGHT?n=r(s,l,1):d==h.DOWN?n=r(s,l,this.options.columns):d==h.UP?n=r(s,l,-this.options.columns):d==h.ENTER?(o(t),l&&this._select(e(l).css(p))):d==h.ESC&&this._cancel(),n){o(t),this._current(n);try{i=u(n.css(p)),this._triggerSelect(i)}catch(c){}}},_current:function(t){this.wrapper.find("."+f).removeClass(f).attr("aria-selected",!1).removeAttr("id"),e(t).addClass(f).attr("aria-selected",!0).attr("id",this._selectedID),this.element.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_updateUI:function(t){var n=null;this.wrapper.find(".k-item").each(function(){var i=u(e(this).css(p));if(i&&i.equals(t))return n=this,!1}),this._current(n)},_template:s.template('<table class="k-palette k-reset" role="presentation"><tr role="row"># for (var i = 0; i < colors.length; ++i) { ## var selected = colors[i].equals(value); ## if (i && i % columns == 0) { # </tr><tr role="row"> # } #<td role="gridcell" unselectable="on" style="background-color:#= colors[i].toCss() #"#= selected ? " aria-selected=true" : "" # #=(id && i === 0) ? "id=\\""+id+"\\" " : "" # class="k-item#= selected ? " '+f+'" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table>')}),S=C.extend({init:function(t,n){var i=this;C.fn.init.call(i,t,n),n=i.options,n.messages=n.options?e.extend(i.options.messages,n.options.messages):i.options.messages,t=i.element,i.wrapper=t.addClass("k-widget k-flatcolorpicker").append(i._template(n)),i._hueElements=e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track",t),i._selectedColor=e(".k-selected-color-display",t),i._colorAsText=e("input.k-color-value",t),i._sliders(),i._hsvArea(),i._updateUI(i._value||u("#f00")),t.find("input.k-color-value").on(w,function(t){var n,r,o=this;if(t.keyCode==h.ENTER)try{n=u(o.value),r=i.color(),i._select(n,n.equals(r))}catch(a){e(o).addClass("k-state-error")}else i.options.autoupdate&&setTimeout(function(){var e=u(o.value,!0);e&&i._updateUI(e,!0)},10)}).end().on(k,".k-controls button.apply",function(){i.options._clearedColor?i.trigger("change"):i._select(i._getHSV())}).on(k,".k-controls button.cancel",function(){i._updateUI(i.color()),i._cancel()}),x&&i._applyIEFilter()},destroy:function(){this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=null,C.fn.destroy.call(this)},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,autoupdate:!0,messages:_},_applyIEFilter:function(){var e=this.element.find(".k-hue-slider .k-slider-track")[0],t=e.currentStyle.backgroundImage;t=t.replace(/^url\([\'\"]?|[\'\"]?\)$/g,""),e.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+t+"', sizingMethod='scale')"},_sliders:function(){function e(e){n._updateUI(n._getHSV(e.value,null,null,null))}function t(e){n._updateUI(n._getHSV(null,null,null,e.value/100))}var n=this,i=n.element,r=i.find(".k-hue-slider"),o=i.find(".k-transparency-slider");r.attr("aria-label","hue saturation"),n._hueSlider=r.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,slide:e,change:e}).data("kendoSlider"),o.attr("aria-label","opacity"),n._opacitySlider=o.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,slide:t,change:t}).data("kendoSlider")},_hsvArea:function(){function e(e,n){var i=this.offset,r=e-i.left,o=n-i.top,a=this.width,s=this.height;r=r<0?0:r>a?a:r,o=o<0?0:o>s?s:o,t._svChange(r/a,1-o/s)}var t=this,n=t.element,i=n.find(".k-hsv-rectangle"),r=i.find(".k-draghandle").attr("tabIndex",0).on(w,a(t._keydown,t));t._hsvEvents=new s.UserEvents(i,{global:!0,press:function(t){this.offset=s.getOffset(i),this.width=i.width(),this.height=i.height(),r.focus(),e.call(this,t.x.location,t.y.location)},start:function(){i.addClass("k-dragging"),r.focus()},move:function(t){t.preventDefault(),e.call(this,t.x.location,t.y.location)},end:function(){i.removeClass("k-dragging")}}),t._hsvRect=i,t._hsvHandle=r},_onEnable:function(e){this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),this.wrapper.find("input").attr("disabled",!e);var t=this._hsvRect.find(".k-draghandle");e?t.attr("tabIndex",this._tabIndex):t.removeAttr("tabIndex")},_keydown:function(e){function t(t,n){var r=i._getHSV();r[t]+=n*(e.shiftKey?.01:.05),r[t]<0&&(r[t]=0),r[t]>1&&(r[t]=1),i._updateUI(r),o(e)}function n(t){var n=i._getHSV();n.h+=t*(e.shiftKey?1:5),n.h<0&&(n.h=0),n.h>359&&(n.h=359),i._updateUI(n),o(e)}var i=this;switch(e.keyCode){case h.LEFT:e.ctrlKey?n(-1):t("s",-1);break;case h.RIGHT:e.ctrlKey?n(1):t("s",1);break;case h.UP:t(e.ctrlKey&&i._opacitySlider?"a":"v",1);break;case h.DOWN:t(e.ctrlKey&&i._opacitySlider?"a":"v",-1);break;case h.ENTER:i._select(i._getHSV());break;case h.F2:i.wrapper.find("input.k-color-value").focus().select();break;case h.ESC:i._cancel()}},focus:function(){this._hsvHandle.focus()},_getHSV:function(e,t,n,i){var r=this._hsvRect,o=r.width(),a=r.height(),s=this._hsvHandle.position();return null==e&&(e=this._hueSlider.value()),null==t&&(t=s.left/o),null==n&&(n=1-s.top/a),null==i&&(i=this._opacitySlider?this._opacitySlider.value()/100:1),c.fromHSV(e,t,n,i)},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateUI:function(e,t){var n=this,i=n._hsvRect;e&&(this._colorAsText.attr("title",n.options.messages.previewInput),this._colorAsText.removeClass("k-state-error"),n._selectedColor.css(p,e.toDisplay()),t||n._colorAsText.val(n._opacitySlider?e.toCssRgba():e.toCss()),n._triggerSelect(e),e=e.toHSV(),n._hsvHandle.css({left:e.s*i.width()+"px",top:(1-e.v)*i.height()+"px"}),n._hueElements.css(p,c.fromHSV(e.h,1,1,1).toCss()),n._hueSlider.value(e.h),n._opacitySlider&&n._opacitySlider.value(100*e.a))},_selectOnHide:function(){return this.options.buttons?null:this._getHSV()},_template:s.template('# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><div class="k-color-input"><input class="k-color-value" # if (clearButton && !_standalone) { #placeholder="#: messages.noColor #" # } ##= !data.input ? \'style="visibility: hidden;"\' : "" #># if (clearButton && !_standalone) { #<span class="k-clear-color k-button k-bare" title="#: messages.clearColor #"></span># } #</div></div></div># } ## if (clearButton && !_standalone && !preview) { #<div class="k-clear-color-container"><span class="k-clear-color k-button k-bare">#: messages.clearColor #</span></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><input class="k-hue-slider" /># if (opacity) { #<input class="k-transparency-slider" /># } ## if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button k-primary apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #')}),D=d.extend({init:function(t,n){var i,r,o,a,s,l=this;d.fn.init.call(l,t,n),n=l.options,t=l.element,i=t.attr("value")||t.val(),i=i?u(i,!0):u(n.value,!0),l._value=n.value=i,r=l.wrapper=e(l._template(n)),t.hide().after(r),t.is("input")&&(t.appendTo(r),o=t.closest("label"),a=t.attr("id"),a&&(o=o.add('label[for="'+a+'"]')),o.click(function(e){l.open(),e.preventDefault()})),l._tabIndex=t.attr("tabIndex")||0,l.enable(!t.attr("disabled")),s=t.attr("accesskey"),s&&(t.attr("accesskey",null),r.attr("accesskey",s)),l.bind("activate",function(e){e.isDefaultPrevented()||l.toggle()}),l._updateUI(i)},destroy:function(){this.wrapper.off(b).find("*").off(b),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,d.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.children(".k-picker-wrap"),r=i.find(".k-select");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),r.off(b).on("mousedown"+b,o),n.addClass("k-state-disabled").removeAttr("tabIndex").add("*",n).off(b),e?n.removeClass("k-state-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+b,function(){i.addClass("k-state-hover")}).on("mouseleave"+b,function(){i.removeClass("k-state-hover")}).on("focus"+b,function(){i.addClass("k-state-focused")}).on("blur"+b,function(){i.removeClass("k-state-focused")}).on(w,a(t._keydown,t)).on(k,".k-select",a(t.toggle,t)).on(k,t.options.toolIcon?".k-tool-icon":".k-selected-color",function(){t.trigger("activate")}):t.close()},_template:s.template('<span role="textbox" aria-haspopup="true" class="k-widget k-colorpicker k-header"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-icon k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"><span class="k-icon k-i-line" style="display: none;"></span></span># } #<span class="k-select" unselectable="on" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span></span>'),options:{name:"ColorPicker",palette:null,columns:10,toolIcon:null,value:null,messages:_,opacity:!1,buttons:!0,preview:!0,clearButton:!1,ARIATemplate:'Current selected color is #=data || ""#'},events:["activate","change","select","open","close"],open:function(){this.element.prop("disabled")||this._getPopup().open()},close:function(){var e=this._selector&&this._selector.options||{};e._closing=!0,this._getPopup().close(),delete e._closing},toggle:function(){this.element.prop("disabled")||this._getPopup().toggle()},_noColorIcon:function(){return this.wrapper.find(".k-picker-wrap > .k-selected-color > .k-icon.k-i-line")},color:C.fn.color,value:C.fn.value,_select:C.fn._select,_triggerSelect:C.fn._triggerSelect,_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_updateUI:function(e){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=s.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t)),this._triggerSelect(e),this.wrapper.find(".k-selected-color").css(p,e?e.toDisplay():v),this._noColorIcon()[t?"hide":"show"]()},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==h.ESC?this._selector._cancel():this._selector._keydown(e),o(e)):t!=h.ENTER&&t!=h.DOWN||(this.open(),o(e))},_getPopup:function(){var t,i,r,o,a=this,l=a._popup;return l||(t=a.options,i=t.palette?T:S,t._standalone=!1,delete t.select,delete t.change,delete t.cancel,r=s.guid(),o=a._selector=new i(e('<div id="'+r+'"/>').appendTo(document.body),t),a.wrapper.attr("aria-owns",r),a._popup=l=o.wrapper.kendoPopup({anchor:a.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),o.element.find(".k-clear-color").kendoButton({icon:"reset-color",click:function(e){o.options._clearedColor=!0,a.value(null),a.element.val(null),a._updateUI(null),o._colorAsText.val(""),o._hsvHandle.css({top:"0px",left:"0px"}),o._selectedColor.css(p,v),a.trigger("change",{value:a.value()}),e.preventDefault()}}),o.bind({select:function(e){a._updateUI(u(e.value)),delete o.options._clearedColor},change:function(){o.options._clearedColor||a._select(o.color()),a.close()},cancel:function(){o.options._clearedColor&&!a.value()&&o.value()&&a._select(o.color(),!0),a.close()}}),l.bind({close:function(e){var t,i,r,s;return a.trigger("close")?(e.preventDefault(),n):(a.wrapper.children(".k-picker-wrap").removeClass("k-state-focused"),t=o._selectOnHide(),i=o.value(),r=a.value(),s=o.options,t?s._clearedColor&&!r||a._select(t):(setTimeout(function(){a.wrapper&&!a.wrapper.is("[unselectable='on']")&&a.wrapper.focus()}),!s._closing&&s._clearedColor&&!r&&i?a._select(i,!0):a._updateUI(a.color())),n)},open:function(e){a.trigger("open")?e.preventDefault():a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")},activate:function(){o._select(a.color(),!0),o.focus(),a.wrapper.children(".k-picker-wrap").addClass("k-state-focused")}})),l}});l.plugin(T),l.plugin(S),l.plugin(D)}(jQuery,parseInt),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.numerictextbox.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){var n="k-i-arrow-"+("increase"===e?"60-up":"60-down");return'<span unselectable="on" class="k-link k-link-'+e+'" aria-label="'+t+'" title="'+t+'"><span unselectable="on" class="'+F+" "+n+'"></span></span>'}function i(e,t){var n=(""+parseFloat(e,10)).split(D);return n[1]&&(n[1]=n[1].substring(0,t)),n.join(D)}var r=window.kendo,o=r.caret,a=r.keys,s=r.ui,l=s.Widget,d=r._activeElement,u=r._extractFormat,c=r.parseFloat,h=r.support.placeholder,p=r.getCulture,f="change",m="disabled",g="readonly",v="k-input",_="spin",b=".kendoNumericTextBox",k="touchend",w="mouseleave"+b,y="mouseenter"+b+" "+w,x="k-state-default",C="k-state-focused",T="k-state-hover",S="focus",D=".",F="k-icon",E="k-state-selected",A="k-state-disabled",I="k-state-invalid",R="aria-disabled",M=/^(-)?(\d*)$/,z=null,H=e.proxy,N=e.extend,B=l.extend({init:function(n,i){var o,a,s,d,c,h=this,p=i&&i.step!==t;l.fn.init.call(h,n,i),i=h.options,n=h.element.on("focusout"+b,H(h._focusout,h)).attr("role","spinbutton"),i.placeholder=i.placeholder||n.attr("placeholder"),h._initialOptions=N({},i),o=h.min(n.attr("min")),a=h.max(n.attr("max")),s=h._parse(n.attr("step")),i.min===z&&o!==z&&(i.min=o),i.max===z&&a!==z&&(i.max=a),p||s===z||(i.step=s),h._reset(),h._wrapper(),h._arrows(),h._validation(),h._input(),r.support.mobileOS?h._text.on(k+b+" "+S+b,function(){r.support.browser.edge?h._text.one(S+b,function(){h._toggleText(!1),n.focus()}):(h._toggleText(!1),n.focus())}):h._text.on(S+b,H(h._click,h)),n.attr("aria-valuemin",i.min!==z?i.min*i.factor:i.min).attr("aria-valuemax",i.max!==z?i.max*i.factor:i.max),i.format=u(i.format),d=i.value,h.value(d!==z?d:n.val()),c=n.is("[disabled]")||e(h.element).parents("fieldset").is(":disabled"),c?h.enable(!1):h.readonly(n.is("[readonly]")),r.notify(h)},options:{name:"NumericTextBox",decimals:z,restrictDecimals:!1,min:z,max:z,value:z,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",factor:1,upArrowText:"Increase value",downArrowText:"Decrease value"},events:[f,_],_editable:function(e){var t=this,n=t.element,i=e.disable,r=e.readonly,o=t._text.add(n),a=t._inputWrapper.off(y);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+b).off("keypress"+b).off("keyup"+b).off("paste"+b),r||i?(a.addClass(i?A:x).removeClass(i?x:A),o.attr(m,i).attr(g,r).attr(R,i)):(a.addClass(x).removeClass(A).on(y,t._toggleHover),o.removeAttr(m).removeAttr(g).attr(R,!1),t._upArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(E)}),t._downArrowEventHandler.bind("press",function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(E)}),t.element.on("keydown"+b,H(t._keydown,t)).on("keypress"+b,H(t._keypress,t)).on("keyup"+b,H(t._keyup,t)).on("paste"+b,H(t._paste,t)))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),l.fn.destroy.call(e)},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},step:function(e){return this._option("step",e)},value:function(e){var n,i=this;return e===t?i._value:(e=i._parse(e),n=i._adjust(e),e===n&&(i._update(e),i._old=i._value),t)},focus:function(){this._focusin()},_adjust:function(e){var t=this,n=t.options,i=n.min,r=n.max;return e===z?e:(i!==z&&e<i?e=i:r!==z&&e>r&&(e=r),e)},_arrows:function(){var t,i=this,o=function(){clearTimeout(i._spinning),t.removeClass(E)},a=i.options,s=a.spinners,l=i.element;t=l.siblings("."+F),t[0]||(t=e(n("increase",a.upArrowText)+n("decrease",a.downArrowText)).insertAfter(l),t.wrapAll('<span class="k-select"/>')),s||(t.parent().toggle(s),i._inputWrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),
i._upArrowEventHandler=new r.UserEvents(i._upArrow,{release:o}),i._downArrow=t.eq(1),i._downArrowEventHandler=new r.UserEvents(i._downArrow,{release:o})},_validation:function(){var t=this,n=t.element;t._validationIcon=e("<span class='"+F+" k-i-warning'></span>").hide().insertAfter(n)},_blur:function(){var e=this;e._toggleText(!0),e._change(e.element.val())},_click:function(e){var t=this;clearTimeout(t._focusing),t._focusing=setTimeout(function(){var n,i,r,a=e.target,s=o(a)[0],l=a.value.substring(0,s),d=t._format(t.options.format),u=d[","],c=0;u&&(i=RegExp("\\"+u,"g"),r=RegExp("([\\d\\"+u+"]+)(\\"+d[D]+")?(\\d+)?")),r&&(n=r.exec(l)),n&&(c=n[0].replace(i,"").length,l.indexOf("(")!=-1&&t._value<0&&c++),t._focusin(),o(t.element[0],c)})},_change:function(e){var t=this,n=t.options.factor;n&&1!==n&&(e=r.parseFloat(e),null!==e&&(e/=n)),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(f),t.trigger(f)),t._typing=!1},_culture:function(e){return e||p(this.options.culture)},_focusin:function(){var e=this;e._inputWrapper.addClass(C),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e._inputWrapper.removeClass(C).removeClass(T),e._blur(),e._removeInvalidState()},_format:function(e,t){var n=this._culture(t).numberFormat;return e=e.toLowerCase(),e.indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,n=this,i=n.options,r="k-formatted-value",o=n.element.addClass(v).show()[0],a=o.accessKey,s=n.wrapper;t=s.find(D+r),t[0]||(t=e('<input type="text"/>').insertBefore(o).addClass(r));try{o.setAttribute("type","text")}catch(l){o.type="text"}n._initialTitle=o.title,t[0].title=o.title,t[0].tabIndex=o.tabIndex,t[0].style.cssText=o.style.cssText,t.prop("placeholder",i.placeholder),a&&(t.attr("accesskey",a),o.accessKey=""),n._text=t.addClass(o.className).attr({role:"spinbutton","aria-valuemin":i.min!==z?i.min*i.factor:i.min,"aria-valuemax":i.max!==z?i.max*i.factor:i.max})},_keydown:function(e){var t=this,n=e.keyCode;t._key=n,n==a.DOWN?t._step(-1):n==a.UP?t._step(1):n==a.ENTER?t._change(t.element.val()):t._typing=!0},_keypress:function(e){var t,n,i,r,s,l,d,u,c,h,p;0===e.which||e.metaKey||e.ctrlKey||e.keyCode===a.BACKSPACE||e.keyCode===a.ENTER||(t=this,n=t.options.min,i=t.element,r=o(i),s=r[0],l=r[1],d=String.fromCharCode(e.which),u=t._format(t.options.format),c=t._key===a.NUMPAD_DOT,h=i.val(),c&&(d=u[D]),h=h.substring(0,s)+d+h.substring(l),p=t._numericRegex(u).test(h),p&&c?(i.val(h),o(i,s+d.length),e.preventDefault()):(null!==n&&n>=0&&"-"===h.charAt(0)||!p)&&(t._addInvalidState(),e.preventDefault()),t._key=0)},_keyup:function(){this._removeInvalidState()},_addInvalidState:function(){var e=this;e._inputWrapper.addClass(I),e._validationIcon.show()},_removeInvalidState:function(){var e=this;e._inputWrapper.removeClass(I),e._validationIcon.hide()},_numericRegex:function(e){var t=this,n=e[D],i=t.options.decimals,r="*";return n===D&&(n="\\"+n),i===z&&(i=e.decimals),0===i?M:(t.options.restrictDecimals&&(r="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=RegExp("^(-)?(((\\d+("+n+"\\d"+r+")?)|("+n+"\\d"+r+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,r=t._format(t.options.format);setTimeout(function(){var e=t._parse(n.value);e===z?t._update(i):(n.value=(""+e).replace(D,r[D]),t._adjust(e)===e&&t._numericRegex(r).test(n.value)||t._update(i))})},_option:function(e,n){var i=this,r=i.element,o=i.options;return n===t?o[e]:(n=i._parse(n),(n||"step"!==e)&&(o[e]=n,r.add(i._text).attr("aria-value"+e,n),r.attr(e,n)),t)},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout(function(){n._spin(e,50)},t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._parse(n.val())||0;d()!=n[0]&&t._focusin(),t.options.factor&&i&&(i/=t.options.factor),i+=t.options.step*e,t._update(t._adjust(i)),t._typing=!1,t.trigger(_)},_toggleHover:function(t){e(t.currentTarget).toggleClass(T,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),t.element.toggle(!e)},_parse:function(e,t){return c(e,this._culture(t),this.options.format)},_round:function(e,t){var n=this.options.round?r._round:i;return n(e,t)},_update:function(e){var t,n=this,i=n.options,o=i.factor,a=i.format,s=i.decimals,l=n._culture(),d=n._format(a,l);s===z&&(s=d.decimals),e=n._parse(e,l),t=e!==z,t&&(e=parseFloat(n._round(e,s),10)),n._value=e=n._adjust(e),n._placeholder(r.toString(e,a,l)),t?(o&&(e=parseFloat(n._round(e*o,s),10)),e=""+e,e.indexOf("e")!==-1&&(e=n._round(+e,s)),e=e.replace(D,d[D])):e=null,n.element.val(e),n.element.add(n._text).attr("aria-valuenow",e)},_placeholder:function(e){var t=this._text;t.val(e),h||e||t.val(this.options.placeholder),t.attr("title",this._initialTitle||t.val())},_wrapper:function(){var t,n=this,i=n.element,r=i[0];t=i.parents(".k-numerictextbox"),t.is("span.k-numerictextbox")||(t=i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(),t=t.wrap("<span/>").parent()),t[0].style.cssText=r.style.cssText,r.style.width="",n.wrapper=t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display",""),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){setTimeout(function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)})},t._form=r.on("reset",t._resetHandler))}});s.plugin(B)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filtermenu.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.dropdownlist.min","kendo.binder.min"],e)}(function(){return function(e,t){function n(t,i){t.filters&&(t.filters=e.grep(t.filters,function(e){return n(e,i),e.filters?e.filters.length:e.field!=i}))}function i(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t<n;t++)i=e[t],o=""!==i.text?i.text||i.value||i:i.text,r=null==i.value?i.text||i:i.value,a[t]={text:o,value:r};return a}function r(t,n){return e.grep(t,function(t){return t.filters?(t.filters=e.grep(t.filters,function(e){return e.field!=n}),t.filters.length):t.field!=n})}function o(t,n){t.filters&&(t.filters=e.grep(t.filters,function(e){return o(e,n),e.filters?e.filters.length:e.field==n&&"eq"==e.operator}))}function a(n){return"and"==n.logic&&n.filters.length>1?[]:n.filters?e.map(n.filters,function(e){return a(e)}):n.value!==t?[n.value]:[]}function s(e,n){for(var i,r,o=d.getter(n,!0),a=[],s=0,l={};s<e.length;)i=e[s++],r=o(i),r===t||l.hasOwnProperty(r)||(a.push(i),l[r]=!0);return a}function l(e,t){return function(n){var i=e(n);return s(i,t)}}var d=window.kendo,u=d.ui,c=e.proxy,h="kendoPopup",p="init",f="open",m="refresh",g="change",v=".kendoFilterMenu",_="Is equal to",b="Is not equal to",k={number:"numerictextbox",date:"datepicker"},w={string:"text",number:"number",date:"date"},y=d.isFunction,x=u.Widget,C='<div><div class="k-filter-help-text">#=messages.info#</div><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label><div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',T='<div><div class="k-filter-help-text">#=messages.info#</div><select title="#=messages.operator#" data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.value#" data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.value#" data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}##if(extra){#<select title="#=messages.logic#" class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select title="#=messages.additionalOperator#" data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select title="#=messages.additionalValue#" data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#" data-#=ns#value-primitive="true"></select>#}else{#<input title="#=messages.additionalValue#" data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>#}##}#<div><button type="submit" class="k-button k-primary">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>',S='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form title="#=messages.title#" class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label">#=messages.operator#<select data-#=ns#bind="value: filters[0].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.value##if(values){#<select data-#=ns#bind="value:filters[0].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#if(extra){#</ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="and" />#=messages.and#</label></li><li class="k-item"><label class="k-label"><input type="radio" name="logic" class="k-check" data-#=ns#bind="checked: logic" value="or" />#=messages.or#</label></li></ul><ul class="k-filter-help-text"><li><span class="k-link"></span><li class="k-item"><label class="k-label">#=messages.additionalOperator#<select data-#=ns#bind="value: filters[1].operator">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select></label></li><li class="k-item"><label class="k-label">#=messages.additionalValue##if(values){#<select data-#=ns#bind="value:filters[1].value"><option value="">#=messages.selectValue#</option>#for(var val in values){#<option value="#=values[val].value#">#=values[val].text#</option>#}#</select>#}else{#<input data-#=ns#bind="value:filters[1].value" class="k-textbox" type="#=inputType#" #=useRole ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}#</label></li>#}#</ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></div></form></div>',D='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form title="#=messages.title#" class="k-filter-menu k-mobile-list"><ul class="k-filter-help-text"><li><span class="k-link">#=messages.info#</span><ul><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label></li><li class="k-item"><label class="k-label"><input class="k-check" type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label></li></ul></li><li class="k-button-container"><button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',F=x.extend({init:function(t,n){var i,r,o,a,s=this,l="string";x.fn.init.call(s,t,n),i=s.operators=n.operators||{},t=s.element,n=s.options,n.appendToElement||(o=t.addClass("k-with-icon k-filterable").find(".k-grid-filter"),o[0]||(o=t.prepend('<a class="k-grid-filter" href="#" title="'+n.messages.filter+'" aria-label="'+n.messages.filter+'"><span class="k-icon k-i-filter"></span></a>').find(".k-grid-filter")),o.attr("tabindex",-1).on("click"+v,c(s._click,s))),s.link=o||e(),s.dataSource=A.create(n.dataSource),s.field=n.field||t.attr(d.attr("field")),s.model=s.dataSource.reader.model,s._parse=function(e){return null!=e?e+"":e},s.model&&s.model.fields&&(a=s.model.fields[s.field],a&&(l=a.type||"string",a.parse&&(s._parse=c(a.parse,a)))),n.values&&(l="enums"),s.type=l,i=i[l]||n.operators[l];for(r in i)break;s._defaultFilter=function(){return{field:s.field,operator:r||"eq",value:""}},s._refreshHandler=c(s.refresh,s),s.dataSource.bind(g,s._refreshHandler),n.appendToElement?s._init():s.refresh()},_init:function(){var t,n=this,i=n.options.ui,r=y(i);n.pane=n.options.pane,n.pane&&(n._isMobile=!0),r||(t=i||k[n.type]),n._isMobile?n._createMobileForm(t):n._createForm(t),n.form.on("submit"+v,c(n._submit,n)).on("reset"+v,c(n._reset,n)),r&&n.form.find(".k-textbox").removeClass("k-textbox").each(function(){i(e(this))}),n.form.find("["+d.attr("role")+"=numerictextbox]").removeClass("k-textbox").end().find("["+d.attr("role")+"=datetimepicker]").removeClass("k-textbox").end().find("["+d.attr("role")+"=timepicker]").removeClass("k-textbox").end().find("["+d.attr("role")+"=datepicker]").removeClass("k-textbox"),n.refresh(),n.trigger(p,{field:n.field,container:n.form}),d.cycleForm(n.form)},_createForm:function(t){var n=this,r=n.options,o=n.operators||{},a=n.type;o=o[a]||r.operators[a],n.form=e('<form title="'+n.options.messages.title+'" class="k-filter-menu"/>').html(d.template("boolean"===a?C:T)({field:n.field,format:r.format,ns:d.ns,messages:r.messages,extra:r.extra,operators:o,type:a,role:t,values:i(r.values)})),r.appendToElement?(n.element.append(n.form),n.popup=n.element.closest(".k-popup").data(h)):n.popup=n.form[h]({anchor:n.link,open:c(n._open,n),activate:c(n._activate,n),close:function(){n.options.closeCallback&&n.options.closeCallback(n.element)}}).data(h),n.form.on("keydown"+v,c(n._keydown,n))},_createMobileForm:function(t){var n=this,r=n.options,o=n.operators||{},a=n.type;o=o[a]||r.operators[a],n.form=e("<div />").html(d.template("boolean"===a?D:S)({field:n.field,title:r.title||n.field,format:r.format,ns:d.ns,messages:r.messages,extra:r.extra,operators:o,type:a,role:t,useRole:!d.support.input.date&&"date"===a||"number"===a,inputType:w[a],values:i(r.values)})),n.view=n.pane.append(n.form.html()),n.form=n.view.element.find("form"),n.view.element.on("click",".k-submit",function(e){n.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){n._closeForm(),e.preventDefault()})},refresh:function(){var e=this,t=e.dataSource.filter()||{filters:[],logic:"and"},n=[e._defaultFilter()],i=e._defaultFilter().operator;(e.options.extra||"isnull"!==i&&"isnotnull"!==i)&&n.push(e._defaultFilter()),e.filterModel=d.observable({logic:"and",filters:n}),e.form&&d.bind(e.form.children().first(),e.filterModel),e._bind(t)?e.link.addClass("k-state-active"):e.link.removeClass("k-state-active")},destroy:function(){var e=this;x.fn.destroy.call(e),e.form&&(d.unbind(e.form),d.destroy(e.form),e.form.unbind(v),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null),e.view&&(e.view.purge(),e.view=null),e.link.unbind(v),e._refreshHandler&&(e.dataSource.unbind(g,e._refreshHandler),e.dataSource=null),e.element=e.link=e._refreshHandler=e.filterModel=null},_bind:function(e){var t,n,i,r,o=this,a=e.filters,s=!1,l=0,d=o.filterModel;for(t=0,n=a.length;t<n;t++)r=a[t],r.field==o.field?(d.set("logic",e.logic),i=d.filters[l],i||(d.filters.push({field:o.field}),i=d.filters[l]),i.set("value",o._parse(r.value)),i.set("operator",r.operator),l++,s=!0):r.filters&&(s=s||o._bind(r));return s},_stripFilters:function(t){return e.grep(t,function(e){return""!==e.value&&null!=e.value||"isnull"===e.operator||"isnotnull"===e.operator||"isempty"===e.operator||"isnotempty"===e.operator})},_merge:function(e){var t,i,r,o=this,a=e.logic||"and",s=this._stripFilters(e.filters),l=o.dataSource.filter()||{filters:[],logic:"and"};for(n(l,o.field),i=0,r=s.length;i<r;i++)t=s[i],t.value=o._parse(t.value);return s.length&&(l.filters.length?(e.filters=s,"and"!==l.logic&&(l.filters=[{logic:l.logic,filters:l.filters}],l.logic="and"),l.filters.push(s.length>1?e:s[0])):(l.filters=s,l.logic=a)),l},filter:function(e){var t=this._stripFilters(e.filters);t.length&&this.trigger("change",{filter:{logic:e.logic,filters:t},field:this.field})||(e=this._merge(e),e.filters.length&&this.dataSource.filter(e))},clear:function(){var e=this,t=e.dataSource.filter()||{filters:[]};this.trigger("change",{filter:null,field:e.field})||e._removeFilter(t)},_removeFilter:function(t){var n=this;t.filters=e.grep(t.filters,function(e){return e.filters?(e.filters=r(e.filters,n.field),e.filters.length):e.field!=n.field}),t.filters.length||(t=null),n.dataSource.filter(t)},_submit:function(t){var n,i;t.preventDefault(),t.stopPropagation(),n=this.filterModel.toJSON(),i=e.grep(n.filters,function(e){return""!==e.value}),this._checkForNullOrEmptyFilter(n)||i&&i.length?this.filter(n):this._removeFilter(n),this._closeForm()},_checkForNullOrEmptyFilter:function(e){var t,n,i;return!!(e&&e.filters&&e.filters.length)&&(t=!1,n=!1,e.filters[0]&&(i=e.filters[0].operator,t="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i),e.filters[1]&&(i=e.filters[1].operator,n="isnull"==i||"isnotnull"==i||"isnotempty"==i||"isempty"==i),!this.options.extra&&t||this.options.extra&&(t||n))},_reset:function(){this.clear(),this.options.search&&this.container&&this.container.find("label").parent().show(),this._closeForm()},_closeForm:function(){this._isMobile?this.pane.navigate("",this.options.animations.right):this.popup.close()},_click:function(e){e.preventDefault(),e.stopPropagation(),this.popup||this.pane||this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle()},_open:function(){var t;e(".k-filter-menu").not(this.form).each(function(){t=e(this).data(h),t&&t.close()})},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(f,{field:this.field,container:this.form})},_keydown:function(e){e.keyCode==d.keys.ESC&&this.popup.close()},events:[p,"change",f],options:{name:"FilterMenu",extra:!0,appendToElement:!1,type:"string",operators:{string:{eq:_,neq:b,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty"},number:{eq:_,neq:b,gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than",isnull:"Is null",isnotnull:"Is not null"},date:{eq:_,neq:b,gte:"Is after or equal to",gt:"Is after",lte:"Is before or equal to",lt:"Is before",isnull:"Is null",isnotnull:"Is not null"},enums:{eq:_,neq:b,isnull:"Is null",isnotnull:"Is not null"}},messages:{info:"Show items with value that:",title:"Show items with value that:",isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",and:"And",or:"Or",selectValue:"-Select value-",operator:"Operator",value:"Value",additionalValue:"Additional value",additionalOperator:"Additional operator",logic:"Filters logic",cancel:"Cancel"},animations:{left:"slide",right:"slide:right"}}}),E=".kendoFilterMultiCheck",A=d.data.DataSource,I='<div data-#=ns#role="view" data-#=ns#init-widgets="false" class="k-grid-filter-menu"><div data-#=ns#role="header" class="k-header"><button class="k-button k-i-cancel">#=messages.cancel#</button>#=title#<button type="submit" class="k-button k-submit">#=messages.filter#</button></div><form class="k-filter-menu k-mobile-list">#if(search){#<div class=\'k-textbox k-space-right\'><input placeholder=\'#=messages.search#\'/><span class=\'k-icon k-i-zoom\' /></div>#}#<ul class="k-multicheck-wrap"></ul></li><li class="k-button-container">#if(messages.selectedItemsFormat){#<div class=\'k-filter-selected-items\'></div>#}#<button type="reset" class="k-button">#=messages.clear#</button></li></ul></form></div>',R=x.extend({init:function(t,n){var i,r;x.fn.init.call(this,t,n),n=this.options,this.element=e(t),i=this.field=this.options.field||this.element.attr(d.attr("field")),r=n.checkSource,this._foreignKeyValues()?(this.checkSource=A.create(n.values),this.checkSource.fetch()):n.forceUnique?(r=e.extend(!0,{},n.dataSource.options),delete r.pageSize,this.checkSource=A.create(r),this.checkSource.reader.data=l(this.checkSource.reader.data,this.field)):this.checkSource=A.create(r),this.dataSource=n.dataSource,this.model=this.dataSource.reader.model,this._parse=function(e){return e+""},this.model&&this.model.fields&&(i=this.model.fields[this.field],i&&("number"==i.type?this._parse=function(e){return"string"==typeof e&&"null"===e.toLowerCase()?null:parseFloat(e)}:i.parse&&(this._parse=c(i.parse,i)),this.type=i.type||"string")),n.appendToElement?this._init():this._createLink(),this._refreshHandler=c(this.refresh,this),this.dataSource.bind(g,this._refreshHandler)},_createLink:function(){var e=this.element,t=e.addClass("k-with-icon k-filterable").find(".k-grid-filter");t[0]||(t=e.prepend('<a class="k-grid-filter" href="#" aria-label="'+this.options.messages.filter+'"><span class="k-icon k-i-filter"/></a>').find(".k-grid-filter")),this._link=t.attr("tabindex",-1).on("click"+v,c(this._click,this))},_init:function(){var e=this,t=this.options.forceUnique,n=this.options;this.pane=n.pane,this.pane&&(this._isMobile=!0),this._createForm(),this._foreignKeyValues()?this.refresh():t&&!this.checkSource.options.serverPaging&&this.dataSource.data().length?(this.checkSource.data(s(this.dataSource.data(),this.field)),this.refresh()):(this._attachProgress(),this.checkSource.fetch(function(){e.refresh.call(e)})),this.options.forceUnique||(this.checkChangeHandler=function(){e.container.empty(),e.refresh()},this.checkSource.bind(g,this.checkChangeHandler)),this.form.on("keydown"+E,c(this._keydown,this)).on("submit"+E,c(this._filter,this)).on("reset"+E,c(this._reset,this)),this.trigger(p,{field:this.field,container:this.form})},_attachProgress:function(){var e=this;this._progressHandler=function(){u.progress(e.container,!0)},this._progressHideHandler=function(){u.progress(e.container,!1)},this.checkSource.bind("progress",this._progressHandler).bind("change",this._progressHideHandler)},_input:function(){var e=this;e._clearTypingTimeout(),e._typingTimeout=setTimeout(function(){e.search()},100)},_clearTypingTimeout:function(){this._typingTimeout&&(clearTimeout(this._typingTimeout),this._typingTimeout=null)},search:function(){var e,t,n,i=this.options.ignoreCase,r=this.searchTextBox[0].value,o=this.container.find("label");for(i&&(r=r.toLowerCase()),e=0,this.options.checkAll&&o.length&&(o[0].parentNode.style.display=r?"none":"",e++);e<o.length;)t=o[e],n=t.textContent||t.innerText,i&&(n=n.toLowerCase()),t.parentNode.style.display=n.indexOf(r)>=0?"":"none",e++},_activate:function(){this.form.find(":kendoFocusable:first").focus(),this.trigger(f,{field:this.field,container:this.form})},_createForm:function(){var t,n,i=this.options,r="";this._isMobile||(i.search&&(r+="<div class='k-textbox k-space-right'><input placeholder='"+i.messages.search+"'/><span class='k-icon k-i-zoom' /></div>"),r+="<ul class='k-reset k-multicheck-wrap'></ul>",i.messages.selectedItemsFormat&&(r+="<div class='k-filter-selected-items'>"+d.format(i.messages.selectedItemsFormat,0)+"</div>"),r+="<button type='submit' class='k-button k-primary'>"+i.messages.filter+"</button>",r+="<button type='reset' class='k-button'>"+i.messages.clear+"</button>",this.form=e('<form class="k-filter-menu"/>').html(r),this.container=this.form.find(".k-multicheck-wrap")),this._isMobile?(t=this,t.form=e("<div />").html(d.template(I)({field:t.field,title:i.title||t.field,ns:d.ns,messages:i.messages,search:i.search})),t.view=t.pane.append(t.form.html()),t.form=t.view.element.find("form"),n=this.view.element,this.container=n.find(".k-multicheck-wrap"),n.on("click",".k-submit",function(e){t.form.submit(),e.preventDefault()}).on("click",".k-i-cancel",function(e){t._closeForm(),e.preventDefault()})):i.appendToElement?(this.popup=this.element.closest(".k-popup").data(h),this.element.append(this.form)):this.popup=this.form.kendoPopup({anchor:this._link,activate:c(this._activate,this)}).data(h),i.search&&(this.searchTextBox=this.form.find(".k-textbox > input"),this.searchTextBox.on("input",c(this._input,this)))},createCheckAllItem:function(){var t=this.options,n=d.template(t.itemTemplate({field:"all",mobile:this._isMobile})),i=e(n({all:t.messages.checkAll}));this.container.prepend(i),this.checkBoxAll=i.find(":checkbox").eq(0).addClass("k-check-all"),this.checkAllHandler=c(this.checkAll,this),this.checkBoxAll.on(g+E,this.checkAllHandler)},updateCheckAllState:function(){if(this.options.messages.selectedItemsFormat&&this.form.find(".k-filter-selected-items").text(d.format(this.options.messages.selectedItemsFormat,this.container.find(":checked:not(.k-check-all)").length)),this.checkBoxAll){var e=this.container.find(":checkbox:not(.k-check-all)").length==this.container.find(":checked:not(.k-check-all)").length;this.checkBoxAll.prop("checked",e)}},refresh:function(e){var t=this.options.forceUnique,n=this.dataSource,i=this.getFilterArray();this._link&&this._link.toggleClass("k-state-active",0!==i.length),this.form&&(e&&t&&e.sender===n&&!n.options.serverPaging&&("itemchange"==e.action||"add"==e.action||"remove"==e.action||n.options.autoSync&&"sync"===e.action)&&!this._foreignKeyValues()&&(this.checkSource.data(s(this.dataSource.data(),this.field)),this.container.empty()),this.container.is(":empty")&&this.createCheckBoxes(),this.checkValues(i),this.trigger(m))},getFilterArray:function(){var t,n=e.extend(!0,{},{filters:[],logic:"and"},this.dataSource.filter());return o(n,this.field),t=a(n)},createCheckBoxes:function(){var e,t,n,i=this.options,r={field:this.field,format:i.format,mobile:this._isMobile,type:this.type};this.options.forceUnique?this._foreignKeyValues()?(e=this.checkSource.data(),r.valueField="value",r.field="text"):e=this.checkSource.data():e=this.checkSource.view(),t=d.template(i.itemTemplate(r)),n=d.render(t,e),i.checkAll&&this.createCheckAllItem(),this.container.on(g+E,":checkbox",c(this.updateCheckAllState,this)),this.container.append(n)},checkAll:function(){var e=this.checkBoxAll.is(":checked");this.container.find(":checkbox").prop("checked",e)},checkValues:function(t){var n=this;e(e.grep(this.container.find(":checkbox").prop("checked",!1),function(i){var r,o,a=!1;if(!e(i).is(".k-check-all"))for(r=n._parse(e(i).val()),o=0;o<t.length;o++)if(a="date"==n.type?t[o]&&r?t[o].getTime()==r.getTime():null===t[o]&&null===r:t[o]==r)return a})).prop("checked",!0),this.updateCheckAllState()},_filter:function(t){var n,i;t.preventDefault(),t.stopPropagation(),n={logic:"or"},i=this,n.filters=e.map(this.form.find(":checkbox:checked:not(.k-check-all)"),function(t){return{value:e(t).val(),operator:"eq",field:i.field}}),n.filters.length&&this.trigger("change",{filter:n,field:i.field})||(n=this._merge(n),n.filters.length?this.dataSource.filter(n):this.clear(),this._closeForm())},_stripFilters:function(t){return e.grep(t,function(e){return null!=e.value})},_foreignKeyValues:function(){var e=this.options;return e.values&&!e.checkSource},destroy:function(){var e=this;x.fn.destroy.call(e),e.form&&(d.unbind(e.form),d.destroy(e.form),e.form.unbind(E),e.popup&&(e.popup.destroy(),e.popup=null),e.form=null,e.container&&(e.container.unbind(E),e.container=null),e.checkBoxAll&&e.checkBoxAll.unbind(E)),e.view&&(e.view.purge(),e.view=null),e._link&&e._link.unbind(v),e._refreshHandler&&(e.dataSource.unbind(g,e._refreshHandler),e.dataSource=null),e.checkChangeHandler&&e.checkSource.unbind(g,e.checkChangeHandler),e._progressHandler&&e.checkSource.unbind("progress",e._progressHandler),e._progressHideHandler&&e.checkSource.unbind("change",e._progressHideHandler),this._clearTypingTimeout(),this.searchTextBox=null,e.element=e.checkSource=e.container=e.checkBoxAll=e._link=e._refreshHandler=e.checkAllHandler=null},options:{name:"FilterMultiCheck",itemTemplate:function(e){var n=e.field,i=e.format,r=e.valueField,o=e.mobile,a="";return r===t&&(r=n),"date"==e.type&&(a=":yyyy-MM-ddTHH:mm:sszzz"),"<li class='k-item'><label class='k-label'><input type='checkbox' class='"+(o?"k-check":"")+"' value='#:kendo.format('{0"+a+"}',"+r+")#'/>#:kendo.format('"+(i?i:"{0}")+"', "+n+")#</label></li>"},checkAll:!0,search:!1,ignoreCase:!0,appendToElement:!1,messages:{checkAll:"Select All",clear:"Clear",filter:"Filter",search:"Search",cancel:"Cancel",selectedItemsFormat:"{0} items selected"},forceUnique:!0,animations:{left:"slide",right:"slide:right"}},events:[p,m,"change",f]});e.extend(R.fn,{_click:F.fn._click,_keydown:F.fn._keydown,_reset:F.fn._reset,_closeForm:F.fn._closeForm,_removeFilter:F.fn._removeFilter,clear:F.fn.clear,_merge:F.fn._merge}),u.plugin(F),u.plugin(R)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.menu.min",["kendo.popup.min"],e)}(function(){return function(e,t){function n(e,t){return e=e.split(" ")[!t+0]||e,e.replace("top","up").replace("bottom","down")}function i(e,t,n){e=e.split(" ")[!t+0]||e;var i={origin:["bottom",n?"right":"left"],position:["top",n?"right":"left"]},r=/left|right/.test(e);return r?(i.origin=["top",e],i.position[1]=S.directions[e].reverse):(i.origin[0]=e,i.position[0]=S.directions[e].reverse),i.origin=i.origin.join(" "),i.position=i.position.join(" "),i}function r(t,n){try{return e.contains(t,n)}catch(i){return!1}}function o(t){t=e(t),t.addClass("k-item").children(W).addClass(Q),t.children("a").addClass(j).children(W).addClass(Q),t.filter(":not([disabled])").addClass(ve),t.filter(".k-separator").empty().append("&nbsp;"),t.filter("li[disabled]").addClass(ke).removeAttr("disabled").attr("aria-disabled",!0),t.filter("[role]").length||t.attr("role","menuitem"),t.children("."+j).length||t.contents().filter(function(){return!(this.nodeName.match(O)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll("<span class='"+j+"'/>"),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("<span class='k-icon"+n+" k-menu-expand-arrow'/>")})}function s(e){var t,n=e.parent().parent(),i=S.support.isRtl(n);return t=n.hasClass(q+"-horizontal")?" k-i-arrow-60-down":i?" k-i-arrow-60-left":" k-i-arrow-60-right"}function l(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(Y),t.filter(".k-last:not(:last-child)").removeClass(G),t.filter(":first-child").addClass(Y),t.filter(":last-child").addClass(G)}function d(e){var t,n;if(e&&e.length)for(t in e)n=e.eq(t),n.find("ul").length?n.attr("aria-haspopup",!0):n.removeAttr("aria-haspopup")}function u(e){if(!e.hasClass(q))return e.parentsUntil("."+q,"li")}function c(t,n){var i=p(n);i&&h(t,i),
n.items&&e(t).children("ul").children("li").each(function(e){c(this,n.items[e])})}function h(t,n){e(t).children(".k-link").data({selectHandler:n})}function p(e){var t=e.select,n=S.isFunction;return t&&n(t)?t:null}function f(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function m(e){return e?"ul[data-group='"+e+"']":"ul[data-group]"}function g(t,n){var i=t.find(f()),r=[];return i.each(function(i,o){var a,s;for(o=e(o),a=o.data(fe),s=t;a;)s=n.find(m(a)+":visible"),s.length&&r.push(s),o=s.find(f()),a=o.data(fe)}),r}function v(t,n){var i=t.data(pe);return i?n.find(f(i)):e([])}function _(t,n){var i=t.data(fe);return i?n.children(Ce).children(m(i)):e([])}function b(t,n){var i,r,o=[],a=function(e){for(;e.parentNode&&!n.is(e.parentNode);)o.push(e.parentNode),e=e.parentNode},s=t[0]||t;for(a(s),i=o[o.length-1];e(i).is(Ce)&&(r=e(i).children("ul"),s=v(r,n)[0]);)o.push(s),a(s),i=o[o.length-1];return o}function k(e){var t=0;return e.wheelDelta&&(t=-e.wheelDelta/120,t=t>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}function w(e,t){for(var n=0,i=e.parentNode;i&&!isNaN(i[t]);)n+=i[t],i=i.parentNode;return n}function y(e){return re&&e.originalEvent&&e.originalEvent.pointerType in Ne}function x(e){var t=e.originalEvent;return E&&/touch/i.test(t.type||"")}function C(e){e.contents().filter(function(){return"LI"!=this.nodeName}).remove()}var T,S=window.kendo,D=S.ui,F=S._activeElement,E=S.support.touch&&S.support.mobileOS,A="mousedown",I="click",R=30,M=50,z=e.extend,H=e.proxy,N=e.each,B=S.template,P=S.keys,L=D.Widget,O=/^(ul|a|div)$/i,V=".kendoMenu",W="img",U="open",q="k-menu",j="k-link",G="k-last",$="close",K="timer",Y="k-first",Q="k-image",X="select",J="zIndex",Z="activate",ee="deactivate",te="touchstart"+V+" MSPointerDown"+V+" pointerdown"+V,ne=S.support.pointers,ie=S.support.msPointers,re=ie||ne,oe=ne?"pointerenter":ie?"MSPointerEnter":"mouseenter",ae=ne?"pointerleave":ie?"MSPointerLeave":"mouseleave",se="DOMMouseScroll"+V+" mousewheel"+V,le=S.support.resize+V,de="scrollWidth",ue="scrollHeight",ce="offsetWidth",he="offsetHeight",pe="group",fe="groupparent",me=e(document.documentElement),ge="kendoPopup",ve="k-state-default",_e="k-state-hover",be="k-state-focused",ke="k-state-disabled",we="k-state-selected",ye=".k-menu",xe=".k-menu-group",Ce=".k-animation-container",Te=xe+","+Ce,Se=":not(.k-list) > .k-item",De=".k-item.k-state-disabled",Fe=".k-item",Ee=".k-item:not(.k-state-disabled)",Ae=".k-item:not(.k-state-disabled) > .k-link",Ie=":not(.k-item.k-separator)",Re=Fe+Ie+":eq(0)",Me=Fe+Ie+":last",ze="div:not(.k-animation-container,.k-list-container)",He=".k-menu-scroll-button",Ne={2:1,touch:1},Be={content:B("<div #= contentCssAttributes(item) # tabindex='-1'>#= content(item) #</div>"),group:B("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:B("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(data) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"),item:B("<li class='#= wrapperCssClass(group, item) #' #= itemCssAttributes(item) # role='menuitem' #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),scrollButton:B("<span class='k-button k-button-icon k-menu-scroll-button k-scroll-#= direction #' unselectable='on'><span class='k-icon k-i-arrow-60-#= direction #'></span></span>"),image:B("<img #= imageCssAttributes(item) # alt='' src='#= item.imageUrl #' />"),arrow:B("<span class='#= arrowClass(item, group) #'></span>"),sprite:B("<span class='k-sprite #= spriteCssClass #'></span>"),empty:B("")},Pe={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" k-state-disabled":" k-state-default",e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.attr&&t.attr.hasOwnProperty("class")&&(n+=" "+t.attr["class"]),t.selected&&(n+=" "+we),n},itemCssAttributes:function(e){var t,n="",i=e.attr||{};for(t in i)i.hasOwnProperty(t)&&"class"!==t&&(n+=t+'="'+i[t]+'" ');return n},imageCssAttributes:function(e){var t,n="",i=e.imageAttr||{};i["class"]?i["class"]+=" "+Q:i["class"]=Q;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},contentCssAttributes:function(e){var t,n="",i=e.contentAttr||{},r="k-content k-group k-menu-group";i["class"]?i["class"]+=" "+r:i["class"]=r;for(t in i)i.hasOwnProperty(t)&&(n+=t+'="'+i[t]+'" ');return n},textClass:function(){return j},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},arrowClass:function(e,t){var n="k-icon";return n+=t.horizontal?" k-i-arrow-60-down":" k-i-arrow-60-right"},text:function(e){return e.encoded===!1?e.text:S.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},groupCssClass:function(){return"k-group k-menu-group"},content:function(e){return e.content?e.content:"&nbsp;"}},Le=L.extend({init:function(e,t){var n=this;L.fn.init.call(n,e,t),e=n.wrapper=n.element,t=n.options,n._updateClasses(),n._initData(t),n._animations(t),n.nextItemZIndex=100,n._tabindex(),n._initOverflow(t),n._attachMenuEventsHandlers(),t.openOnClick&&(n.clicked=!1),e.attr("role","menubar"),e[0].id&&(n._ariaId=S.format("{0}_mn_active",e[0].id)),S.notify(n)},events:[U,$,Z,ee,X],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(e){var t=this;e.dataSource&&(t.angular("cleanup",function(){return{elements:t.element.children()}}),t.element.empty(),t.append(e.dataSource,t.element),t.angular("compile",function(){return{elements:t.element.children()}}))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,r=t._overflowWrapper();(r||n).on(te,Fe,H(t._focusHandler,t)).on(I+V,De,!1).on(I+V,Fe,H(t._click,t)).on(te+" "+A+V,".k-content",H(t._preventClose,t)).on(oe+V,Ee,H(t._mouseenter,t)).on(ae+V,Ee,H(t._mouseleave,t)).on(A+V,Ee,H(t._mousedown,t)).on(oe+V+" "+ae+V+" "+A+V+" "+I+V,Ae,H(t._toggleHover,t)),n.on("keydown"+V,H(t._keydown,t)).on("focus"+V,H(t._focus,t)).on("focus"+V,".k-content",H(t._focus,t)).on("blur"+V,H(t._removeHoverItem,t)).on("blur"+V,"[tabindex]",H(t._checkActiveElement,t)),r&&r.on(ae+V,Te,H(t._mouseleavePopup,t)).on(oe+V,Te,H(t._mouseenterPopup,t)),i.openOnClick&&(t._documentClickHandler=H(t._documentClick,t),e(document).click(t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(V),t.element.off(V),t._documentClickHandler&&e(document).unbind("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,r,o,a=this,s="horizontal"==t.orientation;t.scrollable&&(a._openedPopups={},a._scrollWrapper=a.element.wrap("<div class='k-menu-scroll-wrapper "+t.orientation+"'></div>").parent(),s&&C(a.element),n=e(Be.scrollButton({direction:s?"left":"up"})),i=e(Be.scrollButton({direction:s?"right":"down"})),n.add(i).appendTo(a._scrollWrapper),a._initScrolling(a.element,n,i,s),r=a.element.outerWidth(),o=a.element[0].style.width,o="auto"===o?"":o,s&&e(window).on(le,S.throttle(function(){a._setOverflowWrapperWidth(r,o),a._toggleScrollButtons(a.element,n,i,s)},100)),a._setOverflowWrapperWidth(r,o),a._toggleScrollButtons(a.element,n,i,s))},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n,i,r,o,a=this,s=a._scrollWrapper.css("width");a._scrollWrapper.css({width:""}),n=a._scrollWrapper.outerWidth(),a._scrollWrapper.css({width:s}),i=a.element.outerWidth(),r=a.element[0].offsetWidth-a.element[0].clientWidth,i!=n&&n>0&&(o=t?Math.min(e,n):n,a.element.width(o-r),a._scrollWrapper.width(o))},_reinitOverflow:function(e){var t=this,n=e.scrollable&&!t.options.scrollable||!e.scrollable&&t.options.scrollable||e.scrollable&&t.options.scrollable&&e.scrollable.distance!=t.options.scrollable.distance||e.orientation!=t.options.orientation;n&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var n=this,i=n._overflowWrapper();i&&(i.off(V),i.find(He).off(V).remove(),i.children(Ce).each(function(t,n){var r,o=e(n).children(xe);o.off(se),r=v(o,i),r.length&&r.append(n)}),i.find(f()).removeAttr("data-groupparent"),i.find(m()).removeAttr("data-group"),n.element.off(se),e(window).off(le),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,n,i,r){var o=this,a=o.options.scrollable,s=e.isNumeric(a.distance)?a.distance:M,l=s/2,d="-="+s,u="+="+s,c="-="+2*s,h="+="+2*s,p=!1,f=!1,m=function(e){var a=r?{scrollLeft:e}:{scrollTop:e};t.finish().animate(a,"fast","linear",function(){p&&m(e)}),o._toggleScrollButtons(t,n,i,r)},g=function(e){p||f||(m(e.data.direction),p=!0)},v=function(a){var s=r?{scrollLeft:a.data.direction}:{scrollTop:a.data.direction};f=x(a)||y(a),t.stop().animate(s,"fast","linear",function(){f?(o._toggleScrollButtons(t,n,i,r),p=!0):e(a.currentTarget).trigger(oe)}),p=!1,a.stopPropagation(),a.preventDefault()};n.on(oe+V,{direction:d},g).on(S.eventMap.down+V,{direction:c},v),i.on(oe+V,{direction:u},g).on(S.eventMap.down+V,{direction:h},v),n.add(i).on(ae+V,function(){t.stop(),p=!1,o._toggleScrollButtons(t,n,i,r)}),t.on(se,function(e){var a,s,d,u;e.ctrlKey||e.shiftKey||e.altKey||(a=k(e.originalEvent),s=Math.abs(a)*l,d=(a>0?"+=":"-=")+s,u=r?{scrollLeft:d}:{scrollTop:d},o._closeChildPopups(t),t.finish().animate(u,"fast","linear",function(){o._toggleScrollButtons(t,n,i,r)}),e.preventDefault())})},_toggleScrollButtons:function(e,t,n,i){var r=i?e.scrollLeft():e.scrollTop(),o=i?de:ue,a=i?ce:he;t.toggle(0!==r),n.toggle(r<e[0][o]-e[0][a]-1)},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=z(!0,t,e.animation),"dataSource"in e&&this._initData(e),this._updateClasses(),this._reinitOverflow(e),L.fn.setOptions.call(this,e)},destroy:function(){var e=this;L.fn.destroy.call(e),e._detachMenuEventsHandlers(),e._destroyOverflow(),S.destroy(e.element)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.length?t.find("> .k-menu-group, > .k-animation-container > .k-menu-group"):null);return N(n.items,function(t){n.group.append(this),a(this),c(this,e[t]||e)}),a(t),l(n.group.find(".k-first, .k-last").add(n.items)),d(u(n.group)),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return N(n.items,function(n){t.before(this),a(this),l(this),c(this,e[n]||e)}),l(t),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return N(n.items,function(n){t.after(this),a(this),l(this),c(this,e[n]||e)}),l(t),this},_insert:function(t,n,i){var r,a,s,l,d=this;return n&&n.length||(i=d.element),s=e.isPlainObject(t),l={firstLevel:i.hasClass(q),horizontal:i.hasClass(q+"-horizontal"),expanded:!0,length:i.children().length},n&&!i.length&&(i=e(Le.renderGroup({group:l})).appendTo(n)),s||e.isArray(t)?r=e(e.map(s?[t]:t,function(t,n){return"string"==typeof t?e(t).get():e(Le.renderItem({group:l,item:z(t,{index:n})})).get()})):(r="string"==typeof t&&"<"!=t.charAt(0)?d.element.find(t):e(t),a=r.find("> ul").addClass("k-menu-group").attr("role","menu"),r=r.filter("li"),r.add(a.find("> li")).each(function(){o(this)})),{items:r,group:i}},remove:function(e){var t,n,i,r,o;return e=this.element.find(e),t=this,n=e.parentsUntil(t.element,Se),i=e.parent("ul:not(.k-menu)"),e.remove(),i&&!i.children(Se).length&&(r=u(i),o=i.parent(Ce),o.length?o.remove():i.remove(),d(r)),n.length&&(n=n.eq(0),a(n),l(n)),t},open:function(r){var o=this,a=o.options,s="horizontal"==a.orientation,l=a.direction,d=S.support.isRtl(o.wrapper),u=o._overflowWrapper();return r=(u||o.element).find(r),/^(top|bottom|default)$/.test(l)&&(l=d?s?(l+" left").replace("default","bottom"):"left":s?(l+" right").replace("default","bottom"):"right"),o.options.openOnClick&&(o.clicked=!0),r.each(function(){var r=e(this);clearTimeout(r.data(K)),r.data(K,setTimeout(function(){var c,h,p,m,g,v,_,b,k,w,y=r.find(".k-menu-group:first:hidden");!y[0]&&u&&(h=o._getPopup(r),y=h&&h.element),y.is(":visible")||y[0]&&o._triggerEvent({item:r[0],type:U})===!1&&(!y.find(".k-menu-group")[0]&&y.children(".k-item").length>1?(p=e(window).height(),m=function(){y.css({maxHeight:p-(S._outerHeight(y)-y.height())-S.getShadows(y).bottom,overflow:"auto"})},S.support.browser.msie&&S.support.browser.version<=7?setTimeout(m,0):m()):y.css({maxHeight:"",overflow:""}),r.data(J,r.css(J)),g=o.nextItemZIndex++,r.css(J,g),o.options.scrollable&&r.parent().siblings(He).css({zIndex:++g}),c=y.data(ge),v=r.parent().hasClass(q),_=v&&s,b=i(l,v,d),k=a.animation.open.effects,w=k!==t?k:"slideIn:"+n(l,v),c?(c=y.data(ge),c.options.origin=b.origin,c.options.position=b.position,c.options.animation.open.effects=w):c=y.kendoPopup({activate:function(){o._triggerEvent({item:this.wrapper.parent(),type:Z})},deactivate:function(e){e.sender.element.removeData("targetTransform").css({opacity:""}),o._triggerEvent({item:this.wrapper.parent(),type:ee})},origin:b.origin,position:b.position,collision:a.popupCollision!==t?a.popupCollision:_?"fit":"fit flip",anchor:r,appendTo:u||r,animation:{open:z(!0,{effects:w},a.animation.open),close:a.animation.close},open:H(o._popupOpen,o),close:function(e){var t,n=e.sender.wrapper.parent();u&&(t=e.sender.element.data(pe),t&&(n=(u||o.element).find(f(t))),e.sender.wrapper.children(He).hide()),o._triggerEvent({item:n[0],type:$})?e.preventDefault():(n.css(J,n.data(J)),n.removeData(J),o.options.scrollable&&n.parent().siblings(He).css({zIndex:""}),(E||re)&&(n.removeClass(_e),o._removeHoverItem()))}}).data(ge),y.removeAttr("aria-hidden"),o._configurePopupOverflow(c,r),c._hovered=!0,c.open(),o._initPopupScrolling(c))},o.options.hoverDelay))}),o},_configurePopupOverflow:function(e,t){var n,i=this;i.options.scrollable&&(i._wrapPopupElement(e),t.attr("data-groupparent")||(n=(new Date).getTime(),t.attr("data-groupparent",n),e.element.attr("data-group",n)))},_wrapPopupElement:function(e){e.element.parent().is(Ce)||(e.wrapper=S.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,n){var i=this;i.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&i._initPopupScrollButtons(e,t,n)},_initPopupScrollButtons:function(t,n,i){var r=this,o=t.wrapper.children(He),a=r.options.animation,s=(a&&a.open&&a.open.duration||0)+R;setTimeout(function(){var a,s;o.length||(a=e(Be.scrollButton({direction:n?"left":"up"})),s=e(Be.scrollButton({direction:n?"right":"down"})),o=a.add(s).appendTo(t.wrapper),r._initScrolling(t.element,a,s,n),i||o.on(oe+V,function(){var n=r._overflowWrapper();e(g(t.element,n)).each(function(e,t){var i=n.find(f(t.data(pe)));r.close(i)})}).on(ae+V,function(){setTimeout(function(){e.isEmptyObject(r._openedPopups)&&r._closeParentPopups(t.element)},R)})),r._toggleScrollButtons(t.element,o.first(),o.last(),n)},s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children("."+be).removeClass(be),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,n){var i,r,o,a,s,l,d,u,c,h=t.element,p=h.add(h.parent(Ce));p.height(h.hasClass(q)&&this._initialHeight||""),i=t._location(n),r=e(window).height(),o=i.height,a=n?0:Math.max(i.top,0),s=n?0:w(this._overflowWrapper()[0],"scrollTop"),l=window.innerHeight-r,d=r-S.getShadows(h).bottom+l,u=d+s>o+a,u||(c=Math.min(d,d-a+s),p.css({overflow:"hidden",height:c+"px"}))},close:function(t,n){var i,r,o=this,a=o._overflowWrapper(),s=a||o.element;return t=s.find(t),t.length||(t=s.find(">.k-item")),i=function(t){var n=!1;return e.isEmptyObject(o._openedPopups)?n:(e(g(t,a)).each(function(e,t){return n=!!o._openedPopups[""+t.data(pe)],!n}),n)},r=function(e){var t=e.data(fe);return!a||!t||!o._openedPopups[""+t]},t.each(function(){var s=e(this);!n&&o._isRootItem(s)&&(o.clicked=!1),clearTimeout(s.data(K)),s.data(K,setTimeout(function(){var e=o._getPopup(s);if(e&&(r(s)||o._forceClose)){if(!o._forceClose&&i(e.element))return;e.close(),e.element.attr("aria-hidden",!0),a&&o._forceClose&&t.last().is(s[0])&&delete o._forceClose}},o.options.hoverDelay))}),o},_getPopup:function(e){var t,n,i=this,r=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):first:visible").data(ge),o=i._overflowWrapper();return!r&&o&&(t=e.data(fe),t&&(n=o.find(m(t)),r=n.data(ge))),r},_toggleDisabled:function(t,n){this.element.find(t).each(function(){e(this).toggleClass(ve,n).toggleClass(ke,!n).attr("aria-disabled",!n)})},_toggleHover:function(t){var n=e(S.eventTarget(t)||t.target).closest(Se),i=t.type==oe||A.indexOf(t.type)!==-1;n.parents("li."+ke).length||n.toggleClass(_e,i||"mousedown"==t.type||"click"==t.type),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var n=this,i=e(t?t.currentTarget:this._hoverItem()),o=n._findRootParent(i)[0];this._closurePrevented||setTimeout(function(){document.hasFocus()&&(r(o,S._activeElement())||!t||r(o,t.currentTarget))||n.close(o)},0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(be)&&(e.removeClass(be),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element,n=".k-menu-init div ul";t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-header k-menu-init "+q).addClass(q+"-"+this.options.orientation),t.find("li > ul").filter(function(){return!S.support.matchesSelector.call(this,n)}).addClass("k-group k-menu-group").attr("role","menu").attr("aria-hidden",t.is(":visible")).parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each(function(){o(this)})},_mouseenter:function(t){var n=this,i=e(t.currentTarget),o=n._itemHasChildren(i),a=i.data(fe)||i.parent().data(pe),s=y(t);a&&(n._openedPopups[""+a]=!0),t.delegateTarget!=i.parents(ye)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(Se))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(Se))||(!(n.options.openOnClick===!1||n.options.openOnClick.rootMenuItems===!1&&n._isRootItem(i.closest(Se))||n.options.openOnClick.subMenuItems===!1&&!n._isRootItem(i.closest(Se))||n.clicked)||E||s&&n._isRootItem(i.closest(Se))||!r(t.currentTarget,t.relatedTarget)&&o&&n.open(i),(n.options.openOnClick===!0&&n.clicked||E)&&i.siblings().each(H(function(e,t){n.close(t,!0)},n))))},_mousedown:function(t){var n=this,i=e(t.currentTarget);(n.options.openOnClick.subMenuItems&&!n._isRootItem(i)||E)&&i.siblings().each(H(function(e,t){n.close(t,!0)},n))},_mouseleave:function(n){var i=this,o=e(n.currentTarget),a=o.data(fe),s=o.children(Ce).length||o.children(xe).length||a,l=e(window);return a&&delete i._openedPopups[""+a],o.parentsUntil(Ce,".k-list-container,.k-calendar-container")[0]?(n.stopImmediatePropagation(),t):i.options.openOnClick!==!1&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(o))&&(i.options.openOnClick.subMenuItems||i._isRootItem(o))||E||y(n)||r(n.currentTarget,n.relatedTarget||n.target)||!s||r(n.currentTarget,S._activeElement())?((S.support.browser.msie&&!n.toElement&&!n.relatedTarget||n.clientX<0||n.clientY<0||n.clientY>l.height()||n.clientX>l.width())&&i.close(o),t):(i.close(o,!0),t)},_mouseenterPopup:function(t){var n,i=this,r=e(t.currentTarget);r.parent().is(Ce)||(r=r.children("ul"),n=r.data(pe),n&&(i._openedPopups[""+n]=!0))},_mouseleavePopup:function(t){var n=this,i=e(t.currentTarget);!y(t)&&i.is(Ce)&&n._closePopups(i.children("ul"))},_closePopups:function(t){var n,i=this,r=i._overflowWrapper(),o=t.data(pe);o&&(delete i._openedPopups[""+o],n=r.find(f(o)),setTimeout(function(){if(i.options.openOnClick)i._closeChildPopups(t);else if(e.isEmptyObject(i._openedPopups)){var r=i._innerPopup(t);i._closeParentPopups(r)}else i.close(n,!0)},0))},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(g(t,i)).each(function(){var e=i.find(f(this.data(pe)));n.close(e,!0)})},_innerPopup:function(e){var t=this._overflowWrapper(),n=g(e,t);return n[n.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(pe),r=n.find(f(i));for(i=r.parent().data(pe),t.close(r,!0);i&&!t._openedPopups[i]&&!r.parent().is(ye);)r=n.find(f(i)),t.close(r,!0),i=r.parent().data(pe)},_click:function(n){for(var i,r,o,a,s,l,d=this,u=d.options,c=e(S.eventTarget(n)),h=c[0],p=c[0]?c[0].nodeName.toUpperCase():"",f="INPUT"==p||"SELECT"==p||"BUTTON"==p||"LABEL"==p,g=c.closest("."+j),v=c.closest(Se),_=v[0],b=g.attr("href"),k=c.attr("href"),w=e("<a href='#' />").attr("href"),x=!!b&&b!==w,C=x&&!!b.match(/^#/),T=!!k&&k!==w,D=d._overflowWrapper();h&&h.parentNode!=_;)h=h.parentNode;if(!e(h).is(ze)){if(v.hasClass(ke))return n.preventDefault(),t;if(n.handled||!d._triggerSelect(c,_)||f||n.preventDefault(),n.handled=!0,r=v.children(Te),D&&(s=v.data(fe),s&&(r=D.find(m(s)))),o=r.is(":visible"),a=u.openOnClick&&o&&d._isRootItem(v),u.closeOnClick&&(!x||C)&&(!r.length||a))return v.removeClass(_e).css("height"),d._oldHoverItem=d._findRootParent(v),l=d._parentsUntil(g,d.element,Se),d._forceClose=!!D,d.close(l),d.clicked=!1,"MSPointerUp".indexOf(n.type)!=-1&&n.preventDefault(),t;x&&n.enterKey&&g[0].click(),(d._isRootItem(v)&&u.openOnClick!==!1||u.openOnClick.subMenuItems||S.support.touch||y(n)&&d._isRootItem(v.closest(Se)))&&(x||f||T||n.preventDefault(),d.clicked=!0,i=r.is(":visible")?$:U,(u.closeOnClick||i!=$)&&d[i](v))}},_parentsUntil:function(n,i,r){var o,a,s=this._overflowWrapper();return s?(o=b(n,s),a=[],e(o).each(function(){var n=e(this);return!n.is(i)&&(n.is(r)&&a.push(this),t)}),e(a)):n.parentsUntil(i,r)},_triggerSelect:function(e,t){var n,i,r,o;return e=e.is(".k-link")?e:e.closest(".k-link"),n=e.data("selectHandler"),n&&(i=this._getEventData(e),n.call(this,i)),r=i&&i.isDefaultPrevented(),o=this._triggerEvent({item:t,type:X}),r||o},_getEventData:function(e){var t={sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}};return t},_documentClick:function(e){var t=this;r((t._overflowWrapper()||t.element)[0],e.target)||(t.clicked=!1)},_focus:function(n){var i=this,r=n.target,o=i._hoverItem(),a=F();return r==i.wrapper[0]||e(r).is(":kendoFocusable")?(a===n.currentTarget&&(o.length?i._moveHover([],o):i._oldHoverItem||i._moveHover([],i.wrapper.children().first())),t):(n.stopPropagation(),e(r).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(be),i.wrapper.focus(),t)},_keydown:function(e){var n,i,r,o=this,a=e.keyCode,s=o._oldHoverItem,l=S.support.isRtl(o.wrapper);if(e.target==e.currentTarget||a==P.ESC){if(s||(s=o._oldHoverItem=o._hoverItem()),i=o._itemBelongsToVertival(s),r=o._itemHasChildren(s),o._keyTriggered=!0,a==P.RIGHT)n=o[l?"_itemLeft":"_itemRight"](s,i,r);else if(a==P.LEFT)n=o[l?"_itemRight":"_itemLeft"](s,i,r);else if(a==P.DOWN)n=o._itemDown(s,i,r);else if(a==P.UP)n=o._itemUp(s,i,r);else if(a==P.HOME)o._moveHover(s,s.parent().children().first()),e.preventDefault();else if(a==P.END)o._moveHover(s,s.parent().children().last()),e.preventDefault();else if(a==P.ESC)n=o._itemEsc(s,i);else if(a==P.ENTER||a==P.SPACEBAR)n=s.children(".k-link"),n.length>0&&(o._click({target:n[0],preventDefault:function(){},enterKey:!0}),r&&!s.hasClass(ke)?(o.open(s),o._moveHover(s,o._childPopupElement(s).children().first())):o._moveHover(s,o._findRootParent(s)));else if(a==P.TAB)return n=o._findRootParent(s),o._moveHover(s,n),o._checkActiveElement(),t;n&&n[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length?e.parent().hasClass("k-menu-group")||t:t},_itemHasChildren:function(e){return!!(e&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, div.k-animation-container").length>0||!!e.data(fe)&&!!this._overflowWrapper().children(m(e.data(fe))))},_moveHover:function(t,n){var i=this,r=i._ariaId;t.length&&n.length&&t.removeClass(be),n.length&&(n[0].id&&(r=n[0].id),n.addClass(be),i._oldHoverItem=n,r&&(i.element.removeAttr("aria-activedescendant"),e("#"+r).removeAttr("id"),n.attr("id",r),i.element.attr("aria-activedescendant",r)),i._scrollToItem(n))},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,ye,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(q)},_itemRight:function(e,t,n){var i,r,o,a,s=this;return t?n&&!e.hasClass(ke)?(s.open(e),i=s._childPopupElement(e).children().first()):"horizontal"==s.options.orientation&&(r=s._findRootParent(e),o=s._overflowWrapper(),o&&(a=_(r,o),s._closeChildPopups(a)),s.close(r),i=r.nextAll(Re)):(i=e.nextAll(Re),i.length||(i=e.prevAll(Me)),s.close(e)),i&&!i.length?i=s.wrapper.children(".k-item").first():i||(i=[]),s._moveHover(e,i),i},_itemLeft:function(e,t){var n,i,r=this;return t?(n=e.parent().closest(".k-item"),i=r._overflowWrapper(),!n.length&&i&&(n=v(e.parent(),i)),r.close(n),r._isRootItem(n)&&"horizontal"==r.options.orientation&&(n=n.prevAll(Re))):(n=e.prevAll(Re),n.length||(n=e.nextAll(Me)),r.close(e)),n.length||(n=r.wrapper.children(".k-item").last()),r._moveHover(e,n),n},_itemDown:function(e,t,n){var i,r=this;if(t)i=e.nextAll(Re);else{if(!n||e.hasClass(ke))return;r.open(e),i=r._childPopupElement(e).children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=r.wrapper.children(".k-item").first()),r._moveHover(e,i),i},_itemUp:function(e,t){var n,i=this;if(t)return n=e.prevAll(Re),!n.length&&e.length?n=e.parent().children().last():e.length||(n=i.wrapper.children(".k-item").last()),i._moveHover(e,n),n},_scrollToItem:function(e){var t,n,i,r,o,a,s,l,d,u,c,h,p=this;p.options.scrollable&&e&&e.length&&(t=e.parent(),n=!!t.hasClass(q)&&"horizontal"==p.options.orientation,i=n?"scrollLeft":"scrollTop",r=n?S._outerWidth:S._outerHeight,o=t[i](),a=r(e),s=e[0][n?"offsetLeft":"offsetTop"],l=r(t),d=t.siblings(He),u=d.length?r(d.first()):0,o+l<s+a+u?c=s+a-l+u:o>s-u&&(c=s-u),isNaN(c)||(h={},h[i]=c,t.finish().animate(h,"fast","linear",function(){p._toggleScrollButtons(t,d.first(),d.last(),n)})))},_itemEsc:function(e,t){var n,i=this;return t?(n=e.parent().closest(".k-item"),i.close(n),i._moveHover(e,n),n):e},_childPopupElement:function(e){var t=e.find(".k-menu-group"),n=this._overflowWrapper();return!t.length&&n&&(t=_(e,n)),t},_triggerEvent:function(e){var t=this;return t.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var n=this,i=e(S.eventTarget(t)).closest(Se);i.hasClass(ke)||setTimeout(function(){n._moveHover([],i),i.children(".k-content")[0]&&i.parent().closest(".k-item").removeClass(be)},200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})}});z(Le,{renderItem:function(e){e=z({menu:{},group:{}},e);var t=Be.empty,n=e.item;return Be.item(z(e,{image:n.imageUrl?Be.image:t,sprite:n.spriteCssClass?Be.sprite:t,itemWrapper:Be.itemWrapper,renderContent:Le.renderContent,arrow:n.items||n.content?Be.arrow:t,subGroup:Le.renderGroup},Pe))},renderGroup:function(e){return Be.group(z({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=z({length:r},e.group);n<r;n++)t+=Le.renderItem(z(e,{group:o,item:z({index:n},i[n])}));return t}},e,Pe))},renderContent:function(e){return Be.content(z(e,Pe))}}),T=Le.extend({init:function(t,n){var i=this;Le.fn.init.call(i,t,n),i._marker=S.guid().substring(0,8),i.target=e(i.options.target),i._popup(),i._wire()},_initOverflow:function(e){var t=this;e.scrollable&&!t._overflowWrapper()&&(t._openedPopups={},t._popupsWrapper=(t.element.parent().is(Ce)?t.element.parent():t.element).wrap("<div class='k-popups-wrapper "+e.orientation+"'></div>").parent(),"horizontal"==t.options.orientation&&C(t.element),e.appendTo&&e.appendTo.append(t._popupsWrapper),t._initialHeight=t.element[0].style.height,t._initialWidth=t.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,target:"body"},events:[U,$,Z,ee,X],setOptions:function(t){var n=this;Le.fn.setOptions.call(n,t),n.target.off(n.showOn+V+n._marker,n._showProxy),n.userEvents&&n.userEvents.destroy(),n.target=e(n.options.target),t.orientation&&n.popup.wrapper[0]&&n.popup.element.unwrap(),n._wire(),Le.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+V+e._marker),me.off(S.support.mousedown+V+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),Le.fn.destroy.call(e)},open:function(n,i){var o,a,s=this;return n=e(n)[0],r(s.element[0],e(n)[0])||s._itemHasChildren(e(n))?Le.fn.open.call(s,n):s._triggerEvent({item:s.element,type:U})===!1&&(s.popup.visible()&&s.options.filter&&(s.popup.close(!0),s.popup.element.kendoStop(!0)),i!==t?(o=s._overflowWrapper(),o&&(a=o.offset(),n-=a.left,i-=a.top),s.popup.wrapper.hide(),s._configurePopupScrolling(n,i),s.popup.open(n,i)):(s.popup.options.anchor=(n?n:s.popup.anchor)||s.target,s.popup.element.kendoStop(!0),s._configurePopupScrolling(),s.popup.open()),me.off(s.popup.downEvent,s.popup._mousedownProxy),me.on(S.support.mousedown+V+s._marker,s._closeProxy)),s},_configurePopupScrolling:function(e,n){var i=this,r=i.popup,o="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(r),r.element.parent().css({position:"",height:""}),r.element.css({visibility:"hidden",display:"",position:""}),o?i._setPopupWidth(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(r,isNaN(e)?t:{isFixed:!0,x:e,y:n}),r.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(r,o,!0),r.element.siblings(He).hide())},_setPopupWidth:function(t,n){var i,r,o,a,s,l,d,u,c=t.element,h=c.add(c.parent(Ce));h.width(this._initialWidth||""),i=t._location(n),r=e(window).width(),o=i.width,a=Math.max(i.left,0),s=n?0:w(this._overflowWrapper()[0],"scrollLeft"),l=S.getShadows(c),d=r-l.left-l.right,u=d+s>o+a,u||h.css({overflow:"hidden",width:d-a+s+"px"})},close:function(){var t=this;r(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?Le.fn.close.call(t,arguments[0]):t.popup.visible()&&t._triggerEvent({item:t.element,type:$})===!1&&(t.popup.close(),me.off(S.support.mousedown+V,t._closeProxy),t.unbind(X,t._closeTimeoutProxy))},_showHandler:function(e){var t,n=e,i=this,o=i.options;e.event&&(n=e.event,n.pageX=e.x.location,n.pageY=e.y.location),r(i.element[0],e.relatedTarget||e.target)||(i._eventOrigin=n,n.preventDefault(),n.stopImmediatePropagation(),i.element.find("."+be).removeClass(be),(o.filter&&S.support.matchesSelector.call(n.currentTarget,o.filter)||!o.filter)&&(o.alignToAnchor?(i.popup.options.anchor=n.currentTarget,i.open(n.currentTarget)):(i.popup.options.anchor=n.currentTarget,i._targetChild?(t=i.target.offset(),i.open(n.pageX-t.left,n.pageY-t.top)):i.open(n.pageX,n.pageY))))},_closeHandler:function(t){var n,i=this,o=e(t.relatedTarget||t.target),a=o.closest(i.target.selector)[0]==i.target[0],s=o.closest(Fe),l=i._itemHasChildren(s),d=i._overflowWrapper(),u=r(i.element[0],o[0])||d&&r(d[0],o[0]);i._eventOrigin=t,n=3!==t.which,i.popup.visible()&&(n&&a||!a)&&(i.options.closeOnClick&&!l&&u||!u)&&(u?(this.unbind(X,this._closeTimeoutProxy),i.bind(X,i._closeTimeoutProxy)):i.close())},_wire:function(){var e=this,t=e.options,n=e.target;e._showProxy=H(e._showHandler,e),e._closeProxy=H(e._closeHandler,e),
e._closeTimeoutProxy=H(e.close,e),n[0]&&(S.support.mobileOS&&"contextmenu"==t.showOn?(e.userEvents=new S.UserEvents(n,{filter:t.filter,allowSelection:!1}),n.on(t.showOn+V+e._marker,!1),e.userEvents.bind("hold",e._showProxy)):t.filter?n.on(t.showOn+V+e._marker,t.filter,e._showProxy):n.on(t.showOn+V+e._marker,e._showProxy))},_triggerEvent:function(n){var i=this,r=e(i.popup.options.anchor)[0],o=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,z({type:n.type,item:n.item||this.element[0],target:r},o?{event:o}:{}))},_popup:function(){var t=this,n=t._overflowWrapper();t._triggerProxy=H(t._triggerEvent,t),t.popup=t.element.addClass("k-context-menu").kendoPopup({anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:n||t.options.appendTo,close:n?function(t){e(g(t.sender.element,n)).each(function(e,t){var n=t.data(ge);n&&n.close(!0)})}:e.noop}).data(ge),t._targetChild=r(t.target[0],t.popup.element[0])}}),D.plugin(Le),D.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.columnmenu.min",["kendo.popup.min","kendo.filtermenu.min","kendo.menu.min"],e)}(function(){return function(e,t){function n(t){return e.trim(t).replace(/&nbsp;/gi,"")}function i(e,t){var n,i,r,o={};for(n=0,i=e.length;n<i;n++)r=e[n],o[r[t]]=r;return o}function r(e){var t,n=[];for(t=0;t<e.length;t++)e[t].columns?n=n.concat(r(e[t].columns)):n.push(e[t]);return n}function o(e,t){return"["+s.attr(e)+"='"+(t||"").replace(/'/g,'"')+"']"}function a(e,t,n){e>0?t.insertAfter(n.children().eq(e-1)):n.prepend(t)}var s=window.kendo,l=s.ui,d=e.proxy,u=e.extend,c=e.grep,h=e.map,p=e.inArray,f="k-state-selected",m="asc",g="desc",v="change",_="init",b="open",k="select",w="kendoPopup",y="kendoFilterMenu",x="kendoMenu",C=".kendoColumnMenu",T=l.Widget,S=T.extend({init:function(t,n){var i,r=this;T.fn.init.call(r,t,n),t=r.element,n=r.options,r.owner=n.owner,r.dataSource=n.dataSource,r.field=t.attr(s.attr("field")),r.title=t.attr(s.attr("title")),i=t.find(".k-header-column-menu"),i[0]||(i=t.addClass("k-with-icon").prepend('<a class="k-header-column-menu" href="#" title="'+n.messages.settings+'" aria-label="'+n.messages.settings+'"><span class="k-icon k-i-more-vertical"></span></a>').find(".k-header-column-menu")),r.link=i.attr("tabindex",-1).on("click"+C,d(r._click,r)),r.wrapper=e('<div class="k-column-menu"/>'),r._refreshHandler=d(r.refresh,r),r.dataSource.bind(v,r._refreshHandler)},_init:function(){var e=this;e.pane=e.options.pane,e.pane&&(e._isMobile=!0),e._isMobile?e._createMobileMenu():e._createMenu(),e.owner._muteAngularRebind(function(){e._angularItems("compile")}),e._sort(),e._columns(),e._filter(),e._lockColumns(),e.trigger(_,{field:e.field,container:e.wrapper})},events:[_,b,"sort","filtering"],options:{name:"ColumnMenu",messages:{sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filter:"Filter",columns:"Columns",done:"Done",settings:"Column Settings",lock:"Lock",unlock:"Unlock"},filter:"",columns:!0,sortable:!0,filterable:!0,animations:{left:"slide"}},_createMenu:function(){var e=this,t=e.options;e.wrapper.html(s.template(D)({uid:s.guid(),ns:s.ns,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns})),e.popup=e.wrapper[w]({anchor:e.link,open:d(e._open,e),activate:d(e._activate,e),close:function(){e.options.closeCallback&&e.options.closeCallback(e.element)}}).data(w),e.menu=e.wrapper.children()[x]({orientation:"vertical",closeOnClick:!1}).data(x)},_createMobileMenu:function(){var e=this,t=e.options,n=s.template(F)({ns:s.ns,field:e.field,title:e.title||e.field,messages:t.messages,sortable:t.sortable,filterable:t.filterable,columns:e._ownerColumns(),showColumns:t.columns,lockedColumns:t.lockedColumns});e.view=e.pane.append(n),e.wrapper=e.view.element.find(".k-column-menu"),e.menu=new E(e.wrapper.children(),{pane:e.pane}),e.view.element.on("click",".k-done",function(t){e.close(),t.preventDefault()}),e.options.lockedColumns&&e.view.bind("show",function(){e._updateLockedColumns()})},_angularItems:function(t){var n=this;n.angular(t,function(){var t=n.wrapper.find(".k-columns-item input["+s.attr("field")+"]").map(function(){return e(this).closest("li")}),i=h(n._ownerColumns(),function(e){return{column:e._originalObject}});return{elements:t,data:i}})},destroy:function(){var e=this;e._angularItems("cleanup"),T.fn.destroy.call(e),e.filterMenu&&e.filterMenu.destroy(),e._refreshHandler&&e.dataSource.unbind(v,e._refreshHandler),e.options.columns&&e.owner&&(e._updateColumnsMenuHandler&&(e.owner.unbind("columnShow",e._updateColumnsMenuHandler),e.owner.unbind("columnHide",e._updateColumnsMenuHandler)),e._updateColumnsLockedStateHandler&&(e.owner.unbind("columnLock",e._updateColumnsLockedStateHandler),e.owner.unbind("columnUnlock",e._updateColumnsLockedStateHandler))),e.menu&&(e.menu.element.off(C),e.menu.destroy()),e.wrapper.off(C),e.popup&&e.popup.destroy(),e.view&&e.view.purge(),e.link.off(C),e.owner=null,e.wrapper=null,e.element=null},close:function(){this.menu.close(),this.popup&&(this.popup.close(),this.popup.element.off("keydown"+C))},_click:function(e){var t,n=this;e.preventDefault(),e.stopPropagation(),t=this.options,t.filter&&this.element.is(!t.filter)||(this.popup||this.pane?n._reorderColumnList():this._init(),this._isMobile?this.pane.navigate(this.view,this.options.animations.left):this.popup.toggle())},_reorderColumnList:function(){var t,n,i=this,r=i._ownerColumns()||[],s=i._isMobile&&i.view?e(i.view.element).find(".k-columns-item").children("ul"):e(i.wrapper).find(".k-menu-group");for(t=0;t<r.length;t++)n=s.find(o("field",r[t].originalField)).closest("li"),n[0]&&n.index()!==t&&a(t,n,s)},_open:function(){var t=this;e(".k-column-menu").not(t.wrapper).each(function(){e(this).data(w).close()}),t.popup.element.on("keydown"+C,function(e){e.keyCode==s.keys.ESC&&t.close()}),t.options.lockedColumns&&t._updateLockedColumns()},_activate:function(){this.menu.element.focus(),this.trigger(b,{field:this.field,container:this.wrapper})},_ownerColumns:function(){var e=r(this.owner.columns),t=c(e,function(e){var t=!0,i=n(e.title||"");return e.menu!==!1&&(e.field||i.length)||(t=!1),t});return h(t,function(t){return{originalField:t.field,field:t.field||t.title,title:t.title||t.field,hidden:t.hidden,index:p(t,e),locked:!!t.locked,_originalObject:t}})},_sort:function(){var t=this;t.options.sortable&&(t.refresh(),t.menu.bind(k,function(n){var i,r=e(n.item);r.hasClass("k-sort-asc")?i=m:r.hasClass("k-sort-desc")&&(i=g),i&&(r.parent().find(".k-sort-"+(i==m?g:m)).removeClass(f),t._sortDataSource(r,i),t.close())}))},_sortDataSource:function(e,n){var i,r,o=this,a=o.options.sortable,s=null===a.compare?t:a.compare,l=o.dataSource,d=l.sort()||[],u=e.hasClass(f)&&a&&a.allowUnsort!==!1;if(n=u?t:n,!o.trigger("sort",{sort:{field:o.field,dir:n,compare:s}})){if(u?e.removeClass(f):e.addClass(f),"multiple"===a.mode){for(i=0,r=d.length;i<r;i++)if(d[i].field===o.field){d.splice(i,1);break}d.push({field:o.field,dir:n,compare:s})}else d=[{field:o.field,dir:n,compare:s}];l.sort(d)}},_columns:function(){var t=this;t.options.columns&&(t._updateColumnsMenu(),t._updateColumnsMenuHandler=d(t._updateColumnsMenu,t),t.owner.bind(["columnHide","columnShow"],t._updateColumnsMenuHandler),t._updateColumnsLockedStateHandler=d(t._updateColumnsLockedState,t),t.owner.bind(["columnUnlock","columnLock"],t._updateColumnsLockedStateHandler),t.menu.bind(k,function(n){var i,o,a,l=e(n.item),d=r(t.owner.columns);t._isMobile&&n.preventDefault(),l.parent().closest("li.k-columns-item")[0]&&(i=l.find(":checkbox"),i.attr("disabled")||(a=i.attr(s.attr("field")),o=c(d,function(e){return e.field==a||e.title==a})[0],o.hidden===!0?t.owner.showColumn(o):t.owner.hideColumn(o)))}))},_updateColumnsMenu:function(){var e,t,n,i,r,o,a=s.attr("field"),l=s.attr("locked"),d=c(this._ownerColumns(),function(e){return!e.hidden}),u=c(d,function(e){return e.originalField}),f=c(u,function(e){return e.locked===!0}).length,m=c(u,function(e){return e.locked!==!0}).length;for(d=h(d,function(e){return e.field}),this.wrapper.find("[role='menuitemcheckbox']").attr("aria-checked",!1),o=this.wrapper.find(".k-columns-item input["+a+"]").prop("disabled",!1).prop("checked",!1),e=0,t=o.length;e<t;e++)n=o.eq(e),r="true"===n.attr(l),i=!1,p(n.attr(a),d)>-1&&(i=!0,n.prop("checked",i)),n.closest("[role='menuitemcheckbox']").attr("aria-checked",i),i&&(1==f&&r&&n.prop("disabled",!0),1!=m||r||n.prop("disabled",!0))},_updateColumnsLockedState:function(){var e,t,n,r,o=s.attr("field"),a=s.attr("locked"),l=i(this._ownerColumns(),"field"),d=this.wrapper.find(".k-columns-item input[type=checkbox]");for(e=0,t=d.length;e<t;e++)n=d.eq(e),r=l[n.attr(o)],r&&n.attr(a,r.locked);this._updateColumnsMenu()},_filter:function(){var t=this,n=y,i=t.options;i.filterable!==!1&&(i.filterable.multi&&(n="kendoFilterMultiCheck",i.filterable.dataSource&&(i.filterable.checkSource=i.filterable.dataSource,delete i.filterable.dataSource)),t.filterMenu=t.wrapper.find(".k-filterable")[n](u(!0,{},{appendToElement:!0,dataSource:i.dataSource,values:i.values,field:t.field,title:t.title,change:function(e){t.trigger("filtering",{filter:e.filter,field:e.field})&&e.preventDefault()}},i.filterable)).data(n),t._isMobile&&t.menu.bind(k,function(n){var i=e(n.item);i.hasClass("k-filter-item")&&t.pane.navigate(t.filterMenu.view,t.options.animations.left)}))},_lockColumns:function(){var t=this;t.menu.bind(k,function(n){var i=e(n.item);i.hasClass("k-lock")?(t.owner.lockColumn(t.field),t.close()):i.hasClass("k-unlock")&&(t.owner.unlockColumn(t.field),t.close())})},_updateLockedColumns:function(){var e,t,n,i,r=this.field,o=this.owner.columns,a=c(o,function(e){return e.field==r||e.title==r})[0];a&&(e=a.locked===!0,t=c(o,function(t){return!t.hidden&&(t.locked&&e||!t.locked&&!e)}).length,n=this.wrapper.find(".k-lock").removeClass("k-state-disabled"),i=this.wrapper.find(".k-unlock").removeClass("k-state-disabled"),(e||1==t)&&n.addClass("k-state-disabled"),e&&1!=t||i.addClass("k-state-disabled"),this._updateColumnsLockedState())},refresh:function(){var e,t,n,i=this,r=i.options.dataSource.sort()||[],o=i.field;for(i.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(f),t=0,n=r.length;t<n;t++)e=r[t],o==e.field&&i.wrapper.find(".k-sort-"+e.dir).addClass(f);i.link[i._filterExist(i.dataSource.filter())?"addClass":"removeClass"]("k-state-active")},_filterExist:function(e){var t,n,i,r=!1;if(e){for(e=e.filters,n=0,i=e.length;n<i;n++)t=e[n],t.field==this.field?r=!0:t.filters&&(r=r||this._filterExist(t));return r}}}),D='<ul id="#=uid#">#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator" role="presentation"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-columns"></span>${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li role="menuitemcheckbox" aria-checked="false"><input type="checkbox" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</li>#}#</ul></li>#if(filterable || lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(filterable){#<li class="k-item k-filter-item" aria-haspopup="true"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#if(lockedColumns){#<li class="k-separator" role="presentation"></li>#}##}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}#</ul>',F='<div data-#=ns#role="view" data-#=ns#init-widgets="false" data-#=ns#use-native-scrolling="true" class="k-grid-column-menu"><div data-#=ns#role="header" class="k-header">${messages.settings}<button class="k-button k-done">#=messages.done#</button></div><div class="k-column-menu k-mobile-list"><ul><li><span class="k-link">${title}</span><ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li>#}##if(lockedColumns){#<li class="k-item k-lock"><span class="k-link"><span class="k-icon k-i-lock"></span>${messages.lock}</span></li><li class="k-item k-unlock"><span class="k-link"><span class="k-icon k-i-unlock"></span>${messages.unlock}</span></li>#}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link k-filterable"><span class="k-icon k-i-filter"></span>${messages.filter}</span></li>#}#</ul></li>#if(showColumns){#<li class="k-columns-item"><span class="k-link">${messages.columns}</span><ul>#for (var idx = 0; idx < columns.length; idx++) {#<li class="k-item"><label class="k-label"><input type="checkbox" class="k-check" data-#=ns#field="#=columns[idx].field.replace(/"/g,"&\\#34;")#" data-#=ns#index="#=columns[idx].index#" data-#=ns#locked="#=columns[idx].locked#"/>#=columns[idx].title#</label></li>#}#</ul></li>#}#</ul></div></div>',E=T.extend({init:function(e,t){T.fn.init.call(this,e,t),this.element.on("click"+C,"li.k-item:not(.k-separator):not(.k-state-disabled)","_click")},events:[k],_click:function(t){e(t.target).is("[type=checkbox]")||t.preventDefault(),this.trigger(k,{item:t.currentTarget})},close:function(){this.options.pane.navigate("")},destroy:function(){T.fn.destroy.call(this),this.element.off(C)}});l.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.columnsorter.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o="dir",a="asc",s="single",l="field",d="desc",u=".kendoColumnSorter",c=".k-link",h="aria-sort",p=e.proxy,f=r.extend({init:function(e,t){var n,i=this;r.fn.init.call(i,e,t),i._refreshHandler=p(i.refresh,i),i.dataSource=i.options.dataSource.bind("change",i._refreshHandler),i.directions=i.options.initialDirection===a?[a,d]:[d,a],n=i.element.find(c),n[0]||(n=i.element.wrapInner('<a class="k-link" href="#"/>').find(c)),i.link=n,i.element.on("click"+u,p(i._click,i))},options:{name:"ColumnSorter",mode:s,allowUnsort:!0,compare:null,filter:"",initialDirection:a,showIndexes:!1},events:["change"],destroy:function(){var e=this;r.fn.destroy.call(e),e.element.off(u),e.dataSource.unbind("change",e._refreshHandler),e._refreshHandler=e.element=e.link=e.dataSource=null},refresh:function(){var i,r,s,u,c,p,f=this,m=f.dataSource.sort()||[],g=f.element,v=g.attr(n.attr(l));for(g.removeAttr(n.attr(o)),g.removeAttr(h),i=0,r=m.length;i<r;i++)s=m[i],v==s.field&&(g.attr(n.attr(o),s.dir),c=i+1);u=g.attr(n.attr(o)),g.is("th")&&(p=g.closest("table"),p.parent().hasClass("k-grid-header-wrap")?p=p.closest(".k-grid").find(".k-grid-content > table"):p.parent().hasClass("k-grid")||(p=null),p&&(g.toggleClass("k-sorted",u!==t),p.children("colgroup").children().eq(g.index()).toggleClass("k-sorted",u!==t))),g.find(".k-i-sort-asc-sm,.k-i-sort-desc-sm,.k-sort-order").remove(),u===a?(e('<span class="k-icon k-i-sort-asc-sm" />').appendTo(f.link),g.attr(h,"ascending")):u===d&&(e('<span class="k-icon k-i-sort-desc-sm" />').appendTo(f.link),g.attr(h,"descending")),f.options.showIndexes&&m.length>1&&c&&e('<span class="k-sort-order" />').html(c).appendTo(f.link)},_toggleSortDirection:function(e){var n=this.directions;return e===n[n.length-1]&&this.options.allowUnsort?t:n[0]===e?n[1]:n[0]},_click:function(e){var i,r,a=this,d=a.element,u=d.attr(n.attr(l)),c=d.attr(n.attr(o)),h=a.options,p=null===a.options.compare?t:a.options.compare,f=a.dataSource.sort()||[];if(e.preventDefault(),(!h.filter||d.is(h.filter))&&(c=this._toggleSortDirection(c),!this.trigger("change",{sort:{field:u,dir:c,compare:p}}))){if(h.mode===s)f=[{field:u,dir:c,compare:p}];else if("multiple"===h.mode){for(i=0,r=f.length;i<r;i++)if(f[i].field===u){f.splice(i,1);break}f.push({field:u,dir:c,compare:p})}this.dataSource.options.endless&&(this.dataSource.options.endless=null,d.closest(".k-grid").getKendoGrid()._endlessPageSize=a.dataSource.options.pageSize,this.dataSource.pageSize(a.dataSource.options.pageSize)),this.dataSource.sort(f)}}});i.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.editable.min",["kendo.datepicker.min","kendo.numerictextbox.min","kendo.validator.min","kendo.binder.min"],e)}(function(){return function(e,t){function n(t){return t=null!=t?t:"",t.type||e.type(t)||"string"}function i(t){t.find(":input:not(:button, .k-combobox .k-input, ["+s.attr("role")+"=listbox], ["+s.attr("role")+"=upload], ["+s.attr("skip")+"], [type=file])").each(function(){var t=s.attr("bind"),n=this.getAttribute(t)||"",i="checkbox"===this.type||"radio"===this.type?"checked:":"value:",r=this.name;n.indexOf(i)===-1&&r&&(n+=(n.length?",":"")+i+r,e(this).attr(t,n))})}function r(e){var t,i,r=(e.model.fields||e.model)[e.field],o=n(r),a=r?r.validation:{},l=s.attr("type"),d=s.attr("bind"),u={name:e.field,title:e.title};for(t in a)i=a[t],f(t,_)>=0?u[l]=t:h(i)||(u[t]=p(i)?i.value||t:i),u[s.attr(t+"-msg")]=i.message;return f(o,_)>=0&&(u[l]=o),u[d]=("boolean"===o?"checked:":"value:")+e.field,u}function o(e){var t,n,i,r,o,a;if(e&&e.length)for(a=[],t=0,n=e.length;t<n;t++)i=e[t],o=i.text||i.value||i,r=null==i.value?i.text||i:i.value,a[t]={text:o,value:r};return a}function a(e,t){var n,i,r=e?e.validation||{}:{};for(n in r)i=r[n],p(i)&&i.value&&(i=i.value),h(i)&&(t[n]=i)}var s=window.kendo,l=s.ui,d=l.Widget,u=e.extend,c=s.support.browser.msie&&s.support.browser.version<9,h=s.isFunction,p=e.isPlainObject,f=e.inArray,m=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,g='<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>',v="change",_=["url","email","number","date","boolean"],b={number:function(t,n){var i=r(n);e('<input type="text"/>').attr(i).appendTo(t).kendoNumericTextBox({format:n.format}),e("<span "+s.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},date:function(t,n){var i=r(n),o=n.format;o&&(o=s._extractFormat(o)),i[s.attr("format")]=o,e('<input type="text"/>').attr(i).appendTo(t).kendoDatePicker({format:n.format}),e("<span "+s.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},string:function(t,n){var i=r(n);e('<input type="text" class="k-input k-textbox"/>').attr(i).appendTo(t)},"boolean":function(t,n){var i=r(n);e('<input type="checkbox" />').attr(i).appendTo(t)},values:function(t,n){var i=r(n),a=s.stringify(o(n.values));e("<select "+s.attr("text-field")+'="text"'+s.attr("value-field")+'="value"'+s.attr("source")+"='"+(a?a.replace(/\'/g,"&apos;"):a)+"'"+s.attr("role")+'="dropdownlist"/>').attr(i).appendTo(t),e("<span "+s.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)}},k=d.extend({init:function(t,n){var i=this;n.target&&(n.$angular=n.target.options.$angular),d.fn.init.call(i,t,n),i._validateProxy=e.proxy(i._validate,i),i.refresh()},events:[v],options:{name:"Editable",editors:b,clearContainer:!0,errorTemplate:g,skipFocus:!1},editor:function(e,t){var i=this,r=i.options.editors,o=p(e),a=o?e.field:e,l=i.options.model||{},d=o&&e.values,c=d?"values":n(t),h=o&&e.editor,f=h?e.editor:r[c],g=i.element.find("["+s.attr("container-for")+"="+a.replace(m,"\\$1")+"]");f=f?f:r.string,h&&"string"==typeof e.editor&&(f=function(t){t.append(e.editor)}),g=g.length?g:i.element,f(g,u(!0,{},o?e:{field:a},{model:l}))},_validate:function(t){var n,i=this,r=t.value,o=i._validationEventInProgress,a={},l=s.attr("bind"),d=t.field.replace(m,"\\$1"),u=RegExp("(value|checked)\\s*:\\s*"+d+"\\s*(,|$)");a[t.field]=t.value,n=e(":input["+l+'*="'+d+'"]',i.element).filter("["+s.attr("validate")+"!='false']").filter(function(){return u.test(e(this).attr(l))}),n.length>1&&(n=n.filter(function(){var t=e(this);return!t.is(":radio")||t.val()==r}));try{i._validationEventInProgress=!0,(!i.validatable.validateInput(n)||!o&&i.trigger(v,{values:a}))&&t.preventDefault()}finally{i._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element}}),d.fn.destroy.call(e),e.options.model.unbind("set",e._validateProxy),s.unbind(e.element),e.validatable&&e.validatable.destroy(),s.destroy(e.element),e.element.removeData("kendoValidator"),e.element.is("["+s.attr("role")+"=editable]")&&e.element.removeAttr(s.attr("role"))},refresh:function(){var n,r,o,l,d,u,h,f,m=this,g=m.options.fields||[],v=m.options.clearContainer?m.element.empty():m.element,_=m.options.model||{},b={};for(e.isArray(g)||(g=[g]),n=0,r=g.length;n<r;n++)o=g[n],l=p(o),d=l?o.field:o,u=(_.fields||_)[d],a(u,b),m.editor(o,u);if(m.options.target&&m.angular("compile",function(){return{elements:v,data:v.map(function(){return{dataItem:_}})}}),!r){h=_.fields||_;for(d in h)a(h[d],b)}i(v),m.validatable&&m.validatable.destroy(),s.bind(v,m.options.model),m.options.model.unbind("set",m._validateProxy),m.options.model.bind("set",m._validateProxy),m.validatable=new s.ui.Validator(v,{validateOnBlur:!1,errorTemplate:m.options.errorTemplate||t,rules:b}),m.options.skipFocus||(f=v.find(":kendoFocusable").eq(0).focus(),c&&f.focus())}});l.plugin(k)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.window.min",["kendo.draganddrop.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){return t!==e}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),parseInt(t,10))}function r(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function o(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new c(e.wrapper,{filter:">"+D,group:e.wrapper.id+"-resizing",dragstart:g(t.dragstart,t),drag:g(t.drag,t),dragend:g(t.dragend,t)}),t._draggable.userEvents.bind("press",g(t.addOverlay,t)),t._draggable.userEvents.bind("release",g(t.removeOverlay,t))}function a(t){for(var n,i,r={top:t.offsetTop,left:t.offsetLeft},o=t.offsetParent;o;)r.top+=o.offsetTop,r.left+=o.offsetLeft,n=e(o).css("overflowX"),i=e(o).css("overflowY"),"auto"!==i&&"scroll"!==i||(r.top-=o.scrollTop),"auto"!==n&&"scroll"!==n||(r.left-=o.scrollLeft),o=o.offsetParent;return r}function s(e,t){var n=this;n.owner=e,n._preventDragging=!1,n._draggable=new c(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:g(n.dragstart,n),drag:g(n.drag,n),dragend:g(n.dragend,n),dragcancel:g(n.dragcancel,n)}),n._draggable.userEvents.stopPropagation=!1}var l=window.kendo,d=l.ui.Widget,u=l.ui.Popup.TabKeyTrap,c=l.ui.Draggable,h=e.isPlainObject,p=l._activeElement,f=l._outerWidth,m=l._outerHeight,g=e.proxy,v=e.extend,_=e.each,b=l.template,k="body",w=".kendoWindow",y=".k-window",x=".k-window-title",C=x+"bar",T=".k-window-content",S=".k-dialog-content",D=".k-resize-handle",F=".k-overlay",E="k-content-frame",A="k-i-loading",I="k-state-hover",R="k-state-focused",M="k-window-maximized",z=":visible",H="hidden",N="cursor",B="open",P="activate",L="deactivate",O="close",V="refresh",W="minimize",U="maximize",q="resizeStart",j="resize",G="resizeEnd",$="dragstart",K="dragend",Y="error",Q="overflow",X="original-overflow-rule",J="zIndex",Z=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",ee=".k-i-pin",te=".k-i-unpin",ne=ee+","+te,ie=".k-window-titlebar .k-window-action",re=".k-window-titlebar .k-i-refresh",oe="WindowEventsHandled",ae=/^0[a-z]*$/i,se=l.isLocalUrl,le=d.extend({init:function(i,o){var a,s,c,p,f,m,v,_,b,k=this,D={},F=!1,A=o&&o.actions&&!o.actions.length;d.fn.init.call(k,i,o),o=k.options,p=o.position,i=k.element,f=o.content,_=e(window),A&&(o.actions=[]),k.appendTo=e(o.appendTo),f&&!h(f)&&(f=o.content={url:f}),i.find("script").filter(r).remove(),i.parent().is(k.appendTo)||p.top!==t&&p.left!==t||(i.is(z)?(D=i.offset(),F=!0):(s=i.css("visibility"),c=i.css("display"),i.css({visibility:H,display:""}),D=i.offset(),i.css({visibility:s,display:c})),p.top===t&&(p.top=D.top),p.left===t&&(p.left=D.left)),n(o.visible)&&null!==o.visible||(o.visible=i.is(z)),a=k.wrapper=i.closest(y),i.is(".k-content")&&a[0]||(i.addClass("k-window-content k-content"),k._createWindow(i,o),a=k.wrapper=i.closest(y),k._dimensions()),k._position(),f&&k.refresh(f),o.visible&&k.toFront(),m=a.children(T),k._tabindex(m),o.visible&&o.modal&&k._overlay(a.is(z)).css({opacity:.5}),a.on("mouseenter"+w,ie,g(k._buttonEnter,k)).on("mouseleave"+w,ie,g(k._buttonLeave,k)).on("click"+w,"> "+ie,g(k._windowActionHandler,k)).on("keydown"+w,g(k._keydown,k)).on("focus"+w,g(k._focus,k)).on("blur"+w,g(k._blur,k)),m.on("keydown"+w,g(k._keydown,k)).on("focus"+w,g(k._focus,k)).on("blur"+w,g(k._blur,k)),v=m.find("."+E)[0],v&&!_.data(oe)&&(_.on("blur"+w,function(){var t,n=e(document.activeElement).parent(T);n.length&&(t=l.widgetInstance(n),t._focus())}),_.on("focus"+w,function(){e(T).not(S).each(function(t,n){l.widgetInstance(e(n))._blur()})}),_.data(oe,!0)),this._resizable(),this._draggable(),o.pinned&&this.wrapper.is(":visible")&&k.pin(),b=i.attr("id"),b&&(b+="_wnd_title",a.children(C).children(x).attr("id",b),m.attr({role:"dialog","aria-labelledby":b})),a.add(a.children(".k-resize-handle,"+C)).on("mousedown"+w,g(k.toFront,k)),k.touchScroller=l.touchScroller(i),k._resizeHandler=g(k._onDocumentResize,k),k._marker=l.guid().substring(0,8),e(window).on("resize"+w+k._marker,k._resizeHandler),o.visible&&(k.trigger(B),k.trigger(P)),l.notify(k),this.options.modal&&(this._tabKeyTrap=new u(a),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return m.data("isFront")})},_buttonEnter:function(t){e(t.currentTarget).addClass(I)},_buttonLeave:function(t){e(t.currentTarget).removeClass(I)},_focus:function(){this.wrapper.addClass(R)},_blur:function(){this.wrapper.removeClass(R)},_dimensions:function(){var e,t,n=this.wrapper,r=this.options,o=r.width,a=r.height,s=r.maxHeight,l=["minWidth","minHeight","maxWidth","maxHeight"];for(this.title(r.title),e=0;e<l.length;e++)t=r[l[e]]||"",t!=1/0&&n.css(l[e],t);s!=1/0&&this.element.css("maxHeight",s),n.width(o?isNaN(o)&&(""+o).indexOf("px")<0?o:i(o,r.minWidth,r.maxWidth):""),n.height(a?isNaN(a)&&(""+a).indexOf("px")<0?a:i(a,r.minHeight,r.maxHeight):""),r.visible||n.hide()},_position:function(){var e=this.wrapper,t=this.options.position;0===t.top&&(t.top=""+t.top),0===t.left&&(t.left=""+t.left),e.css({top:t.top||"",left:t.left||""})},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_resize:function(){l.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,n=this.wrapper;this.resizing&&(n.off("dblclick"+w).children(D).remove(),this.resizing.destroy(),this.resizing=null),t&&(n.on("dblclick"+w,C,g(function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()},this)),_("n e s w se sw ne nw".split(" "),function(e,t){n.append(de.resizeHandle(t))}),this.resizing=new o(this)),n=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new s(this,e.dragHandle||C))},_actions:function(){var t=this.options,n=t.actions,i=t.pinned,r=this.wrapper.children(C),o=r.find(".k-window-actions"),a=["maximize","minimize"];n=e.map(n,function(e){return e=i&&"pin"===e.toLowerCase()?"unpin":e,{name:a.indexOf(e.toLowerCase())>-1?"window-"+e:e}}),o.html(l.render(de.action,n))},setOptions:function(e){var n,i,r=JSON.parse(JSON.stringify(e));v(e.position,this.options.position),v(e.position,r.position),d.fn.setOptions.call(this,e),n=this.options.scrollable!==!1,this.restore(),this._dimensions(),this._position(),this._resizable(),this._draggable(),this._actions(),t!==e.modal&&(i=this.options.visible!==!1,this._overlay(e.modal&&i)),this.element.css(Q,n?"":"hidden")},events:[B,P,L,O,W,U,V,q,j,G,$,K,Y],options:{name:"Window",animation:{open:{effects:{zoom:{direction:"in"},fade:{direction:"in"}},duration:350},close:{effects:{zoom:{direction:"out",properties:{scale:.7}},fade:{direction:"out"}},duration:350,hide:!0}},title:"",actions:["Close"],autoFocus:!0,modal:!1,resizable:!0,draggable:!0,minWidth:90,minHeight:50,maxWidth:1/0,maxHeight:1/0,pinned:!1,scrollable:!0,position:{},content:null,visible:null,height:null,width:null,appendTo:"body",isMaximized:!1,isMinimized:!1},_closable:function(){return e.inArray("close",e.map(this.options.actions,function(e){return e.toLowerCase()}))>-1},_keydown:function(e){var t,n,r,o,a,s,d=this,u=d.options,c=l.keys,h=e.keyCode,p=d.wrapper,f=10,m=d.options.isMaximized,g=d.options.isMinimized;h==c.ESC&&d._closable()&&d._close(!1),e.target!=e.currentTarget||d._closing||(e.altKey&&82==h&&d.refresh(),e.altKey&&80==h&&(d.options.pinned?d.unpin():d.pin()),e.altKey&&h==c.UP?g?(d.restore(),d.element.focus()):m||(d.maximize(),d.element.focus()):e.altKey&&h==c.DOWN&&(g||m?m&&(d.restore(),d.element.focus()):(d.minimize(),d.wrapper.focus())),!u.draggable||e.ctrlKey||e.altKey||m||(t=l.getOffset(p),h==c.UP?n=p.css("top",t.top-f):h==c.DOWN?n=p.css("top",t.top+f):h==c.LEFT?n=p.css("left",t.left-f):h==c.RIGHT&&(n=p.css("left",t.left+f))),u.resizable&&e.ctrlKey&&!m&&!g&&(h==c.UP?(n=!0,o=p.height()-f):h==c.DOWN&&(n=!0,o=p.height()+f),h==c.LEFT?(n=!0,r=p.width()-f):h==c.RIGHT&&(n=!0,r=p.width()+f),n&&(a=i(r,u.minWidth,u.maxWidth),s=i(o,u.minHeight,u.maxHeight),isNaN(a)||(p.width(a),d.options.width=a+"px"),isNaN(s)||(p.height(s),d.options.height=s+"px"),d.resize())),n&&e.preventDefault())},_overlay:function(t){var n=this.appendTo.children(F),i=this.wrapper;return n.length||(n=e("<div class='k-overlay' />")),n.insertBefore(i[0]).toggle(t).css(J,parseInt(i.css(J),10)-1),n},_actionForIcon:function(e){var t=/\bk-i(-\w+)+\b/.exec(e[0].className)[0];return{"k-i-close":"_close","k-i-window-maximize":"maximize","k-i-window-minimize":"minimize","k-i-window-restore":"restore","k-i-refresh":"refresh","k-i-pin":"pin","k-i-unpin":"unpin"}[t]},_windowActionHandler:function(n){var i,r;if(!this._closing)return i=e(n.target).closest(".k-window-action").find(".k-icon"),r=this._actionForIcon(i),r?(n.preventDefault(),this[r](),!1):t},_modals:function(){var t=this,n=e(y).filter(function(){var n=e(this),i=t._object(n),r=i&&i.options;return r&&r.modal&&r.visible&&r.appendTo===t.options.appendTo&&n.is(z)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(T),i=l.widgetInstance(n);return i?i:t},center:function(){var t,n,i=this,r=i.options.position,o=i.wrapper,a=e(window),s=0,l=0;return i.options.isMaximized?i:(i.options.pinned&&!i._isPinned&&i.pin(),i.options.pinned||(s=a.scrollTop(),l=a.scrollLeft()),n=l+Math.max(0,(a.width()-o.width())/2),t=s+Math.max(0,(a.height()-o.height()-parseInt(o.css("paddingTop"),10))/2),o.css({left:n,top:t}),r.top=t,r.left=n,i)},title:function(e){var t,n=this,i=n.wrapper,r=n.options,o=i.children(C),a=o.children(x);return arguments.length?(e===!1?(i.addClass("k-window-titleless"),o.remove()):(o.length?a.html(l.htmlEncode(e)):(i.prepend(de.titlebar(r)),n._actions(),o=i.children(C)),t=parseInt(m(o),10),i.css("padding-top",t),o.css("margin-top",-t)),n.options.title=e,n):a.html()},content:function(e,t){var i=this.wrapper.children(T),r=i.children(".km-scroll-container");
return i=r[0]?r:i,n(e)?(this.angular("cleanup",function(){return{elements:i.children()}}),l.destroy(this.element.children()),i.empty().html(e),this.angular("compile",function(){var e,n=[];for(e=i.length;--e>=0;)n.push({dataItem:t});return{elements:i.children(),data:n}}),this):i.html()},open:function(){var t,n,i,r=this,o=r.wrapper,a=r.options,s=this._animationOptions("open"),d=o.children(T),u=e(document);return r.trigger(B)||(r._closing&&o.kendoStop(!0,!0),r._closing=!1,r.toFront(),a.autoFocus&&r.element.focus(),a.visible=!0,a.modal&&(n=!!r._modals().length,t=r._overlay(n),t.kendoStop(!0,!0),s.duration&&l.effects.Fade&&!n?(i=l.fx(t).fadeIn(),i.duration(s.duration||0),i.endValue(.5),i.play()):t.css("opacity",.5),t.show(),e(window).on("focus",function(){d.data("isFront")&&!e(document.activeElement).closest(d).length&&r.element.focus()})),o.is(z)||(d.css(Q,H),o.show().kendoStop().kendoAnimate({effects:s.effects,duration:s.duration,complete:g(this._activate,this)}))),a.isMaximized&&(r._documentScrollTop=u.scrollTop(),r._documentScrollLeft=u.scrollLeft(),r._stopDocumentScrolling()),a.pinned&&!r._isPinned&&r.pin(),r},_activate:function(){var e=this.options.scrollable!==!1;this.options.autoFocus&&this.element.focus(),this.element.css(Q,e?"":"hidden"),l.resize(this.element.children()),this.trigger(P)},_removeOverlay:function(n){var i,r=this._modals(),o=this.options,a=o.modal&&!r.length,s=o.modal?this._overlay(!0):e(t),d=this._animationOptions("close");a?!n&&d.duration&&l.effects.Fade?(i=l.fx(s).fadeOut(),i.duration(d.duration||0),i.startValue(.5),i.play()):this._overlay(!1).remove():r.length&&this._object(r.last())._overlay(!0)},_close:function(t){var n,i=this,r=i.wrapper,o=i.options,a=this._animationOptions("open"),s=this._animationOptions("close"),l=e(document);i._closing||(n=i.trigger(O,{userTriggered:!t}),i._closing=!n,r.is(z)&&!n&&(o.visible=!1,e(y).each(function(t,n){var i=e(n).children(T);n!=r&&i.find("> ."+E).length>0&&i.children(F).remove()}),this._removeOverlay(),r.kendoStop().kendoAnimate({effects:s.effects||a.effects,reverse:s.reverse===!0,duration:s.duration,complete:g(this._deactivate,this)})),i.options.isMaximized&&(i._enableDocumentScrolling(),i._documentScrollTop&&i._documentScrollTop>0&&l.scrollTop(i._documentScrollTop),i._documentScrollLeft&&i._documentScrollLeft>0&&l.scrollLeft(i._documentScrollLeft)))},_deactivate:function(){var e,t=this;t.wrapper.hide().css("opacity",""),t.trigger(L),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(ie+","+ie+" .k-icon,:input,a")},_shouldFocus:function(t){var n=p(),i=this.element;return this.options.autoFocus&&!e(n).is(i)&&!this._actionable(t)&&(!i.find(n).length||!i.find(t).length)},toFront:function(t){var n,i,r=this,o=r.wrapper,a=o[0],s=+o.css(J),l=s,d=t&&t.target||null;return e(y).each(function(t,n){var i=e(n),r=i.css(J),o=i.children(T);isNaN(r)||(s=Math.max(+r,s)),o.data("isFront",n==a),n!=a&&o.find("> ."+E).length>0&&o.append(de.overlay)}),(!o[0].style.zIndex||l<s)&&o.css(J,s+2),r.element.find("> .k-overlay").remove(),r._shouldFocus(d)&&(r.isMinimized()?r.wrapper.focus():e(d).is(F)?setTimeout(function(){r.element.focus()}):r.element.focus(),n=e(window).scrollTop(),i=parseInt(o.position().top,10),!r.options.pinned&&i>0&&i<n&&(n>0?e(window).scrollTop(i):o.css("top",n))),o=null,r},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,n=t.options,i=n.minHeight,r=t.restoreOptions,o=e(document);return n.isMaximized||n.isMinimized?(i&&i!=1/0&&t.wrapper.css("min-height",i),t.wrapper.css({position:n.pinned?"fixed":"absolute",left:r.left,top:r.top,width:r.width,height:r.height}).removeClass(M).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(Z).parent().show().end().end().find(ne).parent().show(),n.isMaximized?t.wrapper.find(".k-i-window-maximize").parent().focus():n.isMinimized&&t.wrapper.find(".k-i-window-minimize").parent().focus(),t.options.width=r.width,t.options.height=r.height,t._enableDocumentScrolling(),this._documentScrollTop&&this._documentScrollTop>0&&o.scrollTop(this._documentScrollTop),this._documentScrollLeft&&this._documentScrollLeft>0&&o.scrollLeft(this._documentScrollLeft),n.isMaximized=n.isMinimized=!1,this.wrapper.removeAttr("tabindex"),this.wrapper.removeAttr("aria-labelled-by"),t.resize(),t):t},_sizingAction:function(e,t){var n=this,i=n.wrapper,r=i[0].style,o=n.options;return o.isMaximized||o.isMinimized?n:(n.restoreOptions={width:r.width,height:r.height},i.children(D).hide().end().children(C).find(Z).parent().hide().eq(0).before(de.action({name:"window-restore"})),t.call(n),n.wrapper.children(C).find(ne).parent().toggle("maximize"!==e),n.trigger(e),i.find(".k-i-window-restore").parent().focus(),n)},maximize:function(){return this._sizingAction("maximize",function(){var t=this,n=t.wrapper,i=n.position(),r=e(document);v(t.restoreOptions,{left:i.left,top:i.top}),n.css({left:0,top:0,position:"fixed"}).addClass(M),this._documentScrollTop=r.scrollTop(),this._documentScrollLeft=r.scrollLeft(),t._stopDocumentScrolling(),t.options.isMaximized=!0,t._onDocumentResize()}),this},_stopDocumentScrolling:function(){var t,n=this,i=e("body");n._storeOverflowRule(i),i.css(Q,H),t=e("html"),n._storeOverflowRule(t),t.css(Q,H)},_enableDocumentScrolling:function(){var t=this;t._restoreOverflowRule(e(document.body)),t._restoreOverflowRule(e("html"))},_storeOverflowRule:function(e){if(!this._isOverflowStored(e)){var t=e.get(0).style.overflow;"string"==typeof t&&e.data(X,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(X)},_restoreOverflowRule:function(e){var n=e.data(X);null!==n&&n!==t?(e.css(Q,n),e.removeData(X)):e.css(Q,"")},isMaximized:function(){return this.options.isMaximized},minimize:function(){return this._sizingAction("minimize",function(){var e=this;e.wrapper.css({height:"",minHeight:""}),e.element.hide(),e.options.isMinimized=!0}),this.wrapper.attr("tabindex",0),this.wrapper.attr("aria-labelled-by",this.element.attr("aria-labelled-by")),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,n=e(window),i=t.wrapper,r=parseInt(i.css("top"),10),o=parseInt(i.css("left"),10);t.options.isMaximized||(i.css({position:"fixed",top:r-n.scrollTop(),left:o-n.scrollLeft()}),i.children(C).find(ee).addClass("k-i-unpin").removeClass("k-i-pin"),t._isPinned=!0,t.options.pinned=!0)},unpin:function(){var t=this,n=e(window),i=t.wrapper,r=parseInt(i.css("top"),10),o=parseInt(i.css("left"),10);t.options.isMaximized||(i.css({position:"",top:r+n.scrollTop(),left:o+n.scrollLeft()}),i.children(C).find(te).addClass("k-i-pin").removeClass("k-i-unpin"),t._isPinned=!1,t.options.pinned=!1)},_onDocumentResize:function(){var t,n,i,r,o=this,a=o.wrapper,s=e(window),d=l.support.zoomLevel();o.options.isMaximized&&(i=parseInt(a.css("border-left-width"),10)+parseInt(a.css("border-right-width"),10),r=parseInt(a.css("border-top-width"),10)+parseInt(a.css("border-bottom-width"),10),t=s.width()/d-i,n=s.height()/d-parseInt(a.css("padding-top"),10)-r,a.css({width:t,height:n}),o.options.width=t,o.options.height=n,o.resize())},refresh:function(t){var i,r,o,a=this,s=a.options,l=e(a.element);return h(t)||(t={url:t}),t=v({},s.content,t),r=n(s.iframe)?s.iframe:t.iframe,o=t.url,o?(n(r)||(r=!se(o)),r?(i=l.find("."+E)[0],i?i.src=o||i.src:l.html(de.contentFrame(v({},s,{content:t}))),l.find("."+E).unbind("load"+w).on("load"+w,g(this._triggerRefresh,this))):a._ajaxRequest(t)):(t.template&&a.content(b(t.template)({})),a.trigger(V)),l.toggleClass("k-window-iframecontent",!!r),a},_triggerRefresh:function(){this.trigger(V)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(re).removeClass(A)},_ajaxError:function(e,t){this.trigger(Y,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=b(e)(t||{})),this.content(n,t),this.element.prop("scrollTop",0),this.trigger(V)}},_showLoading:function(){this.wrapper.find(re).addClass(A)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(g(this._showLoading,this),100),e.ajax(v({type:"GET",dataType:"html",cache:!1,error:g(this._ajaxError,this),complete:g(this._ajaxComplete,this),success:g(this._ajaxSuccess(t.template),this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(w).children(T).off(w).end().find(".k-resize-handle,.k-window-titlebar").off(w),e(window).off("resize"+w+this._marker),e(window).off(w),clearTimeout(this._loadingIconTimeout),d.fn.destroy.call(this),this.unbind(t),l.destroy(this.wrapper),this._removeOverlay(!0)},destroy:function(){this._destroy(),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t,n,i=this.element,r=this.options,o=l.support.isRtl(i);r.scrollable===!1&&i.css("overflow","hidden"),n=e(de.wrapper(r)),t=i.find("iframe:not(.k-content)").map(function(){var e=this.getAttribute("src");return this.src="",e}),n.toggleClass("k-rtl",o).appendTo(this.appendTo).append(i).find("iframe:not(.k-content)").each(function(e){this.src=t[e]}),n.find(".k-window-title").css(o?"left":"right",f(n.find(".k-window-actions"))+10),i.css("visibility","").show(),i.find("[data-role=editor]").each(function(){var t=e(this).data("kendoEditor");t&&t.refresh()}),n=i=null}}),de={wrapper:b("<div class='k-widget k-window' />"),action:b("<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action' aria-label='#= name #'><span class='k-icon k-i-#= name.toLowerCase() #'></span></a>"),titlebar:b("<div class='k-window-titlebar k-header'>&nbsp;<span class='k-window-title'>#: title #</span><div class='k-window-actions' /></div>"),overlay:"<div class='k-overlay' />",contentFrame:b("<iframe frameborder='0' title='#= title #' class='"+E+"' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:b("<div class='k-resize-handle k-resize-#= data #'></div>")};o.prototype={addOverlay:function(){this.owner.wrapper.append(de.overlay)},removeOverlay:function(){this.owner.wrapper.find(F).remove()},dragstart:function(t){var n,i,r,o,s,d,u,c=this,h=c.owner,p=h.wrapper;c._preventDragging=h.trigger(q),c._preventDragging||(c.elementPadding=parseInt(p.css("padding-top"),10),c.initialPosition=l.getOffset(p,"position"),c.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),c.initialSize={width:p.width(),height:p.height()},c.containerOffset=l.getOffset(h.appendTo,"position"),n=p.offsetParent(),n.is("html")?c.containerOffset.top=c.containerOffset.left=0:(i=n.css("margin-top"),r=n.css("margin-left"),o=!ae.test(i)||!ae.test(r),o&&(s=a(p[0]),d=s.left-c.containerOffset.left-c.initialPosition.left,u=s.top-c.containerOffset.top-c.initialPosition.top,c._relativeElMarginLeft=d>1?d:0,c._relativeElMarginTop=u>1?u:0,c.initialPosition.left+=c._relativeElMarginLeft,c.initialPosition.top+=c._relativeElMarginTop)),p.children(D).not(t.currentTarget).hide(),e(k).css(N,t.currentTarget.css(N)))},drag:function(t){var n,r,o,a,s,l,d,u,c,h,p,f,m,g,v;this._preventDragging||(n=this,r=n.owner,o=r.wrapper,a=r.options,s=n.resizeDirection,l=n.containerOffset,d=n.initialPosition,u=n.initialSize,m=Math.max(t.x.location,0),g=Math.max(t.y.location,0),s.indexOf("e")>=0?(c=m-d.left-l.left,o.width(i(c,a.minWidth,a.maxWidth))):s.indexOf("w")>=0&&(f=d.left+u.width+l.left,c=i(f-m,a.minWidth,a.maxWidth),o.css({left:f-c-l.left-(n._relativeElMarginLeft||0),width:c})),v=g,r.options.pinned&&(v-=e(window).scrollTop()),s.indexOf("s")>=0?(h=v-d.top-n.elementPadding-l.top,o.height(i(h,a.minHeight,a.maxHeight))):s.indexOf("n")>=0&&(p=d.top+u.height+l.top,h=i(p-v,a.minHeight,a.maxHeight),o.css({top:p-h-l.top-(n._relativeElMarginTop||0),height:h})),c&&(r.options.width=c+"px"),h&&(r.options.height=h+"px"),r.resize())},dragend:function(t){if(!this._preventDragging){var n=this,i=n.owner,r=i.wrapper;return r.children(D).not(t.currentTarget).show(),e(k).css(N,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&r.css(n.initialPosition).css(n.initialSize),i.trigger(G),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},s.prototype={dragstart:function(t){var n=this.owner,i=n.element,r=i.find(".k-window-actions"),o=l.getOffset(n.appendTo);this._preventDragging=n.trigger($)||!n.options.draggable,this._preventDragging||(n.initialWindowPosition=l.getOffset(n.wrapper,"position"),n.initialPointerPosition={left:t.x.client,top:t.y.client},n.startPosition={left:t.x.client-n.initialWindowPosition.left,top:t.y.client-n.initialWindowPosition.top},n.minLeftPosition=r.length>0?f(r)+parseInt(r.css("right"),10)-f(i):20-f(i),n.minLeftPosition-=o.left,n.minTopPosition=-o.top,n.wrapper.append(de.overlay).children(D).hide(),e(k).css(N,t.currentTarget.css(N)))},drag:function(t){var n,i;this._preventDragging||(n=this.owner,i=n.options.position,i.top=Math.max(t.y.client-n.startPosition.top,n.minTopPosition),i.left=Math.max(t.x.client-n.startPosition.left,n.minLeftPosition),l.support.transforms?e(n.wrapper).css("transform","translate("+(t.x.client-n.initialPointerPosition.left)+"px, "+(t.y.client-n.initialPointerPosition.top)+"px)"):e(n.wrapper).css(i))},_finishDrag:function(){var t=this.owner;t.wrapper.children(D).toggle(!t.options.isMinimized).end().find(F).remove(),e(k).css(N,"")},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(y).css(this.owner.initialWindowPosition))},dragend:function(){if(!this._preventDragging)return e(this.owner.wrapper).css(this.owner.options.position).css("transform",""),this._finishDrag(),this.owner.trigger(K),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},l.ui.plugin(le)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.view.min",["kendo.core.min","kendo.fx.min","kendo.mobile.scroller.min","kendo.view.min"],e)}(function(){return function(e,t){function n(e){var t,n,i=e.find(y("popover")),r=s.roles;for(t=0,n=i.length;t<n;t++)o.initWidget(i[t],{},r)}function i(e){o.triggeredByInput(e)||e.preventDefault()}function r(t){t.each(function(){o.initWidget(e(this),{},s.roles)})}var o=window.kendo,a=o.mobile,s=a.ui,l=o.attr,d=s.Widget,u=o.ViewClone,c="init",h='<div style="height: 100%; width: 100%; position: absolute; top: 0; left: 0; z-index: 20000; display: none" />',p="beforeShow",f="show",m="afterShow",g="beforeHide",v="transitionEnd",_="transitionStart",b="hide",k="destroy",w=o.attrValue,y=o.roleSelector,x=o.directiveSelector,C=o.compileMobileDirective,T=d.extend({init:function(t,n){d.fn.init.call(this,t,n),this.params={},e.extend(this,n),this.transition=this.transition||this.defaultTransition,this._id(),this.options.$angular?this._overlay():(this._layout(),this._overlay(),this._scroller(),this._model())},events:[c,p,f,m,g,b,k,_,v],options:{name:"View",title:"",layout:null,getLayout:e.noop,reload:!1,transition:"",defaultTransition:"",useNativeScrolling:!1,stretch:!1,zoom:!1,model:null,modelScope:window,scroller:{},initWidgets:!0},enable:function(e){t===e&&(e=!0),e?this.overlay.hide():this.overlay.show()},destroy:function(){this.layout&&this.layout.detach(this),this.trigger(k),d.fn.destroy.call(this),this.scroller&&this.scroller.destroy(),this.options.$angular&&this.element.scope().$destroy(),o.destroy(this.element)},purge:function(){this.destroy(),this.element.remove()},triggerBeforeShow:function(){return!this.trigger(p,{view:this})},triggerBeforeHide:function(){return!this.trigger(g,{view:this})},showStart:function(){var e=this.element;e.css("display",""),this.inited?this._invokeNgController():(this.inited=!0,this.trigger(c,{view:this})),this.layout&&this.layout.attach(this),this._padIfNativeScrolling(),this.trigger(f,{view:this}),o.resize(e)},showEnd:function(){this.trigger(m,{view:this}),this._padIfNativeScrolling()},hideEnd:function(){var e=this;e.element.hide(),e.trigger(b,{view:e}),e.layout&&e.layout.trigger(b,{view:e,layout:e.layout})},beforeTransition:function(e){this.trigger(_,{type:e})},afterTransition:function(e){this.trigger(v,{type:e})},_padIfNativeScrolling:function(){if(a.appLevelNativeScrolling()){var e=o.support.mobileOS&&o.support.mobileOS.android,t=a.application.skin()||"",n=a.application.os.android||t.indexOf("android")>-1,i="flat"===t||t.indexOf("material")>-1,r=!e&&!n||i?"header":"footer",s=!e&&!n||i?"footer":"header";this.content.css({paddingTop:this[r].height(),paddingBottom:this[s].height()})}},contentElement:function(){var e=this;return e.options.stretch?e.content:e.scrollerContent},clone:function(){return new u(this)},_scroller:function(){var t=this;a.appLevelNativeScrolling()||(t.options.stretch?t.content.addClass("km-stretched-view"):(t.content.kendoMobileScroller(e.extend(t.options.scroller,{zoom:t.options.zoom,useNative:t.options.useNativeScrolling})),t.scroller=t.content.data("kendoMobileScroller"),t.scrollerContent=t.scroller.scrollElement),o.support.kineticScrollNeeded&&(e(t.element).on("touchmove",".km-header",i),t.options.useNativeScrolling||t.options.stretch||e(t.element).on("touchmove",".km-content",i)))},_model:function(){var e=this,t=e.element,i=e.options.model;"string"==typeof i&&(i=o.getter(i)(e.options.modelScope)),e.model=i,n(t),e.element.css("display",""),e.options.initWidgets&&(i?o.bind(t,i,s,o.ui,o.dataviz.ui):a.init(t.children())),e.element.css("display","none")},_id:function(){var e=this.element,t=e.attr("id")||"";this.id=w(e,"url")||"#"+t,"#"==this.id&&(this.id=o.guid(),e.attr("id",this.id))},_layout:function(){var e=y("content"),t=this.element;t.addClass("km-view"),this.header=t.children(y("header")).addClass("km-header"),this.footer=t.children(y("footer")).addClass("km-footer"),t.children(e)[0]||t.wrapInner("<div "+l("role")+'="content"></div>'),this.content=t.children(y("content")).addClass("km-content"),this.element.prepend(this.header).append(this.footer),this.layout=this.options.getLayout(this.layout),this.layout&&this.layout.setup(this)},_overlay:function(){this.overlay=e(h).appendTo(this.element)},_invokeNgController:function(){var t,n,i;this.options.$angular&&(t=this.element.controller(),n=this.options.$angular[0],t&&(i=e.proxy(this,"_callController",t,n),/^\$(digest|apply)$/.test(n.$$phase)?i():n.$apply(i)))},_callController:function(e,t){this.element.injector().invoke(e.constructor,e,{$scope:t})}}),S=d.extend({init:function(e,t){d.fn.init.call(this,e,t),e=this.element,this.header=e.children(this._locate("header")).addClass("km-header"),this.footer=e.children(this._locate("footer")).addClass("km-footer"),this.elements=this.header.add(this.footer),n(e),this.options.$angular||o.mobile.init(this.element.children()),this.element.detach(),this.trigger(c,{layout:this})},_locate:function(e){return this.options.$angular?x(e):y(e)},options:{name:"Layout",id:null,platform:null},events:[c,f,b],setup:function(e){e.header[0]||(e.header=this.header),e.footer[0]||(e.footer=this.footer)},detach:function(e){var t=this;e.header===t.header&&t.header[0]&&e.element.prepend(t.header.detach()[0].cloneNode(!0)),e.footer===t.footer&&t.footer.length&&e.element.append(t.footer.detach()[0].cloneNode(!0))},attach:function(e){var t=this,n=t.currentView;n&&t.detach(n),e.header===t.header&&(t.header.detach(),e.element.children(y("header")).remove(),e.element.prepend(t.header)),e.footer===t.footer&&(t.footer.detach(),e.element.children(y("footer")).remove(),e.element.append(t.footer)),t.trigger(f,{layout:t,view:e}),t.currentView=e}}),D=o.Observable,F=/<body[^>]*>(([\u000a\u000d\u2028\u2029]|.)*)<\/body>/i,E="loadStart",A="loadComplete",I="showStart",R="sameViewRequested",M="viewShow",z="viewTypeDetermined",H="after",N=D.extend({init:function(t){var n,i,a,s,l=this;if(D.fn.init.call(l),e.extend(l,t),l.sandbox=e("<div />"),a=l.container,n=l._hideViews(a),l.rootView=n.first(),!l.rootView[0]&&t.rootNeeded)throw i=a[0]==o.mobile.application.element[0]?'Your kendo mobile application element does not contain any direct child elements with data-role="view" attribute set. Make sure that you instantiate the mobile application using the correct container.':'Your pane element does not contain any direct child elements with data-role="view" attribute set.',Error(i);l.layouts={},l.viewContainer=new o.ViewContainer(l.container),l.viewContainer.bind("accepted",function(e){e.view.params=l.params}),l.viewContainer.bind("complete",function(e){l.trigger(M,{view:e.view})}),l.viewContainer.bind(H,function(){l.trigger(H)}),this.getLayoutProxy=e.proxy(this,"_getLayout"),l._setupLayouts(a),s=a.children(l._locate("modalview drawer")),l.$angular?(l.$angular[0].viewOptions={defaultTransition:l.transition,loader:l.loader,container:l.container,getLayout:l.getLayoutProxy},s.each(function(n,i){C(e(i),t.$angular[0])})):r(s),this.bind(this.events,t)},events:[I,H,M,E,A,R,z],destroy:function(){o.destroy(this.container);for(var e in this.layouts)this.layouts[e].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(R),!1;this.trigger(I);var i=this,r=function(n){return i.viewContainer.show(n,t,e)},a=i._findViewElement(e),s=o.widgetInstance(a);return i.url=e.replace(/^#/,""),i.params=n,s&&s.reload&&(s.purge(),a=[]),this.trigger(z,{remote:0===a.length,url:e}),a[0]?(s||(s=i._createView(a)),r(s)):(this.serverNavigation?location.href=e:i._loadView(e,r),!0)},append:function(e,t){var n,i,o,a=this.sandbox,s=(t||"").split("?")[0],d=this.container;return F.test(e)&&(e=RegExp.$1),a[0].innerHTML=e,d.append(a.children("script, style")),n=this._hideViews(a),o=n.first(),o.length||(n=o=a.wrapInner("<div data-role=view />").children()),s&&o.hide().attr(l("url"),s),this._setupLayouts(a),i=a.children(this._locate("modalview drawer")),d.append(a.children(this._locate("layout modalview drawer")).add(n)),r(i),this._createView(o)},_locate:function(e){return this.$angular?x(e):y(e)},_findViewElement:function(e){var t,n=e.split("?")[0];return n?(t=this.container.children("["+l("url")+"='"+n+"']"),t[0]||n.indexOf("/")!==-1||(t=this.container.children("#"===n.charAt(0)?n:"#"+n)),t):this.rootView},_createView:function(e){return this.$angular?C(e,this.$angular[0]):o.initWidget(e,{defaultTransition:this.transition,loader:this.loader,container:this.container,getLayout:this.getLayoutProxy,modelScope:this.modelScope,reload:w(e,"reload")},s.roles)},_getLayout:function(e){return""===e?null:e?this.layouts[e]:this.layouts[this.layout]},_loadView:function(t,n){this._xhr&&this._xhr.abort(),this.trigger(E),this._xhr=e.get(o.absoluteURL(t,this.remoteViewURLPrefix),"html").always(e.proxy(this,"_xhrComplete",n,t))},_xhrComplete:function(e,t,n){var i=!0;if("object"==typeof n&&0===n.status){if(!(n.responseText&&n.responseText.length>0))return;i=!0,n=n.responseText}this.trigger(A),i&&e(this.append(n,t))},_hideViews:function(e){return e.children(this._locate("view splitview")).hide()},_setupLayouts:function(t){var n,i=this;t.children(i._locate("layout")).each(function(){n=i.$angular?C(e(this),i.$angular[0]):o.initWidget(e(this),{},s.roles);var t=n.options.platform;t&&t!==a.application.os.name?n.destroy():i.layouts[n.options.id]=n})}});o.mobile.ViewEngine=N,s.plugin(T),s.plugin(S)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.loader.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,r=i.Widget,o=e.map(n.eventMap,function(e){return e}).join(" ").split(" "),a=r.extend({init:function(t,n){var i=this,o=e('<div class="km-loader"><span class="km-loading km-spin"></span><span class="km-loading-left"></span><span class="km-loading-right"></span></div>');r.fn.init.call(i,o,n),i.container=t,i.captureEvents=!1,i._attachCapture(),o.append(i.options.loading).hide().appendTo(t)},options:{name:"Loader",loading:"<h1>Loading...</h1>",timeout:100},show:function(){var e=this;clearTimeout(e._loading),e.options.loading!==!1&&(e.captureEvents=!0,e._loading=setTimeout(function(){e.element.show()},e.options.timeout))},hide:function(){this.captureEvents=!1,clearTimeout(this._loading),this.element.hide()},changeMessage:function(e){this.options.loading=e,this.element.find(">h1").html(e)},transition:function(){this.captureEvents=!0,this.container.css("pointer-events","none")},transitionDone:function(){this.captureEvents=!1,this.container.css("pointer-events","")},_attachCapture:function(){function e(e){n.captureEvents&&e.preventDefault()}var t,n=this;for(n.captureEvents=!1,t=0;t<o.length;t++)n.container[0].addEventListener(o[t],e,!0)}});i.plugin(a)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.pane.min",["kendo.mobile.view.min","kendo.mobile.loader.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,r=n.roleSelector,o=i.ui,a=o.Widget,s=i.ViewEngine,l=o.View,d=i.ui.Loader,u="external",c="href",h="#!",p="navigate",f="viewShow",m="sameViewRequested",g=n.support.mobileOS,v=g.ios&&!g.appMode&&g.flatVersion>=700,_=/popover|actionsheet|modalview|drawer/,b="#:back",k=n.attrValue,w=a.extend({init:function(e,t){var i=this;a.fn.init.call(i,e,t),t=i.options,e=i.element,e.addClass("km-pane"),i.options.collapsible&&e.addClass("km-collapsible-pane"),this.history=[],this.historyCallback=function(e,t,n){var r=i.transition;return i.transition=null,v&&n&&(r="none"),i.viewEngine.showView(e,r,t)},this._historyNavigate=function(e){if(e===b){if(1===i.history.length)return;i.history.pop(),e=i.history[i.history.length-1]}else i.history.push(e);i.historyCallback(e,n.parseQueryStringParams(e))},this._historyReplace=function(e){var t=n.parseQueryStringParams(e);i.history[i.history.length-1]=e,i.historyCallback(e,t)},i.loader=new d(e,{loading:i.options.loading}),i.viewEngine=new s({container:e,transition:t.transition,modelScope:t.modelScope,rootNeeded:!t.initial,serverNavigation:t.serverNavigation,remoteViewURLPrefix:t.root||"",layout:t.layout,$angular:t.$angular,loader:i.loader,showStart:function(){i.loader.transition(),i.closeActiveDialogs()},after:function(){i.loader.transitionDone()},viewShow:function(e){i.trigger(f,e)},loadStart:function(){i.loader.show()},loadComplete:function(){i.loader.hide()},sameViewRequested:function(){i.trigger(m)},viewTypeDetermined:function(e){e.remote&&i.options.serverNavigation||i.trigger(p,{url:e.url})}}),this._setPortraitWidth(),n.onResize(function(){i._setPortraitWidth()}),i._setupAppLinks()},closeActiveDialogs:function(){var t=this.element.find(r("actionsheet popover modalview")).filter(":visible");t.each(function(){n.widgetInstance(e(this),o).close()})},navigateToInitial:function(){var e=this.options.initial;return e&&this.navigate(e),e},options:{name:"Pane",portraitWidth:"",transition:"",layout:"",collapsible:!1,initial:null,modelScope:window,loading:"<h1>Loading...</h1>"},events:[p,f,m],append:function(e){return this.viewEngine.append(e)},destroy:function(){a.fn.destroy.call(this),this.viewEngine.destroy(),this.userEvents.destroy()},navigate:function(e,t){e instanceof l&&(e=e.id),this.transition=t,this._historyNavigate(e)},replace:function(e,t){e instanceof l&&(e=e.id),this.transition=t,this._historyReplace(e)},bindToRouter:function(e){var t=this,i=this.history,r=this.viewEngine;e.bind("init",function(t){var o,a=t.url,s=e.pushState?a:"/";r.rootView.attr(n.attr("url"),s),o=i.length,"/"===a&&o&&(e.navigate(i[o-1],!0),t.preventDefault())}),e.bind("routeMissing",function(e){t.historyCallback(e.url,e.params,e.backButtonPressed)||e.preventDefault()}),e.bind("same",function(){t.trigger(m)}),t._historyNavigate=function(t){e.navigate(t)},t._historyReplace=function(t){e.replace(t)}},hideLoading:function(){this.loader.hide()},showLoading:function(){this.loader.show()},changeLoadingMessage:function(e){this.loader.changeMessage(e)},view:function(){return this.viewEngine.view()},_setPortraitWidth:function(){var e,t=this.options.portraitWidth;t&&(e=n.mobile.application.element.is(".km-vertical")?t:"auto",this.element.css("width",e))},_setupAppLinks:function(){var t=this,i="tab",o="[data-"+n.ns+"navigate-on-press]",a=e.map(["button","backbutton","detailbutton","listview-link"],function(e){return r(e)+":not("+o+")"}).join(",");this.element.handler(this).on("down",r(i)+","+o,"_mouseup").on("click",r(i)+","+a+","+o,"_appLinkClick"),this.userEvents=new n.UserEvents(this.element,{fastTap:!0,filter:a,tap:function(e){e.event.currentTarget=e.touch.currentTarget,t._mouseup(e.event)}}),this.element.css("-ms-touch-action","")},_appLinkClick:function(t){var n=e(t.currentTarget).attr("href"),i=n&&"#"!==n[0]&&this.options.serverNavigation;i||k(e(t.currentTarget),"rel")==u||t.preventDefault()},_mouseup:function(r){if(!(r.which>1||r.isDefaultPrevented())){var a=this,s=e(r.currentTarget),l=k(s,"transition"),d=k(s,"rel")||"",p=k(s,"target"),f=s.attr(c),m=v&&0===s[0].offsetHeight,g=f&&"#"!==f[0]&&this.options.serverNavigation;m||g||d===u||t===f||f===h||(s.attr(c,h),setTimeout(function(){s.attr(c,f)}),d.match(_)?(n.widgetInstance(e(f),o).openFor(s),"actionsheet"!==d&&"drawer"!==d||r.stopPropagation()):("_top"===p?a=i.application.pane:p&&(a=e("#"+p).data("kendoMobilePane")),a.navigate(f,l)),r.preventDefault())}}});w.wrap=function(e){e.is(r("view"))||(e=e.wrap("<div data-"+n.ns+'role="view" data-stretch="true"></div>').parent());var t=e.wrap('<div class="km-pane-wrapper"><div></div></div>').parent(),i=new w(t);return i.navigate(""),i},o.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.popover.min",["kendo.popup.min","kendo.mobile.pane.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile,r=i.ui,o="hide",a="open",s="close",l='<div class="km-popup-wrapper" />',d='<div class="km-popup-arrow" />',u='<div class="km-popup-overlay" />',c="km-up km-down km-left km-right",h=r.Widget,p={down:{origin:"bottom center",position:"top center"},up:{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"}},f={animation:{open:{effects:"fade:in",duration:0},close:{effects:"fade:out",duration:400}}},m={horizontal:{offset:"top",size:"height"},vertical:{offset:"left",size:"width"}},g={up:"down",down:"up",left:"right",right:"left"},v=h.extend({init:function(t,i){var r,a,s=this,c=t.closest(".km-modalview-wrapper"),g=t.closest(".km-root").children(".km-pane").first(),v=c[0]?c:g;i.viewport?g=i.viewport:g[0]||(g=window),i.container?v=i.container:v[0]||(v=document.body),r={viewport:g,copyAnchorStyles:!1,autosize:!0,open:function(){s.overlay.show()},activate:e.proxy(s._activate,s),deactivate:function(){s.overlay.hide(),s._apiCall||s.trigger(o),s._apiCall=!1}},h.fn.init.call(s,t,i),t=s.element,i=s.options,t.wrap(l).addClass("km-popup").show(),a=s.options.direction.match(/left|right/)?"horizontal":"vertical",s.dimensions=m[a],s.wrapper=t.parent().css({width:i.width,height:i.height}).addClass("km-popup-wrapper km-"+i.direction).hide(),s.arrow=e(d).prependTo(s.wrapper).hide(),s.overlay=e(u).appendTo(v).hide(),r.appendTo=s.overlay,i.className&&s.overlay.addClass(i.className),s.popup=new n.ui.Popup(s.wrapper,e.extend(!0,r,f,p[i.direction]))},options:{name:"Popup",width:240,height:"",direction:"down",container:null,viewport:null},events:[o],show:function(t){this.popup.options.anchor=e(t),this.popup.open()},hide:function(){this._apiCall=!0,this.popup.close()},destroy:function(){h.fn.destroy.call(this),this.popup.destroy(),this.overlay.remove()},target:function(){return this.popup.options.anchor},_activate:function(){
var t=this,n=t.options.direction,i=t.dimensions,r=i.offset,o=t.popup,a=o.options.anchor,s=e(a).offset(),l=e(o.element).offset(),d=o.flipped?g[n]:n,u=2*t.arrow[i.size](),h=t.element[i.size]()-t.arrow[i.size](),p=e(a)[i.size](),f=s[r]-l[r]+p/2;f<u&&(f=u),f>h&&(f=h),t.wrapper.removeClass(c).addClass("km-"+d),t.arrow.css(r,f).show()}}),_=h.extend({init:function(t,i){var o,a=this;a.initialOpen=!1,h.fn.init.call(a,t,i),o=e.extend({className:"km-popover-root",hide:function(){a.trigger(s)}},this.options.popup),a.popup=new v(a.element,o),a.popup.overlay.on("move",function(e){e.target==a.popup.overlay[0]&&e.preventDefault()}),a.pane=new r.Pane(a.element,e.extend(this.options.pane,{$angular:this.options.$angular})),n.notify(a,r)},options:{name:"PopOver",popup:{},pane:{}},events:[a,s],open:function(e){this.popup.show(e),this.initialOpen?this.pane.view()._invokeNgController():(this.pane.navigateToInitial()||this.pane.navigate(""),this.popup.popup._position(),this.initialOpen=!0)},openFor:function(e){this.open(e),this.trigger(a,{target:this.popup.target()})},close:function(){this.popup.hide()},destroy:function(){h.fn.destroy.call(this),this.pane.destroy(),this.popup.destroy(),n.destroy(this.element)}});r.plugin(v),r.plugin(_)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.shim.min",["kendo.popup.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.mobile.ui,r=n.ui.Popup,o='<div class="km-shim"/>',a="hide",s=i.Widget,l=s.extend({init:function(t,i){var l=this,d=n.mobile.application,u=n.support.mobileOS,c=d?d.os.name:u?u.name:"ios",h="ios"===c||"wp"===c||!!d&&d.os.skin,p="blackberry"===c,f=i.align||(h?"bottom center":p?"center right":"center center"),m=i.position||(h?"bottom center":p?"center right":"center center"),g=i.effect||(h?"slideIn:up":p?"slideIn:left":"fade:in"),v=e(o).handler(l).hide();s.fn.init.call(l,t,i),l.shim=v,t=l.element,i=l.options,i.className&&l.shim.addClass(i.className),i.modal||l.shim.on("down","_hide"),(d?d.element:e(document.body)).append(v),l.popup=new r(l.element,{anchor:v,modal:!0,appendTo:v,origin:f,position:m,animation:{open:{effects:g,duration:i.duration},close:{duration:i.duration}},close:function(e){var t=!1;l._apiCall||(t=l.trigger(a)),t&&e.preventDefault(),l._apiCall=!1},deactivate:function(){v.hide()},open:function(){v.show()}}),n.notify(l)},events:[a],options:{name:"Shim",modal:!1,align:t,position:t,effect:t,duration:200},show:function(){this.popup.open()},hide:function(){this._apiCall=!0,this.popup.close()},destroy:function(){s.fn.destroy.call(this),this.shim.kendoDestroy(),this.popup.destroy(),this.shim.remove()},_hide:function(t){t&&e.contains(this.shim.children().children(".k-popup")[0],t.target)||this.popup.close()}});i.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mobile.actionsheet.min",["kendo.mobile.popover.min","kendo.mobile.shim.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.support,r=n.mobile.ui,o=r.Shim,a=r.Popup,s=r.Widget,l="open",d="close",u="command",c="li>a",h="actionsheetContext",p='<div class="km-actionsheet-wrapper" />',f=n.template('<li class="km-actionsheet-cancel"><a href="\\#">#:cancel#</a></li>'),m=s.extend({init:function(t,l){var d,u,h,m=this,g=i.mobileOS;s.fn.init.call(m,t,l),l=m.options,h=l.type,t=m.element,u="auto"===h?g&&g.tablet:"tablet"===h,d=u?a:o,l.cancelTemplate&&(f=n.template(l.cancelTemplate)),t.addClass("km-actionsheet").append(f({cancel:m.options.cancel})).wrap(p).on("up",c,"_click").on("click",c,n.preventDefault),m.view().bind("destroy",function(){m.destroy()}),m.wrapper=t.parent().addClass(h?" km-actionsheet-"+h:""),m.shim=new d(m.wrapper,e.extend({modal:g.ios&&g.majorVersion<7,className:"km-actionsheet-root"},m.options.popup)),m._closeProxy=e.proxy(m,"_close"),m._shimHideProxy=e.proxy(m,"_shimHide"),m.shim.bind("hide",m._shimHideProxy),u&&n.onResize(m._closeProxy),n.notify(m,r)},events:[l,d,u],options:{name:"ActionSheet",cancel:"Cancel",type:"auto",popup:{height:"auto"}},open:function(t,n){var i=this;i.target=e(t),i.context=n,i.shim.show(t)},close:function(){this.context=this.target=null,this.shim.hide()},openFor:function(e){var t=this,n=e.data(h);t.open(e,n),t.trigger(l,{target:e,context:n})},destroy:function(){s.fn.destroy.call(this),n.unbindResize(this._closeProxy),this.shim.destroy()},_click:function(t){var i,r,o,a;t.isDefaultPrevented()||(i=e(t.currentTarget),r=i.data("action"),r&&(o={target:this.target,context:this.context},a=this.options.$angular,a?this.element.injector().get("$parse")(r)(a[0])(o):n.getter(r)(window)(o)),this.trigger(u,{target:this.target,context:this.context,currentTarget:i}),t.preventDefault(),this._close())},_shimHide:function(e){this.trigger(d)?e.preventDefault():this.context=this.target=null},_close:function(e){this.trigger(d)?e.preventDefault():this.close()}});r.plugin(m)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.progressbar.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui,r=i.Widget,o="horizontal",a="vertical",s=0,l=100,d=0,u=5,c="k-progressbar",h="k-progressbar-reverse",p="k-progressbar-indeterminate",f="k-complete",m="k-state-selected",g="k-progress-status",v="k-state-selected",_="k-state-default",b="k-state-disabled",k={VALUE:"value",PERCENT:"percent",CHUNK:"chunk"},w="change",y="complete",x="boolean",C=Math,T=e.extend,S=e.proxy,D=100,F=400,E=3,A={progressStatus:"<span class='k-progress-status-wrap'><span class='k-progress-status'></span></span>"},I=r.extend({init:function(e,t){var n=this;r.fn.init.call(this,e,t),t=n.options,n._progressProperty=t.orientation===o?"width":"height",n._fields(),t.value=n._validateValue(t.value),n._validateType(t.type),n._wrapper(),n._progressAnimation(),t.value!==t.min&&t.value!==!1&&n._updateProgress()},setOptions:function(e){var t=this;r.fn.setOptions.call(t,e),e.hasOwnProperty("reverse")&&t.wrapper.toggleClass("k-progressbar-reverse",e.reverse),e.hasOwnProperty("enable")&&t.enable(e.enable),t._progressAnimation(),t._validateValue(),t._updateProgress()},events:[w,y],options:{name:"ProgressBar",orientation:o,reverse:!1,min:s,max:l,value:d,enable:!0,type:k.VALUE,chunkCount:u,showStatus:!0,animation:{}},_fields:function(){var t=this;t._isStarted=!1,t.progressWrapper=t.progressStatus=e()},_validateType:function(t){var i=!1;if(e.each(k,function(e,n){if(n===t)return i=!0,!1}),!i)throw Error(n.format("Invalid ProgressBar type '{0}'",t))},_wrapper:function(){var e,t=this,n=t.wrapper=t.element,i=t.options,r=i.orientation;n.addClass("k-widget "+c),n.addClass(c+"-"+(r===o?o:a)),i.enable===!1&&n.addClass(b),i.reverse&&n.addClass(h),i.value===!1&&n.addClass(p),i.type===k.CHUNK?t._addChunkProgressWrapper():i.showStatus&&(t.progressStatus=t.wrapper.prepend(A.progressStatus).find("."+g),e=i.value!==!1?i.value:i.min,t.progressStatus.text(i.type===k.VALUE?e:t._calculatePercentage(e).toFixed()+"%"))},value:function(e){return this._value(e)},_value:function(e){var n,i=this,r=i.options;return e===t?r.value:(typeof e!==x?(e=i._roundValue(e),isNaN(e)||(n=i._validateValue(e),n!==r.value&&(i.wrapper.removeClass(p),r.value=n,i._isStarted=!0,i._updateProgress()))):e||(i.wrapper.addClass(p),r.value=!1),t)},_roundValue:function(e){e=parseFloat(e);var t=C.pow(10,E);return C.floor(e*t)/t},_validateValue:function(e){var t=this,n=t.options;if(e!==!1){if(e<=n.min||e===!0)return n.min;if(e>=n.max)return n.max}else if(e===!1)return!1;return isNaN(t._roundValue(e))?n.min:e},_updateProgress:function(){var e=this,t=e.options,n=e._calculatePercentage();t.type===k.CHUNK?(e._updateChunks(n),e._onProgressUpdateAlways(t.value)):e._updateProgressWrapper(n)},_updateChunks:function(e){var t,n=this,i=n.options,r=i.chunkCount,s=parseInt(D/r*100,10)/100,l=parseInt(100*e,10)/100,d=C.floor(l/s);t=n.wrapper.find(i.orientation===o&&!i.reverse||i.orientation===a&&i.reverse?"li.k-item:lt("+d+")":"li.k-item:gt(-"+(d+1)+")"),n.wrapper.find("."+v).removeClass(v).addClass(_),t.removeClass(_).addClass(v)},_updateProgressWrapper:function(e){var t=this,n=t.options,i=t.wrapper.find("."+m),r=t._isStarted?t._animation.duration:0,o={};0===i.length&&t._addRegularProgressWrapper(),o[t._progressProperty]=e+"%",t.progressWrapper.animate(o,{duration:r,start:S(t._onProgressAnimateStart,t),progress:S(t._onProgressAnimate,t),complete:S(t._onProgressAnimateComplete,t,n.value),always:S(t._onProgressUpdateAlways,t,n.value)})},_onProgressAnimateStart:function(){this.progressWrapper.show()},_onProgressAnimate:function(e){var t,n=this,i=n.options,r=parseFloat(e.elem.style[n._progressProperty],10);i.showStatus&&(t=1e4/parseFloat(n.progressWrapper[0].style[n._progressProperty]),n.progressWrapper.find(".k-progress-status-wrap").css(n._progressProperty,t+"%")),i.type!==k.CHUNK&&r<=98&&n.progressWrapper.removeClass(f)},_onProgressAnimateComplete:function(e){var t,n=this,i=n.options,r=parseFloat(n.progressWrapper[0].style[n._progressProperty]);i.type!==k.CHUNK&&r>98&&n.progressWrapper.addClass(f),i.showStatus&&(t=i.type===k.VALUE?e:i.type==k.PERCENT?n._calculatePercentage(e).toFixed()+"%":C.floor(n._calculatePercentage(e))+"%",n.progressStatus.text(t)),e===i.min&&n.progressWrapper.hide()},_onProgressUpdateAlways:function(e){var t=this,n=t.options;t._isStarted&&t.trigger(w,{value:e}),e===n.max&&t._isStarted&&t.trigger(y,{value:n.max})},enable:function(e){var n=this,i=n.options;i.enable=t===e||e,n.wrapper.toggleClass(b,!i.enable)},destroy:function(){var e=this;r.fn.destroy.call(e)},_addChunkProgressWrapper:function(){var e,t=this,n=t.options,i=t.wrapper,r=D/n.chunkCount,o="";for(n.chunkCount<=1&&(n.chunkCount=1),o+="<ul class='k-reset'>",e=n.chunkCount-1;e>=0;e--)o+="<li class='k-item k-state-default'></li>";o+="</ul>",i.append(o).find(".k-item").css(t._progressProperty,r+"%").first().addClass("k-first").end().last().addClass("k-last"),t._normalizeChunkSize()},_normalizeChunkSize:function(){var e=this,t=e.options,n=e.wrapper.find(".k-item:last"),i=parseFloat(n[0].style[e._progressProperty]),r=D-t.chunkCount*i;r>0&&n.css(e._progressProperty,i+r+"%")},_addRegularProgressWrapper:function(){var t=this;t.progressWrapper=e("<div class='"+m+"'></div>").appendTo(t.wrapper),t.options.showStatus&&(t.progressWrapper.append(A.progressStatus),t.progressStatus=t.wrapper.find("."+g))},_calculateChunkSize:function(){var e=this,t=e.options.chunkCount,n=e.wrapper.find("ul.k-reset");return(parseInt(n.css(e._progressProperty),10)-(t-1))/t},_calculatePercentage:function(e){var n=this,i=n.options,r=e!==t?e:i.value,o=i.min,a=i.max;return n._onePercent=C.abs((a-o)/100),C.abs((r-o)/n._onePercent)},_progressAnimation:function(){var e=this,t=e.options,n=t.animation;e._animation=n===!1?{duration:0}:T({duration:F},t.animation)}});n.ui.plugin(I)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdf/pako.min",["kendo.core.min"],e)}(function(){return function(){kendo.pdf=kendo.pdf||{},kendo.pdf.supportsDeflate=function(){return window.pako&&"function"==typeof window.pako.deflate},kendo.pdf.deflate=function(e){return window.pako.deflate(e)}}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdf/core.min",["pdf/pako.min","kendo.core.min","kendo.color.min","kendo.drawing.min"],e)}(function(){return function(e){function t(e){function t(){return T>=S}function n(){return T<S?e[T++]:0}function i(t){k(T),e[T++]=255&t,T>S&&(S=T)}function r(){return n()<<8|n()}function o(e){i(e>>8),i(e)}function a(){var e=r();return e>=32768?e-65536:e}function s(e){o(e<0?e+65536:e)}function l(){return 65536*r()+r()}function d(e){o(e>>>16&65535),o(65535&e)}function u(){var e=l();return e>=2147483648?e-4294967296:e}function c(e){d(e<0?e+4294967296:e)}function h(){return l()/65536}function p(e){d(Math.round(65536*e))}function f(){return u()/65536}function m(e){c(Math.round(65536*e))}function g(e){return b(e,n)}function v(e){return String.fromCharCode.apply(String,g(e))}function _(e){for(var t=0;t<e.length;++t)i(e.charCodeAt(t))}function b(e,t){for(var n=Array(e),i=0;i<e;++i)n[i]=t();return n}var k,w,y,x,C,T=0,S=0;return null==e?e=Se?new Uint8Array(256):[]:S=e.length,k=Se?function(t){if(t>=e.length){var n=new Uint8Array(Math.max(t+256,2*e.length));n.set(e,0),e=n}}:function(){},w=Se?function(){return new Uint8Array(e.buffer,0,S)}:function(){return e},y=Se?function(t){if("string"==typeof t)return _(t);var n=t.length;k(T+n),e.set(t,T),T+=n,T>S&&(S=T)}:function(e){if("string"==typeof e)return _(e);for(var t=0;t<e.length;++t)i(e[t])},x=Se?function(t,n){if(e.buffer.slice)return new Uint8Array(e.buffer.slice(t,t+n));var i=new Uint8Array(n);return i.set(new Uint8Array(e.buffer,t,n)),i}:function(t,n){return e.slice(t,t+n)},C={eof:t,readByte:n,writeByte:i,readShort:r,writeShort:o,readLong:l,writeLong:d,readFixed:h,writeFixed:p,readShort_:a,writeShort_:s,readLong_:u,writeLong_:c,readFixed_:f,writeFixed_:m,read:g,write:y,readString:v,writeString:_,times:b,get:w,slice:x,offset:function(e){return null!=e?(T=e,C):T},skip:function(e){T+=e},toString:function(){throw Error("FIX CALLER. BinaryStream is no longer convertible to string!")},length:function(){return S},saveExcursion:function(e){var t=T;try{return e()}finally{T=t}},writeBase64:function(e){window.atob?_(window.atob(e)):y(De.decode(e))},base64:function(){return De.encode(w())}}}function n(e){for(var t,n,i=[],r=0,o=e.length;r<o;)t=e.charCodeAt(r++),t>=55296&&t<=56319&&r<o?(n=e.charCodeAt(r++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),r--)):i.push(t);return i}function i(e){return e.map(function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e)}).join("")}function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function o(e){return Object.keys(e).sort(function(e,t){return e-t}).map(parseFloat)}function a(e){var t,n,i;for(this.raw=e,this.scalerType=e.readLong(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),t=this.tables={},n=0;n<this.tableCount;++n)i={tag:e.readString(4),checksum:e.readLong(),offset:e.readLong(),length:e.readLong()},t[i.tag]=i}function s(e){function t(e,t){this.definition=t,this.length=t.length,this.offset=t.offset,this.file=e,this.rawData=e.raw,this.parse(e.raw)}t.prototype.raw=function(){return this.rawData.slice(this.offset,this.length)};for(var n in e)r(e,n)&&(t[n]=t.prototype[n]=e[n]);return t}function l(){var e,t="",n=Pe+"";for(e=0;e<n.length;++e)t+=String.fromCharCode(n.charCodeAt(e)-48+65);return++Pe,t}function d(e){this.font=e,this.subset={},this.unicodes={},this.ogid2ngid={0:0},this.ngid2ogid={0:0},this.ncid2ogid={},this.next=this.firstChar=1,this.nextGid=1,this.psName=l()+"+"+this.font.psName}function u(e,n){var i,r,o,a,s=this,l=s.contents=t(e);if("ttcf"==l.readString(4)){if(r=function(){l.offset(i),s.parse()},!n)throw Error("Must specify a name for TTC files");for(l.readLong(),o=l.readLong(),a=0;a<o;++a)if(i=l.readLong(),l.saveExcursion(r),s.psName==n)return;throw Error("Font "+n+" not found in collection")}l.offset(0),s.parse()}function c(){function e(){var t,n,r,o=arguments;for(t=0;t<arguments.length;++t){if(n=o[t],void 0===n)throw Error("Cannot output undefined to PDF");if(n instanceof A)n.beforeRender(e),n.render(e);else if(Ke(n))C(n,e);else if(x(n))T(n,e);else if("number"==typeof n){if(isNaN(n))throw Error("Cannot output NaN to PDF");r=n.toFixed(7),r.indexOf(".")>=0&&(r=r.replace(/\.?0+$/,"")),"-0"==r&&(r="0"),i.writeString(r)}else/string|boolean/.test(typeof n)?i.writeString(n+""):"function"==typeof n.get?i.write(n.get()):"object"==typeof n&&(n?e(new Ze(n)):i.writeString("null"))}}var n=0,i=t();return e.writeData=function(e){i.write(e)},e.withIndent=function(t){++n,t(e),--n},e.indent=function(){e(Ve,k("",2*n," ")),e.apply(null,arguments)},e.offset=function(){return i.offset()},e.toString=function(){throw Error("FIX CALLER")},e.get=function(){return i.get()},e.stream=function(){return i},e}function h(e,t){var n=e.beforeRender,i=e.render;e.beforeRender=function(){},e.render=function(e){e(t," 0 R")},e.renderFull=function(r){e._offset=r.offset(),r(t," 0 obj "),n.call(e,r),i.call(e,r),r(" endobj")}}function p(e){var t,n,i;if("function"!=typeof e&&(t=e,e=function(e,n){return e in t?t[e]:n}),n=e("paperSize",Ue.a4),!n)return{};if("string"==typeof n&&(n=Ue[n.toLowerCase()],null==n))throw Error("Unknown paper size");return n[0]=E(n[0]),n[1]=E(n[1]),e("landscape",!1)&&(n=[Math.max(n[0],n[1]),Math.min(n[0],n[1])]),i=e("margin"),i&&("string"==typeof i||"number"==typeof i?(i=E(i,0),i={left:i,top:i,right:i,bottom:i}):i={left:E(i.left,0),top:E(i.top,0),right:E(i.right,0),bottom:E(i.bottom,0)},e("addMargin")&&(n[0]+=i.left+i.right,n[1]+=i.top+i.bottom)),{paperSize:n,margin:i}}function f(e){function t(t,n){return e&&null!=e[t]?e[t]:n}var n,i,r,o=this,a=c(),s=0,l=[];o.getOption=t,o.attach=function(e){return l.indexOf(e)<0&&(h(e,++s),l.push(e)),e},o.pages=[],o.FONTS={},o.IMAGES={},o.GRAD_COL_FUNCTIONS={},o.GRAD_OPC_FUNCTIONS={},o.GRAD_COL={},o.GRAD_OPC={},n=o.attach(new tt),i=o.attach(new nt),n.setPages(i),r=o.attach(new Ze({Producer:new Ye(t("producer","Kendo UI PDF Generator")),Title:new Ye(t("title","")),Author:new Ye(t("author","")),Subject:new Ye(t("subject","")),Keywords:new Ye(t("keywords","")),Creator:new Ye(t("creator","Kendo UI PDF Generator")),CreationDate:t("date",new Date)})),o.addPage=function(e){var t,n,r,a=p(function(t,n){return e&&null!=e[t]?e[t]:n}),s=a.paperSize,l=a.margin,d=s[0],u=s[1];return l&&(d-=l.left+l.right,u-=l.top+l.bottom),t=new et(c(),null,(!0)),n={Contents:o.attach(t),Parent:i,MediaBox:[0,0,s[0],s[1]]},r=new st(o,n),r._content=t,i.addPage(o.attach(r)),r.transform(1,0,0,-1,0,s[1]),l&&(r.translate(l.left,l.top),r.rect(0,0,d,u),r.clip()),o.pages.push(r),r},o.render=function(){var e,t;for(a("%PDF-1.4",Ve,"%ÂÁÚÏÎ",Ve,Ve),e=0;e<l.length;++e)l[e].renderFull(a),a(Ve,Ve);for(t=a.offset(),a("xref",Ve,0," ",l.length+1,Ve),a("0000000000 65535 f ",Ve),e=0;e<l.length;++e)a(w(l[e]._offset,10)," 00000 n ",Ve);return a(Ve),a("trailer",Ve),a(new Ze({Size:l.length+1,Root:n,Info:r}),Ve,Ve),a("startxref",Ve,t,Ve),a("%%EOF",Ve),a.stream().offset(0)}}function m(e,t){function n(){window.console&&(window.console.error?window.console.error("Cannot load URL: %s",e):window.console.log("Cannot load URL: %s",e)),t(null)}var i=new XMLHttpRequest;i.open("GET",e,!0),Oe&&(i.responseType="arraybuffer"),i.onload=function(){200==i.status||304==i.status?t(Oe?new Uint8Array(i.response):new window.VBArray(i.responseBody).toArray()):n()},i.onerror=n,i.send(null)}function g(e,t){var n=qe[e];n?t(n):m(e,function(n){if(null==n)throw Error("Cannot load font from "+e);var i=new u(n);qe[e]=i,t(i)})}function v(){je={}}function _(e,n,i){function r(e){u.src=e,u.complete&&!Le.msie?a():(u.onload=a,u.onerror=o)}function o(){i(je[e]="TAINTED")}function a(){var r,a,d,c,h,p,f,m,g,v,_,b;if(n&&(n.width>=u.width||n.height>=u.height)&&(n=null),!n&&l&&/^image\/jpe?g$/i.test(l.type))return r=new FileReader,r.onload=function(){var n=new M(t(new Uint8Array(this.result)));URL.revokeObjectURL(s),i(je[e]=n)},void r.readAsArrayBuffer(l);n||(n={width:u.width,height:u.height}),a=document.createElement("canvas"),a.width=n.width,a.height=n.height,d=a.getContext("2d"),d.drawImage(u,0,0,n.width,n.height);try{c=d.getImageData(0,0,n.width,n.height)}catch(k){return void o()}finally{s&&URL.revokeObjectURL(s)}for(h=!1,p=t(),f=t(),m=c.data,g=0;g<m.length;)p.writeByte(m[g++]),p.writeByte(m[g++]),p.writeByte(m[g++]),v=m[g++],v<255&&(h=!0),f.writeByte(v);h?u=new z(n.width,n.height,p,f):(_=a.toDataURL("image/jpeg"),_=_.substr(_.indexOf(";base64,")+8),b=t(),b.writeBase64(_),u=new M(b)),i(je[e]=u)}var s,l,d,u=je[e];u?i(u):(u=new Image,/^data:/i.test(e)||(u.crossOrigin="Anonymous"),Oe&&!/^data:/i.test(e)?(d=new XMLHttpRequest,d.onload=function(){l=d.response,s=URL.createObjectURL(l),r(s)},d.onerror=o,d.open("GET",e,!0),d.responseType="blob",d.send()):r(e))}function b(e){return function(t,n){function i(){0===--r&&n()}var r=t.length,o=r;if(0===r)return n();for(;o-- >0;)e(t[o],i)}}function k(e,t,n){for(;e.length<t;)e=n+e;return e}function w(e,t){return k(e+"",t,"0")}function y(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function x(e){return e instanceof Date}function C(e,t){t("["),e.length>0&&t.withIndent(function(){for(var n=0;n<e.length;++n)n>0&&n%8===0?t.indent(e[n]):t(" ",e[n])}),t(" ]")}function T(e,t){t("(D:",w(e.getUTCFullYear(),4),w(e.getUTCMonth()+1,2),w(e.getUTCDate(),2),w(e.getUTCHours(),2),w(e.getUTCMinutes(),2),w(e.getUTCSeconds(),2),"Z)")}function S(e){return e*(72/25.4)}function D(e){return S(10*e)}function F(e){return 72*e}function E(e,t){var n,i;if("number"==typeof e)return e;if("string"==typeof e&&(n=/^\s*([0-9.]+)\s*(mm|cm|in|pt)\s*$/.exec(e),n&&(i=parseFloat(n[1]),!isNaN(i))))return"pt"==n[2]?i:{mm:S,cm:D,"in":F}[n[2]](i);if(null!=t)return t;throw Error("Can't parse unit: "+e)}function A(){}function I(e,t,n){n||(n=A),e.prototype=new n;for(var i in t)y(t,i)&&(e.prototype[i]=t[i]);return e}function R(e){return y(Je,e)?Je[e]:Je[e]=new Xe(e)}function M(e){var t,n,i,r,o,a,s,l,d;if(e.offset(0),o=e.readShort(),65496!=o)throw Error("Invalid JPEG image");for(;!e.eof();){if(a=e.readByte(),255!=a)throw Error("Invalid JPEG image");if(s=e.readByte(),l=e.readShort(),it.indexOf(s)>=0){r=e.readByte(),n=e.readShort(),t=e.readShort(),i=e.readByte();break}e.skip(l-2)}if(null==i)throw Error("Invalid JPEG image");switch(d={Type:R("XObject"),Subtype:R("Image"),Width:t,Height:n,BitsPerComponent:r,Filter:R("DCTDecode")},i){case 1:d.ColorSpace=R("DeviceGray");break;case 3:d.ColorSpace=R("DeviceRGB");break;case 4:d.ColorSpace=R("DeviceCMYK"),d.Decode=[1,0,1,0,1,0,1,0]}this.asStream=function(){e.offset(0);var t=new et(e,d);return t._resourceName=R("I"+ ++We),t}}function z(e,t,n,i){this.asStream=function(r){var o=new et(i,{Type:R("XObject"),Subtype:R("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:R("DeviceGray")},(!0)),a=new et(n,{Type:R("XObject"),Subtype:R("Image"),Width:e,Height:t,BitsPerComponent:8,ColorSpace:R("DeviceRGB"),SMask:r.attach(o)},(!0));return a._resourceName=R("I"+ ++We),a}}function H(e){return e.map(function(e){return Ke(e)?H(e):"number"==typeof e?(Math.round(1e3*e)/1e3).toFixed(3):e}).join(" ")}function N(e,t,n,i,r,o,a){var s=H([t,n,i,r,o,a]),l=e.GRAD_COL_FUNCTIONS[s];return l||(l=e.GRAD_COL_FUNCTIONS[s]=e.attach(new Ze({FunctionType:2,Domain:[0,1],Range:[0,1,0,1,0,1],N:1,C0:[t,n,i],C1:[r,o,a]}))),l}function B(e,t,n){var i=H([t,n]),r=e.GRAD_OPC_FUNCTIONS[i];return r||(r=e.GRAD_OPC_FUNCTIONS[i]=e.attach(new Ze({FunctionType:2,Domain:[0,1],Range:[0,1],N:1,C0:[t],C1:[n]}))),r}function P(e,t){function n(e){return 1==e.length?e[0]:{FunctionType:3,Functions:e,Domain:[0,1],Bounds:c,Encode:h}}var i,r,o,a,s,l=!1,d=[],u=[],c=[],h=[];for(i=1;i<t.length;++i)r=t[i-1],o=t[i],a=r.color,s=o.color,u.push(N(e,a.r,a.g,a.b,s.r,s.g,s.b)),(a.a<1||s.a<1)&&(l=!0),c.push(o.offset),h.push(0,1);if(l)for(i=1;i<t.length;++i)r=t[i-1],o=t[i],a=r.color,s=o.color,d.push(B(e,a.a,s.a));return c.pop(),{hasAlpha:l,colors:n(u),opacities:l?n(d):null}}function L(e,t,n,i,r,o){var a,s,l;return o||(l=[t].concat(i),n.forEach(function(e){l.push(e.offset,e.color.r,e.color.g,e.color.b)}),s=H(l),a=e.GRAD_COL[s]),a||(a=new Ze({Type:R("Shading"),ShadingType:t?3:2,ColorSpace:R("DeviceRGB"),Coords:i,Domain:[0,1],Function:r,Extend:[!0,!0]}),e.attach(a),a._resourceName="S"+ ++We,s&&(e.GRAD_COL[s]=a)),a}function O(e,t,n,i,r,o){var a,s,l;return o||(l=[t].concat(i),n.forEach(function(e){l.push(e.offset,e.color.a)}),s=H(l),a=e.GRAD_OPC[s]),a||(a=new Ze({Type:R("ExtGState"),AIS:!1,CA:1,ca:1,SMask:{Type:R("Mask"),S:R("Luminosity"),G:e.attach(new et("/a0 gs /s0 sh",{Type:R("XObject"),Subtype:R("Form"),FormType:1,BBox:o?[o.left,o.top+o.height,o.left+o.width,o.top]:[0,1,1,0],Group:{Type:R("Group"),S:R("Transparency"),CS:R("DeviceGray"),I:!0},Resources:{ExtGState:{a0:{CA:1,ca:1}},Shading:{s0:{ColorSpace:R("DeviceGray"),Coords:i,Domain:[0,1],ShadingType:t?3:2,Function:r,Extend:[!0,!0]}}}}))}}),e.attach(a),a._resourceName="O"+ ++We,s&&(e.GRAD_OPC[s]=a)),a}function V(e,t,n){var i="radial"==t.type,r=P(e,t.stops),o=i?[t.start.x,t.start.y,t.start.r,t.end.x,t.end.y,t.end.r]:[t.start.x,t.start.y,t.end.x,t.end.y],a=L(e,i,t.stops,o,r.colors,t.userSpace&&n),s=r.hasAlpha?O(e,i,t.stops,o,r.opacities,t.userSpace&&n):null;return{hasAlpha:r.hasAlpha,shading:a,opacity:s}}function W(e){return e.replace(/^\s*(['"])(.*)\1\s*$/,"$2")}function U(e){var t,n=/^\s*((normal|italic)\s+)?((normal|small-caps)\s+)?((normal|bold|\d+)\s+)?(([0-9.]+)(px|pt))(\/(([0-9.]+)(px|pt)|normal))?\s+(.*?)\s*$/i,i=n.exec(e);return i?(t=i[8]?parseInt(i[8],10):12,{italic:i[2]&&"italic"==i[2].toLowerCase(),variant:i[4],bold:i[6]&&/bold|700/i.test(i[6]),fontSize:t,lineHeight:i[12]?"normal"==i[12]?t:parseInt(i[12],10):null,fontFamily:i[14].split(/\s*,\s*/g).map(W)}):{fontSize:12,fontFamily:"sans-serif"}}function q(e){function t(t){return e.bold&&(t+="|bold"),e.italic&&(t+="|italic"),t.toLowerCase()}var n,i,r,o=e.fontFamily;if(o instanceof Array)for(r=0;r<o.length&&(n=t(o[r]),!(i=lt[n]));++r);else i=lt[o.toLowerCase()];for(;"function"==typeof i;)i=i();return i||(i="Times-Roman"),i}function j(e,t){e=e.toLowerCase(),lt[e]=function(){return lt[t]},lt[e+"|bold"]=function(){return lt[t+"|bold"]},lt[e+"|italic"]=function(){return lt[t+"|italic"]},lt[e+"|bold|italic"]=function(){return lt[t+"|bold|italic"]}}function G(e,t){if(1==arguments.length)for(var n in e)y(e,n)&&G(n,e[n]);else switch(e=e.toLowerCase(),lt[e]=t,e){case"dejavu sans":lt["sans-serif"]=t;break;case"dejavu sans|bold":lt["sans-serif|bold"]=t;break;case"dejavu sans|italic":lt["sans-serif|italic"]=t;break;case"dejavu sans|bold|italic":lt["sans-serif|bold|italic"]=t;break;case"dejavu serif":lt.serif=t;break;case"dejavu serif|bold":lt["serif|bold"]=t;break;case"dejavu serif|italic":lt["serif|italic"]=t;break;case"dejavu serif|bold|italic":lt["serif|bold|italic"]=t;break;case"dejavu mono":lt.monospace=t;break;case"dejavu mono|bold":lt["monospace|bold"]=t;break;case"dejavu mono|italic":lt["monospace|italic"]=t;break;case"dejavu mono|bold|italic":lt["monospace|bold|italic"]=t}}function $(e,t){var n=e[0],i=e[1],r=e[2],o=e[3],a=e[4],s=e[5],l=t[0],d=t[1],u=t[2],c=t[3],h=t[4],p=t[5];return[n*l+i*u,n*d+i*c,r*l+o*u,r*d+o*c,a*l+s*u+h,a*d+s*c+p]}function K(e){return 1===e[0]&&0===e[1]&&0===e[2]&&1===e[3]&&0===e[4]&&0===e[5]}function Y(e,t){function n(e,t,n){return n||(n=s),n.pdf&&null!=n.pdf[e]?n.pdf[e]:t}function i(){function i(e){var t,i,r,a,s,l=e.options,d=_e(e),u=d.bbox;e=d.root,t=n("paperSize",n("paperSize","auto"),l),i=!1,"auto"==t&&(u?(r=u.getSize(),t=[r.width,r.height],i=!0,a=u.getOrigin(),d=new xe.Group,d.transform(new Te.Matrix(1,0,0,1,(-a.x),(-a.y))),d.append(e),e=d):t="A4"),s=o.addPage({paperSize:t,margin:n("margin",n("margin"),l),addMargin:i,landscape:n("landscape",n("landscape",!1),l)}),ee(e,s,o)}if(!(--r>0)){var o=new f({producer:n("producer"),title:n("title"),author:n("author"),subject:n("subject"),keywords:n("keywords"),creator:n("creator"),date:n("date")});l?e.children.forEach(i):i(e),t(o.render(),o)}}var r,o=[],a={},s=e.options,l=n("multiPage"),d=n("imgDPI");d&&v(),e.traverse(function(e){Z({Image:function(e){var t,n,i=e.src();d?(t=e.bbox().size,n=a[i],t={width:Math.ceil(t.width*d/72),height:Math.ceil(t.height*d/72)},n&&(t.width=Math.max(n.width,t.width),t.height=Math.max(n.height,t.height)),a[i]=t):a[i]=null},Text:function(e){var t=U(e.options.font),n=q(t);o.indexOf(n)<0&&o.push(n)}},e)}),r=2,Ge(o,i),$e(a,i)}function Q(e,t){Y(e,function(e){t("data:application/pdf;base64,"+e.base64())})}function X(e,t){Y(e,function(e){t(new window.Blob([e.get()],{type:"application/pdf"}))})}function J(t,n,i,r){window.Blob&&!we.safari?X(t,function(t){e.saveAs({dataURI:t,fileName:n}),r&&r(t)}):Q(t,function(t){e.saveAs({dataURI:t,fileName:n,proxyURL:i}),r&&r(t)})}function Z(e,t){var n=e[t.nodeType];return n?n.call.apply(n,arguments):t}function ee(e,t,n){var i,r,o;e.options._pdfDebug&&t.comment("BEGIN: "+e.options._pdfDebug),i=e.transform(),r=e.opacity(),t.save(),null!=r&&r<1&&t.setOpacity(r),te(e,t,n),ne(e,t,n),i&&(o=i.matrix(),t.transform(o.a,o.b,o.c,o.d,o.e,o.f)),ie(e,t,n),Z({Path:de,MultiPath:ue,Circle:ce,Arc:he,Text:pe,Image:me,Group:fe,Rect:ge},e,t,n),t.restore(),e.options._pdfDebug&&t.comment("END: "+e.options._pdfDebug)}function te(e,t){var n,i,r,o,a,s,l=e.stroke&&e.stroke();if(l){if(n=l.color){if(n=ve(n),null==n)return;t.setStrokeColor(n.r,n.g,n.b),1!=n.a&&t.setStrokeOpacity(n.a)}if(i=l.width,null!=i){if(0===i)return;t.setLineWidth(i)}r=l.dashType,r&&t.setDashPattern(ct[r],0),o=l.lineCap,o&&t.setLineCap(ht[o]),a=l.lineJoin,a&&t.setLineJoin(pt[a]),s=l.opacity,null!=s&&t.setStrokeOpacity(s)}}function ne(e,t){var n,i,r=e.fill&&e.fill();if(r&&!(r instanceof xe.Gradient)){if(n=r.color){if(n=ve(n),null==n)return;t.setFillColor(n.r,n.g,n.b),1!=n.a&&t.setFillOpacity(n.a)}i=r.opacity,null!=i&&t.setFillOpacity(i)}}function ie(e,t,n){var i=e.clip();i&&(le(i,t,n),t.clip())}function re(e){return e&&(e instanceof xe.Gradient||e.color&&!/^(none|transparent)$/i.test(e.color)&&(null==e.width||e.width>0)&&(null==e.opacity||e.opacity>0))}function oe(e,t,n,i){var r,o,a,s,l,d,u,c,h=e.fill();if(h instanceof xe.Gradient)return i?t.clipStroke():t.clip(),r=h instanceof xe.RadialGradient,r?(o={x:h.center().x,y:h.center().y,r:0},a={x:h.center().x,y:h.center().y,r:h.radius()}):(o={x:h.start().x,y:h.start().y},a={x:h.end().x,y:h.end().y}),s=h.stops.elements().map(function(e){var t,n=e.offset();return n=/%$/.test(n)?parseFloat(n)/100:parseFloat(n),t=ve(e.color()),t.a*=e.opacity(),{offset:n,color:t}}),s.unshift(s[0]),s.push(s[s.length-1]),l={userSpace:h.userSpace(),type:r?"radial":"linear",start:o,end:a,stops:s},d=e.rawBBox(),u=d.topLeft(),c=d.getSize(),d={left:u.x,top:u.y,width:c.width,height:c.height},t.gradient(l,d),!0}function ae(e,t,n){re(e.fill())&&re(e.stroke())?oe(e,t,n,!0)||t.fillStroke():re(e.fill())?oe(e,t,n,!1)||t.fill():re(e.stroke())?t.stroke():t.nop()}function se(e,t){var n,i,r,o=e.segments;if(4==o.length&&e.options.closed){for(n=[],i=0;i<o.length;++i){if(o[i].controlIn())return!1;n[i]=o[i].anchor()}if(r=n[0].y==n[1].y&&n[1].x==n[2].x&&n[2].y==n[3].y&&n[3].x==n[0].x||n[0].x==n[1].x&&n[1].y==n[2].y&&n[2].x==n[3].x&&n[3].y==n[0].y)return t.rect(n[0].x,n[0].y,n[2].x-n[0].x,n[2].y-n[0].y),!0}}function le(e,t,n){var i,r,o,a,s,l,d=e.segments;if(0!==d.length&&!se(e,t,n)){for(r=0;r<d.length;++r)o=d[r],a=o.anchor(),i?(s=i.controlOut(),l=o.controlIn(),s&&l?t.bezier(s.x,s.y,l.x,l.y,a.x,a.y):t.lineTo(a.x,a.y)):t.moveTo(a.x,a.y),i=o;e.options.closed&&t.close()}}function de(e,t,n){le(e,t,n),ae(e,t,n)}function ue(e,t,n){var i,r=e.paths;for(i=0;i<r.length;++i)le(r[i],t,n);ae(e,t,n)}function ce(e,t,n){var i=e.geometry();t.circle(i.center.x,i.center.y,i.radius),ae(e,t,n)}function he(e,t,n){var i,r=e.geometry().curvePoints();for(t.moveTo(r[0].x,r[0].y),i=1;i<r.length;)t.bezier(r[i].x,r[i++].y,r[i].x,r[i++].y,r[i].x,r[i++].y);ae(e,t,n)}function pe(e,t){var n,i=U(e.options.font),r=e._position;e.fill()&&e.stroke()?n=ut.fillAndStroke:e.fill()?n=ut.fill:e.stroke()&&(n=ut.stroke),t.transform(1,0,0,-1,r.x,r.y+i.fontSize),t.beginText(),t.setFont(q(i),i.fontSize),t.setTextRenderingMode(n),t.showText(e.content(),e._pdfRect?e._pdfRect.width():null),t.endText()}function fe(e,t,n){var i,r;for(e._pdfLink&&t.addLink(e._pdfLink.url,e._pdfLink),i=e.children,r=0;r<i.length;++r)ee(i[r],t,n)}function me(e,t){var n,i,r,o=e.src();o&&(n=e.rect(),i=n.getOrigin(),r=n.getSize(),t.transform(r.width,0,0,-r.height,i.x,i.y+r.height),t.drawImage(o))}function ge(e,t,n){var i=e.geometry();t.rect(i.origin.x,i.origin.y,i.size.width,i.size.height),ae(e,t,n)}function ve(t){var n=e.parseColor(t,!0);return n?n.toRGB():null}function _e(e){function t(e){return s=!0,e}function n(e){
return e.visible()&&e.opacity()>0&&(re(e.fill())||re(e.stroke()))}function i(e){var t,n,i=[];for(t=0;t<e.length;++t)n=a(e[t]),null!=n&&i.push(n);return i}function r(e,t){var n,i=l,r=d;e.transform()&&(d=d.multiplyCopy(e.transform().matrix())),n=e.clip(),n&&(n=n.bbox(),n&&(n=n.bbox(d),l=l?Te.Rect.intersect(l,n):n));try{return t()}finally{l=i,d=r}}function o(e){if(null==l)return!1;var t=e.rawBBox().bbox(d);return l&&t&&(t=Te.Rect.intersect(t,l)),t}function a(a){return r(a,function(){if(!(a instanceof xe.Group||a instanceof xe.MultiPath)){var r=o(a);if(!r)return t(null);u=u?Te.Rect.union(u,r):r}return Z({Path:function(e){return 0!==e.segments.length&&n(e)?e:t(null)},MultiPath:function(e){if(!n(e))return t(null);var r=new xe.MultiPath(e.options);return r.paths=i(e.paths),0===r.paths.length?t(null):r},Circle:function(e){return n(e)?e:t(null)},Arc:function(e){return n(e)?e:t(null)},Text:function(e){return/\S/.test(e.content())&&n(e)?e:t(null)},Image:function(e){return e.visible()&&e.opacity()>0?e:t(null)},Group:function(n){var r=new xe.Group(n.options);return r.children=i(n.children),r._pdfLink=n._pdfLink,n===e||0!==r.children.length||n._pdfLink?r:t(null)},Rect:function(e){return n(e)?e:t(null)}},a)})}var s,l=!1,d=Te.Matrix.unit(),u=null;do s=!1,e=a(e);while(e&&s);return{root:e,bbox:u}}function be(e,t){var n,i=Ce.createPromise();for(n in t)"margin"==n&&e.options.pdf&&e.options.pdf._ignoreMargin||e.options.set("pdf."+n,t[n]);return Q(e,i.resolve),i}var ke,we,ye,xe,Ce,Te,Se,De,Fe,Ee,Ae,Ie,Re,Me,ze,He,Ne,Be,Pe,Le,Oe,Ve,We,Ue,qe,je,Ge,$e,Ke,Ye,Qe,Xe,Je,Ze,et,tt,nt,it,rt,ot,at,st,lt,dt,ut,ct,ht,pt;window.kendo.pdf=window.kendo.pdf||{},ke=e.support,we=ke.browser,ye=e.pdf,xe=e.drawing,Ce=xe.util,Te=e.geometry,Se="undefined"!=typeof Uint8Array,De=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return{decode:function(t){for(var n,i,r,o,a,s,l,d=t.replace(/[^A-Za-z0-9\+\/\=]/g,""),u=0,c=d.length,h=[];u<c;)n=e.indexOf(d.charAt(u++)),i=e.indexOf(d.charAt(u++)),r=e.indexOf(d.charAt(u++)),o=e.indexOf(d.charAt(u++)),a=n<<2|i>>>4,s=(15&i)<<4|r>>>2,l=(3&r)<<6|o,h.push(a),64!=r&&h.push(s),64!=o&&h.push(l);return h},encode:function(t){for(var n,i,r,o,a,s,l,d=0,u=t.length,c="";d<u;)n=t[d++],i=t[d++],r=t[d++],o=n>>>2,a=(3&n)<<4|i>>>4,s=(15&i)<<2|r>>>6,l=63&r,d-u==2?s=l=64:d-u==1&&(l=64),c+=e.charAt(o)+e.charAt(a)+e.charAt(s)+e.charAt(l);return c}}}(),a.prototype={readTable:function(e,t){var n=this.tables[e];if(!n)throw Error("Table "+e+" not found in directory");return this[e]=n.table=new t(this,n)},render:function(e){var n,i,o,a,s,l,d,u,c=this,h=Object.keys(e).length,p=Math.pow(2,Math.floor(Math.log(h)/Math.LN2)),f=16*p,m=Math.floor(Math.log(p)/Math.LN2),g=16*h-f,v=t();v.writeLong(this.scalerType),v.writeShort(h),v.writeShort(f),v.writeShort(m),v.writeShort(g),n=16*h,i=v.offset()+n,o=null,a=t();for(s in e)if(r(e,s))for(l=e[s],v.writeString(s),v.writeLong(c.checksum(l)),v.writeLong(i),v.writeLong(l.length),a.write(l),"head"==s&&(o=i),i+=l.length;i%4;)a.writeByte(0),i++;return v.write(a.get()),d=this.checksum(v.get()),u=2981146554-d,v.offset(o+8),v.writeLong(u),v.get()},checksum:function(e){e=t(e);for(var n=0;!e.eof();)n+=e.readLong();return 4294967295&n}},Fe=s({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.revision=e.readLong(),this.checkSumAdjustment=e.readLong(),this.magicNumber=e.readLong(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.read(8),this.modified=e.read(8),this.xMin=e.readShort_(),this.yMin=e.readShort_(),this.xMax=e.readShort_(),this.yMax=e.readShort_(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort_(),this.indexToLocFormat=e.readShort_(),this.glyphDataFormat=e.readShort_()},render:function(e){var n=t();return n.writeLong(this.version),n.writeLong(this.revision),n.writeLong(0),n.writeLong(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.write(this.created),n.write(this.modified),n.writeShort_(this.xMin),n.writeShort_(this.yMin),n.writeShort_(this.xMax),n.writeShort_(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort_(this.fontDirectionHint),n.writeShort_(e),n.writeShort_(this.glyphDataFormat),n.get()}}),Ee=s({parse:function(e){e.offset(this.offset);var t=this.file.head.indexToLocFormat;this.offsets=0===t?e.times(this.length/2,function(){return 2*e.readShort()}):e.times(this.length/4,e.readLong)},offsetOf:function(e){return this.offsets[e]},lengthOf:function(e){return this.offsets[e+1]-this.offsets[e]},render:function(e){var n,i=t(),r=e[e.length-1]>65535;for(n=0;n<e.length;++n)r?i.writeLong(e[n]):i.writeShort(e[n]/2);return{format:r?1:0,table:i.get()}}}),Ae=s({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort_(),this.minRightSideBearing=e.readShort_(),this.xMaxExtent=e.readShort_(),this.caretSlopeRise=e.readShort_(),this.caretSlopeRun=e.readShort_(),this.caretOffset=e.readShort_(),e.skip(8),this.metricDataFormat=e.readShort_(),this.numOfLongHorMetrics=e.readShort()},render:function(e){var n=t();return n.writeLong(this.version),n.writeShort_(this.ascent),n.writeShort_(this.descent),n.writeShort_(this.lineGap),n.writeShort(this.advanceWidthMax),n.writeShort_(this.minLeftSideBearing),n.writeShort_(this.minRightSideBearing),n.writeShort_(this.xMaxExtent),n.writeShort_(this.caretSlopeRise),n.writeShort_(this.caretSlopeRun),n.writeShort_(this.caretOffset),n.write([0,0,0,0,0,0,0,0]),n.writeShort_(this.metricDataFormat),n.writeShort(e.length),n.get()}}),Ie=s({parse:function(e){e.offset(this.offset),this.version=e.readLong(),this.numGlyphs=e.readShort(),this.maxPoints=e.readShort(),this.maxContours=e.readShort(),this.maxComponentPoints=e.readShort(),this.maxComponentContours=e.readShort(),this.maxZones=e.readShort(),this.maxTwilightPoints=e.readShort(),this.maxStorage=e.readShort(),this.maxFunctionDefs=e.readShort(),this.maxInstructionDefs=e.readShort(),this.maxStackElements=e.readShort(),this.maxSizeOfInstructions=e.readShort(),this.maxComponentElements=e.readShort(),this.maxComponentDepth=e.readShort()},render:function(e){var n=t();return n.writeLong(this.version),n.writeShort(e.length),n.writeShort(this.maxPoints),n.writeShort(this.maxContours),n.writeShort(this.maxComponentPoints),n.writeShort(this.maxComponentContours),n.writeShort(this.maxZones),n.writeShort(this.maxTwilightPoints),n.writeShort(this.maxStorage),n.writeShort(this.maxFunctionDefs),n.writeShort(this.maxInstructionDefs),n.writeShort(this.maxStackElements),n.writeShort(this.maxSizeOfInstructions),n.writeShort(this.maxComponentElements),n.writeShort(this.maxComponentDepth),n.get()}}),Re=s({parse:function(e){var t,n,i;e.offset(this.offset),t=this.file,n=t.hhea,this.metrics=e.times(n.numOfLongHorMetrics,function(){return{advance:e.readShort(),lsb:e.readShort_()}}),i=t.maxp.numGlyphs-t.hhea.numOfLongHorMetrics,this.leftSideBearings=e.times(i,e.readShort_)},forGlyph:function(e){var t=this.metrics,n=t.length;return e<n?t[e]:{advance:t[n-1].advance,lsb:this.leftSideBearings[e-n]}},render:function(e){var n,i,r=this,o=t();for(n=0;n<e.length;++n)i=r.forGlyph(e[n]),o.writeShort(i.advance),o.writeShort_(i.lsb);return o.get()}}),Me=function(){function e(e){this.raw=e}function n(e){var t,n,r;for(this.raw=e,t=this.glyphIds=[],n=this.idOffsets=[];;){if(r=e.readShort(),n.push(e.offset()),t.push(e.readShort()),!(r&a))break;e.skip(r&i?4:2),r&d?e.skip(8):r&l?e.skip(4):r&o&&e.skip(2)}}var i,o,a,l,d;return e.prototype={compound:!1,render:function(){return this.raw.get()}},i=1,o=8,a=32,l=64,d=128,n.prototype={compound:!0,render:function(e){var n,i,r=this,o=t(this.raw.get());for(n=0;n<this.glyphIds.length;++n)i=r.glyphIds[n],o.offset(r.idOffsets[n]),o.writeShort(e[i]);return o.get()}},s({parse:function(){this.cache={}},glyphFor:function(i){var o,a,s,l,d,u,c,h,p,f,m,g=this.cache;return r(g,i)?g[i]:(o=this.file.loca,a=o.lengthOf(i),0===a?g[i]=null:(s=this.rawData,l=this.offset+o.offsetOf(i),d=t(s.slice(l,a)),u=d.readShort_(),c=d.readShort_(),h=d.readShort_(),p=d.readShort_(),f=d.readShort_(),m=g[i]=u==-1?new n(d):new e(d),m.numberOfContours=u,m.xMin=c,m.yMin=h,m.xMax=p,m.yMax=f,m))},render:function(e,n,i){var r,o,a,s=t(),l=[];for(r=0;r<n.length;++r)o=n[r],a=e[o],l.push(s.offset()),a&&s.write(a.render(i));return l.push(s.offset()),{table:s.get(),offsets:l}}})}(),ze=function(){function e(e,t){this.text=e,this.length=e.length,this.platformID=t.platformID,this.platformSpecificID=t.platformSpecificID,this.languageID=t.languageID,this.nameID=t.nameID}return s({parse:function(t){var n,i,r,o,a,s,l;for(t.offset(this.offset),t.readShort(),n=t.readShort(),i=this.offset+t.readShort(),r=t.times(n,function(){return{platformID:t.readShort(),platformSpecificID:t.readShort(),languageID:t.readShort(),nameID:t.readShort(),length:t.readShort(),offset:t.readShort()+i}}),o=this.strings={},a=0;a<r.length;++a)s=r[a],t.offset(s.offset),l=t.readString(s.length),o[s.nameID]||(o[s.nameID]=[]),o[s.nameID].push(new e(l,s));this.postscriptEntry=o[6][0],this.postscriptName=this.postscriptEntry.text.replace(/[^\x20-\x7F]/g,"")},render:function(n){var i,o,a,s,l,d,u=this,c=this.strings,h=0;for(i in c)r(c,i)&&(h+=c[i].length);o=t(),a=t(),o.writeShort(0),o.writeShort(h),o.writeShort(6+12*h);for(i in c)if(r(c,i))for(s=6==i?[new e(n,u.postscriptEntry)]:c[i],l=0;l<s.length;++l)d=s[l],o.writeShort(d.platformID),o.writeShort(d.platformSpecificID),o.writeShort(d.languageID),o.writeShort(d.nameID),o.writeShort(d.length),o.writeShort(a.offset()),a.writeString(d.text);return o.write(a.get()),o.get()}})}(),He=function(){var e=".notdef .null nonmarkingreturn space exclam quotedbl numbersign dollar percent ampersand quotesingle parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore grave a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde Adieresis Aring Ccedilla Eacute Ntilde Odieresis Udieresis aacute agrave acircumflex adieresis atilde aring ccedilla eacute egrave ecircumflex edieresis iacute igrave icircumflex idieresis ntilde oacute ograve ocircumflex odieresis otilde uacute ugrave ucircumflex udieresis dagger degree cent sterling section bullet paragraph germandbls registered copyright trademark acute dieresis notequal AE Oslash infinity plusminus lessequal greaterequal yen mu partialdiff summation product pi integral ordfeminine ordmasculine Omega ae oslash questiondown exclamdown logicalnot radical florin approxequal Delta guillemotleft guillemotright ellipsis nonbreakingspace Agrave Atilde Otilde OE oe endash emdash quotedblleft quotedblright quoteleft quoteright divide lozenge ydieresis Ydieresis fraction currency guilsinglleft guilsinglright fi fl daggerdbl periodcentered quotesinglbase quotedblbase perthousand Acircumflex Ecircumflex Aacute Edieresis Egrave Iacute Icircumflex Idieresis Igrave Oacute Ocircumflex apple Ograve Uacute Ucircumflex Ugrave dotlessi circumflex tilde macron breve dotaccent ring cedilla hungarumlaut ogonek caron Lslash lslash Scaron scaron Zcaron zcaron brokenbar Eth eth Yacute yacute Thorn thorn minus multiply onesuperior twosuperior threesuperior onehalf onequarter threequarters franc Gbreve gbreve Idotaccent Scedilla scedilla Cacute cacute Ccaron ccaron dcroat".split(/\s+/g);return s({parse:function(e){var t,n,i=this;switch(e.offset(this.offset),this.format=e.readLong(),this.italicAngle=e.readFixed_(),this.underlinePosition=e.readShort_(),this.underlineThickness=e.readShort_(),this.isFixedPitch=e.readLong(),this.minMemType42=e.readLong(),this.maxMemType42=e.readLong(),this.minMemType1=e.readLong(),this.maxMemType1=e.readLong(),this.format){case 65536:case 196608:break;case 131072:for(t=e.readShort(),this.glyphNameIndex=e.times(t,e.readShort),this.names=[],n=this.offset+this.length;e.offset()<n;)i.names.push(e.readString(e.readByte()));break;case 151552:t=e.readShort(),this.offsets=e.read(t);break;case 262144:this.map=e.times(this.file.maxp.numGlyphs,e.readShort)}},glyphFor:function(t){switch(this.format){case 65536:return e[t]||".notdef";case 131072:var n=this.glyphNameIndex[t];return n<e.length?e[n]:this.names[n-e.length]||".notdef";case 151552:case 196608:return".notdef";case 262144:return this.map[t]||65535}},render:function(n){var i,r,o,a,s,l,d,u=this;if(196608==this.format)return this.raw();for(i=t(this.rawData.slice(this.offset,32)),i.writeLong(131072),i.offset(32),r=[],o=[],a=0;a<n.length;++a)s=n[a],l=u.glyphFor(s),d=e.indexOf(l),d>=0?r.push(d):(r.push(e.length+o.length),o.push(l));for(i.writeShort(n.length),a=0;a<r.length;++a)i.writeShort(r[a]);for(a=0;a<o.length;++a)i.writeByte(o[a].length),i.writeString(o[a]);return i.get()}})}(),Ne=function(){function e(e,t,n){var i=this;i.platformID=e.readShort(),i.platformSpecificID=e.readShort(),i.offset=t+e.readLong(),e.saveExcursion(function(){var t,r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b;switch(e.offset(i.offset),i.format=e.readShort()){case 0:for(i.length=e.readShort(),i.language=e.readShort(),r=0;r<256;++r)n[r]=e.readByte();break;case 4:for(i.length=e.readShort(),i.language=e.readShort(),o=e.readShort()/2,e.skip(6),a=e.times(o,e.readShort),e.skip(2),s=e.times(o,e.readShort),l=e.times(o,e.readShort_),d=e.times(o,e.readShort),u=(i.length+i.offset-e.offset())/2,c=e.times(u,e.readShort),r=0;r<o;++r)for(h=s[r],p=a[r],t=h;t<=p;++t)0===d[r]?f=t+l[r]:(m=d[r]/2-(o-r)+(t-h),f=c[m]||0,0!==f&&(f+=l[r])),n[t]=65535&f;break;case 6:for(i.length=e.readShort(),i.language=e.readShort(),t=e.readShort(),g=e.readShort();g-- >0;)n[t++]=e.readShort();break;case 12:for(e.readShort(),i.length=e.readLong(),i.language=e.readLong(),v=e.readLong();v-- >0;)for(t=e.readLong(),_=e.readLong(),b=e.readLong();t<=_;)n[t++]=b++;break;default:window.console&&window.console.error("Unhandled CMAP format: "+i.format)}})}function n(e,n){function i(t){return n[e[t]]}var r,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y=o(e),x=[],C=[],T=null,S=null;for(r=0;r<y.length;++r)a=y[r],s=i(a),l=s-a,null!=T&&l===S||(T&&C.push(T),x.push(a),S=l),T=a;for(T&&C.push(T),C.push(65535),x.push(65535),d=x.length,u=2*d,c=2*Math.pow(2,Math.floor(Math.log(d)/Math.LN2)),h=Math.log(c/2)/Math.LN2,p=u-c,f=[],m=[],g=[],r=0;r<d;++r){if(v=x[r],_=C[r],65535==v){f.push(0),m.push(0);break}if(b=i(v),v-b>=32768)for(f.push(0),m.push(2*(g.length+d-r)),k=v;k<=_;++k)g.push(i(k));else f.push(b-v),m.push(0)}return w=t(),w.writeShort(3),w.writeShort(1),w.writeLong(12),w.writeShort(4),w.writeShort(16+8*d+2*g.length),w.writeShort(0),w.writeShort(u),w.writeShort(c),w.writeShort(h),w.writeShort(p),C.forEach(w.writeShort),w.writeShort(0),x.forEach(w.writeShort),f.forEach(w.writeShort_),m.forEach(w.writeShort),g.forEach(w.writeShort),w.get()}return s({parse:function(t){var n,i=this,r=i.offset;t.offset(r),i.codeMap={},i.version=t.readShort(),n=t.readShort(),i.tables=t.times(n,function(){return new e(t,r,i.codeMap)})},render:function(e,i){var r=t();return r.writeShort(0),r.writeShort(1),r.write(n(e,i)),r.get()}})}(),Be=s({parse:function(e){e.offset(this.offset),this.version=e.readShort(),this.averageCharWidth=e.readShort_(),this.weightClass=e.readShort(),this.widthClass=e.readShort(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort_(),this.ySubscriptYSize=e.readShort_(),this.ySubscriptXOffset=e.readShort_(),this.ySubscriptYOffset=e.readShort_(),this.ySuperscriptXSize=e.readShort_(),this.ySuperscriptYSize=e.readShort_(),this.ySuperscriptXOffset=e.readShort_(),this.ySuperscriptYOffset=e.readShort_(),this.yStrikeoutSize=e.readShort_(),this.yStrikeoutPosition=e.readShort_(),this.familyClass=e.readShort_(),this.panose=e.times(10,e.readByte),this.charRange=e.times(4,e.readLong),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort_(),this.descent=e.readShort_(),this.lineGap=e.readShort_(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=e.times(2,e.readLong),this.version>1&&(this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()))},render:function(){return this.raw()}}),Pe=1e5,d.prototype={use:function(e){var t,i,r,o=this;return"string"==typeof e?n(e).reduce(function(e,t){return e+String.fromCharCode(o.use(t))},""):(t=o.unicodes[e],t||(t=o.next++,o.subset[t]=e,o.unicodes[e]=t,i=o.font.cmap.codeMap[e],i&&(o.ncid2ogid[t]=i,null==o.ogid2ngid[i]&&(r=o.nextGid++,o.ogid2ngid[i]=r,o.ngid2ogid[r]=i))),t)},encodeText:function(e){return this.use(e)},glyphIds:function(){return o(this.ogid2ngid)},glyphsFor:function(e,t){var n,i,r,o=this;for(t||(t={}),n=0;n<e.length;++n)i=e[n],t[i]||(r=t[i]=o.font.glyf.glyphFor(i),r&&r.compound&&o.glyphsFor(r.glyphIds,t));return t},render:function(){var e,t,n,i,a,s,l,d,u=this,c=this.glyphsFor(this.glyphIds());for(e in c)r(c,e)&&(e=parseInt(e,10),null==u.ogid2ngid[e]&&(t=u.nextGid++,u.ogid2ngid[e]=t,u.ngid2ogid[t]=e));return n=o(this.ngid2ogid),i=n.map(function(e){return this.ngid2ogid[e]},this),a=this.font,s=a.glyf.render(c,i,this.ogid2ngid),l=a.loca.render(s.offsets),this.lastChar=this.next-1,d={cmap:Ne.render(this.ncid2ogid,this.ogid2ngid),glyf:s.table,loca:l.table,hmtx:a.hmtx.render(i),hhea:a.hhea.render(i),maxp:a.maxp.render(i),post:a.post.render(i),name:a.name.render(this.psName),head:a.head.render(l.format),"OS/2":a.os2.render()},this.font.directory.render(d)},cidToGidMap:function(){var e,n,i,r=this,o=t(),a=0;for(e=this.firstChar;e<this.next;++e){for(;a<e;)o.writeShort(0),a++;n=r.ncid2ogid[e],n?(i=r.ogid2ngid[n],o.writeShort(i)):o.writeShort(0),a++}return o.get()}},u.prototype={parse:function(){var e=this.directory=new a(this.contents);this.head=e.readTable("head",Fe),this.loca=e.readTable("loca",Ee),this.hhea=e.readTable("hhea",Ae),this.maxp=e.readTable("maxp",Ie),this.hmtx=e.readTable("hmtx",Re),this.glyf=e.readTable("glyf",Me),this.name=e.readTable("name",ze),this.post=e.readTable("post",He),this.cmap=e.readTable("cmap",Ne),this.os2=e.readTable("OS/2",Be),this.psName=this.name.postscriptName,this.ascent=this.os2.ascent||this.hhea.ascent,this.descent=this.os2.descent||this.hhea.descent,this.lineGap=this.os2.lineGap||this.hhea.lineGap,this.scale=1e3/this.head.unitsPerEm},widthOfGlyph:function(e){return this.hmtx.forGlyph(e).advance*this.scale},makeSubset:function(){return new d(this)}},Le=e.support.browser,Oe="undefined"!=typeof Uint8Array,Ve="\n",We=0,Ue={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],executive:[521.86,756],folio:[612,936],legal:[612,1008],letter:[612,792],tabloid:[792,1224]},qe={"Times-Roman":!0,"Times-Bold":!0,"Times-Italic":!0,"Times-BoldItalic":!0,Helvetica:!0,"Helvetica-Bold":!0,"Helvetica-Oblique":!0,"Helvetica-BoldOblique":!0,Courier:!0,"Courier-Bold":!0,"Courier-Oblique":!0,"Courier-BoldOblique":!0,Symbol:!0,ZapfDingbats:!0},je={},Ge=b(g),$e=function(e,t){function n(){0===--r&&t()}var i=Object.keys(e),r=i.length;return 0===r?t():void i.forEach(function(t){_(t,e[t],n)})},f.prototype={loadFonts:Ge,loadImages:$e,getFont:function(e){var t=this.FONTS[e];if(!t){if(t=qe[e],!t)throw Error("Font "+e+" has not been loaded");t=this.attach(t===!0?new rt(e):new ot(this,t)),this.FONTS[e]=t}return t},getImage:function(e){var t=this.IMAGES[e];if(!t){if(t=je[e],!t)throw Error("Image "+e+" has not been loaded");if("TAINTED"===t)return null;t=this.IMAGES[e]=this.attach(t.asStream(this))}return t},getOpacityGS:function(e,t){var n,i,r,o=parseFloat(e).toFixed(3);return e=parseFloat(o),o+=t?"S":"F",n=this._opacityGSCache||(this._opacityGSCache={}),i=n[o],i||(r={Type:R("ExtGState")},t?r.CA=e:r.ca=e,i=this.attach(new Ze(r)),i._resourceName=R("GS"+ ++We),n[o]=i),i},dict:function(e){return new Ze(e)},name:function(e){return R(e)},stream:function(e,t){return new et(t,e)}},Ke=Array.isArray||function(e){return e instanceof Array},A.prototype.beforeRender=function(){},Ye=I(function(e){this.value=e},{render:function(e){var t,n="",i=this.value;for(t=0;t<i.length;++t)n+=String.fromCharCode(255&i.charCodeAt(t));e("(",n.replace(/([\(\)\\])/g,"\\$1"),")")},toString:function(){return this.value}}),Qe=I(function(e){this.value=e},{render:function(e){var t,n=this;for(e("<"),t=0;t<this.value.length;++t)e(w(n.value.charCodeAt(t).toString(16),4));e(">")}},Ye),Xe=I(function(e){this.name=e},{render:function(e){e("/"+this.escape())},escape:function(){return this.name.replace(/[^\x21-\x7E]/g,function(e){return"#"+w(e.charCodeAt(0).toString(16),2)})},toString:function(){return this.name}}),Je={},Xe.get=R,Ze=I(function(e){this.props=e},{render:function(e){var t=this.props,n=!0;e("<<"),e.withIndent(function(){for(var i in t)y(t,i)&&!/^_/.test(i)&&(n=!1,e.indent(R(i)," ",t[i]))}),n||e.indent(),e(">>")}}),et=I(function(e,n,i){if("string"==typeof e){var r=t();r.write(e),e=r}this.data=e,this.props=n||{},this.compress=i},{render:function(e){var t=this.data.get(),n=this.props;this.compress&&ye.supportsDeflate()&&(n.Filter?n.Filter instanceof Array||(n.Filter=[n.Filter]):n.Filter=[],n.Filter.unshift(R("FlateDecode")),t=ye.deflate(t)),n.Length=t.length,e(new Ze(n)," stream",Ve),e.writeData(t),e(Ve,"endstream")}}),tt=I(function(e){e=this.props=e||{},e.Type=R("Catalog")},{setPages:function(e){this.props.Pages=e}},Ze),nt=I(function(){this.props={Type:R("Pages"),Kids:[],Count:0}},{addPage:function(e){this.props.Kids.push(e),this.props.Count++}},Ze),it=[192,193,194,195,197,198,199,201,202,203,205,206,207],rt=I(function(e){this.props={Type:R("Font"),Subtype:R("Type1"),BaseFont:R(e)},this._resourceName=R("F"+ ++We)},{encodeText:function(e){return new Ye(e+"")}},Ze),ot=I(function(e,t,n){var i,r;n=this.props=n||{},n.Type=R("Font"),n.Subtype=R("Type0"),n.Encoding=R("Identity-H"),this._pdf=e,this._font=t,this._sub=t.makeSubset(),this._resourceName=R("F"+ ++We),i=t.head,this.name=t.psName,r=this.scale=t.scale,this.bbox=[i.xMin*r,i.yMin*r,i.xMax*r,i.yMax*r],this.italicAngle=t.post.italicAngle,this.ascent=t.ascent*r,this.descent=t.descent*r,this.lineGap=t.lineGap*r,this.capHeight=t.os2.capHeight||this.ascent,this.xHeight=t.os2.xHeight||0,this.stemV=0,this.familyClass=(t.os2.familyClass||0)>>8,this.isSerif=this.familyClass>=1&&this.familyClass<=7,this.isScript=10==this.familyClass,this.flags=(t.post.isFixedPitch?1:0)|(this.isSerif?2:0)|(this.isScript?8:0)|(0!==this.italicAngle?64:0)|32},{encodeText:function(e){return new Qe(this._sub.encodeText(e+""))},getTextWidth:function(e,t){var n,i,r=this,o=0,a=this._font.cmap.codeMap;for(n=0;n<t.length;++n)i=a[t.charCodeAt(n)],o+=r._font.widthOfGlyph(i||0);return o*e/1e3},beforeRender:function(){var e,n,i,r,o=this,a=o._sub,s=a.render(),l=new et(t(s),{Length1:s.length},(!0)),d=o._pdf.attach(new Ze({Type:R("FontDescriptor"),FontName:R(o._sub.psName),FontBBox:o.bbox,Flags:o.flags,StemV:o.stemV,ItalicAngle:o.italicAngle,Ascent:o.ascent,Descent:o.descent,CapHeight:o.capHeight,XHeight:o.xHeight,FontFile2:o._pdf.attach(l)})),u=a.ncid2ogid,h=a.firstChar,p=a.lastChar,f=[];!function m(e,t){if(e<=p){var n=u[e];null==n?m(e+1):(t||f.push(e,t=[]),t.push(o._font.widthOfGlyph(n)),m(e+1,t))}}(h),e=new Ze({Type:R("Font"),Subtype:R("CIDFontType2"),BaseFont:R(o._sub.psName),CIDSystemInfo:new Ze({Registry:new Ye("Adobe"),Ordering:new Ye("Identity"),Supplement:0}),FontDescriptor:d,FirstChar:h,LastChar:p,DW:Math.round(o._font.widthOfGlyph(0)),W:f,CIDToGIDMap:o._pdf.attach(o._makeCidToGidMap())}),n=o.props,n.BaseFont=R(o._sub.psName),n.DescendantFonts=[o._pdf.attach(e)],i=new at(h,p,a.subset),r=new et(c(),null,(!0)),r.data(i),n.ToUnicode=o._pdf.attach(r)},_makeCidToGidMap:function(){return new et(t(this._sub.cidToGidMap()),null,(!0))}},Ze),at=I(function(e,t,n){this.firstChar=e,this.lastChar=t,this.map=n},{render:function(e){e.indent("/CIDInit /ProcSet findresource begin"),e.indent("12 dict begin"),e.indent("begincmap"),e.indent("/CIDSystemInfo <<"),e.indent(" /Registry (Adobe)"),e.indent(" /Ordering (UCS)"),e.indent(" /Supplement 0"),e.indent(">> def"),e.indent("/CMapName /Adobe-Identity-UCS def"),e.indent("/CMapType 2 def"),e.indent("1 begincodespacerange"),e.indent(" <0000><ffff>"),e.indent("endcodespacerange");var t=this;e.indent(t.lastChar-t.firstChar+1," beginbfchar"),e.withIndent(function(){var n,r,o,a;for(n=t.firstChar;n<=t.lastChar;++n){for(r=t.map[n],o=i([r]),e.indent("<",w(n.toString(16),4),">","<"),a=0;a<o.length;++a)e(w(o.charCodeAt(a).toString(16),4));e(">")}}),e.indent("endbfchar"),e.indent("endcmap"),e.indent("CMapName currentdict /CMap defineresource pop"),e.indent("end"),e.indent("end")}}),st=I(function(e,t){this._pdf=e,this._rcount=0,this._textMode=!1,this._fontResources={},this._gsResources={},this._xResources={},this._patResources={},this._shResources={},this._opacity=1,this._matrix=[1,0,0,1,0,0],this._annotations=[],this._font=null,this._fontSize=null,this._contextStack=[],t=this.props=t||{},t.Type=R("Page"),t.ProcSet=[R("PDF"),R("Text"),R("ImageB"),R("ImageC"),R("ImageI")],t.Resources=new Ze({Font:new Ze(this._fontResources),ExtGState:new Ze(this._gsResources),XObject:new Ze(this._xResources),Pattern:new Ze(this._patResources),Shading:new Ze(this._shResources)}),t.Annots=this._annotations},{_out:function(){this._content.data.apply(null,arguments)},transform:function(e,t,n,i,r,o){K(arguments)||(this._matrix=$(arguments,this._matrix),this._out(e," ",t," ",n," ",i," ",r," ",o," cm"),this._out(Ve))},translate:function(e,t){this.transform(1,0,0,1,e,t)},scale:function(e,t){this.transform(e,0,0,t,0,0)},rotate:function(e){var t=Math.cos(e),n=Math.sin(e);this.transform(t,n,-n,t,0,0)},beginText:function(){this._textMode=!0,this._out("BT",Ve)},endText:function(){this._textMode=!1,this._out("ET",Ve)},_requireTextMode:function(){if(!this._textMode)throw Error("Text mode required; call page.beginText() first")},_requireFont:function(){if(!this._font)throw Error("No font selected; call page.setFont() first")},setFont:function(e,t){this._requireTextMode(),null==e?e=this._font:e instanceof ot||(e=this._pdf.getFont(e)),null==t&&(t=this._fontSize),this._fontResources[e._resourceName]=e,this._font=e,this._fontSize=t,this._out(e._resourceName," ",t," Tf",Ve)},setTextLeading:function(e){this._requireTextMode(),this._out(e," TL",Ve)},setTextRenderingMode:function(e){this._requireTextMode(),this._out(e," Tr",Ve)},showText:function(e,t){var n,i;this._requireFont(),e.length>1&&t&&this._font instanceof ot&&(n=this._font.getTextWidth(this._fontSize,e),i=t/n*100,this._out(i," Tz ")),this._out(this._font.encodeText(e)," Tj",Ve)},showTextNL:function(e){this._requireFont(),this._out(this._font.encodeText(e)," '",Ve)},addLink:function(e,t){var n=this._toPage({x:t.left,y:t.bottom}),i=this._toPage({x:t.right,y:t.top});this._annotations.push(new Ze({Type:R("Annot"),Subtype:R("Link"),Rect:[n.x,n.y,i.x,i.y],Border:[0,0,0],A:new Ze({Type:R("Action"),S:R("URI"),URI:new Ye(e)})}))},setStrokeColor:function(e,t,n){this._out(e," ",t," ",n," RG",Ve)},setOpacity:function(e){this.setFillOpacity(e),this.setStrokeOpacity(e),this._opacity*=e},setStrokeOpacity:function(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!0);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",Ve)}},setFillColor:function(e,t,n){this._out(e," ",t," ",n," rg",Ve)},setFillOpacity:function(e){if(e<1){var t=this._pdf.getOpacityGS(this._opacity*e,!1);this._gsResources[t._resourceName]=t,this._out(t._resourceName," gs",Ve)}},gradient:function(e,t){var n,i,r;this.save(),this.rect(t.left,t.top,t.width,t.height),this.clip(),e.userSpace||this.transform(t.width,0,0,t.height,t.left,t.top),n=V(this._pdf,e,t),i=n.shading._resourceName,this._shResources[i]=n.shading,n.hasAlpha&&(r=n.opacity._resourceName,this._gsResources[r]=n.opacity,this._out("/"+r+" gs ")),this._out("/"+i+" sh",Ve),this.restore()},setDashPattern:function(e,t){this._out(e," ",t," d",Ve)},setLineWidth:function(e){this._out(e," w",Ve)},setLineCap:function(e){this._out(e," J",Ve)},setLineJoin:function(e){this._out(e," j",Ve)},setMitterLimit:function(e){this._out(e," M",Ve)},save:function(){this._contextStack.push(this._context()),this._out("q",Ve)},restore:function(){this._out("Q",Ve),this._context(this._contextStack.pop())},moveTo:function(e,t){this._out(e," ",t," m",Ve)},lineTo:function(e,t){this._out(e," ",t," l",Ve)},bezier:function(e,t,n,i,r,o){this._out(e," ",t," ",n," ",i," ",r," ",o," c",Ve)},bezier1:function(e,t,n,i){this._out(e," ",t," ",n," ",i," y",Ve)},bezier2:function(e,t,n,i){this._out(e," ",t," ",n," ",i," v",Ve)},close:function(){this._out("h",Ve)},rect:function(e,t,n,i){this._out(e," ",t," ",n," ",i," re",Ve)},ellipse:function(e,t,n,i){function r(t){return e+t}function o(e){return t+e}var a=.5522847498307936;this.moveTo(r(0),o(i)),this.bezier(r(n*a),o(i),r(n),o(i*a),r(n),o(0)),this.bezier(r(n),o(-i*a),r(n*a),o(-i),r(0),o(-i)),this.bezier(r(-n*a),o(-i),r(-n),o(-i*a),r(-n),o(0)),this.bezier(r(-n),o(i*a),r(-n*a),o(i),r(0),o(i))},circle:function(e,t,n){this.ellipse(e,t,n,n)},stroke:function(){this._out("S",Ve)},nop:function(){this._out("n",Ve)},clip:function(){this._out("W n",Ve)},clipStroke:function(){this._out("W S",Ve)},closeStroke:function(){this._out("s",Ve)},fill:function(){this._out("f",Ve)},fillStroke:function(){this._out("B",Ve)},drawImage:function(e){var t=this._pdf.getImage(e);t&&(this._xResources[t._resourceName]=t,this._out(t._resourceName," Do",Ve))},comment:function(e){var t=this;e.split(/\r?\n/g).forEach(function(e){t._out("% ",e,Ve)})},_context:function(e){return null==e?{opacity:this._opacity,matrix:this._matrix}:(this._opacity=e.opacity,void(this._matrix=e.matrix))},_toPage:function(e){var t=this._matrix,n=t[0],i=t[1],r=t[2],o=t[3],a=t[4],s=t[5];return{x:n*e.x+r*e.y+a,y:i*e.x+o*e.y+s}}},Ze),lt={serif:"Times-Roman","serif|bold":"Times-Bold","serif|italic":"Times-Italic","serif|bold|italic":"Times-BoldItalic","sans-serif":"Helvetica","sans-serif|bold":"Helvetica-Bold","sans-serif|italic":"Helvetica-Oblique","sans-serif|bold|italic":"Helvetica-BoldOblique",monospace:"Courier","monospace|bold":"Courier-Bold","monospace|italic":"Courier-Oblique","monospace|bold|italic":"Courier-BoldOblique",zapfdingbats:"ZapfDingbats","zapfdingbats|bold":"ZapfDingbats","zapfdingbats|italic":"ZapfDingbats","zapfdingbats|bold|italic":"ZapfDingbats"},j("Times New Roman","serif"),j("Courier New","monospace"),j("Arial","sans-serif"),j("Helvetica","sans-serif"),j("Verdana","sans-serif"),j("Tahoma","sans-serif"),j("Georgia","sans-serif"),j("Monaco","monospace"),j("Andale Mono","monospace"),dt={fill:0,stroke:1,fillAndStroke:2,invisible:3,fillAndClip:4,strokeAndClip:5,fillStrokeClip:6,clip:7},ut=dt,ct={dash:[4],dashDot:[4,2,1,2],dot:[1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2],solid:[]},ht={butt:0,round:1,square:2},pt={miter:0,round:1,bevel:2},e.deepExtend(e.pdf,{Document:f,BinaryStream:t,defineFont:G,parseFontDef:U,getFontURL:q,loadFonts:Ge,loadImages:$e,getPaperOptions:p,clearImageCache:v,TEXT_RENDERING_MODE:dt,exportPDF:be,saveAs:J,toDataURL:Q,toBlob:X,render:Y}),e.drawing.exportPDF=e.pdf.exportPDF,e.drawing.pdf=e.pdf}(kendo),kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("pdf/mixins.min",["pdf/core.min"],e);
}(function(){return function(e,t){kendo.PDFMixin={extend:function(e){e.events.push("pdfExport"),e.options.pdf=this.options,e.saveAsPDF=this.saveAsPDF,e._drawPDF=this._drawPDF,e._drawPDFShadow=this._drawPDFShadow},options:{fileName:"Export.pdf",proxyURL:"",paperSize:"auto",allPages:!1,landscape:!1,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+kendo.version,date:null},saveAsPDF:function(){var t,n=new e.Deferred,i=n.promise(),r={promise:i};if(!this.trigger("pdfExport",r))return t=this.options.pdf,t.multiPage=t.multiPage||t.allPages,this._drawPDF(n).then(function(e){return kendo.drawing.exportPDF(e,t)}).done(function(e){kendo.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy,proxyTarget:t.proxyTarget}),n.resolve()}).fail(function(e){n.reject(e)}),i},_drawPDF:function(t){var n=new e.Deferred;return kendo.drawing.drawDOM(this.wrapper).done(function(e){var i={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(i),n.resolve(i.page)}).fail(function(e){n.reject(e)}),n},_drawPDFShadow:function(t,n){var i,r,o;return t=t||{},i=this.wrapper,r=e("<div class='k-pdf-export-shadow'>"),t.width&&r.css({width:t.width,overflow:"visible"}),i.before(r),r.append(t.content||i.clone(!0,!0)),o=e.Deferred(),setTimeout(function(){var e=kendo.drawing.drawDOM(r,n);e.always(function(){r.remove()}).then(function(){o.resolve.apply(o,arguments)}).fail(function(){o.reject.apply(o,arguments)}).progress(function(){o.progress.apply(o,arguments)})},15),o.promise()}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pdf.min",["kendo.core.min","kendo.drawing.min","pdf/core.min","pdf/mixins.min"],e)}(function(){},"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.mobile.actionsheet.min","kendo.mobile.pane.min","kendo.ooxml.min","kendo.excel.min","kendo.progressbar.min","kendo.pdf.min"],e)}(function(){return function(e,t){function n(e,t){return"["+fe.attr(e)+"="+t+"]"}function i(e){return Array(e+1).join('<td class="k-group-cell">&nbsp;</td>')}function r(e){var t,n=" ";if(e){if(typeof e===It)return e;for(t in e)""!==e[t]&&(n+=t+'="'+e[t]+'"')}return n}function o(t,n){e("th, th .k-grid-filter, th .k-link",t).add(document.body).css("cursor",n)}function a(t,n,i,r,o){var a,s=n;for(n=e(),o=o||1,a=0;a<o;a++)n=n.add(t.eq(s+a));"number"==typeof i?n[r?"insertBefore":"insertAfter"](t.eq(i)):n.appendTo(i)}function s(t,n,i){return e(t).add(n).find(i)}function l(e,t,n){var i,r,o,a;for(n=Fe(n)?n:[n],i=0,r=n.length;i<r;i++)o=n[i],Ce(o)&&o.click&&(a=o.name||o.text,t.on(Dt+$e,"a.k-grid-"+(a||"").replace(/\s/g,""),{commandName:a},Ie(o.click,e)))}function d(e,t,n){return Se(e,function(e){var i,r;return e=typeof e===It?{field:e}:e,f(e)&&!n||(e.attributes=j(e.attributes),e.footerAttributes=j(e.footerAttributes),e.headerAttributes=j(e.headerAttributes),i=!0),e.columns&&(e.columns=d(e.columns,t,i)),r=fe.guid(),e.headerAttributes=Te({id:r},e.headerAttributes),Te({encoded:t,hidden:i},e)})}function u(e,t){var n=[];return c(e,t,n),n[n.length-1]}function c(e,t,n){var i,r;for(n=n||[],i=0;i<t.length;i++){if(e===t[i])return!0;if(t[i].columns){if(r=n.length,n.push(t[i]),c(e,t[i].columns,n))return!0;n.splice(r,n.length-r)}}return!1}function h(e,t){var n=t?G:j;e.hidden=!t,e.attributes=n(e.attributes),e.footerAttributes=n(e.footerAttributes),e.headerAttributes=n(e.headerAttributes)}function p(){return"none"!==this.style.display}function f(e){return m([e]).length>0}function m(e){return De(e,function(e){var t=!e.hidden;return t&&e.columns&&(t=m(e.columns).length>0),t})}function g(t){return e(t).map(function(){return this.toArray()})}function v(e,t,n){var i=k(H(t)),r=k(N(t)),o=e.rowSpan;e.rowSpan=n?i>r?o-(i-r)||1:o+(r-i):i>r?o+(i-r):o-(r-i)||1}function _(t,n,i,r,o,a,s){var l,d,u=k(t),c=k([n]);u>c&&(l=Array(s+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>'),d=a.children(":not(.k-filter-row)"),e(Array(u-c+1).join("<tr>"+l+"</tr>")).insertAfter(d.last())),R(a,u-c),w(i,r,o,a)}function b(t,n,i){var r,o,a,s,l,d,u,c;for(i=i||0,a=n,n=O(n),s={},l=t.find(">tr:not(.k-filter-row)"),d=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},u=0,c=n.length;u<c;u++)r=y(n[u],a),s[r.row]||(s[r.row]=l.eq(r.row).find(".k-header").filter(d)),o=s[r.row].eq(r.cell),o.attr(fe.attr("index"),i+u);return n.length}function k(e){var t,n,i=1,r=0;for(t=0;t<e.length;t++)e[t].columns&&(n=k(e[t].columns),n>r&&(r=n));return i+r}function w(t,n,i,r){var o,a,s=T(t[0],n),l=i.find(">tr:not(.k-filter-row):eq("+s.row+")>th.k-header"),d=e(),u=s.cell;for(o=0;o<t.length;o++)d=d.add(l.eq(u+o));for(r.find(">tr:not(.k-filter-row)").eq(s.row).append(d),a=[],o=0;o<t.length;o++)t[o].columns&&(a=a.concat(t[o].columns));a.length&&w(a,n,i,r)}function y(e,t,n,i){var r,o;for(n=n||0,i=i||{},i[n]=i[n]||0,o=0;o<t.length;o++){if(t[o]==e){r={cell:i[n],row:n};break}if(t[o].columns&&(r=y(e,t[o].columns,n+1,i)))break;i[n]++}return r}function x(e,t,n,i){var r,o=n.locked;do r=e[t],t+=i?1:-1;while(r&&t>-1&&t<e.length&&r!=n&&!r.columns&&r.locked==o);return r}function C(e,t,n,i){var r,o,a,s;return t.columns?(t=t.columns,t[i?0:t.length-1]):(r=u(t,e),o=r?r.columns:e,a=Ee(t,o),0===a&&i?a++:a!=o.length-1||i?(a>0||0===a&&!i)&&(a+=i?-1:1):a--,s=Ee(n,o),t=x(o,a,n,s>a),t&&t!=n&&t.columns?C(e,t,n,i):null)}function T(e,t,n,i){var r,o;for(n=n||0,i=i||{},i[n]=i[n]||0,o=0;o<t.length;o++){if(t[o]==e){r={cell:i[n],row:n};break}if(t[o].columns&&(r=T(e,t[o].columns,n+1,i)))break;t[o].hidden||i[n]++}return r}function S(e){var t=F(H(e));return t.concat(F(N(e)))}function D(e,t,n,i){var r=e[n],o=e[i],a=u(r,t);return t=a?a.columns:t,Ee(o,t)}function F(e){var t,n=[],i=[];for(t=0;t<e.length;t++)n.push(e[t]),e[t].columns&&(i=i.concat(e[t].columns));return i.length&&(n=n.concat(F(i))),n}function E(e){var t,n,i=0;for(n=0;n<e.length;n++)t=e[n],t.columns?i+=E(t.columns):t.hidden&&i++;return i}function A(e){var t,n,i,r=0;for(n=0,i=e.length;n<i;n++)t=e[n].style.width,t&&t.indexOf("%")==-1&&(r+=parseInt(t,10));return r}function I(e,t){var n,i,r=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(i=0;i<r.length;i++)n=r[i].rowSpan,n>1&&(r[i].rowSpan=n-t||1)}function R(e,t){var n,i=e.find("tr:not(.k-filter-row) th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n<i.length;n++)i[n].rowSpan+=t}function M(t){var n,i=t.find("tr:not(.k-filter-row)"),r=i.filter(function(){return!e(this).children().length}).remove().length,o=i.find("th:not(.k-group-cell,.k-hierarchy-cell)");for(n=0;n<o.length;n++)o[n].rowSpan>1&&(o[n].rowSpan-=r);return i.length-r}function z(e,t,n,i,r){var o,a,s,l=[];for(o=0,s=e.length;o<s;o++)a=n[i]||[],a.push(t.eq(r+o)),n[i]=a,e[o].columns&&(l=l.concat(e[o].columns));l.length&&z(l,t,n,i+1,r+e.length)}function H(e){return De(e,function(e){return e.locked})}function N(e){return De(e,function(e){return!e.locked})}function B(e){return De(e,function(e){return!e.locked&&f(e)})}function P(e){return De(e,function(e){return e.locked&&f(e)})}function L(e){var t,n=[];for(t=0;t<e.length;t++)e[t].hidden||(e[t].columns?n=n.concat(L(e[t].columns)):n.push(e[t]));return n}function O(e){var t,n=[];for(t=0;t<e.length;t++)e[t].columns?n=n.concat(O(e[t].columns)):n.push(e[t]);return n}function V(n){var i,r=n.find(">tr:not(.k-filter-row)"),o=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return r.length>1&&(a=r.find("th").filter(o).filter(function(){return this.rowSpan>1})),a=a.add(r.last().find("th").filter(o)),i=fe.attr("index"),a.sort(function(n,r){var o,a;return n=e(n),r=e(r),o=n.attr(i),a=r.attr(i),o===t&&(o=e(n).index()),a===t&&(a=e(r).index()),o=parseInt(o,10),a=parseInt(a,10),o>a?1:o<a?-1:0}),a}function W(t){var n,i,r,o,a,s,l,d=t.closest("table"),u=e().add(t),c=t.closest("tr"),h=d.find("tr:not(.k-filter-row)"),p=h.index(c);if(p>0){for(n=h.eq(p-1),i=n.find("th:not(.k-group-cell,.k-hierarchy-cell)").filter(function(){return!e(this).attr("rowspan")}),r=0,o=c.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<a.length;s++)r+=a[s].colSpan||1;for(o+=Math.max(r-1,0),r=0,s=0;s<i.length;s++)if(l=i.eq(s),r+=l.attr("data-colspan")?l[0].getAttribute("data-colspan"):1,o>=s&&o<r){u=W(l).add(u);break}}return u}function U(t){var n,i,r,o,a,s,l,d=t.closest("thead"),u=e().add(t),c=t.closest("tr"),h=d.find("tr:not(.k-filter-row)"),p=h.index(c)+t[0].rowSpan,f=fe.attr("colspan");if(p<=h.length-1){for(n=c.next(),i=t.prevAll(":not(.k-group-cell,.k-hierarchy-cell)"),i=i.filter(function(){return!this.rowSpan||1===this.rowSpan}),o=0,r=0;r<i.length;r++)o+=parseInt(i.eq(r).attr(f),10)||1;for(a=n.find("th:not(.k-group-cell,.k-hierarchy-cell)"),s=parseInt(t.attr(f),10)||1,r=0;r<s;)n=a.eq(r+o),u=u.add(U(n)),l=parseInt(n.attr(f),10),l>1&&(s-=l-1),r++}return u}function q(t,n,i,r){var o,a=t;return r&&t.empty(),_e?t[0].innerHTML=i:(o=document.createElement("div"),o.innerHTML="<table><tbody>"+i+"</tbody></table>",t=o.firstChild.firstChild,n[0].replaceChild(t,a[0]),t=e(t)),t}function j(e){e=e||{};var t=e.style;return t?(t=t.replace(/((.*)?display)(.*)?:([^;]*)/i,"$1:none"),t===e.style&&(t=t.replace(/(.*)?/i,"display:none;$1"))):t="display:none",Te({},e,{style:t})}function G(e){e=e||{};var t=e.style;return t&&(e.style=t.replace(/(display\s*:\s*none\s*;?)*/gi,"")),e}function $(t,n,i,r){var o,a=t.find(">colgroup"),s=Se(n,function(e){return o=e.width,o&&0!==parseInt(o,10)?fe.format('<col style="width:{0}"/>',typeof o===It?o:o+"px"):"<col />"});(i||a.find(".k-hierarchy-col").length)&&s.splice(0,0,'<col class="k-hierarchy-col" />'),a.length&&a.remove(),a=e(Array(r+1).join('<col class="k-group-col">')+s.join("")),a.is("colgroup")||(a=e("<colgroup/>").append(a)),t.prepend(a),tn.msie&&8==tn.version&&(t.css("display","inline-table"),window.setTimeout(function(){t.css("display","")},1))}function K(e,t){var n,i,r=0,o=e.find("th:not(.k-group-cell)");for(n=0,i=t.length;n<i;n++)t[n].locked&&(o.eq(n).insertBefore(o.eq(r)),o=e.find("th:not(.k-group-cell)"),r++)}function Y(e){var t,n,i,r={};for(n=0,i=e.length;n<i;n++)t=e[n],r[t.value]=t.text;return r}function Q(e,t,n,i){var r=n&&n.length&&Ce(n[0])&&"value"in n[0],o=r?Y(n)[e]:e;return o=null!=o?o:"",t?fe.format(t,o):i===!1?o:fe.htmlEncode(o)}function X(e,t,n){for(var i,r=0,o=e[r];o;){if(i=!!n||"none"!==o.style.display,i&&!Yt.test(o.className)&&--t<0){o.style.display=n?"":"none";break}o=e[++r]}}function J(t,n){for(var i,r,o=0,a=t.length;o<a;o+=1)r=t.eq(o),r.is(".k-grouping-row,.k-detail-row")?(i=r.children(":not(.k-group-cell):first,.k-detail-cell").last(),i.attr("colspan",parseInt(i.attr("colspan"),10)-1)):(r.hasClass("k-grid-edit-row")&&(i=r.children(".k-edit-container")[0])&&(i=e(i),i.attr("colspan",parseInt(i.attr("colspan"),10)-1),i.find("col").eq(n).remove(),r=i.find("tr:first")),X(r[0].cells,n,!1))}function Z(e){var t,n,i=[];for(n=0;n<e.length&&(t=e[n],"field"in t&&"value"in t&&"items"in t);n++)i.push(t),t.hasSubgroups&&(i=i.concat(Z(t.items)));return i}function ee(e){var t,n,i=[];for(n=0;n<e.length&&(t=e[n],"field"in t&&"value"in t&&"items"in t);n++)t.hasSubgroups&&(i=i.concat(ee(t.items))),i.push(t.aggregates);return i}function te(t,n){for(var i,r,o,a=0,s=t.length;a<s;a+=1)r=t.eq(a),r.is(".k-grouping-row,.k-detail-row")?(i=r.children(":not(.k-group-cell):first,.k-detail-cell").last(),i.attr("colspan",parseInt(i.attr("colspan"),10)+1)):(r.hasClass("k-grid-edit-row")&&(i=r.children(".k-edit-container")[0])&&(i=e(i),i.attr("colspan",parseInt(i.attr("colspan"),10)+1),$(i.find(">form>table"),m(o),!1,0),r=i.find("tr:first")),X(r[0].cells,n,!0))}function ne(e,t,n){n=n||1;var i,r,o;for(r=0,o=e.length;r<o;r++)i=e.eq(r).children().last(),i.attr("colspan",parseInt(i.attr("colspan"),10)+n),i=t.eq(r).children().last(),i.attr("colspan",parseInt(i.attr("colspan"),10)-n)}function ie(e){var t,n,i=0,r=e.find(">colgroup>col");for(t=0,n=r.length;t<n;t+=1)i+=parseInt(r[t].style.width,10);return i}function re(e,t){var n,i,r,o;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(n=e.offsetHeight,i=t.offsetHeight,n>i?(r=t.rows[t.rows.length-1],Qt.test(r.className)&&(r=t.rows[t.rows.length-2]),o=n-i):(r=e.rows[e.rows.length-1],Qt.test(r.className)&&(r=e.rows[e.rows.length-2]),o=i-n),r.style.height=r.offsetHeight+o+"px")}function oe(e,t){var n,i=e.offsetHeight,r=t.offsetHeight;i>r?n=i+"px":i<r&&(n=r+"px"),n&&(e.style.height=t.style.height=n)}function ae(e,t){var n,i,r;if(typeof e===It&&e===t)return e;if(Ce(e)&&e.name===t)return e;if(Fe(e))for(n=0,i=e.length;n<i;n++)if(r=e[n],typeof r===It&&r===t||r.name===t)return r;return null}function se(t,n){if(n===!0){t=e(t);var i=t.parent().scrollLeft();fe.focusElement(t),t.parent().scrollLeft(i)}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}function le(e,t){return!(!e.field||e.selectable)&&(!(t.editable&&!t.editable(e.field))&&!(e.editable&&!e.editable(t)))}function de(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,label.k-checkbox-label,.k-input,.k-multiselect-wrap,.k-picker-wrap,.k-picker-wrap>.k-selected-color,.k-tool-icon,.k-dropdown")}function ue(n){var i=e(n.currentTarget),r=i.is("th"),o=this.table.add(this.lockedTable),a=this.thead.parent().add(e(">table",this.lockedHeader)),s=de(n.target),l=e(n.target),d=i.closest("table")[0];if(!fe.support.touch)return s&&i.find(fe.roleSelector("filtercell")).length?(this._setCurrent(i),t):(d!==o[0]&&d!==o[1]&&d!==a[0]&&d!==a[1]||l.is("a.k-i-expand, a.k-i-collapse")||("incell"===this._editMode()&&l.hasClass("k-checkbox-label")&&l.prev().attr(fe.attr("bind"))&&n.preventDefault(),this.options.navigatable&&this._setCurrent(i),!r&&s||setTimeout(function(){rn&&e(fe._activeElement()).hasClass("k-widget")||de(fe._activeElement())&&e.contains(d,fe._activeElement())||se(d,!0)}),r&&n.preventDefault()),t)}function ce(e){return e&&(e.hasClass("k-edit-cell")||e.parent().hasClass("k-grid-edit-row"))}function he(e,t,n){return'<tr role="row" class="k-grouping-row">'+i(t)+'<td colspan="'+e+'" aria-expanded="true"><p class="k-reset"><a class="k-icon k-i-collapse" href="#" tabindex="-1" '+jt+'="'+Ut+'"></a>'+n+"</p></td></tr>"}function pe(e){return'<tr role="row" class="k-grouping-row"><td colspan="'+e+'" aria-expanded="true"><p class="k-reset">&nbsp;</p></td></tr>'}var fe=window.kendo,me=fe.ui,ge=fe.data.DataSource,ve=fe.data.ObservableObject,_e=fe.support.tbodyInnerHtml,be=fe._activeElement,ke=me.Widget,we=fe._outerWidth,ye=fe._outerHeight,xe=fe.keys,Ce=e.isPlainObject,Te=e.extend,Se=e.map,De=e.grep,Fe=e.isArray,Ee=e.inArray,Ae=Array.prototype.push,Ie=e.proxy,Re=fe.isFunction,Me=e.isEmptyObject,ze=e.contains,He=Math,Ne="progress",Be="error",Pe=":not(.k-group-cell):not(.k-hierarchy-cell):visible",Le="tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)",Oe="tr:not(.k-footer-template):visible",Ve=":not(.k-group-cell):not(.k-hierarchy-cell):visible",We="tr:not(.k-grouping-row):not(.k-detail-row):not(.k-footer-template):not(.k-group-footer):visible",Ue=We+":first",qe=We+":last",je=Oe+":first>"+Ve+":first",Ge="th.k-header:not(.k-group-cell):not(.k-hierarchy-cell)",$e=".kendoGrid",Ke="edit",Ye="beforeEdit",Qe="save",Xe="remove",Je="detailInit",Ze="filterMenuInit",et="columnMenuInit",tt="filterMenuOpen",nt="columnMenuOpen",it="cellClose",rt="change",ot="columnHide",at="columnShow",st="saveChanges",lt="dataBound",dt="detailExpand",ut="detailCollapse",ct="itemchange",ht="page",pt="paging",ft="scroll",mt="sync",gt="k-state-focused",vt=":kendoFocusable",_t="k-state-selected",bt="k-checkbox",kt="input[data-role='checkbox']."+bt,wt="k-grid-norecords",yt="columnResize",xt="columnReorder",Ct="columnLock",Tt="columnUnlock",St="navigate",Dt="click",Ft="height",Et="tabIndex",At="function",It="string",Rt="bottom",Mt="container-for",zt="field",Ht="input",Nt="incell",Bt="inline",Pt="uid",Lt="Are you sure you want to delete this record?",Ot="No records available.",Vt="Delete",Wt="Cancel",Ut="Collapse",qt="Expand",jt="aria-label",Gt=/(\}|\#)/gi,$t=/#/gi,Kt="[\\x20\\t\\r\\n\\f]",Yt=RegExp("(^|"+Kt+")(k-group-cell|k-hierarchy-cell)("+Kt+"|$)"),Qt=RegExp("(^|"+Kt+")(k-filter-row)("+Kt+"|$)"),Xt='# if (iconClass) {#<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass#"></span>#=text#</a># } else { #<a role="button" class="k-button k-button-icontext #=className#" #=attr# href="\\#">#=text#</a># } #',Jt='# var checkboxGuid = kendo.guid(); #<input class="'+bt+'" data-role="checkbox" id="#= checkboxGuid #" aria-label="Select row" aria-checked="false" type="checkbox"><label for="#= checkboxGuid #" class="k-checkbox-label k-no-text">&\\#8203;</label>',Zt='# var checkboxGuid = kendo.guid(); #<input class="'+bt+'" data-role="checkbox" aria-label="Select all rows" aria-checked="false" type="checkbox" id="#= checkboxGuid #"><label for="#= checkboxGuid #" class="k-checkbox-label k-no-text">##&\\#8203;##</label>',en=!1,tn=fe.support.browser,nn=tn.msie&&7==tn.version,rn=tn.msie&&8==tn.version,on=ke.extend({init:function(e,t){var n=this;ke.fn.init.call(n,e,t),n._refreshHandler=Ie(n.refresh,n),n.setDataSource(t.dataSource),n.wrap()},setDataSource:function(e){var t=this;t.dataSource&&t.dataSource.unbind(rt,t._refreshHandler),t.dataSource=e,t.dataSource.bind(rt,t._refreshHandler),t.dataSource.options.useRanges=!0},options:{name:"VirtualScrollable",itemHeight:e.noop,prefetch:!0,maxScrollHeight:25e4},events:[pt,ht,ft],destroy:function(){var e=this;ke.fn.destroy.call(e),e.dataSource.unbind(rt,e._refreshHandler),e.wrapper.add(e.verticalScrollbar).off($e),e.drag&&(e.drag.destroy(),e.drag=null),e.wrapper=e.element=e.verticalScrollbar=null,e._refreshHandler=null},wrap:function(){var t,n=this,i=fe.support.scrollbar()+1,r=n.element;r.css({width:"auto",overflow:"hidden"}).css(en?"padding-left":"padding-right",i),n.content=r.children().first(),t=n.wrapper=n.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll"+$e+" mousewheel"+$e,Ie(n._wheelScroll,n)),fe.support.kineticScrollNeeded&&(n.drag=new fe.UserEvents(n.wrapper,{global:!0,allowSelection:!0,start:function(e){e.sender.capture()},move:function(e){n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop()-e.y.delta),t.scrollLeft(t.scrollLeft()-e.x.delta),e.preventDefault()}})),n.verticalScrollbar=e('<div class="k-scrollbar k-scrollbar-vertical" />').css({width:i}).appendTo(r).bind("scroll"+$e,Ie(n._scroll,n))},_wheelScroll:function(e){if(!e.ctrlKey){var t=this.verticalScrollbar,n=t.scrollTop(),i=fe.wheelDeltaY(e);!i||i>0&&0===n||i<0&&n+t[0].clientHeight==t[0].scrollHeight||(e.preventDefault(),this.verticalScrollbar.scrollTop(n+-i))}},_scroll:function(e){var n=this,i=!n.options.prefetch,r=e.currentTarget.scrollTop,o=n.dataSource,a=n.itemHeight,s=o.skip()||0,l=n._rangeStart||s,d=n.element.innerHeight(),u=!!(n._scrollbarTop&&n._scrollbarTop>r),c=He.max(He.floor(r/a),0),h=u?He.ceil(d/a):He.floor(d/a),p=He.max(c+h,0);return n._preventScroll?(n._preventScroll=!1,t):(n._scrollTop=r-l*a,n._scrollbarTop=r,n._scrolling=i,n._fetch(c,p,u)||(n.wrapper[0].scrollTop=n._scrollTop),n.trigger(ft),i&&(n._scrollingTimeout&&clearTimeout(n._scrollingTimeout),n._scrollingTimeout=setTimeout(function(){n._scrolling=!1,n._page(n._rangeStart,n.dataSource.take())},100)),t)},scrollToTop:function(){this._scrollTo(0)},scrollToBottom:function(){var e=this.verticalScrollbar;this._scrollTo(e[0].scrollHeight-e.height())},_scrollWrapperToTop:function(){this.wrapper.scrollTop(0)},_scrollWrapperToBottom:function(){this.wrapper.scrollTop(this.wrapper[0].scrollHeight)},_scrollWrapperOnColumnResize:function(){var e=this,t=this.wrapper,n=t.scrollTop();t[0].scrollWidth>t[0].clientWidth?e._wrapperScrolled&&!e._isScrolledToBottom()||(t.scrollTop(n+fe.support.scrollbar()),e._scrollTop=t.scrollTop(),e._wrapperScrolled=!0):e._wrapperScrolled&&(e._isWrapperScrolledToBottom()||(t.scrollTop(n-fe.support.scrollbar()),e._scrollTop=t.scrollTop()),e._wrapperScrolled=!1)},_scrollTo:function(e){var t=this,n=t.verticalScrollbar;n.scrollTop()!==e&&(t._preventScroll=!0),t.wrapper.scrollTop(e),t._scrollTop=t.wrapper.scrollTop(),n.scrollTop(e),t._scrollbarTop=n.scrollTop()},_isScrolledToTop:function(){return 0===this.verticalScrollbar.scrollTop()},_isScrolledToBottom:function(){var e=this.verticalScrollbar,t=e.scrollTop();return t>0&&t>=parseInt(e[0].scrollHeight-e.height(),10)},_isWrapperScrolledToBottom:function(){var e=this.wrapper;return e.scrollTop()>=parseInt(e[0].scrollHeight-e.height(),10)},itemIndex:function(e){var t=this._rangeStart||this.dataSource.skip()||0;return t+e},_isElementVisible:function(e){return this._isElementVisibleInWrapper(e)},_isElementVisibleInWrapper:function(t){var n,i,r=this,o=r.wrapper;return t=e(t),!!(t[0]&&ze(o[0],t[0])&&(n=parseInt(t.position().top,10),i=t.outerHeight()/2,(n>=0||He.abs(n)<=i)&&n+i<=o.height()))},position:function(e){var t,n=this._rangeStart||this.dataSource.skip()||0,i=this.dataSource.pageSize();return t=e>n?e-n+1:n-e-1,t>i?i:t},scrollIntoView:function(e){var t=this.wrapper[0],n=t.clientHeight,i=this._isScrolledToBottom()?t.scrollTop:this._scrollTop||t.scrollTop,r=e[0].offsetTop,o=e[0].offsetHeight;i>r?this.verticalScrollbar[0].scrollTop-=n/2:r+o>=i+n&&(this.verticalScrollbar[0].scrollTop+=n/2)},_fetch:function(t,n,i){var r=this,o=r.dataSource,a=r.itemHeight,s=o.take(),l=r._rangeStart||o.skip()||0,d=He.floor(t/s)*s,u=!1,c=.33,h=r.verticalScrollbar,p=tn.webkit?1:0;return t<l?(u=!0,l=He.max(0,n-s),r._scrollTop=h.scrollTop()-l*a,r._page(l,s)):n>=l+s&&!i?(u=!0,l=He.min(t,o.total()-s),r._scrollTop=h.scrollTop()>=h[0].scrollHeight-h.height()-p?r.wrapper[0].scrollHeight-r.wrapper.height():a,r._page(l,s)):!r._fetching&&r.options.prefetch&&(t<d+s-s*c&&t>s&&o.prefetch(d-s,s,e.noop),n>d+s*c&&o.prefetch(d+s,s,e.noop)),u},fetching:function(){return this._fetching},_page:function(t,n,i){var r=this,o=!r.options.prefetch,a=r.dataSource;i=Re(i)?i:e.noop,r.trigger(pt,{skip:t,take:n})||(clearTimeout(r._timeout),r._fetching=!0,r._rangeStart=t,a.inRange(t,n)?(fe.ui.progress(e(r.wrapper).parent(),!0),a.range(t,n,function(){fe.ui.progress(e(r.wrapper).parent(),!1),i(),r.trigger(ht)})):(o||fe.ui.progress(r.wrapper.parent(),!0),r._timeout=setTimeout(function(){r._scrolling||(o&&fe.ui.progress(r.wrapper.parent(),!0),a.range(t,n,function(){fe.ui.progress(r.wrapper.parent(),!1),i(),r.trigger(ht)}))},100)))},repaintScrollbar:function(e){var n,i=this,r="",o=i.options.maxScrollHeight,a=i.dataSource,s=fe.support.kineticScrollNeeded?0:fe.support.scrollbar(),l=i.wrapper[0],d=i._isScrolledToBottom(),u=i.itemHeight=i.options.itemHeight()||0,c=l.scrollWidth>l.offsetWidth?s:0,h=a.total()*u+c;for(n=0;n<He.floor(h/o);n++)r+='<div style="width:1px;height:'+o+'px"></div>';h%o&&(r+='<div style="width:1px;height:'+h%o+'px"></div>'),i.verticalScrollbar.html(r),d&&!i._isScrolledToBottom()&&i.scrollToBottom(),t!==i._scrollTop&&e&&(l.scrollTop=i._scrollTop,i._scrollWrapperOnColumnResize())},refresh:function(e){var n=this,i=n.dataSource,r=n._rangeStart,o=(e||{}).action,a=n._isScrolledToBottom()||!o||o!==ct&&o!==Xe&&o!==mt;fe.ui.progress(n.wrapper.parent(),!1),clearTimeout(n._timeout),n.repaintScrollbar(a),n.drag&&n.drag.cancel(),t===r||n._fetching||((!o||o!==mt&&o!==ct)&&(n._rangeStart=i.skip()),1!==i.page()||o&&(o===mt||o===ct)||(n.verticalScrollbar[0].scrollTop=0)),n._fetching=!1}}),an={create:{text:"Add new record",className:"k-grid-add",iconClass:"k-icon k-i-plus"},cancel:{text:"Cancel changes",className:"k-grid-cancel-changes",iconClass:"k-icon k-i-cancel"},save:{text:"Save changes",className:"k-grid-save-changes",iconClass:"k-icon k-i-check"},destroy:{text:"Delete",className:"k-grid-delete",iconClass:"k-icon k-i-close"},edit:{text:"Edit",className:"k-grid-edit",iconClass:"k-icon k-i-edit"},update:{text:"Update",className:"k-primary k-grid-update",iconClass:"k-icon k-i-check"},canceledit:{text:"Cancel",className:"k-grid-cancel",iconClass:"k-icon k-i-cancel"},excel:{text:"Export to Excel",className:"k-grid-excel",iconClass:"k-icon k-i-file-excel"},pdf:{text:"Export to PDF",className:"k-grid-pdf",iconClass:"k-icon k-i-file-pdf"}},sn=fe.ui.DataBoundWidget.extend({init:function(t,n,i){var r=this;n=Fe(n)?{dataSource:n}:n,ke.fn.init.call(r,t,n),i&&(r._events=i),en=fe.support.isRtl(t),r._element(),r._aria(),r._columns(e.extend(!0,[],r.options.columns)),r._dataSource(),r._tbody(),r._pageable(),r._thead(),r._groupable(),r._toolbar(),r._setContentHeight(),r._templates(),r._navigatable(),r._selectable(),r._clipboard(),r._details(),r._editable(),r._attachCustomCommandsEvent(),r._minScreenSupport(),r.options.autoBind?r.dataSource.fetch():(r._group=r._groups()>0,r._footer()),r.lockedContent&&(r.wrapper.addClass("k-grid-lockedcolumns"),r._resizeHandler=function(){r.resize()},e(window).on("resize"+$e,r._resizeHandler)),fe.notify(r)},events:[rt,"dataBinding","cancel",lt,dt,ut,Je,Ze,tt,et,nt,Ke,Ye,Qe,Xe,st,it,yt,xt,at,ot,Ct,Tt,St,"page","sort","filter","group","groupExpand","groupCollapse"],setDataSource:function(e){var t=this,n=t.options.scrollable;t.options.dataSource=e,t._dataSource(),t._pageable(),t._thead(),n&&(n.virtual?t.content.find(">.k-virtual-scrollable-wrap").scrollLeft(0):t.content.scrollLeft(0)),t.options.groupable&&t._groupable(),t.virtualScrollable&&t.virtualScrollable.setDataSource(t.options.dataSource),t.options.navigatable&&t._navigatable(),t.options.selectable&&t._selectable(),t.options.autoBind&&e.fetch()},options:{name:"Grid",columns:[],toolbar:null,autoBind:!0,filterable:!1,scrollable:!0,sortable:!1,selectable:!1,allowCopy:!1,navigatable:!1,pageable:!1,persistSelection:!1,editable:!1,groupable:!1,rowTemplate:"",altRowTemplate:"",noRecords:!1,dataSource:{},height:null,resizable:!1,reorderable:!1,columnMenu:!1,detailTemplate:null,columnResizeHandleWidth:3,mobile:"",messages:{editable:{cancelDelete:Wt,confirmation:Lt,confirmDelete:Vt},commands:{create:an.create.text,cancel:an.cancel.text,save:an.save.text,destroy:an.destroy.text,edit:an.edit.text,update:an.update.text,canceledit:an.canceledit.text,excel:an.excel.text,pdf:an.pdf.text},noRecords:Ot,expandCollapseColumnHeader:""}},destroy:function(){var t,n=this;n._angularItems("cleanup"),n._destroyColumnAttachments(),ke.fn.destroy.call(n),this._navigatableTables=null,n._resizeHandler&&e(window).off("resize"+$e,n._resizeHandler),n.pager&&n.pager.element&&n.pager.destroy(),n.pager=null,n.groupable&&n.groupable.element&&n.groupable.element.kendoGroupable("destroy"),n.groupable=null,n.options.reorderable&&n.wrapper.data("kendoReorderable").destroy(),n.selectable&&n.selectable.element&&(n.selectable.destroy(),n.clearArea(),n.options.persistSelection===!0&&(n._selectedIds=null),n.copyHandler&&(n.wrapper.off("keydown",n.copyHandler),n.unbind(n.copyHandler)),n.updateClipBoardState&&(n.unbind(n.updateClipBoardState),n.updateClipBoardState=null),n.clearAreaHandler&&n.wrapper.off("keyup",n.clearAreaHandler)),n.selectable=null,n.resizable&&(n.resizable.destroy(),n._resizeUserEvents&&(n._resizeHandleDocumentClickHandler&&e(document).off("click",n._resizeHandleDocumentClickHandler),n._resizeUserEvents.destroy(),n._resizeUserEvents=null),n.resizable=null),n._destroyVirtualScrollable(),n._destroyEditable(),n.dataSource&&(n.dataSource.unbind(rt,n._refreshHandler).unbind(Ne,n._progressHandler).unbind(Be,n._errorHandler),n._refreshHandler=n._progressHandler=n._errorHandler=null),t=n.element.add(n.wrapper).add(n.table).add(n.thead).add(n.wrapper.find(">.k-grid-toolbar")),n.content&&(t=t.add(n.content).add(n.content.find(">.k-virtual-scrollable-wrap"))),n.lockedHeader&&n._removeLockedContainers(),n.pane&&n.pane.destroy(),n.minScreenResizeHandler&&e(window).off("resize",n.minScreenResizeHandler),n._draggableInstance&&n._draggableInstance.element&&n._draggableInstance.destroy(),n._draggableInstance=null,t.off($e),fe.destroy(n.wrapper),n.rowTemplate=n.altRowTemplate=n.lockedRowTemplate=n.lockedAltRowTemplate=n.detailTemplate=n.footerTemplate=n.groupFooterTemplate=n.lockedGroupFooterTemplate=n.noRecordsTemplate=null,n.scrollables=n.thead=n.tbody=n.element=n.table=n.content=n.footer=n.wrapper=n.lockedTable=n.lockedContent=n.lockedHeader=n.lockedFooter=n._groupableClickHandler=n._groupRows=n._setContentWidthHandler=null},getOptions:function(){var n,i,r,o=this.options;return o.dataSource=null,n=Te(!0,{},this.options),n.columns=fe.deepExtend([],this.columns),i=this.dataSource,r=i.options.data&&i._data,i.options.data=null,n.dataSource=e.extend(!0,{},i.options),i.options.data=r,n.dataSource.data=r,n.dataSource.page=i.page(),n.dataSource.filter=i.filter(),n.dataSource.pageSize=i.pageSize(),n.dataSource.sort=i.sort(),n.dataSource.group=i.group(),n.dataSource.aggregate=i.aggregate(),n.dataSource.transport&&(n.dataSource.transport.dataSource=null),n.pageable&&n.pageable.pageSize&&(n.pageable.pageSize=i.pageSize()),n.$angular=t,n},setOptions:function(e){var t,n,i,r,o=this.getOptions();fe.deepExtend(o,e),e.dataSource||(o.dataSource=this.dataSource),t=this.wrapper,n=this._events,i=this.element,this.destroy(),this.options=null,this._isMobile&&(r=t.closest(fe.roleSelector("pane")).parent(),r.after(t),r.remove(),t.removeClass("k-grid-mobile")),t[0]!==i[0]&&(t.before(i),t.remove()),i.empty(),this.init(i,o,n),this._setEvents(o)},items:function(){return this.lockedContent?this._items(this.tbody).add(this._items(this.lockedTable.children("tbody"))):this._items(this.tbody)},_items:function(t){return t.children().filter(function(){var t=e(this);return!t.hasClass("k-grouping-row")&&!t.hasClass("k-detail-row")&&!t.hasClass("k-group-footer")})},dataItems:function(){var e,t,n,i=fe.ui.DataBoundWidget.fn.dataItems.call(this);if(this.lockedContent){for(e=i.length,t=Array(2*e),n=e;--n>=0;)t[n]=t[n+e]=i[n];i=t}return i},_destroyColumnAttachments:function(){var t=this;t.resizeHandle=null,t.thead&&(this.angular("cleanup",function(){return{elements:t.thead.get()}}),t.thead.add(t.lockedHeader).find("th").each(function(){var t=e(this),n=t.data("kendoFilterMenu"),i=t.data("kendoColumnSorter"),r=t.data("kendoColumnMenu");n&&n.destroy(),i&&i.destroy(),r&&r.destroy()}))},_attachCustomCommandsEvent:function(){var e,t,n,i=this,r=O(i.columns||[]);for(t=0,n=r.length;t<n;t++)e=r[t].command,e&&l(i,i.wrapper,e)},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._cellId=e+"_active_cell")},_element:function(){var t=this,n=t.element;n.is("table")||(n=t.options.scrollable?t.element.find("> .k-grid-content > table"):t.element.children("table"),n.length||(n=e("<table />").appendTo(t.element))),nn&&n.attr("cellspacing",0),t.table=n.attr("role",t._hasDetails()?"treegrid":"grid"),t._wrapper()},_createResizeHandle:function(t,n){var i,r,o,a,s,l,d,u=this,c=u.options.columnResizeHandleWidth,h=u.options.scrollable,p=u.resizeHandle,f=this._groups();if(p&&u.lockedContent&&p.data("th")[0]!==n[0]&&(p.off($e).remove(),p=null),p||(p=u.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner"></div></div>'),t.append(p)),en)i=n.position().left,h&&(a=n.closest(".k-grid-header-wrap, .k-grid-header-locked"),s=tn.msie?a.scrollLeft():0,l=tn.webkit?a[0].scrollWidth-a[0].offsetWidth-a.scrollLeft():0,d=tn.mozilla?a[0].scrollWidth-a[0].offsetWidth-(a[0].scrollWidth-a[0].offsetWidth-a.scrollLeft()):0,i-=l-d+s);else{for(i=n[0].offsetWidth,r=V(n.closest("thead")).filter(":visible"),o=0;o<r.length&&r[o]!=n[0];o++)i+=r[o].offsetWidth;f>0&&(i+=we(t.find(".k-group-cell:first"))*f),u._hasDetails()&&(i+=we(t.find(".k-hierarchy-cell:first")))}p.css({top:n.position().top,left:i-c,height:ye(n),width:3*c}).data("th",n).show(),p.off("dblclick"+$e).on("dblclick"+$e,function(){u._autoFitLeafColumn(n.data("index"))})},_positionColumnResizeHandle:function(){var n=this,i=n.lockedHeader?n.lockedHeader.find("thead:first"):e();
n.thead.add(i).on("mousemove"+$e,"th",function(i){var r=t!==i.buttons?i.buttons:i.which||i.button,o=e(this);o.hasClass("k-group-cell")||o.hasClass("k-hierarchy-cell")||t!==r&&0!==r||n._createResizeHandle(o.closest("div"),o)})},_resizeHandleDocumentClick:function(t){e(t.target).closest(".k-column-active").length||(e(document).off(t),this._hideResizeHandle())},_hideResizeHandle:function(){this.resizeHandle&&(this.resizeHandle.data("th").removeClass("k-column-active"),this.lockedContent&&!this._isMobile?(this.resizeHandle.off($e).remove(),this.resizeHandle=null):this.resizeHandle.hide())},_positionColumnResizeHandleTouch:function(){var t=this,n=t.lockedHeader?t.lockedHeader.find("thead:first"):e();t._resizeUserEvents=new fe.UserEvents(n.add(t.thead),{filter:"th:not(.k-group-cell):not(.k-hierarchy-cell)",threshold:10,hold:function(n){var i=e(n.target);n.preventDefault(),i.addClass("k-column-active"),t._createResizeHandle(i.closest("div"),i),t._resizeHandleDocumentClickHandler||(t._resizeHandleDocumentClickHandler=Ie(t._resizeHandleDocumentClick,t)),e(document).on("click",t._resizeHandleDocumentClickHandler)}})},_resizable:function(){var t,n,i,r,a,s,l,d,u=this,c=u.options,h=this._isMobile,p=fe.support.mobileOS?0:fe.support.scrollbar();c.resizable&&(t=c.scrollable?u.wrapper.find(".k-grid-header-wrap:first"):u.wrapper,h?u._positionColumnResizeHandleTouch(t):u._positionColumnResizeHandle(t),u.resizable&&u.resizable.destroy(),u.resizable=new me.Resizable(t.add(u.lockedHeader),{handle:(c.scrollable?"":">")+".k-resize-handle",hint:function(t){return e('<div class="k-grid-resize-indicator" />').css({height:ye(t.data("th"))+u.tbody.attr("clientHeight")})},start:function(t){var p,f,m,g;d=e(t.currentTarget).data("th"),h&&u._hideResizeHandle(),p=d.closest("table"),f=e.inArray(d[0],V(d.closest("thead")).filter(":visible")),s=p.parent().hasClass("k-grid-header-locked"),m=s?u.lockedTable:u.table,g=u.footer||e(),u.footer&&u.lockedContent&&(g=u.footer.children(s?".k-grid-footer-locked":".k-grid-footer-wrap")),o(u.wrapper,"col-resize"),l=c.scrollable?p.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")").add(m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")).add(g.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")")):m.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+f+")"),n=t.x.location,i=we(d),r=O(u.columns)[f].minResizableWidth||10,a=we(s?m.children("tbody"):u.tbody),tn.webkit&&u.wrapper.addClass("k-grid-column-resizing")},resize:function(t){var o,h,f,m,g,v,_=en?-1:1,b=i+t.x.location*_-n*_;c.scrollable?(s&&u.lockedFooter?o=u.lockedFooter.children("table"):u.footer&&(o=u.footer.find(">.k-grid-footer-wrap>table")),o&&o[0]||(o=e()),h=d.closest("table"),f=s?u.lockedTable:u.table,m=!1,g=u.wrapper.width()-p,v=b,s&&a-i+v>g&&(v=i+(g-a-2*p),v<0&&(v=b),m=!0),v>10&&v>=r&&(l.css("width",v),a&&(v=m?g-2*p:a+t.x.location*_-n*_,f.add(h).add(o).css("width",v),s||(u._footerWidth=v))),u._scrollVirtualWrapperOnColumnResize()):b>10&&b>=r&&l.css("width",b)},resizeend:function(){var e,t,n,r=we(d);o(u.wrapper,""),tn.webkit&&u.wrapper.removeClass("k-grid-column-resizing"),i!=r&&(t=u.lockedHeader?u.lockedHeader.find("thead:first tr:first").add(u.thead.find("tr:first")):d.parent(),n=d.attr(fe.attr("index")),n||(n=t.find("th:not(.k-group-cell):not(.k-hierarchy-cell)").index(d)),e=O(u.columns)[n],e.width=r,u.trigger(yt,{column:e,oldWidth:i,newWidth:r}),u._applyLockedContainersWidth(),u._syncLockedContentHeight(),u._syncLockedHeaderHeight()),u._hideResizeHandle(),d=null}}))},_draggable:function(){var t,n=this;n.options.reorderable&&(n._draggableInstance&&n._draggableInstance.destroy(),t=n.wrapper.children(".k-grid-header"),n._draggableInstance=n.wrapper.kendoDraggable({group:fe.guid(),autoScroll:!0,filter:n.content?".k-grid-header:first "+Ge:"table:first>.k-grid-header "+Ge,dragstart:function(){t.children(".k-grid-header-wrap").unbind("scroll"+$e+"scrolling").bind("scroll"+$e+"scrolling",function(e){n.virtualScrollable?n.content.find(">.k-virtual-scrollable-wrap").scrollLeft(this.scrollLeft):n.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)})},dragend:function(){t.children(".k-grid-header-wrap").unbind("scroll"+$e+"scrolling")},drag:function(){n._hideResizeHandle()},hint:function(t){var n=t.attr(fe.attr("title"));return n&&(n=fe.htmlEncode(n)),e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(n||t.attr(fe.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}).data("kendoDraggable"))},_reorderable:function(){var t=this;t.options.reorderable&&(t.wrapper.data("kendoReorderable")&&t.wrapper.data("kendoReorderable").destroy(),t.wrapper.kendoReorderable({draggable:t._draggableInstance,dragOverContainers:function(e,n){var i=S(t.columns);return i[e].lockable!==!1&&D(i,t.columns,e,n)>-1},inSameContainer:function(n){return e(n.source).parent()[0]===e(n.target).parent()[0]&&D(S(t.columns),t.columns,n.sourceIndex,n.targetIndex)>-1},change:function(e){var n=S(t.columns),i=n[e.oldIndex],r=D(n,t.columns,e.oldIndex,e.newIndex);t.trigger(xt,{newIndex:r,oldIndex:Ee(i,n),column:i}),t.reorderColumn(r,i,"before"===e.position)}}))},_reorderHeader:function(e,t,n){var i,r,o,l,d=this,u=y(e[0],d.columns),c=y(t,d.columns),h=[];for(i=0;i<e.length;i++)e[i].columns&&(h=h.concat(e[i].columns));r=s(d.lockedHeader,d.thead,"tr:eq("+u.row+")>th.k-header:not(.k-group-cell,.k-hierarchy-cell)"),o=H(e).length,l=H([t]).length,h.length?(o>0&&0===l?_(e,t,h,d.columns,d.lockedHeader.find("thead"),d.thead,this._groups()):0===o&&l>0&&_(e,t,h,d.columns,d.thead,d.lockedHeader.find("thead"),this._groups()),(t.columns||u.cell-c.cell>1||c.cell-u.cell>1)&&(t=C(d.columns,t,e[0],n),t&&d._reorderHeader(h,t,n))):o!==l&&v(r[u.cell],d.columns,o),a(r,u.cell,c.cell,n,e.length)},_reorderContent:function(t,n,i){var r,o,l,d,u=this,c=e(),h=t[0],p=m(t),f=Ee(h,O(u.columns)),g=Ee(n,O(u.columns)),v=Ee(h,L(u.columns)),_=Ee(n,L(u.columns)),b=H(u.columns).length,k=!!n.locked,w=u.footer||u.wrapper.find(".k-grid-footer"),y=r=_;for(n.hidden&&(k?(_=u.lockedTable.find("colgroup"),y=u.lockedHeader.find("colgroup"),r=e(u.lockedFooter).find(">table>colgroup")):(_=u.tbody.prev(),y=u.thead.prev(),r=w.find(".k-grid-footer-wrap").find(">table>colgroup"))),u._hasFilterRow()&&a(u.wrapper.find(".k-filter-row th:not(.k-group-cell,.k-hierarchy-cell)"),f,g,i,t.length),a(s(u.lockedHeader,u.thead.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),v,y,i,p.length),u.options.scrollable&&a(s(u.lockedTable,u.tbody.prev(),"col:not(.k-group-col,.k-hierarchy-col)"),v,_,i,p.length),w&&w.length&&(a(s(u.lockedFooter,w.find(".k-grid-footer-wrap"),">table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"),v,r,i,p.length),a(w.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"),f,g,i,t.length)),o=u.tbody.children(":not(.k-grouping-row,.k-detail-row)"),u.lockedTable&&(b>g?b<=f&&ne(u.lockedTable.find(">tbody>tr.k-grouping-row"),u.table.find(">tbody>tr.k-grouping-row"),t.length):b>f&&ne(u.table.find(">tbody>tr.k-grouping-row"),u.lockedTable.find(">tbody>tr.k-grouping-row"),t.length),c=u.lockedTable.find(">tbody>tr:not(.k-grouping-row,.k-detail-row)")),l=0,d=o.length;l<d;l+=1)a(s(c[l],o[l],">td:not(.k-group-cell,.k-hierarchy-cell)"),f,g,i,t.length)},_autoFitLeafColumn:function(e){this.autoFitColumn(O(this.columns)[e])},autoFitColumn:function(t){var n,i,r,o,a,s,l,d,u,c,h,m,g,v,_,b,k,w,y,x,C=this,T=C.options,S=C.columns,D=C.lockedHeader?V(C.lockedHeader.find(">table>thead")).filter(p).length:0,E="col:not(.k-group-col):not(.k-hierarchy-col)",A="td:visible:not(.k-group-cell):not(.k-hierarchy-cell)";if(t="number"==typeof t?S[t]:Ce(t)?De(F(S),function(e){return e===t})[0]:De(F(S),function(e){return e.field===t})[0],t&&f(t)){for(s=t.minResizableWidth,n=Ee(t,O(S)),o=t.locked,r=o?C.lockedHeader.children("table"):C.thead.parent(),i=r.find("[data-index='"+n+"']"),u=o?C.lockedTable:C.table,c=C.footer||e(),C.footer&&C.lockedContent&&(c=C.footer.children(o?".k-grid-footer-locked":".k-grid-footer-wrap")),h=c.find("table").first(),C.lockedHeader&&!o&&(n-=D),m=0;m<S.length&&S[m]!==t;m++)S[m].hidden&&n--;if(T.scrollable?(a=r.find(E).eq(n).add(u.children("colgroup").find(E).eq(n)).add(h.find("colgroup").find(E).eq(n)),o||(l=u.parent(),d=l.scrollLeft())):a=u.children("colgroup").find(E).eq(n),g=r.add(u).add(h),v=we(i),a.width(""),g.css("table-layout","fixed"),a.width("auto"),g.addClass("k-autofitting"),g.css("table-layout",""),_=Math.ceil(Math.max(we(i),we(u.find("tr:not(.k-grouping-row)").eq(0).children(A).eq(n)),we(h.find("tr").eq(0).children(A).eq(n))))+1,s&&s>_&&(_=s),a.width(_),t.width=_,T.scrollable){for(b=r.find("col"),w=0,y=0,x=b.length;y<x;y+=1)if(k=b[y].style.width,k&&k.indexOf("%")==-1)w+=parseInt(k,10);else{if(!b.eq(y).hasClass("k-group-col")){w=0;break}w+=parseInt(b.eq(y).width(),10)}w&&g.each(function(){this.style.width=w+"px"})}tn.msie&&8==tn.version&&(g.css("display","inline-table"),setTimeout(function(){g.css("display","table")},1)),g.removeClass("k-autofitting"),d&&l.scrollLeft(d),C.trigger(yt,{column:t,oldWidth:v,newWidth:_}),C._applyLockedContainersWidth(),C._syncLockedContentHeight(),C._syncLockedHeaderHeight()}},reorderColumn:function(e,n,i){var r,o,a=this,s=u(n,a.columns),l=s?s.columns:a.columns,d=Ee(n,l),c=l[e],h=!!c.locked,p=H(a.columns).length;d!==e&&(!n.locked&&h&&1==N(a.columns).length||n.locked&&!h&&1==p||(a._hideResizeHandle(),i===t&&(i=e<d),o=[n],a._reorderHeader(o,c,i),a.lockedHeader&&(M(a.thead),M(a.lockedHeader)),c.columns&&(c=O(c.columns),c=c[i?0:c.length-1]),n.columns&&(o=O(n.columns)),a._reorderContent(o,c,i),r=!!n.locked,r=r!=h,n.locked=h,l.splice(i?e:e+1,0,n),l.splice(d<e?d:d+1,1),a._templates(),a._updateColumnCellIndex(),a._updateTablesWidth(),a._applyLockedContainersWidth(),a._syncLockedHeaderHeight(),a._syncLockedContentHeight(),a._updateFirstColumnClass(),r&&(h?a.trigger(Ct,{column:n}):a.trigger(Tt,{column:n}))))},_updateColumnCellIndex:function(){var e,t=0;this.lockedHeader&&(e=this.lockedHeader.find("thead"),t=b(e,H(this.columns))),b(this.thead,N(this.columns),t)},lockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:De(n,function(t){return t.field===e})[0],!e||e.locked||e.hidden||(t=H(n).length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:De(n,function(t){return t.field===e})[0],e&&e.locked&&!e.hidden&&(t=H(n).length,this.reorderColumn(t,e,!0))},cellIndex:function(t){var n=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(n=O(H(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(fe.attr("uid"));return this.dataSource.getByUid(n)},_editable:function(){var t,n=this,i=n.selectable&&n.selectable.options.multiple,r=n.options.editable,o=function(){var t=be(),i=n._editContainer;!i||e.contains(i[0],t)||i[0]===t||e(t).closest(".k-animation-container").length||(n.editable.end()?n.closeCell():n._scrollVirtualWrapper())};r&&(this.wrapper.addClass("k-editable"),t=n._editMode(),"incell"===t?r.update!==!1&&n.wrapper.on(Dt+$e,"tr:not(.k-grouping-row) > td",function(t){var r=e(this),o=n.lockedTable&&r.closest("table")[0]===n.lockedTable[0];r.hasClass("k-hierarchy-cell")||r.hasClass("k-detail-cell")||r.hasClass("k-group-cell")||r.hasClass("k-edit-cell")||r.has("a.k-grid-delete").length||r.has("button.k-grid-delete").length||r.closest("tbody")[0]!==n.tbody[0]&&!o||e(t.target).is(":input")||(n.editable?n.editable.end()?(i&&e(be()).blur(),n.closeCell(),n.editCell(r)):n._scrollVirtualWrapper():n.editCell(r))}).on("focusin"+$e,function(){e.contains(this,be())||(clearTimeout(n.timer),n.timer=null)}).on("focusout"+$e,function(){n.timer=setTimeout(o,1)}):r.update!==!1&&(n.wrapper.on(Dt+$e,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit",function(t){t.preventDefault(),n.editRow(e(this).closest("tr"))}),n._isVirtualInlineEditable()&&n.wrapper.on("focusout"+$e,"tr:not(.k-grouping-row) > td",function(){n.editable&&!n.editable.end()&&n._scrollVirtualWrapper()})),r.destroy!==!1?n.wrapper.on(Dt+$e,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete",function(t){t.preventDefault(),t.stopPropagation(),n.removeRow(e(this).closest("tr"))}):n.wrapper.on(Dt+$e,"tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete",function(e){e.stopPropagation(),n._confirmation()||e.preventDefault()}))},editCell:function(t){var n,i,r,o;if(t=e(t),n=this,i=O(n.columns)[n.cellIndex(t)],r=n._modelForContainer(t),n.closeCell(),r&&le(i,r)&&!i.command){if(n.trigger(Ye,{model:r}))return;n._attachModelChange(r),n._editContainer=t,n._shouldClearEditableState&&n._clearEditableState(),n.editable=t.addClass("k-edit-cell").kendoEditable({fields:{field:i.field,format:i.format,editor:i.editor,values:i.values},model:r,target:n,change:function(e){n.trigger(Qe,{values:e.values,container:t,model:r})&&e.preventDefault()},skipFocus:!(!n._isVirtualIncellEditable()||!n._editableState)}).data("kendoEditable"),o=t.parent().addClass("k-grid-edit-row"),n.lockedContent&&oe(o[0],n._relatedRow(o).addClass("k-grid-edit-row")[0]),n.trigger(Ke,{container:t,model:r})}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?fe.support.scrollbar():0;this.lockedContent.height(t.height()-n)},_syncLockedContentHeight:function(){this.lockedTable&&(this.touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var e,t;this.lockedHeader&&(e=this.lockedHeader.children("table"),t=this.thead.parent(),this._adjustRowsHeight(e,t),re(e,t))},_syncLockedFooterHeight:function(){this.lockedFooter&&this.footer&&this.footer.length&&this._adjustRowsHeight(this.lockedFooter.children("table"),this.footer.find(".k-grid-footer-wrap > table"))},_destroyEditable:function(){var e=this,t=function(){if(e.editable){var t=e.editView?e.editView.element:e._editContainer;t&&(t.off(Dt+$e,"a.k-grid-cancel",e._editCancelClickHandler),t.off(Dt+$e,"a.k-grid-update",e._editUpdateClickHandler)),e._detachModelChange(),e.editable.destroy(),e.editable=null,e._editContainer=null,e._destroyEditView()}};e.editable&&("popup"!==e._editMode()||e._isMobile?t():e._editContainer.data("kendoWindow").bind("deactivate",t).close()),e._actionSheet&&(e._actionSheet.destroy(),e._actionSheet=null)},_destroyEditView:function(){this.editView&&(this.editView.purge(),this.editView=null,this.pane.navigate(""))},_attachModelChange:function(e){var t=this;t._modelChangeHandler=function(e){t._modelChange({field:e.field,model:this})},e.bind("change",t._modelChangeHandler)},_detachModelChange:function(){var e=this,t=e._editContainer,n=e._modelForContainer(t);n&&n.unbind(rt,e._modelChangeHandler)},closeCell:function(e){var t,n,i,r=this,o=r._editContainer;o&&(i=r._modelForContainer(o),e&&r.trigger("cancel",{container:o,model:i})||(r.trigger(it,{type:e?"cancel":"save",model:i,container:o}),o.removeClass("k-edit-cell"),t=O(r.columns)[r.cellIndex(o)],n=o.parent().removeClass("k-grid-edit-row"),r.lockedContent&&r._relatedRow(n).removeClass("k-grid-edit-row"),r._destroyEditable(),r._displayCell(o,t,i),r._shouldClearEditableState&&r._clearEditableState(),r.trigger("itemChange",{item:n,data:i,ns:me}),r.lockedContent&&oe(n.css("height","")[0],r._relatedRow(n).css("height","")[0])))},_displayCell:function(e,t,n){var i=this,r={storage:{},count:0},o=Te({},fe.Template,i.options.templateSettings),a=fe.template(i._cellTmpl(t,r),o);r.count>0&&(a=Ie(a,r.storage)),e.empty().html(a(n)),i.angular("compile",function(){return{elements:e,data:[{dataItem:n}]}})},removeRow:function(e){this._confirmation(e)&&this._removeRow(e)},_removeRow:function(t){var n,i,r,o=this,a=o._editMode();"incell"!==a&&o.cancelRow(),t=e(t),o.lockedContent&&(t=t.add(o._relatedRow(t))),t=t.hide(),n=o._modelForContainer(t),n&&!o.trigger(Xe,{row:t,model:n})?(o.options.persistSelection&&(i=o.dataSource.options.schema.model.id,r=n[i],delete o._selectedIds[r]),o.dataSource.remove(n),"inline"!==a&&"popup"!==a||o.dataSource.sync()):"incell"===a&&o._destroyEditable()},_editMode:function(){var e="incell",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e},editRow:function(t){var n,i,r,o=this;t instanceof ve?n=t:(t=e(t),n=o._modelForContainer(t)),i=o._editMode(),o.cancelRow(),n&&(t=o.tbody.children("["+fe.attr("uid")+"="+n.uid+"]"),o._attachModelChange(n),"popup"===i?o._createPopupEditor(n):"inline"===i?o._createInlineEditor(t,n):"incell"===i&&e(t).children(Pe).each(function(){var t=e(this),i=O(o.columns)[o.cellIndex(t)];if(n=o._modelForContainer(t),n&&(!n.editable||n.editable(i.field))&&i.field&&!i.selectable)return o.editCell(t),!1}),r=o.editView?o.editView.element:o._editContainer,r&&(this._editCancelClickHandler||(this._editCancelClickHandler=Ie(this._editCancelClick,this)),r.on(Dt+$e,"a.k-grid-cancel",this._editCancelClickHandler),this._editUpdateClickHandler||(this._editUpdateClickHandler=Ie(this._editUpdateClick,this)),r.on(Dt+$e,"a.k-grid-update",this._editUpdateClickHandler)))},_editUpdateClick:function(e){e.preventDefault(),e.stopPropagation(),this.saveRow()},_editCancelClick:function(t){var n,i=this,r=i.options.navigatable,o=i.editable.options.model,a=i.editView?i.editView.element:i._editContainer;t.preventDefault(),t.stopPropagation(),i.trigger("cancel",{container:a,model:o})||(n=i.items().index(e(i.current()).parent()),i.cancelRow(),r&&(i._setCurrent(i.items().eq(n).children().filter(Ve).first()),se(i.table,!0)))},_createPopupEditor:function(n){var i,r,o,a,s,l,d,u,c,h,p,f,m,g=this,v="<div "+fe.attr("uid")+'="'+n.uid+'" class="k-popup-edit-form'+(g._isMobile?" k-mobile-list":"")+'"><div class="k-edit-form-container">',_=[],b=O(g.columns),k=g.options.editable,w=k.template,y=Ce(k)?k.window:{},x=Te({},fe.Template,g.options.templateSettings);if(!g.trigger(Ye,{model:n})){if(y=y||{},w)for(typeof w===It&&(w=window.unescape(w)),v+=fe.template(w,x)(n),o=0,a=b.length;o<a;o++)i=b[o],i.command&&(h=ae(i.command,"edit"),h&&(r=h));else for(o=0,a=b.length;o<a;o++)i=b[o],i.selectable||(i.command?i.command&&(h=ae(i.command,"edit"),h&&(r=h)):(v+='<div class="k-edit-label"><label for="'+i.field+'">'+(i.title||i.field||"")+"</label></div>",le(i,n)?(_.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),v+="<div "+fe.attr("container-for")+'="'+i.field+'" class="k-edit-field"></div>'):(f={storage:{},count:0},s=fe.template(g._cellTmpl(i,f),x),f.count>0&&(s=Ie(s,f.storage)),v+='<div class="k-edit-field">'+s(n)+"</div>")));r&&Ce(r)&&(Ce(r.text)&&(l=r.text.update,d=r.text.cancel),Ce(r.iconClass)&&(u=r.iconClass.update,c=r.iconClass.cancel),r.attr&&(p=r.attr)),g._isMobile?(v+="</div></div>",g.editView=g.pane.append("<div data-"+fe.ns+'role="view" data-'+fe.ns+'use-native-scrolling="true" data-'+fe.ns+'init-widgets="false" class="k-grid-edit-form"><div data-'+fe.ns+'role="header" class="k-header">'+g._createButton({name:"update",text:l,attr:p})+(y.title||"Edit")+g._createButton({name:"canceledit",text:d,attr:p})+"</div>"+v+"</div>"),m=g._editContainer=g.editView.element.find(".k-popup-edit-form")):(v+='<div class="k-edit-buttons k-state-default">',v+=g._createButton({name:"update",text:l,attr:p,iconClass:u})+g._createButton({name:"canceledit",text:d,attr:p,iconClass:c}),v+="</div></div></div>",m=g._editContainer=e(v).appendTo(g.wrapper).eq(0).kendoWindow(Te({modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1,close:function(i){if(i.userTriggered){if(i.sender.element.focus(),g.trigger("cancel",{container:m,model:n}))return i.preventDefault(),t;var r=g.items().index(e(g.current()).parent());g.cancelRow(),g.options.navigatable&&(g._setCurrent(g.items().eq(r).children().filter(Ve).first()),se(g.table,!0))}}},y))),g.editable=g._editContainer.kendoEditable({fields:_,model:n,clearContainer:!1,target:g}).data("kendoEditable"),g._isMobile&&m.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),g._openPopUpEditor(),g.trigger(Ke,{container:m,model:n})}},_openPopUpEditor:function(){this._isMobile?this.pane.navigate(this.editView,this._editAnimation):this._editContainer.data("kendoWindow").center().open()},_createInlineEditor:function(t,n){var i,r,o,a=this,s=[];a.trigger(Ye,{model:n})||(a.lockedContent&&(t=t.add(a._relatedRow(t))),t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){if(r=e(this),i=O(a.columns)[a.cellIndex(r)],!i.command&&le(i,n))s.push({field:i.field,format:i.format,editor:i.editor,values:i.values}),r.attr(fe.attr("container-for"),i.field),r.empty();else if(i.command&&(o=ae(i.command,"edit"))){r.empty();var t,l,d,u,c;Ce(o)&&(Ce(o.text)&&(t=o.text.update,l=o.text.cancel),Ce(o.iconClass)&&(d=o.iconClass.update,u=o.iconClass.cancel),o.attr&&(c=o.attr)),e(a._createButton({name:"update",text:t,attr:c,iconClass:d})+a._createButton({name:"canceledit",text:l,attr:c,iconClass:u})).appendTo(r)}}),a._editContainer=t,a._editContainer.addClass("k-grid-edit-row"),a._shouldClearEditableState&&a._clearEditableState(),a.editable=new fe.ui.Editable(a._editContainer,{target:a,fields:s,model:n,skipFocus:!!(a._isVirtualInlineEditable()&&a._editableState&&a._editableState.field),clearContainer:!1}),t.length>1&&(oe(t[0],t[1]),a._applyLockedContainersWidth()),a.trigger(Ke,{container:t,model:n}))},cancelRow:function(e){var t,n=this,i=n._editContainer,r=n.virtualScrollable,o=r&&r._isScrolledToBottom();if(i){if(t=n._modelForContainer(i),!t||e&&n.trigger("cancel",{container:i,model:t}))return;n._destroyEditable(),n.dataSource.cancelChanges(t),n._isVirtualEditable()&&o&&n._restoreVirtualView(),n._clearEditableState(),n._displayRow("popup"!==n._editMode()?i:n.tbody.find("["+fe.attr("uid")+"="+t.uid+"]"))}},saveRow:function(){var t,n=this,i=this._editContainer,r=this._modelForContainer(i),o=e.Deferred();return i&&this.editable?(t=n.editable&&n.editable.end(),!t||this.trigger(Qe,{container:i,model:r})?(t||n._scrollVirtualWrapper(),o.reject().promise()):(n._clearEditableState(),this.dataSource.sync())):o.resolve().promise()},_displayRow:function(t){var n,i,r,o,a,s=this,l=s._modelForContainer(t),d=t.hasClass("k-state-selected"),u=t.hasClass("k-alt");l&&(s.lockedContent&&(n=e((u?s.lockedAltRowTemplate:s.lockedRowTemplate)(l)),s._relatedRow(t.last()).replaceWith(n)),s.angular("cleanup",function(){return{elements:t.get()}}),i=e((u?s.altRowTemplate:s.rowTemplate)(l)),t.is(":visible")||i.hide(),t.replaceWith(i),s.trigger("itemChange",{item:i,data:l,ns:me}),n&&n.length&&s.trigger("itemChange",{item:n,data:l,ns:me}),o=i,a=[{dataItem:l}],n&&n.length&&(o=i.add(n),a.push({dataItem:l})),s.angular("compile",function(){return{elements:o.get(),data:a}}),d&&(s.options.selectable||s._checkBoxSelection)&&s.select(i.add(n)),n&&oe(i[0],n[0]),r=i.next(),r.hasClass("k-detail-row")&&r.is(":visible")&&i.find(".k-hierarchy-cell .k-icon").removeClass("k-i-expand").addClass("k-i-collapse"))},_showMessage:function(t,n){var i,r,o,a=this;return a._isMobile?(i=fe.template('<ul><li class="km-actionsheet-title">#:title#</li><li><a href="\\#" class="k-button k-grid-delete">#:confirmDelete#</a></li></ul>'),r=e(i(t)).appendTo(a.view.element),o=a._actionSheet=new fe.mobile.ui.ActionSheet(r,{cancel:t.cancelDelete,cancelTemplate:'<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',close:function(){this.destroy()},command:function(t){var i=e(t.currentTarget).parent();i.hasClass("km-actionsheet-cancel")||a._removeRow(n)},popup:a._actionSheetPopupOptions}),o.open(n),!1):window.confirm(t.title)},_confirmation:function(e){var t=this,n=t.options.editable,i=n===!0||typeof n===It?t.options.messages.editable.confirmation:n.confirmation;return Ce(n)&&typeof n.mode===It&&typeof i!==At&&typeof i!==It&&i!==!1&&(i=t.options.messages.editable.confirmation),i===!1||null==i||(typeof i===At&&(i=i(t._modelForContainer(e))),t._showMessage({confirmDelete:n.confirmDelete||t.options.messages.editable.confirmDelete,cancelDelete:n.cancelDelete||t.options.messages.editable.cancelDelete,title:i===!0?t.options.messages.editable.confirmation:i},e))},cancelChanges:function(){var e=this;e.dataSource.cancelChanges(),e._isVirtualEditable()&&e._virtualPageToTop(function(){e.virtualScrollable.scrollToTop()})},saveChanges:function(){var e=this,t=e.editable&&e.editable.end();!t&&e.editable||e.trigger(st)?t||e._scrollVirtualWrapper():e.dataSource.sync()},addRow:function(){var e,t,n=this,i=n.dataSource,r=n._editMode(),o=n.options.editable.createAt||"",a=i.pageSize(),s=i.view()||[],l=o.toLowerCase()===Rt,d=n._isVirtualEditable();n.editable&&n.editable.end()||!n.editable?("incell"!=r&&n.cancelRow(),e=i.indexOf(s[0]),l&&(e+=s.length,a&&!i.options.serverPaging&&a<=s.length&&(e-=1)),e<0&&(e=i.page()>i.totalPages()?(i.page()-1)*a:0),n.options.navigatable&&"incell"==r&&n._removeCurrent(),d?n._virtualAddRow():(t=i.insert(e,{}),n._editModel(t))):n._scrollVirtualWrapper()},_editModel:function(e){var t,n,i,r,o=this,a=o.options.editable.createAt||"",s=o._editMode();e&&(t=e.uid,n=o.lockedContent?o.lockedTable:o.table,i=n.find("tr["+fe.attr("uid")+"="+t+"]"),r=i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(o._firstEditableColumnIndex(i)),"inline"===s&&i.length?o.editRow(i):"popup"===s?o.editRow(e):r.length&&o.editCell(r),"bottom"==a.toLowerCase()&&o.lockedContent&&(o.lockedContent[0].scrollTop=o.content[0].scrollTop=o.table[0].offsetHeight))},_virtualAddRow:function(){var e=this,t=(e.options.editable.createAt||"").toLowerCase()===Rt;e._clearEditableState(),t?e._virtualAddRowAtBottom():e._virtualAddRowAtTop()},_virtualAddRowAtTop:function(){var e,t=this,n=t.dataSource,i=t.virtualScrollable;1===n.page()?(e=n.insert(0,{}),t._editModel(e),i.scrollToTop()):t._virtualPageToTop(function(){e=n.insert(0,{}),t._editModel(e),i.scrollToTop()})},_virtualAddRowAtBottom:function(){var e,t=this,n=t.dataSource,i=t.virtualScrollable,r=n.total();n.at(r-1)instanceof ve?(e=n.insert(r,{}),t._virtualPageToBottom(function(){t._editModel(e),i.scrollToBottom()})):t._virtualPageToBottom(function(){e=n.insert(r,{}),t._editModel(e),i.scrollToBottom()})},_virtualPageToTop:function(e){var t=this;t._virtualPage(0,t.dataSource.take(),function(){e()})},_virtualPageToBottom:function(e){var t=this,n=t.dataSource,i=n.take(),r=n.total(),o=r>i?r-i:0;t._virtualPage(o,i,function(){e()})},_virtualPage:function(e,t,n){var i=this;i._isVirtualEditable()&&(i.virtualScrollable._preventScroll=!0,i.virtualScrollable._page(e,t,n))},_restoreVirtualView:function(){var e=this,t=e.dataSource,n=e.virtualScrollable,i=n.verticalScrollbar,r=n.wrapper,o=t.take(),a=t.total(),s=t.currentRangeStart(),l=a>=o?He.min(s,a-o):s,d=n.itemHeight,u=i.scrollTop()/d;e._virtualPage(l,o,function(){var e=n.itemHeight,t=u*e;n._isScrolledToBottom()?n.scrollToBottom():(n._preventScroll=i.scrollTop()!==t,i.scrollTop(t),r.scrollTop(i.scrollTop()-l*e))})},_firstEditableColumnIndex:function(e){var t,n,i,r=this,o=O(r.columns),a=r._modelForContainer(e);for(n=0,i=o.length;n<i;n++)if(t=o[n],a&&(!a.editable||a.editable(t.field))&&!t.command&&t.field&&t.hidden!==!0)return n;return-1},_toolbar:function(){var t,n=this,i=n.wrapper,r=n.options.toolbar,o=n.options.editable;r&&(t=n.wrapper.find(".k-grid-toolbar"),t.length||(Re(r)||(r=typeof r===It?r:n._toolbarTmpl(r).replace($t,"\\#"),r=Ie(fe.template(r),n)),t=e('<div class="k-header k-grid-toolbar" />').html(r({})).prependTo(i),n.angular("compile",function(){return{elements:t.get()}})),o&&o.create!==!1&&t.on(Dt+$e,".k-grid-add",function(e){e.preventDefault(),n.addRow()}).on(Dt+$e,".k-grid-cancel-changes",function(e){e.preventDefault(),n.cancelChanges()}).on(Dt+$e,".k-grid-save-changes",function(e){e.preventDefault(),n.saveChanges()}),t.on(Dt+$e,".k-grid-excel",function(e){e.preventDefault(),n.saveAsExcel()}),t.on(Dt+$e,".k-grid-pdf",function(e){e.preventDefault(),n.saveAsPDF()}))},_toolbarTmpl:function(e){var t,n,i=this,r="";if(Fe(e))for(t=0,n=e.length;t<n;t++)r+=i._createButton(e[t]);return r},_createButton:function(e){var n,i=e.template||Xt,o=typeof e===It?e:e.name||e.text,a=an[o]?an[o].className:"k-grid-"+(o||"").replace(/\s/g,""),s={className:a,text:o,attr:"",iconClass:""},l=this.options.messages.commands;if(!(o||Ce(e)&&e.template))throw Error("Custom commands should have name specified");return Ce(e)?(e=Te(!0,{},e),e.className&&Ee(s.className,e.className.split(" "))<0?e.className+=" "+s.className:e.className===t&&(e.className=s.className),"edit"===o&&(e=Te(!0,{},e),e.text=Ce(e.text)?e.text.edit:e.text,e.iconClass=Ce(e.iconClass)?e.iconClass.edit:e.iconClass),e.attr&&(Ce(e.attr)&&(e.attr=r(e.attr)),typeof e.attr===It&&(n=e.attr.match(/class="(.+?)"/),n&&Ee(n[1],e.className.split(" "))<0&&(e.className+=" "+n[1]))),s=Te(!0,s,an[o],{text:l[o]},e)):s=Te(!0,s,an[o],{text:l[o]}),fe.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(Dt+$e,t._groupableClickHandler):t._groupableClickHandler=function(n){var i=e(this),r=i.closest("tr"),o=t._groupRows?t._groupRows[t.wrapper.find(".k-grouping-row").index(r)]:{};i.hasClass("k-i-collapse")?t.trigger("groupCollapse",{group:o,element:r})||t.collapseGroup(r):t.trigger("groupExpand",{group:o,element:r})||t.expandGroup(r),n.preventDefault(),n.stopPropagation()},t._isLocked()?t.lockedTable.on(Dt+$e,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler):t.table.on(Dt+$e,".k-grouping-row .k-i-expand, .k-grouping-row .k-i-collapse",t._groupableClickHandler),t._attachGroupable()},_attachGroupable:function(){var t=this,n=t.wrapper,i=t.options.groupable,r=Ge+"["+fe.attr("field")+"]",o=t.content?".k-grid-header:first "+r:"table:first>.k-grid-header "+r;i&&i.enabled!==!1&&(n.has("div.k-grouping-header")[0]||e("<div>&nbsp;</div>").addClass("k-grouping-header").prependTo(n),t.groupable&&t.groupable.destroy(),t.groupable=new me.Groupable(n,Te({},i,{draggable:t._draggableInstance,groupContainer:">div.k-grouping-header",dataSource:t.dataSource,draggableElements:o,filter:o,allowDrag:t.options.reorderable,change:function(e){t.trigger("group",{groups:e.groups})?e.preventDefault():(t._clearEditableState(),t.dataSource.options.endless&&(t.dataSource.options.endless=null,t._endlessPageSize=t.dataSource.options.pageSize,t.dataSource.pageSize(t.dataSource.options.pageSize)))}})))},_continuousItems:function(t,n){var i,r,o,a,s,l,d,u;if(this.lockedContent){for(i=this,r=i.table.add(i.lockedTable),o=e(t,r[0]),a=e(t,r[1]),s=n?H(i.columns).length:1,l=n?i.columns.length-s:1,d=[],u=0;u<o.length;u+=s)Ae.apply(d,o.slice(u,u+s)),Ae.apply(d,a.splice(0,l));return d}},_selectable:function(){var n,i,r,o,a=this,s=[],l=a._isLocked(),d=a.options.selectable;d&&(a.selectable&&a.selectable.destroy(),a.options.persistSelection===!0&&(a._selectedIds={}),d=fe.ui.Selectable.parseOptions(d),n=d.multiple,i=d.cell,a._hasDetails()&&(s[s.length]=".k-detail-row"),(a.options.groupable||a._hasFooters()||a._groups())&&(s[s.length]=".k-grouping-row,.k-group-footer"),s=s.join(","),""!==s&&(s=":not("+s+")"),r=a.table,l&&(r=r.add(a.lockedTable)),o=">"+(i?Le:"tbody>tr"+s),a.selectable=new fe.ui.Selectable(r,{filter:o,aria:!0,multiple:n,change:function(){a.options.persistSelection&&!i&&a._persistSelectedRows(),a.trigger(rt)},useAllItems:l&&n&&i,relatedTarget:function(t){var n,r,o,s;if(!i&&l){for(r=e(),o=0,s=t.length;o<s;o++)n=a._relatedRow(t[o]),Ee(n[0],t)<0&&(r=r.add(n));return r}},continuousItems:function(){return a._continuousItems(o,i)}}),a.options.navigatable&&r.on("keydown"+$e,function(o){
var s=a.current(),d=o.target;if(o.keyCode===xe.SPACEBAR&&!o.shiftKey&&e.inArray(d,r)>-1&&!s.is(".k-edit-cell,.k-header")&&s.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")){if(o.preventDefault(),o.stopPropagation(),s=i?s:s.parent(),l&&!i&&(s=s.add(a._relatedRow(s))),n)if(o.ctrlKey){if(s.hasClass(_t))return s.removeClass(_t),a.trigger(rt),t}else a.selectable.clear();else a.selectable.clear();i||(a.selectable._lastActive=s),a.selectable.value(s)}else!i&&(o.shiftKey&&o.keyCode==xe.LEFT||o.shiftKey&&o.keyCode==xe.RIGHT||o.shiftKey&&o.keyCode==xe.UP||o.shiftKey&&o.keyCode==xe.DOWN||o.keyCode===xe.SPACEBAR&&o.shiftKey)&&(o.preventDefault(),o.stopPropagation(),s=s.parent(),l&&(s=s.add(a._relatedRow(s))),n?(a.selectable._lastActive||(a.selectable._lastActive=s),a.selectable.selectRange(a.selectable._firstSelectee(),s)):(a.selectable.clear(),a.selectable.value(s)))}))},_clipboard:function(){var e,t=this.options,n=t.selectable;n&&t.allowCopy&&(e=this,t.navigatable||e.table.add(e.lockedTable).attr("tabindex",0).on("mousedown"+$e+" keydown"+$e,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}).on("mousedown"+$e,Oe+">"+Ve,Ie(ue,e)),e.copyHandler=Ie(e.copySelection,e),e.updateClipBoardState=function(){e.areaClipBoard&&e.areaClipBoard.val(e.getTSV()).focus().select()},e.bind("change",e.updateClipBoardState),e.wrapper.on("keydown",e.copyHandler),e.clearAreaHandler=Ie(e.clearArea,e),e.wrapper.on("keyup",e.clearAreaHandler))},copySelection:function(t){t instanceof jQuery.Event&&!t.ctrlKey&&!t.metaKey||e(t.target).is("input:visible,textarea:visible")||window.getSelection&&""+window.getSelection()||document.selection&&document.selection.createRange().text||(this.areaClipBoard||(this.areaClipBoard=e("<textarea />").css({position:"fixed",top:"50%",left:"50%",opacity:0,width:0,height:0}).appendTo(this.wrapper)),this.areaClipBoard.val(this.getTSV()).focus().select())},getTSV:function(){var t,n,i,r,o,a,s=this,l=s.select(),d="\t",u=s.options.allowCopy,c=!0;return e.isPlainObject(u)&&u.delimeter&&(d=u.delimeter),t="",l.length&&(l.eq(0).is("tr")&&(l=l.find("td:not(.k-group-cell)")),c&&l.filter(":visible"),n=[],i=this.columns.length,r=s._isLocked()&&H(s.columns).length,o=!0,e.each(l,function(t,a){var l,d,u,h;a=e(a),l=a.closest("tr"),d=l.index(),u=a.index(),c&&(u-=a.prevAll(":hidden").length),r&&o&&(o=e.contains(s.lockedTable[0],a[0])),s._groups()&&o&&(u-=s._groups()),u=o?u:u+r,i>u&&(i=u),h=a.text(),n[d]||(n[d]=[]),n[d][u]=h}),a=n.length,n=e.each(n,function(e,t){t&&(n[e]=t.slice(i),a>e&&(a=e))}),e.each(n.slice(a),function(e,n){t+=n?n.join(d)+"\r\n":"\r\n"})),t},clearArea:function(t){var n;this.areaClipBoard&&t&&t.target===this.areaClipBoard[0]&&(n=this.options.navigatable?e(this.current()).closest("table"):this.table,se(n,!0)),this.areaClipBoard&&(this.areaClipBoard.remove(),this.areaClipBoard=null)},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=Ie(this.hideMinScreenCols,this),e(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){var e=this.columns,t=window.innerWidth>0?window.innerWidth:screen.width;return this._iterateMinScreenCols(e,t)},_iterateMinScreenCols:function(e,n){var i,r,o,a=!1;for(i=0;i<e.length;i++)r=e[i],o=r.minScreenWidth,o!==t&&null!==o&&(a=!0,o>n?this.hideColumn(r):this.showColumn(r)),!r.hidden&&r.columns&&(a=this._iterateMinScreenCols(r.columns,n)||a);return a},_relatedRow:function(t){var n,i,r=this.lockedTable;return t=e(t),r?(n=t.closest(this.table.add(this.lockedTable)),i=n.find(">tbody>tr").index(t),n=n[0]===this.table[0]?r:this.table,n.find(">tbody>tr").eq(i)):t},clearSelection:function(){var e=this;return e.selectable&&e.selectable.clear(),e._checkBoxSelection?(e._deselectCheckRows(e.select()),t):(e.options.persistSelection&&e._persistSelectedRows(),e.trigger(rt),t)},select:function(n){var i=this,r=i.selectable;return n=i.table.add(i.lockedTable).find(n),n.length?(r&&!r.options.multiple&&(r.clear(),n=n.first()),i._isLocked()&&(n=n.add(n.map(function(){return i._relatedRow(this)}))),r?r.value(n):(n.each(function(){e(this).addClass(_t).find(kt).prop("checked",!0).attr("aria-label","Deselect row").attr("aria-checked",!0)}),i.select().length===i.items().length&&i._toggleHeaderCheckState(!0),i.options.persistSelection&&i._persistSelectedRows(),i.trigger(rt)),t):r?r.value():i.items().filter("."+_t)},_toggleHeaderCheckState:function(e){var t=this;e?t.thead.add(t.lockedHeader).find("tr "+kt).prop("checked",!0).attr("aria-checked",!0).attr("aria-label","Deselect all rows"):t.thead.add(t.lockedHeader).find("tr "+kt).prop("checked",!1).attr("aria-checked",!1).attr("aria-label","Select all rows")},_deselectCheckRows:function(t){var n=this;t=n.table.add(n.lockedTable).find(t),n._isLocked()&&(t=t.add(t.map(function(){return n._relatedRow(this)}))),t.each(function(){e(this).removeClass(_t).find(kt).attr("aria-checked",!1).prop("checked",!1).attr("aria-label","Select row")}),n._toggleHeaderCheckState(!1),n.options.persistSelection&&n._persistSelectedRows(),n.trigger(rt)},_persistSelectedRows:function(){var e,t,n,i=this,r=i.items(),o=i.dataSource.options,a=o.schema.model.id,s={};for(i.select().each(function(){t=i.dataItem(this),s[t[a]]=!0}),n=0;n<r.length;n++)t=i.dataItem(r[n]),e=t[a],s[e]?i._selectedIds[e]=!0:delete i._selectedIds[e]},selectedKeyNames:function(){var e,t=this,n=[];for(e in t._selectedIds)n.push(e);return n.sort(),n},_updateCurrentAttr:function(t,n){var i=e(t).data("headerId");e(t).removeClass(gt).closest("table").removeAttr("aria-activedescendant"),i?(i=i.replace(this._cellId,""),e(t).attr("id",i)):e(t).removeAttr("id"),n.data("headerId",n.attr("id")).attr("id",this._cellId).addClass(gt).closest("table").attr("aria-activedescendant",this._cellId),this._current=n},_scrollCurrent:function(){var t,n,i,r,o,a,s=this._current,l=this.options.scrollable;s&&l&&(t=s.parent(),n=t.closest("table").parent(),i=n.is(".k-grid-content-locked,.k-grid-header-locked"),r=n.is(".k-grid-content-locked,.k-grid-content,.k-virtual-scrollable-wrap"),o=e(this.content).find(">.k-virtual-scrollable-wrap").addBack().last()[0],r&&(l.virtual?(a=Math.max(Ee(t[0],this._items(t.parent())),0),this._rowVirtualIndex=this.virtualScrollable.itemIndex(a),this.virtualScrollable.scrollIntoView(t)):this._scrollTo(this._relatedRow(t)[0],o)),this.lockedContent&&(this.lockedContent[0].scrollTop=o.scrollTop),i||this._scrollTo(s[0],o))},current:function(e){return this._setCurrent(e,!0)},_setCurrent:function(t,n){var i=this._current;return t=e(t),t.length&&(i&&i[0]===t[0]||(this._updateCurrentAttr(i,t),this._scrollCurrent(),n||this.trigger(St,{element:t}))),t&&t.length&&(this._lastCellIndex=t.parent().children(Pe).index(t)),this._current},_removeCurrent:function(){this._current&&(this._current.removeClass(gt),this._current=null)},_scrollTo:function(t,n){var i,r=t.tagName.toLowerCase(),o="td"===r||"th"===r,a=t[o?"offsetLeft":"offsetTop"],s=t[o?"offsetWidth":"offsetHeight"],l=n[o?"scrollLeft":"scrollTop"],d=n[o?"clientWidth":"clientHeight"],u=a+s,c=0,h=0,p=0;en&&o&&(i=e(t).closest("table")[0],tn.msie?h=i.offsetLeft:tn.mozilla&&(p=i.offsetLeft-fe.support.scrollbar())),l=Math.abs(l+h-p),c=l>a?a:u>l+d?s<=d?u-d:a:l,c=Math.abs(c+h)+p,n[o?"scrollLeft":"scrollTop"]=c},_navigatable:function(){var t,n,i,r=this;r.options.navigatable&&(t=r.table.add(r.lockedTable),n=r.thead.parent().add(e(">table",r.lockedHeader)),i=t,r.options.scrollable&&(i=i.add(n),n.attr(Et,-1)),this._navigatableTables=i,i.off("mousedown"+$e+" focus"+$e+" focusout"+$e+" keydown"+$e),n.on("keydown"+$e,Ie(r._openHeaderMenu,r)).find("a.k-link").attr("tabIndex",-1),t.attr(Et,He.max(t.attr(Et)||0,0)).on("mousedown"+$e+" keydown"+$e,".k-detail-cell",function(e){e.target!==e.currentTarget&&e.stopImmediatePropagation()}),i.on(fe.support.touch?"touchstart"+$e:"mousedown"+$e,Oe+">"+Ve,Ie(ue,r)).on("focus"+$e,Ie(r._tableFocus,r)).on("focusout"+$e,Ie(r._tableBlur,r)).on("keydown"+$e,Ie(r._tableKeyDown,r)))},_openHeaderMenu:function(e){e.altKey&&e.keyCode==xe.DOWN&&(this.current().find(".k-grid-filter, .k-header-column-menu").click(),e.stopImmediatePropagation())},_setTabIndex:function(e){this._navigatableTables.attr(Et,-1),e.attr(Et,0)},_tableFocus:function(t){var n,i;fe.support.touch||(n=this.current(),i=e(t.currentTarget),n&&n.is(":visible")?n.addClass(gt):this._setCurrent(i.find(je)),this._setTabIndex(i))},_tableBlur:function(){var e=this.current();e&&e.removeClass(gt)},_tableKeyDown:function(n){var i,r=this.current(),o=this.virtualScrollable&&this.virtualScrollable.fetching(),a=e(n.target),s=!n.isDefaultPrevented()&&!a.is(":button,a,:input,a>.k-icon");return o?(n.preventDefault(),t):(r=r?r:e(this.lockedTable).add(this.options.scrollable?this.table:this.tbody).find(je),r.length&&(i=!1,s&&n.keyCode==xe.UP&&(i=this._moveUp(r,n.shiftKey)),s&&n.keyCode==xe.DOWN&&(i=this._moveDown(r,n.shiftKey)),s&&n.keyCode==(en?xe.LEFT:xe.RIGHT)&&(i=this._moveRight(r,n.altKey,n.shiftKey,n.ctrlKey,n.currentTarget)),s&&n.keyCode==(en?xe.RIGHT:xe.LEFT)&&(i=this._moveLeft(r,n.altKey,n.shiftKey,n.ctrlKey,n.currentTarget)),s&&n.keyCode==xe.PAGEDOWN&&(i=this._handlePageDown()),s&&n.keyCode==xe.PAGEUP&&(i=this._handlePageUp()),s&&n.keyCode==xe.HOME&&(i=this._handleHome(r,n.ctrlKey)),s&&n.keyCode==xe.END&&(i=this._handleEnd(r,n.ctrlKey)),n.keyCode!=xe.ENTER&&n.keyCode!=xe.F2||(i=this._handleEnterKey(r,n.currentTarget,a)),n.keyCode==xe.ESC&&(i=this._handleEscKey(r,n.currentTarget)),n.keyCode==xe.TAB&&(i=this._handleTabKey(r,n.currentTarget,n.shiftKey)),i&&(n.preventDefault(),n.stopPropagation())),t)},_moveLeft:function(t,n,i,r,o){var a,s,l=t.parent(),d=l.parent();return n?this.collapseRow(l):r&&t.is(".k-header")&&this.options.reorderable?this._moveColumn(t,!0):(s=d.find(Oe).index(l),a=this._prevHorizontalCell(d,t,s),a[0]||(i?this.lockedTable?(a=this._relatedRow(l),e.contains(this.lockedTable[0],l[0])&&(a=a.prevAll(We+":first")),a=a.children(Pe+":last")):a=this._tabNext(t,o,!0):(d=this._horizontalContainer(d),a=this._prevHorizontalCell(d,t,s),a[0]!==t[0]&&se(d.parent(),!0))),this._setCurrent(a)),!0},_moveRight:function(t,n,i,r,o){var a,s,l=t.parent(),d=l.parent();return n?this.expandRow(l):r&&t.is(".k-header")&&this.options.reorderable?this._moveColumn(t,!1):(s=d.find(Oe).index(l),a=this._nextHorizontalCell(d,t,s),a[0]||(i?this.lockedTable?(a=this._relatedRow(l),e.contains(this.table[0],l[0])&&(a=a.nextAll(We+":first")),a=a.children(Pe+":first")):a=this._tabNext(t,o,!1):(d=this._horizontalContainer(d,!0),a=this._nextHorizontalCell(d,t,s),a[0]!==t[0]&&se(d.parent(),!0))),this._setCurrent(a)),!0},_moveUp:function(e,t){var n,i,r=e.parent().parent();return t?(n=e.parent(),n=n.prevAll(We+":first"),n=e.parent().is(We)?n.children().eq(e.index()):n.children(Pe+":last")):(n=this._prevVerticalCell(r,e),n[0]||(this._lastCellIndex=0,r=this._verticalContainer(r,!0),n=this._prevVerticalCell(r,e),n[0]&&se(r.parent(),!0))),i=this._lastCellIndex||0,this._setCurrent(n),this._lastCellIndex=i,!0},_moveDown:function(e,t){var n,i,r=e.parent().parent();return t?(n=e.parent(),n=n.nextAll(We+":first"),n=e.parent().is(We)?n.children().eq(e.index()):n.children(Pe+":first")):(n=this._nextVerticalCell(r,e),n[0]||(this._lastCellIndex=0,r=this._verticalContainer(r),n=this._nextVerticalCell(r,e),n[0]&&se(r.parent(),!0))),i=this._lastCellIndex||0,this._setCurrent(n),this._lastCellIndex=i,!0},_moveColumn:function(t,n){var i=this.wrapper.data().kendoReorderable.element.find(this._draggableInstance.options.filter+":visible"),r=m(S(this.columns)),o=i.index(e(t)),a=n?-1:1,s=r[o],l=D(r,this.columns,o,o+a);l>=0&&this.reorderColumn(l,s,n)},_handleHome:function(e,t){var n,i=e.parent(),r=i.parent(),o=this.lockedTable&&this.lockedTable.children("tbody")[0]===r[0],a=r[0]===this.tbody[0];if(t?n=this.lockedTable?this.lockedTable.find(Ue+">"+Ve+":first"):this.table.find(Ue+">"+Ve+":first"):(a||o)&&(a&&this.lockedTable&&(i=this._relatedRow(i)),n=i.children(Pe+":first")),n&&n.length)return this._setCurrent(n),!0},_handleEnd:function(e,t){var n,i=e.parent(),r=i.parent(),o=this.lockedTable&&this.lockedTable.children("tbody")[0]===r[0],a=r[0]===this.tbody[0];if(t?n=this.table.find(qe+">"+Ve+":last"):(a||o)&&(!a&&this.lockedTable&&(i=this._relatedRow(i)),n=i.children(Pe+":last")),n&&n.length)return this._setCurrent(n),!0},_handlePageDown:function(){return!!this.options.pageable&&(this.dataSource.page(this.dataSource.page()+1),!0)},_handlePageUp:function(){return!!this.options.pageable&&(this.dataSource.page(this.dataSource.page()-1),!0)},_handleTabKey:function(t,n,i){var r,o=this.options.editable&&"incell"==this._editMode();return!(!o||t.is("th"))&&(r=e(be()).closest(".k-edit-cell"),r[0]&&r[0]!==t[0]&&(t=r),r=this._tabNext(t,n,i),!!r.length&&(this._handleEditing(t,r,r.closest("table")),!0))},_handleEscKey:function(t,n){var i,r=be(),o="incell"==this._editMode();return ce(t)?(o?this.closeCell(!0):(i=e(t).parent().index(),r&&r.blur(),this.cancelRow(!0),i>=0&&this._setCurrent(this.items().eq(i).children(Ve).first())),tn.msie&&tn.version<9&&document.body.focus(),se(n,!0),!0):!!t.has(r).length&&(se(n,!0),!0)},_toggleCurrent:function(e,t){var n=e.parent();return n.is(".k-grouping-row")?(n.find(".k-icon:first").click(),!0):!(t||!n.is(".k-master-row"))&&(n.find(".k-icon:first").click(),!0)},_handleEnterKey:function(t,n,i){var r,o,a=this.options.editable&&this.options.editable.update!==!1,s=i.closest("[role=gridcell]");return i.is("table")||e.contains(t[0],i[0])||(t=s),t.is("th")?(r=t.find(".k-link"),r.length?r.click():t.find(kt).focus(),!0):!!this._toggleCurrent(t,a)||(o=t.find(":kendoFocusable:first"),o[0]&&!t.hasClass("k-edit-cell")&&t.hasClass("k-state-focused")?(o.focus(),!0):!(!a||i.is(":button,.k-button,textarea"))&&(s[0]||(s=t),this._handleEditing(s,!1,n),!0))},_nextHorizontalCell:function(e,t,n){var i,r,o,a=t.nextAll(Pe);return a.length||(i=e.find(Oe),r=i.index(t.parent()),r!=-1)?a.first():t.hasClass("k-header")?(o=[],z([H(this.columns)[0]],U(i.eq(0).children(":visible").first()),o,0,0),o[n]?o[n][0]:t):t.parent().hasClass("k-filter-row")?i.last().children(Pe).first():i.eq(n).children(Pe).first()},_prevHorizontalCell:function(e,t,n){var i,r,o,a,s=t.prevAll(Pe);return s.length||(i=e.find(Oe),r=i.index(t.parent()),r!=-1)?s.first():t.hasClass("k-header")?(o=[],a=H(this.columns),z([a[a.length-1]],U(i.eq(0).children().last()),o,0,0),o[n]?o[n][0]:t):t.parent().hasClass("k-filter-row")?i.last().children(Pe).last():i.eq(n).children(Pe).last()},_currentDataIndex:function(e,n){var i,r=n.attr("data-index");return r?(i=H(this.columns).length,i&&!e.closest("div").hasClass("k-grid-content-locked")[0]?r-i:r):t},_prevVerticalCell:function(t,n){var i,r=n.parent(),o=t.children(Oe),a=o.index(r),s=this._currentDataIndex(t,n);if(s||n.hasClass("k-header"))return i=W(n),i.eq(i.length-2);if(s=Math.max(r.children(Pe).index(n),this._lastCellIndex||0),r.hasClass("k-filter-row"))return V(t).filter(p).eq(s);if(a==-1){if(r=t.find("tr.k-filter-row:visible"),!r[0])return V(t).filter(p).eq(s)}else r=0===a?e():o.eq(a-1);return i=r.children(Pe),i.eq(i.length>s?s:0)},_nextVerticalCell:function(e,n){var i,r,o,a,s,l,d=n.parent(),u=e.children(Oe),c=u.index(d),h=this._currentDataIndex(e,n);if(c!=-1&&h===t&&n.hasClass("k-header"))return U(n).eq(1);if(h=h?parseInt(h,10):d.children(Pe).index(n),h=Math.max(h,this._lastCellIndex||0),d=u.eq(c==-1?0:c+n[0].rowSpan),r=h,this._currentDataIndex(e,n)!==t)for(o=d.children(":not(.k-group-cell):not(.k-hierarchy-cell)"),a=o.filter(":hidden"),s=0,l=a.length;s<l;s++)o.index(a[s])<h&&r--;return h=r,i=d.children(Pe),i.eq(i.length>h?h:0)},_verticalContainer:function(e,t){var n=e.parent(),i=this._navigatableTables.length,r=Math.floor(i/2),o=Ee(n[0],this._navigatableTables);return t&&(r*=-1),o+=r,(o>=0||o<i)&&(n=this._navigatableTables.eq(o)),n.find(t?"thead":"tbody")},_horizontalContainer:function(e,t){var n,i,r=this._navigatableTables.length;return r<=2?e:(n=e.parent(),i=Ee(n[0],this._navigatableTables),i+=t?1:-1,!t||2!=i&&i!=r?!t&&(1==i||i<0)?e:this._navigatableTables.eq(i).find("thead, tbody"):e)},_tabNext:function(e,t,n){var i=!0,r=n?e.prevAll(Pe+":first"):e.nextAll(":visible:first");return r.length||(r=e.parent(),this.lockedTable&&(i=n&&t==this.lockedTable[0]||!n&&t==this.table[0],r=this._relatedRow(r)),i&&(r=r[n?"prevAll":"nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first")),r=r.children(Pe+(n?":last":":first"))),r},_handleEditing:function(n,i,r){var o,a,s=this,l=e(be()),d=s._editMode(),u=tn.msie,c=u&&tn.version<9,h=s._editContainer,p=s.options.editable&&s.options.editable.update!==!1;if(r=e(r),a="incell"==d?n.hasClass("k-edit-cell"):n.parent().hasClass("k-grid-edit-row"),s.editable){if(e.contains(h[0],l[0])&&(tn.opera||c?l.blur().change().triggerHandler("blur"):(l.blur(),u&&l.blur())),!s.editable)return se(r),t;if(!s.editable.end())return s._setCurrent("incell"==d?h:h.children().filter(Pe).first()),o=h.find(":kendoFocusable:first")[0],o&&o.focus(),t;"incell"==d?s.closeCell():(s.saveRow(),a=!0)}i&&s._setCurrent(i),c&&document.body.focus(),se(r,!0),p&&(!a&&!i||i)&&("incell"==d?s.editCell(s.current()):s.editRow(s.current().parent()))},_wrapper:function(){var e=this,t=e.table,n=e.options.height,i=e.element;i.is("div")||(i=i.wrap("<div/>").parent()),e.wrapper=i.addClass("k-grid k-widget k-display-block"),n&&(e.wrapper.css(Ft,n),t.css(Ft,"auto")),e._initMobile()},_initMobile:function(){var t,n=this.options,i=this;this._isMobile=n.mobile===!0&&fe.support.mobileOS||"phone"===n.mobile||"tablet"===n.mobile,this._isMobile&&(t=this.wrapper.addClass("k-grid-mobile").wrap("<div data-"+fe.ns+'stretch="true" data-'+fe.ns+'role="view" data-'+fe.ns+'init-widgets="false"></div>').parent(),this.pane=fe.mobile.ui.Pane.wrap(t),this.view=this.pane.view(),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"},n.height&&this.pane.element.parent().css(Ft,n.height),this._editAnimation="slide",this.view.bind("show",function(){i._isLocked()&&(i._updateTablesWidth(),i._applyLockedContainersWidth(),i._syncLockedContentHeight(),i._syncLockedHeaderHeight(),i._syncLockedFooterHeight())}))},_tbody:function(){var t,n=this,i=n.table;t=i.find(">tbody"),t.length||(t=e("<tbody/>").appendTo(i)),n.tbody=t.attr("role","rowgroup")},_scrollable:function(){var t,n,i,r,o,a,s,l=this,d=l.options,u=d.scrollable,c=u!==!0&&u.virtual&&!l.virtualScrollable,h=!fe.support.kineticScrollNeeded||c?fe.support.scrollbar():0;u&&(t=l.wrapper.children(".k-grid-header"),t[0]||(t=e('<div class="k-grid-header" />').insertBefore(l.table)),t.css(en?"padding-left":"padding-right",u.virtual?h+1:h),n=e('<table role="grid" />'),nn&&n.attr("cellspacing",0),n.width(l.table[0].style.width),n.append(l.thead),t.empty().append(e('<div class="k-grid-header-wrap k-auto-scrollable" />').append(n)),l.content=l.table.parent(),l.content.is(".k-virtual-scrollable-wrap, .km-scroll-container")&&(l.content=l.content.parent()),l.content.is(".k-grid-content, .k-virtual-scrollable-wrap")||(l.content=l.table.wrap('<div class="k-grid-content k-auto-scrollable" />').parent()),c&&l._createVirtualScrollable(),i=t.children(".k-grid-header-wrap"),l.scrollables=i.add(l.content),r=l.wrapper.find(".k-grid-footer"),r.length&&(l.scrollables=l.scrollables.add(r.children(".k-grid-footer-wrap"))),i.unbind("scroll"+$e).bind("scroll"+$e,function(e){l.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft)}),u.virtual?l.content.find(">.k-virtual-scrollable-wrap").unbind("scroll"+$e).bind("scroll"+$e,function(){l.scrollables.scrollLeft(this.scrollLeft),l.lockedContent&&(l.lockedContent[0].scrollTop=this.scrollTop)}):(o=u.endless,a=l.dataSource.options.pageSize,o&&(l._endlessPageSize=a),l.content.unbind("scroll"+$e).bind("scroll"+$e,function(e){l.scrollables.not(e.currentTarget).scrollLeft(this.scrollLeft),l.lockedContent&&e.currentTarget==l.content[0]&&(l.lockedContent[0].scrollTop=this.scrollTop),o&&this.scrollTop+this.clientHeight-this.scrollHeight>=-10&&!l._endlessFetchInProgress&&l._endlessPageSize<l.dataSource.total()&&(l._skipRerenderItemsCount=l._endlessPageSize,l._endlessPageSize=l._endlessPageSize+a,l.dataSource.options.endless=!0,l._endlessFetchInProgress=!0,l.dataSource.pageSize(l._endlessPageSize))}),s=l.content.data("kendoTouchScroller"),s&&s.destroy(),s=fe.touchScroller(l.content),s&&s.movable&&(l.touchScroller=s,s.movable.bind("change",function(e){l.scrollables.scrollLeft(-e.sender.x),l.lockedContent&&l.lockedContent.scrollTop(-e.sender.y)}),l.one(lt,function(e){e.sender.wrapper.addClass("k-grid-backface")}))))},_createVirtualScrollable:function(){var e=this;e.virtualScrollable&&e.virtualScrollable.destroy(),e.virtualScrollable=new on(e.content,{dataSource:e.dataSource,itemHeight:function(){return e._averageRowHeight()},page:function(){e._restoreEditableState()},scroll:function(){e._focusEditable()}}),e.virtualScrollable.bind(pt,Ie(e._onVirtualPaging,e))},_onVirtualPaging:function(){var e=this;e._cacheEditableState(),e._isVirtualIncellEditable()&&(e._shouldClearEditableState=!1,e.closeCell(),e._shouldClearEditableState=!0)},_isVirtualEditable:function(){return this._isVirtualIncellEditable()||this._isVirtualInlineEditable()||this._isVirtualPopupEditable()},_isVirtualInlineEditable:function(){return this.virtualScrollable&&this._editMode()===Bt},_isVirtualIncellEditable:function(){return this.virtualScrollable&&this._editMode()===Nt},_isVirtualPopupEditable:function(){return this.virtualScrollable&&"popup"===this._editMode()},_scrollVirtualWrapper:function(){var e=this,t=e.virtualScrollable;(e._isVirtualInlineEditable()||e._isVirtualIncellEditable())&&(t._isScrolledToBottom()?t._scrollWrapperToBottom():t._isScrolledToTop()&&t._scrollWrapperToTop())},_scrollVirtualWrapperOnColumnResize:function(){var e=this.virtualScrollable;e&&e._scrollWrapperOnColumnResize()},_restoreEditableState:function(){var t,i,r=this,o=r._editableState||{},a=o.model,s=r.dataSource,l=r._isVirtualInlineEditable(),d=r._isVirtualIncellEditable();(l||d)&&a&&s._getByUid(a.uid,s.view())&&(l?(r._shouldClearEditableState=!1,r.editRow(a),r._focusEditable()):d&&(t=r.tbody.children(n(Pt,a.uid)),i=e(t).children(n(zt,o.field)),i[0]&&(r._shouldClearEditableState=!1,r.editCell(i),r._focusEditable()))),r._shouldClearEditableState=!0},_focusEditable:function(){var e=this,t=(e._editableState||{}).field,i=e._editContainer;i&&!ze(i[0],be())&&e._canFocusEditable()&&(e._isVirtualInlineEditable()?i.find(n(Mt,t)).find(vt).eq(0).focus():e._isVirtualIncellEditable()&&i.find(vt).eq(0).focus())},_canFocusEditable:function(){var e=this;return(e._isVirtualIncellEditable()||e._isVirtualInlineEditable())&&e.virtualScrollable._isElementVisible(e._editContainer)},_cacheEditableState:function(){var t,n,i=this,r=i._editContainer,o=r?i._modelForContainer(r):null,a=i._isVirtualInlineEditable(),s=i._isVirtualIncellEditable();(a||s)&&o&&(i._clearEditableState(),t=e(be()),r&&t[0]&&ze(r[0],t[0])&&(t.change(),n=fe.widgetInstance(t,fe.ui),n&&Re(n.value)&&t.is(Ht)&&(n.value(t.val()),n.trigger(rt))),a?i._editableState={model:o,field:t.closest("["+fe.attr(Mt)+"]").attr(fe.attr(Mt))}:s&&(i._editableState={model:o,field:r.attr(fe.attr(zt))}))},_clearEditableState:function(){var e=this;e.virtualScrollable&&(e._editableState=null)},_destroyVirtualScrollable:function(){var e=this;e._clearEditableState(),e.virtualScrollable&&e.virtualScrollable.element&&e.virtualScrollable.destroy(),e.virtualScrollable=null},_renderNoRecordsContent:function(){var t,n=this;n.options.noRecords&&(t=n.table.parent().children("."+wt),t.length&&(n.angular("cleanup",function(){return{elements:t.get()}}),t.remove()),n.dataSource&&n.dataSource.view().length||(t=e(n.noRecordsTemplate({})).insertAfter(n.table),n.angular("compile",function(){return{elements:t.get(),data:[{}]}})))},_setContentWidth:function(t){var n,i=this,r="k-grid-content-expander",o='<div class="'+r+'"></div>',a=i.resizable;i.options.scrollable&&i.wrapper.is(":visible")&&(n=i.table.parent().children("."+r),i._setContentWidthHandler=Ie(i._setContentWidth,i),i.dataSource&&i.dataSource.view().length?n[0]&&(n.remove(),a&&a.unbind("resize",i._setContentWidthHandler)):(n[0]||(n=e(o).appendTo(i.table.parent()),a&&a.bind("resize",i._setContentWidthHandler)),i.thead&&(n.width(i.thead.width()),isNaN(parseFloat(t,10))||i.content.scrollLeft(t))),i._applyLockedContainersWidth(),i.lockedHeader&&0===i.table[0].clientWidth&&(i.table[0].style.width="1px"))},_applyLockedContainersWidth:function(){if(this.options.scrollable&&this.lockedHeader){var e,t=this.thead.parent(),n=t.parent(),i=this.wrapper[0].clientWidth,r=this._groups(),o=fe.support.scrollbar(),a=this.lockedHeader.find(">table>colgroup>col:not(.k-group-col, .k-hierarchy-col)"),s=t.find(">colgroup>col:not(.k-group-col, .k-hierarchy-col)"),l=A(a),d=A(s);r>0&&(l+=we(this.lockedHeader.find(".k-group-cell:first"))*r),l>=i&&(l=i-3*o),this.lockedHeader.add(this.lockedContent).width(l),n[0].style.width=n.parent().width()-l-2+"px",t.add(this.table).width(d),this.virtualScrollable&&(i-=o),this.content[0].style.width=i-l-2+"px",this.lockedFooter&&this.lockedFooter.length&&(this.lockedFooter.width(l),e=this.footer.find(".k-grid-footer-wrap"),e[0].style.width=n[0].clientWidth+"px",e.children().first().width(d))}},_setContentHeight:function(){var e,t=this,n=t.options,i=t.wrapper.innerHeight(),r=t.wrapper.children(".k-grid-header"),o=fe.support.scrollbar();n.scrollable&&t.wrapper.is(":visible")&&(i-=ye(r),t.pager&&t.pager.element.is(":visible")&&(i-=ye(t.pager.element)),n.groupable&&(i-=ye(t.wrapper.children(".k-grouping-header"))),n.toolbar&&(i-=ye(t.wrapper.children(".k-grid-toolbar"))),t.footerTemplate&&(i-=ye(t.wrapper.children(".k-grid-footer"))),e=function(e){var t,n;return!!e[0].style.height||(t=e.height(),e.height("auto"),n=e.height(),t!=n?(e.height(""),!0):(e.height(""),!1))},e(t.wrapper)&&(i>2*o?(t.lockedContent&&(o=t.table[0].offsetWidth>t.table.parent()[0].clientWidth?o:0,t.lockedContent.height(i-o)),t.content.height(i)):t.content.height(2*o+1)))},_averageRowHeight:function(){var e,t=this,n=t._items(t.tbody).length,i=t._rowHeight;return 0===n?i:(t._rowHeight||(t._rowHeight=i=ye(t.table)/n,t._sum=i,t._measures=1),e=ye(t.table)/n,i!==e&&(t._measures++,t._sum+=e,t._rowHeight=t._sum/t._measures),i)},_dataSource:function(){var e,n=this,i=n.options,r=i.dataSource;r=Fe(r)?{data:r}:r,Ce(r)&&(Te(r,{table:n.table,fields:n.columns}),e=i.pageable,Ce(e)&&e.pageSize!==t&&(r.pageSize=e.pageSize)),n.dataSource&&n._refreshHandler?n.dataSource.unbind(rt,n._refreshHandler).unbind(Ne,n._progressHandler).unbind(Be,n._errorHandler):(n._refreshHandler=Ie(n.refresh,n),n._progressHandler=Ie(n._requestStart,n),n._errorHandler=Ie(n._error,n)),n.dataSource=ge.create(r).bind(rt,n._refreshHandler).bind(Ne,n._progressHandler).bind(Be,n._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_modelChange:function(t){var n,i,r,o,a,s,l,d,u,c,h=this,p=h.tbody,f=t.model,m=h.tbody.find("tr["+fe.attr("uid")+"="+f.uid+"]"),g=m.hasClass("k-alt"),v=h._items(p).index(m),_=h.lockedContent;if(_&&(n=h._relatedRow(m)),m.add(n).children(".k-edit-cell").length&&!h.options.rowTemplate)m.add(n).children(":not(.k-group-cell,.k-hierarchy-cell)").each(function(){i=e(this),r=O(h.columns)[h.cellIndex(i)],r.field===t.field&&(i.hasClass("k-edit-cell")?i.addClass("k-dirty-cell"):h._displayCell(i,r,f))});else if(!m.hasClass("k-grid-edit-row")){for(s=e().add(m),_&&(o=(g?h.lockedAltRowTemplate:h.lockedRowTemplate)(f),s=s.add(n),n.replaceWith(o)),h.angular("cleanup",function(){return{elements:s.get()}}),o=(g?h.altRowTemplate:h.rowTemplate)(f),m.replaceWith(o),o=h._items(p).eq(v),c=[{dataItem:f}],_&&(m=m.add(n),n=h._relatedRow(o)[0],oe(o[0],n),o=o.add(n),c.push({dataItem:f})),h.angular("compile",function(){return{elements:o.get(),data:c}}),a=h.options.selectable,a&&m.hasClass("k-state-selected")&&h.select(o),d=s.children(":not(.k-group-cell,.k-hierarchy-cell)"),l=o.children(":not(.k-group-cell,.k-hierarchy-cell)"),v=0,u=h.columns.length;v<u;v++)r=h.columns[v],i=l.eq(v),a&&d.eq(v).hasClass("k-state-selected")&&i.addClass("k-state-selected");h.trigger("itemChange",{item:o,data:f,ns:me})}},_pageable:function(){var t,n=this,i=n.options.pageable;i&&(t=n.wrapper.children("div.k-grid-pager"),t.length||(t=e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(n.wrapper)),n.pager&&n.pager.destroy(),n.pager="object"==typeof i&&i instanceof fe.ui.Pager?i:new fe.ui.Pager(t,Te({},i,{dataSource:n.dataSource})),n.pager.bind("pageChange",function(e){n.trigger("page",{page:e.index})&&e.preventDefault()}))},_footer:function(){var t,n,i,r=this,o=r.dataSource.aggregates(),a="",s=r.footerTemplate,l=r.options,d=r.footer||r.wrapper.find(".k-grid-footer");s?(a=e(r._wrapFooter(s(o))),d.length?(n=a,r.angular("cleanup",function(){return{elements:d.get()}}),d.replaceWith(n),d=r.footer=n):d=r.footer=l.scrollable?l.pageable?a.insertBefore(r.wrapper.children("div.k-grid-pager")):a.appendTo(r.wrapper):a.insertBefore(r.tbody),r.angular("compile",function(){return{elements:d.find("td:not(.k-group-cell, .k-hierarchy-cell)").get(),data:Se(r.columns,function(e){return{column:e,aggregate:o[e.field]}})}})):d&&!r.footer&&(r.footer=d),d.length&&(l.scrollable&&(t=d.attr("tabindex",-1).children(".k-grid-footer-wrap"),r.scrollables=e(r.scrollables.filter(function(){return!e(this).is(".k-grid-footer-wrap")}).toArray()).add(t)),r._footerWidth&&d.find("table").css("width",r._footerWidth),t&&(i=r.content.scrollLeft(),l.scrollable!==!0&&l.scrollable.virtual&&(i=r.wrapper.find(".k-virtual-scrollable-wrap").scrollLeft()),t.scrollLeft(i))),r.lockedContent&&(r._appendLockedColumnFooter(),r._applyLockedContainersWidth(),r._syncLockedFooterHeight())},_wrapFooter:function(t){var n=this,i="",r=fe.support.mobileOS?0:fe.support.scrollbar();return n.options.scrollable?(i=e('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table'+(nn?' cellspacing="0"':"")+"><tbody>"+t+"</tbody></table></div></div>"),n._appendCols(i.find("table")),i.css(en?"padding-left":"padding-right",r),i):'<tfoot class="k-grid-footer">'+t+"</tfoot>"},_columnMenu:function(){var e,n,i,r,o,a,s,l,d,u=this,c=O(u.columns),h=u.options,p=h.columnMenu,f=De(u.columns,function(e){return e.columns!==t}).length>0,m=this._isMobile,g=function(e){u.trigger(et,{field:e.field,container:e.container})},v=function(e){u.trigger(nt,{field:e.field,container:e.container})},_=function(e){se(e.closest("table"),!0)},b=function(e){u.trigger("sort",{sort:e.sort})?e.preventDefault():(u._clearEditableState(),u.dataSource.options.endless&&(u.dataSource.options.endless=null,u._endlessPageSize=u.dataSource.options.pageSize,u.dataSource.pageSize(u.dataSource.options.pageSize)))},k=function(e){u.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(u._clearEditableState(),u.dataSource.options.endless&&(u.dataSource.options.endless=null,u._endlessPageSize=u.dataSource.options.pageSize,u.dataSource.pageSize(u.dataSource.options.pageSize)))},w=h.$angular;if(p)for("boolean"==typeof p&&(p={}),a=V(u.thead),s=0,l=a.length;s<l;s++)n=c[s],d=a.eq(s),n.command||!n.field&&!d.attr("data-"+fe.ns+"field")||(e=d.data("kendoColumnMenu"),e&&e.destroy(),r=n.sortable!==!1&&p.sortable!==!1&&h.sortable!==!1&&Te({},h.sortable,{compare:(n.sortable||{}).compare}),o=!(!h.filterable||n.filterable===!1||p.filterable===!1)&&Te({pane:u.pane},h.filterable,n.filterable),n.filterable&&n.filterable.dataSource&&(o.forceUnique=!1,o.checkSource=n.filterable.dataSource),o&&(o.format=n.format),i={dataSource:u.dataSource,values:n.values,columns:p.columns,sortable:r,filterable:o,messages:p.messages,owner:u,closeCallback:_,init:g,open:v,pane:u.pane,sort:b,filtering:k,filter:m?":not(.k-column-active)":"",lockedColumns:!f&&n.lockable!==!1&&H(c).length>0},w&&(i.$angular=w),d.kendoColumnMenu(i))},_headerCells:function(){return this.thead.find("th").filter(function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")})},_filterable:function(){var e,t,n,i,r,o,a,s=this,l=O(s.columns),d=function(e){
s.trigger(Ze,{field:e.field,container:e.container})},u=function(e){se(e.closest("table"),!0)},c=function(e){s.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(s._clearEditableState(),s.dataSource.options.endless&&(s.dataSource.options.endless=null,s._endlessPageSize=s.dataSource.options.pageSize,s.dataSource.pageSize(s.dataSource.options.pageSize)))},h=function(e){s.trigger(tt,{field:e.field,container:e.container})},p=s.options.filterable;if(p&&typeof p.mode==It&&p.mode.indexOf("menu")==-1&&(p=!1),p&&!s.options.columnMenu)for(t=V(s.thead),i=0,r=t.length;i<r;i++)n=t.eq(i),l[i].filterable===!1||l[i].command||!l[i].field&&!n.attr("data-"+fe.ns+"field")||(e=n.data("kendoFilterMenu"),e&&e.destroy(),e=n.data("kendoFilterMultiCheck"),e&&e.destroy(),o=l[i].filterable,a=Te({},p,o,{dataSource:s.dataSource,values:l[i].values,format:l[i].format,closeCallback:u,title:l[i].title||l[i].field,init:d,open:h,pane:s.pane,change:c}),o&&o.messages&&(a.messages=Te(!0,{},p.messages,o.messages)),o&&o.dataSource&&(a.forceUnique=!1,a.checkSource=o.dataSource),o&&o.multi?n.kendoFilterMultiCheck(a):n.kendoFilterMenu(a))},_filterRow:function(){var t,n,i,r,o,a,s,l,d,u,c,h,p,f,m,g=this;if(g._hasFilterRow())for(n=g.options.$angular,i=O(g.columns),r=g.options.filterable,o=g.thead.find(".k-filter-row"),a=function(e){g.trigger("filter",{filter:e.filter,field:e.field})?e.preventDefault():(g._clearEditableState(),g.dataSource.options.endless&&(g.dataSource.options.endless=null,g._endlessPageSize=g.dataSource.options.pageSize,g.dataSource.pageSize(g.dataSource.options.pageSize)))},this._updateHeader(this.dataSource.group().length),s=0;s<i.length;s++)if(d=i[s],u=g.options.filterable.operators,c=!1,h=e("<th/>"),p=d.field,d.hidden&&h.hide(),o.append(h),p&&d.filterable!==!1){if(f=d.filterable&&d.filterable.cell||{},l=g.options.dataSource,l instanceof ge&&(l=g.options.dataSource.options),m=Te(!0,{},r.messages),d.filterable&&Te(!0,m,d.filterable.messages),f.enabled===!1){h.html("&nbsp;");continue}f.dataSource&&(l=f.dataSource,c=!0),d.filterable&&d.filterable.operators&&(u=d.filterable.operators),t={column:d,dataSource:g.dataSource,suggestDataSource:l,customDataSource:c,field:p,messages:m,values:d.values,template:f.template,delay:f.delay,inputWidth:f.inputWidth,suggestionOperator:f.suggestionOperator,minLength:f.minLength,dataTextField:f.dataTextField,operator:f.operator,operators:u,showOperators:f.showOperators,change:a},n&&(t.$angular=n),e("<span/>").attr(fe.attr("field"),p).appendTo(h).kendoFilterCell(t)}else h.html("&nbsp;")},_sortable:function(){var e,t,n,i,r,o,a=this,s=O(a.columns),l=a.options.sortable,d=function(e){a.trigger("sort",{sort:e.sort})?e.preventDefault():a._clearEditableState()};if(l){for(i=V(a.thead),r=0,o=i.length;r<o;r++)e=s[r],e.sortable!==!1&&!e.command&&e.field&&(n=i.eq(r),t=n.data("kendoColumnSorter"),t&&t.destroy(),n.attr("data-"+fe.ns+"field",e.field).kendoColumnSorter(Te({},l,e.sortable,{dataSource:a.dataSource,aria:!0,filter:":not(.k-column-active)",change:d})));i=null}},_columns:function(t){var n,i,r,o=this,a=o.table,s=a.find("col"),l=o.options.dataSource;if(t=t.length?t:Se(a.find("th"),function(t,n){t=e(t);var i=t.attr(fe.attr("sortable")),r=t.attr(fe.attr("filterable")),o=t.attr(fe.attr("type")),a=t.attr(fe.attr("groupable")),l=t.attr(fe.attr("field")),d=t.attr(fe.attr("title")),u=t.attr(fe.attr("menu"));return l||(l=t.text().replace(/\s|[^A-z0-9]/g,"")),{field:l,type:o,title:d,sortable:"false"!==i,filterable:"false"!==r,groupable:"false"!==a,menu:u,template:t.attr(fe.attr("template")),width:s.eq(n).css("width")}}),n=!(o.table.find("tbody tr").length>0&&(!l||!l.transport)),o.options.scrollable){if(r=t,i=H(t),t=N(t),i.length>0&&0===t.length)throw Error("There should be at least one non locked column");K(o.element.find("tr:has(th):first"),r),t=i.concat(t)}o.columns=d(t,n),e.grep(O(o.columns),function(e){return e.selectable}).length&&(o.options.persistSelection&&(o._selectedIds={}),o._checkBoxSelection=!0,o.wrapper.on(Dt+$e,"tbody > tr "+kt,Ie(o._checkboxClick,o)),o.wrapper.on(Dt+$e,"thead > tr "+kt,Ie(o._headerCheckboxClick,o)))},_headerCheckboxClick:function(t){var n=this,i=e(t.target),r=i.prop("checked"),o=i.closest(".k-grid.k-widget").getKendoGrid();n===o&&(r?n.select(o.items()):n.clearSelection())},_checkboxClick:function(t){var n=this,i=e(t.target).closest("tr"),r=!i.hasClass(_t);n===i.closest(".k-grid.k-widget").getKendoGrid()&&(r?n.select(i):n._deselectCheckRows(i))},_groups:function(){var e=this.dataSource.group();return e?e.length:0},_tmpl:function(e,n,o,a){var s,l,d,u,c,h=this,p=Te({},fe.Template,h.options.templateSettings),f=p.paramName,m=n.length,g={storage:{},count:0},v=h._hasDetails(),_=[],b=h._groups(),k=h.options.navigatable,w=fe.attr("field"),y="";if(!e){for(e="<tr",o&&_.push("k-alt"),v&&_.push("k-master-row"),_.length&&(e+=' class="'+_.join(" ")+'"'),m&&(e+=" "+fe.attr("uid")+'="#='+fe.expr("uid",p.paramName)+'#"'),e+=" role='row'>",b>0&&!a&&(e+=i(b)),v&&(e+='<td class="k-hierarchy-cell" aria-expanded="false"><a class="k-icon k-i-expand" href="\\#" '+jt+'="'+qt+'" tabindex="-1"></a></td>'),s=0;s<m;s++)d=n[s],l=d.template,u=typeof l,c=d.field,h._editMode()===Nt&&c&&(d.attributes=d.attributes||{},h.virtualScrollable&&(d.attributes[w]=c),y=h._dirtyCellTemplate(c,f),d.attributes["class"]=d.attributes["class"]||"",d.attributes["class"].indexOf(y)<0&&(d.attributes["class"]+=y)),d.command&&(d.attributes=d.attributes||{},t!==d.attributes["class"]?d.attributes["class"]+=" k-command-cell":d.attributes["class"]="k-command-cell"),e+="<td"+r(d.attributes),k&&(e+=" aria-describedby='"+d.headerAttributes.id+"'"),e+=" role='gridcell'>",e+=h._cellTmpl(d,g),e+="</td>";e+="</tr>"}return e=fe.template(e,p),g.count>0?Ie(e,g.storage):e},_dirtyCellTemplate:function(e,t){var n;return e&&t?(n="["===e.charAt(0)?fe.expr(e,t+".dirtyFields"):t+".dirtyFields['"+e+"']","#= "+t+" && "+t+".dirty && "+t+".dirtyFields && "+n+" ? ' k-dirty-cell' : '' #"):""},_headerCellText:function(e){var t=this,n=Te({},fe.Template,t.options.templateSettings),i=e.headerTemplate,r=typeof i,o=e.title||e.field||"";return r===At?o=fe.template(i,n)({}):r===It&&(o=i),o},_cellTmpl:function(e,t){var n,i,r=this,o=Te({},fe.Template,r.options.templateSettings),a=e.template,s=o.paramName,l=e.field,d="",u=e.format,c=typeof a,h=e.values;if(e.command){if(Fe(e.command)){for(n=0,i=e.command.length;n<i;n++)d+=e.command[n].visible?fe.format("#= {0}(data)? '{1}':'' #",e.command[n].visible,r._createButton(e.command[n]).replace($t,"\\#")):r._createButton(e.command[n]).replace($t,"\\#");return d}return r._createButton(e.command).replace($t,"\\#")}return e.selectable?Jt:(d+=r._dirtyIndicatorTemplate(l,s),c===At?(t.storage["tmpl"+t.count]=a,d+="#=this.tmpl"+t.count+"("+s+")#",t.count++):c===It?d+=a:h&&h.length&&Ce(h[0])&&"value"in h[0]&&l?(d+="#var v ="+fe.stringify(Y(h)).replace($t,"\\#")+"#",d+="#var f = v[",o.useWithBlock||(d+=s+"."),d+=l+"]#",d+="${f != null ? f : ''}"):(d+=e.encoded?"#:":"#=",u&&(d+='kendo.format("'+u.replace(Gt,"\\$1")+'",'),l?(l=fe.expr(l,s),d+=l+"==null?'':"+l):d+="''",u&&(d+=")"),d+="#"),d)},_dirtyIndicatorTemplate:function(e,t){var n;return e&&t?(n="["===e.charAt(0)?fe.expr(e,t+".dirtyFields"):t+".dirtyFields['"+e+"']","#= "+t+" && "+t+".dirty && "+t+".dirtyFields && "+n+" ? '<span class=\"k-dirty\"></span>' : '' #"):""},_templates:function(){var t=this,n=t.options,i=t.dataSource,r=i.group(),o=t.footer||t.wrapper.find(".k-grid-footer"),a=i.aggregate(),s=O(t.columns),l=O(H(t.columns)),d=n.scrollable?O(N(t.columns)):s;if(n.scrollable&&l.length){if(n.rowTemplate||n.altRowTemplate)throw Error("Having both row template and locked columns is not supported");t.rowTemplate=t._tmpl(n.rowTemplate,d,!1,!0),t.altRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,d,!0,!0),t.lockedRowTemplate=t._tmpl(n.rowTemplate,l),t.lockedAltRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,l,!0)}else t.rowTemplate=t._tmpl(n.rowTemplate,d),t.altRowTemplate=t._tmpl(n.altRowTemplate||n.rowTemplate,d,!0);t._hasDetails()&&(t.detailTemplate=t._detailTmpl(n.detailTemplate||"")),(t._group&&!Me(a)||!Me(a)&&!o.length||De(s,function(e){return e.footerTemplate}).length)&&(t.footerTemplate=t._footerTmpl(s,a,"footerTemplate","k-footer-template")),r&&De(s,function(e){return e.groupFooterTemplate}).length&&(a=e.map(r,function(e){return e.aggregates}),t.groupFooterTemplate=t._footerTmpl(d,a,"groupFooterTemplate","k-group-footer",l.length),n.scrollable&&l.length&&(t.lockedGroupFooterTemplate=t._footerTmpl(l,a,"groupFooterTemplate","k-group-footer"))),t.options.noRecords&&(t.noRecordsTemplate=t._noRecordsTmpl())},_noRecordsTmpl:function(){var t,n,i,r='<div class="{0}">{1}</div>',o='<div class="k-grid-norecords-template"{1}>{0}</div>',a=this.options.scrollable&&!this.wrapper[0].style.height?' style="margin:0 auto;position:static;"':"",s={storage:{},count:0},l=e.extend({},fe.Template,this.options.templateSettings),d=l.paramName,u="";return t=this.options.noRecords.template?this.options.noRecords.template:fe.format(o,this.options.messages.noRecords,a),n=typeof t,"function"===n?(s.storage["tmpl"+s.count]=t,u+="#=this.tmpl"+s.count+"("+d+")#",s.count++):"string"===n&&(u+=t),i=fe.template(fe.format(r,wt,u),l),s.count>0&&(i=e.proxy(i,s.storage)),i},_footerTmpl:function(e,t,n,o,a){var s,l,d,u,c,h=this,p=Te({},fe.Template,h.options.templateSettings),f=p.paramName,m="",g={},v=0,_={},b=h._groups(),k=h.dataSource._emptyAggregates(t);for(m+='<tr class="'+o+'">',b>0&&!a&&(m+=i(b)),h._hasDetails()&&(m+='<td class="k-hierarchy-cell">&nbsp;</td>'),s=0,l=e.length;s<l;s++)c=e[s],d=c[n],u=typeof d,m+="<td"+r(c.footerAttributes)+">",d?(u!==At&&(_=k[c.field]?Te({},p,{paramName:f+"['"+c.field+"']"}):{},d=fe.template(d,_)),g["tmpl"+v]=d,m+="#=this.tmpl"+v+"("+f+")#",v++):m+="&nbsp;",m+="</td>";return m+="</tr>",m=fe.template(m,p),v>0?Ie(m,g):m},_detailTmpl:function(e){var t=this,n="",r=Te({},fe.Template,t.options.templateSettings),o=r.paramName,a={},s=0,l=t._groups(),d=m(O(t.columns)).length,u=typeof e;return n+='<tr class="k-detail-row">',l>0&&(n+=i(l)),n+='<td class="k-hierarchy-cell"></td><td class="k-detail-cell"'+(d?' colspan="'+d+'"':"")+">",u===At?(a["tmpl"+s]=e,n+="#=this.tmpl"+s+"("+o+")#",s++):n+=e,n+="</td></tr>",n=fe.template(n,r),s>0?Ie(n,a):n},_hasDetails:function(){var e=this;return null!==e.options.detailTemplate||(e._events[Je]||[]).length},_hasFilterRow:function(){var t=this.options.filterable,n=t&&typeof t.mode==It&&t.mode.indexOf("row")!=-1,i=this.columns,r=e.grep(i,function(e){return e.filterable===!1});return i.length&&r.length==i.length&&(n=!1),n},_details:function(){var t=this;if(t.options.scrollable&&t._hasDetails()&&H(t.columns).length)throw Error("Having both detail template and locked columns is not supported");t.table.on(Dt+$e,".k-hierarchy-cell .k-i-expand, .k-hierarchy-cell .k-i-collapse",function(n){var i,r,o=e(this),a=o.closest("td.k-hierarchy-cell"),s=o.hasClass("k-i-expand"),l=o.closest("tr.k-master-row"),d=t.detailTemplate,u=t._hasDetails(),c=s?Ut:qt,h=!!s;return o.toggleClass("k-i-expand",!s).toggleClass("k-i-collapse",s).attr(jt,c),a.attr("aria-expanded",h),i=l.next(),u&&!i.hasClass("k-detail-row")&&(r=t.dataItem(l),i=e(d(r)).addClass(l.hasClass("k-alt")?"k-alt":"").insertAfter(l),t.angular("compile",function(){return{elements:i.get(),data:[{dataItem:r}]}}),t.trigger(Je,{masterRow:l,detailRow:i,data:r,detailCell:i.find(".k-detail-cell")})),t.trigger(s?dt:ut,{masterRow:l,detailRow:i}),i.toggle(s),n.preventDefault(),!1})},dataItem:function(t){if(t=e(t)[0],!t)return null;var n,i,r=this.tbody.children(),o=/k-grouping-row|k-detail-row|k-group-footer/,a=t.sectionRowIndex;for(i=a,n=0;n<a;n++)o.test(r[n].className)&&i--;return this._data[i]},expandRow:function(t){e(t).find("> td .k-i-expand").click()},collapseRow:function(t){e(t).find("> td .k-i-collapse").click()},_createHeaderCells:function(e,n){var i,o,a,s,l,d,u=this,c="",h=O(u.columns);for(i=0,s=e.length;i<s;i++)o=e[i].column||e[i],a=u._headerCellText(o),l="",d=Ee(o,h),o.selectable?(c+="<th scope='col'"+r(o.headerAttributes),n&&!e[i].colSpan&&(c+=" rowspan='"+n+"'"),d>-1&&(c+=fe.attr("index")+"='"+d+"'"),a=o.headerTemplate?a:fe.template(Zt)({}),c+=">"+a+"</th>"):o.command?(c+="<th scope='col'"+r(o.headerAttributes),n&&!e[i].colSpan&&(c+=" rowspan='"+n+"'"),d>-1&&(c+=fe.attr("index")+"='"+d+"'"),c+=">"+a+"</th>"):(o.field&&(l=fe.attr("field")+"='"+o.field+"' "),c+="<th scope='col' role='columnheader' "+l,c+=" aria-haspopup='true'",n&&!e[i].colSpan&&(c+=" rowspan='"+n+"'"),e[i].colSpan>1&&(c+='colspan="'+(e[i].colSpan-E(o.columns))+'" ',c+=fe.attr("colspan")+"='"+e[i].colSpan+"'"),o.title&&(c+=fe.attr("title")+'="'+o.title.replace('"',"&quot;").replace(/'/g,"'")+'" '),o.groupable!==t&&(c+=fe.attr("groupable")+"='"+o.groupable+"' "),o.aggregates&&o.aggregates.length&&(c+=fe.attr("aggregates")+"='"+o.aggregates+"'"),d>-1&&(c+=fe.attr("index")+"='"+d+"'"),c+=r(o.headerAttributes),c+=">"+a+"</th>");return c},_appendLockedColumnContent:function(){var t,n,i,r,o,a=this.columns,s=this.table.find("colgroup"),l=s.find("col:not(.k-group-col,.k-hierarchy-col)"),d=e(),u=0,c=0;for(t=0,n=a.length;t<n;t++)if(a[t].locked)if(f(a[t])){for(r=1,a[t].columns&&(r=O(a[t].columns).length-E(a[t].columns)),r=r||1,o=0;o<r;o++)d=d.add(l.eq(t+c+o-u));c+=r-1}else u++;i=e('<div class="k-grid-content-locked"><table'+(nn?' cellspacing="0"':"")+"><colgroup/><tbody></tbody></table></div>"),s.detach(),i.find("colgroup").append(d),s.insertBefore(this.table.find("tbody")),this.lockedContent=i.insertBefore(this.content),this.lockedTable=i.children("table")},_appendLockedColumnFooter:function(){var t,n,i=this,r=i.footer,o=r.find(".k-footer-template>td"),a=r.find(".k-grid-footer-wrap>table>colgroup>col"),s=e('<div class="k-grid-footer-locked"><table><colgroup /><tbody><tr class="k-footer-template"></tr></tbody></table></div>'),l=i._groups(),d=e(),u=e();for(d=d.add(o.filter(".k-group-cell")),t=0,n=O(H(i.columns)).length;t<n;t++)d=d.add(o.eq(t+l));for(u=u.add(a.filter(".k-group-col")),t=0,n=m(O(P(i.columns))).length;t<n;t++)u=u.add(a.eq(t+l));d.appendTo(s.find("tr")),u.appendTo(s.find("colgroup")),i.lockedFooter=s.prependTo(r)},_appendLockedColumnHeader:function(t){var n,i,r,o,a,s,l,d,u,c,h,p=this,m=this.columns,v=[],_=0,b=e(),k=p._hasFilterRow(),w=0,y=e(),x=0,C=e(),T=p.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"),S=p.thead.find("tr:first .k-header:not(.k-group-cell,.k-hierarchy-cell)"),D=p.thead.find(".k-filter-row").find("th:not(.k-group-cell,.k-hierarchy-cell)"),F=0;for(n=0,r=m.length;n<r;n++){if(m[n].locked){if(l=S.eq(n),x=O(m[n].columns||[]).length,f(m[n])){for(d=null,m[n].columns&&(d=x-E(m[n].columns)),d=d||1,u=0;u<d;u++)b=b.add(T.eq(n+F+u-_));F+=d-1}for(z([m[n]],U(l),v,0,0),x=x||1,c=0;c<x;c++)y=y.add(D.eq(w+c));w+=x}m[n].columns&&(_+=E(m[n].columns)),f(m[n])||_++}if(v.length){for(i='<div class="k-grid-header-locked" style="width:1px"><table'+(nn?' cellspacing="0"':"")+"><colgroup/><thead>",i+=Array(v.length+1).join("<tr></tr>"),i+=(k?'<tr class="k-filter-row" />':"")+"</thead></table></div>",s=e(i),T=s.find("colgroup"),T.append(p.thead.prev().find("col.k-group-col").add(b)),o=s.find("thead tr:not(.k-filter-row)"),n=0,r=v.length;n<r;n++)C=g(v[n]),o.eq(n).append(p.thead.find("tr:eq("+n+") .k-group-cell").add(C));return h=M(this.thead),v.length<h&&I(s,h-v.length),a=s.find(".k-filter-row"),a.append(p.thead.find(".k-filter-row .k-group-cell").add(y)),this.lockedHeader=s.prependTo(t),this.thead.find(".k-group-cell").remove(),!0}return!1},_removeLockedContainers:function(){var e=this.lockedHeader.add(this.lockedContent).add(this.lockedFooter);fe.destroy(e),e.off($e).remove(),this.lockedHeader=this.lockedContent=this.lockedFooter=null,this.selectable=null},_thead:function(){var t,n,i,r,o,a,s,l=this,d=l.columns,u=l._hasDetails()&&d.length,c=l._hasFilterRow(),h="",p=l.table.find(">thead"),f=l.element.find("thead:first").length>0;if(p.length||(p=e("<thead/>").insertBefore(l.tbody)),l.lockedHeader&&l.thead?(n=l.thead.find("tr:has(th):not(.k-filter-row)").html(""),n.remove(),n=e(),l._removeLockedContainers()):n=l.element.find(f?"thead:first tr:has(th):not(.k-filter-row)":"tr:has(th):first"),!n.length&&(n=p.children().first(),!n.length)){for(i=[{rowSpan:1,cells:[],index:0}],l._prepareColumns(i,d),t=0;t<i.length;t++)h+="<tr>",u&&(h+='<th class="k-hierarchy-cell" scope="col">'+l.options.messages.expandCollapseColumnHeader+"</th>"),h+=l._createHeaderCells(i[t].cells,i[t].rowSpan),h+="</tr>";n=e(h)}c&&(r=e("<tr/>"),r.addClass("k-filter-row"),(u||n.find(".k-hierarchy-cell").length)&&r.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),o=(l.thead||p).find(".k-filter-row"),o.length&&(fe.destroy(o),o.remove()),p.append(r)),n.children().length?u&&!n.find(".k-hierarchy-cell")[0]&&n.prepend('<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'):(h="",u&&(h+='<th class="k-hierarchy-cell" scope="col">&nbsp;</th>'),h+=l._createHeaderCells(d),n.html(h)),n.attr("role","row").find("th").addClass("k-header"),l.options.scrollable||p.addClass("k-grid-header"),n.find("script").remove().end().prependTo(p),l.thead&&l._destroyColumnAttachments(),this.angular("cleanup",function(){return{elements:p.find("th").get()}}),this.angular("compile",function(){return{elements:p.find("th").get(),data:Se(d,function(e){return{column:e}})}}),l.thead=p.attr("role","rowgroup"),l._sortable(),l._filterable(),l._filterRow(),l._scrollable(),l._updateCols(),l._columnMenu(),s=this.options.scrollable&&H(this.columns).length,s&&(a=l._appendLockedColumnHeader(l.thead.closest(".k-grid-header")),l._appendLockedColumnContent(),l.lockedContent.bind("DOMMouseScroll"+$e+" mousewheel"+$e,Ie(l._wheelScroll,l))),l._updateColumnCellIndex(),l._updateFirstColumnClass(),l._resizable(),l._draggable(),l._reorderable(),l._updateHeader(l._groups()),s&&(a&&l._syncLockedHeaderHeight(),l._applyLockedContainersWidth()),l.groupable&&l._attachGroupable()},_retrieveFirstColumn:function(t,n){var i,r=e();if(n.length&&t[0]){for(i=t[0];i.columns&&i.columns.length;)i=i.columns[0],n=n.filter(":not(:first())");r=r.add(n)}return r},_updateFirstColumnClass:function(){var t,n,i=this,r=i.columns||[],o=i._hasDetails()&&r.length;o||i._groups()||(t=i.thead.find(">tr:not(.k-filter-row):not(:first)"),r=N(r),n=i._retrieveFirstColumn(r,t),i._isLocked()&&(t=i.lockedHeader.find("thead>tr:not(.k-filter-row):not(:first)"),r=H(i.columns),n=n.add(i._retrieveFirstColumn(r,t))),n.each(function(){var t=e(this).find("th");t.removeClass("k-first"),t.eq(0).addClass("k-first")}))},_prepareColumns:function(e,t,n,i){var r,o,a=i||e[e.length-1],s=e[a.index+1],l=0;for(r=0;r<t.length;r++)o={column:t[r],colSpan:0},a.cells.push(o),t[r].columns&&t[r].columns.length&&(s||(s={rowSpan:0,cells:[],index:e.length},e.push(s)),o.colSpan=t[r].columns.length,this._prepareColumns(e,t[r].columns,o,s),l+=o.colSpan-1,a.rowSpan=e.length-a.index);n&&(n.colSpan+=l)},_wheelScroll:function(e){var t,n,i;e.ctrlKey||(t=this.content,this.options.scrollable.virtual&&(t=this.virtualScrollable.verticalScrollbar),n=t.scrollTop(),i=fe.wheelDeltaY(e),i&&(t[0].scrollHeight>t[0].clientHeight&&(t[0].scrollTop<t[0].scrollHeight-t[0].clientHeight&&i<0||t[0].scrollTop>0&&i>0)&&e.preventDefault(),t.scrollTop(n+-i)))},_isLocked:function(){return null!=this.lockedHeader},_updateHeaderCols:function(){var e=this.thead.parent().add(this.table);this._isLocked()?$(e,L(B(this.columns)),this._hasDetails(),0):$(e,L(m(this.columns)),this._hasDetails(),0)},_updateCols:function(e){e=e||this.thead.parent().add(this.table),this._appendCols(e,this._isLocked())},_updateLockedCols:function(e){this._isLocked()&&(e=e||this.lockedHeader.find("table").add(this.lockedTable),$(e,L(P(this.columns)),this._hasDetails(),this._groups()))},_appendCols:function(e,t){t?$(e,L(B(this.columns)),this._hasDetails(),0):$(e,L(m(this.columns)),this._hasDetails(),this._groups())},_autoColumns:function(e){if(e&&e.toJSON){var t,n,i=this;e=e.toJSON(),n=!(i.table.find("tbody tr").length>0&&(!i.dataSource||!i.dataSource.transport));for(t in e)i.columns.push({field:t,encoded:n,headerAttributes:{id:fe.guid()}});i._thead(),i._templates()}},_rowsHtml:function(e,t){var n,i,r=this,o="",a=t.rowTemplate,s=t.altRowTemplate;for(n=0,i=e.length;n<i;n++)r._skipRerenderItemsCount>0?r._skipRerenderItemsCount--:o+=n%2?s(e[n]):a(e[n]),r._data.push(e[n]);return o},_groupRowHtml:function(e,t,n,i,r,o){var a,s,l,d,u=this,c="",h=e.field,p=De(O(u.columns),function(e){return e.field==h})[0]||{},f=p.groupHeaderTemplate,m=(p.title||h)+": "+Q(e.value,p.format,p.values,p.encoded),g=u._groupAggregatesDefaultObject||{},v=e.items,_=Te({},g,e.aggregates),b=Te({},{field:e.field,value:e.value,items:v,aggregates:_},e.aggregates[e.field]),k=r.groupFooterTemplate;if(f&&(m=typeof f===At?f(b):fe.template(f)(b)),u._skipRerenderItemsCount?i(t,n,m):c+=i(t,n,m),e.hasSubgroups)for(a=0,s=v.length;a<s;a++)u._skipRerenderItemsCount?u._groupRowHtml(v[a],o?t:t-1,n+1,i,r,o):c+=u._groupRowHtml(v[a],o?t:t-1,n+1,i,r,o);else c+=u._rowsHtml(v,r);if(k){l={};for(d in _)l[d]=Te({},_[d],{group:{field:e.field,value:e.value,items:v}});c+=k(l)}return c},collapseGroup:function(t){var n,i,r,o,a,s,l=this,d=t,u=this.options.groupable,c=u.showFooter,h=c?0:1,p=e();for(t=e(t),this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?p=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(p=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),n=t.find(".k-group-cell").length,t.find(".k-i-collapse").addClass("k-i-expand").removeClass("k-i-collapse"),t.find("td[aria-expanded='true']:first").attr("aria-expanded",!1).find("a").attr(jt,qt),t=t.nextAll("tr"),s=[],r=0,o=t.length;r<o&&(a=t.eq(r),i=a.find(".k-group-cell").length,a.hasClass("k-grouping-row")?h++:a.hasClass("k-group-footer")&&h--,!(i<=n||a.hasClass("k-group-footer")&&h<0));r++)p.length&&s.push(p[r]),s.push(a[0]);e(s).hide(),this.options.scrollable.endless&&this.content&&setTimeout(function(){l.content.scroll(),l._groupToCollapse=d})},expandGroup:function(t){t=e(t);var n,i,r,o,a,s=this,l=s.options.groupable.showFooter,d=e(),u=[],c=1;for(this._isLocked()&&(t.closest("div").hasClass("k-grid-content-locked")?d=this.tbody.children("tr:eq("+t.index()+")").nextAll("tr"):(d=t.nextAll("tr"),t=this.lockedTable.find(">tbody>tr:eq("+t.index()+")"))),n=t.find(".k-group-cell").length,t.find(".k-i-expand").addClass("k-i-collapse").removeClass("k-i-expand"),t.find("td[aria-expanded='false']:first").attr("aria-expanded",!0).find("a").attr(jt,Ut),t=t.nextAll("tr"),o=0,a=t.length;o<a&&(i=t.eq(o),r=i.find(".k-group-cell").length,!(r<=n));o++)r!=n+1||i.hasClass("k-detail-row")||(i.show(),d.eq(o).show(),i.hasClass("k-grouping-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&s.expandGroup(i),i.hasClass("k-master-row")&&i.find(".k-icon").hasClass("k-i-collapse")&&(i.next().show(),d.eq(o+1).show())),i.hasClass("k-grouping-row")&&(l&&u.push(i.is(":visible")),c++),i.hasClass("k-group-footer")&&(l&&i.toggle(u.pop()),1==c?(i.show(),d.eq(o).show()):c--)},_updateHeader:function(t){var n=this,i=n._isLocked()?n.lockedHeader.find("thead"):n.thead,r=i.find("tr.k-filter-row").find("th.k-group-cell").length,o=i.find("tr:first").find("th.k-group-cell").length,a=i.children("tr:not(:first)").filter(function(){return!e(this).children(":visible").length});t>o?(e(Array(t-o+1).join('<th class="k-group-cell k-header" scope="col">'+n.options.messages.expandCollapseColumnHeader+"</th>")).prependTo(i.children("tr:not(.k-filter-row)")),n.element.is(":visible")&&a.find("th.k-group-cell").hide()):t<o&&i.find("tr").each(function(){e(this).find("th.k-group-cell").filter(":eq("+t+"),:gt("+t+")").remove()}),t>r&&e(Array(t-r+1).join('<th class="k-group-cell k-header" scope="col">&nbsp;</th>')).prependTo(i.find(".k-filter-row"))},_firstDataItem:function(e,t){return e&&t&&(e=e.hasSubgroups?this._firstDataItem(e.items[0],t):e.items[0]),e},_updateTablesWidth:function(){var t,n=this;n._isLocked()&&(t=e(">.k-grid-footer>.k-grid-footer-wrap>table",n.wrapper).add(n.thead.parent()).add(n.table),n._footerWidth=ie(t.eq(0)),t.width(n._footerWidth),t=e(">.k-grid-footer>.k-grid-footer-locked>table",n.wrapper).add(n.lockedHeader.find(">table")).add(n.lockedTable),t.width(ie(t.eq(0))))},hideColumn:function(n){var i,r,o,a,l,d,u,c,g,v,_=this,b=0,k=_.footer||_.wrapper.find(".k-grid-footer"),w=_.columns,y=_.lockedHeader?V(_.lockedHeader.find(">table>thead")).filter(p).length:0;if(n="number"==typeof n?w[n]:Ce(n)?De(F(w),function(e){return e===n})[0]:De(F(w),function(e){return e.field===n})[0],n&&f(n)){if(n.columns&&n.columns.length){for(d=T(n,w),h(n,!1),X(s(e(">table>thead",_.lockedHeader),_.thead,">tr:eq("+d.row+")>th"),d.cell,!1),o=0;o<n.columns.length;o++)this.hideColumn(n.columns[o]);return _.trigger(ot,{column:n}),t}if(g=Ee(n,m(O(w))),h(n,!1),_._setParentsVisibility(n,!1),_._templates(),_._updateCols(),_._updateLockedCols(),v=_.thead,u=g,_.lockedHeader&&y>g?v=_.lockedHeader.find(">table>thead"):u-=y,i=V(v).filter(p).eq(u),i[0].style.display="none",X(s(e(">table>thead",_.lockedHeader),_.thead,">tr.k-filter-row>th"),g,!1),k[0]&&(_._updateCols(k.find(">.k-grid-footer-wrap>table")),_._updateLockedCols(k.find(">.k-grid-footer-locked>table")),X(k.find(".k-footer-template>td"),g,!1)),_.lockedTable&&y>g?J(_.lockedTable.find(">tbody>tr"),g):J(_.tbody.children(),g-y),_.lockedTable)_._updateTablesWidth(),_._applyLockedContainersWidth(),_._syncLockedContentHeight(),_._syncLockedHeaderHeight(),_._syncLockedFooterHeight();else{for(a=_.thead.prev().find("col"),o=0,c=a.length;o<c;o+=1){if(l=a[o].style.width,!l||l.indexOf("%")!=-1){b=0;break}b+=parseInt(l,10)}r=e(">.k-grid-header table:first,>.k-grid-footer table:first",_.wrapper).add(_.table),_._footerWidth=null,b&&(r.each(function(){this.style.width=b+"px"}),_._footerWidth=b),tn.msie&&8==tn.version&&(r.css("display","inline-table"),setTimeout(function(){r.css("display","table")},1))}_._updateFirstColumnClass(),_.trigger(ot,{column:n})}},_setParentsVisibility:function(t,n){var i,r,o,a,l,d=this.columns,u=[],p=n?function(e){return m(e.columns).length&&e.hidden}:function(e){return!m(e.columns).length&&!e.hidden};if(c(t,d,u)&&u.length)for(i=u.length-1;i>=0;i--)r=u[i],o=y(r,d),a=s(e(">table>thead",this.lockedHeader),this.thead,">tr:eq("+o.row+")>th:not(.k-group-cell):not(.k-hierarchy-cell)").eq(o.cell),p(r)&&(h(r,n),a[0].style.display=n?"":"none"),a.filter("["+fe.attr("colspan")+"]").length&&(l=parseInt(a.attr(fe.attr("colspan")),10),a[0].colSpan=l-E(r.columns)||1)},showColumn:function(n){var i,r,o,a,l,d,u,c,p,m,g,v,_,b=this,k=b.columns,w=b.footer||b.wrapper.find(".k-grid-footer"),x=b.lockedHeader?V(b.lockedHeader.find(">table>thead")).length:0;if("number"==typeof n?(m=n,n=k[n]):Ce(n)?e.each(F(k),function(e,t){if(t===n)return n=t,m=e,!1}):e.each(F(k),function(e,t){if(t.field===n)return n=t,m=e,!1}),n&&!f(n)){if(n.columns&&n.columns.length){for(u=y(n,k),g=F(b.options.columns)[m],h(n,!0),X(s(e(">table>thead",b.lockedHeader),b.thead,">tr:eq("+u.row+")>th"),u.cell,!0),i=0;i<n.columns.length;i++)g.columns[i].hidden||this.showColumn(n.columns[i]);return b.trigger(at,{column:n}),t}if(v=Ee(n,O(k)),h(n,!0),b._setParentsVisibility(n,!0),b._templates(),b._updateCols(),b._updateLockedCols(),_=b.thead,d=v,b.lockedHeader&&x>v?_=b.lockedHeader.find(">table>thead"):d-=x,o=V(_).eq(d),o[0].style.display="",X(s(e(">table>thead",b.lockedHeader),b.thead,">tr.k-filter-row>th"),v,!0),w[0]&&(b._updateCols(w.find(">.k-grid-footer-wrap>table")),b._updateLockedCols(w.find(">.k-grid-footer-locked>table")),X(w.find(".k-footer-template>td"),v,!0)),b.lockedTable&&x>v?te(b.lockedTable.find(">tbody>tr"),v):te(b.tbody.children(),v-x),b.lockedTable)b._updateTablesWidth(),b._applyLockedContainersWidth(),b._syncLockedContentHeight(),b._syncLockedHeaderHeight();else if(a=e(">.k-grid-header table:first,>.k-grid-footer table:first",b.wrapper).add(b.table),n.width){for(l=0,p=b.thead.prev().find("col"),i=0,r=p.length;i<r;i+=1){if(c=p[i].style.width,c.indexOf("%")>-1){l=0;break}l+=parseInt(c,10)}b._footerWidth=null,l&&(a.each(function(){this.style.width=l+"px"}),b._footerWidth=l)}else a.width("");b._updateFirstColumnClass(),b.trigger(at,{column:n})}},_progress:function(e){var t=this.element,n=this.options.scrollable&&this.options.scrollable.endless;this._editContainer&&"popup"===this._editMode()?t=this._editContainer:this.lockedContent||n?t=this.wrapper:this.element.is("table")?t=this.element.parent():this.content&&this.content.length&&(t=this.content),n&&e?fe.ui.progress(t,e,{height:this.content.height(),top:this.content[0].offsetTop,opacity:!0}):fe.ui.progress(t,e)},_resize:function(e,t){this._syncLockedContentHeight(),this._syncLockedHeaderHeight(),this.content&&(this._setContentWidth(),this._setContentHeight()),this.virtualScrollable&&(t||this._rowHeight)&&(t&&(this._rowHeight=null),this.virtualScrollable.repaintScrollbar())},_isActiveInTable:function(){var t=be();return!!t&&(this.table[0]===t||e.contains(this.table[0],t)||this._isLocked()&&(this.lockedTable[0]===t||e.contains(this.lockedTable[0],t)))},refresh:function(n){var i,r,o=this,a=o.dataSource.view(),s=o.options.navigatable,l=e(o.current()),d=!1,u=(o.dataSource.group()||[]).length,c=u+L(m(o.columns)).length;if(!n||"itemchange"!==n.action||!o.editable)return n&&"remove"===n.action&&o.editable&&o.editable.options.model&&Ee(o.editable.options.model,n.items)>-1&&o.editable.options.model.unbind(rt,o._modelChangeHandler),n=n||{},n.action===mt&&o._isVirtualEditable()?(o._destroyEditable(),o._clearEditableState(),o._restoreVirtualView(),t):(o.trigger("dataBinding",{action:n.action||"rebind",index:n.index,items:n.items})||(o._angularItems("cleanup"),o._endlessFetchInProgress||(s&&(o._isActiveInTable()||o._editContainer&&o._editContainer.data("kendoWindow"))&&(d=l.is("th"),i=d?l.index():Math.max(o.cellIndex(l),0)),o._destroyEditable()),o.options.scrollable&&o.options.scrollable.endless?(clearTimeout(o._progressTimeOut),o._progressTimeOut=setTimeout(function(){o._endlessFetchInProgress||o._progress(!1)},100)):o._progress(!1),o._hideResizeHandle(),o._data=[],o.columns.length||(o._autoColumns(o._firstDataItem(a[0],u)),c=u+o.columns.length),o._group=u>0||o._group,o._group&&(o._templates(),o._updateCols(),o._updateLockedCols(),o._updateHeader(u),o._group=u>0,o._groupRows=Z(a)),o.content&&(r=o.content.scrollLeft()),o._renderContent(a,c,u),o._renderLockedContent(a,c,u),o._footer(),o._renderNoRecordsContent(),o._togglePagerVisibility(),o._setContentHeight(),o._setContentWidth(o.content&&r),o.lockedTable&&(o.options.scrollable.virtual?o.content.find(">.k-virtual-scrollable-wrap").trigger("scroll"):o.touchScroller?o.touchScroller.movable.trigger("change"):(o.wrapper.one("scroll",function(e){e.stopPropagation()}),o.content.trigger("scroll"))),o._endlessFetchInProgress||o._restoreCurrent(i,d),o.touchScroller&&o.touchScroller.contentResized(),o.selectable&&o.selectable.resetTouchEvents(),o._muteAngularRebind(function(){o._angularItems("compile")}),o._checkBoxSelection&&o._toggleHeaderCheckState(!1),o.options.persistSelection&&(o.selectable&&!fe.ui.Selectable.parseOptions(o.options.selectable).cell||o._checkBoxSelection)&&o._restoreSelection(),o.trigger(lt)),t)},_restoreCurrent:function(n,i){var r,o,a;n===t||n<0||(this._removeCurrent(),i?this._setCurrent(this.thead.find("th:not(.k-group-cell)").eq(n)):(r=0,this._rowVirtualIndex?r=this.virtualScrollable.position(this._rowVirtualIndex):n=0,o=e(),this.lockedTable&&(o=this.lockedTable.find(">tbody>tr").eq(r)),o=o.add(this.tbody.children().eq(r)),a=o.find(">td:not(.k-group-cell):not(.k-hierarchy-cell)").eq(n),this._setCurrent(a)),this._current&&se(this._current.closest("table")[0],!0))},_restoreSelection:function(){var e,t=this,n=t.items();e=De(n,function(e){var n=t.dataItem(e)[t.dataSource.options.schema.model.id];if(t._selectedIds[n])return e}),t.select(e)},_angularItems:function(e){fe.ui.DataBoundWidget.fn._angularItems.call(this,e),"cleanup"===e&&this._cleanupDetailItems(),this._angularGroupItems(e),this._angularGroupFooterItems(e)},_cleanupDetailItems:function(){var e=this;
e._hasDetails()&&(e.angular("cleanup",function(){return{elements:e.tbody.children(".k-detail-row")}}),e.tbody.find(".k-detail-cell").empty())},_angularGroupItems:function(t){var n=this,i=n.tbody;n.lockedContent&&(i=n.lockedTable.find("tbody")),n._group&&n.angular(t,function(){return{elements:i.children(".k-grouping-row"),data:e.map(Z(n.dataSource.view()),function(e){return{dataItem:e}})}})},_angularGroupFooterItems:function(t){var n=this,i=n.tbody;n.lockedContent&&(i=n.element),n._group&&n.groupFooterTemplate&&n.angular(t,function(){return{elements:i.find(".k-group-footer"),data:e.map(ee(n.dataSource.view()),function(e){return{dataItem:e}})}})},_renderContent:function(e,t,n){var i,r,o=this,a="",s=null!=o.lockedContent,l=null,d=o.options.scrollable,u={rowTemplate:o.rowTemplate,altRowTemplate:o.altRowTemplate,groupFooterTemplate:o.groupFooterTemplate};if(d&&d.endless&&!o.dataSource.options.endless&&(o._skipRerenderItemsCount=0,o.content&&(o.content[0].scrollTop=0)),l=o._skipRerenderItemsCount>0,t=s?t-L(P(o.columns)).length:t,n>0)for(t=s?t-n:t,o.detailTemplate&&t++,o.groupFooterTemplate&&(o._groupAggregatesDefaultObject=o.dataSource.aggregates()),i=0,r=e.length;i<r;i++)a+=o._groupRowHtml(e[i],t,0,s?pe:he,u,s);else a+=o._rowsHtml(e,u);l?(o.tbody.append(a),setTimeout(function(){o._groupToCollapse&&(o.collapseGroup(o._groupToCollapse),o._groupToCollapse=null)}),o._endlessFetchInProgress=null):o.tbody=q(o.tbody,o.table,a,this.options.$angular)},_renderLockedContent:function(e,t,n){var i,r,o,a="",s={rowTemplate:this.lockedRowTemplate,altRowTemplate:this.lockedAltRowTemplate,groupFooterTemplate:this.lockedGroupFooterTemplate};if(this.lockedContent){if(o=this.lockedTable,n>0)for(t-=m(O(N(this.columns))).length,i=0,r=e.length;i<r;i++)a+=this._groupRowHtml(e[i],t,0,he,s);else a=this._rowsHtml(e,s);q(o.children("tbody"),o,a,this.options.$angular),this._syncLockedContentHeight()}},_togglePagerVisibility:function(){this.options.pageable.alwaysVisible===!1&&this.wrapper.find(".k-grid-pager").toggle(this.dataSource.total()>=this.dataSource.pageSize())},_adjustRowsHeight:function(e,t){var n,i,r,o,a=e[0].rows,s=a.length,l=t[0].rows,d=e.add(t),u=d.length,c=[];for(n=0;n<s&&l[n];n++)a[n].style.height&&(a[n].style.height=l[n].style.height="");for(n=0;n<s&&l[n];n++)i=a[n].offsetHeight,r=l[n].offsetHeight,o=0,i>r?o=i:i<r&&(o=r),c.push(o);for(n=0;n<u;n++)d[n].style.display="none";for(n=0;n<s;n++)c[n]&&(a[n].style.height=l[n].style.height=c[n]+1+"px");for(n=0;n<u;n++)d[n].style.display=""}});fe.ExcelMixin&&fe.ExcelMixin.extend(sn.prototype),fe.PDFMixin&&(fe.PDFMixin.extend(sn.prototype),sn.prototype._drawPDF_autoPageBreak=function(n){function i(){c&&s!==t?(u.one("change",r),u.page(s)):(l.refresh(),r())}function r(){p.appendTo(document.body);var t=e.extend({},l.options.pdf,{_destructive:!0,progress:function(e){n.notify({page:e.page,pageNumber:e.pageNum,progress:.5+e.pageNum/e.totalPages/2,totalPages:e.totalPages})}});fe.drawing.drawDOM(f,t).always(function(){p.remove()}).then(function(e){d.resolve(e)}).fail(function(e){d.reject(e)})}function o(){var e=u.page(),t=c?u.totalPages():1;a.append(h.find("tr")),e<t?u.page(e+1):(u.unbind("change",o),i())}var a,s,l=this,d=new e.Deferred,u=l.dataSource,c=l.options.pdf.allPages,h=l.wrapper.find('table[role="grid"] > tbody'),p=e("<div>").css({position:"absolute",left:-1e4,top:-1e4}),f=l.wrapper.clone().css({height:"auto",width:"auto"}).appendTo(p);return f.find(".k-grid-content").css({height:"auto",width:"auto",overflow:"visible"}),f.find('table[role="grid"], .k-grid-footer table').css({height:"auto",width:"100%",overflow:"visible"}),f.find(".k-grid-pager, .k-grid-toolbar, .k-grouping-header").remove(),f.find(".k-grid-header, .k-grid-footer").css({paddingRight:0}),this._initPDFProgress(n),a=f.find('table[role="grid"] > tbody').empty(),s=u.page(),c?(u.bind("change",o),u.page(1)):o(),d.promise()},sn.prototype._drawPDF=function(n){function i(){s&&d!==t?(a.unbind("change",r),a.one("change",function(){o.resolve(l)}),a.page(d)):o.resolve(l)}function r(){u._drawPDFShadow({width:u.wrapper.width()},{avoidLinks:u.options.pdf.avoidLinks}).done(function(e){var t=a.page(),r=s?a.totalPages():1,o={page:e,pageNumber:t,progress:t/r,totalPages:r};n.notify(o),l.append(o.page),t<r?a.page(t+1):i()}).fail(function(e){o.reject(e)})}var o,a,s,l,d,u=this;return u.options.pdf.paperSize&&"auto"!=u.options.pdf.paperSize?u._drawPDF_autoPageBreak(n):(o=new e.Deferred,a=u.dataSource,s=u.options.pdf.allPages,this._initPDFProgress(n),l=new fe.drawing.Group,d=a.page(),s?(a.bind("change",r),a.page(1)):r(),o.promise())},sn.prototype._initPDFProgress=function(t){var n,i=e("<div class='k-loading-pdf-mask'><div class='k-loading-color'/></div>");i.prepend(this.wrapper.clone().css({position:"absolute",top:0,left:0})),this.wrapper.append(i),n=e("<div class='k-loading-pdf-progress'>").appendTo(i).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar"),t.progress(function(e){n.value(e.progress)}).always(function(){fe.destroy(i),i.remove()})}),me.plugin(sn),me.plugin(on)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.listview.min",["kendo.data.min","kendo.editable.min","kendo.selectable.min"],e)}(function(){return function(e,t){var n=window.kendo,i="change",r="cancel",o="dataBound",a="dataBinding",s=n.ui.Widget,l=n.keys,d=">*:not(.k-loading-mask)",u="progress",c="error",h="k-state-focused",p="k-state-selected",f="k-edit-item",m="edit",g="remove",v="save",_="click",b=".kendoListView",k=e.proxy,w=n._activeElement,y=n.ui.progress,x=n.data.DataSource,C=n.ui.DataBoundWidget.extend({init:function(t,i){var r=this;i=e.isArray(i)?{dataSource:i}:i,s.fn.init.call(r,t,i),i=r.options,r.wrapper=t=r.element,t[0].id&&(r._itemId=t[0].id+"_lv_active"),r._element(),r._dataSource(),r._templates(),r._navigatable(),r._selectable(),r._pageable(),r._crudHandlers(),r.options.autoBind&&r.dataSource.fetch(),n.notify(r)},events:[i,r,a,o,m,g,v],options:{name:"ListView",autoBind:!0,selectable:!1,navigatable:!1,template:"",altTemplate:"",editTemplate:""},setOptions:function(e){s.fn.setOptions.call(this,e),this._templates(),this.selectable&&(this.selectable.destroy(),this.selectable=null),this._selectable()},_templates:function(){var e=this.options;this.template=n.template(e.template||""),this.altTemplate=n.template(e.altTemplate||e.template),this.editTemplate=n.template(e.editTemplate||"")},_item:function(e){return this.element.children()[e]()},items:function(){return this.element.children()},dataItem:function(t){var i=n.attr("uid"),r=e(t).closest("["+i+"]").attr(i);return this.dataSource.getByUid(r)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},_unbindDataSource:function(){var e=this;e.dataSource.unbind(i,e._refreshHandler).unbind(u,e._progressHandler).unbind(c,e._errorHandler)},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._refreshHandler=k(e.refresh,e),e._progressHandler=k(e._progress,e),e._errorHandler=k(e._error,e)),e.dataSource=x.create(e.options.dataSource).bind(i,e._refreshHandler).bind(u,e._progressHandler).bind(c,e._errorHandler)},_progress:function(){y(this.element,!0)},_error:function(){y(this.element,!1)},_element:function(){this.element.addClass("k-widget k-listview").attr("role","listbox")},refresh:function(e){var i,r,s,l,d,u=this,c=u.dataSource.view(),h="",p=u.template,f=u.altTemplate,m=w();if(e=e||{},"itemchange"===e.action)return u._hasBindingTarget()||u.editable||(i=e.items[0],s=u.items().filter("["+n.attr("uid")+"="+i.uid+"]"),s.length>0&&(l=s.index(),u.angular("cleanup",function(){return{elements:[s]}}),s.replaceWith(p(i)),s=u.items().eq(l),s.attr(n.attr("uid"),i.uid),u.angular("compile",function(){return{elements:[s],data:[{dataItem:i}]}}),u.trigger("itemChange",{item:s,data:i}))),t;if(!u.trigger(a,{action:e.action||"rebind",items:e.items,index:e.index})){for(u._angularItems("cleanup"),u._destroyEditable(),l=0,d=c.length;l<d;l++)h+=l%2?f(c[l]):p(c[l]);for(u.element.html(h),r=u.items(),l=0,d=c.length;l<d;l++)r.eq(l).attr(n.attr("uid"),c[l].uid).attr("role","option").attr("aria-selected","false");u.element[0]===m&&u.options.navigatable&&u.current(r.eq(0)),u._angularItems("compile"),u.trigger(o,{action:e.action||"rebind",items:e.items,index:e.index})}},_pageable:function(){var t,i,r=this,o=r.options.pageable;e.isPlainObject(o)&&(i=o.pagerId,t=e.extend({},o,{dataSource:r.dataSource,pagerId:null}),r.pager=new n.ui.Pager(e("#"+i),t))},_selectable:function(){var e,r,o=this,a=o.options.selectable,s=o.options.navigatable;a&&(e=n.ui.Selectable.parseOptions(a).multiple,o.selectable=new n.ui.Selectable(o.element,{aria:!0,multiple:e,filter:d,change:function(){o.trigger(i)}}),s&&o.element.on("keydown"+b,function(n){if(n.keyCode===l.SPACEBAR){if(r=o.current(),n.target==n.currentTarget&&n.preventDefault(),e)if(n.ctrlKey){if(r&&r.hasClass(p))return r.removeClass(p),t}else o.selectable.clear();else o.selectable.clear();o.selectable.value(r)}}))},current:function(e){var n=this,i=n.element,r=n._current,o=n._itemId;return e===t?r:(r&&r[0]&&(r[0].id===o&&r.removeAttr("id"),r.removeClass(h),i.removeAttr("aria-activedescendant")),e&&e[0]&&(o=e[0].id||o,n._scrollTo(e[0]),i.attr("aria-activedescendant",o),e.addClass(h).attr("id",o)),n._current=e,t)},_scrollTo:function(t){var n,i,r=this,o=!1,a="scroll";"auto"==r.wrapper.css("overflow")||r.wrapper.css("overflow")==a?n=r.wrapper[0]:(n=window,o=!0),i=function(i,r){var s=o?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+r],d=e(n)[a+i](),u=e(n)[r.toLowerCase()]();s+l>d+u?e(n)[a+i](s+l-u):s<d&&e(n)[a+i](s)},i("Top","Height"),i("Left","Width")},_navigatable:function(){var t=this,i=t.options.navigatable,r=t.element,o=function(i){t.current(e(i.currentTarget)),e(i.target).is(":button,a,:input,a>.k-icon,textarea")||n.focusElement(r)};i&&(t._tabindex(),r.on("focus"+b,function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)}).on("focusout"+b,function(){t._current&&t._current.removeClass(h)}).on("keydown"+b,function(i){var o,a,s=i.keyCode,d=t.current(),u=e(i.target),c=!u.is(":button,textarea,a,a>.t-icon,input"),h=u.is(":text,:password"),p=n.preventDefault,m=r.find("."+f),g=w();if(!(!c&&!h&&l.ESC!=s||h&&l.ESC!=s&&l.ENTER!=s))if(l.UP===s||l.LEFT===s)d&&(d=d.prev()),t.current(d&&d[0]?d:t._item("last")),p(i);else if(l.DOWN===s||l.RIGHT===s)d&&(d=d.next()),t.current(d&&d[0]?d:t._item("first")),p(i);else if(l.PAGEUP===s)t.current(null),t.dataSource.page(t.dataSource.page()-1),p(i);else if(l.PAGEDOWN===s)t.current(null),t.dataSource.page(t.dataSource.page()+1),p(i);else if(l.HOME===s)t.current(t._item("first")),p(i);else if(l.END===s)t.current(t._item("last")),p(i);else if(l.ENTER===s)0!==m.length&&(c||h)?(o=t.items().index(m),g&&g.blur(),t.save(),a=function(){t.element.trigger("focus"),t.current(t.items().eq(o))},t.one("dataBound",a)):""!==t.options.editTemplate&&t.edit(d);else if(l.ESC===s){if(m=r.find("."+f),0===m.length)return;o=t.items().index(m),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(o))}}),r.on("mousedown"+b+" touchstart"+b,d,k(o,t)))},clearSelection:function(){var e=this;e.selectable.clear(),e.trigger(i)},select:function(n){var i=this,r=i.selectable;return n=e(n),n.length?(r.options.multiple||(r.clear(),n=n.first()),r.value(n),t):r.value()},_destroyEditable:function(){var e=this;e.editable&&(e.editable.destroy(),delete e.editable)},_modelFromElement:function(e){var t=e.attr(n.attr("uid"));return this.dataSource.getByUid(t)},_closeEditable:function(){var e,t,i,r=this,o=r.editable,a=r.template;return o&&(o.element.index()%2&&(a=r.altTemplate),r.angular("cleanup",function(){return{elements:[o.element]}}),e=r._modelFromElement(o.element),r._destroyEditable(),i=o.element.index(),o.element.replaceWith(a(e)),t=r.items().eq(i),t.attr(n.attr("uid"),e.uid),r._hasBindingTarget()&&n.bind(t,e),r.angular("compile",function(){return{elements:[t],data:[{dataItem:e}]}})),!0},edit:function(e){var t,i,r=this,o=r._modelFromElement(e),a=o.uid;r.cancel(),e=r.items().filter("["+n.attr("uid")+"="+a+"]"),i=e.index(),e.replaceWith(r.editTemplate(o)),t=r.items().eq(i).addClass(f).attr(n.attr("uid"),o.uid),r.editable=t.kendoEditable({model:o,clearContainer:!1,errorTemplate:!1,target:r}).data("kendoEditable"),r.trigger(m,{model:o,item:t})},save:function(){var e,t,n=this,i=n.editable;i&&(t=i.element,e=n._modelFromElement(t),i.end()&&!n.trigger(v,{model:e,item:t})&&(n._closeEditable(),n.dataSource.sync()))},remove:function(e){var t=this,n=t.dataSource,i=t._modelFromElement(e);t.editable&&(n.cancelChanges(t._modelFromElement(t.editable.element)),t._closeEditable()),t.trigger(g,{model:i,item:e})||(e.hide(),n.remove(i),n.sync())},add:function(){var e,t=this,n=t.dataSource,i=n.indexOf((n.view()||[])[0]);i<0&&(i=0),t.cancel(),e=n.insert(i,{}),t.edit(t.element.find("[data-uid='"+e.uid+"']"))},cancel:function(){var e,t,n=this,i=n.dataSource;n.editable&&(e=n.editable.element,t=n._modelFromElement(e),n.trigger(r,{model:t,container:e})||(i.cancelChanges(t),n._closeEditable()))},_crudHandlers:function(){var t=this,i=_+b;t.element.on(i,".k-edit-button",function(i){var r=e(this).closest("["+n.attr("uid")+"]");t.edit(r),i.preventDefault()}),t.element.on(i,".k-delete-button",function(i){var r=e(this).closest("["+n.attr("uid")+"]");t.remove(r),i.preventDefault()}),t.element.on(i,".k-update-button",function(e){t.save(),e.preventDefault()}),t.element.on(i,".k-cancel-button",function(e){t.cancel(),e.preventDefault()})},destroy:function(){var e=this;s.fn.destroy.call(e),e._unbindDataSource(),e._destroyEditable(),e.element.off(b),e.pager&&e.pager.destroy(),n.destroy(e.element)}});n.ui.plugin(C)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.listbox.min",["kendo.draganddrop.min","kendo.data.min","kendo.selectable.min"],e)}(function(){return function(e,t){function n(t){var n=e.map(t,function(t){return e(t).index()});return n}function i(e){return t===e}function r(e){return e.clone().removeClass(ce).removeClass(U).addClass(_.format("{0} {1} {2}",P,K,q)).width(e.width())}function o(){return e("<li>").addClass(j)}var a,s,l,d,u,c,h,p,f,m,g,v,_=window.kendo,b=_.attr,k=_.data,w=_.keys,y=_.template,x=_.ui.Widget,C=k.DataSource,T=_.ui.Selectable,S=_.ui.DataBoundWidget,D=_.Class,F=e.extend,E=e.noop,A=e.proxy,I="-",R=".",M=" ",z="#",H="kendoListBox",N=R+H,B="k-state-disabled",P="k-state-selected",L=".k-item:not(.k-state-disabled)",O=".k-list:not(.k-state-disabled) >"+L,V="k-listbox-toolbar",W="li > a.k-button:not(.k-state-disabled)",U="k-state-focused",q="k-drag-clue",j="k-drop-hint",G="k-reset k-list",$=".k-reset.k-list",K="k-reset",Y="click"+N,Q="keydown"+N,X="blur"+N,J=_._outerWidth,Z=_._outerHeight,ee="change",te="dataBound",ne="add",ie="remove",re="reorder",oe="moveUp",ae="moveDown",se="transferTo",le="transferFrom",de="transferAllTo",ue="transferAllFrom",ce="k-ghost",he="uid",pe="tabindex",fe="command",me=-1,ge=1,ve="dragstart",_e="drag",be="drop",ke="dragend",we="ul.k-reset.k-list>li.k-item",ye="right",xe="bottom",Ce=[V+I+"left",V+I+ye,V+I+"top",V+I+xe],Te=S.extend({init:function(e,t){var n=this;x.fn.init.call(n,e,t),n._wrapper(),n._list(),e=n.element.attr("multiple","multiple").hide(),e[0]&&!n.options.dataSource&&(n.options.dataTextField=n.options.dataTextField||"text",n.options.dataValueField=n.options.dataValueField||"value"),n._templates(),n._selectable(),n._dataSource(),n._createToolbar(),n._createDraggable(),n._createNavigatable()},destroy:function(){var e=this;S.fn.destroy.call(e),isNaN(e._listTabIndex)||(e._getList().off(),e._listTabIndex=null),e._unbindDataSource(),e._destroySelectable(),e._destroyToolbar(),e.wrapper.off(N),e._target&&(e._target=null),e._draggable&&(e._draggable.destroy(),e.placeholder=null),_.destroy(e.element)},events:[ee,te,ne,ie,re,ve,_e,be,ke],options:{name:"ListBox",autoBind:!0,template:"",dataTextField:"",dataValueField:"",selectable:"single",draggable:null,dropSources:[],connectWith:"",navigatable:!0,toolbar:{position:ye,tools:[]},messages:{tools:{remove:"Delete",moveUp:"Move Up",moveDown:"Move Down",transferTo:"Transfer To",transferFrom:"Transfer From",transferAllTo:"Transfer All To",transferAllFrom:"Transfer All From"}}},add:function(e){var t,n=this,i=e&&e.length?e:[e],r=i.length;for(n._unbindDataSource(),t=0;t<r;t++)n._addItem(i[t]);n._bindDataSource(),n._syncElement()},_addItem:function(t){var n=this,i=n.templates.itemTemplate({item:t,r:n.templates.itemContent});e(i).attr(b(he),t.uid).appendTo(n._getList()),"string"==typeof t?n.dataSource._data.push(t):n.dataSource.add(t)},_addItemAt:function(t,n){var i=this,r=i.templates.itemTemplate({item:t,r:i.templates.itemContent});i._unbindDataSource(),"string"==typeof t?(i._insertElementAt(r,n),i.dataSource._data.push(t)):(i._insertElementAt(e(r).attr(b(he),t.uid),n),i.dataSource.add(t)),i._bindDataSource(),i._syncElement()},_insertElementAt:function(t,n){var i=this,r=i._getList();n>0?e(t).insertAfter(r.children().eq(n-1)):e(r).prepend(t)},_createNavigatable:function(){var e=this,t=e.options;t.navigatable&&e._getList().on(Y,L,A(e._click,e)).on(Q,A(e._keyDown,e)).on(X,A(e._blur,e))},_getTabIndex:function(){var e,t=this;return isNaN(t._listTabIndex)?(e=t.element.attr(pe),t._listTabIndex=isNaN(e)?0:e,t.element.removeAttr(pe),t._listTabIndex):t._listTabIndex},_blur:function(){this._target&&(this._target.removeClass(U),this._getList().removeAttr("aria-activedescendant")),this._target=null},_click:function(t){var n=this,i=e(t.currentTarget),r=n._target;r&&r.removeClass(U),n._target=i,i.addClass(U),n._getList().attr("aria-activedescendant",i.attr("id")),n._getList()[0]!==_._activeElement()&&n.focus()},_getNavigatableItem:function(e){var t,n=this;return t=n._target?n._target:n.items().filter(L).first(),e===w.UP&&n._target&&(t=n._target.prevAll(L).first()),e===w.DOWN&&n._target&&(t=n._target.nextAll(L).first()),t.length?t:null},_scrollIntoView:function(e){var t,n,i,r,o;e&&(e[0]&&(e=e[0]),t=this._getList().parent()[0],n=e.offsetTop,i=t.scrollTop,r=t.clientHeight,o=n+e.offsetHeight,i>n?i=n:o>i+r&&(i=o-r),t.scrollTop=i)},_keyDown:function(e){var n,i=this,r=e.keyCode,o=i._getNavigatableItem(r);if(i._target&&i._target.removeClass(U),(!e.shiftKey||e.ctrlKey||r!==w.DOWN&&r!==w.UP)&&(i._shiftSelecting=!1),r==w.DELETE)i._executeCommand(ie),i._target&&(i._target.removeClass(U),i._getList().removeAttr("aria-activedescendant"),i._target=null),n=!0;else if(r===w.DOWN||r===w.UP){if(!o)return e.preventDefault(),t;if(e.shiftKey&&!e.ctrlKey)i._shiftSelecting||(i.clearSelection(),i._shiftSelecting=!0),i._target&&o.hasClass("k-state-selected")?(i._target.removeClass(P),i.trigger(ee)):i.select("single"==i.options.selectable?o:o.add(i._target));else{if(e.shiftKey&&e.ctrlKey)return i._executeCommand(r===w.DOWN?ae:oe),i._scrollIntoView(i._target),e.preventDefault(),t;e.shiftKey||e.ctrlKey||("multiple"===i.options.selectable&&i.clearSelection(),i.select(o))}i._target=o,i._target?(i._target.addClass(U),i._scrollIntoView(i._target),i._getList().attr("aria-activedescendant",i._target.attr("id"))):i._getList().removeAttr("aria-activedescendant"),n=!0}else r==w.SPACEBAR?(e.ctrlKey&&i._target?i._target.hasClass(P)?(i._target.removeClass(P),i.trigger(ee)):i.select(i._target):(i.clearSelection(),i.select(i._target)),n=!0):e.ctrlKey&&r==w.RIGHT?(i._executeCommand(e.shiftKey?de:se),i._target=i.select().length?i.select():null,n=!0):e.ctrlKey&&r==w.LEFT&&(i._executeCommand(e.shiftKey?ue:le),n=!0);n&&e.preventDefault()},focus:function(){_.focusElement(this._getList())},_createDraggable:function(){var t,n=this,i=n.options.draggable;if(i){if(t=i.hint,!n.options.selectable)throw Error("Dragging requires selection to be enabled");t||(t=r),n._draggable=new _.ui.Draggable(n.wrapper,{filter:i.filter?i.filter:we,hint:_.isFunction(t)?t:e(t),dragstart:A(n._dragstart,n),dragcancel:A(n._clear,n),drag:A(n._drag,n),dragend:A(n._dragend,n)})}},_dragstart:function(n){var i=this,r=i.draggedElement=n.currentTarget,a=i.options.draggable.placeholder,s=i.dataItem(r),l={dataItems:s,items:e(r),draggableEvent:n};return i.options.draggable.enabled===!1?(n.preventDefault(),t):(a||(a=o),i.placeholder=e(_.isFunction(a)?a.call(i,r):a),r.is(R+B)?n.preventDefault():i.trigger(ve,l)?n.preventDefault():(i.clearSelection(),i.select(r),r.addClass(ce)),t)},_clear:function(){this.draggedElement.removeClass(ce),this.placeholder.remove()},_findElementUnderCursor:function(t){var n=_.elementUnderCursor(t),i=t.sender;return(e.contains(i.hint[0],n)||i.hint[0]===n)&&(i.hint.hide(),n=_.elementUnderCursor(t),i.hint.show()),n},_findTarget:function(t){var n,i,r=this,o=r._findElementUnderCursor(t),a=e(o),s=r._getList();return e.contains(s[0],o)?(n=r.items(),o=a.is("li")?o:a.closest("li")[0],i=n.filter(o)[0]||n.has(o)[0],i?(i=e(i),i.hasClass(B)?null:{element:i,listBox:r}):null):s[0]==o||s.parent()[0]==o?{element:e(s),appendToBottom:!0,listBox:r}:r._searchConnectedListBox(a)},_getElementCenter:function(e){var t=e.length?_.getOffset(e):null;return t&&(t.top+=Z(e)/2,t.left+=J(e)/2),t},_searchConnectedListBox:function(t){var n,i,r,o,a=t;return o=t.hasClass("k-list-scroller k-selectable")?t:t.closest(".k-list-scroller.k-selectable"),o.length?(n=o.parent().find("[data-role='listbox']").getKendoListBox(),n&&e.inArray(this.element[0].id,n.options.dropSources)!==-1?(i=n.items(),t=t.is("li")?t[0]:t.closest("li")[0],r=i.filter(t)[0]||i.has(t)[0],r?(r=e(r),r.hasClass(B)?null:{element:r,listBox:n}):!i.length||a.hasClass("k-list-scroller k-selectable")||a.hasClass("k-reset k-list")?{element:n._getList(),listBox:n,appendToBottom:!0}:null):null):null},_drag:function(n){var i,r,o,a=this,s=a.draggedElement,l=a._findTarget(n),d={left:n.x.location,top:n.y.location},u=a.dataItem(s),c={dataItems:[u],items:e(s),draggableEvent:n};if(a.trigger(_e,c))return n.preventDefault(),t;if(l){if(i=this._getElementCenter(l.element),r={left:Math.round(d.left-i.left),top:Math.round(d.top-i.top)},l.appendToBottom)return a._movePlaceholder(l,null,s),t;r.top<0?o="prev":r.top>0&&(o="next"),o&&l.element[0]!=a.placeholder[0]&&a._movePlaceholder(l,o,s)}else a.placeholder.parent().length&&a.placeholder.remove()},_movePlaceholder:function(t,n,i){var r=this,a=r.placeholder,s=t.listBox.options.draggable;a.parent().length&&(r.placeholder.remove(),r.placeholder=e(s&&s.placeholder?_.isFunction(s.placeholder)?s.placeholder.call(r,i):s.placeholder:o.call(r,i))),n?"prev"===n?t.element.before(r.placeholder):"next"===n&&t.element.after(r.placeholder):t.element.append(r.placeholder)},_dragend:function(n){var i=this,r=i.draggedElement,o=i.items(),a=o.not(i.draggedElement).index(i.placeholder),s=o.not(i.placeholder).index(i.draggedElement),l=i.dataItem(r),d={dataItems:[l],items:e(r)},u=i.placeholder.closest(".k-widget.k-listbox").find("[data-role='listbox']").getKendoListBox();return i.trigger(be,F({},d,{draggableEvent:n}))?(n.preventDefault(),this._clear(),t):(a>=0?a===s||i.trigger(re,F({},d,{offset:a-s}))||(r.removeClass(ce),i.reorder(r,a)):u&&(i.trigger(ie,d)||i.remove(e(r)),u.trigger(ne,d)||u._addItemAt(l,u.items().index(i.placeholder))),i._clear(),i._draggable.dropped=!0,i.trigger(ke,F({},d,{draggableEvent:n})),i._updateToolbar(),i._updateAllToolbars(),t)},reorder:function(t,n){var i=this,r=i.dataSource,o=i.dataItem(t),a=r.at(n),s=i.items()[n],l=e(t);o&&s&&a&&(i._removeElement(l),i._insertElementAt(l,n),i._updateToolbar())},remove:function(t){var n,i=this,r=i._getItems(t),o=r.length;for(i._unbindDataSource(),n=0;n<o;n++)i._removeItem(e(r[n]));i._bindDataSource(),i._syncElement(),i._updateToolbar(),i._updateAllToolbars()},_removeItem:function(e){var t,n,i=this,r=i.dataSource,o=i.dataItem(e);if(o&&r){if("string"==typeof o){for(t=r._data,n=0;n<t.length;n++)if(o===t[n]){t[n]=t[t.length-1],t.pop();break}}else r.remove(o);i._removeElement(e)}},_removeElement:function(t){_.destroy(t),e(t).off().remove()},dataItem:function(t){var n=b(he),i=e(t).attr(n)||e(t).closest("["+n+"]").attr(n);return i?this.dataSource.getByUid(i):e(t).html()},_dataItems:function(t){var n,i=[],r=e(t),o=r.length;for(n=0;n<o;n++)i.push(this.dataItem(r.eq(n)));return i},items:function(){var e=this._getList();return e.children()},select:function(e){var t,n=this,r=n.selectable;return i(e)?r.value():(t=n.items().filter(e).filter(O),r.options.multiple||(r.clear(),t=t.first()),r.value(t))},clearSelection:function(){var e=this,t=e.selectable;t&&t.clear()},enable:function(t,n){var r,o=this,a=!!i(n)||!!n,s=o._getItems(t),l=s.length;for(r=0;r<l;r++)o._enableItem(e(s[r]),a);o._updateAllToolbars()},_enableItem:function(t,n){var i=this,r=i.dataItem(t);r&&(n?e(t).removeClass(B):e(t).addClass(B).removeClass(P))},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource()},_dataSource:function(){var t=this,n=t.options,i=n.dataSource||{};i=e.isArray(i)?{data:i}:i,i.select=t.element,i.fields=[{field:n.dataTextField},{field:n.dataValueField}],t._unbindDataSource(),t.dataSource=C.create(i),t._bindDataSource(),t.options.autoBind&&t.dataSource.fetch()},_bindDataSource:function(){var e=this,t=e.dataSource;e._dataChangeHandler=A(e.refresh,e),t&&t.bind(ee,e._dataChangeHandler)},_unbindDataSource:function(){var e=this,t=e.dataSource;t&&t.unbind(ee,e._dataChangeHandler)},_wrapper:function(){var t=this,n=t.element,i=n.parent("div.k-listbox");i[0]||(i=n.wrap('<div class="k-widget k-listbox" deselectable="on" />').parent(),i[0].style.cssText=n[0].style.cssText,i[0].title=n[0].title,e('<div class="k-list-scroller" />').insertBefore(n)),t.wrapper=i.addClass(n[0].className).css("display",""),t._innerWrapper=e(i[0].firstChild)},_list:function(){var t=this;e("<ul class='"+G+"' role='listbox'></ul>").appendTo(t._innerWrapper),t.options.navigatable&&t._getList().attr(pe,t._getTabIndex())},_templates:function(){var e,t=this,n=this.options;e=n.template&&"string"==typeof n.template?_.template(n.template):n.template?n.template:_.template("${"+_.expr(n.dataTextField,"data")+"}",{useWithBlock:!1}),t.templates={itemTemplate:_.template("# var item = data.item, r = data.r; # <li class='k-item' role='option' aria-selected='false'>#=r(item)#</li>",{useWithBlock:!1}),itemContent:e,toolbar:"<div class='"+V+"'></div>"}},refresh:function(){var e,t=this,n=t.dataSource.view(),i=t.templates.itemTemplate,r="";for(e=0;e<n.length;e++)r+=i({item:n[e],r:t.templates.itemContent});t._getList().html(r),t._setItemIds(),t._createToolbar(),t._syncElement(),t._updateToolbar(),t._updateAllToolbars(),t.trigger(te)},_syncElement:function(){var e,t="",n=this.dataSource.view();for(e=0;e<n.length;e++)t+=this._option(n[e][this.options.dataValueField]||n[e],n[e][this.options.dataTextField]||n[e],!0);this.element.html(t)},_option:function(e,n){var i="<option";return e!==t&&(e+="",e.indexOf('"')!==-1&&(e=e.replace(/"/g,"&quot;")),i+=' value="'+e+'"'),i+=" selected>",n!==t&&(i+=_.htmlEncode(n)),i+="</option>"},_setItemIds:function(){var e,t=this,n=t.items(),i=t.dataSource.view(),r=i.length;for(e=0;e<r;e++)n.eq(e).attr(b(he),i[e].uid).attr("id",i[e].uid)},_selectable:function(){var e=this,t=e.options.selectable,n=T.parseOptions(t);n.multiple&&e.element.attr("aria-multiselectable","true"),e.selectable=new T(e._innerWrapper,{aria:!0,multiple:n.multiple,filter:L,change:A(e._onSelect,e)})},_onSelect:function(){var e=this;e._updateToolbar(),e._updateAllToolbars(),e.trigger(ee)},_destroySelectable:function(){var e=this;e.selectable&&e.selectable.element&&(e.selectable.destroy(),e.selectable=null)},_getList:function(){return this.wrapper.find($)},_getItems:function(e){return this.items().filter(e)},_createToolbar:function(){var t,n=this,i=n.options.toolbar,r=i.position||ye,o=r===xe?"insertAfter":"insertBefore",a=i.tools||[],s=n.options.messages;n._destroyToolbar(),n.wrapper.removeClass(Ce.join(M)),a.length&&a.length>0&&(t=e(n.templates.toolbar)[o](n._innerWrapper),n.toolbar=new v(t,F({},i,{listBox:n,messages:s})),n.wrapper.addClass(V+I+r))},_destroyToolbar:function(){var e=this;e.toolbar&&(e.toolbar.destroy(),e.toolbar=null)},_executeCommand:function(e){var t=this,n=a.current.create(e,{listBox:t});n&&(n.execute(),t._updateToolbar(),t._updateAllToolbars())},_updateToolbar:function(){var e=this.toolbar;e&&e._updateToolStates()},_updateAllToolbars:function(){var t,n,i=e("select[data-role='listbox']"),r=i.length;for(n=0;n<r;n++)t=e(i[n]).data(H),t&&t._updateToolbar()}});_.ui.plugin(Te),a=D.extend({init:function(){this._commands=[]},register:function(e,t){this._commands.push({commandName:e,commandType:t})},create:function(e,t){var n,i,r,o=this._commands,a=o.length,s=e?e.toLowerCase():"";for(r=0;r<a;r++)if(i=o[r],i.commandName.toLowerCase()===s){n=i;break}if(n)return new n.commandType(t)}}),a.current=new a,s=D.extend({init:function(e){var t=this;t.options=F({},t.options,e),t.listBox=t.options.listBox},options:{listBox:null},getItems:function(){return e(this.listBox.select())},execute:E,canExecute:E}),l=s.extend({execute:function(){var e=this,t=e.listBox,n=e.getItems();t.trigger(ie,{dataItems:t._dataItems(n),items:n})||t.remove(n)},canExecute:function(){return this.listBox.select().length>0}}),a.current.register(ie,l),d=s.extend({execute:function(){var e=this;e.canExecute()&&e.moveItems()},canExecute:E,moveItems:function(){var t,i=this,r=i.listBox,o=i.options,a=i.getItems(),s=o.offset,l=n(a),d=e.makeArray(a.sort(i.itemComparer)),u=o.moveAction;if(!r.trigger(re,{dataItems:r._dataItems(d),items:e(d),offset:s}))for(;d.length>0&&l.length>0;)t=d[u](),r.reorder(t,l[u]()+s)},options:{offset:0,moveAction:"pop"},itemComparer:function(t,n){var i=e(t).index(),r=e(n).index();return i===r?0:i>r?1:-1}}),u=d.extend({options:{offset:me,moveAction:"shift"},canExecute:function(){var e=this.getItems(),t=n(e);return t.length>0&&t[0]>0}}),a.current.register(oe,u),c=d.extend({options:{offset:ge,moveAction:"pop"},canExecute:function(){var t=this,i=t.getItems(),r=n(i);return r.length>0&&e(r).last()[0]<t.listBox.items().length-1}}),a.current.register(ae,c),h=s.extend({options:{filter:L},execute:function(){var e=this,t=e.getSourceListBox(),n=e.getItems().filter(e.options.filter),i=t?t._dataItems(n):[],r=e.getDestinationListBox(),o=e.getUpdatedSelection(n);r&&n.length>0&&(r.trigger(ne,{dataItems:i,items:n})||r.add(i),t.trigger(ie,{dataItems:i,items:n})||(t.remove(n),e.updateSelection(o)))},getUpdatedSelection:function(t){var n=this,i=n.options.filter,r=n.getSourceListBox(),o=r?r.items().filter(i).last():null,a=e(t).filter(o).length>0,s=a?e(t).prevAll(i)[0]:e(t).nextAll(i)[0];return 1===e(t).length&&s?s:null},updateSelection:function(t){var n=this.getSourceListBox();n&&t&&(e(n.select(e(t))),n._scrollIntoView(t))},getSourceListBox:E,getDestinationListBox:E}),p=h.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.select().length>0},getSourceListBox:function(){return this.listBox},getDestinationListBox:function(){var t=this.getSourceListBox();return t&&t.options.connectWith?e(z+t.options.connectWith).data(H):null},getItems:function(){var t=this.getSourceListBox();return t?e(t.select()):e()}}),a.current.register(se,p),f=h.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.select().length>0},getSourceListBox:function(){var t=this.getDestinationListBox();return t&&t.options.connectWith?e(z+t.options.connectWith).data(H):null},getDestinationListBox:function(){return this.listBox},getItems:function(){var t=this.getSourceListBox();return t?e(t.select()):e()}}),a.current.register(le,f),m=p.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.items().filter(L).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():e()},getUpdatedSelection:E,updateSelection:E}),a.current.register(de,m),g=f.extend({canExecute:function(){var e=this.getSourceListBox();return!!e&&e.items().filter(L).length>0},getItems:function(){var t=this.getSourceListBox();return t?t.items():e()},getUpdatedSelection:E,updateSelection:E}),a.current.register(ue,g),v=D.extend({init:function(t,n){
var i=this;i.element=e(t).addClass(V),i.options=F({},i.options,n),i.listBox=i.options.listBox,i._initTemplates(),i._createTools(),i._updateToolStates(),i._attachEventHandlers()},destroy:function(){var e=this;e._detachEventHandlers(),_.destroy(e.element),e.element.remove(),e.element=null},options:{position:ye,tools:[]},_initTemplates:function(){this.templates={tool:y("<li><a href='\\\\#' class='k-button k-button-icon' data-command='#= command #' title='#= text #' aria-label='#= text #' role='button'><span class='k-icon #= iconClass #'></span></a></li>")}},_createTools:function(){var t,n,i=this,r=i.options.tools,o=r.length,a=i.options.messages.tools,s=i._createToolList();for(n=0;n<o;n++)t=F({},v.defaultTools[r[n]],{text:a[r[n]]}),t&&s.append(e(i.templates.tool(t)));i.element.append(s)},_createToolList:function(){return e("<ul class='k-reset' />")},_attachEventHandlers:function(){var e=this;e.element.on(Y,W,A(e._onToolClick,e))},_detachEventHandlers:function(){this.element.off(N).find("*").off(N)},_onToolClick:function(t){t.preventDefault(),this._executeToolCommand(e(t.currentTarget).data(fe))},_executeToolCommand:function(e){var t=this,n=t.listBox;n&&n._executeCommand(e)},_updateToolStates:function(){var e,t=this,n=t.options.tools,i=n.length;for(e=0;e<i;e++)t._updateToolState(n[e])},_updateToolState:function(t){var n=this,i=a.current.create(t,{listBox:n.listBox}),r=n.element.find("[data-command='"+t+"']")[0];r&&i&&i.canExecute&&(i.canExecute()?e(r).removeClass(B):e(r).addClass(B))}}),v.defaultTools={remove:{command:ie,iconClass:"k-i-x"},moveUp:{command:oe,iconClass:"k-i-arrow-60-up"},moveDown:{command:ae,iconClass:"k-i-arrow-60-down"},transferTo:{command:se,iconClass:"k-i-arrow-60-right"},transferFrom:{command:le,iconClass:"k-i-arrow-60-left"},transferAllTo:{command:de,iconClass:"k-i-arrow-double-60-right"},transferAllFrom:{command:ue,iconClass:"k-i-arrow-double-60-left"}},F(Te,{ToolBar:v})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.upload.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(t){return e.map(i(t),function(e){return e.name}).join(", ")}function i(e){var t=e[0];return t.files?r(t.files):[{name:s(t.value),extension:a(t.value),size:null}]}function r(t){return e.map(t,function(e){return o(e)})}function o(e){var t=e.name||e.fileName;return{name:C.htmlEncode(t),extension:a(t),size:"number"==typeof e.size?e.size:e.fileSize,rawFile:e}}function a(e){var t=e.match(F);return t?t[0]:""}function s(e){var t=e.lastIndexOf("\\");return t!=-1?e.substr(t+1):e}function l(t,n){var i=C.guid();return e.map(t,function(e){return e.uid=n?C.guid():i,e})}function d(e,t){var n,i=u(t.allowedExtensions),r=t.maxFileSize,o=t.minFileSize;for(n=0;n<e.length;n++)c(e[n],i),h(e[n],o,r)}function u(t){var n=e.map(t,function(e){var t="."===e.substring(0,1)?e:"."+e;return t.toLowerCase()});return n}function c(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],e.inArray(q,t.validationErrors)===-1&&t.validationErrors.push(q))}function h(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],e.inArray(U,t.validationErrors)===-1&&t.validationErrors.push(U)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],e.inArray(W,t.validationErrors)===-1&&t.validationErrors.push(W))}function p(e){var t,n=0;if("number"!=typeof e[0].size)return"";for(t=0;t<e.length;t++)e[t].size&&(n+=e[t].size);return n/=1024,n<1024?n.toFixed(2)+" KB":(n/1024).toFixed(2)+" MB"}function f(t){return!t.multiple&&e(".k-file",t.wrapper).length>1}function m(n,i,r,o){var a,s;return i._supportsRemove()?(a=n.data("fileNames"),s=e.map(a,function(e){return e.name}),o===!1?(i._removeFileEntry(n),t):(i._submitRemove(s,r,function(e,t,r){var o=i.trigger(R,{operation:"remove",files:a,response:e,XMLHttpRequest:r});o||i._removeFileEntry(n)},function(e){f(i)&&i._removeFileEntry(n),i.trigger(M,{operation:"remove",files:a,XMLHttpRequest:e}),D("Server response: "+e.responseText)}),t)):(!f(i)&&o||i._removeFileEntry(n),t)}function g(t,n,i){var r=!1,o="";try{o=e.parseJSON(v(t)),r=!0}catch(a){i()}r&&n(o)}function v(e){return t!==e&&""!==e||(e="{}"),e}function _(e){e.stopPropagation(),e.preventDefault()}function b(e,t,n,i){var r,o;e.on("dragenter"+t,function(e){n(e),o=new Date,r||(r=setInterval(function(){var e=new Date-o;e>100&&(i(),clearInterval(r),r=null)},100))}).on("dragover"+t,function(){o=new Date})}function k(e){return e.is(".k-file-progress, .k-file-success, .k-file-error")}function w(t){return e(t.target).closest(".k-file")}var y,x,C=window.kendo,T=C.ui.Widget,S=C.antiForgeryTokens,D=C.logToConsole,F=/\.([^\.]+)$/,E=".kendoUpload",A="select",I="upload",R="success",M="error",z="complete",H="cancel",N="clear",B="pause",P="resume",L="progress",O="remove",V="validationErrors",W="invalidMaxFileSize",U="invalidMinFileSize",q="invalidFileExtension",j=1e3,G=2e3,$={loading:"k-i-loading",warning:"k-i-warning",success:"k-i-check"},K=T.extend({init:function(t,n){var i,r,o,a=this;T.fn.init.call(a,t,n),a.name=t.name,a.multiple=a.options.multiple,a.directory=a.options.directory,a.localization=a.options.localization,i=a.element,a.wrapper=i.closest(".k-upload"),0===a.wrapper.length&&(a.wrapper=a._wrapInput(i)),a._activeInput(i),a.toggle(a.options.enabled),r=a._ns=E+"-"+C.guid(),i.closest("form").on("submit"+r,e.proxy(a._onParentFormSubmit,a)).on("reset"+r,e.proxy(a._onParentFormReset,a)),a.options.async.saveUrl?(a._module=a._supportsFormData()?new x(a):new y(a),a._async=!0,o=a.options.files,o.length>0&&a._renderInitialFiles(o)):a._module=new Y(a),a._supportsDrop()&&(""!==a.options.dropZone?a._setupCustomDropZone():a._setupDropZone()),a.wrapper.on("click",".k-upload-action",e.proxy(a._onFileAction,a)).on("click",".k-clear-selected",e.proxy(a._onClearSelected,a)).on("click",".k-upload-selected",e.proxy(a._onUploadSelected,a)),a.element.val()&&a._onInputChange({target:a.element})},events:[A,I,R,M,z,H,N,L,O,B,P],options:{name:"Upload",enabled:!0,multiple:!0,directory:!1,showFileList:!0,template:"",files:[],async:{autoRetryAfter:0,bufferChunkSize:1e7,maxAutoRetries:1,removeVerb:"POST",autoUpload:!0,withCredentials:!0,accept:"*/*; q=0.5, application/json",useArrayBuffer:!1},localization:{select:"Select files...",cancel:"Cancel",retry:"Retry",remove:"Remove",pause:"Pause",resume:"Resume",clearSelectedFiles:"Clear",uploadSelectedFiles:"Upload",dropFilesHere:"Drop files here to upload",invalidFiles:"Invalid file(s). Please check file upload requirements.",statusUploading:"uploading",statusUploaded:"uploaded",statusWarning:"warning",statusFailed:"failed",headerStatusUploading:"Uploading...",headerStatusPaused:"Paused",headerStatusUploaded:"Done",invalidMaxFileSize:"File size too large.",invalidMinFileSize:"File size too small.",invalidFileExtension:"File type not allowed."},validation:{allowedExtensions:[],maxFileSize:0,minFileSize:0},dropZone:""},setOptions:function(e){var t=this,n=t.element;T.fn.setOptions.call(t,e),t.multiple=t.options.multiple,t.directory=t.options.directory,n.attr("multiple",!!t._supportsMultiple()&&t.multiple),t.directory&&(n.attr("webkitdirectory",t.directory),n.attr("directory",t.directory)),t.toggle(t.options.enabled)},enable:function(e){e=t===e||e,this.toggle(e)},disable:function(){this.toggle(!1)},toggle:function(e){e=t===e?e:!e,this.wrapper.toggleClass("k-state-disabled",e),this.element.prop("disabled",e)},focus:function(){this.element.focus()},destroy:function(){var t=this,n=e(t.options.dropZone);e(document).add(e(".k-dropzone",t.wrapper)).add(t.wrapper.closest("form")).off(t._ns),n.length>0&&n.off(t._ns),e(t.element).off(E),T.fn.destroy.call(t)},pause:function(t){this._module.onPause({target:e(t,this.wrapper)});var n=t.find(".k-i-pause-sm");n.removeClass("k-i-pause-sm").addClass("k-i-play-sm").attr("title",this.localization.resume),e(n).parent().attr("aria-label",this.localization.resume)},resume:function(t){this._module.onResume({target:e(t,this.wrapper)});var n=t.find(".k-i-play-sm");n.removeClass("k-i-play-sm").addClass("k-i-pause-sm").attr("title",this.localization.pause),e(n).parent().attr("aria-label",this.localization.pause)},upload:function(){var e=this;e._module.onSaveSelected()},getFiles:function(){var t,n,i,r=this,o=[],a=r.wrapper.find(".k-file");for(n=0;n<a.length;n++)if(t=e(a[n]).data("fileNames"))for(i=0;i<t.length;i++)o.push(t[i]);return o},clearAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,n){e._removeFileByDomElement(n,!1)})},removeAllFiles:function(){var e=this,t=e.wrapper.find(".k-file");t.each(function(t,n){e._removeFileByDomElement(n,!0)})},removeFileByUid:function(e){this._removeFileByUid(e,!0)},clearFileByUid:function(e){this._removeFileByUid(e,!1)},_removeFileByUid:function(t,n){var i,r=this;"string"==typeof t&&(i=e(".k-file["+C.attr("uid")+'="'+t+'"]',r.wrapper),i.length>0&&r._removeFileByDomElement(i,n))},clearFile:function(e){this._removeFile(e,!1)},removeFile:function(e){this._removeFile(e,!0)},_removeFile:function(t,n){var i,r=this,o=r.wrapper.find(".k-file");"function"==typeof t&&o.each(function(o,a){i=e(a).data("fileNames"),t(i)&&r._removeFileByDomElement(a,n)})},_removeFileByDomElement:function(t,n){var i,r=this,o={target:e(t,r.wrapper)};r.options.async.saveUrl?(e(t).hasClass("k-file-progress")?r._module.onCancel(o):r._module.onRemove(o,{},n),i=e(".k-file",r.wrapper),0===i.length?r._hideHeaderUploadstatus():r._updateHeaderUploadStatus()):r._module.onRemove(o,{},n)},_addInput:function(t){if(t[0].nodeType){var n=this,i=t.clone().val("");i.insertAfter(n.element).data("kendoUpload",n),e(n.element).hide().attr("tabindex","-1").removeAttr("id").off(E),n._activeInput(i),n.element.focus()}},_activeInput:function(t){var n=this,i=n.wrapper;n.element=t,n.directory&&(t.attr("webkitdirectory",n.directory),t.attr("directory",n.directory)),t.attr("multiple",!!n._supportsMultiple()&&n.multiple).attr("autocomplete","off").on("click"+E,function(e){i.hasClass("k-state-disabled")&&e.preventDefault()}).on("focus"+E,function(){e(this).parent().addClass("k-state-focused")}).on("blur"+E,function(){e(this).parent().removeClass("k-state-focused")}).on("change"+E,e.proxy(n._onInputChange,n)).on("keydown"+E,e.proxy(n._onInputKeyDown,n))},_onInputKeyDown:function(e){var t=this,n=t.wrapper.find(".k-upload-action:visible:first");e.keyCode===C.keys.TAB&&n.length>0&&!e.shiftKey&&(e.preventDefault(),n.focus())},_onInputChange:function(t){var n,i=this,r=e(t.target),o=l(i._inputFiles(r),i._isAsyncNonBatch());d(o,i.options.validation),n=i.trigger(A,{files:o}),n?(i._addInput(r),r.remove()):i._module.onSelect({target:r},o)},_readDirectory:function(t){var n=new e.Deferred,i=t.createReader(),r=[],o=function(){i.readEntries(function(e){e.length?(r=r.concat(e),o()):n.resolve(r)},n.reject)};return o(),n.promise()},_readFile:function(e){var t=this,n=e.fullPath;e.file(function(e){e.relativePath=n.slice(1),t.droppedFolderFiles.push(e),t.droppedFolderCounter--,0===t.droppedFolderCounter&&setTimeout(function(){0===t.droppedFolderCounter&&t.droppedFolderFiles.length&&(t._proceedDroppedItems(t.droppedFolderFiles),t.droppedFolderFiles=[])},0)},function(){D("File error.")})},_traverseFileTree:function(e,t){var n=this;t||n.droppedFolderCounter--,this._readDirectory(e).then(function(e){n.droppedFolderCounter+=e.length;for(var t=0;t<e.length;t++)e[t].isFile?n._readFile(e[t]):e[t].isDirectory&&n._traverseFileTree(e[t])})},_onDrop:function(e){var t,n,i,r=e.originalEvent.dataTransfer,o=this,a=r.files;if(_(e),o.options.directoryDrop&&r.items)for(t=r.items.length,o.droppedFolderCounter=0,o.droppedFolderFiles=[],n=0;n<t;n++)r.items[n].webkitGetAsEntry?(i=r.items[n].webkitGetAsEntry(),i.isDirectory?o._traverseFileTree(i,!0):i.isFile&&o.droppedFolderFiles.push(r.files[n])):o._proceedDroppedItems(a);else o._proceedDroppedItems(a)},_proceedDroppedItems:function(t){var n,i=this,o=l(r(t),i._isAsyncNonBatch());t.length>0&&!i.wrapper.hasClass("k-state-disabled")&&(!i.multiple&&o.length>1&&o.splice(1,o.length-1),d(o,i.options.validation),n=i.trigger(A,{files:o}),n||i._module.onSelect({target:e(".k-dropzone",i.wrapper)},o))},_filesContainValidationErrors:function(t){var n=!1;return e(t).each(function(e,t){if(t[V]&&t[V].length>0)return n=!0,!1}),n},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(e){var t,n,i=this,r=0;for(e=l(e,!0),r=0;r<e.length;r++)t=e[r],n=i._enqueueFile(t.name,{fileNames:[t]}),n.addClass("k-file-success").data("files",[e[r]]),i._supportsRemove()&&i._fileAction(n,O)},_prepareTemplateData:function(e,t){var n=t.fileNames,i={},r=0,o=0;for(o=0;o<n.length;o++)r+=n[o].size;return i.name=e,i.size=r,i.files=t.fileNames,i},_prepareDefaultSingleFileEntryTemplate:function(t){var n=this,i=t.fileNames[0],r=p(t.fileNames),o=i[V],a="";return a+=o&&o.length>0?"<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-file-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span><span class='k-file-validation-message'>"+n.localization[o[0]]+"</span></span>":"<li class='k-file'><span class='k-progress'></span><span class='k-file-extension-wrapper'><span class='k-file-extension'>"+i.extension.substring(1)+"</span><span class='k-file-state'></span></span><span class='k-file-name-size-wrapper'><span class='k-file-name' title='"+i.name+"'>"+i.name+"</span><span class='k-file-size'>"+r+"</span></span>",a+="<strong class='k-upload-status'></strong>",e(a)},_prepareDefaultMultipleFileEntriesTemplate:function(t){var n,i,r=this,o=t.fileNames,a=r._filesContainValidationErrors(o),s=p(o),l="";for(l+=a?"<li class='k-file k-file-invalid'><span class='k-progress'></span><span class='k-multiple-files-invalid-extension-wrapper'><span class='k-file-invalid-icon'>!</span>":"<li class='k-file'><span class='k-progress'></span><span class='k-multiple-files-extension-wrapper'>",l+="<span class='k-file-state'></span></span>",o.sort(function(e,t){return e[V]?-1:t[V]?1:0}),l+="<span class='k-file-name-size-wrapper'>",n=0;n<o.length;n++)i=o[n],l+=i[V]&&i[V].length>0?"<span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span>":"<span class='k-file-name' title='"+i.name+"'>"+i.name+"</span>";return l+=a?"<span class='k-file-validation-message'>"+r.localization.invalidFiles+"</span>":"<span class='k-file-information'>Total: "+o.length+" files, "+s+"</span>",l+="</span><strong class='k-upload-status'></strong>",e(l)},_enqueueFile:function(t,n){var i,r,o,a,s=this,l=n.fileNames[0].uid,d=e(".k-upload-files",s.wrapper),u=s.options,c=u.template;return 0===d.length&&(d=e("<ul class='k-upload-files k-reset'></ul>").appendTo(s.wrapper),s.options.showFileList||d.hide(),s.wrapper.removeClass("k-upload-empty")),i=e(".k-file",d),c?(o=s._prepareTemplateData(t,n),c=C.template(c),r=e("<li class='k-file'>"+c(o)+"</li>"),r.find(".k-upload-action").addClass("k-button"),s.angular("compile",function(){return{elements:r,data:[o]}})):r=1===n.fileNames.length?s._prepareDefaultSingleFileEntryTemplate(n):s._prepareDefaultMultipleFileEntriesTemplate(n),r.attr(C.attr("uid"),l).appendTo(d).data(n),s._async||e(".k-progress",r).width("100%"),!s.multiple&&i.length>0&&(a={files:i.data("fileNames"),headers:{}},s.trigger(O,a)||s._module.onRemove({target:e(i,s.wrapper)},a)),r},_removeFileEntry:function(t){var n,i,r,o=this,a=t.closest(".k-upload-files");t.remove(),n=e(".k-file",a),i=e(".k-file-success, .k-file-error",a),r=e(".k-file-invalid",a),i.length!==n.length&&r.length!==n.length||this._hideUploadButton(),0===n.length?(a.remove(),o.wrapper.addClass("k-upload-empty"),o._hideHeaderUploadstatus()):o._updateHeaderUploadStatus()},_fileAction:function(e,t,n){var i,r={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry",pause:"k-i-pause-sm"},o={remove:"k-i-close",cancel:"k-i-close",retry:"k-i-reload-sm",pause:"k-i-pause-sm"};r.hasOwnProperty(t)&&(n||this._clearFileAction(e),this.options.template?(i=e.find(".k-upload-action").first(),i.find(".k-icon").length?i.next(".k-upload-action").length&&i.next(".k-upload-action").addClass("k-button").append("<span class='k-icon "+o[t]+" "+r[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show():i.addClass("k-button").append("<span class='k-icon "+o[t]+" "+r[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show()):(n||e.find(".k-upload-status .k-upload-action").remove(),e.find(".k-upload-status").append(this._renderAction(r[t],this.localization[t],o[t]))))},_fileState:function(t,n){var i=this.localization,r={uploading:{text:i.statusUploading},uploaded:{text:i.statusUploaded},failed:{text:i.statusFailed}},o=r[n];o&&e("span.k-file-state",t).text(o.text)},_renderAction:function(t,n,i){return""!==t?e("<button type='button' class='k-button k-upload-action' aria-label='"+n+"'><span class='k-icon "+i+" "+t+"' title='"+n+"'></span></button>").on("focus",function(){e(this).addClass("k-state-focused")}).on("blur",function(){e(this).removeClass("k-state-focused")}):e("<button type='button' class='k-button'>"+n+"</button>")},_clearFileAction:function(t){e(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var n,i,r,o,a,s,l=this;return l.wrapper.hasClass("k-state-disabled")||(n=e(t.target).closest(".k-upload-action"),i=n.find(".k-icon"),r=n.closest(".k-file"),o=r.data("fileNames"),a=l._filesContainValidationErrors(o),s={files:o,headers:{}},l._retryClicked=!1,i.hasClass("k-i-x")?l.trigger(O,s)||l._module.onRemove({target:e(r,l.wrapper)},s,!a):i.hasClass("k-i-cancel")?(l.trigger(H,s),l._module.onCancel({target:e(r,l.wrapper)}),l._checkAllComplete(),l._updateHeaderUploadStatus()):i.hasClass("k-i-pause-sm")?(l.trigger(B,s),l.pause(r),l._updateHeaderUploadStatus()):i.hasClass("k-i-play-sm")?(l.trigger(P,s),l.resume(r)):i.hasClass("k-i-retry")&&(e(".k-i-warning",r).remove(),e(".k-progress",r).finish().show(),l._module.onRetry({target:e(r,l.wrapper)}),l._retryClicked=!0)),!1},_onUploadSelected:function(){var e=this,t=e.wrapper;return t.hasClass("k-state-disabled")||this._module.onSaveSelected(),!1},_onClearSelected:function(){var e=this,t=e.wrapper,n={};return t.hasClass("k-state-disabled")||e.trigger(N,n)||e.clearAllFiles(),!1},_onFileProgress:function(t,n){var i,r;n>100&&(n=100),this.options.template?e(".k-progress",t.target).width(n+"%"):(i=e(".k-upload-pct",t.target),r=e(".k-i-warning",t.target),r.length?r.removeClass("k-i-warning").removeClass("k-icon").addClass("k-upload-pct"):0===i.length&&e(".k-upload-status",t.target).prepend("<span class='k-upload-pct'></span>"),100!==n?e(".k-upload-pct",t.target).text(n+"%"):e(".k-upload-pct",t.target).remove(),e(".k-progress",t.target).width(n+"%")),this.trigger(L,{files:w(t).data("fileNames"),percentComplete:n})},_onUploadSuccess:function(e,t,n){var i=this,r=w(e),o=i.trigger(R,{files:r.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:n});o?i._setUploadErrorState(r):(i._fileState(r,"uploaded"),r.removeClass("k-file-progress").addClass("k-file-success"),i._updateHeaderUploadStatus(),i._supportsRemove()?i._fileAction(r,O):i._clearFileAction(r)),i._hideUploadProgress(r),i._checkAllComplete()},_onUploadError:function(e,t){var n=this,i=n._module,r=w(e),o=r.data("uid");n._setUploadErrorState(r),n.trigger(M,{operation:"upload",files:r.data("fileNames"),XMLHttpRequest:t}),D("Server response: "+t.responseText),n.options.async.chunkSize?i._decreasePosition&&i._decreasePosition(o):n._hideUploadProgress(r),n._checkAllComplete(),this.options.async.autoRetryAfter&&this._autoRetryAfter(r)},_autoRetryAfter:function(e){var t=this,n=this._module.retries;n&&(n[e.data("uid")]||(n[e.data("uid")]=1),n[e.data("uid")]<=this.options.async.maxAutoRetries&&(n[e.data("uid")]++,setTimeout(function(){t._module.performUpload(e)},this.options.async.autoRetryAfter)))},_setUploadErrorState:function(t){var n,i=this;i._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),i._updateUploadProgress(t),n=e(".k-upload-pct",t),n.length>0?(n.parent().find(".k-i-warning").length||n.removeClass("k-upload-pct").addClass("k-icon k-i-warning"),n.empty()):e(".k-upload-status",t).prepend("<span class='k-icon k-i-warning'></span>"),this._updateHeaderUploadStatus(),this._fileAction(t,"retry"),this._fileAction(t,O,!0),i._retryClicked&&t.find(".k-i-retry").parent().focus()},_updateUploadProgress:function(t){var n,i,r,o=this;o.options.async.chunkSize?(n=t.data("uid"),o._module.metaData&&(i=o._module.metaData[n],i&&(r=i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100,o._onFileProgress({target:e(t,o.wrapper)},r)))):e(".k-progress",t).width("100%")},_hideUploadProgress:function(t){e(".k-progress",t).delay(j).fadeOut(G,function(){e(this).css("width","0%")})},_showUploadButton:function(){var t=this,n=e(".k-upload-selected",t.wrapper),i=e(".k-clear-selected",t.wrapper);0===n.length&&(n=t._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected"),i=t._renderAction("",this.localization.clearSelectedFiles).addClass("k-clear-selected")),this.wrapper.append(i,n)},_hideUploadButton:function(){e(".k-upload-selected, .k-clear-selected",this.wrapper).remove()},_showHeaderUploadStatus:function(t){var n=this,i=n.localization,r=e(".k-dropzone",n.wrapper),o=e(".k-upload-status-total",n.wrapper);0!==o.length&&o.remove(),o='<strong class="k-upload-status k-upload-status-total"><span class="k-icon"></span></strong>',t?(o=e(o).append(i.headerStatusUploading),o.find(".k-icon").addClass($.loading)):(o=e(o).append(i.headerStatusUploaded),o.find(".k-icon").addClass($.warning)),r.length>0?r.append(o):e(".k-upload-button",n.wrapper).after(o)},_updateHeaderUploadStatus:function(){var t,n,i=this,r=e(".k-upload-status-total",this.wrapper),o=e(".k-file",i.wrapper).not(".k-file-success, .k-file-error, .k-file-invalid"),a=e(".k-file-invalid",i.wrapper),s=e(".k-file-error",i.wrapper),l=e(".k-file",i.wrapper).find(".k-i-play-sm");!l.length||l.length!==o.length&&i.options.async.concurrent?(0===o.length||a.length>0||s.length>0)&&(t=e(".k-file.k-file-error, .k-file.k-file-invalid",i.wrapper),r=e(".k-upload-status-total",i.wrapper),n=e(".k-icon",r).removeClass().addClass("k-icon").addClass(0!==t.length?$.warning:$.success),r.html(n).append(i.localization.headerStatusUploaded)):(n=e(".k-icon",r).removeClass().addClass("k-icon").addClass("k-i-pause-sm"),r.html(n).append(i.localization.headerStatusPaused))},_hideHeaderUploadstatus:function(){e(".k-upload-status-total",this.wrapper).remove()},_onParentFormSubmit:function(){var n,i=this,r=i.element;t!==this._module.onAbort&&this._module.onAbort(),r.value||(n=e(r),n.attr("disabled","disabled"),window.setTimeout(function(){n.removeAttr("disabled")},0))},_onParentFormReset:function(){e(".k-upload-files",this.wrapper).remove()},_supportsFormData:function(){return"undefined"!=typeof FormData},_supportsMultiple:function(){var e=this._userAgent().indexOf("Windows")>-1;return!(C.support.browser.opera||C.support.browser.safari&&e)},_supportsDrop:function(){var e=this._userAgent().toLowerCase(),t=/chrome/.test(e),n=!t&&/safari/.test(e),i=n&&/windows/.test(e);return!i&&this._supportsFormData()&&this.options.async.saveUrl},_userAgent:function(){return navigator.userAgent},_setupDropZone:function(){var t,n,i=this;e(".k-upload-button",i.wrapper).wrap("<div class='k-dropzone'></div>"),t=i._ns,n=e(".k-dropzone",i.wrapper).append(e("<em>"+i.localization.dropFilesHere+"</em>")).on("dragenter"+t,_).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(i._onDrop,i)),b(n,t,function(){n.closest(".k-upload").hasClass("k-state-disabled")||n.addClass("k-dropzone-hovered")},function(){n.removeClass("k-dropzone-hovered")}),i._bindDocumentDragEventWrappers(n)},_setupCustomDropZone:function(){var t,n=this,i=e(n.options.dropZone);e(".k-upload-button",n.wrapper).wrap("<div class='k-dropzone'></div>").after(e("<em>"+n.localization.dropFilesHere+"</em>")),t=n._ns,i.on("dragenter"+t,_).on("dragover"+t,function(e){e.preventDefault()}).on("drop"+t,e.proxy(n._onDrop,n)),b(i,t,function(t){n.wrapper.hasClass("k-state-disabled")||(i.removeClass("k-dropzone-hovered"),e(t.target).addClass("k-dropzone-hovered"))},function(){i.removeClass("k-dropzone-hovered")}),n._bindDocumentDragEventWrappers(i)},_bindDocumentDragEventWrappers:function(t){var n=this,i=n._ns;b(e(document),i,function(){n.wrapper.hasClass("k-state-disabled")||(t.addClass("k-dropzone-active"),t.closest(".k-upload").removeClass("k-upload-empty"))},function(){t.removeClass("k-dropzone-active"),0===e("li.k-file",t.closest(".k-upload")).length&&t.closest(".k-upload").addClass("k-upload-empty")})},_supportsRemove:function(){return!!this.options.async.removeUrl},_submitRemove:function(t,n,i,r){var o=this,a=o.options.async.removeField||"fileNames",s=e.extend(n.data,S());s[a]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:v,url:this.options.async.removeUrl,traditional:!0,data:s,headers:n.headers,success:i,error:r,xhrFields:{withCredentials:this.options.async.withCredentials}})},_wrapInput:function(e){var t=this,n=t.options;return e.wrap("<div class='k-widget k-upload k-header'><div class='k-button k-upload-button' aria-label='"+this.localization.select+"'></div></div>"),n.async.saveUrl||e.closest(".k-upload").addClass("k-upload-sync"),e.closest(".k-upload").addClass("k-upload-empty"),e.closest(".k-button").append("<span>"+this.localization.select+"</span>"),e.closest(".k-upload")},_checkAllComplete:function(){0===e(".k-file.k-file-progress",this.wrapper).length&&this.trigger(z)},_inputFiles:function(e){return i(e)}}),Y=function(e){this.name="syncUploadModule",this.element=e.wrapper,this.upload=e,this.element.closest("form").attr("enctype","multipart/form-data").attr("encoding","multipart/form-data")};Y.prototype={onSelect:function(t,i){var r,o,a=this.upload,s=e(t.target),l=a._filesContainValidationErrors(i);a._addInput(s),r={fileNames:i},l?s.remove():r.relatedInput=s,o=a._enqueueFile(n(s),r),l&&a._hideUploadProgress(o),a._fileAction(o,O)},onRemove:function(e){var t=w(e),n=t.data("relatedInput");n&&n.remove(),this.upload._removeFileEntry(t)}},y=function(e){this.name="iframeUploadModule",this.element=e.wrapper,this.upload=e,this.iframes=[]},K._frameId=0,y.prototype={onSelect:function(t,n){var i=this.upload,r=e(t.target),o=i._filesContainValidationErrors(n),a=this.prepareUpload(r,n,o);i.options.async.autoUpload?o?(i._fileAction(a,O),i._showHeaderUploadStatus(!1)):this.performUpload(a):(i._fileAction(a,O),o?i._updateHeaderUploadStatus():i._showUploadButton()),o&&i._hideUploadProgress(a)},prepareUpload:function(t,i,r){var o,a,s,l,d=this.upload,u=e(d.element),c=d.options.async.saveField||t.attr("name");return d._addInput(t),t.attr("name",c),r?(t.remove(),a={fileNames:i}):(s=this.createFrame(d.name+"_"+K._frameId++),this.registerFrame(s),l=this.createForm(d.options.async.saveUrl,s.attr("name")).append(u),a={frame:s,relatedInput:u,fileNames:i}),o=d._enqueueFile(n(t),a),s&&s.data({form:l,file:o}),o},performUpload:function(t){var n,i,r,o={files:t.data("fileNames")},a=t.data("frame"),s=this.upload;if(s.trigger(I,o))s._removeFileEntry(a.data("file")),this.cleanupFrame(a),this.unregisterFrame(a);else{s._hideUploadButton(),s._showHeaderUploadStatus(!0),a.appendTo(document.body),n=a.data("form").attr("action",s.options.async.saveUrl).appendTo(document.body),o.data=e.extend({},o.data,S());for(i in o.data)r=n.find("input[name='"+i+"']"),0===r.length&&(r=e("<input>",{type:"hidden",name:i}).prependTo(n)),r.val(o.data[i]);s._fileAction(t,H),s._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),a.one("load",e.proxy(this.onIframeLoad,this)),n[0].submit()}},onSaveSelected:function(){var t=this,n=t.upload;e(".k-file",this.element).each(function(){var i=e(this),r=k(i),o=n._filesContainValidationErrors(i.data("fileNames"));r||o||t.performUpload(i)})},onIframeLoad:function(t){var n,i=e(t.target);try{n=i.contents().text()}catch(r){n="Error trying to get server response: "+r}this.processResponse(i,n)},processResponse:function(t,n){var i=t.data("file"),r=this,o={responseText:n};g(n,function(n){e.extend(o,{statusText:"OK",status:"200"}),r.upload._onFileProgress({target:e(i,r.upload.wrapper)},100),r.upload._onUploadSuccess({target:e(i,r.upload.wrapper)},n,o),r.cleanupFrame(t),r.unregisterFrame(t)},function(){e.extend(o,{statusText:"error",status:"500"}),r.upload._onUploadError({target:e(i,r.upload.wrapper)},o)})},onCancel:function(t){var n=e(t.target).data("frame");this.stopFrameSubmit(n),this.cleanupFrame(n),this.unregisterFrame(n),this.upload._removeFileEntry(n.data("file"))},onRetry:function(e){var t=w(e);this.performUpload(t)},onRemove:function(e,t,n){var i=this,r=i.upload,o=w(e),a=o.data("frame");a?(i.unregisterFrame(a),r._removeFileEntry(o),i.cleanupFrame(a)):o.hasClass("k-file-success")?m(o,r,t,n):r._removeFileEntry(o)},onAbort:function(){var t=this.element,n=this;e.each(this.iframes,function(){e("input",this.data("form")).appendTo(t),n.stopFrameSubmit(this[0]),this.data("form").remove(),this.remove()}),this.iframes=[]},createFrame:function(t){return e("<iframe name='"+t+"' id='"+t+"' style='display:none;' />")},createForm:function(t,n){return e("<form enctype='multipart/form-data' method='POST' action='"+t+"' target='"+n+"'/>")},stopFrameSubmit:function(e){t!==e.stop?e.stop():e.document&&e.document.execCommand("Stop")},registerFrame:function(e){this.iframes.push(e)},unregisterFrame:function(t){this.iframes=e.grep(this.iframes,function(e){return e.attr("name")!=t.attr("name")})},cleanupFrame:function(e){var t=e.data("form");e.data("file").data("frame",null),setTimeout(function(){t.remove(),e.remove()},1)}},x=function(e){this.name="formDataUploadModule",this.element=e.wrapper,this.upload=e,this.position={},this.metaData={},this.cancelled={},this.resume={},this.paused={},this.retries={}},x.prototype={onSelect:function(t,n){var i,r,o=this.upload,a=this,s=e(t.target),l=this.prepareUpload(s,n);e.each(l,function(t){i=o._filesContainValidationErrors(e(this.data("fileNames"))),o.options.async.autoUpload?i?(o._fileAction(this,O),o._showHeaderUploadStatus(!1)):o.options.async.chunkSize?(a.prepareChunk(this),r=this.prev(),(o.options.async.concurrent||0===t&&!r.length||0===t&&r.hasClass("k-file-success"))&&a.performUpload(this)):a.performUpload(this):(o._fileAction(this,O),i?o._updateHeaderUploadStatus():(o._showUploadButton(),this.addClass("k-toupload"))),i&&o._hideUploadProgress(this)})},prepareUpload:function(t,n){var i=this.enqueueFiles(n);return t.is("input")&&(e.each(i,function(){e(this).data("relatedInput",t)}),t.data("relatedFileEntries",i),this.upload._addInput(t)),i},enqueueFiles:function(t){var n,i,r,o,a=this.upload,s=t.length,l=[];if(a.options.async.batch===!0)n=e.map(t,function(e){return e.name}).join(", "),(a.directory||a.options.directoryDrop)&&e(t).each(function(){(this.rawFile.webkitRelativePath||this.rawFile.relativePath)&&(this.name=this.rawFile.webkitRelativePath||this.rawFile.relativePath)}),o=a._enqueueFile(n,{fileNames:t}),o.data("files",t),l.push(o);else for(i=0;i<s;i++)r=t[i],n=r.name,(a.directory||a.options.directoryDrop)&&(r.rawFile.webkitRelativePath||r.rawFile.relativePath)&&(r.name=r.rawFile.webkitRelativePath||r.rawFile.relativePath),o=a._enqueueFile(n,{fileNames:[r]}),o.data("files",[r]),l.push(o);return l},performUpload:function(t){var n,i,r=this.upload,o=this.createFormData(),a=this.createXHR(),s={files:t.data("fileNames"),XMLHttpRequest:a};if(r.trigger(I,s))this.removeFileEntry(t);else{if(0===t.find(".k-i-cancel").length&&(r.options.async.chunkSize&&r._fileAction(t,B),r._fileAction(t,H,r.options.async.chunkSize)),r.wrapper.find(".k-toupload").length||r._hideUploadButton(),r._showHeaderUploadStatus(!0),s.formData)o=s.formData;else{s.data=e.extend({},s.data,S());for(i in s.data)o.append(i,s.data[i]);n=t.data("files"),
n&&this.populateFormData(o,n)}r._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),r.options.async.useArrayBuffer&&window.FileReader?this._readFile(r.options.async.saveUrl,o,t,a):this.postFormData(r.options.async.saveUrl,o,t,a)}},_readFile:function(n,i,r,o){var a=this,s=a.upload,l=r.data("files")[0],d=new FileReader;d.onload=function(d){try{a.fileArrayBuffer=a.fileArrayBuffer?a._appendBuffer(a.fileArrayBuffer,d.target.result):d.target.result}catch(u){return s._onUploadError({target:e(r,s.wrapper)},o),t}a.position[l.uid]>l.size?(a.postFormData(s.options.async.saveUrl,a.fileArrayBuffer,r,o),a.fileArrayBuffer=null):a._readFile(n,i,r,o)},d.onerror=function(){s._onUploadError({target:e(r,s.wrapper)},o)},d.readAsArrayBuffer(a._getCurrentChunk(l.rawFile,l.uid))},_appendBuffer:function(e,t){var n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer},onSaveSelected:function(){var t=this,n=t.upload;e(".k-toupload",this.element).filter(function(){var t=e(this),i=k(t),r=n._filesContainValidationErrors(t.data("fileNames"));return!i&&!r}).each(function(i){var r=e(this),o=r.prev();r.removeClass("k-toupload"),n.options.async.chunkSize?(t.prepareChunk(r),(n.options.async.concurrent||0===i&&!o.length||0===i&&o.hasClass("k-file-success")||o.hasClass("k-file-error"))&&t.performUpload(r)):t.performUpload(r)})},onCancel:function(e){var t=w(e);this.upload.options.async.chunkSize&&(this.cancelled[t.data("uid")]=!0),this.stopUploadRequest(t),this.removeFileEntry(t)},onPause:function(e){var t=w(e),n=t.data("uid"),i=this.upload.options.async;i.chunkSize&&(this.retries[n]=i.maxAutoRetries+1,this.paused[n]=!0,this.resume[n]=!1)},onResume:function(e){var t=w(e),n=t.data("uid");this.upload.options.async.chunkSize&&(delete this.paused[n],this.resume[n]=!0,this.retries[t.data("uid")]=1,this._increaseChunkIndex(n),this.performUpload(t))},onRetry:function(e){var t=w(e),n=this.upload.options.async;n.chunkSize&&(this.retries[t.data("uid")]=n.maxAutoRetries+1,delete this.paused[t.data("uid")]),this.performUpload(t)},onRemove:function(e,t,n){var i=this,r=i.upload,o=w(e),a=this.upload.options.async;a.chunkSize&&(this.retries[o.data("uid")]=a.maxAutoRetries+1),o.hasClass("k-file-success")?m(o,r,t,n):i.removeFileEntry(o)},createXHR:function(){return new XMLHttpRequest},postFormData:function(e,t,n,i){var r,o=this;n.data("request",i),i.addEventListener("load",function(e){o.onRequestSuccess.call(o,e,n)},!1),i.addEventListener(M,function(e){o.onRequestError.call(o,e,n)},!1),i.upload.addEventListener("progress",function(e){o.onRequestProgress.call(o,e,n)},!1),i.open("POST",e,!0),i.withCredentials=this.upload.options.async.withCredentials,r=this.upload.options.async.accept,r&&i.setRequestHeader("Accept",r),i.send(t)},createFormData:function(){return new FormData},populateFormData:function(e,t){var n,i,r,o,a=t.length,s=this.upload;if(s.options.async.chunkSize)r=t[0].uid,n=this._getCurrentChunk(t[0].rawFile,r),e.append(s.options.async.saveField||s.name,n),o=JSON.stringify(this.metaData[r]),e.append("metadata",o);else for(i=0;i<a;i++)e.append(s.options.async.saveField||s.name,t[i].rawFile);return e},onRequestSuccess:function(t,n){function i(){a.upload._onUploadError({target:e(n,a.upload.wrapper)},o)}function r(t){var i=a.upload.options.async.batch,r=a.upload.options.async.chunkSize,s=a.upload.options.async.concurrent,l=t.fileUid;a.paused[l]||a.cancelled[l]||(delete a.retries[l],!r||i||t.uploaded?!r||i||s||!n.next().length||n.next().hasClass("k-toupload")?(a.upload._onFileProgress({target:e(n,a.upload.wrapper)},100),a.upload._onUploadSuccess({target:e(n,a.upload.wrapper)},t,o),a.cleanupFileEntry(n)):(a.upload._onFileProgress({target:e(n,a.upload.wrapper)},100),a._resetChunkIndex(l),a.upload._onUploadSuccess({target:e(n,a.upload.wrapper)},t,o),a.performUpload(n.next())):(a._increaseChunkIndex(l),a.performUpload(n)))}var o=t.target,a=this;o.status>=200&&o.status<=299?g(o.responseText,r,i):i()},onRequestError:function(t,n){var i=t.target;this.upload._onUploadError({target:e(n,this.upload.wrapper)},i)},cleanupFileEntry:function(t){var n=t.data("relatedInput"),i=!0;n&&(e.each(n.data("relatedFileEntries")||[],function(){this.parent().length>0&&this[0]!=t[0]&&(i=i&&this.hasClass("k-file-success"))}),i&&n.remove())},removeFileEntry:function(e){var t=this.upload.options.async.chunkSize,n=this.upload.options.async.concurrent;this.cleanupFileEntry(e),t&&!n&&e.next().length&&this.performUpload(e.next()),this.upload._removeFileEntry(e)},onRequestProgress:function(t,n){var i,r=Math.round(100*t.loaded/t.total),o=n.data("uid");this.upload.options.async.chunkSize&&(i=this.metaData[o],r=i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100),this.upload._onFileProgress({target:e(n,this.upload.wrapper)},r)},stopUploadRequest:function(e){e.data("request").abort()},prepareChunk:function(e){var t=e.data("files")[0].rawFile,n=e.data("files")[0].uid,i=this.upload.options.async.chunkSize;this.position[n]=0,this.metaData[n]={chunkIndex:0,contentType:t.type,fileName:t.name,totalFileSize:t.size,totalChunks:Math.ceil(t.size/i),uploadUid:n}},_decreaseChunkIndex:function(e){this.metaData[e].chunkIndex--},_increaseChunkIndex:function(e){this.metaData[e].chunkIndex++},_resetChunkIndex:function(e){this.metaData[e].chunkIndex=0},_decreasePosition:function(e){this.position[e]-=this.upload.options.async.chunkSize},_getCurrentChunk:function(e,t){var n,i=this.position[t],r=this.upload.options.async,o=r.chunkSize||r.bufferChunkSize;return this.position[t]||(this.position[t]=0),this.position[t]+=o,(n=this._getChunker(e))?e[n](i,this.position[t]):e},_getChunker:function(e){return e.slice?"slice":e.mozSlice?"mozSlice":e.webkitSlice?"webkitSlice":null}},C.ui.plugin(K)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filebrowser.min",["kendo.listview.min","kendo.dropdownlist.min","kendo.upload.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,r;e.on("dragenter"+x,function(){t(),r=new Date,i||(i=setInterval(function(){var e=new Date-r;e>100&&(n(),clearInterval(i),i=null)},100))}).on("dragover"+x,function(){r=new Date})}function i(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function r(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}function o(e,t){var n=e[t];return h(n)?n.from||n.field||t:n}var a,s,l,d,u=window.kendo,c=u.ui.Widget,h=e.isPlainObject,p=e.proxy,f=e.extend,m=u.support.placeholder,g=u.support.browser,v=u.isFunction,_=/(^\/|\/$)/g,b="change",k="apply",w="error",y="click",x=".kendoFileBrowser",C=".kendoBreadcrumbs",T=".kendoSearchBox",S="name",D="size",F="type",E={field:F,dir:"asc"},A=u.template('<li class="k-tile-empty"><strong>${text}</strong></li>'),I='<div class="k-widget k-filebrowser-toolbar k-header k-floatwrap"><div class="k-toolbar-wrap"># if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-upload-button"><span class="k-icon k-i-plus"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div># } ## if (showCreate) { #<button type="button" class="k-button k-button-icon"><span class="k-icon k-i-folder-add" /></button># } ## if (showDelete) { #<button type="button" class="k-button k-button-icon k-state-disabled"><span class="k-icon k-i-close" /></button>&nbsp;# } #</div><div class="k-tiles-arrange"><label>#=messages.orderBy#: <select /></label></div></div>';f(!0,u.data,{schemas:{filebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),f(!0,u.data,{transports:{filebrowser:u.data.RemoteTransport.extend({init:function(t){u.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,n){n.data=e.extend({},n.data,{path:this.options.path()}),v(this.options[t])?this.options[t].call(this,n):u.data.RemoteTransport.fn[t].call(this,n)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),a=g.msie&&g.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},s=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),n.element.addClass("k-filebrowser"),n.element.on(y+x,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-close)",p(n._deleteClick,n)).on(y+x,".k-filebrowser-toolbar button:not(.k-state-disabled):has(.k-i-folder-add)",p(n._addClick,n)).on("keydown"+x,"li.k-state-selected input",p(n._directoryKeyDown,n)).on("blur"+x,"li.k-state-selected input",p(n._directoryBlur,n)),n._dataSource(),n.refresh(),n.path(n.options.path)},options:{name:"FileBrowser",messages:{uploadFile:"Upload",orderBy:"Arrange by",orderByName:"Name",orderBySize:"Size",directoryNotFound:"A directory with this name was not found.",emptyFolder:"Empty Folder",deleteFile:'Are you sure you want to delete "{0}"?',invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',dropFilesHere:"drop file here to upload",search:"Search"},transport:{},path:"/",fileTypes:"*.*"},events:[w,b,k],destroy:function(){var e=this;c.fn.destroy.call(e),e.dataSource.unbind(w,e._errorHandler),e.element.add(e.list).add(e.toolbar).off(x),u.destroy(e.element)},value:function(){var e,t=this,n=t._selectedItem(),r=t.options.transport.fileUrl;if(n&&"f"===n.get(F))return e=i(t.path(),n.get(S)).replace(_,""),r&&(e=v(r)?r(e):u.format(r,encodeURIComponent(e))),e},_selectedItem:function(){var e=this.listView,t=e.select();if(t.length)return this.dataSource.getByUid(t.attr(u.attr("uid")))},_toolbar:function(){var t=this,n=u.template(I),i=t.options.messages,r=[{text:i.orderByName,value:"name"},{text:i.orderBySize,value:"size"}];t.toolbar=e(n({messages:i,showUpload:t.options.transport.uploadUrl,showCreate:t.options.transport.create,showDelete:t.options.transport.destroy})).appendTo(t.element).find(".k-upload input").kendoUpload({multiple:!1,localization:{dropFilesHere:i.dropFilesHere},async:{saveUrl:t.options.transport.uploadUrl,autoUpload:!0},upload:p(t._fileUpload,t),error:function(e){t._error({xhr:e.XMLHttpRequest,status:"error"})}}).end(),t.upload=t.toolbar.find(".k-upload input").data("kendoUpload"),t.arrangeBy=t.toolbar.find(".k-tiles-arrange select").kendoDropDownList({dataSource:r,dataTextField:"text",dataValueField:"value",change:function(){t.orderBy(this.value())}}).data("kendoDropDownList"),t._attachDropzoneEvents()},_attachDropzoneEvents:function(){var t=this;t.options.transport.uploadUrl&&(n(e(document.documentElement),e.proxy(t._dropEnter,t),e.proxy(t._dropLeave,t)),t._scrollHandler=p(t._positionDropzone,t))},_dropEnter:function(){this._positionDropzone(),e(document).on("scroll"+x,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),e(document).off("scroll"+x,this._scrollHandler)},_positionDropzone:function(){var e=this,t=e.element,n=t.offset();e.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(n).css({width:t[0].clientWidth,height:t[0].clientHeight,lineHeight:t[0].clientHeight+"px"})},_removeDropzone:function(){this.toolbar.find(".k-dropzone").removeClass("k-filebrowser-dropzone").css({width:"",height:"",lineHeight:"",top:"",left:""})},_deleteClick:function(){var e=this,t=e.listView.select(),n=u.format(e.options.messages.deleteFile,t.find("strong").text());t.length&&e._showMessage(n,"confirm")&&e.listView.remove(t)},_addClick:function(){this.createDirectory()},_getFieldName:function(e){return o(this.dataSource.reader.model.fields,e)},_fileUpload:function(e){var t,n=this,i=n.options,r=i.fileTypes,o=RegExp(("("+r.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),a=e.files[0].name,s=S,l=D;o.test(a)?(e.data={path:n.path()},t=n._createFile(a),t?n.upload.one("success",function(e){var i=n._insertFileToList(t);i.set(s,e.response[n._getFieldName(s)]),i.set(l,e.response[n._getFieldName(l)]),n._tiles=n.listView.items().filter("["+u.attr("type")+"=f]")}):e.preventDefault()):(e.preventDefault(),n._showMessage(u.format(i.messages.invalidFileType,a,r)))},_findFile:function(e){var t,n,i,r=this.dataSource.data(),o=F,a=S;for(e=e.toLowerCase(),t=0,i=r.length;t<i;t++)if("f"===r[t].get(o)&&r[t].get(a).toLowerCase()===e){n=r[t];break}return n},_createFile:function(e){var t=this,n={},i=F,r=t._findFile(e);return r?t._showMessage(u.format(t.options.messages.overwriteFile,e),"confirm")?(r._override=!0,r):null:(n[i]="f",n[S]=e,n[D]=0,n)},_insertFileToList:function(e){var t,n,i,r,o;if(e._override)return e;for(n=this.dataSource,i=n.view(),r=0,o=i.length;r<o;r++)if("f"===i[r].get(F)){t=r;break}return n.insert(++t,e)},createDirectory:function(){var e,t,n=this,i=0,r=F,o=S,a=n.dataSource.data(),s=n._nameDirectory(),l=new n.dataSource.reader.model;for(e=0,t=a.length;e<t;e++)"d"===a[e].get(r)&&(i=e);l.set(r,"d"),l.set(o,s),n.listView.one("dataBound",function(){var e=n.listView.items().filter("["+u.attr("uid")+"="+l.uid+"]"),t=e.find("input");e.length&&this.edit(e),this.element.scrollTop(e.attr("offsetTop")-this.element[0].offsetHeight),setTimeout(function(){t.select()})}).one("save",function(e){var t=e.model.get(o);t?e.model.set(o,n._nameExists(t,l.uid)?n._nameDirectory():t):e.model.set(o,s)}),n.dataSource.insert(++i,l)},_directoryKeyDown:function(e){13==e.keyCode&&e.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(e,t){var n,i,r=this.dataSource.data(),o=F,a=S;for(n=0,i=r.length;n<i;n++)if("d"===r[n].get(o)&&r[n].get(a).toLowerCase()===e.toLowerCase()&&r[n].uid!==t)return!0;return!1},_nameDirectory:function(){var t,n,i,r="New folder",o=this.dataSource.data(),a=[],s=F,l=S;for(n=0,i=o.length;n<i;n++)"d"===o[n].get(s)&&o[n].get(l).toLowerCase().indexOf(r.toLowerCase())>-1&&a.push(o[n].get(l));if(e.inArray(r,a)>-1){n=2;do t=r+" ("+n+")",n++;while(e.inArray(t,a)>-1);r=t}return r},orderBy:function(e){this.dataSource.sort([{field:F,dir:"asc"},{field:e,dir:"asc"}])},search:function(e){this.dataSource.filter({field:S,operator:"contains",value:e})},_content:function(){var t=this;t.list=e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("dblclick"+x,"li",p(t._dblClick,t)),t.listView=new u.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),u.ui.progress(t.listView.element,!1))},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+u.attr("type")+"=f]"):this.wrapper.append(A({text:t.options.messages.emptyFolder}))},change:p(t._listViewChange,t)})},_dblClick:function(t){var n,r=this,o=e(t.currentTarget);o.hasClass("k-edit-item")&&r._directoryBlur(),o.filter("["+u.attr("type")+"=d]").length?(n=r.dataSource.getByUid(o.attr(u.attr("uid"))),n&&(r.path(i(r.path(),n.get(S))),r.breadcrumbs.value(r.path()))):o.filter("["+u.attr("type")+"=f]").length&&r.trigger(k)},_listViewChange:function(){var e=this._selectedItem();e&&(this.toolbar.find(".k-i-close").parent().removeClass("k-state-disabled"),this.trigger(b,{selected:e}))},_dataSource:function(){var e,t=this,n=t.options,i=n.transport,r=f({},E),o={field:S,dir:"asc"},a={type:i.type||"filebrowser",sort:[r,o]};h(i)&&(i.path=p(t.path,t),a.transport=i),h(n.schema)?a.schema=n.schema:i.type&&h(u.data.schemas[i.type])&&(e=u.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(w,t._errorHandler):t._errorHandler=p(t._error,t),t.dataSource=u.data.DataSource.create(a).bind(w,t._errorHandler)},_navigation:function(){var t=this,n=e('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element);t.breadcrumbs=n.find("input:first").kendoBreadcrumbs({value:t.options.path,change:function(){t.path(this.value())}}).data("kendoBreadcrumbs"),t.searchBox=n.parent().find("input:last").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox")},_error:function(e){var t,n,i=this;i.trigger(w,e)||(t=e.xhr.status,"error"==e.status?"404"==t?i._showMessage(i.options.messages.directoryNotFound):"0"!=t&&i._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&i._showMessage("Error! Server timeout."),n=i.dataSource,n.hasChanges()&&n.cancelChanges())},_showMessage:function(e,t){return window[t||"alert"](e)},refresh:function(){var e=this;e._navigation(),e._toolbar(),e._content()},_editTmpl:function(){var e='<li class="k-tile k-state-selected" '+u.attr("uid")+'="#=uid#" ';return e+=u.attr("type")+'="${'+F+'}">',e+="#if("+F+' == "d") { #',e+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>',e+="#}#",e+="#if("+F+' == "d") { #',e+='<input class="k-input" '+u.attr("bind")+'="value:'+S+'"/>',e+="#}#",e+="</li>",p(u.template(e),{sizeFormatter:r})},_itemTmpl:function(){var e='<li class="k-tile" '+u.attr("uid")+'="#=uid#" ';return e+=u.attr("type")+'="${'+F+'}">',e+="#if("+F+' == "d") { #',e+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-thumb"><span class="k-icon k-i-file"></span></div>',e+="#}#",e+="<strong>${"+S+"}</strong>",e+="#if("+F+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+D+")}</span> #}#",e+="</li>",p(u.template(e),{sizeFormatter:r})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(_,"")+"/",n.dataSource.read({path:n._path}),t):(i&&(i=i.replace(_,"")),"/"===i||""===i?"":i+"/")}}),l=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),m&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+T,p(n._keydown,n)).on("change"+T,p(n._updateValue,n)),n.wrapper.on(y+T,"a",p(n._click,n)),m||n.element.on("focus"+T,p(n._focus,n)).on("blur"+T,p(n._blur,n))},options:{name:"SearchBox",label:"Search",value:""},events:[b],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(T),c.fn.destroy.call(e)},_keydown:function(e){13===e.keyCode&&this._updateValue()},_click:function(e){e.preventDefault(),this._updateValue()},_updateValue:function(){var e=this,t=e.element.val();t!==e.value()&&(e.value(t),e.trigger(b))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){m||this.label.toggle(!this.element.val())},_focus:function(){this.label.hide()},_wrapper:function(){var t=this.element,n=t.parents(".k-search-wrap");t[0].style.width="",t.addClass("k-input"),n.length||(n=t.wrap(e('<div class="k-widget k-search-wrap k-textbox"/>')).parent(),m||e('<label style="display:block">'+this.options.label+"</label>").insertBefore(t),e('<a href="#" class="k-icon k-i-zoom k-search"/>').appendTo(n)),this.wrapper=n,this.label=n.find(">label")},value:function(e){var n=this;return e!==t?(n.options.value=e,n.element.val(e),n._toggleLabel(),t):n.options.value}}),d=c.extend({init:function(e,t){var n=this;t=t||{},c.fn.init.call(n,e,t),n._wrapper(),n.wrapper.on("focus"+C,"input",p(n._focus,n)).on("blur"+C,"input",p(n._blur,n)).on("keydown"+C,"input",p(n._keydown,n)).on(y+C,"a.k-i-arrow-60-up:first",p(n._rootClick,n)).on(y+C,"a:not(.k-i-arrow-60-up)",p(n._click,n)),n.value(n.options.value)},options:{name:"Breadcrumbs",gap:50},events:[b],destroy:function(){var e=this;c.fn.destroy.call(e),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C)},_update:function(e){e="/"===(e||"").charAt(0)?e:"/"+(e||""),e!==this.value()&&(this.value(e),this.trigger(b))},_click:function(t){t.preventDefault(),this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-60-up)").addBack()))},_rootClick:function(e){e.preventDefault(),this._update("")},_focus:function(){var e=this,t=e.element;e.overlay.hide(),e.element.val(e.value()),setTimeout(function(){t.select()})},_blur:function(){if(!this.overlay.is(":visible")){var e=this,t=e.element,n=t.val().replace(/\/{2,}/g,"/");e.overlay.show(),t.val(""),e._update(n)}},_keydown:function(e){var t=this;13===e.keyCode&&(t._blur(),setTimeout(function(){t.overlay.find("a:first").focus()}))},_wrapper:function(){var t,n=this.element,i=n.parents(".k-breadcrumbs");n[0].style.width="",n.addClass("k-input"),i.length||(i=n.wrap(e('<div class="k-widget k-breadcrumbs k-textbox"/>')).parent()),t=i.find(".k-breadcrumbs-wrap"),t.length||(t=e('<div class="k-breadcrumbs-wrap"/>').appendTo(i)),this.wrapper=i,this.overlay=t},refresh:function(){var n,i,r,o,a="",s=this.value();for(s!==t&&s.match(/^\//)||(s="/"+(s||"")),n=s.split("/"),r=0,o=n.length;r<o;r++)i=n[r],i&&(a||(a+='<a href="#" class="k-icon k-i-arrow-60-up" title="Go to parent folder"></a>'),a+='<a class="k-link" href="#">'+n[r]+"</a>",a+='<span class="k-icon k-i-arrow-60-right" title="Go to child folder"></span>');this.overlay.empty().append(e(a)),this._adjustSectionWidth()},_adjustSectionWidth:function(){var t,n=this,i=n.wrapper,r=i.width()-n.options.gap,o=n.overlay.find("a");o.each(function(n){t=e(this),t.parent().width()>r&&(n==o.length-1?t.width(r):t.prev().addBack().hide())})},value:function(e){return e!==t?(this._value=e.replace(/\/{2,}/g,"/"),this.refresh(),t):this._value},_path:function(t){return"/"+e.map(t,function(t){return e(t).text()}).join("/")}}),u.ui.plugin(s),u.ui.plugin(d),u.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.imagebrowser.min",["kendo.filebrowser.min"],e)}(function(){return function(e,t){function n(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function i(e){if(!e)return"";var t=" bytes";return e>=1073741824?(t=" GB",e/=1073741824):e>=1048576?(t=" MB",e/=1048576):e>=1024&&(t=" KB",e/=1024),Math.round(100*e)/100+t}var r,o,a=window.kendo,s=a.ui.FileBrowser,l=e.isPlainObject,d=e.proxy,u=e.extend,c=a.support.browser,h=a.isFunction,p=/(^\/|\/$)/g,f="error",m=".kendoImageBrowser",g="name",v="size",_="type",b={field:_,dir:"asc"},k=a.template('<li class="k-tile-empty"><strong>${text}</strong></li>');u(!0,a.data,{schemas:{imagebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),u(!0,a.data,{transports:{imagebrowser:a.data.RemoteTransport.extend({init:function(t){a.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,n){n.data=e.extend({},n.data,{path:this.options.path()}),h(this.options[t])?this.options[t].call(this,n):a.data.RemoteTransport.fn[t].call(this,n)},read:function(e){this._call("read",e)},create:function(e){this._call("create",e)},destroy:function(e){this._call("destroy",e)},update:function(){},options:{read:{type:"POST"},update:{type:"POST"},create:{type:"POST"},destroy:{type:"POST"}}})}}),r=c.msie&&c.version<8?function(e){return e.offsetTop}:function(t){return t.offsetTop-e(t).height()},o=s.extend({init:function(e,t){var n=this;t=t||{},s.fn.init.call(n,e,t),n.element.addClass("k-imagebrowser")},options:{name:"ImageBrowser",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},value:function(){var e,t=this,i=t._selectedItem(),r=t.options.transport.imageUrl;if(i&&"f"===i.get(_))return e=n(t.path(),i.get(g)).replace(p,""),r&&(e=h(r)?r(e):a.format(r,encodeURIComponent(e))),e},_fileUpload:function(e){var t,n=this,i=n.options,r=i.fileTypes,o=RegExp(("("+r.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),s=e.files[0].name,l=g,d=v;o.test(s)?(e.data={path:n.path()},t=n._createFile(s),t?(t._uploading=!0,n.upload.one("success",function(e){delete t._uploading;var i=n._insertFileToList(t);i.set(l,e.response[n._getFieldName(l)]),i.set(d,e.response[n._getFieldName(d)]),n._tiles=n.listView.items().filter("["+a.attr("type")+"=f]"),n._scroll()})):e.preventDefault()):(e.preventDefault(),n._showMessage(a.format(i.messages.invalidFileType,s,r)))},_content:function(){var t=this;t.list=e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("scroll"+m,d(t._scroll,t)).on("dblclick"+m,"li",d(t._dblClick,t)),t.listView=new a.ui.ListView(t.list,{dataSource:t.dataSource,template:t._itemTmpl(),editTemplate:t._editTmpl(),selectable:!0,autoBind:!1,dataBinding:function(e){t.toolbar.find(".k-i-close").parent().addClass("k-state-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),a.ui.progress(t.listView.element,!1))},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+a.attr("type")+"=f]"),t._scroll()):this.wrapper.append(k({text:t.options.messages.emptyFolder}))},change:d(t._listViewChange,t)})},_dataSource:function(){var e,t=this,n=t.options,i=n.transport,r=u({},b),o={field:g,dir:"asc"},s={type:i.type||"imagebrowser",sort:[r,o]};l(i)&&(i.path=d(t.path,t),s.transport=i),l(n.schema)?s.schema=n.schema:i.type&&l(a.data.schemas[i.type])&&(e=a.data.schemas[i.type]),t.dataSource&&t._errorHandler?t.dataSource.unbind(f,t._errorHandler):t._errorHandler=d(t._error,t),t.dataSource=a.data.DataSource.create(s).bind(f,t._errorHandler)},_loadImage:function(t){var n=this,i=e(t),r=n.dataSource.getByUid(i.attr(a.attr("uid"))),o=r.get(g),s=n.options.transport.thumbnailUrl,l=e("<img />",{alt:o}),d="?";r._uploading||(l.hide().on("load"+m,function(){e(this).prev().remove().end().addClass("k-image").fadeIn()}),i.find(".k-i-loading").after(l),h(s)?s=s(n.path(),encodeURIComponent(o)):(s.indexOf("?")>=0&&(d="&"),s=s+d+"path="+encodeURIComponent(n.path()+o),r._override&&(s+="&_="+(new Date).getTime(),delete r._override)),l.attr("src",s),t.loaded=!0)},_scroll:function(){var e=this;e.options.transport&&e.options.transport.thumbnailUrl&&(clearTimeout(e._timeout),e._timeout=setTimeout(function(){var t=a._outerHeight(e.list),n=e.list.scrollTop(),i=n+t;e._tiles.each(function(){var t=r(this),o=t+this.offsetHeight;if((t>=n&&t<i||o>=n&&o<i)&&e._loadImage(this),t>i)return!1}),e._tiles=e._tiles.filter(function(){return!this.loaded})},250))},_itemTmpl:function(){var e=this,t='<li class="k-tile" '+a.attr("uid")+'="#=uid#" ';return t+=a.attr("type")+'="${'+_+'}">',t+="#if("+_+' == "d") { #',t+='<div class="k-thumb"><span class="k-icon k-i-folder"></span></div>',t+="#}else{#",t+=e.options.transport&&e.options.transport.thumbnailUrl?'<div class="k-thumb"><span class="k-icon k-i-loading"></span></div>':'<div class="k-thumb"><span class="k-icon k-i-file"></span></div>',t+="#}#",t+="<strong>${"+g+"}</strong>",t+="#if("+_+' == "f") { # <span class="k-filesize">${this.sizeFormatter('+v+")}</span> #}#",t+="</li>",d(a.template(t),{sizeFormatter:i})}}),a.ui.plugin(o)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.tabstrip.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(t){t.children(b).addClass(E),t.children("a").addClass(C).children(b).addClass(E),t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(L),t.filter("li[disabled]").addClass(P).attr("aria-disabled","true").removeAttr("disabled"),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(O+" "+U),t.attr("role","tab"),t.filter("."+O).attr("aria-selected",!0),t.each(function(){var t=e(this);t.children("."+C).length||t.contents().filter(function(){return!(this.nodeName.match(v)||3==this.nodeType&&!u(this.nodeValue))}).wrapAll("<span UNSELECTABLE='on' class='"+C+"'/>")})}function i(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(A),t.filter(".k-last:not(:last-child)").removeClass(T),t.filter(":first-child").addClass(A),t.filter(":last-child").addClass(T)}function r(e,t){return"<span class='k-button k-button-icon k-bare k-tabstrip-"+e+"' unselectable='on'><span class='k-icon "+t+"'></span></span>"}var o=window.kendo,a=o.ui,s=o.keys,l=e.map,d=e.each,u=e.trim,c=e.extend,h=o.isFunction,p=o.template,f=o._outerWidth,m=o._outerHeight,g=a.Widget,v=/^(a|div)$/i,_=".kendoTabStrip",b="img",k="href",w="prev",y="next",x="show",C="k-link",T="k-last",S="click",D="error",F=":empty",E="k-image",A="k-first",I="select",R="activate",M="k-content",z="contentUrl",H="mouseenter",N="mouseleave",B="contentLoad",P="k-state-disabled",L="k-state-default",O="k-state-active",V="k-state-focused",W="k-state-hover",U="k-tab-on-top",q=".k-item:not(."+P+")",j=".k-item",G=".k-tabstrip-items > "+q+":not(."+O+")",$=200,K={content:p("<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= content(item) #</div>"),itemWrapper:p("<#= tag(item) # class='k-link'#= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),item:p("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),image:p("<img class='k-image' alt='' src='#= imageUrl #' />"),sprite:p("<span class='k-sprite #= spriteCssClass #'></span>"),empty:p("")},Y={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:o.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?"":"&nbsp;"},contentUrl:function(e){return e.contentUrl?o.attr("content-url")+'="'+e.contentUrl+'"':""}},Q=g.extend({init:function(t,n){var i,r,a,s=this;g.fn.init.call(s,t,n),s._animations(s.options),n=s.options,s._contentUrls=n.contentUrls||[],s._wrapper(),s._isRtl=o.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(z,i)}):s._contentUrls.length=s.tabGroup.find("li.k-item").length,s.wrapper.on(H+_+" "+N+_,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(S+_,".k-state-disabled .k-link",!1).on(S+_," > "+q,function(t){var n,i=s.wrapper[0];if(i!==document.activeElement)if(n=o.support.browser.msie)try{i.setActive()}catch(r){i.focus()}else i.focus();s._click(e(t.currentTarget))&&t.preventDefault()}),r=s.tabGroup.children("li."+O),a=s.contentHolder(r.index()),r[0]&&a.length>0&&0===a[0].childNodes.length&&s.activateTab(r.eq(0)),s.element.attr("role","tablist"),s.element[0].id&&(s._ariaId=s.element[0].id+"_ts_active"),s.value(i),o.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===w?"last":"first",e?(e=e[t](),e[0]||(e=this.tabGroup.children(j)[n]()),e.hasClass(P)&&e.addClass(V),(e.hasClass(P)||e.hasClass(O))&&(this._focused=e),e):this._endItem(n)},_current:function(e){var n=this,i=n._focused,r=n._ariaId;return e===t?i:(i&&(n.tabGroup.children("#"+r).removeAttr("id"),i.removeClass(V)),e&&(e.hasClass(O)||e.addClass(V),n.element.removeAttr("aria-activedescendant"),r=e[0].id||r,r&&(e.attr("id",r),n.element.attr("aria-activedescendant",r))),n._focused=e,t)},_keydown:function(e){var n,i=this,r=e.keyCode,o=i._current(),a=i._isRtl,l=/top|bottom/.test(i.options.tabPosition);if(e.target==e.currentTarget){
if(r!==s.DOWN||l)if(r!==s.UP||l)if(r===s.RIGHT&&l)n=a?w:y;else if(r===s.LEFT&&l)n=a?y:w;else if(r==s.ENTER||r==s.SPACEBAR)i._click(o),e.preventDefault();else{if(r==s.HOME)return i._click(i._getItem("first")),e.preventDefault(),t;if(r==s.END)return i._click(i._getItem("last")),e.preventDefault(),t}else n=w;else n=y;n&&(i._click(i._item(o,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=o.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,r,a=this,s=a.options,l=o.getter(s.dataEncodedField),d=o.getter(s.dataTextField),u=o.getter(s.dataContentField),c=o.getter(s.dataContentUrlField),h=o.getter(s.dataImageUrlField),p=o.getter(s.dataUrlField),f=o.getter(s.dataSpriteCssClass),m=[],g=a.dataSource.view();for(e=e||{},i=e.action,i&&(g=e.items),t=0,r=g.length;t<r;t++)n={text:d(g[t])},s.dataEncodedField&&(n.encoded=l(g[t])),s.dataContentField&&(n.content=u(g[t])),s.dataContentUrlField&&(n.contentUrl=c(g[t])),s.dataUrlField&&(n.url=p(g[t])),s.dataImageUrlField&&(n.imageUrl=h(g[t])),s.dataSpriteCssClass&&(n.spriteCssClass=f(g[t])),m[t]=n;if("add"==e.action)e.index<a.tabGroup.children().length?a.insertBefore(m,a.tabGroup.children().eq(e.index)):a.append(m);else if("remove"==e.action)for(t=0;t<g.length;t++)a.remove(e.index);else"itemchange"==e.action?(t=a.dataSource.view().indexOf(g[0]),e.field===s.dataTextField&&a.tabGroup.children().eq(t).find(".k-link").text(g[0].get(e.field)),e.field===s.dataUrlField&&(a._contentUrls[t]=g[0].get(e.field))):(a.trigger("dataBinding"),a.remove("li"),a._contentUrls=[],a.append(m),a.trigger("dataBound"))},value:function(n){var i=this;return n===t?i.select().text():(n!=i.value()&&i.tabGroup.children().each(function(){e.trim(e(this).text())==n&&i.select(this)}),t)},items:function(){return this.tabGroup[0].children},setOptions:function(e){var t=this,n=t.options.animation;t._animations(e),e.contentUrls&&(t._contentUrls=e.contentUrls),e.animation=c(!0,n,e.animation),e.navigatable?t.wrapper.on("keydown"+_,t._keyDownProxy):t.wrapper.off("keydown"+_,t._keyDownProxy),g.fn.setOptions.call(t,e)},events:[I,R,x,D,B,"change","dataBinding","dataBound"],options:{name:"TabStrip",dataEncodedField:"",dataTextField:"",dataContentField:"",dataImageUrlField:"",dataUrlField:"",dataSpriteCssClass:"",dataContentUrlField:"",tabPosition:"top",animation:{open:{effects:"expand:vertical fadeIn",duration:200},close:{duration:200}},collapsible:!1,navigatable:!0,contentUrls:!1,scrollable:{distance:$}},destroy:function(){var e=this,t=e.scrollWrap;g.fn.destroy.call(e),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler),e.wrapper.off(_),e.wrapper.children(".k-tabstrip-items").off(_),e._scrollableModeActive&&(e._scrollPrevButton.off().remove(),e._scrollNextButton.off().remove()),o.destroy(e.wrapper),t.children(".k-tabstrip").unwrap()},select:function(t){var n=this;return 0===arguments.length?n.tabGroup.children("li."+O):(isNaN(t)||(t=n.tabGroup.children().get(t)),t=n.tabGroup.find(t),e(t).each(function(t,i){i=e(i),i.hasClass(O)||n.trigger(I,{item:i[0],contentElement:n.contentHolder(i.index())[0]})||n.activateTab(i)}),n)},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},reload:function(t){var n,i;return t=this.tabGroup.find(t),n=this,i=n._contentUrls,t.each(function(){var t=e(this),r=t.find("."+C).data(z)||i[t.index()],o=n.contentHolder(t.index());r&&n.ajaxRequest(t,o,null,r)}),n},append:function(e){var t=this,n=t._create(e);return d(n.tabs,function(e){var i=n.contents[e];t.tabGroup.append(this),"bottom"==t.options.tabPosition?t.tabGroup.before(i):t._scrollableModeActive?t._scrollPrevButton.before(i):t.wrapper.append(i),t.angular("compile",function(){return{elements:[i]}})}),i(t.tabGroup),t._updateContentElements(),t.resize(!0),t},_appendUrlItem:function(e){this._contentUrls.push(e)},_moveUrlItem:function(e,t){this._contentUrls.splice(t,0,this._contentUrls.splice(e,1)[0])},_removeUrlItem:function(e){this._contentUrls.splice(e,1)},insertBefore:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).next():this.tabGroup.find(n);var r=this,o=r._create(t),a=r.element.find("[id='"+n.attr("aria-controls")+"']");return d(o.tabs,function(t){var i=o.contents[t],s=o.newTabsCreated?r._contentUrls.length-(o.tabs.length-t):e(i).index()-1;n.before(this),a.before(i),r._moveUrlItem(s,e(this).index()),r.angular("compile",function(){return{elements:[i]}})}),i(r.tabGroup),r._updateContentElements(o.newTabsCreated),r.resize(!0),r},insertAfter:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).prev():this.tabGroup.find(n);var r=this,o=r._create(t),a=r.element.find("[id='"+n.attr("aria-controls")+"']");return d(o.tabs,function(t){var i=o.contents[t],s=o.newTabsCreated?r._contentUrls.length-(o.tabs.length-t):e(i).index()-1;n.after(this),a.after(i),r._moveUrlItem(s,e(this).index()),r.angular("compile",function(){return{elements:[i]}})}),i(r.tabGroup),r._updateContentElements(o.newTabsCreated),r.resize(!0),r},remove:function(t){var n,i=this,r=typeof t;return"string"===r?t=i.tabGroup.find(t):"number"===r&&(t=i.tabGroup.children().eq(t)),n=t.map(function(){var t=e(this).index(),n=i.contentElement(t);return o.destroy(n),i._removeUrlItem(t),n}),t.remove(),n.empty(),n.remove(),i._updateContentElements(),i.resize(!0),i},_create:function(t){var i,r,a,s=this,d=!1;return t=t instanceof o.data.ObservableArray?t.toJSON():t,e.isPlainObject(t)||e.isArray(t)?(t=e.isArray(t)?t:[t],d=!0,i=l(t,function(n,i){return s._appendUrlItem(t[i].contentUrl||null),e(Q.renderItem({group:s.tabGroup,item:c(n,{index:i})}))}),r=l(t,function(t,n){if("string"==typeof t.content||t.contentUrl)return e(Q.renderContent({item:c(t,{index:n})}))})):(i="string"==typeof t&&"<"!=t[0]?s.element.find(t):e(t),r=e(),i.each(function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=s.element.find("[id='"+this.getAttribute("aria-controls")+"']");a=t}else a=e("<div class='"+M+"'/>");r=r.add(a)}),n(i)),{tabs:i,contents:r,newTabsCreated:d}},_toggleDisabled:function(t,n){t=this.tabGroup.find(t),t.each(function(){e(this).toggleClass(L,n).toggleClass(P,!n).attr("aria-disabled",!n)})},_updateClasses:function(){var r,o,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("<ul class='k-tabstrip-items k-reset'/>").appendTo(s.wrapper)),r=s.tabGroup.find("li").addClass("k-item"),r.length&&(o=r.filter("."+O).index(),a=o>=0?o:t,s.tabGroup.contents().filter(function(){return 3==this.nodeType&&!u(this.nodeValue)}).remove()),o>=0&&r.eq(o).addClass(U),s.contentElements=s.wrapper.children("div"),s.contentElements.addClass(M).eq(a).addClass(O).css({display:"block"}),r.length&&(n(r),i(s.tabGroup),s._updateContentElements(!0))},_elementId:function(e,t){var n,i=e.attr("id"),r=this.element.attr("id");return!i||i.indexOf(r+"-")>-1?(n=(r||o.guid())+"-",n+(t+1)):i},_updateContentElements:function(t){var n=this,i=n._contentUrls,r=n.tabGroup.children(".k-item"),a=n.wrapper.children("div"),s=n._elementId.bind(n);a.length&&r.length>a.length?a.each(function(n){var i=s(e(this),n),o=r.filter("[aria-controls="+(this.id||0)+"]")[0];!o&&t&&(o=r[n]),o&&o.setAttribute("aria-controls",i),this.setAttribute("id",i)}):r.each(function(t){var r=a.eq(t),o=s(r,t);this.setAttribute("aria-controls",o),!r.length&&i[t]?e("<div class='"+M+"'/>").appendTo(n.wrapper).attr("id",o):(r.attr("id",o),e(this).children(".k-loading")[0]||i[t]||e("<span class='k-loading k-complete'/>").prependTo(this)),r.attr("role","tabpanel"),r.filter(":not(."+O+")").attr("aria-hidden",!0).attr("aria-expanded",!1),r.filter("."+O).attr("aria-expanded",!0)}),n.contentElements=n.contentAnimators=n.wrapper.children("div"),n.tabsHeight=m(n.tabGroup)+parseInt(n.wrapper.css("border-top-width"),10)+parseInt(n.wrapper.css("border-bottom-width"),10),o.kineticScrollNeeded&&o.mobile.ui.Scroller&&(o.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("<div />").parent():e.element,e.scrollWrap=e.wrapper.parent(".k-tabstrip-wrapper"),e.scrollWrap[0]||(e.scrollWrap=e.wrapper.wrapAll("<div class='k-tabstrip-wrapper' />").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,r,o,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,r=f(i),o=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,r).css("min-height",o)}))},_resize:function(){this._setContentElementsDimensions(),this._scrollable()},_sizeScrollWrap:function(e){var t,n;e.is(":visible")&&(t=this.options.tabPosition,n=Math.floor(m(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==H)},_click:function(e){var t,n,i=this,r=e.find("."+C),o=r.attr(k),a=i.options.collapsible,s=e.index(),l=i.contentHolder(s),d=e.parent().children(),u=d.filter("."+V);if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is("."+P+(a?"":",."+O)))return u.removeClass(V),i._focused=e,e.addClass(V),i._current(e),i._scrollableModeActive&&i._scrollTabsToItem(e),!0;if(n=r.data(z)||i._contentUrls[s]||o&&("#"==o.charAt(o.length-1)||o.indexOf("#"+i.element[0].id+"-")!=-1),t=!o||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(I,{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=this,d=l.options;l._scrollableAllowed()&&(l.wrapper.addClass("k-tabstrip-scrollable"),e=l.wrapper[0].offsetWidth,t=l.tabGroup[0].scrollWidth,t>e&&!l._scrollableModeActive?(l._nowScrollingTabs=!1,l._isRtl=o.support.isRtl(l.element),a=o.support.mobileOS?"touchstart":"mousedown",s=o.support.mobileOS?"touchend":"mouseup",l.wrapper.append(r("prev","k-i-arrow-60-left")+r("next","k-i-arrow-60-right")),n=l._scrollPrevButton=l.wrapper.children(".k-tabstrip-prev"),i=l._scrollNextButton=l.wrapper.children(".k-tabstrip-next"),l.tabGroup.css({marginLeft:f(n)+9,marginRight:f(i)+12}),n.on(a+_,function(){l._nowScrollingTabs=!0,l._scrollTabsByDelta(d.scrollable.distance*(l._isRtl?1:-1))}),i.on(a+_,function(){l._nowScrollingTabs=!0,l._scrollTabsByDelta(d.scrollable.distance*(l._isRtl?-1:1))}),n.add(i).on(s+_,function(){l._nowScrollingTabs=!1}),l._scrollableModeActive=!0,l._toggleScrollButtons()):l._scrollableModeActive&&t<=e?(l._scrollableModeActive=!1,l.wrapper.removeClass("k-tabstrip-scrollable"),l._scrollPrevButton.off().remove(),l._scrollNextButton.off().remove(),l.tabGroup.css({marginLeft:"",marginRight:""})):l._scrollableModeActive?l._toggleScrollButtons():l.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,r=i.scrollLeft(),o=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=r+a-(s-r)-l:a+o>s&&(t=r+a-o+2*l):r+s<a+o?t=a+o-s+2*l:r>a&&(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=t.scrollLeft();e._scrollPrevButton.toggle(e._isRtl?n<t[0].scrollWidth-t[0].offsetWidth-1:0!==n),e._scrollNextButton.toggle(e._isRtl?0!==n:n<t[0].scrollWidth-t[0].offsetWidth-1)},deactivateTab:function(e){var t=this,n=t.options.animation,i=n.open,r=c({},n.close),a=r&&"effects"in r;e=t.tabGroup.find(e),r=c(a?r:c({reverse:!0},i),{hide:!0}),o.size(i.effects)?(e.kendoAddClass(L,{duration:i.duration}),e.kendoRemoveClass(O,{duration:i.duration})):(e.addClass(L),e.removeClass(O)),e.removeAttr("aria-selected"),t.contentAnimators.filter("."+O).kendoStop(!0,!0).kendoAnimate(r).removeClass(O).attr("aria-hidden",!0)},activateTab:function(e){var t,n,i,r,a,s,l,d,u,h,p,f,g,v,_;if(!this.tabGroup.children("[data-animating]").length)return e=this.tabGroup.find(e),t=this,n=t.options.animation,i=n.open,r=c({},n.close),a=r&&"effects"in r,s=e.parent().children(),l=s.filter("."+O),d=s.index(e),r=c(a?r:c({reverse:!0},i),{hide:!0}),o.size(i.effects)?(l.kendoRemoveClass(O,{duration:r.duration}),e.kendoRemoveClass(W,{duration:r.duration})):(l.removeClass(O),e.removeClass(W)),u=t.contentAnimators,t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===u.length?(t.tabGroup.find("."+U).removeClass(U),e.addClass(U).css("z-index"),e.addClass(O),t._current(e),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(e),!1):(h=u.filter("."+O),p=t.contentHolder(d),f=p.closest(".k-content"),t.tabsHeight=m(t.tabGroup)+parseInt(t.wrapper.css("border-top-width"),10)+parseInt(t.wrapper.css("border-bottom-width"),10),t._sizeScrollWrap(h),0===p.length?(h.removeClass(O).attr("aria-hidden",!0).kendoStop(!0,!0).kendoAnimate(r),!1):(e.attr("data-animating",!0),g=(e.children("."+C).data(z)||t._contentUrls[d]||!1)&&p.is(F),v=function(){l.removeAttr("aria-selected"),e.attr("aria-selected",!0),t._current(e),t._sizeScrollWrap(f),f.addClass(O).removeAttr("aria-hidden").kendoStop(!0,!0).attr("aria-expanded",!0).kendoAnimate(c({init:function(){t.trigger(x,{item:e[0],contentElement:p[0]}),o.resize(p)}},i,{complete:function(){e.removeAttr("data-animating"),t.trigger(R,{item:e[0],contentElement:p[0]}),o.resize(p),t.scrollWrap.css("height","").css("height"),(o.support.browser.msie||o.support.browser.edge)&&p.finish().animate({opacity:.9},"fast","linear",function(){p.finish().animate({opacity:1},"fast","linear")})}}))},_=function(){g?(e.removeAttr("data-animating"),t.ajaxRequest(e,p,function(){e.attr("data-animating",!0),v(),t.trigger("change")})):(v(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(e)},h.removeClass(O),t.tabGroup.find("."+U).removeClass(U),e.addClass(U).css("z-index"),o.size(i.effects)?(l.kendoAddClass(L,{duration:i.duration}),e.kendoAddClass(O,{duration:i.duration})):(l.addClass(L),e.addClass(O)),h.attr("aria-hidden",!0),h.attr("aria-expanded",!1),h.length?h.kendoStop(!0,!0).kendoAnimate(c({complete:_},r)):_(),!0))},contentElement:function(n){var i,r,a,s;if(isNaN(n-0))return t;if(i=this.contentElements&&this.contentElements[0]&&!o.kineticScrollNeeded?this.contentElements:this.contentAnimators,r=e(this.tabGroup.children()[n]).attr("aria-controls"),i)for(a=0,s=i.length;a<s;a++)if(i.eq(a).closest(".k-content")[0].id==r)return i[a];return t},contentHolder:function(t){var n=e(this.contentElement(t)),i=n.children(".km-scroll-container");return o.support.touch&&i[0]?i:n},ajaxRequest:function(t,n,i,r){var a,s,l,d,u,c,p,f,m,g;t=this.tabGroup.find(t),a=this,s=e.ajaxSettings.xhr,l=t.find("."+C),d={},u=t.width()/2,c=!1,p=t.find(".k-loading").removeClass("k-complete"),p[0]||(p=e("<span class='k-loading'/>").prependTo(t)),f=2*u-p.width(),m=function(){p.animate({marginLeft:(parseInt(p.css("marginLeft"),10)||0)<u?f:0},500,m)},o.support.browser.msie&&o.support.browser.version<10&&setTimeout(m,40),r=r||l.data(z)||a._contentUrls[t.index()]||l.attr(k),a.inRequest=!0,g={type:"GET",cache:!1,url:r,dataType:"html",data:d,xhr:function(){var t=this,n=s(),i=t.progressUpload?"progressUpload":!!t.progress&&"progress";return n&&e.each([n,n.upload],function(){this.addEventListener&&this.addEventListener("progress",function(e){i&&t[i](e)},!1)}),t.noProgress=!(window.XMLHttpRequest&&"upload"in new XMLHttpRequest),n},progress:function(e){if(e.lengthComputable){var t=parseInt(e.loaded/e.total*100,10)+"%";p.stop(!0).addClass("k-progress").css({width:t,marginLeft:0})}},error:function(e,t){a.trigger("error",{xhr:e,status:t})&&this.complete()},stopProgress:function(){clearInterval(c),p.stop(!0).addClass("k-progress")[0].style.cssText=""},complete:function(e){a.inRequest=!1,this.noProgress?setTimeout(this.stopProgress,500):this.stopProgress(),"abort"==e.statusText&&p.remove()},success:function(e){var s,l,d;p.addClass("k-complete");try{s=this,l=10,s.noProgress&&(p.width(l+"%"),c=setInterval(function(){s.progress({lengthComputable:!0,loaded:Math.min(l,100),total:100}),l+=10},40)),a.angular("cleanup",function(){return{elements:n.get()}}),o.destroy(n),n.html(e)}catch(u){d=window.console,d&&d.error&&d.error(u.name+": "+u.message+" in "+r),this.error(this.xhr,"error")}i&&i.call(a,n),a.angular("compile",function(){return{elements:n.get()}}),a.trigger(B,{item:t[0],contentElement:n[0]})}},"object"==typeof r&&(g=e.extend(!0,{},g,r),h(g.url)&&(g.url=g.url())),a.xhr=e.ajax(g)}});c(Q,{renderItem:function(e){e=c({tabStrip:{},group:{}},e);var t=K.empty,n=e.item;return K.item(c(e,{image:n.imageUrl?K.image:t,sprite:n.spriteCssClass?K.sprite:t,itemWrapper:K.itemWrapper},Y))},renderContent:function(e){return K.content(c(e,Y))}}),o.ui.plugin(Q)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/undoredostack.min",["kendo.core.min"],e)}(function(){!function(e){var t=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.clear()},events:["undo","redo"],push:function(e){this.stack=this.stack.slice(0,this.currentCommandIndex+1),this.currentCommandIndex=this.stack.push(e)-1},undo:function(){if(this.canUndo()){var e=this.stack[this.currentCommandIndex--];e.undo(),this.trigger("undo",{command:e})}},redo:function(){if(this.canRedo()){var e=this.stack[++this.currentCommandIndex];e.redo(),this.trigger("redo",{command:e})}},clear:function(){this.stack=[],this.currentCommandIndex=-1},canUndo:function(){return this.currentCommandIndex>=0},canRedo:function(){return this.currentCommandIndex!=this.stack.length-1}});e.deepExtend(e,{util:{UndoRedoStack:t}})}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/main.min",["util/undoredostack.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.window.min","kendo.colorpicker.min"],e)}(function(){!function(e,t){var n,i,r,o,a=window.kendo,s=a.Class,l=a.ui.Widget,d=a.support.mobileOS,u=a.support.browser,c=e.extend,h=e.proxy,p=a.deepExtend,f=a.keys,m="select",g="select.k-select-overlay",v=s.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return a.template(e.template,{useWithBlock:!1})(e)}}),_={editorWrapperTemplate:'<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar" /></td></tr><tr><td class="k-editable-area" /></tr></tbody></table>',buttonTemplate:'# var iconCssClass= "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));#<a tabindex="0" role="button" class="k-tool"#= data.popup ? " data-popup" : "" # unselectable="on" title="#= data.title #"><span unselectable="on" class="k-tool-icon #= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></a>',colorPickerTemplate:'<div class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',comboBoxTemplate:'<select title="#= data.title #" class="#= data.cssClass #" />',dropDownListTemplate:'<span class="k-editor-dropdown"><select title="#= data.title #" class="#= data.cssClass #" /></span>',separatorTemplate:'<span class="k-separator" />',overflowAnchorTemplate:'<a tabindex="0" role="button" class="k-tool k-overflow-anchor" data-popup unselectable="on" title="#= data.title #" aria-haspopup="true" aria-expanded="false"><span unselectable="on" class="k-icon k-i-more-vertical"></span><span class="k-tool-text">#= data.title #</span></a>',formatByName:function(t,n){for(var i=0;i<n.length;i++)if(e.inArray(t,n[i].tags)>=0)return n[i]},getToolCssClass:function(e){var t={superscript:"sup-script",subscript:"sub-script",justifyLeft:"align-left",justifyCenter:"align-center",justifyRight:"align-right",justifyFull:"align-justify",insertUnorderedList:"list-unordered",insertOrderedList:"list-ordered","import":"login",indent:"indent-increase",outdent:"indent-decrease",createLink:"link-horizontal",unlink:"unlink-horizontal",insertImage:"image",insertFile:"file-add",viewHtml:"html",foreColor:"foreground-color",backColor:"paint",createTable:"table-insert",addColumnLeft:"table-column-insert-left",addColumnRight:"table-column-insert-right",addRowAbove:"table-row-insert-above",addRowBelow:"table-row-insert-below",deleteRow:"table-row-delete",deleteColumn:"table-column-delete",tableWizard:"table-properties",tableWizardInsert:"table-wizard",cleanFormatting:"clear-css"},n=t[e];return n?n:e},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+_.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),y.defaultTools[e]=t},registerFormat:function(e,t){y.fn.options.formats[e]=t}},b={bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",superscript:"Superscript",subscript:"Subscript",justifyCenter:"Center text",justifyLeft:"Align text left",justifyRight:"Align text right",justifyFull:"Justify",insertUnorderedList:"Insert unordered list",insertOrderedList:"Insert ordered list",indent:"Indent",outdent:"Outdent",createLink:"Insert hyperlink",unlink:"Remove hyperlink",insertImage:"Insert image",insertFile:"Insert file",insertHtml:"Insert HTML",viewHtml:"View HTML",fontName:"Select font family",fontNameInherit:"(inherited font)",fontSize:"Select font size",fontSizeInherit:"(inherited size)",formatBlock:"Format",formatting:"Format",foreColor:"Color",backColor:"Background color",style:"Styles",emptyFolder:"Empty Folder",editAreaTitle:"Editable area. Press F10 for toolbar.",uploadFile:"Upload",overflowAnchor:"More tools",orderBy:"Arrange by:",orderBySize:"Size",orderByName:"Name",invalidFileType:'The selected file "{0}" is not valid. Supported file types are {1}.',deleteFile:'Are you sure you want to delete "{0}"?',overwriteFile:'A file with name "{0}" already exists in the current directory. Do you want to overwrite it?',directoryNotFound:"A directory with this name was not found.",imageWebAddress:"Web address",imageAltText:"Alternate text",imageWidth:"Width (px)",imageHeight:"Height (px)",fileWebAddress:"Web address",fileTitle:"Title",fileText:"Text",linkWebAddress:"Web address",linkText:"Text",linkToolTip:"ToolTip",linkOpenInNewWindow:"Open link in new window",dialogUpdate:"Update",dialogInsert:"Insert",dialogOk:"Ok",dialogCancel:"Cancel",cleanFormatting:"Clean formatting",createTable:"Create a table",createTableHint:"Create a {0} x {1} table",addColumnLeft:"Add column on the left",addColumnRight:"Add column on the right",addRowAbove:"Add row above",addRowBelow:"Add row below",deleteRow:"Delete row",deleteColumn:"Delete column",tableWizard:"Table Wizard",tableTab:"Table",cellTab:"Cell",accessibilityTab:"Accessibility",caption:"Caption",summary:"Summary",width:"Width",height:"Height",units:"Units",cellSpacing:"Cell Spacing",cellPadding:"Cell Padding",cellMargin:"Cell Margin",alignment:"Alignment",background:"Background",cssClass:"CSS Class",id:"ID",border:"Border",borderStyle:"Border Style",collapseBorders:"Collapse borders",wrapText:"Wrap text",associateCellsWithHeaders:"Associate cells with headers",alignLeft:"Align Left",alignCenter:"Align Center",alignRight:"Align Right",alignLeftTop:"Align Left Top",alignCenterTop:"Align Center Top",alignRightTop:"Align Right Top",alignLeftMiddle:"Align Left Middle",alignCenterMiddle:"Align Center Middle",alignRightMiddle:"Align Right Middle",alignLeftBottom:"Align Left Bottom",alignCenterBottom:"Align Center Bottom",alignRightBottom:"Align Right Bottom",alignRemove:"Remove Alignment",columns:"Columns",rows:"Rows",selectAllCells:"Select All Cells",exportAs:"Export As","import":"Import"},k=!d||d.ios&&d.flatVersion>=500||!d.ios&&t!==document.documentElement.contentEditable,w={basic:["bold","italic","underline"],alignment:["justifyLeft","justifyCenter","justifyRight"],lists:["insertUnorderedList","insertOrderedList"],indenting:["indent","outdent"],links:["createLink","unlink"],tables:["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"]},y=l.extend({init:function(n,i){var r,o,s,d,u,f=this,m=a.ui.editor,g=m.Dom;k&&(l.fn.init.call(f,n,i),f.options=p({},f.options,i),f.options.tools=f.options.tools.slice(),n=f.element,u=n[0],d=g.name(u),this._registerHandler(n.closest("form"),"submit",h(f.update,f,t)),s=c({},f.options),s.editor=f,"textarea"==d?(f._wrapTextarea(),o=f.wrapper.find(".k-editor-toolbar"),u.id&&o.attr("aria-controls",u.id)):(f.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),s.popup=!0,o=e('<ul class="k-editor-toolbar" role="toolbar" />').insertBefore(n)),f.toolbar=new m.Toolbar(o[0],s),f.toolbar.bindTo(f),"textarea"==d&&setTimeout(function(){var e=f.wrapper[0].style.height,t=parseInt(e,10),n=f.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&n>t&&f.wrapper.height(t-(n-t))}),f._resizable(),f._initializeContentElement(f),f.keyboard=new m.Keyboard([new m.BackspaceHandler(f),new m.TypingHandler(f),new m.SystemHandler(f),new m.SelectAllHandler(f)]),f.clipboard=new m.Clipboard(this),f.undoRedoStack=new a.util.UndoRedoStack,i&&i.value?r=i.value:f.textarea?(r=u.value,f.options.encoded&&e.trim(u.defaultValue).length&&(r=u.defaultValue),r=r.replace(/[\r\n\v\f\t ]+/gi," ")):r=u.innerHTML,f.value(r||a.ui.editor.emptyElementContent),this._registerHandler(document,{mousedown:function(){f._endTyping()},mouseup:function(e){f._mouseup(e)}}),f._initializeImmutables(),f.toolbar.resize(),a.notify(f))},setOptions:function(e){var t=this;l.fn.setOptions.call(t,e),e.tools&&t.toolbar.bindTo(t)},_endTyping:function(){var e=this.keyboard;try{e.isTypingInProgress()&&(e.endTyping(!0),this.saveSelection())}catch(t){}},_selectionChange:function(){this._selectionStarted=!1,this.saveSelection(),this.trigger("select",{})},_resizable:function(){var n,i=this.options.resizable,r=e.isPlainObject(i)?i.content===t||i.content===!0:i;r&&this.textarea&&(e("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right' /></div>").insertAfter(this.textarea),this.wrapper.addClass("k-resizable"),this.wrapper.kendoResizable(c({},this.options.resizable,{start:function(t){var n=this.editor=e(t.currentTarget).closest(".k-editor");this.initialSize=n.height(),n.find("td:last").append("<div class='k-overlay' />")},resize:function(e){var t=e.y.initialDelta,n=this.initialSize+t,i=this.options.min||0,r=this.options.max||1/0;n=Math.min(r,Math.max(i,n)),this.editor.height(n)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),a.support.mobileOS.ios&&(n=this.wrapper.getKendoResizable(),n.draggable.options.ignore=g))},_initializeTableResizing:function(){var e=this;a.ui.editor.TableResizing.create(e),e._showTableResizeHandlesProxy=h(e._showTableResizeHandles,e),e.bind(m,e._showTableResizeHandlesProxy)},_destroyTableResizing:function(){var e=this,t=e.tableResizing;t&&(t.destroy(),e.tableResizing=null),e._showTableResizeHandlesProxy&&e.unbind(m,e._showTableResizeHandlesProxy)},_showTableResizeHandles:function(){var e=this,t=e.tableResizing;t&&t.showResizeHandles()},_initializeColumnResizing:function(){a.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var e=this;e.columnResizing&&(e.columnResizing.destroy(),e.columnResizing=null)},_initializeRowResizing:function(){a.ui.editor.RowResizing.create(this)},_destroyRowResizing:function(){var e=this;e.rowResizing&&(e.rowResizing.destroy(),e.rowResizing=null)},_wrapTextarea:function(){var t=this,n=t.element,i=n[0].style.width,r=n[0].style.height,o=_.editorWrapperTemplate,a=e(o).insertBefore(n).width(i).height(r),s=a.find(".k-editable-area");n.attr("autocomplete","off").appendTo(s).addClass("k-content k-raw-content").css("display","none"),t.textarea=n,t.wrapper=a},_createContentElement:function(t){var n,i,r,o=this,s=o.textarea,l=o.options.domain,c=l||document.domain,h="",p='javascript:""';return(l||c!=location.hostname)&&(h='<script>document.domain="'+c+'"</script>',p="javascript:document.write('"+h+"')"),s.hide(),n=e("<iframe />",{title:o.options.messages.editAreaTitle,frameBorder:"0"})[0],e(n).css("display","").addClass("k-content").attr("tabindex",s[0].tabIndex).insertBefore(s),n.src=p,i=n.contentWindow||n,r=i.document||n.contentDocument,e(n).one("load",function(){o.toolbar.decorateFrom(r.body)}),r.open(),r.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;height:100%;min-height:100%;}body{box-sizing:border-box;font-size:12px;font-family:Verdana,Geneva,sans-serif;margin-top:-1px;padding:5px .4em 0;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;"+(a.support.isRtl(s)?"direction:rtl;":"")+(u.msie||u.edge?"height:auto;":"")+(d.ios?"word-break:break-all;":"")+"}h1{font-size:2em;margin:.67em 0}h2{font-size:1.5em}h3{font-size:1.16em}h4{font-size:1em}h5{font-size:.83em}h6{font-size:.7em}p{margin:0 0 1em;}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}ul,ol{padding-left:2.5em}span{-ms-high-contrast-adjust:none;}a{color:#00a}code{font-size:1.23em}telerik\\3Ascript{display: none;}.k-table{width:100%;border-spacing:0;margin: 0 0 1em;}.k-table td{min-width:1px;padding:.2em .3em;}.k-table,.k-table td{outline:0;border: 1px dotted #ccc;}.k-table p{margin:0;padding:0;}.k-column-resize-handle-wrapper {position: absolute; height: 10px; width:10px; cursor: col-resize; z-index: 2;}.k-column-resize-handle {width: 100%; height: 100%;}.k-column-resize-handle > .k-column-resize-marker {width:2px; height:100%; margin:0 auto; background-color:#00b0ff; display:none; opacity:0.8;}.k-row-resize-handle-wrapper {position: absolute; cursor: row-resize; z-index:2; width: 10px; height: 10px;}.k-row-resize-handle {display: table; width: 100%; height: 100%;}.k-row-resize-marker-wrapper{display: table-cell; height:100%; width:100%; margin:0; padding:0; vertical-align: middle;}.k-row-resize-marker{margin: 0; padding:0; width:100%; height:2px; background-color: #00b0ff; opacity:0.8; display:none;}.k-table-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-table-resize-handle {width: 100%; height: 100%;}.k-table-resize-handle.k-resize-east{cursor:e-resize;}.k-table-resize-handle.k-resize-north{cursor:n-resize;}.k-table-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-table-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-table-resize-handle.k-resize-south{cursor:s-resize;}.k-table-resize-handle.k-resize-southeast{cursor:se-resize;}.k-table-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-table-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-table-resizing{opacity:0.6;}k\\:script{display:none;}</style>"+h+"<script>(function(d,c){d[c]('header'),d[c]('article'),d[c]('nav'),d[c]('section'),d[c]('footer');})(document, 'createElement');</script>"+e.map(t,function(e){
return"<link rel='stylesheet' href='"+e+"'>"}).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),r.close(),i},_blur:function(){var t=this.textarea,n=t?t.val():this._oldValue,i=this.options.encoded?this.encodedValue():this.value();this.update(),t&&t.trigger("blur"),i!=n&&(this.trigger("change"),t&&e(t.get(0).ownerDocument).trigger("change"))},_spellCorrect:function(e){var n,i=!1;this._registerHandler(e.body,{contextmenu:function(){e.one("select",function(){n=null}),e._spellCorrectTimeout=setTimeout(function(){n=new a.ui.editor.RestorePoint(e.getRange(),e.body),i=!1},10)},input:function(){if(n)return a.support.browser.mozilla&&!i?(i=!0,t):(a.ui.editor._finishUpdate(e,n),t)}})},_registerHandler:function(t,n,i){var r,o,s,l=this,d=".kendoEditor";if(t=e(t),this._handlers||(this._handlers=[]),t.length)if(e.isPlainObject(n))for(s in n)n.hasOwnProperty(s)&&this._registerHandler(t,s,n[s]);else for(r=a.applyEventMap(n).split(" "),o=0;o<r.length;o++)l._handlers.push({element:t,type:r[o]+d,handler:i}),t.on(r[o]+d,i)},_deregisterHandlers:function(){var e,t,n=this._handlers;for(e=0;e<n.length;e++)t=n[e],t.element.off(t.type,t.handler);this._handlers=[]},_initializeContentElement:function(){var n,i,r,o,s,l=this;l.textarea?(l.window=l._createContentElement(l.options.stylesheets),n=l.document=l.window.contentDocument||l.window.document,n.body||(o=n.createElement("body"),o.setAttribute("contenteditable","true"),o.setAttribute("autocorrect","off"),n.getElementsByTagName("html")[0].appendChild(o),s=setInterval(function(){e(l.document).find("body").length>1&&(e(l.document).find("body:last").remove(),window.clearInterval(s))},10)),l.body=n.body,i=l.window,r=n,this._registerHandler(n,"mouseup",h(this._mouseup,this))):(l.window=window,n=l.document=document,l.body=l.element[0],i=l.body,r=l.body,l.toolbar.decorateFrom(l.body)),this._registerHandler(i,"blur",h(this._blur,this)),l._registerHandler(r,"down",h(l._mousedown,l));try{n.execCommand("enableInlineTableEditing",null,!1)}catch(d){}a.support.touch&&this._registerHandler(n,{keydown:function(){a._activeElement()!=n.body&&l.window.focus()}}),this._spellCorrect(l),this._registerHandler(l.body,{keydown:function(e){var n,i,r,o,a,s,d,u,c,p;return(e.keyCode!==f.BACKSPACE&&e.keyCode!==f.DELETE||"true"===l.body.getAttribute("contenteditable"))&&(e.keyCode===f.F10?(setTimeout(h(l.toolbar.focus,l.toolbar),100),e.preventDefault(),t):(e.keyCode!=f.LEFT&&e.keyCode!=f.RIGHT||(n=l.getRange(),i=e.keyCode==f.LEFT,r=n[i?"startContainer":"endContainer"],o=n[i?"startOffset":"endOffset"],a=i?-1:1,s=o+a,d=i?s:o,3==r.nodeType&&"\ufeff"==r.nodeValue[d]&&(n.setStart(r,s),n.collapse(!0),l.selectRange(n))),u=l.toolbar.tools,c=l.keyboard.toolFromShortcut(u,e),p=c?u[c].options:{},c&&!p.keyPressCommand?(e.preventDefault(),/^(undo|redo)$/.test(c)||l.keyboard.endTyping(!0),l.trigger("keydown",e),l.exec(c),l._runPostContentKeyCommands(e),!1):(l.keyboard.clearTimeout(),l.keyboard.keydown(e),t)))},keypress:function(e){setTimeout(function(){l._runPostContentKeyCommands(e),l._showTableResizeHandles()},0)},keyup:function(t){var n=[f.BACKSPACE,f.TAB,f.PAGEUP,f.PAGEDOWN,f.END,f.HOME,f.LEFT,f.UP,f.RIGHT,f.DOWN,f.INSERT,f.DELETE];(e.inArray(t.keyCode,n)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&l._selectionChange(),l.keyboard.keyup(t)},click:function(e){var t,n=a.ui.editor.Dom;"img"===n.name(e.target)&&(t=l.createRange(),t.selectNode(e.target),l.selectRange(t))},"cut copy paste drop dragover":function(e){l.clipboard["on"+e.type](e)},focusin:function(){l.body.hasAttribute("contenteditable")&&(e(this).addClass("k-state-active"),l.toolbar.show())},focusout:function(){setTimeout(function(){var t,n=a._activeElement(),i=l.body,r=l.toolbar;r.options.popup&&(t=r.window.element.get(0),t&&!e.contains(t,n)&&t!=n&&(r.preventPopupHide=!1)),n==i||e.contains(i,n)||e(n).is(".k-editortoolbar-dragHandle")||r.focused()||(e(i).removeClass("k-state-active"),r.hide())},10)}}),l._initializeColumnResizing(),l._initializeRowResizing(),l._initializeTableResizing()},_initializeImmutables:function(){var e=this,t=a.ui.editor;e.options.immutables&&(e.immutables=new t.Immutables(e))},_mousedown:function(t){var n,i=this;i._selectionStarted=!0,e(i.body).parents(".k-window").length&&t.stopPropagation(),u.gecko||(n=e(t.target),(2==t.which||1==t.which&&t.ctrlKey)&&n.is("a[href]")&&window.open(n.attr("href"),"_new"))},_mouseup:function(t){var n=this;a.support.mobileOS.ios&&t&&e(t.target).is(g)||n._selectionStarted&&setTimeout(function(){n._selectionChange()},1)},_runPostContentKeyCommands:function(e){var t,n,i,r,o=this.getRange(),a=this.keyboard.toolsFromShortcut(this.toolbar.tools,e);for(t=0;t<a.length;t++)n=a[t],i=n.options,i.keyPressCommand&&(r=new i.command({range:o}),r.changesContent()&&(this.keyboard.endTyping(!0),this.exec(n.name)))},refresh:function(){var e,t=this;t.textarea&&(t._destroyResizings(),e=t.value(),t.textarea.val(e),t.wrapper.find("iframe").remove(),t._initializeContentElement(t),t.value(e))},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:b,formats:{},encoded:!0,domain:null,resizable:!1,deserialization:{custom:null},serialization:{entities:!0,semantic:!0,scripts:!1},pasteCleanup:{all:!1,css:!1,custom:null,keepNewLines:!1,msAllFormatting:!1,msConvertLists:!0,msTags:!0,none:!1,span:!1},stylesheets:[],dialogOptions:{modal:!0,resizable:!1,draggable:!0,animation:!1},imageBrowser:null,fileBrowser:null,fontName:[{text:"Arial",value:"Arial,Helvetica,sans-serif"},{text:"Courier New",value:"'Courier New',Courier,monospace"},{text:"Georgia",value:"Georgia,serif"},{text:"Impact",value:"Impact,Charcoal,sans-serif"},{text:"Lucida Console",value:"'Lucida Console',Monaco,monospace"},{text:"Tahoma",value:"Tahoma,Geneva,sans-serif"},{text:"Times New Roman",value:"'Times New Roman',Times,serif"},{text:"Trebuchet MS",value:"'Trebuchet MS',Helvetica,sans-serif"},{text:"Verdana",value:"Verdana,Geneva,sans-serif"}],fontSize:[{text:"1 (8pt)",value:"xx-small"},{text:"2 (10pt)",value:"x-small"},{text:"3 (12pt)",value:"small"},{text:"4 (14pt)",value:"medium"},{text:"5 (18pt)",value:"large"},{text:"6 (24pt)",value:"x-large"},{text:"7 (36pt)",value:"xx-large"}],formatBlock:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],tools:[].concat.call(["formatting"],w.basic,w.alignment,w.lists,w.indenting,w.links,["insertImage"],w.tables)},destroy:function(){var e=this;l.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),e._destroyUploadWidget(),e._destroyResizings(),a.destroy(this.wrapper)},_destroyResizings:function(){var e=this;e._destroyTableResizing(),a.ui.editor.TableResizing.dispose(e),e._destroyRowResizing(),a.ui.editor.RowResizing.dispose(e),e._destroyColumnResizing(),a.ui.editor.ColumnResizing.dispose(e)},_focusOutside:function(){if(a.support.browser.msie&&this.textarea){var t=e("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).focus();t.blur().remove()}},_destroyUploadWidget:function(){var e=this;e._uploadWidget&&(e._uploadWidget.destroy(),e._uploadWidget=null)},state:function(e){var t,n,i=y.defaultTools[e],r=i&&(i.options.finder||i.finder),o=a.ui.editor.RangeUtils;return!!r&&(t=this.getRange(),n=o.textNodes(t),!n.length&&t.collapsed&&(n=[t.startContainer]),r.getFormat?r.getFormat(n):r.isFormatted(n))},value:function(e){var n=this.body,i=a.ui.editor,r=this.options,o=i.Serializer.domToXhtml(n,r.serialization);return e===t?o:(e!=o&&(i.Serializer.htmlToDom(e,n,r.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools()),t)},saveSelection:function(t){t=t||this.getRange();var n=t.commonAncestorContainer,i=this.body;(n==i||e.contains(i,n))&&(this.selectionRestorePoint=new a.ui.editor.RestorePoint(t,i))},_focusBody:function(){var e,t=this.body,n=this.wrapper&&this.wrapper.find("iframe")[0],i=this.document.documentElement,r=a._activeElement();n?r!=t&&r!=n&&(e=i.scrollTop,t.focus(),i.scrollTop=e):(e=t.scrollTop,t.focus(),t.scrollTop=e)},restoreSelection:function(){this._focusBody(),this.selectionRestorePoint&&this.selectRange(this.selectionRestorePoint.toRange())},focus:function(){this.restoreSelection()},update:function(e){e=e||this.options.encoded?this.encodedValue():this.value(),this.textarea?this.textarea.val(e):this._oldValue=e},encodedValue:function(){return a.ui.editor.Dom.encode(this.value())},createRange:function(e){return a.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return a.ui.editor.SelectionUtils.selectionFromDocument(this.document)},selectRange:function(e){this._focusBody();var t=this.getSelection();t.removeAllRanges(),t.addRange(e),this.saveSelection(e)},getRange:function(){var e=this.getSelection(),t=e&&e.rangeCount>0?e.getRangeAt(0):this.createRange(),n=this.document;return t.startContainer!=n||t.endContainer!=n||t.startOffset||t.endOffset||(t.setStart(this.body,0),t.collapse(!0)),t},_containsRange:function(e){var t=a.ui.editor.Dom,n=this.body;return e&&t.isAncestorOrSelf(n,e.startContainer)&&t.isAncestorOrSelf(n,e.endContainer)},_deleteSavedRange:function(){"_range"in this&&delete this._range},selectedHtml:function(){return a.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,n){this.focus();var i=new a.ui.editor.InsertHtmlCommand(e.extend({range:this.getRange(),html:t},n));i.editor=this,i.exec()},exec:function(e,n){var i,r,o,a,s=this,l=null;if(!e)throw Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==s.body.getAttribute("contenteditable")&&"print"!==e&&"pdf"!==e)return!1;if(e=e.toLowerCase(),s.keyboard.isTypingInProgress()||(s._focusBody(),s.selectRange(s._range||s.getRange())),r=s.toolbar.toolById(e),!r)for(a in y.defaultTools)if(a.toLowerCase()==e){r=y.defaultTools[a];break}if(r){if(i=s.getRange(),r.command&&(l=r.command(c({range:i,body:s.body,immutables:!!s.immutables},n))),o=s.trigger("execute",{name:e,command:l}))return;if(/^(undo|redo)$/i.test(e))s.undoRedoStack[e]();else if(l&&(s.execCommand(l),l.async))return l.change=h(s._selectionChange,s),t;s._selectionChange()}},execCommand:function(e){e.managesUndoRedo||this.undoRedoStack.push(e),e.editor=this,e.exec()}});y.defaultTools={undo:{options:{key:"Z",ctrl:!0}},redo:{options:{key:"Y",ctrl:!0}}},a.ui.plugin(y),n=s.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title}),e.children(".k-tool-text").html(t.title)},command:function(e){return new this.options.command(e)},update:e.noop}),n.exec=function(e,t,n){e.exec(t,{value:n})},_.registerTool("separator",new n({template:new v({template:_.separatorTemplate})})),i=u.msie&&u.version<9?"\ufeff":"",r="\ufeff",o=r,(u.msie||u.edge)&&(o=r="&nbsp;"),c(a.ui,{editor:{ToolTemplate:v,EditorUtils:_,Tool:n,_bomFill:i,emptyElementContent:r,emptyTableCellContent:o}}),a.PDFMixin&&(a.PDFMixin.extend(y.prototype),y.prototype._drawPDF=function(){return a.drawing.drawDOM(this.body,this.options.pdf)},y.prototype.saveAsPDF=function(){var t,n=new e.Deferred,i=n.promise(),r={promise:i};if(!this.trigger("pdfExport",r))return t=this.options.pdf,this._drawPDF(n).then(function(e){return a.drawing.exportPDF(e,t)}).done(function(e){a.saveAs({dataURI:e,fileName:t.fileName,proxyURL:t.proxyURL,proxyTarget:t.proxyTarget,forceProxy:t.forceProxy}),n.resolve()}).fail(function(e){n.reject(e)}),i})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/dom.min",["editor/main.min"],e)}(function(){!function(e){function t(e){var t,n,i={};for(t=0,n=e.length;t<n;t++)i[e[t]]=!0;return i}var n,i,r,o,a,s,l,d,u,c,h,p=window.kendo,f=e.map,m=e.extend,g=p.support.browser,v="style",_="float",b="cssFloat",k="styleFloat",w="class",y="k-marker",x=t("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),C="div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,map,menu,noframes,noscript,object,pre,script,table,tbody,td,tfoot,th,thead,tr,header,article,nav,footer,section,aside,main,figure,figcaption".split(","),T=C.concat(["ul","ol","li"]),S=t(T),D="span,em,a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,strike,strong,sub,sup,textarea,tt,u,var,data,time,mark,ruby".split(","),F=t(D),E=t("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),A=function(e){1==e.nodeType&&e.normalize()};g.msie&&g.version>=8&&(A=function(e){if(1==e.nodeType&&e.firstChild)for(var t=e.firstChild,n=t;;){if(n=n.nextSibling,!n)break;3==n.nodeType&&3==t.nodeType&&(n.nodeValue=t.nodeValue+n.nodeValue,h.remove(t)),t=n}}),n=/^\s+$/,i=/^[\n\r\t]+$/,r=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,o=/\ufeff/g,a=/^(\s+|\ufeff)$/,l="color,padding-left,padding-right,padding-top,padding-bottom,background-color,background-attachment,background-image,background-position,background-repeat,border-top-style,border-top-width,border-top-color,border-bottom-style,border-bottom-width,border-bottom-color,border-left-style,border-left-width,border-left-color,border-right-style,border-right-width,border-right-color,font-family,font-size,font-style,font-variant,font-weight,line-height".split(","),d=/[<>\&]/g,u=/[\u00A0-\u2666<>\&]/g,c={34:"quot",38:"amp",39:"apos",60:"lt",62:"gt",160:"nbsp",161:"iexcl",162:"cent",163:"pound",164:"curren",165:"yen",166:"brvbar",167:"sect",168:"uml",169:"copy",170:"ordf",171:"laquo",172:"not",173:"shy",174:"reg",175:"macr",176:"deg",177:"plusmn",178:"sup2",179:"sup3",180:"acute",181:"micro",182:"para",183:"middot",184:"cedil",185:"sup1",186:"ordm",187:"raquo",188:"frac14",189:"frac12",190:"frac34",191:"iquest",192:"Agrave",193:"Aacute",194:"Acirc",195:"Atilde",196:"Auml",197:"Aring",198:"AElig",199:"Ccedil",200:"Egrave",201:"Eacute",202:"Ecirc",203:"Euml",204:"Igrave",205:"Iacute",206:"Icirc",207:"Iuml",208:"ETH",209:"Ntilde",210:"Ograve",211:"Oacute",212:"Ocirc",213:"Otilde",214:"Ouml",215:"times",216:"Oslash",217:"Ugrave",218:"Uacute",219:"Ucirc",220:"Uuml",221:"Yacute",222:"THORN",223:"szlig",224:"agrave",225:"aacute",226:"acirc",227:"atilde",228:"auml",229:"aring",230:"aelig",231:"ccedil",232:"egrave",233:"eacute",234:"ecirc",235:"euml",236:"igrave",237:"iacute",238:"icirc",239:"iuml",240:"eth",241:"ntilde",242:"ograve",243:"oacute",244:"ocirc",245:"otilde",246:"ouml",247:"divide",248:"oslash",249:"ugrave",250:"uacute",251:"ucirc",252:"uuml",253:"yacute",254:"thorn",255:"yuml",402:"fnof",913:"Alpha",914:"Beta",915:"Gamma",916:"Delta",917:"Epsilon",918:"Zeta",919:"Eta",920:"Theta",921:"Iota",922:"Kappa",923:"Lambda",924:"Mu",925:"Nu",926:"Xi",927:"Omicron",928:"Pi",929:"Rho",931:"Sigma",932:"Tau",933:"Upsilon",934:"Phi",935:"Chi",936:"Psi",937:"Omega",945:"alpha",946:"beta",947:"gamma",948:"delta",949:"epsilon",950:"zeta",951:"eta",952:"theta",953:"iota",954:"kappa",955:"lambda",956:"mu",957:"nu",958:"xi",959:"omicron",960:"pi",961:"rho",962:"sigmaf",963:"sigma",964:"tau",965:"upsilon",966:"phi",967:"chi",968:"psi",969:"omega",977:"thetasym",978:"upsih",982:"piv",8226:"bull",8230:"hellip",8242:"prime",8243:"Prime",8254:"oline",8260:"frasl",8472:"weierp",8465:"image",8476:"real",8482:"trade",8501:"alefsym",8592:"larr",8593:"uarr",8594:"rarr",8595:"darr",8596:"harr",8629:"crarr",8656:"lArr",8657:"uArr",8658:"rArr",8659:"dArr",8660:"hArr",8704:"forall",8706:"part",8707:"exist",8709:"empty",8711:"nabla",8712:"isin",8713:"notin",8715:"ni",8719:"prod",8721:"sum",8722:"minus",8727:"lowast",8730:"radic",8733:"prop",8734:"infin",8736:"ang",8743:"and",8744:"or",8745:"cap",8746:"cup",8747:"int",8756:"there4",8764:"sim",8773:"cong",8776:"asymp",8800:"ne",8801:"equiv",8804:"le",8805:"ge",8834:"sub",8835:"sup",8836:"nsub",8838:"sube",8839:"supe",8853:"oplus",8855:"otimes",8869:"perp",8901:"sdot",8968:"lceil",8969:"rceil",8970:"lfloor",8971:"rfloor",9001:"lang",9002:"rang",9674:"loz",9824:"spades",9827:"clubs",9829:"hearts",9830:"diams",338:"OElig",339:"oelig",352:"Scaron",353:"scaron",376:"Yuml",710:"circ",732:"tilde",8194:"ensp",8195:"emsp",8201:"thinsp",8204:"zwnj",8205:"zwj",8206:"lrm",8207:"rlm",8211:"ndash",8212:"mdash",8216:"lsquo",8217:"rsquo",8218:"sbquo",8220:"ldquo",8221:"rdquo",8222:"bdquo",8224:"dagger",8225:"Dagger",8240:"permil",8249:"lsaquo",8250:"rsaquo",8364:"euro"},h={block:S,inline:F,findNodeIndex:function(e,t){var n=0;if(!e)return-1;for(;;){if(e=e.previousSibling,!e)break;t&&3==e.nodeType||n++}return n},isDataNode:function(e){return e&&null!==e.nodeValue&&null!==e.data},isAncestorOf:function(t,n){try{return!h.isDataNode(t)&&(e.contains(t,h.isDataNode(n)?n.parentNode:n)||n.parentNode==t)}catch(i){return!1}},isAncestorOrSelf:function(e,t){return h.isAncestorOf(e,t)||e==t},findClosestAncestor:function(e,t){if(h.isAncestorOf(e,t))for(;t&&t.parentNode!=e;)t=t.parentNode;return t},getNodeLength:function(e){return h.isDataNode(e)?e.length:e.childNodes.length},splitDataNode:function(e,t){for(var n,i=e.cloneNode(!1),r="",o=e.nextSibling;o&&3==o.nodeType&&o.nodeValue;)r+=o.nodeValue,n=o,o=o.nextSibling,h.remove(n);e.deleteData(t,e.length),i.deleteData(0,t),i.nodeValue+=r,h.insertAfter(i,e)},attrEquals:function(e,t){var n,i;for(n in t)if(i=e[n],n==_&&(i=e[p.support.cssFloat?b:k]),"object"==typeof i){if(!h.attrEquals(i,t[n]))return!1}else if(i!=t[n])return!1;return!0},blockParentOrBody:function(e){return h.parentOfType(e,T)||e.ownerDocument.body},blockParents:function(t){var n,i,r,o=[];for(n=0,i=t.length;n<i;n++)r=h.parentOfType(t[n],h.blockElements),r&&e.inArray(r,o)<0&&o.push(r);return o},windowFromDocument:function(e){return e.defaultView||e.parentWindow},normalize:A,blockElements:T,nonListBlockElements:C,inlineElements:D,empty:x,fillAttrs:E,nodeTypes:{ELEMENT_NODE:1,ATTRIBUTE_NODE:2,TEXT_NODE:3,CDATA_SECTION_NODE:4,ENTITY_REFERENCE_NODE:5,ENTITY_NODE:6,PROCESSING_INSTRUCTION_NODE:7,COMMENT_NODE:8,DOCUMENT_NODE:9,DOCUMENT_TYPE_NODE:10,DOCUMENT_FRAGMENT_NODE:11,NOTATION_NODE:12},toHex:function(e){var t=r.exec(e);return t?"#"+f(t.slice(1),function(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}).join(""):e},encode:function(e,t){var n=!t||t.entities?u:d;return e.replace(n,function(e){var t=e.charCodeAt(0),n=c[t];return n?"&"+n+";":e})},isBom:function(e){return e&&3===e.nodeType&&/^[\ufeff]+$/.test(e.nodeValue)},stripBom:function(e){return(e||"").replace(o,"")},stripBomNode:function(e){h.isBom(e)&&e.parentNode.removeChild(e)},insignificant:function(e){var t=e.attributes;return"k-marker"==e.className||h.is(e,"br")&&("k-br"==e.className||t._moz_dirty||t._moz_editor_bogus_node)},tableCell:function(e){return h.is(e,"td")||h.is(e,"th")},significantNodes:function(t){return e.grep(t,function(e){var t=h.name(e);return"br"!=t&&(!h.insignificant(e)&&(!h.emptyTextNode(e)&&!(1==e.nodeType&&!x[t]&&h.emptyNode(e))))})},emptyTextNode:function(e){return e&&3==e.nodeType&&a.test(e.nodeValue)},emptyNode:function(e){return 1==e.nodeType&&!h.significantNodes(e.childNodes).length},name:function(e){return e.nodeName.toLowerCase()},significantChildNodes:function(t){return e.grep(t.childNodes,function(e){return 3!=e.nodeType||!h.isWhitespace(e)})},lastTextNode:function(e){var t,n=null;if(3==e.nodeType)return e;for(t=e.lastChild;t;t=t.previousSibling)if(n=h.lastTextNode(t))return n;return n},is:function(e,t){return e&&h.name(e)==t},isMarker:function(e){return e.className==y},isWhitespace:function(e){return n.test(e.nodeValue)},allWhitespaceContent:function(e){for(var t=e.firstChild;t&&h.isWhitespace(t);)t=t.nextSibling;return!t},isEmptyspace:function(e){return i.test(e.nodeValue)},htmlIndentSpace:function(t){var n,r,a,s,l,d;return!(!h.isDataNode(t)||!h.isWhitespace(t))&&(!!i.test(t.nodeValue)||(n=function(e,t){for(;e[t];)if(e=e[t],h.significantNodes([e]).length>0)return e},r=t.parentNode,a=n(t,"previousSibling"),s=n(t,"nextSibling"),o.test(t.nodeValue)?!(!a&&!s):!!e(r).is("tr,tbody,thead,tfoot,table,ol,ul")||!!((h.isBlock(r)||h.is(r,"body"))&&(l=a&&h.isBlock(a),d=s&&h.isBlock(s),!s&&l||!a&&d||l&&d))))},isBlock:function(e){return S[h.name(e)]},isEmpty:function(e){return x[h.name(e)]},isInline:function(e){return F[h.name(e)]},isBr:function(e){return"br"==h.name(e)},list:function(e){var t=e?h.name(e):"";return"ul"==t||"ol"==t||"dl"==t},scrollContainer:function(e){var t=h.windowFromDocument(e),n=(t.contentWindow||t).document||t.ownerDocument||t;return n="BackCompat"==n.compatMode?n.body:n.scrollingElement||n.documentElement},scrollTo:function(t,n){var i,r,o,a,s=t.ownerDocument,l=h.windowFromDocument(s),d=l.innerHeight,u=h.scrollContainer(s);h.isDataNode(t)?n?(a=h.create(s,"span",{innerHTML:"&#xfeff;"}),h.insertBefore(a,t),i=e(a)):i=e(t.parentNode):i=e(t),r=i.offset().top,o=i[0].offsetHeight,!n&&o||(o=parseInt(i.css("line-height"),10)||Math.ceil(1.2*parseInt(i.css("font-size"),10))||15),a&&h.remove(a),o+r>u.scrollTop+d&&(u.scrollTop=o+r-d)},persistScrollTop:function(e){s=h.scrollContainer(e).scrollTop},offset:function(e,t){for(var n={top:e.offsetTop,left:e.offsetLeft},i=e.offsetParent;i&&(!t||h.isAncestorOf(t,i));)n.top+=i.offsetTop,n.left+=i.offsetLeft,i=i.offsetParent;return n},restoreScrollTop:function(e){"number"==typeof s&&(h.scrollContainer(e).scrollTop=s)},insertAt:function(e,t,n){e.insertBefore(t,e.childNodes[n]||null)},insertBefore:function(e,t){return t.parentNode?t.parentNode.insertBefore(e,t):t},insertAfter:function(e,t){return t.parentNode.insertBefore(e,t.nextSibling)},remove:function(e){e.parentNode&&e.parentNode.removeChild(e)},removeChildren:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},removeTextSiblings:function(e){for(var t=e.parentNode;e.nextSibling&&3==e.nextSibling.nodeType;)t.removeChild(e.nextSibling);for(;e.previousSibling&&3==e.previousSibling.nodeType;)t.removeChild(e.previousSibling)},trim:function(e){var t,n;for(t=e.childNodes.length-1;t>=0;t--)n=e.childNodes[t],h.isDataNode(n)?h.stripBom(n.nodeValue).length||h.remove(n):n.className!=y&&(h.trim(n),(0===n.childNodes.length||h.allWhitespaceContent(n)&&h.isBlock(n)&&!h.isEmpty(n))&&h.remove(n));return e},closest:function(e,t){for(;e&&h.name(e)!=t;)e=e.parentNode;return e},closestBy:function(e,t,n){for(;e&&!t(e);){if(n&&n(e))return null;e=e.parentNode}return e},sibling:function(e,t){do e=e[t];while(e&&1!=e.nodeType);return e},next:function(e){return h.sibling(e,"nextSibling")},prev:function(e){return h.sibling(e,"previousSibling")},parentOfType:function(e,t){do e=e.parentNode;while(e&&!h.ofType(e,t));return e},ofType:function(t,n){return e.inArray(h.name(t),n)>=0},changeTag:function(e,t,n){var i,r,o,a,s,l=h.create(e.ownerDocument,t),d=e.attributes;if(!n)for(i=0,r=d.length;i<r;i++)s=d[i],s.specified&&(o=s.nodeName,a=s.nodeValue,o==w?l.className=a:o==v?l.style.cssText=e.style.cssText:l.setAttribute(o,a));for(;e.firstChild;)l.appendChild(e.firstChild);return h.insertBefore(l,e),h.remove(e),l},editableParent:function(e){for(;e&&(3==e.nodeType||"true"!==e.contentEditable);)e=e.parentNode;return e},wrap:function(e,t){return h.insertBefore(t,e),t.appendChild(e),t},unwrap:function(e){for(var t=e.parentNode;e.firstChild;)t.insertBefore(e.firstChild,e);t.removeChild(e)},wrapper:function(t){var n=h.closestBy(t,function(e){return e.parentNode&&h.significantNodes(e.parentNode.childNodes).length>1});return e(n).is("body,.k-editor")?void 0:n},create:function(e,t,n){return h.attr(e.createElement(t),n)},createEmptyNode:function(e,t,n){var i=h.attr(e.createElement(t),n);return i.innerHTML="\ufeff",i},attr:function(e,t){t=m({},t),t&&v in t&&(h.style(e,t.style),delete t.style);for(var n in t)null===t[n]?(e.removeAttribute(n),delete t[n]):"className"==n&&(e[n]=t[n]);return m(e,t)},style:function(t,n){e(t).css(n||{})},unstyle:function(e,t){for(var n in t)n==_&&(n=p.support.cssFloat?b:k),e.style[n]="";""===e.style.cssText&&e.removeAttribute(v)},inlineStyle:function(t,n,i){var r,o=e(h.create(t.ownerDocument,n,i));return t.appendChild(o[0]),r=f(l,function(e){return g.msie&&"line-height"==e&&"1px"==o.css(e)?"line-height:1.5":e+":"+o.css(e)}).join(";"),o.remove(),r},getEffectiveBackground:function(e){var t=e.css("background-color")||"";return t.indexOf("rgba(0, 0, 0, 0")<0&&"transparent"!==t?t:"html"===e[0].tagName.toLowerCase()?"Window":h.getEffectiveBackground(e.parent())},innerText:function(e){var t=e.innerHTML;return t=t.replace(/<!--(.|\s)*?-->/gi,""),t=t.replace(/<\/?[^>]+?\/?>/gm,"")},removeClass:function(t,n){var i,r,o=" "+t.className+" ",a=n.split(" ");for(i=0,r=a.length;i<r;i++)o=o.replace(" "+a[i]+" "," ");o=e.trim(o),o.length?t.className=o:t.removeAttribute(w)},commonAncestor:function(){var e,t,n,i,r,o=arguments.length,a=[],s=1/0,l=null;if(!o)return null;if(1==o)return arguments[0];for(e=0;e<o;e++){for(t=[],n=arguments[e];n;)t.push(n),n=n.parentNode;a.push(t.reverse()),s=Math.min(s,t.length)}if(1==o)return a[0][0];for(e=0;e<s;e++){for(i=a[0][e],r=1;r<o;r++)if(i!=a[r][e])return l;l=i}return l},closestSplittableParent:function(t){var n,i,r;return n=1==t.length?h.parentOfType(t[0],["ul","ol"]):h.commonAncestor.apply(null,t),n||(n=h.parentOfType(t[0],["p","td"])||t[0].ownerDocument.body),h.isInline(n)&&(n=h.blockParentOrBody(n)),i=f(t,h.editableParent),r=h.commonAncestor(i)[0],e.contains(n,r)&&(n=r),n},closestEditable:function(t,n){var i,r=h.editableParent(t);return i=h.ofType(t,n)?t:h.parentOfType(t,n),i&&r&&e.contains(i,r)?i=r:!i&&r&&(i=r),i},closestEditableOfType:function(e,t){var n=h.closestEditable(e,t);if(n&&h.ofType(n,t))return n},filter:function(e,t,n){var i=function(t){return h.name(t)==e};return h.filterBy(t,i,n)},filterBy:function(e,t,n){for(var i,r=0,o=e.length,a=[];r<o;r++)i=t(e[r]),(i&&!n||!i&&n)&&a.push(e[r]);return a},ensureTrailingBreaks:function(t){var n=e(t).find("p,td,th"),i=n.length,r=0;if(i)for(;r<i;r++)h.ensureTrailingBreak(n[r]);else h.ensureTrailingBreak(t)},removeTrailingBreak:function(t){e(t).find("br[type=_moz],.k-br").remove()},ensureTrailingBreak:function(e){var t,n,i;h.removeTrailingBreak(e),t=e.lastChild,n=t&&h.name(t),(!n||"br"!=n&&"img"!=n||"br"==n&&"k-br"!=t.className)&&(i=e.ownerDocument.createElement("br"),i.className="k-br",e.appendChild(i))}},p.ui.editor.Dom=h}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/serializer.min",["editor/dom.min"],e)}(function(){!function(e,t){var n,i,r,o,a=window.kendo,s=a.ui.editor,l=s.Dom,d=e.extend,u="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),c=/"/g,h=/<br[^>]*>/i,p=/^\d+(\.\d*)?(px)?$/i,f=/<p>(?:&nbsp;)?<\/p>/i,m=/(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,g=/^sizzle-\d+/i,v=/^k-script-/i,_=/\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,b='<br class="k-br">',k=document.createElement("div");k.innerHTML=" <hr>",n=3===k.firstChild.nodeType,k=null,i=e.isFunction,r="td",o={toEditableHtml:function(e){return(e||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"<!--[CDATA[$1]]-->").replace(/<(\/?)script([^>]*)>/gi,"<$1k:script$2>").replace(/<img([^>]*)>/gi,function(e){return e.replace(_,"")}).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1").replace(/^<(table|blockquote)/i,b+"<$1").replace(/^[\s]*(&nbsp;|\u00a0)/i,"$1").replace(/<\/(table|blockquote)>$/i,"</$1>"+b)},_toEditableImmutables:function(t){for(var n=s.Immutables.immutable,i=l.emptyTextNode,r=t.firstChild,o=t.lastChild;i(r);)r=r.nextSibling;for(;i(o);)o=o.previousSibling;r&&n(r)&&e(b).prependTo(t),o&&n(o)&&e(b).appendTo(t)},_fillEmptyElements:function(t){e(t).find("p,td").each(function(){var t,n=e(this);if(/^\s*$/g.test(n.text())&&!n.find("img,input").length){for(t=this;t.firstChild&&3!=t.firstChild.nodeType;)t=t.firstChild;1!=t.nodeType||l.empty[l.name(t)]||(t.innerHTML=l.is(t,"td")?a.ui.editor.emptyTableCellContent:a.ui.editor.emptyElementContent)}})},_removeSystemElements:function(t){e(".k-paste-container",t).remove()},_resetOrderedLists:function(e){var t,n,i,r=e.getElementsByTagName("ol");for(t=0;t<r.length;t++)n=r[t],i=n.getAttribute("start"),n.setAttribute("start",1),i?n.setAttribute("start",i):n.removeAttribute(i)},_preventScriptExecution:function(t){e(t).find("*").each(function(){var e,t,n,i,r=this.attributes;for(t=0,n=r.length;t<n;t++)e=r[t],i=e.nodeName,e.specified&&/^on/i.test(i)&&(this.setAttribute("k-script-"+i,e.value),this.removeAttribute(i))})},htmlToDom:function(t,n,r){var s=a.support.browser,d=s.msie,u=d&&s.version<9,c="originalsrc",h="originalhref",p=r||{},f=p.immutables;return t=o.toEditableHtml(t),u&&(t="<br/>"+t,t=t.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,h+'="$1"'),t=t.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/,c+'="$1"')),i(p.custom)&&(t=p.custom(t)||t),n.innerHTML=t,f&&f.deserialize(n),u?(l.remove(n.firstChild),e(n).find("k\\:script,script,link,img,a").each(function(){var e=this;e[h]&&(e.setAttribute("href",e[h]),e.removeAttribute(h)),e[c]&&(e.setAttribute("src",e[c]),e.removeAttribute(c))})):d&&(l.normalize(n),o._resetOrderedLists(n)),o._preventScriptExecution(n),o._fillEmptyElements(n),o._removeSystemElements(n),o._toEditableImmutables(n),e("table",n).addClass("k-table"),n},domToXhtml:function(i,o){function d(t){return e.grep(t,function(e){return"style"!=e.name})}function _(e,t){E.push("<"+t),y(e),E.push(">")}function b(t){var n,i,r,o=e.trim,a=o(t),s=[];for(m.lastIndex=0;;){if(n=m.exec(a),!n)break;i=o(n[1].toLowerCase()),r=o(n[2]),"font-size-adjust"!=i&&"font-stretch"!=i&&(i.indexOf("color")>=0?r=l.toHex(r):i.indexOf("font")>=0?r=r.replace(c,"'"):/\burl\(/g.test(r)&&(r=r.replace(c,"")),s.push({property:i,value:r}))}return s}function k(e){var t,n=b(e);for(t=0;t<n.length;t++)E.push(n[t].property),E.push(":"),E.push(n[t].value),E.push(";")}function w(e){var t,n,i,r,a,s,d=[],u=e.attributes;for(n=0,i=u.length;n<i;n++)t=u[n],r=t.nodeName,a=t.value,s=t.specified,"value"==r&&"value"in e&&e.value?s=!0:"type"==r&&"text"==a?s=!0:"class"!=r||a?g.test(r)?s=!1:"complete"==r?s=!1:"altHtml"==r?s=!1:"start"==r&&l.is(e,"ul")?s=!1:"start"==r&&l.is(e,"ol")&&"1"==a?s=!1:r.indexOf("_moz")>=0?s=!1:v.test(r)?s=!!o.scripts:"data-role"==r&&"resizable"==a&&(l.is(e,"tr")||l.is(e,"td"))&&(s=!1):s=!1,s&&d.push(t);return d}function y(n,i){var r,o,s,d,u,c,h,f;if(i=i||w(n),l.is(n,"img")&&(c=n.style.width,h=n.style.height,f=e(n),c&&p.test(c)&&(f.attr("width",parseInt(c,10)),l.unstyle(n,{width:t})),h&&p.test(h)&&(f.attr("height",parseInt(h,10)),l.unstyle(n,{height:t}))),i.length)for(r=0,o=i.length;r<o;r++)s=i[r],d=s.nodeName,u=s.value,"class"==d&&"k-table"==u||(d=d.replace(v,""),E.push(" "),E.push(d),E.push('="'),"style"==d?k(u||n.style.cssText):E.push("src"==d||"href"==d?a.htmlEncode(n.getAttribute(d,2)):l.fillAttrs[d]?d:u),E.push('"'))}function x(e,t,n){for(var i=e.firstChild;i;i=i.nextSibling)S(i,t,n)}function C(e){return e.nodeValue.replace(/\ufeff/g,"")}function T(e){if(l.isBom(e)){do{if(e=e.parentNode,l.is(e,r)&&1===e.childNodes.length)return!0;if(1!==e.childNodes.length)return!1}while(!l.isBlock(e));return!0}return!1}function S(i,r,a){var d,u,c,h,p,f,m=i.nodeType;if(A&&s.Immutables.immutable(i))E.push(A.serialize(i));else if(1==m){if(d=l.name(i),f=e(i),f.hasClass("k-table-resize-handle-wrapper")||f.hasClass("k-column-resize-handle-wrapper")||f.hasClass("k-row-resize-handle-wrapper"))return;if(!d||l.insignificant(i))return;if(!o.scripts&&("script"==d||"k:script"==d))return;if(u=I[d],u&&(t===u.semantic||o.semantic^u.semantic))return u.start(i),x(i,!1,u.skipEncoding),u.end(i),t;E.push("<"),E.push(d),y(i),l.empty[d]?E.push(" />"):(E.push(">"),x(i,r||l.is(i,"pre")),E.push("</"),E.push(d),E.push(">"))}else if(3==m){if(T(i))return E.push("&nbsp;"),t;h=C(i),!r&&n&&(c=i.parentNode,p=i.previousSibling,p||(p=(l.isInline(c)?c:i).previousSibling),
p&&""!==p.innerHTML&&!l.isBlock(p)||(h=h.replace(/^[\r\n\v\f\t ]+/,"")),h=h.replace(/ +/," ")),E.push(a?h:l.encode(h,o))}else 4==m?(E.push("<![CDATA["),E.push(i.data),E.push("]]>")):8==m&&(i.data.indexOf("[CDATA[")<0?(E.push("<!--"),E.push(i.data),E.push("-->")):(E.push("<!"),E.push(i.data),E.push(">")))}function D(e){var t=e.childNodes.length,n=t&&3==e.firstChild.nodeType;return n&&(1==t||2==t&&l.insignificant(e.lastChild))}function F(){e.isFunction(o.custom)&&(E=o.custom(E)||E)}var E=[],A=o&&o.immutables,I={iframe:{start:function(e){_(e,"iframe")},end:function(){E.push("</iframe>")}},"k:script":{start:function(e){_(e,"script")},end:function(){E.push("</script>")},skipEncoding:!0},span:{semantic:!0,start:function(t){var n,i,r=t.style,o=w(t),a=d(o);a.length&&(E.push("<span"),y(t,a),E.push(">")),"underline"==r.textDecoration&&E.push("<u>"),n=[],r.color&&n.push('color="'+l.toHex(r.color)+'"'),r.fontFamily&&n.push('face="'+r.fontFamily+'"'),r.fontSize&&(i=e.inArray(r.fontSize,u),n.push('size="'+i+'"')),n.length&&E.push("<font "+n.join(" ")+">")},end:function(e){var t=e.style;(t.color||t.fontFamily||t.fontSize)&&E.push("</font>"),"underline"==t.textDecoration&&E.push("</u>"),d(w(e)).length&&E.push("</span>")}},strong:{semantic:!0,start:function(e){_(e,"b")},end:function(){E.push("</b>")}},em:{semantic:!0,start:function(e){_(e,"i")},end:function(){E.push("</i>")}},b:{semantic:!1,start:function(e){_(e,"strong")},end:function(){E.push("</strong>")}},i:{semantic:!1,start:function(e){_(e,"em")},end:function(){E.push("</em>")}},u:{semantic:!1,start:function(t){var n,i,r;E.push("<span"),n=w(t),i=e(n).filter(function(e,t){return"style"==t.name})[0],r={nodeName:"style",value:"text-decoration:underline;"},i&&(r.value=i.value,/text-decoration/i.test(r.value)||(r.value="text-decoration:underline;"+r.value),n.splice(e.inArray(i,n),1)),n.push(r),y(t,n),E.push(">")},end:function(){E.push("</span>")}},font:{semantic:!1,start:function(e){var t,n,i;E.push('<span style="'),t=e.getAttribute("color"),n=u[e.getAttribute("size")],i=e.getAttribute("face"),t&&(E.push("color:"),E.push(l.toHex(t)),E.push(";")),i&&(E.push("font-family:"),E.push(i),E.push(";")),n&&(E.push("font-size:"),E.push(n),E.push(";")),E.push('">')},end:function(){E.push("</span>")}}};return I.script=I["k:script"],o=o||{},t===o.semantic&&(o.semantic=!0),D(i)?(E=l.encode(C(i.firstChild).replace(/[\r\n\v\f\t ]+/," "),o),F(),E):(x(i),E=E.join(""),F(),""===E.replace(h,"").replace(f,"")?"":E)}},d(s,{Serializer:o})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/components.min",["editor/serializer.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.DropDownList,r=n.ui.editor.Dom,o=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),n.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",e.proxy(this._initSelectOverlay,this))),o.text(o.options.title),o.bind("open",function(){if(o.options.autoSize){var e,t=o.list;t.css({whiteSpace:"nowrap",width:"auto"}),e=t.width(),e?e+=20:e=o._listWidth,t.css("width",e+n.support.scrollbar()),o._listWidth=e}})},options:{name:"SelectBox",index:-1},_initSelectOverlay:function(){var t,i,r,o,a=this,s=a.value(),l=this.dataSource.view(),d="",u=n.htmlEncode;for(i=0;i<l.length;i++)t=l[i],d+="<option value='"+u(t.value)+"'",t.value==s&&(d+=" selected"),d+=">"+u(t.text)+"</option>";r=e("<select class='k-select-overlay'>"+d+"</select>"),o=e(this.element).closest(".k-widget"),o.next(".k-select-overlay").remove(),r.insertAfter(o),r.on("change",function(){a.value(this.value),a.trigger("change")})},value:function(e){var n=this,r=i.fn.value.call(n,e);return e===t?r:(i.fn.value.call(n)||n.text(n.options.title),t)},decorate:function(t){var n,i,o,a,s=this,l=s.dataSource,d=l.data();for(t&&s.list.css("background-color",r.getEffectiveBackground(e(t))),n=0;n<d.length;n++)i=d[n].tag||"span",o=d[n].className,a=r.inlineStyle(t,i,{className:o}),a=a.replace(/"/g,"'"),d[n].style=a+";display:inline-block";l.trigger("change")}});n.ui.plugin(o),n.ui.editor.SelectBox=o}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/range.min",["editor/components.min"],e)}(function(){!function(e){function t(e,t,n,i){var r,o,a,s;if(e==t)return i-n;for(r=t;r&&r.parentNode!=e;)r=r.parentNode;if(r)return y(r)-n;for(r=e;r&&r.parentNode!=t;)r=r.parentNode;if(r)return i-y(r)-1;for(o=w.commonAncestor(e,t),a=e;a&&a.parentNode!=o;)a=a.parentNode;for(a||(a=o),s=t;s&&s.parentNode!=o;)s=s.parentNode;return s||(s=o),a==s?0:y(s)-y(a)}function n(e,n){function i(e){try{return t(e.startContainer,e.endContainer,e.startOffset,e.endOffset)<0}catch(n){return!0}}i(e)&&(n?(e.commonAncestorContainer=e.endContainer=e.startContainer,e.endOffset=e.startOffset):(e.commonAncestorContainer=e.startContainer=e.endContainer,e.startOffset=e.endOffset),e.collapsed=!0)}function i(e){e.collapsed=e.startContainer==e.endContainer&&e.startOffset==e.endOffset;for(var t=e.startContainer;t&&t!=e.endContainer&&!w.isAncestorOf(t,e.endContainer);)t=t.parentNode;e.commonAncestorContainer=t}function r(e){var t=e.duplicate(),n=e.duplicate();return t.collapse(!0),n.collapse(!1),w.commonAncestor(e.parentElement(),t.parentElement(),n.parentElement())}function o(e,t,n){var i,r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],a=0,s=x(r),l=s?r:r.childNodes[o]||null,d=s?r.parentNode:r,u=t.ownerDocument,c=u.body.createTextRange();3!=r.nodeType&&4!=r.nodeType||(a=o),d||(d=u.body),"img"==d.nodeName.toLowerCase()?(c.moveToElementText(d),c.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",c)):(i=d.insertBefore(w.create(u,"a"),l),c.moveToElementText(i),w.remove(i),c[n?"moveStart":"moveEnd"]("character",a),c.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",c))}function a(e,t,n,i){var r,o,a,s,l,d,u,c=w.create(t.ownerDocument,"a"),h=e.duplicate(),p=i?"StartToStart":"StartToEnd",f=!1;c.innerHTML="\ufeff",h.collapse(i),o=h.parentElement(),w.isAncestorOrSelf(n,o)||(o=n);do f?o.insertBefore(c,c.previousSibling):(o.appendChild(c),f=!0),h.moveToElementText(c);while((r=h.compareEndPoints(p,e))>0&&c.previousSibling);a=c.nextSibling,r==-1&&x(a)?(h.setEndPoint(i?"EndToStart":"EndToEnd",e),w.remove(c),d=[a,h.text.length]):(s=!i&&c.previousSibling,l=i&&c.nextSibling,x(l)?d=[l,0]:x(s)?d=[s,s.length]:(u=y(c),d=o.nextSibling&&u==o.childNodes.length-1?[o.nextSibling,0]:[o,u]),w.remove(c)),t[i?"setStart":"setEnd"].apply(t,d)}var s,l,d,u,c,h,p,f,m,g=window.kendo,v=g.Class,_=e.extend,b=g.ui.editor,k=g.support.browser,w=b.Dom,y=w.findNodeIndex,x=w.isDataNode,C=w.findClosestAncestor,T=w.getNodeLength,S=w.normalize,D={selectionFromWindow:function(e){return"getSelection"in e?e.getSelection():new l(e.document)},selectionFromRange:function(e){var t=m.documentFromRange(e);return D.selectionFromDocument(t)},selectionFromDocument:function(e){return D.selectionFromWindow(w.windowFromDocument(e))}},F=v.extend({init:function(t){e.extend(this,{ownerDocument:t,startContainer:t,endContainer:t,commonAncestorContainer:t,startOffset:0,endOffset:0,collapsed:!0})},setStart:function(e,t){this.startContainer=e,this.startOffset=t,i(this),n(this,!0)},setEnd:function(e,t){this.endContainer=e,this.endOffset=t,i(this),n(this,!1)},setStartBefore:function(e){this.setStart(e.parentNode,y(e))},setStartAfter:function(e){this.setStart(e.parentNode,y(e)+1)},setEndBefore:function(e){this.setEnd(e.parentNode,y(e))},setEndAfter:function(e){this.setEnd(e.parentNode,y(e)+1)},selectNode:function(e){this.setStartBefore(e),this.setEndAfter(e)},selectNodeContents:function(e){this.setStart(e,0),this.setEnd(e,e[1===e.nodeType?"childNodes":"nodeValue"].length)},collapse:function(e){var t=this;e?t.setEnd(t.startContainer,t.startOffset):t.setStart(t.endContainer,t.endOffset)},deleteContents:function(){var e=this,t=e.cloneRange();e.startContainer!=e.commonAncestorContainer&&e.setStartAfter(C(e.commonAncestorContainer,e.startContainer)),e.collapse(!0),function n(e){for(;e.next();)e.hasPartialSubtree()?n(e.getSubtreeIterator()):e.remove()}(new s(t))},cloneContents:function(){var e=m.documentFromRange(this);return function t(n){for(var i,r=e.createDocumentFragment();i=n.next();)i=i.cloneNode(!n.hasPartialSubtree()),n.hasPartialSubtree()&&i.appendChild(t(n.getSubtreeIterator())),r.appendChild(i);return r}(new s(this))},extractContents:function(){var e,t=this,n=t.cloneRange();return t.startContainer!=t.commonAncestorContainer&&t.setStartAfter(C(t.commonAncestorContainer,t.startContainer)),t.collapse(!0),e=m.documentFromRange(t),function i(n){for(var r,o=e.createDocumentFragment();r=n.next();)n.hasPartialSubtree()?(r=r.cloneNode(!1),r.appendChild(i(n.getSubtreeIterator()))):n.remove(t.originalRange),o.appendChild(r);return o}(new s(n))},insertNode:function(e){var t=this;x(t.startContainer)?(t.startOffset!=t.startContainer.nodeValue.length&&w.splitDataNode(t.startContainer,t.startOffset),w.insertAfter(e,t.startContainer)):w.insertAt(t.startContainer,e,t.startOffset),t.setStart(t.startContainer,t.startOffset)},cloneRange:function(){return e.extend(new F(this.ownerDocument),{startContainer:this.startContainer,endContainer:this.endContainer,commonAncestorContainer:this.commonAncestorContainer,startOffset:this.startOffset,endOffset:this.endOffset,collapsed:this.collapsed,originalRange:this})},toString:function(){var e=this.startContainer.nodeName,t=this.endContainer.nodeName;return("#text"==e?this.startContainer.nodeValue:e)+"("+this.startOffset+") : "+("#text"==t?this.endContainer.nodeValue:t)+"("+this.endOffset+")"}});F.fromNode=function(e){return new F(e.ownerDocument)},s=v.extend({init:function(t){if(e.extend(this,{range:t,_current:null,_next:null,_end:null}),!t.collapsed){var n=t.commonAncestorContainer;this._next=t.startContainer!=n||x(t.startContainer)?C(n,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=n||x(t.endContainer)?C(n,t.endContainer).nextSibling:t.endContainer.childNodes[t.endOffset]}},hasNext:function(){return!!this._next},next:function(){var e=this,t=e._current=e._next;return e._next=e._current&&e._current.nextSibling!=e._end?e._current.nextSibling:null,x(e._current)&&(e.range.endContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(e.range.endOffset,t.length-e.range.endOffset)),e.range.startContainer==e._current&&(t=t.cloneNode(!0),t.deleteData(0,e.range.startOffset))),t},traverse:function(e){function t(){return i._current=i._next,i._next=i._current&&i._current.nextSibling!=i._end?i._current.nextSibling:null,i._current}for(var n,i=this;n=t();)i.hasPartialSubtree()?i.getSubtreeIterator().traverse(e):e(n);return n},remove:function(e){var t,n,i,r,o,a=this,s=a.range.startContainer==a._current,l=a.range.endContainer==a._current;x(a._current)&&(s||l)?(t=s?a.range.startOffset:0,n=l?a.range.endOffset:a._current.length,i=n-t,e&&(s||l)&&(a._current==e.startContainer&&t<=e.startOffset&&(e.startOffset-=i),a._current==e.endContainer&&n<=e.endOffset&&(e.endOffset-=i)),a._current.deleteData(t,i)):(r=a._current.parentNode,!e||a.range.startContainer!=r&&a.range.endContainer!=r||(o=y(a._current),r==e.startContainer&&o<=e.startOffset&&(e.startOffset-=1),r==e.endContainer&&o<e.endOffset&&(e.endOffset-=1)),w.remove(a._current))},hasPartialSubtree:function(){return!x(this._current)&&(w.isAncestorOrSelf(this._current,this.range.startContainer)||w.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){return new s(this.getSubRange())},getSubRange:function(){var e=this,t=e.range.cloneRange();return t.selectNodeContents(e._current),w.isAncestorOrSelf(e._current,e.range.startContainer)&&t.setStart(e.range.startContainer,e.range.startOffset),w.isAncestorOrSelf(e._current,e.range.endContainer)&&t.setEnd(e.range.endContainer,e.range.endOffset),t}}),l=v.extend({init:function(e){this.ownerDocument=e,this.rangeCount=1},addRange:function(e){var t=this.ownerDocument.body.createTextRange();o(t,e,!1),o(t,e,!0),t.select()},removeAllRanges:function(){var e=this.ownerDocument.selection;"None"!=e.type&&e.empty()},getRangeAt:function(){var e,t,n,i,o,s,l,d,u=new F(this.ownerDocument),c=this.ownerDocument.selection;try{if(e=c.createRange(),t=e.item?e.item(0):e.parentElement(),t.ownerDocument!=this.ownerDocument)return u}catch(h){return u}if("Control"==c.type)u.selectNode(e.item(0));else if(n=r(e),a(e,u,n,!0),a(e,u,n,!1),9==u.startContainer.nodeType&&u.setStart(u.endContainer,u.startOffset),9==u.endContainer.nodeType&&u.setEnd(u.startContainer,u.endOffset),0===e.compareEndPoints("StartToEnd",e)&&u.collapse(!1),i=u.startContainer,o=u.endContainer,s=this.ownerDocument.body,!(u.collapsed||0!==u.startOffset||u.endOffset!=T(u.endContainer)||i==o&&x(i)&&i.parentNode==s)){for(l=!1,d=!1;0===y(i)&&i==i.parentNode.firstChild&&i!=s;)i=i.parentNode,l=!0;for(;y(o)==T(o.parentNode)-1&&o==o.parentNode.lastChild&&o!=s;)o=o.parentNode,d=!0;i==s&&o==s&&l&&d&&(u.setStart(i,0),u.setEnd(o,T(s)))}return u}}),d=v.extend({init:function(e){this.enumerate=function(){function t(e){if(w.is(e,"img")||3==e.nodeType&&(!w.isEmptyspace(e)||"\ufeff"==e.nodeValue))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[];return new s(e).traverse(t),n}}}),u=s.extend({hasPartialSubtree:function(){var e=b.Immutables&&b.Immutables.immutable;return e&&!e(this._current)&&s.fn.hasPartialSubtree.call(this)},getSubtreeIterator:function(){return new u(this.getSubRange())}}),c=v.extend({init:function(e){this.enumerate=function(){function t(e){if(i&&!i(e))if(w.is(e,"img")||3==e.nodeType&&(!w.isEmptyspace(e)||"\ufeff"==e.nodeValue))n.push(e);else for(e=e.firstChild;e;)t(e),e=e.nextSibling}var n=[],i=b.Immutables&&b.Immutables.immutable;return new u(e).traverse(t),n}}}),h=v.extend({init:function(e,t,n){var i=this;i.range=e,i.rootNode=m.documentFromRange(e),i.body=t||i.getEditable(e),"body"!=w.name(i.body)&&(i.rootNode=i.body),i.startContainer=i.nodeToPath(e.startContainer),i.endContainer=i.nodeToPath(e.endContainer),i.startOffset=i.offset(e.startContainer,e.startOffset),i.endOffset=i.offset(e.endContainer,e.endOffset),i.immutables=n&&n.immutables,i.immutables&&(i.serializedImmutables=b.Immutables.removeImmutables(i.body)),i.html=i.body.innerHTML,i.immutables&&!i.serializedImmutables.empty&&b.Immutables.restoreImmutables(i.body,i.serializedImmutables)},index:function(e){for(var t,n=0,i=e.nodeType;e=e.previousSibling;)t=e.nodeType,3==t&&i==t||n++,i=t;return n},getEditable:function(e){for(var t=e.commonAncestorContainer;t&&(3==t.nodeType||t.attributes&&(!t.attributes.contentEditable||"false"==t.attributes.contentEditable.nodeValue.toLowerCase()));)t=t.parentNode;return t},restoreHtml:function(){var e=this;w.removeChildren(e.body),e.body.innerHTML=e.html,e.immutables&&!e.serializedImmutables.empty&&b.Immutables.restoreImmutables(e.body,e.serializedImmutables)},offset:function(e,t){if(3==e.nodeType)for(;(e=e.previousSibling)&&3==e.nodeType;)t+=e.nodeValue.length;return t},nodeToPath:function(e){for(var t=[];e!=this.rootNode;)t.push(this.index(e)),e=e.parentNode;return t},toRangePoint:function(e,t,n,i){for(var r=this.rootNode,o=n.length,a=i;o--;)r=r.childNodes[n[o]];for(;r&&3==r.nodeType&&r.nodeValue.length<a;)a-=r.nodeValue.length,r=r.nextSibling;r&&a>=0&&e[t?"setStart":"setEnd"](r,a)},toRange:function(){var e=this,t=e.range.cloneRange();return e.toRangePoint(t,!0,e.startContainer,e.startOffset),e.toRangePoint(t,!1,e.endContainer,e.endOffset),t}}),p=v.extend({init:function(){this.caret=null},addCaret:function(e){var t=this,n=t.caret=w.create(m.documentFromRange(e),"span",{className:"k-marker"});return e.insertNode(n),w.stripBomNode(n.previousSibling),w.stripBomNode(n.nextSibling),e.selectNode(n),n},removeCaret:function(e){var t,n,i,r,o=this,a=o.caret.previousSibling,s=0;a&&(s=x(a)?a.nodeValue.length:y(a)),t=o.caret.parentNode,n=a?y(a):0,w.remove(o.caret),S(t),i=t.childNodes[n],x(i)?e.setStart(i,s):i?(r=w.lastTextNode(i),r?e.setStart(r,r.nodeValue.length):e[a?"setStartAfter":"setStartBefore"](i)):(k.msie||t.innerHTML||(t.innerHTML='<br _moz_dirty="" />'),e.selectNodeContents(t)),e.collapse(!0)},add:function(e,t){var n,i,r=this,o=e.collapsed&&!m.isExpandable(e),a=m.documentFromRange(e);return t&&e.collapsed&&(r.addCaret(e),e=m.expand(e)),n=e.cloneRange(),n.collapse(!1),r.end=w.create(a,"span",{className:"k-marker"}),n.insertNode(r.end),n=e.cloneRange(),n.collapse(!0),r.start=r.end.cloneNode(!0),n.insertNode(r.start),r._removeDeadMarkers(r.start,r.end),o&&(i=a.createTextNode("\ufeff"),w.insertAfter(i.cloneNode(),r.start),w.insertBefore(i,r.end)),S(e.commonAncestorContainer),e.setStartBefore(r.start),e.setEndAfter(r.end),e},_removeDeadMarkers:function(e,t){e.previousSibling&&"\ufeff"==e.previousSibling.nodeValue&&w.remove(e.previousSibling),t.nextSibling&&"\ufeff"==t.nextSibling.nodeValue&&w.remove(t.nextSibling)},_normalizedIndex:function(e){for(var t=y(e),n=e;n.previousSibling;)3==n.nodeType&&3==n.previousSibling.nodeType&&t--,n=n.previousSibling;return t},remove:function(e){var t,n,i,r,o,a,s,l,d,u,c,h,p=this,f=p.start,m=p.end;for(S(e.commonAncestorContainer);!f.nextSibling&&f.parentNode;)f=f.parentNode;for(;!m.previousSibling&&m.parentNode;)m=m.parentNode;if(t=f.previousSibling&&3==f.previousSibling.nodeType&&f.nextSibling&&3==f.nextSibling.nodeType,n=m.previousSibling&&3==m.previousSibling.nodeType&&m.nextSibling&&3==m.nextSibling.nodeType,i=t&&n,f=f.nextSibling,m=m.previousSibling,r=f===m&&w.isBom(f),r&&f.length>1&&(f.nodeValue=f.nodeValue.charAt(0)),o=r,a=!1,f==p.end&&(a=!!p.start.previousSibling,f=m=p.start.previousSibling||p.end.nextSibling,o=!0),w.remove(p.start),w.remove(p.end),!f||!m)return e.selectNodeContents(e.commonAncestorContainer),void e.collapse(!0);if(s=o?x(f)?f.nodeValue.length:f.childNodes.length:0,l=x(m)?m.nodeValue.length:m.childNodes.length,3==f.nodeType)for(;f.previousSibling&&3==f.previousSibling.nodeType;)f=f.previousSibling,s+=f.nodeValue.length;if(3==m.nodeType)for(;m.previousSibling&&3==m.previousSibling.nodeType;)m=m.previousSibling,l+=m.nodeValue.length;d=f.parentNode,u=m.parentNode,c=this._normalizedIndex(f),h=this._normalizedIndex(m),S(d),3==f.nodeType&&(f=d.childNodes[c]),S(u),3==m.nodeType&&(m=u.childNodes[h]),o?(3==f.nodeType?e.setStart(f,s):e[a?"setStartAfter":"setStartBefore"](f),e.collapse(!0)):(3==f.nodeType?e.setStart(f,s):e.setStartBefore(f),3==m.nodeType?e.setEnd(m,l):e.setEndAfter(m)),p.caret&&p.removeCaret(e)}}),f=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,m={nodes:function(e){var t=m.textNodes(e);return t.length||(e.selectNodeContents(e.commonAncestorContainer),t=m.textNodes(e),t.length||(t=w.significantChildNodes(e.commonAncestorContainer))),t},textNodes:function(e){return new d(e).enumerate()},editableTextNodes:function(e){var t=[],n=b.Immutables&&b.Immutables.immutableParent;return n&&!n(e.commonAncestorContainer)&&(t=new c(e).enumerate()),t},documentFromRange:function(e){var t=e.startContainer;return 9==t.nodeType?t:t.ownerDocument},createRange:function(e){return k.msie&&k.version<9?new F(e):e.createRange()},selectRange:function(e){var t,n=m.image(e);n&&(e.setStartAfter(n),e.setEndAfter(n)),t=D.selectionFromRange(e),t.removeAllRanges(),t.addRange(e)},stringify:function(e){return g.format("{0}:{1} - {2}:{3}",w.name(e.startContainer),e.startOffset,w.name(e.endContainer),e.endOffset)},split:function(e,t,n){function i(i){var r,o=e.cloneRange();o.collapse(i),o[i?"setStartBefore":"setEndAfter"](t),r=o.extractContents(),n&&(r=w.trim(r)),w[i?"insertBefore":"insertAfter"](r,t)}i(!0),i(!1)},mapAll:function(t,n){var i=[];return new s(t).traverse(function(t){var r=n(t);r&&e.inArray(r,i)<0&&i.push(r)}),i},getAll:function(e,t){var n=t;return"string"==typeof t&&(t=function(e){return w.is(e,n)}),m.mapAll(e,function(e){if(t(e))return e})},getMarkers:function(e){return m.getAll(e,function(e){return"k-marker"==e.className})},image:function(e){var t=m.getAll(e,"img");if(1==t.length)return t[0]},isStartOf:function(e,t){var n,i,r;if(0!==e.startOffset)return!1;for(n=e.cloneRange();0===n.startOffset&&n.startContainer!=t;){for(i=w.findNodeIndex(n.startContainer),r=n.startContainer.parentNode;i>0&&r[i-1]&&w.insignificant(r[i-1]);)i--;n.setStart(r,i)}return 0===n.startOffset&&n.startContainer==t},isEndOf:function(e,t){function n(e){w.insignificant(e)||w.isDataNode(e)&&/^[\ufeff]*$/.test(e.nodeValue)||r.push(e)}var i,r,o=e.cloneRange();return o.collapse(!1),i=o.startContainer,w.isDataNode(i)&&o.startOffset==w.getNodeLength(i)&&(o.setStart(i.parentNode,w.findNodeIndex(i)+1),o.collapse(!0)),o.setEnd(t,w.getNodeLength(t)),r=[],new s(o).traverse(n),!r.length},wrapSelectedElements:function(e){function t(e,t){var n,i=w.getNodeLength(t);if(e==i)return!0;for(n=e;n<i;n++)if(!w.insignificant(t.childNodes[n]))return!1;return!0}for(var n=w.editableParent(e.startContainer),i=w.editableParent(e.endContainer);0===e.startOffset&&e.startContainer!=n;)e.setStart(e.startContainer.parentNode,w.findNodeIndex(e.startContainer));for(;t(e.endOffset,e.endContainer)&&e.endContainer!=i;)e.setEnd(e.endContainer.parentNode,w.findNodeIndex(e.endContainer)+1);return e},expand:function(e){var t,n,i,r,o=e.cloneRange(),a=o.startContainer.childNodes[0===o.startOffset?0:o.startOffset-1],s=o.endContainer.childNodes[o.endOffset];return x(a)&&x(s)?(t=a.nodeValue,n=s.nodeValue,t&&n?(i=t.split("").reverse().join("").search(f),r=n.search(f),i&&r?(r=r==-1?n.length:r,i=i==-1?0:t.length-i,o.setStart(a,i),o.setEnd(s,r),o):o):o):o},isExpandable:function(e){var t,n,i,r,o,a,s=e.startContainer,l=m.documentFromRange(e);return s!=l&&s!=l.body&&(t=e.cloneRange(),!!(n=s.nodeValue)&&(i=n.substring(0,t.startOffset),r=n.substring(t.startOffset),o=0,a=0,i&&(o=i.split("").reverse().join("").search(f)),r&&(a=r.search(f)),o&&a))}},_(b,{SelectionUtils:D,W3CRange:F,RangeIterator:s,W3CSelection:l,RangeEnumerator:d,RestorePoint:h,Marker:p,RangeUtils:m})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/immutables.min",["editor/range.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.Class,r=n.ui.editor,o=r.Dom,a=n.template,s=r.RangeUtils,l=["ul","ol","tbody","thead","table"],d=["bold","italic","underline","strikethrough","superscript","subscript","forecolor","backcolor","fontname","fontsize","createlink","unlink","autolink","addcolumnleft","addcolumnright","addrowabove","addrowbelow","deleterow","deletecolumn","mergecells","formatting","cleanformatting"],u="k-immutable",c="["+u+"]",h="[contenteditable='false']",p=function(t){return e(t).is("body,.k-editor")},f=function(e){return e.getAttribute&&"false"==e.getAttribute("contenteditable")},m=function(e){return o.closestBy(e,f,p)},g=function(e){var t=m(e.startContainer),n=m(e.endContainer);(t||n)&&(t&&e.setStartBefore(t),n&&e.setEndAfter(n))},v=function(e){if(m(e.commonAncestorContainer))return!0;if(m(e.startContainer)||m(e.endContainer)){var t=s.editableTextNodes(e);if(0===t.length)return!0}return!1},_=function(e){var t,n="",i="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";for(t=e||10;t>0;--t)n+=i.charAt(Math.round(Math.random()*(i.length-1)));return n},b=function(t){var n,i,r,a={empty:!0};return e(t).find(h).each(function(t,s){n=o.name(s),i=_(),r="<"+n+" "+u+"='"+i+"'></"+n+">",a[i]={node:s,style:e(s).attr("style")},a.empty=!1,e(s).replaceWith(r)}),a},k=function(t,n){var i,r;e(t).find(c).each(function(t,o){i=o.getAttribute(u),r=n[i],e(o).replaceWith(r.node),r.style!=e(r.node).attr("style")&&e(r.node).removeAttr("style").attr("style",r.style)})},w=function(e){var t=n.keys;return e===t.BACKSPACE||e==t.DELETE},y=function(e){var n=e?e.options:t;n&&n.finder&&n.finder._initOptions({immutables:!0})},x=i.extend({init:function(t){this.editor=t,this.serializedImmutables={},this.options=e.extend({},t&&t.options&&t.options.immutables);var n=t.toolbar.tools;y(n.justifyLeft),y(n.justifyCenter),y(n.justifyRight),y(n.justifyFull)},serialize:function(e){var t,n=this._toHtml(e);return n.indexOf(u)===-1?(t=this.randomId(),n=n.replace(/>/," "+u+'="'+t+'">')):t=n.match(/k-immutable\s*=\s*['"](.*)['"]/)[1],this.serializedImmutables[t]=e,n},_toHtml:function(e){var t,n=this.options.serialization,i=typeof n;switch(i){case"string":return a(n)(e);case"function":return n(e);default:return t=o.name(e),"<"+t+"></"+t+">"}},deserialize:function(t){var i=this,r=this.options.deserialization;e(c,t).each(function(){var t=this.getAttribute(u),o=i.serializedImmutables[t];n.isFunction(r)&&r(this,o),e(this).replaceWith(o)}),i.serializedImmutables={}},randomId:function(e){return _(e)},keydown:function(e,t){var n=w(e.keyCode),i=n&&this._cancelDeleting(e,t)||!n&&this._cancelTyping(e,t);if(i)return e.preventDefault(),!0},_cancelTyping:function(e,t){var n=this.editor,i=n.keyboard;return t.collapsed&&!i.typingInProgress&&i.isTypingKey(e)&&v(t)},_cancelDeleting:function(e,t){var i,r,a,s,d=n.keys,u=e.keyCode===d.BACKSPACE,c=e.keyCode==d.DELETE;if(!u&&!c)return!1;if(i=!1,t.collapsed){if(v(t))return!0;if(r=this.nextImmutable(t,c),r&&u&&(a=o.closest(t.commonAncestorContainer,"li"),a&&(s=o.closest(r,"li"),s&&s!==a)))return i;if(r&&!o.tableCell(r)){if(o.parentOfType(r,l)===o.parentOfType(t.commonAncestorContainer,l)){for(;r&&1==r.parentNode.childNodes.length;)r=r.parentNode;if(o.tableCell(r))return i;this._removeImmutable(r,t)}i=!0}}return i},nextImmutable:function(e,t){var n,i=e.commonAncestorContainer;if(o.isBom(i)||t&&s.isEndOf(e,i)||!t&&s.isStartOf(e,i)){if(n=this._nextNode(i,t),n&&o.isBlock(n)&&!m(n))for(;n&&n.children&&n.children[t?0:n.children.length-1];)n=n.children[t?0:n.children.length-1];return m(n)}},_removeImmutable:function(e,t){var n=this.editor,i=new r.RestorePoint(t,n.body);o.remove(e),r._finishUpdate(n,i)},_nextNode:function(e,t){for(var n,i=t?"nextSibling":"previousSibling",r=e;r&&!n;)n=r[i],n&&o.isDataNode(n)&&/^\s|[\ufeff]$/.test(n.nodeValue)&&(r=n,n=r[i]),n||(r=r.parentNode);return n}});x.immutable=f,x.immutableParent=m,x.expandImmutablesIn=g,x.immutablesContext=v,x.toolsToBeUpdated=d,x.removeImmutables=b,x.restoreImmutables=k,r.Immutables=x}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/command.min",["editor/immutables.min"],e)}(function(){!function(e){function t(e,t){var n=e.selectionRestorePoint=new a(e.getRange(),e.body),i=new u(t,n);return i.editor=e,e.undoRedoStack.push(i),n}var n=window.kendo,i=n.Class,r=n.ui.editor,o=r.Dom,a=r.RestorePoint,s=r.Marker,l=e.extend,d=i.extend({init:function(e){this.options=e,this.restorePoint=new a(e.range,e.body,{immutables:e.immutables}),this.marker=new s,this.formatter=e.formatter},getRange:function(){return this.restorePoint.toRange()},lockRange:function(e){return this.marker.add(this.getRange(),e)},releaseRange:function(e){this.marker.remove(e),this.editor.selectRange(e)},undo:function(){var e=this.restorePoint;e.restoreHtml(),this.editor.selectRange(e.toRange())},redo:function(){this.exec()},createDialog:function(t,i){var r=this.editor;return e(t).appendTo(document.body).kendoWindow(l({},r.options.dialogOptions,i)).closest(".k-window").toggleClass("k-rtl",n.support.isRtl(r.wrapper)).end()},exec:function(){var e=this.lockRange(!0);this.formatter.editor=this.editor,this.formatter.toggle(e),this.releaseRange(e)},immutables:function(){return this.editor&&this.editor.options.immutables},expandImmutablesIn:function(e){this.immutables()&&(n.ui.editor.Immutables.expandImmutablesIn(e),this.restorePoint=new a(e,this.editor.body))}}),u=i.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){o.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){o.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}});l(r,{_finishUpdate:t,Command:d,GenericCommand:u})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/toolbar.min",["editor/range.min"],e)}(function(){!function(e,t){var n,i=window.kendo,r=i.ui,o=r.editor,a=r.Widget,s=e.extend,l=e.proxy,d=i.keys,u=".kendoEditor",c=o.EditorUtils,h=o.ToolTemplate,p=o.Tool,f=i._outerWidth,m=i._outerHeight,g="overflowAnchor",v=".k-tool-group:visible a.k-tool:not(.k-state-disabled),.k-tool.k-overflow-anchor:visible,.k-tool-group:visible .k-widget.k-colorpicker,.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdown,.k-tool-group:visible .k-combobox .k-input",_={"k-i-sup-script":"superscript","k-i-sub-script":"subscript","k-i-align-left":"justifyLeft","k-i-align-center":"justifyCenter","k-i-align-right":"justifyRight","k-i-align-justify":"justifyFull","k-i-list-unordered":"insertUnorderedList","k-i-list-ordered":"insertOrderedList","k-i-login":"import","k-i-indent-increase":"indent","k-i-indent-decrease":"outdent","k-i-link-horizontal":"createLink","k-i-unlink-horizontal":"unlink","k-i-image":"insertImage","k-i-file-add":"insertFile","k-i-html":"viewHtml","k-i-foreground-color":"foreColor","k-i-paint":"backColor","k-i-table-insert":"createTable","k-i-table-column-insert-left":"addColumnLeft","k-i-table-column-insert-right":"addColumnRight","k-i-table-row-insert-above":"addRowAbove","k-i-table-row-insert-below":"addRowBelow","k-i-table-row-delete":"deleteRow","k-i-table-column-delete":"deleteColumn","k-i-table-properties":"tableWizard","k-i-table-wizard":"tableWizardInsert","k-i-clear-css":"cleanFormatting"},b=p.extend({initialize:function(t,n){t.attr({unselectable:"on"});var i=n.editor.toolbar;t.attr("aria-controls",n.editor.element.attr("id")).on("click",e.proxy(function(){this.overflowPopup.toggle()},i))},options:{name:g},command:e.noop,update:e.noop,destroy:e.noop});c.registerTool(g,new b({key:"",ctrl:!0,template:new h({template:c.overflowAnchorTemplate})})),n=a.extend({init:function(e,t){var n=this;t=s({},t,{name:"EditorToolbar"}),a.fn.init.call(n,e,t),t.popup&&n._initPopup(),t.resizable&&t.resizable.toolbar&&(n._resizeHandler=i.onResize(function(){n.resize()}),n.element.addClass("k-toolbar-resizable"))},events:["execute"],groups:{basic:["bold","italic","underline","strikethrough"],scripts:["subscript","superscript"],alignment:["justifyLeft","justifyCenter","justifyRight","justifyFull"],links:["insertImage","insertFile","createLink","unlink"],lists:["insertUnorderedList","insertOrderedList","indent","outdent"],tables:["createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"],advanced:["viewHtml","cleanFormatting","print","pdf","exportAs","import"],fonts:["fontName","fontSize"],colors:["foreColor","backColor"]},overflowFlaseTools:["formatting","fontName","fontSize","foreColor","backColor","insertHtml"],_initPopup:function(){var t=this;this.window=e(this.element).wrap("<div class='editorToolbarWindow k-header' />").parent().prepend("<button class='k-button k-bare k-editortoolbar-dragHandle'><span class='k-icon k-i-handler-drag' /></button>").kendoWindow({title:!1,resizable:!1,draggable:{dragHandle:".k-editortoolbar-dragHandle"},animation:{open:{effects:"fade:in"},close:{effects:"fade:out"}},minHeight:42,visible:!1,autoFocus:!1,actions:[],dragend:function(){this._moved=!0}}).on("mousedown",function(n){e(n.target).is(".k-icon")||(t.preventPopupHide=!0)}).on("focusout",function(){t.options.editor.element.focusout()}).data("kendoWindow")},_toggleOverflowStyles:function(e,t){e.find("li").toggleClass("k-item k-state-default",t).find(".k-tool:not(.k-state-disabled),.k-overflow-button").toggleClass("k-overflow-button k-button",t)},_initOverflowPopup:function(t){var n=this,i="<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>";n.overflowPopup=e(i).appendTo("body").kendoPopup({anchor:t,origin:"bottom right",position:"top right",copyAnchorStyles:!1,open:function(e){this.element.is(":empty")&&e.preventDefault(),n._toggleOverflowStyles(this.element,!0),t.attr("aria-expanded",!0)},close:function(){t.attr("aria-expanded",!1);
},activate:l(n.focusOverflowPopup,n)}).data("kendoPopup")},items:function(){var e,t,n=this.options.resizable&&this.options.resizable.toolbar;return t=this.element.children().find("> *, select"),n&&(e=this.overflowPopup,t=t.add(e.element.children().find("> *"))),t},focused:function(){return this.element.find(".k-state-focused").length>0||this.preventPopupHide||this.overflowPopup&&this.overflowPopup.visible()},toolById:function(e){var t,n=this.tools;for(t in n)if(t.toLowerCase()==e)return n[t]},toolGroupFor:function(t){var n,i=this.groups;if(this.isCustomTool(t))return"custom";for(n in i)if(e.inArray(t,i[n])>=0)return n},bindTo:function(t){var n=this,i=n.window;n._editor&&n._editor.unbind("select",l(n.resize,n)),n._editor=t,n.options.resizable&&n.options.resizable.toolbar&&t.options.tools.push(g),n.tools=n.expandTools(t.options.tools),n.render(),n.element.find(".k-combobox .k-input").keydown(function(t){var n=e(this).closest(".k-combobox").data("kendoComboBox"),i=t.keyCode;i==d.RIGHT||i==d.LEFT?n.close():i==d.DOWN&&(n.dropDown.isOpened()||(t.stopImmediatePropagation(),n.open()))}),n._attachEvents(),n.items().each(function(){var i,r=n._toolName(this),o="moreVertical"!==r?n.tools[r]:n.tools.overflowAnchor,a=o&&o.options,s=t.options.messages,l=a&&a.tooltip||s[r],d=e(this);o&&o.initialize&&("fontSize"!=r&&"fontName"!=r||(i=s[r+"Inherit"],d.find("input").val(i).end().find("span.k-input").text(i).end()),o.initialize(d,{title:n._appendShortcutSequence(l,o),editor:n._editor}),d.closest(".k-widget",n.element).addClass("k-editor-widget"),d.closest(".k-colorpicker",n.element).next(".k-colorpicker").addClass("k-editor-widget"))}),t.bind("select",l(n.resize,n)),n.update(),i&&i.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,n,r=this,o=r.window,a=r.options.editor,s=i.support.browser;o&&(e=o.wrapper,t=a.element,e.is(":visible")&&r.window.options.visible||(e[0].style.width||e.width(f(t)-parseInt(e.css("border-left-width"),10)-parseInt(e.css("border-right-width"),10)),o._moved||(n=t.offset(),e.css({top:Math.max(0,parseInt(n.top,10)-m(e)-parseInt(r.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(n.left,10))})),(s.msie||s.edge)&&r._overlaps(t)?setTimeout(function(){o.open()},0):o.open()))},_overlaps:function(e){var t=this.window.wrapper,n=t.offset(),i=n.left,r=n.top,o=e.offset(),a=o.left,s=o.top;return!(a+e.width()<i||a>i+t.width()||s+e.height()<r||s>r+t.height())},hide:function(){this.window&&this.window.close()},focus:function(){var e="tabIndex",t=this.element,n=this._editor.element.attr(e);t.attr(e,n||0).focus().find(v).first().focus(),n||0===n||t.removeAttr(e)},focusOverflowPopup:function(){var e="tabIndex",t=this.overflowPopup.element,n=this._editor.element.attr(e);t.closest(".k-animation-container").addClass("k-overflow-wrapper"),t.attr(e,n||0).find(v).first().focus(),n||0===n||t.removeAttr(e)},_appendShortcutSequence:function(e,t){if(!t.key)return e;var n=e+" (";return t.ctrl&&(n+="Ctrl + "),t.shift&&(n+="Shift + "),t.alt&&(n+="Alt + "),n+=t.key+")"},_nativeTools:["insertLineBreak","insertParagraph","redo","undo","autoLink"],tools:{},isCustomTool:function(e){return!(e in i.ui.Editor.defaultTools)},expandTools:function(t){var n,r,a,l,d=this._nativeTools,u=i.deepExtend({},i.ui.Editor.defaultTools),c={};for(r=0;r<t.length;r++)n=t[r],l=n.name,e.isPlainObject(n)?l&&u[l]?(c[l]=s({},u[l]),s(c[l].options,n)):(a=s({cssClass:"k-i-gear",type:"button",title:""},n),a.name||(a.name="custom"),a.cssClass="k-"+a.name,a.template||"button"!=a.type||(a.template=o.EditorUtils.buttonTemplate,a.title=a.title||a.tooltip),c[l]={options:a}):u[n]&&(c[n]=u[n]);for(r=0;r<d.length;r++)c[d[r]]||(c[d[r]]=u[d[r]]);return c},render:function(){function t(t){var n;return t.getHtml?n=t.getHtml():(e.isFunction(t)||(t=i.template(t)),n=t(o)),e.trim(n)}function n(){h.children().length&&(y&&(h.data("position",w),w++),h.appendTo(_))}function r(t){t!==g?(h=e("<li class='k-tool-group' role='presentation' />"),h.data("overflow",e.inArray(t,x)===-1)):h=e("<li class='k-overflow-tools' />")}var o,a,s,d,u,c,h,p,f=this,m=f.tools,v=f._editor.element,_=f.element.empty(),b=f._editor.options.tools,k=i.support.browser,w=0,y=f.options.resizable&&f.options.resizable.toolbar,x=this.overflowFlaseTools;for(_.empty(),b.length&&(d=b[0].name||b[0]),r(d,x),p=0;p<b.length;p++)d=b[p].name||b[p],o=m[d]&&m[d].options,!o&&e.isPlainObject(d)&&(o=d),a=o&&o.template,"break"==d&&(n(),e("<li class='k-row-break' />").appendTo(f.element),r(d,x)),a&&(c=f.toolGroupFor(d),u==c&&d!=g||(n(),r(d,x),u=c),d==g&&(a.options.title=f.options.messages.overflowAnchor),a=t(a),s=e(a).appendTo(h),"custom"==c&&(n(),r(d,x)),o.exec&&s.hasClass("k-tool")&&s.click(l(o.exec,v[0])));n(),e(f.element).children(":has(> .k-tool)").addClass("k-button-group"),f.options.popup&&k.msie&&k.version<9&&f.window.wrapper.find("*").attr("unselectable","on"),f.updateGroups(),y&&f._initOverflowPopup(f.element.find(".k-overflow-anchor")),f.angular("compile",function(){return{elements:f.element}})},updateGroups:function(){e(this.element).children().each(function(){e(this).children().filter(function(){return!e(this).hasClass("k-state-disabled")}).removeClass("k-group-end").first().addClass("k-group-start").end().last().addClass("k-group-end").end()})},decorateFrom:function(t){this.items().filter(".k-decorated").each(function(){var n=e(this).data("kendoSelectBox");n&&n.decorate(t)})},destroy:function(){a.fn.destroy.call(this);var e,t=this.tools;for(e in t)t[e].destroy&&t[e].destroy();this.window&&this.window.destroy(),this._resizeHandler&&i.unbindResize(this._resizeHandler),this.overflowPopup&&this.overflowPopup.destroy()},_attachEvents:function(){var t=this,n=t.overflowPopup?t.overflowPopup.element:e([]);t.attachToolsEvents(t.element.add(n))},attachToolsEvents:function(t){var n=this,r="[role=button].k-tool",o=r+":not(.k-state-disabled)",a=r+".k-state-disabled",s=".k-dropdown",l=".k-colorpicker",c=[r,s,l].join(",");t.off(u).on("mouseenter"+u,o,function(){e(this).addClass("k-state-hover")}).on("mouseleave"+u,o,function(){e(this).removeClass("k-state-hover")}).on("mousedown"+u,c,function(e){e.preventDefault()}).on("keydown"+u,v,function(t){function r(e,t,n){var i=t.find(v),r=i.index(l)+e;return n&&(r=Math.max(0,Math.min(i.length-1,r))),i[r]}var o,a,s,l=this,u=n.options.resizable&&n.options.resizable.toolbar,c=i.support.isRtl(n.element)?-1:1,h=t.keyCode;h==d.RIGHT||h==d.LEFT?a=e(l).is(".k-dropdown")?e(l):r(h==d.RIGHT?1*c:-1*c,n.element,!0):!u||h!=d.UP&&h!=d.DOWN?h==d.HOME?(a=n.element.find(v)[0],t.preventDefault()):h==d.END?(o=n.element.find(v).filter(function(){return"hidden"!==e(this).css("visibility")}),a=o[o.length-1],t.preventDefault()):h==d.ESC?(n.overflowPopup&&n.overflowPopup.visible()&&n.overflowPopup.close(),a=n._editor):h!=d.TAB||t.ctrlKey||t.altKey||(s=u&&e(l.parentElement).hasClass("k-overflow-tool-group")?n.overflowPopup.element:n.element,t.shiftKey?a=r(-1,s):(a=r(1,s),a&&"hidden"!==e(a).closest(".k-overflow-tools").css("visibility")||(a=n._editor))):a=r(h==d.DOWN?1:-1,n.overflowPopup.element,!0),a&&(t.preventDefault(),a.focus()),h!==d.ENTER&&h!==d.SPACEBAR||!e(l).is("a")||e(l).attr("href")||n._executeToolCommand(l,t)}).on("click"+u,o,function(e){n._executeToolCommand(this,e)}).on("click"+u,a,function(e){e.preventDefault()})},_executeToolCommand:function(t,n){var i=this,r=e(t);n.preventDefault(),n.stopPropagation(),r.removeClass("k-state-hover"),r.is("[data-popup]")||i._editor.exec(i._toolName(t))},_toolName:function(t){var n,r,o;if(t)return n=t.className,/k-tool\b/i.test(n)&&(n=t.firstChild.className),r=e.grep(n.split(" "),function(e){return!/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)}),r[0]?(o=r[0],_[o]&&(o=_[o]),o.indexOf("k-i-")>=0?i.toCamelCase(o.substring(o.indexOf("k-i-")+4)):o.substring(o.lastIndexOf("-")+1)):"custom"},refreshTools:function(){var t=this,n=t._editor,i=n.getRange(),r=o.RangeUtils.textNodes(i),a=n.options.immutables,s=t._immutablesContext(i);r=o.Dom.filterBy(r,o.Dom.htmlIndentSpace,!0),r.length||(r=[i.startContainer]),t.items().each(function(){var n,i=t.tools[t._toolName(this)];i&&(n=e(this),i.update&&i.update(n,r),a&&t._updateImmutablesState(i,n,s))}),this.update()},_immutablesContext:function(e){if(this._editor.options.immutables)return e.collapsed?o.Immutables.immutablesContext(e):0===o.RangeUtils.editableTextNodes(e).length},_updateImmutablesState:function(n,i,r){var a,s,l,d,u,c=n.name,h=i,p=n.options.trackImmutables;if(p===t&&(p=e.inArray(c,o.Immutables.toolsToBeUpdated)>-1),p){if(a=r?"none":"",!i.is(".k-tool")){s=i.data();for(l in s)if(l.match(/^kendo[A-Z][a-zA-Z]*/)){d=s[l],h=d.wrapper;break}}h.css("display",a),u=h.closest("li"),0===u.children(":visible").length&&u.css("display",a)}},update:function(){this.updateGroups()},_resize:function(e){var t=e.width,n=this.options.resizable&&this.options.resizable.toolbar,i=this.overflowPopup;this.refreshTools(),n&&(i.visible()&&i.close(!0),this._refreshWidths(),this._shrink(t),this._stretch(t),this._toggleOverflowStyles(this.element,!1),this._toggleOverflowStyles(this.overflowPopup.element,!0),this.element.children("li.k-overflow-tools").css("visibility",i.element.is(":empty")?"hidden":"visible"))},_refreshWidths:function(){this.element.children("li").each(function(t,n){var i=e(n);i.data("outerWidth",f(i,!0))})},_shrink:function(e){var t,n,i;if(e<this._groupsWidth())for(n=this._visibleGroups().filter(":not(.k-overflow-tools)"),i=n.length-1;i>=0&&(t=n.eq(i),!(e>this._groupsWidth()));i--)this._hideGroup(t)},_stretch:function(e){var t,n,i;if(e>this._groupsWidth())for(n=this._hiddenGroups(),i=0;i<n.length&&(t=n.eq(i),!(e<this._groupsWidth())&&this._showGroup(t,e));i++);},_hiddenGroups:function(){var t=this.overflowPopup,n=this.element.children("li.k-tool-group").filter(":hidden");return n=n.add(t.element.children("li")),n.sort(function(t,n){return e(t).data("position")>e(n).data("position")?1:-1}),n},_visibleGroups:function(){return this.element.children("li.k-tool-group, li.k-overflow-tools").filter(":visible")},_groupsWidth:function(){var t=0;return this._visibleGroups().each(function(){t+=e(this).data("outerWidth")}),Math.ceil(t)},_hideGroup:function(e){if(e.data("overflow")){var t=this.overflowPopup;e.detach().prependTo(t.element).addClass("k-overflow-tool-group")}else e.hide()},_showGroup:function(t,n){var i,r;return!!(t.length&&n>this._groupsWidth()+t.data("outerWidth"))&&(t.hasClass("k-overflow-tool-group")?(i=t.data("position"),0===i?t.detach().prependTo(this.element):(r=this.element.children().filter(function(t,n){return e(n).data("position")===i-1}),t.detach().insertAfter(r)),t.removeClass("k-overflow-tool-group")):t.show(),!0)}}),e.extend(o,{Toolbar:n})}(window.jQuery||window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/viewhtml.min",["editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Command,s=r.Tool,l=r.ToolTemplate,d=a.extend({init:function(e){var t=this;t.options=e,a.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){function i(e){l.deserialization.immutables=s.immutables,s.value(c.find(h).val()),l.deserialization.immutables=t,r(e),a.change&&a.change(),s.trigger("change")}function r(e){e.preventDefault(),c.data("kendoWindow").destroy(),s.immutables&&(s.immutables.serializedImmutables={}),s.focus()}var o,a=this,s=a.editor,l=s.options,u=s.options.messages,c=e(n.template(d.template)(u)).appendTo(document.body),h=".k-editor-textarea";l.serialization.immutables=s.immutables,o=d.indent(s.value()),l.serialization.immutables=t,this.createDialog(c,{title:u.viewHtml,close:r,visible:!1}).find(h).val(o).end().find(".k-dialog-update").click(i).end().find(".k-dialog-close").click(r).end().data("kendoWindow").center().open(),c.find(h).focus()}});i(d,{template:"<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><div class='k-edit-form-container'></div><textarea class='k-editor-textarea k-input'></textarea><div class='k-edit-buttons k-state-default'><button class='k-dialog-update k-button k-primary'>#: dialogUpdate #</button><button class='k-dialog-close k-button'>#: dialogCancel #</button></div></div></div>",indent:function(e){return e.replace(/<\/(p|li|ul|ol|h[1-6]|table|tr|td|th)>/gi,"</$1>\n").replace(/<(ul|ol)([^>]*)><li/gi,"<$1$2>\n<li").replace(/<br \/>/gi,"<br />\n").replace(/\n$/,"")}}),n.ui.editor.ViewHtmlCommand=d,r.EditorUtils.registerTool("viewHtml",new s({command:d,template:new l({template:o.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/format.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Tool,o=i.Command,a=i.EditorUtils,s=o.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&a.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),o.fn.init.call(this,e)}}),l=r.extend({init:function(e){r.fn.init.call(this,e)},command:function(e){var t=this;return new s(n(e,{formatter:t.options.formatter}))},update:function(e,t){var n=this.options.finder.isFormatted(t);e.toggleClass("k-state-selected",n),e.attr("aria-pressed",n)}});e.extend(i,{FormatCommand:s,FormatTool:l})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/inlineformat.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=t.ui.Editor.fn.options.formats,o=i.EditorUtils,a=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,u=i.RangeUtils,c=e.extend,h=i.EditorUtils.registerTool,p=i.EditorUtils.registerFormat,f=function(e){e.preventDefault()},m="mousedown.kendoEditor",g="keydown.kendoEditor",v="k-marker",_=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,r=0,o=e.parentNode;for(t=o.firstChild;t;t=t.nextSibling)t!=e&&(t.className==v?r++:3==t.nodeType?n++:i++);return r>1&&o.firstChild.className==v&&o.lastChild.className==v?0:i+n},findSuitable:function(e,t){var n,i;if(!t&&this.numberOfSiblings(e)>0)return null;for(n=e.parentNode,i=this.format[0].tags;!d.ofType(n,i);){if(this.numberOfSiblings(n)>0)return null;n=n.parentNode}return n},findFormat:function(e){var t,n,i,r,o,a=this.format,s=d.attrEquals;for(t=0,n=a.length;t<n;t++){if(i=e,r=a[t].tags,o=a[t].attr,i&&d.ofType(i,r)&&s(i,o))return i;for(;i;)if(i=d.parentOfType(i,r),i&&s(i,o))return i}return null},isFormatted:function(e){var t,n;for(t=0,n=e.length;t<n;t++)if(this.findFormat(e[t]))return!0;return!1}}),b=n.extend({init:function(e,t){this.finder=new _(e),this.attributes=c({},e[0].attr,t),this.tag=e[0].tags[0]},wrap:function(e){return d.wrap(e,d.create(e.ownerDocument,this.tag,this.attributes))},activate:function(e,t){this.finder.isFormatted(t)?(this.split(e),this.remove(t)):this.apply(t)},toggle:function(e){var t=this.immutables()?u.editableTextNodes:u.textNodes,n=t(e);n.length>0&&this.activate(e,n)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,r,o=[],a=this.attributes,s=a?a.style||{}:{};for(t=0,n=e.length;t<n;t++){if(i=e[t],r=this.finder.findSuitable(i))d.is(r,"font")&&(s.color&&r.removeAttribute("color"),s.fontName&&r.removeAttribute("face"),s.fontSize&&r.removeAttribute("size")),d.attr(r,a);else{for(;!d.isBlock(i.parentNode)&&1==i.parentNode.childNodes.length&&"true"!==i.parentNode.contentEditable;)i=i.parentNode;r=this.wrap(i)}o.push(r)}this.consolidate(o)},remove:function(e){var t,n,i;for(t=0,n=e.length;t<n;t++)i=this.finder.findFormat(e[t]),i&&(this.attributes&&this.attributes.style?(d.unstyle(i,this.attributes.style),i.style.cssText||i.attributes["class"]||d.unwrap(i)):d.unwrap(i))},split:function(e){var t,n,i=u.textNodes(e),r=i.length;if(r>0)for(t=0;t<r;t++)n=this.finder.findFormat(i[t]),n&&u.split(e,n,!0)},consolidate:function(e){for(var t,n;e.length>1;)if(t=e.pop(),n=e[e.length-1],t.previousSibling&&t.previousSibling.className==v&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),k=_.extend({init:function(e,t){this.format=e,this.greedyProperty=t,_.fn.init.call(this,e)},getInlineCssValue:function(t){var n,i,r,o,a,s,l,u,c,h,p,f,m=t.attributes,g=e.trim;if(m)for(n=0,i=m.length;n<i;n++)if(r=m[n],o=r.nodeName,a=r.nodeValue,r.specified&&"style"==o)for(s=g(a||t.style.cssText).split(";"),u=0,c=s.length;u<c;u++)if(l=s[u],l.length){if(h=l.split(":"),p=g(h[0].toLowerCase()),f=g(h[1]),p!=this.greedyProperty)continue;return p.indexOf("color")>=0?d.toHex(f):f}},getFormatInner:function(t){var n,i,r,o=e(d.isDataNode(t)?t.parentNode:t),a=o.parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=a.length;n<i;n++)if(r="className"==this.greedyProperty?a[n].className:this.getInlineCssValue(a[n]))return r;return"inherit"},getFormat:function(e){var t,n,i=this.getFormatInner(e[0]);for(t=1,n=e.length;t<n;t++)if(i!=this.getFormatInner(e[t]))return"";return i},isFormatted:function(e){return""!==this.getFormat(e)}}),w=b.extend({init:function(e,n,i){b.fn.init.call(this,e,n),this.values=n,this.finder=new k(e,i),i&&(this.greedyProperty=t.toCamelCase(i))},activate:function(e,t){var n=this.greedyProperty,i="apply";this.split(e),n&&"inherit"==this.values.style[n]&&(i="remove"),this[i](t)}}),y=l.extend({init:function(e){l.fn.init.call(this,c(e,{finder:new _(e.format),formatter:function(){return new b(e.format)}}))}}),x=a.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),C=x.extend({init:function(e){a.fn.init.call(this,e),this.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span","font"]}],this.finder=new k(this.format,e.cssAttr)},command:function(e){var t=this.options,n=this.format,r={};return new i.FormatCommand(c(e,{formatter:function(){return r[t.domAttr]=e.value,new w(n,{style:r},t.cssAttr)}}))},initialize:function(e,n){var i,r,o,s=n.editor,l=this.options,d=l.name,u=[];l.defaultValue&&(u=[{text:s.options.messages[l.defaultValue[0].text],value:l.defaultValue[0].value}]),i=u.concat(l.items?l.items:s.options[d]||[]),e.attr({title:n.title}),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:i,change:function(){s._range=r,a.exec(s,d,this.value())},close:function(){setTimeout(function(){s._deleteSavedRange()},0)},highlightFirst:!1}),e.closest(".k-widget").removeClass("k-"+d).find("*").addBack().attr("unselectable","on"),o=e.data(this.type),o.value("inherit"),o.wrapper.on(m,".k-select,.k-input",function(){var e=s.getRange();r=s._containsRange(e)?e:r}).on(g,function(e){e.keyCode===t.keys.ENTER&&(s._deleteSavedRange(),e.preventDefault())})}}),T=a.extend({init:function(e){a.fn.init.call(this,e),this.format=[{tags:["span","font"]}],this.finder=new k(this.format,e.cssAttr)},options:{palette:"websafe"},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,r={};return new i.FormatCommand(c(e,{formatter:function(){return r[t.domAttr]=e.value,new w(n,{style:r},t.cssAttr)}}))},initialize:function(e,n){var i=n.editor,r=this.name,s=c({},T.fn.options,this.options),l=s.palette,d=s.columns;e=this._widget=new t.ui.ColorPicker(e,{toolIcon:"k-icon k-i-"+o.getToolCssClass(s.name),palette:l,columns:d,change:function(){var t=e.value();t&&a.exec(i,r,t),i.focus()},open:function(e){var t=e.sender;t.value(null),t._popup.element.on(m,f),t._popup.element.is("[unselectable='on']")||t._popup.element.attr({unselectable:"on"}).find("*").attr("unselectable","on")},close:function(e){e.sender._popup.element.off(m)},activate:function(t){t.preventDefault(),e.trigger("change")}}),e.wrapper.attr({title:n.title,unselectable:"on"}).find("*").attr("unselectable","on")}});c(i,{InlineFormatFinder:_,InlineFormatter:b,DelayedExecutionTool:x,GreedyInlineFormatFinder:k,GreedyInlineFormatter:w,InlineFormatTool:y,FontTool:C,ColorTool:T}),p("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),h("bold",new y({key:"B",ctrl:!0,format:r.bold,template:new s({template:o.buttonTemplate,title:"Bold"})})),p("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),h("italic",new y({key:"I",ctrl:!0,format:r.italic,template:new s({template:o.buttonTemplate,title:"Italic"})})),p("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),h("underline",new y({key:"U",ctrl:!0,format:r.underline,template:new s({template:o.buttonTemplate,title:"Underline"})})),p("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),h("strikethrough",new y({format:r.strikethrough,template:new s({template:o.buttonTemplate,title:"Strikethrough"})})),p("superscript",[{tags:["sup"]}]),h("superscript",new y({format:r.superscript,template:new s({template:o.buttonTemplate,title:"Superscript"})})),p("subscript",[{tags:["sub"]}]),h("subscript",new y({format:r.subscript,template:new s({template:o.buttonTemplate,title:"Subscript"})})),h("foreColor",new T({cssAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:o.colorPickerTemplate,title:"Color"})})),h("backColor",new T({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:o.colorPickerTemplate,title:"Background Color"})})),h("fontName",new C({cssAttr:"font-family",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:o.comboBoxTemplate,title:"Font Name"})})),h("fontSize",new C({cssAttr:"font-size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:o.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/link.min",["editor/plugins/inlineformat.min"],e)}(function(){!function(e,t){function n(e,t){for(var n=e.length;n--&&!t.test(e[n]););return n}function i(e,t){var n=t.exec(e);return n?n.index:-1}var r=window.kendo,o=r.Class,a=e.extend,s=e.proxy,l=r.ui.editor,d=l.Dom,u=l.RangeUtils,c=l.EditorUtils,h=l.Command,p=l.Tool,f=l.ToolTemplate,m=l.InlineFormatter,g=l.InlineFormatFinder,v=u.textNodes,_=u.editableTextNodes,b=l.EditorUtils.registerTool,k=r.keys,w="http://",y=/^\w*:\/\//,x=/[\w\/\$\-_\*\?]/i,C=o.extend({findSuitable:function(e){return d.parentOfType(e,["a"])}}),T=o.extend({init:function(){this.finder=new C},apply:function(e,t){var n,i,r,o,a,s,l,c=this.immutables?_(e):v(e);if(t.innerHTML){for(i=u.documentFromRange(e),n=u.getMarkers(e),e.deleteContents(),o=d.create(i,"a",t),e.insertNode(o),a=o.parentNode,"a"==d.name(a)&&d.insertAfter(o,a),d.emptyNode(a)&&d.remove(a),s=o,l=0;l<n.length;l++)d.insertAfter(n[l],s),s=n[l];n.length&&(d.insertBefore(i.createTextNode("\ufeff"),n[1]),d.insertAfter(i.createTextNode("\ufeff"),n[1]),e.setStartBefore(n[0]),e.setEndAfter(n[n.length-1]))}else r=new m([{tags:["a"]}],t),r.finder=this.finder,r.apply(c)}}),S=h.extend({init:function(e){var t=this;e.formatter={toggle:function(e){var n=t.immutables()?_(e):v(e);new m([{tags:["a"]}]).remove(n)}},this.options=e,h.fn.init.call(this,e)}}),D=h.extend({init:function(e){var t;this.options=e,h.fn.init.call(this,e),this.formatter=new T,e.url?this.exec=function(){this.formatter.immutables=t&&t.immutables(),this.formatter.apply(e.range,{href:e.url,innerHTML:e.text||e.url,target:e.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return r.template("<div class=\"k-editor-dialog k-popup-edit-form\"><div class=\"k-edit-form-container\"><div class='k-edit-label'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-url'></div><div class='k-edit-label k-editor-link-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label></div><div class='k-edit-field k-editor-link-text-row'><input type='text' class='k-input k-textbox' id='k-editor-link-text'></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><input type='text' class='k-input k-textbox' id='k-editor-link-title'></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons k-state-default'><button class=\"k-dialog-insert k-button k-primary\">#: messages.dialogInsert #</button><button class=\"k-dialog-close k-button\">#: messages.dialogCancel #</button></div></div></div>")({messages:this.editor.options.messages})},exec:function(){var t,n,i,r,o=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables(),t=v(this._range),n=t.length?this.formatter.finder.findSuitable(t[0]):null,i=t.length&&"img"==d.name(t[0]),r=this.createDialog(this._dialogTemplate(),{title:o.createLink,close:s(this._close,this),visible:!1}),n&&(this._range.selectNodeContents(n),t=v(this._range)),this._initialText=this.linkText(t),r.find(".k-dialog-insert").click(s(this._apply,this)).end().find(".k-dialog-close").click(s(this._close,this)).end().find(".k-edit-field input").keydown(s(this._keydown,this)).end().find("#k-editor-link-url").val(this.linkUrl(n)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(n?n.title:"").end().find("#k-editor-link-target").attr("checked",!!n&&"_blank"==n.target).end().find(".k-editor-link-text-row").toggle(!i),this._dialog=r.data("kendoWindow").center().open(),e("#k-editor-link-url",r).focus().select()},_keydown:function(e){var t=r.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var n,i,r,o=this._dialog.element,a=e("#k-editor-link-url",o).val(),s=e("#k-editor-link-text",o);a&&a!=w&&(a.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(a)&&(a="mailto:"+a),this.attributes={href:a},n=e("#k-editor-link-title",o).val(),n&&(this.attributes.title=n),s.is(":visible")&&(i=s.val(),i||this._initialText?i&&i!==this._initialText&&(this.attributes.innerHTML=d.stripBom(i)):this.attributes.innerHTML=a),r=e("#k-editor-link-target",o).is(":checked"),this.attributes.target=r?"_blank":null,this.formatter.apply(this._range,this.attributes)),this._close(t),this.change&&this.change()},_close:function(e){e.preventDefault(),this._dialog.destroy(),d.windowFromDocument(u.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):w},linkText:function(e){var t,n="";for(t=0;t<e.length;t++)n+=e[t].nodeValue;return d.stripBom(n||"")},redo:function(){var e=this.lockRange(!0);this.formatter.apply(e,this.attributes),this.releaseRange(e)}}),F=h.extend({init:function(e){h.fn.init.call(this,e),this.formatter=new T},exec:function(){var e,t,n,i=this.detectLink();i&&(e=this.getRange(),t=new r.ui.editor.Marker,n=e.cloneRange(),n.setStart(i.start.node,i.start.offset),n.setEnd(i.end.node,i.end.offset),e=this.lockRange(),t.add(n),this.formatter.apply(n,{href:this._ensureWebProtocol(i.text)}),t.remove(n),this.releaseRange(e))},detectLink:function(){var e,t,n=this.getRange(),i=n.startContainer,r=n.startOffset,o=i.previousSibling;return!o&&(d.isBom(i)&&!i.nextSibling||!r&&d.isDataNode(i))&&(i=i.parentNode,r=0),e=new M({node:i,offset:r,cancelAtNode:function(e){return e&&"a"===d.name(e)}}),t=new A(e),t.detectLink()},changesContent:function(){return!!this.detectLink()},_ensureWebProtocol:function(e){var t=this._hasProtocolPrefix(e);return t?e:this._prefixWithWebProtocol(e)},_hasProtocolPrefix:function(e){return y.test(e)},_prefixWithWebProtocol:function(e){return w+e}}),E=p.extend({init:function(t){this.options=t,this.finder=new g([{tags:["a"]}]),p.fn.init.call(this,e.extend(t,{command:S}))},initialize:function(e,t){p.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){e.toggleClass("k-state-disabled",!this.finder.isFormatted(t)).removeClass("k-state-hover")}}),A=o.extend({init:function(e){this.traverser=e,this.start=I(),this.end=I(),this.text=""},detectLink:function(){var t,n,i,r,o=this.traverser.node,a=this.traverser.offset;if(d.isDataNode(o)){if(t=o.data.substring(0,a),/\s{2}$/.test(d.stripBom(t)))return}else 0===a&&(n=d.closestEditableOfType(o,d.blockElements),n&&n.previousSibling&&this.traverser.init({node:n.previousSibling}));return this.traverser.traverse(e.proxy(this._detectEnd,this)),this.end.blank()||(this.traverser=this.traverser.clone(this.end),this.traverser.traverse(e.proxy(this._detectStart,this)),this._isLinkDetected()||(i=this.traverser.extendOptions(this.start),r=new z(i),r.traverse(e.proxy(this._skipStartPuntuation,this)),this._isLinkDetected()||(this.start=I()))),this.start.blank()?null:{start:this.start,end:this.end,text:this.text}},_isLinkDetected:function(){return y.test(this.text)||/^w{3}\./i.test(this.text)},_detectEnd:function(e,t){var i=n(e,x);if(i>-1)return this.end.node=t,this.end.offset=i+1,!1},_detectStart:function(e,t){var i=n(e,/\s/),r=i+1;if(this.text=e.substring(r)+this.text,this.start.node=t,this.start.offset=r,i>-1)return!1},_skipStartPuntuation:function(e,t,n){var r=i(e,/\w/),o=r;if(r===-1&&(o=e.length),this.text=this.text.substring(o),this.start.node=t,this.start.offset=o+(0|n),r>-1)return!1}}),I=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},R=o.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?d.isDataNode(this.node)&&this.node.length||0:n.offset,this.cancelAtNode=n.cancelAtNode||this.cancelAtNode||e.noop},traverse:function(e){e&&(this.cancel=!1,this._traverse(e,this.node,this.offset))},_traverse:function(e,n,i){var r,o,a,s;if(n&&!this.cancel){if(3!==n.nodeType)return o=this.edgeNode(n),this.cancel=this.cancel||this.cancelAtNode(o),this._traverse(e,o);if(r=n.data,i!==t&&(r=this.subText(r,i)),this.cancel=e(r,n,i)===!1,a=this.next(n),!a)for(s=n.parentNode;!a&&d.isInline(s);)a=this.next(s),s=s.parentNode;this.cancel=this.cancel||this.cancelAtNode(a),this._traverse(e,a)}},extendOptions:function(t){return e.extend({node:this.node,offset:this.offset,cancelAtNode:this.cancelAtNode},t||{})},edgeNode:function(e){},next:function(e){},subText:function(e,t){}}),M=R.extend({subText:function(e,t){return e.substring(0,t)},next:function(e){return e.previousSibling},edgeNode:function(e){return e.lastChild},clone:function(e){var t=this.extendOptions(e);return new M(t)}}),z=R.extend({subText:function(e,t){return e.substring(t)},next:function(e){return e.nextSibling},edgeNode:function(e){return e.firstChild},clone:function(e){var t=this.extendOptions(e);return new z(t)}});a(r.ui.editor,{LinkFormatFinder:C,LinkFormatter:T,UnlinkCommand:S,LinkCommand:D,AutoLinkCommand:F,UnlinkTool:E,DomTextLinkDetection:A,LeftDomTextTraverser:M,RightDomTextTraverser:z}),b("createLink",new p({key:"K",ctrl:!0,command:D,template:new f({template:c.buttonTemplate,title:"Create Link"})})),b("unlink",new E({key:"K",ctrl:!0,shift:!0,template:new f({template:c.buttonTemplate,title:"Remove Link"})})),b("autoLink",new p({key:[k.ENTER,k.SPACEBAR],keyPressCommand:!0,command:F}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatblock.min",["editor/plugins/format.min"],e)}(function(){!function(e){var t,n=window.kendo,i=n.Class,r=e.extend,o=n.ui.editor,a=n.ui.Editor.fn.options.formats,s=o.Dom,l=o.ToolTemplate,d=o.FormatTool,u=o.EditorUtils,c=u.registerTool,h=u.registerFormat,p=o.RangeUtils,f=i.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,r;for(n=0,i=t.length;n<i;n++)if(r=t[n],!r||!s.isAncestorOrSelf(e,r))return!1;
return!0},findSuitable:function(t){var n,i,r,o,a=this.format,l=[];for(n=0,i=t.length;n<i;n++){for(o=a.length-1;o>=0&&!(r=s.ofType(t[n],a[o].tags)?t[n]:s.closestEditableOfType(t[n],a[o].tags));o--);if(!r||"true"===r.contentEditable)return[];e.inArray(r,l)<0&&l.push(r)}for(this._resolveListsItems(l),n=0,i=l.length;n<i;n++)if(this.contains(l[n],l))return[l[n]];return l},_resolveListsItems:function(e){var t,n,i;for(t=0;t<e.length;t++)n=e[t],i=s.is(n,"li")?n:s.wrapper(n),i=i&&s.list(i)?i.children[0]:i,s.is(i,"li")&&(n=e[t]=i)},findFormat:function(e){var t,n,i,r,a,l,d=this.format,u=s.editableParent(e),c=this.options&&this.options.immutables,h=o.Immutables;for(t=0,n=d.length;t<n;t++){if(i=e,r=d[t].tags,a=d[t].attr,c&&r&&"immutable"==r[0]&&(l=h.immutableParent(i),l&&s.attrEquals(l,a)))return i;for(;i&&s.isAncestorOf(u,i);){if(s.ofType(i,r)&&s.attrEquals(i,a))return i;i=i.parentNode}}return null},getFormat:function(e){var t,n,i=this,r=function(e){return i.findFormat(s.isDataNode(e)?e.parentNode:e)},o=r(e[0]);if(!o)return"";for(t=1,n=e.length;t<n;t++)if(o!=r(e[t]))return"";return o.nodeName.toLowerCase()},isFormatted:function(e){for(var t=0,n=e.length;t<n;t++)if(!this.findFormat(e[t]))return!1;return!0}}),m=i.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new f(e)},wrap:function(e,t,n){var i,r,o,a,l,d=1==n.length?s.blockParentOrBody(n[0]):s.commonAncestor.apply(null,n);for(s.isInline(d)&&(d=s.blockParentOrBody(d)),i=s.significantChildNodes(d),r=s.findNodeIndex(i[0]),o=s.create(d.ownerDocument,e,t),a=0;a<i.length;a++)l=i[a],s.isBlock(l)?(s.attr(l,t),o.childNodes.length&&(s.insertBefore(o,l),o=o.cloneNode(!1)),r=s.findNodeIndex(l)+1):o.appendChild(l);o.firstChild&&s.insertAt(d,o,r)},apply:function(t){function n(e){return r({},e&&e.attr,f)}var i,o,a,l,d,c,h,p,f=this.values;if(this._handleImmutables(t,!0),o=s.filter("img",t),a=u.formatByName("img",this.format),l=n(a),e.each(o,function(){s.attr(this,l)}),o.length!=t.length)if(d=s.filter("img",t,!0),c=this.finder.findSuitable(d),c.length)for(h=0,p=c.length;h<p;h++)i=u.formatByName(s.name(c[h]),this.format),s.attr(c[h],n(i));else i=this.format[0],this.wrap(i.tags[0],n(i),d)},_handleImmutables:function(e,t){var n,i,r,a,l;if(this.immutables()&&(n=u.formatByName("immutable",this.format)))for(i=o.Immutables,r=e.length-1,a=r;a>=0;a--)l=i.immutableParent(e[a]),l&&(l!==e[a+1]&&(t?s.attr(l,n.attr):s.unstyle(l,n.attr.style)),e.splice(a,1))},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,n,i,r,o;for(this._handleImmutables(e,!1),t=0,n=e.length;t<n;t++)i=this.finder.findFormat(e[t]),i&&(o=s.name(i),"div"!=o||i.getAttribute("class")?(r=u.formatByName(o,this.format),r.attr.style&&s.unstyle(i,r.attr.style),r.attr.className&&s.removeClass(i,r.attr.className)):s.unwrap(i))},toggle:function(e){var t=this,n=s.filterBy(p.nodes(e),s.htmlIndentSpace,!0);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),g=i.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new f(e)},apply:function(e){var t,n,i,r,a,l,d,u,c,h,p=this.format,f=s.blockParents(e),g=p[0].tags[0];if(f.length)for(t=0,n=f.length;t<n;t++)u=f[t],c=this.immutables()&&o.Immutables.immutableParent(u),c||(d=s.name(u),"li"==d?(i=u.parentNode,r=new o.ListFormatter(i.nodeName.toLowerCase(),g),a=this.editor.createRange(),a.selectNode(f[t]),r.toggle(a)):g&&("td"==d||u.attributes.contentEditable)?new m(p,this.values).apply(u.childNodes):(l=s.changeTag(u,g),s.attr(l,p[0].attr)));else h=new m(p,this.values),h.editor=this.editor,h.apply(e)},toggle:function(e){var t=p.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),t=p.textNodes(e),t.length||(t=s.significantChildNodes(e.commonAncestorContainer))),this.apply(t)},immutables:function(){return this.editor&&this.editor.options.immutables}}),v=d.extend({init:function(e){d.fn.init.call(this,r(e,{finder:new f(e.format),formatter:function(){return new m(e.format)}}))}});r(o,{BlockFormatFinder:f,BlockFormatter:m,GreedyBlockFormatter:g,BlockFormatTool:v}),t=["ul","ol","li"],h("justifyLeft",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{"float":"left",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"left",listStylePosition:""}}}]),c("justifyLeft",new v({format:a.justifyLeft,template:new l({template:u.buttonTemplate,title:"Justify Left"})})),h("justifyCenter",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"center"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),c("justifyCenter",new v({format:a.justifyCenter,template:new l({template:u.buttonTemplate,title:"Justify Center"})})),h("justifyRight",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{"float":"right",display:"",marginLeft:"",marginRight:""}}},{tags:t,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),c("justifyRight",new v({format:a.justifyRight,template:new l({template:u.buttonTemplate,title:"Justify Right"})})),h("justifyFull",[{tags:s.nonListBlockElements,attr:{style:{textAlign:"justify"}}},{tags:["img"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:["immutable"],attr:{style:{display:"block",marginLeft:"auto",marginRight:"auto","float":""}}},{tags:t,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),c("justifyFull",new v({format:a.justifyFull,template:new l({template:u.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/lists.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=e.extend,r=t.ui.editor,o=r.Dom,a=r.RangeUtils,s=r.EditorUtils,l=r.Command,d=r.ToolTemplate,u=r.FormatTool,c=r.BlockFormatFinder,h=a.textNodes,p=r.EditorUtils.registerTool,f=c.extend({init:function(e){this.tag=e;var t=this.tags=["ul"==e?"ol":"ul",e];c.fn.init.call(this,[{tags:t}])},isFormatted:function(e){var t,n,i=[];for(n=0;n<e.length;n++)t=this.findFormat(e[n]),t&&o.name(t)==this.tag&&i.push(t);if(i.length<1)return!1;if(i.length!=e.length)return!1;for(n=0;n<i.length&&i[n].parentNode==t.parentNode;n++)if(i[n]!=t)return!1;return!0},findSuitable:function(e){var t=this.findFormat(e[0]);return t&&o.name(t)==this.tag?t:null}}),m=n.extend({init:function(e,t){var n=this;n.finder=new f(e),n.tag=e,n.unwrapTag=t},isList:function(e){return o.list(e)},immutables:function(){return this.editor&&!!this.editor.options.immutables},wrap:function(t,n){var i,a,s=o.create(t.ownerDocument,"li"),l=this.immutables()?r.Immutables.immutable:e.noop;for(i=0;i<n.length;i++)if(a=n[i],o.is(a,"li"))t.appendChild(a);else if(this.isList(a))for(;a.firstChild;)t.appendChild(a.firstChild);else if(o.is(a,"td")){for(;a.firstChild;)s.appendChild(a.firstChild);t.appendChild(s),a.appendChild(t),t=t.cloneNode(!1),s=s.cloneNode(!1)}else s.appendChild(a),o.isBlock(a)&&(t.appendChild(s),l(a)||o.unwrap(a),s=s.cloneNode(!1));s.firstChild&&t.appendChild(s)},containsAny:function(e,t){for(var n=0;n<t.length;n++)if(o.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&o.isBlock(n))return!1;if(n=e.previousSibling,n&&o.isBlock(n))return!1}return this.containsAny(e,t)||o.isInline(e)||3==e.nodeType},_parentLists:function(t){var n=o.closestEditable(t);return e(t).parentsUntil(n,"ul,ol")},split:function(e){var t,n,i,r,s,l,d=h(e);if(d.length)for(t=o.parentOfType(d[0],["li"]),n=o.parentOfType(d[d.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(n),r=0,s=d.length;r<s;r++)l=this.finder.findFormat(d[r]),l&&(i=this._parentLists(l),i.length?a.split(e,i.last()[0],!0):a.split(e,l,!0))},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&o.isWhitespace(i));)i=i.previousSibling;if(i&&o.name(i)==e){for(;t.firstChild;)i.appendChild(t.firstChild);o.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&o.isWhitespace(n));)n=n.nextSibling;if(n&&o.name(n)==e){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);o.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|tr|td/.test(o.name(e))&&!e.attributes.contentEditable},applyOnSection:function(t,n){function i(){c.push(this)}var r,a,s,l,d=this.tag,u=o.closestSplittableParent(n),c=[],h=this.finder.findSuitable(n);for(h||(h=new f("ul"==d?"ol":"ul").findSuitable(n)),/table|tbody/.test(o.name(u))?r=e.map(n,function(e){return o.parentOfType(e,["td"])}):(r=o.significantChildNodes(u),e.grep(r,o.isBlock).length&&(r=e.grep(r,e.proxy(function(e){return this.containsAny(e,n)},this))),r.length||(r=n)),a=0;a<r.length;a++)s=r[a],l=(!h||!o.isAncestorOrSelf(h,s))&&this.suitable(s,n),l&&(h&&this.isList(s)?(e.each(s.children,i),o.remove(s)):c.push(s));for(c.length==r.length&&this.breakable(u)&&(c=[u]),h||(h=o.create(u.ownerDocument,d),o.insertBefore(h,c[0])),this.wrap(h,c);o.isBom(h.nextSibling);)o.remove(h.nextSibling);o.is(h,d)||o.changeTag(h,d),this.merge(d,h)},apply:function(t){function n(){i&&u.push({section:i,nodes:a})}var i,a,s,l,d=0,u=[],c=t.length,h=this.immutables()?r.Immutables.immutableParent:e.noop;for(d=0;d<c;d++)l=h(t[d])||t[d],s=o.closestEditable(l,["td","body"]),i&&s==i?a.push(l):(n(),a=[l],i=s);for(n(),d=0;d<u.length;d++)this.applyOnSection(u[d].section,u[d].nodes)},unwrap:function(e){var t,n,i,r,a=e.ownerDocument.createDocumentFragment(),s=this.unwrapTag;for(n=e.firstChild;n;n=n.nextSibling){for(i=o.create(e.ownerDocument,s||"p");n.firstChild;)r=n.firstChild,o.isBlock(r)?(i.firstChild&&(a.appendChild(i),i=o.create(e.ownerDocument,s||"p")),a.appendChild(r)):i.appendChild(r);i.firstChild&&a.appendChild(i)}t=this._parentLists(e),t[0]?(o.insertAfter(a,t.last()[0]),t.last().remove()):o.insertAfter(a,e),o.remove(e)},remove:function(e){var t,n,i;for(n=0,i=e.length;n<i;n++)t=this.finder.findFormat(e[n]),t&&this.unwrap(t)},toggle:function(e){var t,n=this,i=h(e),r=e.commonAncestorContainer;i.length||(e.selectNodeContents(r),i=h(e),i.length||(t=r.ownerDocument.createTextNode(""),e.startContainer.appendChild(t),i=[t],e.selectNode(t.parentNode))),i=o.filterBy(i,o.htmlIndentSpace,!0),n.finder.isFormatted(i)?(n.split(e),n.remove(i)):n.apply(i)}}),g=l.extend({init:function(e){e.formatter=new m(e.tag),l.fn.init.call(this,e)}}),v=u.extend({init:function(e){this.options=e,u.fn.init.call(this,i(e,{finder:new f(e.tag)}))},command:function(e){return new g(i(e,{tag:this.options.tag}))}});i(r,{ListFormatFinder:f,ListFormatter:m,ListCommand:g,ListTool:v}),p("insertUnorderedList",new v({tag:"ul",template:new d({template:s.buttonTemplate,title:"Insert unordered list"})})),p("insertOrderedList",new v({tag:"ol",template:new d({template:s.buttonTemplate,title:"Insert ordered list"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/formatting.min",["editor/plugins/inlineformat.min"],e)}(function(){!function(e){function t(e){var t,r,o=l.closestEditableOfType(e,["li"]);o&&(t=new i.ListFormatter(l.name(o.parentNode)),r=n.ui.editor.W3CRange.fromNode(e),r.selectNode(o),t.toggle(r))}var n=window.kendo,i=n.ui.editor,r=i.Tool,o=i.ToolTemplate,a=i.DelayedExecutionTool,s=i.Command,l=i.Dom,d=i.EditorUtils,u=i.RangeUtils,c=d.registerTool,h=a.extend({init:function(e){var t=this;r.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoSelectBox",t.finder={getFormat:function(){return""}}},options:{items:[{text:"Paragraph",value:"p"},{text:"Quotation",value:"blockquote"},{text:"Heading 1",value:"h1"},{text:"Heading 2",value:"h2"},{text:"Heading 3",value:"h3"},{text:"Heading 4",value:"h4"},{text:"Heading 5",value:"h5"},{text:"Heading 6",value:"h6"}],width:110},toFormattingItem:function(e){var t,n=e.value;return n?e.tag||e.className?e:(t=n.indexOf("."),0===t?e.className=n.substring(1):t==-1?e.tag=n:(e.tag=n.substring(0,t),e.className=n.substring(t+1)),e):e},command:function(t){var n=this,r=t.value;return r=this.toFormattingItem(r),new i.FormatCommand({range:t.range,formatter:function(){var t,o=(r.tag||r.context||"span").split(","),a=[{tags:o,attr:{className:r.className||""}}];return t=e.inArray(o[0],l.inlineElements)>=0?new i.GreedyInlineFormatter(a):new i.GreedyBlockFormatter(a),t.editor=n.editor,t}})},initialize:function(e,t){var i=t.editor,o=this.options,a=o.name,s=this;s.editor=i,e.width(o.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:o.items||i.options[a],title:i.options.messages[a],autoSize:!0,change:function(){var e=this.dataItem();e&&r.exec(i,a,e.toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e<t.length;e++)t[e]=s.toFormattingItem(t[e])},highlightFirst:!1,template:n.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+a).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){var i,r,o,a,s,l,d;for(i=0;i<t.length;i++)if(r=t[i],o=r.tag||r.context||"",a=r.className?"."+r.className:"",s=o+a,l=e(n[0]).closest(s)[0]){if(1==n.length)return r.value;for(d=1;d<n.length&&e(n[d]).closest(s)[0];d++)if(d==n.length-1)return r.value}return""},update:function(t,n){var i,r,o,s,d,u=e(t).data(this.type);if(u&&(i=u.dataSource,r=i.data(),d=l.commonAncestor.apply(null,n),d==l.closestEditable(d)||this._ancestor!=d)){for(this._ancestor=d,o=0;o<r.length;o++)s=r[o].context,r[o].visible=!s||!!e(d).closest(s).length;i.filter([{field:"visible",operator:"eq",value:!0}]),a.fn.update.call(this,t,n),u.value(this.getFormattingValue(i.view(),n)),u.wrapper.toggleClass("k-state-disabled",!i.view().length)}},destroy:function(){this._ancestor=null}}),p=s.extend({exec:function(){var e,t,n,i=this.lockRange(!0);for(this.tagsToClean=this.options.remove||"strong,em,span,sup,sub,del,b,i,u,font".split(","),u.wrapSelectedElements(i),e=u.mapAll(i,function(e){return e}),t=e.length-1;t>=0;t--)n=e[t],this.immutableParent(n)||this.clean(n);this.releaseRange(i)},clean:function(n){var r,o,a,s,d;if(n&&!l.isMarker(n)){if(r=l.name(n),"ul"==r||"ol"==r)for(o=new i.ListFormatter(r),a=n.previousSibling,s=n.nextSibling,o.unwrap(n);a&&a!=s;a=a.nextSibling)this.clean(a);else if("blockquote"==r)l.changeTag(n,"p");else if(1!=n.nodeType||l.insignificant(n))t(n);else{for(d=n.childNodes.length-1;d>=0;d--)this.clean(n.childNodes[d]);n.removeAttribute("style"),n.removeAttribute("class")}e.inArray(r,this.tagsToClean)>-1&&l.unwrap(n)}},immutableParent:function(e){return this.immutables()&&i.Immutables.immutableParent(e)}});e.extend(i,{FormattingTool:h,CleanFormatCommand:p}),c("formatting",new h({template:new o({template:d.dropDownListTemplate,title:"Format"})})),c("cleanFormatting",new r({command:p,template:new o({template:d.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/image.min",["kendo.imagebrowser.min","editor/command.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,u=r.Command,c=n.keys,h="#k-editor-image-url",p="#k-editor-image-title",f="#k-editor-image-width",m="#k-editor-image-height",g=u.extend({init:function(e){var t=this;u.fn.init.call(t,e),t.async=!0,t.attributes={}},insertImage:function(e,t){var n,i=this.attributes,r=d.documentFromRange(t);if(i.src&&"http://"!=i.src){if(n=function(){setTimeout(function(){i.width||e.removeAttribute("width"),i.height||e.removeAttribute("height"),e.removeAttribute("complete")})},!e)return e=a.create(r,"img",i),e.onload=e.onerror=n,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(r.createTextNode("\ufeff"),e),n(),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;e.onload=e.onerror=n,a.attr(e,i),n()}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser k-imagebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-image-url">#: messages.imageWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-url"></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-title"></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-width"></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-image-height"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();e.insertImage(d.image(t),t)||e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=parseInt(t.find(f).val(),10),i=parseInt(t.find(m).val(),10);g.attributes={src:t.find(h).val().replace(/ /g,"%20"),alt:t.find(p).val()},g.attributes.width=null,g.attributes.height=null,!isNaN(n)&&n>0&&(g.attributes.width=n),!isNaN(i)&&i>0&&(g.attributes.height=i),_=g.insertImage(b,v),r(e),g.change&&g.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),_||g.releaseRange(v)}function o(t){t.keyCode==c.ENTER?e(t):t.keyCode==c.ESC&&r(t)}var s,l,u,g=this,v=g.lockRange(),_=!1,b=d.image(v),k=b&&b.getAttribute("width")||"",w=b&&b.getAttribute("height")||"",y=n.support.browser.msie,x=g.editor.options,C=x.messages,T=x.imageBrowser,S=!!(n.ui.ImageBrowser&&T&&T.transport&&T.transport.read!==t),D={title:C.insertImage,visible:!1,resizable:S};this.expandImmutablesIn(v),D.close=r,S&&(D.width=750),s=this.createDialog(g._dialogTemplate(S),D).toggleClass("k-filebrowser-dialog",S).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(h).val(b?b.getAttribute("src",2):"http://").end().find(p).val(b?b.alt:"").end().find(f).val(k).end().find(m).val(w).end().data("kendoWindow"),l=s.element,S&&(this._imageBrowser=new n.ui.ImageBrowser(l.find(".k-imagebrowser"),i({},T)),this._imageBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(h).val(this.value())}),this._imageBrowser.bind("apply",e)),y&&(u=l.closest(".k-window").height(),l.css("max-height",u)),s.center().open(),l.find(h).focus().select()}});n.ui.editor.ImageCommand=g,s("insertImage",new r.Tool({command:g,template:new l({template:o.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/import.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.EditorUtils,s=o.Command,l=o.Tool,d=a.registerTool,u=o.ToolTemplate,c='<div contenteditable="false" class="k-loading-mask" style="width: 100%; height: 100%; position: absolute; top: 0px; left: 0px;"><div class="k-loading-image"></div><div class="k-loading-color"></div></div>',h=s.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options["import"],o=e('<input id="editorImport" name="files" type="file" />').kendoUpload({success:r(t._onUploadSuccess,t),progress:r(t._onUploadProgress,t),select:r(t._onUploadSelect,t),error:r(t._onUploadError,t),complete:r(t._onUploadComplete,t),showFileList:!1,multiple:!1,async:{saveUrl:i.proxyUrl,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return n._uploadWidget=o,o},_onUploadComplete:function(e){this._trigger("complete",e),e.sender.clearAllFiles(),this._removeLoadingOverlay()},_onUploadSuccess:function(e){this.editor.value(e.response.html.replace(/<\/?body>/gi,"")),this._trigger("success",e)},_onUploadProgress:function(e){this._trigger("progress",e)},_onUploadSelect:function(e){this._trigger("select",e),e.files[0].validationErrors||this._initLoadingOverlay()},_onUploadError:function(e){this._trigger("error",e)},_trigger:function(e,t){var n=this.editor,i=n.options["import"];"function"==typeof i[e]&&i[e].call(n,t)},_initLoadingOverlay:function(){var t=this.editor.body;o.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(c):this._container=e(t).append(c),n.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){n.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});i(o,{ImportCommand:h}),d("import",new l({command:h,template:new u({template:a.buttonTemplate,title:"Import"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/insert.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.GenericCommand,o=n.EditorUtils,a=o.registerTool,s=n.Tool,l=n.ToolTemplate,d=n.RestorePoint,u=e.extend,c=i.extend({init:function(e){i.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e,t=this.editor,n=this.options,i=n.range,o=t.body,a=new d(i,o),s=n.html||n.value||"";t.selectRange(i),t.clipboard.paste(s,n),n.postProcess&&n.postProcess(t,t.getRange()),e=new r(a,new d(t.getRange(),o)),e.editor=t,t.undoRedoStack.push(e),t.focus()}}),h=s.extend({initialize:function(e,t){var i=t.editor,r=this.options,o=r.items?r.items:i.options.insertHtml;this._selectBox=new n.SelectBox(e,{dataSource:o,dataTextField:"text",dataValueField:"value",change:function(){s.exec(i,"insertHtml",this.value())},title:i.options.messages.insertHtml,highlightFirst:!1})},command:function(e){return new c(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});u(n,{InsertHtmlCommand:c,InsertHtmlTool:h}),a("insertHtml",new h({template:new l({template:o.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/export.min",["editor/main.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.EditorUtils,s=o.Command,l=o.Tool,d=a.registerTool,u=o.ToolTemplate,c=[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}],h=s.extend({init:function(e){var t=this;t.options=e,s.fn.init.call(t,e),t.attributes=null,t.exportType=e.exportType},exec:function(){var e=this,t=this.lockRange(!0);e.postToProxy(),e.releaseRange(t)},postToProxy:function(){this.generateForm().appendTo("body").submit().remove()},generateForm:function(){var t=this,n=t.editor.options.exportAs,i=e("<form>").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("<input>").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){var t=this;return e("<input>").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("<input>").attr({value:i,name:"fileName",type:"hidden"})}}),p=l.extend({init:function(e){var t=this;l.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoSelectBox"},options:{items:c,width:115},command:function(e){var t=e.value;return new o.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var i=this,o=t.editor,a=i.options,s=a.name,l=r(i.changeHandler,i),d=a.items||o.options[s];d.unshift({text:o.options.messages[s],value:""}),i.editor=o,e.width(a.width),e.kendoSelectBox({dataTextField:"text",dataValueField:"value",dataSource:d,autoSize:!0,change:l,open:function(e){var t=e.sender;t.items()[0].style.display="none",t.unbind("open")},highlightFirst:!1,template:n.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}),e.addClass("k-decorated").closest(".k-widget").removeClass("k-"+s).find("*").addBack().attr("unselectable","on")},changeHandler:function(e){var t=e.sender,n=t.dataItem(),i=n&&n.value;this._exec(i),t.value("")},_exec:function(e){e&&l.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});i(o,{ExportAsTool:p,ExportAsCommand:h}),d("exportAs",new p({template:new u({template:a.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/indent.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){function n(n,i){var r="rtl"==e(n).css("direction"),o=r?"Right":"Left",a="td"!=s.name(n)?"margin"+o:"padding"+o;return i===t?n.style[a]||0:(i>0?n.style[a]=i+"px":(n.style[a]="",n.style.cssText||n.removeAttribute("style")),t)}var i=window.kendo,r=i.Class,o=e.extend,a=i.ui.editor,s=a.Dom,l=a.EditorUtils,d=l.registerTool,u=a.Command,c=a.Tool,h=a.ToolTemplate,p=a.RangeUtils,f=s.blockElements,m=a.BlockFormatFinder,g=a.BlockFormatter,v=r.extend({init:function(){this.finder=new m([{tags:s.blockElements}])},apply:function(t){var i,r,o,a,l,d,u,c,h,p,f,m;if(t=s.filterBy(t,s.htmlIndentSpace,!0),i=this.finder.findSuitable(t),r=[],i=this.mapImmutables(i),i.length){for(o=0,a=i.length;o<a;o++)s.is(i[o],"li")?e(i[o]).index()?e.inArray(i[o].parentNode,r)<0&&r.push(i[o]):r.push(i[o].parentNode):r.push(i[o]);for(;r.length;)if(l=r.shift(),s.is(l,"li"))if(d=l.parentNode,u=e(l).prev("li"),c=u.find("ul,ol").last(),h=e(l).children("ul,ol")[0],h&&u[0])c[0]?(c.append(l),c.append(e(h).children()),s.remove(h)):(u.append(h),h.insertBefore(l,h.firstChild));else for(h=u.children("ul,ol")[0],h||(h=s.create(l.ownerDocument,s.name(d)),u.append(h));l&&l.parentNode==d;)h.appendChild(l),l=r.shift();else for(p=parseInt(n(l),10)+30,n(l,p),f=0;f<r.length;f++)e.contains(l,r[f])&&r.splice(f,1)}else m=new g([{tags:["p"]}],{style:{marginLeft:30}}),m.apply(t)},mapImmutables:function(t){if(this.immutables){var n=[];return e.map(t,function(t){var i=a.Immutables.immutableParent(t);if(i){if(e.inArray(i,n)!==-1)return null;n.push(i)}return i||t})}return t},remove:function(t){t=s.filterBy(t,s.htmlIndentSpace,!0);var i,r,o,a,l,d,u,c,h=this.finder.findSuitable(t);for(h=this.mapImmutables(h),r=0,o=h.length;r<o;r++){if(u=e(h[r]),u.is("li")){if(a=u.parent(),l=a.parent(),l.is("li,ul,ol")&&!n(a[0])){if(i&&e.contains(i,l[0]))continue;d=u.nextAll("li"),d.length&&e(a[0].cloneNode(!1)).appendTo(u).append(d),l.is("li")?u.insertAfter(l):u.appendTo(l),a.children("li").length||a.remove();continue}if(i==a[0])continue;i=a[0]}else i=h[r];c=parseInt(n(i),10)-30,n(i,c)}}}),_=u.extend({init:function(t){var n=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.apply(p.nodes(e))},n)},u.fn.init.call(this,t)}}),b=u.extend({init:function(t){var n=this;t.formatter={toggle:e.proxy(function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.remove(p.nodes(e))},n)},u.fn.init.call(this,t)}}),k=c.extend({init:function(e){c.fn.init.call(this,e),this.finder=new m([{tags:f}])},initialize:function(t,n){c.fn.initialize.call(this,t,n),e.extend(this.options,{immutables:n.editor&&n.editor.options.immutables}),t.addClass("k-state-disabled")},update:function(i,r){var o,l,d,u,c,h,p=this.finder.findSuitable(r);for(d=0,u=p.length;d<u;d++)if(c=p[d],this.options.immutables&&(h=a.Immutables.immutableParent(c),h&&(c=h)),o=n(c),o||(l=e(c).parents("ul,ol").length,o=s.is(c,"li")&&(l>1||n(c.parentNode))||s.ofType(c,["ul","ol"])&&l>0),o)return i.removeClass("k-state-disabled"),t;i.addClass("k-state-disabled").removeClass("k-state-hover")}});o(a,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:k}),d("indent",new c({command:_,template:new h({template:l.buttonTemplate,title:"Indent"})})),d("outdent",new k({command:b,template:new h({template:l.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/linebreak.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,r=i.Dom,o=i.Command,a=i.Tool,s=i.BlockFormatter,l=r.normalize,d=i.RangeUtils,u=i.EditorUtils.registerTool,c=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=r.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||(n=t.commonAncestorContainer,n.innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){var n,i;if(r.isEmpty(t))e.setStartBefore(t);else{if(e.selectNodeContents(t),n=d.textNodes(e)[0],!n){for(;t.childNodes.length&&!r.is(t.firstChild,"br");)t=t.firstChild;n=t}r.isEmpty(n)?e.setStartBefore(n):(r.emptyNode(n)&&(n.innerHTML="\ufeff"),i=n.firstChild||n,r.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i))}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=r.parentOfType(e.startContainer,t),i=r.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(r.isMarker(e)||""===r.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,o,a,u,c,h,p,f,m,g,v,_,b,k=this.getRange(),w=d.documentFromRange(k),y=i.emptyElementContent;this.expandImmutablesIn(k),m=this.shouldTrim(k),k.deleteContents(),u=this._insertMarker(w,k),r.stripBomNode(u.previousSibling),r.stripBomNode(u.nextSibling),c=r.closestEditableOfType(u,["li"]),h=r.closestEditableOfType(u,"h1,h2,h3,h4,h5,h6".split(",")),p=r.is(u.parentNode,"table")&&u.parentNode,c?r.emptyNode(c)&&(a=r.create(w,"p"),r.next(c)&&(f=k.cloneRange(),f.selectNode(c),d.split(f,c.parentNode)),g=e("br",c),1==g.length&&g.remove(),v=c.parentNode,_=c.parentNode.children.length,b=_>1&&1==c.childNodes.length&&c.children[0],r.insertAfter(a,v),r.remove(1==_?c.parentNode:c),b&&b!==u?(a.appendChild(b),a.appendChild(u)):a.innerHTML=y,o=a):h&&this._blankAfter(u)?(a=this._insertParagraphAfter(h),r.remove(u),o=a):p&&(a=this._insertParagraphAfter(p),r.remove(u),o=a),o||(c||h||new s([{tags:["p"]}]).apply([u]),k.selectNode(u),t=r.parentOfType(u,[c?"li":h?r.name(h):"p"]),d.split(k,t,m),n=t.previousSibling,r.is(n,"li")&&n.firstChild&&!r.is(n.firstChild,"br")&&(n=n.firstChild),o=t.nextSibling,this.clean(n),this.clean(o,{links:!0}),r.is(o,"li")&&o.firstChild&&!r.is(o.firstChild,"br")&&(o=o.firstChild),r.remove(t),l(n)),l(o),this._moveFocus(k,o),k.collapse(!0),r.scrollTo(o,!0),d.selectRange(k)},_insertParagraphAfter:function(e){var t=this.getRange(),n=d.documentFromRange(t),o=i.emptyElementContent,a=r.create(n,"p");return r.insertAfter(a,e),a.innerHTML=o,a},clean:function(t,n){var o,a=t;if(t.firstChild&&r.is(t.firstChild,"br")&&r.remove(t.firstChild),r.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(o=!1;t.firstChild&&1==t.firstChild.nodeType;)o=o||r.significantNodes(t.childNodes).length>1,
t=t.firstChild;if(r.isEmpty(t)||!/^\s*$/.test(t.innerHTML)||o||(e(a).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=a;){if(r.is(t,"a")&&r.emptyNode(t)){r.unwrap(t);break}t=t.parentNode}}}}),h=o.extend({init:function(e){this.options=e,o.fn.init.call(this,e)},exec:function(){var e,n,i,o,a,s,u=this.getRange();this.expandImmutablesIn(u),e=r.create(d.documentFromRange(u),"br"),n=u.startContainer,o=t.support.browser,a=o.msie&&o.version<11,s=r.is(n,"table")&&n,u.deleteContents(),s?r.insertAfter(e,s):u.insertNode(e),l(e.parentNode),a||e.nextSibling&&!r.isWhitespace(e.nextSibling)||(i=e.cloneNode(!0),i.className="k-br",r.insertAfter(i,e)),u.setStartAfter(e),u.collapse(!0),r.scrollTo(e.nextSibling||e,!0),d.selectRange(u)}});n(i,{ParagraphCommand:c,NewLineCommand:h}),u("insertLineBreak",new a({key:13,shift:!0,command:h})),u("insertParagraph",new a({key:13,command:c}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/file.min",["kendo.filebrowser.min","editor/plugins/link.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=n.ui.editor,o=r.EditorUtils,a=r.Dom,s=o.registerTool,l=r.ToolTemplate,d=r.RangeUtils,u=r.Command,c=r.LinkFormatter,h=d.textNodes,p=n.keys,f="#k-editor-file-url",m="#k-editor-file-text",g="#k-editor-file-title",v=u.extend({init:function(e){var t=this;u.fn.init.call(t,e),t.formatter=new c,t.async=!0,t.attributes={}},insertFile:function(e,t){var n=this.attributes,i=d.documentFromRange(t);if(n.href&&"http://"!=n.href){if(!e)return e=a.create(i,"a",{href:n.href}),e.innerHTML=n.innerHTML,e.title=n.title,t.deleteContents(),t.insertNode(e),e.nextSibling||a.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;a.attr(e,n)}return!1},_dialogTemplate:function(e){return n.template('<div class="k-editor-dialog k-popup-edit-form"><div class="k-edit-form-container"><div class="k-edit-form-content"># if (showBrowser) { #<div class="k-filebrowser"></div># } #<div class=\'k-edit-label\'><label for="k-editor-file-url">#: messages.fileWebAddress #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-url"></div><div class=\'k-edit-label\'><label for="k-editor-file-text">#: messages.fileText #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-text"></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><input type="text" class="k-input k-textbox" id="k-editor-file-title"></div></div><div class="k-edit-buttons k-state-default"><button class="k-dialog-insert k-button k-primary">#: messages.dialogInsert #</button><button class="k-dialog-close k-button">#: messages.dialogCancel #</button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this,t=e.lockRange();this.formatter.apply(t,this.attributes),e.releaseRange(t)},exec:function(){function e(e){var t=s.element,n=t.find(f).val().replace(/ /g,"%20"),i=t.find(m).val(),o=t.find(g).val();c.attributes={href:n,innerHTML:""!==i?i:n,title:o},b=c.insertFile(k,v),r(e),c.change&&c.change()}function r(e){e.preventDefault(),s.destroy(),a.windowFromDocument(d.documentFromRange(v)).focus(),b||c.releaseRange(v)}function o(t){t.keyCode==p.ENTER?e(t):t.keyCode==p.ESC&&r(t)}var s,l,u,c=this,v=c.lockRange(),_=h(v),b=!1,k=_.length?this.formatter.finder.findSuitable(_[0]):null,w=n.support.browser.msie,y=c.editor.options,x=y.messages,C=y.fileBrowser,T=!!(n.ui.FileBrowser&&C&&C.transport&&C.transport.read!==t),S={title:x.insertFile,visible:!1,resizable:T};this.expandImmutablesIn(v),S.close=r,T&&(S.width=750),s=this.createDialog(c._dialogTemplate(T),S).toggleClass("k-filebrowser-dialog",T).find(".k-dialog-insert").click(e).end().find(".k-dialog-close").click(r).end().find(".k-edit-field input").keydown(o).end().find(f).val(k?k.getAttribute("href",2):"http://").end().find(m).val(k?k.innerText:"").end().find(g).val(k?k.title:"").end().data("kendoWindow"),l=s.element,T&&(c._fileBrowser=new n.ui.FileBrowser(l.find(".k-filebrowser"),i({},C)),c._fileBrowser.bind("change",function(e){"f"===e.selected.get("type")&&l.find(f).val(this.value())}),c._fileBrowser.bind("apply",e)),w&&(u=l.closest(".k-window").height(),l.css("max-height",u)),s.center().open(),l.find(f).focus().select()}});n.ui.editor.FileCommand=v,s("insertFile",new r.Tool({command:v,template:new l({template:o.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/tables.min",["editor/plugins/formatblock.min"],e)}(function(){!function(e,t){var n=window.kendo,i=e.extend,r=e.proxy,o=n.ui.editor,a=o.Dom,s=o.EditorUtils,l=o.RangeUtils,d=o.Command,u="kendoEditor",c="k-state-active",h="k-state-selected",p=o.Tool,f=o.ToolTemplate,m=o.InsertHtmlCommand,g=o.BlockFormatFinder,v=o.EditorUtils.registerTool,_=n.getTouches,b=n.template,k="<td style='width:#=width#%;'>#=content#</td>",w=new g([{tags:["table"]}]),y=m.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});m.fn.init.call(this,n)},_tableHtml:function(e,t){var n,i;return e=e||1,t=t||1,n=b(k)({width:100/t,content:o.emptyTableCellContent}),i=100/e,"<table class='k-table' data-last>"+Array(e+1).join("<tr style='height:"+i+"%;'>"+Array(t+1).join(n)+"</tr>")+"</table>"},postProcess:function(t,n){var i=e("table[data-last]",t.document).removeAttr("data-last");n.setStart(i.find("td")[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),m.fn.exec.call(this)}}),x=p.extend({initialize:function(t,n){var i,a,l,d;p.fn.initialize.call(this,t,n),i=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:r(this._open,this),activate:r(this._activate,this),close:r(this._close,this)}).data("kendoPopup"),t.click(r(this._toggle,this)).keydown(r(this._keydown,this)),a=this._editor=n.editor,this._popup=i,l=new o.TableWizardTool({template:new f({template:s.buttonTemplate,title:a.options.messages.tableWizard}),command:o.TableWizardCommand,insertNewTable:!0}),v("tableWizardInsert",l),d=e("<div class='k-editor-toolbar'>"+l.options.template.getHtml()+"</div>"),d.appendTo(i.element),a.toolbar&&a.toolbar.attachToolsEvents(d)},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(c)},_close:function(){this._popup.options.anchor.removeClass(c)},_keydown:function(e){var t=n.keys,i=e.keyCode;i==t.DOWN&&e.altKey?this._popup.open():i==t.ESC&&this._popup.close()},_toggle:function(t){var n=e(t.target).closest(".k-tool");n.hasClass("k-state-disabled")||this.popup().toggle()},update:function(e){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),e.removeClass("k-state-hover")},destroy:function(){this._popup.destroy()}}),C=x.extend({init:function(t){this.cols=8,this.rows=6,x.fn.init.call(this,e.extend(t,{command:y,popupTemplate:"<div class='k-ct-popup'>"+Array(this.cols*this.rows+1).join("<span class='k-ct-cell k-state-disabled' />")+"<div class='k-status'></div></div>"}))},_activate:function(){function t(t){var n=e(window);return{row:Math.floor((t.clientY+n.scrollTop()-c.top)/r)+1,col:Math.floor((t.clientX+n.scrollLeft()-c.left)/i)+1}}var i,r,o=this,a=o._popup.element,s=a.find(".k-ct-cell"),l=s.eq(0),d=s.eq(s.length-1),c=n.getOffset(l),h=n.getOffset(d),p=o.cols,f=o.rows;a.find("*").addBack().attr("unselectable","on"),h.left+=d[0].offsetWidth,h.top+=d[0].offsetHeight,i=(h.left-c.left)/p,r=(h.top-c.top)/f,a.autoApplyNS(u).on("mousemove",function(e){o._setTableSize(t(e))}).on("mouseleave",function(){o._setTableSize()}).on("down",function(e){e.preventDefault();var n=_(e)[0];o._exec(t(n.location))})},_valid:function(e){return e&&e.row>0&&e.col>0&&e.row<=this.rows&&e.col<=this.cols},_exec:function(e){this._valid(e)&&(this._editor.exec("createTable",{rows:e.row,columns:e.col}),this._popup.close())},_setTableSize:function(t){var i=this._popup.element,r=i.find(".k-status"),o=i.find(".k-ct-cell"),a=this.cols,s=this._editor.options.messages;this._valid(t)?(r.text(n.format(s.createTableHint,t.row,t.col)),o.each(function(n){e(this).toggleClass(h,n%a<t.col&&n/a<t.row)})):(r.text(s.createTable),o.removeClass(h))},_keydown:function(e){var t,i,r,o,a,s,l,d;x.fn._keydown.call(this,e),this._popup.visible()&&(t=n.keys,i=e.keyCode,r=this._popup.element.find(".k-ct-cell"),o=Math.max(r.filter(".k-state-selected").last().index(),0),a=Math.floor(o/this.cols),s=o%this.cols,l=!1,i!=t.DOWN||e.altKey?i==t.UP?(l=!0,a--):i==t.RIGHT?(l=!0,s++):i==t.LEFT&&(l=!0,s--):(l=!0,a++),d={row:Math.max(1,Math.min(this.rows,a+1)),col:Math.max(1,Math.min(this.cols,s+1))},i==t.ENTER?this._exec(d):this._setTableSize(d),l&&(e.preventDefault(),e.stopImmediatePropagation()))},_open:function(){var e=this._editor.options.messages;x.fn._open.call(this),this.popup().element.find(".k-status").text(e.createTable).end().find(".k-ct-cell").removeClass(h)},_close:function(){x.fn._close.call(this),this.popup().element.off("."+u)}}),T=d.extend({exec:function(){for(var e,t,n,i,r=this.lockRange(!0),s=r.endContainer;"td"!=a.name(s);)s=s.parentNode;if(!this.immutables()||!o.Immutables.immutableParent(s)){for(t=s.parentNode,e=t.children.length,n=t.cloneNode(!0),i=0;i<t.cells.length;i++)n.cells[i].innerHTML=o.emptyTableCellContent;"before"==this.options.position?a.insertBefore(n,t):a.insertAfter(n,t),this.releaseRange(r)}}}),S=d.extend({exec:function(){var e,t,n,i,r=this.lockRange(!0),s=a.closest(r.endContainer,"td"),l=a.closest(s,"table"),d=l.rows,u=this.options.position;if(!this.immutables()||!o.Immutables.immutableParent(s)){for(e=a.findNodeIndex(s,!0),t=0;t<d.length;t++)n=d[t].cells[e],i=n.cloneNode(),i.innerHTML=o.emptyTableCellContent,"before"==u?a.insertBefore(i,n):a.insertAfter(i,n);this.releaseRange(r)}}}),D=d.extend({exec:function(){var t,n,i,r=this.lockRange(),s=l.mapAll(r,function(t){return e(t).closest("tr")[0]}),d=s[0];if(!this.immutables()||!o.Immutables.immutableParent(d)){if(t=a.closest(d,"table"),t.rows.length<=s.length)n=a.next(t),n&&!a.insignificant(n)||(n=a.prev(t)),a.remove(t);else for(i=0;i<s.length;i++)d=s[i],a.removeTextSiblings(d),n=a.next(d)||a.prev(d),n=n.cells[0],a.remove(d);n&&(r.setStart(n,0),r.collapse(!0),this.editor.selectRange(r))}}}),F=d.extend({exec:function(){var e,t,n=this.lockRange(),i=a.closest(n.endContainer,"td"),r=a.closest(i,"table"),s=r.rows,l=a.findNodeIndex(i,!0),d=s[0].cells.length;if(!this.immutables()||!o.Immutables.immutableParent(i)){if(1==d)e=a.next(r),e&&!a.insignificant(e)||(e=a.prev(r)),a.remove(r);else for(a.removeTextSiblings(i),e=a.next(i)||a.prev(i),t=0;t<s.length;t++)a.remove(s[t].cells[l]);e&&(n.setStart(e,0),n.collapse(!0),this.editor.selectRange(n))}}}),E=p.extend({command:function(e){return e=i(e,this.options),"delete"==e.action?"row"==e.type?new D(e):new F(e):"row"==e.type?new T(e):new S(e)},initialize:function(e,t){p.fn.initialize.call(this,e,t),e.addClass("k-state-disabled")},update:function(e,t){var n=!w.isFormatted(t);e.toggleClass("k-state-disabled",n)}});i(n.ui.editor,{PopupTool:x,TableCommand:y,InsertTableTool:C,TableModificationTool:E,InsertRowCommand:T,InsertColumnCommand:S,DeleteRowCommand:D,DeleteColumnCommand:F}),v("createTable",new C({template:new f({template:s.buttonTemplate,popup:!0,title:"Create table"})})),v("addColumnLeft",new E({type:"column",position:"before",template:new f({template:s.buttonTemplate,title:"Add column on the left"})})),v("addColumnRight",new E({type:"column",template:new f({template:s.buttonTemplate,title:"Add column on the right"})})),v("addRowAbove",new E({type:"row",position:"before",template:new f({template:s.buttonTemplate,title:"Add row above"})})),v("addRowBelow",new E({type:"row",template:new f({template:s.buttonTemplate,title:"Add row below"})})),v("deleteRow",new E({type:"row",action:"delete",template:new f({template:s.buttonTemplate,title:"Delete row"})})),v("deleteColumn",new E({type:"column",action:"delete",template:new f({template:s.buttonTemplate,title:"Delete column"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/clipboard.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,r=i.RangeUtils,o=i.Dom,a=i.RestorePoint,s=i.Marker,l=t.support.browser,d=e.extend,u=n.extend({init:function(e){this.editor=e;var t=e.options.pasteCleanup;this.cleaners=[new h(t),new p(t),new f(t),new m(t),new v(t),new _(t),new y(t),new x(t)]},htmlToFragment:function(e){var t=this.editor,n=t.document,i=o.create(n,"div"),r=n.createDocumentFragment();for(i.innerHTML=e;i.firstChild;)r.appendChild(i.firstChild);return r},isBlock:function(e){return/<(div|p|ul|ol|table|h[1-6])/i.test(e)},_startModification:function(){var e,t,n=this.editor;if(!this._inProgress)return this._inProgress=!0,e=n.getRange(),t=new a(e,n.body),o.persistScrollTop(n.document),{range:e,restorePoint:t}},_endModification:function(e){i._finishUpdate(this.editor,e.restorePoint),this.editor._selectionChange(),this._inProgress=!1},_contentModification:function(e,t){var n=this,i=n.editor,r=n._startModification();r&&(e.call(n,i,r.range),setTimeout(function(){t.call(n,i,r.range),n._endModification(r)}))},_removeBomNodes:function(e){var t,n=r.textNodes(e);for(t=0;t<n.length;t++)n[t].nodeValue=o.stripBom(n[t].nodeValue)||n[t].nodeValue},_onBeforeCopy:function(e){var t=new s;t.add(e),this._removeBomNodes(e),t.remove(e),this.editor.selectRange(e)},oncopy:function(){this._onBeforeCopy(this.editor.getRange())},oncut:function(){this._onBeforeCopy(this.editor.getRange()),this._contentModification(e.noop,e.noop)},_fileToDataURL:function(t){var n=e.Deferred(),i=new FileReader;return t instanceof window.File||!t.getAsFile||(t=t.getAsFile()),i.onload=e.proxy(n.resolve,n),i.readAsDataURL(t),n.promise()},_triggerPaste:function(e,t){var n={html:e||""};n.html=n.html.replace(/\ufeff/g,""),this.editor.trigger("paste",n),this.paste(n.html,t||{})},_handleImagePaste:function(e){var t,n;if("FileReader"in window&&!(l.msie&&l.version>10))return t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},n=t.items||t.files,this._insertImages(n)},_insertImages:function(t){var n,i,r;if(t&&(n=e.grep(t,function(e){return/^image\//i.test(e.type)}),i=e.grep(t,function(e){return/^text\/html/i.test(e.type)}),!i.length&&n.length&&(r=this._startModification())))return e.when.apply(e,e.map(n,this._fileToDataURL)).done(e.proxy(function(){var t=Array.prototype.slice.call(arguments),n=e.map(t,function(e){return'<img src="'+e.target.result+'" />'}).join("");this._triggerPaste(n),this._endModification(r)},this)),!0},onpaste:function(n){return this._handleImagePaste(n)?void n.preventDefault():(this.expandImmutablesIn(),void this._contentModification(function(i,r){var a,s,l,d=o.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),u=t.support.browser,c=i.body;this._decoreateClipboardNode(d,c),c.appendChild(d),u.webkit&&this._moveToCaretPosition(d,r),u.msie&&u.version<11?(n.preventDefault(),a=i.createRange(),a.selectNodeContents(d),i.selectRange(a),s=i.document.body.createTextRange(),s.moveToElementText(d),e(c).unbind("paste"),s.execCommand("Paste"),e(c).bind("paste",e.proxy(this.onpaste,this))):(l=i.createRange(),l.selectNodeContents(d),i.selectRange(l)),r.deleteContents()},function(t,n){var i,r="";t.selectRange(n),i=e(t.body).children(".k-paste-container"),i.each(function(){var e=this.lastChild;e&&o.is(e,"br")&&o.remove(e),r+=this.innerHTML}),i.remove(),this._triggerPaste(r,{clean:!0})}))},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){var t,n;"FileReader"in window&&(t=(e.originalEvent||e).dataTransfer||{},n=t.items||t.files,this._insertImages(n)&&e.preventDefault())},_decoreateClipboardNode:function(t,n){var i,r,o,a;(l.msie||l.webkit)&&(t=e(t),t.css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.msie&&(i=e(n.ownerDocument.documentElement),t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"}),r=i.css("color"),r&&t.css("color",r),o=i.css("fontFamily"),o&&t.css("fontFamily",o),a=i.css("fontSize"),a&&t.css("fontSize",a)))},_moveToCaretPosition:function(t,n){var i=this,r=i.editor.body,a=o.offset(t,r),s=i._caretOffset(n,r),l=s.left-a.left,d=s.top-a.top,u="translate("+l+"px,"+d+"px)";e(t).css({"-webkit-transform":u,transform:u})},_caretOffset:function(e,t){var n,i,r,a,s,l,d=this.editor,u=o.create(d.document,"span",{innerHTML:"\ufeff"}),c=e.startContainer;return e.collapsed?(i=o.isDataNode(c),i&&(o.isBom(c)||0===e.startOffset)?o.insertBefore(u,c):i&&e.startOffset===c.length?o.insertAfter(u,c):(e.insertNode(u),n=!0)):(c=c===t?c.childNodes[e.startOffset]:c,o.insertBefore(u,c)),r=o.offset(u,t),a=u.previousSibling,s=u.nextSibling,o.remove(u),n&&o.isDataNode(a)&&o.isDataNode(s)&&!o.isBom(a)&&!o.isBom(s)&&(l=a.length,s.data=a.data+s.data,e.setStart(s,l),o.remove(a),e.collapse(!0),d.selectRange(e)),r},expandImmutablesIn:function(e){var n,i,r,o=this.editor;o&&o.options.immutables&&(n=o.body,e=e||o.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===n&&0===e.startOffset&&(i=n.ownerDocument,r=i.createTextNode("\ufeff"),n.insertBefore(r,n.childNodes[0]),e.setStartBefore(r)),o.selectRange(e))},splittableParent:function(e,t){var n,i;if(e)return o.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,o.isInline(n))for(;n.parentNode!=i&&!o.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,a,l,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C=this.editor;if(this.expandImmutablesIn(),n=d({clean:!1,split:!0},n),!n.skipCleaners)for(i=0,a=this.cleaners.length;i<a;i++)this.cleaners[i].applicable(t)&&(t=this.cleaners[i].clean(t));if(n.clean&&(t=t.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi,"$3"),t=t.replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=t.replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>"),u=this.isBlock(t),C.focus(),c=C.getRange(),c.deleteContents(),c.startContainer==C.document&&c.selectNodeContents(C.body),h=new s,p=h.addCaret(c),f=this.splittableParent(u,p),m=!1,g=f!=C.body&&!o.is(f,"td"),n.split&&g&&(u||o.isInline(f))&&(c.selectNode(p),r.split(c,f,!0),m=!0),v=this.htmlToFragment(t),v.firstChild&&"k-paste-container"===v.firstChild.className){for(_=[],i=0,a=v.childNodes.length;i<a;i++)_.push(v.childNodes[i].innerHTML);v=this.htmlToFragment(_.join("<br />"))}if(l=v.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each(function(e,t){o.isBlock(t)&&""===t.innerHTML&&t.appendChild(C.document.createTextNode("\ufeff"))}),c.insertNode(v),f=this.splittableParent(u,p),m){for(;p.parentNode!=f;)o.unwrap(p.parentNode);o.unwrap(p.parentNode)}if(o.normalize(c.commonAncestorContainer),p.style.display="inline",o.restoreScrollTop(C.document),o.scrollTo(p),h.removeCaret(c),b=c.commonAncestorContainer.parentNode,c.collapsed&&"tbody"==o.name(b)&&(c.setStartAfter(e(b).closest("table")[0]),c.collapse(!0)),k=e(c.commonAncestorContainer.parentNode).closest("table"),k.get(0)){for(w=k.parent().contents(),y=w.length-1,x=w.get(y);null!==x.nodeValue&&(" "===x.nodeValue||""===x.nodeValue);)y-=1,x=w.get(y);x===k.get(0)&&o.insertAfter(o.createEmptyNode(C.document,"p"),k[0])}C.selectRange(c)}}),c=n.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,r=this,o=t||r.replacements;for(n=0,i=o.length;n<i;n+=2)e=e.replace(o[n],o[n+1]);return e}}),h=c.extend({init:function(e){c.fn.init.call(this,e),this.replacements=[/<(\/?)script([^>]*)>/i,"<$1telerik:script$2>"]},applicable:function(e){return!this.options.none&&/<script[^>]*>/i.test(e)}}),p=c.extend({init:function(e){c.fn.init.call(this,e);var t=" ";this.replacements=[/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi,t,/\t/gi,t,/&nbsp;&nbsp; &nbsp;/gi,t]},applicable:function(e){return/&nbsp;&nbsp; &nbsp;|class="?Apple-tab-span/i.test(e)}}),f=c.extend({init:function(e){c.fn.init.call(this,e),this.junkReplacements=[/<\?xml[^>]*>/gi,"",/<!--(.|\n)*?-->/g,"",/&quot;/g,"'",/<o:p>&nbsp;<\/o:p>/gi,"&nbsp;",/<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi,"",/<\/o>/g,""],this.replacements=this.junkReplacements.concat([/(?:<br>&nbsp;[\s\r\n]+|<br>)*(<\/?(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)[^>]*>)(?:<br>&nbsp;[\s\r\n]+|<br>)*/g,"$1",/<br><br>/g,"<BR><BR>",/<br>(?!\n)/g," ",/<table([^>]*)>(\s|&nbsp;)+<t/gi,"<table$1><t",/<tr[^>]*>(\s|&nbsp;)*<\/tr>/gi,"",/<tbody[^>]*>(\s|&nbsp;)*<\/tbody>/gi,"",/<table[^>]*>(\s|&nbsp;)*<\/table>/gi,"",/<BR><BR>/g,"<br>",/^\s*(&nbsp;)+/gi,"",/(&nbsp;|<br[^>]*>)+\s*$/gi,"",/mso-[^;"]*;?/gi,"",/<(\/?)b(\s[^>]*)?>/gi,"<$1strong$2>",/<(\/?)font(\s[^>]*)?>/gi,this.convertFontMatch,/<(\/?)i(\s[^>]*)?>/gi,"<$1em$2>",/style=(["|'])\s*\1/g,"",/(<br[^>]*>)?\n/g,function(e,t){return t?e:" "}])},convertFontMatch:function(e,t,n){var i=/face=['"]([^'"]+)['"]/i,r=i.exec(n),o=n&&r&&r[1];return t?"</span>":o?'<span style="font-family:'+o+'">':"<span>"},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(/<a([^>]*)>\s*<\/a>/gi,function(e,t){return!t||t.indexOf("href")<0?"":e})},listType:function(e,t){var n,i=e.innerHTML,r=o.innerText(e),a=i.match(/^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=a&&a[1],l=/^[a-z\d]/i.test(s),d=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return a&&(n=!0),i=i.replace(/<\/?\w+[^>]*>/g,"").replace(/&nbsp;/g," "),!n&&/^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(i)||n&&/^.\u00a0+/.test(i)||s&&!l&&t?{tag:"ul",style:this._guessUnorderedListStyle(d(r))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(d(r))}:void 0},_convertToLi:function(e){var t,n=o.name(e);return 1==e.childNodes.length?t=e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""):(o.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&o.remove(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&o.remove(e.firstChild),t="p"!=n?"<"+n+">"+e.innerHTML+"</"+n+">":e.innerHTML),o.remove(e),o.create(document,"li",{innerHTML:t})},_guessUnorderedListStyle:function(e){return/^[\u2022\u00b7\u00FC\u00D8\u002dv-]/.test(e)?null:/^o/.test(e)?"circle":"square"},_guessOrderedListStyle:function(e){var t=null;return/^\d/.test(e)||(t=(/^[a-z]/.test(e)?"lower-":"upper-")+(/^[ivxlcdm]/i.test(e)?"roman":"alpha")),t},extractListLevels:function(e){var n=/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi;return e=e.replace(n,function(e,n,i){return t.format('data-list="{0}" data-level="{1}" {2}',n,i,e)})},_createList:function(e,t){return o.create(document,e,{style:{listStyleType:t}})},lists:function(t){var n,i,r,a,s,l,d,u,c,h,p,f,m,g,v,_,b=e(t).find(o.blockElements.join(",")),k=-1,w={},y=["p","h1","h2","h3","h4","h5","h6"];for(u=0;u<b.length;u++)c=b[u],m=e(c).data(),g=m.list,n=o.name(c),"td"!=n&&(v=this.listType(c,m),h=v&&v.tag,!h||y.indexOf(n)<0?c.innerHTML?i&&!l&&i.append(c):o.remove(c):(p=m.level||parseFloat(c.style.marginLeft||0),_=h+g,w[p]||(w[p]={}),(!r||r<0)&&(r=p,a=g,s=e(t).find("[data-list='"+a+"']:last")[0],d=this._createList(h,v.style),o.insertBefore(d,c),k=p,w[p][_]=d),l=s===c,f=w[p][_],(p>k||!f)&&(f=this._createList(h,v.style),w[p][_]=f,i.appendChild(f)),i=this._convertToLi(c),f.appendChild(i),l?r=k=-1:k=p))},removeAttributes:function(e){for(var t=e.attributes,n=t.length;n--;)"colspan"!=o.name(t[n])&&e.removeAttributeNode(t[n])},createColGroup:function(n){var i=n.cells,r=e(n).closest("table"),o=r.children("colgroup");i.length<2||(o.length&&(i=o.children(),o[0].parentNode.removeChild(o[0])),o=e(e.map(i,function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('<col style="width:{0}px;"/>',n):"<col />"}).join("")),o.is("colgroup")||(o=e("<colgroup/>").append(o)),o.prependTo(r))},convertHeaders:function(t){var n,i=t.cells,r=e.map(i,function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==o.name(n))return n});if(r.length==i.length){for(n=0;n<r.length;n++)o.unwrap(r[n]);for(e(t).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(t),n=0;n<i.length;n++)o.changeTag(i[n],"th")}},removeParagraphs:function(t){var n,i,r,a,s;for(n=0;n<t.length;n++)for(this.removeAttributes(t[n]),a=e(t[n]),s=a.children("p"),i=0,r=s.length;i<r;i++)i<r-1&&o.insertAfter(o.create(document,"br"),s[i]),o.unwrap(s[i])},removeDefaultColors:function(e){for(var t=0;t<e.length;t++)/^\s*color:\s*[^;]*;?$/i.test(e[t].style.cssText)&&o.unwrap(e[t])},tables:function(t){var n,i,r,o,a,s=e(t).find("table"),l=this;for(o=0;o<s.length;o++){for(n=s[o].rows,r=i=n[0],a=1;a<n.length;a++)n[a].cells.length>r.cells.length&&(r=n[a]);l.createColGroup(r),l.convertHeaders(i),l.removeAttributes(s[o]),l.removeParagraphs(s.eq(o).find("td,th")),l.removeDefaultColors(s.eq(o).find("span"))}},headers:function(t){var n,i=e(t).find("p.MsoTitle");for(n=0;n<i.length;n++)o.changeTag(i[n],"h1")},removeFormatting:function(t){e(t).find("*").each(function(){e(this).css({fontSize:"",fontFamily:""}),this.getAttribute("style")||this.style.cssText||this.removeAttribute("style")})},clean:function(e){var t,n=this,i=this.options;return i.none?(e=c.fn.clean.call(n,e,this.junkReplacements),e=n.stripEmptyAnchors(e)):(e=this.extractListLevels(e),e=c.fn.clean.call(n,e),e=n.stripEmptyAnchors(e),t=o.create(document,"div",{innerHTML:e}),n.headers(t),i.msConvertLists&&n.lists(t),n.tables(t),i.msAllFormatting&&n.removeFormatting(t),e=t.innerHTML.replace(/(<[^>]*)\s+class="?[^"\s>]*"?/gi,"$1")),e}}),m=c.extend({init:function(e){c.fn.init.call(this,e),this.replacements=[/\s+class="Apple-style-span[^"]*"/gi,"",/<(div|p|h[1-6])\s+style="[^"]*"/gi,"<$1",/^<div>(.*)<\/div>$/,"$1"]},applicable:function(e){return/class="?Apple-style-span|style="[^"]*-webkit-nbsp-mode/i.test(e)}}),g=c.extend({clean:function(e){var t=o.create(document,"div",{innerHTML:e});return t=this.cleanDom(t),t.innerHTML},cleanDom:function(e){return e}}),v=g.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each(function(){o.unwrap(this)}),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=g.extend({cleanDom:function(t){var n=this.collectAttr(),i=e(t).find("["+n.join("],[")+"]");return i.removeAttr(n.join(" ")),t},collectAttr:function(){return this.options.css?["class","style"]:[]},applicable:function(){return this.options.css}}),b=function(){this.text="",this.add=function(e){this.text+=e}},k=n.extend({init:function(e){this.separators=e||{text:" ",line:"<br/>"},this.lines=[],this.inlineBlockText=[],this.resetLine()},appendText:function(e){3===e.nodeType&&(e=e.nodeValue),this.textContainer.add(e)},appendInlineBlockText:function(e){this.inlineBlockText.push(e)},flashInlineBlockText:function(){this.inlineBlockText.length&&(this.appendText(this.inlineBlockText.join(" ")),this.inlineBlockText=[])},endLine:function(){this.flashInlineBlockText(),this.resetLine()},html:function(){var e,t,n,i,r,o,a,s,l=this.separators,d="",u=this.lines;for(this.flashInlineBlockText(),e=0,t=u.length,n=t-1;e<t;e++){for(i=u[e],r=0,o=i.length,a=o-1;r<o;r++)s=i[r].text,d+=s,r!==a&&(d+=l.text);e!==n&&(d+=l.line)}return d},resetLine:function(){this.textContainer=new b,this.line=[],this.line.push(this.textContainer),this.lines.push(this.line)}}),w=n.extend({init:function(e){this.callback=e},enumerate:function(e){var t,n;e&&(t=this.callback(e),n=e.firstChild,!t&&n&&this.enumerate(n),this.enumerate(e.nextSibling))}}),y=c.extend({init:function(t){c.fn.init.call(this,t),this.hasText=!1,this.enumerator=new w(e.proxy(this.buildText,this))},clean:function(e){var t=o.create(document,"div",{innerHTML:e});return this.cleanDom(t)},cleanDom:function(e){return this.separators=this.getDefaultSeparators(),this.htmlLines=new k(this.separators),this.enumerator.enumerate(e.firstChild),this.hasText=!1,this.htmlLines.html()},buildText:function(e){if(o.isDataNode(e)){if(o.isEmptyspace(e))return;this.htmlLines.appendText(e.nodeValue.replace("\n",this.separators.line)),this.hasText=!0}else{if(o.isBlock(e)&&this.hasText){var t=this.actions[o.name(e)]||this.actions.block;return t(this,e)}o.isBr(e)&&this.htmlLines.appendText(this.separators.line)}},applicable:function(){var e=this.options;return e.all||e.keepNewLines},getDefaultSeparators:function(){return this.options.all?{text:" ",line:" "}:{text:" ",line:"<br/>"}},actions:{ul:e.noop,ol:e.noop,table:e.noop,thead:e.noop,tbody:e.noop,td:function(e,t){var n=new y({all:!0}),i=n.cleanDom(t);return e.htmlLines.appendInlineBlockText(i),!0},block:function(e){e.htmlLines.endLine()}}}),x=c.extend({clean:function(e){return this.options.custom(e)},applicable:function(){return"function"==typeof this.options.custom}});d(i,{Clipboard:u,Cleaner:c,ScriptCleaner:h,TabCleaner:p,MSWordFormatCleaner:f,WebkitFormatCleaner:m,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:y,HtmlTextLines:k,CustomCleaner:x})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/keyboard.min",["editor/command.min"],e)}(function(){!function(e){function t(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}function n(e,t,n){for(var i=e?e[t]:null;i&&!n(i);)i=i[t];return i}var i=window.kendo,r=i.Class,o=i.ui.editor,a=o.RangeUtils,s=o.Dom,l=o.RestorePoint,d=o.Marker,u=i.support.browser,c='<br class="k-br">',h=e.extend,p=s.nodeTypes,f="previousSibling",m="td,th,caption",g="table,tbody,thead,tfoot,tr",v=g+","+m,_=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(g)},b=r.extend({remove:function(t){var n,i,r,o,l,u,c,h=this,p=new d;p.add(t,!1),n=a.getAll(t,function(t){return e(t).is(v)}),i=a.documentFromRange(t),r=p.start,o=p.end,l=m.split(","),u=s.parentOfType(r,l),c=s.parentOfType(o,l),h._removeContent(r,u,!0),h._removeContent(o,c,!1),e(n).each(function(t,n){n=e(n),(n.is(m)?n:n.find(m)).each(function(e,t){t.innerHTML="&#65279;"})}),u&&!r.previousSibling&&s.insertBefore(i.createTextNode("\ufeff"),r),c&&!o.nextSibling&&s.insertAfter(i.createTextNode("\ufeff"),o),u?t.setStartBefore(r):n[0]&&(u=e(n[0]),u=u.is(m)?u:u.find(m).first(),u.length&&t.setStart(u.get(0),0)),t.collapse(!0),s.remove(r),s.remove(o)},_removeContent:function(t,n,i){if(n){var r,o=i?"nextSibling":"previousSibling",a=function(t){for(;t&&!t[o];)t=t.parentNode;return t&&e.contains(n,t)?t[o]:null};for(t=a(t);t;)r=a(t),s.remove(t),t=r}}}),k=r.extend({init:function(e){this.editor=e},keydown:function(n){var i,r,a,s,d=this,c=d.editor,p=c.keyboard,f=p.isTypingKey(n),m=h(e.Event(),n);return d.editor.trigger("keydown",m),m.isDefaultPrevented()?(n.preventDefault(),!0):!(m.isDefaultPrevented()||!f||p.isTypingInProgress())&&(i=c.getRange(),r=c.body,d.startRestorePoint=new l(i,r),_(i)&&(a=new b(c),a.remove(i),c.selectRange(i)),u.webkit&&!i.collapsed&&t(r,i)&&(r.innerHTML=""),c.immutables&&o.Immutables.immutablesContext(i)&&(s=new o.BackspaceHandler(c),s.deleteSelection(i)),p.startTyping(function(){d.endRestorePoint=o._finishUpdate(c,d.startRestorePoint)}),!0)},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)}}),w=r.extend({init:function(e){this.editor=e},_addCaret:function(e){var t=s.create(this.editor.document,"a");return s.insertAt(e,t,0),s.stripBomNode(t.previousSibling),s.stripBomNode(t.nextSibling),t},_restoreCaret:function(e){var t=this.editor.createRange();!e.nextSibling&&s.isDataNode(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.length):t.setStartAfter(e),
t.collapse(!0),this.editor.selectRange(t),s.remove(e)},_handleDelete:function(e){var t,n,i=e.endContainer,r=s.closestEditableOfType(i,s.blockElements);return!(!r||!o.RangeUtils.isEndOf(e,r))&&(t=s.next(r),!(!t||"p"!=s.name(t))&&(n=this._addCaret(t),this._merge(r,t),this._restoreCaret(n),!0))},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,r=0;t-r>=0&&"\ufeff"==i[t-r-1];)r++;r>0&&(n.deleteData(t-r,r),e.setStart(n,Math.max(0,t-r)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var i,r,a,l,d,u,c,h,p,m,g,v,_,b=t.startContainer,k=s.closestEditableOfType(b,["li"]),w=s.closestEditableOfType(b,"p,h1,h2,h3,h4,h5,h6".split(",")),y=this.editor;if(s.isDataNode(b)){if(t.collapsed&&/^\s[\ufeff]+$/.test(b.nodeValue))return t.setStart(b,0),t.setEnd(b,b.length),y.selectRange(t),!1;this._cleanBomBefore(t)}return i=n(w,f,function(e){return!s.htmlIndentSpace(e)}),t.collapsed&&t.startOffset!==t.endOffset&&t.startOffset<0&&(t.startOffset=0,t.endOffset=0,y.selectRange(t)),r=k&&o.RangeUtils.isStartOf(t,k),a=k&&e(k).index(),l=r&&a>0,l&&(w=k,i=s.prev(k)),w&&i&&s.is(i,"table")&&o.RangeUtils.isStartOf(t,w)?(""===w.innerText&&(w.innerHTML="\ufeff"),!0):w&&i&&o.RangeUtils.isStartOf(t,w)||l?(d=this._addCaret(w),this._merge(i,w),this._restoreCaret(d),!0):r&&0===a?(u=k.firstChild,u||(k.innerHTML=o.emptyElementContent,u=k.firstChild),c=new o.ListFormatter(s.name(k.parentNode),"p"),t.selectNodeContents(k),c.toggle(t),s.insignificant(u)?t.setStartBefore(u):t.setStart(u,0),y.selectRange(t),!0):(h=b.childNodes[t.startOffset-1],p=t,m=h&&s.closestEditableOfType(h,["a"]),g=n(h||b,f,function(e){return!s.isDataNode(e)||!s.isBom(e)&&e.length>0}),(m||(0===t.startOffset||h)&&s.is(g,"a"))&&(m=m||g,p=y.createRange(),p.setStart(m,m.childNodes.length),p.collapse(!0)),m=m||s.closestEditableOfType(h||p.startContainer,["a"]),v=m&&o.RangeUtils.isEndOf(p,m),v&&(_=new o.UnlinkCommand({range:p,body:y.body,immutables:!!y.immutables}),y.execCommand(_),y._selectionChange()),!1)},_handleSelection:function(t){var n,i,r,a,l=t.commonAncestorContainer,u=s.closest(l,"table"),c=o.emptyElementContent,h=this.editor;return _(t)?(n=new b(h),n.remove(t),h.selectRange(t),!0):(i=new d,i.add(t,!1),h.immutables&&this._handleImmutables(i),this._surroundFullySelectedAnchor(i,t),t.setStartAfter(i.start),t.setEndBefore(i.end),r=t.startContainer,a=t.endContainer,t.deleteContents(),u&&""===e(u).text()&&(t.selectNode(u),t.deleteContents()),l=t.commonAncestorContainer,"p"===s.name(l)&&""===l.innerHTML&&(l.innerHTML=c,t.setStart(l,0)),this._join(r,a),s.insertAfter(h.document.createTextNode("\ufeff"),i.start),i.remove(t),r=t.startContainer,"tr"==s.name(r)&&(r=r.childNodes[Math.max(0,t.startOffset-1)],t.setStart(r,s.getNodeLength(r))),t.collapse(!0),h.selectRange(t),!0)},_handleImmutables:function(e){var t=o.Immutables.immutableParent,n=t(e.start),i=t(e.start);n&&s.insertBefore(e.start,n),i&&s.insertAfter(e.end,i),n&&s.remove(n),i&&i.parentNode&&s.remove(i)},_surroundFullySelectedAnchor:function(t,n){var i=t.start,r=e(i).closest("a").get(0),o=t.end,l=e(o).closest("a").get(0);r&&a.isStartOf(n,r)&&s.insertBefore(i,r),l&&a.isEndOf(n,l)&&s.insertAfter(o,l)},_root:function(e){for(;e&&"body"!=s.name(e)&&e.parentNode&&"body"!=s.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){e=this._root(e),t=this._root(t),e!=t&&s.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(s.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=s.list(e)?e.children[e.children.length-1]:e,e&&e.appendChild(t.firstChild)):e.nodeType===p.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);s.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===p.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?s.insertAfter(t,e.nextSibling):s.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var t,n,r=this.editor,a=r.getRange(),s=e.keyCode,d=i.keys,u=s===d.BACKSPACE,c=s==d.DELETE;r.immutables&&r.immutables.keydown(e,a)||(!u&&!c||a.collapsed?u?t="_handleBackspace":c&&(t="_handleDelete"):t="_handleSelection",t&&(n=new l(a,r.body),this[t](a)&&(e.preventDefault(),o._finishUpdate(r,n))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),y=r.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=o._finishUpdate(this.editor,this.startRestorePoint)},changed:function(){return!!this.startRestorePoint&&this.startRestorePoint.html!=this.editor.body.innerHTML},keydown:function(e){var t=this,n=t.editor,i=n.keyboard;return i.isModifierKey(e)?(i.isTypingInProgress()&&i.endTyping(!0),t.startRestorePoint=new l(n.getRange(),n.body),!0):!!i.isSystem(e)&&(t.systemCommandIsInProgress=!0,t.changed()&&(t.systemCommandIsInProgress=!1,t.createUndoCommand()),!0)},keyup:function(){var e=this;return!(!e.systemCommandIsInProgress||!e.changed())&&(e.systemCommandIsInProgress=!1,e.createUndoCommand(),!0)}}),x=r.extend({init:function(e){this.editor=e},keydown:function(e){!u.webkit||e.isDefaultPrevented()||!e.ctrlKey||65!=e.keyCode||e.altKey||e.shiftKey||(this.editor.options.immutables&&this._toSelectableImmutables(),this._selectEditorBody())},_selectEditorBody:function(){var e=this.editor,t=e.getRange();t.selectNodeContents(e.body),e.selectRange(t)},_toSelectableImmutables:function(){for(var t=this.editor,n=t.body,i=o.Immutables.immutable,r=s.emptyTextNode,a=n.firstChild,l=n.lastChild;r(a);)a=a.nextSibling;for(;r(l);)l=l.previousSibling;a&&i(a)&&e(c).prependTo(n),l&&i(l)&&e(c).appendTo(n)},keyup:e.noop}),C=r.extend({init:function(e){this.handlers=e,this.typingInProgress=!1},isCharacter:function(e){return e>=48&&e<=90||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||229==e},toolFromShortcut:function(t,n){var i,r,o=String.fromCharCode(n.keyCode),a=this._getShortcutModifier(n,navigator.platform);for(i in t)if(r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(r.key==o||r.key==n.keyCode)&&r.ctrl==a&&r.alt==n.altKey&&r.shift==n.shiftKey)return i},_getShortcutModifier:function(e,t){var n=t.toUpperCase().indexOf("MAC")>=0;return n?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,n){var i,r,o,a=String.fromCharCode(n.keyCode),s=[],l=function(e){return e==a||e==n.keyCode||e==n.charCode};for(i in t)r=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),o=e.isArray(r.key)?e.grep(r.key,l).length>0:l(r.key),o&&r.ctrl==n.ctrlKey&&r.alt==n.altKey&&r.shift==n.shiftKey&&s.push(t[i]);return s},isTypingKey:function(e){var t=e.keyCode;return this.isCharacter(t)&&!e.ctrlKey&&!e.altKey||32==t||13==t||8==t||46==t&&!e.shiftKey&&!e.ctrlKey&&!e.altKey},isModifierKey:function(e){var t=e.keyCode;return 17==t&&!e.shiftKey&&!e.altKey||16==t&&!e.ctrlKey&&!e.altKey||18==t&&!e.ctrlKey&&!e.shiftKey},isSystem:function(e){return 46==e.keyCode&&e.ctrlKey&&!e.altKey&&!e.shiftKey},startTyping:function(e){this.onEndTyping=e,this.typingInProgress=!0},stopTyping:function(){this.typingInProgress&&this.onEndTyping&&this.onEndTyping(),this.typingInProgress=!1},endTyping:function(t){var n=this;n.clearTimeout(),t?n.stopTyping():n.timeout=window.setTimeout(e.proxy(n.stopTyping,n),1e3)},isTypingInProgress:function(){return this.typingInProgress},clearTimeout:function(){window.clearTimeout(this.timeout)},notify:function(e,t){var n,i=this.handlers;for(n=0;n<i.length&&!i[n][t](e);n++);},keydown:function(e){this.notify(e,"keydown")},keyup:function(e){this.notify(e,"keyup")}});h(o,{TypingHandler:k,SystemHandler:y,BackspaceHandler:w,SelectAllHandler:x,Keyboard:C})}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/exportpdf.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.EditorUtils,o=r.registerTool,a=n.Tool,s=n.ToolTemplate,l=e.extend,d=i.extend({init:function(e){this.async=!0,i.fn.init.call(this,e)},exec:function(){var e=this,t=e.lockRange(!0),n=e.editor;n._destroyResizings(),n.saveAsPDF().then(function(){e.releaseRange(t),n._initializeColumnResizing(),n._initializeRowResizing(),n._initializeTableResizing()})}});l(n,{ExportPdfCommand:d}),o("pdf",new a({command:d,template:new s({template:r.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/plugins/print.min",["editor/command.min"],e)}(function(){!function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,r=n.EditorUtils,o=r.registerTool,a=n.Tool,s=n.ToolTemplate,l=e.extend,d=i.extend({init:function(e){i.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor;t.support.browser.msie?e.document.execCommand("print",!1,null):e.window.print&&e.window.print()}});l(n,{PrintCommand:d}),o("print",new a({command:d,template:new s({template:r.buttonTemplate,title:"Print"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/resizing-utils.min",["editor/main.min"],e)}(function(){!function(e,t){function n(e){var t=e.value,n=e.min,i=e.max;return h(c(p(t),p(i)),p(n))}function i(t){return t&&!f(t).is("body")&&t.scrollHeight>t.clientHeight?e.support.scrollbar():0}function r(e,t){return o(e)?p(e):p(e)/t*100}function o(e){return typeof e===w&&b.test(e)}function a(e){return typeof e===w&&k.test(e)}function s(e){return p(e)+v}function l(e){return p(e)+_}var d=window,u=d.Math,c=u.min,h=u.max,p=d.parseFloat,f=e.jQuery,m=f.extend,g=e.ui.editor,v="%",_="px",b=/(\d+)(\.?)(\d*)%/,k=/(\d+)(\.?)(\d*)px/,w="string",y={constrain:n,getScrollBarWidth:i,calculatePercentageRatio:r,inPercentages:o,inPixels:a,toPercentages:s,toPixels:l};m(g,{ResizingUtils:y})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-element-resizing.min",["editor/main.min","kendo.resizable.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var n=e.jQuery,i=n.extend,r=n.noop,o=n.proxy,a=e.ui.editor,s=e.Class,l="keydown",d="mousedown",u="mouseenter",c="mouseleave",h="mousemove",p="mouseup",f=",",m=".",g=":last-child",v="table",_=s.extend({init:function(e,t){var r=this;r.options=i({},r.options,t),r.options.tags=n.isArray(r.options.tags)?r.options.tags:[r.options.tags],n(e).is(v)&&(r.element=e,r._attachEventHandlers())},destroy:function(){var e=this,t=e.options.eventNamespace;e.element&&(n(e.element).off(t),e.element=null),n(e.options.rootElement).off(l+t),e._destroyResizeHandle()},options:{tags:[],min:0,rootElement:null,eventNamespace:"",rtl:!1,handle:{dataAttribute:"",height:0,width:0,classNames:{},template:""}},_attachEventHandlers:function(){var e=this,t=e.options;n(e.element).on(h+t.eventNamespace,t.tags.join(f),o(e.detectElementBorderHovering,e))},resizingInProgress:function(){var e=this,t=e._resizable;return!!t&&!!t.resizing},resize:r,detectElementBorderHovering:function(e){var t=this,i=t.options,r=i.handle,o=n(e.currentTarget),a=t.resizeHandle,s=r.dataAttribute;t.resizingInProgress()||(!o.is(g)&&t.elementBorderHovered(o,e)?a?a.data(s)&&a.data(s)!==o[0]&&t.showResizeHandle(o,e):t.showResizeHandle(o,e):a&&t._destroyResizeHandle())},elementBorderHovered:r,showResizeHandle:function(e,t){var n=this;0===t.buttons&&(n._initResizeHandle(),n.setResizeHandlePosition(e),n.setResizeHandleDimensions(),n.setResizeHandleDataAttributes(e[0]),n._attachResizeHandleEventHandlers(),n._initResizable(e),n._hideResizeMarker(),n.resizeHandle.show())},_initResizeHandle:function(){var e=this,t=e.options;e._destroyResizeHandle(),e.resizeHandle=n(t.handle.template).appendTo(t.rootElement)},setResizeHandlePosition:r,setResizeHandleDimensions:r,setResizeHandleDataAttributes:function(e){var t=this;t.resizeHandle.data(t.options.handle.dataAttribute,e)},_attachResizeHandleEventHandlers:function(){var e=this,t=e.options,n=t.eventNamespace,i=t.handle.classNames.marker,r=e.resizeHandle;e.resizeHandle.on(d+n,function(){r.find(m+i).show()}).on(p+n,function(){r.find(m+i).hide()})},_hideResizeMarker:function(){var e=this;e.resizeHandle.find(m+e.options.handle.classNames.marker).hide()},_destroyResizeHandle:function(){var e=this;e.resizeHandle&&(e._destroyResizable(),e.resizeHandle.off(e.options.eventNamespace).remove(),e.resizeHandle=null)},_initResizable:function(t){var n=this;n.resizeHandle&&(n._destroyResizable(),n._resizable=new e.ui.Resizable(t,{draggableElement:n.resizeHandle[0],start:o(n.onResizeStart,n),resize:o(n.onResize,n),resizeend:o(n.onResizeEnd,n)}))},_destroyResizable:function(){var e=this;e._resizable&&(e._resizable.destroy(),e._resizable=null)},onResizeStart:function(){this._disableKeyboard()},onResize:function(e){this.setResizeHandleDragPosition(e)},setResizeHandleDragPosition:r,onResizeEnd:function(e){var t=this;t.resize(e),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var e=this.options;n(e.rootElement).off(l+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;n(e.rootElement).on(l+e.eventNamespace,function(e){e.preventDefault()})},_forceResizing:function(e){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(e)}}),b=s.extend({create:function(e,t){var i=this,r=t.name,o=t.eventNamespace;n(e.body).on(u+o,v,function(n){var o=n.currentTarget,a=e[r];n.stopPropagation(),a?a.element===o||a.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,o,t)):i._initResizing(e,o,t)}).on(c+o,v,function(o){var a,s=e[r];o.stopPropagation(),!s||s.resizingInProgress()||s.resizeHandle||(a=n(s.element).parents(v)[0],a&&(i._destroyResizing(e,t),i._initResizing(e,a,t)))}).on(c+o,function(){var n=e[r];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)}).on(p+o,function(o){var a,s=e[r];s&&s.resizingInProgress()&&(a=n(o.target).parents(v)[0],a&&(s._forceResizing(o),i._destroyResizing(e,t),i._initResizing(e,a,t)))})},dispose:function(e,t){n(e.body).off(t.eventNamespace)},_initResizing:function(t,n,i){var r=i.name,o=i.type;t[r]=new o(n,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var n=t.name;e[n]&&(e[n].destroy(),e[n]=null)}});b.current=new b,_.create=function(e,t){b.current.create(e,t)},_.dispose=function(e,t){b.current.dispose(e,t)},i(a,{TableElementResizing:_})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/column-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],e)}(function(){!function(e,t){var n=window,i=n.Math,r=i.abs,o=e.jQuery,a=o.extend,s=e.ui.editor,l=s.TableElementResizing,d=s.ResizingUtils,u=d.constrain,c=d.calculatePercentageRatio,h=d.getScrollBarWidth,p=d.inPercentages,f=d.toPercentages,m=d.toPixels,g=e._outerWidth,v=".kendoEditorColumnResizing",_="k-column-resize-handle",b="k-column-resize-marker",k="body",w="tbody",y="td",x="th",C="tr",T=",",S="width",D=l.extend({options:{tags:[y,x],min:20,rootElement:null,eventNamespace:v,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:_,marker:b},template:'<div class="k-column-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+_+'"><div class="'+b+'"></div></div></div>'}},elementBorderHovered:function(e,t){var n=this,i=n.options,r=i.handle.width,a=e.offset().left+(i.rtl?0:g(e)),s=t.clientX+o(e[0].ownerDocument).scrollLeft();return s>a-r&&s<a+r},setResizeHandlePosition:function(e){var t=this,n=o(t.element).children(w),i=t.options,r=i.rtl,a=i.handle.width,s=o(i.rootElement),l=s.is(k)?0:s.scrollTop(),d=s.is(k)?0:s.scrollLeft(),u=r?0:g(e),c=r?h(s[0]):0;t.resizeHandle.css({top:n.position().top+l,left:e.position().left+u+(d-c)-a/2,position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=o(e.element).children(w);e.resizeHandle.css({width:e.options.handle.width,height:t.height()})},setResizeHandleDragPosition:function(e){var t=this,n=o(o(e.currentTarget).data(t.options.handle.dataAttribute)),i=t.options,r=i.handle?i.handle.width:0,a=i.min,s=i.rtl,l=g(n),d=n.position().left,c=g(n.next()),p=o(t.resizeHandle),f=o(i.rootElement),m=f.is(k)?0:f.scrollLeft(),v=s?h(f[0]):0,_=u({value:p.position().left+(m-v)+e.x.delta,min:d+(m-v)-(s?c:0)+a,max:d+l+(m-v)+(s?0:c)-r-a});p.css({left:_})},resize:function(e){var t,n,i,r=this,a=o(o(e.currentTarget).data(r.options.handle.dataAttribute)),s=r.options,l=s.rtl?-1:1,d=s.min,c=l*e.x.initialDelta;r._setTableComputedWidth(),r._setColumnsComputedWidth(),i=g(a),n=g(a.next()),t=u({value:i+c,min:d,max:i+n-d}),r._resizeColumn(a[0],t),r._resizeTopAndBottomColumns(a[0],t),r._resizeAdjacentColumns(a.index(),n,i,i-t)},_setTableComputedWidth:function(){var e=this.element;""===e.style[S]&&(e.style[S]=m(g(o(e))))},_setColumnsComputedWidth:function(){var e,t=this,n=o(t.element).children(w),i=g(n),r=n.children(C).children(y),a=r.length,s=r.map(function(){return g(o(this))});for(e=0;e<a;e++)r[e].style[S]=p(r[e].style[S])?f(c(s[e],i)):m(s[e])},_resizeTopAndBottomColumns:function(e,t){var n,i=this,r=o(e).index(),a=o(i.element).children(w).children(C).children(i.options.tags.join(T)).filter(function(){var t=this;return o(t).index()===r&&t!==e}),s=a.length;for(n=0;n<s;n++)i._resizeColumn(a[n],t)},_resizeColumn:function(e,t){e.style[S]=p(e.style[S])?f(c(t,g(o(this.element).children(w)))):m(t)},_resizeAdjacentColumns:function(e,t,n,i){var r,a=this,s=o(a.element).children(w).children(C).children(a.options.tags.join(T)).filter(function(){return o(this).index()===e+1}),l=s.length;for(r=0;r<l;r++)a._resizeAdjacentColumn(s[r],t,n,i)},_resizeAdjacentColumn:function(e,t,n,i){var o=this,a=o.options.min,s=u({value:t+i,min:a,max:r(n+t-a)});o._resizeColumn(e,s)}});D.create=function(e){l.create(e,{name:"columnResizing",type:D,eventNamespace:v})},D.dispose=function(e){l.dispose(e,{eventNamespace:v})},a(s,{ColumnResizing:D})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/row-resizing.min",["editor/main.min","editor/resizing/resizing-utils.min","editor/resizing/table-element-resizing.min"],e)}(function(){!function(e,t){var n=window.Math,i=n.abs,r=e.jQuery,o=r.extend,a=e.ui.editor,s=a.TableElementResizing,l=a.ResizingUtils,d=l.getScrollBarWidth,u=l.constrain,c=l.calculatePercentageRatio,h=l.inPercentages,p=l.toPercentages,f=l.toPixels,m=e._outerHeight,g=".kendoEditorRowResizing",v="k-row-resize-handle",_="k-row-resize-marker-wrapper",b="k-row-resize-marker",k="body",w="tr",y="tbody",x="height",C=s.extend({options:{tags:[w],min:20,rootElement:null,eventNamespace:g,rtl:!1,handle:{dataAttribute:"row",width:0,height:10,classNames:{handle:v,marker:b},template:'<div class="k-row-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="'+v+'"><div class="'+_+'"><div class="'+b+'"></div></div></div></div>'}},elementBorderHovered:function(e,t){var n=this,i=n.options.handle[x],o=e.offset().top+m(e),a=t.clientY+r(e[0].ownerDocument).scrollTop();return a>o-i&&a<o+i},setResizeHandlePosition:function(e){var t=this,n=t.options,i=n.handle[x],o=e.position(),a=r(n.rootElement),s=a.is(k)?0:a.scrollTop(),l=a.is(k)?0:a.scrollLeft(),u=n.rtl?d(a[0]):0;t.resizeHandle.css({top:o.top+m(e)+s-i/2,left:o.left+(l-u),position:"absolute"})},setResizeHandleDimensions:function(){var e=this;e.resizeHandle.css({width:r(e.element).children(y).width(),height:e.options.handle[x]})},setResizeHandleDragPosition:function(e){var t=this,n=t.options,i=n.min,o=r(t.element).children(y),a=o.position().top,s=r(t.resizeHandle),l=r(e.currentTarget).data(n.handle.dataAttribute),d=r(n.rootElement),c=d.is(k)?0:d.scrollTop(),h=u({value:s.position().top+c+e.y.delta,min:r(l).position().top+c+i,max:a+m(o)+c-n.handle[x]-i});s.css({top:h})},resize:function(e){var t=this,n=t.options,o=r(e.currentTarget).data(n.handle.dataAttribute),a=m(r(o)),s=r(t.element),l=m(s),d=s.children(y),c=d.height(),p=o.style[x],g=u({value:a+e.y.initialDelta,min:n.min,max:i(c-n.min)});t._setRowsHeightInPixels(),o.style[x]=f(g),t._setTableHeight(l+(g-a)),h(p)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){var e,t=this,n=r(t.element).children(y).children(w),i=n.length,o=n.map(function(){return m(r(this))});for(e=0;e<i;e++)n[e].style[x]=f(o[e])},_setRowsHeightInPercentages:function(){var e,t=this,n=r(t.element).children(y),i=n.height(),o=n.children(w),a=o.length,s=o.map(function(){return m(r(this))});for(e=0;e<a;e++)o[e].style[x]=p(c(s[e],i))},_setTableHeight:function(e){var t=this.element;t.style[x]=h(t.style[x])?p(c(e,r(t).parent().height())):f(e)}});C.create=function(e){s.create(e,{name:"rowResizing",type:C,eventNamespace:g})},C.dispose=function(e){s.dispose(e,{eventNamespace:g})},o(a,{RowResizing:C})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-resize-handle.min",["editor/main.min","kendo.draganddrop.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){var n,i,r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C=e.jQuery,T=C.extend,S=C.noop,D=C.proxy,F=e.ui.editor,E=e.Class,A=e.ui.Draggable,I=e.Observable,R=F.ResizingUtils.getScrollBarWidth,M=e._outerWidth,z=e._outerHeight,H=".kendoEditorTableResizeHandle",N="k-table-resize-handle",B="dragStart",P="drag",L="dragEnd",O="halfInside",V="mouseover",W="mouseout",U="body",q="table",j="east",G="north",$="northeast",K="northwest",Y="south",Q="southeast",X="southwest",J="west",Z=".",ee=I.extend({init:function(e){var t=this;I.fn.init.call(t),t.options=T({},t.options,e),t.element=C(t.options.template).appendTo(t.options.appendTo)[0],t._attachEventHandlers(),t._addStyles(),t._initDraggable(),t._initPositioningStrategy(),t._initDraggingStrategy(),C(t.element).data(q,t.options.resizableElement)},destroy:function(){var e=this;C(e.element).off(H).remove(),e.element=null,e._destroyDraggable(),e.unbind()},options:{appendTo:null,direction:Q,resizableElement:null,rtl:!1,template:"<div class='k-table-resize-handle-wrapper' unselectable='on' contenteditable='false'><div class='"+N+"'></div></div>"},events:[B,P,L,V,W],show:function(){this._setPosition()},_setPosition:function(){var e=this,t=e._positioningStrategy.getPosition();C(e.element).css({top:t.top,left:t.left,position:"absolute"})},_attachEventHandlers:function(){var e=this;C(e.element).on(V+H,D(e._onMouseOver,e)).on(W+H,D(e._onMouseOut,e))},_onMouseOver:function(){this.trigger(V)},_onMouseOut:function(){this.trigger(W)},_addStyles:function(){var e=this;C(e.element).children(Z+N).addClass("k-resize-"+e.options.direction)},_initPositioningStrategy:function(){var e=this,t=e.options;e._positioningStrategy=n.create({name:t.direction,handle:e.element,resizableElement:t.resizableElement,rootElement:t.rootElement,rtl:t.rtl})},_initDraggable:function(){var e=this,t=e.element;!e._draggable&&t&&(e._draggable=new A(t,{dragstart:D(e._onDragStart,e),drag:D(e._onDrag,e),dragend:D(e._onDragEnd,e)}))},_onDragStart:function(){this.trigger(B)},_onDrag:function(e){var t=this;t.trigger(P,t._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(L)},_destroyDraggable:function(){var e=this;e._draggable&&(e._draggable.destroy(),e._draggable=null)},_initDraggingStrategy:function(){var e=this;e._draggingStrategy=h.create({name:e.options.direction})}}),te=E.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e){var t,n,i,r=this._items,o=r.length,a=e.name?e.name.toLowerCase():"";for(i=0;i<o;i++)if(n=r[i],n.name.toLowerCase()===a){t=n;break}if(t)return new t.type(e)}}),ne=te.extend({});ne.current=new ne,n=E.extend({init:function(e){var t=this;t.options=T({},t.options,e)},options:{handle:null,offset:O,resizableElement:null,rootElement:null,rtl:!1},getPosition:function(){var e=this,t=e.calculatePosition(),n=e.applyHandleOffset(t),i=e.applyScrollOffset(n);return i},calculatePosition:S,applyHandleOffset:function(e){var t=this.options,n=C(t.handle);return t.offset===O?{top:e.top-z(n)/2,left:e.left-M(n)/2}:e},applyScrollOffset:function(e){var t=this.options,n=C(t.rootElement),i=t.rtl?R(n[0]):0;return n.is(U)?e:{top:e.top+(n.scrollTop()||0),left:e.left+(n.scrollLeft()||0)-i}}}),n.create=function(e){return ne.current.create(e)},i=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e)/2,left:t.left+M(e)}}}),ne.current.register(j,i),r=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+M(e)/2}}}),ne.current.register(G,r),o=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left+M(e)}}}),ne.current.register($,o),a=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top,left:t.left}}}),ne.current.register(K,a),s=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e),left:t.left+M(e)/2}}}),ne.current.register(Y,s),l=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e),left:t.left+M(e)}}}),ne.current.register(Q,l),d=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e),left:t.left}}}),ne.current.register(X,d),u=n.extend({calculatePosition:function(){var e=C(this.options.resizableElement),t=e.position();return{top:t.top+z(e)/2,left:t.left}}}),ne.current.register(J,u),c=te.extend({}),c.current=new c,h=E.extend({init:function(e){var t=this;t.options=T({},t.options,e)},options:{deltaX:{adjustment:null,modifier:null},deltaY:{adjustment:null,modifier:null}},adjustDragDelta:function(e){var t=this.options,n=t.deltaX.adjustment*t.deltaX.modifier,i=t.deltaY.adjustment*t.deltaY.modifier;return{deltaX:e.deltaX*n,deltaY:e.deltaY*i,initialDeltaX:e.initialDeltaX*n,initialDeltaY:e.initialDeltaY*i}}}),h.create=function(e){return c.current.create(e)},p=h.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),f=p.extend({options:{deltaX:{modifier:1}}}),c.current.register(j,f),m=p.extend({options:{deltaX:{modifier:-1}}}),c.current.register(J,m),g=h.extend({options:{deltaX:{adjustment:0,modifier:0},deltaY:{adjustment:1,modifier:1}}}),v=g.extend({options:{deltaY:{modifier:-1}}}),c.current.register(G,v),_=g.extend({options:{deltaY:{modifier:1}}}),c.current.register(Y,_),b=h.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:1,modifier:1}}}),k=b.extend({options:{deltaX:{modifier:1},deltaY:{modifier:-1}}}),c.current.register($,k),w=b.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:-1}}}),c.current.register(K,w),y=b.extend({options:{deltaX:{modifier:1},deltaY:{modifier:1}}}),c.current.register(Q,y),x=b.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:1}}}),c.current.register(X,x),T(F,{TableResizeHandle:ee})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/resizing/table-resizing.min",["editor/main.min","editor/resizing/table-resize-handle.min","editor/resizing/resizing-utils.min"],e)}(function(){!function(e,t){function n(e){return t===e}var i=window,r=i.Math,o=r.min,a=r.max,s=e.jQuery,l=s.contains,d=s.extend,u=s.proxy,c=e.support.browser,h=e.ui.editor,p=e.Class,f=h.TableResizeHandle,m=h.ResizingUtils,g=m.calculatePercentageRatio,v=m.constrain,_=m.inPercentages,b=m.inPixels,k=m.toPercentages,w=m.toPixels,y=e._outerWidth,x=e._outerHeight,C=".kendoEditorTableResizing",T="k-table-resize-handle-wrapper",S="k-table",D="k-table-resizing",F="dragStart",E="drag",A="dragEnd",I="keydown",R="mousedown",M="mouseover",z="mouseout",H="td",N="tr",B="tbody",P="table",L="width",O="height",V="east",W="north",U="northeast",q="northwest",j="south",G="southeast",$="southwest",K="west",Y=".",Q=p.extend({init:function(e,t){var n=this;n.options=d({},n.options,t),n.handles=[],s(e).is(P)&&(n.element=e)},destroy:function(){var e=this;s(e.element).off(C),e.element=null,s(e.options.rootElement).off(I+C),e._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:q},{direction:W},{direction:U},{direction:V},{direction:G},{direction:j},{direction:$},{direction:K}]},resize:function(e){var t=this,n=d({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},e);t._resizeWidth(n.deltaX,n.initialDeltaX),t._resizeHeight(n.deltaY,n.initialDeltaY),t.showResizeHandles()},_resizeWidth:function(e,t){var i,r,l,d,u=this,c=s(u.element),h=c[0].style[L],p=y(c),f=c.parent().width(),m=u._getMaxDimensionValue(L);0!==e&&(n(u._initialElementWidth)&&(u._initialElementWidth=p),d=v({value:u._initialElementWidth+t,min:u.options.minWidth,max:m}),_(h)?(p+e>f?(r=a(d,f),l=o(d,f)):(r=o(d,f),l=a(d,f)),i=k(g(r,l))):i=w(d),u._setColumnsWidth(),c[0].style[L]=i)},_resizeHeight:function(e,t){var i,r,l,d,u=this,c=s(u.element),h=c[0].style[O],p=x(c),f=c.parent(),m=f.height(),b=u._getMaxDimensionValue(O),y=u.options.minHeight,C=u._hasRowsInPixels();0!==e&&(n(u._initialElementHeight)&&(u._initialElementHeight=p),d=v({value:u._initialElementHeight+t,min:y,max:b}),C&&e<0&&u._setRowsHeightInPercentages(),_(h)?(p+e>m?(r=a(d,m),l=o(d,m)):(r=o(d,m),l=a(d,m)),i=k(g(r,l))):i=w(d),c[0].style[O]=i,C&&e<0&&u._setRowsHeightInPixels())},_getMaxDimensionValue:function(e){var t=this,n=s(t.element),i=e.toLowerCase(),r=t.options.rtl?-1:1,o=s(t.element).parent(),a=o[0],l=o[i](),d=r*(e===L?o.scrollLeft():o.scrollTop());return a===n.closest(H)[0]?""!==a.style[i]||_(t.element.style[i])?l+d:1/0:l+d},_setColumnsWidth:function(){function e(e){var t=e.style.width;return""!==t?!!_(t):!!s(e).hasClass(S)}var t,n=this,i=s(n.element),r=i.parent()[0],o=i.closest(H),a=o.closest(N).children(),l=a.length;if(e(i[0])&&r===o[0]&&""===r.style[L])for(t=0;t<l;t++)a[t].style[L]=w(s(a[t]).width())},_hasRowsInPixels:function(){var e,t=this,n=s(t.element).children(B).children(N);for(e=0;e<n.length;e++)if(""===n[e].style.height||b(n[e].style.height))return!0;return!1},_setRowsHeightInPercentages:function(){var e,t=this,n=s(t.element).children(B),i=n.height(),r=n.children(N),o=r.length,a=r.map(function(){return x(s(this))});for(e=0;e<o;e++)r[e].style[O]=k(g(a[e],i))},_setRowsHeightInPixels:function(){var e,t=this,n=s(t.element).children(B).children(N),i=n.length,r=n.map(function(){return x(s(this))});for(e=0;e<i;e++)n[e].style[O]=w(r[e])},showResizeHandles:function(){var e=this;e._initResizeHandles(),e._showResizeHandles()},_initResizeHandles:function(){var e,t=this,n=t.handles,i=t.options,r=t.options.handles,o=r.length;if(!(n&&n.length>0)){for(e=0;e<o;e++)t.handles.push(new f(d({appendTo:i.appendHandlesTo,resizableElement:t.element,rootElement:i.rootElement,rtl:i.rtl},r[e])));t._bindToResizeHandlesEvents()}},_destroyResizeHandles:function(){var e,t=this,n=t.handles?t.handles.length:0;for(e=0;e<n;e++)t.handles[e].destroy()},_showResizeHandles:function(){var e,t=this,n=t.handles||[],i=n.length;for(e=0;e<i;e++)t.handles[e].show()},_bindToResizeHandlesEvents:function(){var e,t,n=this,i=n.handles||[],r=i.length;for(e=0;e<r;e++)t=i[e],t.bind(F,u(n._onResizeHandleDragStart,n)),t.bind(E,u(n._onResizeHandleDrag,n)),t.bind(A,u(n._onResizeHandleDragEnd,n)),t.bind(M,u(n._onResizeHandleMouseOver,n)),t.bind(z,u(n._onResizeHandleMouseOut,n))},_onResizeHandleDragStart:function(){var e=this,t=s(e.element);t.addClass(D),e._initialElementHeight=x(t),e._initialElementWidth=y(t),e._disableKeyboard()},_onResizeHandleDrag:function(e){this.resize(e)},_onResizeHandleDragEnd:function(){var e=this;s(e.element).removeClass(D),e._enableKeyboard()},_enableKeyboard:function(){s(this.options.rootElement).off(I+C)},_disableKeyboard:function(){s(this.options.rootElement).on(I+C,function(e){e.preventDefault()})}}),X=p.extend({create:function(e){var t=this;s(e.body).on(R+C,P,function(n){var i=n.target,r=n.currentTarget,o=e.tableResizing,a=o?o.element:null;if(o){if(a&&r!==a){if(l(r,a)&&a!==i&&l(a,i))return;
a!==i&&(e._destroyTableResizing(),t._initResizing(e,r))}}else t._initResizing(e,r);e._showTableResizeHandles()}).on(R+C,function(t){var n=e.tableResizing,i=n?n.element:null,r=t.target,o=s(r).hasClass(T)||s(r).parents(Y+T).length>0;!n||i===r||l(i,r)||o||e._destroyTableResizing()})},dispose:function(e){s(e.body).off(C)},_initResizing:function(t,n){c.msie||c.mozilla||(t.tableResizing=new Q(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body}))}});X.current=new X,Q.create=function(e){X.current.create(e)},Q.dispose=function(e){X.current.dispose(e)},d(h,{TableResizing:Q})}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/table-wizard/table-wizard-command.min",["editor/plugins/tables.min"],e)}(function(){!function(e,t){var n=window.kendo,i=n.ui.editor,r=i.EditorUtils,o=i.RangeUtils,a=i.Dom,s=r.registerTool,l=i.ToolTemplate,d=i.Command,u=new i.BlockFormatFinder([{tags:["table"]}]),c=new i.BlockFormatFinder([{tags:["td","th"]}]),h=/([a-z]+|%)$/i,p=d.extend({exec:function(){var r=this,o=r.editor,a=r.range=r.lockRange(),s=r._sourceTable=r.options.insertNewTable?t:r._selectedTable(a),l=r._selectedTableCells=s?r._selectedCells(a):t,d={visible:!1,messages:o.options.messages,closeCallback:e.proxy(r.onDialogClose,r),table:r.parseTable(s,l),dialogOptions:o.options.dialogOptions,isRtl:n.support.isRtl(o.wrapper)},u=new i.TableWizardDialog(d);u.open()},onDialogClose:function(e){var t=this;t.releaseRange(t.range),e&&(t.options.insertNewTable?t.insertTable(t.createNewTable(e)):t.updateTable(e,t._sourceTable,t._selectedTableCells))},releaseRange:function(e){var t=this,n=t.editor.document;a.windowFromDocument(n).focus(),d.fn.releaseRange.call(t,e)},insertTable:function(e){var t=this.range;t.insertNode(e),t.collapse(!0),this.editor.selectRange(t),this._ensureFocusableAfterTable(e)},_ensureFocusableAfterTable:function(t){for(var n=e(t).parent().contents(),i=n.length-1,r=n.get(i);null!==r.nodeValue&&(" "===r.nodeValue||""===r.nodeValue);)i-=1,r=n.get(i);r===t&&a.insertAfter(a.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,n,i){for(var r,o,s,l,d,u,c,h,p=this,f=e(n.rows).toArray(),m=t.tableProperties,g=m.rows,v=m.columns,_=function(e){return e[e.length-1]};i.length>1;)i.pop();if(r=i.length?_(i).parentNode:_(f),p._deleteTableRows(f,f.length-g),f.length<g)for(l=e(r).index(),d=r.cells.length,u=g-f.length,s=r.parentNode;u;)o=s.insertRow(l+1),p._insertCells(d-o.cells.length,o),u--;f[0].cells.length>v&&e(f).each(function(e,t){for(;t.cells.length>v;)t.deleteCell(-1)}),f[0].cells.length<v&&(c=e(_(i)||_(r.cells)).index(),e(f).each(function(e,t){p._insertCells(v-t.cells.length,t,c+1)})),p._updateTableProperties(n,m),h=t.cellProperties,i[0]&&a.attr(i[0],{id:h.id||null}),(h.selectAllCells?e(f).children():e(i)).each(function(e,t){p._updateCellProperties(t,h)}),p._updateCaption(n,m),m.cellsWithHeaders=m.cellsWithHeaders||!1,p.cellsWithHeadersAssociated(n)!=m.cellsWithHeaders&&p.associateCellsWithHeader(n,m.cellsWithHeaders)},_isHeadingRow:function(e){return a.is(e.parentNode,"thead")||a.is(e.cells[0],"th")},associateCellsWithHeader:function(t,n){var i,r,o,a=(new Date).getTime(),s=[],l=t.rows[0].cells.length,d=function(){for(var e=0;e<l;e++)s[e]="table"+ ++a},u=function(t,i){e(i)[n?"attr":"removeAttr"]("id",s[t])},c=function(t,i){e(i)[n?"attr":"removeAttr"]("headers",s[t])},h=this._isHeadingRow;e(t.rows).each(function(n,a){if(h(a))for(i=n,r=t.rows[++i],o=r&&!h(r),o&&(d(),e(a.cells).each(u));o;)e(r.cells).each(c),r=t.rows[++i],o=r&&!h(r)})},cellsWithHeadersAssociated:function(t){var n,i=e(t.rows).children(),r=this._isHeadingRow,o=[];return i.each(function(e,t){t.id&&r(t.parentNode)&&o.push(t.id)}),n=i.filter(function(t,n){var i=n.getAttribute("headers");return i&&!r(n.parentNode)&&e.inArray(i,o)>-1}),!!n.length},_insertCells:function(e,t,n){n=isNaN(n)?-1:n;for(var i,r=0;r<e;r++)i=t.insertCell(n),i.innerHTML="&nbsp;"},_deleteTableRows:function(e,t){for(var n,i,r=0;r<t;r++)n=e.pop(),i=n.parentNode,i.removeChild(n),i.rows.length||a.remove(i)},createNewTable:function(e){var t,n,i,r,o,s=this,l=s.editor.document,d=e.tableProperties,u=e.cellProperties,c=u.selectAllCells,h=a.create(l,"table");for(s._updateTableProperties(h,d),s._updateCaption(h,d),t=h.createTBody(),n=0;n<d.rows;n++)for(i=t.insertRow(),r=0;r<d.columns;r++)o=i.insertCell(),o.innerHTML="&nbsp;",0===n&&0===r&&u.id&&(o.id=u.id),s._updateCellProperties(o,c||0===n&&0===r?u:{});return d.cellsWithHeaders&&s.associateCellsWithHeader(h,d.cellsWithHeaders),h},_updateTableProperties:function(t,n){var i=this._getStylesData(n);a.attr(t,{cellSpacing:n.cellSpacing||null,cellPadding:n.cellPadding||null,className:n.className||null,id:n.id||null,summary:n.summary||null,style:i||null}),e(t).addClass("k-table")},_updateCellProperties:function(e,t){var n=this._getStylesData(t);n.padding=t.cellPadding||null,n.margin=t.cellMargin||null,a.attr(e,{style:n||null,className:t.className||null})},_updateCaption:function(e,t){var n,i;e.caption&&!t.captionContent?e.deleteCaption():t.captionContent&&(n=e.createCaption(),n.innerHTML=t.captionContent,i=this._getAlignmentData(t.captionAlignment),a.attr(n,{style:{textAlign:i.textAlign,verticalAlign:i.verticalAlign}}))},_getStylesData:function(e){var t=this._getAlignmentData(e.alignment),n="wrapText"in e?e.wrapText?"":"nowrap":null;return{width:e.width?e.width+e.widthUnit:null,height:e.height?e.height+e.heightUnit:null,textAlign:t.textAlign,verticalAlign:t.verticalAlign,backgroundColor:e.bgColor||null,borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderColor:e.borderColor,borderCollapse:e.collapseBorders?"collapse":null,whiteSpace:n}},_getAlignmentData:function(e){var t,n="",i=n;return e&&(e.indexOf(" ")!=-1?(t=e.split(" "),n=t[0],i=t[1]):n=e),{textAlign:n,verticalAlign:i}},parseTable:function(n,i){var r,o,a,s,l,d,u,c,h,p;return n?(r=this,o=n.style,a=n.rows,s=n.caption,l=e(s?s.cloneNode(!0):t),l.find(".k-marker").remove(),d=n.className,d=d.replace(/^k-table\s|\sk-table$/,""),d=d.replace(/\sk-table\s/," "),d=d.replace(/^k-table$/,""),u=r._getAlignment(n,!0),c=s?r._getAlignment(s):t,h=r.cellsWithHeadersAssociated(n),p={tableProperties:{width:o.width||n.width?parseFloat(o.width||n.width):null,height:o.height||n.height?parseFloat(o.height||n.height):null,columns:a[0]?a[0].children.length:0,rows:a.length,widthUnit:r._getUnit(o.width),heightUnit:r._getUnit(o.height),cellSpacing:n.cellSpacing,cellPadding:n.cellPadding,alignment:u.textAlign,bgColor:o.backgroundColor||n.bgColor,className:d,id:n.id,borderWidth:o.borderWidth||n.border,borderColor:o.borderColor,borderStyle:o.borderStyle||"",collapseBorders:!!o.borderCollapse,summary:n.summary,captionContent:s?l.html():"",captionAlignment:s&&c.textAlign?c.textAlign+" "+c.verticalAlign:"",cellsWithHeaders:h},selectedCells:[]},p.rows=r.parseTableRows(a,i,p),p):{tableProperties:{},selectedCells:[]}},parseTableRows:function(t,n,i){var r,o,a,s,l,d,u,c=this,h=[];for(d=0;d<t.length;d++)for(r=t[d],o={cells:[]},a=r.cells,h.push(o),u=0;u<a.length;u++)s=a[u],l=c.parseCell(s),e.inArray(s,n)!=-1&&i.selectedCells.push(l),o.cells.push(l);return h},parseCell:function(e){var t,n=this,i=e.style,r=n._getAlignment(e);return r=r.textAlign?r.textAlign+" "+r.verticalAlign:"",t={width:i.width||e.width?parseFloat(i.width||e.width):null,height:i.height||e.height?parseFloat(i.height||e.height):null,widthUnit:n._getUnit(i.width),heightUnit:n._getUnit(i.height),cellMargin:i.margin,cellPadding:i.padding,alignment:r,bgColor:i.backgroundColor||e.bgColor,className:e.className,id:e.id,borderWidth:i.borderWidth||e.border,borderColor:i.borderColor,borderStyle:i.borderStyle,wrapText:"nowrap"!=i.whiteSpace}},_getAlignment:function(e,t){var n,i=e.style,r=i.textAlign||e.align||"";return t?{textAlign:r}:(n=i.verticalAlign||e.vAlign||"",r&&n?{textAlign:r,verticalAlign:n}:!r&&n?{textAlign:"left",verticalAlign:n}:r&&!n?{textAlign:r,verticalAlign:"top"}:{textAlign:"",verticalAlign:""})},_getUnit:function(e){var t=(e||"").match(h);return t?t[0]:"px"},_selectedTable:function(e){var t=a.filterBy(o.nodes(e),a.htmlIndentSpace,!0);return u.findSuitable(t)[0]},_selectedCells:function(e){var t=a.filterBy(o.nodes(e),a.htmlIndentSpace,!0);return c.findSuitable(t)}}),f=i.Tool.extend({command:function(e){return e.insertNewTable=this.options.insertNewTable,new p(e)}}),m=f.extend({update:function(e,t){var n=!u.isFormatted(t);e.toggleClass("k-state-disabled",n)}});n.ui.editor.TableWizardTool=f,n.ui.editor.TableWizardCommand=p,s("tableWizard",new m({command:p,insertNewTable:!1,template:new l({template:r.buttonTemplate,title:"Table Wizard"})}))}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("editor/table-wizard/table-wizard-dialog.min",["editor/table-wizard/table-wizard-command.min"],e)}(function(){!function(e,t){var n=window.kendo,i={format:"0",min:0},r=["px","em"],o=["solid","dotted","dashed","double","groove","ridge","inset","outset","initial","inherit","none","hidden"],a={dataSource:[{className:"k-icon k-i-table-align-middle-left",value:"left"},{className:"k-icon k-i-table-align-middle-center",value:"center"},{className:"k-icon k-i-table-align-middle-right",value:"right"},{className:"k-icon k-i-align-remove",value:""}],dataTextField:"className",dataValueField:"value",template:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},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:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},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:"<span class='#: className #' title='#: tooltip #'></span>",valueTemplate:"<span class='k-align-group #: className #' title='#: tooltip #'></span>"},d='<div class="k-editor-dialog k-editor-table-wizard-dialog k-action-window k-popup-edit-form"><div class="k-edit-form-container"><div id="k-table-wizard-tabs" class="k-root-tabs"><ul><li class="k-state-active">#= messages.tableTab #</li><li>#= messages.cellTab #</li><li>#= messages.accessibilityTab #</li></ul><div id="k-table-properties"><div class="k-edit-label"><label for="k-editor-table-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-width" /><input id="k-editor-table-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-height" /><input id="k-editor-table-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-columns">#= messages.columns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-columns" /></div><div class="k-edit-label"><label for="k-editor-table-rows">#= messages.rows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-rows" /></div><div class="k-edit-label"><label for="k-editor-table-cell-spacing">#= messages.cellSpacing #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-spacing" /></div><div class="k-edit-label"><label for="k-editor-table-cell-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-padding" /></div><div class="k-edit-label"><label for="k-editor-table-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-table-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-table-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-table-bg" /></div><div class="k-edit-label"><label for="k-editor-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-css-class" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-id" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-border-width" /><input id="k-editor-border-color" /></div><div class="k-edit-label"><label for="k-editor-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-collapse-borders" type="checkbox" class="k-checkbox" /><label for="k-editor-collapse-borders" class="k-checkbox-label">#= messages.collapseBorders #</label></div></div><div id="k-cell-properties"><div class="k-edit-field"><input id="k-editor-selectAllCells" type="checkbox" class="k-checkbox" /><label for="k-editor-selectAllCells" class="k-checkbox-label">#= messages.selectAllCells #</label></div><div class="k-edit-label"><label for="k-editor-cell-width">#= messages.width #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-width" /><input id="k-editor-cell-width-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-cell-height">#= messages.height #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-height" /><input id="k-editor-cell-height-type" aria-label="#= messages.units #" /></div><div class="k-edit-label"><label for="k-editor-table-cell-margin">#= messages.cellMargin #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cell-margin" /></div><div class="k-edit-label"><label for="k-editor-table-cells-padding">#= messages.cellPadding #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-cells-padding" /></div><div class="k-edit-label"><label for="k-editor-cell-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-cell-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-cell-bg">#= messages.background #</label></div><div class="k-edit-field"><input id="k-editor-cell-bg" /></div><div class="k-edit-label"><label for="k-editor-cell-css-class">#= messages.cssClass #</label></div><div class="k-edit-field"><input id="k-editor-cell-css-class" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-id">#= messages.id #</label></div><div class="k-edit-field"><input id="k-editor-cell-id" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-cell-border-width">#= messages.border #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-cell-border-width" /><input id="k-editor-cell-border-color" /></div><div class="k-edit-label"><label for="k-editor-cell-border-style">#= messages.borderStyle #</label></div><div class="k-edit-field"><input id="k-editor-cell-border-style" /></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-wrap-text" type="checkbox" class="k-checkbox" /><label for="k-editor-wrap-text" class="k-checkbox-label">#= messages.wrapText #</label></div></div><div id="k-accessibility-properties"><div class="k-edit-label"><label for="k-editor-table-caption">#= messages.caption #</label></div><div class="k-edit-field"><input id="k-editor-table-caption" class="k-input k-textbox" type="text" /></div><div class="k-edit-label"><label for="k-editor-accessibility-alignment">#= messages.alignment #</label></div><div class="k-edit-field"><input id="k-editor-accessibility-alignment" class="k-align" /></div><div class="k-edit-label"><label for="k-editor-accessibility-summary">#= messages.summary #</label></div><div class="k-edit-field"><textarea id="k-editor-accessibility-summary" class="k-input k-textbox"></textarea></div><div class="k-edit-label">&nbsp;</div><div class="k-edit-field"><input id="k-editor-cells-headers" type="checkbox" class="k-checkbox" /><label for="k-editor-cells-headers" class="k-checkbox-label">#= messages.associateCellsWithHeaders #</label></div></div></div><div class="k-edit-buttons k-state-default"><button class="k-button k-primary k-dialog-ok">#= messages.dialogOk #</button><button class="k-button k-dialog-close">#= messages.dialogCancel #</button></div></div></div>',u=n.Class.extend({init:function(e){this.options=e},open:function(){function t(e){e.preventDefault(),l.destroy(),o.destroy()}function i(e){l.collectDialogValues(c),t(e),l.change&&l.change(),d.closeCallback(c)}function r(e){t(e),d.closeCallback()}var o,a,s,l=this,d=l.options,u=d.dialogOptions,c=d.table,h=d.messages,p=n.support.browser.msie;u.close=r,u.title=h.tableWizard,u.visible=d.visible,o=e(l._dialogTemplate(h)).appendTo(document.body).kendoWindow(u).closest(".k-window").toggleClass("k-rtl",d.isRtl).end().find(".k-dialog-ok").click(i).end().find(".k-dialog-close").click(r).end().data("kendoWindow"),a=o.element,l._initTabStripComponent(a),l._initTableViewComponents(a,c),l._initCellViewComponents(a,c),l._initAccessibilityViewComponents(a,c),o.center(),o.open(),p&&(s=a.closest(".k-window").height(),a.css("max-height",s))},_initTabStripComponent:function(e){var t=this.components={};t.tabStrip=e.find("#k-table-wizard-tabs").kendoTabStrip({animation:!1}).data("kendoTabStrip")},collectDialogValues:function(){var e=this,t=e.options.table;e._collectTableViewValues(t),e._collectCellViewValues(t),e._collectAccessibilityViewValues(t)},_collectTableViewValues:function(e){var t=this.components.tableView,n=e.tableProperties;n.width=t.width.value(),n.widthUnit=t.widthUnit.value(),n.height=t.height.value(),n.columns=t.columns.value(),n.rows=t.rows.value(),n.heightUnit=t.heightUnit.value(),n.cellSpacing=t.cellSpacing.value(),n.cellPadding=t.cellPadding.value(),n.alignment=t.alignment.value(),n.bgColor=t.bgColor.value(),n.className=t.className.value,n.id=t.id.value,n.borderWidth=t.borderWidth.value(),n.borderColor=t.borderColor.value(),n.borderStyle=t.borderStyle.value(),n.collapseBorders=t.collapseBorders.checked},_collectCellViewValues:function(e){var t=e.cellProperties={},n=this.components.cellView;t.selectAllCells=n.selectAllCells.checked,t.width=n.width.value(),t.widthUnit=n.widthUnit.value(),t.height=n.height.value(),t.heightUnit=n.heightUnit.value(),t.cellMargin=n.cellMargin.value(),t.cellPadding=n.cellPadding.value(),t.alignment=n.alignment.value(),t.bgColor=n.bgColor.value(),t.className=n.className.value,t.id=n.id.value,t.borderWidth=n.borderWidth.value(),t.borderColor=n.borderColor.value(),t.borderStyle=n.borderStyle.value(),t.wrapText=n.wrapText.checked,t.width||(t.selectAllCells=!0,t.width=100/e.tableProperties.columns,t.widthUnit="%")},_collectAccessibilityViewValues:function(e){var t=e.tableProperties,n=this.components.accessibilityView;t.captionContent=n.captionContent.value,t.captionAlignment=n.captionAlignment.value(),t.summary=n.summary.value,t.cellsWithHeaders=n.cellsWithHeaders.checked},_addUnit:function(t,n){n&&e.inArray(n,t)==-1&&t.push(n)},_initTableViewComponents:function(e,t){var n=this.components,i=n.tableView={},a=t.tableProperties=t.tableProperties||{};a.borderStyle=a.borderStyle||"",this._addUnit(r,a.widthUnit),this._addUnit(r,a.heightUnit),this._initNumericTextbox(e.find("#k-editor-table-width"),"width",a,i),this._initNumericTextbox(e.find("#k-editor-table-height"),"height",a,i),this._initNumericTextbox(e.find("#k-editor-table-columns"),"columns",a,i,{min:1,value:4}),this._initNumericTextbox(e.find("#k-editor-table-rows"),"rows",a,i,{min:1,value:4}),this._initDropDownList(e.find("#k-editor-table-width-type"),"widthUnit",a,i,r),this._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",a,i,r),this._initNumericTextbox(e.find("#k-editor-table-cell-spacing"),"cellSpacing",a,i),this._initNumericTextbox(e.find("#k-editor-table-cell-padding"),"cellPadding",a,i),this._initTableAlignmentDropDown(e.find("#k-editor-table-alignment"),a),this._initColorPicker(e.find("#k-editor-table-bg"),"bgColor",a,i),this._initInput(e.find("#k-editor-css-class"),"className",a,i),this._initInput(e.find("#k-editor-id"),"id",a,i),this._initNumericTextbox(e.find("#k-editor-border-width"),"borderWidth",a,i),this._initColorPicker(e.find("#k-editor-border-color"),"borderColor",a,i),this._initDropDownList(e.find("#k-editor-border-style"),"borderStyle",a,i,o),this._initCheckbox(e.find("#k-editor-collapse-borders"),"collapseBorders",a,i)},_initCellViewComponents:function(e,t){var n,i=this.components,a=i.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[],n=t.selectedCells[0]||{borderStyle:"",wrapText:!0},this._addUnit(r,n.widthUnit),this._addUnit(r,n.heightUnit),this._initCheckbox(e.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,a),this._initNumericTextbox(e.find("#k-editor-cell-width"),"width",n,a),this._initNumericTextbox(e.find("#k-editor-cell-height"),"height",n,a),this._initDropDownList(e.find("#k-editor-cell-width-type"),"widthUnit",n,a,r),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",n,a,r),this._initNumericTextbox(e.find("#k-editor-table-cell-margin"),"cellMargin",n,a),this._initNumericTextbox(e.find("#k-editor-table-cells-padding"),"cellPadding",n,a),this._initCellAlignmentDropDown(e.find("#k-editor-cell-alignment"),n),this._initColorPicker(e.find("#k-editor-cell-bg"),"bgColor",n,a),this._initInput(e.find("#k-editor-cell-css-class"),"className",n,a),this._initInput(e.find("#k-editor-cell-id"),"id",n,a),this._initNumericTextbox(e.find("#k-editor-cell-border-width"),"borderWidth",n,a),this._initColorPicker(e.find("#k-editor-cell-border-color"),"borderColor",n,a),this._initDropDownList(e.find("#k-editor-cell-border-style"),"borderStyle",n,a,o),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",n,a)},_initAccessibilityViewComponents:function(e,t){var n=this.components,i=n.accessibilityView={},r=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",r,i),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),r),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",r,i),this._initCheckbox(e.find("#k-editor-cells-headers"),"cellsWithHeaders",r,i)},_initNumericTextbox:function(t,n,r,o,a){var s=o[n]=t.kendoNumericTextBox(a?e.extend({},i,a):i).data("kendoNumericTextBox");n in r&&s.value(parseInt(r[n],10))},_initDropDownList:function(e,t,n,i,r){var o=i[t]=e.kendoDropDownList({dataSource:r}).data("kendoDropDownList");this._setComponentValue(o,n,t)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,r=a.dataSource;r[0].tooltip=n.alignLeft,r[1].tooltip=n.alignCenter,r[2].tooltip=n.alignRight,r[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,a,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,r=s.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftMiddle,r[4].tooltip=n.alignCenterMiddle,r[5].tooltip=n.alignRightMiddle,r[6].tooltip=n.alignLeftBottom,r[7].tooltip=n.alignCenterBottom,r[8].tooltip=n.alignRightBottom,r[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,r=l.dataSource;r[0].tooltip=n.alignLeftTop,r[1].tooltip=n.alignCenterTop,r[2].tooltip=n.alignRightTop,r[3].tooltip=n.alignLeftBottom,r[4].tooltip=n.alignCenterBottom,r[5].tooltip=n.alignRightBottom,r[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,l,"captionAlignment",t,i)},_initAlignmentDropDown:function(e,t,n,i,r){var o=r[n]=e.kendoDropDownList(t).data("kendoDropDownList");o.list.addClass("k-align").css("width","110px"),this._setComponentValue(o,i,n)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var r=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&r.value(n[t])},_initInput:function(e,t,n,i){var r=i[t]=e.get(0);t in n&&(r.value=n[t])},_initCheckbox:function(e,t,n,i){var r=i[t]=e.get(0);t in n&&(r.checked=n[t])},destroy:function(){this._destroyComponents(this.components.tableView),this._destroyComponents(this.components.cellView),this._destroyComponents(this.components.accessibilityView),this._destroyComponents(this.components),delete this.components},_destroyComponents:function(e){for(var t in e)e[t].destroy&&e[t].destroy(),delete e[t]},_dialogTemplate:function(e){return n.template(d)({messages:e})}});n.ui.editor.TableWizardDialog=u}(window.kendo.jQuery)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.editor.min",["kendo.combobox.min","kendo.dropdownlist.min","kendo.resizable.min","kendo.window.min","kendo.colorpicker.min","kendo.imagebrowser.min","kendo.tabstrip.min","kendo.numerictextbox.min","util/undoredostack.min","editor/main.min","editor/dom.min","editor/serializer.min","editor/range.min","editor/command.min","editor/components.min","editor/toolbar.min","editor/immutables.min","editor/plugins/viewhtml.min","editor/plugins/link.min","editor/plugins/lists.min","editor/plugins/formatting.min","editor/plugins/image.min","editor/plugins/import.min","editor/plugins/insert.min","editor/plugins/export.min","editor/plugins/indent.min","editor/plugins/linebreak.min","editor/plugins/format.min","editor/plugins/inlineformat.min","editor/plugins/formatblock.min","editor/plugins/file.min","editor/plugins/tables.min","editor/plugins/clipboard.min","editor/plugins/keyboard.min","editor/plugins/exportpdf.min","editor/plugins/print.min","editor/resizing/column-resizing.min","editor/resizing/row-resizing.min","editor/resizing/table-resizing.min","editor/resizing/table-resize-handle.min","editor/table-wizard/table-wizard-command.min","editor/table-wizard/table-wizard-dialog.min"],e)}(function(){return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.maskedtextbox.min",["kendo.core.min"],e)}(function(){return function(e,t){function n(e){return e+c}function i(e,t){for(var n=0;n<t.length&&e[n]===t[n];)n++;return n}var r=window,o=r.Math.min,a=r.kendo,s=a.caret,l=a.keys,d=a.ui,u=d.Widget,c=".kendoMaskedTextBox",h=e.proxy,p=window.setTimeout,f="k-state-disabled",m="k-state-invalid",g="disabled",v="readonly",_="change",b="mouseup",k="drop",w="keydown",y="paste",x="input",C=n(a.support.propertyChangeEvent?"propertychange":x),T=u.extend({init:function(t,n){var i,r,o=this;u.fn.init.call(o,t,n),o._rules=e.extend({},o.rules,o.options.rules),t=o.element,i=t[0],o._wrapper(),o._tokenize(),o._form(),o.element.addClass("k-textbox").attr("autocomplete","off").on("focus"+c,function(){var e=i.value;e?o._togglePrompt(!0):i.value=o._old=o._emptyMask,o._oldValue=e,o._timeoutId=p(function(){s(t,0,e?o._maskLength:0)})}).on("focusout"+c,function(){var e=t.val();clearTimeout(o._timeoutId),i.value=o._old="",e!==o._emptyMask&&(i.value=o._old=e),o._change(),o._togglePrompt()}),r=t.is("[disabled]")||e(o.element).parents("fieldset").is(":disabled"),r?o.enable(!1):o.readonly(t.is("[readonly]")),o.value(o.options.value||t.val()),o._validationIcon=e("<span class='k-icon k-i-warning'></span>").insertAfter(t),a.notify(o)},options:{name:"MaskedTextBox",clearPromptChar:!1,unmaskOnPost:!1,promptChar:"_",culture:"",rules:{},value:"",mask:""},events:[_],rules:{0:/\d/,9:/\d|\s/,"#":/\d|\s|\+|\-/,L:/[a-zA-Z]/,"?":/[a-zA-Z]|\s/,"&":/\S/,C:/./,A:/[a-zA-Z0-9]/,a:/[a-zA-Z0-9]|\s/},setOptions:function(t){var n=this;u.fn.setOptions.call(n,t),n._rules=e.extend({},n.rules,n.options.rules),n._tokenize(),this._unbindInput(),this._bindInput(),n.value(n.element.val())},destroy:function(){var e=this;e.element.off(c),e._formElement&&(e._formElement.off("reset",e._resetHandler),e._formElement.off("submit",e._submitHandler)),u.fn.destroy.call(e)},raw:function(){var e=this._unmask(this.element.val(),0);return e.replace(RegExp(this.options.promptChar,"g"),"")},value:function(e){var n=this.element,i=this._emptyMask;return e===t?this.element.val():(null===e&&(e=""),i?(e=this._unmask(e+""),n.val(e?i:""),this._mask(0,this._maskLength,e),this._unmaskedValue=null,e=n.val(),this._oldValue=e,a._activeElement()!==n&&(e===i?n.val(""):this._togglePrompt()),t):(this._oldValue=e,n.val(e),t))},_togglePrompt:function(e){var t=this.element[0],n=t.value;this.options.clearPromptChar&&(n=e?this._oldValue:n.replace(RegExp(this.options.promptChar,"g")," "),t.value=this._old=n)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},_bindInput:function(){var e,t,i=this;i._maskLength&&(i.options.$angular&&i.element.off(x),i.element.on(n(w),h(i._keydown,i)).on(n(k),h(i._drop,i)).on(n(_),h(i._trackChange,i)).on(C,h(i._inputHandler,i)),a.support.browser.msie&&(e=a.support.browser.version,e>8&&e<11&&(t=[n(b),n(k),n(w),n(y)].join(" "),i.element.on(t,h(i._legacyIEInputHandler,i)))))},_unbindInput:function(){var e=[C,n(w),n(b),n(k),n(y)].join(" ");this.element.off(e)},_editable:function(e){var t=this,n=t.element,i=t.wrapper,r=e.disable,o=e.readonly;t._unbindInput(),o||r?(n.attr(g,r).attr(v,o),i.toggleClass(f,r)):(n.removeAttr(g).removeAttr(v),i.removeClass(f),t._bindInput())},_change:function(){var e=this,t=e.value();t!==e._oldValue?(e._oldValue=t,e.trigger(_),e.element.trigger(_)):""===t&&e.__changing&&e.element.trigger(_)},inputChange:function(e){var t,n,r,l,d,u=this,c=u._old,h=u.element[0],p=h.value,f=s(h),m=f[1],g=p.length-c.length,v=a.support.mobileOS;u.__dropping&&g<0||(g===-1&&v.android&&"chrome"===v.browser&&(e=!0),t=o(m,i(p,c)),n=p.substring(t,m),h.value=p.substring(0,t)+u._emptyMask.substring(t),r=u._mask(t,m,n),l=u._trimStartPromptChars(p.substring(m),o(g,r-t)),d=u._unmask(l,c.length-l.length),u._mask(r,r,d),e&&(r=u._findCaretPosBackwards(t)),s(h,r),u.__dropping=!1)},_trimStartPromptChars:function(e,t){for(var n=this.options.promptChar;t-- >0&&0===e.indexOf(n);)e=e.substring(1);return e},_findCaretPosBackwards:function(e){var t=this._find(e,!0);return t<e&&(t+=1),t},_inputHandler:function(){a._activeElement()===this.element[0]&&this.inputChange(this.__backward)},_legacyIEInputHandler:function(e){var t=this,n=t.element[0],i=n.value,r=e.type;t.__pasting="paste"===r,p(function(){"mouseup"===r&&t.__pasting||n.value&&n.value!==i&&t.inputChange(t.__backward)})},_trackChange:function(){var e=this;e.__changing=!0,p(function(){e.__changing=!1})},_form:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){p(function(){t.value(n[0].value)})},t._submitHandler=function(){t.element[0].value=t._old=t.raw()},t.options.unmaskOnPost&&r.on("submit",t._submitHandler),t._formElement=r.on("reset",t._resetHandler))},_keydown:function(e){
var t=e.keyCode;this.__backward=t===l.BACKSPACE,t===l.ENTER&&this._change()},_drop:function(){this.__dropping=!0},_find:function(e,t){var n=this.element.val()||this._emptyMask,i=1;for(t===!0&&(i=-1);e>-1||e<=this._maskLength;){if(n.charAt(e)!==this.tokens[e])return e;e+=i}return-1},_mask:function(e,n,i,r){var o,l,d,u,c=this.element[0],h=c.value||this._emptyMask,p=this.options.promptChar,f=0;for(e=this._find(e,r),e>n&&(n=e),l=this._unmask(h.substring(n),n),i=this._unmask(i,e),o=i.length,i&&(l=l.replace(RegExp("^_{0,"+o+"}"),"")),i+=l,h=h.split(""),d=i.charAt(f);e<this._maskLength;)h[e]=d||p,d=i.charAt(++f),u===t&&f>o&&(u=e),e=this._find(e+1);return c.value=this._old=h.join(""),a._activeElement()===c&&(u===t&&(u=this._maskLength),s(c,u)),u},_unmask:function(t,n){var i,r,o,a,s,l,d,u;if(!t)return"";if(this._unmaskedValue===t)return this._unmaskedValue;for(t=(t+"").split(""),o=0,a=n||0,s=this.options.promptChar,l=t.length,d=this.tokens.length,u="";a<d&&(i=t[o],r=this.tokens[a],i===r||i===s?(u+=i===s?s:"",o+=1,a+=1):"string"!=typeof r?(r&&r.test&&r.test(i)||e.isFunction(r)&&r(i)?(u+=i,a+=1):1===l&&this._blinkInvalidState(),o+=1):a+=1,!(o>=l)););return this._unmaskedValue=u,u},_wrapper:function(){var e=this,t=e.element,n=t[0],i=t.wrap("<span class='k-widget k-maskedtextbox'></span>").parent();i[0].style.cssText=n.style.cssText,n.style.width="100%",e.wrapper=i.addClass(n.className)},_blinkInvalidState:function(){var e=this;e.wrapper.addClass(m),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=p(h(e._removeInvalidState,e),100)},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(m),e._invalidStateTimeout=null},_tokenize:function(){for(var e,t,n,i,r=[],o=0,s=this.options.mask||"",l=s.split(""),d=l.length,u=0,c="",h=this.options.promptChar,p=a.getCulture(this.options.culture).numberFormat,f=this._rules;u<d;u++)if(e=l[u],t=f[e])r[o]=t,c+=h,o+=1;else for("."===e||","===e?e=p[e]:"$"===e?e=p.currency.symbol:"\\"===e&&(u+=1,e=l[u]),e=e.split(""),n=0,i=e.length;n<i;n++)r[o]=e[n],c+=e[n],o+=1;this.tokens=r,this._emptyMask=c,this._maskLength=c.length}});d.plugin(T)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.toolbar.min",["kendo.core.min","kendo.userevents.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){e.target.is(".k-toggle-button")||e.target.toggleClass(P,"press"==e.type)}function i(t){return t=e(t),t.hasClass("km-actionsheet")?t.closest(".km-popup-wrapper"):t.addClass("km-widget km-actionsheet").wrap('<div class="km-actionsheet-wrapper km-actionsheet-tablet km-widget km-popup"></div>').parent().wrap('<div class="km-popup-wrapper k-popup"></div>').parent()}function r(e){e.preventDefault()}function o(t,n){var i="next"===n?e.fn.next:e.fn.prev,r="next"===n?e.fn.first:e.fn.last,a=i.call(t);return a.is(":kendoFocusable")||!a.length?a:a.find(":kendoFocusable").length?r.call(a.find(":kendoFocusable")):o(a,n)}var a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y=window.kendo,x=y.Class,C=y.ui.Widget,T=e.proxy,S=y.isFunction,D=y.keys,F=y._outerWidth,E="k-toolbar",A="k-button",I="k-overflow-button",R="k-toggle-button",M="k-button-group",z="k-split-button",H="k-separator",N="k-popup",B="k-toolbar-resizable",P="k-state-active",L="k-state-disabled",O="k-state-hidden",V="k-group-start",W="k-group-end",U="k-primary",q="k-icon",j="k-i-",G="k-button-icon",$="k-button-icontext",K="k-list-container k-split-container",Y="k-split-button-arrow",Q="k-overflow-anchor",X="k-overflow-container",J="k-toolbar-first-visible",Z="k-toolbar-last-visible",ee="click",te="toggle",ne="open",ie="close",re="overflowOpen",oe="overflowClose",ae="never",se="auto",le="always",de="k-overflow-hidden",ue="_optionlist",ce=y.attr("uid");y.toolbar={},a={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'},y.toolbar.registerComponent=function(e,t,n){a[e]={toolbar:t,overflow:n}},s=y.Class.extend({addOverflowAttr:function(){this.element.attr(y.attr("overflow"),this.options.overflow||se)},addUidAttr:function(){this.element.attr(ce,this.options.uid)},addIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id)},addOverflowIdAttr:function(){this.options.id&&this.element.attr("id",this.options.id+"_overflow")},attributes:function(){this.options.attributes&&this.element.attr(this.options.attributes)},show:function(){this.element.removeClass(O).show(),this.options.hidden=!1},hide:function(){this.element.addClass(O).hide(),this.overflow&&this.overflowHidden&&this.overflowHidden(),this.options.hidden=!0},remove:function(){this.element.remove()},enable:function(e){e===t&&(e=!0),this.element.toggleClass(L,!e),this.options.enable=e},twin:function(){var n=this.element.attr(ce);return this.overflow&&this.options.splitContainerId?e("#"+this.options.splitContainerId).find("["+ce+"='"+n+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+ce+"='"+n+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+ce+"='"+n+"']").data(this.options.type):t}}),y.toolbar.Item=s,l=s.extend({init:function(n,i){var r=e(n.useButtonTag?'<button tabindex="0"></button>':'<a href tabindex="0"></a>');this.element=r,this.options=n,this.toolbar=i,this.attributes(),n.primary&&r.addClass(U),n.togglable&&(r.addClass(R),this.toggle(n.selected)),n.url===t||n.useButtonTag||(r.attr("href",n.url),n.mobile&&r.attr(y.attr("role"),"button")),n.group&&(r.attr(y.attr("group"),n.group),this.group=this.toolbar.addToGroup(this,n.group)),!n.togglable&&n.click&&S(n.click)&&(this.clickHandler=n.click),n.togglable&&n.toggle&&S(n.toggle)&&(this.toggleHandler=n.toggle)},toggle:function(e,t){e=!!e,this.group&&e?this.group.select(this):this.group||this.select(e),t&&this.twin()&&this.twin().toggle(e)},getParentGroup:function(){if(this.options.isChild)return this.element.closest("."+M).data("buttonGroup")},_addGraphics:function(){var t,n,i,r=this.element,o=this.options.icon,a=this.options.spriteCssClass,s=this.options.imageUrl;(a||s||o)&&(t=!0,r.contents().filter(function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass(q)&&!e(this).hasClass("k-image")}).each(function(n,i){(1==i.nodeType||3==i.nodeType&&e.trim(i.nodeValue).length>0)&&(t=!1)}),r.addClass(t?G:$)),o?(n=r.children("span."+q).first(),n[0]||(n=e('<span class="'+q+'"></span>').prependTo(r)),n.addClass(j+o)):a?(n=r.children("span.k-sprite").first(),n[0]||(n=e('<span class="k-sprite '+q+'"></span>').prependTo(r)),n.addClass(a)):s&&(i=r.children("img.k-image").first(),i[0]||(i=e('<img alt="icon" class="k-image" />').prependTo(r)),i.attr("src",s))}}),y.toolbar.Button=l,d=l.extend({init:function(e,t){l.fn.init.call(this,e,t);var n=this.element;n.addClass(A),this.addIdAttr(),e.align&&n.addClass("k-align-"+e.align),"overflow"!=e.showText&&e.text&&n.html(e.mobile?'<span class="km-text">'+e.text+"</span>":e.text),e.hasIcon="overflow"!=e.showIcon&&(e.icon||e.spriteCssClass||e.imageUrl),e.hasIcon&&this._addGraphics(),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),e.hidden&&this.hide(),this.element.data({type:"button",button:this})},select:function(e){e===t&&(e=!1),this.element.toggleClass(P,e),this.options.selected=e}}),y.toolbar.ToolBarButton=d,u=l.extend({init:function(t,n){this.overflow=!0,l.fn.init.call(this,e.extend({},t),n);var i=this.element;"toolbar"!=t.showText&&t.text&&i.html(t.mobile?'<span class="km-text">'+t.text+"</span>":'<span class="k-text">'+t.text+"</span>"),t.hasIcon="toolbar"!=t.showIcon&&(t.icon||t.spriteCssClass||t.imageUrl),t.hasIcon&&this._addGraphics(),t.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),i.addClass(I+" "+A),t.hidden&&this.hide(),t.togglable&&this.toggle(t.selected),this.element.data({type:"button",button:this})},_wrap:function(){this.element=this.element.wrap("<li></li>").parent()},overflowHidden:function(){this.element.addClass(de)},select:function(e){e===t&&(e=!1),this.options.isChild?this.element.toggleClass(P,e):this.element.find(".k-button").toggleClass(P,e),this.options.selected=e}}),y.toolbar.OverflowButton=u,y.toolbar.registerComponent("button",d,u),c=s.extend({createButtons:function(t){var n,i,r=this.options,o=r.buttons||[];for(i=0;i<o.length;i++)o[i].uid||(o[i].uid=y.guid()),n=new t(e.extend({mobile:r.mobile,isChild:!0,type:"button"},o[i]),this.toolbar),n.element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('."+O+"'):first").addClass(V),this.element.children().filter(":not('."+O+"'):last").addClass(W)}}),y.toolbar.ButtonGroup=c,h=c.extend({init:function(t,n){var i=this.element=e("<div></div>");this.options=t,this.toolbar=n,this.addIdAttr(),t.align&&i.addClass("k-align-"+t.align),this.createButtons(d),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(M),this.element.data({type:"buttonGroup",buttonGroup:this})}}),y.toolbar.ToolBarButtonGroup=h,p=c.extend({init:function(t,n){var i=this.element=e("<li></li>");this.options=t,this.toolbar=n,this.overflow=!0,this.addOverflowIdAttr(),this.createButtons(u),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((t.mobile?"":M)+" k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.OverflowButtonGroup=p,y.toolbar.registerComponent("buttonGroup",h,p),f=s.extend({init:function(t,n){var i=this.element=e('<div class="'+z+'" tabindex="0"></div>');this.options=t,this.toolbar=n,this.mainButton=new d(e.extend({},t,{hidden:!1}),n),this.arrowButton=e('<a class="'+A+" "+Y+'"><span class="'+(t.mobile?"km-icon km-arrowdown":"k-icon k-i-arrow-60-down")+'"></span></a>'),this.popupElement=e('<ul class="'+K+'"></ul>'),this.mainButton.element.removeAttr("href tabindex").appendTo(i),this.arrowButton.appendTo(i),this.popupElement.appendTo(i),t.align&&i.addClass("k-align-"+t.align),t.id||(t.id=t.uid),i.attr("id",t.id+"_wrapper"),this.addOverflowAttr(),this.addUidAttr(),this.createMenuButtons(),this.createPopup(),this._navigatable(),this.mainButton.main=!0,this.enable(t.enable),t.hidden&&this.hide(),i.data({type:"splitButton",splitButton:this,kendoPopup:this.popup})},_navigatable:function(){var t=this;t.popupElement.on("keydown","."+A,function(n){var i=e(n.target).parent();n.preventDefault(),n.keyCode===D.ESC||n.keyCode===D.TAB||n.altKey&&n.keyCode===D.UP?(t.toggle(),t.focus()):n.keyCode===D.DOWN?o(i,"next").focus():n.keyCode===D.UP?o(i,"prev").focus():n.keyCode===D.SPACEBAR||n.keyCode===D.ENTER?t.toolbar.userEvents.trigger("tap",{target:e(n.target)}):n.keyCode===D.HOME?i.parent().find(":kendoFocusable").first().focus():n.keyCode===D.END&&i.parent().find(":kendoFocusable").last().focus()})},createMenuButtons:function(){var t,n,i=this.options,r=i.menuButtons;for(n=0;n<r.length;n++)t=new d(e.extend({mobile:i.mobile,type:"button",click:i.click},r[n]),this.toolbar),t.element.wrap("<li></li>").parent().appendTo(this.popupElement)},createPopup:function(){var n=this,o=this.options,a=this.element;this.popupElement.attr("id",o.id+ue).attr(ce,o.rootUid),o.mobile&&(this.popupElement=i(this.popupElement)),this.popup=this.popupElement.kendoPopup({appendTo:o.mobile?e(o.mobile).children(".km-pane"):null,anchor:a,isRtl:this.toolbar._isRtl,copyAnchorStyles:!1,animation:o.animation,open:function(e){var i=n.toolbar.trigger(ne,{target:a});return i?(e.preventDefault(),t):(n.adjustPopupWidth(e.sender),t)},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){var t=n.toolbar.trigger(ie,{target:a});t&&e.preventDefault(),a.focus()}}).data("kendoPopup"),this.popup.element.on(ee,"a.k-button",r)},adjustPopupWidth:function(e){var t,n=e.options.anchor,i=F(n);y.wrap(e.element).addClass("k-split-wrapper"),t="border-box"!==e.element.css("box-sizing")?i-(F(e.element)-e.element.width()):i,e.element.css({fontFamily:n.css("font-family"),"min-width":t})},remove:function(){this.popup.element.off(ee,"a.k-button"),this.popup.destroy(),this.element.remove()},toggle:function(){this.popup.toggle()},enable:function(e){e===t&&(e=!0),this.mainButton.enable(e),this.options.enable=e},focus:function(){this.element.focus()},hide:function(){this.popup&&this.popup.close(),this.element.addClass(O).hide(),this.options.hidden=!0},show:function(){this.element.removeClass(O).hide(),this.options.hidden=!1}}),y.toolbar.ToolBarSplitButton=f,m=s.extend({init:function(t,n){var i,r,o,a=this.element=e('<li class="'+z+'"></li>'),s=t.menuButtons;for(this.options=t,this.toolbar=n,this.overflow=!0,r=(t.id||t.uid)+ue,this.mainButton=new u(e.extend({},t)),this.mainButton.element.appendTo(a),o=0;o<s.length;o++)i=new u(e.extend({mobile:t.mobile,type:"button",splitContainerId:r},s[o]),this.toolbar),i.element.appendTo(a);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,a.data({type:"splitButton",splitButton:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.OverflowSplitButton=m,y.toolbar.registerComponent("splitButton",f,m),g=s.extend({init:function(t,n){var i=this.element=e("<div>&nbsp;</div>");this.element=i,this.options=t,this.toolbar=n,this.attributes(),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),i.addClass(H),i.data({type:"separator",separator:this})}}),v=s.extend({init:function(t,n){var i=this.element=e("<li>&nbsp;</li>");this.element=i,this.options=t,this.toolbar=n,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),i.addClass(H),i.data({type:"separator",separator:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.registerComponent("separator",g,v),_=s.extend({init:function(t,n,i){var r=S(t)?t(n):t;r=r instanceof jQuery?r.wrap("<div></div>").parent():e("<div></div>").html(r),this.element=r,this.options=n,this.options.type="template",this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),r.data({type:"template",template:this})}}),y.toolbar.TemplateItem=_,b=s.extend({init:function(t,n,i){var r=e(S(t)?t(n):t);r=r instanceof jQuery?r.wrap("<li></li>").parent():e("<li></li>").html(r),this.element=r,this.options=n,this.options.type="template",this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),r.data({type:"template",template:this})},overflowHidden:function(){this.element.addClass(de)}}),y.toolbar.OverflowTemplateItem=b,k=x.extend({init:function(e){this.name=e,this.buttons=[]},add:function(e){this.buttons[this.buttons.length]=e},remove:function(t){var n=e.inArray(t,this.buttons);this.buttons.splice(n,1)},select:function(e){var t,n;for(n=0;n<this.buttons.length;n++)t=this.buttons[n],t.select(!1);e.select(!0),e.twin()&&e.twin().select(!0)}}),w=C.extend({init:function(t,i){var o,a=this;if(C.fn.init.call(a,t,i),i=a.options,t=a.wrapper=a.element,t.addClass(E+" k-widget"),this.uid=y.guid(),this._isRtl=y.support.isRtl(t),this._groups={},t.attr(ce,this.uid),a.isMobile="boolean"==typeof i.mobile?i.mobile:a.element.closest(".km-root")[0],a.animation=a.isMobile?{open:{effects:"fade"}}:{},a.isMobile&&(t.addClass("km-widget"),q="km-icon",j="km-",A="km-button",M="km-buttongroup km-widget",P="km-state-active",L="km-state-disabled"),i.resizable?(a._renderOverflow(),t.addClass(B),a.overflowUserEvents=new y.UserEvents(a.element,{threshold:5,allowSelection:!0,filter:"."+Q,tap:T(a._toggleOverflow,a)}),a._resizeHandler=y.onResize(function(){a.resize()})):a.popup={element:e([])},i.items&&i.items.length)for(o=0;o<i.items.length;o++)a.add(i.items[o]);a.userEvents=new y.UserEvents(document,{threshold:5,allowSelection:!0,filter:"["+ce+"="+this.uid+"] a."+A+", ["+ce+"="+this.uid+"] ."+I,tap:T(a._buttonClick,a),press:n,release:n}),a.element.on(ee,"a.k-button",r),a._navigatable(),i.resizable&&a.popup.element.on(ee,NaN,r),i.resizable&&this._toggleOverflowAnchor(),y.notify(a)},events:[ee,te,ne,ie,re,oe],options:{name:"ToolBar",items:[],resizable:!0,mobile:null},addToGroup:function(e,t){var n;return n=this._groups[t]?this._groups[t]:this._groups[t]=new k,n.add(e),n},destroy:function(){var t=this;t.element.find("."+z).each(function(t,n){e(n).data("kendoPopup").destroy()}),t.element.off(ee,"a.k-button"),t.userEvents.destroy(),t.options.resizable&&(y.unbindResize(t._resizeHandler),t.overflowUserEvents.destroy(),t.popup.element.off(ee,"a.k-button"),t.popup.destroy()),C.fn.destroy.call(t)},add:function(t){var n,i,r,o=a[t.type],s=t.template,l=this,d=l.isMobile?"":"k-item k-state-default",u=t.overflowTemplate;if(e.extend(t,{uid:y.guid(),animation:l.animation,mobile:l.isMobile,rootUid:l.uid}),t.menuButtons)for(r=0;r<t.menuButtons.length;r++)e.extend(t.menuButtons[r],{uid:y.guid()});s&&!u?t.overflow=ae:t.overflow||(t.overflow=se),t.overflow!==ae&&l.options.resizable&&(u?i=new b(u,t,l):o&&(i=new o.overflow(t,l),i.element.addClass(d)),i&&(t.overflow===se&&i.overflowHidden(),i.element.appendTo(l.popup.container),l.angular("compile",function(){return{elements:i.element.get()}}))),t.overflow!==le&&(s?n=new _(s,t,l):o&&(n=new o.toolbar(t,l)),n&&(l.options.resizable?(n.element.appendTo(l.element).css("visibility","hidden"),l._shrink(l.element.innerWidth()),n.element.css("visibility","visible")):n.element.appendTo(l.element),l.angular("compile",function(){return{elements:n.element.get()}})))},_getItem:function(t){var n,i,r,o,a=this.options.resizable;return n=this.element.find(t),n.length||(n=e(".k-split-container[data-uid="+this.uid+"]").find(t)),o=n.length?n.data("type"):"",i=n.data(o),i?(i.main&&(n=n.parent("."+z),o="splitButton",i=n.data(o)),a&&(r=i.twin())):a&&(n=this.popup.element.find(t),o=n.length?n.data("type"):"",r=n.data(o),r&&r.main&&(n=n.parent("."+z),o="splitButton",r=n.data(o))),{type:o,toolbar:i,overflow:r}},remove:function(e){var t=this._getItem(e);t.toolbar&&t.toolbar.remove(),t.overflow&&t.overflow.remove(),this.resize(!0)},hide:function(e){var t=this._getItem(e);t.toolbar&&("button"===t.toolbar.options.type&&t.toolbar.options.isChild?(t.toolbar.hide(),t.toolbar.getParentGroup().refresh()):t.toolbar.options.hidden||t.toolbar.hide()),t.overflow&&("button"===t.overflow.options.type&&t.overflow.options.isChild?(t.overflow.hide(),t.overflow.getParentGroup().refresh()):t.overflow.options.hidden||t.overflow.hide()),this.resize(!0)},show:function(e){var t=this._getItem(e);t.toolbar&&("button"===t.toolbar.options.type&&t.toolbar.options.isChild?(t.toolbar.show(),t.toolbar.getParentGroup().refresh()):t.toolbar.options.hidden&&t.toolbar.show()),t.overflow&&("button"===t.overflow.options.type&&t.overflow.options.isChild?(t.toolbar.show(),t.overflow.getParentGroup().refresh()):t.overflow.options.hidden&&t.overflow.show()),this.resize(!0)},enable:function(e,n){var i=this._getItem(e);t===n&&(n=!0),i.toolbar&&i.toolbar.enable(n),i.overflow&&i.overflow.enable(n)},getSelectedFromGroup:function(e){return this.element.find("."+R+"[data-group='"+e+"']").filter("."+P)},toggle:function(n,i){var r=e(n),o=r.data("button");o.options.togglable&&(i===t&&(i=!0),o.toggle(i,!0))},_renderOverflow:function(){var t=this,n=a.overflowContainer,r=t._isRtl,s=r?"left":"right";t.overflowAnchor=e(a.overflowAnchor).addClass(A),t.element.append(t.overflowAnchor),t.isMobile?(t.overflowAnchor.append('<span class="km-icon km-more"></span>'),n=i(n)):t.overflowAnchor.append('<span class="k-icon k-i-more-vertical"></span>'),t.popup=new y.ui.Popup(n,{origin:"bottom "+s,position:"top "+s,anchor:t.overflowAnchor,isRtl:r,animation:t.animation,appendTo:t.isMobile?e(t.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(n){var i=y.wrap(t.popup.element).addClass("k-overflow-wrapper");t.isMobile?t.popup.container.css("max-height",parseFloat(e(".km-content:visible").innerHeight())-15+"px"):i.css("margin-left",(r?-1:1)*((F(i)-i.width())/2+1)),t.trigger(re)&&n.preventDefault()},activate:function(){this.element.find(":kendoFocusable").first().focus()},close:function(e){t.trigger(oe)&&e.preventDefault(),this.element.focus()}}),t.popup.element.on("keydown","."+A,function(n){var i,r=e(n.target),a=r.parent(),s=a.is("."+M)||a.is("."+z);n.preventDefault(),n.keyCode===D.ESC||n.keyCode===D.TAB||n.altKey&&n.keyCode===D.UP?(t._toggleOverflow(),t.overflowAnchor.focus()):n.keyCode===D.DOWN?(i=!s||s&&r.is(":last-child")?a:r,o(i,"next").focus()):n.keyCode===D.UP?(i=!s||s&&r.is(":first-child")?a:r,o(i,"prev").focus()):n.keyCode===D.SPACEBAR||n.keyCode===D.ENTER?(t.userEvents.trigger("tap",{target:e(n.target)}),t.overflowAnchor.focus()):n.keyCode===D.HOME?a.parent().find(":kendoFocusable").first().focus():n.keyCode===D.END&&a.parent().find(":kendoFocusable").last().focus()}),t.popup.container=t.isMobile?t.popup.element.find("."+X):t.popup.element,t.popup.container.attr(ce,this.uid)},_toggleOverflowAnchor:function(){var e=!1;e=this.options.mobile?this.popup.element.find("."+X).children(":not(."+de+", ."+N+")").length>0:this.popup.element.children(":not(."+de+", ."+N+")").length>0,this.overflowAnchor.css(e?{visibility:"visible",width:""}:{visibility:"hidden",width:"1px"})},_buttonClick:function(n){var i,r,o,a,s,l,d,u=this,c=n.target.closest("."+Y).length;return n.preventDefault(),c?(u._toggle(n),t):(r=e(n.target).closest("."+A,u.element),r.hasClass(Q)||(o=r.data("button"),!o&&u.popup&&(r=e(n.target).closest("."+I,u.popup.container),o=r.parent("li").data("button")),o&&o.options.enable&&(o.options.togglable?(s=S(o.toggleHandler)?o.toggleHandler:null,o.toggle(!o.options.selected,!0),l={target:r,group:o.options.group,checked:o.options.selected,id:o.options.id},s&&s.call(u,l),u.trigger(te,l)):(s=S(o.clickHandler)?o.clickHandler:null,l={sender:u,target:r,id:o.options.id},s&&s.call(u,l),u.trigger(ee,l)),o.options.url&&(o.options.attributes&&o.options.attributes.target&&(d=o.options.attributes.target),window.open(o.options.url,d||"_self")),r.hasClass(I)&&u.popup.close(),a=r.closest(".k-split-container"),a[0]&&(i=a.data("kendoPopup"),(i?i:a.parents(".km-popup-wrapper").data("kendoPopup")).close()))),t)},_navigatable:function(){var t=this;t.element.attr("tabindex",0).focus(function(){var t=e(this).find(":kendoFocusable:first");0!==t.length&&(t.is("."+Q)&&(t=o(t,"next")),t[0].focus())}).on("keydown",T(t._keydown,t))},_keydown:function(n){var i,r,o,a,s,l,d,u=e(n.target),c=n.keyCode,h=this.element.children(":not(.k-separator):visible"),p=this._isRtl?-1:1;if(c===D.TAB&&(i=u.parentsUntil(this.element).last(),r=!1,o=!1,i.length||(i=u),i.is("."+Q)&&(n.shiftKey&&n.preventDefault(),h.last().is(":kendoFocusable")?h.last().focus():h.last().find(":kendoFocusable").last().focus()),n.shiftKey||h.index(i)!==h.length-1||(r=!i.is("."+M)||u.is(":last-child")),a=h.index(i)===h.not(".k-overflow-anchor").first().index(),n.shiftKey&&a&&(o=!i.is("."+M)||u.is(":first-child")),r&&this.overflowAnchor&&"hidden"!==this.overflowAnchor.css("visibility")&&(n.preventDefault(),this.overflowAnchor.focus()),o&&(n.preventDefault(),s=this._getPrevFocusable(this.wrapper),s&&s.focus()),this._preventNextFocus=!1),n.altKey&&c===D.DOWN)return l=e(document.activeElement).data("splitButton"),d=e(document.activeElement).is("."+Q),l?l.toggle():d&&this._toggleOverflow(),t;if((c===D.SPACEBAR||c===D.ENTER)&&!u.is("input, checkbox"))return n.preventDefault(),u.is("."+z)&&(u=u.children().first()),this.userEvents.trigger("tap",{target:u}),t;if(c===D.HOME){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor?h.eq(1).focus():h.first().focus(),n.preventDefault()}else if(c===D.END){if(u.is(".k-dropdown")||u.is("input"))return;this.overflowAnchor&&"hidden"!=e(this.overflowAnchor).css("visibility")?this.overflowAnchor.focus():h.last().focus(),n.preventDefault()}else c!==D.RIGHT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(n.target,1*p)?c!==D.LEFT||this._preventNextFocus||u.is("input, select, .k-dropdown, .k-colorpicker")||!this._getNextElement(n.target,-1*p)||(this._getNextElement(n.target,-1*p).focus(),n.preventDefault()):(this._getNextElement(n.target,1*p).focus(),n.preventDefault())},_getNextElement:function(t,n){var i=this.element.children(":not(.k-separator):visible"),r=i.index(i.index(t)===-1?t.parentElement:t),o=this.overflowAnchor?1:0,a=n,s=1===n?i.length-1:o,l=1===n?o:i.length-1,d=i[r+n];if(this._preventNextFocus=!1,e(t).closest("."+M).length&&!e(t).is(1===n?":last-child":":first-child"))return e(t).closest("."+M).children()[e(t).closest("."+M).children().index(t)+n];for(this.overflowAnchor&&t===this.overflowAnchor[0]&&n===-1&&(d=i[i.length-1]),r===s&&(d=!this.overflowAnchor||this.overflowAnchor&&"hidden"===e(this.overflowAnchor).css("visibility")?i[l]:this.overflowAnchor);!e(d).is(":kendoFocusable");){if(d=n===-1&&e(d).closest("."+M).length?e(d).children(":not(label, div)").last():e(d).children(":not(label, div)").first(),!d.length&&(a+=n,d=i[r+a],!d))return this.overflowAnchor;this._preventNextFocus=!e(d).closest("."+M).length}return d},_getPrevFocusable:function(n){if(n.is("html"))return n;var i,r,o=n.prevAll();return o.each(function(){return r=e(this),r.is(":kendoFocusable")?(i=r,!1):r.find(":kendoFocusable").length>0?(i=r.find(":kendoFocusable").last(),!1):t}),i?i:this._getPrevFocusable(n.parent())},_toggle:function(t){var n=e(t.target).closest("."+z).data("splitButton");t.preventDefault(),n.options.enable&&n.toggle()},_toggleOverflow:function(){this.popup.toggle()},_resize:function(e){var t=e.width;this.options.resizable&&(this.popup.close(),this._shrink(t),this._stretch(t),this._markVisibles(),this._toggleOverflowAnchor())},_childrenWidth:function(){var t=0;return this.element.children(":visible:not('."+O+"')").each(function(){t+=F(e(this),!0)}),Math.ceil(t)},_shrink:function(e){var t,n,i;if(e<this._childrenWidth())for(n=this.element.children(":visible:not([data-overflow='never'], ."+Q+")"),i=n.length-1;i>=0&&(t=n.eq(i),!(e>this._childrenWidth()));i--)this._hideItem(t)},_stretch:function(e){var t,n,i;if(e>this._childrenWidth())for(n=this.element.children(":hidden:not('."+O+"')"),i=0;i<n.length&&(t=n.eq(i),!(e<this._childrenWidth())&&this._showItem(t,e));i++);},_hideItem:function(e){e.hide(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").removeClass(de)},_showItem:function(e,t){return!!(e.length&&t>this._childrenWidth()+F(e,!0))&&(e.show(),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(de),!0)},_markVisibles:function(){var e=this.popup.container.children(),t=this.element.children(":not(.k-overflow-anchor)"),n=e.filter(":not(.k-overflow-hidden)"),i=t.filter(":visible");e.add(t).removeClass(J+" "+Z),n.first().add(i.first()).addClass(J),n.last().add(i.last()).addClass(Z)}}),y.ui.plugin(w)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.mediaplayer.min",["kendo.slider.min","kendo.toolbar.min","kendo.dropdownlist.min","kendo.tooltip.min"],e)}(function(){return function(e,t){var n=window.kendo,i="end",r="pause",o="play",a="ready",s="timeChange",l="volumeChange",d="k-i-full-screen",u="k-i-full-screen-exit",c="k-i-volume-off",h="k-i-volume-down",p="k-i-volume-up",f="k-mediaplayer-quality",m="k-i-play",g="k-i-pause",v="k-mediaplayer-titlebar",_="k-title",b="k-mediaplayer-toolbar-wrap",k="k-mediaplayer-toolbar",w="k-mediaplayer-seekbar",y="k-mediaplayer-volume",x="k-mediaplayer-media",C="k-mediaplayer-overlay",T="k-mediaplayer-yt",S=".",D=n.ui,F=".kendoMediaPlayer",E=new Date(1970,0,1),A=60*E.getTimezoneOffset(),I=n.ui.Widget,R=e.isArray,M={shortTime:"mm:ss",longTime:"HH:mm:ss"},z=n.template,H=e.proxy,N=n.keys,B={htmlPlayer:"<video class='"+x+"'> </video>",titleBar:z("<div class='"+v+"' role='heading'><span class='"+_+"'>Video Title</span></div>"),toolBar:"<div class='"+b+"'><div class='"+k+"'></div></div>",youtubePlayer:"<div class='"+T+"'> </div>",toolBarTime:"<span class='k-mediaplayer-currenttime'>00:00:00</span> / <span class='k-mediaplayer-duration'>00:00:00</span>",slider:"<input class='"+w+"' value='0' title='seekbar' />",volumeSlider:"<input class='"+y+"' title='volume'/>",qualityDropDown:"<input class='"+f+"' title='video quality' />",toolTip:"#= kendo.toString(new Date(value), 'HH:mm:ss') #"},P=I.extend({init:function(t,i){this.wrapper=e(t),I.fn.init.call(this,t,i),this.wrapper.addClass("k-mediaplayer k-widget"),i=this.options,this._currentIndex=0,this._createTitlebar(),this._createToolbar(),this._createDropDown(),this._createSlider(),this._createVolumeSlider(),this._timers={},this._aria(),this._navigatable(),i.media&&this.media(this.options.media),n.notify(this)},events:[i,r,o,a,s,l],options:{name:"MediaPlayer",autoPlay:!1,autoRepeat:!1,volume:100,fullScreen:!1,mute:!1,navigatable:!1,forwardSeek:!0,media:null,messages:{pause:"Pause",play:"Play",mute:"Mute",unmute:"Unmute",quality:"Quality",fullscreen:"Full Screen"}},_msToTime:function(e){var t=new Date(E.getTime());return t.setSeconds(e),t},_timeToSec:function(e){var t=new Date(e).getTime();return t/1e3},_createTitlebar:function(){this._titleBar=this.wrapper.find(S+v),0===this._titleBar.length&&(this.wrapper.append(B.titleBar),this._titleBar=this.wrapper.find(S+v))},_createSlider:function(){var e=this.wrapper.find(S+w);this._slider||(this._sliderDragChangeHandler=H(this._sliderDragChange,this),this._sliderDraggingHandler=H(this._sliderDragging,this),e=this.wrapper.find(S+w),this._slider=new D.Slider(e[0],{smallStep:1e3,tickPlacement:"none",showButtons:!1,change:this._sliderDragChangeHandler,slide:this._sliderDraggingHandler,tooltip:{template:B.toolTip},dragHandleTitle:""}))},_createVolumeSlider:function(){var e=this.wrapper.find(S+y);this._volumeSlider||(this._volumeDraggingHandler=H(this._volumeDragging,this),this._volumeChangeHandler=H(this._volumeChange,this),e.width(87),this._volumeSlider=new D.Slider(e[0],{smallStep:1,min:0,max:100,value:this.options.volume,slide:this._volumeDraggingHandler,change:this._volumeChangeHandler,tickPlacement:"none",showButtons:!1,tooltip:{enabled:!1},dragHandleTitle:""}))},_resetTime:function(){this._youTubeVideo?this._ytmedia.seekTo(0,!0):this._media.currentTime=0,this._mediaTimeUpdate(),e.grep(this._toolBar.options.items,function(e){return!!e.template}).template=B.toolBarTime},_currentUrl:function(){var e=this.media();return R(e.source)?e.source[this._currentIndex].url:e.source},_isYouTubeUrl:function(){return!!this._currentUrl().match("youtube.com/|youtu.be/")},_setPlayerUrl:function(){var e,t=this._youTubeVideo;this.stop(),this._youTubeVideo=this._isYouTubeUrl(),t!==this._youTubeVideo&&(this.wrapper.find(S+T).toggle(),this.wrapper.find(S+x).toggle()),e=this._media||this._ytmedia,this._initializePlayer(),e&&(this.mute(this.mute()),this.volume(this.volume())),this._youTubeVideo?this._ytmedia&&(this._videoOverlay&&this._videoOverlay.hide(),this.options.autoPlay?(this._ytmedia.loadVideoById(this._getMediaId()),this._playStateToggle(!0)):(this._ytmedia.cueVideoById(this._getMediaId()),this._playStateToggle(!0))):(this._videoOverlay.show(),this.wrapper.find(S+x+" > source").remove(),this.wrapper.find(S+x).attr("src",this._currentUrl()),this.options.autoPlay&&this.play())},_createToolbar:function(){var t=this.wrapper.find(S+k);0===t.length&&(this._toolbarClickHandler=H(this._toolbarClick,this),this.wrapper.append(B.toolBar),t=this.wrapper.find(S+k),t.width(this.wrapper.find(S+x).width()),this._toolBar=new D.ToolBar(t,{click:this._toolbarClickHandler,resizable:!1,items:[{type:"button",attributes:{"class":"k-play-button"},icon:"play"},{template:B.toolBarTime,attributes:{"class":"k-mediaplayer-currenttime-wrap"}},{type:"separator",attributes:{"class":"k-toolbar-spacer"}},{type:"button",attributes:{"class":"k-volume-button"},icon:"volume-up"},{template:B.volumeSlider,attributes:{"class":"k-mediaplayer-volume-wrap"}},{template:B.qualityDropDown,attributes:{"class":"k-mediaplayer-quality-wrap"}},{type:"button",attributes:{"class":"k-fullscreen-button"},icon:"full-screen"}]}),this._toolBar.wrapper.off("keydown"),t.before(B.slider),this._volumeButton=t.find(".k-volume-button"),
this._fullscreenButton=t.find(".k-fullscreen-button"),this._volumeButton.attr("title",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._volumeButton.attr("aria-label",this.options.mute?this.options.messages.unmute:this.options.messages.mute),this._fullscreenButton.attr("title",this.options.messages.fullscreen),this._fullscreenButton.attr("aria-label",this.options.messages.fullscreen),t.width("auto"),this._currentTimeElement=t.find(".k-mediaplayer-currenttime"),this._durationElement=t.find(".k-mediaplayer-duration"),this._playButton=t.find(".k-play-button"),this._playButtonSpan=this._playButton.find(".k-i-play"),this.options.autoPlay&&this._playStateToggle(!0),e([this._volumeButton[0],t.find(".k-mediaplayer-volume-wrap")[0],t.find(".k-mediaplayer-quality-wrap")[0],this._fullscreenButton[0]]).wrapAll("<div class='k-align-right' />"),t.find(".k-button").addClass("k-bare"))},_createDropDown:function(){var e=this.wrapper.find(S+f),n=this.media();t===e.data("kendoDropDownList")&&(this._dropDownSelectHandler=H(this._dropDownSelect,this),this._dropDown=new D.DropDownList(e,{dataTextField:"quality",dataValueField:"url",popup:{position:"bottom",origin:"top",appendTo:this.wrapper},animation:{open:{effects:"slideIn:up",duration:1}},select:this._dropDownSelectHandler}),n&&R(n.source)&&(this._dropDown.setDataSource(n.source),this._dropDown.select(0)),this._dropDown.wrapper.addClass("k-button k-bare"),this._dropDown.wrapper.attr("title",this.options.messages.quality).hide(),this._dropDown.wrapper.find("span.k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-icon k-i-hd"),this._dropDown.list.addClass("k-quality-list"))},_dropDownSelect:function(e){this._currentIndex!==e.item.index()&&(this._currentIndex=e.item.index(),this._setPlayerUrl())},_toolbarClick:function(t){var n,i=e(t.target).children().first(),r=i.hasClass(m);this.media()&&((i.hasClass(m)||i.hasClass(g))&&(r?this.play():this.pause()),(i.hasClass(d)||i.hasClass(u))&&(this._isInFullScreen?(i.removeClass(u).addClass(d),this.fullScreen(!1)):(i.removeClass(d).addClass(u),this.fullScreen(!0))),(i.hasClass(c)||i.hasClass(h)||i.hasClass(p))&&(n=this.mute(),this.mute(!n)))},_sliderDragging:function(){this.media()&&(this._isDragging=!0)},_sliderDragChange:function(e){var t=this,n=e.sender,i=1e3*A;this.media()&&(t._sliderChangeFired=!0,t._isDragging=!1,!this.options.forwardSeek&&n.value()>this._seekBarLastPosition?setTimeout(function(){n.value(t._seekBarLastPosition)},1):this._youTubeVideo?t._ytmedia.seekTo(t._timeToSec(e.value-i)):t._media.currentTime=t._timeToSec(e.value-i),t.trigger(s),t._preventPlay=!0)},_changeVolumeButtonImage:function(e){var t=this._volumeButton,n=t.find("span"),i=n.attr("class");i=i.substring(0,i.lastIndexOf(" ")),0===e?(n.attr("class",i+" "+c),t.attr("title",this.options.messages.unmute),t.attr("aria-label",this.options.messages.unmute)):e>0&&e<51?(n.attr("class",i+" "+h),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute)):(n.attr("class",i+" "+p),t.attr("title",this.options.messages.mute),t.attr("aria-label",this.options.messages.mute))},_volumeDragging:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_volumeChange:function(e){this.media()&&(this.volume(e.value),this._changeVolumeButtonImage(e.value),this.trigger(l))},_mediaTimeUpdate:function(){var e=this._youTubeVideo?this._ytmedia.getCurrentTime():this._media.currentTime,t=this._msToTime(e);return this._currentTimeElement.text(n.toString(t,this._timeFormat)),this._isDragging||(this._seekBarLastPosition=1e3*(e+A),this._slider.value(this._seekBarLastPosition)),this.isPlaying()},_playStateToggle:function(e){t===e&&(e=this._playButtonSpan.is(S+m)),e?(this._playButtonSpan.removeClass(m).addClass(g),this._playButton.attr("title",this.options.messages.pause),this._playButton.attr("aria-label",this.options.messages.pause)):(this._playButtonSpan.removeClass(g).addClass(m),this._playButton.attr("title",this.options.messages.play),this._playButton.attr("aria-label",this.options.messages.play))},_mediaEnded:function(){this._playStateToggle(!1),this._currentTimeElement.text(n.toString(this._msToTime(0),this._timeFormat)),this._slider.value(1e3*(0+A)),this.trigger(i)},_mediaPlay:function(){this.trigger(o)},_mediaReady:function(){this.trigger(a)},_mediaDurationChange:function(){var e=this._msToTime(this._youTubeVideo?this._ytmedia.getDuration():this._media.duration);this._timeFormat=0===e.getHours()?M.shortTime:M.longTime,this._durationElement.text(n.toString(e,this._timeFormat)),this._slider.setOptions({min:E.getTime(),max:e.getTime()}),this._isFirstRun||(this._resetTime(),this._isFirstRun=!0)},_createYoutubePlayer:function(){this._mediaTimeUpdateHandler=H(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=H(this._mediaDurationChange,this),this.wrapper.prepend(B.youtubePlayer),this._ytPlayer=this.wrapper.find(S+T)[0],e(this._ytPlayer).css({width:this.wrapper.width(),height:this.wrapper.height()}),window.YT&&window.YT.Player?this._configurePlayer():(window.onYouTubeIframeAPIReadyRegister||(window.onYouTubeIframeAPIReadyRegister=[],e.getScript("https://www.youtube.com/iframe_api"),window.onYouTubeIframeAPIReady=function(){if(window.onYouTubeIframeAPIReadyRegister)for(var e=0;e<window.onYouTubeIframeAPIReadyRegister.length;e++)window.onYouTubeIframeAPIReadyRegister[e]._youtubeApiReady();window.onYouTubeIframeAPIReadyRegister.length=0,window.onYouTubeIframeAPIReadyRegister=t}),window.onYouTubeIframeAPIReadyRegister[window.onYouTubeIframeAPIReadyRegister.length]=this)},_poll:function(e,t,n,i){var r=this;return null!==r._timers[e]&&clearTimeout(r._timers[e]),r._timers[e]=setTimeout(function(i){return function o(){t.call(i)&&(r._timers[e]=setTimeout(o,n))}}(i),n)},_youtubeApiReady:function(){this._configurePlayer()},_configurePlayer:function(){var e,t={autoplay:+this.options.autoPlay,wmode:"transparent",controls:0,rel:0,showinfo:0};this._onYouTubePlayerReady=H(this._onYouTubePlayerReady,this),window.onYouTubePlayerReady=this._onYouTubePlayerReady,this._onPlayerStateChangeHandler=H(this._onPlayerStateChange,this),window.onPlayerStateChange=this._onPlayerStateChange,e=new window.YT.Player(this.wrapper.find(S+T)[0],{height:this.wrapper.height(),width:this.wrapper.width(),videoId:this._getMediaId(),playerVars:t,events:{onReady:this._onYouTubePlayerReady,onStateChange:this._onPlayerStateChangeHandler}})},_onYouTubePlayerReady:function(e){this._ytmedia=e.target,this._ytmedia.getIframe().style.width="100%",this._ytmedia.getIframe().style.height="100%",this._youTubeVideo=!0,this._mediaDurationChangeHandler(),this.options.autoPlay?(this._playStateToggle(!0),this._ytmedia.loadVideoById(this._getMediaId())):this._ytmedia.cueVideoById(this._getMediaId()),this.options.mute&&this.mute(!0),this.trigger(a)},_updateTitle:function(){this.titlebar().text(this.media().title||this.media().source)},_onPlayerStateChange:function(e){0===e.data?(this._slider.value(0),this._paused=!1,this._playStateToggle(!0),this.trigger(i),this.options.autoRepeat&&this.play()):1===e.data?(this._mediaDurationChange(),this._ytmedia.setVolume(this.volume()),this._sliderChangeFired?this._sliderChangeFired=!1:this._uiDisplay(!1),this.trigger(o),this._playStateToggle(!0),this._poll("progress",this._mediaTimeUpdate,500,this),this._paused=!1):2===e.data&&(this._paused||(this._uiDisplay(!0),this._playStateToggle(!1),this.trigger(r),this._paused=!0))},_getMediaId:function(){var e=this._currentUrl(),t=/^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/,n=e.match(t);return n&&11===n[7].length&&(e=n[7]),e},_mouseClick:function(){this.isPaused()?this.play():this.pause()},_initializePlayer:function(){this._mouseMoveHandler||(this._mouseMoveHandler=H(this._mouseMove,this),this._mouseInHandler=H(this._mouseIn,this),this._mouseOutHandler=H(this._mouseOut,this),e(this.wrapper).on("mouseenter"+F,this._mouseInHandler).on("mouseleave"+F,this._mouseOutHandler).on("mousemove"+F,this._mouseMoveHandler)),!this._ytmedia&&this._youTubeVideo?this._createYoutubePlayer():this._media||this._youTubeVideo||this._createHtmlPlayer()},_createHtmlPlayer:function(){this._videoOverlay||(this._mouseClickHanlder=H(this._mouseClick,this),this.wrapper.append("<div class='"+C+"'></div>"),this._videoOverlay=this.wrapper.find(".k-mediaplayer-overlay").on("click"+F,this._mouseClickHanlder)),this._mediaTimeUpdateHandler=H(this._mediaTimeUpdate,this),this._mediaDurationChangeHandler=H(this._mediaDurationChange,this),this._mediaEndedHandler=H(this._mediaEnded,this),this._mediaCanPlayHandler=H(this._mediaReady,this),this._mediaPlayHandler=H(this._mediaPlay,this),this._videoOverlay.after(B.htmlPlayer),this._media=this.wrapper.find(S+x)[0],e(this._media).css({width:"100%",height:"100%"}),this.options.mute&&this.mute(!0),this._media.ontimeupdate=this._mediaTimeUpdateHandler,this._media.ondurationchange=this._mediaDurationChangeHandler,this._media.oncanplay=this._mediaCanPlayHandler,this._media.onplay=this._mediaPlayHandler,this._media.onended=this._mediaEndedHandler,this._media.loop=this.options.autoRepeat},_mouseIn:function(){this._uiDisplay(!0)},_mouseOut:function(){this._poll("mouseIdle",this._mouseIdle,3e3,this)},_mouseIdle:function(){return this._uiDisplay(!1),!1},_mouseMove:function(){this._titleBar.is(":animated")||this._toolBar.element.is(":animated")||this._slider.wrapper.is(":animated")||this._uiDisplay(!0),this._poll("mouseIdle",this._mouseIdle,3e3,this)},_uiDisplay:function(e){var t="slow",n=this._titleBar.add(this._toolBar.element.parent());e?n.fadeIn(t):(n.fadeOut(t),this.options.navigatable&&this.wrapper.focus())},setOptions:function(e){I.fn.setOptions.call(this,e)},destroy:function(){I.fn.destroy.call(this),this.isPaused()||this.pause(),this.element.off(F),this.element.find(S+C).off(F),this._timers=null,this._mouseMoveHandler=null,this._mouseOutHandler=null,this._mouseInHandler=null,this._mouseClickHanlder=null,this._keyDownHandler=null,this._fullscreenHandler=null,this._toolbarClickHandler=null,this._sliderDragChangeHandler=null,this._sliderDraggingHandler=null,this._volumeDraggingHandler=null,this._volumeChangeHandler=null,this._youtubeApiReadyHandler=null,this._onYouTubePlayerReady=null,this._onPlayerStateChangeHandler=null,this._dropDownSelectHandler=null,this._youTubeVideo?this._ytmedia.destroy():(this._media.ontimeupdate=this._mediaTimeUpdateHandler=null,this._media.ondurationchange=this._mediaDurationChangeHandler=null,this._media.oncanplay=this._mediaCanPlayHandler=null,this._media.onplay=this._mediaPlayHandler=null,this._media.onended=this._mediaEndedHandler=null,this._media.src="",this._media.remove()),this._mouseMoveTimer=null,clearTimeout(this._mouseMoveTimer),n.destroy(this.element)},seek:function(e){if(t===e)return 1e3*this._youTubeVideo?this._ytmedia.getCurrentTime():this._media?this._media.currentTime:0;var n=e/1e3;return this._youTubeVideo?n+3>=this._ytmedia.getDuration()|0?this._ytmedia.seekTo(this._ytmedia.getDuration()-3|0,!0):this._ytmedia.seekTo(n,!0):this._media.currentTime=n,this},play:function(){return this._youTubeVideo?this._ytmedia.playVideo():(n.support.mobileOS&&this._uiDisplay(!1),this._media.play()),this._paused=!1,this._playStateToggle(!0),this},stop:function(){return this._youTubeVideo&&this._ytmedia?this._ytmedia.stopVideo():this._media&&!this._youTubeVideo&&(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause(),this._media.currentTime=0),this._paused=!0,this._playStateToggle(!1),this},pause:function(){return this._youTubeVideo?this._ytmedia.pauseVideo():(n.support.mobileOS&&this._uiDisplay(!0),this._media.pause()),this._paused=!0,this._playStateToggle(!1),this.trigger(r),this},toolbar:function(){return this._toolBar},dropdown:function(){return this._dropDown},titlebar:function(){return this._titleBar},fullScreen:function(e){if(t===e)return this._isInFullScreen||!1;var n=this.element.get(0);e?(this.element.addClass("k-mediaplayer-fullscreen"),n.requestFullscreen?n.requestFullscreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.msRequestFullscreen&&n.msRequestFullscreen(),this._isInFullScreen=!0):(document.cancelFullscreen?document.cancelFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msCancelFullscreen?document.msCancelFullscreen():document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen&&document.msExitFullscreen(),this.element.removeClass("k-mediaplayer-fullscreen"),this._isInFullScreen=!1),this._slider.resize()},volume:function(e){return t===e?t!==this._volume?this._volume:this._volume=this.options.volume:(this._volume=e,this.mute(e<=0),this._youTubeVideo?this._ytmedia.setVolume(this._volume):this._media.volume=this._volume/100,this._volumeSlider.value(e),t)},mute:function(e){var n=this._youTubeVideo?this._ytmedia&&this._ytmedia.isMuted():this._media&&this._media.muted;return t===e||e===n?n:(this._youTubeVideo?e?this._ytmedia.mute():this._ytmedia.unMute():this._media.muted=e,this._volumeSlider.value(e?0:this._media&&100*this._media.volume||this._ytmedia&&this._ytmedia.getVolume()),this.trigger(l),this._changeVolumeButtonImage(this._volumeSlider.value()),t)},isEnded:function(){return this._youTubeVideo?0===this._ytmedia.getPlayerState():this._media.ended},media:function(e){var n=this.dropdown();return t===e?t!==this._mediaData?this._mediaData:this._mediaData=this.options.media:(R(e.source)?(n.setDataSource(e.source),n.wrapper.show()):n.wrapper.hide(),this._mediaData=e,this._updateTitle(),this._setPlayerUrl(),t)},isPaused:function(){return this._paused},isPlaying:function(){return!this.isEnded()&&!this._paused},_aria:function(){this.wrapper.attr("role","region")},_navigatable:function(){this._fullscreenHandler=H(this._fullscreen,this),e(document).on("webkitfullscreenchange mozfullscreenchange fullscreenchange"+F,this._fullscreenHandler),this.options.navigatable&&(this.wrapper.attr("tabIndex",0),this._keyDownHandler=H(this._keyDown,this),this.wrapper.on("keydown"+F,this._keyDownHandler))},_fullscreen:function(){var e=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;this._uiDisplay(!0),this._slider.resize(),e||(this.wrapper.find('span[class*="k-i-fullscreen"]').removeClass(u).addClass(d),this.fullScreen(!1))},_keyDown:function(e){var t,n;e.preventDefault(),t=this.wrapper.find('span[class*="k-i-fullscreen"]'),e.keyCode===N.SPACEBAR?this.isPlaying()?this.pause():this.play():e.keyCode!==N.ENTER||this._isInFullScreen?77===e.keyCode?(n=this.mute(),this.mute(!n)):e.keyCode===N.ESC&&this._isInFullScreen&&(t.removeClass(u).addClass(d),this.fullScreen(!1)):(t.removeClass(d).addClass(u),this.fullScreen(!0))},_error:function(){},_progress:function(){}});D.plugin(P)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pivotgrid.min",["kendo.dom.min","kendo.data.min"],e)}(function(){return function(e,t){function n(e){var n="string"==typeof e?[{name:e}]:e,i="[object Array]"===ke.call(n)?n:n!==t?[n]:[];return ye(i,function(e){return"string"==typeof e?{name:e}:{name:e.name,type:e.type}})}function i(e){var n="string"==typeof e?[{name:[e],expand:!1}]:e,i="[object Array]"===ke.call(n)?n:n!==t?[n]:[];return ye(i,function(e){return"string"==typeof e?{name:[e],expand:!1}:{name:"[object Array]"===ke.call(e.name)?e.name.slice():[e.name],expand:e.expand}})}function r(e){return e.indexOf(" ")!==-1&&(e='["'+e+'"]'),e}function o(e,t,n,i){var r,a,s,l;if(n||(n=t),i||(i=0),l=n.members[i],l&&!l.measure){if(s=l.children,a=s.length,n===t?e[pe.stringify([l.name])]=!!a:a&&(e[pe.stringify(se(n,i))]=!0),a)for(r=0;r<a;r++)o(e,t,s[r],i);o(e,t,n,i+1)}}function a(t){var n,i,r={};t.length&&o(r,t[0]),n=[];for(i in r)n.push({name:e.parseJSON(i),expand:r[i]});return n}function s(e,t){var n,i,r,o,a=t.tuples||[],s=a[0];if(s&&e.length<s.members.length)for(n=s.members,i=0;i<n.length;i++)if(!n[i].measure){for(r=!1,o=0;o<e.length;o++)if(0===P(e[o]).indexOf(n[i].hierarchy)){r=!0;break}r||e.push({name:[n[i].name],expand:!1})}}function l(e){var t,n=[],i=e.members;for(t=0;t<i.length;t++)i[t].measure||n.push({name:[i[t].name],expand:i[t].children.length>0});return n}function d(e,t,n){var r,o;return e=e||{},s(t,e),n.length>1&&t.push({name:De,measure:!0,children:i(n)}),r={members:t},e.tuples&&(o=x(e.tuples,r),o.tuple&&(t=l(o.tuple))),t}function u(e){var t=pe.getter(e.field,!0);return function(n,i){return e.aggregate(t(n.dataItem),i,n)}}function c(e){return"number"==typeof e&&!isNaN(e)}function h(e){return e&&e.getTime}function p(e){return e[e.length]={value:"",fmtValue:"",ordinal:e.length},e}function f(e,t,n){if(e.tuples.length<_(t.tuples,n))return t}function m(e,t,n,i,r){var o,a,s,l=e.length,d=_(t,i),u=i.length||1;for(a=0;a<n;a++)for(o=0;o<l;o++)s=v(e[o],t)*u,s+=o%u,r[a*l+o].ordinal=a*d+s}function g(e,t,n,i,r){var o,a,s,l=e.length,d=i.length||1;for(a=0;a<l;a++)for(s=v(e[a],t),s*=d,s+=a%d,o=0;o<n;o++)r[a*n+o].ordinal=s*n+o}function v(e,t){return x(t,e).index}function _(e,t){var n,i,r;if(!e.length)return 0;for(n=e.slice(),i=n.shift(),r=1;i;)i.members?[].push.apply(n,i.members):i.children&&(i.measure||(r+=i.children.length),[].push.apply(n,i.children)),i=n.shift();return t.length&&(r*=t.length),r}function b(e){return e||(e={tuples:[]}),e.tuples||(e.tuples=[]),e}function k(e,t,n){var i,r,o,a;if(!e)return 0;for(i=Math.max(n.length,1),r=e.members.slice(0,t),o=r.shift(),a=i;o;)o.name===De?a+=i-1:o.children?[].push.apply(r,o.children):(a++,[].push.apply(r,o.members)),o=r.shift();return a}function w(e,t,n){var i,r,o,a,s,l;if(!t[0])return{parsedRoot:null,tuples:e,memberIndex:0,index:0};if(i=x(e,t[0]),!i.tuple)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};if(r=i.tuple.members,o=t[0].members,a=-1,r.length!==o.length)return{parsedRoot:null,tuples:t,memberIndex:0,index:0};for(s=0,l=r.length;s<l;s++)!r[s].measure&&o[s].children[0]&&(a==-1&&o[s].children.length&&(a=s),r[s].children=o[s].children);return n=Math.max(n.length,1),{parsedRoot:i.tuple,index:i.index*n,memberIndex:a,tuples:e}}function y(e,t){var n,i,r=!0;for(e=e.members,t=t.members,n=0,i=e.length;n<i;n++)e[n].measure||t[n].measure||(r=r&&P(e[n])===P(t[n]));return r}function x(e,t){var n,i,r,o,a,s,l,d=0;for(n=0,i=e.length;n<i;n++){if(r=e[n],y(r,t))return{tuple:r,index:d};for(d++,a=0,s=r.members.length;a<s;a++)if(l=r.members[a],!l.measure&&(o=x(l.children,t),d+=o.index,o.tuple))return{tuple:o.tuple,index:d}}return{index:d}}function C(e,t){var n,i,r,o="";for(i=0,r=e.length;i<r;i++)n=e[i],o+=n.name,t[o]||(t[o]=n)}function T(e,t){var n,i,r,o,a=e.members,s="",l="";for(n=0,i=a.length;n<i;n++){if(r=a[n],o){if(t[s+r.name]){s+=r.name,o=t[s];continue}return t[s+r.parentName]?t[s+r.parentName]:t[l+r.parentName]?t[l+r.parentName]:t[l]}if(s+=r.name,o=t[r.parentName],!o&&(o=t[s],!o))return null;o&&(l+=o.name)}return o}function S(e,t){var n,i,r,o;if(0===t.length)return-1;for(n=t[0],i=e.members,r=0,o=i.length;r<o;r++)if(i[r].name==n.name)return r}function D(n,i){if(!(i<0)){var r={name:De,measure:!0,children:[e.extend({members:[],dataIndex:n.dataIndex},n.members[i])]};n.members.splice(i,1,r),n.dataIndex=t}}function F(e,t){var n,i,r,o,a,s;if(e.length<1)return[];for(n=[],i={},r=S(e[0],t),o=0;o<e.length;o++)a=e[o],a.dataIndex=o,D(a,r),s=T(a,i),s?s.children.push(r<0||!s.measure?a:a.members[r].children[0]):n.push(a),C(a.members,i);return n}function E(e,t){var n,i,r,o,a,s,l,d,u;if(!e||!e.length)return t;for(n=[],i=I(e),r=i.length,o=Math.max(t.length/r,1),a=0;a<r;a++)for(l=o*a,d=o*i[a],s=0;s<o;s++)u=parseInt(d+s,10),n[parseInt(l+s,10)]=t[u]||{value:"",fmtValue:"",ordinal:u};return n}function A(e,t){var n,i,r,o,a,s,l,d;if(!e||!e.length)return t;for(n=[],i=I(e),r=i.length,o=Math.max(t.length/r,1),s=0;s<o;s++)for(l=r*s,a=0;a<r;a++)d=i[a]+l,n[l+a]=t[d]||{value:"",fmtValue:"",ordinal:d};return n}function I(e){var n,i,r,o,a,s,l;for(e=e.slice(),n=[],i=e.shift();i;){for(i.dataIndex!==t&&n.push(i.dataIndex),a=0,r=0,o=i.members.length;r<o;r++)l=i.members[r],s=l.children,l.measure?[].splice.apply(e,[0,0].concat(s)):[].splice.apply(e,[a,0].concat(s)),a+=s.length;i=e.shift()}return n}function R(e){var t=e.split(".");return t.length>2?t[0]+"."+t[1]:e}function M(e,t){var n=e.length-1,i=e[n],r=z(t,i);return r&&r.dir?i="ORDER("+i+".Children,"+r.field+".CurrentMember.MEMBER_CAPTION,"+r.dir+")":i+=".Children",e[n]=i,e}function z(e,t){for(var n=0,i=e.length;n<i;n++)if(0===t.indexOf(e[n].field))return e[n];return null}function H(e){var t,n="CROSSJOIN({";return e.length>2?(t=e.pop(),n+=H(e)):(n+=e.shift(),t=e.pop()),n+="},{",n+=t,n+="})"}function N(e,t){var n=e.slice(0);return t.length>1&&n.push("{"+B(t).join(",")+"}"),H(n)}function B(e){for(var n,i=0,r=e.length,o=[];i<r;i++)n=e[i],o.push(n.name!==t?n.name:n);return o}function P(e){return e=e.name||e,"[object Array]"===ke.call(e)&&(e=e[e.length-1]),e}function L(e){for(var t=e.length,n=[],i=0;i<t;i++)n.push(e[i].name[0]);return n}function O(e,t){var n,i,r,o=0,a=e.length,s=t.length;for(t=t.slice(0);o<a;o++)for(n=e[o],r=0;r<s;r++)if(i=R(t[r]),n.indexOf(i)!==-1){t[r]=n;break}return{names:t,expandedIdx:r,uniquePath:t.slice(0,r+1).join("")}}function V(e){for(var t,n,i,r,o,a,s=[],l=[],d=[],u=0,c=e.length;u<c;u++)if(t=e[u],r=t.name,a=!1,"[object Array]"!==ke.call(r)&&(t.name=r=[r]),r.length>1)l.push(t);else{for(o=R(r[0]),n=0,i=d.length;n<i;n++)if(0===d[n].name[0].indexOf(o)){a=!0;break}a||d.push(t),t.expand&&s.push(t)}return s=s.concat(l),{root:d,expanded:s}}function W(e,t,n){var i,r,o,a,s,l,d,u,c="";if(e=e||[],i=V(e),r=i.root,o=L(r),a=[],i=i.expanded,s=i.length,l=0,u=[],o.length>1||t.length>1){for(a.push(N(o,t));l<s;l++)d=M(i[l].name,n),u=O(d,o).names,a.push(N(u,t));c+=a.join(",")}else{for(;l<s;l++)d=M(i[l].name,n),u.push(d[0]);c+=o.concat(u).join(",")}return c}function U(e){var t="",n=e.value,i=e.field,r=e.operator;return"in"==r?(t+="{",t+=n,t+="}"):(t+="neq"==r||"doesnotcontain"==r?"-":"",t+="Filter(",t+=i+".MEMBERS",t+=pe.format(K[r],i,n),t+=")"),t}function q(e,t){var n,i,r="",o=e.filters,a=o.length;for(i=a-1;i>=0;i--)n="SELECT (",n+=U(o[i]),n+=") ON 0",i==a-1?(n+=" FROM ["+t+"]",r=n):r=n+" FROM ( "+r+" )";return r}function j(e,t,n){var i,r,o="";if(t){o+="<"+e+">";for(r in t)i=t[r],n&&(r=r.replace(/([A-Z]+(?=$|[A-Z][a-z])|[A-Z]?[a-z]+)/g,"$1_").toUpperCase().replace(/_$/,"")),o+="<"+r+">"+i+"</"+r+">";o+="</"+e+">"}else o+="<"+e+"/>";return o}function G(e){if(null==e)return[];var t=ke.call(e);return"[object Array]"!==t?[e]:e}function $(e){var t,n,i,r,o={tuples:[]},a=G(pe.getter("Tuples.Tuple",!0)(e)),s=pe.getter("Caption['#text']"),l=pe.getter("UName['#text']"),d=pe.getter("LName['#text']"),u=pe.getter("LNum['#text']"),c=pe.getter("CHILDREN_CARDINALITY['#text']",!0),h=pe.getter("['@Hierarchy']"),p=pe.getter("PARENT_UNIQUE_NAME['#text']",!0);for(t=0;t<a.length;t++){for(n=[],i=G(a[t].Member),r=0;r<i.length;r++)n.push({children:[],caption:s(i[r]),name:l(i[r]),levelName:d(i[r]),levelNum:u(i[r]),hasChildren:parseInt(c(i[r]),10)>0,parentName:p(i[r]),hierarchy:h(i[r])});o.tuples.push({members:n})}return o}var K,Y,Q,X,J,Z,ee,te,ne,ie,re,oe,ae,se,le,de,ue,ce,he,pe=window.kendo,fe=pe.ui,me=pe.Class,ge=fe.Widget,ve=pe.data.DataSource,_e=pe._outerWidth,be=pe._outerHeight,ke={}.toString,we=function(e){return e},ye=e.map,xe=e.extend,Ce=pe.isFunction,Te="change",Se="error",De="Measures",Fe="progress",Ee="stateReset",Ae="auto",Ie="<div/>",Re=".kendoPivotGrid",Me="__row_total__",ze="dataBinding",He="dataBound",Ne="expandMember",Be="collapseMember",Pe="k-i-collapse",Le="k-i-expand",Oe="<span>#: data.member.caption || data.member.name #</span>",Ve='<span class="k-icon k-i-kpi-status-#=data.dataItem.value > 0 ? "open" : data.dataItem.value < 0 ? "deny" : "hold"#" title="#:data.dataItem.value#"></span>',We='<span class="k-icon k-i-kpi-trend-#=data.dataItem.value > 0 ? "increase" : data.dataItem.value < 0 ? "decrease" : "equal"#" title="#:data.dataItem.value#"></span>',Ue='#= data.dataItem ? kendo.htmlEncode(data.dataItem.fmtValue || data.dataItem.value) || "&nbsp;" : "&nbsp;" #',qe='<table class="k-pivot-layout"><tr><td><div class="k-pivot-rowheaders"></div></td><td><div class="k-pivot-table k-state-default"></div></td></tr></table>',je="rows",Ge="columns",$e={sum:function(e,t){var n=t.accumulator;return c(n)?c(e)&&(n+=e):n=e,n},count:function(e,t){return(t.accumulator||0)+1},average:{aggregate:function(e,n){var i=n.accumulator;return n.count===t&&(n.count=0),c(i)?c(e)&&(i+=e):i=e,c(e)&&n.count++,i},result:function(e){var t=e.accumulator;return c(t)&&(t/=e.count),t}},max:function(e,t){var n=t.accumulator;return c(n)||h(n)||(n=e),n<e&&(c(e)||h(e))&&(n=e),n},min:function(e,t){var n=t.accumulator;return c(n)||h(n)||(n=e),n>e&&(c(e)||h(e))&&(n=e),n}},Ke=me.extend({init:function(e){this.options=xe({},this.options,e),this.dimensions=this._normalizeDescriptors("field",this.options.dimensions),this.measures=this._normalizeDescriptors("name",this.options.measures)},_normalizeDescriptors:function(e,t){var n,i,r,o;if(t=t||{},n={},"[object Array]"===ke.call(t)){for(r=0,o=t.length;r<o;r++)i=t[r],"string"==typeof i?n[i]={}:i[e]&&(n[i[e]]=i);t=n}return t},_rootTuples:function(e,n){var i,r,o,a,s=n.length||1,l=this.dimensions||[],d=0,u=e.length,c=[],h=[];if(u||n.length){for(d=0;d<s;d++){for(i={members:[]},a=0;a<u;a++)r=e[a],o=r.split("&"),i.members[i.members.length]={children:[],caption:(l[r]||{}).caption||"All",name:r,levelName:r,levelNum:"0",hasChildren:!0,parentName:o.length>1?o[0]:t,hierarchy:r};s>1&&(i.members[i.members.length]={children:[],caption:n[d].caption,name:n[d].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!1,parentName:t,hierarchy:"MEASURES"}),c[c.length]=i}h.push(Me)}return{keys:h,tuples:c}},_expandedTuples:function(e,n,i){var r,o,a,s,l,d,u,c,h,p,f,m=i.length||1,g=this.dimensions||[],v=[],_=[];for(a in e){for(s=e[a],u=this._findExpandedMember(n,s.uniquePath),l=v[u.index]||[],d=_[u.index]||[],c=u.member.names,r=0;r<m;r++){for(o={members:[]},f=0;f<c.length;f++)f===u.member.expandedIdx?(o.members[o.members.length]={children:[],caption:s.value,name:s.name,hasChildren:!1,levelNum:1,levelName:s.parentName+s.name,parentName:s.parentName,hierarchy:s.parentName+s.name},0===r&&d.push(se(o,f).join(""))):(p=c[f],h=p.split("&"),o.members[o.members.length]={children:[],caption:(g[p]||{}).caption||"All",name:p,levelName:p,levelNum:"0",hasChildren:!0,parentName:h.length>1?h[0]:t,hierarchy:p});m>1&&(o.members[o.members.length]={children:[],caption:i[r].caption,name:i[r].descriptor.name,levelName:"MEASURES",levelNum:"0",hasChildren:!0,parentName:t,hierarchy:"MEASURES"}),l[l.length]=o}v[u.index]=l,_[u.index]=d}return{keys:_,tuples:v}},_findExpandedMember:function(e,t){for(var n=0;n<e.length;n++)if(e[n].uniquePath===t)return{member:e[n],index:n}},_asTuples:function(e,t,n){var i,r;return n=n||[],i=this._rootTuples(t.root,n),r=this._expandedTuples(e,t.expanded,n),{keys:[].concat.apply(i.keys,r.keys),tuples:[].concat.apply(i.tuples,r.tuples)}},_measuresInfo:function(e,t){for(var n,i,r=0,o=e&&e.length,a=[],s={},l={},d=this.measures||{};r<o;r++)i=e[r].descriptor.name,n=d[i]||{},a.push(i),n.result&&(s[i]=n.result),n.format&&(l[i]=n.format);return{names:a,formats:l,resultFuncs:s,rowAxis:t}},_toDataArray:function(e,t,n,i){var r,o,a,s,l,d,u,c,h,p,f=[],m=1,g=[],v=n.length||1,_=i.length||1;for(t.rowAxis?(g=t.names,m=g.length):p=t.names,a=0;a<v;a++)for(u=e[n[a]||Me],d=0;d<m;d++)for(t.rowAxis&&(p=[g[d]]),s=0;s<_;s++)for(h=i[s]||Me,c=u.items[h],r=h===Me?u.aggregates:c?c.aggregates:{},l=0;l<p.length;l++)o=p[l],this._addData(f,r[o],t.formats[o],t.resultFuncs[o]);return f},_addData:function(e,t,n,i){var r,o="";t&&(t=i?i(t):t.accumulator,o=n?pe.format(n,t):t),r=e.length,e[r]={ordinal:r,value:t||"",fmtValue:o}},_matchDescriptors:function(e,n,i){for(var r,o,a,s,l=n.names,d=n.expandedIdx;d>0;)if(r=l[--d].split("&"),r.length>1&&(o=r[0],a=r[1],s=i[o](e),s=s!==t&&null!==s?""+s:s,s!=a))return!1;return!0},_calculateAggregate:function(e,t,n){var i,r,o,a={};for(o=0;o<e.length;o++)r=e[o].descriptor.name,i=n.aggregates[r]||{},i.accumulator=e[o].aggregator(t,i),a[r]=i;return a},_processColumns:function(e,n,i,r,o,a,s,l){for(var d,u,c,h,p,f,m,g,v=o.dataItem,_=0;_<n.length;_++)u=n[_],this._matchDescriptors(v,u,i)&&(g=u.names.slice(0,u.expandedIdx).join(""),f=u.names[u.expandedIdx],d=i[f](v),d=d!==t&&null!==d?""+d:d,m=f,f=f+"&"+d,p=g+f,c=r[p]||{index:s.columnIndex,parentName:m,name:f,uniquePath:g+m,value:d},h=a.items[p]||{aggregates:{}},a.items[p]={index:c.index,aggregates:this._calculateAggregate(e,o,h)},l&&(r[p]||s.columnIndex++,r[p]=c))},_measureAggregators:function(e){var t,n,i,r,o,a,s=e.measures||[],l=this.measures||{},d=[];if(s.length){for(i=0,r=s.length;i<r;i++)if(t=s[i],n=l[t.name],o=null,n){if(a=n.aggregate,"string"==typeof a){if(o=$e[a.toLowerCase()],!o)throw Error("There is no such aggregate function");n.aggregate=o.aggregate||o,n.result=o.result}d.push({descriptor:t,caption:n.caption,result:n.result,aggregator:u(n)})}}else d.push({descriptor:{name:"default"},caption:"default",aggregator:function(){return 1}});return d},_buildGetters:function(e){var t,n,i,o={};for(i=0;i<e.length;i++)n=e[i],t=n.split("&"),t.length>1?o[t[0]]=pe.getter(t[0],!0):o[n]=pe.getter(r(n),!0);return o},_parseDescriptors:function(e){var t,n=V(e),i=L(n.root),r=n.expanded,o=[];for(t=0;t<r.length;t++)o.push(O(r[t].name,i));return{root:i,expanded:o}},_filter:function(e,t){var n,i,r;if(!t)return e;for(i=0,r=t.filters;i<r.length;i++)n=r[i],"in"===n.operator&&(r[i]=this._normalizeFilter(n));return new pe.data.Query(e).filter(t).data},_normalizeFilter:function(e){var t,n=e.value.split(","),i=[];if(!n.length)return n;for(t=0;t<n.length;t++)i.push({field:e.field,operator:"eq",value:n[t]});return{logic:"or",filters:i}},process:function(e,n){var r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C,T,S,D,F,E,A,I,R,M;if(e=e||[],n=n||{},e=this._filter(e,n.filter),r=n.measures||[],o="rows"===n.measuresAxis,a=n.columns||[],s=n.rows||[],!a.length&&s.length&&(!r.length||r.length&&o)&&(a=s,s=[],o=!1),a.length||s.length||(o=!1),!a.length&&r.length&&(a=i(n.measures)),a=this._parseDescriptors(a),s=this._parseDescriptors(s),l={},d={},u={},h={columnIndex:0},p=this._measureAggregators(n),f=this._buildGetters(a.root),m=this._buildGetters(s.root),g=!1,v=a.expanded,_=s.expanded,w=0!==_.length,R=e.length,M=0,a.root.length||s.root.length)for(g=!0,M=0;M<R;M++)for(b=e[M],k={dataItem:b,index:M},T=l[Me]||{items:{},aggregates:{}},this._processColumns(p,v,f,d,k,T,h,!w),T.aggregates=this._calculateAggregate(p,k,T),l[Me]=T,y=0;y<_.length;y++)x=_[y],this._matchDescriptors(b,x,m)?(D=x.names.slice(0,x.expandedIdx).join(""),C=x.names[x.expandedIdx],F=C,c=m[C](b),c=c!==t?""+c:c,C=C+"&"+c,S=D+C,u[S]={uniquePath:D+F,parentName:F,name:C,value:c},E=l[S]||{items:{},aggregates:{}},this._processColumns(p,v,f,d,k,E,h,!0),E.aggregates=this._calculateAggregate(p,k,E),l[S]=E):this._processColumns(p,v,f,d,k,{items:{},aggregates:{}},h,!0);return g&&R?(!(p.length>1)||n.columns&&n.columns.length||(a={root:[],expanded:[]}),A=this._asTuples(d,a,o?[]:p),I=this._asTuples(u,s,o?p:[]),d=A.tuples,u=I.tuples,l=this._toDataArray(l,this._measuresInfo(p,o),I.keys,A.keys)):l=d=u=[],{axes:{columns:{tuples:d},rows:{tuples:u}},data:l}}}),Ye=me.extend({init:function(e,t){this.transport=t,this.options=t.options||{},this.transport.discover||Ce(e.discover)&&(this.discover=e.discover)},read:function(e){return this.transport.read(e)},update:function(e){return this.transport.update(e)},create:function(e){return this.transport.create(e)},destroy:function(e){return this.transport.destroy(e)},discover:function(e){return this.transport.discover?this.transport.discover(e):(e.success({}),t)},catalog:function(n){var i,r=this.options||{};return n===t?(r.connection||{}).catalog:(i=r.connection||{},i.catalog=n,this.options.connection=i,e.extend(this.transport.options,{connection:i}),t)},cube:function(e){var n,i=this.options||{};return e===t?(i.connection||{}).cube:(n=i.connection||{},
n.cube=e,this.options.connection=n,xe(!0,this.transport.options,{connection:n}),t)}}),Qe=ve.extend({init:function(t){var r,o=((t||{}).schema||{}).cube,a="columns",s={axes:we,cubes:we,catalogs:we,measures:we,dimensions:we,hierarchies:we,levels:we,members:we};o&&(s=e.extend(s,this._cubeSchema(o)),this.cubeBuilder=new Ke(o)),ve.fn.init.call(this,xe(!0,{},{schema:s},t)),this.transport=new Ye(this.options.transport||{},this.transport),this._columns=i(this.options.columns),this._rows=i(this.options.rows),r=this.options.measures||[],"[object Object]"===ke.call(r)&&(a=r.axis||"columns",r=r.values||[]),this._measures=n(r),this._measuresAxis=a,this._skipNormalize=0,this._axes={}},_cubeSchema:function(t){return{dimensions:function(){var e,n=[],i=t.dimensions;for(e in i)n.push({name:e,caption:i[e].caption||e,uniqueName:e,defaultHierarchy:e,type:1});return t.measures&&n.push({name:De,caption:De,uniqueName:De,type:2}),n},hierarchies:function(){return[]},measures:function(){var e,n=[],i=t.measures;for(e in i)n.push({name:e,caption:e,uniqueName:e,aggregator:e});return n},members:e.proxy(function(e,n){var i,o,a=n.levelUniqueName||n.memberUniqueName,s=this.options.schema.data,l=Ce(s)?s:pe.getter(s,!0),d=this.options.data&&l(this.options.data)||this._rawData||[],u=[],c=0,h={};if(a&&(a=a.split(".")[0]),!n.treeOp)return u.push({caption:t.dimensions[a].caption||a,childrenCardinality:"1",dimensionUniqueName:a,hierarchyUniqueName:a,levelUniqueName:a,name:a,uniqueName:a}),u;for(i=pe.getter(r(a),!0);c<d.length;c++)o=i(d[c]),!o&&0!==o||h[o]||(h[o]=!0,u.push({caption:o,childrenCardinality:"0",dimensionUniqueName:a,hierarchyUniqueName:a,levelUniqueName:a,name:o,uniqueName:o}));return u},this)}},options:{serverSorting:!0,serverPaging:!0,serverFiltering:!0,serverGrouping:!0,serverAggregates:!0},catalog:function(e){return e===t?this.transport.catalog():(this.transport.catalog(e),this._mergeState({}),this._axes={},this.data([]),t)},cube:function(e){return e===t?this.transport.cube():(this.transport.cube(e),this._axes={},this._mergeState({}),this.data([]),t)},axes:function(){return this._axes},columns:function(e){return e===t?this._columns:(this._skipNormalize+=1,this._clearAxesData=!0,this._columns=i(e),this.query({columns:e,rows:this.rowsAxisDescriptors(),measures:this.measures(),sort:this.sort(),filter:this.filter()}),t)},rows:function(e){return e===t?this._rows:(this._skipNormalize+=1,this._clearAxesData=!0,this._rows=i(e),this.query({columns:this.columnsAxisDescriptors(),rows:e,measures:this.measures(),sort:this.sort(),filter:this.filter()}),t)},measures:function(e){return e===t?this._measures:(this._skipNormalize+=1,this._clearAxesData=!0,this.query({columns:this.columnsAxisDescriptors(),rows:this.rowsAxisDescriptors(),measures:n(e),sort:this.sort(),filter:this.filter()}),t)},measuresAxis:function(){return this._measuresAxis||"columns"},_expandPath:function(e,t){var n,r,o,a="columns"===t?"columns":"rows",s="columns"===t?"rows":"columns",l=i(e),u=P(l[l.length-1]);for(this._lastExpanded=a,l=d(this.axes()[a],l,this.measures()),n=0;n<l.length;n++)if(r=P(l[n]),r===u){if(l[n].expand)return;l[n].expand=!0}else l[n].expand=!1;o={},o[a]=l,o[s]=this._descriptorsForAxis(s),this._query(o)},_descriptorsForAxis:function(e){var t=this.axes(),n=this[e]()||[];return t&&t[e]&&t[e].tuples&&t[e].tuples[0]&&(n=a(t[e].tuples||[])),n},columnsAxisDescriptors:function(){return this._descriptorsForAxis("columns")},rowsAxisDescriptors:function(){return this._descriptorsForAxis("rows")},_process:function(e,t){this._view=e,t=t||{},t.items=t.items||this._view,this.trigger(Te,t)},_query:function(e){var t=this;return e||(this._skipNormalize+=1,this._clearAxesData=!0),t.query(xe({},{page:t.page(),pageSize:t.pageSize(),sort:t.sort(),filter:t.filter(),group:t.group(),aggregate:t.aggregate(),columns:this.columnsAxisDescriptors(),rows:this.rowsAxisDescriptors(),measures:this.measures()},e))},query:function(t){var n=this._mergeState(t);return this._data.length&&this.cubeBuilder?(this._params(n),this._updateLocalData(this._pristineData),e.Deferred().resolve().promise()):this.read(n)},_mergeState:function(e){return e=ve.fn._mergeState.call(this,e),e!==t&&(this._measures=n(e.measures),e.columns?e.columns=i(e.columns):e.columns||(this._columns=[]),e.rows?e.rows=i(e.rows):e.rows||(this._rows=[])),e},filter:function(e){return e===t?this._filter:(this._skipNormalize+=1,this._clearAxesData=!0,this._query({filter:e,page:1}),t)},expandColumn:function(e){this._expandPath(e,"columns")},expandRow:function(e){this._expandPath(e,"rows")},success:function(e){var t;this.cubeBuilder&&(t=(this.reader.data(e)||[]).slice(0)),ve.fn.success.call(this,e),t&&(this._pristineData=t)},_processResult:function(e,t){var n,i,r,o,a,s,l,d,u,c,h;return this.cubeBuilder&&(n=this.cubeBuilder.process(e,this._requestData),e=n.data,t=n.axes),d=this.columns(),u=this.rows(),c=t.columns&&t.columns.tuples,d.length||!u.length||!c||!this._rowMeasures().length&&this.measures().length||(t={columns:{},rows:t.columns}),d.length||u.length||"rows"!==this.measuresAxis()||!c||(t={columns:{},rows:t.columns}),this._axes={columns:b(this._axes.columns),rows:b(this._axes.rows)},t={columns:b(t.columns),rows:b(t.rows)},i=this._normalizeTuples(t.columns.tuples,this._axes.columns.tuples,d,this._columnMeasures()),r=this._normalizeTuples(t.rows.tuples,this._axes.rows.tuples,u,this._rowMeasures()),this._skipNormalize>0&&(this._skipNormalize-=1),this.cubeBuilder||(e=this._normalizeData({columnsLength:t.columns.tuples.length,rowsLength:t.rows.tuples.length,columnIndexes:i,rowIndexes:r,data:e})),"rows"==this._lastExpanded?(o=t.columns.tuples,s=this._columnMeasures(),a=f(t.columns,this._axes.columns,s),a&&(l="columns",t.columns=a,m(o,a.tuples,t.rows.tuples.length,s,e),this.cubeBuilder||(e=this._normalizeData({columnsLength:_(t.columns.tuples,s),rowsLength:t.rows.tuples.length,data:e})))):"columns"==this._lastExpanded&&(o=t.rows.tuples,s=this._rowMeasures(),a=f(t.rows,this._axes.rows,s),a&&(l="rows",t.rows=a,g(o,a.tuples,t.columns.tuples.length,s,e),this.cubeBuilder||(e=this._normalizeData({columnsLength:_(t.rows.tuples,s),rowsLength:t.columns.tuples.length,data:e})))),this._lastExpanded=null,h=this._mergeAxes(t,e,l),this._axes=h.axes,h.data},_readData:function(e){var t=this.reader.axes(e),n=this.reader.data(e);return this.cubeBuilder&&(this._rawData=n),this._processResult(n,t)},_createTuple:function(e,t,n){var i,r,o,a,s,l,d,u,c=e.members,h=c.length,p={members:[]},f=0;for(t&&(h-=1);f<h;f++)u=c[f],r=+u.levelNum,o=u.name,a=u.parentName,d=u.caption||o,s=u.hasChildren,l=u.hierarchy,i=u.levelName,n&&(d="All",0===r?a=u.name:r-=1,s=!0,o=l=i=a),p.members.push({name:o,children:[],caption:d,levelName:i,levelNum:""+r,hasChildren:s,hierarchy:l,parentName:n?"":a});return t&&p.members.push({name:t.name,children:[]}),p},_hasRoot:function(e,t,n){var i,r,o,a,s,l,d;if(t.length)return x(t,e).tuple;for(i=e.members,a=!0,l=0,d=i.length;l<d;l++)if(r=i[l],s=+r.levelNum||0,o=n[l],!(0===s||o&&r.name===P(o))){a=!1;break}return a},_mergeAxes:function(e,t,n){var i,r,o,a,s,l=this._columnMeasures(),d=this._rowMeasures(),u=this.axes(),c=_(u.rows.tuples,d),h=e.rows.tuples.length,p=_(u.columns.tuples,l),f=e.columns.tuples.length;return"columns"==n?(f=p,r=e.columns.tuples):(r=F(e.columns.tuples,l),t=A(r,t)),o=w(u.columns.tuples,r,l),"rows"==n?(h=_(e.rows.tuples,d),r=e.rows.tuples):(r=F(e.rows.tuples,d),t=E(r,t)),a=w(u.rows.tuples,r,d),u.columns.tuples=o.tuples,u.rows.tuples=a.tuples,p!==_(u.columns.tuples,l)?(i=o.index+k(o.parsedRoot,o.memberIndex,l),s=p+f,t=this._mergeColumnData(t,i,h,f,s)):c!==_(u.rows.tuples,d)&&(i=a.index+k(a.parsedRoot,a.memberIndex,d),t=this._mergeRowData(t,i,h,f)),0===u.columns.tuples.length&&0===u.rows.tuples.length&&(t=[]),{axes:u,data:t}},_mergeColumnData:function(e,t,n,i,r){var o,a,s,l=this.data().toJSON(),d=0,u=Math.max(this._columnMeasures().length,1);for(n=Math.max(n,1),l.length>0&&(d=u,r-=u),o=0;o<n;o++)a=t+o*r,s=e.splice(0,i),s.splice(0,d),[].splice.apply(l,[a,0].concat(s));return l},_mergeRowData:function(e,t,n,i){var r,o,a,s=this.data().toJSON(),l=Math.max(this._rowMeasures().length,1);for(i=Math.max(i,1),s.length>0&&(n-=l,e.splice(0,i*l)),r=0;r<n;r++)a=e.splice(0,i),o=t*i+r*i,[].splice.apply(s,[o,0].concat(a));return s},_columnMeasures:function(){var e=this.measures(),t=[];return"columns"===this.measuresAxis()&&(0===this.columns().length?t=e:e.length>1&&(t=e)),t},_rowMeasures:function(){var e=this.measures(),t=[];return"rows"===this.measuresAxis()&&(0===this.rows().length?t=e:e.length>1&&(t=e)),t},_updateLocalData:function(e,t){this.cubeBuilder&&(t&&(this._requestData=t),e=this._processResult(e)),this._data=this._observe(e),this._ranges=[],this._addRange(this._data),this._total=this._data.length,this._pristineTotal=this._total,this._process(this._data)},data:function(e){var n=this;return e===t?n._data:(this._pristineData=e.slice(0),this._updateLocalData(e,{columns:this.columns(),rows:this.rows(),measures:this.measures()}),t)},_normalizeTuples:function(e,t,n,i){var r,o,a,s=i.length||1,l=0,d=[],u={},c=0;if(e.length){if(this._skipNormalize<=0&&!this._hasRoot(e[0],t,n)){for(this._skipNormalize=0;l<s;l++)d.push(this._createTuple(e[0],i[l],!0)),u[l]=l;e.splice.apply(e,[0,e.length].concat(d).concat(e)),l=s}if(i.length)for(a=r=e[l],o=r.members.length-1;r;){if(c>=s&&(c=0),r.members[o].name!==i[c].name&&(e.splice(l,0,this._createTuple(r,i[c])),u[l]=l),l+=1,c+=1,r=e[l],s>c&&(!r||le(a,o-1)!==le(r,o-1))){for(;c<s;c++)e.splice(l,0,this._createTuple(a,i[c])),u[l]=l,l+=1;r=e[l]}a=r}return u}},_addMissingDataItems:function(e,n){for(;n.rowIndexes[parseInt(e.length/n.columnsLength,10)]!==t;)for(var i=0;i<n.columnsLength;i++)e=p(e);for(;n.columnIndexes[e.length%n.columnsLength]!==t;)e=p(e);return e},_normalizeOrdinals:function(e,t,n){var i=n.lastOrdinal;if(!t)return p(e);if(t.ordinal-i>1)for(i+=1;i<t.ordinal&&e.length<n.length;)e=this._addMissingDataItems(p(e),n),i+=1;return t.ordinal=e.length,e[e.length]=t,e},_normalizeData:function(e){var t,n,i,r=e.data,o=0,a=[];if(e.lastOrdinal=0,e.columnIndexes=e.columnIndexes||{},e.rowIndexes=e.rowIndexes||{},e.columnsLength=e.columnsLength||1,e.rowsLength=e.rowsLength||1,e.length=e.columnsLength*e.rowsLength,i=e.length,r.length===i)return r;for(;a.length<i;)t=r[o++],t&&(n=t.ordinal),a=this._normalizeOrdinals(this._addMissingDataItems(a,e),t,e),e.lastOrdinal=n;return a},discover:function(t,n){var i=this,r=i.transport;return e.Deferred(function(e){r.discover(xe({success:function(t){t=i.reader.parse(t),i._handleCustomErrors(t)||(n&&(t=n(t)),e.resolve(t))},error:function(t,n,r){e.reject(t),i.error(t,n,r)}},t))}).promise().done(function(){i.trigger("schemaChange")})},schemaMeasures:function(){var e=this;return e.discover({data:{command:"schemaMeasures",restrictions:{catalogName:e.transport.catalog(),cubeName:e.transport.cube()}}},function(t){return e.reader.measures(t)})},schemaKPIs:function(){var e=this;return e.discover({data:{command:"schemaKPIs",restrictions:{catalogName:e.transport.catalog(),cubeName:e.transport.cube()}}},function(t){return e.reader.kpis(t)})},schemaDimensions:function(){var e=this;return e.discover({data:{command:"schemaDimensions",restrictions:{catalogName:e.transport.catalog(),cubeName:e.transport.cube()}}},function(t){return e.reader.dimensions(t)})},schemaHierarchies:function(e){var t=this;return t.discover({data:{command:"schemaHierarchies",restrictions:{catalogName:t.transport.catalog(),cubeName:t.transport.cube(),dimensionUniqueName:e}}},function(e){return t.reader.hierarchies(e)})},schemaLevels:function(e){var t=this;return t.discover({data:{command:"schemaLevels",restrictions:{catalogName:t.transport.catalog(),cubeName:t.transport.cube(),hierarchyUniqueName:e}}},function(e){return t.reader.levels(e)})},schemaCubes:function(){var e=this;return e.discover({data:{command:"schemaCubes",restrictions:{catalogName:e.transport.catalog()}}},function(t){return e.reader.cubes(t)})},schemaCatalogs:function(){var e=this;return e.discover({data:{command:"schemaCatalogs"}},function(t){return e.reader.catalogs(t)})},schemaMembers:function(e){var t=this,n=function(e){return function(n){return t.reader.members(n,e)}}(e);return t.discover({data:{command:"schemaMembers",restrictions:xe({catalogName:t.transport.catalog(),cubeName:t.transport.cube()},e)}},n)},_params:function(e){this._clearAxesData&&(this._axes={},this._data=this._observe([]),this._clearAxesData=!1,this.trigger(Ee));var t=ve.fn._params.call(this,e);return t=xe({measures:this.measures(),measuresAxis:this.measuresAxis(),columns:this.columns(),rows:this.rows()},t),this.cubeBuilder&&(this._requestData=t),t}});Qe.create=function(e){e=e&&e.push?{data:e}:e;var t=e||{},n=t.data;if(t.data=n,!(t instanceof Qe)&&t instanceof pe.data.DataSource)throw Error("Incorrect DataSource type. Only PivotDataSource instances are supported");return t instanceof Qe?t:new Qe(t)},K={contains:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}") > 0',doesnotcontain:', InStr({0}.CurrentMember.MEMBER_CAPTION,"{1}")',startswith:', Left({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',endswith:', Right({0}.CurrentMember.MEMBER_CAPTION,Len("{1}"))="{1}"',eq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"',neq:', {0}.CurrentMember.MEMBER_CAPTION = "{1}"'},Y={schemaCubes:"MDSCHEMA_CUBES",schemaCatalogs:"DBSCHEMA_CATALOGS",schemaMeasures:"MDSCHEMA_MEASURES",schemaDimensions:"MDSCHEMA_DIMENSIONS",schemaHierarchies:"MDSCHEMA_HIERARCHIES",schemaLevels:"MDSCHEMA_LEVELS",schemaMembers:"MDSCHEMA_MEMBERS",schemaKPIs:"MDSCHEMA_KPIS"},Q={read:function(e){var t,n,i,r,o,a='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Execute xmlns="urn:schemas-microsoft-com:xml-analysis"><Command><Statement>';return a+="SELECT NON EMPTY {",t=e.columns||[],n=e.rows||[],i=e.measures||[],r="rows"===e.measuresAxis,o=e.sort||[],!t.length&&n.length&&(!i.length||i.length&&r)&&(t=n,n=[],r=!1),t.length||n.length||(r=!1),t.length?a+=W(t,r?[]:i,o):i.length&&!r&&(a+=B(i).join(",")),a+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON COLUMNS",(n.length||r&&i.length>1)&&(a+=", NON EMPTY {",a+=n.length?W(n,r?i:[],o):B(i).join(","),a+="} DIMENSION PROPERTIES CHILDREN_CARDINALITY, PARENT_UNIQUE_NAME ON ROWS"),e.filter?(a+=" FROM ",a+="(",a+=q(e.filter,e.connection.cube),a+=")"):a+=" FROM ["+e.connection.cube+"]",1==i.length&&t.length&&(a+=" WHERE ("+B(i).join(",")+")"),a+="</Statement></Command><Properties><PropertyList><Catalog>"+e.connection.catalog+"</Catalog><Format>Multidimensional</Format></PropertyList></Properties></Execute></Body></Envelope>",a.replace(/\&/g,"&amp;")},discover:function(t){t=t||{};var n='<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis">';return n+="<RequestType>"+(Y[t.command]||t.command)+"</RequestType>",n+="<Restrictions>"+j("RestrictionList",t.restrictions,!0)+"</Restrictions>",t.connection&&t.connection.catalog&&(t.properties=e.extend({},{Catalog:t.connection.catalog},t.properties)),n+="<Properties>"+j("PropertyList",t.properties)+"</Properties>",n+="</Discover></Body></Envelope>"}},X=pe.data.RemoteTransport.extend({init:function(e){var t=e;e=this.options=xe(!0,{},this.options,e),pe.data.RemoteTransport.call(this,e),Ce(t.discover)?this.discover=t.discover:"string"==typeof t.discover?this.options.discover={url:t.discover}:t.discover||(this.options.discover=this.options.read)},setup:function(t,n){return t.data=t.data||{},e.extend(!0,t.data,{connection:this.options.connection}),pe.data.RemoteTransport.fn.setup.call(this,t,n)},options:{read:{dataType:"text",contentType:"text/xml",type:"POST"},discover:{dataType:"text",contentType:"text/xml",type:"POST"},parameterMap:function(e,t){return Q[t](e,t)}},discover:function(t){return e.ajax(this.setup(t,"discover"))}}),J={cubes:{name:pe.getter("CUBE_NAME['#text']",!0),caption:pe.getter("CUBE_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),type:pe.getter("CUBE_TYPE['#text']",!0)},catalogs:{name:pe.getter("CATALOG_NAME['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0)},measures:{name:pe.getter("MEASURE_NAME['#text']",!0),caption:pe.getter("MEASURE_CAPTION['#text']",!0),uniqueName:pe.getter("MEASURE_UNIQUE_NAME['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),aggregator:pe.getter("MEASURE_AGGREGATOR['#text']",!0),groupName:pe.getter("MEASUREGROUP_NAME['#text']",!0),displayFolder:pe.getter("MEASURE_DISPLAY_FOLDER['#text']",!0),defaultFormat:pe.getter("DEFAULT_FORMAT_STRING['#text']",!0)},kpis:{name:pe.getter("KPI_NAME['#text']",!0),caption:pe.getter("KPI_CAPTION['#text']",!0),value:pe.getter("KPI_VALUE['#text']",!0),goal:pe.getter("KPI_GOAL['#text']",!0),status:pe.getter("KPI_STATUS['#text']",!0),trend:pe.getter("KPI_TREND['#text']",!0),statusGraphic:pe.getter("KPI_STATUS_GRAPHIC['#text']",!0),trendGraphic:pe.getter("KPI_TREND_GRAPHIC['#text']",!0),description:pe.getter("KPI_DESCRIPTION['#text']",!0),groupName:pe.getter("MEASUREGROUP_NAME['#text']",!0)},dimensions:{name:pe.getter("DIMENSION_NAME['#text']",!0),caption:pe.getter("DIMENSION_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),defaultHierarchy:pe.getter("DEFAULT_HIERARCHY['#text']",!0),type:pe.getter("DIMENSION_TYPE['#text']",!0)},hierarchies:{name:pe.getter("HIERARCHY_NAME['#text']",!0),caption:pe.getter("HIERARCHY_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:pe.getter("HIERARCHY_DISPLAY_FOLDER['#text']",!0),origin:pe.getter("HIERARCHY_ORIGIN['#text']",!0),defaultMember:pe.getter("DEFAULT_MEMBER['#text']",!0)},levels:{name:pe.getter("LEVEL_NAME['#text']",!0),caption:pe.getter("LEVEL_CAPTION['#text']",!0),description:pe.getter("DESCRIPTION['#text']",!0),uniqueName:pe.getter("LEVEL_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),displayFolder:pe.getter("LEVEL_DISPLAY_FOLDER['#text']",!0),orderingProperty:pe.getter("LEVEL_ORDERING_PROPERTY['#text']",!0),origin:pe.getter("LEVEL_ORIGIN['#text']",!0),hierarchyUniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0)},members:{name:pe.getter("MEMBER_NAME['#text']",!0),caption:pe.getter("MEMBER_CAPTION['#text']",!0),uniqueName:pe.getter("MEMBER_UNIQUE_NAME['#text']",!0),dimensionUniqueName:pe.getter("DIMENSION_UNIQUE_NAME['#text']",!0),hierarchyUniqueName:pe.getter("HIERARCHY_UNIQUE_NAME['#text']",!0),levelUniqueName:pe.getter("LEVEL_UNIQUE_NAME['#text']",!0),childrenCardinality:pe.getter("CHILDREN_CARDINALITY['#text']",!0)}},Z=["axes","catalogs","cubes","dimensions","hierarchies","levels","measures"],ee=pe.data.XmlDataReader.extend({init:function(e){pe.data.XmlDataReader.call(this,e),this._extend(e)},_extend:function(e){for(var t,n,i=0,r=Z.length;i<r;i++)t=Z[i],n=e[t],n&&n!==we&&(this[t]=n)},parse:function(e){var t=pe.data.XmlDataReader.fn.parse(e.replace(/<(\/?)(\w|-)+:/g,"<$1"));return pe.getter("['Envelope']['Body']",!0)(t)},errors:function(e){var t=pe.getter("['Fault']",!0)(e);return t?[{faultstring:pe.getter("faultstring['#text']",!0)(t),faultcode:pe.getter("faultcode['#text']",!0)(t)}]:null},axes:function(e){var t,n,i,r;for(e=pe.getter('ExecuteResponse["return"].root',!0)(e),t=G(pe.getter("Axes.Axis",!0)(e)),i={columns:{},rows:{}},r=0;r<t.length;r++)n=t[r],"sliceraxis"!==n["@name"].toLowerCase()&&(i.columns.tuples?i.rows=$(n):i.columns=$(n));return i},data:function(e){var t,n,i,r,o,a;for(e=pe.getter('ExecuteResponse["return"].root',!0)(e),t=G(pe.getter("CellData.Cell",!0)(e)),n=[],i=pe.getter("['@CellOrdinal']"),r=pe.getter("Value['#text']"),o=pe.getter("FmtValue['#text']"),a=0;a<t.length;a++)n.push({value:r(t[a]),fmtValue:o(t[a]),ordinal:parseInt(i(t[a]),10)});return n},_mapSchema:function(e,t){var n,i,r,o,a;for(e=pe.getter('DiscoverResponse["return"].root',!0)(e),n=G(pe.getter("row",!0)(e)),i=[],r=0;r<n.length;r++){o={};for(a in t)o[a]=t[a](n[r]);i.push(o)}return i},measures:function(e){return this._mapSchema(e,J.measures)},kpis:function(e){return this._mapSchema(e,J.kpis)},hierarchies:function(e){return this._mapSchema(e,J.hierarchies)},levels:function(e){return this._mapSchema(e,J.levels)},dimensions:function(e){return this._mapSchema(e,J.dimensions)},cubes:function(e){return this._mapSchema(e,J.cubes)},catalogs:function(e){return this._mapSchema(e,J.catalogs)},members:function(e){return this._mapSchema(e,J.members)}}),xe(!0,pe.data,{PivotDataSource:Qe,XmlaTransport:X,XmlaDataReader:ee,PivotCubeBuilder:Ke,transports:{xmla:X},readers:{xmla:ee}}),te=function(e,t){if(!e)return null;for(var n=0,i=e.length;n<i;n++)if(e[n].field===t)return e[n];return null},ne=function(e,t){var n,i,r=[];for(n=0,i=e.length;n<i;n++)e[n].field!==t&&r.push(e[n]);return r},pe.ui.PivotSettingTarget=ge.extend({init:function(t,n){var i=this;ge.fn.init.call(i,t,n),i.element.addClass("k-pivot-setting"),i.dataSource=pe.data.PivotDataSource.create(n.dataSource),i._refreshHandler=e.proxy(i.refresh,i),i.dataSource.first(Te,i._refreshHandler),n.template||(i.options.template="<div data-"+pe.ns+'name="${data.name || data}">${data.name || data}'+(i.options.enabled?'<a class="k-button k-button-icon k-bare"><span class="k-icon k-i-close k-setting-delete"></span></a>':"")+"</div>"),i.template=pe.template(i.options.template),i.emptyTemplate=pe.template(i.options.emptyTemplate),i._sortable(),i.element.on("click"+Re,".k-button,.k-item",function(t){var n=e(t.target),r=n.closest("["+pe.attr("name")+"]").attr(pe.attr("name"));r&&(n.hasClass("k-i-close")?i.remove(r):i.options.sortable&&n[0]===t.currentTarget&&i.sort({field:r,dir:n.find(".k-i-sort-asc-sm")[0]?"desc":"asc"}))}),(n.filterable||n.sortable)&&(i.fieldMenu=new fe.PivotFieldMenu(i.element,{messages:i.options.messages.fieldMenu,filter:".k-setting-fieldmenu",filterable:n.filterable,sortable:n.sortable,dataSource:i.dataSource})),i.refresh()},options:{name:"PivotSettingTarget",template:null,filterable:!1,sortable:!1,emptyTemplate:"<div class='k-empty'>${data}</div>",setting:"columns",enabled:!0,messages:{empty:"Drop Fields Here"}},setDataSource:function(e){this.dataSource.unbind(Te,this._refreshHandler),this.dataSource=this.options.dataSource=e,this.fieldMenu&&this.fieldMenu.setDataSource(e),e.first(Te,this._refreshHandler),this.refresh()},_sortable:function(){var e=this;e.options.enabled&&(this.sortable=this.element.kendoSortable({connectWith:this.options.connectWith,hint:e.options.hint,cursor:"move",start:function(e){e.item.focus().blur()},change:function(t){var n=t.item.attr(pe.attr("name"));"receive"==t.action?e.add(n):"remove"==t.action?e.remove(n):"sort"==t.action&&e.move(n,t.newIndex)}}).data("kendoSortable"))},_indexOf:function(e,t){var n,i,r=-1;for(n=0,i=t.length;n<i;n++)if(P(t[n])===e){r=n;break}return r},_isKPI:function(e){return"kpi"===e.type||e.measure},validate:function(e){var t,n,i=2==e.type||"aggregator"in e||this._isKPI(e);return i?"measures"===this.options.setting:"measures"===this.options.setting?i:(t=this.dataSource[this.options.setting](),n=e.defaultHierarchy||e.uniqueName,!(this._indexOf(n,t)>-1)&&(t=this.dataSource["columns"===this.options.setting?"rows":"columns"](),!(this._indexOf(n,t)>-1)))},add:function(t){var n,i,r=this.dataSource[this.options.setting]();for(t=e.isArray(t)?t.slice(0):[t],n=0,i=t.length;n<i;n++)this._indexOf(t[n],r)!==-1&&(t.splice(n,1),n-=1,i-=1);t.length&&(r=r.concat(t),this.dataSource[this.options.setting](r))},move:function(e,t){var n=this.dataSource[this.options.setting](),i=this._indexOf(e,n);i>-1&&(e=n.splice(i,1)[0],n.splice(t,0,e),this.dataSource[this.options.setting](n))},remove:function(e){var t=this.dataSource[this.options.setting](),n=this._indexOf(e,t),i=this.dataSource.sort(),r=this.dataSource.filter();n>-1&&(r&&(r.filters=ne(r.filters,e),this.dataSource._filter.filters=r.filters,r.filters.length||(this.dataSource._filter=null)),i&&(i=ne(i,e),this.dataSource._sort=i),t.splice(n,1),this.dataSource[this.options.setting](t))},sort:function(e){var t=this.options.sortable,n=t===!0||t.allowUnsort,i=n&&"asc"===e.dir,r=this.dataSource.sort()||[],o=ne(r,e.field);i&&r.length!==o.length&&(e=null),e&&o.push(e),this.dataSource.sort(o)},refresh:function(){var e,n="",i=this.dataSource[this.options.setting](),r=i.length,o=0;if(r)for(;o<r;o++)e=i[o],e=e.name===t?{name:e}:e,n+=this.template(xe({sortIcon:this._sortIcon(e.name)},e));else n=this.emptyTemplate(this.options.messages.empty);this.element.html(n)},destroy:function(){ge.fn.destroy.call(this),this.dataSource.unbind(Te,this._refreshHandler),this.element.off(Re),this.sortable&&this.sortable.destroy(),this.fieldMenu&&this.fieldMenu.destroy(),this.element=null,this._refreshHandler=null},_sortIcon:function(e){var t=this.dataSource.sort(),n=te(t,P(e)),i="";return n&&(i="k-i-sort-"+n.dir),i}}),ie=ge.extend({init:function(n,i){var r,o,a=this;ge.fn.init.call(a,n,i),a._dataSource(),a._bindConfigurator(),a._wrapper(),a._createLayout(),a._columnBuilder=r=new de,a._rowBuilder=o=new ue,a._contentBuilder=new ce,a._templates(),a.columnsHeader.add(a.rowsHeader).on("click","span.k-icon",function(){var n,i,s,l,d=e(this),u=r,c="expandColumn",h=d.attr(pe.attr("path")),p={axis:"columns",path:e.parseJSON(h)};d.parent().is("td")&&(u=o,c="expandRow",p.axis="rows"),i=d.hasClass(Pe),s=u.metadata[h],l=s.expanded===t,n=i?Be:Ne,p.childrenLoaded=s.maxChildren>s.children,a.trigger(n,p)||(u.metadata[h].expanded=!i,d.toggleClass(Pe,!i).toggleClass(Le,i),!i&&l?a.dataSource[c](p.path):a.refresh())}),a._scrollable(),a.options.autoBind&&a.dataSource.fetch(),pe.notify(a)},events:[ze,He,Ne,Be],options:{name:"PivotGrid",autoBind:!0,reorderable:!0,filterable:!1,sortable:!1,height:null,columnWidth:100,configurator:"",columnHeaderTemplate:null,rowHeaderTemplate:null,dataCellTemplate:null,kpiStatusTemplate:null,kpiTrendTemplate:null,messages:{measureFields:"Drop Data Fields Here",columnFields:"Drop Column Fields Here",rowFields:"Drop Rows Fields Here"}},_templates:function(){var e=this.options.columnHeaderTemplate,t=this.options.rowHeaderTemplate,n=this.options.dataCellTemplate,i=this.options.kpiStatusTemplate,r=this.options.kpiTrendTemplate;this._columnBuilder.template=pe.template(e||Oe,{useWithBlock:!!e}),this._contentBuilder.dataTemplate=pe.template(n||Ue,{useWithBlock:!!n}),this._contentBuilder.kpiStatusTemplate=pe.template(i||Ve,{useWithBlock:!!i}),this._contentBuilder.kpiTrendTemplate=pe.template(r||We,{useWithBlock:!!r}),this._rowBuilder.template=pe.template(t||Oe,{useWithBlock:!!t})},_bindConfigurator:function(){var t=this.options.configurator;t&&e(t).kendoPivotConfigurator("setDataSource",this.dataSource)},cellInfoByElement:function(t){return t=e(t),this.cellInfo(t.index(),t.parent("tr").index())},cellInfo:function(e,t){var n,i=this._contentBuilder,r=i.columnIndexes[e||0],o=i.rowIndexes[t||0];return r&&o?(n=o.index*i.rowLength+r.index,{columnTuple:r.tuple,rowTuple:o.tuple,measure:r.measure||o.measure,dataItem:this.dataSource.view()[n]}):null},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.measuresTarget&&this.measuresTarget.setDataSource(e),this.rowsTarget&&this.rowsTarget.setDataSource(e),this.columnsTarget&&this.columnsTarget.setDataSource(e),this._bindConfigurator(),this.options.autoBind&&e.fetch()},setOptions:function(e){ge.fn.setOptions.call(this,e),this._templates()},destroy:function(){ge.fn.destroy.call(this),clearTimeout(this._headerReflowTimeout)},_dataSource:function(){var t=this,n=t.options.dataSource;n=e.isArray(n)?{data:n}:n,t.dataSource&&this._refreshHandler?t.dataSource.unbind(Te,t._refreshHandler).unbind(Ee,t._stateResetHandler).unbind(Fe,t._progressHandler).unbind(Se,t._errorHandler):(t._refreshHandler=e.proxy(t.refresh,t),t._progressHandler=e.proxy(t._requestStart,t),t._stateResetHandler=e.proxy(t._stateReset,t),t._errorHandler=e.proxy(t._error,t)),t.dataSource=pe.data.PivotDataSource.create(n).bind(Te,t._refreshHandler).bind(Fe,t._progressHandler).bind(Ee,t._stateResetHandler).bind(Se,t._errorHandler)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_stateReset:function(){this._columnBuilder.reset(),this._rowBuilder.reset()},_wrapper:function(){var e=this.options.height;this.wrapper=this.element.addClass("k-widget k-pivot"),e&&this.wrapper.css("height",e)},_measureFields:function(){this.measureFields=e(Ie).addClass("k-pivot-toolbar k-header k-settings-measures"),this.measuresTarget=this._createSettingTarget(this.measureFields,{setting:"measures",messages:{empty:this.options.messages.measureFields}})},_createSettingTarget:function(t,n){var i='<span tabindex="0" class="k-button" data-'+pe.ns+'name="${data.name}">${data.name}',r=n.sortable,o="";return r&&(o+="#if (data.sortIcon) {#",o+='<span class="k-icon ${data.sortIcon}-sm"></span>',o+="#}#"),(n.filterable||r)&&(o+='<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),this.options.reorderable&&(o+='<span class="k-icon k-i-close k-setting-delete"></span>'),o&&(i+='<span class="k-field-actions">'+o+"</span>"),i+="</span>",new pe.ui.PivotSettingTarget(t,e.extend({template:i,emptyTemplate:'<span class="k-empty">${data}</span>',enabled:this.options.reorderable,dataSource:this.dataSource},n))},_initSettingTargets:function(){this.columnsTarget=this._createSettingTarget(this.columnFields,{connectWith:this.rowFields,setting:"columns",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.columnFields,fieldMenu:this.options.messages.fieldMenu}}),this.rowsTarget=this._createSettingTarget(this.rowFields,{connectWith:this.columnFields,setting:"rows",filterable:this.options.filterable,sortable:this.options.sortable,messages:{empty:this.options.messages.rowFields,fieldMenu:this.options.messages.fieldMenu}})},_createLayout:function(){var t=this,n=e(qe),i=n.find(".k-pivot-rowheaders"),r=n.find(".k-pivot-table"),o=e(Ie).addClass("k-grid k-widget");t._measureFields(),t.columnFields=e(Ie).addClass("k-pivot-toolbar k-header k-settings-columns"),t.rowFields=e(Ie).addClass("k-pivot-toolbar k-header k-settings-rows"),t.columnsHeader=e('<div class="k-grid-header-wrap" />').wrap('<div class="k-grid-header" />'),t.columnsHeader.parent().css("padding-right",pe.support.scrollbar()),t.rowsHeader=e('<div class="k-grid k-widget k-alt"/>'),t.content=e('<div class="k-grid-content" />'),i.append(t.measureFields),i.append(t.rowFields),i.append(t.rowsHeader),o.append(t.columnsHeader.parent()),o.append(t.content),r.append(t.columnFields),r.append(o),t.wrapper.append(n),t.columnsHeaderTree=new pe.dom.Tree(t.columnsHeader[0]),t.rowsHeaderTree=new pe.dom.Tree(t.rowsHeader[0]),t.contentTree=new pe.dom.Tree(t.content[0]),t._initSettingTargets()},_progress:function(e){pe.ui.progress(this.wrapper,e)},_resize:function(){this.content[0].firstChild&&(this._setSectionsWidth(),this._setSectionsHeight(),this._setContentWidth(),this._setContentHeight(),this._columnHeaderReflow())},_columnHeaderReflow:function(){var e=this.columnsHeader.children("table");pe.support.browser.mozilla&&(clearTimeout(this._headerReflowTimeout),e.css("table-layout","auto"),this._headerReflowTimeout=setTimeout(function(){e.css("table-layout","")}))},_setSectionsWidth:function(){var e=this.rowsHeader,t=e.parent(".k-pivot-rowheaders").width(Ae),n=Math.max(_e(this.measureFields),_e(this.rowFields));n=Math.max(e.children("table").width(),n),t.width(n)},_setSectionsHeight:function(){var e=this.measureFields.height(Ae).height(),t=this.columnFields.height(Ae).height(),n=this.rowFields.height(Ae).innerHeight(),i=this.columnsHeader.height(Ae).innerHeight(),r=n-this.rowFields.height(),o=t>e?t:e,a=i>n?i:n;this.measureFields.height(o),this.columnFields.height(o),this.rowFields.height(a-r),this.columnsHeader.height(a)},_setContentWidth:function(){var e=this.content.find("table"),t=this.columnsHeader.children("table"),n=e.children("colgroup").children().length,i=n*this.options.columnWidth,r=Math.ceil(i/this.content.width()*100);
r<100&&(r=100),e.add(t).css("width",r+"%"),this._resetColspan(t)},_setContentHeight:function(){var e=this,n=e.content,i=e.rowsHeader,r=e.wrapper.innerHeight(),o=pe.support.scrollbar(),a=n[0].offsetHeight===n[0].clientHeight,s=e.options.height;if(e.wrapper.is(":visible")){if(!r||!s)return a&&(o=0),n.height("auto"),i.height(n.height()-o),t;r-=be(e.columnFields),r-=be(e.columnsHeader),r<=2*o&&(r=2*o+1,a||(r+=o)),n.height(r),a&&(o=0),i.height(r-o)}},_resetColspan:function(e){var n=this,i=e.children("tbody").children(":first").children(":first");n._colspan===t&&(n._colspan=i.attr("colspan")),i.attr("colspan",1),clearTimeout(n._layoutTimeout),n._layoutTimeout=setTimeout(function(){i.attr("colspan",n._colspan),n._colspan=t})},_axisMeasures:function(e){var t=[],n=this.dataSource,i=n.measures(),r=i.length>1||i[0]&&i[0].type;return n.measuresAxis()===e&&(0===n[e]().length||r)&&(t=i),t},items:function(){return[]},refresh:function(){var e,t=this,n=t.dataSource,i=n.axes(),r=(i.columns||{}).tuples||[],o=(i.rows||{}).tuples||[],a=t._columnBuilder,s=t._rowBuilder,l={},d={};t.trigger(ze,{action:"rebind"})||(a.measures=t._axisMeasures(Ge),s.measures=t._axisMeasures(je),t.columnsHeaderTree.render(a.build(r)),t.rowsHeaderTree.render(s.build(o)),l={indexes:a._indexes,measures:a.measures,metadata:a.metadata},d={indexes:s._indexes,measures:s.measures,metadata:s.metadata},t.contentTree.render(t._contentBuilder.build(n.view(),l,d)),t._resize(),t.touchScroller?t.touchScroller.contentResized():(e=pe.touchScroller(t.content),e&&e.movable&&(t.touchScroller=e,e.movable.bind("change",function(e){t.columnsHeader.scrollLeft(-e.sender.x),t.rowsHeader.scrollTop(-e.sender.y)}))),t._progress(!1),t.trigger(He))},_scrollable:function(){var t=this,n=t.columnsHeader,i=t.rowsHeader;t.content.scroll(function(){n.scrollLeft(this.scrollLeft),i.scrollTop(this.scrollTop)}),i.bind("DOMMouseScroll"+Re+" mousewheel"+Re,e.proxy(t._wheelScroll,t))},_wheelScroll:function(t){var n,i;t.ctrlKey||(n=pe.wheelDeltaY(t),i=this.content.scrollTop(),n&&(t.preventDefault(),e(t.currentTarget).one("wheel"+Re,!1),this.rowsHeader.scrollTop(i+-n),this.content.scrollTop(i+-n)))}}),re=pe.dom.element,oe=pe.dom.html,ae=function(e,t){return{maxChildren:0,children:0,maxMembers:0,members:0,measures:1,levelNum:e,parentMember:0!==t}},se=function(e,t){for(var n=[],i=0;i<=t;i++)n.push(e.members[i].name);return n},le=function(e,t){for(var n="",i=0;i<=t;i++)n+=e.members[i].name;return n},de=me.extend({init:function(){this.measures=1,this.metadata={}},build:function(e){var t=this._tbody(e),n=this._colGroup();return[re("table",null,[n,t])]},reset:function(){this.metadata={}},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n<e;n++)t.push(re("col",null));return re("colgroup",null,t)},_tbody:function(e){var t=e[0];return this.map={},this.rows=[],this.rootTuple=t,this._indexes=[],t?(this._buildRows(t,0),this._normalize()):this.rows.push(re("tr",null,[re("th",null,[oe("&nbsp;")])])),re("tbody",null,this.rows)},_normalize:function(){for(var e,t,n,i,r,o=this.rows,a=o.length,s=0;s<a;s++)if(e=o[s],1!==e.rowSpan)for(i=e.children,n=0,t=i.length;n<t;n++)r=i[n],r.tupleAll&&(r.attr.rowSpan=e.rowSpan)},_rowIndex:function(e){for(var t=this.rows,n=t.length,i=0;i<n&&t[i]!==e;i++);return i},_rowLength:function(){var e=this.rows[0]?this.rows[0].children:[],t=e.length,n=0,i=0;if(t)for(;i<t;i++)n+=e[i].attr.colSpan||1;return n||(n=this.measures),n},_row:function(e,t,n){var i,r,o=this.rootTuple.members[t].name,a=e.members[t].levelNum,s=o+a,l=this.map,d=l[s];return d?(d.notFirst=!1,d.parentMember&&d.parentMember===n||(d.parentMember=n,d.collapsed=0,d.colSpan=0)):(d=re("tr",null,[]),d.parentMember=n,d.collapsed=0,d.colSpan=0,d.rowSpan=1,l[s]=d,i=l[o+(+a-1)],i&&(r=i.children,d.notFirst=!(!r[1]||r[1].attr.className.indexOf("k-alt")!==-1)||i.notFirst),this.rows.splice(this._rowIndex(i)+1,0,d)),d},_measures:function(e,t,n){var i,r,o,a=this.map,s=a.measureRow;for(s||(s=re("tr",null,[]),a.measureRow=s,this.rows.push(s)),r=0,o=e.length;r<o;r++)i=e[r],s.children.push(this._cell(n||"",[this._content(i,t)],i));return o},_content:function(e,t){return oe(this.template({member:e,tuple:t}))},_cell:function(e,t,n){var i=re("th",{className:"k-header"+e},t);return i.value=n.caption||n.name,i},_buildRows:function(e,n,i){var r,o,a,s,l,d,u,c,h,p,f=e.members,m=f[n],g=f[n+1],v=[],_=0,b=0,k=0;if(m.measure)return this._measures(m.children,e),t;if(c=pe.stringify(se(e,n)),r=this._row(e,n,i),a=m.children,s=a.length,h=this.metadata[c],h||(this.metadata[c]=h=ae(+m.levelNum,n),h.rootLevelNum=+this.rootTuple.members[n].levelNum),this._indexes.push({path:c,tuple:e}),m.hasChildren&&(h.expanded===!1&&(b=h.maxChildren,r.collapsed+=b,h.children=0,s=0),u={className:"k-icon "+(s?Pe:Le)},u[pe.attr("path")]=c,v.push(re("span",u))),v.push(this._content(m,e)),l=this._cell(r.notFirst?" k-first":"",v,m),r.children.push(l),r.colSpan+=1,s){for(d=this._cell(" k-alt",[this._content(m,e)],m),r.children.push(d);_<s;_++)o=this._buildRows(a[_],n,m);p=o.colSpan,b=o.collapsed,l.attr.colSpan=p,h.children=p,h.members=1,r.colSpan+=p,r.collapsed+=b,r.rowSpan=o.rowSpan+1,g&&(g.measure?p=this._measures(g.children,e," k-alt"):(o=this._buildRows(e,n+1),p=o.colSpan,r.collapsed+=o.collapsed,k=o.collapsed),d.attr.colSpan=p,p-=1,h.members+=p,r.colSpan+=p)}else g&&(g.measure?p=this._measures(g.children,e):(o=this._buildRows(e,n+1),p=o.colSpan,r.collapsed+=o.collapsed,k=o.collapsed),h.members=p,p>1&&(l.attr.colSpan=p,r.colSpan+=p-1));return h.maxMembers<h.members+k&&(h.maxMembers=h.members+k),a=h.children+b,h.maxChildren<a&&(h.maxChildren=a),(d||l).tupleAll=!0,r}}),ue=me.extend({init:function(){this.metadata={}},build:function(e){var t=this._tbody(e),n=this._colGroup();return[re("table",null,[n,t])]},reset:function(){this.metadata={}},_rowLength:function(){for(var e=this.rows[0].children,t=0,n=0,i=e[n];i;)t+=i.attr.colSpan||1,i=e[++n];return t},_colGroup:function(){for(var e=this._rowLength(),t=[],n=0;n<e;n++)t.push(re("col",null));return re("colgroup",null,t)},_tbody:function(e){var t=e[0];return this.rootTuple=t,this.rows=[],this.map={},this._indexes=[],t?(this._buildRows(t,0),this._normalize()):this.rows.push(re("tr",null,[re("td",null,[oe("&nbsp;")])])),re("tbody",null,this.rows)},_normalize:function(){for(var e,t,n,i,r=this.rows,o=r.length,a=0,s=this.rootTuple.members,l=s[0].name,d=s.length,u=0,c=this.map;a<o;a++)for(e=r[a],u=0;u<d;u++)n=this[s[u].name],t=e.colSpan["dim"+u],t&&t.colSpan<n&&(t.attr.colSpan=n-t.colSpan+1);e=c[l],i=c[l+"all"],e&&(e.children[0].attr.className="k-first"),i&&(i.children[0].attr.className+=" k-first")},_row:function(e){var t=re("tr",null,e);return t.rowSpan=1,t.colSpan={},this.rows.push(t),t},_content:function(e,t){return oe(this.template({member:e,tuple:t}))},_cell:function(e,t,n){var i=re("td",{className:e},t);return i.value=n.caption||n.name,i},_buildRows:function(e,t){var n,i,r,o,a,s,l,d,u,c=this.map,h=e.members,p=h[t],f=h[t+1],m=p.children,g=m.length,v=+p.levelNum,_=this.rootTuple.members[t].name,b=se(e,t-1).join(""),k=+this.rootTuple.members[t].levelNum,w=b+(k===v?"":p.parentName||""),y=c[w+"all"]||c[w],x=v+1,C=[];if(!y||y.hasChild?y=this._row():y.hasChild=!0,p.measure){for(l=y.allCell?"k-grid-footer":"",y.children.push(this._cell(l,[this._content(m[0],e)],m[0])),y.rowSpan=g,u=1;u<g;u++)this._row([this._cell(l,[this._content(m[u],e)],m[u])]);return y}if(c[b+p.name]=y,n=pe.stringify(se(e,t)),s=this.metadata[n],s||(this.metadata[n]=s=ae(v,t),s.rootLevelNum=k),this._indexes.push({path:n,tuple:e}),p.hasChildren&&(s.expanded===!1&&(g=0,s.children=0),d={className:"k-icon "+(g?Pe:Le)},d[pe.attr("path")]=n,C.push(re("span",d))),C.push(this._content(p,e)),l=y.allCell&&!g?"k-grid-footer":"",i=this._cell(l,C,p),i.colSpan=x,y.children.push(i),y.colSpan["dim"+t]=i,(!this[_]||this[_]<x)&&(this[_]=x),g){for(y.allCell=!1,y.hasChild=!1,u=0;u<g;u++)o=this._buildRows(m[u],t),y!==o&&(y.rowSpan+=o.rowSpan);y.rowSpan>1&&(i.attr.rowSpan=y.rowSpan),s.children=y.rowSpan,r=this._cell("k-grid-footer",[this._content(p,e)],p),r.colSpan=x,a=this._row([r]),a.colSpan["dim"+t]=r,a.allCell=!0,c[b+p.name+"all"]=a,f&&(o=this._buildRows(e,t+1),r.attr.rowSpan=o.rowSpan),y.rowSpan+=a.rowSpan,s.members=a.rowSpan}else f&&(y.hasChild=!1,this._buildRows(e,t+1),(r||i).attr.rowSpan=y.rowSpan,s.members=y.rowSpan);return s.maxChildren<s.children&&(s.maxChildren=s.children),s.maxMembers<s.members&&(s.maxMembers=s.members),y}}),ce=me.extend({init:function(){this.columnAxis={},this.rowAxis={}},build:function(e,n,i){var r,o,a=n.indexes[0],s=n.metadata[a?a.path:t];return this.columnAxis=n,this.rowAxis=i,this.data=e,this.rowLength=s?s.maxChildren+s.maxMembers:n.measures.length||1,this.rowLength||(this.rowLength=1),r=this._tbody(),o=this._colGroup(),[re("table",null,[o,r])]},_colGroup:function(){var e=this.columnAxis.measures.length||1,t=[],n=0;for(this.rows[0]&&(e=this.rows[0].children.length);n<e;n++)t.push(re("col",null));return re("colgroup",null,t)},_tbody:function(){return this.rows=[],this.data[0]?(this.columnIndexes=this._indexes(this.columnAxis,this.rowLength),this.rowIndexes=this._indexes(this.rowAxis,Math.ceil(this.data.length/this.rowLength)),this._buildRows()):this.rows.push(re("tr",null,[re("td",null,[oe("&nbsp;")])])),re("tbody",null,this.rows)},_indexes:function(e,n){var i,r,o,a,s,l,d=[],u=e.indexes,c=e.metadata,h=e.measures,p=h.length||1,f=0,m=0,g=0,v=u.length;if(!v){for(o=0;o<p;o++)d[o]={index:o,measure:h[o],tuple:null};return d}for(;g<v;g++){if(i=u[g],r=c[i.path],s=r.children+r.members,l=0,s&&(s-=p),r.expanded===!1&&r.children!==r.maxChildren&&(l=r.maxChildren),r.parentMember&&r.levelNum===r.rootLevelNum&&(s=-1),s>-1){for(o=0;o<p;o++)a=s+o,r.children||(a+=m),d[s+m+o]={children:s,index:f,measure:h[o],tuple:i.tuple},f+=1;for(;d[m]!==t;)m+=1}if(m===n)break;f+=l}return d},_buildRows:function(){for(var e,t=this.rowIndexes,n=t.length,i=0;i<n;i++)e=t[i],e&&this.rows.push(this._buildRow(e))},_buildRow:function(e){for(var n,i,r,o,a,s,l,d=e.index*this.rowLength,u=this.columnIndexes,c=u.length,h=[],p=0;p<c;p++)n=u[p],n!==t&&(a={},n.children&&(a.className="k-alt"),o="",s=this.data[d+n.index],l=n.measure||e.measure,i={columnTuple:n.tuple,rowTuple:e.tuple,measure:l,dataItem:s},""!==s.value&&l&&l.type&&("status"===l.type?o=this.kpiStatusTemplate(i):"trend"===l.type&&(o=this.kpiTrendTemplate(i))),o||(o=this.dataTemplate(i)),r=re("td",a,[oe(o)]),r.value=s.value,h.push(r));return a={},e.children&&(a.className="k-grid-footer"),re("tr",a,h)}}),fe.plugin(ie),pe.PivotExcelExporter=pe.Class.extend({init:function(e){this.options=e,this.widget=e.widget,this.dataSource=this.widget.dataSource},_columns:function(){var e,t=this.widget.columnsHeaderTree.children[0],n=this.widget.rowsHeaderTree.children[0],i=t.children[0].children.length,r=n.children[0].children.length,o=this.widget.options.columnWidth,a=[];if(r&&this.dataSource.data()[0])for(e=0;e<r;e++)a.push({autoWidth:!0});for(e=0;e<i;e++)a.push({autoWidth:!1,width:o});return a},_cells:function(e,t,n){for(var i,r,o,a,s,l=[],d=0,u=e.length;d<u;d++){for(r=[],o=e[d].children,i=o.length,a=0;a<i;a++)s=o[a],r.push({background:"#7a7a7a",color:"#fff",value:s.value,colSpan:s.attr.colSpan||1,rowSpan:s.attr.rowSpan||1});n&&n(r,d),l.push({cells:r,type:t})}return l},_rows:function(){var e,t,n=this.widget.columnsHeaderTree.children[0],i=this.widget.rowsHeaderTree.children[0],r=n.children[0].children.length,o=i.children[0].children.length,a=n.children[1].children,s=i.children[1].children,l=this.widget.contentTree.children[0].children[1].children,d=this._cells(a,"header");return o&&d[0].cells.splice(0,0,{background:"#7a7a7a",color:"#fff",value:"",colSpan:o,rowSpan:a.length}),e=function(e,t){for(var n,i,o=0,a=l[t].children;o<r;o++)n=a[o],i=+n.value,isNaN(i)&&(i=n.value),e.push({background:"#dfdfdf",color:"#333",value:i,colSpan:1,rowSpan:1})},t=this._cells(s,"data",e),d.concat(t)},_freezePane:function(){var e=this.widget.columnsHeaderTree.children[0],t=this.widget.rowsHeaderTree.children[0],n=t.children[0].children.length,i=e.children[1].children;return{colSplit:n,rowSplit:i.length}},workbook:function(){var t;return this.dataSource.view()[0]?(t=e.Deferred(),t.resolve()):t=this.dataSource.fetch(),t.then(e.proxy(function(){return{sheets:[{columns:this._columns(),rows:this._rows(),freezePane:this._freezePane(),filter:null}]}},this))}}),he={extend:function(t){t.events.push("excelExport"),t.options.excel=e.extend(t.options.excel,this.options),t.saveAsExcel=this.saveAsExcel},options:{proxyURL:"",filterable:!1,fileName:"Export.xlsx"},saveAsExcel:function(){var t=this.options.excel||{},n=new pe.PivotExcelExporter({widget:this});n.workbook().then(e.proxy(function(e){if(!this.trigger("excelExport",{workbook:e})){var n=new pe.ooxml.Workbook(e);n.toDataURLAsync().then(function(n){pe.saveAs({dataURI:n,fileName:e.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy})})}},this))}},pe.PivotExcelMixin=he,pe.ooxml&&pe.ooxml.Workbook&&he.extend(ie.prototype),pe.PDFMixin&&(pe.PDFMixin.extend(ie.prototype),ie.fn._drawPDF=function(){return this._drawPDFShadow({width:this.wrapper.width()},{avoidLinks:this.options.pdf.avoidLinks})})}(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,r=e.proxy,o=e.extend,a="visibility",s="k-state-hover",l="input,a,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=o({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},a),this._draggable=new i.Draggable(t,{ignore:l,filter:a.filter,autoScroll:a.autoScroll,cursorOffset:{left:10,top:n.support.mobileOS?-40/n.support.zoomLevel():10},hint:r(this._hint,this),dragstart:r(this.dragstart,this),dragcancel:r(this.dragcancel,this),drag:r(this.drag,this),dragend:r(this.dragend,this),$angular:a.$angular})},_hint:function(e){return"<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />"+this.options.hintText(e)+"</div>"},_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("<div class='k-i-drag-and-drop' />").css(a,"hidden").appendTo(this.element):e()},drag:function(t){var i,r,o,l,d,u,c,h,p,f,m,g=this.options,v=this.source,_=this.dropTarget=e(n.eventTarget(t)),b=_.closest(g.allowedContainers);b.length?v[0]==_[0]||g.contains(v[0],_[0])?m="k-i-cancel":(m="k-i-insert-middle",p=g.itemFromTarget(_),i=p.item,i.length?(this._removeTouchHover(),r=n._outerHeight(i),l=p.content,g.reorderable?(d=r/(l.length>0?4:2),o=n.getOffset(i).top,u=t.y.location<o+d,c=o+r-d<t.y.location,h=l.length&&!u&&!c):(h=!0,u=!1,c=!1),this.hovered=!!h&&b,this.dropHint.css(a,h?"hidden":"visible"),this._lastHover&&this._lastHover[0]!=l[0]&&this._lastHover.removeClass(s),this._lastHover=l.toggleClass(s,h),h?m="k-i-plus":(f=i.position(),f.top+=u?0:r,this.dropHint.css(f)[u?"prependTo":"appendTo"](g.dropHintContainer(i)),u&&p.first&&(m="k-i-insert-up"),c&&p.last&&(m="k-i-insert-down"))):_[0]!=this.dropHint[0]&&(this._lastHover&&this._lastHover.removeClass(s),m=e.contains(this.element[0],b[0])?"k-i-cancel":"k-i-plus")):(m="k-i-cancel",this._removeTouchHover()),this.options.drag({originalEvent:t.originalEvent,source:v,target:_,pageY:t.y.location,pageX:t.x.location,status:m.substring(2),setStatus:function(e){m=e}}),0!==m.indexOf("k-i-insert")&&this.dropHint.css(a,"hidden"),this._hintStatus(m)},dragcancel:function(){this.dropHint.remove()},dragend:function(e){var n,i,r,o="over",l=this.source,d=this.dropHint,u=this.dropTarget;return"visible"==d.css(a)?(o=this.options.dropPositionFrom(d),n=d.closest(this.options.itemSelector)):u&&(n=u.closest(this.options.itemSelector),n.length||(n=u.closest(this.options.allowedContainers))),i={originalEvent:e.originalEvent,source:l[0],destination:n[0],valid:"k-i-cancel"!=this._hintStatus(),setValid:function(e){this.valid=e},dropTarget:u[0],position:o},r=this.options.drop(i),d.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(s),!i.valid||r?(this._draggable.dropped=i.valid,t):(this._draggable.dropped=!0,this.options.dragend({originalEvent:e.originalEvent,source:l,destination:n,position:o}),t)},destroy:function(){this._lastHover=this.hovered=null,this._draggable.destroy()}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.treeview.min",["kendo.data.min","kendo.treeview.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return function(t){var n=t.children(".k-animation-container");return n.length||(n=t),n.children(e)}}function i(e){return p.template(e,{useWithBlock:!1})}function r(e){return e.find("> div .k-checkbox-wrapper [type=checkbox]")}function o(e){return function(t,n){n=n.closest(U);var i,r=n.parent();return r.parent().is("li")&&(i=r.parent()),this._dataSourceMove(t,r,i,function(t,i){return this._insert(t.data(),i,n.index()+e)})}}function a(t,n){for(var i;t&&"ul"!=t.nodeName.toLowerCase();)i=t,t=t.nextSibling,3==i.nodeType&&(i.nodeValue=e.trim(i.nodeValue)),h.test(i.className)?n.insertBefore(i,n.firstChild):n.appendChild(i)}function s(t){var n=t.children("div"),i=t.children("ul"),r=n.children(".k-icon"),o=t.children(":checkbox"),s=n.children(".k-in");t.hasClass("k-treeview")||(n.length||(n=e("<div />").prependTo(t)),!r.length&&i.length?r=e("<span class='k-icon' />").prependTo(n):i.length&&i.children().length||(r.remove(),i.remove()),o.length&&e("<span class='k-checkbox-wrapper' />").appendTo(n).append(o),s.length||(s=t.children("a").eq(0).addClass("k-in k-link"),s.length||(s=e("<span class='k-in' />")),s.appendTo(n),n.length&&a(n[0].nextSibling,s[0])))}var l,d,u,c,h,p=window.kendo,f=p.ui,m=p.data,g=e.extend,v=p.template,_=e.isArray,b=f.Widget,k=m.HierarchicalDataSource,w=e.proxy,y=p.keys,x=".kendoTreeView",C="select",T="check",S="navigate",D="expand",F="change",E="error",A="checked",I="indeterminate",R="collapse",M="dragstart",z="drag",H="drop",N="dragend",B="dataBound",P="click",L="undefined",O="k-state-hover",V="k-treeview",W=":visible",U=".k-item",q="string",j="aria-selected",G="aria-disabled",$="k-state-disabled",K={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},Y=function(e){return e instanceof p.jQuery||e instanceof window.jQuery},Q=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===q};d=n(".k-group"),u=n(".k-group,.k-content"),c=function(e){return e.children("div").children(".k-icon")},h=/k-sprite/,l=p.ui.DataBoundWidget.extend({init:function(e,t){var n,i=this,r=!1,o=t&&!!t.dataSource;_(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==L&&_(t.dataSource)&&(t.loadOnDemand=!1),b.prototype.init.call(i,e,t),e=i.element,t=i.options,n=e.is("ul")&&e||e.hasClass(V)&&e.children("ul"),r=!o&&n.length,r&&(t.dataSource.list=n),i._animation(),i._accessors(),i._templates(),e.hasClass(V)?(i.wrapper=e,i.root=e.children("ul").eq(0)):(i._wrapper(),n&&(i.root=e,i._group(i.wrapper))),i._tabindex(),i.root.attr("role","tree"),i._dataSource(r),i._attachEvents(),i._dragging(),r?i._syncHtmlAndDataSource():t.autoBind&&(i._progress(!0),i.dataSource.fetch()),t.checkboxes&&t.checkboxes.checkChildren&&i.updateIndeterminate(),i.element[0].id&&(i._ariaId=p.format("{0}_tv_active",i.element[0].id)),p.notify(i)},_attachEvents:function(){var t=this,n=".k-in:not(.k-state-selected,.k-state-disabled)",i="mouseenter";t.wrapper.on(i+x,".k-in.k-state-selected",function(e){e.preventDefault()}).on(i+x,n,function(){e(this).addClass(O)}).on("mouseleave"+x,n,function(){e(this).removeClass(O)}).on(P+x,n,w(t._click,t)).on("dblclick"+x,".k-in:not(.k-state-disabled)",w(t._toggleButtonClick,t)).on(P+x,".k-i-expand,.k-i-collapse",w(t._toggleButtonClick,t)).on("keydown"+x,w(t._keydown,t)).on("keypress"+x,w(t._keypress,t)).on("focus"+x,w(t._focus,t)).on("blur"+x,w(t._blur,t)).on("mousedown"+x,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",w(t._mousedown,t)).on("change"+x,".k-checkbox-wrapper :checkbox",w(t._checkboxChange,t)).on("click"+x,".checkbox-span",w(t._checkboxLabelClick,t)).on("click"+x,".k-request-retry",w(t._retryRequest,t)).on("click"+x,".k-link.k-state-disabled",function(e){e.preventDefault()}).on("click"+x,function(n){e(n.target).is(":kendoFocusable")||t.focus()})},_checkboxLabelClick:function(t){var n=e(t.target.previousSibling);n.is("[disabled]")||(n.prop("checked",!n.prop("checked")),n.trigger("change"))},_syncHtmlAndDataSource:function(e,t){e=e||this.root,t=t||this.dataSource;var n,i,o,a,s,l=t.view(),d=p.attr("uid"),u=p.attr("expanded"),c=this.options.checkboxes,h=e.children("li");for(n=0;n<h.length;n++)o=l[n],a=o.uid,i=h.eq(n),i.attr("role","treeitem").attr(d,a).attr(j,i.hasClass("k-state-selected")),o.expanded="true"===i.attr(u),c&&(s=r(i),o.checked=s.prop(A),s.attr("id","_"+a),s.next(".k-checkbox-label").attr("for","_"+a)),this._syncHtmlAndDataSource(i.children("ul"),o.children)},_animation:function(){var e=this.options,t=e.animation,n=t.collapse&&"effects"in t.collapse,i=g({},t.expand,t.collapse);n||(i=g(i,{reverse:!0})),t===!1&&(t={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),t.collapse=g(i,{hide:!0}),e.animation=t},_dragging:function(){var t,n=this.options.dragAndDrop,i=this.dragging;n&&!i?(t=this,this.dragging=new f.HierarchicalDragAndDrop(this.element,{reorderable:!0,$angular:this.options.$angular,autoScroll:this.options.autoScroll,filter:"div:not(.k-state-disabled) .k-in",allowedContainers:".k-treeview",itemSelector:".k-treeview .k-item",hintText:w(this._hintText,this),contains:function(t,n){return e.contains(t,n)},dropHintContainer:function(e){return e},itemFromTarget:function(e){var t=e.closest(".k-top,.k-mid,.k-bot");return{item:t,content:e.closest(".k-in"),first:t.hasClass("k-top"),last:t.hasClass("k-bot")}},dropPositionFrom:function(e){return e.prevAll(".k-in").length>0?"after":"before"},dragstart:function(e){return t.trigger(M,{sourceNode:e[0]})},drag:function(e){t.trigger(z,{originalEvent:e.originalEvent,sourceNode:e.source[0],dropTarget:e.target[0],pageY:e.pageY,pageX:e.pageX,statusClass:e.status,setStatusClass:e.setStatus})},drop:function(e){return t.trigger(H,{originalEvent:e.originalEvent,sourceNode:e.source,destinationNode:e.destination,valid:e.valid,setValid:function(t){this.valid=t,e.setValid(t)},dropTarget:e.dropTarget,dropPosition:e.position})},dragend:function(e){function n(n){t.options.checkboxes&&t.options.checkboxes.checkChildren&&t.updateIndeterminate(),t.trigger(N,{originalEvent:e.originalEvent,sourceNode:n&&n[0],destinationNode:r[0],dropPosition:o})}var i=e.source,r=e.destination,o=e.position;"over"==o?t.append(i,r,n):("before"==o?i=t.insertBefore(i,r):"after"==o&&(i=t.insertAfter(i,r)),n(i))}})):!n&&i&&(i.destroy(),this.dragging=null)},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=w(e._fieldAccessor,e);t.template&&typeof t.template==q?t.template=v(t.template):t.template||(t.template=i("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e._checkboxes(),e.templates={wrapperCssClass:function(e,t){var n="k-item",i=t.index;return e.firstLevel&&0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),n},cssClass:function(e,t){var n="",i=t.index,r=e.length-1;return e.firstLevel&&0===i&&(n+="k-top "),n+=0===i&&i!=r?"k-top":i==r?"k-bot":"k-mid"},textClass:function(e,t){var n="k-in";return t&&(n+=" k-link"),e.enabled===!1&&(n+=" k-state-disabled"),e.selected===!0&&(n+=" k-state-selected"),n},toggleButtonClass:function(e){var t="k-icon";return t+=e.expanded!==!0?" k-i-expand":" k-i-collapse"},groupAttributes:function(e){var t="";return e.firstLevel||(t="role='group'"),t+(e.expanded!==!0?" style='display:none'":"")},groupCssClass:function(e){var t="k-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:i("#= data.treeview.template(data) #"),group:i("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),itemContent:i("# var imageUrl = "+n("imageUrl")+"(data.item); ## var spriteCssClass = "+n("spriteCssClass")+"(data.item); ## if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #'># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #' /># } ##= data.treeview.template(data) #"),itemElement:i("# var item = data.item, r = data.r; ## var url = "+n("url")+"(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='#= r.toggleButtonClass(item) #'/># } ## if (data.treeview.checkboxes) { #<span class='k-checkbox-wrapper' role='presentation'>#= data.treeview.checkboxes.template(data) #</span># } ## var tag = url ? 'a' : 'span'; ## var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #<#=tag# class='#= r.textClass(item, !!url) #'#= textAttr #>#= r.itemContent(data) #</#=tag#></div>"),item:i("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #' "+p.attr("uid")+"='#= item.uid #' aria-selected='#= item.selected ? \"true\" : \"false\" #' #=item.enabled === false ? \"aria-disabled='true'\" : ''## if (item.expanded) { #data-expanded='true' aria-expanded='true'# } #>#= r.itemElement(data) #</li>"),loading:i("<div class='k-icon k-i-loading' /> #: data.messages.loading #"),retry:i("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(t){var n=this.options;n.dataSource=t,this._dataSource(),n.checkboxes&&n.checkboxes.checkChildren&&this.dataSource.one("change",e.proxy(this.updateIndeterminate,this,null)),this.options.autoBind&&this.dataSource.fetch()},_bindDataSource:function(){this._refreshHandler=w(this.refresh,this),this._errorHandler=w(this._error,this),this.dataSource.bind(F,this._refreshHandler),this.dataSource.bind(E,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(F,this._refreshHandler),e.unbind(E,this._errorHandler))},_dataSource:function(e){function t(e){for(var n=0;n<e.length;n++)e[n]._initChildren(),e[n].children.fetch(),t(e[n].children.view())}var n=this,i=n.options,r=i.dataSource;r=_(r)?{data:r}:r,n._unbindDataSource(),r.fields||(r.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),n.dataSource=r=k.create(r),e&&(r.fetch(),t(r.view())),n._bindDataSource()},events:[M,z,H,N,B,D,R,C,F,S,T],options:{name:"TreeView",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:100}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},dragAndDrop:!1,checkboxes:!1,autoBind:!0,autoScroll:!1,loadOnDemand:!0,template:"",dataTextField:null},_accessors:function(){var e,t,n,i=this,r=i.options,o=i.element;for(e in K)t=r[K[e]],n=o.attr(p.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),_(t)||(t=[t]),r[K[e]]=t},_fieldAccessor:function(t){var n=this.options[K[t]],i=n.length,r="(function(item) {";return 0===i?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(n,function(e){return"function(d){ return "+p.expr(e)+"}"}).join(",")+"];",r+="return levels[Math.min(item.level(), "+i+"-1)](item)"),r+="})"},setOptions:function(e){b.fn.setOptions.call(this,e),this._animation(),this._dragging(),this._templates()},_trigger:function(e,t){return this.trigger(e,{node:t.closest(U)[0]})},_setChecked:function(t,n){if(t&&e.isFunction(t.view))for(var i=0,r=t.view();i<r.length;i++)r[i][A]=n,r[i].children&&this._setChecked(r[i].children,n)},_setIndeterminate:function(e){var t,n,i,o=d(e),a=!0;if(o.length&&(t=r(o.children()),n=t.length)){if(n>1){for(i=1;i<n;i++)if(t[i].checked!=t[i-1].checked||t[i].indeterminate||t[i-1].indeterminate){a=!1;break}}else a=!t[0].indeterminate;return r(e).data(I,!a).prop(I,!a).prop(A,a&&t[0].checked)}},updateIndeterminate:function(e){var t,n,i,r;if(e=e||this.wrapper,t=d(e).children(),t.length){for(n=0;n<t.length;n++)this.updateIndeterminate(t.eq(n));i=this._setIndeterminate(e),r=this.dataItem(e),i&&i.prop(A)?r.checked=!0:r&&delete r.checked}},_bubbleIndeterminate:function(e,t){if(e.length){t||this.updateIndeterminate(e);var n,i=this.parent(e);i.length&&(this._setIndeterminate(i),n=i.children("div").find(".k-checkbox-wrapper :checkbox"),this._skip=!0,n.prop(I)===!1?this.dataItem(i).set(A,n.prop(A)):delete this.dataItem(i).checked,this._skip=!1,this._bubbleIndeterminate(i,!0))}},_checkboxChange:function(t){var n=e(t.target),i=n.prop(A),r=n.closest(U),o=this.dataItem(r);o.checked!=i&&(o.set(A,i),this._trigger(T,r))},_toggleButtonClick:function(t){var n=e(t.currentTarget).closest(U);n.is("[aria-disabled='true']")||this.toggle(e(t.target).closest(U))},_mousedown:function(t){var n=e(t.currentTarget).closest(U);n.is("[aria-disabled='true']")||(this._clickTarget=n,this.current(n))},_focusable:function(e){return e&&e.length&&e.is(":visible")&&!e.find(".k-in:first").hasClass($)},_focus:function(){var t=this.select(),n=this._clickTarget;p.support.touch||(n&&n.length&&(t=n),this._focusable(t)||(t=this.current()),this._focusable(t)||(t=this._nextVisible(e())),this.current(t))},focus:function(){var e,t=this.wrapper,n=t[0],i=[],r=[],o=document.documentElement;do n=n.parentNode,n.scrollHeight>n.clientHeight&&(i.push(n),r.push(n.scrollTop));while(n!=o);for(t.focus(),e=0;e<i.length;e++)i[e].scrollTop=r[e]},_blur:function(){this.current().find(".k-in:first").removeClass("k-state-focused")},_enabled:function(e){return!e.children("div").children(".k-in").hasClass($)},parent:function(t){var n,i,r=/\bk-treeview\b/,o=/\bk-item\b/;typeof t==q&&(t=this.element.find(t)),Q(t)||(t=t[0]),i=o.test(t.className);do t=t.parentNode,o.test(t.className)&&(i?n=t:i=!0);while(!r.test(t.className)&&!n);return e(n)},_nextVisible:function(e){function t(e){for(;e.length&&!e.next().length;)e=i.parent(e);return e.next().length?e.next():e}var n,i=this,r=i._expanded(e);return e.length&&e.is(":visible")?r?(n=d(e).children().first(),n.length||(n=t(e))):n=t(e):n=i.root.children().eq(0),n},_previousVisible:function(e){var t,n,i=this;if(!e.length||e.prev().length)for(n=e.length?e.prev():i.root.children().last();i._expanded(n)&&(t=d(n).children().last(),t.length);)n=t;else n=i.parent(e)||e;return n},_keydown:function(n){var i,r=this,o=n.keyCode,a=r.current(),s=r._expanded(a),l=a.find(".k-checkbox-wrapper:first :checkbox"),d=p.support.isRtl(r.element);n.target==n.currentTarget&&(!d&&o==y.RIGHT||d&&o==y.LEFT?s?i=r._nextVisible(a):a.find(".k-in:first").hasClass($)||r.expand(a):!d&&o==y.LEFT||d&&o==y.RIGHT?s&&!a.find(".k-in:first").hasClass($)?r.collapse(a):(i=r.parent(a),r._enabled(i)||(i=t)):o==y.DOWN?i=r._nextVisible(a):o==y.UP?i=r._previousVisible(a):o==y.HOME?i=r._nextVisible(e()):o==y.END?i=r._previousVisible(e()):o!=y.ENTER||a.find(".k-in:first").hasClass($)?o==y.SPACEBAR&&l.length&&!a.find(".k-in:first").hasClass($)&&(l.prop(A,!l.prop(A)).data(I,!1).prop(I,!1),r._checkboxChange({target:l}),i=a):a.find(".k-in:first").hasClass("k-state-selected")||r._trigger(C,a)||r.select(a),i&&(n.preventDefault(),a[0]!=i[0]&&(r._trigger(S,i),r.current(i))))},_keypress:function(e){var t,n=this,i=300,r=n._getSelectedNode();e.keyCode!==y.ENTER&&e.keyCode!==y.SPACEBAR&&(n._match||(n._match=""),
n._match+=String.fromCharCode(e.keyCode),clearTimeout(n._matchTimer),n._matchTimer=setTimeout(function(){n._match=""},i),t=r&&n._matchNextByText(Array.prototype.indexOf.call(this.element.find(".k-item"),r[0]),n._match),t||(t=n._matchNextByText(-1,n._match)),n.select(t))},_matchNextByText:function(t,n){return e(this.element).find(".k-in").filter(function(i,r){return i>t&&e(r).is(":visible")&&!e(r).hasClass($)&&0===e(r).text().toLowerCase().indexOf(n)}).closest(U)[0]},_click:function(t){var n,i=this,r=e(t.currentTarget),o=u(r.closest(U)),a=r.attr("href");n=a?"#"==a||a.indexOf("#"+this.element.id+"-")>=0:o.length&&!o.children().length,n&&t.preventDefault(),r.hasClass(".k-state-selected")||i._trigger(C,r)||i.select(r)},_wrapper:function(){var e,t,n=this,i=n.element,r="k-widget k-treeview";i.is("ul")?(e=i.wrap("<div />").parent(),t=i):(e=i,t=e.children("ul").eq(0)),n.wrapper=e.addClass(r),n.root=t},_getSelectedNode:function(){return this.element.find(".k-state-selected").closest(U)},_group:function(e){var t=this,n=e.hasClass(V),i={firstLevel:n,expanded:n||t._expanded(e)},r=e.children("ul");r.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),t._nodes(r,i)},_nodes:function(t,n){var i,r=this,o=t.children("li");n=g({length:o.length},n),o.each(function(t,o){o=e(o),i={index:t,expanded:r._expanded(o)},s(o),r._updateNodeClasses(o,n,i),r._group(o)})},_checkboxes:function(){var e,t=this.options,n=t.checkboxes;n&&(e="<input aria-label='#=item.text#' type='checkbox' tabindex='-1' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #",n.name&&(e+=" name='"+n.name+"'"),e+=" id='_#= item.uid #' class='k-checkbox' /><span class='k-checkbox-label checkbox-span'></span>",n=g({template:e},t.checkboxes),typeof n.template==q&&(n.template=v(n.template)),t.checkboxes=n)},_updateNodeClasses:function(e,t,n){var i,r,o=e.children("div"),a=e.children("ul"),s=this.templates;e.hasClass("k-treeview")||(n=n||{},n.expanded=typeof n.expanded!=L?n.expanded:this._expanded(e),n.index=typeof n.index!=L?n.index:e.index(),n.enabled=typeof n.enabled!=L?n.enabled:!o.children(".k-in").hasClass("k-state-disabled"),t=t||{},t.firstLevel=typeof t.firstLevel!=L?t.firstLevel:e.parent().parent().hasClass(V),t.length=typeof t.length!=L?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(s.wrapperCssClass(t,n)),o.removeClass("k-top k-mid k-bot").addClass(s.cssClass(t,n)),i=o.children(".k-in"),r=i[0]&&"a"==i[0].nodeName.toLowerCase(),i.removeClass("k-in k-link k-state-default k-state-disabled").addClass(s.textClass(n,r)),(a.length||"true"==e.attr("data-hasChildren"))&&(o.children(".k-icon").removeClass("k-i-expand k-i-collapse").addClass(s.toggleButtonClass(n)),a.addClass("k-group")))},_processNodes:function(t,n){var i=this;i.element.find(t).each(function(t,r){n.call(i,t,e(r).closest(U))})},dataItem:function(t){var n=e(t).closest(U).attr(p.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},_insertNode:function(t,n,i,r,o){var a,l,u,c,h=this,p=d(i),f=p.children().length+1,m={firstLevel:i.hasClass(V),expanded:!o,length:f},g="",v=function(e,t){e.appendTo(t)};for(u=0;u<t.length;u++)c=t[u],c.index=n+u,g+=h._renderItem({group:m,item:c});if(l=e(g),l.length){for(h.angular("compile",function(){return{elements:l.get(),data:t.map(function(e){return{dataItem:e}})}}),p.length||(p=e(h._renderGroup({group:m})).appendTo(i)),r(l,p),i.hasClass("k-item")&&(s(i),h._updateNodeClasses(i)),h._updateNodeClasses(l.prev().first()),h._updateNodeClasses(l.next().last()),u=0;u<t.length;u++)c=t[u],c.hasChildren&&(a=c.children.data(),a.length&&h._insertNode(a,c.index,l.eq(u),v,!h._expanded(l.eq(u))));return l}},_updateNodes:function(t,n){function i(e,t){e.find(".k-checkbox-wrapper :checkbox").not("[disabled]").prop(A,t).data(I,!1).prop(I,!1)}var r,o,a,s,l,d,c,h=this,p={treeview:h.options,item:s},m="expanded"!=n&&"checked"!=n;if("selected"==n)s=t[0],o=h.findByUid(s.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected",s[n]).end(),s[n]&&h.current(o),o.attr(j,!!s[n]);else{for(c=e.map(t,function(e){return h.findByUid(e.uid).children("div")}),m&&h.angular("cleanup",function(){return{elements:c}}),r=0;r<t.length;r++)p.item=s=t[r],a=c[r],o=a.parent(),m&&a.children(".k-in").html(h.templates.itemContent(p)),n==A?(l=s[n],i(a,l),h.options.checkboxes.checkChildren&&(i(o.children(".k-group"),l),h._setChecked(s.children,l),h._bubbleIndeterminate(o))):"expanded"==n?h._toggle(o,s,s[n]):"enabled"==n&&(o.find(".k-checkbox-wrapper :checkbox").prop("disabled",!s[n]),d=!u(o).is(W),o.removeAttr(G),s[n]||(s.selected&&s.set("selected",!1),s.expanded&&s.set("expanded",!1),d=!0,o.attr(j,!1).attr(G,!0)),h._updateNodeClasses(o,{},{enabled:s[n],expanded:!d})),a.length&&this.trigger("itemChange",{item:a,data:s,ns:f});m&&h.angular("compile",function(){return{elements:c,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_appendItems:function(e,t,n){var i=d(n),r=i.children(),o=!this._expanded(n);typeof e==L&&(e=r.length),this._insertNode(t,e,n,function(t,n){e>=r.length?t.appendTo(n):t.insertBefore(r.eq(e))},o),this._expanded(n)&&(this._updateNodeClasses(n),d(n).css("display","block"))},_refreshChildren:function(e,t,n){var i,r,o,a=this.options,l=a.loadOnDemand,u=a.checkboxes&&a.checkboxes.checkChildren;if(d(e).empty(),t.length)for(this._appendItems(n,t,e),r=d(e).children(),l&&u&&this._bubbleIndeterminate(r.last()),i=0;i<r.length;i++)o=r.eq(i),this.trigger("itemChange",{item:o.children("div"),data:this.dataItem(o),ns:f});else s(e)},_refreshRoot:function(t){var n,i,r,o=this._renderGroup({items:t,group:{firstLevel:!0,expanded:!0}});for(this.root.length?(this._angularItems("cleanup"),n=e(o),this.root.attr("class",n.attr("class")).html(n.html())):this.root=this.wrapper.html(o).children("ul"),this.root.attr("role","tree"),i=this.root.children(".k-item"),r=0;r<t.length;r++)this.trigger("itemChange",{item:i.eq(r),data:t[r],ns:f});this._angularItems("compile")},refresh:function(e){var n,i,r=e.node,o=e.action,a=e.items,s=this.wrapper,l=this.options,d=l.loadOnDemand,u=l.checkboxes&&l.checkboxes.checkChildren;if(!this._skip){if(e.field){if(!a[0]||!a[0].level)return;return this._updateNodes(a,e.field)}if(r&&(s=this.findByUid(r.uid),this._progress(s,!1)),u&&"remove"!=o){for(i=!1,n=0;n<a.length;n++)if("checked"in a[n]){i=!0;break}if(!i&&r&&r.checked)for(n=0;n<a.length;n++)a[n].checked=!0}if("add"==o?this._appendItems(e.index,a,s):"remove"==o?this._remove(this.findByUid(a[0].uid),!1):"itemchange"==o?this._updateNodes(a):"itemloaded"==o?this._refreshChildren(s,a,e.index):this._refreshRoot(a),"remove"!=o)for(n=0;n<a.length;n++)d&&!a[n].expanded||a[n].load();this.trigger(B,{node:r?s:t})}},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),n=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),c(t).addClass("k-i-reload"),e.node.loaded(!1)):(this._progress(!1),this.element.html(n))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},expand:function(e){this._processNodes(e,function(e,t){this.toggle(t,!0)})},collapse:function(e){this._processNodes(e,function(e,t){this.toggle(t,!1)})},enable:function(e,t){t=2!=arguments.length||!!t,this._processNodes(e,function(e,n){this.dataItem(n).set("enabled",t)})},current:function(n){var i=this,r=i._current,o=i.element,a=i._ariaId;return arguments.length>0&&n&&n.length?(r&&(r[0].id===a&&r.removeAttr("id"),r.find(".k-in:first").removeClass("k-state-focused")),r=i._current=e(n,o).closest(U),r.find(".k-in:first").addClass("k-state-focused"),a=r[0].id||a,a&&(i.wrapper.removeAttr("aria-activedescendant"),r.attr("id",a),i.wrapper.attr("aria-activedescendant",a)),t):(r||(r=i._nextVisible(e())),r)},select:function(n){var i=this,r=i.element;return arguments.length?(n=e(n,r).closest(U),r.find(".k-state-selected").each(function(){var t=i.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-state-selected")}),n.length&&(i.dataItem(n).set("selected",!0),i._clickTarget=n),i.trigger(F),t):r.find(".k-state-selected").closest(U)},_toggle:function(e,t,n){var i,r=this.options,o=u(e),a=n?"expand":"collapse";o.data("animating")||this._trigger(a,e)||(this._expanded(e,n),i=t&&t.loaded(),n&&!i?(r.loadOnDemand&&this._progress(e,!0),o.remove(),t.load()):(this._updateNodeClasses(e,{},{expanded:n}),n||o.css("height",o.height()).css("height"),o.kendoStop(!0,!0).kendoAnimate(g({reset:!0},r.animation[a],{complete:function(){n&&o.css("height","")}}))))},toggle:function(t,n){t=e(t),c(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;b.fn.destroy.call(e),e.wrapper.off(x),e._unbindDataSource(),e.dragging&&e.dragging.destroy(),p.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,n){var i=p.attr("expanded"),r=this.dataItem(e),o=n;return 1==arguments.length?"true"===e.attr(i)||r&&r.expanded:(u(e).data("animating")||(r&&(r.set("expanded",o),o=r.expanded),o?(e.attr(i,"true"),e.attr("aria-expanded","true")):(e.removeAttr(i),e.attr("aria-expanded","false"))),t)},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e,t?n.html(i):n.empty()):c(e).toggleClass("k-i-loading",t).removeClass("k-i-reload")},text:function(e,n){var i=this.dataItem(e),r=this.options[K.text],o=i.level(),a=r.length,s=r[Math.min(o,a-1)];return n?(i.set(s,n),t):i[s]},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,r){var o,a=this._objectOrSelf(i||n),s=a.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=a.element[0]&&(o=a.dataItem(i),o.loaded()||(a._progress(i,!0),l=o.load()),i!=this.root&&(s=o.children,s&&s instanceof k||(o._initChildren(),o.loaded(!0),s=o.children))),t=this._toObservableData(t),r.call(a,s,t,l)},_toObservableData:function(t){var n,i,r=t;return(Y(t)||Q(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(p.attr("uid")),r=n.getByUid(i),r&&(r=n.remove(r))),r},_insert:function(e,t,n){t instanceof p.data.ObservableArray?t=t.toJSON():_(t)||(t=[t]);var i=e.parent();return i&&i._initChildren&&(i.hasChildren=!0,i._initChildren()),e.splice.apply(e,[n,0].concat(t)),this.findByUid(e[n].uid)},insertAfter:o(1),insertBefore:o(0),append:function(t,n,i){var r=this.root;return n&&(r=d(n)),this._dataSourceMove(t,r,n,function(t,r,o){function a(){n&&l._expanded(n,!0);var e=t.data(),i=Math.max(e.length,0);return l._insert(e,r,i)}var s,l=this;return o.done(function(){s=a(),(i=i||e.noop)(s)}),s||null})},_remove:function(t,n){var i,r,o,a=this;return t=e(t,a.element),this.angular("cleanup",function(){return{elements:t.get()}}),i=t.parent().parent(),r=t.prev(),o=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(s(i),a._updateNodeClasses(i)),a._updateNodeClasses(r),a._updateNodeClasses(o),t},remove:function(e){var t=this.dataItem(e);t&&this.dataSource.remove(t)},detach:function(e){return this._remove(e,!0)},findByText:function(t){return e(this.element).find(".k-in").filter(function(n,i){return e(i).text()==t}).closest(U)},findByUid:function(t){var n,i,r=this.element.find(".k-item"),o=p.attr("uid");for(i=0;i<r.length;i++)if(r[i].getAttribute(o)==t){n=r[i];break}return e(n)},expandPath:function(t,n){function i(){a.shift(),a.length?r(a[0]).then(i):s.call(o)}function r(t){var n=e.Deferred(),i=o.dataSource.get(t);return i?i.loaded()?(i.set("expanded",!0),n.resolve()):(o._progress(o.findByUid(i.uid),!0),i.load().then(function(){i.set("expanded",!0),n.resolve()})):n.resolve(),n.promise()}var o=this,a=t.slice(0),s=n||e.noop;r(a[0]).then(i)},_parentIds:function(e){for(var t=e&&e.parentNode(),n=[];t&&t.parentNode;)n.unshift(t.id),t=t.parentNode();return n},expandTo:function(e){e instanceof p.data.Node||(e=this.dataSource.get(e));var t=this._parentIds(e);this.expandPath(t)},_renderItem:function(e){return e.group||(e.group={}),e.treeview=this.options,e.r=this.templates,this.templates.item(e)},_renderGroup:function(e){var t=this;return e.renderItems=function(e){var n="",i=0,r=e.items,o=r?r.length:0,a=e.group;for(a.length=o;i<o;i++)e.group=a,e.item=r[i],e.item.index=i,n+=t._renderItem(e);return n},e.r=t.templates,t.templates.group(e)}}),f.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pivot.fieldmenu.min",["kendo.pivotgrid.min","kendo.menu.min","kendo.window.min","kendo.treeview.min","kendo.dropdownlist.min"],e)}(function(){return function(e,t){function n(e,t){var n,i,r=[];for(n=0,i=e.length;n<i;n++)e[n].field!==t&&r.push(e[n]);return r}function i(e,t,n){var i,r,o,a;if(!e)return[];for(e=e.filters,i=0,r=[],o=e.length;i<o;i++)a=e[i].operator,(n||"in"===a)&&a!==n||e[i].field!==t||r.push(e[i]);return r}function r(t,n,r){var o,a=0,s=r.length;if(t=i(t,n,"in")[0])for(o=t.value.split(",");a<s;a++)r[a].checked=e.inArray(r[a].uniqueName,o)>=0;else for(;a<s;a++)r[a].checked=!0}function o(e,t){var n,i=e.length;for(n=0;n<i;n++)e[n].checked&&0!==e[n].level()&&t.push(e[n].uniqueName),e[n].hasChildren&&o(e[n].children.view(),t)}var a=window.kendo,s=a.ui,l="kendoContextMenu",d=e.proxy,u=".kendoPivotFieldMenu",c=s.Widget,h="k-filter-item",p="aria-label",f=c.extend({init:function(e,t){c.fn.init.call(this,e,t),this._dataSource(),this._layout(),a.notify(this)},events:[],options:{name:"PivotFieldMenu",filter:null,filterable:!0,sortable:!0,messages:{info:"Show items with value that:",sortAscending:"Sort Ascending",sortDescending:"Sort Descending",filterFields:"Fields Filter",filter:"Filter",include:"Include Fields...",title:"Fields to include",clear:"Clear",ok:"OK",cancel:"Cancel",operators:{contains:"Contains",doesnotcontain:"Does not contain",startswith:"Starts with",endswith:"Ends with",eq:"Is equal to",neq:"Is not equal to"}}},_layout:function(){var t=this.options;this.wrapper=e(a.template(g)({ns:a.ns,filterable:t.filterable,sortable:t.sortable,messages:t.messages})),this.menu=this.wrapper[l]({filter:t.filter,target:this.element,orientation:"vertical",showOn:"click",closeOnClick:!1,open:d(this._menuOpen,this),select:d(this._select,this),copyAnchorStyles:!1}).data(l),this._createWindow(),t.filterable&&this._initFilterForm()},_initFilterForm:function(){var e=this.menu.element.find("."+h),t=d(this._filter,this);this._filterOperator=new a.ui.DropDownList(e.find("select")),this._filterValue=e.find(".k-textbox"),this._updateFilterAriaLabel(),e.on("submit"+u,t).on("click"+u,".k-button-filter",t).on("click"+u,".k-button-clear",d(this._reset,this))},_setFilterForm:function(e){var t=this._filterOperator,n="",i="";e&&(n=e.operator,i=e.value),t.value(n),t.value()||t.select(0),this._filterValue.val(i)},_clearFilters:function(e){var t,n,r=this.dataSource.filter()||{},o=0;for(r.filters=r.filters||[],t=i(r,e),n=t.length;o<n;o++)r.filters.splice(r.filters.indexOf(t[o]),1);return r},_convert:function(t){var n=this.dataSource.options.schema,i=((n.model||{}).fields||{})[this.currentMember];return i&&("number"===i.type?t=parseFloat(t):"boolean"===i.type&&(t=!!e.parseJSON(t))),t},_filter:function(e){var n,i,r=this,o=r._convert(r._filterValue.val());return e.preventDefault(),""===o?(r.menu.close(),t):(n={field:r.currentMember,operator:r._filterOperator.value(),value:o},i=r._clearFilters(r.currentMember),i.filters.push(n),r.dataSource.filter(i),r.menu.close(),t)},_updateFilterAriaLabel:function(){var e=this.menu.element.find("."+h),t=this._filterOperator.value(),n=this.options.messages.operators[t];e.find("select").attr(p,n)},_reset:function(e){var t=this,n=t._clearFilters(t.currentMember);e.preventDefault(),n.filters[0]||(n={}),t.dataSource.filter(n),t._setFilterForm(null),t.menu.close()},_sort:function(e){var t=this.currentMember,i=this.dataSource.sort()||[];i=n(i,t),i.push({field:t,dir:e}),this.dataSource.sort(i),this.menu.close()},setDataSource:function(e){this.options.dataSource=e,this._dataSource()},_dataSource:function(){this.dataSource=a.data.PivotDataSource.create(this.options.dataSource)},_createWindow:function(){var t=this.options.messages;this.includeWindow=e(a.template(v)({messages:t})).on("click"+u,".k-button-ok",d(this._applyIncludes,this)).on("click"+u,".k-button-cancel",d(this._closeWindow,this)),this.includeWindow=new s.Window(this.includeWindow,{title:t.title,visible:!1,resizable:!1,open:d(this._windowOpen,this)})},_applyIncludes:function(e){var t,n=[],r=this.treeView.dataSource.view(),a=r[0].checked,s=this.dataSource.filter(),l=i(s,this.currentMember,"in")[0];o(r,n),l&&(a?(s.filters.splice(s.filters.indexOf(l),1),s.filters.length||(s={})):l.value=n.join(","),t=s),n.length&&(t||a||(t={field:this.currentMember,operator:"in",value:n.join(",")},s&&(s.filters.push(t),t=s))),t&&this.dataSource.filter(t),this._closeWindow(e)},_closeWindow:function(e){e.preventDefault(),this.includeWindow.close()},_treeViewDataSource:function(){var e=this;return a.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(e){return parseInt(e.childrenCardinality,10)>0}}},transport:{read:function(t){var n={},i=e.treeView.dataSource.get(t.data.uniqueName),o=t.data.uniqueName;o?(n.memberUniqueName=i.uniqueName.replace(/\&/g,"&amp;"),n.treeOp=1):n.levelUniqueName=e.currentMember+".[(ALL)]",e.dataSource.schemaMembers(n).done(function(n){r(e.dataSource.filter(),e.currentMember,n),t.success(n)}).fail(t.error)}}})},_createTreeView:function(e){var t=this;t.treeView=new s.TreeView(e,{autoBind:!1,dataSource:t._treeViewDataSource(),dataTextField:"caption",template:"#: data.item.caption || data.item.name #",checkboxes:{checkChildren:!0},dataBound:function(){s.progress(t.includeWindow.element,!1)}})},_menuOpen:function(t){if(t.event){var n=a.attr("name");this.currentMember=e(t.event.target).closest("["+n+"]").attr(n),this.options.filterable&&this._setFilterForm(i(this.dataSource.filter(),this.currentMember)[0])}},_select:function(t){var n=e(t.item);e(".k-pivot-filter-window").not(this.includeWindow.element).kendoWindow("close"),n.hasClass("k-include-item")?this.includeWindow.center().open():n.hasClass("k-sort-asc")?this._sort("asc"):n.hasClass("k-sort-desc")?this._sort("desc"):n.hasClass(h)&&this._updateFilterAriaLabel()},_windowOpen:function(){this.treeView||this._createTreeView(this.includeWindow.element.find(".k-treeview")),s.progress(this.includeWindow.element,!0),this.treeView.dataSource.read()},destroy:function(){c.fn.destroy.call(this),this.menu&&(this.menu.destroy(),this.menu=null),this.treeView&&(this.treeView.destroy(),this.treeView=null),this.includeWindow&&(this.includeWindow.destroy(),this.includeWindow=null),this.wrapper=null,this.element=null}}),m='<div class="k-filterable k-content" tabindex="-1" data-role="fieldmenu"><form class="k-filter-menu"><div><div class="k-filter-help-text">#=messages.info#</div><select>#for(var op in messages.operators){#<option value="#=op#">#=messages.operators[op]#</option>#}#</select><input class="k-textbox" type="text" '+p+'="#=messages.filter#" /><div><a class="k-button k-primary k-button-filter" href="\\#">#=messages.filter#</a><a class="k-button k-button-clear" href="\\#">#=messages.clear#</a></div></div></form></div>',g='<ul class="k-pivot-fieldmenu"># if (sortable) {#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-icon k-i-sort-asc-sm"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-icon k-i-sort-desc-sm"></span>${messages.sortDescending}</span></li># if (filterable) {#<li class="k-separator"></li># } ## } ## if (filterable) {#<li class="k-item k-include-item"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.include}</span></li><li class="k-separator"></li><li class="k-item '+h+'"><span class="k-link"><span class="k-icon k-i-filter"></span>${messages.filterFields}</span><ul><li>'+m+"</li></ul></li># } #</ul>",v='<div class="k-popup-edit-form k-pivot-filter-window"><div class="k-edit-form-container"><div class="k-treeview"></div><div class="k-edit-buttons k-state-default"><a class="k-button k-primary k-button-ok" href="\\#">${messages.ok}</a><a class="k-button k-button-cancel" href="\\#">${messages.cancel}</a></div></div>';s.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.filtercell.min",["kendo.autocomplete.min","kendo.datepicker.min","kendo.numerictextbox.min","kendo.combobox.min","kendo.dropdownlist.min"],e)}(function(){return function(e,t){function n(t){var n="string"==typeof t?t:t.operator;return e.inArray(n,v)>-1}function i(t,n){var r,o,a=[];if(e.isPlainObject(t))if(t.hasOwnProperty("filters"))a=t.filters;else if(t.field==n)return t;for(e.isArray(t)&&(a=t),r=0;r<a.length;r++)if(o=i(a[r],n))return o}function r(t,n){t.filters&&(t.filters=e.grep(t.filters,function(e){return r(e,n),e.filters?e.filters.length:e.field!=n}))}function o(e,t){var n=a.getter(t,!0);return function(t){for(var i,r,o=e(t),a=[],s=0,l={};s<o.length;)i=o[s++],r=n(i),l.hasOwnProperty(r)||(a.push(i),l[r]=!0);return a}}var a=window.kendo,s=a.ui,l=a.data.DataSource,d=s.Widget,u="change",c="boolean",h="enums",p="string",f="Is equal to",m="Is not equal to",g=e.proxy,v=["isnull","isnotnull","isempty","isnotempty"],_=d.extend({init:function(i,r){var o,s,l,f,m,v,_,b,k,w,y,x,C;if(i=e(i).addClass("k-filtercell"),o=this.wrapper=e("<span/>").appendTo(i),s=this,m=r,b=s.operators=r.operators||{},k=s.input=e("<input/>").attr(a.attr("bind"),"value: value").appendTo(o),w=r?r.suggestDataSource:null,w&&(r=e.extend({},r,{suggestDataSource:{}})),d.fn.init.call(s,i[0],r),w&&(s.options.suggestDataSource=w),r=s.options,l=s.dataSource=r.dataSource,s.model=l.reader.model,_=r.type=p,y=a.getter("reader.model.fields",!0)(l)||{},x=y[r.field],x&&x.type&&(_=r.type=x.type),r.values&&(r.type=_=h),b=b[_]||r.operators[_],!m.operator)for(v in b){r.operator=v;break}s._parse=function(e){return null!=e?e+"":e},s.model&&s.model.fields&&(C=s.model.fields[r.field],C&&C.parse&&(s._parse=g(C.parse,C))),s.defaultOperator=r.operator,s.viewModel=f=a.observable({operator:r.operator,value:null,operatorVisible:function(){var e=this.get("value");return null!==e&&e!==t&&"undefined"!=e||n(this.get("operator"))&&!s._clearInProgress}}),f.bind(u,g(s.updateDsFilter,s)),_==p&&s.initSuggestDataSource(r),null!==r.inputWidth&&k.width(r.inputWidth),k.attr("aria-label",s._getColumnTitle()),s._setInputType(r,_),_!=c&&r.showOperators!==!1?s._createOperatorDropDown(b):(e('<div unselectable="on" />').css("display","none").text("eq").appendTo(o),o.addClass("k-operator-hidden")),s._createClearIcon(),a.bind(this.wrapper,f),_==p&&(r.template||s.setAutoCompleteSource()),_==h&&s.setComboBoxSource(s.options.values),s._refreshUI(),s._refreshHandler=g(s._refreshUI,s),s.dataSource.bind(u,s._refreshHandler)},_setInputType:function(t,n){var i,r,o,s,l,d=this,u=d.input;"function"==typeof t.template?(t.template.call(d.viewModel,{element:d.input,dataSource:d.suggestDataSource}),d._angularItems("compile")):n==p?u.attr(a.attr("role"),"autocomplete").attr(a.attr("text-field"),t.dataTextField||t.field).attr(a.attr("filter"),t.suggestionOperator).attr(a.attr("delay"),t.delay).attr(a.attr("min-length"),t.minLength).attr(a.attr("value-primitive"),!0):"date"==n?u.attr(a.attr("role"),"datepicker"):n==c?(u.remove(),i=e("<input type='radio'/>"),r=d.wrapper,o=a.guid(),s=e("<label/>").text(t.messages.isTrue).append(i),i.attr(a.attr("bind"),"checked:value").attr("name",o).val("true"),l=s.clone().text(t.messages.isFalse),i.clone().val("false").appendTo(l),r.append([s,l])):"number"==n?u.attr(a.attr("role"),"numerictextbox").attr("title",d._getColumnTitle()):n==h&&u.attr(a.attr("role"),"combobox").attr(a.attr("text-field"),"text").attr(a.attr("suggest"),!0).attr(a.attr("filter"),"contains").attr(a.attr("value-field"),"value").attr(a.attr("value-primitive"),!0)},_getColumnTitle:function(){var e=this.options.column;return e?e.title||e.field:""},_createOperatorDropDown:function(t){var n,i,r=[],o=this.viewModel;for(n in t)r.push({text:t[n],value:n});i=e('<input class="k-dropdown-operator" '+a.attr("bind")+'="value: operator"/>').appendTo(this.wrapper),this.operatorDropDown=i.kendoDropDownList({dataSource:r,dataTextField:"text",dataValueField:"value",open:function(){this.popup.element.width(150)},valuePrimitive:!0}).data("kendoDropDownList"),o.bind("change",function(){var e=t[o.operator];i.attr("aria-label",e)}),this.operatorDropDown.wrapper.find(".k-i-arrow-60-down").removeClass("k-i-arrow-60-down").addClass("k-i-filter")},initSuggestDataSource:function(e){var n=e.suggestDataSource;n instanceof l||(!e.customDataSource&&n&&(n.group=t),n=this.suggestDataSource=l.create(n)),e.customDataSource||(n._pageSize=t,n.reader.data=o(n.reader.data,this.options.field)),this.suggestDataSource=n},setAutoCompleteSource:function(){var e=this.input.data("kendoAutoComplete");e&&e.setDataSource(this.suggestDataSource)},setComboBoxSource:function(e){var t=l.create({data:e}),n=this.input.data("kendoComboBox");n&&n.setDataSource(t)},_refreshUI:function(){var t=this,n=i(t.dataSource.filter(),this.options.field)||{},r=t.viewModel;t.manuallyUpdatingVM=!0,n=e.extend(!0,{},n),t.options.type==c&&r.value!==n.value&&t.wrapper.find(":radio").prop("checked",!1),n.operator&&r.set("operator",n.operator),r.set("value",n.value),t.manuallyUpdatingVM=!1},updateDsFilter:function(i){var r,o,a,s,l=this,d=l.viewModel;l.manuallyUpdatingVM||"operator"==i.field&&d.value===t&&!n(d)||(r=e.extend({},l.viewModel.toJSON(),{field:l.options.field}),o={logic:"and",filters:[]},a=!1,(r.value!==t&&null!==r.value||n(r)&&!this._clearInProgress)&&(o.filters.push(r),a=l.trigger(u,{filter:o,field:l.options.field})),(l._clearInProgress||null===r.value)&&(a=l.trigger(u,{filter:null,field:l.options.field})),a||(s=l._merge(o),l.dataSource.filter(s.filters.length?s:{})))},_merge:function(t){var i,o,a,s=this,l=t.logic||"and",d=t.filters,u=s.dataSource.filter()||{filters:[],logic:"and"};for(r(u,s.options.field),o=0,a=d.length;o<a;o++)i=d[o],i.value=s._parse(i.value);return d=e.grep(d,function(e){return""!==e.value&&null!==e.value||n(e)}),d.length&&(u.filters.length?(t.filters=d,"and"!==u.logic&&(u.filters=[{logic:u.logic,filters:u.filters}],u.logic="and"),u.filters.push(d.length>1?t:d[0])):(u.filters=d,u.logic=l)),u},_createClearIcon:function(){var t=this;e("<button type='button' class='k-button k-button-icon' title = "+t.options.messages.clear+"/>").attr("aria-label",t.options.messages.clear).attr(a.attr("bind"),"visible:operatorVisible").html("<span class='k-icon k-i-filter-clear'/>").click(g(t.clearFilter,t)).appendTo(t.wrapper)},clearFilter:function(){this._clearInProgress=!0,n(this.viewModel.operator)&&this.viewModel.set("operator",this.defaultOperator),this.viewModel.set("value",null),this._clearInProgress=!1},_angularItems:function(e){var t=this.wrapper.closest("th").get(),n=this.options.column;this.angular(e,function(){return{elements:t,data:[{column:n}]}})},destroy:function(){var e=this;e.filterModel=null,e.operatorDropDown=null,e._angularItems("cleanup"),e._refreshHandler&&(e.dataSource.bind(u,e._refreshHandler),e._refreshHandler=null),a.unbind(e.element),d.fn.destroy.call(e),a.destroy(e.element)},events:[u],options:{name:"FilterCell",delay:200,minLength:1,inputWidth:null,values:t,customDataSource:!1,field:"",dataTextField:"",type:"string",suggestDataSource:null,suggestionOperator:"startswith",operator:"eq",showOperators:!0,template:null,messages:{isTrue:"is true",isFalse:"is false",filter:"Filter",clear:"Clear",operator:"Operator"},operators:{string:{eq:f,neq:m,startswith:"Starts with",contains:"Contains",doesnotcontain:"Does not contain",endswith:"Ends with",isnull:"Is null",isnotnull:"Is not null",isempty:"Is empty",isnotempty:"Is not empty"},number:{eq:f,neq:m,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:m,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:f,neq:m,isnull:"Is null",isnotnull:"Is not null"}}}});s.plugin(_)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.panelbar.min",["kendo.data.min"],e)}(function(){return function(e,t){function n(t){t=e(t),t.filter(".k-first:not(:first-child)").removeClass(S),t.filter(".k-last:not(:last-child)").removeClass(_),t.filter(":first-child").addClass(S),t.filter(":last-child").addClass(_)}function i(t){var n=t,i=t.children("ul"),r=n.children(".k-link").children(".k-icon");t.hasClass("k-panelbar")||(!r.length&&i.length?r=e("<span class='k-icon' />").appendTo(n):i.length&&i.children().length||(r.remove(),i.remove()))}var r=window.kendo,o=r.ui,a=r.keys,s=e.extend,l=e.proxy,d=e.each,u=e.isArray,c=r.template,h=o.Widget,p=r.data.HierarchicalDataSource,f=/^(ul|a|div)$/i,m=".kendoPanelBar",g="img",v="href",_="k-last",b="k-link",k="."+b,w="error",y=".k-item",x=".k-group",C=x+":visible",T="k-image",S="k-first",D="change",F="expand",E="select",A="k-content",I="activate",R="collapse",M="dataBound",z="mouseenter",H="mouseleave",N="contentLoad",B="undefined",P="k-state-active",L="> .k-panel",O="> .k-content",V="string",W="k-state-focused",U="k-state-disabled",q="k-state-selected",j="."+q,G="k-state-highlight",$=y+":not(.k-state-disabled)",K="> "+$+" > "+k+", .k-panel > "+$+" > "+k,Y=y+".k-state-disabled > .k-link",Q="> li > "+j+", .k-panel > li > "+j,X="k-state-default",J="aria-disabled",Z="aria-expanded",ee="aria-hidden",te="aria-selected",ne=":visible",ie=":empty",re="single",oe={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},ae={aria:function(e){var t="";return(e.items||e.content||e.contentUrl||e.expanded)&&(t+=Z+"='"+(e.expanded?"true":"false")+"' "),e.enabled===!1&&(t+=J+"='true'"),t},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=t.enabled===!1?" "+U:t.expanded===!0?" "+P:" k-state-default",0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),n},textClass:function(e,t){var n=b;return t.firstLevel&&(n+=" k-header"),n},textAttributes:function(e){return e?" href='"+e+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-panelbar-collapse k-i-arrow-60-up":" k-panelbar-expand k-i-arrow-60-down"},text:function(e){return e.encoded===!1?e.text:r.htmlEncode(e.text)},groupAttributes:function(e){return e.expanded!==!0?" style='display:none'":""},ariaHidden:function(e){return e.expanded!==!0},groupCssClass:function(){return"k-group k-panel"},contentAttributes:function(e){return e.item.expanded!==!0?" style='display:none'":""},content:function(e){return e.content?e.content:e.contentUrl?"":"&nbsp;"},contentUrl:function(e){return e.contentUrl?'href="'+e.contentUrl+'"':""}},se=function(e){return e.children("span").children(".k-icon")},le=r.ui.DataBoundWidget.extend({init:function(t,n){var i,o,a=this;u(n)&&(n={dataSource:n}),o=n&&!!n.dataSource,h.fn.init.call(a,t,n),t=a.wrapper=a.element.addClass("k-widget k-reset k-header k-panelbar"),n=a.options,t[0].id&&(a._itemId=t[0].id+"_pb_active"),a._tabindex(),a._accessors(),a._dataSource(),a._templates(),a._initData(o),a._updateClasses(),a._animations(n),t.on("click"+m,K,function(t){a._click(e(t.currentTarget))&&t.preventDefault()}).on(z+m+" "+H+m,K,a._toggleHover).on("click"+m,Y,!1).on("click"+m,".k-request-retry",l(a._retryRequest,a)).on("keydown"+m,e.proxy(a._keydown,a)).on("focus"+m,function(){var e=a.select();a._current(e[0]?e:a._first())}).on("blur"+m,function(){a._current(null)}).attr("role","menu"),i=t.find("li."+P+" > ."+A),i[0]&&a.expand(i.parent(),!1),n.dataSource||a._angularCompile(),r.notify(a)},events:[F,R,E,I,D,w,M,N],options:{name:"PanelBar",dataSource:{},animation:{expand:{effects:"expand:vertical",duration:200},collapse:{duration:200}},messages:{loading:"Loading...",requestFailed:"Request failed.",retry:"Retry"},autoBind:!0,
loadOnDemand:!0,expandMode:"multiple",dataTextField:null},_angularCompile:function(){var e=this;e.angular("compile",function(){return{elements:e.element.children("li"),data:[{dataItem:e.options.$angular}]}})},_angularCompileElements:function(t,n){var i=this;i.angular("compile",function(){return{elements:t,data:e.map(n,function(e){return[{dataItem:e}]})}})},_angularCleanup:function(){var e=this;e.angular("cleanup",function(){return{elements:e.element.children("li")}})},destroy:function(){h.fn.destroy.call(this),this.element.off(m),this._angularCleanup(),r.destroy(this.element)},_initData:function(e){var t=this;e&&(t.element.empty(),t.options.autoBind&&(t._progress(!0),t.dataSource.fetch()))},_templates:function(){var e=this,t=e.options,n=l(e._fieldAccessor,e);t.template&&typeof t.template==V?t.template=c(t.template):t.template||(t.template=c("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #")),e.templates={content:c("<div role='region' class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"),group:c("<ul role='group' aria-hidden='#= ariaHidden(group) #' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:c("# var url = "+n("url")+"(item); ## var imageUrl = "+n("imageUrl")+"(item); ## var spriteCssClass = "+n("spriteCssClass")+"(item); ## var contentUrl = contentUrl(item); ## var tag = url||contentUrl ? 'a' : 'span'; #<#= tag # class='#= textClass(item, group) #' #= contentUrl ##= textAttributes(url) #># if (imageUrl) { #<img class='k-image' alt='' src='#= imageUrl #' /># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.panelBar.options.template(data) ##= arrow(data) #</#= tag #>"),item:c("<li role='menuitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'"+r.attr("uid")+"='#= item.uid #'>#= itemWrapper(data) ## if (item.items && item.items.length > 0) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"),loading:c("<div class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</div>"),retry:c("#: data.messages.requestFailed # <button class='k-button k-request-retry'>#: data.messages.retry #</button>"),arrow:c("<span class='#= arrowClass(item) #'></span>"),empty:c("")}},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=s(!0,t,e.animation),"dataSource"in e&&this.setDataSource(e.dataSource),h.fn.setOptions.call(this,e)},expand:function(n,i){var r=this,o={};return n=this.element.find(n),r._animating&&n.find("ul").is(":visible")?(r.one("complete",function(){setTimeout(function(){r.expand(n)})}),t):(r._animating=!0,i=i!==!1,n.each(function(t,a){var s,l;if(a=e(a),s=n.children(".k-group,.k-content"),s.length||(s=r._addGroupElement(n)),l=s.add(a.find(O)),!a.hasClass(U)&&l.length>0){if(r.options.expandMode==re&&r._collapseAllExpanded(a))return r;n.find("."+G).removeClass(G),a.addClass(G),i||(o=r.options.animation,r.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),r._triggerEvent(F,a)||r._toggleItem(a,!1,!1),i||(r.options.animation=o)}}),r)},collapse:function(t,n){var i=this,r={};return i._animating=!0,n=n!==!1,t=i.element.find(t),t.each(function(t,o){o=e(o);var a=o.find(L).add(o.find(O));!o.hasClass(U)&&a.is(ne)&&(o.removeClass(G),n||(r=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(R,o)||i._toggleItem(o,!0),n||(i.options.animation=r))}),i},updateArrow:function(t){var n=this;t=e(t),t.children(k).children(".k-panelbar-collapse, .k-panelbar-expand").remove(),t.filter(function(){var t=n.dataItem(this);return t?t.hasChildren||t.content||t.contentUrl:e(this).find(".k-panel").length>0||e(this).find(".k-content").length>0}).children(".k-link:not(:has([class*=k-i-arrow]))").each(function(){var t=e(this),n=t.parent();t.append("<span class='k-icon "+(n.hasClass(P)?" k-panelbar-collapse k-i-arrow-60-up":" k-panelbar-expand k-i-arrow-60-down")+"'/>")})},_accessors:function(){var e,t,n,i=this,o=i.options,a=i.element;for(e in oe)t=o[oe[e]],n=a.attr(r.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),u(t)||(t=[t]),o[oe[e]]=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()):se(e).toggleClass("k-i-loading",t).removeClass("k-i-refresh")},_refreshRoot:function(t){var n,i=this,r=i.element,o={firstLevel:!0,expanded:!0,length:r.children().length};this.element.empty(),n=e.map(t,function(t,n){return"string"==typeof t?e(t):(t.items=[],e(i.renderItem({group:o,item:s(t,{index:n})})))}),this.element.append(n),this._angularCompileElements(n,t)},_refreshChildren:function(e,t){var n,r,a,s;if(t.children(".k-group").empty(),s=e.children.data(),s.length)for(this.append(e.children,t),this.options.loadOnDemand&&this._toggleGroup(t.children(".k-group"),!1),r=t.children(".k-group").children("li"),n=0;n<r.length;n++)a=r.eq(n),this.trigger("itemChange",{item:a,data:this.dataItem(a),ns:o});else i(t),r=t.children(".k-group").children("li"),this._angularCompileElements(r,s)},findByUid:function(t){var n,i,o=this.element.find(".k-item"),a=r.attr("uid");for(i=0;i<o.length;i++)if(o[i].getAttribute(a)==t){n=o[i];break}return e(n)},refresh:function(e){var n,i,r=this.options,o=e.node,a=e.action,s=e.items,l=this.wrapper,d=r.loadOnDemand;if(e.field){if(!s[0]||!s[0].level)return;return this._updateItems(s,e.field)}if(o&&(l=this.findByUid(o.uid),this._progress(l,!1)),"add"==a?this._appendItems(e.index,s,l):"remove"==a?this.remove(this.findByUid(s[0].uid)):"itemchange"==a?this._updateItems(s):"itemloaded"==a?this._refreshChildren(o,l):this._refreshRoot(s),"remove"!=a)for(n=0;n<s.length;n++)d&&!s[n].expanded||(i=s[n],this._hasChildItems(i)&&i.load());this.trigger(M,{node:o?l:t})},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),n=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),se(t).addClass("k-i-refresh"),e.node.loaded(!1)):(this._progress(!1),this.element.html(n))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},items:function(){return this.element.find(".k-item > span:first-child")},setDataSource:function(e){var t=this.options;t.dataSource=e,this._dataSource(),this.options.autoBind&&(this._progress(!0),this.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=l(this.refresh,this),this._errorHandler=l(this._error,this),this.dataSource.bind(D,this._refreshHandler),this.dataSource.bind(w,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(D,this._refreshHandler),e.unbind(w,this._errorHandler))},_fieldAccessor:function(t){var n=this.options[oe[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 "+r.expr(e)+"}"}).join(",")+"];",o+="if(item.level){return levels[Math.min(item.level(), "+i+"-1)](item);}else",o+="{return levels["+i+"-1](item)}"),o+="})"},_dataSource:function(){var e=this,t=e.options,n=t.dataSource;n&&(n=u(n)?{data:n}:n,e._unbindDataSource(),n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource=p.create(n),e._bindDataSource())},_appendItems:function(t,n,i){var r,o,a,l,d,u=this;for(i.hasClass("k-panelbar")?(r=i.children("li"),o=i):(o=i.children(".k-group"),o.length||(o=u._addGroupElement(i)),r=o.children("li")),a={firstLevel:i.hasClass("k-panelbar"),expanded:!0,length:r.length},l=e.map(n,function(t,n){return e("string"==typeof t?t:u.renderItem({group:a,item:s(t,{index:n})}))}),typeof t==B&&(t=r.length),d=0;d<l.length;d++)0===r.length||0===t?o.append(l[d]):l[d].insertAfter(r[t-1]);u._angularCompileElements(l,n),u.dataItem(i)&&(u.dataItem(i).hasChildren=!0,u.updateArrow(i))},_updateItems:function(t,n){var i,r,a,l,d,u,c=this,h={panelBar:c.options,item:l,group:{}},p="expanded"!=n;if("selected"==n)t[0][n]?(d=c.findByUid(t[0].uid),d.hasClass(U)||c.select(d,!0)):c.clearSelection();else{for(u=e.map(t,function(e){return c.findByUid(e.uid)}),p&&c.angular("cleanup",function(){return{elements:u}}),i=0;i<t.length;i++)h.item=l=t[i],h.panelBar=c,a=u[i],r=a.parent(),p&&(h.group={firstLevel:r.hasClass("k-panelbar"),expanded:a.parent().hasClass(P),length:a.children().length},a.children(".k-link").remove(),a.prepend(c.templates.itemWrapper(s(h,{arrow:l.hasChildren||l.content||l.contentUrl?c.templates.arrow:c.templates.empty},ae)))),"expanded"==n?c._toggleItem(a,!l[n],!l[n]||"true"):"enabled"==n&&(c.enable(a,l[n]),l[n]||l.selected&&l.set("selected",!1)),a.length&&this.trigger("itemChange",{item:a,data:l,ns:o});p&&c.angular("compile",function(){return{elements:u,data:e.map(t,function(e){return[{dataItem:e}]})}})}},_toggleDisabled:function(e,t){e=this.element.find(e),e.toggleClass(X,t).toggleClass(U,!t).attr(J,!t)},dataItem:function(t){var n=e(t).closest(y).attr(r.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},select:function(n,i){var r=this;return n===t?r.element.find(Q).parent():(n=r.element.find(n),n.length?n.each(function(){var n=e(this),o=n.children(k);return n.hasClass(U)?r:(r._updateSelected(o,i),t)}):this._updateSelected(n),r)},clearSelection:function(){this.select(e())},enable:function(e,t){return this._toggleDisabled(e,t!==!1),this},disable:function(e){return this._toggleDisabled(e,!1),this},append:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.length?t.find(L):null);return d(i.items,function(){i.group.append(this),n(this)}),this.updateArrow(t),n(i.group.find(".k-first, .k-last")),i.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return d(i.items,function(){t.before(this),n(this)}),n(t),i.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var i=this._insert(e,t,t.parent());return d(i.items,function(){t.after(this),n(this)}),n(t),i.group.height("auto"),this},remove:function(e){e=this.element.find(e);var t=this,i=e.parentsUntil(t.element,y),r=e.parent("ul");return e.remove(),!r||r.hasClass("k-panelbar")||r.children(y).length||r.remove(),i.length&&(i=i.eq(0),t.updateArrow(i),n(i)),t},reload:function(t){var n=this;t=n.element.find(t),t.each(function(){var t=e(this);n._ajaxRequest(t,t.children("."+A),!t.is(ne))})},_first:function(){return this.element.children($).first()},_last:function(){var e=this.element.children($).last(),t=e.children(C);return t[0]?t.children($).last():e},_current:function(n){var i=this,r=i._focused,o=i._itemId;return n===t?r:(i.element.removeAttr("aria-activedescendant"),r&&r.length&&(r[0].id===o&&r.removeAttr("id"),r.children(k).removeClass(W)),e(n).length&&(o=n[0].id||o,n.attr("id",o).children(k).addClass(W),i.element.attr("aria-activedescendant",o)),i._focused=n,t)},_keydown:function(e){var t=this,n=e.keyCode,i=t._current();e.target==e.currentTarget&&(n==a.DOWN||n==a.RIGHT?(t._current(t._nextItem(i)),e.preventDefault()):n==a.UP||n==a.LEFT?(t._current(t._prevItem(i)),e.preventDefault()):n==a.ENTER||n==a.SPACEBAR?(t._click(i.children(k)),e.preventDefault()):n==a.HOME?(t._current(t._first()),e.preventDefault()):n==a.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(C),n=e.nextAll(":visible").first();return t[0]&&(n=t.children("."+S)),n[0]||(n=e.parent(C).parent(y).next()),n[0]||(n=this._first()),n.hasClass(U)&&(n=this._nextItem(n)),n},_prevItem:function(e){if(!e)return this._last();var t,n=e.prevAll(":visible").first();if(n[0])for(t=n;t[0];)t=t.children(C).children("."+_),t[0]&&(n=t);else n=e.parent(C).parent(y),n[0]||(n=this._last());return n.hasClass(U)&&(n=this._prevItem(n)),n},_insert:function(t,n,i){var r,o,a,l=this,d=e.isPlainObject(t),u=n&&n[0];return u||(i=l.element),o={firstLevel:i.hasClass("k-panelbar"),expanded:e(n).hasClass(P),length:i.children().length},u&&!i.length&&(i=e(l.renderGroup({group:o,options:l.options})).appendTo(n)),d||e.isArray(t)||t instanceof p?(t instanceof p&&(t=t.data()),r=e.map(d?[t]:t,function(t,n){return e("string"==typeof t?t:l.renderItem({group:o,item:s(t,{index:n})}))}),u&&(a=l.dataItem(n),a?(a.hasChildren=!0,n.attr(Z,a.expanded).not("."+P).children("ul").attr(ee,!a.expanded)):n.attr(Z,!1))):(r="string"==typeof t&&"<"!=t.charAt(0)?l.element.find(t):e(t),l._updateItemsClasses(r)),t.length||(t=[t]),l._angularCompileElements(r,t),{items:r,group:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li."+U).length||n.toggleClass("k-state-hover",t.type==z)},_updateClasses:function(){var t,i,r,o,a,s=this;t=s.element.find("li > ul").not(function(){return e(this).parentsUntil(".k-panelbar","div").length}).addClass("k-group k-panel").attr("role","group"),o=t.parent(),a=s.dataItem(o),r=a&&a.expanded||!1,t.parent().attr(Z,r).not("."+P).children("ul").attr(ee,!r).hide(),i=s.element.add(t).children(),s._updateItemsClasses(i),s.updateArrow(i),n(i)},_updateItemsClasses:function(e){for(var t=e.length,n=0;n<t;n++)this._updateItemClasses(e[n],n)},_updateItemClasses:function(t,n){var i,o,a=this._selected,s=this.options.contentUrls,l=s&&s[n],d=this.element[0];t=e(t).addClass("k-item").attr("role","menuitem"),r.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children(g).addClass(T),o=t.children("a").addClass(b),o[0]&&(o.attr("href",l),o.children(g).addClass(T)),t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"),t.filter("li[disabled]").addClass("k-state-disabled").attr(J,!0).removeAttr("disabled"),t.children("div").addClass(A).attr("role","region").attr(ee,!0).hide().parent().attr(Z,!1),o=t.children(j),o[0]&&(a&&a.removeAttr(te).children(j).removeClass(q),o.addClass(q),this._selected=t.attr(te,!0)),t.children(k)[0]||(i="<span class='"+b+"'/>",s&&s[n]&&t[0].parentNode==d&&(i='<a class="k-link k-header" href="'+s[n]+'"/>'),t.contents().filter(function(){return!(this.nodeName.match(f)||3==this.nodeType&&!e.trim(this.nodeValue))}).wrapAll(i)),t.parent(".k-panelbar")[0]&&t.children(k).addClass("k-header")},_click:function(e){var t,n,i,r,o,a,s,l,d,u=this,c=u.element;if(!e.parents("li."+U).length&&e.closest(".k-widget")[0]==c[0]){if(o=e.closest(k),a=o.closest(y),u._updateSelected(o),s=a.children(".k-group,.k-content"),l=this.dataItem(a),!s.length&&(u.options.loadOnDemand&&l&&l.hasChildren||this._hasChildItems(a)||a.content||a.contentUrl)&&(s=u._addGroupElement(a)),n=a.find(L).add(a.find(O)),i=o.attr(v),r=i&&("#"==i.charAt(i.length-1)||i.indexOf("#"+u.element[0].id+"-")!=-1),t=!(!r&&!n.length),n.data("animating"))return t;if(u._triggerEvent(E,a)&&(t=!0),t!==!1)return u.options.expandMode==re&&u._collapseAllExpanded(a)?t:(n.length&&(d=n.is(ne),u._triggerEvent(d?R:F,a)||(t=u._toggleItem(a,d))),t)}},_hasChildItems:function(e){return e.items&&e.items.length>0||e.hasChildren},_toggleItem:function(e,n,i){var r,o,a=this,s=e.find(L),l=e.find(k),d=l.attr(v),u=a.dataItem(e),c=!n,h=u&&u.loaded();return u&&!i&&u.expanded!==c?(u.set("expanded",c),r=u.hasChildren||!!u.content||!!u.contentUrl):(!u||i&&"true"!==i||h||u.content||u.contentUrl?s.length?(this._toggleGroup(s,n),r=!0):(o=e.children("."+A),o.length&&(r=!0,o.is(ie)&&d!==t?a._ajaxRequest(e,o,n):a._toggleGroup(o,n))):(a.options.loadOnDemand&&this._progress(e,!0),e.children(".k-group,.k-content").remove(),r=u.hasChildren,u.load()),r)},_toggleGroup:function(e,n){var i=this,r=i.options.animation,o=r.expand,a=r.collapse&&"effects"in r.collapse,l=s({},r.expand,r.collapse);return a||(l=s(l,{reverse:!0})),e.is(ne)!=n?(i._animating=!1,t):(e.attr(ee,!!n),e.parent().attr(Z,!n).toggleClass(P,!n).find("> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand").toggleClass("k-i-arrow-60-up",!n).toggleClass("k-panelbar-collapse",!n).toggleClass("k-i-arrow-60-down",n).toggleClass("k-panelbar-expand",n),n?(o=s(l,{hide:!0}),o.complete=function(){i._animationCallback()}):o=s({complete:function(e){i._triggerEvent(I,e.closest(y)),i._animationCallback()}},o),e.kendoStop(!0,!0).kendoAnimate(o),t)},_animationCallback:function(){var e=this;e.trigger("complete"),e._animating=!1},_addGroupElement:function(t){var n=e('<ul role="group" aria-hidden="true" class="k-group k-panel" style="display:none"></ul>');return t.append(n),n},_collapseAllExpanded:function(t){var n,i=this,r=!1,o=t.find(L).add(t.find(O));return o.is(ne)&&(r=!0),o.is(ne)||0===o.length||(n=t.siblings(),n.find(L).add(n.find(O)).filter(function(){return e(this).is(ne)}).each(function(t,n){n=e(n),r=i._triggerEvent(R,n.closest(y)),r||i._toggleGroup(n,!0)}),i.one("complete",function(){setTimeout(function(){n.each(function(e,t){var n=i.dataItem(t);n&&n.set("expanded",!1)})})})),r},_ajaxRequest:function(t,n,i){var r=this,o=t.find(".k-panelbar-collapse, .k-panelbar-expand"),a=t.find(k),s=setTimeout(function(){o.addClass("k-i-loading")},100),l={},d=a.attr(v);e.ajax({type:"GET",cache:!1,url:d,dataType:"html",data:l,error:function(e,t){o.removeClass("k-i-loading"),r.trigger(w,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),o.removeClass("k-i-loading")},success:function(e){function o(){return{elements:n.get()}}try{r.angular("cleanup",o),n.html(e),r.angular("compile",o)}catch(a){var s=window.console;s&&s.error&&s.error(a.name+": "+a.message+" in "+d),this.error(this.xhr,"error")}r._toggleGroup(n,i),r.trigger(N,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){var n=this;return n.trigger(e,{item:t[0]})},_updateSelected:function(e,t){var n=this,i=n.element,r=e.parent(y),o=n._selected,a=n.dataItem(r);o&&o.removeAttr(te),n._selected=r.attr(te,!0),i.find(Q).removeClass(q),i.find("> ."+G+", .k-panel > ."+G).removeClass(G),e.addClass(q),e.parentsUntil(i,y).filter(":has(.k-header)").addClass(G),n._current(r[0]?r:null),a&&a.set("selected",!0),t||n.trigger(D)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(e){var t,n,i=this;return e=s({panelBar:i,group:{}},e),t=i.templates.empty,n=e.item,i.templates.item(s(e,{itemWrapper:i.templates.itemWrapper,renderContent:i.renderContent,arrow:i._hasChildItems(n)||n.content||n.contentUrl?i.templates.arrow:t,subGroup:!e.loadOnDemand||n.expanded?i.renderGroup:t},ae))},renderGroup:function(e){var t=this,n=t.templates||e.panelBar.templates;return n.group(s({renderItems:function(e){for(var t="",n=0,i=e.items,r=i?i.length:0,o=s({length:r},e.group);n<r;n++)t+=e.panelBar.renderItem(s(e,{group:o,item:s({index:n},i[n])}));return t}},e,ae))},renderContent:function(e){return e.panelBar.templates.content(s(e,ae))}});r.ui.plugin(le)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.responsivepanel.min",["kendo.core.min"],e)}(function(){return function(e,t){var n=e.proxy,i=".kendoResponsivePanel",r="open",o="close",a="click"+i+" touchstart"+i,s=kendo.ui.Widget,l=s.extend({init:function(t,r){s.fn.init.call(this,t,r),this._guid="_"+kendo.guid(),this._toggleHandler=n(this._toggleButtonClick,this),this._closeHandler=n(this._close,this),e(document.documentElement).on(a,this.options.toggleButton,this._toggleHandler),this._registerBreakpoint(),this.element.addClass("k-rpanel k-rpanel-"+this.options.orientation+" "+this._guid),this._resizeHandler=n(this.resize,this,!0),e(window).on("resize"+i,this._resizeHandler)},_mediaQuery:"@media (max-width: #= breakpoint-1 #px) {.#= guid #.k-rpanel-animate.k-rpanel-left,.#= guid #.k-rpanel-animate.k-rpanel-right {-webkit-transition: -webkit-transform .2s ease-out;-ms-transition: -ms-transform .2s ease-out;transition: transform .2s ease-out;} .#= guid #.k-rpanel-top {overflow: hidden;}.#= guid #.k-rpanel-animate.k-rpanel-top {-webkit-transition: max-height .2s linear;-ms-transition: max-height .2s linear;transition: max-height .2s linear;}} @media (min-width: #= breakpoint #px) {#= toggleButton # { display: none; } .#= guid #.k-rpanel-left { float: left; } .#= guid #.k-rpanel-right { float: right; } .#= guid #.k-rpanel-left, .#= guid #.k-rpanel-right {position: relative;-webkit-transform: translateX(0);-ms-transform: translateX(0);transform: translateX(0);-webkit-transform: translateX(0) translateZ(0);-ms-transform: translateX(0) translateZ(0);transform: translateX(0) translateZ(0);} .k-ie9 .#= guid #.k-rpanel-left { left: 0; } .#= guid #.k-rpanel-top { max-height: none; }}",_registerBreakpoint:function(){var e=this.options;this._registerStyle(kendo.template(this._mediaQuery)({breakpoint:e.breakpoint,toggleButton:e.toggleButton,guid:this._guid}))},_registerStyle:function(t){var n=e("head,body")[0],i=document.createElement("style");n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))},options:{name:"ResponsivePanel",orientation:"left",toggleButton:".k-rpanel-toggle",breakpoint:640,autoClose:!0},events:[r,o],_resize:function(){this.element.removeClass("k-rpanel-animate k-rpanel-expanded"),e(document.documentElement).off(a,this._closeHandler)},_toggleButtonClick:function(e){e.preventDefault(),this.element.hasClass("k-rpanel-expanded")?this.close():this.open()},open:function(){this.trigger(r)||(this.element.addClass("k-rpanel-animate k-rpanel-expanded"),this.options.autoClose&&e(document.documentElement).on(a,this._closeHandler))},close:function(){this.trigger(o)||(this.element.addClass("k-rpanel-animate").removeClass("k-rpanel-expanded"),e(document.documentElement).off(a,this._closeHandler))},_close:function(t){var n=t.isDefaultPrevented(),i=e(t.target).closest(this.options.toggleButton+",.k-rpanel");i.length||n||this.close()},destroy:function(){s.fn.destroy.call(this),e(window).off("resize"+i,this._resizeHandler),e(document.documentElement).off(a,this._closeHandler)}});kendo.ui.plugin(l)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.timepicker.min",["kendo.popup.min","kendo.dateinput.min"],e)}(function(){return function(e,t){function n(e,t,n){var i,r=e.getTimezoneOffset();e.setTime(e.getTime()+t),n||(i=e.getTimezoneOffset()-r,e.setTime(e.getTime()+i*M))}function i(){var e=new G,t=new G(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),n=new G(e.getFullYear(),e.getMonth(),e.getDate(),12,0,0);return-1*(t.getTimezoneOffset()-n.getTimezoneOffset())}function r(e){return 60*e.getHours()*M+e.getMinutes()*M+1e3*e.getSeconds()+e.getMilliseconds()}function o(e,t,n){var i,o=r(t),a=r(n);return!e||o==a||(i=r(e),o>i&&(i+=z),a<o&&(a+=z),i>=o&&i<=a)}function a(e){var t=e.parseFormats;e.format=f(e.format||u.getCulture(e.culture).calendars.standard.patterns.t),t=U(t)?t:[t],t.splice(0,0,e.format),e.parseFormats=t}function s(e){e.preventDefault()}var l,d,u=window.kendo,c=u.keys,h=u.parseDate,p=u._activeElement,f=u._extractFormat,m=u.support,g=m.browser,v=u.ui,_=v.Widget,b="open",k="close",w="change",y=".kendoTimePicker",x="click"+y,C="k-state-default",T="disabled",S="readonly",D="li",F="<span/>",E="k-state-focused",A="k-state-hover",I="mouseenter"+y+" mouseleave"+y,R="mousedown"+y,M=6e4,z=864e5,H="k-state-selected",N="k-state-disabled",B="aria-selected",P="aria-expanded",L="aria-hidden",O="aria-disabled",V="aria-activedescendant",W="id",U=e.isArray,q=e.extend,j=e.proxy,G=Date,$=new G;$=new G($.getFullYear(),$.getMonth(),$.getDate(),0,0,0),l=function(t){var n=this,i=t.id;n.options=t,n._dates=[],n.ul=e('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({overflow:m.kineticScrollNeeded?"":"auto"}).on(x,D,j(n._click,n)).on("mouseenter"+y,D,function(){e(this).addClass(A)}).on("mouseleave"+y,D,function(){e(this).removeClass(A)}),n.list=e("<div class='k-list-container k-list-scroller' unselectable='on'/>").append(n.ul).on(R,s),i&&(n._timeViewID=i+"_timeview",n._optionID=i+"_option_selected",n.ul.attr(W,n._timeViewID)),n._popup(),n._heightHandler=j(n._height,n),n.template=u.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>',{useWithBlock:!1})},l.prototype={current:function(n){var i=this,r=i.options.active;return n===t?i._current:(i._current&&i._current.removeClass(H).removeAttr(B).removeAttr(W),n&&(n=e(n).addClass(H).attr(W,i._optionID).attr(B,!0),i.scroll(n[0])),i._current=n,r&&r(n),t)},close:function(){this.popup.close()},destroy:function(){var e=this;e.ul.off(y),e.list.off(y),e.popup.destroy()},open:function(){var e=this;e.ul[0].firstChild||e.bind(),e.popup.open(),e._current&&e.scroll(e._current[0])},dataBind:function(e){for(var t,n=this,i=n.options,r=i.format,a=u.toString,s=n.template,l=e.length,d=0,c="";d<l;d++)t=e[d],o(t,i.min,i.max)&&(c+=s(a(t,r,i.culture)));n._html(c)},refresh:function(){var e,t,o,a=this,s=a.options,l=s.format,d=i(),c=d<0,h=s.min,p=s.max,f=r(h),m=r(p),g=s.interval*M,v=u.toString,_=a.template,b=new G((+h)),k=b.getDate(),w=0,y="";for(o=c?(z+d*M)/g:z/g,f!=m&&(f>m&&(m+=z),o=(m-f)/g+1),t=parseInt(o,10);w<o;w++)w&&n(b,g,c),m&&t==w&&(e=r(b),k<b.getDate()&&(e+=z),e>m&&(b=new G((+p)))),a._dates.push(r(b)),y+=_(v(b,l,s.culture));a._html(y)},bind:function(){var e=this,t=e.options.dates;t&&t[0]?e.dataBind(t):e.refresh()},_html:function(e){var t=this;t.ul[0].innerHTML=e,t.popup.unbind(b,t._heightHandler),t.popup.one(b,t._heightHandler),t.current(null),t.select(t._value)},scroll:function(e){if(e){var t=this.list[0],n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i;r>n?r=n:a>r+o&&(r=a-o),t.scrollTop=r}},select:function(t){var n,i=this,r=i.options,o=i._current;t instanceof Date&&(t=u.toString(t,r.format,r.culture)),"string"==typeof t&&(o&&o.text()===t?t=o:(t=e.grep(i.ul[0].childNodes,function(e){return(e.textContent||e.innerText)==t}),t=t[0]?t:null)),n=i._distinctSelection(t),i.current(n)},_distinctSelection:function(t){var n,i,o=this;return t&&t.length>1&&(n=r(o._value),i=e.inArray(n,o._dates),t=o.ul.children()[i]),t},setOptions:function(e){var t=this.options;e.min=h(e.min),e.max=h(e.max),this.options=q(t,e,{active:t.active,change:t.change,close:t.close,open:t.open}),this.bind()},toggle:function(){var e=this;e.popup.visible()?e.close():e.open()},value:function(e){var t=this;t._value=e,t.ul[0].firstChild&&t.select(e)},_click:function(t){var n=this,i=e(t.currentTarget),r=i.text(),o=n.options.dates;o&&o.length>0&&(r=o[i.index()]),t.isDefaultPrevented()||(n.select(i),n.options.change(r,!0),n.close())},_height:function(){var e=this,t=e.list,n=t.parent(".k-animation-container"),i=e.options.height;e.ul[0].children.length&&t.add(n).show().height(e.ul[0].scrollHeight>i?i:"auto").hide()},_parse:function(e){var t=this,n=t.options,i=t._value||$;return e instanceof G?e:(e=h(e,n.parseFormats,n.culture),e&&(e=new G(i.getFullYear(),i.getMonth(),i.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())),e)},_adjustListWidth:function(){var e,t,n=this.list,i=n[0].style.width,r=this.options.anchor,o=u._outerWidth;!n.data("width")&&i||(e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=e?parseFloat(e.width):o(r),e&&(g.mozilla||g.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),i=t-(o(n)-n.width()),n.css({fontFamily:r.css("font-family"),width:i}).data("width",i))},_popup:function(){var e=this,t=e.list,n=e.options,i=n.anchor;e.popup=new v.Popup(t,q(n.popup,{anchor:i,open:n.open,close:n.close,animation:n.animation,isRtl:m.isRtl(n.anchor)}))},move:function(e){var n=this,i=e.keyCode,r=n.ul[0],o=n._current,a=i===c.DOWN;if(i===c.UP||a){if(e.altKey)return n.toggle(a),t;o=a?o?o[0].nextSibling:r.firstChild:o?o[0].previousSibling:r.lastChild,o&&n.select(o),n.options.change(n._current.text()),e.preventDefault()}else i!==c.ENTER&&i!==c.TAB&&i!==c.ESC||(e.preventDefault(),o&&n.options.change(o.text(),!0),n.close())}},l.getMilliseconds=r,u.TimeView=l,d=_.extend({init:function(t,n){var i,o,s,d,c,p,f=this;_.fn.init.call(f,t,n),t=f.element,n=f.options,n.min=h(t.attr("min"))||h(n.min),n.max=h(t.attr("max"))||h(n.max),a(n),f._initialOptions=q({},n),f._wrapper(),f.timeView=o=new l(q({},n,{id:t.attr(W),anchor:f.wrapper,format:n.format,change:function(e,n){n?f._change(e):t.val(e)},open:function(e){f.timeView._adjustListWidth(),f.trigger(b)?e.preventDefault():(t.attr(P,!0),i.attr(L,!1))},close:function(e){f.trigger(k)?e.preventDefault():(t.attr(P,!1),i.attr(L,!0))},active:function(e){t.removeAttr(V),e&&t.attr(V,o._optionID)}})),i=o.ul,f._icon(),f._reset();try{t[0].setAttribute("type","text")}catch(m){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1,"aria-owns":o._timeViewID}),s=t.is("[disabled]")||e(f.element).parents("fieldset").is(":disabled"),s?f.enable(!1):f.readonly(t.is("[readonly]")),n.dateInput&&(d=n.min,c=n.max,p=new G,r(d)==r(c)?(d=new G(p.getFullYear(),p.getMonth(),p.getDate(),0,0,0),c=new G(p.getFullYear(),p.getMonth(),p.getDate(),24,0,0)):(d=new G(p.getFullYear(),p.getMonth(),p.getDate(),d.getHours(),d.getMinutes(),d.getSeconds(),d.getMilliseconds()),c=new G(p.getFullYear(),p.getMonth(),p.getDate(),c.getHours(),c.getMinutes(),c.getSeconds(),c.getMilliseconds())),f._dateInput=new v.DateInput(t,{culture:n.culture,format:n.format,min:d,max:c,value:n.value})),f._old=f._update(n.value||f.element.val()),f._oldText=t.val(),u.notify(f)},options:{name:"TimePicker",min:$,max:$,format:"",dates:[],parseFormats:[],value:null,interval:30,height:200,animation:{},dateInput:!1},events:[b,k,w],setOptions:function(e){var t=this,n=t._value;_.fn.setOptions.call(t,e),e=t.options,a(e),t.timeView.setOptions(e),n&&t.element.val(u.toString(n,e.format,e.culture))},dataBind:function(e){U(e)&&this.timeView.dataBind(e)},_editable:function(e){var t=this,n=e.disable,i=e.readonly,r=t._arrow.off(y),o=t.element.off(y),a=t._inputWrapper.off(y);i||n?(a.addClass(n?N:C).removeClass(n?C:N),o.attr(T,n).attr(S,i).attr(O,n)):(a.addClass(C).removeClass(N).on(I,t._toggleHover),o.removeAttr(T).removeAttr(S).attr(O,!1).on("keydown"+y,j(t._keydown,t)).on("focusout"+y,j(t._blur,t)).on("focus"+y,function(){t._inputWrapper.addClass(E)}),r.on(x,j(t._click,t)).on(R,s))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;_.fn.destroy.call(e),e.timeView.destroy(),e.element.off(y),e._arrow.off(y),e._inputWrapper.off(y),e._form&&e._form.off("reset",e._resetHandler)},close:function(){this.timeView.close()},open:function(){this.timeView.open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",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)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&e._change(t),e._inputWrapper.removeClass(E)},_click:function(){var e=this,t=e.element;e.timeView.toggle(),m.touch||t[0]===p()||t.focus()},_change:function(e){var t=this;e=t._update(e),+t._old!=+e&&(t._old=e,t._oldText=t.element.val(),t._typing||t.element.trigger(w),t.trigger(w)),t._typing=!1},_icon:function(){var t,n=this,i=n.element;t=i.next("span.k-select"),t[0]||(t=e('<span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-clock"></span></span>').insertAfter(i)),n._arrow=t.attr({role:"button","aria-controls":n.timeView._timeViewID})},_keydown:function(e){var t=this,n=e.keyCode,i=t.timeView,r=t.element.val();i.popup.visible()||e.altKey?(i.move(e),t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation()):n===c.ENTER&&r!==t._oldText?t._change(r):t._typing=!0},_option:function(e,n){var i=this,r=i.options;return n===t?r[e]:(n=i.timeView._parse(n),n&&(n=new G((+n)),r[e]=n,i.timeView.options[e]=n,i.timeView.bind()),t)},_toggleHover:function(t){e(t.currentTarget).toggleClass(A,"mouseenter"===t.type)},_update:function(e){var t,n=this,i=n.options,r=n.timeView,a=r._parse(e),s=n._value,l=null===a&&null===s||a instanceof Date&&s instanceof Date;
return o(a,i.min,i.max)||(a=null),+a===+s&&l?(t=u.toString(a,i.format,i.culture),t!==e&&n.element.val(null===a?e:t),a):(n._value=a,n._dateInput&&a?n._dateInput.value(a||e):n.element.val(u.toString(a||e,i.format,i.culture)),r.value(a),a)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-timepicker"),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,n.wrapper=t.addClass("k-widget k-timepicker k-header").addClass(i[0].className),i.css({width:"100%",height:i[0].style.height}),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))}}),v.plugin(d)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.datetimepicker.min",["kendo.datepicker.min","kendo.timepicker.min"],e)}(function(){return function(e,t){function n(e){var t=new Date(2100,0,1);return t.setMinutes(-e),t}function i(e){e.preventDefault()}function r(t){var n,i=o.getCulture(t.culture).calendars.standard.patterns,r=!t.parseFormats.length;t.format=d(t.format||i.g),t.timeFormat=n=d(t.timeFormat||i.t),o.DateView.normalize(t),r&&t.parseFormats.unshift("yyyy-MM-ddTHH:mm:ss"),e.inArray(n,t.parseFormats)===-1&&t.parseFormats.push(n)}var o=window.kendo,a=o.TimeView,s=o.parseDate,l=o._activeElement,d=o._extractFormat,u=o.calendar,c=u.isInRange,h=u.restrictValue,p=u.isEqualDatePart,f=a.getMilliseconds,m=o.ui,g=m.Widget,v="open",_="close",b="change",k=".kendoDateTimePicker",w="click"+k,y="disabled",x="readonly",C="k-state-default",T="k-state-focused",S="k-state-hover",D="k-state-disabled",F="mouseenter"+k+" mouseleave"+k,E="mousedown"+k,A="month",I="<span/>",R="aria-activedescendant",M="aria-expanded",z="aria-hidden",H="aria-owns",N="aria-disabled",B=Date,P=new B(1800,0,1),L=new B(2099,11,31),O={view:"date"},V={view:"time"},W=e.extend,U=g.extend({init:function(t,n){var i,a=this;g.fn.init.call(a,t,n),t=a.element,n=a.options,n.disableDates=o.calendar.disabled(n.disableDates),n.min=s(t.attr("min"))||s(n.min),n.max=s(t.attr("max"))||s(n.max),r(n),a._initialOptions=W({},n),a._wrapper(),a._views(),a._icons(),a._reset(),a._template();try{t[0].setAttribute("type","text")}catch(l){t[0].type="text"}t.addClass("k-input").attr({role:"combobox","aria-expanded":!1}),a._midnight=a._calculateMidnight(n.min,n.max),i=t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled"),i?a.enable(!1):a.readonly(t.is("[readonly]")),n.dateInput&&(a._dateInput=new m.DateInput(t,{culture:n.culture,format:n.format,min:n.min,max:n.max,value:n.value})),a._old=a._update(n.value||a.element.val()),a._oldText=t.val(),o.notify(a)},options:{name:"DateTimePicker",value:null,format:"",timeFormat:"",culture:"",parseFormats:[],dates:[],disableDates:null,min:new B(P),max:new B(L),interval:30,height:200,footer:"",start:A,depth:A,animation:{},month:{},ARIATemplate:'Current focused date is #=kendo.toString(data.current, "d")#',dateButtonText:"Open the date view",timeButtonText:"Open the time view",dateInput:!1,weekNumber:!1},events:[v,_,b],setOptions:function(e){var t,n,i,a=this,l=a._value;g.fn.setOptions.call(a,e),e=a.options,e.min=t=s(e.min),e.max=n=s(e.max),r(e),a._midnight=a._calculateMidnight(e.min,e.max),i=e.value||a._value||a.dateView._current,t&&!p(t,i)&&(t=new B(P)),n&&!p(n,i)&&(n=new B(L)),a.dateView.setOptions(e),a.timeView.setOptions(W({},e,{format:e.timeFormat,min:t,max:n})),l&&(a.element.val(o.toString(l,e.format,e.culture)),a._updateARIA(l))},_editable:function(t){var n=this,r=n.element.off(k),a=n._dateIcon.off(k),s=n._timeIcon.off(k),d=n._inputWrapper.off(k),u=t.readonly,c=t.disable;u||c?(d.addClass(c?D:C).removeClass(c?C:D),r.attr(y,c).attr(x,u).attr(N,c)):(d.addClass(C).removeClass(D).on(F,n._toggleHover),r.removeAttr(y).removeAttr(x).attr(N,!1).on("keydown"+k,e.proxy(n._keydown,n)).on("focus"+k,function(){n._inputWrapper.addClass(T)}).on("focusout"+k,function(){n._inputWrapper.removeClass(T),r.val()!==n._oldText&&n._change(r.val()),n.close("date"),n.close("time")}),a.on(E,i).on(w,function(){n.toggle("date"),o.support.touch||r[0]===l()||r.focus()}),s.on(E,i).on(w,function(){n.toggle("time"),o.support.touch||r[0]===l()||r.focus()}))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},destroy:function(){var e=this;g.fn.destroy.call(e),e.dateView.destroy(),e.timeView.destroy(),e.element.off(k),e._dateIcon.off(k),e._timeIcon.off(k),e._inputWrapper.off(k),e._form&&e._form.off("reset",e._resetHandler)},close:function(e){"time"!==e&&(e="date"),this[e+"View"].close()},open:function(e){"time"!==e&&(e="date"),this[e+"View"].open()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},toggle:function(e){var t="timeView";"time"!==e?e="date":t="dateView",this[e+"View"].toggle(),this[t].close()},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)},_change:function(e){var t,n,i,r=this,o=r.element.val();e=r._update(e),t=+r._old!=+e,n=t&&!r._typing,i=o!==r.element.val(),(n||i)&&r.element.trigger(b),t&&(r._old=e,r._oldText=r.element.val(),r.trigger(b)),r._typing=!1},_option:function(e,i){var r,o,a=this,l=a.options,d=a.timeView,u=d.options,c=a._value||a._old;if(i===t)return l[e];if(i=s(i,l.parseFormats,l.culture)){if(l.min.getTime()===l.max.getTime()&&(u.dates=[]),l[e]=new B(i.getTime()),a.dateView[e](i),a._midnight=a._calculateMidnight(l.min,l.max),c&&(r=p(l.min,c),o=p(l.max,c)),r||o){if(u[e]=i,r&&!o&&(u.max=n(l.interval)),o){if(a._midnight)return d.dataBind([L]),t;r||(u.min=P)}}else u.max=L,u.min=P;d.bind()}},_toggleHover:function(t){e(t.currentTarget).toggleClass(S,"mouseenter"===t.type)},_update:function(t){var i,r,a,l,d,u=this,f=u.options,m=f.min,g=f.max,v=f.dates,_=u.timeView,k=u._value,w=s(t,f.parseFormats,f.culture),y=null===w&&null===k||w instanceof Date&&k instanceof Date;return f.disableDates&&f.disableDates(w)&&(w=null,u._old||u.element.val()||(t=null)),+w===+k&&y?(d=o.toString(w,f.format,f.culture),d!==t&&(u.element.val(null===w?t:d),t instanceof String&&u.element.trigger(b)),w):(null!==w&&p(w,m)?w=h(w,m,g):c(w,m,g)||(w=null),u._value=w,_.value(w),u.dateView.value(w),w&&(a=u._old,r=_.options,v[0]&&(v=e.grep(v,function(e){return p(w,e)}),v[0]&&(_.dataBind(v),l=!0)),l||(p(w,m)&&(r.min=m,r.max=n(f.interval),i=!0),p(w,g)&&(u._midnight?(_.dataBind([L]),l=!0):(r.max=g,i||(r.min=P),i=!0))),!l&&(!a&&i||a&&!p(a,w))&&(i||(r.max=L,r.min=P),_.bind())),u._dateInput&&w?u._dateInput.value(w||t):u.element.val(o.toString(w||t,f.format,f.culture)),u._updateARIA(w),w)},_keydown:function(e){var t=this,n=t.dateView,i=t.timeView,r=t.element.val(),a=n.popup.visible(),s=t._dateInput&&e.stopImmediatePropagation;e.altKey&&e.keyCode===o.keys.DOWN?t.toggle(a?"time":"date"):a?(n.move(e),t._updateARIA(n._current)):i.popup.visible()?i.move(e):e.keyCode===o.keys.ENTER&&r!==t._oldText?t._change(r):(t._typing=!0,s=!1),s&&e.stopImmediatePropagation()},_views:function(){var e,t,n,i,r,l,d=this,u=d.element,h=d.options,p=u.attr("id");d.dateView=e=new o.DateView(W({},h,{id:p,anchor:d.wrapper,change:function(){var t,n,i=e.calendar.value(),r=+i,a=+h.min,s=+h.max;r!==a&&r!==s||(t=r===a?a:s,t=new B(d._value||t),t.setFullYear(i.getFullYear(),i.getMonth(),i.getDate()),c(t,a,s)&&(i=t)),d._value&&(n=o.date.setHours(new Date(i),d._value),c(n,a,s)&&(i=n)),d._change(i),d.close("date")},close:function(e){d.trigger(_,O)?e.preventDefault():(u.attr(M,!1),n.attr(z,!0),t.popup.visible()||u.removeAttr(H))},open:function(t){d.trigger(v,O)?t.preventDefault():(u.val()!==d._oldText&&(l=s(u.val(),h.parseFormats,h.culture),d.dateView[l?"current":"value"](l)),n.attr(z,!1),u.attr(M,!0).attr(H,e._dateViewID),d._updateARIA(l))}})),n=e.div,r=h.min.getTime(),d.timeView=t=new a({id:p,value:h.value,anchor:d.wrapper,animation:h.animation,format:h.timeFormat,culture:h.culture,height:h.height,interval:h.interval,min:new B(P),max:new B(L),dates:r===h.max.getTime()?[new Date(r)]:[],parseFormats:h.parseFormats,change:function(n,i){n=t._parse(n),n<h.min?(n=new B((+h.min)),t.options.min=n):n>h.max&&(n=new B((+h.max)),t.options.max=n),i?(d._timeSelected=!0,d._change(n)):(u.val(o.toString(n,h.format,h.culture)),e.value(n),d._updateARIA(n))},close:function(t){d.trigger(_,V)?t.preventDefault():(i.attr(z,!0),u.attr(M,!1),e.popup.visible()||u.removeAttr(H))},open:function(e){t._adjustListWidth(),d.trigger(v,V)?e.preventDefault():(u.val()!==d._oldText&&(l=s(u.val(),h.parseFormats,h.culture),d.timeView.value(l)),i.attr(z,!1),u.attr(M,!0).attr(H,t._timeViewID),t.options.active(t.current()))},active:function(e){u.removeAttr(R),e&&u.attr(R,t._optionID)}}),i=t.ul},_icons:function(){var t=this,n=t.element,i=t.options,r=n.next("span.k-select");r[0]||(r=e('<span unselectable="on" class="k-select"><span class="k-link k-link-date" aria-label="'+i.dateButtonText+'"><span unselectable="on" class="k-icon k-i-calendar"></span></span><span class="k-link k-link-time" aria-label="'+i.timeButtonText+'"><span unselectable="on" class="k-icon k-i-clock"></span></span></span>').insertAfter(n)),r=r.children(),r=r.children(),t._dateIcon=r.eq(0).attr("aria-controls",t.dateView._dateViewID),t._timeIcon=r.eq(1).attr("aria-controls",t.timeView._timeViewID)},_wrapper:function(){var t,n=this,i=n.element;t=i.parents(".k-datetimepicker"),t[0]||(t=i.wrap(I).parent().addClass("k-picker-wrap k-state-default"),t=t.wrap(I).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-datetimepicker k-header").addClass(i[0].className),n._inputWrapper=e(t[0].firstChild)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),r=i?e("#"+i):n.closest("form");r[0]&&(t._resetHandler=function(){t.value(n[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=r.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=o.template(this.options.ARIATemplate)},_calculateMidnight:function(e,t){return f(e)+f(t)===0},_updateARIA:function(e){var t,n=this,i=n.dateView.calendar;n.element.removeAttr(R),i&&(t=i._cell,t.attr("aria-label",n._ariaTemplate({current:e||i.current()})),n.element.attr(R,t.attr("id")))}});m.plugin(U)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.splitter.min",["kendo.resizable.min"],e)}(function(){return function(e,t){function n(e){return v.test(e)}function i(e){return g.test(e)||/^\d+$/.test(e)}function r(e){return!n(e)&&!i(e)}function o(e,t){var i=parseInt(e,10);return n(e)&&(i=Math.floor(i*t/100)),i}function a(e,n){return function(i,r){var o,a=this.element.find(i).data(E);return 1==arguments.length?a[e]:(a[e]=r,n&&(o=this.element.data("kendo"+this.options.name),o.resize(!0)),t)}}function s(e){var t=this,n=e.orientation;t.owner=e,t._element=e.element,t.orientation=n,p(t,n===T?d:l),t._resizable=new u.ui.Resizable(e.element,{orientation:n,handle:".k-splitbar-draggable-"+n+"[data-marker="+e._marker+"]",hint:f(t._createHint,t),start:f(t._start,t),max:f(t._max,t),min:f(t._min,t),invalidClass:"k-restricted-size-"+n,resizeend:f(t._stop,t)})}var l,d,u=window.kendo,c=u.ui,h=u.keys,p=e.extend,f=e.proxy,m=c.Widget,g=/^\d+(\.\d+)?px$/i,v=/^\d+(\.\d+)?%$/i,_=".kendoSplitter",b="expand",k="collapse",w="contentLoad",y="error",x="resize",C="layoutChange",T="horizontal",S="vertical",D="mouseenter",F="click",E="pane",A="mouseleave",I="k-state-focused",R="k-"+E,M="."+R,z=m.extend({init:function(e,t){var n,i=this;m.fn.init.call(i,e,t),i.wrapper=i.element,i.options.orientation&&(n=i.options.orientation.toLowerCase()!=S),i.orientation=n?T:S,i._dimension=n?"width":"height",i._keys={decrease:n?h.LEFT:h.UP,increase:n?h.RIGHT:h.DOWN},i._resizeStep=10,i._marker=u.guid().substring(0,8),i._initPanes(),i.resizing=new s(i),i.element.triggerHandler("init"+_)},events:[b,k,w,y,x,C],_addOverlays:function(){this._panes().append("<div class='k-splitter-overlay k-overlay' />")},_removeOverlays:function(){this._panes().children(".k-splitter-overlay").remove()},_attachEvents:function(){var t=this,n=t.options.orientation;t.element.children(".k-splitbar-draggable-"+n).on("keydown"+_,f(t._keydown,t)).on("mousedown"+_,function(e){e.currentTarget.focus()}).on("focus"+_,function(t){e(t.currentTarget).addClass(I)}).on("blur"+_,function(n){e(n.currentTarget).removeClass(I),t.resizing&&t.resizing.end()}).on(D+_,function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")}).on(A+_,function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")}).on("mousedown"+_,f(t._addOverlays,t)).end().children(".k-splitbar").on("dblclick"+_,f(t._togglePane,t)).children(".k-collapse-next, .k-collapse-prev").on(F+_,t._arrowClick(k)).end().children(".k-expand-next, .k-expand-prev").on(F+_,t._arrowClick(b)).end().end(),e(window).on("resize"+_+t._marker,f(t.resize,t,!1)),e(document).on("mouseup"+_+t._marker,f(t._removeOverlays,t))},_detachEvents:function(){var t=this;t.element.children(".k-splitbar-draggable-"+t.orientation).off(_).end().children(".k-splitbar").off("dblclick"+_).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(_),e(window).off(_+t._marker),e(document).off(_+t._marker)},options:{name:"Splitter",orientation:T,panes:[]},destroy:function(){m.fn.destroy.call(this),this._detachEvents(),this.resizing&&this.resizing.destroy(),u.destroy(this.element),this.wrapper=this.element=null},_keydown:function(t){var n,i=this,r=t.keyCode,o=i.resizing,a=e(t.currentTarget),s=i._keys,l=r===s.increase,d=r===s.decrease;l||d?(t.ctrlKey?(n=a[d?"next":"prev"](),o&&o.isResizing()&&o.end(),n[i._dimension]()?i._triggerAction(k,a[d?"prev":"next"]()):i._triggerAction(b,n)):o&&o.move((d?-1:1)*i._resizeStep,a),t.preventDefault()):r===h.HOME?(o.move(-o._maxPosition,a),t.preventDefault()):r===h.END?(o.move(o._maxPosition,a),t.preventDefault()):r===h.ENTER&&o&&(o.end(),t.preventDefault())},_initPanes:function(){var e=this.options.panes||[],t=this;this.element.addClass("k-widget").addClass("k-splitter").children().each(function(n,i){"script"!=i.nodeName.toLowerCase()&&t._initPane(i,e[n])}),this.resize()},_initPane:function(t,n){t=e(t).attr("role","group").addClass(R),t.data(E,n?n:{}).toggleClass("k-scrollable",!n||n.scrollable!==!1),this.ajaxRequest(t)},ajaxRequest:function(e,t,n){var i,r=this;e=r.element.find(e),i=e.data(E),t=t||i.contentUrl,t&&(e.append("<span class='k-icon k-i-loading k-pane-loading' />"),u.isLocalUrl(t)?jQuery.ajax({url:t,data:n||{},type:"GET",dataType:"html",success:function(t){r.angular("cleanup",function(){return{elements:e.get()}}),e.html(t),r.angular("compile",function(){return{elements:e.get()}}),r.trigger(w,{pane:e[0]})},error:function(t,n){r.trigger(y,{pane:e[0],status:n,xhr:t})}}):e.removeClass("k-scrollable").html("<iframe src='"+t+"' frameborder='0' class='k-content-frame'>This page requires frames in order to show content</iframe>"))},_triggerAction:function(e,t){this.trigger(e,{pane:t[0]})||this[e](t[0])},_togglePane:function(t){var n,i=this,r=e(t.target);r.closest(".k-splitter")[0]==i.element[0]&&(n=r.children(".k-icon:not(.k-resize-handle)"),1===n.length&&(n.is(".k-collapse-prev")?i._triggerAction(k,r.prev()):n.is(".k-collapse-next")?i._triggerAction(k,r.next()):n.is(".k-expand-prev")?i._triggerAction(b,r.prev()):n.is(".k-expand-next")&&i._triggerAction(b,r.next())))},_arrowClick:function(t){var n=this;return function(i){var r,o=e(i.target);o.closest(".k-splitter")[0]==n.element[0]&&(r=o.is(".k-"+t+"-prev")?o.parent().prev():o.parent().next(),n._triggerAction(t,r))}},_updateSplitBar:function(e,t,n){var i=function(e,t){return t?"<div class='k-icon "+e+"' />":""},r=this.orientation,o=t.resizable!==!1&&n.resizable!==!1,a=t.collapsible,s=t.collapsed,l=n.collapsible,d=n.collapsed;e.addClass("k-splitbar k-state-default k-splitbar-"+r).attr("role","separator").attr("aria-expanded",!(s||d)).removeClass("k-splitbar-"+r+"-hover").toggleClass("k-splitbar-draggable-"+r,o&&!s&&!d).toggleClass("k-splitbar-static-"+r,!o&&!a&&!l).html(i("k-collapse-prev k-i-arrow-60-up",a&&!s&&!d&&r==S)+i("k-collapse-prev k-i-arrow-60-left",a&&!s&&!d&&r==T)+i("k-expand-prev k-i-arrow-60-down",a&&s&&!d&&r==S)+i("k-expand-prev k-i-arrow-60-right",a&&s&&!d&&r==T)+i("k-resize-handle k-i-hbar",o&&r==S)+i("k-resize-handle k-i-vbar",o&&r==T)+i("k-collapse-next k-i-arrow-60-down",l&&!d&&!s&&r==S)+i("k-collapse-next k-i-arrow-60-right",l&&!d&&!s&&r==T)+i("k-expand-next k-i-arrow-60-up",l&&d&&!s&&r==S)+i("k-expand-next k-i-arrow-60-left",l&&d&&!s&&r==T)),o||a||l||e.removeAttr("tabindex")},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each(function(){var n=e(this),i=n.prevAll(M).first().data(E),r=n.nextAll(M).first().data(E);r&&t._updateSplitBar(n,i,r)})},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(M):e()},_resize:function(){var n,i,a,s,l,d,c,h,p,f,m=this,g=m.element,v=g.children(M),_=m.orientation==T,b=g.children(".k-splitbar"),k=b.length,w=_?"width":"height",y=g[w]();m.wrapper.addClass("k-splitter-resizing"),0===k?(k=v.length-1,v.slice(0,k).after("<div tabindex='0' class='k-splitbar' data-marker='"+m._marker+"' />"),m._updateSplitBars(),b=g.children(".k-splitbar")):m._updateSplitBars(),b.each(function(){y-=this[_?"offsetWidth":"offsetHeight"]}),n=0,i=0,a=e(),v.css({position:"absolute",top:0})[w](function(){var s,l=e(this),d=l.data(E)||{};if(l.removeClass("k-state-collapsed"),d.collapsed)s=d.collapsedSize?o(d.collapsedSize,y):0,l.css("overflow","hidden").addClass("k-state-collapsed");else{if(r(d.size))return a=a.add(this),t;s=o(d.size,y)}return i++,n+=s,s}),y-=n,s=a.length,l=Math.floor(y/s),a.slice(0,s-1).css(w,l).end().eq(s-1).css(w,y-(s-1)*l),d=0,c=_?"height":"width",h=_?"left":"top",p=_?"offsetWidth":"offsetHeight",0===s&&(f=v.filter(function(){return!(e(this).data(E)||{}).collapsed}).last(),f[w](y+f[0][p])),g.children().css(c,g[c]()).each(function(e,t){"script"!=t.tagName.toLowerCase()&&(t.style[h]=Math.floor(d)+"px",d+=t[p])}),m._detachEvents(),m._attachEvents(),m.wrapper.removeClass("k-splitter-resizing"),u.resize(v),m.trigger(C)},toggle:function(e,n){var i,r=this;e=r.element.find(e),i=e.data(E),(n||i.collapsible)&&(1==arguments.length&&(n=i.collapsed!==t&&i.collapsed),i.collapsed=!n,i.collapsed?e.css("overflow","hidden"):e.css("overflow",""),r.resize(!0))},collapse:function(e){this.toggle(e,!1)},expand:function(e){this.toggle(e,!0)},_addPane:function(e,t,n){var i=this;return n.length&&(i.options.panes.splice(t,0,e),i._initPane(n,e),i._removeSplitBars(),i.resize(!0)),n},append:function(t){t=t||{};var n=this,i=e("<div />").appendTo(n.element);return n._addPane(t,n.options.panes.length,i)},insertBefore:function(t,n){n=e(n),t=t||{};var i=this,r=i.wrapper.children(".k-pane").index(n),o=e("<div />").insertBefore(e(n));return i._addPane(t,r,o)},insertAfter:function(t,n){n=e(n),t=t||{};var i=this,r=i.wrapper.children(".k-pane").index(n),o=e("<div />").insertAfter(e(n));return i._addPane(t,r+1,o)},remove:function(t){t=e(t);var n=this;return t.length&&(u.destroy(t),t.each(function(t,i){n.options.panes.splice(n.wrapper.children(".k-pane").index(i),1),e(i).remove()}),n._removeSplitBars(),n.options.panes.length&&n.resize(!0)),n},size:a("size",!0),min:a("min"),max:a("max")});c.plugin(z),l={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},d={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"},s.prototype={press:function(e){this._resizable.press(e)},move:function(e,t){this.pressed||(this.press(t),this.pressed=!0),this._resizable.target||this._resizable.press(t),this._resizable.move(e)},end:function(){this._resizable.end(),this.pressed=!1},destroy:function(){this._resizable.destroy(),this._resizable=this._element=this.owner=null},isResizing:function(){return this._resizable.resizing},_createHint:function(t){var n=this;return e("<div class='k-ghost-splitbar k-ghost-splitbar-"+n.orientation+" k-state-default' />").css(n.alternateSizingProperty,t[n.alternateSizingProperty]())},_start:function(t){var n=this,r=e(t.currentTarget),o=r.prev(),a=r.next(),s=o.data(E),l=a.data(E),d=parseInt(o[0].style[n.positioningProperty],10),u=parseInt(a[0].style[n.positioningProperty],10)+a[0][n.sizingDomProperty]-r[0][n.sizingDomProperty],c=parseInt(n._element.css(n.sizingProperty),10),h=function(e){var t=parseInt(e,10);return(i(e)?t:c*t/100)||0},p=h(s.min),f=h(s.max)||u-d,m=h(l.min),g=h(l.max)||u-d;n.previousPane=o,n.nextPane=a,n._maxPosition=Math.min(u-m,d+f),n._minPosition=Math.max(d+p,u-g)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var n,i,o,a,s,l,d,c,h=this,p=e(t.currentTarget),f=h.owner;return f._panes().children(".k-splitter-overlay").remove(),t.keyCode!==u.keys.ESC&&(n=t.position,i=p.prev(),o=p.next(),a=i.data(E),s=o.data(E),l=n-parseInt(i[0].style[h.positioningProperty],10),d=parseInt(o[0].style[h.positioningProperty],10)+o[0][h.sizingDomProperty]-n-p[0][h.sizingDomProperty],c=h._element.children(M).filter(function(){return r(e(this).data(E).size)}).length,(!r(a.size)||c>1)&&(r(a.size)&&c--,a.size=l+"px"),(!r(s.size)||c>1)&&(s.size=d+"px"),f.resize(!0)),!1}}}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.dialog.min",["kendo.core.min","kendo.popup.min"],e)}(function(){return function(e,t){function n(e){return t!==e}function i(e,t,n){return Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),parseInt(t,10))}function r(e){return e.keyCode==_.ENTER||e.keyCode==_.SPACEBAR}var o,a,s,l,d,u,c,h,p=window.kendo,f=p.ui.Widget,m=p.ui.Popup.TabKeyTrap,g=e.proxy,v=p.template,_=p.keys,b=e.isFunction,k="kendoWindow",w=".k-dialog",y=".k-window",x=".k-dialog-close",C="k-content k-window-content k-dialog-content",T=".k-content",S="k-dialog-titleless",D=".k-dialog-title",F=D+"bar",E=".k-dialog-buttongroup",A=".k-button",I="k-alert",R="k-confirm",M="k-prompt",z=".k-textbox",H=".k-overlay",N=":visible",B="zIndex",P="body",L="initOpen",O="open",V="close",W="show",U="hide",q="width",j=100,G={okText:"OK",cancel:"Cancel",promptInput:"Input"},$=Math.ceil,K=":not(link,meta,script,style)",Y=f.extend({init:function(e,t){var n=this;f.fn.init.call(n,e,t),n._init(n.element,n.options),p.notify(n)},_init:function(i,r){var a,s=this;s._centerCallback=g(s._center,s),s.appendTo=e(P),n(r.visible)&&null!==r.visible||(r.visible=i.is(N)),s.wrapperTemplate===t&&(s.wrapperTemplate=o.wrapper),s._createDialog(),a=s.wrapper=i.closest(w),r._defaultFocus===t&&(s._defaultFocus=i[0]),s._tabindex(i),s._dimensions(),this._tabKeyTrap=new m(a),s.options.visible?(s.toFront(),s._triggerInitOpen(),s.trigger(O),r.modal&&(s._overlay(a.is(N)).css({opacity:.5}),s._focusDialog())):s.wrapper.hide(),r.closable&&(a.autoApplyNS(k),i.autoApplyNS(k),a.find(x).on("click",g(s._closeClick,s)).on("keydown",g(s._closeKeyHandler,s)),i.on("keydown",g(s._keydown,s)))},_dimensions:function(){var e,t,n=this,r=n.wrapper,o=n.options,a=o.width,s=o.height,l=["minWidth","minHeight","maxWidth","maxHeight"];for(e=0;e<l.length;e++)t=o[l[e]],t&&t!=1/0&&r.css(l[e],t);this._setElementMaxHeight(),a&&r.width((""+a).indexOf("%")>0?a:i(a,o.minWidth,o.maxWidth)),s&&(r.height((""+s).indexOf("%")>0?s:i(s,o.minHeight,o.maxHeight)),this._setElementHeight())},_setElementMaxHeight:function(){var e,t,n=this,i=n.element,r=n.options.maxHeight;r!=1/0&&(e=n._paddingBox(i),t=parseFloat(r,10)-n._uiHeight()-e.vertical,t>0&&i.css({maxHeight:$(t)+"px",overflow:"hidden"}))},_paddingBox:function(e){var t=parseFloat(e.css("padding-top"),10),n=parseFloat(e.css("padding-left"),10),i=parseFloat(e.css("padding-bottom"),10),r=parseFloat(e.css("padding-right"),10);return{vertical:t+i,horizontal:n+r}},_setElementHeight:function(){var e=this,t=e.element,n=e.options.height,i=e._paddingBox(t),r=parseFloat(n,10)-e._uiHeight()-i.vertical;r>0&&e.element.css({height:$(r)+"px",overflow:"hidden"})},_uiHeight:function(){var e=this,t=e.wrapper,n=t.children(E),i=n[0]&&n[0].offsetHeight||0,r=t.children(F),o=r[0]&&r[0].offsetHeight||0;return i+o},_overlay:function(t){var n=this.appendTo.children(H),i=this.wrapper;return n.length||(n=e(o.overlay)),n.insertBefore(i[0]).toggle(t).css(B,parseInt(i.css(B),10)-1),t?this._waiAriaOverlay():this._removeWaiAriaOverlay(),n},_waiAriaOverlay:function(){var t=this.wrapper;this._overlayedNodes=t.prevAll(K).add(t.nextAll(K)).each(function(){var t=e(this);t.data("ariaHidden",t.attr("aria-hidden")),t.attr("aria-hidden","true")})},_removeWaiAriaOverlay:function(){return this._overlayedNodes&&this._overlayedNodes.each(function(){var t=e(this),n=t.data("ariaHidden");n?t.attr("aria-hidden",n):t.removeAttr("aria-hidden")})},_closeClick:function(e){e.preventDefault(),this.close()},_closeKeyHandler:function(e){(r(e)||e.keyCode==_.ESC)&&this.close()},_keydown:function(e){var t=this,n=t.options,i=e.keyCode;i==_.ESC&&!t._closing&&n.closable&&t.close()},_createDialog:function(){var t=this,n=t.element,i=t.options,r=p.support.isRtl(n),a=e(o.titlebar(i)),s=a.find(".k-window-actions"),l=(n.id||p.guid())+"_title",d=e(t.wrapperTemplate(i));d.toggleClass("k-rtl",r),n.addClass(C),t.appendTo.append(d),i.closable!==!1&&(i.title!==!1?s.append(o.close(i)):d.append(o.close(i))),i.title!==!1?(d.append(a),a.attr("id",l),d.attr("aria-labelledby",l)):d.addClass(S),d.append(n),i.content&&(p.destroy(n.children()),n.html(i.content)),i.actions.length&&t._createActionbar(d)},_createActionbar:function(t){var n="stretched"===this.options.buttonLayout,i=n?"stretched":"normal",r=e(o.actionbar({buttonLayout:i}));this._addButtons(r),n&&this._normalizeButtonSize(r),t.append(r)},_addButtons:function(t){var n,i,r,a,s=this,l=s.options,d=g(s._actionClick,s),u=g(s._actionKeyHandler,s),c=s.options.actions,h=c.length,p=Math.round(j/h);for(r=0;r<h;r++)n=c[r],i=s._mergeTextWithOptions(n),a=e(o.action(n)).autoApplyNS(k).html(i).appendTo(t).data("action",n.action).on("click",d).on("keydown",u),"stretched"===l.buttonLayout&&(r==h-1&&(p=j-r*p),a.css(q,p+"%"))},_mergeTextWithOptions:function(e){var t=e.text;return t?v(t)(this.options):""},_normalizeButtonSize:function(e){var t=this,n=t.options,i=e.children(A+":last"),r=parseFloat(i[0].style[q]),o=j-n.actions.length*r;o>0&&i.css(q,r+o+"%")},_tabindex:function(e){var t,n=this,i=n.wrapper,r=i.find(x),o=i.find(E+" "+A);f.fn._tabindex.call(this,e),t=e.attr("tabindex"),r.attr("tabIndex",t),o.attr("tabIndex",t)},_actionClick:function(e){this._runActionBtn(e.currentTarget)},_actionKeyHandler:function(e){r(e)?this._runActionBtn(e.currentTarget):e.keyCode==_.ESC&&this.close()},_runActionBtn:function(t){var n,i,r=this;r._closing||(n=e(t).data("action"),i=b(n)&&n({sender:r})===!1,i||r.close())},open:function(){var e,t,n,i=this,r=i.wrapper,o=this._animationOptions(O),a=i.options;return this._triggerInitOpen(),i.trigger(O)||(i._closing&&r.kendoStop(!0,!0),i._closing=!1,i.toFront(),a.visible=!0,a.modal&&(t=!!i._modals().length,e=i._overlay(t),e.kendoStop(!0,!0),o.duration&&p.effects.Fade&&!t?(n=p.fx(e).fadeIn(),n.duration(o.duration||0),n.endValue(.5),n.play()):e.css("opacity",.5),e.show()),r.show().kendoStop().kendoAnimate({effects:o.effects,duration:o.duration,complete:g(i._openAnimationEnd,i)}),r.show()),i},_animationOptions:function(e){var t=this.options.animation,n={open:{effects:{}},close:{hide:!0,effects:{}}};return t&&t[e]||n[e]},_openAnimationEnd:function(){this.options.modal&&this._focusDialog(),this.trigger(W)},_triggerInitOpen:function(){n(this._initOpenTriggered)||(this._initOpenTriggered=!0,this.trigger(L))},toFront:function(){var t=this,n=t.wrapper,i=+n.css(B),r=i;return t.center(),e(y).each(function(t,n){var r=e(n),o=r.css(B);isNaN(o)||(i=Math.max(+o,i))}),(!n[0].style.zIndex||r<i)&&n.css(B,i+2),t.element.find("> .k-overlay").remove(),n=null,t},close:function(){return this._close(!0),this._stopCenterOnResize(),this},_close:function(e){var t=this,n=t.wrapper,i=t.options,r=this._animationOptions("open"),o=this._animationOptions("close");if(n.is(N)&&!t.trigger(V,{userTriggered:!e})){if(t._closing)return;t._closing=!0,i.visible=!1,this._removeOverlay(),n.kendoStop().kendoAnimate({effects:o.effects||r.effects,reverse:o.reverse===!0,duration:o.duration,complete:g(this._closeAnimationEnd,this)})}return t},center:function(){this._center(),this._centerOnResize()},_center:function(){var t=this,n=t.wrapper,i=e(window),r=0,o=0,a=o+Math.max(0,(i.width()-n.width())/2),s=r+Math.max(0,(i.height()-n.height()-parseInt(n.css("paddingTop"),10))/2);return n.css({left:a,top:s}),t},_centerOnResize:function(){this._trackResize||(p.onResize(this._centerCallback),this._trackResize=!0)},_stopCenterOnResize:function(){p.unbindResize(this._centerCallback),this._trackResize=!1},_removeOverlay:function(){var e=this._modals(),t=this.options,n=t.modal&&!e.length;n?this._overlay(!1).remove():e.length&&this._object(e.last())._overlay(!0)},_closeAnimationEnd:function(){var e,t=this;t._closing=!1,t.wrapper.hide().css("opacity",""),t.trigger(U),t.options.modal&&(e=t._object(t._modals().last()),e&&e.toFront())},_modals:function(){var t=this,n=e(y).filter(function(){var n=e(this),i=t._object(n),r=i&&i.options;return r&&r.modal&&t.options.appendTo==r.appendTo&&r.visible&&n.is(N)}).sort(function(t,n){return+e(t).css("zIndex")-+e(n).css("zIndex")});return t=null,n},_object:function(e){var n=e.children(T),i=p.widgetInstance(n);return i?i:t},destroy:function(){var t=this;t._destroy(),f.fn.destroy.call(t),t.wrapper.remove(),t.wrapper=t.element=e()},_destroy:function(){var e=this,t="."+k;e.wrapper.off(t),e.element.off(t),e.wrapper.find(x+","+E+" > "+A).off(t),e._stopCenterOnResize()},title:function(t){var n=this,i=n.wrapper,r=n.options,a=i.children(F),s=a.children(D),l=p.htmlEncode(t);return arguments.length?(t===!1?(a.remove(),i.addClass(S)):(a.length||(a=e(o.titlebar(r)).prependTo(i),s=a.children(D),i.removeClass(S)),s.html(l)),n.options.title=l,n):s.html()},content:function(e,t){var i=this,r=i.wrapper.children(T);return n(e)?(this.angular("cleanup",function(){return{elements:r.children()}}),p.destroy(r.children()),r.html(e),this.angular("compile",function(){var e,n=[];for(e=r.length;--e>=0;)n.push({dataItem:t});return{elements:r.children(),data:n}}),i.options.content=e,i):r.html()},_focusDialog:function(){this._defaultFocus&&this._focus(this._defaultFocus),this._tabKeyTrap.trap()},_focus:function(e){e&&e.focus()},events:[L,O,V,W,U],options:{title:"",buttonLayout:"stretched",actions:[],modal:!0,width:null,height:null,minWidth:0,minHeight:0,maxWidth:1/0,maxHeight:1/0,content:null,visible:null,appendTo:P,closable:!0}}),Q=Y.extend({options:{name:"Dialog",messages:{close:"Close"}}});p.ui.plugin(Q),a=Y.extend({_init:function(e,t){var n=this;n.wrapperTemplate=o.alertWrapper,t._defaultFocus=null,n._ensureContentId(e),Y.fn._init.call(n,e,t),n.bind(U,g(n.destroy,n)),n._ariaDescribedBy(),n._initFocus()},_ensureContentId:function(t){var n=e(t);n.attr("id")||n.attr("id",p.guid()+"_k-popup")},_ariaDescribedBy:function(){this.wrapper.attr("aria-describedby",this.element.attr("id"))},_initFocus:function(){var e=this.options;this._defaultFocus=this._chooseEntryFocus(),this._defaultFocus&&e.visible&&e.modal&&this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(E+" > "+A)[0]},options:{title:window.location.host,closable:!1,messages:G}}),s=a.extend({_init:function(e,t){var n=this;a.fn._init.call(n,e,t),n.wrapper.addClass(I)},options:{name:"Alert",modal:!0,actions:[{text:"#: messages.okText #"}]}}),p.ui.plugin(s),l=function(t){return e(o.alert).kendoAlert({
content:t}).data("kendoAlert").open()},d=a.extend({_init:function(t,n){var i=this;a.fn._init.call(i,t,n),i.wrapper.addClass(R),i.result=e.Deferred()},options:{name:"Confirm",modal:!0,actions:[{text:"#: messages.okText #",primary:!0,action:function(e){e.sender.result.resolve()}},{text:"#: messages.cancel #",action:function(e){e.sender.result.reject()}}]}}),p.ui.plugin(d),u=function(t){var n=e(o.confirm).kendoConfirm({content:t}).data("kendoConfirm").open();return n.result},c=a.extend({_init:function(t,n){var i=this;a.fn._init.call(i,t,n),i.wrapper.addClass(M),i._createPrompt(),i.result=e.Deferred()},_createPrompt:function(){var t=this.options.value,n=e(o.promptInputContainer(this.options)).insertAfter(this.element);t&&n.children(z).val(t),this._defaultFocus=this._chooseEntryFocus(),this._focusDialog()},_chooseEntryFocus:function(){return this.wrapper.find(z)[0]},options:{name:"Prompt",modal:!0,value:"",actions:[{text:"#: messages.okText #",primary:!0,action:function(e){var t=e.sender,n=t.wrapper.find(z).val();t.result.resolve(n)}},{text:"#: messages.cancel #",action:function(e){var t=e.sender,n=t.wrapper.find(z).val();e.sender.result.reject(n)}}]}}),p.ui.plugin(c),h=function(t,n){var i=e(o.prompt).kendoPrompt({content:t,value:n}).data("kendoPrompt").open();return i.result},o={wrapper:v("<div class='k-widget k-window k-dialog' role='dialog' />"),action:v("<button type='button' class='k-button# if (data.primary) { # k-primary# } role='button' #'></button>"),titlebar:v("<div class='k-window-titlebar k-dialog-titlebar k-header'><span class='k-window-title k-dialog-title'>#: title #</span><div class='k-window-actions k-dialog-actions' /></div>"),close:v("<a role='button' href='\\#' class='k-button k-bare k-button-icon k-window-action k-dialog-action k-dialog-close' title='#: messages.close #' aria-label='#: messages.close #' tabindex='-1'><span class='k-icon k-i-close'></span></a>"),actionbar:v("<div class='k-button-group k-dialog-buttongroup k-dialog-button-layout-#: buttonLayout #' role='toolbar' />"),overlay:"<div class='k-overlay' />",alertWrapper:v("<div class='k-widget k-window k-dialog' role='alertdialog' />"),alert:"<div />",confirm:"<div />",prompt:"<div />",promptInputContainer:v("<div class='k-prompt-container'><input type='text' class='k-textbox' title='#: messages.promptInput #' aria-label='#: messages.promptInput #' /></div>")},p.alert=l,p.confirm=u,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.scheduler.view.min",["kendo.core.min"],e)}(function(){return kendo.ui.scheduler={},function(e){function t(e,t){function n(e,r){var o,a;if(r=r[t])for(o=i[e]=i[e]||[],a=0;a<r.length;a++)o.push(r[a]),n(e+1,r[a])}var i=[];return n(0,e),i}function n(){return x.support.cssBorderSpacing?"":'cellspacing="0"'}function i(t,i){return t.length?"<table "+n()+' class="'+e.trim("k-scheduler-table "+(i||""))+'"><tr>'+t.join("</tr><tr>")+"</tr></table>":""}function r(e,t){return e.length?"<div style='position:relative'>"+i(e,t)+"</div>":""}function o(t,n,r){var o,a=[];if(r>0)for(o=0;o<t;o++)a.push("<th>&#8203;</th>");return n&&a.push('<th class="k-scheduler-times-all-day">'+n.text+"</th>"),r<1?e():e('<div class="k-scheduler-times">'+i(a)+"</div>")}function a(t,n,o){var a,s,l,d,u,c,h,p,f,m,g=[];for(s=0;s<t.length;s++){for(l=t[s],d=[],u=n/l.length,a=0;a<l.length;a++)c=l[a],d.push('<th colspan="'+(c.colspan||u)+'" class="'+(c.className||"")+'">'+c.text+"</th>");g.push(d.join(""))}if(h=[],o){for(p=t[t.length-1],f=[],m=o.cellContent,a=0;a<p.length;a++)f.push('<td class="'+(p[a].className||"")+'">'+(m?m(a):"&nbsp;")+"</td>");h.push(f.join(""))}return e('<div class="k-scheduler-header k-state-default"><div class="k-scheduler-header-wrap">'+i(g)+r(h,"k-scheduler-header-all-day")+"</div></div>")}function s(t,n){var r,o,a,s,l,d=Array(n).join().split(","),u=[];for(o=0;o<t.length;o++)for(a=t[o],s=n/a.length,r=0;r<a.length;r++)l=a[r].className||"",a[r].allDay&&(l="k-scheduler-times-all-day"),d[s*r]+='<th class="'+l+'" rowspan="'+s+'">'+a[r].text+"</th>";for(r=0;r<n;r++)u.push(d[r]);return n<1?e():e('<div class="k-scheduler-times">'+i(u)+"</div>")}function l(){return e('<div class="k-scheduler-content"><table '+n()+' class="k-scheduler-table"/></div>')}function d(){return k=k?k:x.support.scrollbar()}function u(e,t,n){var i,r,o,a,s;for(i=e.length-1;i>=0;i--)r=c(e[i]),o=r.start,s=r.end,a=o<=t&&s>=t,(a||o>=t&&s<=n||t<=o&&n>=o)&&(o<t&&(t=o),s>n&&(n=s));return h(e,t,n)}function c(e){return{start:e.start,end:e.end}}function h(e,t,n){var i,r,o=[];for(i=0;i<e.length;i++)r=c(e[i]),(r.start<t&&r.end>t||r.start>=t&&r.end<=n)&&o.push(e[i]);return o}function p(e){return m(e)}function f(e){return m(e)}function m(e){var t,n,i,r,o,a,s,l=[];for(t=0;t<e.length;t++){for(n=e[t],i=c(n),r=null,o=0,a=l.length;o<a;o++)if(s=i.start>l[o].end,i.start<l[o].start||s){r=l[o],r.end<i.end&&(r.end=i.end);break}r||(r={start:i.start,end:i.end,events:[]},l.push(r)),r.events.push(n)}return l}function g(t,n,i,r){var o=[];return e.each(n,function(e,n){var a=n.className?"k-slot-cell "+n.className:"k-slot-cell",s={text:n.text,className:a};s[t]=r&&!n.minorTicks?g(t,n.columns,i,r):i,o.push(s)}),o}function v(t,n,i,r,o,a){var s,l,d,u=n[0],c=[];if(u){if(o&&i)e.each(o,function(e,i){i[t]=a&&!i.minorTicks?v(t,n,i.columns,r,i.columns,a):v(t,n,null,r)}),c=o;else for(s=u.dataSource.view(),l=0;l<s.length;l++)d={text:r({text:x.htmlEncode(x.getter(u.dataTextField)(s[l])),color:x.getter(u.dataColorField)(s[l]),field:u.field,title:u.title,name:u.name,value:x.getter(u.dataValueField)(s[l])}),className:"k-slot-cell"},d[t]=v(t,n.slice(1),i,r),c.push(d);return c}return i}function _(t){return function(n){if(e.isArray(n)||n instanceof x.data.ObservableArray){for(var i=0;i<n.length;i++)if(n[i]==t)return!0;return!1}return n==t}}function b(e){e.className=e.className.replace(y,"")+" k-state-selected"}var k,w,y,x=window.kendo,C=x.ui,T=x.date.getDate,S=C.Widget,D=x._outerHeight,F=x.keys,E=".kendoSchedulerView",A=Math,I='<div class="k-marquee k-scheduler-marquee"><div class="k-marquee-color"></div><div class="k-marquee-text"><div class="k-label-top"></div><div class="k-label-bottom"></div></div></div>',R=x.Class.extend({init:function(e,t){this._index=e,this._timeSlotCollections=[],this._daySlotCollections=[],this._isRtl=t},addTimeSlotCollection:function(e,t){return this._addCollection(e,t,this._timeSlotCollections)},addDaySlotCollection:function(e,t){return this._addCollection(e,t,this._daySlotCollections)},_addCollection:function(e,t,n){var i=new N(e,t,this._index,n.length);return n.push(i),i},timeSlotCollectionCount:function(){return this._timeSlotCollections.length},daySlotCollectionCount:function(){return this._daySlotCollections.length},daySlotByPosition:function(e,t,n){return this._slotByPosition(e,t,this._daySlotCollections,n)},timeSlotByPosition:function(e,t,n){return this._slotByPosition(e,t,this._timeSlotCollections,n)},_slotByPosition:function(e,t,n,i){var r,o,a,s,l,d,u,c,h;for(r=0;r<n.length;r++)for(o=n[r],a=0;a<o.count();a++)if(s=o.at(a),l=s.offsetWidth,d=s.offsetHeight,c=s.offsetLeft+l,h=s.offsetTop+d,i||(u=o.at(a+1)),u&&(u.offsetLeft!=s.offsetLeft?c=this._isRtl?s.offsetLeft+(s.offsetLeft-u.offsetLeft):u.offsetLeft:h=u.offsetTop),e>=s.offsetLeft&&e<c&&t>=s.offsetTop&&t<h)return s},refresh:function(){var e;for(e=0;e<this._daySlotCollections.length;e++)this._daySlotCollections[e].refresh();for(e=0;e<this._timeSlotCollections.length;e++)this._timeSlotCollections[e].refresh()},timeSlotRanges:function(e,t){var n,i=this._timeSlotCollections,r=this._startSlot(e,i);if(!r.inRange&&e>=r.slot.end&&(r=null),n=r,e<t&&(n=this._endSlot(t,i)),n&&!n.inRange&&t<=n.slot.start&&(n=null),null===r&&null===n)return[];if(null===r){if(n.slot.end<=e)return[];r={inRange:!0,slot:i[n.slot.collectionIndex].first()}}if(null===n){if(r.slot.start>=t)return[];n={inRange:!0,slot:i[r.slot.collectionIndex].last()}}return this._continuousRange(z,i,r,n)},daySlotRanges:function(e,t,n){var i,r=this._daySlotCollections,o=this._startSlot(e,r,n);if(!o.inRange&&e>=o.slot.end&&(o=null),i=o,e<t&&(i=this._endSlot(t,r,n)),i&&!i.inRange&&t<=i.slot.start&&(i=null),null===o&&null===i)return[];if(null===o){if(i.slot.end<=e)return[];do e+=x.date.MS_PER_DAY,o=this._startSlot(e,r,n);while(!o.inRange&&e>=o.slot.end)}if(null===i){if(o.slot.start>=t)return[];do t-=x.date.MS_PER_DAY,i=this._endSlot(t,r,n);while(!i.inRange&&t<=i.slot.start)}return this._continuousRange(H,r,o,i)},_continuousRange:function(e,t,n,i){var r,o,a,s,l,d,u=n.slot,c=i.slot,h=u.collectionIndex,p=c.collectionIndex,f=[];for(r=h;r<=p;r++)o=t[r],a=o.first(),s=o.last(),l=!1,d=!1,r==h&&(d=!n.inRange),r==p&&(l=!i.inRange),a.start<u.start&&(a=u),s.start>c.start&&(s=c),h<p&&(r==h?l=!0:r==p?d=!0:l=d=!0),f.push(new e({start:a,end:s,collection:o,head:l,tail:d}));return f},slotRanges:function(e,t){var n=e._startTime||x.date.toUtcTime(e.start),i=e._endTime||x.date.toUtcTime(e.end);return void 0===t&&(t=e.isMultiDay()),t?this.daySlotRanges(n,i,e.isAllDay):this.timeSlotRanges(n,i)},ranges:function(e,t,n,i){return"number"!=typeof e&&(e=x.date.toUtcTime(e)),"number"!=typeof t&&(t=x.date.toUtcTime(t)),n?this.daySlotRanges(e,t,i):this.timeSlotRanges(e,t)},_startCollection:function(e,t){var n,i;for(n=0;n<t.length;n++)if(i=t[n],i.startInRange(e))return i;return null},_endCollection:function(e,t,n){var i,r;for(i=0;i<t.length;i++)if(r=t[i],r.endInRange(e,n))return r;return null},_getCollections:function(e){return e?this._daySlotCollections:this._timeSlotCollections},continuousSlot:function(e,t){var n=t?-1:1,i=this._getCollections(e.isDaySlot),r=i[e.collectionIndex+n];return r?r[t?"last":"first"]():void 0},firstSlot:function(){var e=this._getCollections(this.daySlotCollectionCount());return e[0].first()},lastSlot:function(){var e=this._getCollections(this.daySlotCollectionCount());return e[e.length-1].last()},upSlot:function(e,t,n){var i=this,r=function(e,n,r){var o=0===r;if(!t&&!e&&o&&i.daySlotCollectionCount())return i._daySlotCollections[0].at(n)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,-1,r,n)},downSlot:function(e,t,n){var i=this,r=function(e,n,r){if(!t&&e&&i.timeSlotCollectionCount())return i._timeSlotCollections[r].at(0)};return this.timeSlotCollectionCount()||(t=!0),this._verticalSlot(e,1,r,n)},leftSlot:function(e,t){return this._horizontalSlot(e,-1,t)},rightSlot:function(e,t){return this._horizontalSlot(e,1,t)},_horizontalSlot:function(e,t,n){var i,r=e.index,o=e.isDaySlot,a=e.collectionIndex,s=this._getCollections(o);return o=!n&&o,o?r+=t:a+=t,i=s[a],i?i.at(r):void 0},_verticalSlot:function(e,t,n,i){var r,o=e.index,a=e.isDaySlot,s=e.collectionIndex,l=this._getCollections(a);return(e=n(a,s,o))?e:(a=!i&&a,a?s+=t:o+=t,r=l[s],r?r.at(o):void 0)},_collection:function(e,t){var n=t?this._daySlotCollections:this._timeSlotCollections;return n[e]},_startSlot:function(e,t,n){var i,r=this._startCollection(e,t),o=!0;return r||(r=t[0],o=!1),i=r.slotByStartDate(e,n),i||(i=r.first(),o=!1),{slot:i,inRange:o}},_endSlot:function(e,t,n){var i,r=this._endCollection(e,t,n),o=!0;return r||(r=t[t.length-1],o=!1),i=r.slotByEndDate(e,n),i||(i=r.last(),o=!1),{slot:i,inRange:o}},getSlotCollection:function(e,t){return this[t?"getDaySlotCollection":"getTimeSlotCollection"](e)},getTimeSlotCollection:function(e){return this._timeSlotCollections[e]},getDaySlotCollection:function(e){return this._daySlotCollections[e]}}),M=x.Class.extend({init:function(t){e.extend(this,t)},innerHeight:function(){var e,t=this.collection,n=this.start.index,i=this.end.index,r=0;for(e=n;e<=i;e++)r+=t.at(e).offsetHeight;return r},events:function(){return this.collection.events()},addEvent:function(e){this.events().push(e)},startSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.end:this.start},endSlot:function(){return this.start.offsetLeft>this.end.offsetLeft?this.start:this.end}}),z=M.extend({innerHeight:function(){var e,t=this.collection,n=this.start.index,i=this.end.index,r=0;for(e=n;e<=i;e++)r+=t.at(e).offsetHeight;return r},outerRect:function(e,t,n){return this._rect("offset",e,t,n)},_rect:function(e,t,n,i){var r,o,a,s,l,d,u,c,h=this.start,p=this.end,f=x.support.isRtl(h.element);return"number"!=typeof t&&(t=x.date.toUtcTime(t)),"number"!=typeof n&&(n=x.date.toUtcTime(n)),i?(r=h.offsetTop,o=p.offsetTop+p[e+"Height"],f?(a=p.offsetLeft,s=h.offsetLeft+h[e+"Width"]):(a=h.offsetLeft,s=p.offsetLeft+p[e+"Width"])):(l=t-h.start,l<0&&(l=0),d=h.end-h.start,r=h.offsetTop+h[e+"Height"]*l/d,u=p.end-n,u<0&&(u=0),c=p.end-p.start,o=p.offsetTop+p[e+"Height"]-p[e+"Height"]*u/c,f?(a=Math.round(p.offsetLeft+p[e+"Width"]*u/c),s=Math.round(h.offsetLeft+h[e+"Width"]-h[e+"Width"]*l/d)):(a=Math.round(h.offsetLeft+h[e+"Width"]*l/d),s=Math.round(p.offsetLeft+p[e+"Width"]-p[e+"Width"]*u/c))),{top:r,bottom:o,left:0===a?a:a+1,right:s}},innerRect:function(e,t,n){return this._rect("client",e,t,n)}}),H=M.extend({innerWidth:function(){var e,t=this.collection,n=this.start.index,i=this.end.index,r=0,o=n!==i?"offsetWidth":"clientWidth";for(e=n;e<=i;e++)r+=t.at(e)[o];return r}}),N=x.Class.extend({init:function(e,t,n,i){this._slots=[],this._events=[],this._start=x.date.toUtcTime(e),this._end=x.date.toUtcTime(t),this._groupIndex=n,this._collectionIndex=i},refresh:function(){for(var e=0;e<this._slots.length;e++)this._slots[e].refresh()},startInRange:function(e){return this._start<=e&&e<this._end},endInRange:function(e,t){var n=t?e<this._end:e<=this._end;return this._start<=e&&n},slotByStartDate:function(e){var t,n,i=e;for("number"!=typeof i&&(i=x.date.toUtcTime(e)),t=0;t<this._slots.length;t++)if(n=this._slots[t],n.startInRange(i))return n;return null},slotByEndDate:function(e,t){var n,i,r=e;if("number"!=typeof r&&(r=x.date.toUtcTime(e)),t)return this.slotByStartDate(e,!1);for(n=0;n<this._slots.length;n++)if(i=this._slots[n],i.endInRange(r))return i;return null},count:function(){return this._slots.length},events:function(){return this._events},addTimeSlot:function(e,t,n,i){var r=new P(e,t,n,this._groupIndex,this._collectionIndex,this._slots.length,i);this._slots.push(r)},addDaySlot:function(e,t,n,i){var r=new L(e,t,n,this._groupIndex,this._collectionIndex,this._slots.length,i);this._slots.push(r)},first:function(){return this._slots[0]},last:function(){return this._slots[this._slots.length-1]},at:function(e){return this._slots[e]}}),B=x.Class.extend({init:function(e,t,n,i,r,o){this.element=e,this.clientWidth=e.clientWidth,this.clientHeight=e.clientHeight,this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.offsetTop=e.offsetTop,this.offsetLeft=e.offsetLeft,this.start=t,this.end=n,this.element=e,this.groupIndex=i,this.collectionIndex=r,this.index=o,this.isDaySlot=!1},refresh:function(){var e=this.element;this.clientWidth=e.clientWidth,this.clientHeight=e.clientHeight,this.offsetWidth=e.offsetWidth,this.offsetHeight=e.offsetHeight,this.offsetTop=e.offsetTop,this.offsetLeft=e.offsetLeft},startDate:function(){return x.timezone.toLocalDate(this.start)},endDate:function(){return x.timezone.toLocalDate(this.end)},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end},startOffset:function(){return this.start},endOffset:function(){return this.end}}),P=B.extend({init:function(e,t,n,i,r,o,a){B.fn.init.apply(this,arguments),this.isHorizontal=!!a},offsetX:function(e,t){return e?this.offsetLeft+t:this.offsetLeft+t},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end},startOffset:function(t,n,i){var r,o,a,s,l;if(i)return this.start;if(r=e(this.element).offset(),o=this.end-this.start,this.isHorizontal){if(l=x.support.isRtl(this.element),a=t-r.left,s=Math.floor(o*(a/this.offsetWidth)),l)return this.start+o-s}else a=n-r.top,s=Math.floor(o*(a/this.offsetHeight));return this.start+s},endOffset:function(t,n,i){var r,o,a,s,l;if(i)return this.end;if(r=e(this.element).offset(),o=this.end-this.start,this.isHorizontal){if(l=x.support.isRtl(this.element),a=t-r.left,s=Math.floor(o*(a/this.offsetWidth)),l)return this.start+o-s}else a=n-r.top,s=Math.floor(o*(a/this.offsetHeight));return this.start+s}}),L=B.extend({init:function(e,t,n,i,r,o,a){if(B.fn.init.apply(this,arguments),this.eventCount=a,this.isDaySlot=!0,this.element.children.length){var s=this.element.children[0];this.firstChildHeight=s.offsetHeight,this.firstChildTop=s.offsetTop}else this.firstChildHeight=3,this.firstChildTop=0},startDate:function(){var e=new Date(this.start);return x.timezone.apply(e,"Etc/UTC")},endDate:function(){var e=new Date(this.end);return x.timezone.apply(e,"Etc/UTC")},startInRange:function(e){return this.start<=e&&e<this.end},endInRange:function(e){return this.start<e&&e<=this.end}});x.ui.SchedulerView=S.extend({init:function(t,n){S.fn.init.call(this,t,n),this._normalizeOptions(),this._scrollbar=d(),this._isRtl=x.support.isRtl(t),this._resizeHint=e(),this._moveHint=e(),this._cellId=x.guid(),this._resourcesForGroups(),this._selectedSlots=[]},visibleEndDate:function(){return this.endDate()},_normalizeOptions:function(){var e=this.options;e.startTime&&e.startTime.setMilliseconds(0),e.endTime&&e.endTime.setMilliseconds(0),e.workDayStart&&e.workDayStart.setMilliseconds(0),e.workDayEnd&&e.workDayEnd.setMilliseconds(0)},_isMobile:function(){var e=this.options;return e.mobile===!0&&x.support.mobileOS||"phone"===e.mobile||"tablet"===e.mobile},_isMobilePhoneView:function(){var e=this.options;return e.mobile===!0&&x.support.mobileOS&&!x.support.mobileOS.tablet||"phone"===e.mobile},_addResourceView:function(){var e=new R(this.groups.length,this._isRtl);return this.groups.push(e),e},dateForTitle:function(){return x.format(this.options.selectedDateFormat,this.startDate(),this.endDate())},shortDateForTitle:function(){return x.format(this.options.selectedShortDateFormat,this.startDate(),this.endDate())},_changeGroup:function(e,t){var n=t?"prevGroupSlot":"nextGroupSlot",i=this[n](e.start,e.groupIndex,e.isAllDay);return i&&(e.groupIndex+=t?-1:1),this._isGroupedByDate()&&!i&&(e.groupIndex=t?this.groups.length-1:0),i},_changeDate:function(e,t,n){var i,r,o,a=this.groups[e.groupIndex];if(n){if(i=a._getCollections(!1),r=a.daySlotCollectionCount()?t.index-1:t.collectionIndex-1,r>=0)return i[r]._slots[i[r]._slots.length-1]}else if(i=a._getCollections(a.daySlotCollectionCount()),r=a.daySlotCollectionCount()?0:t.collectionIndex+1,o=a.daySlotCollectionCount()?t.collectionIndex+1:0,i[r]&&i[r]._slots[o])return i[r]._slots[o]},_changeGroupContinuously:function(){return null},_changeViewPeriod:function(){return!1},_isInRange:function(e,t){return!!(e&&t&&this.options.min&&this.options.max)&&(T(e)<=T(this.options.min)||T(t)>=T(this.options.max))},_horizontalSlots:function(e,t,n,i){var r,o,a,s=i?"leftSlot":"rightSlot",l={startSlot:t[0].start,endSlot:t[t.length-1].end},d=this.groups[e.groupIndex],u=this._isVerticallyGrouped();return n||(r=this._normalizeHorizontalSelection(e,t,i),r&&(l.startSlot=l.endSlot=r)),this._isGroupedByDate()&&!n?(o=this._changeGroup(e,i),o?l.startSlot=l.endSlot=o:l=this._getNextHorizontalRange(d,s,l)):(l.startSlot=d[s](l.startSlot),l.endSlot=d[s](l.endSlot),n||u||l.startSlot&&l.endSlot||(l.startSlot=l.endSlot=this._changeGroup(e,i))),l.startSlot&&l.endSlot||this._isGroupedByDate()||(a=this._continuousSlot(e,t,i),a=this._changeGroupContinuously(e,a,n,i),a&&(l.startSlot=l.endSlot=a)),l},_getNextHorizontalRange:function(e,t,n){return this._isVerticallyGrouped()||(n.startSlot=e[t](n.startSlot),n.endSlot=e[t](n.endSlot)),n},_verticalSlots:function(e,t,n,i){var r,o,a=this.groups[e.groupIndex],s={startSlot:t[0].start,endSlot:t[t.length-1].end};return n||(r=this._normalizeVerticalSelection(e,t,i),r&&(s.startSlot=s.endSlot=r)),o=i?"upSlot":"downSlot",s=this._getNextVerticalRange(a,o,s,n),n||!this._isVerticallyGrouped()||s.startSlot&&s.endSlot||(s.startSlot=s.endSlot=this._isGroupedByDate()?this._changeDate(e,r,i):this._changeGroup(e,i)),s},_getNextVerticalRange:function(e,t,n,i){return n.startSlot=e[t](n.startSlot,i),n.endSlot=e[t](n.endSlot,i),n},_normalizeHorizontalSelection:function(){return null},_normalizeVerticalSelection:function(e,t,n){var i;return i=n?t[0].start:t[t.length-1].end},_continuousSlot:function(){return null},constrainSelection:function(e){var t,n=this.groups[0];this.inRange(e)?n.daySlotCollectionCount()?n.timeSlotCollectionCount()||(e.isAllDay=!0):e.isAllDay=!1:(t=n.firstSlot(),e.isAllDay=t.isDaySlot,e.start=t.startDate(),e.end=t.endDate()),this.groups[e.groupIndex]||(e.groupIndex=0)},move:function(e,t,n){var i,r,o,a,s,l,d=!1,u=this.groups[e.groupIndex],c=this._isGroupedByDate()&&this._isVerticallyGrouped();if(u.timeSlotCollectionCount()||(e.isAllDay=!0),i=u.ranges(e.start,e.end,e.isAllDay,!1),t===F.DOWN||t===F.UP){if(d=!0,a=t===F.UP,this._updateDirection(e,i,n,a,!0),s=this._verticalSlots(e,i,n,a),!s.startSlot&&!n&&this._changeViewPeriod(e,a,!c))return d}else if((t===F.LEFT||t===F.RIGHT)&&(d=!0,a=t===F.LEFT,this._updateDirection(e,i,n,a,!1),s=this._horizontalSlots(e,i,n,a),!s.startSlot&&!n&&this._changeViewPeriod(e,a,c)))return d;return d&&(r=s.startSlot,o=s.endSlot,n?(l=e.backward,l&&r?e.start=r.startDate():!l&&o&&(e.end=o.endDate())):r&&o&&(e.isAllDay=r.isDaySlot,e.start=r.startDate(),e.end=o.endDate()),e.events=[]),d},moveToEventInGroup:function(t,n,i,r){var o,a,s,l,d=t._continuousEvents||[],u=r?-1:1,c=d.length,h=r?c-1:0;if(i.length)for(s=i[i.length-1],l=0;l<d.length;l++)d[l].uid===s&&(h=l+u);for(;h<c&&h>-1;){if(a=d[h],(!r&&a.start.startDate()>=n.startDate()||r&&a.start.startDate()<=n.startDate())&&a&&e.inArray(a.uid,i)===-1){o=!!a;break}h+=u}return a},moveToEvent:function(e,t){var n,i,r,o,a,s,l=e.groupIndex,d=this.groups[l],u=d.ranges(e.start,e.end,e.isAllDay,!1)[0].start,c=this.groups.length,h=t?-1:1,p=e.events;if(this._isGroupedByDate())if(i=this._getAllEvents(),r=this._getUniqueEvents(i),o=this._getSortedEvents(r),0===p.length)a=this._getNextEventIndexBySlot(u,o,l),t&&a--,n=o[a];else for(s=this._getStartIdx(p,o);s<o.length&&s>-1&&(p.length>0&&(u=this._getSelectedSlot(u,o,n,s,h,t)),u);){if((!t&&o[s].start.startDate()>=u.startDate()||t&&o[s].start.startDate()<=u.startDate())&&p[0]!=o[s].uid){n=o[s];break}s+=h}else for(;l<c&&l>-1&&(n=this.moveToEventInGroup(d,u,p,t),l+=h,d=this.groups[l],d&&!n);)p=[],u=t?d.lastSlot():d.firstSlot(!0);return n&&(e.events=[n.uid],e.start=n.start.startDate(),e.end=n.end.endDate(),e.isAllDay=n.start.isDaySlot,e.groupIndex=n.start.groupIndex),!!n},current:function(e){return void 0===e?this._current:(this._current=e,void(this.content.has(e)&&this._scrollTo(e,this.content[0])))},select:function(e){this.clearSelection(),this._selectEvents(e)||this._selectSlots(e)},_getNextEventIndexBySlot:function(e,t,n){var i,r,o=0,a=x.date.getDate(e.startDate());for(i=0;i<t.length;i++)if(r=x.date.getDate(t[i].start.startDate()),a>r)o++;else if(a.getTime()===r.getTime()&&n>t[i].start.groupIndex)o++;else{if(!(a.getTime()===r.getTime()&&n>=t[i].start.groupIndex&&e.startDate()>t[i].start.startDate()))break;o++}return o},_getSelectedSlot:function(e,t,n,i,r,o){var a,s;return t[i+r]&&t[i].start.groupIndex!==t[i+r].start.groupIndex&&(a=t[i+r].start.groupIndex,s=this.groups[a],s&&!n||(e=null),e=o?s.lastSlot():s.firstSlot(!0)),e},_getStartIdx:function(t,n){var i=0;return e.each(n,function(){return this.uid!==t[0]&&void i++}),i},_getAllEvents:function(){var e,t=[],n=this.groups;for(e=0;e<n.length;e++)n[e]._continuousEvents&&(t=t.concat(n[e]._continuousEvents));return t},_getUniqueEvents:function(e){var t,n,i,r=[];for(t=0;t<e.length;t++){for(n=!1,i=0;i<r.length;i++)if(e[t].uid===r[i].uid){n=!0;break}n||r.push(e[t])}return r},_getSortedEvents:function(t){return t.sort(function(t,n){var i=t.start.startDate(),r=n.start.startDate(),o=x.date.getDate(i)-x.date.getDate(r);return 0===o&&(o=t.start.groupIndex-n.start.groupIndex),0===o&&(o=i.getTime()-r.getTime()),0===o&&(t.start.isDaySlot&&!n.start.isDaySlot&&(o=-1),!t.start.isDaySlot&&n.start.isDaySlot&&(o=1)),0===o&&(o=e(t.element).index()-e(n.element).index()),o})},_selectSlots:function(e){var t,n,i,r,o,a,s,l=e.isAllDay,d=this.groups[e.groupIndex];for(d.timeSlotCollectionCount()||(l=!0),this._selectedSlots=[],t=d.ranges(e.start,e.end,l,!1),r=0;r<t.length;r++)for(o=t[r],a=o.collection,s=o.start.index;s<=o.end.index;s++)i=a.at(s),n=i.element,n.setAttribute("aria-selected",!0),b(n),this._selectedSlots.push({start:i.startDate(),end:i.endDate(),element:n});e.backward&&(n=t[0].start.element),this.current(n)},_selectEvents:function(t){var n,i,r,o=!1,a=t.events,s=this._getAllEvents(),l=s.length,d=[];if(!a[0]||!s[0])return o;for(r=e(),t.events=[],n=0;n<l;n++)e.inArray(s[n].uid,a)>-1&&(i=s[n],r=r.add(i.element),t.events.indexOf(i.uid)===-1?t.events.push(i.uid):d.indexOf(i.uid)===-1&&d.push(i.uid));return r[0]&&(r.addClass("k-state-selected").attr("aria-selected",!0),d.indexOf(r.last().attr("data-uid"))===-1&&this.current(r.last()[0]),this._selectedSlots=[],o=!0),o},inRange:function(e){var t=this.startDate(),n=x.date.addDays(this.endDate(),1),i=e.start,r=e.end;return t<=i&&i<n&&t<r&&r<=n},_resourceValue:function(e,t){return e.valuePrimitive&&(t=x.getter(e.dataValueField)(t)),t},_resourceBySlot:function(e){var t,n,i,r,o,a=this.groupedResources,s={};if(a.length)for(t=e.groupIndex,n=a.length-1;n>=0;n--)i=a[n],r=this._resourceValue(i,i.dataSource.view()[t%i.dataSource.total()]),i.multiple&&(r=[r]),o=x.setter(i.field),o(s,r),t=Math.floor(t/i.dataSource.total());return s},_createResizeHint:function(t,n,i,r){return e(I).css({left:t,top:n,width:i,height:r})},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=e()},_removeMoveHint:function(t){t?(this._moveHint.filter("[data-uid='"+t+"']").remove(),this._moveHint=this._moveHint.filter("[data-uid!='"+t+"']")):(this._moveHint.remove(),this._moveHint=e())},_scrollTo:function(e,t){var n=e.offsetTop,i=e.offsetHeight,r=t.scrollTop,o=t.clientHeight,a=n+i,s=0;s=r>n?n:a>r+o?i<=o?a-o:n:r,t.scrollTop=s},_shouldInverseResourceColor:function(e){var t=new w(e.color).isDark(),n=this.element.css("color"),i=new w(n).isDark();return t==i},_eventTmpl:function(t,n){var i,r=this.options,o=e.extend({},x.Template,r.templateSettings),a=o.paramName,s="",l=typeof t,d={storage:{},count:0};return"function"===l?(d.storage["tmpl"+d.count]=t,s+="#=this.tmpl"+d.count+"("+a+")#",d.count++):"string"===l&&(s+=t),i=x.template(x.format(n,s),o),d.count>0&&(i=e.proxy(i,d.storage)),i},eventResources:function(e){var t,n,i,r,o,a,s,l,d,u,c=[],h=this.options;if(!h.resources)return c;for(t=0;t<h.resources.length;t++)if(n=h.resources[t],i=n.field,r=x.getter(i)(e),null!=r)for(n.multiple||(r=[r]),o=n.dataSource.view(),a=0;a<r.length;a++){for(s=null,l=r[a],n.valuePrimitive||(l=x.getter(n.dataValueField)(l)),d=0;d<o.length;d++)if(o[d].get(n.dataValueField)==l){s=o[d];break}null!==s&&(u=x.getter(n.dataColorField)(s),c.push({field:n.field,title:n.title,name:n.name,text:x.getter(n.dataTextField)(s),value:l,color:u}))}return c},createLayout:function(i){var r,o,a,s,l,d=-1;for(i.rows||(i.rows=[]),r=0;r<i.rows.length;r++)if(i.rows[r].allDay){d=r;break}o=i.rows[d],d>=0&&i.rows.splice(d,1),a=this.columnLevels=t(i,"columns"),s=this.rowLevels=t(i,"rows"),this.table=e("<table "+n()+' class="k-scheduler-layout k-scheduler-'+this.name+'view"><tbody></tbody></table>'),l=s[s.length-1].length,this.table.find("tbody:first").append(this._topSection(a,o,l)),this.table.find("tbody:first").append(this._bottomSection(a,s,l)),this.element.append(this.table),this._scroller()},refreshLayout:function(){var t,n,i,r,o,a,s=this,l=s.element.find(">.k-scheduler-toolbar"),d=s.element.innerHeight(),u=this._scrollbar,c=0,h=this._isRtl?"left":"right";for(t=0;t<l.length;t++)d-=D(l.eq(t));s.datesHeader&&(c=D(s.datesHeader)),s.timesHeader&&D(s.timesHeader)>c&&(c=D(s.timesHeader)),s.datesHeader&&s.timesHeader&&(n=s.datesHeader.find("table:first tr"),s.timesHeader.find("tr").height(function(t){e(this).height(n.eq(t).height())})),c&&(d-=c),s.footer&&(d-=D(s.footer)),i=function(e){var t,n;return!!e[0].style.height||(t=e.height(),e.height("auto"),n=e.height(),t!=n?(e.height(""),!0):(e.height(""),!1))},r=s.content[0],o=x.support.kineticScrollNeeded?0:u,i(s.element)&&(s.content.height(d>2*u?d:2*u+1),s.times.height(r.clientHeight),a=s.times.find("table"),a.length&&a.height(s.content.find("table")[0].clientHeight)),r.offsetWidth-r.clientWidth>0?(s.table.addClass("k-scrollbar-v"),s.datesHeader.css("padding-"+h,o-parseInt(s.datesHeader.children().css("border-"+h+"-width"),10))):s.datesHeader.css("padding-"+h,""),r.offsetHeight-r.clientHeight>0||r.clientHeight>s.content.children(".k-scheduler-table").height()?s.table.addClass("k-scrollbar-h"):s.table.removeClass("k-scrollbar-h")},_topSection:function(t,n,i){this.timesHeader=o(t.length,n,i);var r=t[t.length-1].length;return this.datesHeader=a(t,r,n),e("<tr>").append(this.timesHeader.add(this.datesHeader).wrap("<td>").parent())},_bottomSection:function(t,n,i){return this.times=s(n,i),this.content=l(t[t.length-1],n[n.length-1]),e("<tr>").append(this.times.add(this.content).wrap("<td>").parent())},_scroller:function(){var t,n=this;this.content.bind("scroll"+E,function(){n.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(this.scrollLeft),n.times.scrollTop(this.scrollTop)}),t=x.touchScroller(this.content,{avoidScrolling:function(t){return e(t.event.target).closest(".k-event.k-event-active").length>0}}),t&&t.movable&&(this._touchScroller=t,this.content=t.scrollElement,t.movable.bind("change",function(e){n.datesHeader.find(">.k-scheduler-header-wrap").scrollLeft(-e.sender.x),n.times.scrollTop(-e.sender.y)}))},_resourcesForGroups:function(){var e,t,n,i,r=[],o=this.options.group,a=this.options.resources;if(o=o&&o.resources?o.resources:[],a&&o.length)for(e=0,t=a.length;e<t;e++)for(n=0,i=o.length;n<i;n++)a[e].name===o[n]&&r.push(a[e]);this.groupedResources=r},_createDateLayout:function(e,t,n){return g("rows",e,t,n)},_createColumnsLayout:function(e,t,n,i,r){return v("columns",e,t,n,i,r)},_groupOrientation:function(){var e=this.options.group;return e&&e.resources?e.orientation:"horizontal"},_isGroupedByDate:function(){return this.options.group&&this.options.group.date},_isVerticallyGrouped:function(){return this.groupedResources.length&&"vertical"===this._groupOrientation()},_createRowsLayout:function(e,t,n,i){return v("rows",e,t,n,i)},selectionByElement:function(){return null},clearSelection:function(){this.content.find(".k-state-selected").removeAttr("id").attr("aria-selected",!1).removeClass("k-state-selected")},destroy:function(){var e=this;S.fn.destroy.call(this),e.table&&(x.destroy(e.table),e.table.remove()),e.groups=null,e.table=null,e.content=null,e.times=null,e.datesHeader=null,e.timesHeader=null,e.footer=null,e._resizeHint=null,e._moveHint=null},calendarInfo:function(){return x.getCulture().calendars.standard},prevGroupSlot:function(e,t,n){var i,r=this.groups[t],o=r.ranges(e,e,n,!1)[0].start;if(!(t<=0))return this._isGroupedByDate()?o:this._isVerticallyGrouped()?r.timeSlotCollectionCount()?(i=r._collection(n?o.index:o.collectionIndex,!1),i.last()):(i=r._collection(r.daySlotCollectionCount()-1,!0),i.at(o.index)):r.timeSlotCollectionCount()?(i=r._collection(n?0:r.timeSlotCollectionCount()-1,n),n?i.last():i.at(o.index)):(i=r._collection(o.collectionIndex,!0),i.last())},nextGroupSlot:function(e,t,n){var i,r,o=this.groups[t],a=o.ranges(e,e,n,!1)[0].start;if(!(t>=this.groups.length-1))return this._isGroupedByDate()?a:this._isVerticallyGrouped()?o.timeSlotCollectionCount()?(r=o.daySlotCollectionCount(),i=o._collection(r?0:a.collectionIndex,r),n?i.first():i.at(a.collectionIndex)):(i=o._collection(0,!0),i.at(a.index)):o.timeSlotCollectionCount()?(i=o._collection(0,n),n?i.first():i.at(a.index)):(i=o._collection(a.collectionIndex,!0),i.first())},_eventOptionsForMove:function(){return{}},_updateEventForResize:function(){},_updateEventForSelection:function(e){return e}}),w=function(e){var t,n,i,r,o,a=this,s=w.formats;if(1===arguments.length)for(e=a.resolveColor(e),r=0;r<s.length;r++)t=s[r].re,
n=s[r].process,i=t.exec(e),i&&(o=n(i),a.r=o[0],a.g=o[1],a.b=o[2]);else a.r=arguments[0],a.g=arguments[1],a.b=arguments[2];a.r=a.normalizeByte(a.r),a.g=a.normalizeByte(a.g),a.b=a.normalizeByte(a.b)},w.prototype={resolveColor:function(e){return e=e||"#000","#"==e.charAt(0)&&(e=e.substr(1,6)),e=e.replace(/ /g,""),e=e.toLowerCase(),e=w.namedColors[e]||e},normalizeByte:function(e){return e<0||isNaN(e)?0:e>255?255:e},percBrightness:function(){var e=this;return A.sqrt(.241*e.r*e.r+.691*e.g*e.g+.068*e.b*e.b)},isDark:function(){var e=this,t=e.percBrightness();return t<180}},w.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)]}}],w.namedColors={aqua:"00ffff",azure:"f0ffff",beige:"f5f5dc",black:"000000",blue:"0000ff",brown:"a52a2a",coral:"ff7f50",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgray:"a9a9a9",darkgreen:"006400",darkorange:"ff8c00",darkred:"8b0000",dimgray:"696969",fuchsia:"ff00ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lightblue:"add8e6",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumblue:"0000cd",navy:"000080",olive:"808000",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",pink:"ffc0cb",plum:"dda0dd",purple:"800080",red:"ff0000",royalblue:"4169e1",salmon:"fa8072",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",steelblue:"4682b4",tan:"d2b48c",teal:"008080",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},y=/\s*k-state-selected/,e.extend(C.SchedulerView,{createColumns:p,createRows:f,rangeIndex:c,collidingEvents:u,groupEqFilter:_})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.dayview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e,t){function n(e){var t=new Date(1980,1,1,0,0,0);return u(t,y(e)),t}function i(e,t,n){return e>=t&&e<=n}function r(e,t,n,i){return i=i?e<=n:e<n,e>t&&i}function o(e,t,n,i){var r,o=e._continuousEvents,a=o[o.length-1],l=g(t.start.startDate()).getTime();if(i&&a&&g(a.start.startDate()).getTime()==l){for(r=o.length-1;r>-1&&!(o[r].isAllDay||g(o[r].start.startDate()).getTime()<l);r--);o.splice(r+1,0,{element:n,isAllDay:!0,uid:n.attr(s.attr("uid")),start:t.start,end:t.end})}else o.push({element:n,isAllDay:i,uid:n.attr(s.attr("uid")),start:t.start,end:t.end})}function a(e){var t=[],n=e.workWeekStart%7,i=Math.abs(e.workWeekEnd%7);for(t.push(n);i!=n;)n>6?n-=7:n++,t.push(n);return t}var s=window.kendo,l=s.ui,d=s.support.browser,u=s.date.setTime,c=l.SchedulerView,h=s._outerWidth,p=s._outerHeight,f=e.extend,m=e.proxy,g=s.date.getDate,v=s.date.MS_PER_MINUTE,_=s.date.MS_PER_DAY,b="k-current-time",k="k-current-time-arrow",w=.8666,y=s.date.getMilliseconds,x=".kendoMultiDayView",C=s.template('<div title="(#=kendo.format("{0:t} - {1:t}", start, end)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),T=s.template('<div title="(#=kendo.format("{0:t}", start)#): #=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">${title}</div></div>'),S=s.template("<span class='k-link k-nav-day'>#=kendo.toString(date, 'ddd M/dd')#</span>"),D='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !singleDay && !data.tail && !data.middle){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !singleDay && !data.head && !data.middle){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',F='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#" #if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</span><span class="k-event-top-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-up"></span># } #</span><span class="k-event-bottom-actions"># if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-down"></span># } #</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-n"></span># } ## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-s"></span># } #</div>',E=c.extend({init:function(e,t){var n=this;c.fn.init.call(n,e,t),n.title=n.options.title||n.options.name,n._workDays=a(n.options),n._templates(),n._editable(),n.calculateDateRange(),n._groups(),n._currentTime(!0)},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var n,i,r,o,a,l,u,c,f,m,g,v,_,y,x,C,T=this.options;for(T.currentTimeMarker.useLocalTimezone===!1&&(n=T.dataSource.options.schema.timezone,T.dataSource&&n&&(i=s.timezone.offset(t,n),t=s.timezone.convert(t,t.getTimezoneOffset(),i))),this.times.find("."+b).remove(),this.content.find("."+b).remove(),r=T.group&&"horizontal"!=T.group.orientation?this.groups.length:1,o=this.times.find("tr:first th:first"),a=this.times.find("tr:first th:last"),l=0;l<r;l++){if(u=this.groups[l],!u)return;if(c=s.date.toUtcTime(t),f=u.timeSlotRanges(c,c+1),0===f.length)return;m=f[0].collection,g=m.slotByStartDate(t),g&&(v="<div class='"+b+"'></div>",_=e(v).prependTo(this.times),y=Math.round(f[0].innerRect(t,new Date(t.getTime()+1),!1).top),x={},C=this.content[0].scrollWidth,(d.msie||d.edge)&&(C-=1),this._isRtl?(x.right=o.position().left+p(o)-p(a),_.addClass(k+"-left")):(x.left=a.position().left,_.addClass(k+"-right")),x.top=y-h(_)*w/2,_.css(x),e(v).prependTo(this.content).css({top:y,height:"1px",right:0,width:C,left:0}))}},_currentTime:function(e){var n=this,i=n.options.currentTimeMarker;i!==!1&&i.updateInterval!==t&&(n._currentTimeMarkerUpdater(),e&&(n._currentTimeUpdateTimer=setInterval(m(this._currentTimeMarkerUpdater,n),i.updateInterval)))},_updateResizeHint:function(e,t,n,i){var r,o,a,l,d,u,h,p,f,m,g,v,_=e.isMultiDay(),b=this.groups[t],k=b.ranges(n,i,_,e.isAllDay);for(this._removeResizeHint(),d=0;d<k.length;d++)if(u=k[d],h=u.startSlot(),this._isGroupedByDate()&&_)for(p=h.index;p<=u.end.index;p++)f=u.collection._slots[p],r=f.offsetWidth,o=f.clientHeight,a=f.offsetTop,l=c.fn._createResizeHint.call(this,f.offsetLeft,a,r,o),this._resizeHint=this._resizeHint.add(l);else r=h.offsetWidth,o=h.clientHeight,a=h.offsetTop,_?r=u.innerWidth():(m=u.outerRect(n,i,this.options.snap),a=m.top,o=m.bottom-m.top),l=c.fn._createResizeHint.call(this,h.offsetLeft,a,r,o),this._resizeHint=this._resizeHint.add(l);g="t",v=this.content,_&&(g="M/dd",v=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),v.length||(v=this.content)),this._resizeHint.appendTo(v),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(s.toString(s.timezone.toLocalDate(n),g)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(s.toString(s.timezone.toLocalDate(i),g))},_updateMoveHint:function(t,n,i){var r,o,a,l,d,u,c,h,p,f,m=t.isMultiDay(),g=this.groups[n],v=s.date.toUtcTime(t.start)+i,_=v+t.duration(),b=g.ranges(v,_,m,t.isAllDay);for(v=s.timezone.toLocalDate(v),_=s.timezone.toLocalDate(_),this._removeMoveHint(t.uid),!m&&(0===y(_)||y(_)<y(this.startTime()))&&b.length>1&&b.pop(),r=e(),o=0;o<b.length;o++)if(a=b[o],l=a.start,u={left:l.offsetLeft+2,top:l.offsetTop},this._isGroupedByDate()&&m)for(c=l.index;c<=a.end.index;c++)h=a.collection._slots[c],u.left=this._isRtl?.1*h.clientWidth+h.offsetLeft+2:h.offsetLeft+2,u.height=h.offsetHeight,u.width=.9*h.clientWidth-4,d=this._createEventElement(t.clone({start:v,end:_}),!m),this._appendMoveHint(d,u),r=r.add(d);else this._isRtl&&(u.left=.1*l.clientWidth+l.offsetLeft+2),m?u.width=a.innerWidth()-4:(p=a.outerRect(v,_,this.options.snap),u.top=p.top,u.height=p.bottom-p.top,u.width=.9*l.clientWidth-4),d=this._createEventElement(t.clone({start:v,end:_}),!m),this._appendMoveHint(d,u),r=r.add(d);f=this.content,m&&(f=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day) > div"),f.length||(f=this.content)),r.appendTo(f)},_appendMoveHint:function(e,t){e.addClass("k-event-drag-hint"),e.css(t),this._moveHint=this._moveHint.add(e)},_slotByPosition:function(e,t){var n,i,r,o;for(this._isVerticallyGrouped()?(i=this.content.offset(),t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft):i=this.element.find(".k-scheduler-header-wrap:has(.k-scheduler-header-all-day)").find(">div").offset(),i&&(e-=i.left,t-=i.top),e=Math.ceil(e),t=Math.ceil(t),o=0;o<this.groups.length;o++)if(r=this.groups[o],n=r.daySlotByPosition(e,t,this._isGroupedByDate()))return n;for(i&&(e+=i.left,t+=i.top),i=this.content.offset(),e-=i.left,t-=i.top,this._isVerticallyGrouped()||(t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft),e=Math.ceil(e),t=Math.ceil(t),o=0;o<this.groups.length;o++)if(r=this.groups[o],n=r.timeSlotByPosition(e,t))return n;return null},_groupCount:function(){var e=this.groupedResources,t=this._isGroupedByDate();return e.length?"vertical"===this._groupOrientation()?t?this._columnCountForLevel(e.length-1):this._rowCountForLevel(e.length-1):t?this._columnCountForLevel(e.length)/this._columnCountForLevel(0):this._columnCountForLevel(e.length)/this._columnOffsetForResource(e.length):1},_columnCountInResourceView:function(){var e=this.groupedResources,t=this._isGroupedByDate();return!e.length||this._isVerticallyGrouped()?t?this._rowCountForLevel(0):this._columnCountForLevel(0):t?this._columnCountForLevel(0):this._columnOffsetForResource(e.length)},_timeSlotGroups:function(e,t){var n,i,r,o,a,s,l,d,u,c,h=this._timeSlotInterval(),p=e,f=this._isGroupedByDate(),m=this.content.find("tr:not(.k-scheduler-header-all-day)");for(m.attr("role","row"),a=m.length,this._isVerticallyGrouped()&&(f&&(p=t),a=Math.floor(a/p)),s=0;s<p;s++)for(l=0,d=0,this._isVerticallyGrouped()?l=s:d=s,r=l*a;r<(l+1)*a;){if(u=m[r].children,r%a===0&&(i=y(new Date((+this.startTime())))),c=0,f)if(this._isVerticallyGrouped())for(o=0;o<e;o++)n=this.groups[o],this._addTimeSlotGroup(n,u,o,i,h,s);else for(n=this.groups[s],o=d;o<e*t;o+=e)this._addTimeSlotGroup(n,u,o,i,h,c),c++;else for(n=this.groups[s],o=d*t;o<(d+1)*t;o++)this._addTimeSlotGroup(n,u,o,i,h,c),c++;i+=h,r++}},_addTimeSlotGroup:function(e,t,n,i,r,o){var a,s,l,d=t[n],u=e.getTimeSlotCollection(o),c=this._dates[o];c&&(a=Date.UTC(c.getFullYear(),c.getMonth(),c.getDate()),s=a+i,l=s+r,d.setAttribute("role","gridcell"),d.setAttribute("aria-selected",!1),u.addTimeSlot(d,s,l))},_addDaySlotGroup:function(e,t,n,i,r){var o,a=t[n],l=this._dates[r];l&&(o=Date.UTC(l.getFullYear(),l.getMonth(),l.getDate()),a.setAttribute("role","gridcell"),a.setAttribute("aria-selected",!1),e.addDaySlot(a,o,o+s.date.MS_PER_DAY))},_daySlotGroups:function(e,t){var n,i,r,o,a,s,l,d,u,c=e,h=this._isGroupedByDate();for(this._isVerticallyGrouped()?(h&&(c=t),n=this.element.find(".k-scheduler-header-all-day")):n=this.element.find(".k-scheduler-header-all-day tr"),n.attr("role","row"),r=0;r<c;r++)if(o=0,this._isVerticallyGrouped()&&(o=r),l=n[o].children,d=0,this._isVerticallyGrouped()||(d=r),u=0,h)if(this._isVerticallyGrouped())for(i=0;i<e;i++)a=this.groups[i],s=a.getDaySlotCollection(0),this._addDaySlotGroup(s,l,i,t,r);else for(a=this.groups[r],s=a.getDaySlotCollection(0),i=d;i<e*t;i+=e)this._addDaySlotGroup(s,l,i,t,u),u++;else for(a=this.groups[r],s=a.getDaySlotCollection(0),i=d*t;i<(d+1)*t;i++)this._addDaySlotGroup(s,l,i,t,u),u++},_groups:function(){var e,t,n,i=this._groupCount(),r=this._columnCountInResourceView();for(this.groups=[],e=0;e<i;e++){for(t=this._addResourceView(e),n=0;n<r;n++)this._dates[n]&&t.addTimeSlotCollection(this._dates[n],s.date.addDays(this._dates[n],1));this.options.allDaySlot&&t.addDaySlotCollection(this._dates[0],s.date.addDays(this._dates[this._dates.length-1],1))}this._timeSlotGroups(i,r),this.options.allDaySlot&&this._daySlotGroups(i,r)},options:{name:"MultiDayView",selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}",allDaySlot:!0,showWorkHours:!1,title:"",startTime:s.date.today(),endTime:s.date.today(),minorTickCount:2,majorTick:60,majorTimeHeaderTemplate:"#=kendo.toString(date, 't')#",minorTimeHeaderTemplate:"&\\#8203;",groupHeaderTemplate:"#=text#",slotTemplate:"&nbsp;",allDaySlotTemplate:"&nbsp;",eventTemplate:C,allDayEventTemplate:T,dateHeaderTemplate:S,editable:!0,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,footer:{command:"workDay"},messages:{allDay:"all day",showFullDay:"Show full day",showWorkDay:"Show business hours"},currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0}},events:["remove","add","edit"],_templates:function(){var e=this.options,t=f({},s.Template,e.templateSettings);this.eventTemplate=this._eventTmpl(e.eventTemplate,F),this.allDayEventTemplate=this._eventTmpl(e.allDayEventTemplate,D),this.majorTimeHeaderTemplate=s.template(e.majorTimeHeaderTemplate,t),this.minorTimeHeaderTemplate=s.template(e.minorTimeHeaderTemplate,t),this.dateHeaderTemplate=s.template(e.dateHeaderTemplate,t),this.slotTemplate=s.template(e.slotTemplate,t),this.allDaySlotTemplate=s.template(e.allDaySlotTemplate,t),this.groupHeaderTemplate=s.template(e.groupHeaderTemplate,t)},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+x,".k-event a:has(.k-i-close)",function(n){t.trigger("remove",{uid:e(this).closest(".k-event").attr(s.attr("uid"))}),n.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+x,".k-scheduler-content td",function(n){var i,r;e(this).parent().hasClass("k-scheduler-header-all-day")||(i=t._slotByPosition(n.pageX,n.pageY),i&&(r=t._resourceBySlot(i),t.trigger("add",{eventInfo:f({start:i.startDate(),end:i.endDate()},r)})),n.preventDefault())}).on("dblclick"+x,".k-scheduler-header-all-day td",function(e){var n,i=t._slotByPosition(e.pageX,e.pageY);i&&(n=t._resourceBySlot(i),t.trigger("add",{eventInfo:f({},{isAllDay:!0,start:s.date.getDate(i.startDate()),end:s.date.getDate(i.startDate())},n)})),e.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+x,".k-event",function(n){t.trigger("edit",{uid:e(this).closest(".k-event").attr(s.attr("uid"))}),n.preventDefault()})},_touchEditable:function(){var n=this,i=0;s.support.mobileOS.android&&(i=5),n.options.editable.create!==!1&&(n._addUserEvents=new s.UserEvents(n.element,{threshold:i,filter:".k-scheduler-content td",tap:function(i){var r,o,a,s;e(i.target).parent().hasClass("k-scheduler-header-all-day")||(r=i.x.location!==t?i.x.location:i.x,o=i.y.location!==t?i.y.location:i.y,a=n._slotByPosition(r,o),a&&(s=n._resourceBySlot(a),n.trigger("add",{eventInfo:f({start:a.startDate(),end:a.endDate()},s)})),i.preventDefault())}}),n._allDayUserEvents=new s.UserEvents(n.element,{threshold:i,filter:".k-scheduler-header-all-day td",tap:function(e){var i,r=e.x.location!==t?e.x.location:e.x,o=e.y.location!==t?e.y.location:e.y,a=n._slotByPosition(r,o);a&&(i=n._resourceBySlot(a),n.trigger("add",{eventInfo:f({},{isAllDay:!0,start:s.date.getDate(a.startDate()),end:s.date.getDate(a.startDate())},i)})),e.preventDefault()}})),n.options.editable.update!==!1&&(n._editUserEvents=new s.UserEvents(n.element,{threshold:i,filter:".k-event",tap:function(t){var i=e(t.target).closest(".k-event");i.hasClass("k-event-active")||n.trigger("edit",{uid:i.attr(s.attr("uid"))}),t.preventDefault()}}))},_layout:function(e){var t,n,i,r=[],o=[],a=this.options,l=this,d=l._isGroupedByDate();for(t=0;t<e.length;t++)n={},n.text=l.dateHeaderTemplate({date:e[t]}),s.date.isToday(e[t])&&(n.className="k-today"),r.push(n);return i=this.groupedResources,a.allDaySlot&&o.push({text:a.messages.allDay,allDay:!0,cellContent:function(t){var n=t;return t=i.length&&"vertical"!==l._groupOrientation()?t%e.length:t,l.allDaySlotTemplate({date:e[t],resources:function(){return l._resourceBySlot({groupIndex:n})}})}}),this._forTimeRange(this.startTime(),this.endTime(),function(e,t,n,i){var r=t?l.majorTimeHeaderTemplate:l.minorTimeHeaderTemplate,a={text:r({date:e}),className:i?"k-slot-cell":""};o.push(a)}),i.length&&("vertical"===this._groupOrientation()?d?(o=this._createDateLayout(r,o),r=this._createColumnsLayout(i,null,this.groupHeaderTemplate)):o=this._createRowsLayout(i,o,this.groupHeaderTemplate):r=d?this._createColumnsLayout(i,r,this.groupHeaderTemplate,r):this._createColumnsLayout(i,r,this.groupHeaderTemplate)),{columns:r,rows:o}},_footer:function(){var t,n,i,r=this.options;r.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',n=r.footer.command,n&&"workDay"===n?(t+='<ul class="k-reset k-header">',t+='<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>',t+=(r.showWorkHours?r.messages.showFullDay:r.messages.showWorkDay)+"</a></li>",t+="</ul>"):t+="&nbsp;",t+="</div>",this.footer=e(t).appendTo(this.element),i=this,this.footer.on("click"+x,".k-scheduler-fullday",function(e){e.preventDefault(),i.trigger("navigate",{view:i.name||r.name,date:r.date,isWorkDay:!r.showWorkHours})}))},_forTimeRange:function(e,t,i,r){var o,a,s,l,d,c,h,p,f,m,g,b,k,w,x,C;for(e=n(e),t=n(t),o=this,a=y(e),s=y(t),l=o.options.minorTickCount,d=o.options.majorTick*v,c=d/l||1,h=new Date((+e)),p=h.getDate(),m=0,b="",g=_/c,a!=s&&(a>s&&(s+=_),g=(s-a)/c),g=Math.round(g);m<g;m++)k=m%(d/c),w=0===k,x=k<l-1,C=k===l-1,b+=i(h,w,x,C),u(h,c,!1);return s&&(f=y(h),p<h.getDate()&&(f+=_),f>s&&(h=new Date((+t)))),r&&(b+=r(h)),b},_content:function(e){var t,n,i,r=this,o=r.options,a=r.startTime(),s=this.endTime(),l=1,d=1,u=e.length,c="",h=this.groupedResources,p=this.allDaySlotTemplate,f=!1,m=r._isGroupedByDate(),g=0;for(h.length&&(f="vertical"===r._groupOrientation(),f?(d=this._rowCountForLevel(this.rowLevels.length-2),m&&(l=this._columnCountForLevel(this.columnLevels.length-1)),o.allDaySlot&&(t=function(t){var n,i='<tr class="k-scheduler-header-all-day">',o=m?0:t,a=function(){return r._resourceBySlot({groupIndex:o})};if(m)for(;o<l;o++)i+="<td>"+p({date:e[g],resources:a})+"</td>";else for(n=0;n<e.length;n++)i+="<td>"+p({date:e[n],resources:a})+"</td>";return i+"</tr>"})):l=m?this._columnCountForLevel(this.columnLevels.length-1)/this._columnCountForLevel(0):this._columnCountForLevel(this.columnLevels.length-2)),c+="<tbody>",n=function(t,n,o){var a,s,d,c="",h=0;if(c="<tr"+(o?' class="k-middle-row"':"")+">",m)for(a=0,s=u;a<s;a++){for(h=0;h<l;h++)d=a,f&&(d=g),c=r._addCellsToContent(c,e,t,d,h,i);if(f)break}else for(;h<l;h++)for(a=0,s=u;a<s;a++)c=r._addCellsToContent(c,e,t,a,h,i);return c+="</tr>"},i=0;i<d;i++)c+=t?t(i):"",c+=this._forTimeRange(a,s,n),f&&g++;c+="</tbody>",this.content.find("table").append(c)},_addCellsToContent:function(e,t,n,i,r,o){var a,l=this,d="",u=this.slotTemplate,c="vertical"===this._groupOrientation(),h=function(e){return function(){return l._resourceBySlot({groupIndex:e})}};return s.date.isToday(t[i])&&(d+="k-today"),(s.date.getMilliseconds(n)<s.date.getMilliseconds(this.options.workDayStart)||s.date.getMilliseconds(n)>=s.date.getMilliseconds(this.options.workDayEnd)||!this._isWorkDay(t[i]))&&(d+=" k-nonwork-hour"),e+="<td"+(""!==d?' class="'+d+'"':"")+">",a=s.date.getDate(t[i]),s.date.setTime(a,s.date.getMilliseconds(n)),e+=u({date:a,resources:h(c&&!l._isGroupedByDate()?o:r)}),e+="</td>"},_isWorkDay:function(e){var t,n=e.getDay(),i=this._workDays;for(t=0;t<i.length;t++)if(i[t]===n)return!0;return!1},_render:function(t){var n,i=this;t=t||[],this._dates=t,this._startDate=t[0],this._endDate=t[t.length-1||0],this.createLayout(this._layout(t)),this._content(t),this._footer(),this.refreshLayout(),n=this.element.find(".k-scheduler-header-all-day td"),n.length&&(this._allDayHeaderHeight=n.first()[0].clientHeight),i.element.on("click"+x,".k-nav-day",function(t){var n,r=e(t.currentTarget).closest("th"),o=r.offset(),a=0,s=p(r);i._isGroupedByDate()&&(i._isVerticallyGrouped()?(a=h(i.times),s=0):s=p(i.datesHeader)),n=i._slotByPosition(o.left+a,o.top+s),i.trigger("navigate",{view:"day",date:n.startDate()})})},startTime:function(){var e=this.options;return e.showWorkHours?e.workDayStart:e.startTime},endTime:function(){var e=this.options;return e.showWorkHours?e.workDayEnd:e.endTime},startDate:function(){return this._startDate},endDate:function(){return this._endDate},_end:function(e){var t=y(this.endTime())||_;return e&&(t=0),new Date(this._endDate.getTime()+t)},nextDate:function(){return s.date.nextDay(this.endDate())},previousDate:function(){return s.date.previousDay(this.startDate())},calculateDateRange:function(){this._render([this.options.date])},destroy:function(){var e=this;e._currentTimeUpdateTimer&&clearInterval(e._currentTimeUpdateTimer),e.datesHeader&&e.datesHeader.off(x),e.element&&e.element.off(x),e.footer&&e.footer.remove(),c.fn.destroy.call(this),this._isMobile()&&e.options.editable&&(e.options.editable.create!==!1&&(e._addUserEvents.destroy(),e._allDayUserEvents.destroy()),e.options.editable.update!==!1&&e._editUserEvents.destroy())},inRange:function(e){var t,n,i,r,o=c.fn.inRange.call(this,e);return e.isAllDay?o:(t=y(this.startTime()),n=y(this.endTime())||s.date.MS_PER_DAY,i=y(e.start),r=y(e.end)||s.date.MS_PER_DAY,o&&t<=i&&r<=n)},selectionByElement:function(e){var t=e.offset();return this._slotByPosition(t.left,t.top)},_timeSlotInterval:function(){var e=this.options;return e.majorTick/e.minorTickCount*v},_timeSlotIndex:function(e){var t=this.options,n=y(e),i=y(this.startTime()),r=t.majorTick/t.minorTickCount*v;return(n-i)/r},_slotIndex:function(e,t){return t?this._dateSlotIndex(e):this._timeSlotIndex(e)},_dateSlotIndex:function(e,t){var n,r,o,a,l=this._dates||[],d=1;for(n=0,r=l.length;n<r;n++)if(o=s.date.getDate(l[n]),a=new Date(s.date.getDate(l[n]).getTime()+_-(t?0:1)),i(e,o,a))return n*d;return-1},_positionAllDayEvent:function(t,n){var i,r,o,a,s,l,d,u=n.innerWidth(),h=n.start.index,p=n.end.index,f=c.collidingEvents(n.events(),h,p),m=this._headerColumnCount||0,g=2,v=h!==p?5:4,_=this._allDayHeaderHeight,b=n.startSlot();for(t.css({left:b.offsetLeft+g,width:u-v}),n.addEvent({slotIndex:h,start:h,end:p,element:t}),f.push({slotIndex:h,start:h,end:p,element:t}),i=c.createRows(f),i.length&&i.length>m&&(this._headerColumnCount=i.length),r=n.start.offsetTop,o=0,a=i.length;o<a;o++)for(s=i[o].events,l=0,d=s.length;l<d;l++)e(s[l].element).css({top:r+o*_})},_arrangeColumns:function(e,t,n,i){var r,o,a,s,l,d,u,h,p,f,m,g=i.start;for(e={element:e,slotIndex:g.index,start:t,end:t+n},o=g.clientWidth,a=.1*o,l=i.events(),d=c.collidingEvents(l,e.start,e.end),i.addEvent(e),d.push(e),r=c.createColumns(d),u=(o-a)/r.length,h=0,p=r.length;h<p;h++)for(s=r[h].events,f=0,m=s.length;f<m;f++)s[f].element[0].style.width=u-4+"px",s[f].element[0].style.left=(this._isRtl?a:0)+g.offsetLeft+h*u+2+"px"},_positionEvent:function(e,t,n){var i=e._startTime||e.start,r=e._endTime||e.end,o=n.innerRect(i,r,!1),a=o.bottom-o.top-2;a<0&&(a=0),t.css({top:o.top,height:a}),this._arrangeColumns(t,o.top,t[0].clientHeight,n)},_createEventElement:function(t,n,r,o){var a,l,d,u,c,h,p=n?this.eventTemplate:this.allDayEventTemplate,m=this.options,v=m.editable,b=this._isMobile(),k=v&&v.destroy!==!1&&!b,w=v&&v.resize!==!1,x=g(this.startDate()),C=g(this.endDate()),T=y(this.startTime()),S=y(this.endTime()),D=t._time("start"),F=t._time("end");return T>=S&&(S=y(new Date(this.endTime().getTime()+_-1))),n||t.isAllDay||(C=new Date(C.getTime()+_)),l=t.start,d=t.end,t.isAllDay&&(d=g(t.end)),!i(g(l),x,C)&&!i(d,x,C)||n&&D<T&&F>S?a=!0:g(l)<x||n&&D<T?o=!0:(d>C&&!n||n&&F>S)&&(r=!0),u=this.eventResources(t),t._startTime&&D!==s.date.getMilliseconds(t.start)&&(l=new Date(D),l=s.timezone.apply(l,"Etc/UTC")),t._endTime&&F!==s.date.getMilliseconds(t.end)&&(d=new Date(F),d=s.timezone.apply(d,"Etc/UTC")),c=f({},{ns:s.ns,resizable:w,showDelete:k,middle:a,head:r,tail:o,singleDay:1==this._dates.length,resources:u,inverseColor:!(!u||!u[0])&&this._shouldInverseResourceColor(u[0]),messages:m.messages},t,{start:l,end:d}),h=e(p(c)),this.angular("compile",function(){return{elements:h,data:[{dataItem:c}]}}),h},_isInTimeSlot:function(e){var t,n=this.startTime(),i=this.endTime(),o=e._startTime||e.start,a=e._endTime||e.end;return y(i)===y(s.date.getDate(i))&&(i=s.date.getDate(i),u(i,_-1)),e._date("end")>e._date("start")&&(a=+e._date("end")+(_-1)),a=e._endTime?a-e._date("end"):y(new Date(a)),o=e._startTime?o-e._date("start"):y(new Date(o)),i=y(i),n=y(n),n===o&&o===a||(t=o!==i,r(o,n,i,t)||r(a,n,i,t)||r(n,o,a)||r(i,o,a))},_isInDateSlot:function(e){var t=this.groups[0],n=t.firstSlot().start,r=t.lastSlot().end-1,o=s.date.toUtcTime(e.start),a=s.date.toUtcTime(e.end);return(i(o,n,r)||i(a,n,r)||i(n,o,a)||i(r,o,a))&&(!i(a,n,n)||i(a,o,o)||e.isAllDay)},_updateAllDayHeaderHeight:function(e){var t,n;if(this._height!==e&&(this._height=e,t=this.element.find(".k-scheduler-header-all-day td"),t.length))for(t.parent().add(this.element.find(".k-scheduler-times-all-day").parent()).height(e),n=0;n<this.groups.length;n++)this.groups[n].refresh()},_renderEvents:function(e,t){var n,i,r,a,s,l,d,u,c,h,p,f,m,g,v,b,k,w,y,x,C,T=this.datesHeader.find(".k-scheduler-header-wrap > div"),S=this._isGroupedByDate();for(i=0,r=e.length;i<r;i++)if(n=e[i],this._isInDateSlot(n))if(a=n.isAllDay||n.duration()>=_,s=a&&!this._isVerticallyGrouped()?T:this.content,a){if(this.options.allDaySlot&&(p=this.groups[t],p._continuousEvents||(p._continuousEvents=[]),d=p.slotRanges(n),d.length))if(u=d[0],b=u.start.index,k=u.end.index,S&&b!==k)for(c=u.start.start,h=u.end.end,w=new Date(c),y=new Date(c),x=u.start.index;x<=u.end.index;x++)l=this._createEventElement(n,!a,x!==k,x!==b),C=p.daySlotRanges(w,y,!0)[0],y.setDate(y.getDate()+1),w.setDate(w.getDate()+1),this._positionAllDayEvent(l,C),o(p,C,l,!0),l.appendTo(s);else l=this._createEventElement(n,!a),this._positionAllDayEvent(l,d[0]),o(p,d[0],l,!0),l.appendTo(s)}else if(this._isInTimeSlot(n))for(p=this.groups[t],p._continuousEvents||(p._continuousEvents=[]),d=p.slotRanges(n),f=d.length,m=0;m<f;m++)u=d[m],c=n.start,h=n.end,f>1&&(0===m?h=u.end.endDate():m==f-1?c=u.start.startDate():(c=u.start.startDate(),h=u.end.endDate())),g=n.clone({start:c,end:h,_startTime:n._startTime,_endTime:n.endTime}),this._isInTimeSlot(g)&&(v=u.head,l=this._createEventElement(n,!a,v,u.tail),l.appendTo(s),this._positionEvent(g,l,u),o(p,u,l,!1))},render:function(t){var n,r,o,a;for(this._headerColumnCount=0,this._groups(),this.element.find(".k-event").remove(),t=new s.data.Query(t).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray(),n=[],this._eventsByResource(t,this.groupedResources,n),r=e.map(this._dates,function(t){return Math.max.apply(null,e.map(n,function(n){return e.grep(n,function(e){return e.isMultiDay()&&i(t,g(e.start),g(e.end))}).length}))}),o=Math.max.apply(null,r),this._updateAllDayHeaderHeight((o+1)*this._allDayHeaderHeight),a=0;a<n.length;a++)this._renderEvents(n[a],a);this.refreshLayout(),this._currentTime(!1),this.trigger("activate")},_eventsByResource:function(e,t,n){var i,r,o,a,l=t[0];if(l)for(i=l.dataSource.view(),r=0;r<i.length;r++)o=this._resourceValue(l,i[r]),a=new s.data.Query(e).filter({field:l.field,operator:c.groupEqFilter(o)}).toArray(),t.length>1?this._eventsByResource(a,t.slice(1),n):n.push(a);else n.push(e)},_columnOffsetForResource:function(e){return this._columnCountForLevel(e)/this._columnCountForLevel(e-1)},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},clearSelection:function(){this.content.add(this.datesHeader).find(".k-state-selected").removeAttr("id").attr("aria-selected",!1).removeClass("k-state-selected")},_updateDirection:function(e,t,n,i,r){var o=e.isAllDay,a=t[0].start,s=t[t.length-1].end;n&&(r?o||a.index!==s.index||a.collectionIndex!==s.collectionIndex||(e.backward=i):(o&&a.index===s.index||!o&&a.collectionIndex===s.collectionIndex)&&(e.backward=i))},_changeViewPeriod:function(e,t,n){var i,r,o,a,s,l,d,c,h,p,f,m,g;if(!n)return i=t?this.previousDate():this.nextDate(),r=e.start,o=e.end,a=this._isGroupedByDate()&&this._isVerticallyGrouped(),s=this.groups[e.groupIndex],l=t?s._timeSlotCollections:s._getCollections(s.daySlotCollectionCount()),d=l[l.length-1]._slots,c=t||s.daySlotCollectionCount()?d.length-1:0,p=new Date(i),f=new Date(i),!this._isInRange(p,f)&&(e.start=p,e.end=f,a?(m=new Date(d[c].startDate()),g=new Date(d[c].endDate()),h=y(g)?y(g):_,u(e.start,y(m)),u(e.end,h),s.daySlotCollectionCount()&&(e.isAllDay=!e.isAllDay)):(h=e.isAllDay||!y(o)?_:y(o),u(e.start,y(r)),u(e.end,h)),this._isVerticallyGrouped()||(e.groupIndex=t?this.groups.length-1:0),e.events=[],!0)}});f(!0,l,{MultiDayView:E,DayView:E.extend({options:{name:"DayView",title:"Day"},name:"day"}),WeekView:E.extend({options:{name:"WeekView",title:"Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"week",calculateDateRange:function(){var e,t,n=this.options.date,i=s.date.dayOfWeek(n,this.calendarInfo().firstDay,-1),r=[];for(e=0,t=7;e<t;e++)r.push(i),i=s.date.nextDay(i);this._render(r)}}),WorkWeekView:E.extend({options:{name:"WorkWeekView",title:"Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}"},name:"workWeek",nextDate:function(){var e=s.date.dayOfWeek(s.date.nextDay(this.startDate()),this.calendarInfo().firstDay,1);return s.date.addDays(e,this._workDays[0])},previousDate:function(){var e=s.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),t=this._workDays;return s.date.addDays(e,t[t.length-1]-7)},calculateDateRange:function(){for(var e=this.options.date,t=s.date.dayOfWeek,n=t(e,this.calendarInfo().firstDay,-1),i=t(n,this.options.workWeekStart,1),r=t(i,this.options.workWeekEnd,1),o=[];i<=r;)o.push(i),i=s.date.nextDay(i);this._render(o)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.agendaview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e){function t(e){var t,n,i=0;for(t=0,n=e.length;t<n;t++)i+=e[t].items.length;return i}function n(e,t){return e.valuePrimitive&&(t=o.getter(e.dataValueField)(t)),t}function i(e){for(var t,n=0,i=e.length,o=[];n<i;n++)t=e[n],t.groups?(t=r(t.groups),o=o.concat(t)):o=o.concat(r(t.items));return o}function r(e){for(var t=[].concat(e),n=t.shift(),i=[],r=[].push;n;)n.groups?r.apply(t,n.groups):n.items?r.apply(t,n.items):r.call(i,n),
n=t.shift();return i}var o=window.kendo,a=o.ui,s=".kendoAgendaView",l='<div class="k-task" title="#:title.replace(/"/g,"\'")#" data-#=kendo.ns#uid="#=uid#"># if (resources[0]) {#<span class="k-scheduler-mark" style="background-color:#=resources[0].color#"></span># } ## if (data.isException()) { #<span class="k-icon k-i-non-recurrence"></span># } else if (data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #{0}#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}#</div>',d=o.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){return e.concat(t)},_getGroupsInDay:function(){return[]},_getSumOfItemsForDate:function(){return 0},_renderTaskGroupsCells:function(e,t,n,i){var r=this._view;0===n&&0===i&&t.length&&r._renderTaskGroupsCells(e,t)},_renderDateCell:function(e,t,n,i,r,a){var s=this._view;e.push(o.format('<td class="k-scheduler-datecolumn{3}{2}" rowspan="{0}">{1}</td>',n.length,s._dateTemplate({date:i}),r!=a.length-1||t.length?"":" k-last",t.length?"":" k-first"))},_renderDates:function(){},_getParents:function(e){return e.splice(0)},_getGroupsByDate:function(){},_renderTaskGroups:function(e,t,n){var i=this._view;e.append(i._renderTaskGroups(t,n))}}),u=o.Class.extend({init:function(e){this._view=e},_getColumns:function(e,t){var n,i,r=this._view;return r._isMobilePhoneView()?e.concat(t):(n=t.slice(0,1),i=t.slice(1),n.concat(e).concat(i))},_compareDateGroups:function(e,t,n){return e[n].text==t[n].text&&(0===n||this._compareDateGroups(e,t,n-1))},_getGroupsInDay:function(e,t){var n,i,r,o,a,s=[],l=null;for(n=0;n<e.length;n++)for(i=0;i<e[n].items.length;i++){if(r=0,0===s.length)for(r;r<t[n].length;r++)s.push([1]);else for(r;r<t[n].length;r++)if(this._compareDateGroups(t[n],l,r))s[r][s[r].length-1]++;else{for(o=s[r][s[r].length-1]-1,a=0;a<o;a++)s[r].push(0);s[r].push(1)}l=t[n]}return s},_getSumOfItemsForDate:function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].items.length;return n},_renderTaskGroupsCells:function(e,t,n,i,r,a,s,l){var d,u=this._view,c=u._isMobilePhoneView();if(c)0===n&&0===i&&t.length&&u._renderTaskGroupsCells(e,t);else for(0===n&&0===i&&e.push(o.format('<td class="k-scheduler-datecolumn k-first" rowspan="{0}">{1}</td>',a,u._dateTemplate({date:s}))),d=0;d<t[n].length;d++)r[d][l]&&e.push(o.format('<td class="k-scheduler-groupcolumn" rowspan="{0}">{1}</td>',r[d][l],u._groupTemplate({value:t[n][d].text}),t[n][d].className))},_renderDateCell:function(){},_renderDates:function(e){var t,n=this._view,i=n._groupsByDate.sort(function(e,t){return e.array[0].value.getTime()-t.array[0].value.getTime()});for(t=0;t<i.length;t++)e.append(n._renderTaskGroups(i[t].array,i[t].groups))},_getParents:function(e){return e.slice(0)},_getGroupsByDate:function(e,t,n){var i,r,o,a,s=this._view;if(e[t].items)for(i=0;i<e[t].items.length;i++){for(r=e[t].items[i].value,o=!1,a=0;a<s._groupsByDate.length;a++)s._groupsByDate[a].array[0].value.getTime()===r.getTime()&&(o=!0,s._groupsByDate[a].array.push(e[t].items[i]),s._groupsByDate[a].groups.push(n));o||s._groupsByDate.push({array:[e[t].items[i]],groups:[n]})}},_renderTaskGroups:function(){}});o.ui.scheduler.AgendaGroupedView=d,o.ui.scheduler.AgendaGroupedByDateView=u,a.AgendaView=a.SchedulerView.extend({init:function(t,n){a.SchedulerView.fn.init.call(this,t,n),this._groupedView=this._getGroupedView(),n=this.options,n.editable&&(n.editable=e.extend({"delete":!0},n.editable,{create:!1,update:!1},{messages:n.messages})),this.title=n.title,this._eventTemplate=this._eventTmpl(n.eventTemplate,l),this._dateTemplate=o.template(n.eventDateTemplate),this._groupTemplate=o.template(n.eventGroupTemplate),this._timeTemplate=o.template(n.eventTimeTemplate),this.element.on("mouseenter"+s,".k-scheduler-agenda .k-scheduler-content tr","_mouseenter").on("mouseleave"+s,".k-scheduler-agenda .k-scheduler-content tr","_mouseleave").on("click"+s,".k-scheduler-agenda .k-scheduler-content .k-link:has(.k-i-close)","_remove"),this._renderLayout(n.date)},name:"agenda",_getGroupedView:function(){return this._isGroupedByDate()?new o.ui.scheduler.AgendaGroupedByDateView(this):new o.ui.scheduler.AgendaGroupedView(this)},_mouseenter:function(t){e(t.currentTarget).addClass("k-state-hover")},_mouseleave:function(t){e(t.currentTarget).removeClass("k-state-hover")},_remove:function(t){t.preventDefault(),this.trigger("remove",{uid:e(t.currentTarget).closest(".k-task").attr(o.attr("uid"))})},nextDate:function(){return o.date.nextDay(this.startDate())},startDate:function(){return this._startDate},endDate:function(){return this._endDate},previousDate:function(){return o.date.previousDay(this.startDate())},_renderLayout:function(e){this._startDate=e,this._endDate=o.date.addDays(e,7),this.createLayout(this._layout()),this.table.addClass("k-scheduler-agenda")},_layout:function(){var e,t,n,i=[{text:this.options.messages.time,className:"k-scheduler-timecolumn"},{text:this.options.messages.event}];if(this._isMobilePhoneView()||i.splice(0,0,{text:this.options.messages.date,className:"k-scheduler-datecolumn"}),e=this.groupedResources,e.length){for(t=[],n=0;n<e.length;n++)t.push({text:"",className:"k-scheduler-groupcolumn"});i=this._groupedView._getColumns(t,i)}return{columns:i}},_tasks:function(e){var t,n,i,r,a,s,l,d=[];for(t=0;t<e.length;t++)if(n=e[t],i=n.start,r=n.isAllDay?o.date.getDate(n.end):n.end,a=Math.ceil((r-o.date.getDate(i))/o.date.MS_PER_DAY),n.isAllDay&&(a+=1),s=n.clone(),s.startDate=o.date.getDate(i),s.startDate>=this.startDate()&&d.push(s),a>1)for(s.end=o.date.nextDay(i),s.head=!0,l=1;l<a;l++)i=s.end,s=n.clone(),s.start=s.startDate=o.date.getDate(i),s.end=o.date.nextDay(i),l==a-1?(s.end=new Date(s.start.getFullYear(),s.start.getMonth(),s.start.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()),s.tail=!0):(s.isAllDay=!0,s.middle=!0),(o.date.getDate(s.end)<=this.endDate()&&s.start>=this.startDate()||o.date.getDate(s.start).getTime()==this.endDate().getTime())&&d.push(s);return new o.data.Query(d).sort([{field:"start",dir:"asc"},{field:"end",dir:"asc"}]).groupBy({field:"startDate"}).toArray()},_renderTaskGroups:function(e,t){var n,i,r,a,s,l,d,u,c=[],h=this.options.editable,p=h&&h.destroy!==!1&&!this._isMobile(),f=this._isMobilePhoneView(),m=this._groupedView._getSumOfItemsForDate(e),g=this._groupedView._getGroupsInDay(e,t),v=0;for(n=0;n<e.length;n++)for(i=e[n].value,r=e[n].items,a=o.date.isToday(i),s=0;s<r.length;s++)l=r[s],d=[],u=f?[]:d,this._groupedView._renderTaskGroupsCells(u,t,n,s,g,m,i,v),v++,0===s&&(f?(u.push(o.format('<td class="k-scheduler-datecolumn" colspan="2">{0}</td>',this._dateTemplate({date:i}))),c.push('<tr role="row" aria-selected="false"'+(a?' class="k-today">':">")+u.join("")+"</tr>")):this._groupedView._renderDateCell(d,t,r,i,n,e)),l.format=l.head?"{0:t}":l.tail?"{1:t}":"{0:t}-{1:t}",l.resources=this.eventResources(l),d.push(o.format('<td class="k-scheduler-timecolumn"><div>{0}{1}{2}</div></td><td>{3}</td>',l.tail||l.middle?'<span class="k-icon k-i-arrow-60-left"></span>':"",this._timeTemplate(l.clone({start:l._startTime||l.start,end:l.endTime||l.end})),l.head||l.middle?'<span class="k-icon k-i-arrow-60-right"></span>':"",this._eventTemplate(l.clone({showDelete:p,messages:this.options.messages})))),c.push('<tr role="row" aria-selected="false"'+(a?' class="k-today">':">")+d.join("")+"</tr>");return c.join("")},_renderTaskGroupsCells:function(e,t){for(var n=0;n<t.length;n++)e.push(o.format('<td class="k-scheduler-groupcolumn{2}" rowspan="{0}">{1}</td>',t[n].rowSpan,this._groupTemplate({value:t[n].text}),t[n].className))},render:function(e){var t,n,r=this.content.find("table").empty(),o=[];e.length>0&&(t=this.groupedResources,t.length?(o=this._createGroupConfiguration(e,t,null),this._groupsByDate=[],this._renderGroups(o,r,[]),this._groupedView._renderDates(r)):(o=this._tasks(e),r.append(this._renderTaskGroups(o,[])))),n=this._eventsList=i(o),this._angularItems(r,n),this.refreshLayout(),this.trigger("activate")},_angularItems:function(e,t){this.angular("compile",function(){var n=[],i=t.map(function(t){return n.push({dataItem:t}),e.find(".k-task["+o.attr("uid")+"="+t.uid+"]")});return{elements:i,data:n}})},_renderGroups:function(e,t,n){var i,r,o;for(i=0,r=e.length;i<r;i++)o=this._groupedView._getParents(n),o.push(e[i]),this._groupedView._getGroupsByDate(e,i,o),e[i].groups?this._renderGroups(e[i].groups,t,o):this._groupedView._renderTaskGroups(t,e[i].items,o)},_createGroupConfiguration:function(e,i,r){var s,l,d,u,c,h,p,f=i[0],m=[],g=f.dataSource.view(),v=this._isMobilePhoneView();for(s=0;s<g.length;s++)l=n(f,g[s]),d=new o.data.Query(e).filter({field:f.field,operator:a.SchedulerView.groupEqFilter(l)}).toArray(),d.length&&(u=this._tasks(d),c=r?"":" k-first",s===g.length-1&&(!r||r.className.indexOf("k-last")>-1)&&(c+=" k-last"),h={text:o.getter(f.dataTextField)(g[s]),value:l,rowSpan:0,className:c},i.length>1?(h.groups=this._createGroupConfiguration(d,i.slice(1),h),r&&(r.rowSpan+=h.rowSpan)):(h.items=u,p=t(h.items),v&&(p+=h.items.length),h.rowSpan=p,r&&(r.rowSpan+=p)),m.push(h));return m},selectionByElement:function(t){var n,i,r;if(t=e(t),!t.hasClass("k-scheduler-datecolumn")&&this._eventsList.length)return t.is(".k-task")&&(t=t.closest("td")),this._isMobile()?(r=t.parent(),n=r.parent().children().filter(function(){return e(this).children(":not(.k-scheduler-datecolumn)").length}).index(r)):n=t.parent().index(),i=this._eventsList[n],{index:n,start:i.start,end:i.end,isAllDay:i.isAllDay,uid:i.uid}},select:function(e){this.clearSelection();var t=this.table.find(".k-task").eq(e.index).closest("tr").addClass("k-state-selected").attr("aria-selected",!0)[0];this.current(t)},move:function(e,t){var n,i=!1,r=e.index;return t==o.keys.UP?(r--,i=!0):t==o.keys.DOWN&&(r++,i=!0),i&&(n=this._eventsList[r],n&&(e.start=n.start,e.end=n.end,e.isAllDay=n.isAllDay,e.events=[n.uid],e.index=r)),i},moveToEvent:function(){return!1},constrainSelection:function(e){var t=this._eventsList[0];t&&(e.start=t.start,e.end=t.end,e.isAllDay=t.isAllDay,e.events=[t.uid],e.index=0)},isInRange:function(){return!0},destroy:function(){this.element&&this.element.off(s),a.SchedulerView.fn.destroy.call(this)},options:{title:"Agenda",name:"agenda",editable:!0,selectedDateFormat:"{0:D}-{1:D}",selectedShortDateFormat:"{0:d} - {1:d}",eventTemplate:"#:title#",eventTimeTemplate:"#if(data.isAllDay) {##=this.options.messages.allDay##} else { ##=kendo.format(format, start, end)## } #",eventDateTemplate:'<strong class="k-scheduler-agendaday">#=kendo.toString(date, "dd")#</strong><em class="k-scheduler-agendaweek">#=kendo.toString(date,"dddd")#</em><span class="k-scheduler-agendadate">#=kendo.toString(date, "y")#</span>',eventGroupTemplate:'<strong class="k-scheduler-adgendagroup">#=value#</strong>',messages:{event:"Event",date:"Date",time:"Time",allDay:"all day"}}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.monthview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e){function t(e,t){return e.slice(t).concat(e.slice(0,t))}function n(e,t){for(var n=t.firstDay,i=new Date(e.getFullYear(),e.getMonth(),0,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());i.getDay()!=n;)r.date.setTime(i,-1*u);return i}function i(e,t,n){var i,r=t,o=n;return i=e,i>=r&&i<=o}var r=window.kendo,o=r.ui,a=o.SchedulerView,s=".kendoMonthView",l=e.extend,d=r.date.getDate,u=r.date.MS_PER_DAY,c=6,h=7,p=r.template('<span class="k-link k-nav-day">#:kendo.toString(date, "dd")#</span>'),f='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color #; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#"#} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail || data.middle) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span>#}#</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head || data.middle) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span># if(resizable && !data.tail && !data.middle) {#<span class="k-resize-handle k-resize-w"></span>#}## if(resizable && !data.head && !data.middle) {#<span class="k-resize-handle k-resize-e"></span>#}#</div>',m=r.template('<div title="#=title.replace(/"/g,"&\\#34;")#"><div class="k-event-template">#:title#</div></div>'),g=r.template('<div style="width:#=width#px;left:#=left#px;top:#=top#px" class="k-more-events k-button"><span>...</span></div>'),v=r.Class.extend({init:function(e){this._view=e},_verticalRowCountForLevel:function(e){var t=this._view;return t._rowCountForLevel(e)},_horizontalGroupCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_getCalendarRowsLength:function(e,t){return t/e},_createRows:function(e,t,n,i){var r,o=this._view,a=h,s=o._isVerticallyGrouped(),l="";for(r=0;r<n;r++)l+=o._createRow(e,t,a,s?i:r);return l},_adjustStartDate:function(e){return r.date.addDays(e,h)},_getContent:function(e,t,n){return e({date:t,resources:n})},_getTimeSlotByPosition:function(e,t,n){var i=this._view.groups[n];return i.daySlotByPosition(e,t)},_nextSlotStartDate:function(e){return r.date.nextDay(e)},_createRowsLayout:function(e,t,n){var i=this._view;return i._createRowsLayout(e,t,n)},_createVerticalColumnsLayout:function(e,t,n,i){return i},_createColumnsLayout:function(e,t,n){var i=this._view;return i._createColumnsLayout(e,t,n)},_verticalGroupCount:function(e){var t=this._view;return t._rowCountForLevel(e)},_horizontalGroupCount:function(e){var t=this._view;return t._columnCountForLevel(e)/t._columnOffsetForResource(e)},_positionEvent:function(e,t,n,i,r,o,a){var s,l=this._view,d=l._isMobilePhoneView();i>1&&(0===a?o=n.end.endDate():a==i-1?r=n.start.startDate():(r=n.start.startDate(),o=n.end.endDate())),s=e.clone({start:r,end:o,head:n.head,tail:n.tail}),d?l._positionMobileEvent(n,l._createEventElement(s),t):l._positionEvent(n,l._createEventElement(s),t)},_addDaySlotCollections:function(e,t,n){var i,o,a,s,l,d,u,p,f,m,g,v=this._view,_=h,b=c;for(i=0;i<e;i++)for(o=0,a=0,v._isVerticallyGrouped()&&(a=i),s=a*b;s<(a+1)*b;s++)for(l=v.groups[i],d=l.addDaySlotCollection(r.date.addDays(n,o),r.date.addDays(n,o+_)),u=t[s],p=u.children,f=0,u.setAttribute("role","row"),v._isVerticallyGrouped()||(f=i),m=f*_;m<(f+1)*_;m++)g=p[m],v.addDaySlot(d,g,n,o),o++},_changePeriodGroupIndex:function(e){var t=this._view;return e?t.groups.length-1:0},_createResizeHint:function(e){var t=this._view,n=e.startSlot().offsetLeft,i=e.start.offsetTop,r=e.innerWidth(),o=e.start.clientHeight-2,s=a.fn._createResizeHint.call(t,n,i,r,o);t._appendResizeHint(s)},_createMoveHint:function(e,t){var n=this._view,i=e.startSlot(),r=e.endSlot(),o=n._createEventElement(t.clone({head:e.head,tail:e.tail}));o.css({left:i.offsetLeft+2,top:i.offsetTop+i.firstChildHeight,height:n.options.eventHeight,width:e.innerWidth()-(i.index!==r.index?5:4)}),o.addClass("k-event-drag-hint"),n._appendMoveHint(o)}}),_=r.Class.extend({init:function(e){this._view=e},_verticalRowCountForLevel:function(){return 1},_horizontalGroupCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e+1)/h},_createRows:function(e,t,n){var i,o,a=this._view,s=h,l=a._isVerticallyGrouped(),d="",u=0;if(l){for(i=new Date(e),o=a._groupCount(),u;u<c;u++)d+=a._createRow(i,t,o,u),i=r.date.addDays(i,s);e=r.date.nextDay(e)}else{for(u;u<s;u++)d+=a._createRow(e,t,n,u),e=r.date.nextDay(e);e=r.date.addDays(e,s)}return d},_adjustStartDate:function(e,t){var n=this._view,i=n._isVerticallyGrouped();return i?t?r.date.addDays(e,h*(c-1)+1):r.date.nextDay(e):r.date.addDays(e,h)},_getContent:function(e,t,n,i){return 0===i?e({date:t,resources:n}):""},_getTimeSlotByPosition:function(e,t,n){var i=this._view.groups[n];return i.daySlotByPosition(e,t,!0)},_nextSlotStartDate:function(e){return e},_getCalendarRowsLength:function(){var e=this._view,t=e._isVerticallyGrouped();return t?h:c},_createRowsLayout:function(e,t,n,i){var r=this._view;return r._createDateLayout(i,null,!1)},_createVerticalColumnsLayout:function(e,t,n){var i,o,a=this._view,s=e[0],l=[],d=s.dataSource.view();for(i=0;i<d.length*c;i++)o={text:n({text:r.htmlEncode(r.getter(s.dataTextField)(d[i%d.length])),color:r.getter(s.dataColorField)(d[i%d.length]),field:s.field,title:s.title,name:s.name,value:r.getter(s.dataValueField)(d[i%d.length])}),className:"k-slot-cell"},o.columns=a._createColumnsLayout(e.slice(1),null,n),l.push(o);return l},_createColumnsLayout:function(e,t,n,i){var r=this._view;return r._createColumnsLayout(e,t,n,i,!0)},_verticalGroupCount:function(e){var t=this._view;return t._columnCountForLevel(e)/c},_horizontalGroupCount:function(e){var t=this._view;return t._columnCountForLevel(e)/h},_positionEvent:function(e,t,n,i,r,o){var a,s,l,d,u=this._view,c=n.start.index,h=n.end.index,p=u._isMobilePhoneView();for(a=n.start.index;a<=n.end.index;a++)s=n.collection._slots[a],l=t.daySlotRanges(s.start,s.start,!0)[0],d=e.clone({start:a===c?s.start:r,end:a===h?s.end:o,head:a!==h||n.head,tail:a!==c||n.tail}),p?u._positionMobileEvent(l,u._createEventElement(d),t):u._positionEvent(l,u._createEventElement(d),t)},_addDaySlotCollections:function(e,t,n){var i,o,a,s,l,d,u,p,f,m,g,v,_,b,k=this._view,w=h,y=c,x=k._isVerticallyGrouped();for(i=0;i<w;i++)for(o=0;o<y;o++)for(a=0,s=x?i:o,l=t[s],d=l.children,u=0,l.setAttribute("role","row"),k._isVerticallyGrouped()||(u=i),p=u*e;p<(u+1)*e;p++)f=o*w+i,m=x?p+o*e:p,g=d[m],v=x?p:a,_=k.groups[v],b=0===i?_.addDaySlotCollection(r.date.addDays(n,f),r.date.addDays(n,f+w)):_._daySlotCollections[o],k.addDaySlot(b,g,n,f),a++},_changePeriodGroupIndex:function(e,t,n){var i=this._view;return t&&i._isVerticallyGrouped()?e?i.groups.length-1:0:n},_createResizeHint:function(e){var t,n,i,r,o,s,l,d=this._view;if(d._isVerticallyGrouped())t=e.startSlot().offsetLeft,n=e.start.offsetTop,i=e.startSlot().offsetWidth,r=e.endSlot().offsetTop+e.startSlot().offsetHeight-e.startSlot().offsetTop-2,o=a.fn._createResizeHint.call(d,t,n,i,r),d._appendResizeHint(o);else for(s=e.startSlot().index;s<=e.endSlot().index;s++)l=e.collection._slots[s],t=l.offsetLeft,n=l.offsetTop,i=l.offsetWidth,r=l.offsetHeight-2,o=a.fn._createResizeHint.call(d,t,n,i,r),d._appendResizeHint(o)},_createMoveHint:function(e,t){var n,i,r,o=this._view,a=e.startSlot(),s=e.endSlot();for(n=a.index;n<=s.index;n++)i=e.collection._slots[n],r=o._createEventElement(t.clone({head:e.head,tail:e.tail})),r.css({left:i.offsetLeft,top:i.offsetTop+i.firstChildHeight,height:o.options.eventHeight,width:i.offsetWidth-2}),r.addClass("k-event-drag-hint"),o._appendMoveHint(r)}});r.ui.scheduler.MonthGroupedView=v,r.ui.scheduler.MonthGroupedByDateView=_,o.MonthView=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n._groupedView=n._getGroupedView(),n.title=n.options.title,n._templates(),n._editable(),n._renderLayout(n.options.date),n._groups()},name:"month",_getGroupedView:function(){return this._isGroupedByDate()?new r.ui.scheduler.MonthGroupedByDateView(this):new r.ui.scheduler.MonthGroupedView(this)},_updateDirection:function(e,t,n,i,r){var o,a,s,l,d;n&&(o=t[0].start,a=t[t.length-1].end,s=o.index===a.index,l=o.collectionIndex===a.collectionIndex,d=r?s&&l||l:s&&l,d&&(e.backward=i))},_changeDate:function(e,t,n){var i,r,o,a=this.groups[e.groupIndex];if(n){if(i=a._getCollections(a.daySlotCollectionCount()),r=t.collectionIndex-1,r>=0)return i[r]._slots[i[r]._slots.length-1]}else if(i=a._getCollections(a.daySlotCollectionCount()),r=t.collectionIndex+1,o=0,i[r]&&i[r]._slots[o])return i[r]._slots[o]},_getNextHorizontalRange:function(e,t,n){var i=this._isVerticallyGrouped();return n.startSlot=e[t](n.startSlot,i),n.endSlot=e[t](n.endSlot,i),n},_getNextVerticalRange:function(e,t,n,i){var r=this._isVerticallyGrouped()&&this._isGroupedByDate();return n.startSlot=e[t](n.startSlot,i,r),n.endSlot=e[t](n.endSlot,i,r),n},_changeViewPeriod:function(e,t,n){var i,o,a=n?7:1;return t&&(a*=-1),i=r.date.addDays(e.start,a),o=r.date.addDays(e.end,a),!this._isInRange(i,o)&&(e.start=i,e.end=o,(!n||n&&this._isVerticallyGrouped())&&(e.groupIndex=this._groupedView._changePeriodGroupIndex(t,n,e.groupIndex)),e.events=[],!0)},_continuousSlot:function(e,t,n){var i=e.backward?0:t.length-1,r=this.groups[e.groupIndex];return r.continuousSlot(t[i].start,n)},_changeGroupContinuously:function(e,t,n,i){var r,o,a,s;return n||(r=e.groupIndex,o=this.groups.length-1,a=this._isVerticallyGrouped(),s=this.groups[r],!t&&a?(t=s[i?"lastSlot":"firstSlot"](),r+=i?-1:1):t&&!a&&(r=i?o:0),(r<0||r>o)&&(r=i?o:0,t=null),e.groupIndex=r),t},_normalizeHorizontalSelection:function(e,t,n){var i;return i=n?t[0].start:t[t.length-1].end},_normalizeVerticalSelection:function(e,t){var n;return n=e.backward?t[0].start:t[t.length-1].end},_templates:function(){var e=this.options,t=l({},r.Template,e.templateSettings);this.eventTemplate=this._eventTmpl(e.eventTemplate,f),this.dayTemplate=r.template(e.dayTemplate,t),this.groupHeaderTemplate=r.template(e.groupHeaderTemplate,t)},dateForTitle:function(){return r.format(this.options.selectedDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},shortDateForTitle:function(){return r.format(this.options.selectedShortDateFormat,this._firstDayOfMonth,this._lastDayOfMonth)},nextDate:function(){return r.date.nextDay(this._lastDayOfMonth)},previousDate:function(){return r.date.previousDay(this._firstDayOfMonth)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},_renderLayout:function(t){var i=this;this._firstDayOfMonth=r.date.firstDayOfMonth(t),this._lastDayOfMonth=r.date.lastDayOfMonth(t),this._startDate=n(t,this.calendarInfo()),this.createLayout(this._layout()),this._content(),this.refreshLayout(),this.content.on("click"+s,".k-nav-day,.k-more-events",function(t){var n=e(t.currentTarget).offset(),r=i._slotByPosition(n.left,n.top);t.preventDefault(),i.trigger("navigate",{view:"day",date:r.startDate()})})},_editable:function(){this.options.editable&&!this._isMobilePhoneView()&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+s,".k-scheduler-monthview .k-event a:has(.k-i-close)",function(n){t.trigger("remove",{uid:e(this).closest(".k-event").attr(r.attr("uid"))}),n.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+s,".k-scheduler-monthview .k-scheduler-content td",function(n){var i,r=e(n.currentTarget).offset(),o=t._slotByPosition(r.left,r.top);o&&(i=t._resourceBySlot(o),t.trigger("add",{eventInfo:l({isAllDay:!0,start:o.startDate(),end:o.startDate()},i)})),n.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+s,".k-scheduler-monthview .k-event",function(n){t.trigger("edit",{uid:e(this).closest(".k-event").attr(r.attr("uid"))}),n.preventDefault()})},_touchEditable:function(){var t=this,n=0;r.support.mobileOS.android&&(n=5),t.options.editable.create!==!1&&(t._addUserEvents=new r.UserEvents(t.element,{threshold:n,filter:".k-scheduler-monthview .k-scheduler-content td",tap:function(n){var i,r=e(n.target).offset(),o=t._slotByPosition(r.left,r.top);o&&(i=t._resourceBySlot(o),t.trigger("add",{eventInfo:l({isAllDay:!0,start:o.startDate(),end:o.startDate()},i)})),n.preventDefault()}})),t.options.editable.update!==!1&&(t._editUserEvents=new r.UserEvents(t.element,{threshold:n,filter:".k-scheduler-monthview .k-event",tap:function(n){0===e(n.event.target).closest("a:has(.k-i-close)").length&&(t.trigger("edit",{uid:e(n.target).closest(".k-event").attr(r.attr("uid"))}),n.preventDefault())}}))},selectionByElement:function(t){var n=e(t).offset();return this._slotByPosition(n.left,n.top)},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},_content:function(){var e,t="<tbody>",n=1,i=this._groupedView,r=this.groupedResources;for(r.length&&this._isVerticallyGrouped()&&(n=i._verticalRowCountForLevel(r.length-1)),e=0;e<n;e++)t+=this._createCalendar(e);t+="</tbody>",this.content.find("table").html(t)},_createCalendar:function(e){var t,n,i,o=this.startDate(),a=h*c,s=h,l=[o],d="",u=1,p=this._isVerticallyGrouped(),f=this._groupedView,m=this.groupedResources;for(m.length&&(p||(u=f._horizontalGroupCountForLevel(m.length-1))),this._slotIndices={},t=f._getCalendarRowsLength(s,a),n=0;n<t;n++)d+="<tr>",l.push(o),i=n*s,d+=f._createRows(o,i,u,e),o=f._adjustStartDate(o,n===t-1),d+="</tr>";return this._weekStartDates=l,this._endDate=r.date.previousDay(o),d},_createRow:function(e,t,n,i){var o,a=this,s=a._firstDayOfMonth,l=a._lastDayOfMonth,u=a.dayTemplate,c="",h="",p=this._groupedView,f=function(){return a._resourceBySlot({groupIndex:i})};for(o=0;o<n;o++)c="",r.date.isToday(e)&&(c+="k-today"),r.date.isInDateRange(e,s,l)||(c+=" k-other-month"),h+="<td ",""!==c&&(h+='class="'+c+'"'),h+=">",h+=p._getContent(u,e,f,o),h+="</td>",a._slotIndices[d(e).getTime()]=t+o,e=p._nextSlotStartDate(e);return h},_layout:function(){var n,i,r,o=this.calendarInfo(),a=this._isMobile()?o.days.namesShort:o.days.names,s=t(a,o.firstDay),l=e.map(s,function(e){return{text:e}}),d=this.groupedResources,u=this._groupedView;if(d.length)if(this._isVerticallyGrouped()){for(i=[],r=0;r<6;r++)i.push({text:"<div>&nbsp;</div>",className:"k-hidden k-slot-cell"});n=u._createRowsLayout(d,i,this.groupHeaderTemplate,l),l=u._createVerticalColumnsLayout(d,i,this.groupHeaderTemplate,l)}else l=u._createColumnsLayout(d,l,this.groupHeaderTemplate,l);return{columns:l,rows:n}},_createEventElement:function(t){var n,i=this.options,o=i.editable,a=this._isMobile();return t.showDelete=o&&o.destroy!==!1&&!a,t.resizable=o&&o.resize!==!1&&!a,t.ns=r.ns,t.resources=this.eventResources(t),t.inverseColor=!(!t.resources||!t.resources[0])&&this._shouldInverseResourceColor(t.resources[0]),t.messages=i.messages||{destroy:"Delete"},n=e(this.eventTemplate(t)),this.angular("compile",function(){return{elements:n,data:[{dataItem:t}]}}),n},_isInDateSlot:function(e){var t=this.groups[0],n=t.firstSlot().start,o=t.lastSlot().end-1,a=r.date.toUtcTime(e.start),s=r.date.toUtcTime(e.end);return(i(a,n,o)||i(s,n,o)||i(n,a,s)||i(o,a,s))&&(!i(s,n,n)||i(s,a,a)||e.isAllDay)},_slotIndex:function(e){return this._slotIndices[d(e).getTime()]},_positionMobileEvent:function(t,n,i){var o,s,l,d,u,c,h,p=t.start;t.start.offsetLeft>t.end.offsetLeft&&(p=t.end),o=t.start.index,s=o,l=3,d=a.collidingEvents(t.events(),o,s),d.push({element:n,start:o,end:s}),u=a.createRows(d),c=t.collection.at(o),h=c.container,h||(h=e(r.format('<div class="k-events-container" style="top:{0};left:{1};width:{2}"/>',p.offsetTop+p.firstChildTop+p.firstChildHeight+"px",p.offsetLeft+"px",p.offsetWidth+"px")),c.container=h,this.content[0].appendChild(h[0])),u.length<=l&&(t.addEvent({element:n,start:o,end:s,groupIndex:p.groupIndex}),i._continuousEvents.push({element:n,uid:n.attr(r.attr("uid")),start:t.start,end:t.end}),h[0].appendChild(n[0]))},_positionEvent:function(t,n,i){var o,s,l,d,u,c,h,p,f,m,v,_,b,k,w,y=this.options.eventHeight,x=t.start;for(t.start.offsetLeft>t.end.offsetLeft&&(x=t.end),o=t.start.index,s=t.end.index,l=x.eventCount,d=a.collidingEvents(t.events(),o,s),u=o!==s?5:4,d.push({element:n,start:o,end:s}),c=a.createRows(d),h=0,p=Math.min(c.length,l);h<p;h++)for(f=c[h].events,m=x.offsetTop+x.firstChildTop+x.firstChildHeight+h*y+3*h+"px",v=0,_=f.length;v<_;v++)f[v].element[0].style.top=m;if(c.length>l)for(b=o;b<=s;b++){if(k=t.collection,w=k.at(b),w.more)return;w.more=e(g({ns:r.ns,start:b,end:b,width:w.clientWidth-2,left:w.offsetLeft+2,top:w.offsetTop+w.firstChildTop+w.firstChildHeight+l*y+3*l})),this.content[0].appendChild(w.more[0])}else t.addEvent({element:n,start:o,end:s,groupIndex:x.groupIndex}),n[0].style.width=t.innerWidth()-u+"px",n[0].style.left=x.offsetLeft+2+"px",n[0].style.height=y+"px",i._continuousEvents.push({element:n,uid:n.attr(r.attr("uid")),start:t.start,end:t.end}),n.appendTo(this.content)},_slotByPosition:function(e,t){var n,i,r=this.content.offset();for(e-=r.left,t-=r.top,t+=this.content[0].scrollTop,e+=this.content[0].scrollLeft,e=Math.ceil(e),t=Math.ceil(t),n=0;n<this.groups.length;n++)if(i=this._groupedView._getTimeSlotByPosition(e,t,n))return i;return null},_appendResizeHint:function(e){e.appendTo(this.content),this._resizeHint=this._resizeHint.add(e)},_updateResizeHint:function(e,t,n,i){var o,a,s;for(this._removeResizeHint(),o=this.groups[t],a=o.ranges(n,i,!0,e.isAllDay),s=0;s<a.length;s++)this._groupedView._createResizeHint(a[s]);this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(r.toString(r.timezone.toLocalDate(n),"M/dd")),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(r.toString(r.timezone.toLocalDate(i),"M/dd"))},_updateMoveHint:function(e,t,n){var i,o=r.date.toUtcTime(e.start)+n,a=o+e.duration(),s=this.groups[t],l=s.ranges(o,a,!0,e.isAllDay);for(this._removeMoveHint(e.uid),i=0;i<l.length;i++)this._groupedView._createMoveHint(l[i],e)},_appendMoveHint:function(e){e.appendTo(this.content),this._moveHint=this._moveHint.add(e)},_groups:function(){var e,t=this._groupCount(),n=this.content[0].getElementsByTagName("tr"),i=this.startDate();for(this.groups=[],e=0;e<t;e++)this._addResourceView(e);this._groupedView._addDaySlotCollections(t,n,i)},addDaySlot:function(e,t,n,i){var o,a=t.clientHeight,s=t.children.length?t.children[0].offsetHeight+3:0,l=r.date.addDays(n,i),d=r.date.MS_PER_DAY;n.getHours()!==l.getHours()&&(d+=(n.getHours()-l.getHours())*r.date.MS_PER_HOUR),l=r.date.toUtcTime(l),d+=l,o=Math.floor((a-s-this.options.moreButtonHeight)/(this.options.eventHeight+3)),t.setAttribute("role","gridcell"),t.setAttribute("aria-selected",!1),e.addDaySlot(t,l,d,o)},render:function(e){this.content.children(".k-event,.k-more-events,.k-events-container").remove(),this._groups(),e=new r.data.Query(e).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray();var t=this.groupedResources;t.length?this._renderGroups(e,t,0,1):this._renderEvents(e,0),this.refreshLayout(),this.trigger("activate")},_renderEvents:function(e,t){var n,i,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b;for(i=0,o=e.length;i<o;i++)if(n=e[i],this._isInDateSlot(n))if(d=this.groups[t],u=this._groupedView._view,c=u._isMobilePhoneView(),d._continuousEvents||(d._continuousEvents=[]),h=d.slotRanges(n,!0),p=h.length,c)for(a=h[0],s=a.start.start,l=a.end.end,f=new Date(Math.max(n.start.getTime(),r.timezone.toLocalDate(a.start.start))),m=new Date(Math.min(n.end.getTime(),r.timezone.toLocalDate(h[h.length-1].end.end))).getTime(),g=new Date(s),v=new Date(s);f.getTime()<m;)_=d.daySlotRanges(g,v,!0)[0],v.setDate(v.getDate()+1),g.setDate(g.getDate()+1),this._groupedView._positionEvent(n,d,_,1,s,l,0),f=r.date.addDays(f,1);else for(b=0;b<p;b++)a=h[b],s=n.start,l=n.end,this._groupedView._positionEvent(n,d,a,p,s,l,b)},_renderGroups:function(e,t,n,i){var o,s,l,d,u=t[0];if(u)for(o=u.dataSource.view(),s=0;s<o.length;s++)l=this._resourceValue(u,o[s]),d=new r.data.Query(e).filter({field:u.field,operator:a.groupEqFilter(l)}).toArray(),t.length>1?n=this._renderGroups(d,t.slice(1),n++,i+1):this._renderEvents(d,n++);return n},_groupCount:function(){var e=this.groupedResources,t=this._groupedView;return e.length?this._isVerticallyGrouped()?t._verticalGroupCount(e.length-1):t._horizontalGroupCount(e.length):1},_columnOffsetForResource:function(e){return this._columnCountForLevel(e)/this._columnCountForLevel(e-1)},destroy:function(){this.table&&this.table.removeClass("k-scheduler-monthview"),this.content&&this.content.off(s),this.element&&this.element.off(s),a.fn.destroy.call(this),this._isMobile()&&!this._isMobilePhoneView()&&this.options.editable&&(this.options.editable.create!==!1&&this._addUserEvents.destroy(),
this.options.editable.update!==!1&&this._editUserEvents.destroy())},events:["remove","add","edit","navigate"],options:{title:"Month",name:"month",eventHeight:25,moreButtonHeight:13,editable:!0,selectedDateFormat:"{0:y}",selectedShortDateFormat:"{0:y}",groupHeaderTemplate:"#=text#",dayTemplate:p,eventTemplate:m}})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.recurrence.min",["kendo.dropdownlist.min","kendo.datepicker.min","kendo.numerictextbox.min"],e)}(function(){return function(e,t){function n(e,t){var n;return 0!==e&&e<t?n=t-e:(n=e%t,n&&(n=t-n)),n}function i(e){var t=e.getMonth(),n=g(e)?ie[t]:re[t];return n+e.getDate()}function r(e,n){var i,r;return e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),ee(e,0),i=e.getFullYear(),n!==t?(Z(e,n,-1),e.setDate(e.getDate()+4)):e.setDate(e.getDate()+(4-(e.getDay()||7))),ee(e,0),r=Math.floor((e.getTime()-new Date(i,0,1,(-6)))/864e5),1+Math.floor(r/7)}function o(e,t){var n=te(e).getDay(),i=7-(n+7-(t||7))||7;return i<0&&(i+=7),Math.ceil((e.getDate()-i)/7)+1}function a(e,t){return e+(e<t?7:0)}function s(e,t,n){var i,r,s,l,d,u=t.offset;return u?(i=new Date(e.getFullYear(),e.getMonth()+1,0),r=o(i,n),s=a(t.day,n),l=s<a(new Date(e.getFullYear(),e.getMonth(),1).getDay(),n),d=s>a(i.getDay(),n),u<0?u=r+(u+1-(d?1:0)):l&&(u+=1),r-=d?1:0,u<(l?1:0)||u>r?null:u):o(e,n)}function l(e,t){return o(new Date(e.getFullYear(),e.getMonth()+1,0),t)}function d(e,t,n){return o(e,n)===s(e,t,n)}function u(e,t,n){for(var i,r,l,d,u=a(t.getDay(),n),c=e.length,h=[],p=0;p<c;p++)if(r=e[p],d=o(t,n),i=s(t,r,n),null!==i)if(d<i)h.push(r);else if(d===i)if(l=a(r.day,n),u<l)h.push(r);else if(u===l)return null;return h}function c(e,t,n){for(var i,r=0,o=e.length,a=[];r<o;r++){if(i=e[r],n&&(i=n(i)),t===i)return null;t<i&&a.push(i)}return a}function h(e,t){for(var n,i=0,r=e.length;i<r;i++){if(n=parseInt(e[i],10),isNaN(n)||n<t.start||n>t.end||0===n&&t.start<0)return null;e[i]=n}return e.sort(v)}function p(e){for(var n,i,r,o=0,a=e.length;o<a;o++){if(n=e[o],i=n.length,r=n.substring(i-2).toUpperCase(),r=se[r],r===t)return null;e[o]={offset:parseInt(n.substring(0,i-2),10)||0,day:r}}return e}function f(e){for(var t,n,i=0,r=e.length,o=[];i<r;i++)t=e[i],"string"==typeof t?n=t:(n=""+ae[t.day],t.offset&&(n=t.offset+n)),o.push(n);return""+o}function m(e){var t=e.getMonth();return 1===t?1===new Date(e.getFullYear(),1,29).getMonth()?29:28:oe[t]}function g(e){return e=e.getFullYear(),e%4===0&&e%100!==0||e%400===0}function v(e,t){return e-t}function _(e,t){var n,i,r=0,o=[];if(e)for(e=e.split(e.indexOf(";")!==-1?";":","),n=e.length;r<n;r++)i=F(e[r],t),i&&o.push(i);return o}function b(t,n,i){for(var r=e.isArray(t)?t:_(t,i),o=n.getTime()-n.getMilliseconds(),a=0,s=r.length;a<s;a++)if(r[a].getTime()===o)return!0;return!1}function k(e,t){var n,i,r=0,o=[].concat(e);for(n=o.length;r<n;r++)i=o[r],i=j.timezone.convert(i,t||i.getTimezoneOffset(),"Etc/UTC"),o[r]=j.toString(i,ce);return o.join(",")}function w(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),0,1);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth(),1);break;case"weekly":Z(n,t.weekStart,-1)}return t.hours&&n.setHours(0),t.minutes&&n.setMinutes(0),t.seconds&&n.setSeconds(0),n}function y(e,t){var n=new Date(e);switch(t.freq){case"yearly":n.setFullYear(n.getFullYear(),11,31);break;case"monthly":n.setFullYear(n.getFullYear(),n.getMonth()+1,0);break;case"weekly":Z(n,t.weekStart,-1),n.setDate(n.getDate()+6)}return t.hours&&n.setHours(23),t.minutes&&n.setMinutes(59),t.seconds&&n.setSeconds(59),n}function x(e,t,n){var i,r,o,a,s=e.length,l=[];for(o=0,a=n.length;o<a;o++)i=n[o],i<0?i=s+i:i-=1,r=e[i],r&&r.start>=t&&l.push(r);return l}function C(e,t,n){var i,r,o=[];for(r=0;r<e.length;r++)i=e[r],b(t,i.start,n)||o.push(i);return o}function T(e,n,i,r){var o,a,s,l,d,u,c,h,p,f,m,g,v,T,F,E,I,R,M,z,H,N,B,P,L,O,V,W,U,q,j,G,$,K,Y,Q,Z=A(e.recurrenceRule,r),ee=[];if(!Z)return[e];for(z=Z.positions,H=z?0:1,f=Z.start,m=Z.end,(f||m)&&(e=e.clone({start:f?new Date(f.value[0]):t,end:m?new Date(m.value[0]):t})),I=e.start,E=I.getTime(),F=ne(I),T=_(e.recurrenceException,r),!T[0]&&Z.exdates&&(T=Z.exdates.value,e.set("recurrenceException",k(T,r))),h=n=new Date(n),i=new Date(i),v=Z.freq,M=be[v],R=Z.count,Z.until&&Z.until<i&&(i=new Date(Z.until)),g="yearly"===v||"monthly"===v||"weekly"===v,n<E||R||Z.interval>1||g?n=new Date(E):(l=n.getHours(),d=n.getMinutes(),u=n.getSeconds(),Z.hours||(l=I.getHours()),Z.minutes||(d=I.getMinutes()),Z.seconds||(u=I.getSeconds()),n.setHours(l,d,u,I.getMilliseconds())),Z._startPeriod=new Date(n),z&&(n=w(n,Z),i=y(i,Z),V=ne(i)-ne(n),V<0&&(l=n.getHours(),i.setHours(l,n.getMinutes(),n.getSeconds(),n.getMilliseconds()),X.adjustDST(i,l)),Z._startPeriod=new Date(n),Z._endPeriod=y(n,Z)),c=e.duration(),Z._startTime=o=X.toInvariantTime(n),M.setup&&M.setup(Z,I,n),M.limit(n,i,Z);n<=i;)if(s=new Date(n),J(s,c),p=n>=h||s>h,(p&&!b(T,n,r)||z)&&(o=X.toUtcTime(X.getDate(n))+ne(Z._startTime),a=o+c,E!==n.getTime()||F!==ne(Z._startTime)?(e.isAllDay||(W=e.startTimezone||e.endTimezone,U=e.endTimezone||e.startTimezone,(r&&W||!r&&!W)&&(q=D(n,r)-D(e.start,r),j=D(s,r)-D(e.end,r),G=D(n,W)-D(e.start,W),$=D(s,U)-D(e.end,U),q!==G&&(K=6e4*(q-G),B=new Date(n.getTime()-K),L=o-K),j!==$&&(Y=6e4*(j-$),P=new Date(s.getTime()-Y),O=a-Y))),ee.push(e.toOccurrence({start:B||new Date(n),end:P||s,_startTime:L||o,_endTime:O||a})),B=P=L=O=null):(e._startTime=o,e._endTime=a,ee.push(e))),z){if(M.next(n,Z),M.limit(n,i,Z),n>Z._endPeriod&&(N=x(ee.slice(H),I,z),N=C(N,T,r),ee=ee.slice(0,H).concat(N),Z._endPeriod=y(n,Z),H=ee.length),R&&R===H)break}else{if(R&&R===H)break;H+=1,Q=S(n),M.next(n,Z),Q&&"hourly"!==Z.freq&&X.toInvariantTime(e.start).getTime()!==X.toInvariantTime(n).getTime()&&(Z._startTime=o=new Date(n.getTime()-36e5)),M.limit(n,i,Z)}return ee}function S(e){var t=e.getTimezoneOffset(),n=new Date(e.getTime()-36e5),i=n.getTimezoneOffset();return t<i}function D(e,t){return t?j.timezone.offset(e,t):e.getTimezoneOffset()}function F(e,t){return e=j.parseDate(e,le),e&&t&&(e=G.apply(e,t)),e}function E(e,t){var n,i,r,o,a,s,l,d,u=e.split(";");for(l=0,d=u.length;l<d;l++)if(n=u[l].split(":"),i=n[0],r=n[1],i.indexOf("TZID")!==-1&&(o=i.substring(i.indexOf("TZID")).split("=")[1]),r)for(r=r.split(","),a=0,s=r.length;a<s;a++)r[a]=F(r[a],o||t);if(r)return{value:r,tzid:o}}function A(n,i){var r,o,a,s,l,d,u,c,f,m={},g=0,v=!1,_=function(e,t){var n=e.day,i=t.day;return n<c&&(n+=7),i<c&&(i+=7),n-i};if(!n)return null;for(d=n.split("\n"),d[1]||n.indexOf("DTSTART")===-1&&n.indexOf("DTEND")===-1&&n.indexOf("EXDATE")===-1||(d=n.split(" ")),g=0,a=d.length;g<a;g++)l=e.trim(d[g]),l.indexOf("DTSTART")!==-1?m.start=E(l,i):l.indexOf("DTEND")!==-1?m.end=E(l,i):l.indexOf("EXDATE")!==-1?m.exdates=E(l,i):l.indexOf("RRULE")!==-1?s=l.substring(6):e.trim(l)&&(s=l);for(s=s.split(";"),g=0,a=s.length;g<a;g++)switch(u=s[g],r=u.split("="),o=e.trim(r[1]).split(","),e.trim(r[0]).toUpperCase()){case"FREQ":m.freq=o[0].toLowerCase();break;case"UNTIL":m.until=F(o[0],i);break;case"COUNT":m.count=parseInt(o[0],10);break;case"INTERVAL":m.interval=parseInt(o[0],10);break;case"BYSECOND":m.seconds=h(o,{start:0,end:60}),v=!0;break;case"BYMINUTE":m.minutes=h(o,{start:0,end:59}),v=!0;break;case"BYHOUR":m.hours=h(o,{start:0,end:23}),v=!0;break;case"BYMONTHDAY":m.monthDays=h(o,{start:-31,end:31}),v=!0;break;case"BYYEARDAY":m.yearDays=h(o,{start:-366,end:366}),v=!0;break;case"BYMONTH":m.months=h(o,{start:1,end:12}),v=!0;break;case"BYDAY":m.weekDays=f=p(o),v=!0;break;case"BYWEEKNO":m.weeks=h(o,{start:-53,end:53}),v=!0;break;case"BYSETPOS":m.positions=h(o,{start:-366,end:366});break;case"WKST":m.weekStart=c=se[o[0]]}return m.freq===t||m.count!==t&&m.until?null:(m.interval||(m.interval=1),c===t&&(m.weekStart=c=j.culture().calendar.firstDay),f&&(m.weekDays=f.sort(_)),m.positions&&!v&&(m.positions=null),m._hasRuleValue=v,m)}function I(e,t){for(var n,i=e.value,r=e.tzid||"",o=i.length,a=0;a<o;a++)n=i[a],n=G.convert(n,r||t||n.getTimezoneOffset(),"Etc/UTC"),i[a]=j.toString(n,"yyyyMMddTHHmmssZ");return r&&(r=";TZID="+r),r+":"+i.join(",")+" "}function R(e,n){var i=e.weekStart,r="FREQ="+e.freq.toUpperCase(),o=e.exdates||"",a=e.start||"",s=e.end||"",l=e.until;return e.interval>1&&(r+=";INTERVAL="+e.interval),e.count&&(r+=";COUNT="+e.count),l&&(l=G.convert(l,n||l.getTimezoneOffset(),"Etc/UTC"),r+=";UNTIL="+j.toString(l,"yyyyMMddTHHmmssZ")),e.months&&(r+=";BYMONTH="+e.months),e.weeks&&(r+=";BYWEEKNO="+e.weeks),e.yearDays&&(r+=";BYYEARDAY="+e.yearDays),e.monthDays&&(r+=";BYMONTHDAY="+e.monthDays),e.weekDays&&(r+=";BYDAY="+f(e.weekDays)),e.hours&&(r+=";BYHOUR="+e.hours),e.minutes&&(r+=";BYMINUTE="+e.minutes),e.seconds&&(r+=";BYSECOND="+e.seconds),e.positions&&(r+=";BYSETPOS="+e.positions),i!==t&&(r+=";WKST="+ae[i]),a&&(a="DTSTART"+I(a,n)),s&&(s="DTEND"+I(s,n)),o&&(o="EXDATE"+I(o,n)),(a||s||o)&&(r=a+s+o+"RRULE:"+r),r}var M,z,H,N,B,P,L,O,V,W,U,q,j=window.kendo,G=j.timezone,$=j.Class,K=j.ui,Y=K.Widget,Q=K.DropDownList,X=j.date,J=X.setTime,Z=X.setDayOfWeek,ee=X.adjustDST,te=X.firstDayOfMonth,ne=X.getMilliseconds,ie=[0,31,60,91,121,152,182,213,244,274,305,335,366],re=[0,31,59,90,120,151,181,212,243,273,304,334,365],oe=[31,28,31,30,31,30,31,31,30,31,30,31],ae={0:"SU",1:"MO",2:"TU",3:"WE",4:"TH",5:"FR",6:"SA"},se={SU:0,MO:1,TU:2,WE:3,TH:4,FR:5,SA:6},le=["yyyy-MM-ddTHH:mm:ss.fffzzz","yyyy-MM-ddTHH:mm:sszzz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm","yyyy-MM-ddTHH","yyyy-MM-dd","yyyyMMddTHHmmssfffzzz","yyyyMMddTHHmmsszzz","yyyyMMddTHHmmss","yyyyMMddTHHmm","yyyyMMddTHH","yyyyMMdd"],de=["months","weeks","yearDays","monthDays","weekDays","hours","minutes","seconds"],ue=de.length,ce="yyyyMMddTHHmmssZ",he={months:function(e,t,n){var i=n.months,r=c(i,e.getMonth()+1),o=!1;return null!==r&&(r.length?e.setMonth(r[0]-1,1):e.setFullYear(e.getFullYear()+1,i[0]-1,1),o=!0),o},monthDays:function(e,t,n){for(var i,r,o,a=!1,s=e.getHours(),l=function(e){return e<0&&(e=i+e+1),e};e<=t;){if(r=e.getMonth(),i=m(e),o=c(n.monthDays,e.getDate(),l),null===o)return a;if(a=!0,o.length){if(e.setMonth(r,o.sort(v)[0]),ee(e,s),r===e.getMonth())break}else e.setMonth(r+1,1)}return a},yearDays:function(e,t,n){for(var r,o,a=!1,s=e.getHours(),l=function(e){return e<0&&(e=r+e),e};e<t;){if(r=g(e)?366:365,o=c(n.yearDays,i(e),l),null===o)return a;if(a=!0,r=e.getFullYear(),o.length){e.setFullYear(r,0,o.sort(v)[0]),ee(e,s);break}e.setFullYear(r+1,0,1)}return a},weeks:function(e,t,n){for(var i,o,a,s=n.weekStart,l=!1,d=e.getHours(),u=function(e){return e<0&&(e=53+e),e};e<t;){if(o=c(n.weeks,r(e,s),u),null===o)return l;if(l=!0,i=e.getFullYear(),o.length){a=7*o.sort(v)[0]-1,e.setFullYear(i,0,a),Z(e,s,-1),ee(e,d);break}e.setFullYear(i+1,0,1)}return l},weekDays:function(e,t,n){var i,r,a=n.weekDays,s=n.weekStart,c=u(a,e,s),h=e.getHours();if(null===c)return!1;if(i=c[0],i||(i=a[0],Z(e,s)),r=i.day,i.offset)for(;e<=t&&!d(e,i,s);)o(e,s)===l(e,s)?(e.setMonth(e.getMonth()+1,1),ee(e,h)):(e.setDate(e.getDate()+7),ee(e,h),Z(e,s,-1));return e.getDay()!==r&&Z(e,r),!0},hours:function(e,t,n){var i=n.hours,r=n._startTime,o=r.getHours(),a=c(i,o),s=!1;return null!==a&&(s=!0,e.setHours(o),ee(e,o),a.length?(a=a[0],e.setHours(a)):(a=e.getHours(),e.setDate(e.getDate()+1),ee(e,a),a=i[0],e.setHours(a),ee(e,a)),n.minutes&&e.setMinutes(0),r.setHours(a,e.getMinutes())),s},minutes:function(e,t,n){var i=n.minutes,r=e.getMinutes(),o=c(i,r),a=n._startTime.getHours(),s=!1;return null!==o&&(s=!0,o.length?o=o[0]:(a+=1,o=i[0]),n.seconds&&e.setSeconds(0),e.setHours(a,o),a%=24,ee(e,a),n._startTime.setHours(a,o,e.getSeconds())),s},seconds:function(e,t,n){var i=n.seconds,r=n._startTime.getHours(),o=c(i,e.getSeconds()),a=e.getMinutes(),s=!1;return null!==o&&(s=!0,o.length?e.setSeconds(o[0]):(a+=1,e.setMinutes(a,i[0]),a>59&&(a%=60,r=(r+1)%24)),n._startTime.setHours(r,a,e.getSeconds())),s}},pe=$.extend({next:function(e,t){var n,i,r=t._startTime,o=r.getDate();if(t.seconds)i=e.getSeconds()+1,e.setSeconds(i),r.setSeconds(i),r.setDate(o);else{if(!t.minutes)return!1;n=e.getMinutes()+1,e.setMinutes(n),r.setMinutes(n),r.setDate(o)}return!0},normalize:function(e){var t=e.rule;4===e.idx&&t.hours&&(t._startTime.setHours(0),this._hour(e.date,t))},limit:function(e,n,i){for(var r,o,a,s,l,d=i.interval;e<=n;){for(a=o=t,l=e.getDate(),s=0;s<ue;s++){if(r=de[s],i[r]){if(a=he[r](e,n,i),o!==t&&a)break;o=a}a&&this.normalize({date:e,rule:i,day:l,idx:s})}if((1===d||!this.interval(i,e))&&s===ue)break}},interval:function(e,t){var i,r,o,s,l=new Date(e._startPeriod),d=new Date(t),u=t.getHours(),c=e.weekStart,h=e.interval,p=e.freq,f=!1,m=0,g=0,v=1;return"hourly"===p?(i=d.getTimezoneOffset()-l.getTimezoneOffset(),r=e._startTime.getHours(),d=d.getTime(),u!==r&&(d+=(r-u)*X.MS_PER_HOUR),d-=l,i&&(d-=i*X.MS_PER_MINUTE),i=Math.floor(d/X.MS_PER_HOUR),m=n(i,h),0!==m&&(this._hour(t,e,m),f=!0)):"daily"===p?(X.setTime(d,-l,!0),i=Math.round(d/X.MS_PER_DAY),m=n(i,h),0!==m&&(this._date(t,e,m),f=!0)):"weekly"===p?(m=this._getNumberOfWeeksBetweenDates(l,t),o=a(t.getDay(),c),s=a(l.getDay(),c),o<s&&(m+=1),m=n(m,h),0!==m&&(X.setDayOfWeek(t,e.weekStart,-1),t.setDate(t.getDate()+7*m),ee(t,u),f=!0)):"monthly"===p?(i=t.getFullYear()-l.getFullYear(),i=t.getMonth()-l.getMonth()+12*i,m=n(i,h),0!==m&&(v=e._hasRuleValue?1:t.getDate(),t.setFullYear(t.getFullYear(),t.getMonth()+m,v),ee(t,u),f=!0)):"yearly"===p&&(i=t.getFullYear()-l.getFullYear(),m=n(i,h),e.months||(g=t.getMonth()),e.yearDays||e.monthDays||e.weekDays||(v=t.getDate()),0!==m&&(t.setFullYear(t.getFullYear()+m,g,v),ee(t,u),f=!0)),f},_getNumberOfWeeksBetweenDates:function(e,t){var n=(t-e)/6048e5,i=Math.floor(n);return n-i>.99&&(i=Math.round(n)),i},_hour:function(e,t,n){var i=t._startTime,r=i.getHours();n&&(r+=n),e.setHours(r),r%=24,i.setHours(r),ee(e,r)},_date:function(e,t,n){var i=e.getHours();e.setDate(e.getDate()+n),ee(e,i)||this._hour(e,t)}}),fe=pe.extend({next:function(e,t){pe.fn.next(e,t)||this._hour(e,t,1)},normalize:function(e){var t=e.rule;4===e.idx&&(t._startTime.setHours(0),this._hour(e.date,t))}}),me=pe.extend({next:function(e,t){pe.fn.next(e,t)||this[t.hours?"_hour":"_date"](e,t,1)}}),ge=me.extend({setup:function(e,t){e.weekDays||(e.weekDays=[{day:t.getDay(),offset:0}])}}),ve=pe.extend({next:function(e,t){var n,i;if(!pe.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else{for(n=e.getDate(),i=e.getHours(),e.setMonth(e.getMonth()+1),ee(e,i);e.getDate()!==n;)e.setDate(n),ee(e,i);this._hour(e,t)}},normalize:function(e){var t=e.rule,n=e.date,i=n.getHours();0!==e.idx||t.monthDays||t.weekDays?pe.fn.normalize(e):(n.setDate(e.day),ee(n,i))},setup:function(e,t,n){e.monthDays||e.weekDays||n.setDate(t.getDate())}}),_e=ve.extend({next:function(e,t){var n,i=e.getHours();if(!pe.fn.next(e,t))if(t.hours)this._hour(e,t,1);else if(t.monthDays||t.weekDays||t.yearDays||t.weeks)this._date(e,t,1);else if(t.months){for(n=e.getDate(),e.setMonth(e.getMonth()+1),ee(e,i);e.getDate()!==n;)e.setDate(n),ee(e,i);this._hour(e,t)}else e.setFullYear(e.getFullYear()+1),ee(e,i),this._hour(e,t)},setup:function(){}}),be={hourly:new fe,daily:new me,weekly:new ge,monthly:new ve,yearly:new _e},ke="click";j.recurrence={rule:{parse:A,serialize:R},expand:T,dayInYear:i,weekInYear:r,weekInMonth:o,numberOfWeeks:l,isException:b,toExceptionString:k},M=function(e){for(var t=j.culture().calendar.days.namesShort,n=t.length,i="",r=0,o=[];r<n;r++)o.push(r);for(t=t.slice(e).concat(t.slice(0,e)),o=o.slice(e).concat(o.slice(0,e)),r=0;r<n;r++)i+='<label class="k-check"><input class="k-recur-weekday-checkbox" type="checkbox" value="'+o[r]+'" /> '+t[r]+"</label>";return i},z=j.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" title="#:messages.interval#"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-month-radio" type="radio" name="month" value="monthday" title="#:messages.day#" />#:messages.day#</label><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-month-radio" type="radio" name="month" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#" /></li></ul></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field"><ul class="k-reset"><li><input class="k-recur-year-radio" type="radio" name="year" value="monthday" title="#:messages.repeatOn#" /><input class="k-recur-month" title="#:messages.repeatOn#" /><input class="k-recur-monthday" title="#:messages.day#" /></li><li><input class="k-recur-year-radio" type="radio" name="year" value="weekday" title="#:messages.repeatOn#" /><input class="k-recur-weekday-offset" title="#:messages.repeatOn#" /><input class="k-recur-weekday" title="#:messages.day#" />#:messages.of#<input class="k-recur-month" title="#:messages.of#"/></li></ul></div># } ## if (frequency !== "never") { #<div class="k-edit-label"><label>#:end.label#</label></div><div class="k-edit-field"><ul class="k-reset"><li><label><input class="k-recur-end-never" type="radio" name="end" value="never" />#:end.never#</label></li><li><label><input class="k-recur-end-count" type="radio" name="end" value="count" />#:end.after#</label><input class="k-recur-count" title="#:end.occurrence#" />#:end.occurrence#</li><li><label><input class="k-recur-end-until" type="radio" name="end" value="until" />#:end.on#</label><input class="k-recur-until" title="#:end.on#" /></li></ul></div># } #'),H=[{day:0,offset:0},{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0},{day:6,offset:0}],N=[{day:1,offset:0},{day:2,offset:0},{day:3,offset:0},{day:4,offset:0},{day:5,offset:0}],B=[{day:0,offset:0},{day:6,offset:0}],P=Y.extend({init:function(e,t){var n,i=this,r=t&&t.frequencies;Y.fn.init.call(i,e,t),i.wrapper=i.element,t=i.options,t.start=n=t.start||X.today(),r&&(t.frequencies=r),"string"==typeof n&&(t.start=j.parseDate(n,"yyyyMMddTHHmmss")),null===t.firstWeekDay&&(t.firstWeekDay=j.culture().calendar.firstDay),i._namespace="."+t.name},options:{value:"",start:"",timezone:"",spinners:!0,firstWeekDay:null,frequencies:["never","daily","weekly","monthly","yearly"],mobile:!1,messages:{recurrenceEditorTitle:"Recurrence editor",frequencies:{never:"Never",hourly:"Hourly",daily:"Daily",weekly:"Weekly",monthly:"Monthly",yearly:"Yearly"},hourly:{repeatEvery:"Repeat every: ",interval:" hour(s)"},daily:{repeatEvery:"Repeat every: ",interval:" day(s)"},weekly:{interval:" week(s)",repeatEvery:"Repeat every: ",repeatOn:"Repeat on: "},monthly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" month(s)",day:"Day "},yearly:{repeatEvery:"Repeat every: ",repeatOn:"Repeat on: ",interval:" year(s)",of:" of "},end:{label:"End:",mobileLabel:"Ends",never:"Never",after:"After ",occurrence:" occurrence(s)",on:"On "},offsetPositions:{first:"first",second:"second",third:"third",fourth:"fourth",last:"last"},weekdays:{day:"day",weekday:"weekday",weekend:"weekend day"}}},events:["change"],_initInterval:function(){var e=this,t=e._value;e._container.find(".k-recur-interval").kendoNumericTextBox({spinners:e.options.spinners,value:t.interval||1,decimals:0,format:"#",min:1,change:function(){t.interval=this.value(),e._trigger()}})},_weekDayRule:function(e){var t=this,n=(t._weekDay.element||t._weekDay).val(),i=+(t._weekDayOffset.element||t._weekDayOffset).val(),r=null,o=null;e||("day"===n?(r=H,o=i):"weekday"===n?(r=N,o=i):"weekend"===n?(r=B,o=i):r=[{offset:i,day:+n}]),t._value.weekDays=r,t._value.positions=o},_weekDayView:function(){var e,t,n,i,r=this,o=r._value.weekDays,a=r._value.positions,s=r._weekDayOffset;o&&(n=o.length,a&&(7===n?(t="day",e=a):5===n?(t="weekday",e=a):2===n&&(t="weekend",e=a)),t||(o=o[0],t=o.day,e=o.offset||""),i=s.value?"value":"val",s[i](e),r._weekDay[i](t))},_initWeekDay:function(){var t,n=this,i=n.options.messages.weekdays,r=n.options.messages.offsetPositions,o=n._container.find(".k-recur-weekday"),a=function(){n._weekDayRule(),n._trigger()};o[0]&&(n._weekDayOffset=new Q(n._container.find(".k-recur-weekday-offset"),{change:a,dataTextField:"text",dataValueField:"value",dataSource:[{text:r.first,value:"1"},{text:r.second,value:"2"},{text:r.third,value:"3"},{text:r.fourth,value:"4"},{text:r.last,value:"-1"}]}),t=[{text:i.day,value:"day"},{text:i.weekday,value:"weekday"},{text:i.weekend,value:"weekend"}],n._weekDay=new Q(o,{value:n.options.start.getDay(),change:a,dataTextField:"text",dataValueField:"value",dataSource:t.concat(e.map(j.culture().calendar.days.names,function(e,t){return{text:e,value:t}}))}),n._weekDayView())},_initWeekDays:function(){var t,n,i,r,o,a=this,s=a._value,l=a._container.find(".k-recur-weekday-checkbox");if(l[0]&&(l.on(ke+a._namespace,function(){s.weekDays=e.map(l.filter(":checked"),function(e){return{day:+e.value,offset:0}}),a.options.mobile||a._trigger()}),s.weekDays))for(i=0,r=l.length,o=s.weekDays.length;i<r;i++)for(n=l[i],t=0;t<o;t++)n.value==s.weekDays[t].day&&(n.checked=!0)},_initMonthDay:function(){var e=this,t=e._value,n=e._container.find(".k-recur-monthday");n[0]&&(e._monthDay=new j.ui.NumericTextBox(n,{spinners:e.options.spinners,min:1,max:31,decimals:0,format:"#",value:t.monthDays?t.monthDays[0]:e.options.start.getDate(),change:function(){var n=this.value();t.monthDays=n?[n]:n,e._trigger()}}))},_initCount:function(){var e=this,t=e._container.find(".k-recur-count"),n=e._value;e._count=t.kendoNumericTextBox({spinners:e.options.spinners,value:n.count||1,decimals:0,format:"#",min:1,change:function(){n.count=this.value(),e._trigger()}}).data("kendoNumericTextBox")},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),n=e.options.start,i=e._value,r=i.until;e._until=t.kendoDatePicker({min:r&&r<n?r:n,value:r||new Date(n.getFullYear(),n.getMonth(),n.getDate(),23,59,59),change:function(){var t=this.value();i.until=new Date(t.getFullYear(),t.getMonth(),t.getDate(),23,59,59),e._trigger()}}).data("kendoDatePicker")},_trigger:function(){this.options.mobile||this.trigger("change")}}),L=P.extend({init:function(e,t){var n=this;P.fn.init.call(n,e,t),n._initFrequency(),n._initContainer(),n.value(n.options.value)},options:{name:"RecurrenceEditor"},events:["change"],destroy:function(){var e=this;e._frequency.destroy(),e._container.find("input[type=radio],input[type=checkbox]").off(ke+e._namespace),j.destroy(e._container),P.fn.destroy.call(e)},value:function(e){var n,i=this,r=i.options.timezone;return e===t?i._value.freq?R(i._value,r):"":(i._value=A(e,r)||{},n=i._value.freq,n?i._frequency.value(n):i._frequency.select(0),i._initView(i._frequency.value()),t)},_initContainer:function(){var t=this.element,n=e('<div class="k-recur-view" />'),i=t.parent(".k-edit-field");i[0]?n.insertAfter(i):t.append(n),this._container=n},_initFrequency:function(){var t,n=this,i=n.options,r=i.frequencies,o=i.messages.frequencies,a=e("<input />").attr({title:i.messages.recurrenceEditorTitle});r=e.map(r,function(e){return{text:o[e],value:e}}),t=r[0],t&&"never"===t.value&&(t.value=""),n.element.append(a),n._frequency=new Q(a,{dataTextField:"text",dataValueField:"value",dataSource:r,change:function(){n._value={},n._initView(n._frequency.value()),n.trigger("change")}})},_initView:function(e){var n=this,i=n._value,r=n.options,o={frequency:e||"never",weekDayCheckBoxes:M,firstWeekDay:r.firstWeekDay,messages:r.messages[e],end:r.messages.end};return j.destroy(n._container),n._container.html(z(o)),e?(i.freq=e,"weekly"!==e||i.weekDays||(i.weekDays=[{day:r.start.getDay(),offset:0}]),n._initInterval(),n._initWeekDays(),n._initMonthDay(),n._initWeekDay(),n._initMonth(),n._initCount(),n._initUntil(),n._period(),n._end(),t):(n._value={},t)},_initMonth:function(){var t,n=this,i=n._value,r=i.months||[n.options.start.getMonth()+1],o=n._container.find(".k-recur-month");o[0]&&(t={change:function(){i.months=[+this.value()],n.trigger("change")},dataTextField:"text",dataValueField:"value",dataSource:e.map(j.culture().calendar.months.names,function(e,t){return{text:e,value:t+1}})},n._month1=new Q(o[0],t),n._month2=new Q(o[1],t),r&&(r=r[0],n._month1.value(r),n._month2.value(r)))},_end:function(){var e,t=this,n=t._value,i=t._container,r=t._namespace,o=function(e){t._toggleEnd(e.currentTarget.value),t.trigger("change")};t._buttonNever=i.find(".k-recur-end-never").on(ke+r,o),t._buttonCount=i.find(".k-recur-end-count").on(ke+r,o),t._buttonUntil=i.find(".k-recur-end-until").on(ke+r,o),n.count?e="count":n.until&&(e="until"),t._toggleEnd(e)},_period:function(){var e=this,t=e._value,n="monthly"===t.freq,i=n?e._toggleMonthDay:e._toggleYear,r=".k-recur-"+(n?"month":"year")+"-radio",o=e._container.find(r);(n||"yearly"===t.freq)&&(o.on(ke+e._namespace,function(t){i.call(e,t.currentTarget.value),e.trigger("change")}),e._buttonMonthDay=o.eq(0),e._buttonWeekDay=o.eq(1),i.call(e,t.weekDays?"weekday":"monthday"))},_toggleEnd:function(e){var t,n,i,r,o=this;"count"===e?(o._buttonCount.prop("checked",!0),i=!0,r=!1,t=o._count.value(),n=null):"until"===e?(o._buttonUntil.prop("checked",!0),i=!1,r=!0,t=null,n=o._until.value()):(o._buttonNever.prop("checked",!0),i=r=!1,t=n=null),o._count&&o._count.enable(i),o._until&&o._until.enable(r),o._value.count=t,o._value.until=n},_toggleMonthDay:function(e){var t,n=this,i=!1,r=!0,o=!1;"monthday"===e?(n._buttonMonthDay.prop("checked",!0),t=[n._monthDay.value()],i=!0,r=!1,o=!0):(n._buttonWeekDay.prop("checked",!0),t=null),n._weekDay.enable(r),n._weekDayOffset.enable(r),n._monthDay.enable(i),n._value.monthDays=t,n._weekDayRule(o)},_toggleYear:function(e){var t,n=this,i=!1,r=!0;"monthday"===e?(i=!0,r=!1,t=n._month1.value()):t=n._month2.value(),n._month1.enable(i),n._month2.enable(r),n._value.months=[t],n._toggleMonthDay(e)}}),K.plugin(L),O=j.template('<div class="k-edit-label"><label>#:headerTitle#</label></div><div class="k-edit-field k-recur-pattern k-scheduler-toolbar"></div><div class="k-recur-view"></div>'),V=j.template('# if (frequency !== "never") { #<div class="k-edit-label"><label>#:messages.repeatEvery#</label></div><div class="k-edit-field"><input class="k-recur-interval" pattern="\\\\d*"/>#:messages.interval#</div># } ## if (frequency === "weekly") { #<div class="k-edit-label"><label>#:messages.repeatOn#</label></div><div class="k-edit-field">#=weekDayCheckBoxes(firstWeekDay)#</div># } else if (frequency === "monthly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" title="#:messages.day#" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset" title="#:messages.every#"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday" title="#:messages.day#"></select></div></div># } else if (frequency === "yearly") { #<div class="k-edit-label"><label>#:messages.repeatBy#</label></div><div class="k-edit-field k-scheduler-toolbar k-repeat-rule"></div><div class="k-monthday-view" style="display:none"><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><input class="k-recur-monthday" title="#:messages.day#" pattern="\\\\d*"/></div></div><div class="k-weekday-view" style="display:none"><div class="k-edit-label"><label>#:messages.every#</label></div><div class="k-edit-field"><select class="k-recur-weekday-offset" title="#:messages.every#"></select></div><div class="k-edit-label"><label>#:messages.day#</label></div><div class="k-edit-field"><select class="k-recur-weekday" title="#:messages.day#"></select></div></div><div class="k-edit-label"><label>#:messages.month#</label></div><div class="k-edit-field"><select class="k-recur-month" title="#:messages.month#"></select></div># } #'),W=j.template('# if (endPattern === "count") { #<div class="k-edit-label"><label>#:messages.after#</label></div><div class="k-edit-field"><input class="k-recur-count" pattern="\\\\d*" /></div># } else if (endPattern === "until") { #<div class="k-edit-label"><label>#:messages.on#</label></div><div class="k-edit-field"><input type="date" class="k-recur-until" /></div># } #'),U=j.template('<ul class="k-reset k-header k-scheduler-navigation">#for (var i = 0, length = dataSource.length; i < length; i++) {#<li class="k-state-default #= value === dataSource[i].value ? "k-state-selected" : "" #"><a role="button" href="\\#" class="k-link" data-#=ns#value="#=dataSource[i].value#">#:dataSource[i].text#</a></li>#}#</ul>'),q=P.extend({init:function(e,t){var n=this;P.fn.init.call(n,e,t),t=n.options,n._optionTemplate=j.template('<option value="#:value#">#:text#</option>'),n.value(t.value),n._pane=t.pane,n._initRepeatButton(),n._initRepeatEnd(),n._defaultValue=n._value},options:{name:"MobileRecurrenceEditor",animations:{left:"slide",right:"slide:right"},mobile:!0,messages:{cancel:"Cancel",update:"Save",endTitle:"Repeat ends",repeatTitle:"Repeat pattern",headerTitle:"Repeat event",end:{patterns:{never:"Never",after:"After...",on:"On..."},never:"Never",after:"End repeat after",on:"End repeat on"},daily:{interval:""},hourly:{interval:""},weekly:{interval:""},monthly:{interval:"",repeatBy:"Repeat by: ",dayOfMonth:"Day of the month",dayOfWeek:"Day of the week",repeatEvery:"Repeat every",every:"Every",day:"Day "},yearly:{interval:"",repeatBy:"Repeat by: ",dayOfMonth:"Day of the month",dayOfWeek:"Day of the week",repeatEvery:"Repeat every: ",every:"Every",month:"Month",day:"Day"}}},events:["change"],value:function(e){var n=this,i=n.options.timezone;return e===t?n._value.freq?R(n._value,i):"":(n._value=A(e,i)||{},t)},destroy:function(){this._destroyView(),j.destroy(this._endFields),this._repeatButton.off(ke+this._namespace),P.fn.destroy.call(this)},_initRepeatButton:function(){var t=this,n=t.options.messages.frequencies[this._value.freq||"never"];t._repeatButton=e('<a href="#" class="k-button k-scheduler-recur">'+n+"</a>").on(ke+t._namespace,function(e){e.preventDefault(),t._createView("repeat"),t._pane.navigate("recurrence",t.options.animations.left)}),t.element.append(t._repeatButton)},_initRepeatEnd:function(){var t=this,n=e('<div class="k-edit-label"><label>'+t.options.messages.end.mobileLabel+"</label></div>").insertAfter(t.element.parent(".k-edit-field")),i=e('<div class="k-edit-field"><a href="#" class="k-button k-scheduler-recur-end"></a></div>').on(ke+t._namespace,function(e){e.preventDefault(),t._value.freq&&(t._createView("end"),t._pane.navigate("recurrence",t.options.animations.left))}).insertAfter(n);t._endFields=n.add(i).toggleClass("k-state-disabled",!t._value.freq),t._endButton=i.find(".k-scheduler-recur-end").text(t._endText())},_endText:function(){var e=this._value,t=this.options.messages.end,n=t.never;return e.count?n=j.format("{0} {1}",t.after,e.count):e.until&&(n=j.format("{0} {1:d}",t.on,e.until)),n},_initFrequency:function(){var t=this,n=t.options.messages.frequencies,i=U({dataSource:e.map(this.options.frequencies,function(e){return{text:n[e],value:"never"!==e?e:""}}),value:t._value.freq||"",ns:j.ns});t._view.element.find(".k-recur-pattern").append(i).on(ke+t._namespace,".k-scheduler-navigation li",function(n){var i=e(this);n.preventDefault(),i.addClass("k-state-selected").siblings().removeClass("k-state-selected"),t._value={freq:i.children("a").attr(j.attr("value"))},t._initRepeatView();
})},_initEndNavigation:function(){var t,n=this,i=n.options.messages.end.patterns,r=n._value,o="";r.count?o="count":r.until&&(o="until"),t=U({dataSource:[{text:i.never,value:""},{text:i.after,value:"count"},{text:i.on,value:"until"}],value:o,ns:j.ns}),n._view.element.find(".k-recur-pattern").append(t).on(ke+n._namespace,".k-scheduler-navigation li",function(t){var i=e(this),o=null,a=null;t.preventDefault(),i.addClass("k-state-selected").siblings().removeClass("k-state-selected"),n._initEndView(i.children("a").attr(j.attr("value"))),n._count?(o=n._count.value(),a=null):n._until&&(o=null,a=n._until.val?j.parseDate(n._until.val(),"yyyy-MM-dd"):n._until.value()),r.count=o,r.until=a})},_createView:function(t){var n=this,i=n.options,r=i.messages,o=r["repeat"===t?"repeatTitle":"endTitle"],a='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="recurrence"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+r.cancel+"</a>"+r.headerTitle+'<a href="#" class="k-button k-scheduler-update">'+r.update+"</a></div>",s=n._pane.view().id;n._view=n._pane.append(a+O({headerTitle:o})),n._view.element.on(ke+n._namespace,"a.k-scheduler-cancel, a.k-scheduler-update",function(t){t.preventDefault(),t.stopPropagation(),e(this).hasClass("k-scheduler-update")?(n.trigger("change"),n._defaultValue=e.extend({},n._value)):n._value=n._defaultValue;var i=n._value.freq;n._endButton.text(n._endText()),n._endFields.toggleClass("k-state-disabled",!i),n._repeatButton.text(r.frequencies[i||"never"]),n._pane.one("viewShow",function(){n._destroyView()}),n._pane.navigate(s,n.options.animations.right)}),n._container=n._view.element.find(".k-recur-view"),"repeat"===t?(n._initFrequency(),n._initRepeatView()):(n._initEndNavigation(),n._initEndView())},_destroyView:function(){this._view&&(this._view.destroy(),this._view.element.remove()),this._view=null},_initRepeatView:function(){var e=this,n=e._value.freq||"never",i={frequency:n,weekDayCheckBoxes:M,firstWeekDay:e.options.firstWeekDay,messages:e.options.messages[n]},r=V(i),o=e._container,a=e._value;return j.destroy(o),o.html(r),r?("weekly"!==n||a.weekDays||(a.weekDays=[{day:e.options.start.getDay(),offset:0}]),e._initInterval(),e._initMonthDay(),e._initWeekDays(),e._initWeekDay(),e._initMonth(),e._period(),t):(e._value={},t)},_initEndView:function(e){var n,i=this,r=i._value;e===t&&(r.count?e="count":r.until&&(e="until")),n={endPattern:e,messages:i.options.messages.end},j.destroy(i._container),i._container.html(W(n)),i._initCount(),i._initUntil()},_initWeekDay:function(){var t,n=this,i=n.options.messages.weekdays,r=n.options.messages.offsetPositions,o=n._container.find(".k-recur-weekday"),a=function(){n._weekDayRule(),n.trigger("change")};o[0]&&(n._weekDayOffset=n._container.find(".k-recur-weekday-offset").html(n._options([{text:r.first,value:"1"},{text:r.second,value:"2"},{text:r.third,value:"3"},{text:r.fourth,value:"4"},{text:r.last,value:"-1"}])).change(a),t=[{text:i.day,value:"day"},{text:i.weekday,value:"weekday"},{text:i.weekend,value:"weekend"}],t=t.concat(e.map(j.culture().calendar.days.names,function(e,t){return{text:e,value:t}})),n._weekDay=o.html(n._options(t)).change(a).val(n.options.start.getDay()),n._weekDayView())},_initMonth:function(){var t,n=this,i=n._value,r=n.options.start,o=i.months||[r.getMonth()+1],a=n._container.find(".k-recur-month"),s=j.culture().calendar.months.names;a[0]&&(t=e.map(s,function(e,t){return{text:e,value:t+1}}),a.html(n._options(t)).change(function(){i.months=[+this.value]}),n._monthSelect=a,o&&a.val(o[0]))},_period:function(){var t,n,i,r=this,o=r._value,a=r._container,s=r.options.messages[o.freq],l=a.find(".k-repeat-rule"),d=a.find(".k-weekday-view"),u=a.find(".k-monthday-view");l[0]&&(t=o.weekDays?"weekday":"monthday",n=U({value:t,dataSource:[{text:s.dayOfMonth,value:"monthday"},{text:s.dayOfWeek,value:"weekday"}],ns:j.ns}),i=function(e){var t=r._weekDay.val(),n=r._weekDayOffset.val(),i=r._monthDay.value(),a=r._monthSelect?r._monthSelect.val():null;"monthday"===e?(o.weekDays=null,o.monthDays=i?[i]:i,o.months=a?[+a]:a,d.hide(),u.show()):(o.monthDays=null,o.months=a?[+a]:a,o.weekDays=[{offset:+n,day:+t}],d.show(),u.hide())},l.append(n).on(ke+r._namespace,".k-scheduler-navigation li",function(t){var n,r=e(this).addClass("k-state-selected");t.preventDefault(),r.siblings().removeClass("k-state-selected"),n=r.children("a").attr(j.attr("value")),i(n)}),i(t))},_initUntil:function(){var e=this,t=e._container.find(".k-recur-until"),n=e.options.start,i=e._value,r=i.until,o=r&&r<n?r:n;e._until=j.support.input.date?t.attr("min",j.toString(o,"yyyy-MM-dd")).val(j.toString(r||n,"yyyy-MM-dd")).on("change",function(){i.until=j.parseDate(this.value,"yyyy-MM-dd")}):t.kendoDatePicker({min:o,value:r||n,change:function(){i.until=this.value()}}).data("kendoDatePicker")},_options:function(e,t){var n=0,i="",r=e.length,o=this._optionTemplate;for(t&&(i+=o({value:"",text:t}));n<r;n++)i+=o(e[n]);return i}}),K.plugin(q)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.timelineview.min",["kendo.scheduler.view.min"],e)}(function(){return function(e,t){function n(e){var t=new Date(1980,1,1,0,0,0);return u(t,v(e)),t}function i(e){var t=[],n=e.workWeekStart%7,i=Math.abs(e.workWeekEnd%7);for(t.push(n);i!=n;)n>6?n-=7:n++,t.push(n);return t}function r(e){var t,n=0;if(e.columns){for(t=0;t<e.columns.length;t++)n+=r(e.columns[t]);return e.colspan=n,n}return e.colspan=1,1}function o(e,t,n){var i,r,o,s;for(i=e.length-1;i>=0;i--)r=e[i].rectLeft,s=e[i].rectRight,o=r<=t&&s>=t,(o||r>=t&&s<=n||t<=r&&n>=r)&&(r<t&&(t=r),s>n&&(n=s));return a(e,t,n)}function a(e,t,n){var i,r,o=[];for(i=0;i<e.length;i++)r={rectLeft:e[i].rectLeft,rectRight:e[i].rectRight},(r.rectLeft<t&&r.rectRight>t||r.rectLeft>=t&&r.rectRight<=n)&&o.push(e[i]);return o}var s,l=window.kendo,d=l.ui,u=l.date.setTime,c=d.SchedulerView,h=l._outerWidth,p=l._outerHeight,f=e.extend,m=e.proxy,g=l.date.getDate,v=l.date.getMilliseconds,_=l.date.MS_PER_DAY,b=l.date.MS_PER_MINUTE,k="k-current-time",w="k-current-time-arrow",y="k-scheduler-header-wrap",x=.8666,C=".kendoTimelineView",T=l.template('<div><div class="k-event-template k-event-time">#:kendo.format("{0:t} - {1:t}", start, end)#</div><div class="k-event-template">${title}</div></div>'),S=l.template("<span class='k-link k-nav-day'>#=kendo.format('{0:m}', date)#</span>"),D='<div role="gridcell" aria-selected="false" data-#=ns#uid="#=uid#"#if (resources[0]) { #style="background-color:#=resources[0].color#; border-color: #=resources[0].color#"class="k-event#=inverseColor ? " k-event-inverse" : ""#" #} else {#class="k-event"#}#><span class="k-event-actions"># if(data.tail) {#<span class="k-icon k-i-arrow-60-left"></span>#}## if(data.isException()) {#<span class="k-icon k-i-non-recurrence"></span># } else if(data.isRecurring()) {#<span class="k-icon k-i-reload"></span># } #</span>{0}<span class="k-event-actions">#if (showDelete) {#<a href="\\#" class="k-link k-event-delete" title="${data.messages.destroy}" aria-label="${data.messages.destroy}"><span class="k-icon k-i-close"></span></a>#}## if(data.head) {#<span class="k-icon k-i-arrow-60-right"></span>#}#</span>#if(resizable && !data.tail){#<span class="k-resize-handle k-resize-w"></span>#}##if(resizable && !data.head){#<span class="k-resize-handle k-resize-e"></span>#}#</div>',F=l.Class.extend({init:function(e){this._view=e},_getTimeSlotByPosition:function(e,t,n){var i=this._view.groups[n];return i.timeSlotByPosition(e,t)},_hideHeaders:function(){var e=this._view;e.timesHeader.find("table tr:last").hide(),e.datesHeader.find("table tr:last").hide()},_setColspan:function(e){r(e)},_createRowsLayout:function(e,t,n){var i=this._view;return i._createRowsLayout(e,t,n)},_createVerticalColumnsLayout:function(e,t,n,i){return i},_createColumnsLayout:function(e,t,n){var i=this._view;return i._createColumnsLayout(e,t,n)},_getRowCount:function(){var e=this._view;return e._groupCount()},_getGroupsCount:function(){return 1},_addContent:function(e,t,n,i,r,o,a,s){var d,u,c,h,p=this._view,f="",m=p.options,g=function(t){var n,i="",r="",o=function(e){return function(){return p._resourceBySlot({groupIndex:e})}};return l.date.isToday(e[c])&&(r+="k-today"),(l.date.getMilliseconds(t)<l.date.getMilliseconds(m.workDayStart)||l.date.getMilliseconds(t)>=l.date.getMilliseconds(m.workDayEnd)||!p._isWorkDay(e[c]))&&(r+=" k-nonwork-hour"),i+="<td"+(""!==r?' class="'+r+'"':"")+">",n=l.date.getDate(e[c]),l.date.setTime(n,l.date.getMilliseconds(t)),i+=a({date:n,resources:o(s?d:u)}),i+="</td>"};for(d=0;d<i;d++){for(f+="<tr>",u=0;u<n;u++)for(c=0,h=t;c<h;c++)f+=p._forTimeRange(r,o,g);f+="</tr>"}return f},_addTimeSlotsCollections:function(e,t,n,i,r){var o,a,s,l,d,u,c,h,p,f,m,g,_=this._view,b=n.length;for(r&&(b=Math.floor(b/e)),o=0;o<e;o++)for(a=0,s=_.groups[o],r&&(a=o),d=a*b,u=0,r||(u=o),c=n[d].children,h=c.length/(r?1:e),p=h/t,f=0;f<t;f++)for(m=f*p+h*u,l=v(new Date((+_.startTime()))),g=0;g<p;g++)_._addTimeSlotToCollection(s,c,g,m,f,l,i),l+=i},_getVerticalGroupCount:function(e){return e},_getVerticalRowCount:function(e,t,n){var i=this._view;return i._isVerticallyGrouped()?e[t].maxRowCount:n},_renderEvent:function(e,t,n,i,r,o){var a,s=this._view,l=s._createEventElement(n.occurrence,t,r.head||n.head,r.tail||n.tail);l.appendTo(o).css({top:0,height:s.options.eventHeight}),a={start:n.occurrence._startTime||n.occurrence.start,end:n.occurrence._endTime||n.occurrence.end,element:l,uid:t.uid,slotRange:r,rowIndex:0,offsetTop:0},e.events[t.uid]=a,s.addContinuousEvent(i,r,l,t.isAllDay),s._arrangeRows(a,r,e)},_verticalCountForLevel:function(e){var t=this._view;return t._rowCountForLevel(e)},_horizontalCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_updateCurrentVerticalTimeMarker:function(t,n){var i=this._view,r="<div class='"+k+"'></div>",o=i.datesHeader.find("."+y),a=Math.round(t[0].innerRect(n,new Date(n.getTime()+1),!1).left),s=e(r).prependTo(o).addClass(w+"-down");s.css({left:i._adjustLeftPosition(a-h(s)*x/2),top:o.find("tr:last").prev().position().top}),e(r).prependTo(i.content).css({left:i._adjustLeftPosition(a),width:"1px",height:i.content[0].scrollHeight-1,top:0})},_changeGroup:function(){return t},_prevGroupSlot:function(e,t,n){var i,r=this._view;return r._isVerticallyGrouped()?e:(i=t._collection(0,n),i.last())},_nextGroupSlot:function(e,t,n){var i,r=this._view;return r._isVerticallyGrouped()?e:(i=t._collection(0,n),i.first())},_verticalSlots:function(e,t){var n=this._view;return n._changeGroup(e,t)},_verticalMethod:function(e){return e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(){return t},_horizontalSlots:function(e,t,n,i,r,o,a){var s=this._view,l={};return l.startSlot=t[n](i),l.endSlot=t[n](r),o||!s._isHorizontallyGrouped()||l.startSlot&&l.endSlot||(l.startSlot=l.endSlot=s._changeGroup(e,a)),l},_changeVerticalViewPeriod:function(){return!1},_changeHorizontalViewPeriod:function(e,t,n,i){var r=this._view;return!(e.startSlot&&e.endSlot||t||!r._changeViewPeriod(n,i,!1))},_updateDirection:function(e,t,n,i){var r=this._view;r._updateDirection(e,t,n,i,!0)},_createMoveHint:function(e,t){var n,i,r,o,a=this._view,s=e.start,l=a._createEventElement(t.occurrence,t.occurrence,!1,!1);l.addClass("k-event-drag-hint"),n=e.innerRect(t.occurrence.start,t.occurrence.end,a.options.snap),i=n.right-n.left-2,i<0&&(i=0),r=a._adjustLeftPosition(n.left),o={left:r,top:s.offsetTop,height:s.offsetHeight-2,width:i},l.css(o),a._appendMoveHint(l)},_adjustLeftPosition:function(e){var t=this._view;return t._isRtl&&(e-=t.content[0].scrollWidth-t.content[0].offsetWidth),e}}),E=l.Class.extend({init:function(e){this._view=e},_getTimeSlotByPosition:function(e,t,n){var i=this._view.groups[n];return i.timeSlotByPosition(e,t,!0)},_hideHeaders:function(){var e=this._view;e._isVerticallyGrouped()?e.times.find(".k-last").hide():(e.timesHeader.find("table tr").eq(2).hide(),e.datesHeader.find("table tr").eq(2).hide())},_setColspan:function(){},_createRowsLayout:function(e,t,n,i){var r=this._view;return r._createDateLayout(i,null,!0)},_createVerticalColumnsLayout:function(e,t,n){var i=this._view;return i._createColumnsLayout(e,null,n)},_createColumnsLayout:function(e,t,n,i){var r=this._view;return r._createColumnsLayout(e,t,n,i,!0)},_getRowCount:function(e){var t=this._view;return t._rowCountForLevel(e)},_getGroupsCount:function(){var e=this._view;return e._groupCount()},_addContent:function(e,t,n,i,r,o,a,s){var d,c,h,p,f=this._view,m="",g=f.options,v=function(t,n,i,r,o,s){var u,c="",p="",m=f._isVerticallyGrouped()?d:h,v=function(e){return function(){return f._resourceBySlot({groupIndex:e})}};return l.date.isToday(e[h])&&(p+="k-today"),(l.date.getMilliseconds(t)<l.date.getMilliseconds(g.workDayStart)||l.date.getMilliseconds(t)>=l.date.getMilliseconds(g.workDayEnd)||!f._isWorkDay(e[m]))&&(p+=" k-nonwork-hour"),c+="<td"+(""!==p?' class="'+p+'"':"")+">",u=l.date.getDate(e[h]),l.date.setTime(u,l.date.getMilliseconds(t)),c+=a({date:u,resources:v(s)}),c+="</td>"},_=new Date(r),k=f.options.minorTickCount,w=f.options.majorTick*b,y=w/k||1;for(c=0;c<i;c++){for(m+="<tr>",c%(i/f._dates.length)===0&&(d=c/(i/f._dates.length),_=new Date(f._dates[d]),l.date.setTime(_,l.date.getMilliseconds(r))),h=0,p=t;h<p;h++)if(m+=f._forTimeRange(_,o,v,s,n),s){u(_,y,!1);break}m+="</tr>"}return m},_addTimeSlotsCollections:function(e,t,n,i,r){var o,a,s,l,d,u,c,h,p,f,m,g,_=this._view,b=n.length;for(r&&(b/=t),o=0;o<t;o++)for(a=0,r&&(a=o),l=a*b,d=0,u=n[l].children,c=r?b:u.length/(t*e),h=u.length/t,s=v(new Date((+_.startTime()))),f=0;f<c;f++){for(r?(p=0,u=n[f+c*o].children):(p=o*h+e*f,d++),m=0;m<e;m++)g=_.groups[m],_._addTimeSlotToCollection(g,u,m,p,o,s,i);s+=i}},_getVerticalGroupCount:function(){var e=this._view;return e.content.find("tr").length},_getVerticalRowCount:function(e,t,n){return n},_renderEvent:function(e,t,n,i,r,o,a,s){var l,d,u,c,h,p=this._view,f=[];for(d=r.start.index;d<=r.end.index;d++)l=p._createEventElement(n.occurrence,t,d!==s,d!==a),l.appendTo(o).css({top:0,height:p.options.eventHeight}),u=i._timeSlotCollections[0]._slots[d],c=i.timeSlotRanges(u.start,u.end,!1)[0],h={start:d===a?n.occurrence._startTime||n.occurrence.start:u.start,end:d===s?n.occurrence._endTime||n.occurrence.end:u.end,element:l,uid:t.uid,slotRange:c,rowIndex:0,offsetTop:0},e.events[t.uid]=h,f.push(h),p.addContinuousEvent(i,c,l,t.isAllDay),p._arrangeRows(h,c,e);e.events[t.uid]=f},_verticalCountForLevel:function(e){var t=this._view;return t._columnCountForLevel(e)},_horizontalCountForLevel:function(e,t){var n=this._view;return n._columnCountForLevel(t)/n._columnCountForLevel(2)},_updateCurrentVerticalTimeMarker:function(t,n){var i=this._view,r=i.times.find("tr:first th:first"),o=i.times.find("tr:first th:last"),a="<div class='"+k+"'></div>",s=e(a).prependTo(i.times),l=Math.round(t[0].innerRect(n,new Date(n.getTime()+1),!1).top),d={};this._isRtl?(d.right=r.position().left+p(r)-p(o),s.addClass(w+"-left")):(d.left=o.position().left,s.addClass(w+"-right")),d.top=l-h(s)*x/2,s.css(d),e(a).prependTo(i.content).css({top:l,height:"1px",right:"1px",width:i.content[0].scrollWidth,left:0})},_changeGroup:function(e,t,n){var i=this._view;n||(e.groupIndex=t?i.groups.length-1:0)},_prevGroupSlot:function(e){return e},_nextGroupSlot:function(e){return e},_changeDate:function(e,t,n){var i,r,o=this._view,a=o.groups[e.groupIndex];if(t){if(i=a._getCollections(!1),r=n.index-1,r>=0)return i[0]._slots[r]}else if(i=a._getCollections(!1),r=n.index+1,i[0]&&i[0]._slots[r])return i[0]._slots[r]},_verticalSlots:function(e,t,n){return this._changeDate(e,t,n)},_verticalMethod:function(e,t){return t?e?"upSlot":"downSlot":e?"leftSlot":"rightSlot"},_normalizeVerticalSelection:function(e,n,i,r){var o=this._view;return r?t:o._normalizeVerticalSelection(e,n,i)},_horizontalSlots:function(e,t,n,i,r,o,a){var s=this._view,l=s._changeGroup(e,a),d={};return l?d.startSlot=d.endSlot=l:s._isVerticallyGrouped()||(d.startSlot=t[n](i),d.endSlot=t[n](r)),d},_changeVerticalViewPeriod:function(e,t,n,i){var r=this._view;return!(e.startSlot&&e.endSlot||t||!r._changeViewPeriod(n,i,r._isVerticallyGrouped()))},_changeHorizontalViewPeriod:function(e,t,n,i){var r=this._view;return!r._isVerticallyGrouped()&&!(e.startSlot&&e.endSlot||t||!r._changeViewPeriod(n,i,!1))},_updateDirection:function(e,t,n,i){var r=this._view;r._updateDirection(e,t,n,i,!r._isVerticallyGrouped())},_createMoveHint:function(e,t){var n,i,r,o,a=this._view,s=e.start,l=e.end;for(n=s.index;n<=l.index;n++)i=e.collection._slots[n],r=a._createEventElement(t.occurrence,t.occurrence,!1,!1),r.addClass("k-event-drag-hint"),o={left:i.offsetLeft+2,top:i.offsetTop,height:a.options.eventHeight,width:i.offsetWidth},r.css(o),a._appendMoveHint(r)},_adjustLeftPosition:function(e){var t=this._view;return t._isRtl&&!t._isVerticallyGrouped()&&(e-=t.content[0].scrollWidth-t.content[0].offsetWidth),e}});l.ui.scheduler.TimelineGroupedView=F,l.ui.scheduler.TimelineGroupedByDateView=E,s=c.extend({init:function(e,t){var n=this;c.fn.init.call(n,e,t),n._groupedView=n._getGroupedView(),n.title=n.options.title||n.options.name,n._workDays=i(n.options),n._templates(),n._editable(),n.calculateDateRange(),n._groups(),n._currentTime(!0)},name:"timeline",_getGroupedView:function(){return this._isGroupedByDate()?new l.ui.scheduler.TimelineGroupedByDateView(this):new l.ui.scheduler.TimelineGroupedView(this)},_getNextEventIndexBySlot:function(e,t,n){var i,r;if(this._isVerticallyGrouped())return l.ui.SchedulerView.fn._getNextEventIndexBySlot.call(this,e,t,n);for(i=0,r=0;r<t.length;r++)if(e.startDate()>t[r].start.startDate())i++;else{if(!(e.startDate().getTime()===t[r].start.startDate().getTime()&&n>t[r].start.groupIndex))break;i++}return i},_getSelectedSlot:function(e,t,n,i,r,o){return this._isVerticallyGrouped()?l.ui.SchedulerView.fn._getSelectedSlot.call(this,e,t,n,i,r,o):e},_getSortedEvents:function(t){return this._isVerticallyGrouped()?l.ui.SchedulerView.fn._getSortedEvents.call(this,t):t.sort(function(t,n){var i=t.start.startDate().getTime()-n.start.startDate().getTime();return 0===i&&(t.start.isDaySlot&&!n.start.isDaySlot&&(i=-1),!t.start.isDaySlot&&n.start.isDaySlot&&(i=1)),0===i&&(i=t.start.groupIndex-n.start.groupIndex),0===i&&(i=e(t.element).index()-e(n.element).index()),i})},_currentTimeMarkerUpdater:function(){this._updateCurrentTimeMarker(new Date)},_updateCurrentTimeMarker:function(t){var n,i,r,o,a,s,d,u,c,p,f,m,g,v=this.options;if(this.datesHeader.find("."+k).remove(),this.times.find("."+k).remove(),this.content.find("."+k).remove(),this._isInDateSlot({start:t,end:t}))for(v.currentTimeMarker.useLocalTimezone===!1&&(n=v.dataSource.options.schema.timezone,v.dataSource&&n&&(i=l.timezone.offset(t,n),t=l.timezone.convert(t,t.getTimezoneOffset(),i))),r=v.group&&"vertical"!=v.group.orientation?this.groups.length:1,o=0;o<r;o++){if(a=this.groups[o],!a)return;if(s=l.date.toUtcTime(t),d=a.timeSlotRanges(s,s+1),0===d.length)return;u=d[0].collection,c=u.slotByStartDate(t),c&&(this._isVerticallyGrouped()?this._groupedView._updateCurrentVerticalTimeMarker(d,t):(p="<div class='"+k+"'></div>",f=this.datesHeader.find("."+y),m=Math.round(d[0].innerRect(t,new Date(t.getTime()+1),!1).left),g=e(p).prependTo(f).addClass(w+"-down"),g.css({left:this._adjustLeftPosition(m-h(g)*x/2),top:f.find("tr:last").prev().position().top}),e(p).prependTo(this.content).css({left:this._adjustLeftPosition(m),width:"1px",height:this.content[0].scrollHeight-1,top:0})))}},_adjustLeftPosition:function(e){return this._groupedView._adjustLeftPosition(e)},_currentTime:function(e){var n=this,i=n.options.currentTimeMarker;i!==!1&&i.updateInterval!==t&&(n._currentTimeMarkerUpdater(),e&&(n._currentTimeUpdateTimer=setInterval(m(this._currentTimeMarkerUpdater,n),i.updateInterval)))},_editable:function(){this.options.editable&&(this._isMobile()?this._touchEditable():this._mouseEditable())},_mouseEditable:function(){var t=this;t.element.on("click"+C,".k-event a:has(.k-i-close)",function(n){t.trigger("remove",{uid:e(this).closest(".k-event").attr(l.attr("uid"))}),n.preventDefault()}),t.options.editable.create!==!1&&t.element.on("dblclick"+C,".k-scheduler-content td",function(e){var n,i=t._slotByPosition(e.pageX,e.pageY);i&&(n=t._resourceBySlot(i),t.trigger("add",{eventInfo:f({start:i.startDate(),end:i.endDate()},n)})),e.preventDefault()}),t.options.editable.update!==!1&&t.element.on("dblclick"+C,".k-event",function(n){t.trigger("edit",{uid:e(this).closest(".k-event").attr(l.attr("uid"))}),n.preventDefault()})},_touchEditable:function(){var n=this,i=0;l.support.mobileOS.android&&(i=5),n.options.editable.create!==!1&&(n._addUserEvents=new l.UserEvents(n.element,{threshold:i,filter:".k-scheduler-content td",tap:function(e){var i,r=e.x.location!==t?e.x.location:e.x,o=e.y.location!==t?e.y.location:e.y,a=n._slotByPosition(r,o);a&&(i=n._resourceBySlot(a),n.trigger("add",{eventInfo:f({start:a.startDate(),end:a.endDate()},i)})),e.preventDefault()}})),n.options.editable.update!==!1&&(n._editUserEvents=new l.UserEvents(n.element,{threshold:i,filter:".k-event",tap:function(t){var i=e(t.target).closest(".k-event");i.hasClass("k-event-active")||n.trigger("edit",{uid:i.attr(l.attr("uid"))}),t.preventDefault()}}))},_slotByPosition:function(e,t){var n,i,r,o=this.content,a=o.offset();for(e-=a.left,t-=a.top,this._isRtl?(r=l.support.browser,r.mozilla?(e+=o[0].scrollWidth-o[0].offsetWidth,e+=o[0].scrollLeft):r.msie?(e-=o.scrollLeft(),e+=o[0].scrollWidth-o[0].offsetWidth):r.webkit&&(e+=o[0].scrollLeft)):e+=o[0].scrollLeft,t+=o[0].scrollTop,e=Math.ceil(e),t=Math.ceil(t),i=0;i<this.groups.length;i++)if(n=this._groupedView._getTimeSlotByPosition(e,t,i))return n;return null},options:{name:"TimelineView",title:"Timeline",selectedDateFormat:"{0:D}",selectedShortDateFormat:"{0:d}",date:l.date.today(),startTime:l.date.today(),endTime:l.date.today(),showWorkHours:!1,minorTickCount:2,editable:!0,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,majorTick:60,eventHeight:25,eventMinWidth:0,columnWidth:100,groupHeaderTemplate:"#=text#",majorTimeHeaderTemplate:"#=kendo.toString(date, 't')#",slotTemplate:"&nbsp;",eventTemplate:T,dateHeaderTemplate:S,footer:{command:"workDay"},currentTimeMarker:{updateInterval:1e4,useLocalTimezone:!0},messages:{defaultRowText:"All events",showFullDay:"Show full day",showWorkDay:"Show business hours"}},events:["remove","add","edit"],_templates:function(){var e=this.options,t=f({},l.Template,e.templateSettings);this.eventTemplate=this._eventTmpl(e.eventTemplate,D),this.majorTimeHeaderTemplate=l.template(e.majorTimeHeaderTemplate,t),this.dateHeaderTemplate=l.template(e.dateHeaderTemplate,t),this.slotTemplate=l.template(e.slotTemplate,t),this.groupHeaderTemplate=l.template(e.groupHeaderTemplate,t)},_render:function(t){var n=this;t=t||[],n._dates=t,n._startDate=t[0],n._endDate=t[t.length-1||0],n._calculateSlotRanges(),n.createLayout(n._layout(t)),n._content(t),n._footer(),n._setContentWidth(),n.refreshLayout(),n.datesHeader.on("click"+C,".k-nav-day",function(t){var i=e(t.currentTarget).closest("th"),r=n._slotByPosition(i.offset().left,n.content.offset().top);n.trigger("navigate",{view:"timeline",date:r.startDate()})}),n._groupedView._hideHeaders()},_setContentWidth:function(){var e=this.content,t=e.width(),n=this.content.find("table"),i=n.find("tr:first").children().length,r=100,o=i*this.options.columnWidth;t<o&&(r=Math.ceil(o/t*100)),n.add(this.datesHeader.find("table")).css("width",r+"%")},_calculateSlotRanges:function(){var e,t,n,i,r=this._dates,o=this.startTime(),a=this.endTime();for(a=v(a),o=v(o),a===o?a+=_-1:a<o&&(a+=_),e=[],t=0;t<r.length;t++)n=g(r[t]),u(n,o),i=g(r[t]),u(i,a),e.push({start:l.date.toUtcTime(n),end:l.date.toUtcTime(i)});this._slotRanges=e},_forTimeRange:function(e,t,i,r,o){var a,s,l,d,c,h,p,f,m,g,k,w,y,x,C,T;for(e=n(e),t=n(t),a=this,s=v(e),l=v(t),d=a.options.minorTickCount,c=a.options.majorTick*b,h=c/d||1,p=new Date((+e)),f=0,g="",m=_/h,s!=l&&(s>l&&(l+=_),m=(l-s)/h),m=r?1:Math.round(m),o&&(m*=o);f<m;f++)k=f%(c/h),w=0===k,y=k<d-1,x=k===d-1,C=d,m%d!==0&&(T=m-(f+1)<d,w&&T&&(C=m%d)),g+=i(p,w,y,x,C,f%o),r||(o?f%o===o-1&&u(p,h,!1):u(p,h,!1));return g},_layout:function(e){var t,n,i,r=[],o=[],a=this,s=[{text:a.options.messages.defaultRowText}],l=a._groupedView,d=[];for(t=0;t<a.options.minorTickCount;t++)d.push({text:"&#8203;",className:"k-last",minorTicks:!0});for(this._forTimeRange(a.startTime(),a.endTime(),function(e,t,n,i,o){var s,u=a.majorTimeHeaderTemplate;t&&(s={text:u({date:e}),className:i?"k-slot-cell":"",columns:d.slice(0,o)},l._setColspan(s),r.push(s))}),n=0;n<e.length;n++)o.push({text:a.dateHeaderTemplate({date:e[n]}),className:"k-slot-cell",columns:r.slice(0)});return i=this.groupedResources,i.length&&("vertical"===this._groupOrientation()?(s=l._createRowsLayout(i,null,this.groupHeaderTemplate,o),o=l._createVerticalColumnsLayout(i,null,this.groupHeaderTemplate,o)):o=l._createColumnsLayout(i,o,this.groupHeaderTemplate,o)),{columns:o,rows:s}},_footer:function(){var t,n,i,r=this.options;r.footer!==!1&&(t='<div class="k-header k-scheduler-footer">',n=r.footer.command,n&&"workDay"===n?(t+='<ul class="k-reset k-header">',t+='<li class="k-state-default k-scheduler-fullday"><a href="#" class="k-link"><span class="k-icon k-i-clock"></span>',t+=(r.showWorkHours?r.messages.showFullDay:r.messages.showWorkDay)+"</a></li>",t+="</ul>"):t+="&nbsp;",t+="</div>",this.footer=e(t).appendTo(this.element),i=this,this.footer.on("click"+C,".k-scheduler-fullday",function(e){e.preventDefault(),i.trigger("navigate",{view:i.name||r.name,date:i.startDate(),isWorkDay:!r.showWorkHours})}))},_columnCountForLevel:function(e){var t=this.columnLevels[e];return t?t.length:0},_rowCountForLevel:function(e){var t=this.rowLevels[e];return t?t.length:0},_isWorkDay:function(e){var t,n=e.getDay(),i=this._workDays;for(t=0;t<i.length;t++)if(i[t]===n)return!0;return!1},_content:function(e){var t=this,n=t.startTime(),i=this.endTime(),r=1,o=1,a=e.length,s="",l=this.groupedResources,d=this.slotTemplate,u=!1;l.length&&(u="vertical"===t._groupOrientation(),u?(o=t._groupedView._getRowCount(this.rowLevels.length-1),r=t._groupedView._getGroupsCount()):r=t._groupCount()),s+="<tbody>",s+=t._groupedView._addContent(e,a,r,o,n,i,d,u),s+="</tbody>",this.content.find("table").append(s)},_groups:function(){var e,t,n,i,r,o,a=this._groupCount(),s=this._dates,d=s.length;for(this.groups=[],e=0;e<a;e++)t=this._addResourceView(e),n=s[0],i=s[s.length-1||0],r=v(this.startTime()),o=v(this.endTime()),0!==r&&o<=r&&(n=g(n),u(n,r),i=g(i),u(i,o)),t.addTimeSlotCollection(n,l.date.addDays(i,1));this._timeSlotGroups(a,d)},_isHorizontallyGrouped:function(){return this.groupedResources.length&&"horizontal"===this._groupOrientation()},_timeSlotGroups:function(e,t){var n=this._timeSlotInterval(),i=this._isVerticallyGrouped(),r=this.content.find("tr");r.attr("role","row"),this._groupedView._addTimeSlotsCollections(e,t,r,n,i)},_addTimeSlotToCollection:function(e,t,n,i,r,o,a){var s=t[n+i],l=e.getTimeSlotCollection(0),d=this._dates[r],u=Date.UTC(d.getFullYear(),d.getMonth(),d.getDate()),c=u+o,h=c+a;s.setAttribute("role","gridcell"),s.setAttribute("aria-selected",!1),l.addTimeSlot(s,c,h,!0)},startDate:function(){return this._startDate},endDate:function(){return this._endDate},visibleEndDate:function(){var e=v(this.startTime()),t=v(this.endTime()),n=this.endDate();return 0!==e&&t<=e&&(n=l.date.addDays(n,1)),n},startTime:function(){var e=this.options;return e.showWorkHours?e.workDayStart:e.startTime},endTime:function(){var e=this.options;return e.showWorkHours?e.workDayEnd:e.endTime},_timeSlotInterval:function(){var e=this.options;return e.majorTick/e.minorTickCount*b},nextDate:function(){return l.date.nextDay(this.endDate())},previousDate:function(){return l.date.previousDay(this.startDate())},calculateDateRange:function(){this._render([this.options.date])},render:function(e){var t,n,i,r,o;for(this._headerColumnCount=0,this._groups(),this.element.find(".k-event").remove(),e=new l.data.Query(e).sort([{field:"start",dir:"asc"},{field:"end",dir:"desc"}]).toArray(),t=[],this._eventsByResource(e,this.groupedResources,t),n=[],i=0,r=0;r<t.length;r++)o={groupIndex:r,maxRowCount:0,events:{}},n.push(o),this._renderEvents(t[r],r,o),i<o.maxRowCount&&(i=o.maxRowCount);this._setRowsHeight(n,t.length,i),this._positionEvents(n,t.length),this._currentTime(!1),this.trigger("activate")},_positionEvents:function(t,n){var i,r,o,a,s;for(i=0;i<n;i++){r=t[i].events;for(o in r)if(a=r[o],e.isArray(a))for(s=0;s<a.length;s++)this._positionEvent(a[s]);else this._positionEvent(a)}},_setRowsHeight:function(t,n,i){var r,o,a,s,l,d=this.options.eventHeight+2,u=this._getBottomRowOffset(),c=this._groupedView,h=c._getVerticalGroupCount(n);for(n=this._isVerticallyGrouped()?h:1,r=0;r<n;r++)o=c._getVerticalRowCount(t,r,i),o=o?o:1,a=(d+2)*o+u,s=e(this.times.find("tr")[r]),l=e(this.content.find("tr")[r]),s.height(a),l.height(a);this._setContentWidth(),this.refreshLayout(),this._refreshSlots()},_getBottomRowOffset:function(){var e,t,n=.5*this.options.eventHeight,i=this._isMobile();return i?(e=30,t=60):(e=15,t=30),n>t?n=t:n<e&&(n=e),n},_positionEvent:function(e){var t,n,i,r=this.options.eventHeight+2,o=e.slotRange.innerRect(e.start,e.end,!1),a=this._adjustLeftPosition(o.left),s=o.right-o.left-2;s<0&&(s=0),s<this.options.eventMinWidth&&(t=e.slotRange.collection,n=t._slots[t._slots.length-1],i=n.offsetLeft+n.offsetWidth,s=this.options.eventMinWidth,i<a+s&&(s=i-o.left-2)),e.element.css({top:e.slotRange.start.offsetTop+e.rowIndex*(r+2)+"px",left:a,width:s})},_refreshSlots:function(){for(var e=0;e<this.groups.length;e++)this.groups[e].refresh()},_eventsByResource:function(e,t,n){var i,r,o,a,s=t[0];if(s)for(i=s.dataSource.view(),r=0;r<i.length;r++)o=this._resourceValue(s,i[r]),a=new l.data.Query(e).filter({field:s.field,operator:c.groupEqFilter(o)}).toArray(),t.length>1?this._eventsByResource(a,t.slice(1),n):n.push(a);else n.push(e)},_isInDateSlot:function(e){var t=e.start,n=e.end,i=g(this._startDate),r=l.date.addDays(g(this.visibleEndDate()),1);return t<r&&i<=n},_isInTimeSlot:function(e){var t,n=e._startTime||l.date.toUtcTime(e.start),i=e._endTime||l.date.toUtcTime(e.end),r=this._slotRanges;for(n===i&&(i+=1),t=0;t<r.length;t++)if(n<r[t].end&&r[t].start<i)return!0;return!1},_adjustEvent:function(e){var t,n=e.start,i=e.end,r=e._time("start"),o=e._time("end"),a=v(this.startTime()),s=v(this.endTime()),d=null,c=null,h=!1,p=!1;return e.isAllDay&&(n=g(n),r=0,i=g(i),o=_,c=l.date.addDays(i,1)),0===s&&(s=_),s<=a?(r<a&&r>=s&&(d=g(n),u(d,a),p=!0),o>s&&o<=a&&(c=g(i),u(c,s),h=!0)):(a>r?(d=g(n),u(d,a),p=!0):s<=r&&(d=g(n),d=l.date.addDays(d,1),u(d,a),p=!0),s<o?(c=g(i),u(c,s),h=!0):a>o&&(c=g(i),c=l.date.addDays(c,-1),u(c,s),h=!0)),t=e.clone({start:d?d:n,end:c?c:i,_startTime:d?l.date.toUtcTime(d):e._startTime,_endTime:c?l.date.toUtcTime(c):e._endTime,isAllDay:!1}),{occurrence:t,head:h,tail:p}},_renderEvents:function(e,t,n){var i,r,o,a,s,l,d,u,c,h,p;for(r=0,o=e.length;r<o;r++)i=e[r],this._isInDateSlot(i)&&(a=i.isAllDay||i.duration()>=_,s=this.content,(a||this._isInTimeSlot(i))&&(l=this._adjustEvent(i),d=this.groups[t],d._continuousEvents||(d._continuousEvents=[]),this._isInTimeSlot(l.occurrence)&&(u=d.slotRanges(l.occurrence,!1),c=u[0],h=c.start.index,p=c.end.index,this._groupedView._renderEvent(n,i,l,d,c,s,h,p))))},addContinuousEvent:function(e,t,n,i){var r=e._continuousEvents;r.push({element:n,isAllDay:i,uid:n.attr(l.attr("uid")),start:t.start,end:t.end})},_createEventElement:function(t,n,i,r){var o,a,s=this.eventTemplate,d=this.options.editable,u=this._isMobile(),c=d&&d.destroy!==!1&&!u,h=d&&d.resize!==!1,p=n._time("start"),m=n._time("end"),g=n.start,v=n.end,_=this.eventResources(n);return n._startTime&&p!==l.date.getMilliseconds(n.start)&&(g=new Date(p),g=l.timezone.apply(g,"Etc/UTC")),n._endTime&&m!==l.date.getMilliseconds(n.end)&&(v=new Date(m),v=l.timezone.apply(v,"Etc/UTC")),o=f({},{ns:l.ns,resizable:h,showDelete:c,
head:i,tail:r,singleDay:1==this._dates.length,resources:_,inverseColor:!(!_||!_[0])&&this._shouldInverseResourceColor(_[0]),messages:this.options.messages},n,{start:g,end:v}),a=e(s(o)),this.angular("compile",function(){return{elements:a,data:[{dataItem:o}]}}),a},_arrangeRows:function(e,t,n){var i,r,a,s,l,d,u=t.start.index,h=t.end.index,p=e.slotRange.innerRect(e.start,e.end,!1),f=p.right+this.options.eventMinWidth,m=o(t.events(),p.left,f);for(t.addEvent({slotIndex:u,start:u,end:h,rectLeft:p.left,rectRight:f,element:e.element,uid:e.uid}),m.push({start:u,end:h,uid:e.uid}),i=c.createRows(m),n.maxRowCount<i.length&&(n.maxRowCount=i.length),r=0,a=i.length;r<a;r++)for(s=i[r].events,l=0,d=s.length;l<d;l++)n.events[s[l].uid].rowIndex=r},_groupCount:function(){var e=this.groupedResources,t=this._groupedView;return e.length?"vertical"===this._groupOrientation()?t._verticalCountForLevel(e.length-1):t._horizontalCountForLevel(e.length-1,this.columnLevels.length-1):1},_updateEventForSelection:function(e){var t=this._adjustEvent(e.clone());return t.occurrence},_eventOptionsForMove:function(e){return e.isAllDay?{isAllDay:!1}:{}},_updateEventForResize:function(e){e.isAllDay&&e.set("isAllDay",!1)},_updateMoveHint:function(e,t,n){var i,r,o,a=this.groups[t],s=e.clone({start:e.start,end:e.end}),l=s.duration();if(s.start=new Date(s.start.getTime()+n),s.end=new Date(+s.start+l),this._removeMoveHint(e.uid),this._isInDateSlot(s)&&(s.isAllDay||s.duration()>=_||this._isInTimeSlot(s)))for(i=this._adjustEvent(s),r=a.slotRanges(i.occurrence,!1),o=0;o<r.length;o++)this._groupedView._createMoveHint(r[o],i)},_appendMoveHint:function(e){e.appendTo(this.content),this._moveHint=this._moveHint.add(e)},_updateResizeHint:function(e,t,n,i){var r,o,a,s,d,u,h,p,f,m,g=this.groups[t],v=g.ranges(n,i,!1,!1);for(this._removeResizeHint(),r=0;r<v.length;r++)o=v[r],a=o.startSlot(),s=o.innerRect(n,i,!1),s.top=a.offsetTop,d=s.right-s.left,u=o.endSlot().offsetTop+a.offsetHeight-s.top,h=this._adjustLeftPosition(s.left),p=c.fn._createResizeHint.call(this,h,s.top,d,u),this._resizeHint=this._resizeHint.add(p);f="t",m=this.content,this._resizeHint.appendTo(m),this._resizeHint.find(".k-label-top,.k-label-bottom").text(""),this._resizeHint.first().addClass("k-first").find(".k-label-top").text(l.toString(l.timezone.toLocalDate(n),f)),this._resizeHint.last().addClass("k-last").find(".k-label-bottom").text(l.toString(l.timezone.toLocalDate(i),f))},selectionByElement:function(e){var t=e.offset();return this._slotByPosition(t.left,t.top)},_updateDirection:function(e,t,n,i,r){var o=t[0].start,a=t[t.length-1].end;n&&!r&&o.index===a.index&&o.collectionIndex===a.collectionIndex&&(e.backward=i)},_changeGroup:function(e,t){var n=t?"prevGroupSlot":"nextGroupSlot",i=this[n](e.start,e.groupIndex,!1);return i&&(e.groupIndex+=t?-1:1),this._groupedView._changeGroup(e,t,i),i},prevGroupSlot:function(e,t,n){var i=this.groups[t],r=i.ranges(e,e,n,!1)[0].start;if(!(t<=0))return this._groupedView._prevGroupSlot(r,i,n)},nextGroupSlot:function(e,t,n){var i=this.groups[t],r=i.ranges(e,e,n,!1)[0].start;if(!(t>=this.groups.length-1))return this._groupedView._nextGroupSlot(r,i,n)},_verticalSlots:function(e,t,n,i){var r=this._groupedView,o=r._verticalMethod(i,n),a=t[0].start,s=t[t.length-1].end,l=this.groups[e.groupIndex],d=r._normalizeVerticalSelection(e,t,i,n);return d&&(a=s=d),a=l[o](a),s=l[o](s),n||!this._isVerticallyGrouped()||a&&s||(a=s=r._verticalSlots(e,i,d)),{startSlot:a,endSlot:s}},_horizontalSlots:function(e,t,n,i){var r=i?"upSlot":"downSlot",o=t[0].start,a=t[t.length-1].end,s=this.groups[e.groupIndex],l={};return n?(l.startSlot=s[r](o),l.endSlot=s[r](a),n||!this._isHorizontallyGrouped()||o&&a||(l.startSlot=l.endSlot=this._changeGroup(e,i))):l=this._groupedView._horizontalSlots(e,s,r,o,a,n,i),l},_changeViewPeriod:function(e,t){var n,i=t?this.previousDate():this.nextDate(),r=e.start,o=e.end,a=new Date(i),s=new Date(i);return!this._isInRange(a,s)&&(e.start=a,e.end=s,this._isHorizontallyGrouped()&&(e.groupIndex=t?this.groups.length-1:0),n=o-r,t?(o=v(this.endTime()),o=0===o?_:o,u(e.start,o-n),u(e.end,o)):(r=v(this.startTime()),u(e.start,r),u(e.end,r+n)),e.events=[],!0)},move:function(e,t,n){var i,r,o,a,s,d=!1,u=this.groups[e.groupIndex],c=l.keys,h=this._groupedView,p=u.ranges(e.start,e.end,!1,!1);if(t===c.DOWN||t===c.UP){if(d=!0,o=t===c.UP,h._updateDirection(e,p,n,o),a=this._verticalSlots(e,p,n,o),h._changeVerticalViewPeriod(a,n,e,o))return d}else if((t===c.LEFT||t===c.RIGHT)&&(d=!0,o=t===c.LEFT,this._updateDirection(e,p,n,o,!1),a=this._horizontalSlots(e,p,n,o),h._changeHorizontalViewPeriod(a,n,e,o)))return d;return d&&(i=a.startSlot,r=a.endSlot,n?(s=e.backward,s&&i?e.start=i.startDate():!s&&r&&(e.end=r.endDate())):i&&r&&(e.start=i.startDate(),e.end=r.endDate()),e.events=[]),d},destroy:function(){var e=this;e.element&&e.element.off(C),e.footer&&e.footer.remove(),e._currentTimeUpdateTimer&&clearInterval(e._currentTimeUpdateTimer),c.fn.destroy.call(this),this._isMobile()&&e.options.editable&&(e.options.editable.create!==!1&&e._addUserEvents.destroy(),e.options.editable.update!==!1&&e._editUserEvents.destroy())}}),f(!0,d,{TimelineView:s,TimelineWeekView:s.extend({options:{name:"TimelineWeekView",title:"Timeline Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",majorTick:120},name:"timelineWeek",calculateDateRange:function(){var e,t,n=this.options.date,i=l.date.dayOfWeek(n,this.calendarInfo().firstDay,-1),r=[];for(e=0,t=7;e<t;e++)r.push(i),i=l.date.nextDay(i);this._render(r)}}),TimelineWorkWeekView:s.extend({options:{name:"TimelineWorkWeekView",title:"Timeline Work Week",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",majorTick:120},name:"timelineWorkWeek",nextDate:function(){var e=l.date.dayOfWeek(l.date.nextDay(this.endDate()),this.calendarInfo().firstDay,1);return l.date.addDays(e,this._workDays[0])},previousDate:function(){var e=l.date.dayOfWeek(this.startDate(),this.calendarInfo().firstDay,-1),t=this._workDays;return l.date.addDays(e,t[t.length-1]-7)},calculateDateRange:function(){for(var e=this.options.date,t=l.date.dayOfWeek(e,this.options.workWeekStart,-1),n=l.date.dayOfWeek(t,this.options.workWeekEnd,1),i=[];t<=n;)i.push(t),t=l.date.nextDay(t);this._render(i)}}),TimelineMonthView:s.extend({options:{name:"TimelineMonthView",title:"Timeline Month",selectedDateFormat:"{0:D} - {1:D}",selectedShortDateFormat:"{0:d} - {1:d}",workDayStart:new Date(1980,1,1,0,0,0),workDayEnd:new Date(1980,1,1,23,59,59),footer:!1,majorTick:1440,minorTickCount:1},name:"timelineMonth",calculateDateRange:function(){var e,t,n=this.options.date,i=l.date.firstDayOfMonth(n),r=l.date.lastDayOfMonth(n),o=[];for(e=0,t=r.getDate();e<t;e++)o.push(i),i=l.date.nextDay(i);this._render(o)}})})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.scheduler.min",["kendo.dropdownlist.min","kendo.editable.min","kendo.multiselect.min","kendo.window.min","kendo.datetimepicker.min","kendo.scheduler.recurrence.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.timelineview.min","kendo.mobile.actionsheet.min","kendo.mobile.pane.min","kendo.pdf.min"],e)}(function(){return function(e,t){function n(e,t){return t=t||"",e.startTimezone&&(t=e.startTimezone,e.endTimezone&&(t+=" | "+e.endTimezone)),t}function i(e,t){var n=t.timezone;n&&(e[I.attr("timezone")]=n)}function r(e,t){var n,i=t.model.fields[t.field].validation;i&&(n=i.dateCompare,n&&G(n)&&n.message&&(e[I.attr("dateCompare-msg")]=n.message))}function o(e,t){return function(n){return n=e(n),s(n,"apply",t),n||[]}}function a(e,t){return function(n){return n&&("[object Array]"===Y.call(n)||n instanceof I.data.ObservableArray||(n=[n])),s(n,"remove",t,!0),n=e(n),n||[]}}function s(e,t,n,i){var r,o,a;for(e=e||[],o=0,a=e.length;o<a;o++)r=e[o],i?r.startTimezone||r.endTimezone?n?(r.start=I.timezone.convert(r.start,r.startTimezone||r.endTimezone,n),r.end=I.timezone.convert(r.end,r.endTimezone||r.startTimezone,n),r.start=I.timezone[t](r.start,n),r.end=I.timezone[t](r.end,n)):(r.start=I.timezone[t](r.start,r.startTimezone||r.endTimezone),r.end=I.timezone[t](r.end,r.endTimezone||r.startTimezone)):n&&(r.start=I.timezone[t](r.start,n),r.end=I.timezone[t](r.end,n)):r.startTimezone||r.endTimezone?(r.start=I.timezone[t](r.start,r.startTimezone||r.endTimezone),r.end=I.timezone[t](r.end,r.endTimezone||r.startTimezone),n&&(r.start=I.timezone.convert(r.start,r.startTimezone||r.endTimezone,n),r.end=I.timezone.convert(r.end,r.endTimezone||r.startTimezone,n))):n&&(r.start=I.timezone[t](r.start,n),r.end=I.timezone[t](r.end,n)),i&&delete r.uid;return e}function l(e,t){for(var n,i=e.length,r=0;r<i;r++)if(n=e[r],n.uid===t)return n}function d(e,t,n){return e=n?I.timezone.convert(e,t,n):I.timezone.remove(e,t)}function u(e){var t,n,i,r,o,a,s,l,u,c,h,p;return!(e.filter("[name=end]").length&&(t=e.closest(".k-scheduler-edit-form"),n=t.find("[name=start]:visible"),i=t.find("[name=end]:visible"),i[0]&&n[0]&&(a=I.widgetInstance(n,I.ui),s=I.widgetInstance(i,I.ui),l=t.data("kendoEditable"),u=l?l.options.model:null,a&&s?(r=a.value(),o=s.value()):(r=I.parseDate(n.val()),o=I.parseDate(i.val())),r&&o)))||(u&&(c=n.attr(I.attr("timezone")),h=u.startTimezone,p=u.endTimezone,h=h||p,p=p||h,h&&(r=d(r,h,c),o=d(o,p,c))),r<=o)}function c(e,t,n,i){for(var r=e.length,o=[],a=0;a<r;a++)o=o.concat(e[a].expand(t,n,i));return o}function h(e){return delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate,e}function p(t,n){var i,r,o=(t.fields||t)[n],a=["url","email","number","date","boolean"],s=o?o.validation:{},l=I.attr("type"),d=e.inArray,u={};for(i in s)r=s[i],d(i,a)>=0?u[l]=i:I.isFunction(r)||(u[i]=G(r)?r.value||i:r),u[I.attr(i+"-msg")]=r.message;return u}function f(t,n){var i=p(n,t.field);return function(r){e(I.format('<select data-{0}bind="value:{1}" title="'+n.title+'">',I.ns,t.field)).appendTo(r).attr(i).kendoDropDownList({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,optionLabel:"None",template:I.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function m(t){var n=p(t.model,t.field);return function(t,i){e('<textarea name="description" class="k-textbox" title="'+i.title+'"/>').attr(n).appendTo(t)}}function g(t,n){var i=p(n,t.field);return function(n){e(I.format('<select data-{0}bind="value:{1}">',I.ns,t.field)).appendTo(n).attr(i).kendoMultiSelect({dataTextField:t.dataTextField,dataValueField:t.dataValueField,dataSource:t.dataSource,valuePrimitive:t.valuePrimitive,itemTemplate:I.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField),tagTemplate:I.format('<span class="k-scheduler-mark" style="background-color:#= data.{0}?{0}:"none" #"></span>#={1}#',t.dataColorField,t.dataTextField)})}}function v(t,n){var i=p(n,t.field);return function(n){var r,o,a="",s=t.dataSource.view();for(r=0,o=s.length;r<o;r++)a+=I.format('<option value="{0}">{1}</option>',I.getter(t.dataValueField)(s[r]),I.getter(t.dataTextField)(s[r]));e(I.format('<select data-{0}bind="value:{1}" multiple="multiple" data-{0}value-primitive="{3}">{2}</select>',I.ns,t.field,a,t.valuePrimitive)).appendTo(n).attr(i)}}function _(e,t){var n,i=e.end.getTime()-e.start.getTime(),r=new Date(e.start.getTime());return I.date.setTime(r,t),n=new Date(r.getTime()),I.date.setTime(n,i,!0),{start:r,end:n}}var b,k,w,y,x,C,T,S,D,F,E,A,I=window.kendo,R=I.date,M=I.support.input,z=R.MS_PER_DAY,H=R.getDate,N=I.date.getMilliseconds,B=I.recurrence,P=e.extend({F10:121},I.keys),L=I.ui,O=L.Widget,V=L.DataBoundWidget,W="string",U=L.Popup,q=L.Calendar,j=I.data.DataSource,G=e.isPlainObject,$=e.extend,K=e.proxy,Y=Object.prototype.toString,Q=e.isArray,X=".kendoScheduler",J="click",Z="mousedown",ee="change",te="cancel",ne="remove",ie="save",re="add",oe="edit",ae="k-state-focused",se="k-state-expanded",le=".k-scheduler-views",de=/(?:value:start|value:end)(?:,|$)/,ue=H(new Date),ce=",",he=/\;/g,pe="recurrenceException",fe="Are you sure you want to delete this event?",me="Do you want to delete only this event occurrence or the whole series?",ge="Do you want to edit only this event occurrence or the whole series?",ve="Are you sure you want to delete this event occurrence?",_e="Are you sure you want to delete the whole series?",be='<a class="k-button #=className#" #=attr# href="\\#">#=text#</a>',ke=I.template('<li class="k-current-view" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>'),we=I.template('<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-scheduler-navigation"><li class="k-state-default k-header k-nav-today"><a role="button" href="\\#" class="k-link" title="${messages.today}">${messages.today}</a></li><li class="k-state-default k-header k-nav-prev"><a role="button" href="\\#" class="k-link" title="${messages.previous}" aria-label="${messages.previous}"><span class="k-icon k-i-arrow-60-left" style="pointer-events: none"></span></a></li><li class="k-state-default k-header k-nav-next"><a role="button" href="\\#" class="k-link" title="${messages.next}" aria-label="${messages.next}"><span class="k-icon k-i-arrow-60-right" style="pointer-events: none"></span></a></li><li class="k-state-default k-nav-current"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-calendar"></span><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div>'),ye=I.template('<div class="k-floatwrap k-header k-scheduler-toolbar"># if (pdf) { #<ul class="k-reset k-scheduler-tools"><li><a role="button" href="\\#" class="k-button k-pdf"><span class="k-icon k-i-file-pdf"></span>${messages.pdf}</a></li></ul># } #<ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-today"><a role="button" href="\\#" class="k-link">${messages.today}</a></li></ul>#if(viewsCount === 1){#<a role="button" data-#=ns#name="#=view#" href="\\#" class="k-link k-scheduler-refresh"><span class="k-icon k-i-reload"></span></a>#}else{#<ul class="k-reset k-header k-scheduler-views">#for(var view in views){#<li class="k-state-default k-view-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a role="button" href="\\#" class="k-link">${views[view].title}</a></li>#}#</ul>#}#</div><div class="k-floatwrap k-header k-scheduler-toolbar"><ul class="k-reset k-header k-scheduler-navigation"><li class="k-state-default k-nav-prev"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-left"></span></a></li><li class="k-state-default k-nav-current"><span class="k-sm-date-format" data-#=ns#bind="text: formattedShortDate"></span><span class="k-lg-date-format" data-#=ns#bind="text: formattedDate"></span></li><li class="k-state-default k-nav-next"><a role="button" href="\\#" class="k-link"><span class="k-icon k-i-arrow-60-right"></span></a></li></ul></div>'),xe=function(t,n){var o={name:n.field,title:n.title},a=M.date?"":I.attr("role")+'="datepicker" ',s=I.attr("role")+'="datetimepicker" ',l=n.model.isAllDay,d=I.attr("validate")+"='"+!l+"'",u=I.attr("validate")+"='"+l+"'";i(o,n),r(o,n),e('<input type="datetime-local" required '+I.attr("type")+'="date" '+s+I.attr("bind")+'="value:'+n.field+',invisible:isAllDay" '+d+"/>").attr(o).appendTo(t),e('<input type="date" required '+I.attr("type")+'="date" '+a+I.attr("bind")+'="value:'+n.field+',visible:isAllDay" '+u+"/>").attr(o).appendTo(t),e("<span "+I.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},Ce=function(t,n){var o={name:n.field,title:n.title},a=n.model.isAllDay,s=I.attr("validate")+"='"+!a+"' ",l=I.attr("validate")+"='"+a+"' ";i(o,n),r(o,n),e('<input type="text" required '+I.attr("type")+'="date" '+I.attr("role")+'="datetimepicker" '+I.attr("bind")+'="value:'+n.field+',invisible:isAllDay" '+s+"/>").attr(o).appendTo(t),e('<input type="text" required '+I.attr("type")+'="date" '+I.attr("role")+'="datepicker" '+I.attr("bind")+'="value:'+n.field+',visible:isAllDay" '+l+"/>").attr(o).appendTo(t),e("<span "+I.attr("bind")+'="text: '+n.field+'Timezone"></span>').appendTo(t),"end"===n.field&&e("<span "+I.attr("bind")+'="text: startTimezone, invisible: endTimezone"></span>').appendTo(t),e("<span "+I.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},Te=function(t,n){e("<div "+I.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).appendTo(t).kendoRecurrenceEditor({start:n.model.start,timezone:n.timezone,messages:n.messages})},Se=function(t,n){e("<div "+I.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).appendTo(t).kendoMobileRecurrenceEditor({start:n.model.start,timezone:n.timezone,messages:n.messages,pane:n.pane,value:n.model[n.field]})},De=function(t,i){var r=n(i.model,i.messages.noTimezone);e('<a href="#" class="k-button k-timezone-button" data-bind="invisible:isAllDay">'+r+"</a>").click(i.click).appendTo(t)},Fe=function(t,n){e('<a href="#" class="k-button" data-bind="invisible:isAllDay">'+n.messages.timezoneEditorButton+"</a>").click(n.click).appendTo(t)},Ee=function(t,n){e("<div "+I.attr("bind")+'="value:'+n.field+'" />').attr({name:n.field}).toggle(n.visible).appendTo(t).kendoMobileTimezoneEditor({optionLabel:n.noTimezone})},Ae=function(n,i){var r=i.visible||i.visible===t;e("<div "+I.attr("bind")+'="value:'+i.field+'" />').attr({name:i.field}).toggle(r).appendTo(n).kendoTimezoneEditor({optionLabel:i.noTimezone,title:i.title})},Ie=I.Class.extend({init:function(t,n){var i=t.timezone;this.reader=n,n.model&&(this.model=n.model),this.timezone=i,this.data=o(e.proxy(this.data,this),i),this.serialize=a(e.proxy(this.serialize,this),i)},errors:function(e){return this.reader.errors(e)},parse:function(e){return this.reader.parse(e)},data:function(e){return this.reader.data(e)},total:function(e){return this.reader.total(e)},groups:function(e){return this.reader.groups(e)},aggregates:function(e){return this.reader.aggregates(e)},serialize:function(e){return this.reader.serialize(e)}}),Re=I.data.Model.define({init:function(e){var t=this;I.data.Model.fn.init.call(t,e),t._defaultId=t.defaults[t.idField]},_time:function(e){var t=this[e],n="_"+e+"Time";return this[n]?this[n]-I.date.toUtcTime(I.date.getDate(t)):N(t)},_date:function(e){var t="_"+e+"Time";return this[t]?this[t]-this._time(e):I.date.getDate(this[e])},clone:function(t,n){var i=this.uid,r=new this.constructor(e.extend({},this.toJSON(),t));return n||(r.uid=i),r},duration:function(){var e=this.end,t=this.start,n=(e.getTimezoneOffset()-t.getTimezoneOffset())*I.date.MS_PER_MINUTE;return e-t-n},expand:function(e,t,n){return B?B.expand(this,e,t,n):[this]},update:function(e){for(var t in e)this.set(t,e[t]);this._startTime&&this.set("_startTime",I.date.toUtcTime(this.start)),this._endTime&&this.set("_endTime",I.date.toUtcTime(this.end))},isMultiDay:function(){return this.isAllDay||this.duration()>=I.date.MS_PER_DAY},isException:function(){return!this.isNew()&&this.recurrenceId},isOccurrence:function(){return this.isNew()&&this.recurrenceId},isRecurring:function(){return!(!this.recurrenceRule&&!this.recurrenceId)},isRecurrenceHead:function(){return!(!this.id||!this.recurrenceRule)},toOccurrence:function(t){return t=e.extend(t,{recurrenceException:null,recurrenceRule:null,recurrenceId:this.id||this.recurrenceId}),t[this.idField]=this.defaults[this.idField],this.clone(t,!0)},toJSON:function(){var e=I.data.Model.fn.toJSON.call(this);return e.uid=this.uid,delete e._startTime,delete e._endTime,e},shouldSerialize:function(e){return I.data.Model.fn.shouldSerialize.call(this,e)&&"_defaultId"!==e},set:function(e,t){var n,i,r,o=this.isAllDay||!1;I.data.Model.fn.set.call(this,e,t),"isAllDay"==e&&t!=o&&(n=I.date.getDate(this.start),i=new Date(this.end),r=I.date.getMilliseconds(i),0===r&&t&&(r=z),this.set("start",n),t===!0?(I.date.setTime(i,-r),i<n&&(i=n)):I.date.setTime(i,z-r),this.set("end",i))},id:"id",fields:{id:{type:"number"},title:{defaultValue:"",type:"string"},start:{type:"date",validation:{required:!0}},startTimezone:{type:"string"},end:{type:"date",validation:{required:!0,dateCompare:{value:u}}},endTimezone:{type:"string"},recurrenceRule:{defaultValue:"",type:"string"},recurrenceException:{defaultValue:"",type:"string"},isAllDay:{type:"boolean",defaultValue:!1},description:{type:"string"}}}),Me=j.extend({init:function(e){j.fn.init.call(this,$(!0,{},{schema:{modelBase:Re,model:Re}},e)),this.reader=new Ie(this.options.schema,this.reader)},expand:function(e,t){var n,i=this.view(),r={};return e&&t&&(n=t.getTimezoneOffset(),t=new Date(t.getTime()+z-1),t.getTimezoneOffset()!==n&&(t=I.timezone.apply(t,n)),r={logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lte",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:new Date(e.getTime()+z-1)},{field:"end",operator:"gte",value:e}]}]},i=new I.data.Query(c(i,e,t,this.reader.timezone)).filter(r).toArray()),i},cancelChanges:function(e){e&&e.isOccurrence()&&this._removeExceptionDate(e),j.fn.cancelChanges.call(this,e)},insert:function(e,t){if(t){if(!(t instanceof Re)){var n=t;t=this._createNewModel(),t.accept(n)}return(!this._pushCreated&&t.isRecurrenceHead()||t.recurrenceId)&&(t=t.recurrenceId?t:t.toOccurrence(),this._addExceptionDate(t)),j.fn.insert.call(this,e,t)}},pushCreate:function(e){this._pushCreated=!0,j.fn.pushCreate.call(this,e),this._pushCreated=!1},remove:function(e){return e.isRecurrenceHead()?this._removeExceptions(e):e.isRecurring()&&this._addExceptionDate(e),j.fn.remove.call(this,e)},_removeExceptions:function(e){for(var t=this.data().slice(0),n=t.shift(),i=e.id;n;)n.recurrenceId===i&&j.fn.remove.call(this,n),n=t.shift();e.set(pe,"")},_removeExceptionDate:function(e){var t,n,i,r;e.recurrenceId&&(t=this.get(e.recurrenceId),t&&(n=e.defaults.start,i=RegExp("(\\"+ce+"?)"+B.toExceptionString(n,this.reader.timezone)),r=(t.recurrenceException||"").replace(he,ce).replace(/\,$/,""),i.test(r)?t.set(pe,r.replace(i,"")):(n=e.start,i=RegExp("(\\"+ce+"?)"+B.toExceptionString(n,this.reader.timezone)),t.set(pe,r.replace(i,"")))))},_addExceptionDate:function(e){var t,n=e.start,i=this.reader.timezone,r=this.get(e.recurrenceId),o=(r.recurrenceException||"").replace(he,ce).replace(/\,$/,"");B.isException(o,n,i)||(t=B.toExceptionString(n,i),e.defaults.start=n,r.set(pe,o+(o&&t?ce:"")+t))}});Me.create=function(e){(Q(e)||e instanceof I.data.ObservableArray)&&(e={data:e});var t=e||{},n=t.data;if(t.data=n,!(t instanceof Me)&&t instanceof I.data.DataSource)throw Error("Incorrect DataSource type. Only SchedulerDataSource instances are supported");return t instanceof Me?t:new Me(t)},$(!0,I.data,{SchedulerDataSource:Me,SchedulerDataReader:Ie,SchedulerEvent:Re}),b={update:{text:"Save",className:"k-primary k-scheduler-update"},canceledit:{text:"Cancel",className:"k-scheduler-cancel"},destroy:{text:"Delete",imageClass:"k-i-close",className:"k-primary k-scheduler-delete",iconClass:"k-icon"}},k={mobile:{dateRange:xe,timezonePopUp:De,timezone:Ee,recurrence:Se,description:m,multipleResources:v,resources:f},desktop:{dateRange:Ce,timezonePopUp:Fe,timezone:Ae,recurrence:Te,description:m,multipleResources:g,resources:f}},w=I.Observable.extend({init:function(e,t){I.Observable.fn.init.call(this),this.element=e,this.options=$(!0,{},this.options,t),this.createButton=this.options.createButton,this.toggleDateValidationHandler=K(this._toggleDateValidation,this)},_toggleDateValidation:function(t){if("isAllDay"==t.field){var n,i,r,o=this.container,a=this.editable.options.model.isAllDay,s=I.attr("bind");o.find("["+s+"*=end],["+s+"*=start]").each(function(){n=e(this),de.test(n.attr(s))&&(i=n.is("["+I.attr("role")+"=datetimepicker],[type*=datetime]"),r=a!==i,n.attr(I.attr("validate"),r))})}},fields:function(e,t){var n,i,r=this,o=r.options.messages,a=r.options.timezone,s=function(e){e.preventDefault(),r._initTimezoneEditor(t,this)},l=[{field:"title",title:o.editor.title},{field:"start",title:o.editor.start,editor:e.dateRange,timezone:a},{field:"end",title:o.editor.end,editor:e.dateRange,timezone:a},{field:"isAllDay",title:o.editor.allDayEvent}];I.timezone.windows_zones&&(l.push({field:"timezone",title:o.editor.timezone,editor:e.timezonePopUp,click:s,messages:o.editor,model:t}),l.push({field:"startTimezone",title:o.editor.startTimezone,editor:e.timezone,noTimezone:o.editor.noTimezone}),l.push({field:"endTimezone",title:o.editor.endTimezone,editor:e.timezone,noTimezone:o.editor.noTimezone})),t.recurrenceId||l.push({field:"recurrenceRule",title:o.editor.repeat,editor:e.recurrence,timezone:a,messages:o.recurrenceEditor,pane:this.pane}),"description"in t&&l.push({field:"description",title:o.editor.description,editor:e.description({model:t,field:"description"})});for(n=0;n<this.options.resources.length;n++)i=this.options.resources[n],l.push({field:i.field,title:i.title,editor:i.multiple?e.multipleResources(i,t):e.resources(i,t)});return l},end:function(){return this.editable.end()},_buildEditTemplate:function(e,t,n){var i,r,o,a,s=this.options.messages,l=$({},I.Template,this.options.templateSettings),d=l.paramName,u=this.options.editable.template,c="";if(u)typeof u===W&&(u=window.unescape(u)),c+=I.template(u,l)(e);else for(i=0,r=t.length;i<r;i++)o=t[i],"startTimezone"===o.field&&(c+='<div class="k-popup-edit-form k-scheduler-edit-form k-scheduler-timezones" style="display:none">',c+='<div class="k-edit-form-container">',c+='<div class="k-edit-label"></div>',c+='<div class="k-edit-field"><label class="k-check"><input class="k-timezone-toggle" type="checkbox" />'+s.editor.separateTimezones+"</label></div>"),c+='<div class="k-edit-label"><label for="'+o.field+'">'+(o.title||o.field||"")+"</label></div>",!e.editable||e.editable(o.field)?(n.push(o),c+="<div "+I.attr("container-for")+'="'+o.field+'" class="k-edit-field"></div>'):(a="#:",o.field?(o=I.expr(o.field,d),a+=o+"==null?'':"+o):a+="''",a+="#",a=I.template(a,l),c+='<div class="k-edit-field">'+a(e)+"</div>"),"endTimezone"===o.field&&(c+=this._createEndTimezoneButton());return c},_createEndTimezoneButton:function(){return"</div></div>"},_revertTimezones:function(e){e.set("startTimezone",this._startTimezone),e.set("endTimezone",this._endTimezone),delete this._startTimezone,delete this._endTimezone}}),y=w.extend({init:function(){w.fn.init.apply(this,arguments),this.pane=I.mobile.ui.Pane.wrap(this.element),this.pane.element.parent().css("height",this.options.height),this.view=this.pane.view(),this._actionSheetButtonTemplate=I.template('<li><a #=attr# class="k-button #=className#" href="\\#">#:text#</a></li>'),this._actionSheetPopupOptions=e(document.documentElement).hasClass("km-root")?{modal:!1}:{align:"bottom center",position:"bottom center",effect:"slideIn:up"}},options:{animations:{left:"slide",right:"slide:right"}},destroy:function(){this.close(),this.unbind(),this.pane.destroy()},_initTimezoneEditor:function(t){var i,r=this,o=r.pane,a=r.options.messages,s=r.timezoneView,l=r.container.find(".k-scheduler-timezones"),d=l.find(".k-timezone-toggle"),u=l.find(".k-edit-label:last").add(l.find(".k-edit-field:last")),c=function(e){if("startTimezone"===e.field){var n=t.startTimezone;d.prop("disabled",!n),n||(u.hide(),t.set("endTimezone",""),d.prop("checked",!1))}};r._startTimezone=t.startTimezone||"",r._endTimezone=t.endTimezone||"",s||(i='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+a.cancel+"</a>"+a.editor.timezoneTitle+'<a href="#" class="k-button k-scheduler-update">'+a.save+"</a></div></div>",this.timezoneView=s=o.append(i),s.contentElement().append(l.show()),s.element.on(J+X,".k-scheduler-cancel, .k-scheduler-update",function(i){var s,l;i.preventDefault(),i.stopPropagation(),e(this).hasClass("k-scheduler-cancel")&&r._revertTimezones(t),t.unbind("change",c),s=o.element.find("#edit").data("kendoMobileView"),l=n(t,a.editor.noTimezone),s.contentElement().find(".k-timezone-button").text(l),o.navigate(s,r.options.animations.right)}),d.click(function(){u.toggle(d.prop("checked")),t.set("endTimezone","")}),t.bind("change",c)),d.prop("checked",t.endTimezone).prop("disabled",!t.startTimezone),t.endTimezone?u.show():u.hide(),o.navigate(s,r.options.animations.left)},_createActionSheetButton:function(e){return e.template=this._actionSheetButtonTemplate,this.createButton(e)},showDialog:function(t){var n,i,r="",o='<ul><li class="km-actionsheet-title">'+t.title+"</li>",a=this.element.find(".k-event["+I.attr("uid")+"='"+t.model.uid+"']");for(this.container&&(a=this.container.find(".k-scheduler-delete"),a[0]&&(r="phone")),n=0;n<t.buttons.length;n++)o+=this._createActionSheetButton(t.buttons[n]);o+="</ul>",i=e(o).appendTo(this.pane.view().element).kendoMobileActionSheet({type:r,cancel:this.options.messages.cancel,cancelTemplate:'<li class="km-actionsheet-cancel"><a class="k-button" href="\\#">#:cancel#</a></li>',close:function(){this.destroy()},command:function(n){var r=i.element.find("li:not(.km-actionsheet-cancel) > .k-button").index(e(n.currentTarget));r>-1&&(i.close(),t.buttons[r].click())},popup:this._actionSheetPopupOptions}).data("kendoMobileActionSheet"),i.open(a)},editEvent:function(t){var n,i,r,o,a,s=this.pane,l="",d=this.options.messages,u=d.save,c=d.destroy,h=d.cancel,p=d.editor.editorTitle;return l+='<div data-role="view" class="k-popup-edit-form k-scheduler-edit-form k-mobile-list" id="edit" '+I.attr("uid")+'="'+t.uid+'"><div data-role="header" class="k-header"><a href="#" class="k-button k-scheduler-cancel">'+h+"</a>"+p+'<a href="#" class="k-button k-scheduler-update">'+u+"</a></div>",n=this.fields(k.mobile,t),i=this,r=[],l+=this._buildEditTemplate(t,n,r),!t.isNew()&&this.options.editable&&this.options.editable.destroy!==!1&&(l+='<div class="k-edit-buttons"><a href="#" class="k-scheduler-delete k-button">'+c+"</a></div>"),l+="</div>",o=s.append(l),a=this.container=o.element,this.editable=a.kendoEditable({fields:r,model:t,clearContainer:!1,target:i.options.target,validateOnBlur:!0}).data("kendoEditable"),a.find("input[type=checkbox],input[type=radio]").parent(".k-edit-field").addClass("k-check").prev(".k-edit-label").addClass("k-check").click(function(){e(this).next().children("input").click()}),this.trigger("edit",{container:a,model:t})?this.trigger("cancel",{container:a,model:t}):(a.on(J+X,"a.k-scheduler-edit, a.k-scheduler-cancel, a.k-scheduler-update, a.k-scheduler-delete",function(n){var r,o;n.preventDefault(),n.stopPropagation(),r=e(this),r.hasClass("k-scheduler-edit")?s.navigate("#edit",i.options.animations.right):(o="cancel",r.hasClass("k-scheduler-update")?o="save":r.hasClass("k-scheduler-delete")&&(o="remove"),i.trigger(o,{container:a,model:t}))}),s.navigate(o,i.options.animations.left),t.bind("change",i.toggleDateValidationHandler)),this.editable},_views:function(){return this.pane.element.find(I.roleSelector("view")).not(this.view.element)},close:function(){var e,t,n,i;if(this.container){for(this.pane.navigate("",this.options.animations.right),e=this._views(),n=0,i=e.length;n<i;n++)t=e.eq(n).data("kendoMobileView"),t&&t.purge();e.remove(),this.container=null,this.editable&&(this.editable.options.model.unbind("change",this.toggleDateValidationHandler),
this.editable.destroy(),this.editable=null),this.timezoneView=null}}}),x=w.extend({destroy:function(){this.close(),this.unbind()},editEvent:function(t){var n,i,r,o=this,a=o.options.editable,s="<div "+I.attr("uid")+'="'+t.uid+'" class="k-popup-edit-form k-scheduler-edit-form"><div class="k-edit-form-container">',l=o.options.messages,d=l.save,u=l.cancel,c=l.destroy,h=this.fields(k.desktop,t),p=[];return s+=this._buildEditTemplate(t,h,p),i=G(a)?a.window:{},s+='<div class="k-edit-buttons k-state-default">',s+=this.createButton({name:"update",text:d,attr:n})+this.createButton({name:"canceledit",text:u,attr:n}),t.isNew()||a.destroy===!1||(s+=this.createButton({name:"delete",text:c,attr:n})),s+="</div></div></div>",r=this.container=e(s).appendTo(o.element).eq(0).kendoWindow($({modal:!0,resizable:!1,draggable:!0,title:l.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&o.trigger(te,{container:r,model:t})&&e.preventDefault()}},i)),o.editable=r.kendoEditable({fields:p,model:t,clearContainer:!1,validateOnBlur:!0,target:o.options.target}).data("kendoEditable"),o.trigger(oe,{container:r,model:t})?o.trigger(te,{container:r,model:t}):(r.data("kendoWindow").center().open(),r.on(J+X,"a.k-scheduler-cancel",function(e){e.preventDefault(),e.stopPropagation(),o.trigger(te,{container:r,model:t})}),r.on(J+X,"a.k-scheduler-update",function(e){e.preventDefault(),e.stopPropagation(),o.trigger("save",{container:r,model:t})}),r.on(J+X,"a.k-scheduler-delete",function(e){e.preventDefault(),e.stopPropagation(),o.trigger(ne,{container:r,model:t})}),I.cycleForm(r),t.bind("change",o.toggleDateValidationHandler)),o.editable},close:function(){var e=this,t=function(){e.editable&&(e.editable.options.model.unbind("change",e.toggleDateValidationHandler),e.editable.destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};e.editable?(e._timezonePopup&&e._timezonePopup.data("kendoWindow")&&(e._timezonePopup.data("kendoWindow").destroy(),e._timezonePopup=null),e.container.is(":visible")?e.container.data("kendoWindow").bind("deactivate",t).close():t()):t()},_createEndTimezoneButton:function(){var e=this.options.messages,t="";return t+='<div class="k-edit-buttons k-state-default">',t+=this.createButton({name:"savetimezone",text:e.save})+this.createButton({name:"canceltimezone",text:e.cancel}),t+="</div></div></div>"},showDialog:function(t){var n,i,r,o=I.format("<div class='k-popup-edit-form'><div class='k-edit-form-container'><p class='k-popup-message'>{0}</p>",t.text);for(o+='<div class="k-edit-buttons k-state-default">',n=0;n<t.buttons.length;n++)o+=this.createButton(t.buttons[n]);o+="</div></div></div>",i=this.element,this.popup&&this.popup.destroy(),r=this.popup=e(o).appendTo(i).eq(0).on("click",".k-button",function(n){n.preventDefault(),r.close();var i=e(n.currentTarget).index();t.buttons[i].click()}).kendoWindow({modal:!0,resizable:!1,draggable:!1,title:t.title,visible:!1,close:function(){this.destroy(),i.focus()}}).getKendoWindow(),r.center().open()},_initTimezoneEditor:function(e,t){var n,i=this,r=i.container.find(".k-scheduler-timezones"),o=r.find(".k-timezone-toggle"),a=r.find(".k-edit-label:last").add(r.find(".k-edit-field:last")),s=r.find(".k-scheduler-savetimezone"),l=r.find(".k-scheduler-canceltimezone"),d=i._timezonePopup,u=function(t){if("startTimezone"===t.field){var n=e.startTimezone;o.prop("disabled",!n),n||(a.hide(),e.set("endTimezone",""),o.prop("checked",!1))}};i._startTimezone=e.startTimezone,i._endTimezone=e.endTimezone,d||(i._timezonePopup=d=r.kendoWindow({modal:!0,resizable:!1,draggable:!0,title:i.options.messages.editor.timezoneEditorTitle,visible:!1,close:function(n){e.unbind("change",u),n.userTriggered&&i._revertTimezones(e),t&&t.focus()}}),o.click(function(){a.toggle(o.prop("checked")),e.set("endTimezone","")}),s.click(function(e){e.preventDefault(),n.close()}),l.click(function(t){t.preventDefault(),i._revertTimezones(e),n.close()}),e.bind("change",u)),o.prop("checked",e.endTimezone).prop("disabled",!e.startTimezone),e.endTimezone?a.show():a.hide(),n=d.data("kendoWindow"),n.center().open()}}),C=V.extend({init:function(t,n){var i=this;O.fn.init.call(i,t,n),i.options.views&&i.options.views.length||(i.options.views=["day","week"]),i.resources=[],i._initModel(),i._wrapper(),i._views(),i._toolbar(),i._dataSource(),i._resources(),i._resizeHandler=function(){i.resize()},i.wrapper.on("mousedown"+X+" selectstart"+X,function(t){e(t.target).is(":kendoFocusable")||t.preventDefault()}),i.options.editable&&i.options.editable.resize!==!1&&i._resizable(),i._movable(),i._bindResize(),i.options.messages&&i.options.messages.recurrence&&(B.options=i.options.messages.recurrence),i._selectable(),i._ariaId=I.guid(),i._createEditor()},_bindResize:function(){e(window).on("resize"+X,this._resizeHandler)},_unbindResize:function(){e(window).off("resize"+X,this._resizeHandler)},dataItems:function(){var n,i,r,o,a,s=this,l=s.items(),d=s._data,u=e.map(l,function(t){return e(t).attr("data-uid")}),c={},h=u.length;for(n=0;n<h;n++)c[u[n]]=null;for(r=d.length,n=0;n<r;n++)o=d[n],c[o.uid]!==t&&(c[o.uid]=o);a=[];for(i in c)a.push(c[i]);return a},_isMobile:function(){var e=this.options;return e.mobile===!0&&I.support.mobileOS||"phone"===e.mobile||"tablet"===e.mobile},_isMobilePhoneView:function(){var e=this.options;return e.mobile===!0&&I.support.mobileOS&&!I.support.mobileOS.tablet||"phone"===e.mobile},_groupsByResource:function(e,t,n,i,r){var o,a,s,l,d,u,c;if(n||(n=[]),o=e[0]){for(s=o.dataSource.view(),l=0,d=0;d<s.length;d++)u=I.getter(o.dataValueField)(s[d]),c=t+l+d,a=this._groupsByResource(e.slice(1),c,n,u,o.field),a[o.field]=u,l=a.groupIndex,r&&i&&(a[r]=i),1===e.length&&(a.groupIndex=t+d,n.push(a));return a}return{}},data:function(){return this._data},select:function(n){var i,r,o,a,s,l,d,u,c,h,p=this,f=p.view(),m=p._selection,g=f.groups;if(n===t)return o=f._selectedSlots,m?(m&&m.events&&(r=p._selectedEvents()),{start:m.start,end:m.end,events:r,slots:o,resources:f._resourceBySlot(m)}):[];if(!n)return p._selection=null,p._old=null,f.clearSelection(),t;if(e.isArray(n)&&(n={events:n.splice(0)}),n.resources){s=[],l=[],f.groupedResources&&p._groupsByResource(f.groupedResources,0,l);for(a in n.resources)s.push({field:a,operator:"eq",value:n.resources[a]});i=new I.data.Query(l).filter(s).toArray()}return n.events&&n.events.length?(p._selectEvents(n.events,i),p._select(),t):(g&&n.start&&n.end&&(d=H(f._startDate),u=I.date.addDays(H(f._endDate),1),n.start<u&&d<=n.end&&(c=i&&i.length?g[i[0].groupIndex]:g[0],h=c.ranges(n.start,n.end,n.isAllDay,!1),h.length&&(p._selection={start:I.timezone.toLocalDate(h[0].start.start),end:I.timezone.toLocalDate(h[h.length-1].end.end),groupIndex:h[0].start.groupIndex,index:h[0].start.index,isAllDay:h[0].start.isDaySlot,events:[]},p._select()))),t)},_selectEvents:function(e,t){var n,i,r,o,a,s,l,d,u=this,c=u.view(),h=c.groups,p=e.length,f=t&&t.length;for(n=0;n<p;n++)if(h&&f){for(i=h[t[0].groupIndex],r=[],o=i.timeSlotCollectionCount(),a=i.daySlotCollectionCount(),s=0;s<o;s++)r=r.concat(i.getTimeSlotCollection(s).events());for(l=0;l<a;l++)r=r.concat(i.getDaySlotCollection(l).events());r=new I.data.Query(r).filter({field:"element[0].getAttribute('data-uid')",operator:"eq",value:e[n]}).toArray(),r[0]&&u._createSelection(r[0].element)}else d=c.element.find(I.format(".k-event[data-uid={0}], .k-task[data-uid={0}]",e[n])),d.length&&u._createSelection(d[0])},_selectable:function(){var t,n=this,i=n.wrapper,r=I.support.mobileOS?"touchend":"mousedown";n.options.selectable&&(n._tabindex(),i.on(r+X,".k-scheduler-header-all-day td, .k-scheduler-content td, .k-event",function(e){var t=e.which,r=e.button,o=I.support.browser,a=t&&3===t||r&&2==r;I.support.mobileOS&&e.isDefaultPrevented()||(a||(e.ctrlKey&&(n._ctrlKey=e.ctrlKey),e.shiftKey&&(n._shiftKey=e.shiftKey),n._createSelection(e.currentTarget)),i.focus(),o.msie&&o.version<9&&setTimeout(function(){i.focus()}),n.toolbar.find("ul > li").removeClass(ae))}),t=e.proxy(n._mouseMove,n),i.on("mousedown"+X,".k-scheduler-header-all-day td, .k-scheduler-content td",function(e){var n=e.which,r=e.button,o=n&&3===n||r&&2==r;o||i.on("mousemove"+X,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),i.on("mouseup"+X+" mouseleave"+X,function(){i.off("mousemove"+X,".k-scheduler-header-all-day td, .k-scheduler-content td",t)}),i.on("focus"+X,function(){n._selection||n._selectFirstSlot(),n._select()}),i.on("focusout"+X,function(t){n._ctrlKey=n._shiftKey=!1,n.toolbar.find("ul > li").removeClass(ae),e(t.relatedTarget).closest(le).length||n.toolbar.find(le).removeClass(se)}),i.on("keydown"+X,K(n._keydown,n)),i.on("keyup"+X,function(e){n._ctrlKey=e.ctrlKey,n._shiftKey=e.shiftKey}))},_selectFirstSlot:function(){this._createSelection(this.wrapper.find(".k-scheduler-content").find("td:first"))},_select:function(){var t,n,i,r,o,a=this,s=a.view(),l=a.wrapper,d=s.current(),u=a._selection,c=a._old?a._old.selection:null,h=a._old?a._old.eventsLength:null;if(u&&(d&&(d.removeAttribute("id"),d.removeAttribute("aria-label"),l.removeAttr("aria-activedescendant")),s.select(u),d=s.current(),d&&(c!==d||u.events&&h!==u.events.length))){if(t=e(d).data("uid"),a._old&&t&&t===e(a._old.selection).data("uid")&&u.events&&a._old.eventsLength===u.events.length)return;i=u,r=a._selectedEvents(),o=s._selectedSlots,r[0]?(i=r[0]||u,n=I.format(a.options.messages.ariaEventLabel,i.title,i.start,i.start)):n=I.format(a.options.messages.ariaSlotLabel,i.start,i.end),d.setAttribute("id",a._ariaId),d.setAttribute("aria-label",n),l.attr("aria-activedescendant",a._ariaId),a._old={selection:d,eventsLength:r.length},a.trigger("change",{start:u.start,end:u.end,events:r,slots:o,resources:s._resourceBySlot(u)})}},_selectedEvents:function(){for(var e,t=this._selection.events,n=t.length,i=0,r=[];i<n;i++)e=this.occurrenceByUid(t[i]),e&&r.push(e);return r},_mouseMove:function(t){var n=this;clearTimeout(n._moveTimer),n._moveTimer=setTimeout(function(){var i,r,o,a=n.view(),s=n._selection;s&&(i=a.selectionByElement(e(t.currentTarget)),i&&s.groupIndex===i.groupIndex&&(r=i.startDate(),o=i.endDate(),r>=s.end?s.backward=!1:o<=s.start&&(s.backward=!0),s.backward?s.start=r:s.end=o,n._select()))},5)},_viewByIndex:function(e){var t,n=this.views;for(t in n){if(!e)return t;e--}},_keydown:function(n){var i,r,o,a,s,l,d=this,u=n.keyCode,c=d.view(),h=c.options.editable,p=d._selection,f=e.extend(p),m=16===u||18===u||17===u||91===u||92===u,g=".k-scheduler-tools > li,.k-scheduler-navigation > li,.k-scheduler-views > li.k-state-selected:visible, .k-scheduler-views > li.k-current-view:visible",v=d.toolbar.find(g),_=d.toolbar.find(le),b=e(n.target).closest(le).length||d.toolbar.find(".k-scheduler-views .k-state-focused").length,k=_.children().index(d.toolbar.find("."+ae)),w=I.support.isRtl(d.element),y=w?-1:1;if(k==-1&&(k=_.children().index(d.toolbar.find(".k-state-selected"))),d._ctrlKey=n.ctrlKey,d._shiftKey=n.shiftKey,u===P.F10)return d.toolbar.find("ul > li:first").focus().addClass(ae),n.preventDefault(),t;if(u===P.TAB){if(d.toolbar.find("."+ae).length)return r=v.index(d.toolbar.find("."+ae)),r===-1&&d._focusedView&&(r=v.index(d.toolbar.find(".k-scheduler-views > .k-state-selected"))),o=n.shiftKey?v[r-1]:v[r+1],d.toolbar.find("."+ae).removeClass(ae),o?(e(o).addClass(ae).focus(),d._focusedView=null,n.preventDefault(),t):(d.element.focus(),n.preventDefault(),t)}else if(u===P.ENTER||u===P.SPACEBAR){if(b&&d._focusedView&&!d._focusedView.hasClass("k-state-selected"))return a=d._focusedView.data().name,d.trigger("navigate",{view:a,action:"changeView",date:d.date()})||(d.view(a),_.removeClass(se),d.toolbar.find(".k-current-view:visible").length&&(e(document.activeElement).blur(),d.toolbar.find(".k-current-view:visible").addClass(ae).find(".k-link").focus())),n.preventDefault(),t;if(d.toolbar.find("."+ae+":visible").length)return d.toolbar.find("."+ae+":visible").click(),n.preventDefault(),t}else if(n.altKey&&u===P.DOWN){if(d.toolbar.find("."+ae+":visible").length)return d.toolbar.find("."+ae+":visible").click(),n.preventDefault(),t}else{if(u===P.RIGHT&&b)return e(d.toolbar.find("."+ae)).removeClass(ae),d._focusedView=e(w?k-1===0?_.children(":not(.k-current-view):last"):_.children()[k+1*y]:k+1===_.children().length?_.children(":not(.k-current-view):first"):_.children()[k+1*y]),d._focusedView.focus().addClass(ae),n.preventDefault(),t;if(u===P.LEFT&&b)return e(d.toolbar.find("."+ae)).removeClass(ae),d._focusedView=e(w?k+1===_.children().length?_.children(":not(.k-current-view):first"):_.children()[k-1*y]:k-1===0?_.children(":not(.k-current-view):last"):_.children()[k-1*y]),d._focusedView.focus().addClass(ae),n.preventDefault(),t;if(u===P.DOWN&&d.toolbar.find(le).hasClass(se))return d.toolbar.find("."+ae).removeClass(ae),i=d._focusedView?_.find(d._focusedView).index():_.children(".k-scheduler-views > .k-state-selected").index(),d._focusedView=e(i+1===_.children().length?_.children(":not(.k-current-view):first"):_.children()[i+1*y]),d._focusedView.focus().addClass(ae),n.preventDefault(),t;if(u===P.UP&&d.toolbar.find(le).hasClass(se))return d.toolbar.find("."+ae).removeClass(ae),i=d._focusedView?_.find(d._focusedView).index():_.children(".k-scheduler-views > .k-state-selected").index(),d._focusedView=e(i-1===0?_.children(":not(.k-current-view):last"):_.children()[i-1*y]),d._focusedView.focus().addClass(ae),n.preventDefault(),t;if(n.altKey&&u===P.DOWN&&d.toolbar.find(".k-nav-current").hasClass(ae))return d._showCalendar(),n.preventDefault(),t;if(u===P.ESC&&d.popup&&d.popup.visible())return d.popup.close(),n.preventDefault(),t;if(u===P.ESC&&d.toolbar.find(le).hasClass(se))return d.toolbar.find(le).removeClass(se),d.toolbar.find(le).children().removeClass(ae),d._focusedView=null,d.toolbar.find(".k-current-view").focus().addClass(ae),n.preventDefault(),t}if(!m){if(!p)return d._selectFirstSlot(),d._select(),d.element.focus(),t;u===P.TAB?c.moveToEvent(p,n.shiftKey)&&(d._select(),d.element.focus(),n.preventDefault()):u===P.ENTER||u===P.SPACEBAR?p.events.length&&h?h.update!==!1&&d.editEvent(p.events[0]):h&&h.create!==!1&&(p.isAllDay&&(p=e.extend({},p,{end:I.date.addDays(p.end,-1)})),d.addEvent($({},p,c._resourceBySlot(p)))):u===P.DELETE&&h!==!1&&h.destroy!==!1?d.removeEvent(p.events[0]):u>=49&&u<=57?(s=d._viewByIndex(u-49),s&&!d.trigger("navigate",{view:s,action:"changeView",date:d.date()})&&d.view(s)):c.move(p,u,n.shiftKey)&&(c.inRange(p)?d._select():(l=d.date().getTime()>p.start.getTime()?"previous":"next",d.trigger("navigate",{view:d._selectedViewName,action:l,date:p.start})?(p.start=f.start,p.end=f.end):d.date(p.start)),d.toolbar.find("ul > li").removeClass(ae),n.preventDefault()),d._adjustSelectedDate()}},_createSelection:function(t){var n,i,r=this._selection;t=e(t),t.is(".k-event")&&(n=t.attr(I.attr("uid")),r&&r.events.indexOf(n)!==-1&&!this._ctrlKey)||(r&&(this._ctrlKey||this._shiftKey)||(r=this._selection={events:[],groupIndex:0}),i=this.view().selectionByElement(t),i&&(r.groupIndex=i.groupIndex||0),n&&(i=l(this._data,n)),i&&i.uid&&(n=[i.uid]),this._updateSelection(i,n),this._adjustSelectedDate())},_updateSelection:function(e,n,i){var r,o,a,s=this._selection;e&&s&&(r=this.view(),e.uid&&(e=r._updateEventForSelection(e)),this._shiftKey&&s.start&&s.end?(o=e.end<s.end,s.end=e.endDate?e.endDate():e.end,o&&r._timeSlotInterval&&I.date.setTime(s.end,-r._timeSlotInterval())):(s.start=e.startDate?e.startDate():e.start,s.end=e.endDate?e.endDate():e.end),s.isAllDay="isDaySlot"in e?e.isDaySlot:e.isAllDay,null!==i&&i!==t&&(s.groupIndex=i),s.index=e.index,this._ctrlKey?(a=n&&n.length?s.events.indexOf(n[0]):-1,a>-1?s.events.splice(a,1):s.events=s.events.concat(n||[])):s.events=n||[])},options:{name:"Scheduler",date:ue,editable:!0,autoBind:!0,snap:!0,mobile:!1,timezone:"",allDaySlot:!0,min:new Date(1900,0,1),max:new Date(2099,11,31),toolbar:null,footer:{},messages:{today:"Today",pdf:"Export to PDF",save:"Save",cancel:"Cancel",destroy:"Delete",deleteWindowTitle:"Delete event",next:"Next",previous:"Previous",ariaSlotLabel:"Selected from {0:t} to {1:t}",ariaEventLabel:"{0} on {1:D} at {2:t}",views:{day:"Day",week:"Week",workWeek:"Work Week",agenda:"Agenda",month:"Month",timeline:"Timeline",timelineWeek:"Timeline Week",timelineWorkWeek:"Timeline Work Week",timelineMonth:"Timeline Month"},recurrenceMessages:{deleteWindowTitle:"Delete Recurring Item",deleteWindowOccurrence:"Delete current occurrence",deleteWindowSeries:"Delete the series",editWindowTitle:"Edit Recurring Item",editWindowOccurrence:"Edit current occurrence",editWindowSeries:"Edit the series"},editable:{confirmation:fe},editor:{title:"Title",start:"Start",end:"End",allDayEvent:"All day event",description:"Description",repeat:"Repeat",timezone:"Timezone",startTimezone:"Start timezone",endTimezone:"End timezone",separateTimezones:"Use separate start and end time zones",timezoneEditorTitle:"Timezones",timezoneEditorButton:"Time zone",timezoneTitle:"Time zones",noTimezone:"No timezone",editorTitle:"Event"}},height:null,width:null,resources:[],group:{resources:[],orientation:"horizontal"},views:[],selectable:!1},events:[ne,oe,te,ie,"add","dataBinding","dataBound","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","navigate","change"],destroy:function(){var t,n=this;O.fn.destroy.call(n),n.dataSource&&(n.dataSource.unbind(ee,n._refreshHandler),n.dataSource.unbind("progress",n._progressHandler),n.dataSource.unbind("error",n._errorHandler)),n.calendar&&(n.calendar.destroy(),n.popup.destroy()),n.view()&&n.view().destroy(),n._editor&&n._editor.destroy(),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),t=n.element.add(n.wrapper).add(n.toolbar).add(n.popup),t.off(X),clearTimeout(n._moveTimer),n._model=null,n.toolbar=null,n.element=null,e(window).off("resize"+X,n._resizeHandler),I.destroy(n.wrapper)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch()},items:function(){var e=this.wrapper.find(".k-scheduler-content"),t=this.view();return t&&"agenda"===t.options.name?e.find(".k-task"):e.find(".k-event").add(this.wrapper.find(".k-scheduler-header-wrap").find(".k-scheduler-header-all-day").siblings())},_movable:function(){var n,i,r,o,a,s,l,d,u,c,h=this,p=0,f=[],m=[],g=h._isMobile(),v=h.options.editable&&h.options.editable.move!==!1,b=h.options.editable&&h.options.editable.resize!==!1;(v||b&&g)&&(g&&I.support.mobileOS.android&&(p=5),h._moveDraggable=new I.ui.Draggable(h.element,{distance:p,filter:".k-event",ignore:".k-resize-handle",holdToDrag:g,autoScroll:!0}),v&&h._moveDraggable.bind("dragstart",function(e){var a,p,m,v=h.view(),_=e.currentTarget;if(!v.options.editable||v.options.editable.move===!1)return e.preventDefault(),t;if(g&&!_.hasClass("k-event-active"))return h.element.find(".k-event-active").removeClass("k-event-active"),e.preventDefault(),t;if(s=h.occurrenceByUid(_.attr(I.attr("uid"))),l=s.clone(),c=s.clone(),l.update(v._eventOptionsForMove(l)),f=[],h._selection)for(a=h._selection.events,p=0;p<a.length;p++)m=h.occurrenceByUid(a[p]).clone(),m.update(v._eventOptionsForMove(m)),f.push(m);else f.push(l);n=v._slotByPosition(e.x.startLocation,e.y.startLocation),r=v._resourceBySlot(n),u=o=n.startOffset(e.x.startLocation,e.y.startLocation,h.options.snap),i=n,d=n,n&&!h.trigger("moveStart",{event:s})||e.preventDefault()}).bind("drag",function(t){var r,c,p,g,v,b=h.view(),k=b._slotByPosition(t.x.location,t.y.location);if(k){if(a=k.startOffset(t.x.location,t.y.location,h.options.snap),k.isDaySlot!==n.isDaySlot)if(k.isDaySlot!==d.isDaySlot)for(g=e(n.element).index(),v=e(k.element).parent().children().eq(g),n=b._slotByPosition(v.offset().left,v.offset().top),o=n.startOffset(t.x.location,t.y.location,!0),m=f.map(function(e){return e.clone()}),p=0;p<f.length;p++)f[p].isAllDay!=k.isDaySlot&&(f[p].isAllDay=k.isDaySlot,f[p].end=I.date.getDate(f[p].start),f[p].start=I.date.getDate(f[p].start),k.isDaySlot||(I.date.setTime(f[p].start,I.date.getMilliseconds(b.startTime())),I.date.setTime(f[p].end,I.date.getMilliseconds(b.startTime())+b._timeSlotInterval())));else n=e.extend(!0,{},d),o=u,f=m;for(r=a-o,p=0;p<f.length;p++)b._updateMoveHint(f[p],k.groupIndex,r);if(c=_(l,r),h.trigger("move",{event:s,slot:{element:k.element,start:k.startDate(),end:k.endDate(),isDaySlot:k.isDaySlot},resources:b._resourceBySlot(k),start:c.start,end:c.end}))for(p=0;p<f.length;p++)b._updateMoveHint(f[p],k.groupIndex,r);else i=k}}).bind("dragend",function(t){var n,u,c,p,g,v,b,k,w,y;if(h.view()._removeMoveHint(),n=a-o,u=_(l,n),c=u.start,p=u.end,g=h.view()._resourceBySlot(i),v=h.trigger("moveEnd",{event:s,slot:{element:i.element,start:i.startDate(),end:i.endDate()},start:c,end:p,resources:g}),!v&&(s.start.getTime()!==c.getTime()||s.end.getTime()!==p.getTime()||d.isDaySlot!==i.isDaySlot||I.stringify(g)!==I.stringify(r))){for(h._isMultiDrag=f.length>1,b=0;b<f.length;b++)k=f[b],u=_(k,n),w=h.view()._eventOptionsForMove(k),y=e.extend({isAllDay:k.isAllDay,start:u.start,end:u.end},w,g),h._updateEvent(null,k,y);h._isMultiDrag&&(h.dataSource.sync(),h._isMultiDrag=!1)}t.currentTarget.removeClass("k-event-active"),this.cancelHold(),f=[],m=[]}).bind("dragcancel",function(){h.view()._removeMoveHint(),this.cancelHold(),f=[],m=[]}),g&&(h._moveDraggable.bind("hold",function(e){h.element.find(".k-scheduler-monthview").length&&e.preventDefault(),h.element.find(".k-event-active").removeClass("k-event-active"),e.currentTarget.addClass("k-event-active")}),I.support.mobileOS.android||h._moveDraggable.userEvents.bind("press",function(e){e.preventDefault()})))},_resizable:function(){function t(e){var t,n={"k-resize-e":"east","k-resize-w":"west","k-resize-n":"north","k-resize-s":"south"};for(t in n)if(e.hasClass(t))return n[t]}var n,i,r,o,a,s=this,l=0;s._isMobile()&&I.support.mobileOS.android&&(l=5),s._resizeDraggable=new I.ui.Draggable(s.element,{distance:l,filter:".k-resize-handle",autoScroll:!0,dragstart:function(t){var l=e(t.currentTarget),d=l.closest(".k-event"),u=d.attr(I.attr("uid")),c=s.view();r=s.occurrenceByUid(u),o=r.clone(),c._updateEventForResize(o),a=c._slotByPosition(t.x.startLocation,t.y.startLocation),s.trigger("resizeStart",{event:r})&&t.preventDefault(),n=I.date.toUtcTime(o.start),i=I.date.toUtcTime(o.end)},drag:function(l){var d,u,c,h,p,f;a&&(d=e(l.currentTarget),u=t(d),c=s.view(),h=c._slotByPosition(l.x.location,l.y.location),h&&a.groupIndex==h.groupIndex&&(a=h,p=n,f=i,"south"==u?!a.isDaySlot&&a.end-I.date.toUtcTime(o.start)>=c._timeSlotInterval()&&(i=o.isAllDay?a.startOffset(l.x.location,l.y.location,s.options.snap):a.endOffset(l.x.location,l.y.location,s.options.snap)):"north"==u?!a.isDaySlot&&I.date.toUtcTime(o.end)-a.start>=c._timeSlotInterval()&&(n=a.startOffset(l.x.location,l.y.location,s.options.snap)):"east"==u?a.isDaySlot&&I.date.toUtcTime(I.date.getDate(a.endDate()))>=I.date.toUtcTime(I.date.getDate(o.start))?i=o.isAllDay?a.startOffset(l.x.location,l.y.location,s.options.snap):a.endOffset(l.x.location,l.y.location,s.options.snap):!a.isDaySlot&&a.end-I.date.toUtcTime(o.start)>=c._timeSlotInterval()&&(i=a.endOffset(l.x.location,l.y.location,s.options.snap)):"west"==u&&(a.isDaySlot&&I.date.toUtcTime(I.date.getDate(o.end))>=I.date.toUtcTime(I.date.getDate(a.startDate()))?n=a.startOffset(l.x.location,l.y.location,s.options.snap):!a.isDaySlot&&I.date.toUtcTime(o.end)-a.start>=c._timeSlotInterval()&&(n=a.startOffset(l.x.location,l.y.location,s.options.snap))),s.trigger("resize",{event:r,slot:{element:a.element,start:a.startDate(),end:a.endDate()},start:I.timezone.toLocalDate(n),end:I.timezone.toLocalDate(i),resources:c._resourceBySlot(a)})?(n=p,i=f):c._updateResizeHint(o,a.groupIndex,n,i)))},dragend:function(l){var d,u=e(l.currentTarget),c=new Date(o.start.getTime()),h=new Date(o.end.getTime()),p=t(u);s.view()._removeResizeHint(),"south"==p?h=I.timezone.toLocalDate(i):"north"==p?c=I.timezone.toLocalDate(n):"east"==p?h=a.isDaySlot?I.date.getDate(I.timezone.toLocalDate(i)):I.timezone.toLocalDate(i):"west"==p&&(a.isDaySlot?(c=new Date(I.timezone.toLocalDate(n)),c.setHours(0),c.setMinutes(0)):c=I.timezone.toLocalDate(n)),d=s.trigger("resizeEnd",{event:r,slot:{element:a.element,start:a.startDate(),end:a.endDate()},start:c,end:h,resources:s.view()._resourceBySlot(a)}),!d&&h.getTime()>=c.getTime()&&(o.start.getTime()==c.getTime()&&o.end.getTime()==h.getTime()||(s.view()._updateEventForResize(r),s._updateEvent(p,r,{start:c,end:h}))),a=null,r=null},dragcancel:function(){s.view()._removeResizeHint(),a=null,r=null}})},_updateEvent:function(e,t,n){var i,r=this,o=function(e,t){try{r._preventRefresh=!0,e.update(n),r._convertDates(e)}finally{r._preventRefresh=!1}r.trigger(ie,{event:e})||(t&&t(),r._isMultiDrag||r.dataSource.sync())},a=function(e){return e.recurrenceRule?r.dataSource.getByUid(e.uid):r.dataSource.get(e.recurrenceId)},s=function(){var i,s,l=a(t);"south"!=e&&"north"!=e||(n.start&&(i=I.date.getDate(l.start),I.date.setTime(i,N(n.start)),n.start=i),n.end&&(s=I.date.getDate(l.end),I.date.setTime(s,N(n.end)),n.end=s)),r.dataSource._removeExceptions(l),o(l)},l=function(){var e=a(t),n=function(){r._convertDates(e),r._selection&&r._selection.events.push(s)},i=e.toOccurrence({start:t.start,end:t.end}),s=i.uid;o(r.dataSource.add(i),n)};t.recurrenceRule||t.isOccurrence()?(i=r.options.messages.recurrenceMessages,r._showRecurringDialog(t,l,s,{title:i.editWindowTitle,text:i.editRecurring?i.editRecurring:ge,occurrenceText:i.editWindowOccurrence,seriesText:i.editWindowSeries})):o(r.dataSource.getByUid(t.uid))},_modelForContainer:function(t){return t=e(t).closest("["+I.attr("uid")+"]"),this.dataSource.getByUid(t.attr(I.attr("uid")))},showDialog:function(e){this._editor.showDialog(e)},focus:function(){this.wrapper.focus()},_confirmation:function(e,t){var n,i,r,o,a,s=this.options.editable;s===!0||s.confirmation!==!1?(n=this.options.messages,i=n.deleteWindowTitle,r=typeof s.confirmation===W?s.confirmation:n.editable.confirmation,this._isEditorOpened()&&t.isRecurring()&&(o=this.options.messages.recurrenceMessages,i=o.deleteWindowTitle,r=t.isException()?o.deleteRecurringConfirmation?o.deleteRecurringConfirmation:ve:o.deleteSeriesConfirmation?o.deleteSeriesConfirmation:_e),a=[{name:"destroy",text:n.destroy,click:function(){e()}}],this._isMobile()&&I.mobile.ui.Pane||a.push({name:"canceledit",text:n.cancel,click:function(){e(!0)}}),this._unbindResize(),this.showDialog({model:t,text:r,title:i,buttons:a}),this._bindResize()):e()},addEvent:function(e){var t,n,i=this._editor.editable,r=this.dataSource;e=e||{},n=this.trigger("add",{event:e}),!n&&(i&&i.end()||!i)&&(this.cancelEvent(),e&&e.toJSON&&(e=e.toJSON()),t=r.add(e),t&&(this.cancelEvent(),this._editEvent(t)))},saveEvent:function(){var e,t,n,i=this._editor;i&&(e=i.editable,t=i.container,n=this._modelForContainer(t),t&&e&&e.end()&&!this.trigger(ie,{container:t,event:n})&&(n.isRecurrenceHead()&&this.dataSource._removeExceptions(n),n.dirty||n.isOccurrence()||this._convertDates(n,"remove"),this.dataSource.sync()))},cancelEvent:function(){var e,t=this._editor,n=t.container;n&&(e=this._modelForContainer(n),e&&e.isOccurrence()&&(this._convertDates(e,"remove"),this._convertDates(this.dataSource.get(e.recurrenceId),"remove")),this.dataSource.cancelChanges(e),t.close())},editEvent:function(e){var t="string"==typeof e?this.occurrenceByUid(e):e;t&&(this.cancelEvent(),t.isRecurring()?this._editRecurringDialog(t):this._editEvent(t))},_editEvent:function(e){this._unbindResize(),this._createPopupEditor(e),this._bindResize()},_editRecurringDialog:function(e){var t=this,n=function(){e.isException()?t._editEvent(e):t.addEvent(e)},i=function(){e.recurrenceId&&(e=t.dataSource.get(e.recurrenceId)),t._editEvent(e)},r=t.options.messages.recurrenceMessages;t._showRecurringDialog(e,n,i,{title:r.editWindowTitle,text:r.editRecurring?r.editRecurring:ge,occurrenceText:r.editWindowOccurrence,seriesText:r.editWindowSeries})},_showRecurringDialog:function(e,t,n,i){var r=this.options.editable,o=G(r)?r.editRecurringMode:"dialog";"occurrence"===o||this._isMultiDrag?t():"series"===o?n():(this._unbindResize(),this.showDialog({model:e,title:i.title,text:i.text,buttons:[{text:i.occurrenceText,click:t},{text:i.seriesText,click:n}]}),this._bindResize())},_createButton:function(e){var t=e.template||be,n=typeof e===W?e:e.name||e.text,i={className:"k-scheduler-"+(n||"").replace(/\s/g,""),text:n,attr:""};if(!(n||G(e)&&e.template))throw Error("Custom commands should have name specified");return G(e)?(e.className&&(e.className+=" "+i.className),"edit"===n&&G(e.text)&&(e=$(!0,{},e),e.text=e.text.edit),i=$(!0,i,b[n],e)):i=$(!0,i,b[n]),I.template(t)(i)},_convertDates:function(e,t){var n=this.dataSource.reader.timezone,i=e.startTimezone,r=e.endTimezone,o=e.start,a=e.start;t=t||"apply",i=i||r,r=r||i,i&&(n?"apply"===t?(o=I.timezone.convert(e.start,n,i),a=I.timezone.convert(e.end,n,r)):(o=I.timezone.convert(e.start,i,n),a=I.timezone.convert(e.end,r,n)):(o=I.timezone[t](e.start,i),a=I.timezone[t](e.end,r)),e._set("start",o),e._set("end",a))},_createEditor:function(){var e,n=this;e=n._editor=this._isMobile()&&I.mobile.ui.Pane?new y(this.wrapper,$({},this.options,{target:this,timezone:n.dataSource.reader.timezone,resources:n.resources,createButton:K(this._createButton,this)})):new x(this.wrapper,$({},this.options,{target:this,createButton:K(this._createButton,this),timezone:n.dataSource.reader.timezone,resources:n.resources})),e.bind("cancel",function(e){return n.trigger("cancel",{container:e.container,event:e.model})?(e.preventDefault(),t):(n.cancelEvent(),n.focus(),t)}),e.bind("edit",function(e){n.trigger(oe,{container:e.container,event:e.model})&&e.preventDefault()}),e.bind("save",function(){n.saveEvent()}),e.bind("remove",function(e){n.removeEvent(e.model)})},_createPopupEditor:function(e){var t=this._editor;e.isNew()&&!e.isOccurrence()||(e.isOccurrence()&&this._convertDates(e.recurrenceId?this.dataSource.get(e.recurrenceId):e),this._convertDates(e)),this.editable=t.editEvent(e)},removeEvent:function(e){var t=this,n="string"==typeof e?t.occurrenceByUid(e):e;n&&(n.isRecurring()?t._deleteRecurringDialog(n):t._confirmation(function(e){e||t._removeEvent(n)},n))},occurrenceByUid:function(e){var t=this.dataSource.getByUid(e);return t||(t=l(this._data,e)),t},occurrencesInRange:function(e,t){return new I.data.Query(this._data).filter({logic:"or",filters:[{logic:"and",filters:[{field:"start",operator:"gte",value:e},{field:"end",operator:"gte",value:e},{field:"start",operator:"lt",value:t}]},{logic:"and",filters:[{field:"start",operator:"lte",value:e},{field:"end",operator:"gt",value:e}]}]}).toArray()},_removeEvent:function(e){this.trigger(ne,{event:e})||this.dataSource.remove(e)&&this.dataSource.sync()},_deleteRecurringDialog:function(e){var t,n,i,r,o,a=this,s=e,l=a.options.editable,d=G(l)?l.editRecurringMode:"dialog",u=function(){var e=s.recurrenceId?s:s.toOccurrence(),t=a.dataSource.get(e.recurrenceId);a._convertDates(t),a._removeEvent(e)},c=function(){s.recurrenceId&&(s=a.dataSource.get(s.recurrenceId)),a._removeEvent(s)};("dialog"!=d||a._isEditorOpened())&&(t=function(){a._confirmation(function(e){e||u()},s)},n=function(){a._confirmation(function(e){e||c()},s)}),i=n||c,r=t||u,a._isEditorOpened()?e.isException()?r():i():(o=a.options.messages.recurrenceMessages,a._showRecurringDialog(e,r,i,{title:o.deleteWindowTitle,text:o.deleteRecurring?o.deleteRecurring:me,occurrenceText:o.deleteWindowOccurrence,seriesText:o.deleteWindowSeries}))},_isEditorOpened:function(){return!!this._editor.container},_unbindView:function(e){var t=this;t.angular("cleanup",function(){return{elements:t.items()}}),e.destroy()},_bindView:function(e){var t=this;t.options.editable&&(t._viewRemoveHandler&&e.unbind(ne,t._viewRemoveHandler),t._viewRemoveHandler=function(e){t.removeEvent(e.uid)},e.bind(ne,t._viewRemoveHandler),t._viewAddHandler&&e.unbind(re,t._viewAddHandler),t._viewAddHandler=function(e){t.addEvent(e.eventInfo)},e.bind(re,this._viewAddHandler),t._viewEditHandler&&e.unbind(oe,t._viewEditHandler),t._viewEditHandler=function(e){t.editEvent(e.uid)},e.bind(oe,this._viewEditHandler)),t._viewNavigateHandler&&e.unbind("navigate",t._viewNavigateHandler),
t._viewNavigateHandler=function(e){var n,i;e.view&&(n="isWorkDay"in e,i=n?"changeWorkDay":"changeView",t.trigger("navigate",{view:e.view,isWorkDay:e.isWorkDay,action:i,date:e.date})||(n&&(t._workDayMode=e.isWorkDay),t._selectView(e.view),t.date(e.date)))},e.bind("navigate",t._viewNavigateHandler),t._viewActivateHandler&&e.unbind("activate",t._viewActivateHandler),t._viewActivateHandler=function(){var e=this;t._selection&&(e.constrainSelection(t._selection),t._select(),t._adjustSelectedDate())},e.bind("activate",t._viewActivateHandler)},_selectView:function(e){var t,n,i,r=this;e&&r.views[e]&&(r._selectedView&&r._unbindView(r._selectedView),r._selectedView=r._renderView(e),r._selectedViewName=e,r._viewsCount>1&&(t=ke({views:r.views,view:e,ns:I.ns}),n=r.toolbar.find(".k-scheduler-views li:first-child"),n.is(".k-current-view")?n.replaceWith(t):r.toolbar.find(".k-scheduler-views").prepend(t),i=r.toolbar.find(".k-scheduler-views li").removeClass("k-state-selected"),i.end().find(".k-view-"+e.replace(/\./g,"\\.").toLowerCase()).addClass("k-state-selected")))},view:function(e){var n=this;return e?(n._selectView(e),n.rebind(),t):n._selectedView},viewName:function(){return this.view().name},_renderView:function(e){var t=this._initializeView(e);return this._bindView(t),this._model.set("formattedDate",t.dateForTitle()),this._model.set("formattedShortDate",t.shortDateForTitle()),t},resize:function(e){var t=this.getSize(),n=this._size,i=this.view();i&&i.groups&&(!e&&n&&t.width===n.width&&t.height===n.height||(this.refresh({action:"resize"}),this._size=t))},_adjustSelectedDate:function(){var e=this._model.selectedDate,t=this._selection,n=t.start;n&&!I.date.isInDateRange(e,H(n),H(t.end))&&e.setFullYear(n.getFullYear(),n.getMonth(),n.getDate())},_initializeView:function(e){var t,n,i=this.views[e];if(i){if(t=G(i),n=i.type,typeof n===W&&(n=I.getter(i.type)(window)),!n)throw Error("There is no such view");i=new n(this.wrapper,h($(!0,{},this.options,t?i:{},{resources:this.resources,date:this.date(),showWorkHours:this._workDayMode})))}return i},_views:function(){var e,t,n,i,r,o,a,s,l,d=this.options.views;for(this.views={},this._viewsCount=0,a=0,s=d.length;a<s;a++)l=!1,e=d[a],i=G(e),i?(o=r=e.type?e.type:e,typeof o!==W&&(r=e.name||e.title,l=!0)):o=r=e,t=T[r],t&&!l&&(e.type=t.type,t.title=this.options.messages.views[r],"day"===t.type?t.messages={allDay:this.options.messages.allDay}:"agenda"===t.type&&(t.messages={event:this.options.messages.event,date:this.options.messages.date,time:this.options.messages.time})),e=$({title:r},t,i?e:{}),r&&(this.views[r]=e,this._viewsCount++,n&&!e.selected||(n=r));n&&(this._selectedViewName=n)},rebind:function(){this.dataSource.fetch()},_dataSource:function(){var e=this,t=e.options,n=t.dataSource;n=Q(n)?{data:n}:n,!t.timezone||n instanceof Me?n instanceof Me&&(t.timezone=n.options.schema?n.options.schema.timezone:""):n=$(!0,n,{schema:{timezone:t.timezone}}),e.dataSource&&e._refreshHandler?e.dataSource.unbind(ee,e._refreshHandler).unbind("progress",e._progressHandler).unbind("error",e._errorHandler):(e._refreshHandler=K(e.refresh,e),e._progressHandler=K(e._requestStart,e),e._errorHandler=K(e._error,e)),e.dataSource=I.data.SchedulerDataSource.create(n).bind(ee,e._refreshHandler).bind("progress",e._progressHandler).bind("error",e._errorHandler),e.options.dataSource=e.dataSource},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_progress:function(e){var t=this.element.find(".k-scheduler-content");I.ui.progress(t,e)},_resources:function(){var t,n,i,r,o,a=this,s=a.options.resources;for(t=0;t<s.length;t++){if(n=s[t],i=n.field,r=n.dataSource,!i||!r)throw Error('The "field" and "dataSource" options of the scheduler resource are mandatory.');a.resources.push({field:i,name:n.name||i,title:n.title||i,dataTextField:n.dataTextField||"text",dataValueField:n.dataValueField||"value",dataColorField:n.dataColorField||"color",valuePrimitive:null==n.valuePrimitive||n.valuePrimitive,multiple:n.multiple||!1,dataSource:I.data.DataSource.create(r)})}o=e.map(a.resources,function(e){return e.dataSource.fetch()}),e.when.apply(null,o).then(function(){a.options.autoBind?a.view(a._selectedViewName):a._selectView(a._selectedViewName)})},_initModel:function(){var e=this;e._model=I.observable({selectedDate:new Date(this.options.date),formattedDate:"",formattedShortDate:""}),e._model.bind("change",function(t){"selectedDate"===t.field&&e.view(e._selectedViewName)})},_wrapper:function(){var e=this,t=e.options,n=t.height,i=t.width;e.wrapper=e.element.addClass("k-widget k-scheduler k-floatwrap").attr("role","grid").attr("aria-multiselectable",!0),e._isMobile()&&e.wrapper.addClass("k-scheduler-mobile"),e._isMobilePhoneView()&&e.wrapper.addClass("k-scheduler-phone"),n&&e.wrapper.height(n),i&&e.wrapper.width(i)},date:function(e){return null!=e&&H(e)>=H(this.options.min)&&H(e)<=H(this.options.max)&&this._model.set("selectedDate",e),H(this._model.get("selectedDate"))},_toolbar:function(){var n,i,r=this,o=r.options,a=[];o.toolbar&&(a=e.isArray(o.toolbar)?o.toolbar:[o.toolbar]),n=this._isMobilePhoneView()?ye:we,i=e(n({messages:o.messages,pdf:e.grep(a,function(e){return"pdf"==e||"pdf"==e.name}).length>0,ns:I.ns,view:r._selectedViewName,views:r.views,viewsCount:r._viewsCount})),r.wrapper.append(i),r.toolbar=i,I.bind(r.toolbar,r._model),i.on(J+X,".k-pdf",function(e){e.preventDefault(),r.saveAsPDF()}),i.on(J+X,".k-scheduler-navigation li",function(n){var i,o=e(this),a=new Date(r.date()),s="",l=new Date,d=r.options.timezone;if(n.preventDefault(),o.hasClass("k-nav-today"))s="today",d?(i=I.timezone.offset(l,d),a=I.timezone.convert(l,l.getTimezoneOffset(),i)):a=l;else if(o.hasClass("k-nav-next"))s="next",a=r.view().nextDate();else if(o.hasClass("k-nav-prev"))s="previous",a=r.view().previousDate();else if(o.hasClass("k-nav-current")&&!r._isMobilePhoneView())return r._showCalendar(),t;r.trigger("navigate",{view:r._selectedViewName,action:s,date:a})||r.date(a)}),i.on(J+X,".k-scheduler-views li:not(.k-current-view), .k-scheduler-refresh",function(t){t.preventDefault();var n=e(this).attr(I.attr("name"));r.trigger("navigate",{view:n,action:"changeView",date:r.date()})||(r.view(n),r.element.find("."+se).removeClass(se))}),i.on(J+X,".k-scheduler-views li.k-current-view",function(t){t.preventDefault(),r.element.find(".k-scheduler-views").toggleClass(se),e(document).on(Z+X,function(t){0===e(t.target).closest(".k-scheduler-views").length&&(r.element.find("."+se).removeClass(se),e(document).off(J+X))})}),i.find("li").hover(function(){e(this).addClass("k-state-hover")},function(){e(this).removeClass("k-state-hover")})},_showCalendar:function(){var t=this,n=t.toolbar.find(".k-nav-current"),i=e('<div class="k-calendar-container"><div class="k-scheduler-calendar"/></div>');t.popup||(t.popup=new U(i,{anchor:n,open:function(){t.calendar||(t.calendar=new q(this.element.find(".k-scheduler-calendar"),{change:function(){var e=this.value();t.trigger("navigate",{view:t._selectedViewName,action:"changeDate",date:e})||(t.date(e),t.popup.close()),t._selectedView.element.focus(),t.toolbar.find(".k-nav-current").focus().addClass(ae)},min:t.options.min,max:t.options.max})),t.calendar.element.on("keydown"+X,function(e){e.keyCode!==P.ESC&&e.keyCode!==P.TAB||(t.popup.close(),t._selectedView.element.focus(),t.toolbar.find(".k-nav-current").focus().addClass(ae))}),t.calendar.value(t.date())},copyAnchorStyles:!1})),t.popup.open(),t.calendar.element.find("table").focus()},refresh:function(e){var t=this,n=this.view();this._progress(!1),this.angular("cleanup",function(){return{elements:t.items()}}),e=e||{},n&&(e&&"itemchange"===e.action&&(this._editor.editable||this._preventRefresh)||this.trigger("dataBinding",{action:e.action||"rebind",index:e.index,items:e.items})||(e&&"resize"===e.action||!this._editor||this._editor.close(),this._data=this.dataSource.expand(n.startDate(),n.visibleEndDate()),n.refreshLayout(),n.render(this._data),this.trigger("dataBound")))},slotByPosition:function(e,t){var n,i=this.view();return i._slotByPosition?(n=i._slotByPosition(e,t),n?{startDate:n.startDate(),endDate:n.endDate(),groupIndex:n.groupIndex,element:n.element,isDaySlot:n.isDaySlot}:null):null},slotByElement:function(t){var n=e(t).offset();return this.slotByPosition(n.left,n.top)},resourcesBySlot:function(e){return this.view()._resourceBySlot(e)}}),T={day:{type:"kendo.ui.DayView"},week:{type:"kendo.ui.WeekView"},workWeek:{type:"kendo.ui.WorkWeekView"},agenda:{type:"kendo.ui.AgendaView"},month:{type:"kendo.ui.MonthView"},timeline:{type:"kendo.ui.TimelineView"},timelineWeek:{type:"kendo.ui.TimelineWeekView"},timelineWorkWeek:{type:"kendo.ui.TimelineWorkWeekView"},timelineMonth:{type:"kendo.ui.TimelineMonthView"}},L.plugin(C),I.PDFMixin&&(I.PDFMixin.extend(C.prototype),S="k-scheduler-pdf-export",C.fn._drawPDF=function(t){var n,i,r,o=this.wrapper,a=o[0].style.cssText;return o.css({width:o.width(),height:o.height()}),o.addClass(S),n=this,i=new e.Deferred,r=o.find(".k-scheduler-content").find("table").css("table-layout","auto"),setTimeout(function(){r.css("table-layout","fixed"),n.resize(!0),n._drawPDFShadow({},{avoidLinks:n.options.pdf.avoidLinks}).done(function(e){var n={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(n),i.resolve(n.page)}).fail(function(e){i.reject(e)}).always(function(){o[0].style.cssText=a,o.removeClass(S),n.resize(!0),n.resize(!0)})}),i}),D=O.extend({init:function(e,t){var n=this,i=I.timezone.windows_zones;if(!i||!I.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");O.fn.init.call(n,e,t),n.wrapper=n.element,n._zonesQuery=new I.data.Query(i),n._zoneTitleId=I.guid(),n._zoneTitlePicker(),n._zonePicker(),n._zoneTitle.bind("cascade",function(){this.value()||n._zone.wrapper.hide()}),n._zone.bind("cascade",function(){n._value=this.value(),n.trigger("change")}),n.value(n.options.value)},options:{name:"TimezoneEditor",value:"",optionLabel:"No timezone"},events:["change"],_zoneTitlePicker:function(){var t=this,n=e('<input id="'+t._zoneTitleId+'" aria-label="'+t.options.title+'"/>').appendTo(t.wrapper);t._zoneTitle=new I.ui.DropDownList(n,{dataSource:I.timezone.zones_titles,dataValueField:"other_zone",dataTextField:"name",optionLabel:t.options.optionLabel})},_zonePicker:function(){var t=this,n=e('<input aria-label="'+t.options.title+'"/>').appendTo(this.wrapper);t._zone=new I.ui.DropDownList(n,{dataValueField:"zone",dataTextField:"territory",dataSource:t._zonesQuery.data,cascadeFrom:t._zoneTitleId,dataBound:function(){t._value=this.value(),this.wrapper.toggle(this.dataSource.view().length>1)}}),t._zone.wrapper.hide()},destroy:function(){O.fn.destroy.call(this),I.destroy(this.wrapper)},value:function(e){var n,i=this;return e===t?i._value:(n=i._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],n?(i._zoneTitle.value(n.other_zone),i._zone.value(n.zone)):i._zoneTitle.select(0),t)}}),L.plugin(D),F=I.template('<option value="#=other_zone#">#=name#</option>'),E=I.template('<option value="#=zone#">#=territory#</option>'),A=O.extend({init:function(e,t){var n=this,i=I.timezone.windows_zones;if(!i||!I.timezone.zones_titles)throw Error("kendo.timezones.min.js is not included.");O.fn.init.call(n,e,t),n.wrapper=n.element,n._zonesQuery=new I.data.Query(i),n._zoneTitlePicker(),n._zonePicker(),n.value(n.options.value)},options:{name:"MobileTimezoneEditor",optionLabel:"No timezone",value:""},events:["change"],_bindZones:function(e){var t=e?this._filter(e):[];this._zone.html(this._options(t,E))},_filter:function(e){return this._zonesQuery.filter({field:"other_zone",operator:"eq",value:e}).data},_options:function(e,t,n){var i=0,r="",o=e.length;for(n&&(r+=t({other_zone:"",name:n}));i<o;i++)r+=t(e[i]);return r},_zoneTitlePicker:function(){var t=this,n=t._options(I.timezone.zones_titles,F,t.options.optionLabel);t._zoneTitle=e("<select>"+n+"</select>").appendTo(t.wrapper).change(function(){var e=this.value,n=t._zone;t._bindZones(e),e&&n[0].children.length>1?n.show():n.hide(),t._value=n[0].value,t.trigger("change")})},_zonePicker:function(){var t=this;t._zone=e('<select style="display:none"></select>').appendTo(this.wrapper).change(function(){t._value=this.value,t.trigger("change")}),t._bindZones(t._zoneTitle.val()),t._value=t._zone[0].value},destroy:function(){O.fn.destroy.call(this),I.destroy(this.wrapper)},value:function(e){var n,i=this,r=i._zone,o="",a="";return e===t?i._value:(n=i._zonesQuery.filter({field:"zone",operator:"eq",value:e}).data[0],n&&(a=n.zone,o=n.other_zone),i._zoneTitle.val(o),i._bindZones(o),r.val(a),a=r[0].value,a&&r[0].children.length>1?r.show():r.hide(),i._value=a,t)}}),L.plugin(A)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.touch.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){var n=window.kendo,i=n.ui.Widget,r=e.proxy,o=Math.abs,a=20,s=i.extend({init:function(e,t){function o(e){return function(t){s._triggerTouch(e,t)}}function a(e){return function(t){s.trigger(e,{touches:t.touches,distance:t.distance,center:t.center,event:t.event})}}var s=this;i.fn.init.call(s,e,t),t=s.options,e=s.element,s.wrapper=e,s.events=new n.UserEvents(e,{filter:t.filter,surface:t.surface,minHold:t.minHold,multiTouch:t.multiTouch,allowSelection:!0,fastTap:t.fastTap,press:o("touchstart"),hold:o("hold"),tap:r(s,"_tap"),gesturestart:a("gesturestart"),gesturechange:a("gesturechange"),gestureend:a("gestureend")}),t.enableSwipe?(s.events.bind("start",r(s,"_swipestart")),s.events.bind("move",r(s,"_swipemove"))):(s.events.bind("start",r(s,"_dragstart")),s.events.bind("move",o("drag")),s.events.bind("end",o("dragend"))),n.notify(s)},events:["touchstart","dragstart","drag","dragend","tap","doubletap","hold","swipe","gesturestart","gesturechange","gestureend"],options:{name:"Touch",surface:null,global:!1,fastTap:!1,filter:null,multiTouch:!1,enableSwipe:!1,minXDelta:30,maxYDelta:20,maxDuration:1e3,minHold:800,doubleTapTimeout:800},cancel:function(){this.events.cancel()},destroy:function(){i.fn.destroy.call(this),this.events.destroy()},_triggerTouch:function(e,t){this.trigger(e,{touch:t.touch,event:t.event})&&t.preventDefault()},_tap:function(e){var t=this,i=t.lastTap,r=e.touch;i&&r.endTime-i.endTime<t.options.doubleTapTimeout&&n.touchDelta(r,i).distance<a?(t._triggerTouch("doubletap",e),t.lastTap=null):(t._triggerTouch("tap",e),t.lastTap=r)},_dragstart:function(e){this._triggerTouch("dragstart",e)},_swipestart:function(e){2*o(e.x.velocity)>=o(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this,n=t.options,i=e.touch,r=e.event.timeStamp-i.startTime,a=i.x.initialDelta>0?"right":"left";o(i.x.initialDelta)>=n.minXDelta&&o(i.y.initialDelta)<n.maxYDelta&&r<n.maxDuration&&(t.trigger("swipe",{direction:a,touch:e.touch}),i.cancel())}});n.ui.plugin(s)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.gantt.list.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min","kendo.columnsorter.min","kendo.datetimepicker.min","kendo.editable.min"],e)}(function(){return function(e){function t(e){var t,n,i=[],r=e.className;for(t=0,n=e.level;t<n;t++)i.push(o("span",{className:r}));return i}function n(){var t=i._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).blur()}var i=window.kendo,r=i.dom,o=r.element,a=r.text,s=i.support.browser,l=i.support.mobileOS,d=i.ui,u=d.Widget,c=e.extend,h=i._outerWidth,p=i._outerHeight,f=e.map,m=e.isFunction,g=s.msie&&s.version<9,v=i.keys,_={title:"Title",start:"Start Time",end:"End Time",percentComplete:"% Done",parentId:"Predecessor ID",id:"ID",orderId:"Order ID"},b="string",k=".kendoGanttList",w="click",y=".",x="<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",C={wrapper:"k-treelist k-grid k-widget",header:"k-header",alt:"k-alt",rtl:"k-rtl",editCell:"k-edit-cell",group:"k-treelist-group",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",selected:"k-state-selected",icon:"k-icon",iconCollapse:"k-i-collapse",iconExpand:"k-i-expand",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",link:"k-link",resizeHandle:"k-resize-handle",resizeHandleInner:"k-resize-handle-inner",dropPositions:"k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",dropTop:"k-i-insert-up",dropBottom:"k-i-insert-down",dropAdd:"k-i-plus",dropMiddle:"k-i-insert-middle",dropDenied:"k-i-cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text"},T=d.GanttList=u.extend({init:function(t,n){u.fn.init.call(this,t,n),0===this.options.columns.length&&this.options.columns.push("title"),this.dataSource=this.options.dataSource,this._columns(),this._layout(),this._domTrees(),this._header(),this._sortable(),this._editable(),this._selectable(),this._draggable(),this._resizable(),this._attachEvents(),this._adjustHeight(),this.bind("render",function(){var t,n;this.options.resizable&&(t=this.header.find("col"),n=this.content.find("col"),this.header.find("th").not(":last").each(function(i){var r=h(e(this));t.eq(i).width(r),n.eq(i).width(r)}),t.last().css("width","auto"),n.last().css("width","auto"))},!0)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-p(this.header.parent()))},destroy:function(){u.fn.destroy.call(this),this._reorderDraggable&&this._reorderDraggable.destroy(),this._tableDropArea&&this._tableDropArea.destroy(),this._contentDropArea&&this._contentDropArea.destroy(),this._columnResizable&&this._columnResizable.destroy(),this.touch&&this.touch.destroy(),this.timer&&clearTimeout(this.timer),this.content.off(k),this.header.find("thead").off(k),this.header.find(y+T.link).off(k),this.header=null,this.content=null,this.levels=null,i.destroy(this.element)},options:{name:"GanttList",selectable:!0,editable:!0,resizable:!1},_attachEvents:function(){var t=this,n=T.styles;t.content.on(w+k,"td > span."+n.icon+":not(."+n.iconHidden+")",function(n){var i=e(this),r=t._modelFromElement(i);r.set("expanded",!r.get("expanded")),n.stopPropagation()})},_domTrees:function(){this.headerTree=new r.Tree(this.header[0]),this.contentTree=new r.Tree(this.content[0])},_columns:function(){var e=this.options.columns,t=function(){this.field="",this.title="",this.editable=!1,this.sortable=!1};this.columns=f(e,function(e){return e=typeof e===b?{field:e,title:_[e]}:e,c(new t,e)})},_layout:function(){var t=this,n=this.options,r=this.element,o=T.styles,a=function(){var r,o=typeof n.rowHeight===b?n.rowHeight:n.rowHeight+"px",a=e(i.format(x,o));return t.content.append(a),r=p(a.find("tr")),a.remove(),r};r.addClass(o.wrapper).append("<div class='"+o.gridHeader+"'><div class='"+o.gridHeaderWrap+"'></div></div>").append("<div class='"+o.gridContentWrap+"'></div>"),this.header=r.find(y+o.gridHeaderWrap),this.content=r.find(y+o.gridContent),n.rowHeight&&(this._rowHeight=a())},_header:function(){var e=this.headerTree,t=o("colgroup",null,this._cols()),n=o("thead",{role:"rowgroup"},[o("tr",{role:"row"},this._ths())]),i=o("table",{style:{minWidth:this.options.listWidth+"px"},role:"grid"},[t,n]);e.render([i])},_render:function(e){var t,n,i,r={style:{minWidth:this.options.listWidth+"px"},tabIndex:0,role:"treegrid"};this._rowHeight&&(r.style.height=e.length*this._rowHeight+"px"),this.levels=[{field:null,value:0}],t=o("colgroup",null,this._cols()),n=o("tbody",{role:"rowgroup"},this._trs(e)),i=o("table",r,[t,n]),this.contentTree.render([i]),this.trigger("render")},_ths:function(){var e,t,n,i,r=this.columns,s=[];for(n=0,i=r.length;n<i;n++)e=r[n],t={"data-field":e.field,"data-title":e.title,className:T.styles.header,role:"columnheader"},s.push(o("th",t,[a(e.title)]));return this.options.resizable&&s.push(o("th",{className:T.styles.header,role:"columnheader"})),s},_cols:function(){var e,t,n,i,r,a=this.columns,s=[];for(i=0,r=a.length;i<r;i++)e=a[i],n=e.width,t=n&&0!==parseInt(n,10)?{style:{width:typeof n===b?n:n+"px"}}:null,s.push(o("col",t,[]));return this.options.resizable&&s.push(o("col",{style:{width:"1px"}})),s},_trs:function(e){var t,n,i,r,o,a=[],s=[],l=T.styles;for(r=0,o=e.length;r<o;r++)t=e[r],i=this._levels({idx:t.parentId,id:t.id,summary:t.summary}),n={"data-uid":t.uid,"data-level":i,role:"row"},t.summary&&(n["aria-expanded"]=t.expanded),r%2!==0&&s.push(l.alt),t.summary&&s.push(l.group),s.length&&(n.className=s.join(" ")),a.push(this._tds({task:t,attr:n,level:i})),s=[];return a},_tds:function(e){var t,n,i,r=[],a=this.columns;for(n=0,i=a.length;n<i;n++)t=a[n],r.push(this._td({task:e.task,column:t,level:e.level}));return this.options.resizable&&r.push(o("td",{role:"gridcell"})),o("tr",e.attr,r)},_td:function(e){var n,r,s,l=[],d=this.options.resourcesField,u=T.styles,c=e.task,h=e.column,p=c.get(h.field);if(h.field==d){for(p=p||[],n=[],s=0;s<p.length;s++)n.push(i.format("{0} [{1}]",p[s].get("name"),p[s].get("formatedValue")));n=n.join(", ")}else n=h.format?i.format(h.format,p):p;return"title"===h.field&&(l=t({level:e.level,className:u.iconPlaceHolder}),l.push(o("span",{className:u.icon+" "+(c.summary?c.expanded?u.iconCollapse:u.iconExpand:u.iconHidden)})),r=i.format("{0}, {1:P0}",n,c.percentComplete)),l.push(o("span",{"aria-label":r},[a(n)])),o("td",{role:"gridcell"},l)},_levels:function(e){var t,n,i,r=this.levels,o=e.summary,a=e.idx,s=e.id;for(n=0,i=r.length;n<i;n++)if(t=r[n],t.field==a)return o&&r.push({field:s,value:t.value+1}),t.value},_sortable:function(){var e,t,n,r,o,a=this,s=this.options.resourcesField,l=this.columns,d=this.header.find("th["+i.attr("field")+"]"),u=function(e){(0===a.dataSource.total()||a.editable&&a.editable.trigger("validate"))&&e.preventDefault()};for(r=0,o=d.length;r<o;r++)e=l[r],e.sortable&&e.field!==s&&(n=d.eq(r),t=n.data("kendoColumnSorter"),t&&t.destroy(),n.attr("data-"+i.ns+"field",e.field).kendoColumnSorter({dataSource:this.dataSource,change:u}));d=null},_selectable:function(){var t=this,n=this.options.selectable;n&&this.content.on(w+k,"tr",function(n){var i=e(this);t.editable&&t.editable.trigger("validate"),n.ctrlKey?t.clearSelection():t.select(i)})},select:function(e){var t=this.content.find(e),n=T.styles.selected;return t.length?(t.siblings(y+n).removeClass(n).attr("aria-selected",!1).end().addClass(n).attr("aria-selected",!0),void this.trigger("change")):this.content.find(y+n)},clearSelection:function(){var e=this.select();e.length&&(e.removeClass(T.styles.selected),this.trigger("change"))},_setDataSource:function(e){this.dataSource=e,this._sortable()},_editable:function(){var t=this,i=this.options.editable,r=T.styles,o="span."+r.icon+":not("+r.iconHidden+")",a=function(){var e=t.editable;e&&(e.end()?t._closeCell():e.trigger("validate"))},s=function(t){var i=e(t.currentTarget);i.hasClass(r.editCell)||n()};i&&i.update!==!1&&(this._startEditHandler=function(n){var i=n.currentTarget?e(n.currentTarget):n,r=t._columnFromElement(i);t.editable||r&&r.editable&&t._editCell({cell:i,column:r})},t.content.on("focusin"+k,function(){clearTimeout(t.timer),t.timer=null}).on("focusout"+k,function(){t.timer=setTimeout(a,1)}).on("keydown"+k,function(e){e.keyCode===v.ENTER&&e.preventDefault()}).on("keyup"+k,function(e){var i,r,o=e.keyCode;switch(o){case v.ENTER:n(),a();break;case v.ESC:t.editable&&(i=t._editableContainer,r=t._modelFromElement(i),t.trigger("cancel",{model:r,cell:i})||t._closeCell(!0))}}),l?t.touch=t.content.kendoTouch({filter:"td",touchstart:function(e){s(e.touch)},doubletap:function(n){e(n.touch.initialTouch).is(o)||t._startEditHandler(n.touch)}}).data("kendoTouch"):t.content.on("mousedown"+k,"td",function(e){s(e)}).on("dblclick"+k,"td",function(n){e(n.target).is(o)||t._startEditHandler(n)}))},_editCell:function(t){var n,r=this.options.resourcesField,o=T.styles,a=t.cell,s=t.column,l=this._modelFromElement(a),d=this.dataSource._createNewModel(l.toJSON()),u=d.fields[s.field]||d[s.field],c=u.validation,h=i.attr("type"),p=i.attr("bind"),f=i.attr("format"),v={name:s.field,required:!!u.validation&&u.validation.required===!0};return s.field===r?void s.editor(a,d):(this._editableContent=a.children().detach(),this._editableContainer=a,a.data("modelCopy",d),"date"!==u.type&&"date"!==e.type(u)||s.format&&!/H|m|s|F|g|u/.test(s.format)||(v[p]="value:"+s.field,v[h]="date",s.format&&(v[f]=i._extractFormat(s.format)),n=function(t,n){e('<input type="text"/>').attr(v).appendTo(t).kendoDateTimePicker({format:n.format})}),this.editable=a.addClass(o.editCell).kendoEditable({fields:{field:s.field,format:s.format,editor:s.editor||n},model:d,clearContainer:!1}).data("kendoEditable"),c&&c.dateCompare&&m(c.dateCompare)&&c.message&&(e("<span "+i.attr("for")+'="'+s.field+'" class="k-invalid-msg"/>').hide().appendTo(a),a.find("[name="+s.field+"]").attr(i.attr("dateCompare-msg"),c.message)),this.editable.bind("validate",function(e){var t=this.element.find(":kendoFocusable:first").focus();g&&t.focus(),e.preventDefault()}),void(this.trigger("edit",{model:l,cell:a})&&this._closeCell(!0)))},_closeCell:function(e){var t=T.styles,n=this._editableContainer,i=this._modelFromElement(n),r=this._columnFromElement(n),o=r.field,a=n.data("modelCopy"),s={};s[o]=a.get(o),n.empty().removeData("modelCopy").removeClass(t.editCell).append(this._editableContent),this.editable.unbind(),this.editable.destroy(),this.editable=null,this._editableContainer=null,this._editableContent=null,e||("start"===o&&(s.end=new Date(s.start.getTime()+i.duration())),this.trigger("update",{task:i,updateInfo:s}))},_draggable:function(){var t,n=this,r=null,o=!0,a=T.styles,s=i.support.isRtl(this.element),d="tr["+i.attr("level")+" = 0]:last",u={},h=this.options.editable,p=function(){r=null,t=null,o=!0,u={}},f=function(e){for(var t=e;t;){if(r.get("id")===t.get("id")){o=!1;break}t=n.dataSource.taskParent(t)}},m=function(){var n=e(t).height(),r=i.getOffset(t).top;c(t,{beforeLimit:r+.25*n,afterLimit:r+.75*n})},g=function(e){var n,r,o,s,l;t&&(n=e.location,r=a.dropAdd,o="add",s=parseInt(t.attr(i.attr("level")),10),n<=t.beforeLimit?(l=t.prev(),r=a.dropTop,o="insert-before"):n>=t.afterLimit&&(l=t.next(),r=a.dropBottom,o="insert-after"),l&&parseInt(l.attr(i.attr("level")),10)===s&&(r=a.dropMiddle),u.className=r,u.command=o)},v=function(){return n._reorderDraggable.hint.children(y+a.dragStatus).removeClass(a.dropPositions)};h&&h.reorder!==!1&&h.update!==!1&&(this._reorderDraggable=this.content.kendoDraggable({distance:10,holdToDrag:l,group:"listGroup",filter:"tr[data-uid]",ignore:y+a.input,hint:function(t){return e('<div class="'+a.header+" "+a.dragClue+'"/>').css({width:300,paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).append('<span class="'+a.icon+" "+a.dragStatus+'" /><span class="'+a.dragClueText+'"/>')},cursorOffset:{top:-20,left:0},container:this.content,dragstart:function(e){var t=n.editable;return t&&t.reorder!==!1&&t.trigger("validate")?void e.preventDefault():(r=n._modelFromElement(e.currentTarget),this.hint.children(y+a.dragClueText).text(r.get("title")),void(s&&this.hint.addClass(a.rtl)))},drag:function(e){o&&(g(e.y),v().addClass(u.className))},dragend:function(){p()},dragcancel:function(){p()}}).data("kendoDraggable"),this._tableDropArea=this.content.kendoDropTargetArea({distance:0,group:"listGroup",filter:"tr[data-uid]",dragenter:function(e){t=e.dropTarget,f(n._modelFromElement(t)),m(),v().toggleClass(a.dropDenied,!o)},dragleave:function(){o=!0,v()},drop:function(){var e=n._modelFromElement(t),i=e.orderId,a={parentId:e.parentId};if(o){switch(u.command){case"add":a.parentId=e.id;break;case"insert-before":a.orderId=e.parentId===r.parentId&&e.orderId>r.orderId?i-1:i;break;case"insert-after":a.orderId=e.parentId===r.parentId&&e.orderId>r.orderId?i:i+1}n.trigger("update",{task:r,updateInfo:a})}}}).data("kendoDropTargetArea"),this._contentDropArea=this.element.kendoDropTargetArea({distance:0,group:"listGroup",filter:y+a.gridContent,drop:function(){var e=n._modelFromElement(n.content.find(d)),t=e.orderId,i={parentId:null,orderId:null!==r.parentId?t+1:t};n.trigger("update",{task:r,updateInfo:i})}}).data("kendoDropTargetArea"))},_resizable:function(){var t=this,n=T.styles,i=function(i){var r,o,a=e(i.currentTarget),s=t.resizeHandle,l=a.position(),d=l.left,u=h(a),c=a.closest("div"),f=i.clientX+e(window).scrollLeft(),m=t.options.columnResizeHandleWidth;return d+=c.scrollLeft(),s||(s=t.resizeHandle=e('<div class="'+n.resizeHandle+'"><div class="'+n.resizeHandleInner+'" /></div>')),r=a.offset().left+u,(o=f>r-m&&f<r+m)?(c.append(s),void s.show().css({top:l.top,left:d+u-m-1,height:p(a),width:3*m}).data("th",a)):void s.hide()};this.options.resizable&&(this._columnResizable&&this._columnResizable.destroy(),this.header.find("thead").on("mousemove"+k,"th",i),this._columnResizable=this.header.kendoResizable({handle:y+n.resizeHandle,start:function(n){var i=e(n.currentTarget).data("th"),r="col:eq("+i.index()+")",o=t.header.find("table"),a=t.content.find("table");t.element.addClass("k-grid-column-resizing"),this.col=a.children("colgroup").find(r).add(o.find(r)),this.th=i,this.startLocation=n.x.location,this.columnWidth=h(i),this.table=o.add(a),this.totalWidth=this.table.width()-h(o.find("th:last"))},resize:function(e){var t=11,n=e.x.location-this.startLocation;this.columnWidth+n<t&&(n=t-this.columnWidth),this.table.css({minWidth:this.totalWidth+n}),this.col.width(this.columnWidth+n)},resizeend:function(){var e,n,i;t.element.removeClass("k-grid-column-resizing"),e=Math.floor(this.columnWidth),n=Math.floor(h(this.th)),i=t.columns[this.th.index()],t.trigger("columnResize",{column:i,oldWidth:e,newWidth:n}),this.table=this.col=this.th=null}}).data("kendoResizable"))},_modelFromElement:function(e){var t=e.closest("tr"),n=this.dataSource.getByUid(t.attr(i.attr("uid")));return n},_columnFromElement:function(e){var t=e.closest("td"),n=t.parent(),i=n.children().index(t);return this.columns[i]}});c(!0,d.GanttList,{styles:C})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.gantt.timeline.min",["kendo.dom.min","kendo.touch.min","kendo.draganddrop.min"],e)}(function(){return function(e){function t(e){return delete e.name,delete e.prefix,delete e.views,e}function n(e){var t=[],n=e.workWeekStart;for(t.push(n);e.workWeekEnd!=n;)n>6?n-=7:n++,t.push(n);return t}function i(){var t=kendo._activeElement();t&&"body"!==t.nodeName.toLowerCase()&&e(t).blur()}var r,o,a=kendo.ui.Widget,s=kendo.dom.element,l=kendo.dom.text,d=kendo.dom.html,u=e.isPlainObject,c=kendo._outerWidth,h=kendo._outerHeight,p=e.extend,f=e.proxy,m=kendo.support.browser,g=!1,v=kendo.keys,_=kendo.data.Query,b="string",k=".kendoGanttTimeline",w="click",y="dblclick",x="mousemove",C="mouseenter",T="mouseleave",S="keydown",D=".",F=kendo.template("#=kendo.toString(start, 't')#"),E=kendo.template("#=kendo.toString(start, 'ddd M/dd')#"),A=kendo.template("#=kendo.toString(start, 'ddd M/dd')# - #=kendo.toString(kendo.date.addDays(end, -1), 'ddd M/dd')#"),I=kendo.template("#=kendo.toString(start, 'MMM')#"),R=kendo.template("#=kendo.toString(start, 'yyyy')#"),M=kendo.template('<div class="#=styles.marquee#"><div class="#=styles.marqueeColor#"></div></div>'),z=kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#"><div class="#=styles.tooltipContent#"><div>#=messages.start#: #=kendo.toString(start, format)#</div><div>#=messages.end#: #=kendo.toString(end, format)#</div></div></div>'),H=kendo.template('<div style="z-index: 100002;" class="#=styles.tooltipWrapper#" ><div class="#=styles.tooltipContent#">#=text#%</div><div class="#=styles.tooltipCallout#" style="left:13px;"></div></div>'),N=kendo.template('<div class="#=kendo.htmlEncode(styles.taskDetails)#"><strong>#=kendo.htmlEncode(task.title)#</strong><div class="#=styles.taskDetailsPercent#">#=kendo.toString(task.percentComplete, "p0")#</div><ul class="#=styles.reset#"><li>#=messages.start#: #=kendo.toString(task.start, "h:mm tt ddd, MMM d")#</li><li>#=messages.end#: #=kendo.toString(task.end, "h:mm tt ddd, MMM d")#</li></ul></div>'),B="<table style='visibility: hidden;'><tbody><tr style='height:{0}'><td>&nbsp;</td></tr></tbody></table>",P={
day:{type:"kendo.ui.GanttDayView"},week:{type:"kendo.ui.GanttWeekView"},month:{type:"kendo.ui.GanttMonthView"},year:{type:"kendo.ui.GanttYearView"}},L={alt:"k-alt",reset:"k-reset",nonWorking:"k-nonwork-hour",header:"k-header",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasksWrapper:"k-gantt-tables",rowsTable:"k-gantt-rows",columnsTable:"k-gantt-columns",tasksTable:"k-gantt-tasks",dependenciesWrapper:"k-gantt-dependencies",resource:"k-resource",resourceAlt:"k-resource k-alt",task:"k-task",taskSingle:"k-task-single",taskMilestone:"k-task-milestone",taskSummary:"k-task-summary",taskWrap:"k-task-wrap",taskMilestoneWrap:"k-milestone-wrap",resourcesWrap:"k-resources-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",taskDragHandle:"k-task-draghandle",taskContent:"k-task-content",taskTemplate:"k-task-template",taskActions:"k-task-actions",taskDelete:"k-task-delete",taskComplete:"k-task-complete",taskDetails:"k-task-details",taskDetailsPercent:"k-task-pct",link:"k-link",icon:"k-icon",iconDelete:"k-i-close",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskResizeHandleEast:"k-resize-e",taskSummaryProgress:"k-task-summary-progress",taskSummaryComplete:"k-task-summary-complete",line:"k-line",lineHorizontal:"k-line-h",lineVertical:"k-line-v",arrowWest:"k-arrow-w",arrowEast:"k-arrow-e",dragHint:"k-drag-hint",dependencyHint:"k-dependency-hint",tooltipWrapper:"k-widget k-tooltip k-popup k-group k-reset",tooltipContent:"k-tooltip-content",tooltipCallout:"k-callout k-callout-s",callout:"k-callout",marquee:"k-marquee k-gantt-marquee",marqueeColor:"k-marquee-color"},O=kendo.ui.GanttView=a.extend({init:function(e,t){a.fn.init.call(this,e,t),this.title=this.options.title||this.options.name,this.header=this.element.find(D+O.styles.gridHeader),this.content=this.element.find(D+O.styles.gridContent),this.contentWidth=this.content.width(),this._workDays=n(this.options),this._headerTree=t.headerTree,this._taskTree=t.taskTree,this._taskTemplate=t.taskTemplate?kendo.template(t.taskTemplate,p({},kendo.Template,t.templateSettings)):null,this._dependencyTree=t.dependencyTree,this._taskCoordinates={},this._currentTime()},destroy:function(){a.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this.headerRow=null,this.header=null,this.content=null,this._dragHint=null,this._resizeHint=null,this._resizeTooltip=null,this._taskTooltip=null,this._percentCompleteResizeTooltip=null,this._headerTree=null,this._taskTree=null,this._dependencyTree=null},options:{showWorkHours:!1,showWorkDays:!1,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,slotSize:100,currentTimeMarker:{updateInterval:1e4}},renderLayout:function(){this._slots=this._createSlots(),this._tableWidth=this._calculateTableWidth(),this.createLayout(this._layout()),this._slotDimensions(),this._adjustHeight(),this.content.find(D+O.styles.dependenciesWrapper).width(this._tableWidth)},_adjustHeight:function(){this.content&&this.content.height(this.element.height()-h(this.header))},createLayout:function(e){var t=this._headers(e),n=this._colgroup(),i=this._headerTree,r=s("thead",null,t),o=s("table",{style:{width:this._tableWidth+"px"}},[n,r]);i.render([o]),this.headerRow=this.header.find("table:first tr").last()},_slotDimensions:function(){var e,t,n,i,r=this.headerRow[0].children,o=this._timeSlots();for(n=0,i=r.length;n<i;n++)t=r[n],e=o[n],e.offsetLeft=t.offsetLeft,e.offsetWidth=t.offsetWidth},render:function(e){var t,n,i=e.length,r=O.styles,o=this._rowsTable(i),a=this._columnsTable(i),s=this._tasksTable(e),l=this.options.currentTimeMarker,d=this.options.calculatedSize;this._taskTree.render([o,a,s]),t=this.content.find(D+r.rowsTable),d&&(n=d.row*e.length,this.content.find(D+r.tasksTable).height(n),t.height(n)),this._contentHeight=t.height(),this._rowHeight=d?d.row:this._contentHeight/t.find("tr").length,this.content.find(D+r.columnsTable).height(this._contentHeight),l!==!1&&void 0!==l.updateInterval&&this._renderCurrentTime()},_rowsTable:function(e){var t,n,i=[],r=O.styles,o=[null,{className:r.alt}];for(n=0;n<e;n++)t=s("tr",o[n%2],[s("td",null,[l(" ")])]),i.push(t);return this._createTable(1,i,{className:r.rowsTable})},_columnsTable:function(){var e,t,n,i,r,o=[],a=O.styles,d=this._timeSlots(),u=d.length,c=0;for(r=0;r<u;r++)t=d[r],i={},n=t.span,c+=n,1!==n&&(i.colspan=n),t.isNonWorking&&(i.className=a.nonWorking),o.push(s("td",i,[l(" ")]));return e=s("tr",null,o),this._createTable(c,[e],{className:a.columnsTable})},_tasksTable:function(e){var t,n,i,r,o,a,l,d,u=[],c=O.styles,h=this._taskCoordinates={},p=this._calculateMilestoneWidth(),f=Math.round(p.width),m=this.options.resourcesField,v=[c.resource,c.resourceAlt],_=this.options.calculatedSize,b=this._calculateResourcesMargin(),k=this._calculateTaskBorderWidth(),w=function(e){var t=i.left,n=t+i.width;r.isMilestone()&&(t-=f/2,n=t+f),h[r.id]={start:t,end:n,rowIndex:e}};for(l=0,d=e.length;l<d;l++)r=e[l],i=this._taskPosition(r),i.borderWidth=k,t=s("tr",null),n=s("td"),r.start<=this.end&&r.end>=this.start&&(n.children.push(this._renderTask(e[l],i)),r[m]&&r[m].length&&(o=g?this._tableWidth-i.left:Math.max(i.width||p.clientWidth,0)+i.left,a={width:this._tableWidth-(o+b)+"px"},a[g?"right":"left"]=o+"px",_&&(a.height=_.cell+"px"),n.children.push(s("div",{className:c.resourcesWrap,style:a},this._renderResources(r[m],v[l%2])))),w(l)),t.children.push(n),u.push(t);return this._createTable(1,u,{className:O.styles.tasksTable})},_createTable:function(e,t,n){var i,r,o,a=[];for(o=0;o<e;o++)a.push(s("col"));return i=s("colgroup",null,a),r=s("tbody",null,t),n.style||(n.style={}),n.style.width=this._tableWidth+"px",s("table",n,[i,r])},_calculateTableWidth:function(){var e,t,n,i,r=this._timeSlots(),o=0,a=0;for(n=0,i=r.length;n<i;n++)e=r[n].span,a+=e,e>o&&(o=e);return t=Math.round(a*this.options.slotSize/o)},_calculateMilestoneWidth:function(){var t,n,i=O.styles.task+" "+O.styles.taskMilestone,r=e("<div class='"+i+"' style='visibility: hidden; position: absolute'>");return this.content.append(r),n=r[0].getBoundingClientRect(),t={width:n.right-n.left,clientWidth:r[0].clientWidth},r.remove(),t},_calculateResourcesMargin:function(){var t,n=e("<div class='"+O.styles.resourcesWrap+"' style='visibility: hidden; position: absolute'>");return this.content.append(n),t=parseInt(n.css(g?"margin-right":"margin-left"),10),n.remove(),t},_calculateTaskBorderWidth:function(){var t,n,i=O.styles.task+" "+O.styles.taskSingle,r=e("<div class='"+i+"' style='visibility: hidden; position: absolute'>");return this.content.append(r),n=kendo.getComputedStyles(r[0],["border-left-width"]),t=parseFloat(n["border-left-width"],10),r.remove(),t},_renderTask:function(e,t){var n,i,r,o=this.options.editable,a=t.left,l=O.styles,d=l.taskWrap,u=this.options.calculatedSize,c={},h={className:d,style:{left:a+"px"}};return u&&(h.style.height=u.cell+"px"),e.summary?i=this._renderSummary(e,t):e.isMilestone()?(i=this._renderMilestone(e,t),h.className+=" "+l.taskMilestoneWrap):i=this._renderSingleTask(e,t),n=s("div",h,[i]),o&&o.dependencyCreate!==!1&&(n.children.push(s("div",{className:l.taskDot+" "+l.taskDotStart})),n.children.push(s("div",{className:l.taskDot+" "+l.taskDotEnd}))),e.summary||e.isMilestone()||!o||o.dragPercentComplete===!1||o.update===!1||null!==this._taskTemplate||(r=Math.round(t.width*e.percentComplete),c[g?"right":"left"]=r+"px",n.children.push(s("div",{className:l.taskDragHandle,style:c}))),n},_renderSingleTask:function(e,t){var n,i,r,o=O.styles,a=Math.round(t.width*e.percentComplete),u=[],c=this.options.editable;return null!==this._taskTemplate?n=d(this._taskTemplate(e)):(n=l(e.title),u.push(s("div",{className:o.taskComplete,style:{width:a+"px"}}))),i=s("div",{className:o.taskContent},[s("div",{className:o.taskTemplate},[n])]),u.push(i),c&&(c.destroy!==!1&&i.children.push(s("span",{className:o.taskActions},[s("a",{className:o.link+" "+o.taskDelete,href:"#","aria-label":"Delete"},[s("span",{className:o.icon+" "+o.iconDelete})])])),c.resize!==!1&&c.update!==!1&&(i.children.push(s("span",{className:o.taskResizeHandle+" "+o.taskResizeHandleWest})),i.children.push(s("span",{className:o.taskResizeHandle+" "+o.taskResizeHandleEast})))),r=s("div",{className:o.task+" "+o.taskSingle,"data-uid":e.uid,style:{width:Math.max(t.width-2*t.borderWidth,0)+"px"}},u)},_renderMilestone:function(e){var t=O.styles,n=s("div",{className:t.task+" "+t.taskMilestone,"data-uid":e.uid});return n},_renderSummary:function(e,t){var n=O.styles,i=Math.round(t.width*e.percentComplete),r=s("div",{className:n.task+" "+n.taskSummary,"data-uid":e.uid,style:{width:t.width+"px"}},[s("div",{className:n.taskSummaryProgress,style:{width:i+"px"}},[s("div",{className:n.taskSummaryComplete,style:{width:t.width+"px"}})])]);return r},_renderResources:function(e,t){var n,i,r,o=[];for(i=0,r=e.length;i<r;i++)n=e[i],o.push(s("span",{className:t,style:{color:n.get("color")}},[l(n.get("name"))]));return g&&o.reverse(),o},_taskPosition:function(e){var t=Math.round,n=t(this._offset(g?e.end:e.start)),i=t(this._offset(g?e.start:e.end));return{left:n,width:i-n}},_offset:function(e){var t,n,i,r,o=this._timeSlots(),a=0;return o.length?(r=this._slotIndex("start",e),t=o[r],t.end<e?a=t.offsetWidth:t.start<=e&&(n=e-t.start,i=t.end-t.start,a=n/i*t.offsetWidth),g&&(a=t.offsetWidth+1-a),t.offsetLeft+a):0},_slotIndex:function(e,t,n){var i,r=this._timeSlots(),o=0,a=r.length-1;n&&(r=[].slice.call(r).reverse());do i=Math.ceil((a+o)/2),r[i][e]<t?o=i:(i===a&&i--,a=i);while(o!==a);return n&&(o=r.length-1-o),o},_timeByPosition:function(t,n,i){var r,o,a,s=this._slotByPosition(t);return n?i?s.end:s.start:(r=t-e(D+O.styles.tasksTable).offset().left,o=s.end-s.start,a=r-s.offsetLeft,g&&(a=s.offsetWidth-a),new Date(s.start.getTime()+o*(a/s.offsetWidth)))},_slotByPosition:function(t){var n=t-e(D+O.styles.tasksTable).offset().left,i=this._slotIndex("offsetLeft",n,g);return this._timeSlots()[i]},_renderDependencies:function(e){var t,n,i=[],r=this._dependencyTree;for(t=0,n=e.length;t<n;t++)i.push.apply(i,this._renderDependency(e[t]));r.render(i)},_renderDependency:function(e){var t,n,i,r,o=this._taskCoordinates[e.predecessorId],a=this._taskCoordinates[e.successorId];if(!o||!a)return[];for(n="_render"+["FF","FS","SF","SS"][g?3-e.type:e.type],t=this[n](o,a),i=0,r=t.length;i<r;i++)t[i].attr["data-uid"]=e.uid;return t},_renderFF:function(e,t){var n=this._dependencyFF(e,t,!1);return n[n.length-1].children[0]=this._arrow(!0),n},_renderSS:function(e,t){var n=this._dependencyFF(t,e,!0);return n[0].children[0]=this._arrow(!1),n.reverse()},_renderFS:function(e,t){var n=this._dependencyFS(e,t,!1);return n[n.length-1].children[0]=this._arrow(!1),n},_renderSF:function(e,t){var n=this._dependencyFS(t,e,!0);return n[0].children[0]=this._arrow(!0),n.reverse()},_dependencyFF:function(e,t,n){var i,r=this,o=[],a=0,s=0,l=0,d=0,u=n?"start":"end",c=2,h=1,p=this._rowHeight,f=10,m=e.rowIndex*p+Math.floor(p/2)-1,g=t.rowIndex*p+Math.floor(p/2)-1,v=O.styles,_=function(){o.push(r._line(v.line+" "+v.lineHorizontal,{left:a+"px",top:s+"px",width:l+"px"}))},b=function(){o.push(r._line(v.line+" "+v.lineVertical,{left:a+"px",top:s+"px",height:d+"px"}))};return a=e[u],s=m,l=f,i=t[u]-e[u],i>0!==n&&(l=Math.abs(i)+f),n?(a-=l,l-=h,_()):(_(),a+=l-c),g<s?(d=s-g,d+=c,s=g,b()):(d=g-s,d+=c,b(),s+=d-c),l=Math.abs(a-t[u]),n||(l-=h,a-=l),_(),o},_dependencyFS:function(e,t,n){var i=this,r=[],o=0,a=0,s=0,l=0,d=this._rowHeight,u=Math.floor(d/2),c=10,h=2*c,p=t.start-e.end,f=2,m=1,g=e.rowIndex*d+Math.floor(d/2)-1,v=t.rowIndex*d+Math.floor(d/2)-1,_=O.styles,b=function(){r.push(i._line(_.line+" "+_.lineHorizontal,{left:o+"px",top:a+"px",width:s+"px"}))},k=function(){r.push(i._line(_.line+" "+_.lineVertical,{left:o+"px",top:a+"px",height:l+"px"}))};return o=e.end,a=g,s=c,n&&(o+=m,p>h&&(s=p-(c-f)),s-=m),b(),o+=s-f,p<=h&&(l=n?Math.abs(v-g)-u:u,v<g?(a-=l,l+=f,k()):(k(),a+=l),s=e.end-t.start+h,s<c&&(s=c),o-=s-f,b()),v<g?(l=a-v,a=v,l+=f,k()):(l=v-a,k(),a+=l),s=t.start-o,n||(s-=m),b(),r},_line:function(e,t){return s("div",{className:e,style:t})},_arrow:function(e){return s("span",{className:e?O.styles.arrowWest:O.styles.arrowEast})},_colgroup:function(){var e,t,n,i=this._timeSlots(),r=i.length,o=[];for(e=0;e<r;e++)for(t=0,n=i[e].span;t<n;t++)o.push(s("col"));return s("colgroup",null,o)},_createDragHint:function(e){this._dragHint=e.clone().addClass(O.styles.dragHint).css("cursor","move"),e.parent().append(this._dragHint)},_updateDragHint:function(e){var t=this._offset(e);this._dragHint.css({left:t})},_removeDragHint:function(){this._dragHint.remove(),this._dragHint=null},_createResizeHint:function(t){var n,i,r=O.styles,o=this._taskCoordinates[t.id].rowIndex*this._rowHeight,a=this.options,s=a.messages;this._resizeHint=e(M({styles:r})).css({top:0,height:this._contentHeight}),this.content.append(this._resizeHint),this._resizeTooltip=e(z({styles:r,start:t.start,end:t.end,messages:s.views,format:a.resizeTooltipFormat})).css({top:0,left:0}),this.content.append(this._resizeTooltip),this._resizeTooltipWidth=c(this._resizeTooltip),n=h(this._resizeTooltip),i=o-n,i<0&&(i=o+this._rowHeight),this._resizeTooltipTop=i},_updateResizeHint:function(t,n,i){var r=this._offset(g?n:t),o=this._offset(g?t:n),a=o-r,s=i!==g?r:o,l=this._tableWidth-kendo.support.scrollbar(),d=this._resizeTooltipWidth,u=this.options,c=u.messages,h=e(D+O.styles.tasksTable).offset().left-e(D+O.styles.tasksWrapper).offset().left;g&&(r+=h),this._resizeHint.css({left:r,width:a}),this._resizeTooltip&&this._resizeTooltip.remove(),s-=Math.round(d/2),s<0?s=0:s+d>l&&(s=l-d),g&&(s+=h),this._resizeTooltip=e(z({styles:O.styles,start:t,end:n,messages:c.views,format:u.resizeTooltipFormat})).css({top:this._resizeTooltipTop,left:s,"min-width":d}).appendTo(this.content)},_removeResizeHint:function(){this._resizeHint.remove(),this._resizeHint=null,this._resizeTooltip.remove(),this._resizeTooltip=null},_updatePercentCompleteTooltip:function(t,n,i){var r,o,a,s;this._removePercentCompleteTooltip(),r=this._percentCompleteResizeTooltip=e(H({styles:O.styles,text:i})).appendTo(this.element),o=Math.round(c(r)/2),a=r.find(D+O.styles.callout),s=Math.round(c(a)/2),r.css({top:t-(h(r)+s),left:n-o}),a.css("left",o-s)},_removePercentCompleteTooltip:function(){this._percentCompleteResizeTooltip&&this._percentCompleteResizeTooltip.remove(),this._percentCompleteResizeTooltip=null},_updateDependencyDragHint:function(e,t,n){this._removeDependencyDragHint(),n?this._creteVmlDependencyDragHint(e,t):this._creteDependencyDragHint(e,t)},_creteDependencyDragHint:function(t,n){var i=O.styles,r=n.x-t.x,o=n.y-t.y,a=Math.sqrt(r*r+o*o),s=Math.atan(o/r);r<0&&(s+=Math.PI),e("<div class='"+i.line+" "+i.lineHorizontal+" "+i.dependencyHint+"'></div>").css({top:t.y,left:t.x,width:a,"transform-origin":"0% 0","-ms-transform-origin":"0% 0","-webkit-transform-origin":"0% 0",transform:"rotate("+s+"rad)","-ms-transform":"rotate("+s+"rad)","-webkit-transform":"rotate("+s+"rad)"}).appendTo(this.content)},_creteVmlDependencyDragHint:function(t,n){var i=e("<kvml:line class='"+O.styles.dependencyHint+"' style='position:absolute; top: 0px; left: 0px;' strokecolor='black' strokeweight='2px' from='"+t.x+"px,"+t.y+"px' to='"+n.x+"px,"+n.y+"px'></kvml:line>").appendTo(this.content);i[0].outerHTML=i[0].outerHTML},_removeDependencyDragHint:function(){this.content.find(D+O.styles.dependencyHint).remove()},_createTaskTooltip:function(t,n,i){var r,o=O.styles,a=this.options,s=this.content,l=s.offset(),d=s.width(),u=kendo.scrollLeft(s),p=e(n).parents("tr").first(),f=p.offset(),m=a.tooltip&&a.tooltip.template?kendo.template(a.tooltip.template):N,v=g?i-(l.left+u+kendo.support.scrollbar()):i-(l.left-u),_=f.top+h(p)-l.top+s.scrollTop(),b=this._taskTooltip=e('<div style="z-index: 100002;" class="'+o.tooltipWrapper+'" ><div class="'+o.taskContent+'"></div></div>');b.css({left:v,top:_}).appendTo(s).find(D+o.taskContent).append(m({styles:o,task:t,messages:a.messages.views})),h(b)<f.top-l.top&&b.css("top",f.top-l.top-h(b)+s.scrollTop()),r=c(b),r+v-u>d&&(v-=r,v<u&&(v=u+d-(r+17)),b.css("left",v))},_removeTaskTooltip:function(){this._taskTooltip&&this._taskTooltip.remove(),this._taskTooltip=null},_scrollTo:function(e){var t=e.offset().left,n=e.width(),i=t+n,r=e.closest("tr"),o=r.offset().top,a=r.height(),s=o+a,l=this.content,d=l.offset(),u=d.top,c=l.height(),h=u+c,p=d.left,f=l.width(),m=p+f,g=kendo.support.scrollbar();o<u?l.scrollTop(l.scrollTop()+(o-u)):s>h&&l.scrollTop(l.scrollTop()+(s+g-h)),t<p&&n>f&&i<m||i>m&&n<f?l.scrollLeft(l.scrollLeft()+(i+g-m)):(i>m&&n>f&&t>p||t<p&&n<f)&&l.scrollLeft(l.scrollLeft()+(t-p))},_scrollToDate:function(e){var t,n=this.start,i=this.end;e>=n&&e<i&&(t=this._offset(e),kendo.support.isRtl(this.element)&&(t=this._tableWidth-t),kendo.scrollLeft(this.content,t))},_timeSlots:function(){return this._slots&&this._slots.length?this._slots[this._slots.length-1]:[]},_headers:function(e){var t,n,i,r,o,a,l,u,c=[],h=O.styles;for(o=0,a=e.length;o<a;o++){for(t=e[o],n=[],l=0,u=t.length;l<u;l++)i=t[l],r=d(i.text),n.push(s("th",{colspan:i.span,className:h.header+(i.isNonWorking?" "+h.nonWorking:"")},[r]));c.push(s("tr",null,n))}return c},_hours:function(e,t){var n,i,r,o=[],a=this.options,s=a.workDayStart.getHours(),l=a.workDayEnd.getHours(),d=a.hourSpan;for(e=new Date(e),t=new Date(t),a.showWorkHours&&e.setHours(s);e<t;)n=new Date(e),r=n.getHours(),i=r>=s&&r<l,n.setHours(n.getHours()+d),r==n.getHours()&&n.setHours(n.getHours()+2*d),a.showWorkHours&&!i||o.push({start:e,end:n,isNonWorking:!i,span:1}),e=n;return o},_days:function(e,t){var n,i,r=[];for(e=new Date(e),t=new Date(t);e<t;)n=t<kendo.date.nextDay(e)?t:kendo.date.nextDay(e),i=this._isWorkDay(e),this.options.showWorkDays&&!i||r.push({start:e,end:n,isNonWorking:!i,span:1}),e=n;return r},_weeks:function(e,t){var n,i,r,o=[],a=this.calendarInfo().firstDay;for(e=new Date(e),t=new Date(t);e<t;)n=kendo.date.dayOfWeek(kendo.date.addDays(e,1),a,1),n>t&&(n=t),i=this._days(e,n),r=i.length,r>0&&o.push({start:i[0].start,end:i[r-1].end,span:r}),e=n;return o},_months:function(e,t){var n,i,r,o,a=[];for(e=new Date(e),t=new Date(t);e<t;)n=new Date(e),i=kendo.date.firstDayOfMonth(new Date(n.setMonth(n.getMonth()+1))),n=t<i?t:i,r=this._days(e,n),o=r.length,o>0&&a.push({start:r[0].start,end:r[o-1].end,span:o}),e=n;return a},_years:function(e,t){var n,i,r,o=[];for(e=new Date(e),t=new Date(t);e<t;)n=new Date(e),n=kendo.date.firstDayOfMonth(new Date(n.setMonth(12))),n>=t&&(n=t),r=n.getMonth()||12,i=r-e.getMonth(),o.push({start:e,end:n,span:i}),e=n;return o},_slotHeaders:function(e,t){var n,i,r,o=[];for(i=0,r=e.length;i<r;i++)n=e[i],o.push({text:t(n),isNonWorking:!!n.isNonWorking,span:n.span});return o},_isWorkDay:function(e){var t,n,i=e.getDay(),r=this._workDays;for(t=0,n=r.length;t<n;t++)if(r[t]===i)return!0;return!1},calendarInfo:function(){return kendo.getCulture().calendars.standard},_renderCurrentTime:function(){var t,n=this._getCurrentTime(),i=this._offset(n),r=e("<div class='k-current-time'></div>"),o=O.styles,a=e(D+o.tasksWrapper),s=e(D+o.tasksTable);this.content&&this._timeSlots().length&&(this.content.find(".k-current-time").remove(),t=this._timeSlots()[this._slotIndex("start",n)],n<t.start||n>t.end||(a.length&&s.length&&(i+=s.offset().left-a.offset().left),r.css({left:i+"px",top:"0px",width:"1px",height:this._contentHeight+"px"}).appendTo(this.content)))},_getCurrentTime:function(){return new Date},_currentTime:function(){var e=this.options.currentTimeMarker;e!==!1&&void 0!==e.updateInterval&&(this._renderCurrentTime(),this._currentTimeUpdateTimer=setInterval(f(this._renderCurrentTime,this),e.updateInterval))}});p(!0,O,{styles:L}),kendo.ui.GanttDayView=O.extend({name:"day",options:{timeHeaderTemplate:F,dayHeaderTemplate:E,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(e){var t=this.options.range;this.start=kendo.date.getDate(e.start),this.end=kendo.date.getDate(e.end),(kendo.date.getMilliseconds(e.end)>0||this.end.getTime()===this.start.getTime())&&(this.end=kendo.date.addDays(this.end,1)),t&&t.start&&(this.start=kendo.date.getDate(t.start),this.start.setHours(t.start.getHours())),t&&t.end&&(this.end=kendo.date.getDate(t.end),this.end.setHours(t.end.getHours()))},_createSlots:function(){var e,t,n,i,r=[],o=this._days(this.start,this.end),a=[];for(n=0,i=o.length;n<i;n++)e=o[n],t=this._hours(e.start,e.end),e.span=t.length,a.push.apply(a,t);return r.push(o),r.push(a),r},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.dayHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.timeHeaderTemplate))),e}}),kendo.ui.GanttWeekView=O.extend({name:"week",options:{dayHeaderTemplate:E,weekHeaderTemplate:A,resizeTooltipFormat:"h:mm tt ddd, MMM d"},range:function(e){var t,n=this.options.range,i=this.calendarInfo(),r=i.firstDay,o=e.end;r===o.getDay()&&o.setDate(o.getDate()+7),this.start=kendo.date.getDate(kendo.date.dayOfWeek(e.start,r,-1)),this.end=kendo.date.getDate(kendo.date.dayOfWeek(o,r,1)),n&&n.start&&(this.start=kendo.date.getDate(n.start)),n&&n.end&&(t=new Date(n.end),this.end=kendo.date.getDate(t)<n.end?kendo.date.getDate(new Date(t.setDate(t.getDate()+1))):kendo.date.getDate(t))},_createSlots:function(){var e=[];return e.push(this._weeks(this.start,this.end)),e.push(this._days(this.start,this.end)),e},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.weekHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.dayHeaderTemplate))),e}}),kendo.ui.GanttMonthView=O.extend({name:"month",options:{weekHeaderTemplate:A,monthHeaderTemplate:I,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(e){var t,n=this.options.range;this.start=kendo.date.firstDayOfMonth(e.start),this.end=kendo.date.addDays(kendo.date.getDate(kendo.date.lastDayOfMonth(e.end)),1),n&&n.start&&(this.start=kendo.date.getDate(n.start)),n&&n.end&&(t=new Date(n.end),this.end=kendo.date.getDate(t)<n.end?kendo.date.getDate(new Date(t.setDate(t.getDate()+1))):kendo.date.getDate(t))},_createSlots:function(){var e=[];return e.push(this._months(this.start,this.end)),e.push(this._weeks(this.start,this.end)),e},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.monthHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.weekHeaderTemplate))),e}}),kendo.ui.GanttYearView=O.extend({name:"year",options:{yearHeaderTemplate:R,monthHeaderTemplate:I,resizeTooltipFormat:"dddd, MMM d, yyyy"},range:function(e){var t,n=this.options.range;this.start=kendo.date.firstDayOfMonth(new Date(e.start.setMonth(0))),this.end=kendo.date.firstDayOfMonth(new Date(e.end.setMonth(12))),n&&n.start&&(this.start=kendo.date.firstDayOfMonth(n.start)),n&&n.end&&(t=kendo.date.firstDayOfMonth(n.end),this.end=kendo.date.getDate(new Date(t.setMonth(t.getMonth()+1))))},_createSlots:function(){var t=[],n=this._months(this.start,this.end);return e(n).each(function(e,t){t.span=1}),t.push(this._years(this.start,this.end)),t.push(n),t},_layout:function(){var e=[],t=this.options;return e.push(this._slotHeaders(this._slots[0],kendo.template(t.yearHeaderTemplate))),e.push(this._slotHeaders(this._slots[1],kendo.template(t.monthHeaderTemplate))),e}}),r={wrapper:"k-timeline k-grid k-widget",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",tasksWrapper:"k-gantt-tables",dependenciesWrapper:"k-gantt-dependencies",task:"k-task",line:"k-line",taskResizeHandle:"k-resize-handle",taskResizeHandleWest:"k-resize-w",taskDragHandle:"k-task-draghandle",taskComplete:"k-task-complete",taskDelete:"k-task-delete",taskWrapActive:"k-task-wrap-active",taskWrap:"k-task-wrap",taskDot:"k-task-dot",taskDotStart:"k-task-start",taskDotEnd:"k-task-end",hovered:"k-state-hover",selected:"k-state-selected",origin:"k-origin"},o=kendo.ui.GanttTimeline=a.extend({init:function(e,t){a.fn.init.call(this,e,t),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),g=kendo.support.isRtl(e),this._wrapper(),this._domTrees(),this._views(),this._selectable(),this._draggable(),this._resizable(),this._percentResizeDraggable(),this._createDependencyDraggable(),this._attachEvents(),this._tooltip()},options:{name:"GanttTimeline",messages:{views:{day:"Day",week:"Week",month:"Month",year:"Year",start:"Start",end:"End"}},snap:!0,selectable:!0,editable:!0},destroy:function(){a.fn.destroy.call(this),clearTimeout(this._tooltipTimeout),this._currentTimeUpdateTimer&&clearInterval(this._currentTimeUpdateTimer),this._unbindView(this._selectedView),this._moveDraggable&&this._moveDraggable.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this._percentDraggable&&this._percentDraggable.destroy(),this._dependencyDraggable&&this._dependencyDraggable.destroy(),this.touch&&this.touch.destroy(),this._headerTree=null,this._taskTree=null,this._dependencyTree=null,this.wrapper.off(k),kendo.destroy(this.wrapper)},_wrapper:function(){var t=o.styles,n=this,i=this.options,r=function(){var r,o,a=typeof i.rowHeight===b?i.rowHeight:i.rowHeight+"px",s=e(kendo.format(B,a)),l=n.wrapper.find(D+t.tasksWrapper);return l.append(s),r=h(s.find("tr")),o=s.find("td").height(),s.remove(),{row:r,cell:o}};this.wrapper=this.element.addClass(t.wrapper).append("<div class='"+t.gridHeader+"'><div class='"+t.gridHeaderWrap+"'></div></div>").append("<div class='"+t.gridContentWrap+"'><div class='"+t.tasksWrapper+"'></div><div class='"+t.dependenciesWrapper+"'></div></div>"),i.rowHeight&&(this._calculatedSize=r())},_domTrees:function(){var e=o.styles,t=kendo.dom.Tree,n=this.wrapper;this._headerTree=new t(n.find(D+e.gridHeaderWrap)[0]),this._taskTree=new t(n.find(D+e.tasksWrapper)[0]),this._dependencyTree=new t(n.find(D+e.dependenciesWrapper)[0])},_views:function(){var e,t,n,i,r,o,a,s=this.options.views;for(this.views={},o=0,a=s.length;o<a;o++)e=s[o],t=u(e),t&&e.selectable===!1||(n=t?"string"!=typeof e.type?e.title:e.type:e,i=P[n],i&&(t&&(e.type=i.type),i.title=this.options.messages.views[n]),e=p({title:n},i,t?e:{}),n&&(this.views[n]=e,r&&!e.selected||(r=n)));r&&(this._selectedViewName=r)},view:function(e){return e&&(this._selectView(e),this.trigger("navigate",{view:e,action:"changeView"})),this._selectedView},_selectView:function(e){e&&this.views[e]&&(this._selectedView&&this._unbindView(this._selectedView),this._selectedView=this._initializeView(e),this._selectedViewName=e)},_viewByIndex:function(e){var t,n=this.views;for(t in n){if(!e)return t;e--}},_initializeView:function(e){var n,i,r,o=this.views[e];if(o){if(n=o.type,"string"==typeof n&&(n=kendo.getter(o.type)(window)),!n)throw Error("There is no such view");i={},p(i,this.options.range,o.range),r=o.date||this.options.date,o=new n(this.wrapper,t(p(!0,{headerTree:this._headerTree,taskTree:this._taskTree,dependencyTree:this._dependencyTree,calculatedSize:this._calculatedSize},o,this.options,{date:r,range:i})))}return o},_unbindView:function(e){e&&e.destroy()},_range:function(e){var t,n,i={field:"start",dir:"asc"},r={field:"end",dir:"desc"};return e&&e.length?(t=new _(e).sort(i).toArray()[0].start||new Date,n=new _(e).sort(r).toArray()[0].end||new Date,{start:new Date(t),end:new Date(n)}):{start:new Date,end:new Date}},_render:function(e){var t=this.view(),n=this._range(e),i=t.options.date;this._tasks=e,t.range(n),t.renderLayout(),t.render(e),i&&t._scrollToDate(i)},_renderDependencies:function(e){this.view()._renderDependencies(e)},_taskByUid:function(e){var t,n,i=this._tasks,r=i.length;for(n=0;n<r;n++)if(t=i[n],t.uid===e)return t},_draggable:function(){var e,t,n,r,a=this,s=this.options.snap,l=o.styles,d=this.options.editable,u=function(){a.view()._removeDragHint(),e&&e.css("opacity",1),e=null,t=null,a.dragInProgress=!1};d&&d.move!==!1&&d.update!==!1&&(this._moveDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+l.task,holdToDrag:kendo.support.mobileOS,ignore:D+l.taskResizeHandle}),this._moveDraggable.bind("dragstart",function(i){var o=a.view();return e=i.currentTarget.parent(),t=a._taskByUid(i.currentTarget.attr("data-uid")),a.trigger("moveStart",{task:t})?void i.preventDefault():(n=t.start,r=o._timeByPosition(i.x.location,s)-n,o._createDragHint(e),e.css("opacity",.5),clearTimeout(a._tooltipTimeout),void(a.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){var i,o,l;a.dragInProgress&&(i=a.view(),o=new Date(i._timeByPosition(e.x.location,s)-r),l=o,a.trigger("move",{task:t,start:o})||(n=o,g&&(l=new Date(n.getTime()+t.duration())),i._updateDragHint(l)))},15)).bind("dragend",function(){a.trigger("moveEnd",{task:t,start:n}),u()}).bind("dragcancel",function(){u()}).userEvents.bind("select",function(){i()}))},_resizable:function(){var e,t,n,r,a,s=this,l=this.options.snap,d=o.styles,u=this.options.editable,c=function(){s.view()._removeResizeHint(),e=null,t=null,s.dragInProgress=!1};u&&u.resize!==!1&&u.update!==!1&&(this._resizeDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+d.taskResizeHandle,holdToDrag:!1}),this._resizeDraggable.bind("dragstart",function(i){return a=i.currentTarget.hasClass(d.taskResizeHandleWest),g&&(a=!a),e=i.currentTarget.closest(D+d.task),t=s._taskByUid(e.attr("data-uid")),s.trigger("resizeStart",{task:t})?void i.preventDefault():(n=t.start,r=t.end,s.view()._createResizeHint(t),clearTimeout(s._tooltipTimeout),void(s.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){var i,o;s.dragInProgress&&(i=s.view(),o=i._timeByPosition(e.x.location,l,!a),a?n=o<r?o:r:r=o>n?o:n,s.trigger("resize",{task:t,start:n,end:r})||i._updateResizeHint(n,r,a))},15)).bind("dragend",function(){s.trigger("resizeEnd",{task:t,resizeStart:a,start:n,end:r}),c()}).bind("dragcancel",function(){c()}).userEvents.bind("select",function(){i()}))},_percentResizeDraggable:function(){var e,t,n,r,a,s,l,d,u,h,p=this,f=o.styles,m=this.options.editable,v=function(){p.view()._removePercentCompleteTooltip(),t=null,e=null,p.dragInProgress=!1},_=function(e){t.find(D+f.taskComplete).width(e).end().siblings(D+f.taskDragHandle).css(g?"right":"left",e)};m&&m.dragPercentComplete!==!1&&m.update!==!1&&(this._percentDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+f.taskDragHandle,holdToDrag:!1}),this._percentDraggable.bind("dragstart",function(i){return p.trigger("percentResizeStart")?void i.preventDefault():(t=i.currentTarget.siblings(D+f.task),e=p._taskByUid(t.attr("data-uid")),l=e.percentComplete,n=t.offset(),r=this.element.offset(),a=t.find(D+f.taskComplete).width(),s=c(t),clearTimeout(p._tooltipTimeout),void(p.dragInProgress=!0))}).bind("drag",kendo.throttle(function(e){if(p.dragInProgress){h=g?-e.x.initialDelta:e.x.initialDelta;var t=Math.max(0,Math.min(s,a+h));l=Math.round(t/s*100),_(t),d=n.top-r.top,u=n.left+t-r.left,g&&(u+=s-2*t),p.view()._updatePercentCompleteTooltip(d,u,l)}},15)).bind("dragend",function(){p.trigger("percentResizeEnd",{task:e,percentComplete:l/100}),v()}).bind("dragcancel",function(){_(a),v()}).userEvents.bind("select",function(){i()}))},_createDependencyDraggable:function(){var t,n,r,a=this,s=e(),l=e(),d=m.msie&&m.version<9,u=o.styles,p=this.options.editable,f=function(){t.css("display","").removeClass(u.hovered),t.parent().removeClass(u.origin),t=null,g(!1),l=e(),s=e(),a.view()._removeDependencyDragHint(),a.dragInProgress=!1},g=function(e){l.hasClass(u.origin)||(l.find(D+u.taskDot).css("display",e?"block":""),s.toggleClass(u.hovered,e))};p&&p.dependencyCreate!==!1&&(d&&document.namespaces&&document.namespaces.add("kvml","urn:schemas-microsoft-com:vml","#default#VML"),this._dependencyDraggable=new kendo.ui.Draggable(this.wrapper,{distance:0,filter:D+u.taskDot,holdToDrag:!1}),this._dependencyDraggable.bind("dragstart",function(e){var i,o;return a.trigger("dependencyDragStart")?void e.preventDefault():(t=e.currentTarget.css("display","block").addClass(u.hovered),t.parent().addClass(u.origin),i=t.offset(),o=a.wrapper.find(D+u.tasksWrapper).offset(),n=Math.round(i.left-o.left+h(t)/2),
r=Math.round(i.top-o.top+c(t)/2),clearTimeout(a._tooltipTimeout),void(a.dragInProgress=!0))}).bind("drag",kendo.throttle(function(t){var i,o,c,h;a.dragInProgress&&(a.view()._removeDependencyDragHint(),i=e(kendo.elementUnderCursor(t)),o=a.wrapper.find(D+u.tasksWrapper).offset(),c=t.x.location-o.left,h=t.y.location-o.top,a.view()._updateDependencyDragHint({x:n,y:r},{x:c,y:h},d),g(!1),s=i.hasClass(u.taskDot)?i:e(),l=i.closest(D+u.taskWrap),g(!0))},15)).bind("dragend",function(){var e,n,i,r,o;s.length&&(e=t.hasClass(u.taskDotStart),n=s.hasClass(u.taskDotStart),i=e?n?3:2:n?1:0,r=a._taskByUid(t.siblings(D+u.task).attr("data-uid")),o=a._taskByUid(s.siblings(D+u.task).attr("data-uid")),r!==o&&a.trigger("dependencyDragEnd",{type:i,predecessor:r,successor:o})),f()}).bind("dragcancel",function(){f()}).userEvents.bind("select",function(){i()}))},_selectable:function(){var t=this,n=o.styles;this.options.selectable&&this.wrapper.on(w+k,D+n.task,function(n){n.stopPropagation(),n.ctrlKey?t.trigger("clear"):t.trigger("select",{uid:e(this).attr("data-uid")})}).on(w+k,D+n.taskWrap,function(t){t.stopPropagation(),e(this).css("z-index","0");var i=e(document.elementFromPoint(t.clientX,t.clientY));i.hasClass(n.line)&&i.click(),e(this).css("z-index","")}).on(w+k,D+n.tasksWrapper,function(){t.selectDependency().length>0?t.clearSelection():t.trigger("clear")}).on(w+k,D+n.line,function(e){e.stopPropagation(),t.selectDependency(this)})},select:function(e){var t=this.wrapper.find(e),n=o.styles;return t.length?(this.clearSelection(),t.addClass(n.selected),void(kendo.support.mobileOS&&t.parent().addClass(n.taskWrapActive))):this.wrapper.find(D+n.task+D+n.selected)},selectDependency:function(t){var n,i=this.wrapper.find(t),r=o.styles;return i.length?(this.clearSelection(),this.trigger("clear"),n=e(i).attr("data-uid"),void this.wrapper.find(D+r.line+"[data-uid='"+n+"']").addClass(r.selected)):this.wrapper.find(D+r.line+D+r.selected)},clearSelection:function(){var e=o.styles;this.wrapper.find(D+e.selected).removeClass(e.selected),kendo.support.mobileOS&&this.wrapper.find(D+e.taskWrapActive).removeClass(e.taskWrapActive)},_attachEvents:function(){var t=this,n=o.styles,i=this.options.editable;i&&(this._tabindex(),this.wrapper.on(w+k,D+n.taskDelete,function(i){t.trigger("removeTask",{uid:e(this).closest(D+n.task).attr("data-uid")}),i.stopPropagation(),i.preventDefault()}).on(S+k,function(e){var n,i=t.options.editable;e.keyCode===v.DELETE&&i&&i.dependencyDestroy!==!1&&(n=t.selectDependency(),n.length&&(t.trigger("removeDependency",{uid:n.attr("data-uid")}),t.clearSelection()))}),kendo.support.mobileOS?this.touch=this.wrapper.kendoTouch({filter:D+n.task,doubletap:function(n){t.options.editable.update!==!1&&t.trigger("editTask",{uid:e(n.touch.currentTarget).attr("data-uid")})}}).data("kendoTouch"):this.wrapper.on(y+k,D+n.task,function(n){t.options.editable.update!==!1&&(t.trigger("editTask",{uid:e(this).attr("data-uid")}),n.stopPropagation(),n.preventDefault())}))},_tooltip:function(){var t,n=this,i=this.options.tooltip,r=o.styles,a=function(e){t=e.clientX};i&&i.visible===!1||(kendo.support.mobileOS?(this.wrapper.on(w+k,D+r.taskDelete,function(e){e.stopPropagation(),n.view()._removeTaskTooltip()}).on(T+k,D+r.task,function(t){var i=e(t.relatedTarget).parents(D+r.taskWrap,D+r.task);0===i.length&&n.view()._removeTaskTooltip()}),this.touch&&this.touch.bind("tap",function(t){var i=t.touch.target,r=n._taskByUid(e(i).attr("data-uid")),o=t.touch.x.client;n.view()._taskTooltip&&n.view()._removeTaskTooltip(),n.view()._createTaskTooltip(r,i,o)}).bind("doubletap",function(){n.view()._removeTaskTooltip()})):this.wrapper.on(C+k,D+r.task,function(){var i=this,r=n._taskByUid(e(this).attr("data-uid"));n.dragInProgress||(n._tooltipTimeout=setTimeout(function(){n.view()._createTaskTooltip(r,i,t)},800),e(this).on(x,a))}).on(T+k,D+r.task,function(){clearTimeout(n._tooltipTimeout),n.view()._removeTaskTooltip(),e(this).off(x,a)}))}}),p(!0,o,{styles:r})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.gantt.min",["kendo.data.min","kendo.popup.min","kendo.window.min","kendo.resizable.min","kendo.gantt.list.min","kendo.gantt.timeline.min","kendo.grid.min","kendo.pdf.min"],e)}(function(){return function(e,t){function n(e){return"["+m.attr("uid")+(e?"='"+e+"']":"]")}function i(e){return delete e.name,delete e.prefix,delete e.remove,delete e.edit,delete e.add,delete e.navigate,e}function r(e){var t,n,i,r,o,a;if(e.filter("[name=end], [name=start]").length){for(t=e.attr("name"),n=m.widgetInstance(e,m.ui),i={},r=e;r!==window&&!o;)r=r.parent(),o=r.data("kendoEditable");return!(a=o?o.options.model:null)||(i.start=a.start,i.end=a.end,i[t]=n?n.value():m.parseDate(e.value()),i.start<=i.end)}return!0}function o(t,n){var i=t.parents("["+m.attr("role")+'="gantt"]'),r=[],o=a(i);t.attr(P,0),n&&o.each(function(t,n){r[t]=e(n).scrollTop()});try{t[0].setActive()}catch(s){t[0].focus()}n&&o.each(function(t,n){e(n).scrollTop(r[t])})}function a(t){return e(t).parentsUntil("body").filter(function(e,t){var n=m.getComputedStyles(t,["overflow"]);return"visible"!=n.overflow}).add(window)}var s,l,d,u,c,h,p,f,m=window.kendo,g=e.extend({F10:121},m.keys),v="matchMedia"in window,_=m.support.browser,b=m.support.mobileOS,k=m.Observable,w=m.ui.Widget,y=m.data.DataSource,x=m.data.ObservableObject,C=m.data.ObservableArray,T=m.data.Query,S=e.isArray,D=e.inArray,F=m.isFunction,E=e.proxy,A=e.extend,I=e.isPlainObject,R=e.map,M=m._outerWidth,z=m._outerHeight,H=3,N=".kendoGantt",B="p0",P="tabIndex",L="click",O="width",V="string",W={down:{origin:"bottom left",position:"top left"},up:{origin:"top left",position:"bottom left"}},U="aria-activedescendant",q="aria-label",j="gantt_active_cell",G="action-option-focused",$=".",K="Are you sure you want to delete this task?",Y="Are you sure you want to delete this dependency?",Q=m.template('<button class="#=styles.buttonToggle#" type="button" '+q+'="Toggle"><span class="#=styles.iconToggle#"></span></button>'),X='<button class="#=styles.button# #=className#" type="button" #if (action) {#data-action="#=action#"#}#><span class="#=iconClass#"></span><span>#=text#</span></button>',J='<a class="#=className#" #=attr# href="\\#">#=text#</a>',Z=m.template('<li class="#=styles.currentView# #=styles.viewButtonDefault#"><a href="\\#" class="#=styles.link#">&nbps;</a></li>'),ee=m.template('<ul class="#=styles.viewsWrapper#">#for(var view in views){#<li class="#=styles.viewButtonDefault# #=styles.viewButton#-#= view.toLowerCase() #" data-#=ns#name="#=view#"><a href="\\#" class="#=styles.link#">#=views[view].title#</a></li>#}#</ul>'),te=m.template('<div class="#=styles.popupWrapper#"><ul class="#=styles.popupList#" role="listbox">#for(var i = 0, l = actions.length; i < l; i++){#<li class="#=styles.item#" data-action="#=actions[i].data#" role="option">#=actions[i].text#</span>#}#</ul></div>'),ne=function(t,n){var i={name:n.field,title:n.title},r=n.model.fields[n.field].validation;r&&I(r)&&r.message&&(i[m.attr("dateCompare-msg")]=r.message),e('<input type="text" required '+m.attr("type")+'="date" '+m.attr("role")+'="datetimepicker" '+m.attr("bind")+'="value:'+n.field+'" '+m.attr("validate")+"='true' />").attr(i).appendTo(t),e("<span "+m.attr("for")+'="'+n.field+'" class="k-invalid-msg"/>').hide().appendTo(t)},ie=function(t,n){e('<a href="#" class="'+n.styles.button+'">'+n.messages.assignButton+"</a>").click(n.click).appendTo(t)},re={wrapper:"k-widget k-gantt",rowHeight:"k-gantt-rowheight",listWrapper:"k-gantt-layout k-gantt-treelist",list:"k-gantt-treelist",timelineWrapper:"k-gantt-layout k-gantt-timeline",timeline:"k-gantt-timeline",splitBarWrapper:"k-splitbar k-state-default k-splitbar-horizontal k-splitbar-draggable-horizontal k-gantt-layout",splitBar:"k-splitbar",splitBarHover:"k-splitbar-horizontal-hover",popupWrapper:"k-list-container",popupList:"k-list k-reset",resizeHandle:"k-resize-handle",icon:"k-icon",item:"k-item",line:"k-line",buttonDelete:"k-gantt-delete",buttonCancel:"k-gantt-cancel",buttonSave:"k-gantt-update",buttonToggle:"k-gantt-toggle",primary:"k-primary",hovered:"k-state-hover",selected:"k-state-selected",focused:"k-state-focused",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",tasks:"k-gantt-tasks",popup:{form:"k-popup-edit-form",editForm:"k-gantt-edit-form",formContainer:"k-edit-form-container",resourcesFormContainer:"k-resources-form-container",message:"k-popup-message",buttonsContainer:"k-edit-buttons k-state-default",button:"k-button",editField:"k-edit-field",editLabel:"k-edit-label",resourcesField:"k-gantt-resources"},toolbar:{headerWrapper:"k-floatwrap k-header k-gantt-toolbar",footerWrapper:"k-floatwrap k-header k-gantt-toolbar",toolbar:"k-gantt-toolbar",expanded:"k-state-expanded",views:"k-gantt-views",viewsWrapper:"k-reset k-header k-gantt-views",actions:"k-gantt-actions",button:"k-button k-button-icontext",buttonToggle:"k-button k-button-icon k-gantt-toggle",iconPlus:"k-icon k-i-plus",iconPdf:"k-icon k-i-file-pdf",iconToggle:"k-icon k-i-layout-1-by-4",viewButtonDefault:"k-state-default",viewButton:"k-view",currentView:"k-current-view",link:"k-link",pdfButton:"k-gantt-pdf",appendButton:"k-gantt-create"}},oe=k.extend({init:function(e,t){k.fn.init.call(this),this.element=e,this.options=A(!0,{},this.options,t),this._popup()},options:{direction:"down",navigatable:!1},_current:function(e){var t=f.styles,n=this.list.find($+t.focused),i=n[e]();i.length&&(n.removeClass(t.focused).removeAttr("id"),i.addClass(t.focused).attr("id",G),this.list.find("ul").removeAttr(U).attr(U,G))},_popup:function(){var t=this,n=f.styles,i="li"+$+n.item,r=$+n.toolbar.appendButton,o=this.options.messages.actions,a=this.options.navigatable;this.list=e(te({styles:n,actions:[{data:"add",text:o.addChild},{data:"insert-before",text:o.insertBefore},{data:"insert-after",text:o.insertAfter}]})),this.element.append(this.list),this.popup=new m.ui.Popup(this.list,A({anchor:this.element.find(r),open:function(){t._adjustListWidth()},animation:this.options.animation},W[this.options.direction])),this.element.on(L+N,r,function(i){var r=e(this),o=r.attr(m.attr("action"));i.preventDefault(),o?t.trigger("command",{type:o}):(t.popup.open(),a&&t.list.find("li:first").addClass(n.focused).attr("id",G).end().find("ul").attr({TABINDEX:0,"aria-activedescendant":G}).focus())}),this.list.find(i).hover(function(){e(this).addClass(n.hovered)},function(){e(this).removeClass(n.hovered)}).end().on(L+N,i,function(){t.trigger("command",{type:e(this).attr(m.attr("action"))}),t.popup.close()}),a&&(this.popup.bind("close",function(){t.list.find(i).removeClass(n.focused).end().find("ul").attr(P,0),t.element.parents("["+m.attr("role")+'="gantt"]').find($+n.gridContent+" > table:first").focus()}),this.list.find("ul").on("keydown"+N,function(e){var i=e.keyCode;switch(i){case g.UP:e.preventDefault(),t._current("prev");break;case g.DOWN:e.preventDefault(),t._current("next");break;case g.ENTER:t.list.find($+n.focused).click();break;case g.ESC:e.preventDefault(),t.popup.close()}}))},_adjustListWidth:function(){var e,t,n=this.list,i=f.styles,r=n[0].style.width,o=this.element.find($+i.toolbar.appendButton),a=M(n);!n.data(O)&&r||(e=window.getComputedStyle?window.getComputedStyle(o[0],null):0,t=e?parseFloat(e.width):M(o),e&&(_.mozilla||_.msie)&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),r="border-box"!==n.css("box-sizing")?t-(M(n)-n.width()):t,a>r&&(r=a),n.css({fontFamily:o.css("font-family"),width:r}).data(O,r))},destroy:function(){clearTimeout(this._focusTimeout),this.popup.destroy(),this.element.off(N),this.list.off(N),this.unbind()}}),ae=function(e,t){return function(n){var i,r;if(n=S(n)?{data:n}:n,i=n||{},r=i.data,i.data=r,!(i instanceof e)&&i instanceof y)throw Error("Incorrect DataSource type. Only "+t+" instances are supported");return i instanceof e?i:new e(i)}},se=m.data.Model.define({id:"id",fields:{id:{type:"number"},predecessorId:{type:"number"},successorId:{type:"number"},type:{type:"number"}}}),le=y.extend({init:function(e){y.fn.init.call(this,A(!0,{},{schema:{modelBase:se,model:se}},e))},successors:function(e){return this._dependencies("predecessorId",e)},predecessors:function(e){return this._dependencies("successorId",e)},dependencies:function(e){var t=this.predecessors(e),n=this.successors(e);return t.push.apply(t,n),t},_dependencies:function(e,t){var n=this.view(),i={field:e,operator:"eq",value:t};return n=new T(n).filter(i).toArray()}});le.create=ae(le,"GanttDependencyDataSource"),l=m.data.Model.define({duration:function(){var e=this.end,t=this.start;return e-t},isMilestone:function(){return 0===this.duration()},_offset:function(e){var t,n,i=["start","end"];for(n=0;n<i.length;n++)t=new Date(this.get(i[n]).getTime()+e),this.set(i[n],t)},id:"id",fields:{id:{type:"number"},parentId:{type:"number",defaultValue:null,validation:{required:!0}},orderId:{type:"number",validation:{required:!0}},title:{type:"string",defaultValue:"New task"},start:{type:"date",validation:{required:!0}},end:{type:"date",validation:{required:!0,dateCompare:r,message:"End date should be after or equal to the start date"}},percentComplete:{type:"number",validation:{required:!0,min:0,max:1,step:.01}},summary:{type:"boolean"},expanded:{type:"boolean",defaultValue:!0}}}),d=y.extend({init:function(e){y.fn.init.call(this,A(!0,{},{schema:{modelBase:l,model:l}},e))},remove:function(e){var t=e.get("parentId"),n=this.taskAllChildren(e);return this._removeItems(n),e=y.fn.remove.call(this,e),this._childRemoved(t,e.get("orderId")),e},add:function(e){if(e)return e=this._toGanttTask(e),this.insert(this.taskSiblings(e).length,e)},insert:function(e,t){if(t)return t=this._toGanttTask(t),t.set("orderId",e),t=y.fn.insert.call(this,e,t),this._reorderSiblings(t,this.taskSiblings(t).length-1),this._resolveSummaryFields(this.taskParent(t)),t},taskChildren:function(e){var n,i=this.view(),r={field:"parentId",operator:"eq",value:null},o=this._sort&&this._sort.length?this._sort:{field:"orderId",dir:"asc"};if(e){if(n=e.get("id"),n===t||null===n||""===n)return[];r.value=n}return i=new T(i).filter(r).sort(o).toArray()},taskAllChildren:function(e){var t=[],n=this,i=function(e){var r=n.taskChildren(e);t.push.apply(t,r),R(r,i)};return e?i(e):t=this.view(),t},taskSiblings:function(e){if(!e)return null;var t=this.taskParent(e);return this.taskChildren(t)},taskParent:function(e){return e&&null!==e.get("parentId")?this.get(e.parentId):null},taskLevel:function(e){for(var t=0,n=this.taskParent(e);null!==n;)t+=1,n=this.taskParent(n);return t},taskTree:function(e){var t,n,i,r,o=[],a=this.taskChildren(e);for(n=0,i=a.length;n<i;n++)t=a[n],o.push(t),t.get("expanded")&&(r=this.taskTree(t),o.push.apply(o,r));return o},update:function(e,n){var i,r,o=this,a=function(e,t){var n,i,r=o.taskAllChildren(e);for(n=0,i=r.length;n<i;n++)r[n]._offset(t)},s=function(e){var t=e.field,n=e.sender;switch(t){case"start":o._resolveSummaryStart(o.taskParent(n)),a(n,n.get(t).getTime()-i.getTime());break;case"end":o._resolveSummaryEnd(o.taskParent(n));break;case"percentComplete":o._resolveSummaryPercentComplete(o.taskParent(n));break;case"orderId":o._reorderSiblings(n,i)}};n.parentId!==t&&(i=e.get("parentId"),i!==n.parentId&&(e.set("parentId",n.parentId),o._childRemoved(i,e.get("orderId")),e.set("orderId",o.taskSiblings(e).length-1),o._resolveSummaryFields(o.taskParent(e))),delete n.parentId),e.bind("change",s);for(r in n)i=e.get(r),e.set(r,n[r]);e.unbind("change",s)},_resolveSummaryFields:function(e){e&&(this._updateSummary(e),this.taskChildren(e).length&&(this._resolveSummaryStart(e),this._resolveSummaryEnd(e),this._resolveSummaryPercentComplete(e)))},_resolveSummaryStart:function(e){var t=this,n=function(e){var n,i,r,o=t.taskChildren(e),a=o[0].start.getTime();for(i=1,r=o.length;i<r;i++)n=o[i].start.getTime(),n<a&&(a=n);return new Date(a)};this._updateSummaryRecursive(e,"start",n)},_resolveSummaryEnd:function(e){var t=this,n=function(e){var n,i,r,o=t.taskChildren(e),a=o[0].end.getTime();for(i=1,r=o.length;i<r;i++)n=o[i].end.getTime(),n>a&&(a=n);return new Date(a)};this._updateSummaryRecursive(e,"end",n)},_resolveSummaryPercentComplete:function(e){var t=this,n=function(e){var n=t.taskChildren(e),i=new T(n).aggregate([{field:"percentComplete",aggregate:"average"}]);return i.percentComplete.average};this._updateSummaryRecursive(e,"percentComplete",n)},_updateSummaryRecursive:function(e,t,n){var i,r;e&&(i=n(e),e.set(t,i),r=this.taskParent(e),r&&this._updateSummaryRecursive(r,t,n))},_childRemoved:function(e,t){var n,i,r=null===e?null:this.get(e),o=this.taskChildren(r);for(n=t,i=o.length;n<i;n++)o[n].set("orderId",n);this._resolveSummaryFields(r)},_reorderSiblings:function(e,t){var n,i=e.get("orderId"),r=i>t,o=r?t:i,a=r?i:t,s=r?o:o+1,l=this.taskSiblings(e);for(a=Math.min(a,l.length-1),n=o;n<=a;n++)l[n]!==e&&(l[n].set("orderId",s),s+=1)},_updateSummary:function(e){if(null!==e){var t=this.taskChildren(e).length;e.set("summary",t>0)}},_toGanttTask:function(e){if(!(e instanceof l)){var t=e;e=this._createNewModel(),e.accept(t)}return e}}),d.create=ae(d,"GanttDataSource"),A(!0,m.data,{GanttDataSource:d,GanttTask:l,GanttDependencyDataSource:le,GanttDependency:se}),u={desktop:{dateRange:ne,resources:ie}},c=m.Observable.extend({init:function(e,t){m.Observable.fn.init.call(this),this.element=e,this.options=A(!0,{},this.options,t),this.createButton=this.options.createButton},fields:function(t,n){var i,r=this,o=this.options,a=o.messages.editor,s=o.resources,l=function(e){e.preventDefault(),s.editor(r.container.find($+f.styles.popup.resourcesField),n)};return o.editable.template?i=e.map(n.fields,function(e,t){return{field:t}}):(i=[{field:"title",title:a.title},{field:"start",title:a.start,editor:t.dateRange},{field:"end",title:a.end,editor:t.dateRange},{field:"percentComplete",title:a.percentComplete,format:B}],n.get(s.field)&&i.push({field:s.field,title:a.resources,messages:a,editor:t.resources,click:l,styles:f.styles.popup})),i},_buildEditTemplate:function(e,t,n){var i,r,o,a,s=this.options.resources,l=this.options.editable.template,d=A({},m.Template,this.options.templateSettings),u=d.paramName,c=f.styles.popup,h="";if(l)typeof l===V&&(l=window.unescape(l)),h+=m.template(l,d)(e);else for(i=0,r=t.length;i<r;i++)o=t[i],h+='<div class="'+c.editLabel+'"><label for="'+o.field+'">'+(o.title||o.field||"")+"</label></div>",o.field===s.field&&(h+='<div class="'+c.resourcesField+'" style="display:none"></div>'),!e.editable||e.editable(o.field)?(n.push(o),h+="<div "+m.attr("container-for")+'="'+o.field+'" class="'+c.editField+'"></div>'):(a="#:",o.field?(o=m.expr(o.field,u),a+=o+"==null?'':"+o):a+="''",a+="#",a=m.template(a,d),h+='<div class="'+c.editField+'">'+a(e)+"</div>");return h}}),h=c.extend({destroy:function(){this.close(),this.unbind()},editTask:function(e){this.editable=this._createPopupEditor(e)},close:function(){var e=this,t=function(){e.editable&&(e.editable.destroy(),e.editable=null,e.container=null),e.popup&&(e.popup.destroy(),e.popup=null)};this.editable&&this.container.is(":visible")?(e.trigger("close",{window:e.container}),this.container.data("kendoWindow").bind("deactivate",t).close()):t()},showDialog:function(t){var n,i,r,o,a=t.buttons,s=f.styles.popup,l=m.format('<div class="{0}"><div class="{1}"><p class="{2}">{3}</p><div class="{4}">',s.form,s.formContainer,s.message,t.text,s.buttonsContainer);for(n=0,i=a.length;n<i;n++)l+=this.createButton(a[n]);l+="</div></div></div>",r=this.element,this.popup&&this.popup.destroy(),o=this.popup=e(l).appendTo(r).eq(0).on("click",$+s.button,function(t){t.preventDefault(),o.close();var n=e(t.currentTarget).index();a[n].click()}).kendoWindow({modal:!0,autoFocus:!1,resizable:!1,draggable:!1,title:t.title,visible:!1,deactivate:function(){this.destroy(),r.focus()}}).getKendoWindow(),o.center().open(),o.element.find(".k-primary").focus()},_createPopupEditor:function(t){var n,i,r=this,o={},a=this.options.messages,s=f.styles,l=s.popup,d=m.format('<div {0}="{1}" class="{2} {3}"><div class="{4}">',m.attr("uid"),t.uid,l.form,l.editForm,l.formContainer),c=this.fields(u.desktop,t),h=[];return d+=this._buildEditTemplate(t,c,h),d+='<div class="'+l.buttonsContainer+'">',d+=this.createButton({name:"update",text:a.save,className:f.styles.primary}),d+=this.createButton({name:"cancel",text:a.cancel}),r.options.editable.destroy!==!1&&(d+=this.createButton({name:"delete",text:a.destroy})),d+="</div></div></div>",n=this.container=e(d).appendTo(this.element).eq(0).kendoWindow(A({modal:!0,resizable:!1,draggable:!0,title:a.editor.editorTitle,visible:!1,close:function(e){e.userTriggered&&r.trigger("cancel",{container:n,model:t})&&e.preventDefault()}},o)),i=n.kendoEditable({fields:h,model:t,clearContainer:!1,validateOnBlur:!0,target:r.options.target}).data("kendoEditable"),m.cycleForm(n),this.trigger("edit",{container:n,model:t})?r.trigger("cancel",{container:n,model:t}):(n.data("kendoWindow").center().open(),n.on(L+N,$+s.buttonCancel,function(e){e.preventDefault(),e.stopPropagation(),r.trigger("cancel",{container:n,model:t})}),n.on(L+N,$+s.buttonSave,function(e){var i,o,a,s,l;for(e.preventDefault(),e.stopPropagation(),i=r.fields(u.desktop,t),o={},s=0,l=i.length;s<l;s++)a=i[s].field,o[a]=t.get(a);r.trigger("save",{container:n,model:t,updateInfo:o})}),n.on(L+N,$+s.buttonDelete,function(e){e.preventDefault(),e.stopPropagation(),r.trigger("remove",{container:n,model:t})})),i}}),p=w.extend({init:function(e,t){w.fn.init.call(this,e,t),this.wrapper=this.element,this.model=this.options.model,this.resourcesField=this.options.resourcesField,this.createButton=this.options.createButton,this._initContainer(),this._attachHandlers()},events:["save"],open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",E(this.destroy,this)).close()},destroy:function(){this._dettachHandlers(),this.grid.destroy(),this.grid=null,this.window.destroy(),this.window=null,w.fn.destroy.call(this),m.destroy(this.wrapper),this.element=this.wrapper=null},_attachHandlers:function(){var t=f.styles,n=this.grid,i=this._cancelProxy=E(this._cancel,this);this.container.on(L+N,$+t.buttonCancel,this._cancelProxy),this._saveProxy=E(this._save,this),this.container.on(L+N,$+t.buttonSave,this._saveProxy),this.window.bind("close",function(e){e.userTriggered&&i(e)}),n.wrapper.on(L+N,"input[type='checkbox']",function(){var t=e(this),i=e(t).closest("tr"),r=n.dataSource.getByUid(i.attr(m.attr("uid"))),o=e(t).is(":checked")?1:"";r.set("value",o)})},_dettachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.container.off(N),this.grid.wrapper.off()},_cancel:function(e){e.preventDefault(),this.close()},_save:function(e){e.preventDefault(),this._updateModel(),this.wrapper.is($+f.styles.popup.resourcesField)||this.trigger("save",{container:this.wrapper,model:this.model}),this.close()},_initContainer:function(){var t=this,n=f.styles.popup,i=m.format('<div class="{0} {1}"><div class="{2} {3}"/></div>"',n.form,n.editForm,n.formContainer,n.resourcesFormContainer);i=e(i),this.container=i.find($+n.resourcesFormContainer),this.window=i.kendoWindow({modal:!0,resizable:!1,draggable:!0,visible:!1,title:this.options.messages.resourcesEditorTitle,open:function(){t.grid.resize(!0)}}).data("kendoWindow"),this._resourceGrid(),this._createButtons()},_resourceGrid:function(){var t=this,n=this.options.messages,i=e('<div id="resources-grid"/>').appendTo(this.container);this.grid=new m.ui.Grid(i,{columns:[{field:"name",title:n.resourcesHeader,template:"<label><input type='checkbox' value='#=name#'# if (value > 0 && value !== null) {#checked='checked'# } #/>#=name#</labe>"},{field:"value",title:n.unitsHeader,template:function(e){var t=e.format,n=null!==e.value?e.value:"";return t?m.toString(n,t):n}}],height:280,sortable:!0,editable:!0,filterable:!0,dataSource:{data:t.options.data,schema:{model:{id:"id",fields:{id:{from:"id"},name:{from:"name",type:"string",editable:!1},value:{from:"value",type:"number",defaultValue:""},format:{from:"format",type:"string"}}}}},save:function(e){var t=!!e.values.value;e.container.parent().find("input[type='checkbox']").prop("checked",t)}})},_createButtons:function(){var e,t,n=this.options.buttons,i='<div class="'+f.styles.popup.buttonsContainer+'">';for(e=0,t=n.length;e<t;e++)i+=this.createButton(n[e]);i+="</div>",this.container.append(i)},_updateModel:function(){var e,t,n,i=[],r=this.grid.dataSource.data();for(t=0,n=r.length;t<n;t++)e=r[t].get("value"),null!==e&&e>0&&i.push(r[t]);this.model[this.resourcesField]=i}}),f=w.extend({init:function(e,t,n){S(t)&&(t={dataSource:t}),s={append:{text:"Add Task",action:"add",className:f.styles.toolbar.appendButton,iconClass:f.styles.toolbar.iconPlus},pdf:{text:"Export to PDF",className:f.styles.toolbar.pdfButton,iconClass:f.styles.toolbar.iconPdf}},w.fn.init.call(this,e,t),n&&(this._events=n),this._wrapper(),this._resources(),this.options.views&&this.options.views.length||(this.options.views=["day","week","month"]),this._timeline(),this._toolbar(),this._footer(),this._adjustDimensions(),this._preventRefresh=!0,this.view(this.timeline._selectedViewName),this._preventRefresh=!1,this._dataSource(),this._assignments(),this._dropDowns(),this._list(),this._dependencies(),this._resizable(),this._scrollable(),this._dataBind(),this._attachEvents(),this._createEditor(),m.notify(this)},events:["dataBinding","dataBound","add","edit","remove","cancel","save","change","navigate","moveStart","move","moveEnd","resizeStart","resize","resizeEnd","columnResize"],options:{name:"Gantt",autoBind:!0,navigatable:!1,selectable:!0,editable:!0,resizable:!1,columnResizeHandleWidth:H,columns:[],views:[],dataSource:{},dependencies:{},resources:{},assignments:{},taskTemplate:null,messages:{save:"Save",cancel:"Cancel",destroy:"Delete",deleteTaskConfirmation:K,deleteDependencyConfirmation:Y,deleteTaskWindowTitle:"Delete task",deleteDependencyWindowTitle:"Delete dependency",views:{day:"Day",week:"Week",month:"Month",year:"Year",start:"Start",end:"End"},actions:{append:"Add Task",addChild:"Add Child",insertBefore:"Add Above",insertAfter:"Add Below",pdf:"Export to PDF"},editor:{editorTitle:"Task",resourcesEditorTitle:"Resources",title:"Title",start:"Start",end:"End",percentComplete:"Complete",resources:"Resources",assignButton:"Assign",resourcesHeader:"Resources",unitsHeader:"Units"}},showWorkHours:!0,showWorkDays:!0,toolbar:null,workDayStart:new Date(1980,1,1,8,0,0),workDayEnd:new Date(1980,1,1,17,0,0),workWeekStart:1,workWeekEnd:5,hourSpan:1,snap:!0,height:600,listWidth:"30%",rowHeight:null},select:function(e){var n=this.list;return e?(n.select(e),this.list.element.find("table[role=treegrid]").focus(),t):n.select()},clearSelection:function(){this.list.clearSelection()},destroy:function(){w.fn.destroy.call(this),this.dataSource&&(this.dataSource.unbind("change",this._refreshHandler),this.dataSource.unbind("progress",this._progressHandler),this.dataSource.unbind("error",this._errorHandler)),this.dependencies&&(this.dependencies.unbind("change",this._dependencyRefreshHandler),this.dependencies.unbind("error",this._dependencyErrorHandler)),this.timeline&&(this.timeline.unbind(),this.timeline.destroy()),this.list&&(this.list.unbind(),this.list.destroy()),this.footerDropDown&&this.footerDropDown.destroy(),this.headerDropDown&&this.headerDropDown.destroy(),this._editor&&this._editor.destroy(),this._resizeDraggable&&this._resizeDraggable.destroy(),this.toolbar.off(N),v&&(this._mediaQuery.removeListener(this._mediaQueryHandler),this._mediaQuery=null),e(window).off("resize"+N,this._resizeHandler),e(this.wrapper).off(N),this.toolbar=null,this.footer=null},setOptions:function(t){var n,i=m.deepExtend({},this.options,t),r=this._events;t.views||(n=this.view().name,i.views=e.map(this.options.views,function(e){var t=I(e),i=t?"string"!=typeof e.type?e.title:e.type:e;return n===i?t?e.selected=!0:e={type:i,selected:!0}:t&&(e.selected=!1),e})),t.dataSource||(i.dataSource=this.dataSource),t.dependencies||(i.dependencies=this.dependencies),t.resources||(i.resources=this.resources),t.assignments||(i.assignments=this.assignments),this.destroy(),this.element.empty(),this.options=null,this.init(this.element,i,r),w.fn._setEvents.call(this,i)},_attachEvents:function(){this._resizeHandler=E(this.resize,this,!1),e(window).on("resize"+N,this._resizeHandler)},_wrapper:function(){var e=f.styles,t=[e.icon,e.resizeHandle].join(" "),n=this.options,i=n.height,r=n.width;this.wrapper=this.element.addClass(e.wrapper).append("<div class='"+e.listWrapper+"'><div></div></div>").append("<div class='"+e.splitBarWrapper+"'><div class='"+t+"'></div></div>").append("<div class='"+e.timelineWrapper+"'><div></div></div>"),this.wrapper.find($+e.list).width(n.listWidth),i&&this.wrapper.height(i),r&&this.wrapper.width(r),n.rowHeight&&this.wrapper.addClass(e.rowHeight)},_toolbar:function(){var t,n,i,r=this,o=f.styles,a=$+o.toolbar.views+" > li",s=$+o.toolbar.pdfButton,l=$+o.buttonToggle,d=$+o.gridContent,u=e($+o.list),c=e($+o.timeline),h=o.hovered,p=this.options.toolbar,_=e("<div class='"+o.toolbar.actions+"'>"),b=function(e){e.matches?u.css({display:"none","max-width":0}):(u.css({display:"inline-block",width:"30%","max-width":"none"}),c.css("display","inline-block"),r.refresh(),c.find(d).scrollTop(r.scrollTop)),r._resize()};F(p)||(p=typeof p===V?p:this._actions(p),p=E(m.template(p),this)),i=e(Q({styles:o.toolbar})),n=e(ee({ns:m.ns,views:this.timeline.views,styles:o.toolbar})),_.append(p({})),t=e("<div class='"+o.toolbar.headerWrapper+"'>").append(i).append(n).append(_),n.find("li").length>1&&n.prepend(Z({styles:o.toolbar})),this.wrapper.prepend(t),this.toolbar=t,v&&(this._mediaQueryHandler=E(b,this),this._mediaQuery=window.matchMedia("(max-width: 480px)"),this._mediaQuery.addListener(this._mediaQueryHandler)),t.on(L+N,a,function(t){var i,a,s;t.preventDefault(),i=r.list,a=e(this).attr(m.attr("name")),s=n.find($+o.toolbar.currentView),s.is(":visible")&&s.parent().toggleClass(o.toolbar.expanded),i.editable&&i.editable.trigger("validate")||(r.trigger("navigate",{view:a})||r.view(a),r.toolbar.find($+o.focused).removeClass(o.focused))}).on("keydown"+N,a,function(t){var n=e($+o.toolbar.views).children(":not(.k-current-view)"),i=n.index(r._focusedView&&r._focusedView[0]||n.closest($+o.selected)[0]);t.keyCode===g.RIGHT?(e(r.toolbar.find($+o.focused)).removeClass(o.focused),r._focusedView=e(i+1===n.length?n[0]:n[i+1]),r._focusedView.focus().addClass(o.focused),t.preventDefault()):t.keyCode===g.LEFT?(e(r.toolbar.find($+o.focused)).removeClass(o.focused),r._focusedView=e(0===i?n[n.length-1]:n[i-1]),r._focusedView.focus().addClass(o.focused),t.preventDefault()):t.keyCode===g.DOWN&&r.toolbar.find($+o.toolbar.currentView).parent().hasClass(o.toolbar.expanded)?(e(r.toolbar.find($+o.focused)).removeClass(o.focused),r._focusedView=e(i+1===n.length?n[0]:n[i+1]),r._focusedView.focus().addClass(o.focused),t.preventDefault()):t.keyCode===g.UP&&r.toolbar.find($+o.toolbar.currentView).parent().hasClass(o.toolbar.expanded)?(e(r.toolbar.find($+o.focused)).removeClass(o.focused),r._focusedView=e(0===i?n[n.length-1]:n[i-1]),r._focusedView.focus().addClass(o.focused),t.preventDefault()):t.keyCode!==g.ENTER&&t.keyCode!==g.SPACEBAR||!r._focusedView?(t.keyCode===g.SPACEBAR||t.keyCode===g.ENTER||t.keyCode===g.DOWN&&t.altKey)&&r.toolbar.find($+o.toolbar.currentView+" > a").hasClass(o.focused)?(r.toolbar.find($+o.toolbar.currentView).parent().toggleClass(o.toolbar.expanded),t.preventDefault()):t.keyCode===g.ESC&&r.toolbar.find($+o.toolbar.currentView).parent().hasClass(o.toolbar.expanded)?(r.toolbar.find($+o.toolbar.currentView).parent().toggleClass(o.toolbar.expanded).blur(),r._focusedView=null,r.toolbar.find($+o.toolbar.currentView+" > a").addClass(o.focused).focus(),t.preventDefault()):t.keyCode>=49&&t.keyCode<=57&&r.view(r.timeline._viewByIndex(t.keyCode-49)):(r.view(r._focusedView.text().toLowerCase()),t.preventDefault())}).on(L+N,s,function(e){e.preventDefault(),r.saveAsPDF()}).on(L+N,l,function(e){
e.preventDefault(),u.is(":visible")?(u.css({display:"none",width:"0"}),c.css({display:"inline-block",width:"100%"}),r.refresh(),c.find(d).scrollTop(r.scrollTop)):(c.css({display:"none",width:0}),u.css({display:"inline-block",width:"100%","max-width":"none"}).find(d).scrollTop(r.scrollTop)),r._resize()}),this.wrapper.on("focusout"+N,function(t){e(t.relatedTarget).closest($+o.toolbar.toolbar).length||r.toolbar.find($+o.focused).removeClass(o.focused),e(t.relatedTarget).closest($+o.toolbar.views).length||r.toolbar.find($+o.toolbar.views).removeClass(o.toolbar.expanded)}).find($+o.toolbar.toolbar+" li").hover(function(){e(this).addClass(h)},function(){e(this).removeClass(h)})},_actions:function(){var e,t,n=this.options,i=n.editable,r=n.toolbar,o="";if(!S(r)){if(!i||i.create===!1)return o;r=["append"]}for(e=0,t=r.length;e<t;e++)o+=this._createButton(r[e]);return o},_footer:function(){var t,n,i,r,o,a=this.options.editable;a&&a.create!==!1&&(t=f.styles.toolbar,n=this.options.messages.actions,i=e(m.template(X)(A(!0,{styles:t},s.append,{text:n.append}))),r=e("<div class='"+t.actions+"'>").append(i),o=e("<div class='"+t.footerWrapper+"'>").append(r),this.wrapper.append(o),this.footer=o)},_createButton:function(e){var t=e.template||X,n=this.options.messages.actions,i=typeof e===V?e:e.name||e.text,r=s[i]?s[i].className:"k-gantt-"+(i||"").replace(/\s/g,""),o={iconClass:"",action:"",text:i,className:r,styles:f.styles.toolbar};if(!(i||I(e)&&e.template))throw Error("Custom commands should have name specified");return o=A(!0,o,s[i],{text:n[i]}),I(e)&&(e.className&&D(o.className,e.className.split(" "))<0&&(e.className+=" "+o.className),o=A(!0,o,e)),m.template(t)(o)},_adjustDimensions:function(){var e=this.element,t=f.styles,n=$+t.list,i=$+t.timeline,r=$+t.splitBar,o=z(this.toolbar),a=this.footer?z(this.footer):0,s=e.height(),l=e.width(),d=M(e.find(r)),u=M(e.find(n));e.children([n,i,r].join(",")).height(s-(o+a)).end().children(i).width(l-(d+u)),l<u+d&&e.find(n).width(l-d)},_scrollTo:function(e){var t,i,r=this.timeline.view(),o=this.list,a=m.attr("uid"),s="string"==typeof e?e:e.closest("tr"+n()).attr(a),l=function(){0!==i.length&&t()};r.content.is(":visible")?(i=r.content.find(n(s)),t=function(){r._scrollTo(i)}):(i=o.content.find(n(s)),t=function(){i.get(0).scrollIntoView()}),l()},_dropDowns:function(){var e=this,t=$+f.styles.toolbar.actions,n=this.options.messages.actions,i=this.timeline,r=this.options.editable,o=function(t){var n,r=t.type,o=e.dataSource,a=o._createNewModel(),s=e.dataItem(e.select()),l=o.taskParent(s),d=i.view()._timeSlots()[0],u="add"===r?s:l,c=e.list.editable;c&&c.trigger("validate")||(a.set("title","New task"),u?(a.set("parentId",u.get("id")),a.set("start",u.get("start")),a.set("end",u.get("end"))):(a.set("start",d.start),a.set("end",d.end)),"add"!==r&&(n=s.get("orderId"),n="insert-before"===r?n:n+1),e._createTask(a,n))};r&&r.create!==!1&&(this.footerDropDown=new oe(this.footer.children(t).eq(0),{messages:{actions:n},direction:"up",animation:{open:{effects:"slideIn:up"}},navigatable:e.options.navigatable}),this.headerDropDown=new oe(this.toolbar.children(t).eq(0),{messages:{actions:n},navigatable:e.options.navigatable}),this.footerDropDown.bind("command",o),this.headerDropDown.bind("command",o))},_list:function(){var e,t,n=this,i=n.options.navigatable,r=f.styles,a=this.wrapper.find($+r.list),s=a.find("> div"),l=this.wrapper.find($+r.toolbar.actions+" > button"),d={columns:this.options.columns||[],dataSource:this.dataSource,selectable:this.options.selectable,editable:this.options.editable,resizable:this.options.resizable,columnResizeHandleWidth:this.options.columnResizeHandleWidth,listWidth:M(a),resourcesField:this.resources.field,rowHeight:this.options.rowHeight},u=d.columns,c=function(){i&&(n._current(n._cachedCurrent),o(n.list.content.find("table"),!0)),delete n._cachedCurrent};for(t=0;t<u.length;t++)e=u[t],e.field===this.resources.field&&"function"!=typeof e.editor&&(e.editor=E(this._createResourceEditor,this));this.list=new m.ui.GanttList(s,d),this.list.bind("render",function(){n._navigatable()},!0).bind("edit",function(e){n._cachedCurrent=e.cell,n.trigger("edit",{task:e.model,container:e.cell})&&e.preventDefault()}).bind("cancel",function(e){n.trigger("cancel",{task:e.model,container:e.cell})&&e.preventDefault(),c()}).bind("update",function(e){n._updateTask(e.task,e.updateInfo),c()}).bind("change",function(){n.trigger("change");var e=n.list.select();e.length?(l.removeAttr("data-action","add"),n.timeline.select("[data-uid='"+e.attr("data-uid")+"']")):(l.attr("data-action","add"),n.timeline.clearSelection())}).bind("columnResize",function(e){n.trigger("columnResize",{column:e.column,oldWidth:e.oldWidth,newWidth:e.newWidth})})},_timeline:function(){var e=this,n=f.styles,r=i(A(!0,{resourcesField:this.resources.field},this.options)),o=this.wrapper.find($+n.timeline+" > div"),a=$+n.toolbar.currentView+" > "+$+n.toolbar.link;this.timeline=new m.ui.GanttTimeline(o,r),this.timeline.bind("navigate",function(t){var i=t.view.replace(/\./g,"\\.").toLowerCase(),r=e.toolbar.find($+n.toolbar.views+" > li").removeClass(n.selected).end().find($+n.toolbar.viewButton+"-"+i).addClass(n.selected).find($+n.toolbar.link).text();e.toolbar.find(a).text(r),e.refresh()}).bind("moveStart",function(n){var i=e.list.editable;return i&&i.trigger("validate")?(n.preventDefault(),t):(e.trigger("moveStart",{task:n.task})&&n.preventDefault(),t)}).bind("move",function(t){var n=t.task,i=t.start,r=new Date(i.getTime()+n.duration());e.trigger("move",{task:n,start:i,end:r})&&t.preventDefault()}).bind("moveEnd",function(t){var n=t.task,i=t.start,r=new Date(i.getTime()+n.duration());e.trigger("moveEnd",{task:n,start:i,end:r})||e._updateTask(e.dataSource.getByUid(n.uid),{start:i,end:r})}).bind("resizeStart",function(n){var i=e.list.editable;return i&&i.trigger("validate")?(n.preventDefault(),t):(e.trigger("resizeStart",{task:n.task})&&n.preventDefault(),t)}).bind("resize",function(t){e.trigger("resize",{task:t.task,start:t.start,end:t.end})&&t.preventDefault()}).bind("resizeEnd",function(t){var n=t.task,i={};t.resizeStart?i.start=t.start:i.end=t.end,e.trigger("resizeEnd",{task:n,start:t.start,end:t.end})||e._updateTask(e.dataSource.getByUid(n.uid),i)}).bind("percentResizeStart",function(t){var n=e.list.editable;n&&n.trigger("validate")&&t.preventDefault()}).bind("percentResizeEnd",function(t){e._updateTask(e.dataSource.getByUid(t.task.uid),{percentComplete:t.percentComplete})}).bind("dependencyDragStart",function(t){var n=e.list.editable;n&&n.trigger("validate")&&t.preventDefault()}).bind("dependencyDragEnd",function(t){var n=e.dependencies._createNewModel({type:t.type,predecessorId:t.predecessor.id,successorId:t.successor.id});e._createDependency(n)}).bind("select",function(t){var n=e.list.editable;n&&n.trigger("validate"),e.select("[data-uid='"+t.uid+"']")}).bind("editTask",function(t){var n=e.list.editable;n&&n.trigger("validate")||e.editTask(t.uid)}).bind("clear",function(){e.clearSelection()}).bind("removeTask",function(t){var n=e.list.editable;n&&n.trigger("validate")||e.removeTask(e.dataSource.getByUid(t.uid))}).bind("removeDependency",function(t){var n=e.list.editable;n&&n.trigger("validate")||e.removeDependency(e.dependencies.getByUid(t.uid))})},_dataSource:function(){var e=this.options,t=e.dataSource;t=S(t)?{data:t}:t,this.dataSource&&this._refreshHandler?this.dataSource.unbind("change",this._refreshHandler).unbind("progress",this._progressHandler).unbind("error",this._errorHandler):(this._refreshHandler=E(this.refresh,this),this._progressHandler=E(this._requestStart,this),this._errorHandler=E(this._error,this)),this.dataSource=m.data.GanttDataSource.create(t).bind("change",this._refreshHandler).bind("progress",this._progressHandler).bind("error",this._errorHandler)},_dependencies:function(){var e=this.options.dependencies||{},t=S(e)?{data:e}:e;this.dependencies&&this._dependencyRefreshHandler?this.dependencies.unbind("change",this._dependencyRefreshHandler).unbind("error",this._dependencyErrorHandler):(this._dependencyRefreshHandler=E(this.refreshDependencies,this),this._dependencyErrorHandler=E(this._error,this)),this.dependencies=m.data.GanttDependencyDataSource.create(t).bind("change",this._dependencyRefreshHandler).bind("error",this._dependencyErrorHandler)},_resources:function(){var e=this.options.resources,t=e.dataSource||{};this.resources={field:"resources",dataTextField:"name",dataColorField:"color",dataFormatField:"format"},A(this.resources,e),this.resources.dataSource=m.data.DataSource.create(t)},_assignments:function(){var e=this.options.assignments,t=e.dataSource||{};this.assignments?this.assignments.dataSource.unbind("change",this._assignmentsRefreshHandler):this._assignmentsRefreshHandler=E(this.refresh,this),this.assignments={dataTaskIdField:"taskId",dataResourceIdField:"resourceId",dataValueField:"value"},A(this.assignments,e),this.assignments.dataSource=m.data.DataSource.create(t),this.assignments.dataSource.bind("change",this._assignmentsRefreshHandler)},_createEditor:function(){var e=this,n=this._editor=new h(this.wrapper,A({},this.options,{target:this,resources:{field:this.resources.field,editor:E(this._createResourceEditor,this)},createButton:E(this._createPopupButton,this)}));n.bind("cancel",function(n){var i=e.dataSource.getByUid(n.model.uid);return e.trigger("cancel",{container:n.container,task:i})?(n.preventDefault(),t):(e.cancelTask(),t)}).bind("edit",function(t){var n=e.dataSource.getByUid(t.model.uid);e.trigger("edit",{container:t.container,task:n})&&t.preventDefault()}).bind("save",function(t){var n=e.dataSource.getByUid(t.model.uid);e.saveTask(n,t.updateInfo)}).bind("remove",function(t){e.removeTask(t.model.uid)}).bind("close",e._onDialogClose)},_onDialogClose:function(){},_createResourceEditor:function(e,t){var n=this,i=t instanceof x?t:t.model,r=i.get("id"),o=this.options.messages,a=n.resources.field,s=this._resourceEditor=new p(e,{resourcesField:a,data:this._wrapResourceData(r),model:i,messages:A({},o.editor),buttons:[{name:"update",text:o.save,className:f.styles.primary},{name:"cancel",text:o.cancel}],createButton:E(this._createPopupButton,this),save:function(e){n._updateAssignments(e.model.get("id"),e.model.get(a))}});s.open()},_createPopupButton:function(e){var t=e.name||e.text,n={className:f.styles.popup.button+" k-gantt-"+(t||"").replace(/\s/g,""),text:t,attr:""};if(!(t||I(e)&&e.template))throw Error("Custom commands should have name specified");return I(e)&&(e.className&&(e.className+=" "+n.className),n=A(!0,n,e)),m.template(J)(n)},view:function(e){return this.timeline.view(e)},range:function(e){var t=this.dataSource,n=this.view(),i=this.timeline;return e&&(n.options.range={start:e.start,end:e.end},i._render(t.taskTree()),i._renderDependencies(this.dependencies.view())),{start:n.start,end:n.end}},date:function(e){var t=this.view();return e&&(t.options.date=e,t._scrollToDate(e)),t.options.date},dataItem:function(e){var t,n;return e?(t=this.list,n=t.content.find(e),t._modelFromElement(n)):null},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.list._setDataSource(this.dataSource),this.options.autoBind&&e.fetch()},setDependenciesDataSource:function(e){this.options.dependencies=e,this._dependencies(),this.options.autoBind&&e.fetch()},items:function(){return this.wrapper.children(".k-task")},_updateAssignments:function(e,t){for(var n,i,r,o,a,s,l,d=this.assignments.dataSource,u=this.assignments.dataTaskIdField,c=this.assignments.dataResourceIdField,h=!1,p=new T(d.view()).filter({field:u,operator:"eq",value:e}).toArray();p.length;){for(n=p[0],o=0,a=t.length;o<a;o++)if(i=t[o],n.get(c)===i.get("id")){r=t[o].get("value"),this._updateAssignment(n,r),t.splice(o,1),h=!0;break}h||this._removeAssignment(n),h=!1,p.shift()}for(s=0,l=t.length;s<l;s++)i=t[s],this._createAssignment(i,e);d.sync()},cancelTask:function(){var e=this._editor,t=e.container;t&&e.close()},editTask:function(e){var t,n="string"==typeof e?this.dataSource.getByUid(e):e;n&&(t=this.dataSource._createNewModel(n.toJSON()),t.uid=n.uid,this.cancelTask(),this._editTask(t))},_editTask:function(e){this._editor.editTask(e)},saveTask:function(e,t){var n=this._editor,i=n.container,r=n.editable;i&&r&&r.end()&&this._updateTask(e,t)},_updateTask:function(e,t){var n=this.resources.field;this.trigger("save",{task:e,values:t})||(this._preventRefresh=!0,this.dataSource.update(e,t),t[n]&&this._updateAssignments(e.get("id"),t[n]),this._syncDataSource())},_updateAssignment:function(e,t){var n=this.assignments.dataValueField;e.set(n,t)},removeTask:function(e){var t=this,n="string"==typeof e?this.dataSource.getByUid(e):e;n&&this._taskConfirm(function(e){e||t._removeTask(n)},n)},_createTask:function(e,n){if(!this.trigger("add",{task:e,dependency:null})){var i=this.dataSource;this._preventRefresh=!0,n===t?i.add(e):i.insert(n,e),this._scrollToUid=e.uid,this._syncDataSource()}},_createDependency:function(e){this.trigger("add",{task:null,dependency:e})||(this._preventDependencyRefresh=!0,this.dependencies.add(e),this._preventDependencyRefresh=!1,this.dependencies.sync())},_createAssignment:function(e,t){var n=this.assignments,i=n.dataSource,r=n.dataTaskIdField,o=n.dataResourceIdField,a=n.dataValueField,s=i._createNewModel();s[r]=t,s[o]=e.get("id"),s[a]=e.get("value"),i.add(s)},removeDependency:function(e){var t=this,n="string"==typeof e?this.dependencies.getByUid(e):e;n&&this._dependencyConfirm(function(e){e||t._removeDependency(n)},n)},_removeTaskDependencies:function(e,t){this._preventDependencyRefresh=!0;for(var n=0,i=t.length;n<i;n++)this.dependencies.remove(t[n]);this._preventDependencyRefresh=!1,this.dependencies.sync()},_removeTaskAssignments:function(e){var t,n,i=this.assignments.dataSource,r=i.view(),o={field:this.assignments.dataTaskIdField,operator:"eq",value:e.get("id")};for(r=new T(r).filter(o).toArray(),this._preventRefresh=!0,t=0,n=r.length;t<n;t++)i.remove(r[t]);this._preventRefresh=!1,i.sync()},_removeTask:function(e){var t=this.dependencies.dependencies(e.id);this.trigger("remove",{task:e,dependencies:t})||(this._removeTaskDependencies(e,t),this._removeTaskAssignments(e),this._preventRefresh=!0,this.dataSource.remove(e)&&this._syncDataSource(),this._preventRefresh=!1)},_removeDependency:function(e){this.trigger("remove",{task:null,dependencies:[e]})||this.dependencies.remove(e)&&this.dependencies.sync()},_removeAssignment:function(e){this.assignments.dataSource.remove(e)},_taskConfirm:function(e,t){var n=this.options.messages;this._confirm(e,{model:t,text:n.deleteTaskConfirmation,title:n.deleteTaskWindowTitle})},_dependencyConfirm:function(e,t){var n=this.options.messages;this._confirm(e,{model:t,text:n.deleteDependencyConfirmation,title:n.deleteDependencyWindowTitle})},_confirm:function(e,t){var n,i,r=this.options.editable;r===!0||r.confirmation!==!1?(n=this.options.messages,i=[{name:"delete",text:n.destroy,className:f.styles.primary,click:function(){e()}},{name:"cancel",text:n.cancel,click:function(){e(!0)}}],this.showDialog(A(!0,{},t,{buttons:i}))):e()},showDialog:function(e){this._editor.showDialog(e)},refresh:function(){var e,t,i,r,o,a;this._preventRefresh||this.list.editable||(this._progress(!1),e=this.dataSource,t=e.taskTree(),i=this._scrollToUid,a=-1,this.current&&(o=this.current.closest("tr").attr(m.attr("uid")),a=this.current.index()),this.trigger("dataBinding")||(0!==this.resources.dataSource.data().length&&this._assignResources(t),this._editor&&this._editor.close(),this.clearSelection(),this.list._render(t),this.timeline._render(t),this.timeline._renderDependencies(this.dependencies.view()),i&&(this._scrollTo(i),this.select(n(i))),(i||o)&&a>=0&&(r=this.list.content.find("tr"+n(i||o)+" > td:eq("+a+")"),this._current(r)),this._scrollToUid=null,this.trigger("dataBound")))},refreshDependencies:function(){this._preventDependencyRefresh||this.trigger("dataBinding")||(this.timeline._renderDependencies(this.dependencies.view()),this.trigger("dataBound"))},_assignResources:function(e){var t,n,i=this.resources,r=this.assignments,o=function(){var e=r.dataSource.view(),t={field:r.dataTaskIdField};return e=new T(e).group(t).toArray()},a=o(),s=function(e,t){var n,r,o=e.get("id");for(m.setter(i.field)(e,new C([])),n=0,r=a.length;n<r;n++)a[n].value===o&&t(e,a[n].items)},l=function(e,t){var n,o,a,s,l,d,u,c;for(n=0,o=t.length;n<o;n++)a=t[n],s=i.dataSource.get(a.get(r.dataResourceIdField)),l=a.get(r.dataValueField),d=a.get(r.dataResourceIdField),u=s.get(i.dataFormatField)||B,c=m.toString(l,u),e[i.field].push(new x({id:d,name:s.get(i.dataTextField),color:s.get(i.dataColorField),value:l,formatedValue:c}))};for(t=0,n=e.length;t<n;t++)s(e[t],l)},_wrapResourceData:function(e){var t,n,i,r=this,o=[],a=this.resources.dataSource.view(),s=this.assignments.dataSource.view(),l=new T(s).filter({field:r.assignments.dataTaskIdField,operator:"eq",value:e}).toArray(),d=function(e){var t=null;return new T(l).filter({field:r.assignments.dataResourceIdField,operator:"eq",value:e}).select(function(e){t+=e.get(r.assignments.dataValueField)}),t};for(n=0,i=a.length;n<i;n++)t=a[n],o.push({id:t.get("id"),name:t.get(r.resources.dataTextField),format:t.get(r.resources.dataFormatField)||B,value:d(t.id)});return o},_syncDataSource:function(){this._preventRefresh=!1,this._requestStart(),this.dataSource.sync()},_requestStart:function(){this._progress(!0)},_error:function(){this._progress(!1)},_progress:function(e){m.ui.progress(this.element,e)},_resizable:function(){var t,n,i,r=this,o=this.wrapper,a=f.styles,s=$+a.gridContent,l=o.find($+a.list),d=o.find($+a.timeline);this._resizeDraggable=o.find($+a.splitBar).height(l.height()).hover(function(){e(this).addClass(a.splitBarHover)},function(){e(this).removeClass(a.splitBarHover)}).end().kendoResizable({orientation:"horizontal",handle:$+a.splitBar,start:function(){t=l.width(),n=d.width(),i=d.find(s).scrollLeft()},resize:function(e){var a=e.x.initialDelta;m.support.isRtl(o)&&(a*=-1),t+a<0||n-a<0||(l.width(t+a),d.width(n-a),d.find(s).scrollLeft(i+a),r.timeline.view()._renderCurrentTime())}}).data("kendoResizable")},_scrollable:function(){var t=this,n=f.styles,i=$+n.gridContent,r=$+n.gridHeaderWrap,o=this.timeline.element.find(r),a=this.timeline.element.find(i),s=this.list.element.find(r),l=this.list.element.find(i);b&&l.css("overflow-y","auto"),a.on("scroll",function(){t.scrollTop=this.scrollTop,o.scrollLeft(this.scrollLeft),l.scrollTop(this.scrollTop)}),l.on("scroll",function(){s.scrollLeft(this.scrollLeft)}).on("DOMMouseScroll"+N+" mousewheel"+N,function(t){var n=a.scrollTop(),i=m.wheelDeltaY(t);i&&(t.preventDefault(),e(t.currentTarget).one("wheel"+N,!1),a.scrollTop(n+-i))})},_navigatable:function(){var i,r=this,a=this.options.navigatable,s=this.options.editable,l=this.list.header.find("table"),d=this.list.content.find("table"),u=f.styles,c=m.support.isRtl(this.wrapper),h=this.timeline.element.find($+u.gridContent),p=l.add(d),v=n(),_={collapse:!1,expand:!0},b=function(e){var t=r.timeline.view()._timeSlots()[0].offsetWidth;h.scrollLeft(h.scrollLeft()+(e?-t:t))},k=function(e){var t=r.timeline.view()._rowHeight;h.scrollTop(h.scrollTop()+(e?-t:t))},w=function(e){var t=r.current.parent("tr"+n()),i=r.current.index(),a=t[e]();0!==r.select().length&&r.clearSelection(),0!==a.length?(r._current(a.children("td:eq("+i+")")),r._scrollTo(r.current)):r.current.is("td")&&"prev"==e?o(l):r.current.is("th")&&"next"==e&&o(d)},y=function(e){var t=r.current[e]();0!==t.length&&(r._current(t),i=r.current.index())},x=function(e){var t=r.dataItem(r.current);t.summary&&t.expanded!==e&&t.set("expanded",e)},C=function(){var e,t,n=r.options.editable;n&&n.destroy!==!1&&!r.list.editable&&(e=r.select(),t=m.attr("uid"),e.length&&r.removeTask(e.attr(t)))};return e(this.wrapper).on("mousedown"+N,"tr"+v+", div"+v+":not("+$+u.line+")",function(t){var i,l=e(t.currentTarget),d=e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap");t.ctrlKey||(a&&(i=l.is("tr")?e(t.target).closest("td"):r.list.content.find("tr"+n(l.attr(m.attr("uid")))+" > td:first"),r._current(i)),!a&&!s||d||(r._focusTimeout=setTimeout(function(){o(r.list.content.find("table"),!0)},2)))}).on("keydown"+N,function(n){var i,r=n.keyCode,o=this,a=e(o._getToolbarItems()),s=a.index(o.toolbar.find($+u.focused)[0]);if(s===-1&&e(n.target).closest($+u.toolbar.views).length&&(s=a.index(o.toolbar.find(".k-gantt-views > .k-state-selected:visible > a, .k-current-view:visible > a")[0])),i=n.shiftKey?a[s-1]:a[s+1],r===g.F10)o.toolbar.find(".k-button:visible:first").addClass(u.focused).focus(),n.preventDefault();else if(r==g.TAB&&e(n.target).closest($+u.toolbar.toolbar).length){if(o.toolbar.find($+u.focused).removeClass(u.focused).blur(),i)return e(i).addClass(u.focused).focus(),n.preventDefault(),t;this.list.element.is(":visible")?this.list.element.find("table[role=treegrid]").focus():this.element.find($+u.tasks)[0].focus(),n.preventDefault()}}.bind(this)),a!==!0?(d.on("keydown"+N,function(e){e.keyCode==g.DELETE&&C()}),t):(p.on("focus"+N,function(){var t=this===d.get(0)?"td":"th",n=r.select(),o=r.current||e(n.length?n:this).find(t+":eq("+(i||0)+")");r._current(o),e(r.toolbar.find($+u.focused)).removeClass(u.focused),e(r.toolbar.find($+u.toolbar.currentView)).parent().removeClass(u.toolbar.expanded)}).on("blur"+N,function(){r._current(),this==l&&e(this).attr(P,-1)}).on("keydown"+N,function(t){var n,i=t.keyCode;if(r.current)switch(n=r.current.is("td"),i){case g.RIGHT:t.preventDefault(),t.altKey?b():t.ctrlKey?x(c?_.collapse:_.expand):y(c?"prev":"next");break;case g.LEFT:t.preventDefault(),t.altKey?b(!0):t.ctrlKey?x(c?_.expand:_.collapse):y(c?"next":"prev");break;case g.UP:t.preventDefault(),t.altKey?k(!0):w("prev");break;case g.DOWN:t.preventDefault(),t.altKey?k():w("next");break;case g.SPACEBAR:t.preventDefault(),n&&r.select(r.current.closest("tr"));break;case g.ENTER:t.preventDefault(),n?r.options.editable&&r.options.editable.update!==!1&&(r._cachedCurrent=r.current,r.list._startEditHandler(r.current),e(this).one("keyup",function(e){e.stopPropagation()})):r.current.children("a.k-link").click();break;case g.ESC:break;case g.DELETE:n&&C();break;default:i>=49&&i<=57&&r.view(r.timeline._viewByIndex(i-49))}}),t)},_getToolbarItems:function(){return this.toolbar.find(".k-gantt-toggle:visible").toArray().concat(this.toolbar.find(".k-gantt-actions > .k-button:visible").toArray(),this.toolbar.find(".k-gantt-views > .k-state-selected:visible > a, .k-current-view:visible > a").toArray())},_current:function(t){var n,i=f.styles;this.current&&this.current.length&&this.current.removeClass(i.focused).removeAttr("id"),t&&t.length?(this.current=t.addClass(i.focused).attr("id",j),n=e(m._activeElement()),n.is("table")&&this.wrapper.find(n).length>0&&n.removeAttr(U).attr(U,j)):this.current=null},_dataBind:function(){var t,n=this;n.options.autoBind&&(this._preventRefresh=!0,this._preventDependencyRefresh=!0,t=e.map([this.dataSource,this.dependencies,this.resources.dataSource,this.assignments.dataSource],function(e){return e.fetch()}),e.when.apply(null,t).done(function(){n._preventRefresh=!1,n._preventDependencyRefresh=!1,n.refresh()}))},_resize:function(){this._adjustDimensions(),this.timeline.view()._adjustHeight(),this.timeline.view()._renderCurrentTime(),this.list._adjustHeight()}}),m.PDFMixin&&(m.PDFMixin.extend(f.fn),f.fn._drawPDF=function(){var e=f.styles,t="."+e.list,n=this.wrapper.find(t).width(),i=this.wrapper.clone();return i.find(t).css("width",n),this._drawPDFShadow({content:i},{avoidLinks:this.options.pdf.avoidLinks})}),m.ui.plugin(f),A(!0,f,{styles:re})}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.treelist.min",["kendo.dom.min","kendo.data.min","kendo.columnsorter.min","kendo.editable.min","kendo.window.min","kendo.filtermenu.min","kendo.selectable.min","kendo.resizable.min","kendo.treeview.draganddrop.min"],e)}(function(){return function(e,t){function n(e){return function(t){return t[e]}}function i(e){return function(t){return!e(t)}}function r(){return"none"!==this.style.display}function o(n){var i,r=n.find(">tr:not(.k-filter-row)"),o=function(){var t=e(this);return!t.hasClass("k-group-cell")&&!t.hasClass("k-hierarchy-cell")},a=e();return r.length>1&&(a=r.find("th").filter(o).filter(function(){return this.rowSpan>1})),a=a.add(r.last().find("th").filter(o)),i=kendo.attr("index"),a.sort(function(n,r){var o,a;return n=e(n),r=e(r),o=n.attr(i),a=r.attr(i),o===t&&(o=e(n).index()),a===t&&(a=e(r).index()),o=parseInt(o,10),a=parseInt(a,10),o>a?1:o<a?-1:0}),a}function a(e){var t,n,i=[],r=e.className;for(t=0,n=e.level;t<n;t++)i.push(_("span",{className:r}));return i}function s(e){var t,n,i,r=0;for(n=0,i=e.length;n<i;n++)t=e[n].style.width,t&&t.indexOf("%")==-1&&(r+=parseInt(t,10));return r}function l(e,t){var n,i,r,o;e=e[0],t=t[0],e.rows.length!==t.rows.length&&(n=e.offsetHeight,i=t.offsetHeight,n>i?(r=t.rows[t.rows.length-1],o=n-i):(r=e.rows[e.rows.length-1],o=i-n),r.style.height=r.offsetHeight+o+"px")}function d(t){return e(t).is(":button,a,:input,a>.k-icon,textarea,span.k-select,span.k-icon,span.k-link,.k-input,.k-multiselect-wrap,.k-tool-icon")}function u(t,n){var i,r,o=A.msie||A.edge;if(n===!0){if(t=e(t),i=t.parent().scrollTop(),r=t.parent().scrollLeft(),o)try{t[0].setActive()}catch(a){t[0].focus()}else t[0].focus();t.parent().scrollTop(i).scrollLeft(r)}else e(t).one("focusin",function(e){e.preventDefault()}).focus()}var c,h,p,f,m=kendo.data,g=e.extend,v=kendo.dom,_=v.element,b=v.text,k=v.html,w=kendo._outerWidth,y=kendo.keys,x=kendo._outerHeight,C=kendo.ui,T=C.DataBoundWidget,S=m.DataSource,D=m.ObservableArray,F=m.Query,E=m.Model,A=kendo.support.browser,I=e.proxy,R=e.map,M=e.grep,z=e.inArray,H=e.isPlainObject,N=Array.prototype.push,B="string",P="change",L="error",O="progress",V=".",W=".kendoTreeList",U="click",q="mousedown",j="edit",G="save",$="expand",K="collapse",Y="remove",Q="dataBinding",X="dataBound",J="cancel",Z="tabIndex",ee="filterMenuInit",te="columnHide",ne="columnShow",ie="th.k-header",re="columnReorder",oe="columnResize",ae="columnMenuInit",se="columnLock",le="columnUnlock",de="parentId",ue="dragstart",ce="drag",he="drop",pe="dragend",fe="tr:visible",me="td:visible",ge="th:visible",ve=fe+" > td:first:visible",_e="tr:not(.k-footer-template):visible:last",be="th:visible",ke=!1,we={wrapper:"k-treelist k-grid k-widget k-display-block",header:"k-header",button:"k-button",alt:"k-alt",editCell:"k-edit-cell",group:"k-treelist-group",gridToolbar:"k-grid-toolbar",gridHeader:"k-grid-header",gridHeaderWrap:"k-grid-header-wrap",gridContent:"k-grid-content",gridContentWrap:"k-grid-content",gridFilter:"k-grid-filter",footerTemplate:"k-footer-template",focused:"k-state-focused",loading:"k-i-loading",refresh:"k-i-reload",retry:"k-request-retry",selected:"k-state-selected",status:"k-status",link:"k-link",withIcon:"k-with-icon",filterable:"k-filterable",icon:"k-icon",iconFilter:"k-i-filter",iconCollapse:"k-i-collapse",iconExpand:"k-i-expand",iconHidden:"k-i-none",iconPlaceHolder:"k-icon k-i-none",input:"k-input",dropPositions:"k-i-insert-up k-i-insert-down k-i-plus k-i-insert-middle",dropTop:"k-i-insert-up",dropBottom:"k-i-insert-down",dropAdd:"k-i-plus",dropMiddle:"k-i-insert-middle",dropDenied:"k-i-cancel",dragStatus:"k-drag-status",dragClue:"k-drag-clue",dragClueText:"k-clue-text"},ye={create:{imageClass:"k-i-plus",className:"k-grid-add",methodName:"addRow"},createchild:{imageClass:"k-i-plus",className:"k-grid-add",methodName:"addRow"},destroy:{imageClass:"k-i-close",className:"k-grid-delete",methodName:"removeRow"},edit:{imageClass:"k-i-edit",className:"k-grid-edit",methodName:"editRow"},update:{imageClass:"k-i-check",className:"k-primary k-grid-update",methodName:"saveRow"},canceledit:{imageClass:"k-i-cancel",className:"k-grid-cancel",methodName:"_cancelEdit"},excel:{imageClass:"k-i-file-excel",className:"k-grid-excel",methodName:"saveAsExcel"},pdf:{imageClass:"k-i-file-pdf",className:"k-grid-pdf",methodName:"saveAsPDF"}},xe=E.define({id:"id",parentId:de,fields:{id:{type:"number"},parentId:{type:"number",nullable:!0}},init:function(e){E.fn.init.call(this,e),this._loaded=!1,this.parentIdField||(this.parentIdField=de),this.parentId=this.get(this.parentIdField)},accept:function(e){E.fn.accept.call(this,e),this.parentId=this.get(this.parentIdField)},set:function(e,t,n){e==de&&this.parentIdField!=de&&(this[this.parentIdField]=t),E.fn.set.call(this,e,t,n),e==this.parentIdField&&(this.parentId=this.get(this.parentIdField))},loaded:function(e){return e===t?this._loaded:(this._loaded=e,t)},shouldSerialize:function(e){return E.fn.shouldSerialize.call(this,e)&&"_loaded"!==e&&"_error"!=e&&"_edit"!=e&&!("parentId"!==this.parentIdField&&"parentId"===e)}});xe.parentIdField=de,xe.define=function(e,n){var i,r;return n===t&&(n=e,e=xe),i=n.parentId||de,n.parentIdField=i,r=E.define(e,n),i&&(r.parentIdField=i),r},c=S.extend({init:function(e){S.fn.init.call(this,g(!0,{},{schema:{modelBase:xe,model:xe}},e))},_createNewModel:function(e){var t={},n=e instanceof E;return n&&(t=e),t=S.fn._createNewModel.call(this,t),n||(e.parentId&&(e[t.parentIdField]=e.parentId),t.accept(e)),t},_shouldWrap:function(){return!0},_push:function(e,t){var n=S.fn._readData.call(this,e);n||(n=e),this[t](n)},_readData:function(e,t){var n,i,r=this.data(),o=r;return e=S.fn._readData.call(this,e),n=r.toJSON().concat(e),t&&t.id&&(i=this.get(t.id),this.childNodes(i).length>0&&(n=e,o=this._subtree(this._childrenMap(this.data()),t.id))),this._replaceData(n,o),e instanceof D?e:r},_replaceData:function(e,t){var n,i=e.length;for(n=0;n<i;n++)t[n]=e[n];t.length=i},_readAggregates:function(e){var t=g(this._aggregateResult,this.reader.aggregates(e));return""in t&&(t[this._defaultParentId()]=t[""],delete t[""]),t},remove:function(e){var t=this._subtree(this._childrenMap(this.data()),e.id);this._removeItems(t),S.fn.remove.call(this,e)},_filterCallback:function(e){var t,n,i={},r=[],o=e.toArray();for(t=0;t<o.length;t++)for(n=o[t];n&&(i[n.id]||(i[n.id]=!0,r.push(n)),!i[n.parentId]);)i[n.parentId]=!0,n=this.parentNode(n),n&&r.push(n);return new F(r)},_subtree:function(e,t){var n,i,r=e[t]||[],o=this._defaultParentId();for(n=0,i=r.length;n<i;n++)r[n].id!==o&&(r=r.concat(this._subtree(e,r[n].id)));return r},_childrenMap:function(e){var t,n,i,r,o={};for(e=this._observeView(e),t=0;t<e.length;t++)n=e[t],i=n.id,r=n.parentId,o[i]=o[i]||[],o[r]=o[r]||[],o[r].push(n);return o},_calculateAggregates:function(e,t){var n,i,r,o,a,s;for(t=t||{},n={},a=t.filter,a&&(e=F.process(e,{filter:a,filterCallback:I(this._filterCallback,this)}).data),s=this._childrenMap(e),n[this._defaultParentId()]=new F(this._subtree(s,this._defaultParentId())).aggregate(t.aggregate),o=0;o<e.length;o++)i=e[o],r=this._subtree(s,i.id),n[i.id]=new F(r).aggregate(t.aggregate);return n},_queryProcess:function(e,t){var n,i,r,o,a,s,l;for(t=t||{},t.filterCallback=I(this._filterCallback,this),n=this._defaultParentId(),i=F.process(e,t),r=this._childrenMap(i.data),e=r[n]||[],a=0;a<e.length;a++)s=e[a],s.id!==n&&(l=r[s.id],o=!(!l||!l.length),s.loaded()||s.loaded(o||!s.hasChildren),(s.loaded()||s.hasChildren!==!0)&&(s.hasChildren=o),o&&(e=e.slice(0,a+1).concat(l,e.slice(a+1))));return i.data=e,i},_queueRequest:function(e,t){t.call(this)},_modelLoaded:function(e){var t=this.get(e);t.loaded(!0),t.hasChildren=this.childNodes(t).length>0},_modelError:function(e,t){this.get(e)._error=t},success:function(e,n){return n&&t!==n.id||(this._data=this._observe([])),S.fn.success.call(this,e,n)},load:function(t){var n="_query",i=this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates,r=e.Deferred().resolve().promise();if(t.loaded()){if(i)return r}else t.hasChildren&&(n="read");return this[n]({id:t.id}).done(I(this._modelLoaded,this,t.id)).fail(I(this._modelError,this,t.id))},contains:function(e,t){for(var n=e.id;t;){if(t.parentId===n)return!0;t=this.parentNode(t)}return!1},_byParentId:function(e,t){var n,i,r=[],o=this.view();if(e===t)return[];for(i=0;i<o.length;i++)n=o.at(i),
n.parentId==e&&r.push(n);return r},_defaultParentId:function(){return this.reader.model.fn.defaults[this.reader.model.parentIdField]},childNodes:function(e){return this._byParentId(e.id,this._defaultParentId())},rootNodes:function(){return this._byParentId(this._defaultParentId())},parentNode:function(e){return this.get(e.parentId)},level:function(e){var t=-1;e instanceof xe||(e=this.get(e));do e=this.parentNode(e),t++;while(e);return t},filter:function(e){var n=S.fn.filter;return e===t?n.call(this,e):(n.call(this,e),t)}}),c.create=function(t){return e.isArray(t)?t={data:t}:t instanceof D&&(t={data:t.toJSON()}),t instanceof c?t:new c(t)},h=kendo.Observable.extend({init:function(e,t){kendo.Observable.fn.init.call(this),t=this.options=g(!0,{},this.options,t),this.element=e,this.bind(this.events,t),this.model=this.options.model,this.fields=this._fields(this.options.columns),this._initContainer(),this.createEditable()},events:[],_initContainer:function(){this.wrapper=this.element},createEditable:function(){var e=this.options;this.editable=new C.Editable(this.wrapper,{fields:this.fields,target:e.target,clearContainer:e.clearContainer,model:this.model})},_isEditable:function(e){return e.field&&this.model.editable(e.field)},_fields:function(e){var t,n,i,r=[];for(t=0,n=e.length;t<n;t++)i=e[t],this._isEditable(i)&&r.push({field:i.field,format:i.format,editor:i.editor});return r},end:function(){return this.editable.end()},close:function(){this.destroy()},destroy:function(){this.editable.destroy(),this.editable.element.find("["+kendo.attr("container-for")+"]").empty().end().removeAttr(kendo.attr("role")),this.model=this.wrapper=this.element=this.columns=this.editable=null}}),p=h.extend({init:function(e,t){h.fn.init.call(this,e,t),this._attachHandlers(),kendo.cycleForm(this.wrapper),this.open()},events:[J,G],options:{window:{modal:!0,resizable:!1,draggable:!0,title:"Edit",visible:!1}},_initContainer:function(){var t=this.options,n=[];this.wrapper=e('<div class="k-popup-edit-form"/>').attr(kendo.attr("uid"),this.model.uid).append('<div class="k-edit-form-container"/>'),t.template?(this._appendTemplate(n),this.fields=[]):this._appendFields(n),this._appendButtons(n),new v.Tree(this.wrapper.children()[0]).render(n),this.wrapper.appendTo(t.appendTo),this.window=new C.Window(this.wrapper,t.window)},_appendTemplate:function(e){var t=this.options.template;typeof t===B&&(t=window.unescape(t)),t=kendo.template(t)(this.model),e.push(k(t))},_appendFields:function(e){var t,n,i,r=this.options.columns;for(t=0,n=r.length;t<n;t++)i=r[t],i.command||(e.push(k('<div class="k-edit-label"><label for="'+i.field+'">'+(i.title||i.field||"")+"</label></div>")),e.push(this._isEditable(i)?k("<div "+kendo.attr("container-for")+'="'+i.field+'" class="k-edit-field"></div>'):_("div",{"class":"k-edit-field"},[this.options.fieldRenderer(i,this.model)])))},_appendButtons:function(e){e.push(_("div",{"class":"k-edit-buttons k-state-default"},this.options.commandRenderer()))},_attachHandlers:function(){var e=this._cancelProxy=I(this._cancel,this);this.wrapper.on(U+W,".k-grid-cancel",this._cancelProxy),this._saveProxy=I(this._save,this),this.wrapper.on(U+W,".k-grid-update",this._saveProxy),this.window.bind("close",function(t){t.userTriggered&&e(t)})},_dettachHandlers:function(){this._cancelProxy=null,this._saveProxy=null,this.wrapper.off(W)},_cancel:function(e){this.trigger(J,e)},_save:function(){this.trigger(G)},open:function(){this.window.center().open()},close:function(){this.window.bind("deactivate",I(this.destroy,this)).close()},destroy:function(){this.window.destroy(),this.window=null,this._dettachHandlers(),h.fn.destroy.call(this)}}),f=T.extend({init:function(t,n){if(T.fn.init.call(this,t,n),ke=kendo.support.isRtl(t),this._dataSource(this.options.dataSource),this._aria(),this._columns(),this._layout(),this._navigatable(),this._selectable(),this._sortable(),this._resizable(),this._filterable(),this._attachEvents(),this._toolbar(),this._scrollable(),this._reorderable(),this._columnMenu(),this._minScreenSupport(),this._draggable(),this.options.autoBind&&this.dataSource.fetch(),this._hasLockedColumns){var i=this;this.wrapper.addClass("k-grid-lockedcolumns"),this._resizeHandler=function(){i.resize()},e(window).on("resize"+W,this._resizeHandler)}kendo.notify(this)},_draggable:function(){var t=this.options.editable;t&&t.move&&(this._dragging=new kendo.ui.HierarchicalDragAndDrop(this.wrapper,{$angular:this.$angular,autoScroll:!0,filter:"tbody>tr",itemSelector:"tr",allowedContainers:this.wrapper,hintText:function(t){var n=function(){return e(this).text()},i="<span class='k-header k-drag-separator' />";return t.children("td").map(n).toArray().join(i)},contains:I(function(e,t){var n=this.dataItem(t),i=this.dataItem(e);return i==n||this.dataSource.contains(i,n)},this),itemFromTarget:function(e){var t=e.closest("tr");return{item:t,content:t}},dragstart:I(function(e){this.wrapper.addClass("k-treelist-dragging");var t=this.dataItem(e);return this.trigger(ue,{source:t})},this),drag:I(function(e){e.source=this.dataItem(e.source),this.trigger(ce,e)},this),drop:I(function(e){return e.source=this.dataItem(e.source),e.destination=this.dataItem(e.destination),this.wrapper.removeClass("k-treelist-dragging"),this.trigger(he,e)},this),dragend:I(function(e){var t=this.dataItem(e.destination),n=this.dataItem(e.source);n.set("parentId",t?t.id:null),e.source=n,e.destination=t,this.trigger(pe,e)},this),reorderable:!1,dropHintContainer:function(e){return e.children("td:eq(1)")},dropPositionFrom:function(e){return e.prevAll(".k-i-none").length>0?"after":"before"}}))},itemFor:function(e){return"number"==typeof e&&(e=this.dataSource.get(e)),this.tbody.find("["+kendo.attr("uid")+"="+e.uid+"]")},_scrollable:function(){var t,n,i;this.options.scrollable&&(t=this.thead.closest(".k-grid-header-wrap"),n=e(this.lockedContent).bind("DOMMouseScroll"+W+" mousewheel"+W,I(this._wheelScroll,this)),this.content.bind("scroll"+W,function(){t.scrollLeft(this.scrollLeft),n.scrollTop(this.scrollTop)}),i=kendo.touchScroller(this.content),i&&i.movable&&(this._touchScroller=i,i.movable.bind("change",function(e){t.scrollLeft(-e.sender.x),n&&n.scrollTop(-e.sender.y)})))},_wheelScroll:function(t){var n,i;t.ctrlKey||(n=kendo.wheelDeltaY(t),i=e(t.currentTarget),n&&(i[0].scrollHeight>i[0].clientHeight&&(i[0].scrollTop<i[0].scrollHeight-i[0].clientHeight&&n<0||i[0].scrollTop>0&&n>0)&&t.preventDefault(),i.one("wheel"+W,!1),this.content.scrollTop(this.content.scrollTop()+-n)))},_progress:function(){var e=this.options.messages;this.tbody.find("tr").length||this._showStatus(kendo.template("<span class='#= className #' /> #: messages.loading #")({className:we.icon+" "+we.loading,messages:e}))},_error:function(e){this.dataSource.rootNodes().length||this._render({error:e})},refresh:function(t){var n,i,r;t=t||{},"itemchange"==t.action&&this.editor||this.trigger(Q)||(n=e(this.current()),i=!1,this._cancelEditor(),this._render(),this._adjustHeight(),this.options.navigatable&&((this._isActiveInTable()||this.editor)&&(i=n.is("th"),r=Math.max(this.cellIndex(n),0)),this._restoreCurrent(r,i)),this.trigger(X))},_angularFooters:function(e){var t,n,i,r=this.dataSource.aggregates(),o=this._footerItems();for(t=0;t<o.length;t++)n=o.eq(t),i=r[n.attr("data-parentId")],this._angularFooter(e,n.find("td").get(),i)},_angularFooter:function(e,t,n){var i=this.columns;this.angular(e,function(){return{elements:t,data:R(i,function(e){return{column:e,aggregate:n&&n[e.field]}})}})},items:function(){return this._hasLockedColumns?this._items(this.tbody).add(this._items(this.lockedTable)):this._items(this.tbody)},_items:function(t){return t.find("tr").filter(function(){return!e(this).hasClass(we.footerTemplate)})},_footerItems:function(){var t=this.tbody;return this._hasLockedColumns&&(t=t.add(this.lockedTable)),t.find("tr").filter(function(){return e(this).hasClass(we.footerTemplate)})},dataItems:function(){var e,t,n,i=kendo.ui.DataBoundWidget.fn.dataItems.call(this);if(this._hasLockedColumns){for(e=i.length,t=Array(2*e),n=e;--n>=0;)t[n]=t[n+e]=i[n];i=t}return i},_showStatus:function(t){var n=this.element.find(".k-status"),i=e(this.content).add(this.lockedContent);n.length||(n=e("<div class='k-status' />").appendTo(this.element)),this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]),i.hide(),n.html(t)},_hideStatus:function(){this.element.find(".k-status").remove(),e(this.content).add(this.lockedContent).show()},_adjustHeight:function(){var e,t,n=this.element,i=n.find(V+we.gridContentWrap),r=n.find(V+we.gridHeader),o=n.find(V+we.gridToolbar),a=kendo.support.scrollbar();n.height(this.options.height),t=function(e){var t,n;return!!e[0].style.height||(t=e.height(),e.height("auto"),n=e.height(),e.height(""),t!=n)},t(n)&&(e=n.height()-x(r)-x(o),i.height(e),this._hasLockedColumns&&(a=this.table[0].offsetWidth>this.table.parent()[0].clientWidth?a:0,this.lockedContent.height(e-a)))},_resize:function(){this._applyLockedContainersWidth(),this._adjustHeight()},_minScreenSupport:function(){var t=this.hideMinScreenCols();t&&(this.minScreenResizeHandler=I(this.hideMinScreenCols,this),e(window).on("resize",this.minScreenResizeHandler))},hideMinScreenCols:function(){var e,n,i,r=this.columns,o=!1,a=window.innerWidth>0?window.innerWidth:screen.width;for(e=0;e<r.length;e++)n=r[e],i=n.minScreenWidth,i!==t&&null!==i&&(o=!0,i>a?this.hideColumn(n):this.showColumn(n));return o},destroy:function(){T.fn.destroy.call(this);var t=this.dataSource;t.unbind(P,this._refreshHandler),t.unbind(L,this._errorHandler),t.unbind(O,this._progressHandler),this._navigatableTables=null,this._current=null,this._resizeHandler&&e(window).off("resize"+W,this._resizeHandler),this._dragging&&(this._dragging.destroy(),this._dragging=null),this.resizable&&(this.resizable.destroy(),this.resizable=null),this.reorderable&&(this.reorderable.destroy(),this.reorderable=null),this._draggableInstance&&this._draggableInstance.element&&(this._draggableInstance.destroy(),this._draggableInstance=null),this.minScreenResizeHandler&&e(window).off("resize",this.minScreenResizeHandler),this._destroyEditor(),this.element.off(W),this._touchScroller&&this._touchScroller.destroy(),this._autoExpandable=null,this._refreshHandler=this._errorHandler=this._progressHandler=this._dataSourceFetchProxy=null,this.thead=this.content=this.tbody=this.table=this.element=this.lockedHeader=this.lockedContent=null,this._statusTree=this._headerTree=this._contentTree=this._lockedHeaderColsTree=this._lockedContentColsTree=this._lockedHeaderTree=this._lockedContentTree=null},options:{name:"TreeList",columns:[],autoBind:!0,scrollable:!0,selectable:!1,sortable:!1,toolbar:null,height:null,columnMenu:!1,messages:{noRows:"No records to display",loading:"Loading...",requestFailed:"Request failed.",retry:"Retry",commands:{edit:"Edit",update:"Update",canceledit:"Cancel",create:"Add new record",createchild:"Add child record",destroy:"Delete",excel:"Export to Excel",pdf:"Export to PDF"}},excel:{hierarchy:!0},resizable:!1,filterable:!1,editable:!1,reorderable:!1},events:[P,j,G,Y,$,K,Q,X,J,ue,ce,he,pe,ee,te,ne,re,oe,ae,se,le],_toggle:function(n,i){var r=e.Deferred().resolve().promise(),o=n.loaded();return n._error&&(n.expanded=!1,n._error=t),!o&&n.expanded?r:(t===i&&(i=!n.expanded),n.expanded=i,o||(r=this.dataSource.load(n).always(I(function(){this._render(),this._syncLockedContentHeight()},this))),this._render(),this._syncLockedContentHeight(),r)},expand:function(e){return this._toggle(this.dataItem(e),!0)},collapse:function(e){return this._toggle(this.dataItem(e),!1)},_toggleChildren:function(t){var n=e(t.currentTarget),i=this.dataItem(n),r=i.expanded?K:$;this.trigger(r,{model:i})||this._toggle(i),t.preventDefault()},_navigatable:function(){var t,n,i=this;i.options.navigatable&&(t=i.table.add(i.lockedTable),n=i.thead.parent().add(e(">table",i.lockedHeader)),i.options.scrollable&&(t=t.add(n),n.attr(Z,-1)),this._navigatableTables=t,t.on(kendo.support.touch?"touchstart"+W:"mousedown"+W,fe+">:visible",I(i._tableClick,i)).on("focus"+W,I(i._tableFocus,i)).on("focusout"+W,I(i._tableBlur,i)).on("keydown"+W,I(i._tableKeyDown,i)))},cellIndex:function(t){var n=0;return this.lockedTable&&!e.contains(this.lockedTable[0],t[0])&&(n=this.lockedColumns(this.columns).length),e(t).parent().children("td:visible").index(t)+n},_isActiveInTable:function(){var t=kendo._activeElement();return!!t&&(this.table[0]===t||e.contains(this.table[0],t)||this.lockedTable&&(this.lockedTable[0]===t||e.contains(this.lockedTable[0],t)))},_restoreCurrent:function(n,i){var r,o,a;n===t||n<0||(this._current&&this._current.removeClass("k-state-focused"),i?this.current(this.thead.find("th").eq(n)):(r=0,n=0,o=e(),this.lockedTable&&(o=this.lockedTable.find(">tbody>tr:visible").eq(r)),o=o.add(this.tbody.children().eq(r)),a=o.find(">td:visible").eq(n),this.current(a)),this._current&&u(this._current.closest("table")[0],!0))},current:function(t){var n=this._current;return t=e(t),!t.length||n&&n[0]===t[0]||(this._updateCurrentAttr(n,t),this._scrollCurrent()),this._current},_scrollCurrent:function(){var t,n,i,r,o,a=this._current,s=this.options.scrollable;a&&s&&(t=a.parent(),n=t.closest("table").parent(),i=n.is(".k-grid-content-locked,.k-grid-header-locked"),r=n.is(".k-grid-content-locked,.k-grid-content"),o=e(this.content)[0],r&&this._scrollTo(this._relatedRow(t)[0],o),this.lockedContent&&(this.lockedContent[0].scrollTop=o.scrollTop),i||this._scrollTo(a[0],o))},_scrollTo:function(t,n){var i,r=t.tagName.toLowerCase(),o="td"===r||"th"===r,a=t[o?"offsetLeft":"offsetTop"],s=t[o?"offsetWidth":"offsetHeight"],l=n[o?"scrollLeft":"scrollTop"],d=n[o?"clientWidth":"clientHeight"],u=a+s,c=0,h=0,p=0;ke&&o&&(i=e(t).closest("table")[0],A.msie?h=i.offsetLeft:A.mozilla&&(p=i.offsetLeft-kendo.support.scrollbar())),l=Math.abs(l+h-p),c=l>a?a:u>l+d?s<=d?u-d:a:l,c=Math.abs(c+h)+p,n[o?"scrollLeft":"scrollTop"]=c},_aria:function(){var e=this.element.attr("id")||"aria";e&&(this._elementId=e+"_active_element")},_verticalContainer:function(e,t){var n=this._navigatableTables.length,i=Math.floor(n/2),r=z(e[0],this._navigatableTables);return t&&(i*=-1),r+=i,(r>=0||r<n)&&(e=this._navigatableTables.eq(r)),e.find(t?"thead":"tbody")},_updateCurrentAttr:function(t,n){var i=e(t).data("headerId");e(t).removeClass(we.focused).closest("table").removeAttr("aria-activedescendant"),i?(i=i.replace(this._elementId,""),e(t).attr("id",i)):e(t).removeAttr("id"),n.data("headerId",n.attr("id")).attr("id",this._elementId).addClass(we.focused).closest("table").attr("aria-activedescendant",this._elementId),this._current=n},_tableKeyDown:function(t){var n=!1,i=this.current(),r=e(t.target),o=!t.isDefaultPrevented()&&!r.is(":button,a,:input,a>.k-icon");i=i?i:e(this.lockedTable).add(this.table).find(ve),o&&t.keyCode==y.UP&&(n=this._moveUp(i)),o&&t.keyCode==y.DOWN&&(n=this._moveDown(i)),o&&t.keyCode==(ke?y.LEFT:y.RIGHT)&&(n=t.altKey?this._handleExpand(i):this._moveRight(i)),o&&t.keyCode==(ke?y.RIGHT:y.LEFT)&&(n=t.altKey?this._handleCollapse(i):this._moveLeft(i)),t.keyCode!=y.ENTER&&t.keyCode!=y.F2||(n=this._handleEnterKey(i,t.currentTarget,r)),t.keyCode==y.ESC&&(n=this._handleEscKey(i,t.currentTarget)),o&&t.keyCode==y.HOME&&(n=this._handleHome(i,t.ctrlKey)),o&&t.keyCode==y.END&&(n=this._handleEnd(i,t.ctrlKey)),n&&(t.preventDefault(),t.stopPropagation())},_handleExpand:function(e){var t=e.parent();return!e.hasClass("k-header")&&(this.expand(t),!0)},_handleCollapse:function(e){var t=e.parent();return!e.hasClass("k-header")&&(this.collapse(t),!0)},_handleHome:function(e,t){var n,i=e.parent(),r=i.parent(),o=this.lockedTable&&this.lockedTable.children("tbody")[0]===r[0],a=r[0]===this.tbody[0];if(t?n=this.lockedTable?this.lockedTable.find(ve):this.table.find(ve):(a||o)&&(a&&this.lockedTable&&(i=this._relatedRow(i)),n=i.children(me+":first")),n&&n.length)return this.current(n),!0},_handleEnd:function(e,t){var n,i=e.parent(),r=i.parent(),o=this.lockedTable&&this.lockedTable.children("tbody")[0]===r[0],a=r[0]===this.tbody[0];if(t?n=this.table.find(_e+">"+me+":last"):(a||o)&&(!a&&this.lockedTable&&(i=this._relatedRow(i)),n=i.children(me+":last")),n&&n.length)return this.current(n),!0},_handleEscKey:function(t,n){var i,r=kendo._activeElement();return t&&t.parent().hasClass("k-grid-edit-row")?(i=e(t).parent().index(),r&&r.blur(),this.cancelRow(),i>=0&&this.current(this.items().eq(i).children(me).first()),A.msie&&A.version<9&&document.body.focus(),u(n,!0),!0):!!t.has(r).length&&(u(n,!0),!0)},_handleEnterKey:function(t,n,i){var r,o=this.options.editable,a=i.closest("[role=gridcell]");return i.is("table")||e.contains(t[0],i[0])||(t=a),t.is("th")?(t.find(".k-link").click(),!0):(r=t.find(":kendoFocusable:first"),r[0]&&t.hasClass("k-state-focused")?(r.focus(),!0):!(!o||i.is(":button,.k-button,textarea"))&&(a[0]||(a=t),this._handleEditing(a,!1,n),!0))},_handleEditing:function(n,i,r){var o,a,s,l,d=this,c=e(kendo._activeElement()),h=A.msie;if(r=e(r),s=n.parent().hasClass("k-grid-edit-row"),d.editor){if(o=d.editor.wrapper,o&&e.contains(o[0],c[0])&&(A.opera?c.blur().change().triggerHandler("blur"):(c.blur(),h&&c.blur())),!d.editor)return u(r),t;if(!d.editor.end())return d.current(o.children().filter(me).first()),a=o.find(":kendoFocusable:first")[0],a&&a.focus(),t;d.saveRow(),s=!0}i&&d.current(i),u(r,!0),d.options.editable&&(!s&&!i||i)&&(l=d.current().index(),d.editRow(d.current().parent()),d.current(d.editor.wrapper.children().eq(l)),d.current().removeClass("k-state-focused"))},_moveRight:function(e){var t=e.nextAll(me).first(),n=e.parent();return e.hasClass("k-header")&&(t=e.next(ge),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.lockedHeader.find("table")[0]&&(t=this.thead.find(ge+":first"))),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.lockedTable[0]&&(t=this._relatedRow(n).children(me).first()),t[0]&&t[0]!==e[0]&&u(t.closest("table"),!0),this.current(t),!0},_moveLeft:function(e){var t=e.prevAll(me).first(),n=e.parent();return e.hasClass("k-header")&&(t=e.prev(ge),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.thead.parent()[0]&&(t=this.lockedHeader.find(">table>thead>tr>"+ge+":last"))),!t[0]&&this.lockedTable&&e.closest("table")[0]===this.table[0]&&(t=this._relatedRow(n).children(me).last()),t[0]&&t[0]!==e[0]&&u(t.closest("table"),!0),this.current(t),!0},_moveUp:function(e){var t,n,i=e.parent(),r=i.prevAll(fe+":first");return r[0]?t=r.children().eq(e.index()):(n=this._verticalContainer(e.closest("table"),!0),t=n.find(be).eq(e.siblings(":visible").addBack().index(e)),t[0]&&u(t.closest("table"),!0)),this.current(t),!0},_moveDown:function(e){var t,n,i=e.parent(),r=i.nextAll(fe+":first");return r[0]?t=r.children().eq(e.index()):(n=this._verticalContainer(e.closest("table")),t=n.find(me).eq(e.siblings(":visible").addBack().index(e)),t[0]&&u(t.closest("table"),!0)),this.current(t),!0},_tableClick:function(t){var n=e(t.currentTarget),i=n.is("th"),r=this.table.add(this.lockedTable),o=this.thead.parent().add(e(">table",this.lockedHeader)),a=d(t.target),s=n.closest("table")[0];kendo.support.touch||s!==r[0]&&s!==r[1]&&s!==o[0]&&s!==o[1]||(this.options.navigatable&&this.current(n),!i&&a||setTimeout(function(){d(kendo._activeElement())&&e.contains(s,kendo._activeElement())||u(s,!0)}),i&&t.preventDefault())},_setTabIndex:function(e){this._navigatableTables.attr(Z,-1),e.attr(Z,0)},_tableFocus:function(t){var n=this.current(),i=e(t.currentTarget);n&&n.is(":visible")?n.addClass(we.focused):this.current(i.find(ve)),this._setTabIndex(i)},_tableBlur:function(){var e=this.current();e&&e.removeClass(we.focused)},_attachEvents:function(){var e=V+we.iconCollapse+", ."+we.iconExpand+", ."+we.refresh,t=V+we.retry;this.element.on(q+W,e,I(this._toggleChildren,this)).on(U+W,t,this._dataSourceFetchProxy).on(U+W,".k-button[data-command]",I(this._commandClick,this))},_commandByName:function(t){var n,i,r,o,a=this.columns,s=e.isArray(this.options.toolbar)?this.options.toolbar:[];if(t=t.toLowerCase(),ye[t])return ye[t];for(n=0;n<a.length;n++)if(r=a[n].command)for(i=0;i<r.length;i++)if(o=r[i].name,o&&o.toLowerCase()==t)return r[i];for(n=0;n<s.length;n++)if(o=s[n].name,o&&o.toLowerCase()==t)return s[n]},_commandClick:function(n){var i=e(n.currentTarget),r=i.attr("data-command"),o=this._commandByName(r),a=i.parentsUntil(this.wrapper,"tr");a=a.length?a:t,o&&(o.methodName?this[o.methodName](a):o.click&&o.click.call(this,n),n.preventDefault())},_ensureExpandableColumn:function(){var e,t;this._autoExpandable&&delete this._autoExpandable.expandable,e=M(this.columns,i(n("hidden"))),t=M(e,n("expandable")),this.columns.length&&!t.length&&(this._autoExpandable=e[0],e[0].expandable=!0)},_columns:function(){var e,t=this.options.columns||[];this.columns=R(t,function(e){return e="string"==typeof e?{field:e}:e,g({encoded:!0},e)}),e=this._lockedColumns(),e.length>0&&(this._hasLockedColumns=!0,this.columns=e.concat(this._nonLockedColumns())),this._ensureExpandableColumn(),this._columnTemplates(),this._columnAttributes()},_columnTemplates:function(){var e,t,n,i=this.columns;for(e=0,t=i.length;e<t;e++)n=i[e],n.template&&(n.template=kendo.template(n.template)),n.headerTemplate&&(n.headerTemplate=kendo.template(n.headerTemplate)),n.footerTemplate&&(n.footerTemplate=kendo.template(n.footerTemplate))},_columnAttributes:function(){function t(t){var n,i,r,o;if(t&&t.style)for(n=t.style.split(";"),t.style={},i=0;i<n.length;i++)r=n[i].split(":"),o=e.trim(r[0]),o&&(t.style[e.camelCase(o)]=e.trim(r[1]))}var n,i,r=this.columns;for(n=0,i=r.length;n<i;n++)t(r[n].attributes),t(r[n].headerAttributes)},_layout:function(){var e,t,n,i=this.columns,r=this.element,o="";this.wrapper=r.addClass(we.wrapper),o="<div class='#= gridHeader #'>",this._hasLockedColumns&&(o+="<div class='k-grid-header-locked'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div>"),o+="<div class='#= gridHeaderWrap #'><table role='grid'><colgroup></colgroup><thead role='rowgroup' /></table></div></div>",this._hasLockedColumns&&(o+="<div class='k-grid-content-locked'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>"),o+="<div class='#= gridContentWrap # k-auto-scrollable'><table role='treegrid' tabindex='0'><colgroup></colgroup><tbody /></table></div>",this.options.scrollable||(o="<table role='treegrid' tabindex='0'><colgroup></colgroup><thead class='#= gridHeader #' role='rowgroup' /><tbody /></table>"),this.options.toolbar&&(o="<div class='#= header # #= gridToolbar #' />"+o),r.append(kendo.template(o)(we)+"<div class='k-status' />"),this.toolbar=r.find(V+we.gridToolbar),e=r.find(V+we.gridHeader).find("thead").addBack().filter("thead"),this.thead=e.last(),this.options.scrollable&&(t=kendo.support.isRtl(r),r.find("div."+we.gridHeader).css(t?"padding-left":"padding-right",kendo.support.scrollbar())),n=r.find(V+we.gridContentWrap),n.length?this.content=n:n=r,this.table=n.find(">table"),this.tbody=this.table.find(">tbody"),this._hasLockedColumns&&(this.lockedHeader=e.first().closest(".k-grid-header-locked"),this.lockedContent=r.find(".k-grid-content-locked"),this.lockedTable=this.lockedContent.children()),this._initVirtualTrees(),this._renderCols(),this._renderHeader(),this.angular("compile",function(){return{elements:e.find("th.k-header").get(),data:R(i,function(e){return{column:e}})}})},_initVirtualTrees:function(){this._headerColsTree=new v.Tree(this.thead.prev()[0]),this._contentColsTree=new v.Tree(this.tbody.prev()[0]),this._headerTree=new v.Tree(this.thead[0]),this._contentTree=new v.Tree(this.tbody[0]),this._statusTree=new v.Tree(this.element.children(".k-status")[0]),this.lockedHeader&&(this._lockedHeaderColsTree=new v.Tree(this.lockedHeader.find("colgroup")[0]),this._lockedContentColsTree=new v.Tree(this.lockedTable.find(">colgroup")[0]),this._lockedHeaderTree=new v.Tree(this.lockedHeader.find("thead")[0]),this._lockedContentTree=new v.Tree(this.lockedTable.find(">tbody")[0]))},_toolbar:function(){var t,n=this.options.toolbar,i=this.toolbar;n&&(e.isArray(n)?(t=this._buildCommands(n),new v.Tree(i[0]).render(t)):i.append(kendo.template(n)({})),this.angular("compile",function(){return{elements:i.get()}}))},_lockedColumns:function(){return M(this.columns,n("locked"))},_nonLockedColumns:function(){return M(this.columns,i(n("locked")))},_templateColumns:function(){return M(this.columns,n("template"))},_flushCache:function(){this.options.$angular&&this._templateColumns().length&&(this._contentTree.render([]),this._hasLockedColumns&&this._lockedContentTree.render([]))},_render:function(t){var n,i,r,o;t=t||{},n=this.options.messages,i=this.dataSource.rootNodes(),r=kendo.attr("uid"),o=this.select().removeClass("k-state-selected").map(function(t,n){return e(n).attr(r)}),this._absoluteIndex=0,this._angularItems("cleanup"),this._angularFooters("cleanup"),this._flushCache(),t.error?this._showStatus(kendo.template("#: messages.requestFailed # <button class='#= buttonClass #'>#: messages.retry #</button>")({buttonClass:[we.button,we.retry].join(" "),messages:n})):i.length?(this._hideStatus(),this._contentTree.render(this._trs({columns:this._nonLockedColumns(),aggregates:t.aggregates,selected:o,data:i,visible:!0,level:0})),this._hasLockedColumns&&(this._absoluteIndex=0,this._lockedContentTree.render(this._trs({columns:this._lockedColumns(),aggregates:t.aggregates,selected:o,data:i,visible:!0,level:0})))):this._showStatus(kendo.htmlEncode(n.noRows)),this._touchScroller&&this._touchScroller.contentResized(),this._muteAngularRebind(function(){this._angularItems("compile"),this._angularFooters("compile")}),this.items().filter(function(){return e.inArray(e(this).attr(r),o)>=0}).addClass("k-state-selected"),this._adjustRowsHeight()},_adjustRowsHeight:function(){var e,t,n,i,r,o,a,s,l,d,u,c,h,p;if(this._hasLockedColumns){for(e=this.table,t=this.lockedTable,n=e[0].rows,i=n.length,o=t[0].rows,a=e.add(t),s=a.length,l=[],d=this.lockedHeader.find("tr"),u=this.thead.find("tr"),d.add(u).height("auto").height(Math.max(d.height(),u.height())),r=0;r<i&&o[r];r++)n[r].style.height&&(n[r].style.height=o[r].style.height="");for(r=0;r<i&&o[r];r++)c=n[r].offsetHeight,h=o[r].offsetHeight,p=0,c>h?p=c:c<h&&(p=h),l.push(p);for(r=0;r<s;r++)a[r].style.display="none";for(r=0;r<i;r++)l[r]&&(n[r].style.height=o[r].style.height=l[r]+1+"px");for(r=0;r<s;r++)a[r].style.display=""}},_ths:function(e){var t,n,i,r,o,a,s,l,d=[];for(s=0,l=e.length;s<l;s++)t=e[s],i=[],r=[we.header],n=t.headerTemplate?t.headerTemplate({}):t.title||t.field||"",a=t.headerTemplate?k(n):b(n),i.push(t.sortable?_("a",{href:"#",className:we.link},[a]):a),o={"data-field":t.field,"data-title":t.title,style:t.hidden===!0?{display:"none"}:{},className:r.join(" "),role:"columnheader"},o=g(!0,{},o,t.headerAttributes),d.push(_("th",o,i));return d},_cols:function(e){var t,n,i,r=[];for(i=0;i<e.length;i++)e[i].hidden!==!0&&(t=e[i].width,n={},t&&0!==parseInt(t,10)&&(n.style={width:"string"==typeof t?t:t+"px"}),r.push(_("col",n)));return r},_renderCols:function(){var e=this._nonLockedColumns();this._headerColsTree.render(this._cols(e)),this.options.scrollable&&this._contentColsTree.render(this._cols(e)),this._hasLockedColumns&&(e=this._lockedColumns(),this._lockedHeaderColsTree.render(this._cols(e)),this._lockedContentColsTree.render(this._cols(e)))},_renderHeader:function(){var e=this._nonLockedColumns();this._headerTree.render([_("tr",{role:"row"},this._ths(e))]),this._hasLockedColumns&&(e=this._lockedColumns(),this._lockedHeaderTree.render([_("tr",{role:"row"},this._ths(e))]),this._applyLockedContainersWidth())},_applyLockedContainersWidth:function(){var e,t,n,i,r,o;this._hasLockedColumns&&(e=s(this.lockedHeader.find(">table>colgroup>col")),t=this.thead.parent(),n=s(t.find(">colgroup>col")),i=this.wrapper[0].clientWidth,r=kendo.support.scrollbar(),e>=i&&(e=i-3*r),this.lockedHeader.add(this.lockedContent).width(e),t.add(this.table).width(n),o=i-e-2,this.content.width(o),t.parent().width(o-r))},_trs:function(t){var n,i,r,o,a,s,l,d=[],u=t.level,c=t.data,h=this.dataSource,p=h.aggregates()||{},f=t.columns;for(s=0,l=c.length;s<l;s++)r=[],n=c[s],a=n.loaded()&&h.childNodes(n),o=a&&a.length,i={role:"row"},i[kendo.attr("uid")]=n.uid,o&&(i["aria-expanded"]=!!n.expanded),t.visible?(this._absoluteIndex%2!==0&&r.push(we.alt),this._absoluteIndex++):i.style={display:"none"},e.inArray(n.uid,t.selected)>=0&&r.push(we.selected),o&&r.push(we.group),n._edit&&r.push("k-grid-edit-row"),i.className=r.join(" "),d.push(this._tds({model:n,attr:i,level:u},f,I(this._td,this))),o&&(d=d.concat(this._trs({columns:f,aggregates:p,selected:t.selected,visible:t.visible&&!!n.expanded,data:a,level:u+1})));return this._hasFooterTemplate()&&(i={className:we.footerTemplate,"data-parentId":n.parentId},t.visible||(i.style={display:"none"}),d.push(this._tds({model:p[n.parentId],attr:i,level:u},f,this._footerTd))),d},_footerTd:function(t){var n=[],i=t.column,r=t.column.footerTemplate||e.noop,o=t.model[i.field]||{},s={role:"gridcell",style:i.hidden===!0?{display:"none"}:{}};return i.expandable&&(n=n.concat(a({level:t.level+1,className:we.iconPlaceHolder}))),i.attributes&&g(s,i.attributes),n.push(k(r(o)||"")),_("td",s,n)},_hasFooterTemplate:function(){return!!M(this.columns,function(e){return e.footerTemplate}).length},_tds:function(e,t,n){var i,r,o,a=[];for(r=0,o=t.length;r<o;r++)i=t[r],a.push(n({model:e.model,column:i,level:e.level}));return _("tr",e.attr,a)},_td:function(e){var t,n=[],i=e.model,r=e.column,o={role:"gridcell",style:r.hidden===!0?{display:"none"}:{}};return r.attributes&&g(!0,o,r.attributes),i._edit&&r.field&&i.editable(r.field)?o[kendo.attr("container-for")]=r.field:(r.expandable&&(n=a({level:e.level,className:we.iconPlaceHolder}),t=[we.icon],t.push(i.hasChildren?i.expanded?we.iconCollapse:we.iconExpand:we.iconHidden),i._error?t.push(we.refresh):!i.loaded()&&i.expanded&&t.push(we.loading),n.push(_("span",{className:t.join(" ")})),o.style["white-space"]="nowrap"),r.command?(o.className&&o.className.indexOf("k-command-cell")!==-1?o.className+=" k-command-cell":o.className||(o.className="k-command-cell"),n=this._buildCommands(i._edit?["update","canceledit"]:r.command)):n.push(this._cellContent(r,i))),_("td",o,n)},_cellContent:function(e,n){var i;return e.template?i=e.template(n):e.field&&(i=n.get(e.field),null!==i&&e.format&&(i=kendo.format(e.format,i))),null!==i&&t!==i||(i=""),e.template||!e.encoded?k(i):b(i)},_buildCommands:function(e){var t,n=[];for(t=0;t<e.length;t++)n.push(this._button(e[t]));return n},_button:function(e){var t=(e.name||e).toLowerCase(),n=this.options.messages.commands[t],i=[];return e=g({},ye[t],{text:n},e),e.imageClass&&i.push(_("span",{className:["k-icon",e.imageClass].join(" ")})),_("button",{type:"button","data-command":t,className:["k-button k-button-icontext",e.className].join(" ")},i.concat([b(e.text||e.name)]))},_positionResizeHandle:function(n){var i,r,o,a=e(n.currentTarget),s=this.resizeHandle,l=a.position(),d=l.left,u=w(a),c=a.closest("div"),h=n.clientX+e(window).scrollLeft(),p=this.options.columnResizeHandleWidth||3;return d+=c.scrollLeft(),s||(s=this.resizeHandle=e('<div class="k-resize-handle"><div class="k-resize-handle-inner" /></div>')),i=a.offset().left+u,(r=h>i-p&&h<i+p)?(c.append(s),s.show().css({top:l.top,left:d+u-p-1,height:x(a),width:3*p}).data("th",a),o=this,s.off("dblclick"+W).on("dblclick"+W,function(){var t=a.index();e.contains(o.thead[0],a[0])&&(t+=M(o.columns,function(e){return e.locked&&!e.hidden}).length),o.autoFitColumn(t)}),t):(s.hide(),t)},autoFitColumn:function(t){var n,i,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,y=this,x=y.options,C=y.columns,T=kendo.support.browser,S=y.lockedHeader?o(y.lockedHeader.find(">table>thead")).filter(r).length:0;if(t="number"==typeof t?C[t]:H(t)?M(C,function(e){return e===t})[0]:M(C,function(e){return e.field===t})[0],t&&!t.hidden){for(n=z(t,C),s=t.locked,a=s?y.lockedHeader.children("table"):y.thead.parent(),i=a.find("[data-index='"+n+"']"),d=s?y.lockedTable:y.table,u=y.footer||e(),y.footer&&y.lockedContent&&(u=y.footer.children(s?".k-grid-footer-locked":".k-grid-footer-wrap")),c=u.find("table").first(),
y.lockedHeader&&S>=n&&!s&&(n-=S),h=0;h<C.length&&C[h]!==t;h++)C[h].hidden&&n--;if(l=x.scrollable?a.find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")").add(d.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")")).add(c.find("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")")):d.children("colgroup").find("col:not(.k-group-col):not(.k-hierarchy-col):eq("+n+")"),p=a.add(d).add(c),f=w(i),l.width(""),p.css("table-layout","fixed"),l.width("auto"),p.addClass("k-autofitting"),p.css("table-layout",""),m=Math.ceil(Math.max(w(i),w(d.find("tr").eq(0).children("td:visible").eq(n)),w(c.find("tr").eq(0).children("td:visible").eq(n)))),l.width(m),t.width=m,x.scrollable){for(g=a.find("col"),_=0,b=0,k=g.length;b<k;b+=1){if(v=g[b].style.width,!v||v.indexOf("%")!=-1){_=0;break}_+=parseInt(v,10)}_&&p.each(function(){this.style.width=_+"px"})}T.msie&&8==T.version&&(p.css("display","inline-table"),setTimeout(function(){p.css("display","table")},1)),p.removeClass("k-autofitting"),y.trigger(oe,{column:t,oldWidth:f,newWidth:m}),y._applyLockedContainersWidth(),y._syncLockedContentHeight(),y._syncLockedHeaderHeight()}},_adjustLockedHorizontalScrollBar:function(){var e=this.table,t=e.parent(),n=e[0].offsetWidth>t[0].clientWidth?kendo.support.scrollbar():0;this.lockedContent.height(t.height()-n)},_syncLockedContentHeight:function(){this.lockedTable&&(this._touchScroller||this._adjustLockedHorizontalScrollBar(),this._adjustRowsHeight(this.table,this.lockedTable))},_syncLockedHeaderHeight:function(){var e,t;this.lockedHeader&&(e=this.lockedHeader.children("table"),t=this.thead.parent(),this._adjustRowsHeight(e,t),l(e,t))},_resizable:function(){if(this.options.resizable){this.resizable&&this.resizable.destroy();var t=this;e(this.lockedHeader).find("thead").add(this.thead).on("mousemove"+W,"th",e.proxy(this._positionResizeHandle,this)),this.resizable=new kendo.ui.Resizable(this.wrapper,{handle:".k-resize-handle",start:function(n){var i,r,o=e(n.currentTarget).data("th"),a="col:eq("+e.inArray(o[0],o.parent().children().filter(":visible"))+")";t.wrapper.addClass("k-grid-column-resizing"),t.lockedHeader&&e.contains(t.lockedHeader[0],o[0])?(i=t.lockedHeader,r=t.lockedTable):(i=t.thead.parent(),r=t.table),this.col=r.children("colgroup").find(a).add(i.find(a)),this.th=o,this.startLocation=n.x.location,this.columnWidth=w(o),this.table=this.col.closest("table"),this.totalWidth=this.table.width()},resize:function(e){var t=11,n=e.x.location-this.startLocation;this.columnWidth+n<t&&(n=t-this.columnWidth),this.table.width(this.totalWidth+n),this.col.width(this.columnWidth+n)},resizeend:function(){var e,n,i;t.wrapper.removeClass("k-grid-column-resizing"),e=this.th.attr("data-field"),n=M(t.columns,function(t){return t.field==e}),i=Math.floor(w(this.th)),n[0].width=i,t._resize(),t._adjustRowsHeight(),t.trigger(oe,{column:n,oldWidth:this.columnWidth,newWidth:i}),this.table=this.col=this.th=null}})}},_sortable:function(){var t,n,i,r,o,a=this.columns,s=e(this.lockedHeader).add(this.thead).find("th"),l=kendo.attr("field"),d=this.options.sortable;if(d)for(r=0,o=s.length;r<o;r++)t=a[r],t.sortable!==!1&&!t.command&&t.field&&(i=s.eq(r),n=i.data("kendoColumnSorter"),n&&n.destroy(),i.attr(l,t.field).kendoColumnSorter(g({},d,t.sortable,{dataSource:this.dataSource})))},_filterable:function(){var t,n,i,r,o,a,s=e(this.lockedHeader).add(this.thead).find("th"),l=this.options.filterable;if(l&&!this.options.columnMenu)for(a=I(function(e){this.trigger(ee,{field:e.field,container:e.container})},this),t=0,n=s.length;t<n;t++)i=this.columns[t],r=s.eq(t),o=r.data("kendoFilterMenu"),o&&o.destroy(),i.command||i.filterable===!1||r.kendoFilterMenu(g(!0,{},l,i.filterable,{dataSource:this.dataSource,init:a}))},_change:function(){this.trigger(P)},_isLocked:function(){return null!==this.lockedHeader},_selectable:function(){var n,i,r,o,a=this,s=this.options.selectable,l=this.table,d=a._isLocked();s&&(s=kendo.ui.Selectable.parseOptions(s),this._hasLockedColumns&&(l=l.add(this.lockedTable),i=s.multiple&&s.cell),n=">tbody>tr:not(.k-footer-template)",s.cell&&(n+=">td"),this.selectable=new kendo.ui.Selectable(l,{filter:n,aria:!0,multiple:s.multiple,change:I(this._change,this),useAllItems:i,continuousItems:I(this._continuousItems,this,n,s.cell),relatedTarget:!s.cell&&this._hasLockedColumns?I(this._selectableTarget,this):t}),a.options.navigatable&&(r=s.multiple,o=s.cell,l.on("keydown"+W,function(n){var i=a.current(),s=n.target;if(n.keyCode===y.SPACEBAR&&!n.shiftKey&&e.inArray(s,l)>-1&&!i.is(".k-header")){if(n.preventDefault(),n.stopPropagation(),i=o?i:i.parent(),d&&!o&&(i=i.add(a._relatedRow(i))),r)if(n.ctrlKey){if(i.hasClass(we.selected))return i.removeClass(we.selected),a.trigger(P),t}else a.selectable.clear();else a.selectable.clear();o||(a.selectable._lastActive=i),a.selectable.value(i)}else!o&&(n.shiftKey&&n.keyCode==y.LEFT||n.shiftKey&&n.keyCode==y.RIGHT||n.shiftKey&&n.keyCode==y.UP||n.shiftKey&&n.keyCode==y.DOWN||n.keyCode===y.SPACEBAR&&n.shiftKey)&&(n.preventDefault(),n.stopPropagation(),i=i.parent(),d&&(i=i.add(a._relatedRow(i))),r?(a.selectable._lastActive||(a.selectable._lastActive=i),a.selectable.selectRange(a.selectable._firstSelectee(),i)):(a.selectable.clear(),a.selectable.value(i)))})))},_continuousItems:function(t,n){var i,r,o,a,s,l;if(this.lockedContent){for(i=e(t,this.lockedTable),r=e(t,this.table),o=n?this._lockedColumns().length:1,a=n?this.columns.length-o:1,s=[],l=0;l<i.length;l+=o)N.apply(s,i.slice(l,l+o)),N.apply(s,r.splice(0,a));return s}},_selectableTarget:function(t){var n,i,r,o=e();for(i=0,r=t.length;i<r;i++)n=this._relatedRow(t[i]),z(n[0],t)<0&&(o=o.add(n));return o},_relatedRow:function(t){var n,i,r=this.lockedTable;return t=e(t),r?(n=t.closest(this.table.add(this.lockedTable)),i=n.find(">tbody>tr").index(t),n=n[0]===this.table[0]?r:this.table,n.find(">tbody>tr").eq(i)):t},select:function(n){var i=this.selectable;return i?(t!==n&&(i.options.multiple||(i.clear(),n=n.first()),this._hasLockedColumns&&(n=n.add(e.map(n,I(this._relatedRow,this))))),i.value(n)):e()},clearSelection:function(){var e=this.select();e.length&&(this.selectable.clear(),this.trigger(P))},_dataSource:function(e){var t=this.dataSource;t&&(t.unbind(P,this._refreshHandler),t.unbind(L,this._errorHandler),t.unbind(O,this._progressHandler)),this._refreshHandler=I(this.refresh,this),this._errorHandler=I(this._error,this),this._progressHandler=I(this._progress,this),t=this.dataSource=c.create(e),t.bind(P,this._refreshHandler),t.bind(L,this._errorHandler),t.bind(O,this._progressHandler),this._dataSourceFetchProxy=I(function(){this.dataSource.fetch()},this)},setDataSource:function(e){this._dataSource(e),this._sortable(),this._filterable(),this._contentTree.render([]),this.options.autoBind&&this.dataSource.fetch()},dataItem:function(t){var n,i;return t instanceof xe?t:(n=e(t).closest("tr"),i=this.dataSource.getByUid(n.attr(kendo.attr("uid"))))},editRow:function(e){var t;typeof e===B&&(e=this.tbody.find(e)),t=this.dataItem(e),t&&("popup"!=this._editMode()&&(t._edit=!0),this._cancelEditor(),this._render(),this._createEditor(t),this.trigger(j,{container:this.editor.wrapper,model:t}))},_cancelEdit:function(t){if(this.editor){var n;t=g(t,{container:this.editor.wrapper,model:this.editor.model}),this.trigger(J,t)||(this.options.navigatable&&(n=this.items().index(e(this.current()).parent())),this.cancelRow(),this.options.navigatable&&(this.current(this.items().eq(n).children().filter(me).first()),u(this.table,!0)))}},cancelRow:function(){this._cancelEditor(),this._render()},saveRow:function(){var e,t=this.editor;t&&(e={model:t.model,container:t.wrapper},t.end()&&!this.trigger(G,e)&&this.dataSource.sync())},addRow:function(e){var n=this.editor,i=0,r={};if(!n||n.end())return e?(e instanceof xe||(e=this.dataItem(e)),r[e.parentIdField]=e.id,i=this.dataSource.indexOf(e)+1,this.expand(e).then(I(this._insertAt,this,r,i)),t):(this._insertAt(r,i),t)},_insertAt:function(e,t){e=this.dataSource.insert(t,e);var n=this.itemFor(e);this.editRow(n)},removeRow:function(e){var t=this.dataItem(e),n={model:t,row:e};t&&!this.trigger(Y,n)&&(this.dataSource.remove(t),this.dataSource.sync())},_cancelEditor:function(){var e,t=this.editor;t&&(e=t.model,this._destroyEditor(),this.dataSource.cancelChanges(e),e._edit=!1)},_destroyEditor:function(){this.editor&&(this.editor.close(),this.editor=null)},_createEditor:function(e){var t,n,i=this.itemFor(e);i=i.add(this._relatedRow(i)),t=this._editMode(),n={columns:this.columns,model:e,target:this,clearContainer:!1,template:this.options.editable.template},"inline"==t?this.editor=new h(i,n):(g(n,{window:this.options.editable.window,commandRenderer:I(function(){return this._buildCommands(["update","canceledit"])},this),fieldRenderer:this._cellContent,save:I(this.saveRow,this),cancel:I(this._cancelEdit,this),appendTo:this.wrapper}),this.editor=new p(i,n))},_editMode:function(){var e="inline",t=this.options.editable;return t!==!0&&(e="string"==typeof t?t:t.mode||e),e.toLowerCase()},hideColumn:function(e){this._toggleColumnVisibility(e,!0)},showColumn:function(e){this._toggleColumnVisibility(e,!1)},_toggleColumnVisibility:function(e,t){e=this._findColumn(e),e&&e.hidden!==t&&(e.hidden=t,this._ensureExpandableColumn(),this._renderCols(),this._renderHeader(),this._render(),this._adjustTablesWidth(),this.trigger(t?te:ne,{column:e}),t||e.width||this.table.add(this.thead.closest("table")).width(""))},_findColumn:function(e){return e="number"==typeof e?this.columns[e]:H(e)?M(this.columns,function(t){return t===e})[0]:M(this.columns,function(t){return t.field===e})[0]},_adjustTablesWidth:function(){var e,t,n,i=this.thead.prev().children(),r=0;for(e=0,t=i.length;e<t;e++){if(n=i[e].style.width,!n||n.indexOf("%")!=-1){r=0;break}r+=parseInt(n,10)}r&&this.table.add(this.thead.closest("table")).width(r)},_reorderable:function(){var t,n,i;this.options.reorderable&&(t=this.options.scrollable===!0,n=(t?".k-grid-header:first ":"table:first>.k-grid-header ")+ie,i=this,this._draggableInstance=new C.Draggable(this.wrapper,{group:kendo.guid(),filter:n,hint:function(t){return e('<div class="k-header k-drag-clue" />').css({width:t.width(),paddingLeft:t.css("paddingLeft"),paddingRight:t.css("paddingRight"),lineHeight:t.height()+"px",paddingTop:t.css("paddingTop"),paddingBottom:t.css("paddingBottom")}).html(t.attr(kendo.attr("title"))||t.attr(kendo.attr("field"))||t.text()).prepend('<span class="k-icon k-drag-status k-i-cancel" />')}}),this.reorderable=new C.Reorderable(this.wrapper,{draggable:this._draggableInstance,dragOverContainers:I(this._allowDragOverContainers,this),inSameContainer:function(t){return e(t.source).parent()[0]===e(t.target).parent()[0]},change:function(e){var t=e.newIndex,n=e.oldIndex,r="before"===e.position,o=i.columns[n];i.trigger(re,{newIndex:t,oldIndex:n,column:o}),i.reorderColumn(t,o,r)}}))},_allowDragOverContainers:function(e){return this.columns[e].lockable!==!1},reorderColumn:function(n,i,r){var o,a,s,l=this.columns,d=z(i,l),u=l[n],c=!!u.locked,h=this._nonLockedColumns().length;d!==n&&(c&&!i.locked&&1==h||!c&&i.locked&&l.length-h==1||(r===t&&(r=n<d),o=!!i.locked,o=o!=c,i.locked=c,l.splice(r?n:n+1,0,i),l.splice(d<n?d:d+1,1),this._renderCols(),a=e(this.lockedHeader).add(this.thead).find("th"),a.eq(d)[r?"insertBefore":"insertAfter"](a.eq(n)),s=this._headerTree.children[0].children,this._hasLockedColumns&&(s=this._lockedHeaderTree.children[0].children.concat(s)),s.splice(r?n:n+1,0,s[d]),s.splice(d<n?d:d+1,1),this._hasLockedColumns&&(this._lockedHeaderTree.children[0].children=s.splice(0,this._lockedColumns().length),this._headerTree.children[0].children=s),this._applyLockedContainersWidth(),this.refresh(),o&&(c?this.trigger(se,{column:i}):this.trigger(le,{column:i}))))},lockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:M(n,function(t){return t.field===e})[0],e&&!e.hidden&&(t=this._lockedColumns().length-1,this.reorderColumn(t,e,!1))},unlockColumn:function(e){var t,n=this.columns;e="number"==typeof e?n[e]:M(n,function(t){return t.field===e})[0],e&&!e.hidden&&(t=this._lockedColumns().length,this.reorderColumn(t,e,!0))},_columnMenu:function(){var t,n,i,r,o,a,s=e(this.lockedHeader).add(this.thead).find("th"),l=this.columns,d=this.options,u=d.columnMenu,c=I(this._columnMenuInit,this),h=this._lockedColumns().length;if(u)for("boolean"==typeof u&&(u={}),a=0;a<s.length;a++)t=l[a],t.field&&(n=s.eq(a).data("kendoColumnMenu"),n&&n.destroy(),r=!1,t.sortable!==!1&&u.sortable!==!1&&d.sortable!==!1&&(r=g({},d.sortable,{compare:(t.sortable||{}).compare})),o=!1,d.filterable&&t.filterable!==!1&&u.filterable!==!1&&(o=g({pane:this.pane},t.filterable,d.filterable)),i={dataSource:this.dataSource,values:t.values,columns:u.columns,sortable:r,filterable:o,messages:u.messages,owner:this,closeCallback:e.noop,init:c,pane:this.pane,lockedColumns:t.lockable!==!1&&h>0},d.$angular&&(i.$angular=d.$angular),s.eq(a).kendoColumnMenu(i))},_columnMenuInit:function(e){this.trigger(ae,{field:e.field,container:e.container})}}),kendo.ExcelMixin&&kendo.ExcelMixin.extend(f.prototype),kendo.PDFMixin&&(kendo.PDFMixin.extend(f.prototype),f.fn._drawPDF=function(t){var n=new e.Deferred;return this._drawPDFShadow({width:this.wrapper.width()},{avoidLinks:this.options.pdf.avoidLinks}).done(function(e){var i={page:e,pageNumber:1,progress:1,totalPages:1};t.notify(i),n.resolve(i.page)}).fail(function(e){n.reject(e)}),n}),g(!0,kendo.data,{TreeListDataSource:c,TreeListModel:xe}),g(!0,kendo.ui,{TreeList:f}),C.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/main.min",["kendo.core.min"],e)}(function(){return function(){function e(e){return e*e}function t(e){return"string"!=typeof e&&(e+="px"),e}function n(e){var t,n,i=[];if(e)for(t=d.toHyphens(e).split("-"),n=0;n<t.length;n++)i.push("k-pos-"+t[n]);return i.join(" ")}function i(e){for(var t={1:"i",10:"x",100:"c",2:"ii",20:"xx",200:"cc",3:"iii",30:"xxx",300:"ccc",4:"iv",40:"xl",400:"cd",5:"v",50:"l",500:"d",6:"vi",60:"lx",600:"dc",7:"vii",70:"lxx",700:"dcc",8:"viii",80:"lxxx",800:"dccc",9:"ix",90:"xc",900:"cm",1e3:"m"},n=[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],i="";e>0;)e<n[0]?n.shift():(i+=t[n[0]],e-=n[0]);return i}function r(e){var t,n,i,r,o;for(e=e.toLowerCase(),t={i:1,v:5,x:10,l:50,c:100,d:500,m:1e3},n=0,i=0,r=0;r<e.length;++r){if(o=t[e.charAt(r)],!o)return null;n+=o,o>i&&(n-=2*i),i=o}return n}function o(e){var t=Object.create(null);return function(){var n,i="";for(n=arguments.length;--n>=0;)i+=":"+arguments[n];return i in t?t[i]:t[i]=e.apply(this,arguments)}}function a(e){return l.test(e)}function s(e,t){function n(e){this.value=e}try{return e.call(t,function(e){throw new n(e)})}catch(i){if(i instanceof n)return i.value;throw i}}var l,d=window.kendo,u=d.deepExtend,c=Date.now;c||(c=function(){return(new Date).getTime()}),u(d,{util:{now:c,renderPos:n,renderSize:t,sqr:e,romanToArabic:r,arabicToRoman:i,memoize:o,isUnicodeLetter:a,withExit:s}}),l=RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]")}(),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("util/parse-xml.min",["kendo.core.min","util/main.min"],e)}(function(){"use strict";function e(e){var t,n=[];for(t=0;t<e.length;++t)n.push(e.charCodeAt(t));return n}function t(e,t){t>65535?(t-=65536,e.push(t>>>10&1023|55296,56320|1023&t)):e.push(t)}function n(e,n){function C(n){var i=e[j++];240&i^240?224&i^224?192&i^192?n.push(i):t(n,(31&i)<<6|63&e[j++]):t(n,(15&i)<<12|(63&e[j++])<<6|63&e[j++]):t(n,(3&i)<<18|(63&e[j++])<<12|(63&e[j++])<<6|63&e[j++])}function T(e){throw Error(e+", at "+j)}function S(t){for(var n=[];j<e.length&&t(e[j]);)n.push(e[j++]);return n}function D(e){return i.apply(0,S(e))}function F(){S(I)}function E(t){var n,i=j;for(n=0;n<t.length;++n)if(e[j++]!=t[n])return j=i,!1;return t}function A(e){E(e)||T("Expecting "+e.join(", "))}function I(e){return 9==e||10==e||13==e||32==e}function R(e){return e>=48&&e<=57}function M(e){return e>=48&&e<=57||(e|=32)>=97&&e<=102}function z(e){return 58==e||95==e||(e|=32)>=97&&e<=122}function H(e){return 45==e||R(e)||z(e)}function N(){for(var t=[];j<e.length;){if(E(s))return q("comment",i.apply(0,t));C(t)}}function B(){var e,t;E(h)?W():E(l)?N():(e=L(),t=U(e),G.push(t),E(d)?q("enter",e,t,!0):(A(f),q("enter",e,t),P(e),e!=L()&&T("Bad closing tag"),q("leave",e,t),F(),A(f)),G.pop())}function P(t){for(var n=[];j<e.length;){if(E(u))return n.length&&q("text",i.apply(0,n));if(E(o))for(;j<e.length&&!E(a);)C(n);else E(p)?(n.length&&q("text",i.apply(0,n)),B(),n=[]):E(v)?V(n):C(n)}T("Unclosed tag "+t)}function L(){return z(e[j])||T("Expecting XML name"),D(H)}function O(){var t,n=E(_)||E(b);for(n||T("Expecting string"),t=[];j<e.length;){if(E(n))return i.apply(0,t);E(v)?V(t):C(t)}T("Unfinished string")}function V(e){var n,i;E(k)?(n=E(w)||E(y)?parseInt(D(M),16):parseInt(D(R),10),isNaN(n)&&T("Bad numeric entity")):(i=L(),n=r[i],void 0===n&&T("Unknown entity "+i)),t(e,n),A(m)}function W(){q("decl",L(),U()),A(c)}function U(t){for(var n,i={$tag:t};j<e.length&&(F(),n=e[j],63!=n&&62!=n&&47!=n);)i[L()]=(A(g),O());return i}function q(e,t,i,r){var o=n&&n[e];o&&o.call($,t,i,r)}var j=0,G=[],$={is:function(e){for(var t=G.length,n=e.length;--t>=0&&--n>=0;)if(G[t].$tag!=e[n]&&"*"!=e[n])return!1;return n<0?G[G.length-1]:null},exit:function(){throw x},stack:G},K=[];for(C(K),65279!=K[0]&&(j=0);j<e.length;)F(),A(p),B(),F()}var i=String.fromCharCode,r={amp:38,lt:60,gt:62,quot:34,apos:39,nbsp:160},o=e("<![CDATA["),a=e("]]>"),s=e("-->"),l=e("!--"),d=e("/>"),u=e("</"),c=e("?>"),h=e("?"),p=e("<"),f=e(">"),m=e(";"),g=e("="),v=e("&"),_=e('"'),b=e("'"),k=e("#"),w=e("x"),y=e("X"),x={};kendo.util.parseXML=function(){try{return n.apply(this,arguments)}catch(e){if(e!==x)throw e}}},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/commands.min",["kendo.core.min","kendo.binder.min","kendo.window.min","kendo.list.min","kendo.tabstrip.min"],e)}(function(){!function(e){function t(e){var t=document.createElement("textarea");n(t).addClass("k-spreadsheet-clipboard").val(e).appendTo(document.body).focus().select(),document.execCommand("copy"),n(t).remove()}var n,i,r,o,a,s,l,d;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=e.spreadsheet.Command=e.Class.extend({init:function(e){this.options=e,this._workbook=e.workbook,this._property=e&&e.property,this._state={}},range:function(e){return void 0!==e&&this._setRange(e),this._range},_setRange:function(e){this._range=e},redo:function(){this.range().select(),this.exec()},undo:function(){this.setState(this._state)},getState:function(){this._state=this.range().getState(this._property)},setState:function(e){this.range().setState(e)},_forEachCell:function(e){var t=this.range(),n=t._ref;n.forEach(function(n){t.sheet().forEach(n.toRangeRef(),e.bind(this))}.bind(this))}}),r=i.extend({init:function(e){i.fn.init.call(this,e),this._target=e.target,this._value=e.value},exec:function(){this.getState(),this.setState(this._value)}}),e.spreadsheet.ColumnWidthCommand=r.extend({getState:function(){this._state=this.range().sheet().columnWidth(this._target)},setState:function(e){this.range().sheet().columnWidth(this._target,e)}}),e.spreadsheet.RowHeightCommand=r.extend({getState:function(){this._state=this.range().sheet().rowHeight(this._target)},setState:function(e){this.range().sheet().rowHeight(this._target,e)}}),e.spreadsheet.HyperlinkCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._link=e.link},exec:function(){var e=this.range();this._prevLink=e.link(),this._prevUnderline=e.underline(),e.link(this._link),e.underline(!0),null==e.value()&&(this._hasSetValue=!0,e.value(this._link))},undo:function(){var e=this.range();e.link(this._prevLink),e.underline(this._prevUnderline),this._hasSetValue&&e.value(null)}}),e.spreadsheet.GridLinesChangeCommand=r.extend({getState:function(){this._state=this._range.sheet().showGridLines()},setState:function(e){this._range.sheet().showGridLines(e)}}),o=e.spreadsheet.PropertyChangeCommand=i.extend({_setRange:function(e){i.prototype._setRange.call(this,e.skipHiddenCells())},init:function(e){i.fn.init.call(this,e),this._value=e.value},exec:function(){var e=this.range();e.enable()&&(this.getState(),"format"===this.options.property&&this._workbook.trigger("changeFormat",{range:e}),e[this._property](this._value))}}),e.spreadsheet.ClearContentCommand=i.extend({exec:function(){return this.range().enable()?(this.getState(),void this.range().skipHiddenCells().clearContent()):{reason:"error",type:"cannotModifyDisabled"}}}),e.spreadsheet.EditCommand=o.extend({init:function(e){e.property=e.property||"input",o.fn.init.call(this,e)},rejectState:function(e){return this.undo(),{title:e.title,body:e.message,reason:"error",type:"validationError"}},editRange:function(){var e=this.range();return this.options.arrayFormula?e:e.sheet().activeCellSelection()},getState:function(){this._state=this.range().getState()},exec:function(){var t,n,i=this.options.arrayFormula,r=this.editRange();if(!r.enable())return{reason:"error",type:"rangeDisabled"};if(!r.canEditArrayFormula())return{reason:"error",type:"intersectsArray"};if(t=this._value,this.getState(),"value"==this._property)return void r.value(t);try{if(r.link(null),""===t?r.value(null):(r.input(t,{arrayFormula:i}),/\n/.test(r.value())&&r.wrap(!0)),r._adjustRowHeight(),n=r._getValidationState())return this.rejectState(n)}catch(o){if(o instanceof e.spreadsheet.calc.ParseError)return{title:"Error in formula",body:o+"",reason:"error"};throw o}}}),e.spreadsheet.TextWrapCommand=o.extend({init:function(e){e.property="wrap",o.fn.init.call(this,e),this._value=e.value},getState:function(){var e={};this.range().forEachRow(function(t){var n=t.topLeft().row;e[n]=t.sheet().rowHeight(n)}),this._state=this.range().getState(this._property),this._rowHeight=e},undo:function(){var e,t=this.range().sheet(),n=this._rowHeight;this.range().setState(this._state);for(e in n)t.rowHeight(e,n[e])}}),e.spreadsheet.AdjustDecimalsCommand=i.extend({init:function(e){this._decimals=e.value,e.property="format",i.fn.init.call(this,e)},exec:function(){var t=this.range().sheet(),n=this._decimals,i=e.spreadsheet.formatting;this.getState(),t.batch(function(){this.range().forEachCell(function(e,r,o){var a=o.format;(a||n>0)&&(a=i.adjustDecimals(a||"#",n),t.range(e,r).format(a))})}.bind(this))}}),e.spreadsheet.BorderChangeCommand=i.extend({init:function(e){e.property="border",i.fn.init.call(this,e),this._type=e.border,this._style=e.style},_batch:function(e){return this.range().sheet().batch(e,{})},exec:function(){var e=this;e.getState(),e._batch(function(){e[e._type](e._style)})},noBorders:function(){this.range().insideBorders(null),this.outsideBorders(null)},allBorders:function(e){this.range().insideBorders(e),this.outsideBorders(e)},leftBorder:function(e){this.range().leftColumn().borderLeft(e)},rightBorder:function(e){this.range().rightColumn().borderRight(e)},topBorder:function(e){this.range().topRow().borderTop(e)},bottomBorder:function(e){this.range().bottomRow().borderBottom(e)},outsideBorders:function(e){var t=this.range();t.leftColumn().borderLeft(e),t.topRow().borderTop(e),t.rightColumn().borderRight(e),t.bottomRow().borderBottom(e)},insideBorders:function(e){this.range().insideBorders(e),this.outsideBorders(null)},insideHorizontalBorders:function(e){this.range().insideHorizontalBorders(e)},insideVerticalBorders:function(e){this.range().insideVerticalBorders(e)}}),e.spreadsheet.MergeCellCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._type=e.value},exec:function(){this.getState(),this[this._type]()},activate:function(e){this.range().sheet().activeCell(e)},getState:function(){this._state=this.range().getState()},undo:function(){"unmerge"!==this._type&&(this.range().unmerge(),this.activate(this.range().topLeft())),this.range().setState(this._state)},cells:function(){var e=this.range(),t=e._ref;e.merge(),this.activate(t)},horizontally:function(){var e=this.range().topRow()._ref;this.range().forEachRow(function(e){e.merge()}),this.activate(e)},vertically:function(){var e=this.range().leftColumn()._ref;this.range().forEachColumn(function(e){e.merge()}),this.activate(e)},unmerge:function(){var e=this.range(),t=e._ref.topLeft;e.unmerge(),this.activate(t)}}),e.spreadsheet.FreezePanesCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._type=e.value},exec:function(){this.getState(),this._topLeft=this.range().topLeft(),this[this._type]()},getState:function(){this._state=this.range().sheet().getState()},undo:function(){this.range().sheet().setState(this._state)},panes:function(){var e=this._topLeft,t=this.range().sheet();t.frozenColumns(e.col).frozenRows(e.row)},rows:function(){var e=this._topLeft,t=this.range().sheet();t.frozenRows(e.row)},columns:function(){var e=this._topLeft,t=this.range().sheet();t.frozenColumns(e.col)},unfreeze:function(){var e=this.range().sheet();e.frozenRows(0).frozenColumns(0)}}),e.spreadsheet.PasteCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._event=e.event},getState:function(){this._range=this._workbook.activeSheet().range(this._clipboard.pasteRef()),this._state=this._range.getState()},exec:function(){var e,t,n;return this.getState(),this._clipboard.parse(),e=this._clipboard.canPaste(),e.canPaste?(t=this._workbook.activeSheet().selection(),n=this._workbook.trigger("paste",{range:t}),void(n?this._event.preventDefault():(this._clipboard.paste(),t._adjustRowHeight()))):e.menuInvoked?{reason:"error",type:"useKeyboard"}:e.pasteOnMerged?{reason:"error",type:"modifyMerged"}:e.overflow?{reason:"error",type:"overflow"}:e.pasteOnDisabled?(this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"}):{reason:"error"}}}),e.spreadsheet.AdjustRowHeightCommand=i.extend({exec:function(){var e=this.options,t=this._workbook.activeSheet(),n=e.range||t.range(e.rowIndex);n._adjustRowHeight()}}),e.spreadsheet.ToolbarPasteCommand=i.extend({exec:function(){return e.support.clipboard.paste?(this._workbook._view.clipboard.focus().select(),void document.execCommand("paste")):{reason:"error",type:"useKeyboard"}}}),e.spreadsheet.CutCommand=i.extend({_eventType:"cut",init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard(),this._event=e.event},exec:function(){var e,t,n=this._clipboard.canCopy();if(n.canCopy){if(e=this._workbook.activeSheet().selection(),"cut"==this._eventType){if(!e.enable())return this._event.preventDefault(),{reason:"error",type:"cannotModifyDisabled"};this.getState()}t=this._workbook.trigger(this._eventType,{range:e}),t?this._event.preventDefault():"cut"==this._eventType?this._clipboard.cut():this._clipboard.copy()}else{if(n.menuInvoked)return{reason:"error",type:"useKeyboard"};if(n.multiSelection)return{reason:"error",type:"unsupportedSelection"}}}}),e.spreadsheet.CopyCommand=e.spreadsheet.CutCommand.extend({_eventType:"copy",undo:n.noop}),e.spreadsheet.ToolbarCopyCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard();
},undo:n.noop,exec:function(){if(!e.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var n=this._workbook._view.clipboard;t(n.html()),n.trigger("copy")}}),e.spreadsheet.AutoFillCommand=i.extend({init:function(e){i.fn.init.call(this,e)},origin:function(e){this._origin=e},exec:function(){var t=this.range();if(!t.enable())return{reason:"error",type:"rangeDisabled"};if(t.intersectingArrayFormula())return{reason:"error",type:"intersectsArray"};this.getState();try{t.fillFrom(this._origin)}catch(n){if(n instanceof e.spreadsheet.Range.FillError)return{reason:"error",type:n.code};throw n}}}),e.spreadsheet.ToolbarCutCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._clipboard=e.workbook.clipboard()},exec:function(){if(!e.support.clipboard.copy)return{reason:"error",type:"useKeyboard"};var n=this._workbook._view.clipboard;t(n.html()),n.trigger("cut")}}),e.spreadsheet.FilterCommand=i.extend({undo:function(){this.range().filter(this._state)},exec:function(){var e=this.range();this._state=e.hasFilter(),e.filter(!this._state)}}),e.spreadsheet.SortCommand=i.extend({undo:function(){var e=this.range().sheet();e.setState(this._state)},exec:function(){var e,t=this.range(),n=t.sheet(),i=n.activeCell(),r=this.options.sheet?i.topLeft.col:this.options.column||0,o="asc"===this.options.value;return this._state=n.getState(),this.options.sheet&&(t=this.expandRange()),(e=t.cantSort())?{reason:"error",type:e.code}:void t.sort({column:r,ascending:o})},expandRange:function(){var t=this.range().sheet();return new e.spreadsheet.Range(t._sheetRef,t)}}),a=e.spreadsheet.ApplyFilterCommand=i.extend({column:function(){return this.options.column||0},undo:function(){var e=this.range().sheet();e.clearFilter(this.column()),this._state.length&&this.range().filter(this._state)},getState:function(){var e=this.range().sheet(),t=e.filter();t&&(this._state=t.columns.filter(function(e){return e.index==this.column()}.bind(this)))},exec:function(){var t,n,i=this.range(),r=this.column(),o=i.sheet().filter(),a=!1;this.options.valueFilter?n={column:r,filter:new e.spreadsheet.ValueFilter(this.options.valueFilter)}:this.options.customFilter&&(n={column:r,filter:new e.spreadsheet.CustomFilter(this.options.customFilter)}),this.getState(),o&&o.ref.eq(i._ref)&&o.columns.length?(o.columns.forEach(function(e){e.index===r&&(a=!0)}),t=o.columns.map(function(e){return e.index===r?n:{column:e.index,filter:e.filter}}),a||t.push(n)):t=n,i.filter(t)}}),e.spreadsheet.ClearFilterCommand=a.extend({exec:function(){var e=this.range(),t=this.column();this.getState(),e.clearFilter(t)}}),e.spreadsheet.HideLineCommand=i.extend({init:function(e){i.fn.init.call(this,e),this.axis=e.axis},undo:function(){var e=this.range().sheet();e.setAxisState(this._state)},exec:function(){var e=this.range().sheet();this._state=e.getAxisState(),"row"==this.axis?e.axisManager().hideSelectedRows():e.axisManager().hideSelectedColumns()}}),e.spreadsheet.UnHideLineCommand=e.spreadsheet.HideLineCommand.extend({exec:function(){var e=this.range().sheet();this._state=e.getAxisState(),"row"==this.axis?e.axisManager().unhideSelectedRows():e.axisManager().unhideSelectedColumns()}}),s=i.extend({exec:function(){this._expandedRange=this._expand(this.range()),this._state=this._expandedRange.getState(),this._indexes=this._exec(this._expandedRange.sheet())},undo:function(){var e=this,t=e._expandedRange,n=t.sheet();n.batch(function(){e._indexes.forEach(function(t){e._undoOne(n,t),n._restoreModifiedFormulas(t.formulas)}),t.setState(e._state)},{layout:!0,recalc:!0})}}),e.spreadsheet.DeleteRowCommand=s.extend({_expand:function(e){return e.resize({left:-(1/0),right:+(1/0)})},_exec:function(e){return e.axisManager().deleteSelectedRows()},_undoOne:function(e,t){e.insertRow(t.index),e.rowHeight(t.index,t.height)}}),e.spreadsheet.DeleteColumnCommand=s.extend({_expand:function(e){return e.resize({top:-(1/0),bottom:+(1/0)})},_exec:function(e){return e.axisManager().deleteSelectedColumns()},_undoOne:function(e,t){e.insertColumn(t.index),e.columnWidth(t.index,t.width)}}),l=i.extend({init:function(e){i.fn.init.call(this,e),this._value=e.value},undo:function(){var e=this,t=e.range().sheet();t.batch(function(){for(var n=e._pos.count;--n>=0;)e._undoOne(t,e._pos.base)},{layout:!0,recalc:!0})}}),e.spreadsheet.AddColumnCommand=l.extend({exec:function(){var e=this.range().sheet(),t=e.axisManager().preventAddColumn();return t?t:void(this._pos="left"===this._value?e.axisManager().addColumnLeft():e.axisManager().addColumnRight())},_undoOne:function(e,t){e.deleteColumn(t)}}),e.spreadsheet.AddRowCommand=l.extend({exec:function(){var e=this.range().sheet(),t=e.axisManager().preventAddRow();return t?t:void(this._pos="above"===this._value?e.axisManager().addRowAbove():e.axisManager().addRowBelow())},_undoOne:function(e,t){e.deleteRow(t)}}),e.spreadsheet.EditValidationCommand=i.extend({init:function(e){i.fn.init.call(this,e),this._value=e.value},exec:function(){this.range().validation(this._value)}}),e.spreadsheet.OpenCommand=i.extend({cannotUndo:!0,exec:function(){var e,t=this.options.file;return null===t.name.match(/.xlsx$/i)?{reason:"error",type:"openUnsupported"}:(e=this.options.workbook,void e.fromFile(this.options.file).then(function(){var t=e.excelImportErrors;t&&t.length&&e._view.openDialog("importError",{errors:t})}))}}),e.spreadsheet.SaveAsCommand=i.extend({exec:function(){var e=this.options.name+this.options.extension;".xlsx"===this.options.extension?this.options.workbook.saveAsExcel({fileName:e}):".pdf"===this.options.extension&&this.options.workbook.saveAsPDF(n.extend(this.options.pdf,{workbook:this.options.workbook,fileName:e}))}}),d=i.extend({init:function(e){i.fn.init.call(this,e),this._name=e.name,this._value=e.value},getState:function(){this._state=this._workbook.nameDefinition(this._name)},setState:function(){this._workbook.nameDefinition(this._name,this._state),this._workbook.trigger("change",{recalc:!0})}}),e.spreadsheet.DefineNameCommand=d.extend({exec:function(){this.getState();try{this._workbook.defineName(this._name,this._value),this._workbook.trigger("change",{recalc:!0})}catch(e){return{title:"Error",body:e+"",reason:"error"}}}}),e.spreadsheet.DeleteNameCommand=d.extend({exec:function(){this.getState(),this._workbook.undefineName(this._name),this._workbook.trigger("change",{recalc:!0})}}))}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/formulabar.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n={wrapper:"k-spreadsheet-formula-bar"},i=e.ui.Widget.extend({init:function(n,r){e.ui.Widget.call(this,n,r),n=this.element.addClass(i.classNames.wrapper),this.formulaInput=new e.spreadsheet.FormulaInput(t("<div/>").appendTo(n))},destroy:function(){this.formulaInput&&this.formulaInput.destroy(),this.formulaInput=null}}),e.spreadsheet.FormulaBar=i,t.extend(!0,i,{classNames:n}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/formulainput.min",["kendo.core.min"],e)}(function(){!function(e,t){function n(e){return"("==e||"["==e||"{"==e}function i(e){return")"==e||"]"==e||"}"==e}function r(e,t){return"("==t?")"==e:"["==t?"]"==e:"{"==t&&"}"==e}function o(e,t){return e.begin<=t.begin&&e.end>=t.end}function a(t){return e.spreadsheet.calc.runtime.FUNCS[t.toLowerCase()]}function s(e,t){return!(!e||!t)&&("ref"==e.type&&"ref"==t.type?e.ref.eq(t.ref):e.value===t.value)}var l,d,u,c,h,p,f,m,g;e.support.browser.msie&&e.support.browser.version<9||(l=e.jQuery,d=e.ui.Widget,u=".kendoFormulaInput",c=e.keys,h={wrapper:"k-spreadsheet-formula-input",listWrapper:"k-spreadsheet-formula-list"},p=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],f={27:"esc",37:"left",39:"right",35:"end",36:"home",32:"spacebar"},m=/(^_|[^a-z0-9]$)/i,g=d.extend({init:function(e,t){d.call(this,e,t),e=this.element,e.addClass(g.classNames.wrapper).attr("contenteditable",!0).attr("spellcheck",!1).css("white-space","pre"),this.options.autoScale&&e.on("input",this.scale.bind(this)),this._highlightedRefs=[],this._staticTokens=[],this._formulaSource(),this._formulaList(),this._popup(),this._tooltip(),e.on("keydown",this._keydown.bind(this)).on("keyup",this._keyup.bind(this)).on("blur",this._blur.bind(this)).on("input click",this._input.bind(this)).on("focus",this._focus.bind(this)).on("paste",this._paste.bind(this))},options:{name:"FormulaInput",autoScale:!1,filterOperator:"startswith",scalePadding:30,minLength:1},events:["keyup","focus"],enable:function(e){return void 0===e?"true"===this.element.attr("contenteditable"):(e?this.element.attr("contenteditable",e):this.element.removeAttr("contenteditable"),void this.element.toggleClass("k-state-disabled",!e))},getPos:function(){function e(e,t){try{!function r(n){if(n===e)throw t;if(1==n.nodeType)for(var i=n.firstChild;i;i=i.nextSibling)r(i);else 3==n.nodeType&&(t+=n.nodeValue.length)}(i)}catch(n){return n}}var n,i=this.element[0],r=t.getSelection(),o=e(r.focusNode,r.focusOffset),a=e(r.anchorNode,r.anchorOffset);if(null!=o&&null!=a)return o>a&&(n=o,o=a,a=n),{begin:o,end:a,collapsed:o==a}},setPos:function(e,n){function i(e,t){return e.startOffset!=t.startOffset||e.endOffset!=t.endOffset||e.startContainer!=t.endContainer||e.endContainer!=t.endContainer}function r(e,t){try{!function i(e){var n,r;if(3==e.nodeType){if(n=e.nodeValue.length,n>=t)throw e;t-=n}else if(1==e.nodeType)for(r=e.firstChild;r;r=r.nextSibling)i(r)}(e)}catch(n){return{node:n,pos:t}}}var o,a,s,l=this.element[0];e=r(l,e),n=null!=n?r(l,n):e,e&&n&&(o=document.createRange(),o.setStart(e.node,e.pos),o.setEnd(n.node,n.pos),a=t.getSelection(),s=a.getRangeAt(0),i(o,s)&&(a.removeAllRanges(),a.addRange(o)))},end:function(){this.setPos(this.length())},home:function(){this.setPos(0)},select:function(){this.setPos(0,this.length())},length:function(){return this.value().length},_formulaSource:function(){var t,n,i=[];for(n in e.spreadsheet.calc.runtime.FUNCS)m.test(n)||(t=n.toUpperCase(),i.push({value:t,text:t}));this.formulaSource=new e.data.DataSource({data:i})},_formulaList:function(){this.list=new e.ui.StaticList(l("<ul />").addClass(g.classNames.listWrapper).insertAfter(this.element),{autoBind:!1,selectable:!0,change:this._formulaListChange.bind(this),dataSource:this.formulaSource,dataValueField:"value",template:"#:data.value#"}),this.list.element.on("mousedown",function(e){e.preventDefault()})},_formulaListChange:function(){var e,t,n,i=this._tokenContext();i&&!this._mute&&(e=i.token,t=this.list.value()[0],n={replace:!0,token:e,end:e.end},i.nextToken&&"("==i.nextToken.value||(t+="("),this._replaceAt(n,t),this.popup.close())},_popup:function(){this.popup=new e.ui.Popup(this.list.element,{anchor:this.element})},_blur:function(){this.popup.close(),clearTimeout(this._focusId),this.trigger("blur")},_isFormula:function(){return/^=/.test(this.value())},_keydown:function(e){var t=e.keyCode;f[t]?(this.popup.close(),this._navigated=!0):this._move(t)&&(this._navigated=!0,e.preventDefault()),this._keyDownTimeout=setTimeout(this._syntaxHighlight.bind(this))},_keyup:function(){var e,t=this.popup;this._isFormula()&&!this._navigated&&(e=((this._tokenContext()||{}).token||{}).value,this.filter(e),e&&this.formulaSource.view().length?(t[t.visible()?"position":"open"](),this.list.focusFirst()):t.close()),this._navigated=!1,this._syntaxHighlight(),this.trigger("keyup")},_input:function(){this._syntaxHighlight()},_focus:function(){setTimeout(this._sync.bind(this)),this._focusTimeout=setTimeout(this._syntaxHighlight.bind(this)),this.trigger("focus")},_paste:function(n){var i,r,o;n.preventDefault(),i=this.getPos(),r=e.support.browser.msie?t.clipboardData.getData("Text"):n.originalEvent.clipboardData.getData("text/plain"),o=this.value(),o=o.substr(0,i.begin)+r+o.substr(i.end),this.value(o),this.setPos(i.begin+r.length),this.scale()},_move:function(e){var t=this.list,n=this.popup;if(n.visible()){if(e===c.DOWN)return t.focusNext(),t.focus()||t.focusFirst(),!0;if(e===c.UP)return t.focusPrev(),t.focus()||t.focusLast(),!0;if(e===c.ENTER)return t.select(t.focus()),n.close(),!0;if(e===c.TAB)return t.select(t.focus()),n.close(),!0;if(e===c.PAGEUP)return t.focusFirst(),!0;if(e===c.PAGEDOWN)return t.focusLast(),!0}return e===c.ENTER||e===c.TAB},_tokenContext:function(){var t,n,i,r=this.getPos(),a=this.value();if(!a||!r||!r.collapsed)return null;for(t=e.spreadsheet.calc.tokenize(a,this.row(),this.col()),i=0;i<t.length;++i)if(n=t[i],o(n,r)&&/^(?:str|sym|func)$/.test(n.type))return{token:n,nextToken:t[i+1]};return null},_sync:function(){this._editorToSync&&this.isActive()&&this._editorToSync.value(this.value())},_textContainer:function(){var t=e.getComputedStyles(this.element[0],p);t.position="absolute",t.visibility="hidden",t.whiteSpace="pre",t.top=-3333,t.left=-3333,this._span=l("<span style='white-space: pre'/>").css(t).insertAfter(this.element)},_tooltip:function(){this._cellTooltip=l('<div class="k-widget k-tooltip" style="position:absolute; display:none">A1</div>').insertAfter(this.element)},tooltip:function(e){this._cellTooltip.text(e)},toggleTooltip:function(e){this._cellTooltip.toggle(e)},isActive:function(){return this.element[0]===e._activeElement()},filter:function(e){!e||e.length<this.options.minLength||(this._mute=!0,this.list.select(-1),this._mute=!1,this.formulaSource.filter({field:this.list.options.dataValueField,operator:this.options.filterOperator,value:e}))},hide:function(){this.enable(!1),this.element.hide(),this._cellTooltip.hide()},show:function(){this.enable(!0),this.element.show()},row:function(){if(this.activeCell)return this.activeCell.row},col:function(){if(this.activeCell)return this.activeCell.col},position:function(e){e&&(this.show(),this.element.css({top:e.top+1+"px",left:e.left+1+"px"}),this._cellTooltip.css({top:e.top-this._cellTooltip.height()-10+"px",left:e.left}))},resize:function(e){e&&this.element.css({width:e.width-1,height:e.height-1})},canInsertRef:function(e){var t,n=this._canInsertRef(e),i=n&&n.token;if(i)for(t=0;t<this._staticTokens.length;t++)if(s(i,this._staticTokens[t]))return null;return n},_canInsertRef:function(t){function i(e){return e.begin>l.begin}function r(e){if(e){if(/^(?:num|str|bool|sym|ref)$/.test(e.type))return{replace:!0,token:e,end:e.end};if(/^(?:op|punc|startexp)$/.test(e.type))return e.end==l.end?a(e,d[c+1]):a(d[c-1],e)}}function a(e,t){if(null==e)return null;if(null==t)return/^(?:op|startexp)$/.test(e.type)||n(e.value)?{token:e,end:l.end}:null;if(s){if("op"==e.type&&/^(?:punc|op)$/.test(t.type))return{token:e,end:l.end}}else{if("startexp"==e.type)return{token:e,end:l.end};if(/^(?:op|punc)$/.test(e.type)&&/^[,;({]$/.test(e.value))return{token:e,end:l.end};if(/^(?:ref|sym)/.test(e.type))return{token:e,replace:!0,end:e.end};if(/^(?:ref|sym)/.test(t.type))return{token:t,replace:!0,end:t.end}}return!1}var s,l,d,u,c;if(this.popup.visible())return null;if(s=t,l=this.getPos(),l&&this._isFormula()){if(0===l.begin)return null;for(d=e.spreadsheet.calc.tokenize(this.value(),this.row(),this.col()),c=0;c<d.length;++c){if(u=d[c],o(u,l))return r(u);if(i(u))return a(d[c-1],u)}return a(u,null)}return null},refAtPoint:function(e){var t,n=this._canInsertRef();n&&(t=e.selection()._ref.simplify().clone().relative(0,0,3),e!==this.activeSheet&&(t=t.setSheet(e.name(),!0)),this._replaceAt(n,t.print(0,0)))},_replaceAt:function(e,t){var n,i=this.value(),r=e.token,o=i.substr(e.end);i=i.substr(0,e.replace?r.begin:e.end)+t,n=i.length,i+=o,this._value(i),this.setPos(n),this.scale(),this._syntaxHighlight()},syncWith:function(t){var n,i=this,r="input"+u,o=i._sync.bind(i);e.support.browser.msie&&(r="keydown"+u,n=function(){setTimeout(o)}),i._editorToSync=t,i.element.off(r).on(r,n||o)},scale:function(){var e,t,n=this.element;this._span||this._textContainer(),this._span.html(n.html()),e=this._span.width()+this.options.scalePadding,t=this._span.height(),e>n.width()&&n.width(e),t>n.height()&&n.height(t),this._sync()},_value:function(e){this.element.text(e)},value:function(e){if(void 0===e){var t=this.element[0].innerText;return t.replace(/\n$/,"")}this._value(e),this._syntaxHighlight()},highlightedRefs:function(){return this._highlightedRefs.slice()},_syntaxHighlight:function(){var t,s=this.getPos(),l=this.value(),d=e.spreadsheet.Pane.classNames.series,u=[],c=0,h=[],p=[];if(!s||s.collapsed){if(!/^=/.test(l))return(this._staticTokens.length||this._highlightedRefs.length)&&(this._staticTokens=[],this._highlightedRefs=[],this.element.text(l)),void(this.popup&&this.popup.close());p=e.spreadsheet.calc.tokenize(l,this.row(),this.col()),p.forEach(function(e){if(e.active=!1,e.cls=["k-syntax-"+e.type],"ref"==e.type&&(e.colorClass=d[c++%d.length],e.cls.push(e.colorClass),u.push(e)),s&&"punc"==e.type)if(n(e.value))h.unshift(e);else if(i(e.value)){var l=h.shift();l?r(e.value,l.value)?(o(e,s)||o(l,s))&&(e.cls.push("k-syntax-paren-match"),l.cls.push("k-syntax-paren-match")):(e.cls.push("k-syntax-error"),l.cls.push("k-syntax-error")):e.cls.push("k-syntax-error")}s&&o(e,s)&&(e.cls.push("k-syntax-at-point"),e.active=!0,t=e),"func"!=e.type||a(e.value)||s&&o(e,s)||e.cls.push("k-syntax-error")}),p.reverse().forEach(function(t){var n=t.begin,i=t.end,r=e.htmlEncode(l.substring(n,i));l=l.substr(0,n)+"<span class='"+t.cls.join(" ")+"'>"+r+"</span>"+l.substr(i)}),this.element.html(l),s&&this.setPos(s.begin,s.end),t&&/^(?:startexp|op|punc)$/.test(t.type)&&this._setStaticTokens(p),this._highlightedRefs=u}},_setStaticTokens:function(e){var t,n;for(this._staticTokens=[],t=0;t<e.length;t++)n=e[t],/^(?:num|str|bool|sym|ref)$/.test(n.type)&&this._staticTokens.push(n)},destroy:function(){this._editorToSync=null,this.element.off(u),clearTimeout(this._focusTimeout),clearTimeout(this._keyDownTimeout),this._cellTooltip=null,this._span=null,this.popup.destroy(),this.popup=null,d.fn.destroy.call(this)},insertNewline:function(){var e=this.value(),t=this.getPos(),n=t.end==e.length;e=e.substr(0,t.begin)+(n?"\n\n":"\n"+e.substr(t.end)),this.value(e),this.setPos(t.begin+1)}}),e.spreadsheet.FormulaInput=g,l.extend(!0,g,{classNames:h}))}(kendo,window)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/eventlistener.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i,r,o,a;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n={8:"backspace",9:"tab",13:"enter",27:"esc",37:"left",38:"up",39:"right",40:"down",35:"end",36:"home",32:"spacebar",33:"pageup",34:"pagedown",46:"delete",113:":edit"},i=navigator.platform.toUpperCase().indexOf("MAC")>=0,r=function(e){return e>47&&e<58||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223},o=function(e){var t=e.keyCode,i=n[t];return!i&&r(t)&&(i=":alphanum"),!i&&e.key&&1==e.key.length&&(i=":alphanum"),i},a=e.Class.extend({init:function(e,n,i){if(this._handlers={},this.target=e,this._observer=n||window,this.keyDownProxy=this.keyDown.bind(this),this.mouseProxy=this.mouse.bind(this),this.threshold=5,this._pressLocation=null,e.on("keydown",this.keyDownProxy),e.on("contextmenu mousedown cut copy paste scroll wheel click dblclick focus",this.mouseProxy),t(document.documentElement).on("mousemove mouseup",this.mouseProxy),i)for(var r in i)this.on(r,i[r])},keyDown:function(e){this.handleEvent(e,o(e.originalEvent))},mouse:function(e){var t,n,i,r,o;e.which?t=3==e.which:e.button&&(t=2==e.button),n=e.type,"mousedown"===n&&(t?n="rightmousedown":this._pressLocation={x:e.pageX,y:e.pageY}),"mouseup"===n&&(t||(this._pressLocation=null)),"mousemove"===n&&this._pressLocation&&(i=this._pressLocation.x-e.pageX,r=this._pressLocation.y-e.pageY,o=Math.sqrt(i*i+r*r),o>this.threshold&&(n="mousedrag")),this.handleEvent(e,n)},handleEvent:function(e,t){var n,r,o="";e.mod=i?e.metaKey:e.ctrlKey&&!e.altKey,e.altKey&&(o+="alt+"),e.shiftKey&&(o+="shift+"),e.ctrlKey&&(o+="ctrl+"),o+=t,n=this._handlers["*+"+t],n&&n.call(this._observer,e,o),r=this._handlers[o],r&&r.call(this._observer,e,o)},on:function(e,t){var n=this._handlers;"string"==typeof t&&(t=this._observer[t]),"string"==typeof e&&(e=e.split(",")),e.forEach(function(e){n[e]=t})},destroy:function(){this.target.off("keydown",this.keyDownProxy),this.target.off("keydown",this.mouseProxy),t(document.documentElement).off("mousemove mouseup",this.mouseProxy)}}),e.spreadsheet.EventListener=a)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/rangelist.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){if(e.left.level===e.level){var t=e;e=e.left,t.left=e.right,e.right=t}return e}function n(e){if(e.right.right.level===e.level){var t=e;e=e.right,t.right=e.left,e.left=t,e.level+=1}return e}function i(e,r){return e===d?new l(1,r,d,d):(e.value.start>r.start?e.left=i(e.left,r):e.right=i(e.right,r),n(t(e)))}function r(e,i){var o,a;if(e===d)return e;if(o=e.value.start-i.start,0===o)if(e.left!==d&&e.right!==d){for(a=e.left;a.right!==d;)a=a.right;e.value=a.value,e.left=r(e.left,e.value)}else e=e.left===d?e.right:e.left;else o>0?e.left=r(e.left,i):e.right=r(e.right,i);return(e.left.level<e.level-1||e.right.level<e.level-1)&&(e.level-=1,e.right.level>e.level&&(e.right.level=e.level),e=t(e),e.right=t(e.right),e.right.right=t(e.right.right),e=n(e),e.right=n(e.right)),e}function o(e,t){e!==d&&(o(e.left,t),t.push(e.value),o(e.right,t))}function a(e,t,n){if(e!==d){var i=e.value;t.start<i.start&&a(e.left,t,n),i.intersects(t)&&n.push(i),t.end>i.end&&a(e.right,t,n)}}function s(e,t,n){t!==d&&(s(e,t.left,n),e.insert(n(t.value)),s(e,t.right,n))}var l,d,u,c,h,p,f;e.support.browser.msie&&e.support.browser.version<9||(l=e.Class.extend({init:function(e,t,n,i){this.level=e,this.value=t,this.left=n,this.right=i}}),d=new function(){this.left=this,this.right=this,this.level=0},u=e.Class.extend({init:function(e,t,n){this.start=e,this.end=t,this.value=n},intersects:function(e){return e.start<=this.end&&e.end>=this.start},clone:function(){return new u(this.start,this.end,this.value)}}),c=e.Class.extend({init:function(){this.root=d},insert:function(e){this.root=i(this.root,e)},remove:function(e){this.root=r(this.root,e)},findrange:function(e){for(var t=this.root;t!=d;)if(e<t.value.start)t=t.left;else{if(!(e>t.value.end))return t.value;t=t.right}return null},values:function(){var e=[];return o(this.root,e),e},intersecting:function(e,t){var n=[];return a(this.root,new u(e,t),n),n},map:function(e){var t=new c;return s(t,this.root,e),t},clone:function(){return this.map(function(e){return e.clone()})},first:function(){for(var e=this.root;e.left!=d;)e=e.left;return e},last:function(){for(var e=this.root;e.right!=d;)e=e.right;return e}}),h=e.Class.extend({init:function(e,t,n){void 0===t?this.tree=e:(this.tree=new c,this.tree.insert(new u(e,t,n)))},values:function(){return this.tree.values()},map:function(e){return new h(this.tree.map(e))},intersecting:function(e,t){return this.tree.intersecting(e,t)},first:function(){return this.tree.first().value},last:function(){return this.tree.last().value},insert:function(e,t,n){return this.tree.insert(new u(e,t,n))},value:function(e,t,n){var i,r,o,a,s,l,d,u,c;if(void 0===n)return void 0===t&&(t=e),this.intersecting(e,t)[0].value;if(i=this.tree.intersecting(e-1,t+1),i.length)for(r=i[0],o=i[i.length-1],r.end<e&&(r.value===n?e=r.start:i.shift()),o.start>t&&(o.value===n?t=o.end:i.pop()),a=0,s=i.length;a<s;a++)l=i[a],d=l.value,u=l.start,c=l.end,this.tree.remove(l),u<e&&(d!==n?this.insert(u,e-1,d):e=u),c>t&&(d!==n?this.insert(t+1,c,d):t=c);this.insert(e,t,n)},expandedValues:function(e,t){var n,i=this.intersecting(e,t),r=[],o=0;for(n=e;n<=t;n++)i[o].end<n&&o++,r.push({index:n-e,value:i[o].value});return r},sortedIndices:function(e,t,n,i){var r=this.expandedValues(e,t),o=function(e,t){return e.value===t.value?e.index-t.index:n(e.value,t.value)};return i&&(o=function(e,t){var r=i[e.index],o=i[t.index];return r.value===o.value?n(e.value,t.value):e.index-t.index}),r.sort(o),r},sort:function(e,t,n){var i,r,o;if(1!==this.intersecting(e,t).length)for(i=this.expandedValues(e,t),r=0,o=n.length;r<o;r++)this.value(r+e,r+e,i[n[r].index].value)},copy:function(e,t,n){var i,r,o,a,s,l=this.intersecting(e,t),d=n;for(r=0,o=l.length;r<o;r++)a=l[r].start,a<e&&(a=e),s=l[r].end,s>t&&(s=t),i=d+(s-a),this.value(d,i,l[r].value),d=++i},iterator:function(e,t){return new p(e,t,this.intersecting(e,t))},getState:function(){return this.tree.clone()},setState:function(e){this.tree=e.clone()}}),p=e.Class.extend({init:function(e,t,n){this.start=e,this.end=t,this.index=0,this.ranges=n},unique:function(){return this.ranges.map(function(e){return e.value})},at:function(e){for(;this.ranges[this.index]&&this.ranges[this.index].end<e;)this.index++;return this.ranges[this.index]&&this.ranges[this.index].value},forEach:function(e){for(var t=this.start;t<=this.end;t++)e(this.at(t),t);this.index=0}}),f=h.extend({init:function(e,t,n){this.tree=new c,this.range=new u(e,t,n)},intersecting:function(e,t){var n,i,r,o=this.tree.intersecting(e,t),a=[];if(!o.length)return[this.range];for(i=0,r=o.length;i<r;i++)n=o[i],n.start>e&&a.push(new u(e,n.start-1,this.range.value)),a.push(n),e=n.end+1;return n.end<t&&a.push(new u(n.end+1,t,this.range.value)),a},insert:function(e,t,n){n!==this.range.value&&this.tree.insert(new u(e,t,n))},lastRangeStart:function(){var e=this.tree.root;if(e===d)return this.range.start;for(;e.right!==d;)e=e.right;return e.value.end+1}}),e.spreadsheet.RangeTree=c,e.spreadsheet.RangeList=h,e.spreadsheet.SparseRangeList=f,e.spreadsheet.ValueRange=u)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/propertybag.min",["kendo.core.min"],e)}(function(){!function(e){function t(e){return e.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}function n(e){return e=e.clone(),e.value=e.value.deepClone(),e}function i(){var e=this.map(n);return e.clone=i,e}var r,o,a;e.support.browser.msie&&e.support.browser.version<9||(r=e.Class.extend({init:function(e){this.list=e},get:function(e){return this.parse(this.list.value(e,e))},set:function(e,t,n){void 0===n&&(n=t,t=e),this.list.value(e,t,n)},parse:function(e){return e},copy:function(e,t,n){this.list.copy(e,t,n)},iterator:function(e,t){return this.list.iterator(e,t)}}),o=r.extend({set:function(e,t,n){this.list.value(e,t,JSON.stringify(n))},parse:function(e){return JSON.parse(e)}}),a=r.extend({init:function(e,t){r.prototype.init.call(this,e),this.formats=t},set:function(n,i,r){r instanceof Date&&(r=e.spreadsheet.dateToNumber(r),this.formats.value(n,i)||this.formats.value(n,i,t(e.culture().calendar.patterns.d))),this.list.value(n,i,r)}}),e.spreadsheet.PropertyBag=e.Class.extend({specs:[{property:r,name:"format",value:null,sortable:!0,serializable:!0},{property:a,name:"value",value:null,sortable:!0,serializable:!0,depends:"format"},{property:r,name:"formula",value:null,sortable:!0,serializable:!0},{property:r,name:"background",value:null,sortable:!0,serializable:!0},{property:o,name:"vBorders",value:null,sortable:!1,serializable:!1},{property:o,name:"hBorders",value:null,sortable:!1,serializable:!1},{property:r,name:"color",value:null,sortable:!0,serializable:!0},{property:r,name:"fontFamily",value:null,sortable:!0,serializable:!0},{property:r,name:"underline",value:null,sortable:!0,serializable:!0},{property:r,name:"fontSize",value:null,sortable:!0,serializable:!0},{property:r,name:"italic",value:null,sortable:!0,serializable:!0},{property:r,name:"bold",value:null,sortable:!0,serializable:!0},{property:r,name:"textAlign",value:null,sortable:!0,serializable:!0},{property:r,name:"verticalAlign",value:null,sortable:!0,serializable:!0},{property:r,name:"wrap",value:null,sortable:!0,serializable:!0},{property:r,name:"validation",value:null,sortable:!1,serializable:!0},{property:r,name:"enable",value:null,sortable:!1,serializable:!0},{property:r,name:"link",value:null,sortable:!1,serializable:!0},{property:r,name:"editor",value:null,sortable:!1,serializable:!0}],init:function(t,n,r){r=r||{};var o=t*n-1;this.rowCount=t,this.columnCount=n,this.cellCount=o,this.properties={},this.lists={},this.specs.forEach(function(t){var n,i=t.name,a=r[i];void 0===a&&(a=t.value),this.lists[i]=new e.spreadsheet.SparseRangeList(0,o,a),n=this.properties[i]=new t.property(this.lists[i],this.lists[t.depends]),n.spec=t},this),this.lists.formula.tree.clone=i,this.lists.validation.tree.clone=i},getState:function(){var e={};return this.specs.forEach(function(t){e[t.name]=this.lists[t.name].getState()},this),e},setState:function(e){this.specs.forEach(function(t){this.lists[t.name].setState(e[t.name])},this)},get:function(e,t){if(void 0===t)return this.lists[e];switch(e){case"borderRight":t+=this.rowCount;case"borderLeft":e="vBorders";break;case"borderBottom":t++;case"borderTop":e="hBorders"}return t>this.cellCount?null:this.properties[e].get(t)},set:function(e,t,n,i){switch(e){case"borderRight":t+=this.rowCount,n+=this.rowCount;case"borderLeft":e="vBorders";break;case"borderBottom":t++,n++;case"borderTop":e="hBorders"}t<=n&&n<=this.cellCount&&this.properties[e].set(t,n,i)},fromJSON:function(e,t){var n,i;for(n=0;n<this.specs.length;n++)i=this.specs[n],i.serializable&&void 0!==t[i.name]&&this.set(i.name,e,e,t[i.name],!1);["borderLeft","borderRight","borderTop","borderBottom"].forEach(function(n){void 0!==t[n]&&this.set(n,e,e,t[n])},this)},copy:function(e,t,n){this.specs.forEach(function(i){this.properties[i.name].copy(e,t,n)},this)},iterator:function(e,t,n){var i=this.properties[e],r=i.iterator(t,n),o=r.at,a=this.cellCount;return r.at=function(e){return e>a?null:i.parse(o.call(r,e))},r.name=e,r.value=i.spec.value,r},sortable:function(){return this.specs.filter(function(e){return e.sortable}).map(function(e){return this.lists[e.name]},this)},iterators:function(e,t){return this.specs.reduce(function(n,i){return i.serializable&&n.push(this.iterator(i.name,e,t)),n}.bind(this),[])},forEach:function(e,t,n){function i(e,t,n){var i=t.at(n);i!==t.value&&(r[e]=i)}var r,o,a,s,l,d=this.iterators(e,t),u=this.iterator("hBorders",e,t+1),c=this.iterator("vBorders",e,t),h=this.iterator("vBorders",e+this.rowCount,t+this.rowCount);for(o=e;o<=t;o++){for(r={},a=0;a<d.length;a++)s=d[a],l=s.at(o),l!==s.value&&(r[s.name]=l);i("borderLeft",c,o),i("borderRight",h,o+this.rowCount),i("borderTop",u,o),(o+1)%this.rowCount&&i("borderBottom",u,o+1),n(r)}},forEachProperty:function(e){for(var t in this.properties)e(this.properties[t])}}),e.spreadsheet.ALL_PROPERTIES=e.spreadsheet.PropertyBag.prototype.specs.reduce(function(e,t){return t.serializable&&e.push(t.name),e},["borderTop","borderRight","borderBottom","borderLeft"]))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/references.min",["kendo.core.min"],e)}(function(){"use strict";function e(t){var n=Math.floor(t/26)-1;return(n>=0?e(n):"")+String.fromCharCode(65+t%26)}function t(e){return/^[a-z0-9_]*$/i.test(e)?e:"'"+e.replace(/\x27/g,"\\'")+"'"}function n(n,i,r,o){var a="";return++i,isFinite(i)?null==o||2&o||(i="$"+i):i="",isFinite(r)?(a=e(r),null==o||1&o||(a="$"+a)):r="",n?t(n)+"!"+a+i:a+i}var i,r,o,a,s,l,d,u;kendo.support.browser.msie&&kendo.support.browser.version<9||(i=kendo.spreadsheet,r=kendo.Class,o=r.extend({type:"ref",sheet:"",clone:function(){return this},hasSheet:function(){return this._hasSheet},simplify:function(){return this},setSheet:function(e,t){return this.sheet=e,null!=t&&(this._hasSheet=t),this},absolute:function(){return this},relative:function(){return this},adjust:function(){return this},toString:function(){return this.relative(0,0,3,3).print(0,0)},forEach:function(e,t){e.call(t,this)},map:function(e,t){return e.call(t,this)},intersects:function(e){return this.intersect(e)!==a},isCell:function(){return!1},toRow:function(){return this},toColumn:function(){return this},first:function(){return this},lastRange:function(){return this},size:function(){return 1},rangeAt:function(){return this;
},nextRangeIndex:function(){return 0},previousRangeIndex:function(){return 0},eq:function(e){var t,n,i,r,o=this,s=e;if(o===a||s===a)return o===s;if((s instanceof l||s instanceof d&&!(o instanceof l))&&(o=e,s=this),o instanceof l)return s=s.simplify(),s instanceof l&&o.row==s.row&&o.col==s.col&&o.sheet==s.sheet;if(o instanceof d){if(s instanceof d)return s.topLeft.eq(o.topLeft)&&s.bottomRight.eq(o.bottomRight);if(s instanceof u)return s.single()&&o.eq(s.refs[0])}else if(o instanceof u&&s instanceof u){if(t=o.refs,n=s.refs,t.length!=n.length)return!1;for(i=0,r=t.length;i<r;i++)if(!t[i].eq(n[i]))return!1;return!0}return o===s},concat:function(e){return new u([this,e])},replaceAt:function(e,t){return t},forEachColumnIndex:function(e){this.forEachAxisIndex("col",e)},forEachRowIndex:function(e){this.forEachAxisIndex("row",e)},forEachAxisIndex:function(e,t){var n=[],i="row"===e?"forEachRow":"forEachColumn";this[i](function(t){var i=t.first()[e];n.indexOf(i)===-1&&n.push(i)}),n.sort(function(e,t){return e>t?1:e<t?-1:0}).forEach(t)},valid:function(){return!1},renameSheet:function(e,t){if(this.sheet&&this.sheet.toLowerCase()==e.toLowerCase())return this.sheet=t,!0}}),o.display=n,a=new(o.extend({init:function(){},print:function(){return"#NULL!"},eq:function(e){return e===this},forEach:function(){}})),s=o.extend({ref:"name",init:function(e){this.name=e},clone:function(){return new s(this.name).setSheet(this.sheet,this.hasSheet())},print:function(){var e=t(this.name);return this.hasSheet()&&(e=t(this.sheet)+"!"+e),e}}),l=o.extend({ref:"cell",init:function(e,t,n){this.row=e,this.col=t,this.rel=n||0},clone:function(){return new l(this.row,this.col,this.rel).setSheet(this.sheet,this.hasSheet())},intersect:function(e){return e instanceof l?this.eq(e)?this:a:e.intersect(this)},print:function(e,i,r){var o,a,s=this.col,l=this.row,d=this.rel;return null==e&&d?(a=this.hasSheet()?t(this.sheet)+"!":"",s=isFinite(s)?1&d?"C["+s+"]":"C"+(s+1):"",l=isFinite(l)?2&d?"R["+l+"]":"R"+(l+1):"",a+l+s):(o=this.absolute(e,i),r?(l=o.row%1048576,s=o.col%16384,l<0&&(l+=1048576),s<0&&(s+=16384),n(this._hasSheet&&this.sheet,l,s,d)):o.valid()?n(this._hasSheet&&this.sheet,o.row,o.col,d):"#REF!")},absolute:function(e,t){var n=this.clone();return n.rel&!1?n:(1&n.rel&&(n.col=(n.col+t)%16384),2&n.rel&&(n.row=(n.row+e)%1048576),n.rel=0,n)},toRangeRef:function(){return new d(this,this)},relative:function(e,t,n){var i,r;return null==n&&(n=this.rel),i=2&n?this.row-e:this.row,r=1&n?this.col-t:this.col,new l(i,r,n).setSheet(this.sheet,this.hasSheet())},height:function(){return 1},width:function(){return 1},toString:function(){return n(null,this.row,this.col,3)},isCell:function(){return!0},leftColumn:function(){return this},rightColumn:function(){return this},topRow:function(){return this},bottomRow:function(){return this},forEachRow:function(e){e(this.toRangeRef())},forEachColumn:function(e){e(this.toRangeRef())},adjust:function(e,t,n,i,r,o,s){var l=this.absolute(e,t);if(r){if(l.row>=o){if(s<0&&l.row<o-s)return a;l.row+=s}}else if(l.col>=o){if(s<0&&l.col<o-s)return a;l.col+=s}return null!=n&&null!=i&&(l=l.relative(n,i,this.rel)),l},valid:function(){if(this.rel)throw Error("valid() called on relative reference");var e=this.col,t=this.row;return!(isFinite(e)&&e<0||isFinite(t)&&t<0)}}),d=o.extend({ref:"range",init:function(e,t){e._hasSheet&&t._hasSheet&&e.sheet.toLowerCase()!=t.sheet.toLowerCase()&&(this.endSheet=t.sheet),this.topLeft=new l(e.row,e.col,e.rel),this.bottomRight=new l(t.row,t.col,t.rel),this.normalize()},clone:function(){return new d(this.topLeft.clone(),this.bottomRight.clone()).setSheet(this.sheet,this.hasSheet())},_containsRange:function(e){return this._containsCell(e.topLeft)&&this._containsCell(e.bottomRight)},_containsCell:function(e){return e.sheet==this.sheet&&e.row>=this.topLeft.row&&e.col>=this.topLeft.col&&e.row<=this.bottomRight.row&&e.col<=this.bottomRight.col},contains:function(e){if(e instanceof Array){var t=this;return e.some(function(e){return t.contains(e)})}return e instanceof l?this._containsCell(e):e instanceof d&&this._containsRange(e)},_intersectRange:function(e){var t,n,i,r,o,s,u,c;return this.sheet!=e.sheet?a:(t=this.topLeft.col,n=this.topLeft.row,i=this.bottomRight.col,r=this.bottomRight.row,o=e.topLeft.col,s=e.topLeft.row,u=e.bottomRight.col,c=e.bottomRight.row,t<=u&&o<=i&&n<=c&&s<=r?new d(new l(Math.max(n,s),Math.max(t,o)),new l(Math.min(r,c),Math.min(i,u))).setSheet(this.sheet,this.hasSheet()):a)},intersect:function(e){return e instanceof l?this._containsCell(e)?e:a:e instanceof d?this._intersectRange(e).simplify():e instanceof u?e.intersect(this):a},simplify:function(){return this.isCell()?new l(this.topLeft.row,this.topLeft.col,this.topLeft.rel).setSheet(this.sheet,this.hasSheet()):this},normalize:function(){var e,t=this.topLeft,n=this.bottomRight,i=t.row,r=t.col,o=n.row,a=n.col,s=2&t.rel,d=1&t.rel,u=2&n.rel,c=1&n.rel,h=!1;return i>o&&(h=!0,e=i,i=o,o=e,e=s,s=u,u=e),r>a&&(h=!0,e=r,r=a,a=e,e=d,d=c,c=e),h&&(this.topLeft=new l(i,r,d|s),this.bottomRight=new l(o,a,c|u)),this},print:function(e,n,i){if(i||this.absolute(e,n).valid()){var r=this.topLeft.print(e,n,i)+":"+this.bottomRight.print(e,n,i);return this.hasSheet()&&(r=t(this.sheet)+(this.endSheet?":"+t(this.endSheet):"")+"!"+r),r}return"#REF!"},absolute:function(e,t){return new d(this.topLeft.absolute(e,t),this.bottomRight.absolute(e,t)).setSheet(this.sheet,this.hasSheet())},relative:function(e,t,n,i){return null==i&&(i=n),new d(this.topLeft.relative(e,t,n),this.bottomRight.relative(e,t,i)).setSheet(this.sheet,this.hasSheet())},height:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw Error("Mixed relative/absolute references");return this.bottomRight.row-this.topLeft.row+1},width:function(){if(this.topLeft.rel!=this.bottomRight.rel)throw Error("Mixed relative/absolute references");return this.bottomRight.col-this.topLeft.col+1},collapse:function(){return this.topLeft.toRangeRef()},leftColumn:function(){return new d(this.topLeft,new l(this.bottomRight.row,this.topLeft.col))},rightColumn:function(){return new d(new l(this.topLeft.row,this.bottomRight.col),this.bottomRight)},topRow:function(){return new d(this.topLeft,new l(this.topLeft.row,this.bottomRight.col))},bottomRow:function(){return new d(new l(this.bottomRight.row,this.topLeft.col),this.bottomRight)},toRangeRef:function(){return this},toRow:function(e){return e+=Math.max(0,this.topLeft.row),new d(new l(e,this.topLeft.col),new l(e,this.bottomRight.col)).setSheet(this.sheet,this.hasSheet())},toColumn:function(e){return e+=Math.max(0,this.topLeft.col),new d(new l(this.topLeft.row,e),new l(this.bottomRight.row,e)).setSheet(this.sheet,this.hasSheet())},toCell:function(e,t){return e+=Math.max(0,this.topLeft.row),t+=Math.max(0,this.topLeft.col),new l(e,t,0).setSheet(this.sheet,this.hasSheet())},forEachRow:function(e){var t,n=this.topLeft.row,i=this.bottomRight.row,r=this.topLeft.col,o=this.bottomRight.col;for(t=n;t<=i;t++)e(new d(new l(t,r),new l(t,o)))},forEachColumn:function(e){var t,n=this.topLeft.row,i=this.bottomRight.row,r=this.topLeft.col,o=this.bottomRight.col;for(t=r;t<=o;t++)e(new d(new l(n,t),new l(i,t)))},intersecting:function(e){return e.filter(function(e){return e.toRangeRef().intersects(this)},this)},union:function(e,t){var n,i=this.intersecting(e),r=this.topLeft.row,o=this.topLeft.col,a=this.bottomRight.row,s=this.bottomRight.col,u=!1;return i.forEach(function(e){e=e.toRangeRef(),e.topLeft.row<r&&(u=!0,r=e.topLeft.row),e.topLeft.col<o&&(u=!0,o=e.topLeft.col),e.bottomRight.row>a&&(u=!0,a=e.bottomRight.row),e.bottomRight.col>s&&(u=!0,s=e.bottomRight.col),t&&t(e)}),n=new d(new l(r,o),new l(a,s)),u?n.union(e,t):n},resize:function(e){function t(e){return e||0}var n=Math.max.bind(Math,0),i=this.topLeft.row+t(e.top),r=this.topLeft.col+t(e.left),o=this.bottomRight.row+t(e.bottom),s=this.bottomRight.col+t(e.right);return r<0&&s<0||i<0&&o<0?a:i<=o&&r<=s?new d(new l(n(i),n(r)),new l(n(o),n(s))):a},move:function(e,t){return new d(new l(this.topLeft.row+e,this.topLeft.col+t),new l(this.bottomRight.row+e,this.bottomRight.col+t))},first:function(){return this.topLeft.clone().setSheet(this.sheet,this.hasSheet())},isCell:function(){return!this.endSheet&&this.topLeft.eq(this.bottomRight)},toString:function(){return this.topLeft+":"+this.bottomRight},adjust:function(e,t,n,i,r,o,s){var l=this.topLeft.adjust(e,t,n,i,r,o,s),u=this.bottomRight.adjust(e,t,n,i,r,o,s);return l===a&&u===a?a:(l===a?(l=this.topLeft.absolute(e,t),r?l.row=o:l.col=o,null!=n&&null!=i&&(l=l.relative(n,i,this.topLeft.rel))):u===a&&(u=this.bottomRight.absolute(e,t),r?u.row=o-1:u.col=o-1,null!=n&&null!=i&&(u=u.relative(n,i,this.bottomRight.rel))),new d(l,u).setSheet(this.sheet,this.hasSheet()).simplify())},valid:function(){return this.topLeft.valid()&&this.bottomRight.valid()}}),u=o.extend({init:function(e){this.refs=e,this.length=e.length},clone:function(){return new u(this.refs.slice())},intersect:function(e){var t,n,i=[];for(t=0;t<this.length;++t)n=e.intersect(this.refs[t]),n!==a&&i.push(n);return i.length>0?new u(i).simplify():a},simplify:function(){var e=new u(this.refs.reduce(function(e,t){return t=t.simplify(),t!==a&&e.push(t),e},[]));return e.empty()?a:e.single()?e.refs[0]:e},absolute:function(e,t){return new u(this.refs.map(function(n){return n.absolute(e,t)}))},forEach:function(e,t){this.refs.forEach(function(n){n instanceof u?n.forEach(e,t):e.call(t,n)},t)},toRangeRef:function(){return this.refs[0].toRangeRef()},contains:function(e){return this.refs.some(function(t){return t.contains(e)})},map:function(e,t){var n=[];return this.forEach(function(i){n.push(e.call(t,i))}),new u(n)},first:function(){return this.refs[0].first()},lastRange:function(){return this.refs[this.length-1]},size:function(){return this.length},single:function(){return 1==this.length},empty:function(){return 0===this.length},isCell:function(){return this.single()&&this.refs[0].isCell()},rangeAt:function(e){return this.refs[e]},nextRangeIndex:function(e){return e===this.length-1?0:e+1},previousRangeIndex:function(e){return 0===e?this.length-1:e-1},concat:function(e){return new u(this.refs.concat([e]))},print:function(e,t,n){return this.refs.map(function(i){return i.print(e,t,n)}).join(",")},replaceAt:function(e,t){var n=this.refs.slice();return n.splice(e,1,t),new u(n)},leftColumn:function(){return this.map(function(e){return e.leftColumn()})},rightColumn:function(){return this.map(function(e){return e.rightColumn()})},topRow:function(){return this.map(function(e){return e.topRow()})},bottomRow:function(){return this.map(function(e){return e.bottomRow()})},forEachRow:function(e){this.forEach(function(t){t.forEachRow(e)})},forEachColumn:function(e){this.forEach(function(t){t.forEachColumn(e)})},adjust:function(e,t,n,i,r,o,a){return this.map(function(s){return s.adjust(e,t,n,i,r,o,a)}).simplify()},toString:function(){return this.refs.map(function(e){return""+e}).join(", ")},valid:function(){for(var e=this.refs.length;--e>=0;)if(this.refs[e].valid())return!1;return!0},renameSheet:function(e,t){this.refs.forEach(function(n){n.renameSheet(e,t)})}}),i.NULLREF=a,i.SHEETREF=new d(new l(0,0),new l(1/0,1/0)),i.FIRSTREF=new l(0,0),i.Ref=o,i.NameRef=s,i.CellRef=l,i.RangeRef=d,i.UnionRef=u,i.SHEETREF.print=function(){return"#SHEET"})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/autofillcalculator.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.Class.extend({init:function(e){this._grid=e},rectIsVertical:function(e,t,n,i){var r=this._grid.rectangle(e.toRangeRef()),o=this._grid.rectangle(t.toRangeRef());return Math.abs(o[i]-r[i])>Math.abs(r[n]-o[n])},autoFillDest:function(e,i){var r,o,a,s,l,d,u,c=e.topLeft,h=e.bottomRight,p=i.row>=c.row,f=i.col>=c.col;return r=p?f?4:3:f?2:1,4===r?(o=c,a=h,l=i.row>a.row||i.col>a.col,l&&(i=new n(Math.max(i.row,a.row),Math.max(i.col,a.col))),s=this.rectIsVertical(a,i,"right","bottom")?new n(i.row,a.col):new n(a.row,i.col)):3===r?(d=new n(c.col,h.row),i.row>h.row&&this.rectIsVertical(d,i,"left","bottom")?(o=c,s=new n(i.row,h.col)):(o=h,s=new n(c.row,i.col))):2===r?(u=new n(c.row,h.col),i.col>h.col&&!this.rectIsVertical(u,i,"right","top")?(o=c,s=new n(h.row,i.col)):(o=h,s=new n(i.row,c.col))):(o=h,s=this.rectIsVertical(c,i,"left","top")?new n(i.row,c.col):new n(c.row,i.col)),this._grid.normalize(new t(o,s))}}),e.spreadsheet.AutoFillCalculator=i)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/navigator.min",["kendo.core.min","spreadsheet/autofillcalculator.min"],e)}(function(){!function(e){var t,n,i,r;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,n=e.spreadsheet.CellRef,i=e.Class.extend({init:function(e,t,n,i){this.rangeGetter=n,this.prevLeft=function(n){var r=i(this.range(n)),o=this.range(t.prevVisible(r.topLeft[e]));return i(o).topLeft[e]},this.nextRight=function(n){var r=i(this.range(n)),o=this.range(t.nextVisible(r.bottomRight[e]));return i(o).bottomRight[e]},this.nextLeft=function(n){var r=i(this.range(n));return t.nextVisible(r.bottomRight[e])},this.prevRight=function(n){var r=i(this.range(n));return t.prevVisible(r.topLeft[e])}},boundary:function(e,t){this.top=e,this.bottom=t},range:function(e){return this.rangeGetter(e,this.top,this.bottom)}}),r=e.Class.extend({init:function(t){this._sheet=t,this.columns=this._sheet._grid._columns,this.autoFillCalculator=new e.spreadsheet.AutoFillCalculator(t._grid),this.colEdge=new i("col",this._sheet._grid._columns,this.columnRange.bind(this),this.union.bind(this)),this.rowEdge=new i("row",this._sheet._grid._rows,this.rowRange.bind(this),this.union.bind(this))},height:function(e){this._viewPortHeight=e},union:function(e){return this._sheet.unionWithMerged(e)},columnRange:function(e,t,n){return this._sheet._ref(t,e,n-t,1)},rowRange:function(e,t,n){return this._sheet._ref(e,t,1,n-t)},selectionIncludesMergedCells:function(){return this._sheet.select().contains(this._sheet._mergedCells)},setSelectionValue:function(e){var t=this._sheet.selection();setTimeout(function(){t.value(e())})},selectAll:function(){this._sheet.select(this._sheet._sheetRef)},select:function(e,t,n){e=this.refForMode(e,t),n&&(e=this._sheet.select().concat(e)),this._sheet.select(e)},refForMode:function(e,t){var n=this._sheet._grid;switch(t){case"range":e=n.normalize(e);break;case"row":e=n.rowRef(e.row);break;case"column":e=n.colRef(e.col);break;case"sheet":e=this._sheet._sheetRef}return e},startSelection:function(e,n,i,r){if("autofill"==n)this._sheet.startAutoFill();else if(r&&"range"==n){var o=new t(this._sheet.activeCell().first(),e);this._sheet.select(o,!1,!1),this._sheet.startSelection()}else this._sheet.startSelection(),this.select(e,n,i)},completeSelection:function(){this._sheet.completeSelection()},selectForContextMenu:function(e,t){var n=this._sheet;n.select().contains(this.refForMode(e,t))||this.select(e,t)},modifySelection:function(e){var n,i,r=this.determineDirection(e),o=this._sheet,a=this._viewPortHeight,s=o._grid._rows,l=o._grid._columns,d=o.currentOriginalSelectionRange(),u=o.select().toRangeRef(),c=o.activeCell(),h=d.topLeft.clone(),p=d.bottomRight.clone();switch(this.colEdge.boundary(u.topLeft.row,u.bottomRight.row),this.rowEdge.boundary(u.topLeft.col,u.bottomRight.col),r){case"expand-left":h.col=this.colEdge.prevLeft(h.col),n=h;break;case"shrink-right":h.col=this.colEdge.nextLeft(h.col),n=h;break;case"expand-right":p.col=this.colEdge.nextRight(p.col),n=p;break;case"shrink-left":p.col=this.colEdge.prevRight(p.col),n=p;break;case"expand-up":h.row=this.rowEdge.prevLeft(h.row),n=h;break;case"shrink-down":h.row=this.rowEdge.nextLeft(h.row),n=h;break;case"expand-down":p.row=this.rowEdge.nextRight(p.row),n=p;break;case"shrink-up":p.row=this.rowEdge.prevRight(p.row),n=p;break;case"expand-page-up":h.row=s.prevPage(h.row,a);break;case"shrink-page-up":p.row=s.prevPage(p.row,a);break;case"expand-page-down":p.row=s.nextPage(p.row,a);break;case"shrink-page-down":h.row=s.nextPage(h.row,a);break;case"first-col":h.col=l.firstVisible(),p.col=c.bottomRight.col,n=h;break;case"last-col":p.col=l.lastVisible(),h.col=c.topLeft.col,n=p;break;case"first-row":h.row=s.firstVisible(),p.row=c.bottomRight.row,n=h;break;case"last-row":p.row=s.lastVisible(),h.row=c.topLeft.row,n=p;break;case"last":p.row=s.lastVisible(),p.col=l.lastVisible(),h=c.topLeft,n=p;break;case"first":h.row=s.firstVisible(),h.col=l.firstVisible(),p=c.bottomRight,n=h}return i=new t(h,p),this.union(i).intersects(c)?(n&&o.focus(n),void this.updateCurrentSelectionRange(i)):void this.modifySelection(r.replace("shrink","expand"))},moveActiveCell:function(e){var t=this._sheet,i=t.activeCell(),r=i.topLeft,o=i.bottomRight,a=t.originalActiveCell(),s=t._grid._rows,l=t._grid._columns,d=a.row,u=a.col;switch(e){case"left":u=l.prevVisible(r.col);break;case"up":d=s.prevVisible(r.row);break;case"right":u=l.nextVisible(o.col);break;case"down":d=s.nextVisible(o.row);break;case"first-col":u=l.firstVisible();break;case"last-col":u=l.lastVisible();break;case"first-row":d=s.firstVisible();break;case"last-row":d=s.lastVisible();break;case"last":d=s.lastVisible(),u=l.lastVisible();break;case"first":d=s.firstVisible(),u=l.firstVisible();break;case"next-page":d=s.nextPage(o.row,this._viewPortHeight);break;case"prev-page":d=s.prevPage(o.row,this._viewPortHeight)}t.select(new n(d,u))},navigateInSelection:function(e){for(var t,i=this._sheet,r=i.activeCell(),o=r.topLeft,a=i.originalActiveCell(),s=i._grid._rows,l=i._grid._columns,d=a.row,u=a.col,c=i.currentNavigationRange(),h=c.topLeft,p=c.bottomRight,f=!1,m=o.col,g=o.row;!f;){switch(t=new n(d,u),e){case"next":p.eq(t)?(c=i.nextNavigationRange(),d=c.topLeft.row,u=c.topLeft.col):(u=l.nextVisible(m,!0),u>p.col&&(u=h.col,d=s.nextVisible(d,!0)));break;case"previous":h.eq(t)?(c=i.previousNavigationRange(),d=c.bottomRight.row,u=c.bottomRight.col):(u=l.prevVisible(m,!0),u<h.col&&(u=p.col,d=s.prevVisible(d,!0)));break;case"lower":p.eq(t)?(c=i.nextNavigationRange(),d=c.topLeft.row,u=c.topLeft.col):(d=s.nextVisible(g,!0),d>p.row&&(d=h.row,u=l.nextVisible(u,!0)));break;case"upper":h.eq(t)?(c=i.previousNavigationRange(),d=c.bottomRight.row,u=c.bottomRight.col):(d=s.prevVisible(g,!0),d<h.row&&(d=p.row,u=l.prevVisible(u,!0)));break;default:throw Error("Unknown entry navigation: "+e)}f=!this.shouldSkip(d,u),m=u,g=d}i.singleCellSelection()?i.select(new n(d,u)):i.activeCell(new n(d,u))},extendSelection:function(e,n){var i,r=this._sheet,o=r._grid;return"autofill"===n?void this.resizeAutoFill(e):("range"===n?e=o.normalize(e):"row"===n?e=o.rowRef(e.row).bottomRight:"column"===n&&(e=o.colRef(e.col).bottomRight),i=r.originalActiveCell().toRangeRef(),void this.updateCurrentSelectionRange(new t(i.topLeft,e)))},shouldSkip:function(e,t){var i=new n(e,t),r=!1;return this._sheet.forEachMergedCell(function(e){e.intersects(i)&&!e.collapse().eq(i)&&(r=!0)}),r},resizeAutoFill:function(e){var t,n,i,r,o,a=this._sheet,s=a.select(),l=a._autoFillOrigin,d=this.autoFillCalculator.autoFillDest(s,e),u=this.punch(s,d);u||(r=a.range(d)._previewFillFrom(a.range(l)),r&&(n=r.direction,o=r.props,0===n||1==n?(i=o[o.length-1],t=i[i.length-1].value):2===n?(i=o[0],t=i[i.length-1].value):3===n&&(i=o[o.length-1],t=i[0].value))),a.updateAutoFill(d,u,t,n)},determineDirection:function(e){var t=this._sheet.currentSelectionRange(),n=this._sheet.activeCell(),i=n.topLeft.col==t.topLeft.col,r=n.bottomRight.col==t.bottomRight.col,o=n.topLeft.row==t.topLeft.row,a=n.bottomRight.row==t.bottomRight.row;switch(e){case"left":e=r?"expand-left":"shrink-left";break;case"right":e=i?"expand-right":"shrink-right";break;case"up":e=a?"expand-up":"shrink-up";break;case"down":e=o?"expand-down":"shrink-down";break;case"prev-page":e=a?"expand-page-up":"shrink-page-up";break;case"next-page":e=o?"expand-page-down":"shrink-page-down"}return e},updateCurrentSelectionRange:function(e){var t=this._sheet;t.select(t.originalSelect().replaceAt(t.selectionRangeIndex(),e),!1)},punch:function(e,i){var r,o,a;return i.topLeft.eq(e.topLeft)&&(i.bottomRight.row<e.bottomRight.row?(o=this.rowEdge.nextRight(i.bottomRight.row),r=new t(new n(o,e.topLeft.col),e.bottomRight)):i.bottomRight.col<e.bottomRight.col&&(a=this.colEdge.nextRight(i.bottomRight.col),r=new t(new n(e.topLeft.row,a),e.bottomRight))),r}}),e.spreadsheet.SheetNavigator=r)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/axismanager.min",["kendo.core.min"],e)}(function(){!function(e){if(!(e.support.browser.msie&&e.support.browser.version<9)){var t=e.Class.extend({init:function(e){this._sheet=e},forEachSelectedColumn:function(e){var t=this._sheet;t.batch(function(){t.select().forEachColumnIndex(function(n,i){e(t,n,i)})},{layout:!0,recalc:!0})},forEachSelectedRow:function(e){var t=this._sheet;t.batch(function(){t.select().forEachRowIndex(function(n,i){e(t,n,i)})},{layout:!0,recalc:!0})},includesHiddenColumns:function(e){return this._sheet._grid._columns.includesHidden(e.topLeft.col,e.bottomRight.col)},includesHiddenRows:function(e){return this._sheet._grid._rows.includesHidden(e.topLeft.row,e.bottomRight.row)},selectionIncludesHiddenColumns:function(){return this.includesHiddenColumns(this._sheet.select())},selectionIncludesHiddenRows:function(){return this.includesHiddenRows(this._sheet.select())},deleteSelectedColumns:function(){var e=[];return this.forEachSelectedColumn(function(t,n,i){n-=i;var r=[];e.unshift({index:n,formulas:r,width:t.columnWidth(n)}),t._saveModifiedFormulas(r,function(){t.deleteColumn(n)})}),e},deleteSelectedRows:function(){var e=[];return this.forEachSelectedRow(function(t,n,i){n-=i;var r=[];e.unshift({index:n,formulas:r,height:t.rowHeight(n)}),t._saveModifiedFormulas(r,function(){t.deleteRow(n)})}),e},hideSelectedColumns:function(){var t,n,i,r,o,a,s;for(this.forEachSelectedColumn(function(e,t){e.hideColumn(t)}),t=this._sheet,n=t.select().toRangeRef(),i=n.topLeft.col,r=n.bottomRight.col,o=null;;){if(a=r<t._columns._count,s=i>=0,!s&&!a)break;if(a&&!t.isHiddenColumn(r)){o=r;break}if(s&&!t.isHiddenColumn(i)){o=i;break}i--,r++}null!==o&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(0,o),new e.spreadsheet.CellRef(t._rows._count-1,o)),t.range(n).select())},hideSelectedRows:function(){var t,n,i,r,o,a,s;for(this.forEachSelectedRow(function(e,t){e.hideRow(t)}),t=this._sheet,n=t.select().toRangeRef(),i=n.topLeft.row,r=n.bottomRight.row,o=null;;){if(a=r<t._rows._count,s=i>=0,!s&&!a)break;if(a&&!t.isHiddenRow(r)){o=r;break}if(s&&!t.isHiddenRow(i)){o=i;break}i--,r++}null!==o&&(n=new e.spreadsheet.RangeRef(new e.spreadsheet.CellRef(o,0),new e.spreadsheet.CellRef(o,t._columns._count-1)),t.range(n).select())},unhideSelectedColumns:function(){this.forEachSelectedColumn(function(e,t){e.unhideColumn(t)})},unhideSelectedRows:function(){this.forEachSelectedRow(function(e,t){e.unhideRow(t)})},preventAddRow:function(){var e=this._sheet.select().toRangeRef(),t=e.height();return this._sheet.preventInsertRow(0,t)},preventAddColumn:function(){var e=this._sheet.select().toRangeRef(),t=e.width();return this._sheet.preventInsertColumn(0,t)},addColumnLeft:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachColumnIndex(function(i){e||(e=i),t.insertColumn(e),++n})},{recalc:!0,layout:!0}),{base:e,count:n}},addColumnRight:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachColumnIndex(function(t){e=t+1,++n});for(var i=0;i<n;++i)t.insertColumn(e)},{recalc:!0,layout:!0}),{base:e,count:n}},addRowAbove:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachRowIndex(function(i){e||(e=i),t.insertRow(e),++n})},{recalc:!0,layout:!0}),{base:e,count:n}},addRowBelow:function(){var e,t=this._sheet,n=0;return t.batch(function(){t.select().forEachRowIndex(function(t){e=t+1,++n});for(var i=0;i<n;++i)t.insertRow(e)},{recalc:!0,layout:!0}),{base:e,count:n}}});e.spreadsheet.AxisManager=t}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/clipboard.min",["kendo.core.min"],e)}(function(){!function(e){function t(){var e=new d(0,0,0);return{ref:e,mergedCells:[],data:[],foreign:!0,origRef:e.toRangeRef()}}function n(e,t,n,i){var r,o=e.data||(e.data=[]);o[t]||(o[t]=[]),o[t][n]=i,r=e.origRef.bottomRight,r.row=Math.max(r.row,t),r.col=Math.max(r.col,n)}function i(e){return e.replace(/^-(?:ms|moz|webkit)-/,"")}function r(e){var t={};return["borderBottom","borderRight","borderLeft","borderTop"].forEach(function(n){t[n]="none"==e[n+"Style"]?null:{size:1,color:e[n+"Color"]}}),t}function o(e){var t=window.getComputedStyle(e),n=e.innerText,o=r(t),a={value:""===n?null:n,borderBottom:o.borderBottom,borderRight:o.borderRight,borderLeft:o.borderLeft,borderTop:o.borderTop,fontSize:parseInt(t["font-size"],10)};return"rgb(0, 0, 0)"!==t["background-color"]&&"rgba(0, 0, 0, 0)"!==t["background-color"]&&(a.background=t["background-color"]),"rgb(0, 0, 0)"!==t.color&&"rgba(0, 0, 0, 0)"!==t.color&&(a.color=t.color),"underline"==t["text-decoration"]&&(a.underline=!0),"italic"==t["font-style"]&&(a.italic=!0),"bold"==t["font-weight"]&&(a.bold=!0),"right"!==i(t["text-align"])&&(a.textAlign=i(t["text-align"])),"middle"!==t["vertical-align"]&&(a.verticalAlign=t["vertical-align"]),"normal"!==t["word-wrap"]&&(a.wrap=!0),a}function a(i){var r,a,s,l,u,c,h,p,f,m,g,v=t(),_=[],b=0,k=0;for(r=0;r<i.rows.length;++r)_.push([]);for(a=0;a<i.rows.length;++a,++b)for(s=i.rows[a],k=0,l=0;l<s.cells.length;++l){for(u=s.cells[l],c=u.rowSpan,h=u.colSpan;_[b][k];)k++;for(p=u.getAttribute("style"),f=/mso-ignore:colspan/.test(p),n(v,b,k,o(u)),(c>1||h>1&&!f)&&v.mergedCells.push(""+new e.spreadsheet.RangeRef(new d(b,k),new d(b+c-1,k+h-1))),m=b+c;--m>=b;)for(g=k+h;--g>=k;)m<_.length&&(_[m][g]=!0,m==b&&g==k||n(v,m,g,{}))}return v}function s(e){var i,r,o,a,s=t();if(e.indexOf("\t")===-1&&e.indexOf("\n")==-1)n(s,0,0,{value:e});else for(i=e.split("\n"),r=0;r<i.length;r++)for(o=i[r].split("\t"),a=0;a<o.length;a++)n(s,r,a,{value:o[a]});return s}var l,d,u;e.support.browser.msie&&e.support.browser.version<9||(l=e.jQuery,d=e.spreadsheet.CellRef,u=e.Class.extend({init:function(t){this._content={},this._externalContent={},this._internalContent={},this.workbook=t,this.origin=e.spreadsheet.NULLREF,this.iframe=document.createElement("iframe"),this.iframe.className="k-spreadsheet-clipboard-paste",this.menuInvoked=!1,this._uid=e.guid(),document.body.appendChild(this.iframe)},destroy:function(){document.body.removeChild(this.iframe)},canCopy:function(){var t={canCopy:!0},n=this.workbook.activeSheet().select();return n===e.spreadsheet.NULLREF&&(t.canCopy=!1),n instanceof e.spreadsheet.UnionRef&&(t.canCopy=!1,t.multiSelection=!0),this.menuInvoked&&(t.canCopy=!1,t.menuInvoked=!0),t},canPaste:function(){var e=this.workbook.activeSheet(),t=this.pasteRef(),n=e.range(t),i={canPaste:!0,pasteOnMerged:!1,pasteOnDisabled:!1};return n.enable()||(i.canPaste=!1,i.pasteOnDisabled=!0),t.eq(e.unionWithMerged(t))||(i.canPaste=!1,i.pasteOnMerged=!0),this.menuInvoked&&(i.canPaste=!1,i.menuInvoked=!0),(t.bottomRight.row>=e._rows._count||t.bottomRight.col>=e._columns._count)&&(i.canPaste=!1,i.overflow=!0),i},intersectsMerged:function(){var e,t=this.workbook.activeSheet();return this.parse(),this.origin=this._content.origRef,e=this.pasteRef(),!e.eq(t.unionWithMerged(e))},copy:function(){var e=this.workbook.activeSheet();this.origin=e.select(),this._internalContent=e.selection().getState(),delete this._externalContent.html,delete this._externalContent.plain},cut:function(){var e=this.workbook.activeSheet();this.copy(),e.range(e.select()).clear()},pasteRef:function(){var t,n,i,r,o=this.workbook.activeSheet();return this.origin===e.spreadsheet.NULLREF?o.select():(t=o.activeCell().first(),n=this.origin.first(),i=n.row-t.row,r=n.col-t.col,this.origin.relative(i,r,3))},paste:function(){var e=this.workbook.activeSheet(),t=this.pasteRef();e.range(t).setState(this._content,this),e.triggerChange({recalc:!0,ref:t})},external:function(e){return e&&(e.html||e.plain)?void(this._externalContent=e):this._externalContent},isExternal:function(){return!this._isInternal()},parse:function(){var e,n,i,r=t();this._isInternal()?r=this._internalContent:(e=this._externalContent,e.html?(n=this.iframe.contentWindow.document,n.open(),n.write(e.html),n.close(),i=n.querySelector("table"),r=i?a(i):s(e.plain)):r=s(e.plain),this.origin=r.origRef),this._content=r},_isInternal:function(){var e,t;return void 0===this._externalContent.html||(e=!!l("<div/>").html(this._externalContent.html).find("table.kendo-clipboard-"+this._uid).length,t=!!l("<div/>").html(this._externalContent.plain).find("table.kendo-clipboard-"+this._uid).length,e||t)}}),e.spreadsheet.Clipboard=u)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/range.min",["kendo.core.min","util/text-metrics.min","util/main.min"],e)}(function(){!function(e){function t(e,n,i){for(;e<=n&&i(e);)e++;if(e>n)return[];for(var r=e+1;r<=n;++r)if(i(r))return[{begin:e,end:r-1}].concat(t(r+1,n,i));return[{begin:e,end:n}]}function n(e){return e.replace(/M/g,"m").replace(/'/g,'"').replace(/tt/,"am/pm")}function i(t){return!/^=/.test(t)&&/number|percent/.test(e.spreadsheet.calc.parse(null,0,0,t).type)}function r(t,n,i,r){var o={baselineMarkerSize:0,width:r===!0?n+"px":"auto","font-size":(i||12)+"px","word-break":r===!0?"break-all":"normal","white-space":r===!0?"pre-wrap":"pre"};return e.util.measureText(t,o,{box:c,normalizeText:!1}).height}var o,a,s,l,d,u,c;e.support.browser.msie&&e.support.browser.version<9||(o=e.jQuery,a=e.spreadsheet.UnionRef,s=e.spreadsheet.CellRef,l=e.spreadsheet.RangeRef,d=["color","fontFamily","underline","italic","bold","textAlign","verticalAlign","background","format","link","editor","borderTop","borderRight","borderBottom","borderLeft"],u=e.Class.extend({init:function(e,t){this._sheet=t,this._ref=e},clone:function(){return new u(this._ref.clone(),this._sheet)},skipHiddenCells:function(){var e=[],n=this,i=n._sheet,r=i.isHiddenRow.bind(i),o=i.isHiddenColumn.bind(i);return n._ref.forEach(function(i){var a,d,u,c,h,p;for(i=n._normalize(i.toRangeRef()),a=i.topLeft,d=i.bottomRight,u=t(a.row,d.row,r),c=t(a.col,d.col,o),h=0;h<u.length;++h)for(p=0;p<c.length;++p)e.push(new l(new s(u[h].begin,c[p].begin),new s(u[h].end,c[p].end)))}),i.range(e.length>1?new a(e):e[0])},_normalize:function(e){return this._sheet._grid.normalize(e)},_set:function(e,t,n){var i=this,r=i._sheet;return i._ref.forEach(function(n){r._set(n.toRangeRef(),e,t)}),n||r.triggerChange({recalc:"formula"==e||"value"==e||"validation"==e,value:t,range:i,ref:i._ref}),i},_get:function(e){return this._sheet._get(this._ref.toRangeRef(),e)},_property:function(e,t){return void 0===t?this._get(e):this._set(e,t)},value:function(e){return void 0!==e&&this._set("formula",null,!0),this._property("value",e)},resize:function(e){var t=this._resizedRef(e);return new u(t,this._sheet)},_resizedRef:function(e){return this._ref.map(function(t){return t.toRangeRef().resize(e)})},input:function(t,r){var a,s,l,d,u,c,h;return r=o.extend({arrayFormula:!1},r),a=this._get("format"),void 0!==t?(l=this._ref.toRangeRef().topLeft,s=e.spreadsheet.calc.parse(this._sheet.name(),l.row,l.col,t,a),this._sheet.batch(function(){var i,o=null;"exp"==s.type?o=e.spreadsheet.calc.compile(s):"@"!=a?(i=a&&e.spreadsheet.formatting.type(s.value,a),"date"==s.type&&"date"!=i?this.format(s.format||n(e.culture().calendar.patterns.d)):"percent"==s.type&&"percent"!=i?this.format(100*s.value==(100*s.value|0)?"0%":"0.00%"):s.format&&(!a||s.currency||"number"==i&&"number"==s.type&&s.format.length>a.length)&&this.format(s.format)):"string"!=s.type&&(s.value=t),this.formula(o,r.arrayFormula),o||this.value(s.value)}.bind(this),{recalc:!0,value:t,ref:this._ref,editorChange:this._sheet.isInEditMode()}),this):(t=this._get("value"),d=this._get("formula"),u=a&&!d&&e.spreadsheet.formatting.type(t,a),
d?t="="+d:a&&"date"==u&&(c=e.spreadsheet.formatting.text(t,a),s=e.spreadsheet.calc.parse(null,null,null,c,a),h=e.spreadsheet.formatting.text(s.value,a),c==h)?t=c:"date"===u?t=e.toString(e.spreadsheet.numberToDate(t),e.culture().calendar.patterns.d):"percent"===u?t=100*t+"%":"string"==typeof t&&(/^[=']/.test(t)||/^(?:true|false)$/i.test(t)||i(t))&&(t="'"+t),t)},enable:function(t){return void 0===t?!e.util.withExit(function(e){this._sheet.forEach(this._ref,function(t,n,i){i.enable===!1&&e(!0)})},this):this._property("enable",t)},formula:function(e,t){var n,i,r=this;return void 0===e?(n=r._get("formula"),n?""+n:null):(t?(i=this._ref.toRangeRef(),e=r._sheet.range(i.topLeft)._set("formula",e)._get("formula"),e&&e.setArrayFormulaRange(i)):r._set("formula",e),r)},intersectingArrayFormula:function(){var t=this._ref.clone().simplify().setSheet(this._sheet.name());return e.util.withExit(function(n){this._sheet._forFormulas(function(i){var r=i.arrayFormulaRange;r&&(r=t.intersect(r))!==e.spreadsheet.NULLREF&&n({formula:i,intersection:r})})},this)},canEditArrayFormula:function(){var e=this.intersectingArrayFormula();return!e||e.formula.arrayFormulaRange.eq(e.intersection)},validation:function(e){if(void 0===e){var t=this._get("validation");return t?t.toJSON():null}return this._property("validation",e)},_getValidationState:function(){var e,t,n,i=this._ref.toRangeRef(),r=i.topLeft.row,o=i.topLeft.col,a=i.bottomRight.row,s=i.bottomRight.col;for(e=o;e<=s;e++)for(t=r;t<=a;t++)if(n=this._sheet._validation(t,e),n&&"reject"===n.type&&n.value===!1)return n;return!1},merge:function(){return this._ref=this._sheet._merge(this._ref),this},unmerge:function(){var e=this._sheet._mergedCells;return this._ref.forEach(function(t){t.toRangeRef().intersecting(e).forEach(function(t){e.splice(e.indexOf(t),1)})}),this._sheet.triggerChange({}),this},select:function(){return this._sheet.select(this._ref),this},values:function(t){var n,i,r,o,s,l,d,u,c,h;if(this._ref instanceof a)throw Error("Unsupported for multiple ranges.");if(this._ref===e.spreadsheet.NULLREF){if(void 0!==t)throw Error("Unsupported for NULLREF.");return[]}if(n=this._ref.toRangeRef(),i=n.topLeft.row,r=n.topLeft.col,o=n.bottomRight.row,s=n.bottomRight.col,void 0===t){for(t=Array(n.height()),u=0;u<t.length;u++)t[u]=Array(n.width());for(l=r;l<=s;l++)for(d=i;d<=o;d++)t[d-i][l-r]=this._sheet._value(d,l);return t}for(this._sheet._set(n,"formula",null),l=r;l<=s;l++)for(d=i;d<=o;d++)c=t[d-i],c&&(h=c[l-r],void 0!==h&&this._sheet._value(d,l,h));return this._sheet.triggerChange({recalc:!0,ref:n}),this},_properties:function(t){var n,i,r,o,s,l,d,u,c,h,p;if(this._ref instanceof a)throw Error("Unsupported for multiple ranges.");if(this._ref===e.spreadsheet.NULLREF){if(void 0!==t)throw Error("Unsupported for NULLREF.");return[]}if(n=this._ref.toRangeRef(),i=n.topLeft.row,r=n.topLeft.col,o=n.bottomRight.row,s=n.bottomRight.col,u=this._sheet,void 0===t)return t=Array(n.height()),u.forEach(n,function(e,n,o){e-=i,n-=r;var a=t[e]||(t[e]=[]);a[n]=o}),t;for(n=n.clone(),h=function(e){var t=c[e];n.topLeft.row=n.bottomRight.row=d,n.topLeft.col=n.bottomRight.col=l,"value"==e&&u._set(n,"formula",null),u._set(n,e,t)},l=r;l<=s;l++)if(!u.isHiddenColumn(l))for(d=i;d<=o;d++)p=t[d-i],p&&!u.isHiddenRow(d)&&(c=p[l-r],c&&Object.keys(c).forEach(h));return u.triggerChange({recalc:!0,ref:this._ref}),this},clear:function(e){var t,n,i;return e=e||{},t=e.clearAll||!Object.keys(e).length,n=this._sheet,i={recalc:t||e.contentsOnly,ref:this._ref},n.batch(function(){i.recalc&&this.formula(null),t&&this.validation(null),(t||e.formatOnly)&&(d.forEach(function(t){e.keepBorders&&/^border/i.test(t)||this[t](null)}.bind(this)),this.unmerge())}.bind(this),i),this},clearContent:function(){return this.clear({contentsOnly:!0})},clearFormat:function(){return this.clear({formatOnly:!0})},isSortable:function(){return!this.cantSort()},cantSort:function(){var t,n,i,r,o,l;if(this._ref instanceof a)return{code:"cantSortMultipleSelection",message:"Unsupported for multiple ranges."};if(this._ref===e.spreadsheet.NULLREF)return{code:"cantSortNullRef",message:"Unsupported for NULLREF."};t=this._sheet._getMergedCells(this._ref.toRangeRef()),n=t.primary,i=t.secondary,r=null,o=null,l={};try{this._sheet.forEach(this,function(e,a){var d=new s(e,a).print(),u=n[d];if(u){if(null===r)r=u.width(),o=u.height();else if(r!=u.width()||o!=u.height())throw l}else if(!i[d]&&t.hasMerged)throw l})}catch(d){if(d!==l)throw d;return{code:"cantSortMixedCells",message:"Unsupported for range containing cells of different shapes."}}return!1},sort:function(e){var t=this.cantSort();if(t)throw Error(t.message);return void 0===e&&(e={column:0}),e=e instanceof Array?e:[e],this._sheet._sortBy(this._ref.toRangeRef(),e.map(function(e,t){return"number"==typeof e&&(e={column:e}),{index:void 0===e.column?t:e.column,ascending:void 0===e.ascending||e.ascending}})),this},isFilterable:function(){return!(this._ref instanceof a)},filter:function(e){if(this._ref instanceof a)throw Error("Unsupported for multiple ranges.");return e===!1?this.clearFilters():(e=e===!0?[]:e instanceof Array?e:[e],this._sheet._filterBy(this._ref.toRangeRef(),e.map(function(e,t){return{index:void 0===e.column?t:e.column,filter:e.filter}}))),this},clearFilter:function(e){this._sheet.clearFilter(e)},clearFilters:function(){var e,t=this._sheet.filter(),n=[];if(t){for(e=0;e<t.columns.length;e++)n.push(e);this._sheet.batch(function(){this.clearFilter(n),this._filter=null},{layout:!0,filter:!0})}},hasFilter:function(){var e=this._sheet.filter();return!!e},leftColumn:function(){return new u(this._ref.leftColumn(),this._sheet)},rightColumn:function(){return new u(this._ref.rightColumn(),this._sheet)},topRow:function(){return new u(this._ref.topRow(),this._sheet)},bottomRow:function(){return new u(this._ref.bottomRow(),this._sheet)},column:function(e){return new u(this._ref.toColumn(e),this._sheet)},row:function(e){return new u(this._ref.toRow(e),this._sheet)},forEachRow:function(e){this._ref.forEachRow(function(t){e(new u(t,this._sheet))}.bind(this))},forEachColumn:function(e){this._ref.forEachColumn(function(t){e(new u(t,this._sheet))}.bind(this))},sheet:function(){return this._sheet},topLeft:function(){return this._ref.toRangeRef().topLeft},intersectingMerged:function(){var e=this._sheet,t=[];return e._mergedCells.forEach(function(e){e.intersects(this._ref)&&t.push(""+e)}.bind(this)),t},getState:function(t){var n,i,r=this._ref.first(),o={ref:r,data:[],origRef:this._ref};return t?n="input"===t?["value","formula"]:"border"===t?["borderLeft","borderTop","borderRight","borderBottom"]:[t]:(n=e.spreadsheet.ALL_PROPERTIES,o.mergedCells=this.intersectingMerged()),i=o.data,this.forEachCell(function(t,o,a){var s={},l=t-r.row,d=o-r.col;i[l]||(i[l]=[]),i[l][d]=s,n.forEach(function(t){var n=void 0===a[t]?null:a[t];(n instanceof e.spreadsheet.calc.runtime.Formula||n instanceof e.spreadsheet.validation.Validation)&&(n=n.deepClone()),s[t]=n})}),o},setState:function(e,t){var n=this._sheet,i=this._ref.first(),r=e.ref.row-i.row,o=e.ref.col-i.col,a=t&&!t.isExternal(),s=t&&!a;n.batch(function(){var l,d;e.mergedCells&&this.unmerge(),l=i.row,d=this.hasFilter(),e.data.forEach(function(r,o){if(!(d&&a&&n.isHiddenRow(e.ref.row+o))){var u=i.col;r.forEach(function(r,c){var h,p;if(!(d&&a&&n.isHiddenColumn(e.ref.col+c))){if(h=t?n.range(l,u):n.range(i.row+o,i.col+c),h.enable()){for(p in r)"value"!=p&&(t&&"enable"==p||h._set(p,r[p]));if(!r.formula)if(s)try{null==r.value?h._set("value",null):h.input(r.value)}catch(f){h._set("value",r.value)}else h._set("value",r.value)}u++}}),l++}}),e.mergedCells&&e.mergedCells.forEach(function(e){e=n._ref(e).relative(r,o,3),n.range(e).merge()},this)}.bind(this),{recalc:!0,ref:this._ref})},_adjustRowHeight:function(){var t,n=this._sheet,i=this.getState(),r=[];for(t=0;t<i.mergedCells.length;t++)r.push(n.range(i.mergedCells[t]));this.forEachRow(function(t){if(!(t.topLeft().row>=t.sheet()._rows._count)){var i=t.sheet().rowHeight(t.topLeft().row);t.forEachCell(function(t,o,a){var s,l,d=n.range(t,o),u=0;for(s=0;s<r.length;s++)if(d._ref.intersects(r[s]._ref)){u+=a.width;break}l=Math.max(n.columnWidth(o),u),i=Math.max(i,e.spreadsheet.util.getTextHeight(a.value,l,a.fontSize,a.wrap))}),n.rowHeight(t.topLeft().row,Math.max(n.rowHeight(t.topLeft().row),i))}})},forEachCell:function(e){this._ref.forEach(function(t){this._sheet.forEach(t.toRangeRef(),e.bind(this))}.bind(this))},hasValue:function(){var t=this._sheet._defaultCellStyle;return e.util.withExit(function(e){this.forEachCell(function(n,i,r){var o,a;for(o in r)a=r[o],void 0!==a&&null!==a&&a!==t[o]&&e(!0)})},this)},wrap:function(t){return void 0===t?!!this._property("wrap"):(this.forEachRow(function(t){var n=t.sheet().rowHeight(t.topLeft().row);t.forEachCell(function(t,i,r){var o=this._sheet.columnWidth(i);null!==r.value&&void 0!==r.value&&(n=Math.max(n,e.spreadsheet.util.getTextHeight(r.value,o,r.fontSize,!0)))}),t.sheet().rowHeight(t.topLeft().row,n)}.bind(this)),this._property("wrap",t),this)},fontSize:function(t){return void 0===t?this._property("fontSize"):(this.forEachRow(function(n){var i=n.sheet().rowHeight(n.topLeft().row);n.forEachCell(function(n,r,o){var a=this._sheet.columnWidth(r);null!==o.value&&void 0!==o.value&&(i=Math.max(i,e.spreadsheet.util.getTextHeight(o.value,a,t,o.wrap)))}),n.sheet().rowHeight(n.topLeft().row,i)}.bind(this)),this._property("fontSize",t),this)},draw:function(e,t){this._sheet.draw(this,e,t)},insideBorders:function(e){return this.insideVerticalBorders(e).insideHorizontalBorders(e)},insideVerticalBorders:function(e){return this._ref.forEach(function(t){t instanceof l&&t.width()>1&&(t=t.clone(),t.topLeft.col++,this._sheet.range(t)._set("vBorders",e))},this),this},insideHorizontalBorders:function(e){return this._ref.forEach(function(t){t instanceof l&&t.height()>1&&(t=t.clone(),t.topLeft.row++,this._sheet.range(t)._set("hBorders",e))},this),this}}),o.each(d,function(e,t){u.prototype[t]=function(e){return this._property(t,e)}}),c=o('<div style="position: absolute !important; top: -4000px !important; height: auto !important;padding: 1px !important; margin: 0 !important; border: 1px solid black !important;line-height: normal !important; visibility: hidden !important;white-space: pre-wrap; word-break: break-all;" />')[0],e.spreadsheet.util={getTextHeight:r},e.spreadsheet.Range=u)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/runtime.min",["spreadsheet/references.min"],e)}(function(){"use strict";function e(t){return t instanceof e?t:void(this.code=t)}function t(e,t,n){for(var i,r=n(e),o=e;++e<t;)i=n(e),i>r&&(r=i,o=e);return o}function n(e,t){if(e.constructor!==t.constructor)return!1;if(e instanceof F)return e.sheet==t.sheet&&e.row==t.row&&e.col==t.col&&e.rel==t.rel;if(e instanceof E)return n(e.topLeft,t.topLeft)&&n(e.bottomRight,t.bottomRight)&&e.endSheet==t.endSheet;if(e instanceof A){var i=e.refs.length;if(i!=t.refs.length)return!1;for(;--i>=0;)if(!n(e.refs[i],t.refs[i]))return!1}return!0}function i(t,n){function i(e){var t,n,r,a;return d=e[0],t="{ ",Array.isArray(d)?(h+="while (i < args.length) { ",p+="while (i < args.length) { ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="while (i < args.length) { ",t+=e.map(i).join(""),t+="} ",t+="xargs = stack.pop(); ",p+="} ",h+="} "):"+"==d?(h+="while (i < args.length) { ",p+="while (i < args.length) { ",t+="if (i >= args.length) return new CalcError('N/A'); ",t+="xargs.push(tmp = []); stack.push(xargs); xargs = tmp; ",t+="do { ",t+=e.slice(1).map(i).join(""),t+="} while (i < args.length); ",t+="xargs = stack.pop(); ",p+="} ",h+="} "):"?"==d?t+="if (!("+l(e[1])+")) return new CalcError(err); ":(n=e[1],Array.isArray(n)&&/^#?collect/.test(n[0])?(r=n[2],o(),t+="try {var $"+d+" = this.cellValues(args.slice(i",r&&(t+=", i + "+r),t+=")).filter(function($"+d+"){ ","collect"==n[0]&&(t+="if ($"+d+" instanceof CalcError) throw $"+d+"; "),t+="return "+l(n[1])+"; }, this); ",t+=r?"i += "+r+"; ":"i = args.length; ",t+="xargs.push($"+d+")} catch(ex) { if (ex instanceof CalcError) return ex; throw ex; } ",p+="toResolve.push(args.slice(i)); "):"rest"==n?t+="xargs.push(args.slice(i)); i = args.length; ":((g=/^\*/.test(d))&&(v=!0,d=d.substr(1)),t+="var $"+d+" = args[i++]; ",a=!1,/!$/.test(n)?(n=n.substr(0,n.length-1),a=!0):t+="if ($"+d+" instanceof CalcError) return $"+d+"; ",t+=s(n,a)+"xargs.push($"+d+"); ")),t+="} "}function o(){return u?"$"+d:(m=!0,u=!0,p+="toResolve.push(args[i++]); ","($"+d+" = this.force($"+d+"))")}function a(e){return"("+(e?"(typeof "+o()+" == 'number' ? ($"+d+" = round($"+d+"), true) : false) || ":"(typeof "+o()+" == 'number') || ")+"(typeof $"+d+" == 'boolean') || (typeof $"+d+" == 'string' && !/^(?:=|true|false)/i.test($"+d+") ? (tmp = kendo.spreadsheet.calc.parse(0, 0, 0, $"+d+"), /^date|number|percent$/.test(tmp.type) ? ($"+d+" = +tmp.value, true) : false) : false))"}function s(e,t){u=!1;var n="if (!("+l(e)+")) { ";return u&&!t&&(n+=" if ($"+d+" instanceof CalcError) return $"+d+"; "),n+="return new CalcError(err); } ",u||(p+="i++; "),h+=g?"var $"+d+" = this._arrayArg(args[i]); if ($"+d+") { xargs.push($"+d+"); width = Math.max(width, $"+d+".width); height = Math.max(height, $"+d+".height); arrays.push(true) } else { xargs.push(args[i]); arrays.push(false); } i++; ":"xargs.push(args[i++]); arrays.push(false); ",n}function l(e){if(Array.isArray(e)){if("or"==e[0])return"("+e.slice(1).map(l).join(") || (")+")";if("and"==e[0])return"("+e.slice(1).map(l).join(") && (")+")";if("values"==e[0])return"("+e.slice(1).map(function(e){return o()+" === "+e}).join(") || (")+")";if("null"==e[0])return"("+l("null")+" ? (($"+d+" = "+e[1]+"), true) : false)";if("between"==e[0]||"[between]"==e[0])return"("+o()+" >= "+e[1]+" && $"+d+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between)"==e[0])return"("+o()+" > "+e[1]+" && $"+d+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("(between]"==e[0])return"("+o()+" > "+e[1]+" && $"+d+" <= "+e[2]+" ? true : ((err = 'NUM'), false))";if("[between)"==e[0])return"("+o()+" >= "+e[1]+" && $"+d+" < "+e[2]+" ? true : ((err = 'NUM'), false))";if("assert"==e[0]){var t=e[2]||"N/A";return"(("+e[1]+") ? true : (err = "+JSON.stringify(t)+", false))"}if("not"==e[0])return"!("+l(e[1])+")";throw Error("Unknown array type condition: "+e[0])}if("number"==e||"datetime"==e)return a(!0);if("integer"==e||"date"==e)return"("+a()+" && (($"+d+" |= 0), true))";if("divisor"==e)return"("+a(!0)+" && ($"+d+" == 0 ? ((err = 'DIV/0'), false) : true))";if("number+"==e)return"("+a(!0)+" && ($"+d+" >= 0 ? true : ((err = 'NUM'), false)))";if("integer+"==e)return"("+a()+" && (($"+d+" |= 0) >= 0 ? true : ((err = 'NUM'), false)))";if("number++"==e)return"("+a(!0)+" && ($"+d+" > 0 ? true : ((err = 'NUM'), false)))";if("integer++"==e)return"("+a()+" && (($"+d+" |= 0) > 0 ? true : ((err = 'NUM'), false)))";if("string"==e)return"((typeof "+o()+" == 'string' || typeof $"+d+" == 'boolean' || typeof $"+d+" == 'number') ? ($"+d+" += '', true) : ($"+d+" === undefined ? (($"+d+" = ''), true) : false))";if("boolean"==e)return"(typeof "+o()+" == 'boolean')";if("logical"==e)return"(typeof "+o()+" == 'boolean' || (typeof $"+d+" == 'number' ? ($"+d+" = !!$"+d+", true) : false))";if("matrix"==e)return o(),"((m = this.asMatrix($"+d+")) ? ($"+d+" = m) : false)";if("#matrix"==e)return"((m = this.asMatrix($"+d+")) ? ($"+d+" = m) : false)";if("ref"==e)return"($"+d+" instanceof kendo.spreadsheet.Ref)";if("area"==e)return"($"+d+" instanceof kendo.spreadsheet.CellRef || $"+d+" instanceof kendo.spreadsheet.RangeRef)";if("cell"==e)return"($"+d+" instanceof kendo.spreadsheet.CellRef)";if("null"==e)return"("+o()+" == null)";if("anyvalue"==e)return"("+o()+" != null && i <= args.length)";if("forced"==e)return"("+o()+", i <= args.length)";if("anything"==e)return"(i <= args.length)";if("blank"==e)return"("+o()+" == null || $"+d+" === '')";throw Error("Can't check for type: "+e)}var d,u,c,h="function arrayArgs(args) { var xargs = [], width = 0, height = 0, arrays = [], i = 0; ",p="function resolve(args, callback) { var toResolve = [], i = 0; ",f="'use strict'; function check(args) { var stack = [], tmp, xargs = [], i = 0, m, err = 'VALUE'; ",m=!1,g=!1,v=!1;return f+=n.map(i).join(""),f+="if (i < args.length) return new CalcError('N/A'); ",f+="return xargs; } ",h+="return { args: xargs, width: width, height: height, arrays: arrays }; } ",m?(p+="this.resolveCells(toResolve, callback); } ",c=Function("CalcError","round",f+p+h+" return { resolve: resolve, check: check, arrayArgs: arrayArgs };")):c=Function("CalcError","round",f+" return { check: check };"),c=c(e,r),v||delete c.arrayArgs,c}function r(e){return+e.toPrecision(14)}function o(e){return"number"==typeof e?r(e):e}function a(t,n,i){if(i instanceof e)return i;try{return n.apply(t,i)}catch(r){if(r instanceof e)return r;throw r}}function s(e,t,n,i){return function(r,o){function s(){var t,s,l,d,u,c,h;if(i&&(t=i.call(this,o),o=t.args,t.width>0&&t.height>0)){for(s=new M(this),l=0;l<t.height;++l)for(d=0;d<t.width;++d){for(u=[],c=0;c<o.length;++c)t.arrays[c]?(h=o[c],u[c]=h.get(l%h.height,d%h.width)):u[c]=o[c];u=n.call(this,u),s.set(l,d,a(this,e,u))}return r(s)}u=n.call(this,o),r(a(this,e,u))}t?t.call(this,o,s):s.call(this)}}function l(t,n,i,r){return function(o,a){function s(){var n,s,l,d,u,c,h,p,f;if(r&&(n=r.call(this,a),a=n.args,n.width>0&&n.height>0))for(s=new M(this),l=n.width*n.height,d=function(e,t){return function(n){if(s.set(e,t,n),--l,0===l)return o(s)}},u=0;u<n.height&&l>0;++u)for(c=0;c<n.width&&l>0;++c){for(h=[],p=0;p<a.length;++p)n.arrays[p]?(f=a[p],h[p]=f.get(u%f.height,c%f.width)):h[p]=a[p];if(h=i.call(this,h),h instanceof e){if(s.set(u,c,h),--l,0===l)return o(s)}else h.unshift(d(u,c)),t.apply(this,h)}else n=i.call(this,a),n instanceof e?o(n):(n.unshift(o),t.apply(this,n))}n?n.call(this,a,s):s.call(this)}}function d(e,t){return e=e.toLowerCase(),H[e]=t,{args:function(n,r){var o,a=i(e,n);return r&&(a.arrayArgs&&console.log(""+a.arrayArgs),a.resolve&&console.log(""+a.resolve),a.check&&console.log(""+a.check)),o=H[e]=s(t,a.resolve,a.check,a.arrayArgs),o.kendoSpreadsheetArgs=n,this},argsAsync:function(n,r){var o,a=i(e,n);return r&&(a.arrayArgs&&console.log(""+a.arrayArgs),a.resolve&&console.log(""+a.resolve),a.check&&console.log(""+a.check)),o=H[e]=l(t,a.resolve,a.check,a.arrayArgs),o.kendoSpreadsheetArgs=n,this}}}function u(e,t,n){return t++,(1461*(e+4800+((t-14)/12|0))/4|0)+(367*(t-2-12*((t-14)/12|0))/12|0)-(3*((e+4900+((t-14)/12|0))/100|0)/4|0)+n-32075}function c(e){var t,n,i,r,o,a,s;return t=e+68569,n=4*t/146097|0,t-=(146097*n+3)/4|0,r=4e3*(t+1)/1461001|0,t=t-(1461*r/4|0)+31,i=80*t/2447|0,a=t-(2447*i/80|0),t=i/11|0,o=i+2-12*t,s=100*(n-49)+r+t,o--,{year:s,month:o,date:a,day:(e+1)%7,ord:P[h(s)][o]+a}}function h(e){return e%4?0:e%100?1:e%400?0:1}function p(e){return h(e)?366:365}function f(e,t){return h(e)&&1==t?29:B[t]}function m(e){return c((0|e)+N)}function g(e,t,n){return u(e,t,n)-N}function v(e){var t,n,i,r,o=e-(0|e);return o<0&&o++,t=Math.round(V*o),n=Math.floor(t/O),t-=n*O,i=Math.floor(t/L),t-=i*L,r=Math.floor(t/1e3),t-=1e3*r,{hours:n,minutes:i,seconds:r,milliseconds:t}}function _(e){var t=m(e),n=v(e);return new Date(t.year,t.month,t.date,n.hours,n.minutes,n.seconds,n.milliseconds)}function b(e,t,n,i){return(e+(t+(n+i/1e3)/60)/60)/24}function k(e){var t=b(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());return e=g(e.getFullYear(),e.getMonth(),e.getDate()),e<0?e-1+t:e+t}function w(e,t){return t?kendo.parseExactDate(e,t)||kendo.parseExactDate(e,t.replace(/h/g,"H"))||kendo.parseExactDate(e):kendo.parseExactDate(e)||kendo.parseExactDate(e,["MMMM dd yyyy","MMMM dd yy","MMM dd yyyy","MMM dd yy","dd MMMM yyyy","dd MMMM yy","dd MMM yyyy","dd MMM yy","MMMM dd, yyyy","MMMM dd, yy","MMM dd, yyyy","MMM dd, yy","MMMM dd","MMM dd","MMMM yyyy","MMM yyyy","dd MMMM","dd MMM"])}function y(t){return function(n,i){return"string"==typeof n&&"string"!=typeof i&&(i=null==i?"":i+""),"string"!=typeof n&&"string"==typeof i&&(n=null==n?"":n+""),"number"==typeof n&&null==i&&(i=0),"number"==typeof i&&null==n&&(n=0),"string"==typeof n&&"string"==typeof i&&(n=n.toLowerCase(),i=i.toLowerCase()),typeof i==typeof n?t(n,i):new e("VALUE")}}var x,C,T,S,D,F,E,A,I,R,M,z,H,N,B,P,L,O,V,W,U,q;kendo.support.browser.msie&&kendo.support.browser.version<9||(x={},C=kendo.spreadsheet,C.calc=x,T=x.runtime={},S=kendo.Class,D=C.Ref,F=C.CellRef,E=C.RangeRef,A=C.UnionRef,I=C.NULLREF,e.prototype.toString=function(){return"#"+this.code+("NAME"==this.code?"?":"!")},R=S.extend({init:function(e,t,n,i){this.callback=e,this.formula=t,this.ss=n,this.parent=i},resolve:function(e){var t=this;e instanceof D?t.resolveCells([e],function(){t._resolve(e)}):t._resolve(e)},error:function(t){return new e(t)},_resolve:function(e){e=void 0===e?null:Array.isArray(e)?this.asMatrix(e):o(e);var t=this.formula;t.arrayFormulaRange?e=this.asMatrix(e)||this.asMatrix([[e]]):e instanceof E&&(e=this._arrayArg(e)),t.value=e,this.ss.onFormula(t)&&this.callback&&this.callback.call(t,e)},resolveCells:function(e,t){function n(e){e.exec(a.ss,function(){--r||t.call(a)},a)}function i(e){var t,n;for(t=0;t<e.length;++t)n=e[t],n.formula&&s.push(n.formula);return!0}var r,o,a=this,s=[];if(function l(e){var t,n;for(t=0;t<e.length;++t)n=e[t],n instanceof D&&i(a.getRefCells(n)),Array.isArray(n)&&l(n)}(e),!s.length)return t.call(a);for(r=s.length,o=0;o<s.length;++o)n(s[o])},cellValues:function(e,t){var n,i,r=[];for(n=0;n<e.length;++n)i=e[n],i instanceof D?(i=this.getRefData(i),r=r.concat(i)):Array.isArray(i)?r=r.concat(this.cellValues(i)):i instanceof M?r=r.concat(this.cellValues(i.data)):r.push(i);return t?t.apply(this,r):r},fetchName:function(t,n){var i,r=this.formula,o=this.ss.nameValue(t,r.sheet,r.row,r.col);o instanceof z?(o=o.clone(r.sheet,r.row,r.col,!0),i=new C.ValidationFormulaContext(this.ss.workbook),o.exec(i,n,this)):(o instanceof D&&(o=o.absolute(r.row,r.col),o.sheet||(o.sheet=r.sheet)),n(null==o?new e("NAME"):o))},force:function(e){return e instanceof D?this.getRefData(e):e},func:function(t,n,i){t=t.toLowerCase();var r=H[t];return r?r.call(this,n,i):void n(new e("NAME"))},bool:function(e){return e instanceof D&&(e=this.getRefData(e)),"string"==typeof e?"true"==e.toLowerCase():"number"==typeof e?0!==e:"boolean"==typeof e?e:null!=e},_arrayArg:function(t){var n=this.formula;return!n.arrayFormulaRange&&t instanceof E?1==t.height()&&n.col>=t.topLeft.col&&n.col<=t.bottomRight.col?this.getRefData(new F(t.topLeft.row,n.col).setSheet(t.sheet)):1==t.width()&&n.row>=t.topLeft.row&&n.row<=t.bottomRight.row?this.getRefData(new F(n.row,t.topLeft.col).setSheet(t.sheet)):new e("VALUE"):this.asMatrix(t)},asMatrix:function(e){var t,n,i,r,o,a,s;return e instanceof M?e:(t=this,e instanceof E?(n=e.topLeft,i=n.row,r=n.col,o=t.getRefCells(e),a=new M(t),isFinite(e.width())&&(a.width=e.width()),isFinite(e.height())&&(a.height=e.height()),isFinite(i)||(i=0),isFinite(r)||(r=0),o.forEach(function(e){a.set(e.row-i,e.col-r,e.value)}),a):Array.isArray(e)&&e.length>0?(a=new M(t),s=0,e.forEach(function(e){var n=0,i=1;e.forEach(function(e){var r=e instanceof E;e instanceof D&&!r&&(e=t.getRefData(e)),(r||Array.isArray(e))&&(e=t.asMatrix(e)),e instanceof M?(e.each(function(e,t,i){a.set(s+t,n+i,e)}),i=Math.max(i,e.height),n+=e.width):a.set(s,n++,e)}),s+=i}),a):void 0)},getRefCells:function(e,t){var n=this.formula;return this.ss.getRefCells(e,t,n.sheet,n.row,n.col)},getRefData:function(e){var t=this.formula;return this.ss.getData(e,t.sheet,t.row,t.col)},workbook:function(){return this.ss.workbook}}),M=S.extend({init:function(e){this.context=e,this.height=0,this.width=0,this.data=[]},clone:function(){var e=new M(this.context);return e.height=this.height,e.width=this.width,e.data=this.data.map(function(e){return e.slice()}),e},get:function(e,t){var n=this.data[e],i=n?n[t]:null;return i instanceof D?this.context.getRefData(i):i},set:function(e,t,n){var i=this.data[e];null==i&&(i=this.data[e]=[]),i[t]=n,e>=this.height&&(this.height=e+1),t>=this.width&&(this.width=t+1)},each:function(e,t){var n,i,r;for(n=0;n<this.height;++n)for(i=0;i<this.width;++i)if(r=this.get(n,i),(t||null!=r)&&(r=e.call(this.context,r,n,i),void 0!==r))return r},map:function(e,t){var n=new M(this.context);return this.each(function(t,i,r){n.set(i,r,e.call(this,t,i,r))},t),n},eachRow:function(e){var t,n;for(t=0;t<this.height;++t)if(n=e.call(this.context,t),void 0!==n)return n},eachCol:function(e){var t,n;for(t=0;t<this.width;++t)if(n=e.call(this.context,t),void 0!==n)return n},mapRow:function(e){var t=new M(this.context);return this.eachRow(function(n){t.set(n,0,e.call(this.context,n))}),t},mapCol:function(e){var t=new M(this.context);return this.eachCol(function(n){t.set(0,n,e.call(this.context,n))}),t},toString:function(){return JSON.stringify(this.data)},transpose:function(){var e=new M(this.context);return this.each(function(t,n,i){e.set(i,n,t)}),e},unit:function(e){var t,n,i,r;for(this.width=this.height=e,t=this.data=Array(e),n=e;--n>=0;)for(i=t[n]=Array(e),r=e;--r>=0;)i[r]=n==r?1:0;return this},multiply:function(t){var n,i,r,o,a,s,l=this,d=new M(l.context);for(n=0;n<l.height;++n)for(i=0;i<t.width;++i){for(r=0,o=0;o<l.width;++o){if(a=l.get(n,o),s=t.get(o,i),"number"!=typeof a||"number"!=typeof s)throw new e("VALUE");r+=a*s}d.set(n,i,r)}return d},adds:function(e,t){var n,i,r,o,a=this,s=new M(a.context),l=t?-1:1;for(n=0;n<a.height;++n)for(i=0;i<a.width;++i)r=a.get(n,i),o=e.get(n,i),s.set(n,i,r+l*o);return s},determinant:function(){var e,t,n,i,r,o=this.clone().data,a=o.length,s=1;for(e=0;e<a;e++){for(t=e;t<a&&!o[t][e];t++);if(t==a)return 0;if(t!=e)for(s=-s,i=e;i<a;i++)r=o[e][i],o[e][i]=o[t][i],o[t][i]=r;for(n=e+1;n<a;n++)for(i=e+1;i<a;i++)o[n][i]-=o[e][i]*o[n][e]/o[e][e];s*=o[e][e]}return s},inverse:function(){var e,n,i,r,o,a,s=this.width,l=this.augment(new M(this.context).unit(s)),d=l.data;for(n=0;n<s;++n){if(i=t(n,s,function(e){return d[e][n]}),!d[i][n])return null;for(n!=i&&(e=d[n],d[n]=d[i],d[i]=e),r=n+1;r<s;++r){for(o=n+1;o<2*s;++o)d[r][o]-=d[n][o]*d[r][n]/d[n][n];d[r][n]=0}}for(r=0;r<s;++r)for(a=d[r][r],o=0;o<2*s;++o)d[r][o]/=a;for(n=s;--n>=0;)for(r=n;--r>=0;)if(d[r][n])for(o=2*s;--o>=s;)d[r][o]-=d[n][o]*d[r][n];return l.slice(0,s,s,s)},augment:function(e){var t=this.clone(),n=t.width;return e.each(function(e,i,r){t.set(i,r+n,e)}),t},slice:function(e,t,n,i){var r,o,a=new M(this.context);for(r=0;r<n;++r)for(o=0;o<i;++o)a.set(r,o,this.get(e+r,t+o));return a}}),z=S.extend({init:function(e,t,n,i,r,o,a){this.refs=e,this.handler=t,this.print=n,this.absrefs=null,this.sheet=i,this.row=r,this.col=o,this.onReady=[],this.pending=!1,this.arrayFormulaRange=a},setArrayFormulaRange:function(e){this.arrayFormulaRange=e.clone().setSheet(this.sheet)},clone:function(e,t,n,i){var r=e.toLowerCase(),o=this.refs,a=this.arrayFormulaRange;return(i||r!=this.sheet.toLowerCase())&&(o=o.map(function(t){return t.hasSheet()||t.sheet&&t.sheet.toLowerCase()==r||(t=t.clone().setSheet(e)),t}),a&&(a=a.clone().setSheet(e))),new z(o,this.handler,this.print,e,t,n,a)},deepClone:function(){var e=this.refs.map(function(e){return e.clone()});return new z(e,this.handler,this.print,this.sheet,this.row,this.col)},resolve:function(e){this.pending=!1,this.onReady.forEach(function(t){t(e)})},exec:function(t,n,i){var r,o,a;if("value"in this)n&&n(this.value);else{for(n&&this.onReady.push(n),r=new R(this.resolve,this,t,i),o=0;i;){if(i.formula===this)return this.pending=!1,void r.resolve(new e("CIRCULAR"));i=i.parent,++o}if(this.pending)return;this.pending=!0,a=function(){this.absrefs||(this.absrefs=this.refs.map(function(e){return e.absolute(this.row,this.col)},this)),this.handler.call(r)}.bind(this),o<20?a():setTimeout(a,0)}},reset:function(){this.onReady=[],this.pending=!1,delete this.value},renameSheet:function(e,t){e=e.toLowerCase(),this.absrefs=null,this.sheet.toLowerCase()==e&&(this.sheet=t),this.refs.forEach(function(n){n.renameSheet(e,t)})},adjust:function(e,t,i,r){function o(n){return n===I?n:n.sheet.toLowerCase()!=e?(d&&("row"==t&&a>=i&&(n=n.relative(r,0)),"col"==t&&s>=i&&(n=n.relative(0,r))),n):n.adjust(a,s,u,c,"row"==t,i,r)}var a,s,l,d,u,c,h,p,f;if(e=e.toLowerCase(),a=this.row,s=this.col,l=this.sheet.toLowerCase(),d=!1,l==e&&("row"==t&&a>=i&&(this.row+=r,d=!0),"col"==t&&s>=i&&(this.col+=r,d=!0)),u=this.row,c=this.col,this.absrefs=null,h=this.refs,p=d,this.refs=h.map(function(e){var t=o(e);return p||n(t,e)||(p=!0),t}),f=this.arrayFormulaRange,f&&(this.arrayFormulaRange=o(f),p||n(f,this.arrayFormulaRange)||(p=!0)),p)return new z(h,this.handler,this.print,this.sheet,a,s,f)},toString:function(){return this.print(this.row,this.col)}}),H=Object.create(null),H["if"]=function(t,n){var i=this,r=n[0],o=n[1],a=n[2];this.resolveCells([r],function(){var n=i.asMatrix(r);n?o(function(r){a(function(o){var a=i.asMatrix(r),s=i.asMatrix(o);t(n.map(function(t,n,l){return t instanceof e?t:i.bool(t)?a?a.get(n,l):r:s?s.get(n,l):o}))})}):(r=this.force(r),r instanceof e?t(r):i.bool(r)?o(t):a(t))})},H["φ"]=function(e){e((1+Math.sqrt(5))/2)},N=u(1900,0,-1),B=[31,28,31,30,31,30,31,31,30,31,30,31],P=[[0,31,59,90,120,151,181,212,243,273,304,334],[0,31,60,91,121,152,182,213,244,274,305,335]],L=6e4,O=60*L,V=24*O,T.CalcError=e,T.Formula=z,T.Matrix=M,T.packDate=g,T.unpackDate=m,T.packTime=b,T.unpackTime=v,T.serialToDate=_,T.dateToSerial=k,T.daysInMonth=f,T.isLeapYear=h,T.daysInYear=p,T.parseDate=w,T.limitPrecision=r,C.dateToNumber=k,C.numberToDate=_,C.defineFunction=d,C.CalcError=e,T.defineFunction=d,T.defineAlias=function(e,t){var n=H[t];if(!n)throw Error("Function "+t+" is not yet defined");n.kendoSpreadsheetAliases||(n.kendoSpreadsheetAliases=[t]),n.kendoSpreadsheetAliases.push(e),H[e]=n},T.FUNCS=H,W=["or","number",["null",0]],U=[["*a",W],["*b",W]],q=[["*a",["or","anyvalue",["null",0]]],["*b",["or","anyvalue",["null",0]]]],d("binary+",function(e,t){return e+t}).args(U),d("binary-",function(e,t){return e-t}).args(U),d("binary*",function(e,t){return e*t}).args(U),d("binary/",function(e,t){return e/t}).args([["*a",W],["*b","divisor"]]),d("binary^",function(e,t){return Math.pow(e,t)}).args(U),d("binary&",function(e,t){return null==e&&(e=""),null==t&&(t=""),""+e+t}).args([["*a",["or","number","string","boolean","null"]],["*b",["or","number","string","boolean","null"]]]),d("binary=",function(e,t){return e===t}).args(q),d("binary<>",function(e,t){return e!==t}).args(q),d("binary<",y(function(e,t){return e<t})).args(q),d("binary<=",y(function(e,t){return e<=t})).args(q),d("binary>",y(function(e,t){return e>t})).args(q),d("binary>=",y(function(e,t){return e>=t})).args(q),d("unary+",function(e){return e}).args([["*a",W]]),d("unary-",function(e){return-e}).args([["*a",W]]),d("unary%",function(e){return e/100}).args([["*a",W]]),d("binary:",function(e,t){return new E(e,t).setSheet(e.sheet||this.formula.sheet,e.hasSheet())}).args([["a","cell"],["b","cell"]]),d("binary,",function(e,t){return new A([e,t])}).args([["a","ref"],["b","ref"]]),d("binary ",function(e,t){return e.intersect(t)}).args([["a","ref"],["b","ref"]]),d("not",function(e){return!this.bool(e)}).args([["*a",["or","anyvalue",["null",0]]]]),d("isblank",function(e){return e instanceof F&&(e=this.getRefData(e),null==e)}).args([["*value","anything!"]]),d("iserror",function(t){return t instanceof e}).args([["*value","forced!"]]),d("iserr",function(t){return t instanceof e&&"N/A"!=t.code}).args([["*value","forced!"]]),d("isna",function(t){return t instanceof e&&"N/A"==t.code}).args([["*value","forced!"]]),d("islogical",function(e){return"boolean"==typeof e}).args([["*value","forced!"]]),d("isnontext",function(e){return"string"!=typeof e}).args([["*value","forced!"]]),d("istext",function(e){return"string"==typeof e}).args([["*value","forced!"]]),d("isnumber",function(e){return"number"==typeof e}).args([["*value","forced!"]]),d("isref",function(e){return e instanceof F||e instanceof E}).args([["*value","anything!"]]),H[",getname"]=function(e,t){this.fetchName(t[0],e)})},"function"==typeof define&&define.amd?define:function(e,t,n){
(n||t)()}),function(e,define){define("spreadsheet/validation.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e,t,r,s){var d,u,c,h;if("string"==typeof s&&(s=JSON.parse(s)),s.from&&("list"!==s.dataType||s.fromIsListValue||(s.from=kendo.format(o,s.from),s.fromIsListValue=!0),"date"===s.dataType&&(c=i.runtime.parseDate(s.from),c&&(s.from=kendo.format(a,s.from),s.fromIsDateValue=!0)),s.from=i.compile(i.parseFormula(e,t,r,s.from))),s.to&&("date"===s.dataType&&(h=i.runtime.parseDate(s.to),h&&(s.to=kendo.format(a,s.to),s.toIsDateValue=!0)),s.to=i.compile(i.parseFormula(e,t,r,s.to))),u="custom"==s.dataType?n.validationComparers.custom:"list"==s.dataType?n.validationComparers.list:n.validationComparers[s.comparerType],!u)throw kendo.format("'{0}' comparer is not implemented.",s.comparerType);return d=function(e){var t,n=this.to&&this.to_value?this.to_value:void 0;return null===e||""===e?this.value=!!this.allowNulls:"custom"==this.dataType?this.value=u(e,this.from_value,n):"list"==this.dataType?(t=this._getListData(),this.value=u(e,t,n)):this.value=u(e,this.from_value,n),this.value},new kendo.spreadsheet.validation.Validation(l.extend(s,{handler:d,sheet:e,row:t,col:r}))}var t,n,i,r,o,a,s,l=kendo.jQuery;kendo.support.browser.msie&&kendo.support.browser.version<9||(t=kendo.spreadsheet,n={},t.validation=n,i=t.calc,r=kendo.Class,o="_matrix({0})",a='DATEVALUE("{0}")',i.runtime.defineFunction("_matrix",function(e){return"string"==typeof e&&(e=this.asMatrix([e.split(/\s*,\s*/)])),e}).args([["m",["or","matrix","string"]]]),s=r.extend({init:function(e){this.handler=e.handler,this.from=e.from,this.to=e.to,this.dataType=e.dataType,this.comparerType=e.comparerType,this.type=e.type?e.type:"warning",this.allowNulls=!!e.allowNulls,this.fromIsDateValue=!!e.fromIsDateValue,this.toIsDateValue=!!e.toIsDateValue,this.showButton=e.showButton,this.fromIsListValue=!!e.fromIsListValue,this.sheet=e.sheet,this.row=e.row,this.col=e.col,e.tooltipMessageTemplate&&(this.tooltipMessageTemplate=e.tooltipMessageTemplate),e.tooltipTitleTemplate&&(this.tooltipTitleTemplate=e.tooltipTitleTemplate),e.messageTemplate&&(this.messageTemplate=e.messageTemplate),e.titleTemplate&&(this.titleTemplate=e.titleTemplate)},_formatMessages:function(e){var t=this.from?this.from_value:"",n=this.to?this.to_value:"",i=this.from?""+this.from:"",r=this.to?""+this.to:"",o=this.dataType,a=this.type,s=this.comparerType;return kendo.format(e,t,n,i,r,o,a,s)},_setMessages:function(){this.title="",this.message="",this.tooltipTitleTemplate&&(this.tooltipTitle=this._formatMessages(this.tooltipTitleTemplate)),this.tooltipMessageTemplate&&(this.tooltipMessage=this._formatMessages(this.tooltipMessageTemplate)),this.titleTemplate&&(this.title=this._formatMessages(this.titleTemplate)),this.messageTemplate&&(this.message=this._formatMessages(this.messageTemplate))},_getListData:function(){var e,t,n,i,r;if(!this.from_value||!this.from_value.data)return[];for(e=this.from_value.data,i=[],t=0;t<e.length;t++)if(r=e[t])for(n=0;n<r.length;n++)i.push(r[n]);return i},clone:function(e,t,n){var i=this._getOptions();return i.from&&(i.from=i.from.clone(e,t,n)),i.to&&(i.to=i.to.clone(e,t,n)),new s(l.extend(i,{handler:this.handler},{sheet:e,row:t,col:n}))},deepClone:function(){var e=new s(this);return e.from=e.from.deepClone(),e.to&&(e.to=e.to.deepClone()),e},exec:function(e,t,n,i){function r(t){return t instanceof kendo.spreadsheet.Ref&&(t=e.getData(t),Array.isArray(t)&&(t=t[0])),t}var o=this,a=function(e){o.from_value=r(e),o.value=o.handler.call(o,t,n),o._setMessages(),i&&i(o.value)};o.to?o.to.exec(e,function(t){o.to_value=r(t),o.from.exec(e,a)}):o.from.exec(e,a)},reset:function(){this.from&&this.from.reset(),this.to&&this.to.reset(),delete this.value},adjust:function(e,t,n,i){var r,o,a,l,d=this.row,u=this.col;if(this.from&&(r=this.from.adjust(e,t,n,i)),this.to&&(o=this.to.adjust(e,t,n,i)),this.sheet.toLowerCase()==e.toLowerCase())switch(t){case"row":d>=n&&(a=!0,this.row+=i);break;case"col":u>=n&&(a=!0,this.col+=i)}if(a||r||o)return l=new s(this),l.from=r,l.to=o,l.row=d,l.col=u,l},toJSON:function(){var e=this._getOptions();return e.from&&(e.from=""+e.from,"list"===e.dataType&&(e.from=e.from.replace(/^_matrix\((.*)\)$/i,"$1"),delete e.fromIsListValue),"date"===e.dataType&&this.fromIsDateValue&&(e.from=e.from.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete e.fromIsDateValue)),e.to&&(e.to=""+e.to,"date"===e.dataType&&this.toIsDateValue&&(e.to=e.to.replace(/^DATEVALUE\("(.*)"\)$/i,"$1"),delete e.toIsDateValue)),e},_getOptions:function(){return{from:this.from,to:this.to,dataType:this.dataType,type:this.type,comparerType:this.comparerType,row:this.row,col:this.col,sheet:this.sheet,allowNulls:this.allowNulls,fromIsListValue:this.fromIsListValue,fromIsDateValue:this.fromIsDateValue,toIsDateValue:this.toIsDateValue,tooltipMessageTemplate:this.tooltipMessageTemplate,tooltipTitleTemplate:this.tooltipTitleTemplate,messageTemplate:this.messageTemplate,titleTemplate:this.titleTemplate,showButton:this.showButton}}}),n.compile=e,n.validationComparers={greaterThan:function(e,t){return e>t},lessThan:function(e,t){return e<t},between:function(e,t,n){return e>=t&&e<=n},equalTo:function(e,t){return e==t},notEqualTo:function(e,t){return e!=t},greaterThanOrEqualTo:function(e,t){return e>=t},lessThanOrEqualTo:function(e,t){return e<=t},notBetween:function(e,t,n){return e<t||e>n},custom:function(e,t){return t},list:function(e,t){return t.indexOf(e)>-1}},n.Validation=s)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/sheet.min",["kendo.core.min","kendo.color.min","spreadsheet/runtime.min","spreadsheet/validation.min","spreadsheet/references.min"],e)}(function(){!function(e){var t,n,i,r,o,a,s;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.RangeRef,n=e.spreadsheet.UnionRef,i=e.spreadsheet.CellRef,r=e.spreadsheet.Range,a=e.Class.extend({init:function(t){this._sheet=t,this.selection=e.spreadsheet.FIRSTREF.toRangeRef(),this.originalSelection=e.spreadsheet.FIRSTREF.toRangeRef(),this._activeCell=e.spreadsheet.FIRSTREF.toRangeRef(),this.originalActiveCell=e.spreadsheet.FIRSTREF},currentSelectionRange:function(){return this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()},currentOriginalNavigationRange:function(){return this.originalSelection.rangeAt(this.selectionRangeIndex).toRangeRef()},currentNavigationRange:function(){return this.singleCellSelection()?this._sheet._sheetRef:this.selection.rangeAt(this.selectionRangeIndex).toRangeRef()},nextNavigationRange:function(){return this.singleCellSelection()||(this.selectionRangeIndex=this.selection.nextRangeIndex(this.selectionRangeIndex)),this.currentNavigationRange()},previousNavigationRange:function(){return this.singleCellSelection()||(this.selectionRangeIndex=this.selection.previousRangeIndex(this.selectionRangeIndex)),this.currentNavigationRange()},activeCell:function(e){return e&&(this.originalActiveCell=e.first(),this._activeCell=this._sheet.unionWithMerged(e.toRangeRef()),this._sheet.focus(e),this._sheet.triggerChange({activeCell:!0,selection:!0})),this._activeCell},select:function(e,t,n){if(e){if(e.eq(this.originalSelection))return;this._sheet.triggerSelect(new r(e,this._sheet)),this.originalSelection=e,this.selection=t,n!==!1?(e.isCell()?(this._sheet.forEachMergedCell(e,function(t){e=t.topLeft}),this.activeCell(e)):this.activeCell(this.selection.lastRange().first()),this.selectionRangeIndex=this.selection.size()-1):this._sheet.triggerChange({selection:!0})}return this.selection},singleCellSelection:function(){return this._activeCell.eq(this.selection)}}),s=e.Observable.extend({init:function(){e.Observable.prototype.init.call(this),this._reinit.apply(this,arguments)},events:["commandRequest","afterInsertRow","afterDeleteRow","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select"],_reinit:function(t,n,i,r,o,s,l){l=l||{},this._defaultCellStyle={background:l.background,color:l.color,fontFamily:l.fontFamily,fontSize:l.fontSize,italic:l.italic,bold:l.bold,underline:l.underline,wrap:l.wrap,verticalAlign:l.verticalAlign,textAlign:l.textAlign},this._rows=new e.spreadsheet.Axis(t,i),this._columns=new e.spreadsheet.Axis(n,r),this._mergedCells=[],this._frozenRows=0,this._frozenColumns=0,this._suspendChanges=!1,this._filter=null,this._showGridLines=!0,this._gridLinesColor=null,this._grid=new e.spreadsheet.Grid(this._rows,this._columns,t,n,o,s),this._sheetRef=this._grid.normalize(e.spreadsheet.SHEETREF),this._properties=new e.spreadsheet.PropertyBag(t,n,this._defaultCellStyle),this._sorter=new e.spreadsheet.Sorter(this._grid,this._properties.sortable()),this._viewSelection=new a(this),this._editSelection=new a(this),this._formulaSelections=[]},_selectionState:function(){return this._inEdit?this._editSelection:this._viewSelection},navigator:function(){return this._navigator||(this._navigator=new e.spreadsheet.SheetNavigator(this)),this._navigator},axisManager:function(){return this._axisManager||(this._axisManager=new e.spreadsheet.AxisManager(this)),this._axisManager},_name:function(e){return e?(this._sheetName=e,this):this._sheetName},name:function(){return this._name()},_property:function(e,t,n){return void 0===t?e():(e(t),this.triggerChange(n))},_field:function(e,t,n){return void 0===t?this[e]:(this[e]=t,this.triggerChange(n))},suspendChanges:function(e){return void 0===e?this._suspendChanges:(this._suspendChanges=e,this)},triggerChange:function(e){return this._suspendChanges||this.trigger("change",e),this},triggerSelect:function(e){this.trigger("select",{range:e})},setDataSource:function(t,n){this.dataSourceBinder&&this.dataSourceBinder.destroy(),this.dataSourceBinder=new e.spreadsheet.SheetDataSourceBinder({dataSource:t,sheet:this,columns:n}),this.dataSource=this.dataSourceBinder.dataSource},hideColumn:function(e){if(!this.trigger("hideColumn",{index:e}))return this._property(this._columns.hide.bind(this._columns),e,{layout:!0})},unhideColumn:function(e){if(!this.trigger("unhideColumn",{index:e}))return this._property(this._columns.unhide.bind(this._columns),e,{layout:!0})},isHiddenColumn:function(e){return this._grid._columns.hidden(e)},_copyRange:function(e,t){var n=this._grid,i=n.rowCount,r=n.normalize(e.topLeft),o=n.normalize(e.bottomRight),a=r.col*i+r.row,s=o.col*i+o.row,l=t.col*i+t.row;this._properties.copy(a,s,l)},_saveModifiedFormulas:function(e,t){var n,i=o;return o=e,n=t(),o=i,n},_restoreModifiedFormulas:function(t){var n=this._workbook;t.forEach(function(t){var i,r=n.sheetByName(t.sheet);t instanceof e.spreadsheet.calc.runtime.Formula&&(i=r._grid.cellRefIndex(t),r._properties.set("formula",i,i,t)),t instanceof e.spreadsheet.validation.Validation&&(i=r._grid.cellRefIndex(t),r._properties.set("validation",i,i,t))})},_adjustReferences:function(n,i,r,a){var s,l,d;this._mergedCells=a.reduce(function(e,o){return o=o.adjust(null,null,null,null,"row"==n,i,r),o instanceof t&&e.push(o),e},[]),this._workbook&&(s=this._name(),this._workbook._sheets.forEach(function(e){e._forFormulas(function(e){var t=e.adjust(s,n,i,r);t&&o&&o.push(t)}),e._forValidations(function(e){var t=e.adjust(s,n,i,r);t&&o&&o.push(t)})}),this._workbook.adjustNames(s,"row"==n,i,r)),l=this.select(),l=l.adjust(null,null,null,null,"row"==n,i,r),l!==e.spreadsheet.NULLREF&&this.select(l),d="col"==n?this._columns:this._rows,d.adjust(i,r)},_forFormulas:function(e){var t=this._properties,n=t.get("formula").values(),i=n.length;n.forEach(function(t,n){e.call(this,t.value,n,i)},this)},_forValidations:function(e){var t=this._properties;t.get("validation").values().forEach(function(t){e.call(this,t.value)},this)},preventInsertRow:function(e,t){var n,i;return this.selectedHeaders().allRows?{reason:"error",type:"insertRowWhenColumnIsSelected"}:(t=t||1,n=this._grid,i=this.range(n.rowCount-t,0,t,n.columnCount),!!i.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},preventInsertColumn:function(e,t){var n,i;return this.selectedHeaders().allCols?{reason:"error",type:"insertColumnWhenRowIsSelected"}:(t=t||1,n=this._grid,i=this.range(0,n.columnCount-t,n.rowCount,t),!!i.hasValue()&&{reason:"error",type:"shiftingNonblankCells"})},insertRow:function(e){var n=this.preventInsertRow(e);if(n)throw Error("Shifting nonblank cells off the worksheet is not supported!");if(!this.trigger("insertRow",{index:e}))return this.batch(function(){var n,o,a,s,l,d,u=this._grid,c=u.columnCount,h=u.rowCount,p=this.frozenRows();for(e<p&&this.frozenRows(p+1),n=this._mergedCells.slice(),o=0;o<c;o++)a=new t(new i(e,o),new i(e,o)),s=u.normalize(a.topLeft),l=u.normalize(a.bottomRight),d=new t(new i(s.row,s.col),new i(h-2,l.col)),this._copyRange(d,new i(s.row+1,s.col)),new r(a,this).clear({clearAll:!0,keepBorders:!0});this._adjustReferences("row",e,1,n)},{recalc:!0,layout:!0,insertRow:{index:e},ref:new t(new i(e,0),new i(1/0,1/0))}),this.trigger("afterInsertRow",{index:e}),this},isEnabledRow:function(e){var n=new t(new i(e,0),new i(e,this._grid.columnCount));return new r(n,this).enable()},deleteRow:function(e){if(!this.isEnabledRow(e))return this;if(!this.trigger("deleteRow",{index:e}))return this.batch(function(){var n,o,a,s,l,d,u,c=this._grid,h=c.columnCount,p=this.frozenRows();for(e<p&&this.frozenRows(p-1),n=this._mergedCells.slice(),o=0;o<h;o++)a=new t(new i(e,o),new i(e,o)),new r(a,this).clear({clearAll:!0,keepBorders:!0}),s=c.normalize(a.topLeft),l=c.normalize(a.bottomRight),d=new t(new i(s.row+1,s.col),new i(1/0,l.col)),this._copyRange(d,s),u=c.normalize(d.bottomRight),new r(new t(u,u),this).clear();this._adjustReferences("row",e,-1,n)},{recalc:!0,layout:!0,deleteRow:{index:e},ref:new t(new i(e,0),new i(1/0,1/0))}),this.trigger("afterDeleteRow",{index:e}),this},insertColumn:function(e){if(!this.trigger("insertColumn",{index:e}))return this.batch(function(){var n,o,a,s,l,d,u=this._grid,c=u.columnCount,h=this.frozenColumns();for(e<h&&this.frozenColumns(h+1),n=this._mergedCells.slice(),o=c;o>=e&&(a=new t(new i(0,o),new i(1/0,o)),new r(a,this).clear({clearAll:!0,keepBorders:!0}),o!=e);o--)s=u.normalize(a.topLeft),l=u.normalize(a.bottomRight),d=new t(new i(s.row,s.col-1),new i(l.row,l.col-1)),this._copyRange(d,s);this._adjustReferences("col",e,1,n)},{recalc:!0,layout:!0,insertColumn:{index:e},ref:new t(new i(0,e),new i(1/0,1/0))}),this},isEnabledColumn:function(e){var n=new t(new i(0,e),new i(1/0,e));return new r(n,this).enable()},deleteColumn:function(e){if(!this.isEnabledColumn(e))return this;if(!this.trigger("deleteColumn",{index:e}))return this.batch(function(){var n,o,a,s,l,d,u=this._grid,c=u.columnCount,h=this.frozenColumns();for(e<h&&this.frozenColumns(h-1),n=this._mergedCells.slice(),o=e;o<c&&(a=new t(new i(0,o),new i(1/0,o)),new r(a,this).clear({clearAll:!0,keepBorders:!0}),o!=c-1);o++)s=u.normalize(a.topLeft),l=u.normalize(a.bottomRight),d=new t(new i(s.row,s.col+1),new i(l.row,l.col+1)),this._copyRange(d,s);this._adjustReferences("col",e,-1,n)},{recalc:!0,layout:!0,deleteColumn:{index:e},ref:new t(new i(0,e),new i(1/0,1/0))}),this},hideRow:function(e){if(!this.trigger("hideRow",{index:e}))return this._property(this._rows.hide.bind(this._rows),e,{layout:!0})},unhideRow:function(e){if(!this.trigger("unhideRow",{index:e}))return this._property(this._rows.unhide.bind(this._rows),e,{layout:!0})},isHiddenRow:function(e){return this._grid._rows.hidden(e)},columnWidth:function(e,t){return this._property(this._columns.value.bind(this._columns,e,e),t,{layout:!0})},rowHeight:function(e,t){return this._property(this._rows.value.bind(this._rows,e,e),t,{layout:!0})},frozenRows:function(e){return this._field("_frozenRows",e,{layout:!0})},frozenColumns:function(e){return this._field("_frozenColumns",e,{layout:!0})},showGridLines:function(e){return this._field("_showGridLines",e,{layout:!0})},gridLinesColor:function(e){return this._field("_gridLinesColor",e,{layout:!0})},_ref:function(n,r,o,a){var s=null;return n instanceof e.spreadsheet.Ref?n:n instanceof e.spreadsheet.Range?n._ref.toRangeRef():("string"==typeof n?s=e.spreadsheet.calc.parseReference(n):(o||(o=1),a||(a=1),s=new t(new i(n,r),new i(n+o-1,r+a-1))),s)},range:function(e,t,n,i){return new r(this._ref(e,t,n,i),this)},_getMergedCells:function(e){var t=this._grid,n={},i={},r=!1;return this.forEachMergedCell(e,function(o){var a=o.topLeft;t.forEach(o,function(t){a.eq(t)?(n[t.print()]=o,r=!0):e.contains(t)&&(i[t.print()]=a,r=!0)})}),{primary:n,secondary:i,hasMerged:r}},forEachMergedCell:function(e,t){var n=!1;void 0===t&&(t=e,n=!0),this._mergedCells.forEach(function(i){(n||i.intersects(e))&&t(i)})},forEachFilterHeader:function(e,t){var n,i=!1;void 0===t&&(t=e,i=!0),this._filter&&(n=[],this._filter.ref.forEachColumn(function(t){(i||t.intersects(e))&&n.push(t.topLeft)}),this._mergedCells.forEach(function(e){n=n.map(function(t){return e.intersects(t)?e:t})}),n.reduce(function(e,t){return e.indexOf(t)<0&&e.push(t),e},[]).forEach(t))},forEach:function(e,i){function r(e){function n(e){i(l++,s,e)}var r,a,s,l,d,u;for(e instanceof t||(e=e.toRangeRef()),r=o._grid.normalize(e.topLeft),a=o._grid.normalize(e.bottomRight),s=r.col;s<=a.col;s++)l=r.row,d=o._grid.index(l,s),u=o._grid.index(a.row,s),o._properties.forEach(d,u,n)}var o=this;e instanceof t||(e=o._ref(e)),e instanceof n?e.forEach(r):r(e)},startResizing:function(e){this._initialPosition=e,this._resizeInProgress=!0},startAutoFill:function(){this._autoFillInProgress=!0;var e=this.select();this._autoFillOrigin=e,this._autoFillDest=e,this.triggerChange({selection:!0})},updateAutoFill:function(e,t,n,i){this._autoFillDest=e,this._autoFillPunch=t,this._autoFillHint=n,this._autoFillDirection=i,this.triggerChange({selection:!0})},autoFillRef:function(){return this._autoFillDest},autoFillPunch:function(){return this._autoFillPunch},autoFillInProgress:function(){return this._autoFillInProgress},resizingInProgress:function(){return this._resizeInProgress},completeResizing:function(){var e,t;this._resizeInProgress&&(this._resizeInProgress=!1,e=this.resizeHintPosition(),this._initialPosition&&e?(t=this.resizeHandlePosition(),t.col!==-(1/0)?this.trigger("commandRequest",{command:"ColumnWidthCommand",options:{target:t.col,value:this.columnWidth(t.col)-(this._initialPosition.x-e.x)}}):this.trigger("commandRequest",{command:"RowHeightCommand",options:{target:t.row,value:this.rowHeight(t.row)-(this._initialPosition.y-e.y)}})):this.trigger("change",{resize:!0}))},resizeHandlePosition:function(){return this._resizeHandlePosition},resizeHintPosition:function(e){return void 0!==e&&(this._resizeHintPosition=e,this.trigger("change",{resize:!0})),this._resizeHintPosition},removeResizeHandle:function(){this._resizeHandlePosition&&(this._resizeHintPosition=void 0,this._resizeHandlePosition=void 0,this._initialPosition=void 0,this.trigger("change",{resize:!0}))},positionResizeHandle:function(e){this._resizeHandlePosition=e,this.trigger("change",{resize:!0})},startSelection:function(){this._selectionInProgress=!0},completeSelection:function(){var e,t;this._selectionInProgress&&(this._selectionInProgress=!1,this._resizeHintPosition=void 0,this.trigger("change",{selection:!0})),this._autoFillInProgress&&(this._autoFillInProgress=!1,e=this._autoFillDest,t=this._autoFillOrigin,this._autoFillPunch?this.trigger("commandRequest",{command:"ClearContentCommand",options:{operatingRange:this.range(this._autoFillPunch)}}):e.eq(t)?this.triggerChange({selection:!0}):this.trigger("commandRequest",{command:"AutoFillCommand",options:{operatingRange:this.range(e),origin:this.range(t)}}),this._autoFillDest=null,this._autoFillPunch=null,this._autoFillOrigin=null,this.select(e))},selectionInProgress:function(){return this._selectionInProgress},select:function(e,t){var n,i=this._selectionState();return e&&(e=this._ref(e),e=this._grid.normalize(e),n=this._grid.isAxis(e)?e:this.unionWithMerged(e)),i.select(e,n,t)},originalSelect:function(){return this._selectionState().originalSelection},currentSelectionRange:function(){return this._selectionState().currentSelectionRange()},currentOriginalSelectionRange:function(){return this._selectionState().currentOriginalNavigationRange()},currentNavigationRange:function(){return this._selectionState().currentNavigationRange()},nextNavigationRange:function(){return this._selectionState().nextNavigationRange()},previousNavigationRange:function(){return this._selectionState().previousNavigationRange()},selectionRangeIndex:function(){return this._selectionState().selectionRangeIndex},activeCell:function(e){return this._selectionState().activeCell(e)},originalActiveCell:function(){return this._selectionState().originalActiveCell},singleCellSelection:function(){return this._selectionState().singleCellSelection()},unionWithMerged:function(e){var t=this._mergedCells;return e.map(function(e){return e.toRangeRef().union(t)})},trim:function(e){var t=[],n=this._grid;return this._properties.forEachProperty(function(i){t.push(n.trim(e,i.list))}),this.unionWithMerged(e.topLeft.toRangeRef().union(t))},focus:function(e){if(!e){var t=this._focus;return this._focus=null,t}this._focus=e.toRangeRef()},activeCellSelection:function(){return new r(this._grid.normalize(this.activeCell()),this)},selection:function(){return new r(this._grid.normalize(this._selectionState().selection),this)},selectedHeaders:function(){var e=this.select(),t={},n={},i=!1,r=!1,o=this._grid.rowCount-1,a=this._grid.columnCount-1;return e.forEach(function(e){var s,l,d,u,c,h="partial",p="partial";if(e=e.toRangeRef(),l=e.bottomRight,d=e.topLeft,u=d.col<=0&&l.col>=a,c=d.row<=0&&l.row>=o,c&&(r=!0,p="full"),u&&(i=!0,h="full"),!c)for(s=d.row;s<=l.row;s++)"full"!==t[s]&&(t[s]=h);if(!u)for(s=d.col;s<=l.col;s++)"full"!==n[s]&&(n[s]=p)}),{rows:t,cols:n,allRows:r,allCols:i,all:r&&i}},isInEditMode:function(e){return void 0===e?this._inEdit:(this._inEdit=e,void(e&&(this._editSelection.selection=this._viewSelection.selection.clone(),this._editSelection.originalSelection=this._viewSelection.originalSelection.clone(),this._editSelection._activeCell=this._viewSelection._activeCell.clone(),this._editSelection.originalActiveCell=this._viewSelection.originalActiveCell.clone())))},_setFormulaSelections:function(e){this._formulaSelections=(e||[]).slice(),this.triggerChange({selection:!0})},_viewActiveCell:function(){return this._viewSelection._activeCell.toRangeRef()},toJSON:function(){function t(e){Object.keys(l).forEach(function(t){e[t]===l[t]&&delete e[t]})}var n,i={},r=this._rows.toJSON("height",i),o=this._columns.toJSON("width",{}),a=this._viewSelection,s=[],l=this._defaultCellStyle||{};return this.forEach(e.spreadsheet.SHEETREF,function(n,o,a){if(t(a),0!==Object.keys(a).length){a.link&&s.push({ref:e.spreadsheet.Ref.display(null,n,o),target:a.link});var l=i[n];void 0===l&&(l=r.length,r.push({index:n}),i[n]=l),n=r[l],a.index=o,void 0===n.cells&&(n.cells=[]),a.formula&&(a.formula=a.formula.arrayFormulaRange?{src:""+a.formula,ref:""+a.formula.arrayFormulaRange}:""+a.formula),a.validation&&(a.validation=a.validation.toJSON()),a.color&&(a.color=e.parseColor(a.color).toCss()),a.background&&(a.background=e.parseColor(a.background).toCss()),a.borderTop&&a.borderTop.color&&(a.borderTop.color=e.parseColor(a.borderTop.color).toCss()),a.borderBottom&&a.borderBottom.color&&(a.borderBottom.color=e.parseColor(a.borderBottom.color).toCss()),a.borderRight&&a.borderRight.color&&(a.borderRight.color=e.parseColor(a.borderRight.color).toCss()),a.borderLeft&&a.borderLeft.color&&(a.borderLeft.color=e.parseColor(a.borderLeft.color).toCss()),n.cells.push(a)}}),n={name:this._name(),rows:r,columns:o,selection:""+a.selection,activeCell:""+a.activeCell(),frozenRows:this.frozenRows(),frozenColumns:this.frozenColumns(),showGridLines:this.showGridLines(),gridLinesColor:this.gridLinesColor(),mergedCells:this._mergedCells.map(function(e){return""+e}),hyperlinks:s,defaultCellStyle:l},this._sort&&(n.sort={ref:""+this._sort.ref,columns:this._sort.columns.map(function(e){return{index:e.index,ascending:e.ascending}})}),this._filter&&(n.filter={ref:""+this._filter.ref,columns:this._filter.columns.map(function(e){var t=e.filter.toJSON();return t.index=e.index,t})}),n},fromJSON:function(t){this.batch(function(){var n,i,r,o,a,s,l,d,u,c,h,p;if(void 0!==t.name&&this._name(t.name),void 0!==t.frozenColumns&&this.frozenColumns(t.frozenColumns),void 0!==t.frozenRows&&this.frozenRows(t.frozenRows),void 0!==t.columns&&this._columns.fromJSON("width",t.columns),void 0!==t.rows)for(this._rows.fromJSON("height",t.rows),n=0;n<t.rows.length;n++)if(i=t.rows[n],r=i.index,void 0===r&&(r=n),i.cells)for(o=0;o<i.cells.length;o++)a=i.cells[o],s=a.index,void 0===s&&(s=o),a.formula&&(l="string"!=typeof a.formula,d=l?a.formula.src:a.formula,u=this._compileFormula(r,s,d),l&&u.setArrayFormulaRange(e.spreadsheet.calc.parseReference(a.formula.ref)),a.formula=u),a.validation&&(a.validation=this._compileValidation(r,s,a.validation)),this._properties.fromJSON(this._grid.index(r,s),a);t.selection&&(this._viewSelection.selection=this._viewSelection.originalSelection=this._ref(t.selection)),t.activeCell&&(c=this._ref(t.activeCell),this._viewSelection._activeCell=c.toRangeRef(),this._viewSelection.originalActiveCell=c),t.mergedCells&&t.mergedCells.forEach(function(e){this.range(e).merge()},this),t.sort&&(this._sort={ref:this._ref(t.sort.ref),columns:t.sort.columns.slice(0)}),t.filter&&(h=t.filter.ref,p=void 0===t.filter.columns?[]:t.filter.columns,h?(this._filter={ref:this._ref(h),columns:p.map(function(t){return{index:t.index,filter:e.spreadsheet.Filter.create(t)}})},this._refreshFilter()):e.logToConsole("Dropping filter for sheet '"+t.name+"' due to missing ref")),void 0!==t.showGridLines&&(this._showGridLines=t.showGridLines),this._gridLinesColor=t.gridLinesColor}),this._rows._refresh(),this._columns._refresh()},formula:function(e){return this._properties.get("formula",this._grid.cellRefIndex(e))},validation:function(e){return this._properties.get("validation",this._grid.cellRefIndex(e))},resetFormulas:function(){this._forFormulas(function(e){e.reset()})},resetValidations:function(){this._forValidations(function(e){e.reset()})},recalc:function(e,t){function n(){o--,a!=r||o||t()}var i=this._properties.get("formula").values(),r=i.length,o=0,a=0;if(!r&&t)return t();for(;a<r;)o++,i[a++].value.exec(e,t?n:null)},revalidate:function(e){var n=this;this._forValidations(function(r){var o=new i(r.row,r.col),a=new t(o,o);r.exec(e,n._get(a,"value"),n._get(a,"format"))})},_value:function(e,t,n){var i=this._grid.index(e,t);return void 0===n?this._properties.get("value",i):void this._properties.set("value",i,i,n)},_validation:function(e,t){var n=this._grid.index(e,t);return this._properties.get("validation",n)},_compileValidation:function(t,n,i){return i instanceof e.spreadsheet.validation.Validation?i.clone(this._name(),t,n):(null!=i.from&&(i.from=(i.from+"").replace(/^=/,"")),null!=i.to&&(i.to=(i.to+"").replace(/^=/,"")),e.spreadsheet.validation.compile(this._name(),t,n,i))},_compileFormula:function(t,n,i){return i=i.replace(/^=/,""),i=e.spreadsheet.calc.parseFormula(this._name(),t,n,i),e.spreadsheet.calc.compile(i)},_copyValuesInRange:function(e,t,n,i){var r,o,a,s,l;for(r=e.col;r<=t.col;r++)for(o=this._grid.index(e.row,r),a=this._grid.index(t.row,r),s=o,l=e.row;s<=a;++s,++l)n=n.clone(this._name(),l,r),this._properties.set(i,s,s,n);return n},_set:function(t,n,i){var r,o,a,s=this._grid.normalize(t.topLeft),l=this._grid.normalize(t.bottomRight);if("number"==typeof i&&(i=e.spreadsheet.calc.runtime.limitPrecision(i)),i&&"formula"==n)"string"==typeof i&&(i=this._compileFormula(s.row,s.col,i)),i=this._copyValuesInRange(s,l,i,"formula");else if(i&&"validation"==n)i=this._compileValidation(s.row,s.col,i),i=this._copyValuesInRange(s,l,i,"validation");else for(r=s.col;r<=l.col;r++)o=this._grid.index(s.row,r),a=this._grid.index(l.row,r),this._properties.set(n,o,a,i),"formula"==n&&this._properties.set("value",o,a,null)},_get:function(e,t){var n=this._grid.normalize(e.topLeft),i=this._grid.index(n.row,n.col);return this._properties.get(t,i)},batch:function(e,t){var n=this.suspendChanges();return this.suspendChanges(!0),e.call(this),this.suspendChanges(n).triggerChange(t||{recalc:!0})},_sortBy:function(e,t){var n=null;t.forEach(function(t){n=this._sorter.sortBy(e,t.index,this._properties.get("value"),t.ascending,n)},this),this._sort={ref:e,columns:t},this._refreshFilter(),this.forEach(e,function(e,t,n){var i,r,o=n.formula;o&&(i=e-o.row,0!==i&&(r=i>0?o.row:o.row+i,o.adjust(this.name(),"row",r,i)))}.bind(this)),this.triggerChange({recalc:!0})},_refreshFilter:function(){this._filter&&this._filterBy(this._filter.ref,this._filter.columns)},_filterBy:function(t,n){this.batch(function(){for(var i=t.topLeft.row;i<=t.bottomRight.row;i++)this._rows.hidden(i)&&this._rows.unhide(i);n.forEach(function(n){var i,r,o,a=t.resize({top:1}).toColumn(n.index),s=[];if(a!==e.spreadsheet.NULLREF)for(this.forEach(a,function(e,t,n){n.row=e,s.push(n)}),n.filter.prepare(s),i=0;i<s.length;i++)r=s[i],o=n.filter.value(r),n.filter.matches(o)===!1&&this.hideRow(r.row)},this),this._filter={ref:t,columns:n}},{recalc:!0,layout:!0,filter:!0})},filterColumn:function(e){var t=this.filter().ref;return e.toRangeRef().topLeft.col-t.topLeft.col},filter:function(){return this._filter},clearFilter:function(e){this._clearFilter(e instanceof Array?e:[e])},_clearFilter:function(e){this._filter&&this.batch(function(){this._filter.columns=this._filter.columns.filter(function(t){return e.indexOf(t.index)<0}),this._refreshFilter()},{recalc:!0,layout:!0,filter:!0})},getAxisState:function(){return{rows:this._rows.getState(),columns:this._columns.getState()}},setAxisState:function(e){this._rows.setState(e.rows),this._columns.setState(e.columns),this.triggerChange({layout:!0})},getState:function(){return{rows:this._rows.getState(),columns:this._columns.getState(),mergedCells:this._mergedCells.map(function(e){return e.clone()}),properties:this._properties.getState()}},setState:function(t){this._rows.setState(t.rows),this._columns.setState(t.columns),this._mergedCells=t.mergedCells,this._properties.setState(t.properties),this.triggerChange(e.spreadsheet.ALL_REASONS)},_merge:function(t){var n,i=this._mergedCells,o=this;return this.batch(function(){n=t.map(function(t){var n,a,s,l,d,u,c;return t instanceof e.spreadsheet.CellRef?t:(n=t.toRangeRef().union(i,function(e){i.splice(i.indexOf(e),1)}),a=new r(n,o),s=a._get("formula"),l=a.value(),d=a.format(),u=a.background(),a.value(null),a.format(null),a.background(null),c=new r(n.collapse(),o),s?c._set("formula",s):c.value(l),c.format(d),c.background(u),i.push(n),n)});var a=o._viewSelection;a.selection=o.unionWithMerged(a.originalSelection),a._activeCell=o.unionWithMerged(a.originalActiveCell)},{activeCell:!0,selection:!0}),n}}),e.spreadsheet.Sheet=s)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/sheetsbar.min",["kendo.core.min","kendo.sortable.min"],e)}(function(){!function(e){var t,n,i,r,o,a;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n=e._outerWidth,i=".",r=" ",o={sheetsBarWrapper:"k-widget k-header",sheetsBarSheetsWrapper:"k-tabstrip k-floatwrap k-tabstrip-bottom",sheetsBarActive:"k-spreadsheet-sheets-bar-active",sheetsBarInactive:"k-spreadsheet-sheets-bar-inactive",sheetsBarAdd:"k-spreadsheet-sheets-bar-add",sheetsBarRemove:"k-spreadsheet-sheets-remove",sheetsBarItems:"k-spreadsheet-sheets-items",sheetsBarEditor:"k-spreadsheet-sheets-editor",sheetsBarScrollable:"k-tabstrip-scrollable",sheetsBarNext:"k-tabstrip-next",sheetsBarPrev:"k-tabstrip-prev",sheetsBarKItem:"k-item k-state-default",sheetsBarKActive:"k-state-active k-state-tab-on-top",sheetsBarKTextbox:"k-textbox",sheetsBarKLink:"k-link",sheetsBarKIcon:"k-icon",sheetsBarKFontIcon:"k-icon",sheetsBarKButton:"k-button k-button-icon",sheetsBarKButtonBare:"k-bare",sheetsBarKArrowW:"k-i-arrow-60-left",sheetsBarKArrowE:"k-i-arrow-60-right",sheetsBarKReset:"k-reset k-tabstrip-items",sheetsBarKIconX:"k-i-close",sheetsBarKSprite:"k-sprite",sheetsBarKIconPlus:"k-i-plus",
sheetsBarHintWrapper:"k-widget k-tabstrip k-tabstrip-bottom k-spreadsheet-sheets-items-hint",sheetsBarKResetItems:"k-reset k-tabstrip-items"},a=e.ui.Widget.extend({init:function(t,n){var r=a.classNames;e.ui.Widget.call(this,t,n),t=this.element,t.addClass(r.sheetsBarWrapper),this._openDialog=n.openDialog,this._tree=new e.dom.Tree(t[0]),this._tree.render([this._addButton(),this._createSheetsWrapper([])]),this._toggleScrollEvents(!0),this._createSortable(),this._sortable.bind("start",this._onSheetReorderStart.bind(this)),this._sortable.bind("end",this._onSheetReorderEnd.bind(this)),t.on("click",i+r.sheetsBarRemove,this._onSheetRemove.bind(this)),t.on("click","li",this._onSheetSelect.bind(this)),t.on("dblclick","li"+i+r.sheetsBarActive,this._createEditor.bind(this)),t.on("click",i+r.sheetsBarAdd,this._onAddSelect.bind(this))},options:{name:"SheetsBar",scrollable:{distance:200}},events:["select","reorder","rename"],_createEditor:function(){this._editor||(this._renderSheets(this._sheets,this._selectedIndex,!0),this._editor=this.element.find(e.format("input{0}{1}",i,a.classNames.sheetsBarEditor)).focus().on("keydown",this._onEditorKeydown.bind(this)).on("blur",this._onEditorBlur.bind(this)))},_destroyEditor:function(e){var t=e?null:this._editor.val();this._editor.off(),this._editor=null,this._renderSheets(this._sheets,this._selectedIndex,!1),this._onSheetRename(t)},renderSheets:function(e,t){!e||t<0||this._renderSheets(e,t,!1)},_renderSheets:function(t,o,s){var l,d,u,c,h,p,f,m,g,v,_,b=this,k=a.classNames;b._isRtl=e.support.isRtl(b.element),b._sheets=t,b._selectedIndex=o,b._renderHtml(s,!0),b._scrollableAllowed()&&(u=b._sheetsWrapper(),c=u.children(i+k.sheetsBarPrev),h=u.children(i+k.sheetsBarNext),p=2,f=b.element.find(i+k.sheetsBarAdd),m=n(f)+f.position().left+p,g=n(c)+p,v=b._sheetsGroup(),c.css({left:m}),u.addClass(k.sheetsBarScrollable+r+k.sheetsBarSheetsWrapper),v.css({marginLeft:m}),l=u[0].offsetWidth,d=v[0].scrollWidth,d+m>l?(_=Math.ceil(e.parseFloat(h.css("right"))),b._scrollableModeActive||(b._nowScrollingSheets=!1,b._scrollableModeActive=!0),v.css({marginLeft:g+m,marginRight:n(h)+_+p})):b._scrollableModeActive&&d<=l?(b._scrollableModeActive=!1,v.css({marginLeft:m,marginRight:""})):v.css({marginLeft:m}),b._toggleScrollButtons())},_toggleScrollButtons:function(e){var t=this,n=t._sheetsGroup(),r=t._sheetsWrapper(),o=n.scrollLeft(),s=r.find(i+a.classNames.sheetsBarPrev),l=r.find(i+a.classNames.sheetsBarNext);e===!1?(s.toggle(!1),l.toggle(!1)):(s.toggle(t._isRtl?o<n[0].scrollWidth-n[0].offsetWidth-1:0!==o),l.toggle(t._isRtl?0!==o:o<n[0].scrollWidth-n[0].offsetWidth-1))},_toggleScrollEvents:function(e){var t=this,n=a.classNames,r=t.options,o=t._sheetsWrapper(),s=o.children(i+n.sheetsBarPrev),l=o.children(i+n.sheetsBarNext);e?(s.on("mousedown",function(){t._nowScrollingSheets=!0,t._scrollSheetsByDelta(r.scrollable.distance*(t._isRtl?1:-1))}),l.on("mousedown",function(){t._nowScrollingSheets=!0,t._scrollSheetsByDelta(r.scrollable.distance*(t._isRtl?-1:1))}),s.add(l).on("mouseup",function(){t._nowScrollingSheets=!1})):(s.off(),l.off())},_renderHtml:function(t,n){var i,o,s,l,d,u,c=[],h=e.dom,p=h.element,f=this._sheets,m=this._selectedIndex,g=a.classNames;for(i=0;i<f.length;i++)o=f[i],s=i===m,l={className:g.sheetsBarKItem+r},d=[],l.className+=s?g.sheetsBarKActive+r+g.sheetsBarActive:g.sheetsBarInactive,s&&t?d.push(p("input",{type:"text",value:o.name(),className:g.sheetsBarKTextbox+r+g.sheetsBarEditor,maxlength:50},[])):(d.push(p("span",{className:g.sheetsBarKLink,title:o.name()},[h.text(o.name())])),f.length>1&&(u=p("span",{className:g.sheetsBarKIcon+r+g.sheetsBarKFontIcon+r+g.sheetsBarKIconX},[]),d.push(p("span",{className:g.sheetsBarKLink+r+g.sheetsBarRemove},[u])))),c.push(p("li",l,d));this._tree.render([this._addButton(),this._createSheetsWrapper(c,n)])},_createSheetsWrapper:function(t,n){var i,o=e.dom.element,s=a.classNames,l=[o("ul",{className:s.sheetsBarKReset},t)];return n=!0,n&&(i=s.sheetsBarKButton+r+s.sheetsBarKButtonBare+r,l.push(o("span",{className:i+s.sheetsBarPrev},[o("span",{className:s.sheetsBarKIcon+r+s.sheetsBarKArrowW},[])])),l.push(o("span",{className:i+s.sheetsBarNext},[o("span",{className:s.sheetsBarKIcon+r+s.sheetsBarKArrowE},[])]))),o("div",{className:s.sheetsBarItems},l)},_createSortable:function(){var n=a.classNames;this._sortable=new e.ui.Sortable(this.element,{filter:e.format("ul li.{0},ul li.{1}",n.sheetsBarActive,n.sheetsBarInactive),container:i+n.sheetsBarItems,axis:"x",animation:!1,ignore:"input",end:function(){this.draggable.hint&&this.draggable.hint.remove()},hint:function(e){var i=t(e).clone();return i.wrap("<div class='"+n.sheetsBarHintWrapper+"'><ul class='"+n.sheetsBarKResetItems+"'></ul></div>").closest("div")}})},_onEditorKeydown:function(e){this._editor&&(13===e.which&&this._destroyEditor(),27===e.which&&this._destroyEditor(!0))},_onEditorBlur:function(){this._editor&&this._destroyEditor()},_onSheetReorderEnd:function(e){e.preventDefault(),this.trigger("reorder",{oldIndex:e.oldIndex,newIndex:e.newIndex})},_onSheetReorderStart:function(e){this._editor&&e.preventDefault()},_onSheetRemove:function(e){var n,i=t(e.target).closest("li").text();this._editor&&this._destroyEditor(),n=function(e){var t=e.sender;t.isConfirmed()&&this.trigger("remove",{name:i,confirmation:!0})}.bind(this),this._openDialog("confirmation",{close:n})},_onSheetSelect:function(e){var n=t(e.target).text();return t(e.target).is(i+a.classNames.sheetsBarEditor)||!n?void e.preventDefault():(this._editor&&this._destroyEditor(),this._scrollSheetsToItem(t(e.target).closest("li")),void this.trigger("select",{name:n,isAddButton:!1}))},_onSheetRename:function(e){this._sheets[this._selectedIndex].name()!==e&&null!==e&&this.trigger("rename",{name:e,sheetIndex:this._selectedIndex})},_onAddSelect:function(){this.trigger("select",{isAddButton:!0})},_addButton:function(){var t=e.dom.element,n=a.classNames;return t("a",{className:n.sheetsBarAdd+r+n.sheetsBarKButton},[t("span",{className:n.sheetsBarKIcon+r+n.sheetsBarKFontIcon+r+n.sheetsBarKIconPlus},[])])},destroy:function(){this._sortable.destroy()},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!isNaN(e.scrollable.distance)},_scrollSheetsToItem:function(e){var t,i,r,o,a,s,l,d=this;d._scrollableModeActive&&(t=d._sheetsGroup(),i=t.scrollLeft(),r=n(e),o=d._isRtl?e.position().left:e.position().left-t.children().first().position().left,a=t[0].offsetWidth,s=Math.ceil(parseFloat(t.css("padding-left"))),d._isRtl?o<0?l=i+o-(a-i)-s:o+r>a&&(l=i+o-r+2*s):i+a<o+r?l=o+r-a+2*s:i>o&&(l=o-s),t.finish().animate({scrollLeft:l},"fast","linear",function(){d._toggleScrollButtons()}))},_sheetsGroup:function(){return this._sheetsWrapper().children("ul")},_sheetsWrapper:function(){return this.element.find(i+a.classNames.sheetsBarItems)},_scrollSheetsByDelta:function(e){var t=this,n=t._sheetsGroup(),i=n.scrollLeft();n.finish().animate({scrollLeft:i+e},"fast","linear",function(){t._nowScrollingSheets?t._scrollSheetsByDelta(e):t._toggleScrollButtons()})}}),e.spreadsheet.SheetsBar=a,t.extend(!0,a,{classNames:o}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/calc.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e){e=e.toUpperCase();for(var t=0,n=0;n<e.length;++n)t=26*t+e.charCodeAt(n)-64;return t-1}function t(e){return parseInt(e,10)-1}function n(n,i){var r,o,a,s,l,u;if("#sheet"==n.toLowerCase())return _.SHEETREF;e:{if(!(r=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(n))){for(s=d(n,{}),l=[];;){if(u=s.next(),u instanceof w)u.rel=0;else{if(!(u instanceof k))break e;u.topLeft.rel=0,u.bottomRight.rel=0}if(l.push(u),s.eof())break;if(!s.is("op",","))break e;s.next()}return 1==l.length?l[0]:new _.UnionRef(l)}if(o=t(r[4]),a=e(r[2]),o<1048576&&a<16384)return new w(t(r[4]),e(r[2]))}if(!i)throw Error("Cannot parse reference: "+n)}function i(e,t,n,i){function r(e){return e.index=v.length,v.push(e),e}function o(e,t,n){if(g(e,t))return i.next();var r=i.peek();r?i.croak("Expected "+e+" «"+t+"» but found "+r.type+" «"+r.value+"»"):n||i.croak("Expected "+e+" «"+t+"»")}function a(e){return m(p(c(e)),0,e)}function s(e){return"TRUE"==e.upper||"FALSE"==e.upper?"TRUE"==e.upper?D:F:r(new y(e.value))}function l(){var e,t=i.next();for(t=t.value,o("punc","("),e=[];;){if(g("punc",")"))break;if(g("op",","))e.push({type:"null"}),i.next();else{if(e.push(a(!1)),i.eof()||g("punc",")"))break;o("op",",")}}return o("punc",")",!0),{type:"func",func:t,args:e}}function u(t){return t.hasSheet()||t.setSheet(e),r(t)}function c(e){var t;return g("ref")?t=u(i.next()):g("func")?t=l():g("punc","(")?(i.next(),t=a(!0),o("punc",")",!0)):g("punc","{")?(i.next(),t=h(),o("punc","}",!0)):g("num")||g("str")||g("error")?t=i.next():g("sym")?t=s(i.next()):g("op","+")||g("op","-")?t={type:"prefix",op:i.next().value,exp:c(e)}:i.croak(i.peek()?g("punc","[")?"External reference not supported":"Parse error":"Incomplete expression"),f(t)}function h(){for(var e=[],t=[e],n=!0;!i.eof()&&!g("punc","}");)n?n=!1:g("punc",";")?(t.push(e=[]),i.next()):o("op",","),e.push(a(!1));return{type:"matrix",value:t}}function p(e){return g("punc","(")||g("ref")||g("num")||g("func")?{type:"binary",op:" ",left:e,right:a(!1)}:e}function f(e){return g("op","%")?(i.next(),f({type:"postfix",op:"%",exp:e})):e}function m(e,t,n){var r,o,a=g("op");return a&&(n||","!=a.value)&&(r=T[a.value],r>t)?(i.next(),o=m(c(n),r,n),m({type:"binary",op:a.value,left:e,right:o},t,n)):e}var g,v=[];return i=d(i,{row:t,col:n}),g=i.is,{type:"exp",ast:a(!0),refs:v,sheet:e,row:t,col:n}}function r(e,t){var n,r=i(null,0,0,e);if(!(r.ast instanceof y))throw new S("Invalid name: "+e);return r=r.ast,t instanceof b||(n=i(r.sheet,0,0,t),t=n.ast instanceof b?n.ast:/^(?:str|num|bool|error)$/.test(n.ast.type)?n.ast.value:s(n)),{name:r,value:t}}function o(e){function t(e,i,r){function o(t){var o=e.op,a=T[o]<r||!r&&","==o||"prefix"==i.type&&r==T[o]&&"-"==i.op||"binary"==i.type&&r==T[o]&&e===i.right;return n(t(),a)}switch(e.type){case"num":case"bool":return JSON.stringify(e.value);case"error":return JSON.stringify("#"+e.value);case"str":return JSON.stringify(JSON.stringify(e.value));case"ref":return"this.refs["+e.index+"].print(row, col, mod)";case"prefix":return o(function(){return JSON.stringify(e.op)+" + "+t(e.exp,e,T[e.op])});case"postfix":return o(function(){return t(e.exp,e,T[e.op])+" + "+JSON.stringify(e.op)});case"binary":return o(function(){var i=n(t(e.left,e,T[e.op]),e.left instanceof y&&":"==e.op),r=n(t(e.right,e,T[e.op]),e.right instanceof y&&":"==e.op);return i+" + "+JSON.stringify(e.op)+" + "+r});case"func":return JSON.stringify(e.func+"(")+" + "+(e.args.length>0?e.args.map(function(n){return t(n,e,0)}).join(" + ', ' + "):"''")+" + ')'";case"matrix":return"'{ ' + "+e.value.map(function(n){return n.map(function(n){return t(n,e,0)}).join(" + ', ' + ")}).join(" + '; ' + ")+"+ ' }'";case"null":return"''"}throw Error("Cannot make printer for node "+e.type)}function n(e,t){return t?"'(' + "+e+" + ')'":e}return E("function(row, col, mod){return("+t(e.ast,e,0)+")}")}function a(e,t){function n(e,t){switch(e.type){case"ref":return i(e,t);case"num":case"str":case"null":case"error":case"bool":return r(e,t);case"prefix":case"postfix":return a(e,t);case"binary":return s(e,t);case"func":return c(e,t);case"lambda":return h(e,t);case"matrix":return p(e.value,t,!0)}throw Error("Cannot CPS "+e.type)}function i(e,t){return"name"==e.ref?o(e,t):r(e,t)}function r(e,t){return t(e)}function o(e,t){return{type:"func",func:",getname",args:[f(t),e]}}function a(e,t){return n({type:"func",func:"unary"+e.op,args:[e.exp]},t)}function s(e,t){return n({type:"func",func:"binary"+e.op,args:[e.left,e.right]},t)}function l(e,t,i,r){return n(e,function(e){var o=f(r),a=m("T"),s=m("E");return{type:"func",func:"if",args:[o,e,{type:"lambda",vars:[a],body:n(t||D,function(e){return{type:"call",func:{type:"var",name:a},args:[e]}})},{type:"lambda",vars:[s],body:n(i||F,function(e){return{type:"call",func:{type:"var",name:s},args:[e]}})}]}})}function d(e,t){return 0===e.length?r(D,t):n({type:"func",func:"IF",args:[e[0],{type:"func",func:"AND",args:e.slice(1)},F]},t)}function u(e,t){return 0===e.length?r(F,t):n({type:"func",func:"IF",args:[e[0],D,{type:"func",func:"OR",args:e.slice(1)}]},t)}function c(e,t){switch(e.func.toLowerCase()){case"if":return l(e.args[0],e.args[1],e.args[2],t);case"and":return d(e.args,t);case"or":return u(e.args,t);case"true":return t(D);case"false":return t(F)}return function i(t,r){return r==e.args.length?{type:"func",func:e.func,args:t}:n(e.args[r],function(e){return i(t.concat([e]),r+1)})}([f(t)],0)}function h(e,t){var i=m("K"),r=n(e.body,function(e){return{type:"call",func:{type:"var",value:i},args:[e]}});return t({type:"lambda",vars:[i].concat(e.vars),body:r})}function p(e,t,i){var r=[];return function o(a){return a==e.length?t({type:"matrix",value:r}):(i?p:n)(e[a],function(e){return r[a]=e,o(a+1)})}(0)}function f(e){var t=m("R");return{type:"lambda",vars:[t],body:e({type:"var",name:t})}}function m(e){return e||(e=""),e="_"+e,e+ ++g}var g=0;return n(e,t)}function s(e){function t(e){var i=e.type;if("num"==i)return e.value+"";if("str"==i)return JSON.stringify(e.value);if("error"==i)return"context.error("+JSON.stringify(e.value)+")";if("return"==i)return"context.resolve("+t(e.value)+")";if("func"==i)return"context.func("+JSON.stringify(e.func)+", "+t(e.args[0])+", "+n(e.args.slice(1))+")";if("call"==i)return t(e.func)+"("+e.args.map(t).join(", ")+")";if("ref"==i)return"refs["+e.index+"]";if("bool"==i)return""+e.value;if("if"==i)return"(context.bool("+t(e.co)+") ? "+t(e.th)+" : "+t(e.el)+")";if("lambda"==i)return"(function("+e.vars.join(", ")+"){ return("+t(e.body)+") })";if("var"==i)return e.name;if("matrix"==i)return n(e.value);if("null"==i)return"null";throw Error("Cannot compile expression "+i)}function n(e){return"[ "+e.map(t).join(", ")+" ]"}var i,r=o(e),s=r.call(e),l=A[s];return l?l.clone(e.sheet,e.row,e.col):(i=t(a(e.ast,function(e){return{type:"return",value:e}})),i=["function(){","var context = this, refs = context.formula.absrefs",i,"}"].join(";\n"),l=new C.Formula(e.refs,E(i),r,e.sheet,e.row,e.col),A[s]=l.clone(e.sheet,e.row,e.col),l)}function l(e){return e}function d(n,i){function r(e,t){var n=o();return null==n||null!=e&&n.type!==e||null!=t&&n.value!==t?null:n}function o(){return null==C&&(C=s()),C}function a(){if(null!=C){var e=C;return C=null,e}return s()}function s(){var e,t=n.peek();return t&&("sym"!=t.type&&"rc"!=t.type&&"num"!=t.type||(e=b(8,u)||b(6,p)||b(6,f)||b(4,m)||b(4,g)||b(2,v)||b(2,_)),e||(e=n.next())),e}function d(r,o){var a,s,l,d,u;if("rc"==r.type)return!r.rel||i.forEditor||null!=i.row&&null!=i.col||n.croak("Cannot read relative cell in RC notation"),new w(r.row,r.col,r.rel);if("num"==r.type)return r.value<=1048577?T(new w(t(r.value),o?-(1/0):+(1/0),2)):null;if(a=r.value,s=/^(\$)?([a-z]+)(\$)?(\d+)$/i.exec(a))return l=t(s[4]),d=e(s[2]),l<=1048576&&d<=16383?T(new w(t(s[4]),e(s[2]),(s[1]?0:1)|(s[3]?0:2))):null;if(u="$"==a.charAt(0),u&&(a=a.substr(1)),/^\d+$/.test(a)){if(l=t(a),l<=1048576)return T(new w(t(a),o?-(1/0):+(1/0),u?0:2))}else if(d=e(a),d<=16383)return T(new w(o?-(1/0):+(1/0),e(a),u?0:1))}function u(e,t,n,i,r,o,a,s){if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==n.type&&"punc"==i.type&&"!"==i.value&&("sym"==r.type||"rc"==r.type||"num"==r.type&&r.value==r.value|0)&&"op"==o.type&&":"==o.value&&("sym"==a.type||"rc"==a.type||"num"==a.type&&a.value==a.value|0)&&a.type==r.type&&("punc"!=s.type||"("!=s.value||a.space)){var l=d(r,!0),u=d(a,!1);if(l&&u)return x(7),S(new k(l.setSheet(e.value,!0),u.setSheet(n.value,!0)).setSheet(e.value,!0),e,a)}}function p(e,t,n,i,r,o){var a,s;if("sym"==e.type&&"op"==t.type&&":"==t.value&&"sym"==n.type&&"punc"==i.type&&"!"==i.value&&("sym"==r.type||"rc"==r.type||"num"==r.type&&r.value==r.value|0)&&("punc"!=o.type||"("!=o.value||r.space)&&(a=d(r)))return x(5),s=a.clone(),S(new k(a.setSheet(e.value,!0),s.setSheet(n.value,!0)).setSheet(e.value,!0),e,r)}function f(e,t,n,i,r,o){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&"op"==i.type&&":"==i.value&&("sym"==r.type||"rc"==r.type||"num"==r.type&&r.value==r.value|0)&&("punc"!=o.type||"("!=o.value||r.space)){var a=d(n,!0),s=d(r,!1);if(a&&s)return x(5),S(new k(a,s).setSheet(e.value,!0),e,r)}}function m(e,t,n,i){if("sym"==e.type&&"punc"==t.type&&"!"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&("punc"!=i.type||"("!=i.value||n.space)){x(3);var r=d(n);return r&&isFinite(r.row)||(r=new y(n.value)),S(r.setSheet(e.value,!0),e,n)}}function g(e,t,n,i){if(("sym"==e.type||"rc"==e.type||"num"==e.type&&e.value==e.value|0)&&"op"==t.type&&":"==t.value&&("sym"==n.type||"rc"==n.type||"num"==n.type&&n.value==n.value|0)&&("punc"!=i.type||"("!=i.value||n.space)){var r=d(e,!0),o=d(n,!1);if(r&&o)return x(3),S(new k(r,o),e,n)}}function v(e,t){if(("sym"==e.type||"rc"==e.type)&&("punc"!=t.type||"("!=t.value||e.space)){var n=d(e);if(n&&isFinite(n.row)&&isFinite(n.col))return x(1),S(n,e,e)}}function _(e,t){if("sym"==e.type&&"punc"==t.type&&"("==t.value&&!e.space)return e.type="func",x(1),e}var b,x,C,T,S;return n=c(h(n),i),b=n.ahead,x=n.skip,C=null,T=null!=i.row&&null!=i.col?function(e){return 1&e.rel&&(e.col-=i.col),2&e.rel&&(e.row-=i.row),e}:l,S=i.forEditor?function(e,t,n){return e.begin=t.begin,e.end=n.end,e}:l,{peek:o,next:a,croak:n.croak,eof:n.eof,is:r}}function u(e){return" \t\n ".indexOf(e)>=0}function c(e,t){function n(e){return/[0-9]/i.test(e)}function i(e){return/[a-z$_]/i.test(e)||v.isUnicodeLetter(e)}function r(e){return i(e)||n(e)||"."==e}function o(e){return e in T}function a(e){return"!;(){}[]".indexOf(e)>=0}function s(){var e=!1,t=S(function(t){return"."==t?!e&&(e=!0,!0):n(t)});return{type:"num",value:parseFloat(t)}}function l(t,n){return{type:"sym",value:t,upper:t.toUpperCase(),space:u(e.peek()),quote:n}}function d(e,t,n){if(!e&&!t&&!n)return null;if(!e&&!n||e&&n){var i=t?parseInt(t,10):0;return e?i:i-1}}function c(){var t,n,i=e.lookingAt(/^R(\[)?(-?[0-9]+)?(\])?C(\[)?(-?[0-9]+)?(\])?/i);return i&&(t=d(i[1],i[2],i[3]),n=d(i[4],i[5],i[6]),null!=t&&null!=n)?(e.skip(i),{type:"rc",row:t,col:n,rel:(i[4]||!(i[4]||i[5]||i[6])?1:0)|(i[1]||!(i[1]||i[2]||i[3])?2:0)}):l(S(r))}function h(){return e.next(),{type:"str",value:e.readEscaped('"')}}function p(){return e.next(),l(e.readEscaped("'"),!0)}function f(){return{type:"op",value:S(function(e,t){return t+e in T})}}function m(){return{type:"punc",value:e.next()}}function g(){if(e.eof())return null;var r,l=e.peek();return'"'==l?h():"'"==l?p():n(l)||"."==l?s():i(l)?c():o(l)?f():a(l)?m():(r=e.lookingAt(/^#([a-z\/]+)[?!]?/i))?(e.skip(r),{type:"error",value:r[1]}):(t.forEditor||e.croak("Can't handle character: "+l),{type:"error",value:e.next()})}function _(){for(var n,i;x.length<=C;)S(u),n=e.pos(),i=g(),t.forEditor&&i&&(i.begin=n,i.end=e.pos()),x.push(i);return x[C]}function b(){var e=_();return e&&C++,e}function k(e,t){for(var n=C,i=[];e-- >0;)i.push(b()||I);return C=n,t.apply(i,i)}function w(e){C+=e}function y(){return null==_()}var x=[],C=0,S=e.readWhile;return{next:b,peek:_,eof:y,croak:e.croak,ahead:k,skip:w}}function h(e){function t(){return c}function n(){var t=e.charAt(c++);return"\n"==t?(h++,p=0):p++,t}function i(){return e.charAt(c)}function r(){return""===i()}function o(t){throw new S(t+" (input: "+e+")",c)}function a(t){if("string"==typeof t)e.substr(c,t.length)!=t&&o("Expected "+t),s(t.length);else if(t instanceof RegExp){var n=t.exec(e.substr(c));if(n)return s(n[0].length),n}else s(t[0].length)}function s(e){for(;e-- >0;)n()}function l(e){for(var t,i=!1,o="";!r();)if(t=n(),i)o+=t,i=!1;else if("\\"==t)i=!0;else{if(t==e)break;o+=t}return o}function d(e){for(var t="";!r()&&e(i(),t);)t+=n();return t}function u(t){return t.exec(e.substr(c))}var c=0,h=1,p=0;return{next:n,peek:i,eof:r,croak:o,readWhile:d,readEscaped:l,lookingAt:u,skip:a,forward:s,pos:t}}function p(e,t,n){function i(){var i=e.next();return"sym"==i.type?"TRUE"==i.upper?(i.type="bool",i.value=!0):"FALSE"==i.upper&&(i.type="bool",i.value=!1):"ref"==i.type&&(i={type:"ref",ref:null!=t&&null!=n?i.absolute(t,n):i,begin:i.begin,end:i.end}),i}var r,o=[];for(e=d(e,{forEditor:!0,row:t,col:n});!e.eof();)o.push(i());return r=o[0],"op"==r.type&&"="==r.value&&(r.type="startexp"),o}function f(e,t,n){var i,r;for(t=t||0,n=n||0,e=d(e,{row:t,col:n}),i=[];!e.eof();){if(r=e.next(),"ref"!=r.type)throw new S("Expecting a reference but got: "+JSON.stringify(r));i.push(r.absolute(t,n))}return i}function m(e,t){var n=e+t,i=z[n];return i||(i="^(\\d+(COM\\d{3})*(DOT\\d+)?)",i=i.replace(/DOT/g,"\\"+t).replace(/COM/g,"\\"+e),i=RegExp(i),z[n]=i),i}function g(e,t){for(var n="";t-- >0;)n+=e;return n}var v,_,b,k,w,y,x,C,T,S,D,F,E,A,I,R,M,z;kendo.support.browser.msie&&kendo.support.browser.version<9||(v=kendo.util,_=kendo.spreadsheet,b=_.Ref,k=_.RangeRef,w=_.CellRef,y=_.NameRef,x=_.calc,C=x.runtime,T=Object.create(null),S=kendo.Class.extend({init:function(e,t){this.message=e,this.pos=t},toString:function(){return this.message}}),function(e){e.forEach(function(t,n){t.forEach(function(t){T[t]=e.length-n})})}([[":"],[" "],[","],["%"],["^"],["*","/"],["+","-"],["&"],["=","<",">","<=",">=","<>"]]),D={type:"bool",value:!0},F={type:"bool",value:!1},E=function(e){return function(t){var n=e[t];return n||(n=e[t]=Function("'use strict';return("+t+")")()),n}}(Object.create(null)),A=Object.create(null),I={type:"eof"},R=[],M=x.registerFormatParser=function(e){R.push(e)},x.parse=function(e,t,n,r,o){var a,s,l,d,u;if(r instanceof Date)return{type:"date",value:C.dateToSerial(r)};if("number"==typeof r)return{type:"number",value:r};if("boolean"==typeof r)return{type:"boolean",value:r};if(r+="",/^'/.test(r))return{type:"string",value:r.substr(1)};if(/^[0-9.]+%$/.test(r)&&(a=r.substr(0,r.length-1),s=parseFloat(a),!isNaN(s)&&s==a))return{type:"percent",value:s/100};if(/^=/.test(r))return r=r.substr(1),/\S/.test(r)?i(e,t,n,r):{type:"string",value:"="+r};for(l=0;l<R.length;++l)if(d=R[l](r))return d;return"true"==r.toLowerCase()?{type:"boolean",value:!0}:"false"==r.toLowerCase()?{type:"boolean",value:!1}:(u=C.parseDate(r,o))?{type:"date",value:C.dateToSerial(u)}:(s=parseFloat(r),!isNaN(s)&&r.length>0&&s==r?{type:"number",value:s}:{type:"string",value:r})},x.parseNameDefinition=r,x.parseFormula=i,x.parseReference=n,x.compile=s,x.parseSqref=f,x.InputStream=h,x.ParseError=S,x.tokenize=p,M(function(e){var t,n,i,r,o;return(t=/^(\d+):(\d+)$/.exec(e))?(n=parseInt(t[1],10),i=parseInt(t[2],10),{type:"date",format:"hh:mm",value:C.packTime(n,i,0,0)}):(t=/^(\d+):(\d+)(\.\d+)$/.exec(e))?(i=parseInt(t[1],10),r=parseInt(t[2],10),o=1e3*parseFloat(t[3]),{type:"date",format:"mm:ss.00",value:C.packTime(0,i,r,o)}):(t=/^(\d+):(\d+):(\d+)$/.exec(e))?(n=parseInt(t[1],10),i=parseInt(t[2],10),r=parseInt(t[3],10),{type:"date",format:"hh:mm:ss",value:C.packTime(n,i,r,0)}):(t=/^(\d+):(\d+):(\d+)(\.\d+)$/.exec(e))?(n=parseInt(t[1],10),i=parseInt(t[2],10),r=parseInt(t[3],10),o=1e3*parseFloat(t[4]),{type:"date",format:"hh:mm:ss.00",value:C.packTime(n,i,r,o)}):void 0}),M(function(e){var t,n,i,r=kendo.culture(),o=r.numberFormat[","],a=r.numberFormat["."],s=r.numberFormat.currency.symbol,l=m(o,a),d=RegExp("^\\s*\\"+s+"\\s*"),u=1,c="",p="",f=!1;if(e=h(e.replace(/^\s+|\s+$/g,"")),e.skip(/^-\s*/)&&(u=-1),(t=e.skip(d))&&(f=!0,c+='"'+t[0]+'"'),e.skip(/^-\s*/)){if(u<0)return null;u=-1}if(!(n=e.skip(l)))return null;if(c+="#",t=e.skip(d)){if(f)return null;f=!0,p='"'+t[0]+'"'}return e.eof()?((n[2]||f)&&(c+=",#"),n[3]&&(c+="."+g("0",n[3].length-1)),i=n[0].replace(RegExp("\\"+o,"g"),"").replace(RegExp("\\"+a,"g"),"."),c+=p,f&&(c+=";-"+c),{type:"number",currency:f,format:c,value:u*parseFloat(i)}):null}),z={})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/excel-reader.min",["kendo.core.min","kendo.color.min","util/parse-xml.min","spreadsheet/calc.min"],e)}(function(){"use strict";function e(e,t,i){var r=new FileReader;r.onload=function(e){var r=new JSZip(e.target.result);n(r,t,i)},r.readAsArrayBuffer(e)}function t(e){return e=/^\//.test(e)?e.substr(1):"xl/"+e}function n(e,t,n){var r,s,l,d,u,c,h;D=t.excelImportErrors=[],r=g(e),s=v(e,"_rels/workbook.xml"),l=b(e,s.byType.theme[0]),d=_(e,l),u=[],c=0,m(e,"xl/workbook.xml",{enter:function(n,i){var o,l,h,p;this.is(N)?(o=i["r:id"],l=s.byId[o],h=i.name,p=a(e,l),u.push({workbook:t,zip:e,strings:r,styles:d,file:l,options:{name:h,rows:Math.max(t.options.rows||0,p.rows),columns:Math.max(t.options.columns||0,p.cols),columnWidth:p.columnWidth,rowHeight:p.rowHeight}})):this.is(V)&&i.activeTab&&(c=k(i.activeTab))},text:function(e){var n,i,r,o=this.is(A);!o||w(o["function"])||w(o.vbProcedure)||(n=o.localSheetId,i=null,null!=n&&(i=u[n].options.name),r=o.name,i&&(r="'"+i.replace(/\'/g,"\\'")+"'!"+r),p(i,null,function(){t.defineName(r,e,w(o.hidden))},"reading user-defined name: "+r))}}),h=new x.Deferred,h.progress(function(e){n&&n.notify(e)}).then(function(){var e=t.sheets();o(e),t.activeSheet(e[c]),n&&n.resolve()}),i(u,t,h)}function i(e,t,n){var i,o=(new x.Deferred).resolve();for(i=0;i<e.length;i++)!function(i,a){o=o.then(function(){var o,s,l=t.insertSheet(i.options);return l.suspendChanges(!0),o=r(l,i),s={sheet:l,progress:a/(e.length-1)},o.then(function(){n.notify(s)}),o})}(e[i],i);o.then(function(){n.resolve()})}function r(e,t){var n=new x.Deferred;return setTimeout(function(){d(t.zip,t.file,e,t.strings,t.styles),n.resolve()},0),n}function o(e){for(var t=0;t<e.length;t++)e[t].suspendChanges(!1).triggerChange({recalc:!0})}function a(e,n){var i={rows:0,cols:0};return m(e,t(n),{enter:function(e,t){if("dimension"==e){var n=T(t.ref);n.bottomRight&&(i.cols=n.bottomRight.col+1,i.rows=n.bottomRight.row+1)}else"sheetFormatPr"===e?(t.defaultColWidth&&(i.columnWidth=s(parseFloat(t.defaultColWidth))),t.defaultRowHeight&&(i.rowHeight=l(parseFloat(t.defaultRowHeight)))):this.is(z)&&this.exit()}}),i}function s(e){var t=7,n=(256*e+Math.floor(128/t))/256;return Math.floor(n)*t}function l(e){return 1.5625*e}function d(e,n,i,r,o){var a,d,g,_,b,y,x,C,A,N,P,L,V,$,K=i._columns._count,Y=null,Q=n.replace(/worksheets\//,"worksheets/_rels/"),X=v(e,Q),J=[];D=i._workbook.excelImportErrors,m(e,t(n),{enter:function(e,t){var n,r,p,m,v,b,y,x,C,S,D;if(this.is(F))g=null,_=null,a=t.r,null==a&&(a=T(Y),a.col++,a=""+a),Y=a,d=t.t,r=t.s,null!=r&&f(i,a,o,r);else if(this.is(R))i.range(t.ref).merge();else if(this.is(E)){if(p=k(t.min)-1,m=Math.min(K,k(t.max))-1,t.width&&(v=s(parseFloat(t.width)),0!==v&&i._columns.values.value(p,m,v)),"1"===t.hidden||0===v)for(b=p;b<=m;b++)i.hideColumn(b);null!=t.style&&f(i,new kendo.spreadsheet.RangeRef(new kendo.spreadsheet.CellRef((-(1/0)),p),new kendo.spreadsheet.CellRef((+(1/0)),m)),o,t.style)}else this.is(z)?(y=k(t.r)-1,t.ht&&(x=l(parseFloat(t.ht)),0!==x&&i._rows.values.value(y,y,x)),"1"!==t.hidden&&0!==x||i.hideRow(y)):this.is(H)?t.activeCell&&(C=T(t.activeCell),i.select(C,!0)):this.is(M)?"frozen"==t.state&&(t.xSplit&&i.frozenColumns(k(t.xSplit)),t.ySplit&&i.frozenRows(k(t.ySplit))):this.is(W)?i.showGridLines(w(t.showGridLines,!0)):this.is(U)?(S=t["r:id"],D=X.byId[S],D&&i.range(t.ref).link(D)):this.is(["autoFilter"])?A=t.ref:A&&(this.is(["filterColumn"])?N=parseInt(t.colId,10):this.is(["customFilters"])?(P=w(t.and)?"and":"or",L=[]):this.is(["customFilter"])?(n=u(t.operator,t.val),n&&L.push({operator:n.operator,value:n.value})):this.is(["dynamicFilter"])?J.push({column:N,filter:new kendo.spreadsheet.DynamicFilter({type:c(t.type)})}):this.is(["top10"])?J.push({column:N,filter:new kendo.spreadsheet.TopFilter({value:h(t.val),type:function(e,t){return e&&t?"topPercent":t?"topNumber":e?"bottomPercent":"bottomNumber"}(w(t.percent),w(t.top))})}):this.is(["filters"])?(V=w(t.blank),$=[]):this.is(["filter"])&&$.push(h(t.val)))},leave:function(e,t){var n,o;this.is(F)?null!=_?(n=p(i,b||a,function(){i.range(b||a).formula(_,y)},"parsing formula"),n&&i.range(b||a).value(_).background("#ffaaaa")):null!=g&&(o=i.range(a),o._get("formula")||(d&&"n"!=d?"s"==d?g=r[k(g)]:"b"==d?g="1"===g:"d"==d&&(g=kendo.parseDate(g)):g=parseFloat(g),null!=g&&o.value(g))):this.is(q)?!function(){var e=kendo.spreadsheet.calc.parseSqref(t.sqref),n=t.type.toLowerCase(),r=t.operator;/^(?:whole|decimal)$/.test(n)?n="number":"list"==n&&(r="list"),!r&&/^(?:number|date)$/.test(n)&&(r="between"),e.forEach(function(e){p(i,e,function(){i.range(e).validation({type:w(t.showErrorMessage,!0)?"reject":"warning",from:x,to:C,dataType:n,comparerType:S[r]||r,allowNulls:w(t.allowBlank),showButton:w(t.showDropDown)||"date"==n||"list"==n,messageTemplate:t.error,titleTemplate:t.errorTitle})},"parsing validation")})}():"cols"==e?i._columns._refresh():"sheetData"==e?i._rows._refresh():"autoFilter"==e?(i.range(A).filter(J),A=null):A&&("customFilters"==e?J.push({column:N,filter:new kendo.spreadsheet.CustomFilter({logic:P,criteria:L})}):"filters"==e&&J.push({column:N,filter:new kendo.spreadsheet.ValueFilter({values:$,blanks:V})}))},text:function(e){var t;this.is(O)||this.is(B)?g=e:(t=this.is(I))?(_=e,y="array"==t.t,b=y||"shared"==t.t?t.ref:null):this.is(j)?x=e:this.is(G)&&(C=e)}})}function u(e,t){var n={equal:"eq",notEqual:"ne",greaterThan:"gt",greaterThanOrEqual:"gte",lessThan:"lt",lessThanOrEqual:"lte"}[e];return t=h(t),n&&"number"==typeof t?{operator:n,value:t}:"notEqual"!=e&&e||"string"!=typeof t?void 0:{operator:e?"doesnotmatch":"matches",value:t}}function c(e){return{Q1:"quarter1",Q2:"quarter2",Q3:"quarter3",Q4:"quarter4",M1:"january",M2:"february",M3:"march",M4:"april",M5:"may",M6:"june",M7:"july",M8:"august",M9:"september",M10:"october",M11:"november",M12:"december"}[e.toUpperCase()]||e}function h(e){var t=parseFloat(e);return isNaN(t)||t!=e?e:t}function p(e,t,n,i){try{return n(),!1}catch(r){var o={context:i,error:r+""};return e&&(o.sheet=e.name()),t&&(o.location=t+""),D.push(o),!0}}function f(e,t,n,i){function r(e){var t="string"==typeof e?e:e.formatCode;null==t||/^general$/i.test(t)||(t=t.replace(/^\[\$-[0-9]+\]/,""),c.format(t))}function o(e){"solid"==e.type&&c.background(e.color)}function a(e){c.fontFamily(e.name),c._property("fontSize",e.size),e.bold&&c.bold(!0),e.italic&&c.italic(!0)}function s(e){function t(t,n){var i,r,o=e[t];o&&(i=$[o.style],0!==i&&(r=o.color,null==r&&(r="#000"),c._property(n,{size:i,color:r})))}t("left","borderLeft"),t("top","borderTop"),t("right","borderRight"),t("bottom","borderBottom")}function l(e,t){var n=h[e];if(null!=n&&!n)return!1;if(u=h[t],d&&null==u){if(n=d[e],null!=n&&!n)return!1;u=d[t]}return null!=u}var d,u,c=e.range(t),h=n.inlineStyles[i];h.xfId&&(d=n.namedStyles[h.xfId]),l("applyBorder","borderId")&&s(n.borders[u]),l("applyFont","fontId")&&a(n.fonts[u]),l("applyAlignment","textAlign")&&c.textAlign(u),l("applyAlignment","verticalAlign")&&c.verticalAlign(u),l("applyAlignment","wrapText")&&c._property("wrap",u),l("applyFill","fillId")&&o(n.fills[u]),l("applyNumberFormat","numFmtId")&&r(n.numFmts[u]||K[u])}function m(e,t,n){var i=e.files[t];i&&C(i.asUint8Array(),n)}function g(e){var t=[],n=null;return m(e,"xl/sharedStrings.xml",{leave:function(){this.is(L)&&(t.push(n),n=null)},text:function(e){this.is(P)&&(null==n&&(n=""),n+=e)}}),t}function v(e,n){var i={byId:{},byType:{theme:[]}};return m(e,t(n)+".rels",{enter:function(e,t){var n,r;"Relationship"==e&&(i.byId[t.Id]=t.Target,n=t.Type.match(/\w+$/)[0],r=i.byType[n]||[],r.push(t.Target),i.byType[n]=r)}}),i}function _(e,t){function n(e){function t(t){null!=e[t]&&(n[t]=w(e[t]))}var n={borderId:k(e.borderId),fillId:k(e.fillId),fontId:k(e.fontId),numFmtId:k(e.numFmtId),pivotButton:w(e.pivotButton),quotePrefix:w(e.quotePrefix),xfId:k(e.xfId)};return t("applyAlignment"),t("applyBorder"),t("applyFill"),t("applyFont"),t("applyNumberFormat"),t("applyProtection"),n}function i(e){var n,i,r;return e.rgb?y(e.rgb):e.indexed?te[k(e.indexed)]:e.theme?(n=t.colorScheme[k(e.theme)])?(i=kendo.parseColor(n),e.tint&&(i=i.toHSL(),r=parseFloat(e.tint),i.l=r<0?i.l*(1+r):i.l*(1-r)+(100-100*(1-r))),i.toCssRgba()):te[0]:void 0}var r={fonts:[],
numFmts:{},fills:[],borders:[],namedStyles:[],inlineStyles:[]},o=null,a=null,s=null,l=null;return m(e,"xl/styles.xml",{enter:function(e,t,d){if(this.is(ee))r.numFmts[t.numFmtId]=t;else if(this.is(X))r.fonts.push(o={});else if(o)"sz"==e?o.size=parseFloat(t.val):"name"==e?o.name=t.val:"b"==e?o.bold=w(t.val,!0):"i"==e&&(o.italic=w(t.val,!0));else if(this.is(Q))r.fills.push(a={});else if(a)"patternFill"==e?a.type=t.patternType:"fgColor"==e&&"solid"===a.type?a.color=i(t):"bgColor"==e&&"solid"!==a.type&&(a.color=i(t));else if(this.is(Y))r.borders.push(s={});else if(s){if(/^(?:left|top|right|bottom)$/.test(e)&&t.style&&(s[e]={style:t.style}),"color"==e){var u=this.stack[this.stack.length-2].$tag;s[u].color=i(t)}}else this.is(Z)?(l=n(t),r.namedStyles.push(l),d&&(l=null)):this.is(J)?(l=n(t),r.inlineStyles.push(l),d&&(l=null)):l&&"alignment"==e&&(/^(?:left|center|right|justify)$/.test(t.horizontal)&&(l.textAlign=t.horizontal),/^(?:top|center|bottom)$/.test(t.vertical)&&(l.verticalAlign=t.vertical),null!=t.wrapText&&(l.wrapText=w(t.wrapText)))},leave:function(e){this.is(X)?o=null:this.is(Q)?a=null:this.is(Y)?s=null:"xf"==e&&(l=null)}}),r}function b(e,n){function i(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}var r=[],o={colorScheme:r},a=t(n);return e.files[a]&&(m(e,a,{enter:function(e,t){this.is(ie)?r.push(y("window"==t.val?"FFFFFFFF":"FF000000")):this.is(ne)&&r.push(y("FF"+t.val))}}),r.length>3&&(i(r,0,1),i(r,2,3))),o}function k(e){return null==e?null:parseInt(e,10)}function w(e,t){return null==e?t:"true"==e||e===!0||1==e}function y(e){var t=/^([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e);return"rgba("+parseInt(t[2],16)+", "+parseInt(t[3],16)+", "+parseInt(t[4],16)+", "+parseInt(t[1],16)/255+")"}var x,C,T,S,D,F,E,A,I,R,M,z,H,N,B,P,L,O,V,W,U,q,j,G,$,K,Y,Q,X,J,Z,ee,te,ne,ie;kendo.support.browser.msie&&kendo.support.browser.version<9||(x=kendo.jQuery,C=kendo.util.parseXML,T=kendo.spreadsheet.calc.parseReference,S={greaterThanOrEqual:"greaterThanOrEqualTo",lessThanOrEqual:"lessThanOrEqualTo"},D=null,F=["sheetData","row","c"],E=["cols","col"],A=["definedNames","definedName"],I=["sheetData","row","c","f"],R=["mergeCells","mergeCell"],M=["sheetViews","sheetView","pane"],z=["sheetData","row"],H=["sheetViews","sheetView","selection"],N=["sheets","sheet"],B=["sheetData","row","c","is"],P=["t"],L=["si"],O=["sheetData","row","c","v"],V=["bookViews","workbookView"],W=["sheetViews","sheetView"],U=["hyperlinks","hyperlink"],q=["dataValidations","dataValidation"],j=["dataValidations","dataValidation","formula1"],G=["dataValidations","dataValidation","formula2"],$={none:0,thin:1,medium:2,dashed:1,dotted:1,thick:3,"double":3,hair:1,mediumDashed:2,dashDot:1,mediumDashDot:2,dashDotDot:1,mediumDashDotDot:2,slantDashDot:1},K={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"mm-dd-yy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},Y=["borders","border"],Q=["fills","fill"],X=["fonts","font"],J=["cellXfs","xf"],Z=["cellStyleXfs","xf"],ee=["numFmts","numFmt"],te=[y("FF000000"),y("FFFFFFFF"),y("FFFF0000"),y("FF00FF00"),y("FF0000FF"),y("FFFFFF00"),y("FFFF00FF"),y("FF00FFFF"),y("FF000000"),y("FFFFFFFF"),y("FFFF0000"),y("FF00FF00"),y("FF0000FF"),y("FFFFFF00"),y("FFFF00FF"),y("FF00FFFF"),y("FF800000"),y("FF008000"),y("FF000080"),y("FF808000"),y("FF800080"),y("FF008080"),y("FFC0C0C0"),y("FF808080"),y("FF9999FF"),y("FF993366"),y("FFFFFFCC"),y("FFCCFFFF"),y("FF660066"),y("FFFF8080"),y("FF0066CC"),y("FFCCCCFF"),y("FF000080"),y("FFFF00FF"),y("FFFFFF00"),y("FF00FFFF"),y("FF800080"),y("FF800000"),y("FF008080"),y("FF0000FF"),y("FF00CCFF"),y("FFCCFFFF"),y("FFCCFFCC"),y("FFFFFF99"),y("FF99CCFF"),y("FFFF99CC"),y("FFCC99FF"),y("FFFFCC99"),y("FF3366FF"),y("FF33CCCC"),y("FF99CC00"),y("FFFFCC00"),y("FFFF9900"),y("FFFF6600"),y("FF666699"),y("FF969696"),y("FF003366"),y("FF339966"),y("FF003300"),y("FF333300"),y("FF993300"),y("FF993366"),y("FF333399"),y("FF333333"),y("FF000000"),y("FFFFFFFF")],ne=["a:clrScheme","*","a:srgbClr"],ie=["a:clrScheme","*","a:sysClr"],kendo.spreadsheet.readExcel=e,kendo.spreadsheet._readSheet=d,kendo.spreadsheet._readStrings=g,kendo.spreadsheet._readStyles=_,kendo.spreadsheet._readTheme=b,kendo.spreadsheet._readWorkbook=n)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/workbook.min",["kendo.core.min","spreadsheet/runtime.min","spreadsheet/references.min","spreadsheet/excel-reader.min"],e)}(function(){!function(e){function t(e,t){function n(e,t,n){return void 0!==e?e:void 0!==t?t:n}var i,r,o,a,s,l,d=n(e.rowCount,t.rows,200),u=n(e.columnCount,t.columns,50),c=n(e.rowHeight,t.rowHeight,20),h=n(e.columnWidth,t.columnWidth,64),p=n(e.headerHeight,t.headerHeight,20),f=n(e.headerWidth,t.headerWidth,32);if(void 0!==e.rows)for(i=0;i<e.rows.length;++i)if(r=e.rows[i],o=n(r.index,i),o>=d&&(d=o+1),r.cells)for(a=0;a<r.cells.length;++a)s=r.cells[a],l=n(s.index,a),l>=u&&(u=l+1);return{rowCount:d,columnCount:u,rowHeight:c,columnWidth:h,headerHeight:p,headerWidth:f}}var n,i,r,o,a;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=e.spreadsheet.calc.runtime.Formula,r=e.spreadsheet.Ref,o=e.spreadsheet.CalcError,a=e.Observable.extend({init:function(t,n){e.Observable.fn.init.call(this),this.options=t,this._view=n,this._sheets=[],this._sheetsSearchCache={},this._sheet=this.insertSheet({rows:this.options.rows,columns:this.options.columns,rowHeight:this.options.rowHeight,columnWidth:this.options.columnWidth,headerHeight:this.options.headerHeight,headerWidth:this.options.headerWidth,dataSource:this.options.dataSource}),this.undoRedoStack=new e.util.UndoRedoStack,this.undoRedoStack.bind(["undo","redo"],this._onUndoRedo.bind(this)),this._context=new e.spreadsheet.FormulaContext(this),this._validationContext=new e.spreadsheet.ValidationFormulaContext(this),this._names=Object.create(null),this.fromJSON(this.options)},clipboard:function(){return this._clipboard||(this._clipboard=new e.spreadsheet.Clipboard(this)),this._clipboard},destroy:function(){this.unbind(),this._clipboard&&this._clipboard.destroy()},events:["cut","copy","paste","change","excelImport","excelExport","insertSheet","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat"],_sheetChange:function(e){this.trigger("change",e)},_sheetInsertRow:function(e){this.trigger("insertRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetInsertColumn:function(e){this.trigger("insertColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetDeleteRow:function(e){this.trigger("deleteRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetDeleteColumn:function(e){this.trigger("deleteColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetHideRow:function(e){this.trigger("hideRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetHideColumn:function(e){this.trigger("hideColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetUnhideRow:function(e){this.trigger("unhideRow",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetUnhideColumn:function(e){this.trigger("unhideColumn",{sheet:e.sender,index:e.index})&&e.preventDefault()},_sheetSelect:function(e){this.trigger("select",e)},_sheetCommandRequest:function(e){this.trigger("commandRequest",e)},_inputForRef:function(t){return new e.spreadsheet.Range(t,this._sheet).input()},_onUndoRedo:function(e){e.command.range().select()},execute:function(t){var i,r=n.extend({workbook:this},t.options),o=new e.spreadsheet[t.command](r),a=this.activeSheet();return r.origin&&o.origin(r.origin),o.range(r.operatingRange?r.operatingRange:a.selection()),i=o.exec(),i&&"error"===i.reason||(o.cannotUndo?this.undoRedoStack.clear():this.undoRedoStack.push(o)),i},resetFormulas:function(){this._sheets.forEach(function(e){e.resetFormulas()})},resetValidations:function(){this._sheets.forEach(function(e){e.resetValidations()})},refresh:function(e){e.recalc&&(this.resetFormulas(),this.resetValidations(),this._sheet.recalc(this._context),this._sheet.revalidate(this._validationContext))},activeSheet:function(t){return void 0===t?this._sheet:void(this.sheetByName(t.name())&&(this._sheet=t,t.triggerChange(e.spreadsheet.ALL_REASONS)))},moveSheetToIndex:function(e,t){var n=this.sheetIndex(e),i=this._sheets;n!==-1&&(this._sheetsSearchCache={},i.splice(t,0,i.splice(n,1)[0]),this.trigger("change",{sheetSelection:!0}))},insertSheet:function(t){var n,i,r,o,a,s;if(t=t||{},n=this,i="number"==typeof t.index?t.index:n._sheets.length,o=n._sheets,a=function(e){e=e?e:1;var t="Sheet"+e;return n.sheetByName(t)?a(e+1):t},!t.name||!n.sheetByName(t.name))return this._sheetsSearchCache={},r=t.name||a(),s=new e.spreadsheet.Sheet(t.rows||this.options.rows,t.columns||this.options.columns,t.rowHeight||this.options.rowHeight,t.columnWidth||this.options.columnWidth,t.headerHeight||this.options.headerHeight,t.headerWidth||this.options.headerWidth,t.defaultCellStyle||this.options.defaultCellStyle),s._workbook=this,s._name(r),this._bindSheetEvents(s),o.splice(i,0,s),t.data&&s.fromJSON(t.data),t.dataSource&&s.setDataSource(t.dataSource),this.trigger("change",{sheetSelection:!0}),s},_bindSheetEvents:function(e){e.bind("change",this._sheetChange.bind(this)),e.bind("insertRow",this._sheetInsertRow.bind(this)),e.bind("insertColumn",this._sheetInsertColumn.bind(this)),e.bind("deleteRow",this._sheetDeleteRow.bind(this)),e.bind("deleteColumn",this._sheetDeleteColumn.bind(this)),e.bind("hideRow",this._sheetHideRow.bind(this)),e.bind("hideColumn",this._sheetHideColumn.bind(this)),e.bind("unhideRow",this._sheetUnhideRow.bind(this)),e.bind("unhideColumn",this._sheetUnhideColumn.bind(this)),e.bind("select",this._sheetSelect.bind(this)),e.bind("commandRequest",this._sheetCommandRequest.bind(this))},sheets:function(){return this._sheets.slice()},sheetByName:function(e){return this._sheets[this.sheetIndex(e)]},sheetByIndex:function(e){return this._sheets[e]},sheetIndex:function(e){var t,n=this._sheets,i=("string"==typeof e?e:e.name()).toLowerCase(),r=this._sheetsSearchCache[i];if(r>=0)return r;for(r=0;r<n.length;r++)if(t=n[r].name().toLowerCase(),this._sheetsSearchCache[t]=r,t===i)return r;return-1},renameSheet:function(e,t){var n=e.name().toLowerCase();if(t&&n!==t.toLowerCase()&&!this.sheetByName(t)&&(e=this.sheetByName(n),e&&(this._sheetsSearchCache={},!this.trigger("renameSheet",{sheet:e,newSheetName:t}))))return this._sheets.forEach(function(e){e._forFormulas(function(e){e.renameSheet(n,t)})}),this.forEachName(function(e,o){e.nameref.renameSheet(n,t)&&(this.undefineName(o),e.name=e.nameref.print(),this.nameDefinition(e.name,e)),(e.value instanceof r||e.value instanceof i)&&e.value.renameSheet(n,t)}.bind(this)),e._name(t),this.trigger("change",{sheetSelection:!0}),e},removeSheet:function(e){var t,n=this,i=n._sheets,r=e.name(),o=n.sheetIndex(e);1!==i.length&&(this.trigger("removeSheet",{sheet:e})||(this._sheetsSearchCache={},o>-1&&(e.unbind(),i.splice(o,1),n.activeSheet().name()===r?(t=i[o===i.length?o-1:o],n.activeSheet(t)):this.trigger("change",{recalc:!0,sheetSelection:!0}))))},_clearSheets:function(){for(var e=0;e<this._sheets.length;e++)this._sheets[e].unbind();this._sheets=[],this._sheetsSearchCache={},this._names={}},fromJSON:function(e){var n,i,r,o;if(e.sheets)for(this._clearSheets(),n=0;n<e.sheets.length;n++)i=e.sheets[n],r=t(i,this.options),o=this.insertSheet({rows:r.rowCount,columns:r.columnCount,rowHeight:r.rowHeight,columnWidth:r.columnWidth,headerHeight:r.headerHeight,headerWidth:r.headerWidth,data:i}),i.dataSource&&o.setDataSource(i.dataSource);this.activeSheet(e.activeSheet?this.sheetByName(e.activeSheet):this._sheets[0]),e.names&&e.names.forEach(function(e){this.defineName(e.name,e.value,e.hidden)},this)},toJSON:function(){this.resetFormulas(),this.resetValidations();var e=Object.keys(this._names).map(function(e){var t=this._names[e],n=t.value;return n instanceof r||n instanceof i?n=n.print(0,0,!0):n instanceof o?n+="":n=JSON.stringify(n),{value:n,hidden:t.hidden,name:t.name,sheet:t.nameref.sheet,localName:t.nameref.name}},this);return{activeSheet:this.activeSheet().name(),sheets:this._sheets.map(function(e){return e.recalc(this._context),e.revalidate(this._validationContext),e.toJSON()},this),names:e,columnWidth:this.options.columnWidth,rowHeight:this.options.rowHeight}},fromFile:function(t){var i=new n.Deferred,r=i.promise(),o={file:t,promise:r};return t&&!this.trigger("excelImport",o)?(this._clearSheets(),e.spreadsheet.readExcel(t,this,i)):i.reject(),r},saveAsExcel:function(t){var i,r;t=n.extend({},this.options.excel,t),i=this.toJSON(),this.trigger("excelExport",{workbook:i})||(r=new e.ooxml.Workbook(i),e.saveAs({dataURI:r.toDataURL(),fileName:i.fileName||t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy}))},draw:function(t,n){"function"!=typeof t||n||(n=t,t={});var i=[],r=this._sheets;!function o(a){if(a<r.length)r[a].draw(e.spreadsheet.SHEETREF,t,function(e){i.push(e),o(a+1)});else{var s=i[0];for(a=1;a<i.length;++a)s.children=s.children.concat(i[a].children);n(s)}}(0)},nameForRef:function(e,t){var n,i,o,a;void 0===t&&(t=e.sheet),t=t.toLowerCase(),n=e+"";for(i in this._names)if(o=this._names[i],a=o.value,a instanceof r&&(!a.sheet||a.sheet&&t==a.sheet.toLowerCase())&&a+""==n)return o;return{name:n}},defineName:function(t,n,i){var r=e.spreadsheet.calc.parseNameDefinition(t,n);t=r.name.print(),this._names[t.toLowerCase()]={value:r.value,hidden:i,name:t,nameref:r.name}},undefineName:function(e){delete this._names[e.toLowerCase()]},nameValue:function(e){return e=e.toLowerCase(),e in this._names?this._names[e].value:null},nameDefinition:function(e,t){return e=e.toLowerCase(),arguments.length>1&&(void 0===t?delete this._names[e]:this._names[e]=t),this._names[e]},forEachName:function(e){Object.keys(this._names).forEach(function(t){e(this._names[t],t)},this)},adjustNames:function(e,t,n,o){e=e.toLowerCase(),Object.keys(this._names).forEach(function(a){var s=this._names[a],l=s.value;l instanceof r&&l.sheet.toLowerCase()==e?s.value=l.adjust(null,null,null,null,t,n,o):l instanceof i&&l.adjust(e,t?"row":"col",n,o)},this)},options:{}}),e.spreadsheet.Workbook=a,e.PDFMixin&&(e.PDFMixin.extend(a.prototype),a.prototype.saveAsPDF=function(t){var i=new n.Deferred,r=i.promise(),o={promise:r};if(!this.trigger("pdfExport",o))return this._drawPDF(t,i).then(function(t){return e.drawing.exportPDF(t)}).done(function(n){e.saveAs({dataURI:n,fileName:t.fileName,proxyURL:t.proxyURL,forceProxy:t.forceProxy,proxyTarget:t.proxyTarget}),i.resolve()}).fail(function(e){i.reject(e)}),r},a.prototype._drawPDF=function(e){var t=new n.Deferred,i=function(e){t.resolve(e)};switch(e.area){case"workbook":e.workbook.draw(e,i);break;case"sheet":e.workbook.activeSheet().draw(e,i);break;case"selection":e.workbook.activeSheet().selection().draw(e,i)}return t.promise()}))}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/formulacontext.min",["kendo.core.min"],e)}(function(){var e,t,n,i,r,o,a,s;kendo.support.browser.msie&&kendo.support.browser.version<9||(e=kendo.spreadsheet,t=e.CellRef,n=e.RangeRef,i=e.UnionRef,r=e.NameRef,o=e.Ref,a=kendo.Class.extend({init:function(e){this.workbook=e},getRefCells:function(e,a,s,l,d){var u,c,h,p,f,m,g,v,_,b,k,w,y,x,C,T,S;if(e instanceof t)return u=this.workbook.sheetByName(e.sheet),u&&e.valid()?(c=u.formula(e),h=u.range(e.row,e.col).value(),null!=c||null!=h?[{formula:c,value:h,row:e.row,col:e.col,sheet:e.sheet,hidden:!!a&&(0===u.columnWidth(e.col)||0===u.rowHeight(e.row))}]:[]):[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];if(e instanceof n){if(p=this.workbook.sheetIndex(e.sheet),f=[],m=p,e.endSheet&&(m=this.workbook.sheetIndex(e.endSheet),p>m&&(g=p,p=m,m=g)),p<0||m<0||!e.valid())return[{value:new kendo.spreadsheet.calc.runtime.CalcError("REF")}];for(;p<=m;)for(u=this.workbook.sheetByIndex(p++),v=u._grid.normalize(e.topLeft),_=u._grid.normalize(e.bottomRight),b=u._grid.cellRefIndex(v),k=u._grid.cellRefIndex(_),w=u._properties.iterator("value",b,k),y=v.col;y<=_.col;++y)for(x=v.row;x<=_.row;++x)C=u._grid.index(x,y),c=u._properties.get("formula",C),h=w.at(C),null==c&&null==h||f.push({formula:c,value:h,row:x,col:y,sheet:u.name(),hidden:!!a&&(0===u.columnWidth(y)||0===u.rowHeight(x))});return f}if(e instanceof i){for(T=[],p=0;p<e.refs.length;++p)T=T.concat(this.getRefCells(e.refs[p],a,s,l,d));return T}return e instanceof r?(S=this.nameValue(e,s,l,d),S instanceof o?this.getRefCells(S,a,s,l,d):[{value:null==S?new kendo.spreadsheet.calc.runtime.CalcError("NAME"):S}]):[]},nameValue:function(e,t,n,i){var r;return e.hasSheet()?r=this.workbook.nameValue(e.print()):(e=e.clone().setSheet(t,!0),r=this.workbook.nameValue(e.print()),null==r&&(r=this.workbook.nameValue(e.name))),r instanceof o&&(r=r.absolute(n,i)),r},getData:function(e,n,i,o){var a,s=e instanceof t;return e instanceof r&&(s=this.workbook.nameValue(e.name)instanceof t),a=this.getRefCells(e,!1,n,i,o).map(function(e){var t=e.value;return t instanceof kendo.spreadsheet.calc.runtime.Formula&&(t=t.value),t}),s?a[0]:a},onFormula:function(e){var t,n,i,r,a,s=this.workbook.sheetByName(e.sheet),l=e.row,d=e.col,u=e.value,c=s.formula({row:l,col:d});return c===e&&(t=e.arrayFormulaRange,t?(r=u.width,a=u.height,s.forEach(t,function(e,t){void 0===n&&(n=e,i=t),s._value(e,t,u.get((e-n)%a,(t-i)%r))})):(u instanceof o&&(u=this.getData(u,e.sheet,l,d),Array.isArray(u)&&(u=u[0]),void 0===u&&(u=null)),u instanceof kendo.spreadsheet.calc.runtime.Matrix&&(u=u.get(0,0)),s._value(l,d,u)),clearTimeout(s._formulaContextRefresh),s._formulaContextRefresh=setTimeout(function(){s.batch(function(){},{layout:!0})},50),!0)}}),s=a.extend({onFormula:function(){return!0}}),e.FormulaContext=a,e.ValidationFormulaContext=s)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/controller.min",["kendo.core.min"],e)}(function(){!function(e){"use strict";function t(e){return e.map(function(e){return'[data-action="'+e+'"]'}).join(",")}var n,i,r,o,a,s,l,d,u,c,h,p,f,m,g,v,_;if(!(e.support.browser.msie&&e.support.browser.version<9)){n=e.jQuery,i=/:alphanum$/,r={up:"up",down:"down",left:"left",right:"right",home:"first-col","ctrl+left":"first-col",end:"last-col","ctrl+right":"last-col","ctrl+up":"first-row","ctrl+down":"last-row","ctrl+home":"first","ctrl+end":"last",pageup:"prev-page",pagedown:"next-page"},o={tab:"next","shift+tab":"previous",enter:"lower","shift+enter":"upper","delete":"clearContents",backspace:"clearContents","shift+:alphanum":"edit",":alphanum":"edit","ctrl+:alphanum":"ctrl","alt+ctrl+:alphanum":"edit",":edit":"edit"},a={wheel:"onWheel","*+mousedown":"onMouseDown",contextmenu:"onContextMenu","*+mousedrag":"onMouseDrag","*+mouseup":"onMouseUp","*+dblclick":"onDblClick",mousemove:"onMouseMove"},s={pageup:"onPageUp",pagedown:"onPageDown",mouseup:"onMouseUp","*+cut":"onCut","*+paste":"onPaste","*+copy":"onCopy"},l={esc:"onEditorEsc",enter:"onEditorBlur","alt+enter":"insertNewline","shift+enter":"onEditorBlur",tab:"onEditorBlur","shift+tab":"onEditorBlur","shift+ctrl+enter":"onEditorArrayFormula"},d=n.extend({focus:"onEditorBarFocus"},l),u=n.extend({focus:"onEditorCellFocus"},l),c={cell:"range",rowheader:"row",columnheader:"column",topcorner:"sheet",autofill:"autofill"},h=t(["cut","copy","paste","insert-left","insert-right","insert-above","insert-below"]),p=t(["unhide-row","unhide-column"]),f=[],m=[],g=[];for(v in r)f.push(v),m.push("shift+"+v);for(v in o)g.push(v);s[f]="onAction",s[m]="onShiftAction",s[g]="onEntryAction",u[f]="onEditorAction",u[m]="onEditorShiftAction",_=e.Class.extend({init:function(t,i){this.view=t,this.workbook(i),this.container=n(t.container),this.clipboardElement=n(t.clipboard),this.cellContextMenu=t.cellContextMenu,this.rowHeaderContextMenu=t.rowHeaderContextMenu,this.colHeaderContextMenu=t.colHeaderContextMenu,this.scroller=t.scroller,this.tabstrip=t.tabstrip,this.sheetsbar=t.sheetsbar,t.nameEditor.bind("enter",this.onNameEditorEnter.bind(this)),t.nameEditor.bind("cancel",this.onNameEditorCancel.bind(this)),t.nameEditor.bind("select",this.onNameEditorSelect.bind(this)),t.nameEditor.bind("delete",this.onNameEditorDelete.bind(this)),this.editor=t.editor,this.editor.bind("change",this.onEditorChange.bind(this)),this.editor.bind("activate",this.onEditorActivate.bind(this)),this.editor.bind("deactivate",this.onEditorDeactivate.bind(this)),this.editor.bind("update",this.onEditorUpdate.bind(this)),n(t.scroller).on("scroll",this.onScroll.bind(this)),this.listener=new e.spreadsheet.EventListener(this.container,this,a),this._enableEditorEvents(),this.sheetsbar&&(this.sheetsbar.bind("select",this.onSheetBarSelect.bind(this)),this.sheetsbar.bind("reorder",this.onSheetBarReorder.bind(this)),this.sheetsbar.bind("rename",this.onSheetBarRename.bind(this)),this.sheetsbar.bind("remove",this.onSheetBarRemove.bind(this))),this.cellContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.rowHeaderContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.colHeaderContextMenu.bind("select",this.onContextMenuSelect.bind(this)),this.cellContextMenu.element.add(this.rowHeaderContextMenu.element).add(this.colHeaderContextMenu.element).on("contextmenu",!1),this.tabstrip&&(this.tabstrip.bind("action",this.onCommandRequest.bind(this)),this.tabstrip.bind("dialog",this.onDialogRequest.bind(this)))},_enableEditorEvents:function(t){void 0===t||t?(this.keyListener=new e.spreadsheet.EventListener(this.clipboardElement,this,s),this.barKeyListener=new e.spreadsheet.EventListener(this.editor.barElement(),this,d),this.inputKeyListener=new e.spreadsheet.EventListener(this.editor.cellElement(),this,u)):(this.keyListener.destroy(),this.barKeyListener.destroy(),this.inputKeyListener.destroy())},_execute:function(e){var t=this._workbook.execute(e);return"EditCommand"!==e.command||t||this._workbook.trigger("change",{editorClose:!0}),t&&(this._preventNavigation=!0,"error"===t.reason?this.view.showError(t,function(){this.activateEditor(!1),this.editor.value(this._lastEditorValue),this.editor._value=this._workbook._inputForRef(this._workbook.activeSheet()._viewActiveCell()),this.editor.select()}.bind(this)):this.view.openDialog(t.reason)),t},_activeTooltip:function(){return""+this._workbook.activeSheet().activeCell().simplify()},onContextMenuSelect:function(e){var t,i=n(e.item).data("action");switch(i){case"cut":t={command:"ToolbarCutCommand",options:{workbook:this._workbook}};break;case"copy":t={command:"ToolbarCopyCommand",options:{workbook:this._workbook}};break;case"paste":t={command:"ToolbarPasteCommand",options:{workbook:this._workbook}};break;case"unmerge":t={command:"MergeCellCommand",options:{value:"unmerge"}};break;case"merge":this.view.openDialog("merge");break;case"hide-row":t={command:"HideLineCommand",options:{axis:"row"}};break;case"hide-column":t={command:"HideLineCommand",options:{axis:"column"}};break;case"unhide-row":t={command:"UnHideLineCommand",options:{axis:"row"}};break;case"unhide-column":t={command:"UnHideLineCommand",options:{axis:"column"}};break;case"delete-row":t={command:"DeleteRowCommand"};break;case"delete-column":t={command:"DeleteColumnCommand"}}t&&this._execute(t)},onSheetBarRemove:function(e){var t=this._workbook.sheetByName(e.name);t&&this._workbook.removeSheet(t)},destroy:function(){this.listener.destroy(),this._enableEditorEvents(!1),this.keyListener.destroy(),this.inputKeyListener.destroy()},onSheetBarSelect:function(e){var t,n=this._workbook;if(e.isAddButton){if(this._workbook.trigger("insertSheet"))return;t=n.insertSheet()}else t=n.sheetByName(e.name);if(n.activeSheet().name()!==t.name()){if(this._workbook.trigger("selectSheet",{sheet:t}))return;n.activeSheet(t)}},onSheetBarReorder:function(e){var t=this._workbook.sheetByIndex(e.oldIndex);this._workbook.moveSheetToIndex(t,e.newIndex),this._workbook.activeSheet(t)},onSheetBarRename:function(e){var t=this._workbook.sheetByIndex(e.sheetIndex);return this._workbook.sheetByName(e.name)?void this.view.showError({reason:"error",type:"duplicateSheetName"}):(this._workbook.renameSheet(t,e.name),void this.clipboardElement.focus())},sheet:function(e){this.navigator=e.navigator(),this.axisManager=e.axisManager()},workbook:function(e){this._workbook=e,this.clipboard=e.clipboard(),e.bind("commandRequest",this.onCommandRequest.bind(this))},refresh:function(){var e,t,n=this.editor,i=this._workbook,r=i.activeSheet();this._viewPortHeight=this.view.scroller.clientHeight,this.navigator.height(this._viewPortHeight),n.isActive()||this.isEditorDisabled||(n.enable(r.selection().enable()!==!1),this.resetEditorValue()),e=r.selection()._ref.simplify(),t=this._workbook.nameForRef(e,r.name()),this.view.nameEditor.value(t.name)},onScroll:function(){this.view.render()},onWheel:function(e){var t=e.originalEvent.deltaX,n=e.originalEvent.deltaY;1===e.originalEvent.deltaMode&&(t*=10,n*=10),this.scrollWith(t,n),e.preventDefault()},onAction:function(e,t){this.navigator.moveActiveCell(r[t]),e.preventDefault()},onPageUp:function(){this.scrollDown(-this._viewPortHeight)},onPageDown:function(){this.scrollDown(this._viewPortHeight)},onEntryAction:function(e,t){var n,r,a,s;if(e.mod){switch(n=!0,r=String.fromCharCode(e.keyCode)){case"A":this.navigator.selectAll();break;case"Y":this._workbook.undoRedoStack.redo();break;case"Z":this._workbook.undoRedoStack.undo();break;default:n=!1}n&&e.preventDefault()}else if(a=this._workbook.activeSheet().selection().enable()===!1,s=":edit"!==t,"delete"==t||"backspace"==t)a||this._execute({command:"ClearContentCommand"}),e.preventDefault();else if(i.test(t)||!s){if(a)return void e.preventDefault();s&&this.editor.value(""),this.activateEditor(s)}else this.navigator.navigateInSelection(o[t]),e.preventDefault()},onShiftAction:function(e,t){this.navigator.modifySelection(r[t.replace("shift+","")],this.appendSelection),e.preventDefault()},onMouseMove:function(e){var t,n=this._workbook.activeSheet();n.resizingInProgress()||n.selectionInProgress()||(t=this.objectAt(e),"columnresizehandle"===t.type||"rowresizehandle"===t.type?n.positionResizeHandle(t.ref):n.removeResizeHandle())},onMouseDown:function(e){var t,n=this.objectAt(e);if(n.pane&&(this.originFrame=n.pane),"editor"===n.type)return this.onEditorEsc(),this.openCustomEditor(),void e.preventDefault();if(this.editor.canInsertRef(!1)&&n.ref)return this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs()),this.navigator.startSelection(n.ref,this._selectionMode,this.appendSelection,e.shiftKey),void e.preventDefault();if(this._preventNavigation=!1,this.editor.deactivate(),!this._preventNavigation){if(t=this._workbook.activeSheet(),"columnresizehandle"===n.type||"rowresizehandle"===n.type)return t.startResizing({x:n.x,y:n.y}),void e.preventDefault();if("filtericon"===n.type)return this.openFilterMenu(e),void e.preventDefault();this._selectionMode=c[n.type],this.appendSelection=e.mod,this.navigator.startSelection(n.ref,this._selectionMode,this.appendSelection,e.shiftKey)}},onContextMenu:function(t){var n,i,r,o,a,s=this._workbook.activeSheet();s.resizingInProgress()||(t.preventDefault(),this.cellContextMenu.close(),this.colHeaderContextMenu.close(),this.rowHeaderContextMenu.close(),i=this.objectAt(t),"columnresizehandle"!==i.type&&"rowresizehandle"!==i.type&&(this.navigator.selectForContextMenu(i.ref,c[i.type]),r=this.navigator._sheet.select()instanceof e.spreadsheet.UnionRef,o=!1,a=!1,"columnheader"==i.type?(n=this.colHeaderContextMenu,o=!r&&this.axisManager.selectionIncludesHiddenColumns()):"rowheader"==i.type?(n=this.rowHeaderContextMenu,o=!r&&this.axisManager.selectionIncludesHiddenRows()):(n=this.cellContextMenu,a=this.navigator.selectionIncludesMergedCells()),n.element.find(h).toggle(!r),n.element.find(p).toggle(o),n.element.find("[data-action=unmerge]").toggle(a),setTimeout(function(){n.open(t.pageX,t.pageY)})))},prevent:function(e){e.preventDefault()},constrainResize:function(e,t){var n=this._workbook.activeSheet(),i=n.resizeHandlePosition();return!i||"outside"===e||"topcorner"===e||t.col<i.col||t.row<i.row},onMouseDrag:function(e){var t,n,i,r;if("sheet"!==this._selectionMode){if(t={clientX:e.clientX,clientY:e.clientY},n=this.objectAt(t),i=this._workbook.activeSheet(),i.resizingInProgress())return void(this.constrainResize(n.type,n.ref)||i.resizeHintPosition({x:n.x,y:n.y}));if("outside"===n.type)return void this.startAutoScroll(n);this.originFrame===n.pane?this.selectToLocation(t):(r=this.originFrame._grid,n.x>r.right&&this.scrollLeft(),n.y>r.bottom&&this.scrollTop(),n.y<r.top||n.x<r.left?this.startAutoScroll(n,t):this.selectToLocation(t)),e.preventDefault()}},onMouseUp:function(e){var t,n,i,r=this._workbook.activeSheet();if(r.completeResizing(),this.navigator.completeSelection(),this.stopAutoScroll(),t=this.editor.activeEditor()){for(n=e.target;n;){if(n===t.element[0])return;n=n.parentNode}i=this.objectAt(e),i&&i.ref&&t.canInsertRef(!1)&&(t.refAtPoint(r),r._setFormulaSelections(t.highlightedRefs()))}},onDblClick:function(e){var t,n=this.objectAt(e),i=this._workbook.activeSheet().selection().enable()===!1;"cell"!==n.type||i||(t=this._workbook.activeSheet().selection(),this.activateEditor(!t.value()&&!t.formula()),this.onEditorUpdate())},onCut:function(e){if(e){var t=this.clipboardElement.find("table.kendo-clipboard-"+this.clipboard._uid).detach();this.clipboardElement.append(t.clone(!1)),setTimeout(function(){this.clipboardElement.empty().append(t)}.bind(this))}this._execute({command:"CutCommand",options:{workbook:this.view._workbook,event:e.originalEvent||e}})},clipBoardValue:function(){return this.clipboardElement.html()},onPaste:function(t){var n,i,r,o="",a="";if(this.clipboard.menuInvoked=void 0===t,t){if(!t.originalEvent.clipboardData||!t.originalEvent.clipboardData.getData)return r=this.clipboardElement.find("table.kendo-clipboard-"+this.clipboard._uid).detach(),this.clipboardElement.empty(),void setTimeout(function(){var e=this.clipboardElement.html(),n=window.clipboardData.getData("Text").trim();(e||n)&&(this.clipboard.external({html:e,plain:n}),this.clipboardElement.empty().append(r),this._execute({command:"PasteCommand",options:{workbook:this.view._workbook,event:t.originalEvent||t}}),this.clipboard.menuInvoked=!0)}.bind(this));t.preventDefault(),n=!1,i=!1,window.DOMStringList&&t.originalEvent.clipboardData.types instanceof window.DOMStringList?(n=t.originalEvent.clipboardData.types.contains("text/html"),i=t.originalEvent.clipboardData.types.contains("text/plain")):(n=/text\/html/.test(t.originalEvent.clipboardData.types),i=/text\/plain/.test(t.originalEvent.clipboardData.types)),n&&(o=t.originalEvent.clipboardData.getData("text/html")),i&&(a=t.originalEvent.clipboardData.getData("text/plain").trim())}else{if(e.support.browser.msie)return this.clipboardElement.focus().select(),void document.execCommand("paste");this.clipboard.menuInvoked=!0}(o||a)&&(this.clipboard.external({html:o,plain:a}),this._execute({command:"PasteCommand",options:{workbook:this.view._workbook,event:t.originalEvent||t}}))},onCopy:function(e){this.clipboard.menuInvoked=void 0===e,this._execute({command:"CopyCommand",options:{workbook:this.view._workbook,event:e.originalEvent||e}})},scrollTop:function(){this.scroller.scrollTop=0},scrollLeft:function(){this.scroller.scrollLeft=0},scrollDown:function(e){this.scroller.scrollTop+=e},scrollRight:function(e){this.scroller.scrollLeft+=e},scrollWith:function(e,t){this.scroller.scrollTop+=t,this.scroller.scrollLeft+=e},objectAt:function(e){if(e){var t=this.container[0].getBoundingClientRect();return this.view.objectAt(e.clientX-t.left,e.clientY-t.top)}},selectToLocation:function(e){var t=this.objectAt(e);t.pane&&(this.extendSelection(t),this.lastKnownCellLocation=e,this.originFrame=t.pane),
this.stopAutoScroll()},extendSelection:function(e){this.navigator.extendSelection(e.ref,this._selectionMode,this.appendSelection)},autoScroll:function(){var e=this._autoScrollTarget.x,t=this._autoScrollTarget.y,n=this.originFrame._grid,i=this.view.scroller,r=8,o=i.scrollLeft,a=i.scrollTop;e<n.left&&this.scrollRight(-r),e>n.right&&this.scrollRight(r),t<n.top&&this.scrollDown(-r),t>n.bottom&&this.scrollDown(r),a===i.scrollTop&&o===i.scrollLeft?this.selectToLocation(this.finalLocation):this.extendSelection(this.objectAt(this.lastKnownCellLocation))},startAutoScroll:function(e,t){this._scrollInterval||(this._scrollInterval=setInterval(this.autoScroll.bind(this),50)),this.finalLocation=t||this.lastKnownCellLocation,this._autoScrollTarget=e},stopAutoScroll:function(){clearInterval(this._scrollInterval),this._scrollInterval=null},openCustomEditor:function(){this.view.openCustomEditor()},openFilterMenu:function(e){var t=this.objectAt(e),n=this._workbook.activeSheet(),i=n.filterColumn(t.ref),r=this.view.createFilterMenu(i);r.bind("action",this.onCommandRequest.bind(this)),r.bind("action",r.close.bind(r)),r.openFor(e.target)},_saveEditorValue:function(e){var t=this.editor._range.sheet(),n=this.editor.value();this._workbook.activeSheet()!==t&&(this._workbook.activeSheet()._setFormulaSelections(),this._workbook.activeSheet(t)),t.isInEditMode(!1),this._lastEditorValue=n,this._execute({command:"EditCommand",options:{value:n,arrayFormula:e}})},onEditorChange:function(){this._saveEditorValue(!1)},onEditorArrayFormula:function(){this._saveEditorValue(!0),this.editor.deactivate(!0)},onEditorActivate:function(){var e=this._workbook,t=e.activeSheet();t._setFormulaSelections(this.editor.highlightedRefs()),t.isInEditMode(!0)},onEditorDeactivate:function(){var e=this._workbook.activeSheet();e.isInEditMode(!1),e._setFormulaSelections([])},onEditorUpdate:function(){this._workbook.activeSheet()._setFormulaSelections(this.editor.highlightedRefs())},onEditorBarFocus:function(){var e=this._workbook.activeSheet().selection().enable()===!1;e||this.editor.activate({range:this._workbook.activeSheet().selection(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()})},onEditorCellFocus:function(){this.editor.scale()},onEditorEsc:function(){this.resetEditorValue(),this.editor.deactivate(),this.clipboardElement.focus()},insertNewline:function(e){e.preventDefault(),this.editor.insertNewline()},onEditorBlur:function(e,t){this.editor.isFiltered()||(this._preventNavigation=!1,this.editor.deactivate(),this._preventNavigation||(this.clipboardElement.focus(),this.navigator.navigateInSelection(o[t])))},onEditorAction:function(e,t){var n=this.editor,i=this._workbook.activeSheet();this._casualEditing&&/^(?:up|right|down|left)$/.test(t)?(this.deactivateEditor(),this.navigator.moveActiveCell(r[t]),e.preventDefault()):n.canInsertRef(!0)&&(this.navigator.moveActiveCell(r[t]),n.activeEditor().refAtPoint(i),i._setFormulaSelections(n.highlightedRefs()),e.preventDefault())},onEditorShiftAction:function(e,t){var n=this.editor,i=this._workbook.activeSheet();n.canInsertRef(!0)&&(this.navigator.modifySelection(r[t.replace("shift+","")],this.appendSelection),n.activeEditor().refAtPoint(i),i._setFormulaSelections(n.highlightedRefs()),e.preventDefault())},resetEditorValue:function(){var e=this._workbook.activeSheet(),t=e.activeCell(),n=this._workbook._inputForRef(t),i=e.range(t).intersectingArrayFormula();i&&(n="="+i.formula),this.editor.value(n,!!i)},activateEditor:function(e){this._casualEditing=e,this.editor.activate({range:this._workbook.activeSheet().selection(),rect:this.view.activeCellRectangle(),tooltip:this._activeTooltip()}).focus()},deactivateEditor:function(){this.view.editor.deactivate()},onCommandRequest:function(e){e.command?this._execute(e):this._workbook.undoRedoStack[e.action]()},onDialogRequest:function(e){var t={pdfExport:this._workbook.options.pdf,excelExport:this._workbook.options.excel};e.options?n.extend(!0,e.options,t):e.options=t,this.view.openDialog(e.name,e.options)},onNameEditorEnter:function(){var t,n=this._workbook,i=n.activeSheet(),r=this.view.nameEditor.value(),o=e.spreadsheet.calc.parseReference(r,!0)||n.nameValue(r);return o instanceof e.spreadsheet.Ref?(o.sheet&&o.sheet.toLowerCase()!=i.name().toLowerCase()&&(t=n.sheetByName(o.sheet),t&&(n.activeSheet(t),i=t)),void i.range(o).select()):(o=i.selection()._ref.clone().simplify().setSheet(i.name(),!0),this._execute({command:"DefineNameCommand",options:{name:r,value:o}}),void this.clipboardElement.focus())},onNameEditorCancel:function(){this.clipboardElement.focus()},onNameEditorSelect:function(t){var n,i=t.name,r=this._workbook,o=r.activeSheet(),a=r.nameValue(i);return a instanceof e.spreadsheet.Ref?(a.sheet&&a.sheet.toLowerCase()!=o.name().toLowerCase()&&(n=r.sheetByName(a.sheet),n&&(r.activeSheet(n),o=n)),void o.range(a).select()):void this.clipboardElement.focus()},onNameEditorDelete:function(e){this._execute({command:"DeleteNameCommand",options:{name:e.name}}),this.clipboardElement.focus()}}),e.spreadsheet.Controller=_}}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/view.min",["kendo.core.min","kendo.menu.min","spreadsheet/sheetsbar.min","util/main.min"],e)}(function(){!function(e){function t(e){var t,n=window.getSelection();n.removeAllRanges(),t=document.createRange(),t.selectNodeContents(e),n.addRange(t)}function n(e,t){var n=e.trs[t].children;return n[n.length-2]}function i(e,t){var n=e.trs[t-1],i=e.trs[t].children.length-1;if(n&&i>=0)return n.children[i]}function r(e){return(e.size||1)+"px solid "+(e.color||"#000")}function o(e){return/:\/\//.test(e)||(e="http://"+e),e}function a(t,n,i,a){function s(t){var i,r=n.link;return r||"object"==typeof n.value&&(r=n.value.link),r?(i={textDecoration:"none"},n.color&&(i.color=n.color),n.underline&&(i.textDecoration="underline"),e.dom.element("a",{href:o(r),style:i,target:"_blank"},t?[t]:[])):t}var l,d,u,c,h,p,f,m,g,v,_,b=null!=n.value||null!=n.validation&&!n.validation.value||n.background||n.merged;if(i||b){if(l={},d=n.background,d&&(u=d,a&&(u=e.parseColor(u).toHSV(),u.v*=.9,u=u.toCssRgba()),u=r({color:u}),l.outline=u),d&&(l.backgroundColor=d),n.color&&(l.color=n.color),n.fontFamily&&(l.fontFamily=n.fontFamily),n.underline&&(l.textDecoration="underline"),n.italic&&(l.fontStyle="italic"),n.textAlign&&(l.textAlign=n.textAlign),n.bold&&(l.fontWeight="bold"),n.fontSize&&(l.fontSize=n.fontSize+"px"),n.wrap===!0&&(l.whiteSpace="pre-wrap",l.overflowWrap="break-word",l.wordWrap="break-word"),l.left=n.left+1+"px",l.top=n.top+1+"px",l.width=n.width-1+"px",l.height=n.height-1+"px",c=n.value,h=typeof c,n.format&&null!=c?(c=e.spreadsheet.formatting.format(c,n.format),c.__dataType&&(h=c.__dataType)):null!==c&&void 0!==c&&(c=e.dom.text(c)),!l.textAlign)switch(h){case"number":case"date":case"percent":case"currency":l.textAlign="right";break;case"boolean":l.textAlign="center"}return p=[k.cell],i&&p.push(i),n.enable===!1&&p.push("k-state-disabled"),n.merged&&p.push("k-spreadsheet-merged-cell"),f=n.verticalAlign||"bottom",c=f&&c?e.dom.element("div",{className:"k-vertical-align-"+f},[s(c)]):s(c),m=c?[c]:[],g={style:l},v=n.validation,v&&!v.value&&(m.push(e.dom.element("span",{className:"k-dirty"})),p.push("k-dirty-cell"),g.title=v.message),g.className=p.join(" "),_=e.dom.element("div",g,m),t.push(_),_}}function s(t,o,a){var s,l,d,u,c,h,p={};if(a.background&&(p.backgroundColor=a.background),a.color&&(p.color=a.color),a.fontFamily&&(p.fontFamily=a.fontFamily),a.underline&&(p.textDecoration="underline"),a.italic&&(p.fontStyle="italic"),a.textAlign&&(p.textAlign=a.textAlign),a.verticalAlign&&(p.verticalAlign="center"===a.verticalAlign?"middle":a.verticalAlign),a.bold&&(p.fontWeight="bold"),a.fontSize&&(p.fontSize=a.fontSize+"px"),a.wrap===!0&&(p.whiteSpace="pre-wrap",p.wordBreak="break-all"),a.borderRight?p.borderRight=r(a.borderRight):a.background&&(p.borderRightColor=a.background),a.borderBottom?p.borderBottom=r(a.borderBottom):a.background&&(p.borderBottomColor=a.background),s=a.value,l=typeof s,a.format&&null!=s&&(s=e.spreadsheet.formatting.format(s,a.format),s.__dataType&&(l=s.__dataType)),!p.textAlign)switch(l){case"number":case"date":case"percent":case"currency":p.textAlign="right";break;case"boolean":p.textAlign="center"}return d=null,a.enable===!1&&(d="k-state-disabled"),u=t.addCell(o,s,p,d,a.validation),a.borderLeft?(h=n(t,o),c=r(a.borderLeft),h&&c&&(h.attr.style.borderRight=c)):a.background&&(p.borderLeftColor=a.background),a.borderTop?(h=i(t,o),c=r(a.borderTop),h&&c&&(h.attr.style.borderBottom=c)):a.background&&(p.borderTopColor=a.background),u}function l(e,t,n){return e>=t&&e<=n}var d,u,c,h,p,f,m,g,v,_,b,k,w;e.support.browser.msie&&e.support.browser.version<9||(d=e.jQuery,u=e.spreadsheet.CellRef,c=".",h=7,p={view:"k-spreadsheet-view",fixedContainer:"k-spreadsheet-fixed-container",editContainer:"k-spreadsheet-edit-container",scroller:"k-spreadsheet-scroller",viewSize:"k-spreadsheet-view-size",clipboard:"k-spreadsheet-clipboard",cellEditor:"k-spreadsheet-cell-editor",barEditor:"k-spreadsheet-editor",topCorner:"k-spreadsheet-top-corner",filterHeadersWrapper:"k-filter-wrapper",filterRange:"k-filter-range",filterButton:"k-spreadsheet-filter",filterButtonActive:"k-state-active",horizontalResize:"k-horizontal-resize",verticalResize:"k-vertical-resize",icon:"k-icon",iconFilterDefault:"k-i-arrow-60-down",sheetsBar:"k-spreadsheet-sheets-bar",sheetsBarActive:"k-spreadsheet-sheets-bar-active",sheetsBarInactive:"k-spreadsheet-sheets-bar-inactive",cellContextMenu:"k-spreadsheet-cell-context-menu",rowHeaderContextMenu:"k-spreadsheet-row-header-context-menu",colHeaderContextMenu:"k-spreadsheet-col-header-context-menu"},e.spreadsheet.messages.view={nameBox:"Name Box",errors:{openUnsupported:"Unsupported format. Please select an .xlsx file.",shiftingNonblankCells:"Cannot insert cells due to data loss possibility. Select another insert location or delete the data from the end of your worksheet.",insertColumnWhenRowIsSelected:"Cannot insert column when all columns are selected.",insertRowWhenColumnIsSelected:"Cannot insert row when all rows are selected.",filterRangeContainingMerges:"Cannot create a filter within a range containing merges",sortRangeContainingMerges:"Cannot sort a range containing merges",cantSortMultipleSelection:"Cannot sort multiple selection",cantSortNullRef:"Cannot sort empty selection",cantSortMixedCells:"Cannot sort range containing cells of mixed shapes",validationError:"The value that you entered violates the validation rules set on the cell.",cannotModifyDisabled:"Cannot modify disabled cells."},tabs:{home:"Home",insert:"Insert",data:"Data"}},f=e.Class.extend({init:function(){this.cols=[],this.trs=[],this._height=0,this._width=0},addColumn:function(t){this._width+=t;var n=e.dom.element("col",{style:{width:t+"px"}});n.visible=t>0,this.cols.push(n)},addRow:function(t){var n,i=null;i={style:{height:t+"px"}},this._height+=t,n=e.dom.element("tr",i),n.visible=t>0,this.trs.push(n)},addCell:function(t,n,i,r,o){var a,s,l;return null!==n&&void 0!==n||(n=""),n instanceof e.dom.Node||(n=e.dom.text(n)),a=[n],s={style:i},o&&!o.value&&(a.push(e.dom.element("span",{className:"k-dirty"})),r=(r||"")+(r?" ":"")+"k-dirty-cell",s.title=o.message),r&&(s.className=r),l=e.dom.element("td",s,a),this.trs[t].children.push(l),l},toDomTree:function(t,n,i){this.trs=this.trs.filter(function(e){return e.visible});var r=0;return this.cols=this.cols.filter(function(e,t){return e.visible||(this.trs.forEach(function(e){e.children.splice(t-r,1)}),r++),e.visible},this),e.dom.element("table",{style:{left:t+"px",top:n+"px",height:this._height+"px",width:this._width+"px"},className:i},[e.dom.element("colgroup",null,this.cols),e.dom.element("tbody",null,this.trs)])}}),m='<ul class="#=classNames.cellContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action=merge>Merge</li><li data-action=unmerge>Unmerge</li></ul>',g='<ul class="#=classNames.rowHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-row">Delete</li><li data-action="hide-row">Hide</li><li data-action="unhide-row">Unhide</li></ul>',v='<ul class="#=classNames.colHeaderContextMenu#"><li data-action=cut>Cut</li><li data-action=copy>Copy</li><li data-action=paste>Paste</li><li class="k-separator"></li><li data-action="delete-column">Delete</li><li data-action="hide-column">Hide</li><li data-action="unhide-column">Unhide</li></ul>',e.spreadsheet.ContextMenu=e.ui.ContextMenu,_=e.template('<div class="#=classNames.view#"><div class="#=classNames.fixedContainer#"></div><div class="#=classNames.scroller#"><div class="#=classNames.viewSize#"></div></div><div tabindex="0" class="#=classNames.clipboard#" contenteditable=true></div><div class="#=classNames.cellEditor#"></div></div><div class="#=classNames.sheetsBar#"></div>'+m+g+v),b=e.Class.extend({init:function(t,n){var i,r=b.classNames;this.element=t,this.options=d.extend(!0,{messages:e.spreadsheet.messages.view},this.options,n),this._chrome(),this._dialogs=[],t.append(_({classNames:r})),this._formulaInput(),this.wrapper=t.find(c+r.view),this.container=t.find(c+r.fixedContainer)[0],this.scroller=t.find(c+r.scroller)[0],this.clipboard=t.find(c+r.clipboard),this.viewSize=d(this.scroller.firstChild),this.tree=new e.dom.Tree(this.container),this.clipboardContents=new e.dom.Tree(this.clipboard[0]),this.editor=new e.spreadsheet.SheetEditor(this),this._sheetsbar(),i={target:t,animation:!1,showOn:"never"},this.cellContextMenu=new e.spreadsheet.ContextMenu(t.find(c+r.cellContextMenu),i),this.colHeaderContextMenu=new e.spreadsheet.ContextMenu(t.find(c+r.colHeaderContextMenu),i),this.rowHeaderContextMenu=new e.spreadsheet.ContextMenu(t.find(c+r.rowHeaderContextMenu),i)},enableClipboard:function(e){this.isClipboardDeactivated=!e,e?this.clipboard.attr("contenteditable",e):this.clipboard.removeAttr("contenteditable")},_resize:function(){var t=e._outerHeight,n=this.tabstrip?t(this.tabstrip.element):0,i=this.formulaBar?t(this.formulaBar.element):0,r=this.sheetsbar?t(this.sheetsbar.element):0;this.wrapper.height(this.element.height()-(n+i+r)),this.tabstrip&&this.tabstrip.quickAccessAdjust()},_chrome:function(){var t,n=d("<div class='k-spreadsheet-action-bar' />").prependTo(this.element),i=d("<div class='k-spreadsheet-name-editor' />").appendTo(n);this.nameEditor=new e.spreadsheet.NameEditor(i,this.options),t=d("<div />").appendTo(n),this.formulaBar=new e.spreadsheet.FormulaBar(t),this.options.toolbar&&this._tabstrip()},_formulaInput:function(){var t=this.element.find(c+b.classNames.cellEditor);this.formulaInput=new e.spreadsheet.FormulaInput(t,{autoScale:!0})},_sheetsbar:function(){if(this.options.sheetsbar){var t=d.extend(!0,{openDialog:this.openDialog.bind(this)},this.options.sheetsbar);this.sheetsbar=new e.spreadsheet.SheetsBar(this.element.find(c+b.classNames.sheetsBar),t)}},_tabstrip:function(){var t,n=this.options.messages.tabs,i=d.extend(!0,{home:!0,insert:!0,data:!0},this.options.toolbar),r=[];this.tabstrip&&(this.tabstrip.destroy(),this.element.children(".k-tabstrip").remove());for(t in i)(i[t]===!0||i[t]instanceof Array)&&r.push({id:t,text:n[t],content:""});this.tabstrip=new e.spreadsheet.TabStrip(d("<div />").prependTo(this.element),{animation:!1,dataTextField:"text",dataContentField:"content",dataSource:r,toolbarOptions:i,view:this}),this.tabstrip.select(0)},_executeCommand:function(e){this._sheet.trigger("commandRequest",e)},workbook:function(e){this._workbook=e,this.nameEditor._workbook=e},sheet:function(e){this._sheet=e},activeCellRectangle:function(){return this.cellRectangle(this._sheet._viewActiveCell())},_rectangle:function(e,t){return e._grid.boundingRectangle(t.toRangeRef())},isColumnResizer:function(e,t,n){var i,r,o=this._rectangle(t,n);return e-=this._sheet._grid._headerWidth,i=h/2,r=o.right-this.scroller.scrollLeft,r-i<=e&&e<=r+i},isRowResizer:function(e,t,n){var i,r,o=this._rectangle(t,n);return e-=this._sheet._grid._headerHeight,i=h/2,r=o.bottom-this.scroller.scrollTop,r-i<=e&&e<=r+i},isFilterIcon:function(t,n,i,r){var o=this,a=i._grid,s=a.rows.frozen?0:o.scroller.scrollTop,l=a.columns.frozen?0:o.scroller.scrollLeft;return t-=o._sheet._grid._headerWidth-l,n-=o._sheet._grid._headerHeight-s,e.util.withExit(function(e){o._sheet.forEachFilterHeader(r,function(r){var a=o._rectangle(i,r);i.filterIconRect(a).intersects(t,n)&&e(!0)})})},isAutoFill:function(e,t,n){var i,r=this._sheet.select();return!(r.size>1)&&(e-=this._sheet._grid._headerWidth,t-=this._sheet._grid._headerHeight,n._grid.columns.frozen||(e+=this.scroller.scrollLeft),n._grid.rows.frozen||(t+=this.scroller.scrollTop),i=this._rectangle(n,r),Math.abs(i.right-e)<8&&Math.abs(i.bottom-t)<8)},isEditButton:function(e,t,n){var i,r=this._sheet.activeCellCustomEditor();if(r&&(i=this.activeCellRectangle(),t>=i.top&&t<=i.bottom))return n._editorInLastColumn?e<i.left&&e>=i.left-20:e>i.right&&e<=i.right+20},objectAt:function(e,t){var n,i,r,o,a,s,l,d=this._sheet._grid;return e<0||t<0||e>this.scroller.clientWidth||t>this.scroller.clientHeight?n={type:"outside"}:e<d._headerWidth&&t<d._headerHeight?n={type:"topcorner"}:(i=this.paneAt(e,t),i?(r=i._grid.rows.indexVisible(t,this.scroller.scrollTop),o=i._grid.columns.indexVisible(e,this.scroller.scrollLeft),a="cell",s=new u(r,o),l=this._sheet.selectionInProgress(),this.isAutoFill(e,t,i)?a="autofill":this.isFilterIcon(e,t,i,s)?a="filtericon":!l&&e<d._headerWidth?(s=new u(r,(-(1/0))),a=this.isRowResizer(t,i,s)?"rowresizehandle":"rowheader"):!l&&t<d._headerHeight?(s=new u((-(1/0)),o),a=this.isColumnResizer(e,i,s)?"columnresizehandle":"columnheader"):this.isEditButton(e,t,i)&&(a="editor"),"cell"==a&&this._sheet.forEachMergedCell(s,function(e){s=e.topLeft}),n={type:a,ref:s}):n={type:"outside"}),n.pane=i,n.x=e,n.y=t,n},paneAt:function(e,t){return this.panes.filter(function(n){var i=n._grid;return l(t,i.top,i.bottom)&&l(e,i.left,i.right)})[0]},containingPane:function(e){return this.panes.filter(function(t){return!!t._grid.contains(e)})[0]},cellRectangle:function(e){var t=this.containingPane(e)._grid,n=this._sheet._grid.rectangle(e);return n.offset(t.headerWidth-(t.columns.frozen?0:this.scroller.scrollLeft),t.headerHeight-(t.rows.frozen?0:this.scroller.scrollTop))},refresh:function(e){var t,n,i=this._sheet;this.tabstrip&&this.tabstrip.refreshTools(i.range(i.activeCell())),e.sheetSelection&&this.sheetsbar&&this.sheetsbar.renderSheets(this._workbook.sheets(),this._workbook.sheetIndex(this._sheet)),this._resize(),this.viewSize[0].style.height=i._grid.totalHeight()+"px",this.viewSize[0].style.width=i._grid.totalWidth()+"px",e.layout&&(t=i.frozenColumns(),n=i.frozenRows(),this.panes=[this._pane(n,t)],t>0&&this.panes.push(this._pane(n,0,null,t)),n>0&&this.panes.push(this._pane(0,t,n,null)),n>0&&t>0&&this.panes.push(this._pane(0,0,n,t))),e.filter&&this._destroyFilterMenu(),e.activeCell&&(this._focus=i.activeCell().toRangeRef())},createFilterMenu:function(t){var n,i,r,o,a,s;return this._filterMenu&&this._filterMenu.options.column==t?this._filterMenu:(this._destroyFilterMenu(),n=this._sheet,i=n.filter().ref,r=new e.spreadsheet.Range(i,n),o=d("<div />").appendTo(this.element),a={column:t,range:r},s=new e.spreadsheet.FilterMenu(o,a),this._filterMenu=s,s)},selectClipBoardContents:function(){this.isClipboardDeactivated||(this.clipboard.focus(),t(this.clipboard[0]))},scrollIntoView:function(e){var t=!1,n=this.containingPane(e)._grid,i=n.scrollBoundaries(e),r=this.scroller,o=n.rows.frozen?0:r.scrollTop,a=n.columns.frozen?0:r.scrollLeft;return i.top<o&&(t=!0,r.scrollTop=i.scrollTop),i.bottom>o&&(t=!0,r.scrollTop=i.scrollBottom),i.left<a&&(t=!0,r.scrollLeft=i.scrollLeft),i.right>a&&(t=!0,r.scrollLeft=i.scrollRight),t},_destroyDialog:function(){this._dialogs.pop()},openCustomEditor:function(){var e=this,t=e._sheet.activeCell().first(),n=e._sheet.activeCellCustomEditor(),i=e._sheet.range(t);n.edit({range:i,rect:e.activeCellRectangle(),view:this,validation:this._sheet.validation(t),callback:function(t,n){e._executeCommand({command:"EditCommand",options:{operatingRange:i,property:n?"input":"value",value:t}})}})},openDialog:function(t,n){var i,r,o,a=e.spreadsheet.dialogs.create(t,n);if(a)return a.bind("action",this._executeCommand.bind(this)),a.bind("deactivate",this._destroyDialog.bind(this)),this._dialogs.push(a),i=this._sheet,r=i.activeCell(),o=new e.spreadsheet.Range(r,i),a.open(o),a},showError:function(t,n){var i,r=this.options.messages.errors,o=function(t){var n=t.sender.dialog().element;n.find(".k-button:first").focus(),n.find(".k-button, input").on("keydown",function(n){n.keyCode==e.keys.ESC&&t.sender.close()})},a=function(e){var t=e.sender;this.selectClipBoardContents(),t._retry&&n&&n()}.bind(this);e.spreadsheet.dialogs.registered(t.type)?(i={close:a},"validationError"===t.type&&(i=d.extend(i,{title:t.title||"Error",text:t.body?t.body:r[t.type],activate:o})),this.openDialog(t.type,i)):this.openDialog("message",{title:t.title||"Error",text:t.body?t.body:r[t.type],activate:o,close:a})},destroy:function(){this._dialogs.forEach(function(e){e.destroy()}),this.cellContextMenu.destroy(),this.rowHeaderContextMenu.destroy(),this.colHeaderContextMenu.destroy(),this.tabstrip&&this.tabstrip.destroy(),this._destroyFilterMenu()},_destroyFilterMenu:function(){this._filterMenu&&(this._filterMenu.destroy(),this._filterMenu=void 0,this._filterMenuColumn=void 0)},render:function(){var t,n,i,r,o,a,s,l,u;this.element.is(":visible")&&(t=this._sheet,n=t.focus(),n&&this.scrollIntoView(n)||(i=t.resizingInProgress()?t.resizeHandlePosition().col===-(1/0)?"column":"row":"none",this.wrapper.toggleClass(p.editContainer,this.editor.isActive()).toggleClass(p.horizontalResize,"row"==i).toggleClass(p.verticalResize,"column"==i),r=t._grid,o=this.scroller.scrollTop,a=this.scroller.scrollLeft,o<0&&(o=0),a<0&&(a=0),s=this.panes.map(function(e){return e.render(a,o)}),l=e.dom.element("div",{style:{width:r._headerWidth+"px",height:r._headerHeight+"px"},className:b.classNames.topCorner}),s.push(l),t.resizeHandlePosition()&&t.resizeHintPosition()&&s.push(this.renderResizeHint()),this.tree.render(s),u=e.support.scrollbar(),d(this.container).css({width:this.wrapper[0].clientWidth-u,height:this.wrapper[0].clientHeight-u}),this.editor.isActive()?this.editor.toggleTooltip(this.activeCellRectangle()):t.selectionInProgress()||t.resizingInProgress()||t.isInEditMode()||this.renderClipboardContents()))},renderResizeHint:function(){var t,n,i=this._sheet,r=i.resizeHandlePosition(),o=r.col!==-(1/0);return t=o?{height:this.scroller.clientHeight+"px",width:h+"px",left:i.resizeHintPosition().x+"px",top:"0px"}:{height:h+"px",width:this.scroller.clientWidth+"px",top:i.resizeHintPosition().y+"px",left:"0px"},n=w.classNames,e.dom.element("div",{className:n.resizeHint+(o?"":" "+n.resizeHintVertical),style:t},[e.dom.element("div",{className:n.resizeHintHandle}),e.dom.element("div",{className:n.resizeHintMarker})])},renderClipboardContents:function(){var e,t,n,i,r,o=this._sheet,a=o._grid,l=o.select().toRangeRef(),d=this._workbook.clipboard().canCopy();return d.canCopy===!1&&d.multiSelection?(this.clipboardContents.render([]),void this.selectClipBoardContents()):(l=o.trim(l),e=new f,t=a.rangeDimensions(l),t.rows.forEach(function(t){e.addRow(t)}),t.columns.forEach(function(t){e.addColumn(t)}),n=o._getMergedCells(l),i=n.primary,r=n.secondary,o.forEach(l,function(t,n,o){var a,d,c=new u(t,n).print();r[c]||(a=s(e,t-l.topLeft.row,o),d=i[c],d&&(a.attr.colspan=d.width(),a.attr.rowspan=d.height()))}),this.clipboardContents.render([e.toDomTree(0,0,"kendo-clipboard-"+this._workbook.clipboard()._uid)]),void this.selectClipBoardContents())},_pane:function(e,t,n,i){var r=new w(this._sheet,this._sheet._grid.pane({row:e,column:t,rowCount:n,columnCount:i}));return r.refresh(this.scroller.clientWidth,this.scroller.clientHeight),r}}),k={cell:"k-spreadsheet-cell",vaxis:"k-spreadsheet-vaxis",haxis:"k-spreadsheet-haxis",vborder:"k-spreadsheet-vborder",hborder:"k-spreadsheet-hborder",rowHeader:"k-spreadsheet-row-header",columnHeader:"k-spreadsheet-column-header",pane:"k-spreadsheet-pane",data:"k-spreadsheet-data",mergedCell:"k-spreadsheet-merged-cell",mergedCellsWrapper:"k-merged-cells-wrapper",activeCell:"k-spreadsheet-active-cell",selection:"k-spreadsheet-selection",selectionWrapper:"k-selection-wrapper",autoFillWrapper:"k-auto-fill-wrapper",single:"k-single",top:"k-top",right:"k-right",bottom:"k-bottom",left:"k-left",resizeHandle:"k-resize-handle",columnResizeHandle:"k-column-resize-handle",rowResizeHandle:"k-row-resize-handle",resizeHint:"k-resize-hint",resizeHintHandle:"k-resize-hint-handle",resizeHintMarker:"k-resize-hint-marker",resizeHintVertical:"k-resize-hint-vertical",selectionHighlight:"k-spreadsheet-selection-highlight",series:["k-series-a","k-series-b","k-series-c","k-series-d","k-series-e","k-series-f"]},w=e.Class.extend({init:function(e,t){this._sheet=e,this._grid=t},refresh:function(e,t){this._grid.refresh(e,t)},isVisible:function(e,t,n){return this._grid.view(e,t).ref.intersects(n)},render:function(t,n){var i,r,o,a,s,l,d=w.classNames,u=this._sheet,c=this._grid,h=c.view(t,n);return this._currentView=h,this._currentRect=this._rectangle(h.ref),this._selectedHeaders=u.selectedHeaders(),i=[],i.push(this.renderData()),i.push(this.renderSelection()),i.push(this.renderAutoFill()),i.push(this.renderEditorSelection()),i.push(this.renderFilterHeaders()),c.hasRowHeader&&(r=e.dom.element("div",{className:d.rowHeader,style:{width:c.headerWidth+"px",top:h.rowOffset+"px"}}),i.push(r),u.forEach(h.ref.leftColumn(),function(t){if(!u.isHiddenRow(t)){var n=t+1,i=u.rowHeight(t);r.children.push(e.dom.element("div",{className:this.headerClassName(t,"row"),style:{width:c.headerWidth+"px",height:i+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(n+"")])]))}}.bind(this))),c.hasColumnHeader&&(o=e.dom.element("div",{className:d.columnHeader,style:{top:"0px",left:h.columnOffset+"px",width:this._currentRect.width+"px",height:c.headerHeight+"px"}}),i.push(o),a=0,u.forEach(h.ref.topRow(),function(t,n){if(!u.isHiddenColumn(n)){var i=e.spreadsheet.Ref.display(null,1/0,n),r=u.columnWidth(n);o.children.push(e.dom.element("div",{className:this.headerClassName(n,"col"),style:{position:"absolute",left:a+"px",width:r+"px",height:c.headerHeight+"px"}},[e.dom.element("div",{className:"k-vertical-align-center"},[e.dom.text(i+"")])])),a+=r}}.bind(this))),u.resizeHandlePosition()&&(c.hasColumnHeader||c.hasRowHeader)&&(s=u._grid.normalize(u.resizeHandlePosition()),h.ref.intersects(s)&&(u.resizeHintPosition()||i.push(this.renderResizeHandle()))),l=[d.pane],c.hasColumnHeader&&l.push(d.top),c.hasRowHeader&&l.push(d.left),e.dom.element("div",{style:c.style,className:l.join(" ")},i)},headerClassName:function(e,t){var n,i,r,o=this._selectedHeaders;return"row"===t?(n=o.rows[e],i=o.allRows):(n=o.cols[e],i=o.allCols),r=n||(o.all?"full":i?"partial":"none"),r&&(r="k-selection-"+r),r},renderData:function(){var t,n,i=this._sheet,r=this._currentView,o=e.dom.element("div",{className:w.classNames.data,style:{position:"relative",left:r.columnOffset+"px",top:r.rowOffset+"px"}}),s=this._currentRect,l=e.spreadsheet.draw.doLayout(i,r.ref,{forScreen:!0}),d=i._showGridLines;return d&&(t=null,l.xCoords.forEach(function(n){n!==t&&(t=n,o.children.push(e.dom.element("div",{className:k.vaxis,style:{left:n+"px",height:s.height+"px",borderColor:i.gridLinesColor()}})))}),t=null,l.yCoords.forEach(function(n){n!==t&&(t=n,o.children.push(e.dom.element("div",{className:k.haxis,style:{top:n+"px",width:s.width+"px",borderColor:i.gridLinesColor()}})))})),n=e.spreadsheet.draw.Borders(),l.cells.forEach(function(e){n.add(e),a(o.children,e,null,d)}),n.vert.forEach(function(t){t.forEach(function(t){if(!t.rendered){t.rendered=!0;var n={left:t.x+"px",top:t.top+"px",height:t.bottom-t.top+1+"px",borderWidth:t.size+"px",borderColor:t.color};1!=t.size&&(n.transform="translateX(-"+(t.size-1)/2+"px)"),o.children.push(e.dom.element("div",{className:k.vborder,style:n}))}})}),n.horiz.forEach(function(t){t.forEach(function(t){if(!t.rendered){t.rendered=!0;var n={top:t.y+"px",left:t.left+"px",width:t.right-t.left+"px",borderWidth:t.size+"px",borderColor:t.color};1!=t.size&&(n.transform="translateY(-"+(t.size-1)/2+"px)"),o.children.push(e.dom.element("div",{className:k.hborder,style:n}))}})}),o},renderResizeHandle:function(){var t,n=this._sheet,i=n.resizeHandlePosition(),r=this._rectangle(i),o=[w.classNames.resizeHandle];return i.col!==-(1/0)?(t={height:this._grid.headerHeight+"px",width:h+"px",left:r.right-h/2+"px",top:"0px"},o.push(p.horizontalResize)):(t={height:h+"px",width:this._grid.headerWidth+"px",top:r.bottom-h/2+"px",left:"0px"},o.push(p.verticalResize)),e.dom.element("div",{className:o.join(" "),style:t})},filterIconRect:function(t){var n=16,i=3;return new e.spreadsheet.Rectangle(t.right-n-i,t.top+i,n,n)},renderFilterHeaders:function(){function t(t){return e.dom.element("span",{className:o.icon+" "+t})}function n(n,i,r){var o,s={left:i.left+"px",top:i.top+"px"},l=a&&a.columns.some(function(e){return e.index===r}),d=n.filterButton;return l&&(d+=" "+n.filterButtonActive),o=e.dom.element("span",{className:d,style:s},[t(n.iconFilterDefault)])}var i=this._sheet,r=[],o=b.classNames,a=i.filter();return a&&this._addDiv(r,a.ref,o.filterRange),i.forEachFilterHeader(this._currentView.ref,function(e){var t=this._rectangle(e),i=this.filterIconRect(t),a=this._sheet.filterColumn(e),s=n(o,i,a);r.push(s)}.bind(this)),e.dom.element("div",{className:o.filterHeadersWrapper},r)},renderEditorSelection:function(){var t=w.classNames,n=this._sheet,i=[];return n._formulaSelections.forEach(function(n){var r=n.ref;r!==e.spreadsheet.NULLREF&&this._addDiv(i,r,t.selectionHighlight+" "+n.colorClass)}.bind(this)),e.dom.element("div",{className:t.selectionWrapper},i)},renderSelection:function(){var t=w.classNames,n=[],i=[t.activeCell],r=[t.selection],o=this._sheet,a=o.activeCell().toRangeRef(),s=this._activeFormulaColor(),l=o.select();return i=i.concat(s,this._directionClasses(a)),r=r.concat(s),o.singleCellSelection()&&i.push(t.single),1===l.size()&&r.push("k-single-selection"),this._sheet.autoFillPunch()&&r.push("k-dim-auto-fill-handle"),l.forEach(function(t){t!==e.spreadsheet.NULLREF&&this._addDiv(n,t,r.join(" "))}.bind(this)),this._addTable(n,a,i.join(" ")),e.dom.element("div",{className:t.selectionWrapper},n)},renderAutoFill:function(){var t,n,i,r,o,a,s,l=[];if(this._sheet.autoFillInProgress())if(t=this._sheet.autoFillRef(),n=this._sheet.autoFillPunch(),i=this._sheet._autoFillDirection,this._addDiv(l,t,"k-auto-fill"),n)this._addDiv(l,n,"k-auto-fill-punch");else if(void 0!==i){switch(i){case 0:r=t.bottomRight,o="k-auto-fill-br-hint";break;case 1:r=t.bottomRight,o="k-auto-fill-br-hint";break;case 2:r=new u(t.topLeft.row,t.bottomRight.col),o="k-auto-fill-tr-hint";break;case 3:r=new u(t.bottomRight.row,t.topLeft.col),o="k-auto-fill-bl-hint"}a=e.dom.element("span",{className:"k-tooltip"},[e.dom.text(this._sheet._autoFillHint)]),s=this._addDiv(l,r,o),s&&s.children.push(a)}return e.dom.element("div",{className:w.classNames.autoFillWrapper},l)},_addDiv:function(e,t,n){var i,r=this._currentView;return r.ref.intersects(t)&&(i=this._rectangle(t).resize(1,1).toDiv(n),e.push(i)),i},_addTable:function(t,n,i){var r,o,s=this,l=s._sheet,d=s._currentView,u=s._grid.columns._axis._count;d.ref.intersects(n)&&(r=s._rectangle(n),o=s._sheet.activeCellCustomEditor(),l.forEach(n.collapse(),function(n,l,d){var c,h,p;d.left=r.left,d.top=r.top,d.width=r.width,d.height=r.height,a(t,d,i,!0),o&&(c="k-button k-spreadsheet-editor-button",h=l==u-1,h&&(c+=" k-spreadsheet-last-column"),s._editorInLastColumn=h,p=e.dom.element("div",{className:c,style:{left:d.left+(h?0:d.width)+"px",top:d.top+"px",height:d.height+"px"}}),o.icon&&p.children.push(e.dom.element("span",{className:"k-icon "+o.icon})),t.push(p))}))},_activeFormulaColor:function(){
var e,t=[];return this._sheet.isInEditMode()&&(e=this._sheet._formulaSelections.filter(function(e){return e.active&&"ref"==e.type})[0],e&&t.push(e.colorClass)),t},_directionClasses:function(e){var t=[],n=w.classNames,i=this._currentView.ref;return e.move(0,-1).intersects(i)||t.push(n.left),e.move(-1,0).intersects(i)||t.push(n.top),e.move(0,1).intersects(i)||t.push(n.right),e.move(1,0).intersects(i)||t.push(n.bottom),t},_rectangle:function(e){return this._grid.boundingRectangle(e.toRangeRef()).offset(-this._currentView.mergedCellLeft,-this._currentView.mergedCellTop)}}),e.spreadsheet.View=b,e.spreadsheet.Pane=w,e.spreadsheet.drawCell=a,d.extend(!0,b,{classNames:p}),d.extend(!0,w,{classNames:k}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/customeditors.min",["kendo.core.min","kendo.popup.min","kendo.calendar.min","kendo.listview.min","spreadsheet/sheet.min"],e)}(function(){!function(e){"use strict";var t,n;e.support.browser.msie&&e.support.browser.version<9||(t={},n=e.spreadsheet.registerEditor=function(e,n){t[e]=n},e.spreadsheet.Sheet.prototype.activeCellCustomEditor=function(){var e,n,i,r=this.activeCell().first();if(this.range(r).enable())return e=this.validation(r),n=this._properties.get("editor",this._grid.cellRefIndex(r)),null!=n?i=t[n]:e&&e.showButton&&(n="_validation_"+e.dataType,i=t[n]),"function"==typeof i&&(i=t[n]=i()),i},n("_validation_date",function(){function t(){r||(r=$("<div>").kendoCalendar(),o=$("<div>").kendoPopup(),r.appendTo(o),r=r.getKendoCalendar(),o=o.getKendoPopup(),r.bind("change",function(){o.close();var t=r.value();i.range.format()||i.range.format("yyyy-mm-dd"),i.callback(e.spreadsheet.dateToNumber(t))})),o.setOptions({anchor:i.view.element.find(".k-spreadsheet-editor-button")})}function n(){var n,a,s,l;t(),n=i.range.value(),r.value(null!=n?e.spreadsheet.numberToDate(n):null),a=i.validation,a?(s=e.ui.Calendar.fn.options.min,l=e.ui.Calendar.fn.options.max,/^(?:greaterThan|between)/.test(a.comparerType)&&(s=e.spreadsheet.numberToDate(a.from.value)),"between"==a.comparerType&&(l=e.spreadsheet.numberToDate(a.to.value)),"lessThan"==a.comparerType&&(l=e.spreadsheet.numberToDate(a.from.value)),r.setOptions({disableDates:function(t){var n=a.from?0|a.from.value:0,i=a.to?0|a.to.value:0;return t=0|e.spreadsheet.dateToNumber(t),!e.spreadsheet.validation.validationComparers[a.comparerType](t,n,i)},min:s,max:l})):r.setOptions({disableDates:null,min:null,max:null}),o.open()}var i,r,o;return{edit:function(e){i=e,n()},icon:"k-i-calendar"}}),n("_validation_list",function(){function t(){r||(r=$("<ul class='k-list k-reset'/>").kendoStaticList({template:"#:value#",selectable:!0,autoBind:!1}),o=$("<div>").kendoPopup(),r.appendTo(o),o=o.getKendoPopup(),r=r.getKendoStaticList(),r.bind("change",function(){o.close();var e=r.value()[0];e&&i.callback(e.value)})),o.setOptions({anchor:i.view.element.find(".k-spreadsheet-editor-button")})}function n(){var n,a,s;t(),n=i.validation.from.value,a=[],n&&n.each(function(e){a.push({value:e})}),s=new e.data.DataSource({data:a}),r.setDataSource(s),s.read(),o.open()}var i,r,o;return{edit:function(e){i=e,n()},icon:"k-i-arrow-60-down"}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/grid.min",["kendo.core.min","spreadsheet/references.min"],e)}(function(){!function(e){var t,n,i,r,o,a;e.support.browser.msie&&e.support.browser.version<9||(t=e.spreadsheet.CellRef,n=e.spreadsheet.RangeRef,i=e.spreadsheet.UnionRef,r=e.Class.extend({init:function(e,t,n,i){this.left=e,this.width=n,this.right=e+n,this.top=t,this.height=i,this.bottom=t+i},offset:function(e,t){return new r(this.left+e,this.top+t,this.width,this.height)},resize:function(e,t){return new r(this.left,this.top,this.width+e,this.height+t)},intersects:function(e,t){return this.left<e&&e<this.left+this.width&&this.top<t&&t<this.top+this.height},toDiv:function(t){return e.dom.element("div",{className:t,style:{width:this.width+"px",height:this.height+"px",top:this.top+"px",left:this.left+"px"}})}}),o=e.Class.extend({init:function(e,t,n,i,r,o){this.rowCount=n,this.columnCount=i,this._columns=t,this._rows=e,this._headerHeight=r,this._headerWidth=o},isAxis:function(e){var t,n;return e=e.toRangeRef(),t=e.topLeft,n=e.bottomRight,0===t.row&&n.row===this.rowCount-1||0===t.col&&n.col===this.columnCount-1},width:function(e,t){return this._columns.sum(e,t)},height:function(e,t){return this._rows.sum(e,t)},totalHeight:function(){return this._rows.total+this._headerHeight},totalWidth:function(){return this._columns.total+this._headerWidth},index:function(e,t){return t*this.rowCount+e},cellRef:function(e){return new t(e%this.rowCount,e/this.rowCount>>0)},rowRef:function(e){return new n(new t(e,0),new t(e,this.columnCount-1))},colRef:function(e){return new n(new t(0,e),new t(this.rowCount-1,e))},cellRefIndex:function(e){return this.index(e.row,e.col)},normalize:function(e){return e instanceof n?new n(this.normalize(e.topLeft),this.normalize(e.bottomRight)).setSheet(e.sheet,e.hasSheet()):e instanceof i?e.map(function(e){return this.normalize(e)},this):(e instanceof t&&(e=e.clone(),e.col=Math.max(0,Math.min(this.columnCount-1,e.col)),e.row=Math.max(0,Math.min(this.rowCount-1,e.row))),e)},rectangle:function(e){var t=this.normalize(e.topLeft),n=this.normalize(e.bottomRight);return new r(this.width(0,t.col-1),this.height(0,t.row-1),this.width(t.col,n.col),this.height(t.row,n.row))},pane:function(t){return new a(new e.spreadsheet.PaneAxis(this._rows,t.row,t.rowCount,this._headerHeight),new e.spreadsheet.PaneAxis(this._columns,t.column,t.columnCount,this._headerWidth),this)},rangeDimensions:function(e){return{rows:this._rows.values.iterator(e.topLeft.row,e.bottomRight.row),columns:this._columns.values.iterator(e.topLeft.col,e.bottomRight.col)}},forEach:function(e,n){var i,r,o=this.normalize(e.topLeft),a=this.normalize(e.bottomRight);for(i=o.col;i<=a.col;i++)for(r=o.row;r<=a.row;r++)n(new t(r,i))},trim:function(e,i){var r,o,a,s,l,d=e.topLeft,u=e.bottomRight,c=d.row,h=d.col;for(r=d.col;r<=u.col;r++)o=this.index(d.row,r),a=this.index(u.row,r),s=i.tree.intersecting(o,a),s.length&&(l=this.cellRef(s[s.length-1].end),c=Math.max(c,l.row),h=r);return new n(e.topLeft,new t(Math.min(c,e.bottomRight.row),h))}}),a=e.Class.extend({init:function(e,t,n){this.rows=e,this.columns=t,this._grid=n,this.headerHeight=e.headerSize,this.headerWidth=t.headerSize,this.hasRowHeader=t.hasHeader,this.hasColumnHeader=e.hasHeader},refresh:function(e,t){var n,i;this.columns.viewSize(e),this.rows.viewSize(t),n=this.columns.paneSegment(),i=this.rows.paneSegment(),this.left=n.offset,this.top=i.offset,this.right=n.offset+n.length,this.bottom=i.offset+i.length,this.style={top:i.offset+"px",left:n.offset+"px",height:i.length+"px",width:n.length+"px"}},view:function(e,i){var r=this.rows.visible(i),o=this.columns.visible(e);return{rows:r,columns:o,rowOffset:r.offset,columnOffset:o.offset,mergedCellLeft:o.start,mergedCellTop:r.start,ref:new n(new t(r.values.start,o.values.start),new t(r.values.end,o.values.end))}},contains:function(e){return this.rows.contains(e.topLeft.row,e.bottomRight.row)&&this.columns.contains(e.topLeft.col,e.bottomRight.col)},index:function(e,t){return this._grid.index(e,t)},boundingRectangle:function(e){return this._grid.rectangle(e)},cellRefIndex:function(e){return this._grid.cellRefIndex(e)},scrollBoundaries:function(e){var t=this.boundingRectangle(e),n={top:Math.max(0,t.top-this.top+(this.hasColumnHeader?0:this.headerHeight)),left:Math.max(0,t.left-this.left+(this.hasRowHeader?0:this.headerWidth)),right:t.right-this.columns._viewSize+this.headerWidth,bottom:t.bottom-this.rows._viewSize+this.headerHeight},i=this.columns.defaultValue/2,r=this.rows.defaultValue/2;return n.scrollTop=n.top-r,n.scrollBottom=n.bottom+r,n.scrollLeft=n.left-i,n.scrollRight=n.right+i,n}}),e.spreadsheet.Grid=o,e.spreadsheet.PaneGrid=a,e.spreadsheet.Rectangle=r)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/axis.min",["kendo.core.min"],e)}(function(){!function(e){var t,n;e.support.browser.msie&&e.support.browser.version<9||(t=e.Class.extend({init:function(t,n){this._value=n,this._count=t,this.values=new e.spreadsheet.RangeList(0,t-1,n),this._hidden=new e.spreadsheet.RangeList(0,t-1,0),this.scrollBarSize=e.support.scrollbar(),this._refresh()},adjust:function(e,t){t<0?(this.values.copy(e-t,this._count-1,e),this._hidden.copy(e-t,this._count-1,e)):(this.values.copy(e,this._count,e+t),this._hidden.copy(e,this._count,e+t),this.values.value(e,e+t-1,this._value),this._hidden.value(e,e+t-1,0)),this._refresh()},toJSON:function(e,t){var n,i,r,o,a,s=[],l=this.values.iterator(0,this._count-1);for(n=0;n<this._count;n++)i=l.at(n),r=this._hidden.value(n,n),(i!==this._value||r)&&(o=t[n],void 0===o&&(o=s.length,a={index:n},a[e]=i,r&&(a.hidden=r),s.push(a),t[n]=o));return s},fromJSON:function(e,t){var n,i,r,o;for(n=0;n<t.length;n++)i=t[n],r=i[e]||i.hidden,o=i.index,void 0===o&&(o=n),this.value(o,o,r),i.hidden&&this.hide(o)},hide:function(e){if(!this.hidden(e)){var t=this.value(e,e);this._hidden.value(e,e,t),this.value(e,e,0)}},hidden:function(e){return 0!==this._hidden.value(e,e)},includesHidden:function(e,t){return this._hidden.intersecting(e,t).length>1},nextVisible:function(e,t){var n,i=this._count-1;if(e===i)return t?e+1:e;for(n=e+1;n<=i;++n)if(!this.hidden(n))return n;return e},nextPage:function(e,t){return this.index(this.sum(0,e-1)+t)},prevPage:function(e,t){return this.index(this.sum(0,e)-t)},firstVisible:function(){var e=this._hidden.first();return 0===e.value?0:e.end+1},lastVisible:function(){var e=this._hidden.last();return 0===e.value?this._count-1:e.start-1},prevVisible:function(e,t){if(0===e)return t?-1:0;for(var n=e-1;n>=0;--n)if(!this.hidden(n))return n;return e},unhide:function(e){if(this.hidden(e)){var t=this._hidden.value(e,e);this._hidden.value(e,e,0),this.value(e,e,t)}},value:function(e,t,n){return void 0===n?this.values.iterator(e,t).at(0):(this.values.value(e,t,n),void this._refresh())},sum:function(e,t){var n,i=this.values.iterator(e,t),r=0;for(n=e;n<=t;n++)r+=i.at(n);return r},visible:function(e,t){var n,i,r,o,a,s,l=null,d=null,u=!1;return t>=this.total+this.scrollBarSize&&(u=!0),n=this._pixelValues.intersecting(e,t),l=n[0],d=n[n.length-1],l?(i=e-l.start,r=(i/l.value.value>>0)+l.value.start,o=i-(r-l.value.start)*l.value.value,a=t-d.start,s=(a/d.value.value>>0)+d.value.start,s>d.value.end&&(s=d.value.end),u&&(o+=d.value.value-(a-(s-d.value.start)*d.value.value)),o=Math.min(-o,0),{values:this.values.iterator(r,s),offset:o}):{values:this.values.iterator(0,0),offset:0}},index:function(e){for(var t=0,n=this.values.iterator(0,this._count-1),i=n.at(0);i<e&&t<this._count-1;)i+=n.at(++t);return t},indexVisible:function(e){var t=this.index(e);return this.hidden(t)&&(t=this.prevVisible(t)),t},_refresh:function(){var t=0;this._pixelValues=this.values.map(function(n){var i,r=t;return t+=(n.end-n.start+1)*n.value,i=t-1,new e.spreadsheet.ValueRange(r,i,n)}),this.total=t},getState:function(){return{values:this.values.getState(),hidden:this._hidden.getState()}},setState:function(e){this.values.setState(e.values),this._hidden.setState(e.hidden),this._refresh()}}),n=e.Class.extend({init:function(e,t,n,i){this._axis=e,this._start=t,this._count=n,this.hasHeader=0===t,this.headerSize=i,this.defaultValue=e._value,this.frozen=n>0},viewSize:function(e){this._viewSize=e},sum:function(e,t){return this._axis.sum(e,t-1)},start:function(){return this.sum(0,this._start)},size:function(){return this.sum(this._start,this._start+this._count)},index:function(e,t){return this._axis.index(e+(this.frozen?0:t)-this.headerSize)},indexVisible:function(e,t){return this._axis.indexVisible(e+(this.frozen?0:t)-this.headerSize)},paneSegment:function(){var e,t=this.start();return this.hasHeader||(t+=this.headerSize),this.frozen?(e=this.size(),this.hasHeader?e+=this.headerSize:e-=this.headerSize):e=this._viewSize-t,{offset:t,length:e}},visible:function(e){var t,n,i=this.start();return this.frozen?(t=this.size(),this.hasHeader||(t-=this.headerSize)):(t=this._viewSize-i-this.headerSize,i+=e),n=this._axis.visible(i,i+t-1),this.frozen&&(n.offset=0),n.start=i,this.hasHeader&&(n.offset+=this.headerSize,n.start-=this.headerSize),n},contains:function(e,t){return this.frozen?!(e>this._start+this._count)&&!(t<this._start):t>=this._start}}),e.spreadsheet.Axis=t,e.spreadsheet.PaneAxis=n)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/filter.min",["kendo.core.min","kendo.data.min"],e)}(function(){!function(e){function t(e){var t=e.getMonth()+1;return t>=1&&t<=3?1:t>=4&&t<=6?2:t>=7&&t<=9?3:4}function n(t,n){if(t instanceof Date){var i=e.date.today();return i.setFullYear(i.getFullYear()+n),i.getFullYear()===t.getFullYear()}return!1}function i(t,n){if(t instanceof Date){var i=e.date.firstDayOfMonth(e.date.today());return i.setMonth(i.getMonth()+n,1),i.getTime()===e.date.firstDayOfMonth(t).getTime()}return!1}function r(t,n){var i,r;return n instanceof Date&&(i=e.date.dayOfWeek(e.date.getDate(t),1),r=e.date.dayOfWeek(e.date.getDate(n),1),i.getTime()===r.getTime())}if(!(e.support.browser.msie&&e.support.browser.version<9)){var o=e.spreadsheet.Filter=e.Class.extend({prepare:function(){},value:function(e){return e.value},matches:function(){throw Error("The 'matches' method is not implemented.")},toJSON:function(){throw Error("The 'toJSON' method is not implemented.")}});o.create=function(t){var n,i=t.filter;if(!i)throw Error("Filter type not specified.");if(n=e.spreadsheet[i.charAt(0).toUpperCase()+i.substring(1)+"Filter"],!n)throw Error("Filter type not recognized.");return new n(t)},e.spreadsheet.ValueFilter=o.extend({_values:[],_dates:[],_blanks:!1,init:function(e){void 0!==e.values&&(this._values=e.values),void 0!==e.blanks&&(this._blanks=e.blanks),void 0!==e.dates&&(this._dates=e.dates)},value:function(t){var n,i=t.value;return this._dates.length>0&&t.format&&"number"==typeof i&&(n=e.spreadsheet.formatting.type(i,t.format),"date"===n&&(i=e.spreadsheet.numberToDate(i))),i},matches:function(e){return null===e||void 0===e?this._blanks:e instanceof Date?this._dates.some(function(t){return!(t.year!==e.getFullYear()||void 0!==t.month&&t.month!==e.getMonth()||void 0!==t.day&&t.day!==e.getDate()||void 0!==t.hours&&t.hours!==e.getHours()||void 0!==t.minutes&&t.minutes!==e.getMinutes()||void 0!==t.seconds&&t.seconds!==e.getSeconds())}):this._values.indexOf(e)>=0},toJSON:function(){return{filter:"value",blanks:this._blanks,values:this._values.slice(0)}}}),e.spreadsheet.CustomFilter=o.extend({_logic:"and",init:function(t){if(void 0!==t.logic&&(this._logic=t.logic),void 0===t.criteria)throw Error("Must specify criteria.");this._criteria=t.criteria;var n=e.data.Query.filterExpr({logic:this._logic,filters:this._criteria}).expression;this._matches=Function("d","return "+n)},matches:function(e){return null!==e&&this._matches(e)},value:function(t){var n=t.value,i=this._criteria[0].value,r=i instanceof Date?"date":typeof i,o=typeof n;return t.format&&(o=e.spreadsheet.formatting.type(n,t.format)),o!=r?"string"==r&&(t.format&&(n=e.spreadsheet.formatting.text(n,t.format)),n+=""):"date"==o&&(n=e.spreadsheet.numberToDate(n)),n},toJSON:function(){return{filter:"custom",logic:this._logic,criteria:this._criteria}}}),e.spreadsheet.TopFilter=o.extend({init:function(e){this._type=e.type,this._value=e.value,this._values=[]},prepare:function(e){var t,n=e.map(this.value).sort().filter(function(e,t,n){return 0===t||e!==n[t-1]});n.sort("topNumber"===this._type||"topPercent"==this._type?function(e,t){return t-e}:function(e,t){return e-t}),t=this._value,"topPercent"!==this._type&&"bottomPercent"!==this._type||(t=n.length*t/100>>0),this._values=n.slice(0,t)},matches:function(e){return this._values.indexOf(e)>=0},toJSON:function(){return{filter:"top",type:this._type,value:this._value}}}),e.spreadsheet.DynamicFilter=o.extend({init:function(e){if(this._type=e.type,this._predicate=this[e.type],"function"!=typeof this._predicate)throw Error("DynamicFilter type '"+e.type+"' not recognized.")},value:function(t){var n,i=t.value;return t.format&&(n=e.spreadsheet.formatting.type(i,t.format),"date"===n&&(i=e.spreadsheet.numberToDate(i))),i},prepare:function(e){var t,n,i=0,r=0;for(t=0;t<e.length;t++)n=this.value(e[t]),"number"==typeof n&&(i+=n,r++);this._average=r>0?i/r:0},matches:function(e){return this._predicate(e)},aboveAverage:function(t){return t instanceof Date&&(t=e.spreadsheet.dateToNumber(t)),"number"==typeof t&&t>this._average},belowAverage:function(t){return t instanceof Date&&(t=e.spreadsheet.dateToNumber(t)),"number"==typeof t&&t<this._average},tomorrow:function(t){if(t instanceof Date){var n=e.date.addDays(e.date.today(),1);return e.date.getDate(t).getTime()===n.getTime()}return!1},today:function(t){return t instanceof Date&&e.date.isToday(t)},yesterday:function(t){if(t instanceof Date){var n=e.date.addDays(e.date.today(),-1);return e.date.getDate(t).getTime()===n.getTime()}return!1},nextWeek:function(t){return r(e.date.addDays(e.date.today(),7),t)},thisWeek:function(t){return r(e.date.today(),t)},lastWeek:function(t){return r(e.date.addDays(e.date.today(),-7),t)},nextMonth:function(e){return i(e,1)},thisMonth:function(e){return i(e,0)},lastMonth:function(e){return i(e,-1)},nextQuarter:function(n){var i,r;return n instanceof Date&&(i=e.date.today(),r=t(n)-t(i),1===r&&i.getFullYear()===n.getFullYear()||r==-3&&i.getFullYear()+1===n.getFullYear())},thisQuarter:function(n){var i,r;return n instanceof Date&&(i=e.date.today(),r=t(n)-t(i),0===r&&i.getFullYear()===n.getFullYear())},lastQuarter:function(n){var i,r;return n instanceof Date&&(i=e.date.today(),r=t(i)-t(n),1===r&&i.getFullYear()===n.getFullYear()||r==-3&&i.getFullYear()-1===n.getFullYear())},nextYear:function(e){return n(e,1)},thisYear:function(e){return n(e,0)},lastYear:function(e){return n(e,-1)},yearToDate:function(t){if(t instanceof Date){var n=e.date.today();return t.getFullYear()===n.getFullYear()&&t<=n}return!1},toJSON:function(){return{filter:"dynamic",type:this._type}}}),[1,2,3,4].forEach(function(n){e.spreadsheet.DynamicFilter.prototype["quarter"+n]=function(e){return e instanceof Date&&t(e)===n}}),e.cultures["en-US"].calendar.months.names.forEach(function(t,n){e.spreadsheet.DynamicFilter.prototype[t.toLowerCase()]=function(e){return e instanceof Date&&e.getMonth()===n}})}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/sorter.min",["kendo.core.min"],e)}(function(){!function(e){if(!(e.support.browser.msie&&e.support.browser.version<9)){var t=e.Class.extend({init:function(e,t){this._grid=e,this._lists=t},indices:function(e,n,i,r){var o=t.ascendingComparer;return i===!1&&(o=t.descendingComparer),n.sortedIndices(this._grid.cellRefIndex(e.topLeft),this._grid.cellRefIndex(e.bottomRight),o,r)},sortBy:function(e,t,n,i,r){var o,a,s,l,d=this.indices(e.toColumn(t),n,i,r);for(o=e.topLeft.col;o<=e.bottomRight.col;o++)for(a=this._grid.index(e.topLeft.row,o),s=this._grid.index(e.bottomRight.row,o),l=0;l<this._lists.length;l++)a<this._lists[l].lastRangeStart()&&this._lists[l].sort(a,s,d);return d}});t.ascendingComparer=function(t,n){var i,r;if(null===t&&null===n)return 0;if(null===t)return 1;if(null===n)return-1;if(i=typeof t,r=typeof n,"number"===i)return"number"===r?t-n:-1;if("string"===i)switch(r){case"number":return 1;case"string":return t.localeCompare(n);default:return-1}if("boolean"===i)switch(r){case"number":return 1;case"string":return 1;case"boolean":return t-n;default:return-1}if(t instanceof e.spreadsheet.calc.runtime.CalcError)return n instanceof e.spreadsheet.calc.runtime.CalcError?0:1;throw Error("Cannot compare "+t+" and "+n)},t.descendingComparer=function(e,n){return null===e&&null===n?0:null===e?1:null===n?-1:t.ascendingComparer(n,e)},e.spreadsheet.Sorter=t}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/numformat.min",["spreadsheet/calc.min","kendo.dom.min"],e)}(function(){"use strict";function e(e){function t(){var t=e.skip(u);if(t)return t[1].toLowerCase()}function n(){var t,n=e.skip(c);if(n&&(t=parseFloat(n[2]),!isNaN(t)))return{op:n[1],value:t}}function i(){for(var t,n=[],i=null;!e.eof()&&(t=o());)"date"==t.type?i&&/^(el)?time$/.test(i.type)&&"h"==i.part&&"m"==t.part&&t.format<3&&(t.type="time"):/^(el)?time$/.test(t.type)&&"s"==t.part&&i&&"date"==i.type&&"m"==i.part&&i.format<3&&(i.type="time"),/^(?:str|space|fill)$/.test(t.type)||(i=t),n.push(t);return n}function r(t){if("date"!=t.type||"m"==t.part&&t.format<3){var n=e.skip(/^\.(0+)/);n&&(t.fraction=n[1].length,"date"==t.type&&(t.type="time"))}return t}function o(){var t,n;if(n=e.skip(/^([#0?]+)(?:,([#0?]+))+/))return{type:"digit",sep:!0,format:n[1]+n[2],decimal:h};if(n=e.skip(/^[#0?]+/))return{type:"digit",sep:!1,format:n[0],decimal:h};if(n=e.skip(/^(e)([+-])/i))return{type:"exp",ch:n[1],sign:n[2]};if(n=e.skip(/^(d{1,4}|m{1,5}|yyyy|yy)/i))return n=n[1].toLowerCase(),r({type:"date",part:n.charAt(0),format:n.length});if(n=e.skip(/^(hh?|ss?)/i))return n=n[1],r({type:"time",part:n.toLowerCase().charAt(0),format:n.length,ampm:"hh"==n});if(n=e.skip(/^\[(hh?|mm?|ss?)\]/i))return n=n[1].toLowerCase(),r({type:"eltime",part:n.charAt(0),format:n.length});if(n=e.skip(/^(am\/pm|a\/p)/i))return n=n[1].split("/"),{type:"ampm",am:n[0],pm:n[1]};switch(t=e.next()){case";":return null;case"\\":return{type:"str",value:e.next()};case'"':return{type:"str",value:e.readEscaped(t)};case"@":return{type:"text"};case"_":return{type:"space",value:e.next()};case"*":return{type:"fill",value:e.next()};case".":return e.lookingAt(/^\s*[#0?]/)?(h=!0,{type:"dec"}):{type:"str",value:"."};case"%":return{type:"percent"};case",":return{type:"comma"}}return{type:"str",value:t}}function a(){h=!1;var e=t(),r=n();return!e&&r&&(e=t()),{color:e,cond:r,body:i()}}var s,d,h,p;for(e=l.InputStream(e),s=[],d=!1;!e.eof();)p=a(),s.push(p),p.cond&&(d=!0);return d||(1==s.length?s[0].cond="num":2==s.length?(s[0].cond={op:">=",value:0},s[1].cond={op:"<",value:0}):s.length>=3&&(s[0].cond={op:">",value:0},s[1].cond={op:"<",value:0},s[2].cond={op:"=",value:0},s.length>3&&(s[3].cond="text",s=s.slice(0,4)))),s}function t(e){function t(e){var t="";return e.color&&(t+="["+e.color+"]"),e.cond&&"text"!=e.cond&&"num"!=e.cond&&(t+="["+e.cond.op+e.cond.value+"]"),t+=e.body.map(i).join("")}function n(e,t){return t.fraction&&(e+="."+a("",t.fraction,"0")),e}function i(e){return"digit"==e.type?e.sep?e.format.charAt(0)+","+e.format.substr(1):e.format:"exp"==e.type?e.ch+e.sign:"date"==e.type||"time"==e.type?n(a("",e.format,e.part),e):"eltime"==e.type?n("["+a("",e.format,e.part)+"]",e):"ampm"==e.type?e.am+"/"+e.pm:"str"==e.type?JSON.stringify(e.value):"text"==e.type?"@":"space"==e.type?"_"+e.value:"fill"==e.type?"*"+e.value:"dec"==e.type?".":"percent"==e.type?"%":"comma"==e.type?",":void 0}return e.map(t).join(";")}function n(e,t){e.forEach(function(e){var n,i,r,o,s,l=t;if("text"!=e.cond){for(n=e.body,i=!1,r=n.length;0!==l&&--r>=0;)if(o=n[r],"digit"==o.type){if(o.decimal&&(i=!0,l>0?o.format+=a("",l,"0"):l<0&&(s=o.format.length,o.format=o.format.substr(0,s+l),l+=s-o.format.length),0===o.format.length))for(n.splice(r,1);--r>=0;){if(o=n[r],"digit"==o.type&&o.decimal){++r;break}if("dec"==o.type){n.splice(r,1);break}}if(l>0)break}!i&&l>0&&n.splice(r+1,0,{type:"dec"},{type:"digit",sep:!1,decimal:!0,format:a("",l,"0")})}})}function i(e){var t=0;return{next:function(){return e[t++]},eof:function(){return t>=e.length},ahead:function(n,i){if(t+n<=e.length){var r=i.apply(null,e.slice(t,t+n));return r&&(t+=n),r}},restart:function(){t=0}}}function r(e){function t(e,t){("digit"==e.type&&"comma"==t.type||"comma"==e.type&&e.hidden&&"comma"==t.type)&&(t.hidden=!0,c++)}var n,r,o=i(e.body),a=!1,s=!1,l=!1,d=0,u=/[\$\xA2-\xA5\u058F\u060B\u09F2\u09F3\u09FB\u0AF1\u0BF9\u0E3F\u17DB\u20A0-\u20BD\uA838\uFDFC\uFE69\uFF04\uFFE0\uFFE1\uFFE5\uFFE6]/,c=0,h="",p=!1,f=0,m=[],g=[],v=e.cond,_="";for("text"==v?_="if (typeof value == 'string' || value instanceof kendo.spreadsheet.CalcError) { ":"num"==v?_="if (typeof value == 'number') { ":v&&(n="="==v.op?"==":v.op,_="if (typeof value == 'number' && value "+n+" "+v.value+") { ",h+="value = Math.abs(value); "),e.color&&(h+="result.color = "+JSON.stringify(e.color)+"; ");!o.eof();)o.ahead(2,t),r=o.next(),"percent"==r.type?d++:"digit"==r.type?r.decimal?(f+=r.format.length,g.push(r.format)):(m.push(r.format),r.sep&&(p=!0)):"time"==r.type?(l=l||!!r.ampm,s=!0):"date"==r.type?a=!0:"ampm"==r.type&&(l=s=!0);for(d>0&&(h+="value *= "+Math.pow(100,d)+"; "),c>0&&(h+="value /= "+Math.pow(1e3,c)+"; "),m.length&&(h+="var intPart = runtime.formatInt(culture, value, "+JSON.stringify(m)+", "+f+", "+p+"); ",h+="var isNegative = parseInt(intPart[0]) < 0;"),g.length&&(h+="var decPart = runtime.formatDec(value, "+JSON.stringify(g)+", "+f+"); "),(m.length||g.length)&&(h+="type = 'number'; "),a&&(h+="var date = runtime.unpackDate(value); "),s&&(h+="var time = runtime.unpackTime(value); "),(a||s)&&(h+="type = 'date'; "),(d>0||c>0||m.length||g.length||a||s)&&(_||(_="if (typeof value == 'number') { ")),o.restart(),h+="var matchedCurrency = false;";!o.eof();)r=o.next(),"dec"==r.type?h+="output += culture.numberFormat['.']; ":"comma"!=r.type||r.hidden?"percent"==r.type?(h+="type = 'percent'; ",h+="output += culture.numberFormat.percent.symbol; "):"str"==r.type?(u.test(r.value)&&(h+="type = 'currency'; ",h+="if (isNegative) { output += '-'; matchedCurrency = true; }"),h+="output += "+JSON.stringify(r.value)+"; "):"text"==r.type?(h+="type = 'text'; ",h+="output += value; "):"space"==r.type?(h+="if (output) result.body.push(output); ",h+="output = ''; ",h+="result.body.push({ type: 'space', value: "+JSON.stringify(r.value)+" }); "):"fill"==r.type?h+="output += runtime.fill("+JSON.stringify(r.value)+"); ":"digit"==r.type?(h+="if (isNegative && intPart[0] && matchedCurrency) {intPart[0] = intPart[0].replace('-', '');}",h+="output += "+(r.decimal?"decPart":"intPart")+".shift(); "):"date"==r.type?h+="output += runtime.date(culture, date, "+JSON.stringify(r.part)+", "+r.format+"); ":"time"==r.type?h+="output += runtime.time(time, "+JSON.stringify(r.part)+", "+r.format+", "+l+", "+r.fraction+"); ":"eltime"==r.type?h+="output += runtime.eltime(value, "+JSON.stringify(r.part)+", "+r.format+", "+r.fraction+"); ":"ampm"==r.type&&(h+="output += time.hours < 12 ? "+JSON.stringify(r.am)+" : "+JSON.stringify(r.pm)+"; "):h+="output += ','; ";return h+="if (output) result.body.push(output); ",h+="result.type = type; ",h+="return result; ",_&&(h=_+h+"}"),h}function o(t){var n,i,o=h[t];return o||(n=e(t),i=n.map(r),i.push(p),i=i.join("\n"),i="'use strict'; return function(value, culture){ if (!culture) culture = kendo.culture(); var output = '', type = null, result = { body: [] }; "+i+"; return result; };",o=h[t]=Function("runtime",i)(f)),o}function a(e,t,n){for(e+="";e.length<t;)e=n+e;return e}function s(e){var t,n,i=e.body,r="";for(t=0;t<i.length;++t)n=i[t],"string"==typeof n?r+=n:"space"==n.type&&(r+=" ");return r}var l,d,u,c,h,p,f;kendo.support.browser.msie&&kendo.support.browser.version<9||(l=kendo.spreadsheet.calc,d=kendo.dom,u=/^\[(black|green|white|blue|magenta|yellow|cyan|red)\]/i,c=/^\[(<=|>=|<>|<|>|=)(-?[0-9.]+)\]/,h=Object.create(null),p=r({cond:"text",body:[{type:"text"}]}),f={unpackDate:l.runtime.unpackDate,unpackTime:l.runtime.unpackTime,date:function(e,t,n,i){switch(n){case"d":switch(i){case 1:return t.date;case 2:return a(t.date,2,"0");case 3:return e.calendars.standard.days.namesAbbr[t.day];case 4:return e.calendars.standard.days.names[t.day]}break;case"m":switch(i){case 1:return t.month+1;case 2:return a(t.month+1,2,"0");case 3:return e.calendars.standard.months.namesAbbr[t.month];case 4:return e.calendars.standard.months.names[t.month];case 5:return e.calendars.standard.months.names[t.month].charAt(0)}break;case"y":switch(i){case 2:return t.year%100;case 4:return t.year}}return"##"},time:function(e,t,n,i,r){var o,s;switch(t){case"h":o=a(i?e.hours%12||12:e.hours,n,"0"),r&&(s=(e.minutes+(e.seconds+e.milliseconds/1e3)/60)/60);break;case"m":o=a(e.minutes,n,"0"),r&&(s=(e.seconds+e.milliseconds/1e3)/60);break;case"s":o=a(e.seconds,n,"0"),r&&(s=e.milliseconds/1e3)}return s&&(o+=f.toFixed(s,r).replace(/^0+/,"")),o},eltime:function(e,t,n,i){var r,o;switch(t){case"h":r=24*e;break;case"m":r=24*e*60;break;case"s":r=24*e*60*60}return i&&(o=r-(0|r)),r=a(0|r,n,"0"),o&&(r+=f.toFixed(o,i).replace(/^0+/,"")),r},fill:function(e){return e},formatInt:function(e,t,n,i,r){function o(t){r&&l&&l%3===0&&/^[0-9]$/.test(t)&&(d=e.numberFormat[","]+d),d=t+d,l++}var a,s,l,d,u,c,h,p;for(t=f.toFixed(t,i).replace(/\..*$/,""),i>0&&("0"===t?t="":"-0"===t&&(t="-")),a=t.length-1,s=[],l=0,u=n.length;--u>=0;){for(c=n[u],d="",h=c.length;--h>=0;)p=c.charAt(h),a<0?"0"==p?o("0"):"?"==p&&o(" "):(o("0"==t&&"?"==p?" ":t.charAt(a)),a--);if(0===u)for(;a>=0;)o(t.charAt(a--));s.unshift(d)}return s},formatDec:function(e,t,n){var i,r,o,a,s,l,d,u;for(e=f.toFixed(e,n),i=e.indexOf("."),e=i>=0?e.substr(i+1).replace(/0+$/,""):"",r=0,o=[],a=0;a<t.length;++a){for(s=t[a],l="",d=0;d<s.length;++d)u=s.charAt(d),r<e.length?l+=e.charAt(r++):"0"==u?l+="0":"?"==u&&(l+=" ");o.push(l)}return o},toFixed:function(e,t){var n,i,r=e+"",o=r.indexOf(".");if(o>=0){if(n=r.substr(0,o)||0,i=r.substr(o+1),i.length>14&&(i=Math.round(i/Math.pow(10,i.length-14))+""),i.length<t){for(;i.length<t;)i+="0";return n+"."+i}e=parseFloat(n+"."+i)}return e.toFixed(t)}},kendo.spreadsheet.formatting={compile:o,parse:e,format:function(e,t,n){var i,r,a,s=o(t)(e,n),l=d.element("span");for(l.__dataType=s.type,i=s.body,s.color&&(l.attr.style={color:s.color}),r=0;r<i.length;++r)a=i[r],"string"==typeof a?l.children.push(d.text(a)):"space"==a.type&&l.children.push(d.element("span",{style:{visibility:"hidden"}},[d.text(a.value)]));return l},text:function(e,t,n){var i=o(t)(e,n);return s(i)},textAndColor:function(e,t,n){var i=o(t)(e,n);return{text:s(i),color:i.color,type:i.type}},type:function(e,t){return o(t)(e).type},adjustDecimals:function(i,r){var o=e(i);return n(o,r),t(o)}})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/runtime.functions.min",["spreadsheet/runtime.min","util/main.min"],e)}(function(){"use strict";function e(e){return(Math.exp(e)+Math.exp(-e))/2}function t(e){return(Math.exp(e)-Math.exp(-e))/2}function n(n){return t(n)/e(n)}function i(e,t){for(;t;){var n=e%t;e=t,t=n}return e}function r(e,t){return Math.abs(e*t)/i(e,t)}function o(e,t){for(var n,i,r,o=[],a=0,s=e[0];a<e.length;)o.push({matrix:e[a++],pred:G(e[a++])});for(n=0;n<s.height;++n)e:for(i=0;i<s.width;++i){for(a=0;a<o.length;++a)if(r=o[a].matrix.get(n,i),!o[a].pred(null==r||""===r?0:r))continue e;t(n,i)}}function a(e){return e.reduce(function(e,t){return e+t},0)/e.length}function s(e,t,n){return null==n&&(n=a(e)),e.reduce(function(e,t){return e+Math.pow(t-n,2)},0)/t}function l(e,t){return Math.sqrt(s(e,t))}function d(e,t,n){var i=0,r=0,o=null,a=null,s=!1;return e.forEach(function(e){e<t?(i++,o=null==o?e:Math.max(o,e)):e>t?(r++,a=null==a?e:Math.min(a,e)):s=!0}),i||r?s?n?(i+1)/(e.length+1):i/(i+r):((a-t)*d(e,o,n)+(t-o)*d(e,a,n))/(a-o):new F("N/A")}function u(e,t,n){var i,r=0,o=a(e),s=a(t),l=e.length;for(i=0;i<l;++i)r+=(e[i]-o)*(t[i]-s);return r/n}function c(e,t){var n,i,r;return e.sort(k),n=e.length,i=0|t,r=t-i,0===i?e[0]:i>=n?e[n-1]:(--i,e[i]+r*(e[i+1]-e[i]))}function h(e,t){var n=t*(e.length-1)+1;return c(e,n)}function p(e,t){var n=t*(e.length+1);return c(e,n)}function f(e,t,n){var i=[],r=1,o=2,a=4;return function s(t){if(t instanceof M)e.getRefCells(t,!0).forEach(function(e){var t,s=e.value;if(!(n&r&&e.hidden)){if(e.formula){if(t=e.formula.print(e.row,e.col),/^\s*(?:aggregate|subtotal)\s*\(/i.test(t)&&!(n&a))return;"value"in e.formula&&(s=e.formula.value)}n&o&&s instanceof F||("number"==typeof s||s instanceof F)&&i.push(s)}});else if(Array.isArray(t))for(var l=0;l<t.length;++l)s(t[l]);else t instanceof R?t.each(s):"number"==typeof t?i.push(t):t instanceof F&&!(n&o)&&i.push(t);
}(t),i}function m(e,t,n,i){var r,o;if(i){for(r=0,o=0;o<=e;++o)r+=U(t,o)*Math.pow(n,o)*Math.pow(1-n,t-o);return r}return U(t,e)*Math.pow(n,e)*Math.pow(1-n,t-e)}function g(e){var t=N(H(e,0,1));return 4==t.day||3==t.day&&T.isLeapYear(e)?53:52}function v(e,t,n){var i=N(e),r=N(t);return n?(31==i.date&&(i.date=30),31==r.date&&(r.date=30)):(1==i.month&&1==r.month&&i.date==z(i.year,1)&&r.date==z(r.year,1)&&(r.date=30),i.date==z(i.year,i.month)?(i.date=30,31==r.date&&(r.date=30)):30==i.date&&31==r.date&&(r.date=30)),360*(r.year-i.year)+30*(r.month-i.month)+(r.date-i.date)}function _(e,t){this.link=e,this.text=t}function b(e){return"number"==typeof e||"boolean"==typeof e||null==e||""===e}function k(e,t){return e===t?0:e<t?-1:1}function w(e,t){return e===t?0:e<t?1:-1}var y,x,C,T,S,D,F,E,A,I,R,M,z,H,N,B,P,L,O,V,W,U,q,j,G;kendo.support.browser.msie&&kendo.support.browser.version<9||(y=kendo.util,x=kendo.spreadsheet,C=x.calc,T=C.runtime,S=T.defineFunction,D=T.defineAlias,F=T.CalcError,E=x.RangeRef,A=x.CellRef,I=x.UnionRef,R=T.Matrix,M=x.Ref,z=T.daysInMonth,H=T.packDate,N=T.unpackDate,B=T.daysInYear,["abs","cos","sin","acos","asin","tan","atan","exp","sqrt"].forEach(function(e){S(e,Math[e]).args([["*n","number"]])}),S("ln",Math.log).args([["*n","number"]]),S("log",function(e,t){return Math.log(e)/Math.log(t)}).args([["*num","number++"],["*base",["or","number++",["null",10]]],["?",["assert","$base != 1","DIV/0"]]]),S("log10",function(e){return Math.log(e)/Math.log(10)}).args([["*num","number++"]]),S("pi",function(){return Math.PI}).args([]),S("sqrtpi",function(e){return Math.sqrt(e*Math.PI)}).args([["*num","number+"]]),S("degrees",function(e){return 180*e/Math.PI%360}).args([["*radians","number"]]),S("radians",function(e){return Math.PI*e/180}).args([["*degrees","number"]]),S("cosh",e).args([["*num","number"]]),S("acosh",function(e){return Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1))}).args([["*num","number"],["?",["assert","$num >= 1"]]]),S("sinh",t).args([["*num","number"]]),S("asinh",function(e){return Math.log(e+Math.sqrt(e*e+1))}).args([["*num","number"]]),S("sec",function(e){return 1/Math.cos(e)}).args([["*num","number"]]),S("sech",function(t){return 1/e(t)}).args([["*num","number"]]),S("csc",function(e){return 1/Math.sin(e)}).args([["*num","number"]]),S("csch",function(e){return 1/t(e)}).args([["*num","number"]]),S("atan2",function(e,t){return Math.atan(t/e)}).args([["*x","divisor"],["*y","number"]]),S("tanh",n).args([["*num","number"]]),S("atanh",function(e){return Math.log(Math.sqrt(1-e*e)/(1-e))}).args([["*num",["and","number",["(between)",-1,1]]]]),S("cot",function(e){return 1/Math.tan(e)}).args([["*num","divisor"]]),S("coth",function(e){return 1/n(e)}).args([["*num","divisor"]]),S("acot",function(e){return Math.PI/2-Math.atan(e)}).args([["*num","number"]]),S("acoth",function(e){return Math.log((e+1)/(e-1))/2}).args([["*num","number"],["?",["or",["assert","$num < -1"],["assert","$num > 1"]]]]),S("power",function(e,t){return Math.pow(e,t)}).args([["*a","number"],["*b","number"]]),S("mod",function(e,t){return e%t}).args([["*a","number"],["*b","divisor"]]),S("quotient",function(e,t){return Math.floor(e/t)}).args([["*a","number"],["*b","divisor"]]),S("ceiling",function(e,t){return t?t*Math.ceil(e/t):0}).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),S("ceiling.precise",function(e,t){return t=Math.abs(t),t?t*Math.ceil(e/t):0}).args([["*number","number"],["*significance",["or","number",["null",1]]]]),D("iso.ceiling","ceiling.precise"),S("ceiling.math",function(e,t,n){return t&&e?(e<0&&(!n&&t<0||n&&t>0)&&(t=-t),t?t*Math.ceil(e/t):0):0}).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),S("floor",function(e,t){return t?t*Math.floor(e/t):0}).args([["*number","number"],["*significance","number"],["?",["assert","$significance >= 0 || $number < 0"]]]),S("floor.precise",function(e,t){return t=Math.abs(t),t?t*Math.floor(e/t):0}).args([["*number","number"],["*significance",["or","number",["null",1]]]]),S("floor.math",function(e,t,n){return t&&e?(e<0&&(!n&&t<0||n&&t>0)&&(t=-t),t?t*Math.floor(e/t):0):0}).args([["*number","number"],["*significance",["or","number",["null","$number < 0 ? -1 : 1"]]],["*mode",["or","logical",["null",0]]]]),S("int",Math.floor).args([["*number","number"]]),S("mround",function(e,t){return t?t*Math.round(e/t):0}).args([["*number","number"],["*multiple","number"]]),S("round",function(e,t){var n=e<0?-1:1;return n<0&&(e=-e),t=Math.pow(10,t),e*=t,e=Math.round(e),n*e/t}).args([["*number","number"],["*digits","number"]]),S("roundup",function(e,t){return t=Math.pow(10,t),e*=t,e=e<0?Math.floor(e):Math.ceil(e),e/t}).args([["*number","number"],["*digits","number"]]),S("rounddown",function(e,t){return t=Math.pow(10,t),e*=t,e=e<0?Math.ceil(e):Math.floor(e),e/t}).args([["*number","number"],["*digits","number"]]),S("even",function(e){var t=e<0?Math.floor(e):Math.ceil(e);return t%2?t+(t<0?-1:1):t}).args([["*number","number"]]),S("odd",function(e){var t=e<0?Math.floor(e):Math.ceil(e);return t%2?t:t+(t<0?-1:1)}).args([["*number","number"]]),S("sign",function(e){return e<0?-1:e>0?1:0}).args([["*number","number"]]),S("gcd",function(e){var t,n=e[0];for(t=1;t<e.length;++t)n=i(n,e[t]);return n}).args([["numbers",["collect","number"]]]),S("lcm",function(e){var t,n=e[0];for(t=1;t<e.length;++t)n=r(n,e[t]);return n}).args([["numbers",["collect","number"]]]),S("sum",function(e){return e.reduce(function(e,t){return e+t},0)}).args([["numbers",["collect","number"]]]),S("product",function(e){return e.reduce(function(e,t){return e*t},1)}).args([["numbers",["collect","number"]]]),S("sumproduct",function(e,t){var n=0;return e.each(function(e,i,r){var o,a;if("number"==typeof e){for(o=0;o<t.length;++o){if(a=t[o].get(i,r),"number"!=typeof a)return;e*=a}n+=e}}),n}).args([["a1","matrix"],["+",["a2",["and","matrix",["assert","$a2.width == $a1.width"],["assert","$a2.height == $a1.height"]]]]]),S("sumsq",function(e){return e.reduce(function(e,t){return e+t*t},0)}).args([["numbers",["collect","number"]]]),S("sumx2my2",function(e,t){var n=0;return e.each(function(e,i,r){var o=t.get(i,r);"number"==typeof e&&"number"==typeof o&&(n+=e*e-o*o)}),n}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),S("sumx2py2",function(e,t){var n=0;return e.each(function(e,i,r){var o=t.get(i,r);"number"==typeof e&&"number"==typeof o&&(n+=e*e+o*o)}),n}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),S("sumxmy2",function(e,t){var n=0;return e.each(function(e,i,r){var o=t.get(i,r);"number"==typeof e&&"number"==typeof o&&(n+=(e-o)*(e-o))}),n}).args([["a","matrix"],["b",["and","matrix",["assert","$b.width == $a.width"],["assert","$b.height == $a.height"]]]]),S("seriessum",function(e,t,n,i){var r=0;return i.each(function(i){if("number"!=typeof i)throw new F("VALUE");r+=i*Math.pow(e,t),t+=n}),r}).args([["x","number"],["y","number"],["m","number"],["a","matrix"]]),S("min",function(e){return e.length?Math.min.apply(Math,e):0}).args([["numbers",["collect","number"]]]),S("max",function(e){return e.length?Math.max.apply(Math,e):0}).args([["numbers",["collect","number"]]]),S("counta",function(e){return e.length}).args([["values",["#collect","anyvalue"]]]),S("count",function(e){return e.length}).args([["numbers",["#collect","number"]]]),S("countunique",function(e){var t=0,n=[];return e.forEach(function(e){n.indexOf(e)<0&&(t++,n.push(e))}),t}).args([["values",["#collect","anyvalue"]]]),S("countblank",function(e){function t(e){null!=e&&""!==e||i++}function n(e){var n,i;for(n=0;n<e.length;++n)i=e[n],i instanceof R?i.each(t,!0):t(i)}var i=0;return n(e),i}).args([["+",["args",["or","matrix","anyvalue"]]]]),S("iseven",function(e){return e%2===0}).args([["*number","number"]]),S("isodd",function(e){return e%2!==0}).args([["*number","number"]]),S("n",function(e){return"boolean"==typeof e?e?1:0:"number"==typeof e?e:0}).args([["*value","anyvalue"]]),S("na",function(){return new F("N/A")}).args([]),P=[["m1","matrix"],["c1","anyvalue"],[["m2","matrix"],["c2","anyvalue"]]],S("countifs",function(e,t,n){var i=0;return n.unshift(e,t),o(n,function(){i++}),i}).args(P),L=[["range","matrix"]].concat(P),S("sumifs",function(e,t,n,i){i.unshift(e,b,t,n);var r=0;return o(i,function(t,n){var i=e.get(t,n);i&&(r+=i)}),r}).args(L),S("averageifs",function(e,t,n,i){i.unshift(e,b,t,n);var r=0,a=0;return o(i,function(t,n){var i=e.get(t,n);null!=i&&""!==i||(i=0),r+=i,a++}),a?r/a:new F("DIV/0")}).args(L),S("countif",function(e,t){t=G(t);var n=0;return e.each(function(e){t(e)&&n++}),n}).args([["range","matrix"],["*criteria","anyvalue"]]),O=[["range","matrix"],["*criteria","anyvalue"],["sumRange",["or",["and","matrix",["assert","$sumRange.width == $range.width"],["assert","$sumRange.height == $range.height"]],["null","$range"]]]],S("sumif",function(e,t,n){var i=0;return t=G(t),e.each(function(e,r,o){if(t(e)){var a=n.get(r,o);b(a)&&(i+=a||0)}}),i}).args(O),S("averageif",function(e,t,n){var i=0,r=0;return t=G(t),e.each(function(e,o,a){if(t(e)){var s=n.get(o,a);b(s)&&(i+=s||0,r++)}}),r?i/r:new F("DIV/0")}).args(O),function(e){e("large",function(e,t){return e.sort(w)[t]}),e("small",function(e,t){return e.sort(k)[t]})}(function(e,t){S(e,function(e,n){var i=[],r=e.each(function(e){return e instanceof F?e:void("number"==typeof e&&i.push(e))});return r?r:n>i.length?new F("NUM"):t(i,n-1)}).args([["array","matrix"],["*nth","number++"]])}),S("stdev.s",function(e){return l(e,e.length-1)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),S("stdev.p",function(e){return l(e,e.length)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),S("var.s",function(e){return s(e,e.length-1)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),S("var.p",function(e){return s(e,e.length)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),S("median",function(e){var t=e.length;return e.sort(k),t%2?e[t>>1]:(e[t>>1]+e[t>>2])/2}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","N/A"]]]),S("mode.sngl",function(e){var t,n,i,r,o,a;for(e.sort(k),t=null,n=0,i=1,r=null,o=0;o<e.length;++o)a=e[o],a!=t?(n=1,t=a):n++,n>i&&(i=n,r=a);return null==r?new F("N/A"):r}).args([["numbers",["collect","number"]]]),S("mode.mult",function(e){var t,n=Object.create(null),i=2,r=[];return e.forEach(function(e){var t=n[e]||0;n[e]=++t,t==i?r.push(e):t>i&&(i=t,r=[e])}),t=new R(this),r.forEach(function(e,n){t.set(n,0,e)}),t}).args([["numbers",["collect","number"]]]),S("geomean",function(e){var t=e.length,n=e.reduce(function(e,t){if(t<0)throw new F("NUM");return e*t},1);return Math.pow(n,1/t)}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),S("harmean",function(e){var t=e.length,n=e.reduce(function(e,t){if(!t)throw new F("DIV/0");return e+1/t},0);return t/n}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length > 0","NUM"]]]),S("trimmean",function(e,t){var n,i,r,o=e.length;for(e.sort(k),n=Math.floor(o*t),n%2&&--n,n/=2,i=0,r=n;r<o-n;++r)i+=e[r];return i/(o-2*n)}).args([["numbers",["collect","number",1]],["percent",["and","number",["[between)",0,1]]],["?",["assert","$numbers.length > 0","NUM"]]]),S("frequency",function(e,t){function n(t){for(var n=0;r<e.length&&e[r]>i&&e[r]<=t;)++n,++r;return n}var i,r,o;return e.sort(k),t.sort(k),i=-(1/0),r=0,o=new R(this),t.forEach(function(e,t){var r=n(e);i=e,o.set(t,0,r)}),o.set(o.height,0,e.length-r),o}).args([["data",["collect","number",1]],["bins",["collect","number",1]]]),S("rank.eq",function(e,t,n){t.sort(n?k:w);var i=t.indexOf(e);return i<0?new F("N/A"):i+1}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),D("rank","rank.eq"),S("rank.avg",function(e,t,n){var i,r;if(t.sort(n?k:w),i=t.indexOf(e),i<0)return new F("N/A");for(r=i;t[r]==e;++r);return(i+r+1)/2}).args([["value","number"],["numbers",["collect","number"]],["order",["or","logical",["null",!1]]]]),S("kurt",function(e){var t=e.length,n=a(e),i=s(e,t-1,n),r=Math.sqrt(i),o=e.reduce(function(e,t){return e+Math.pow((t-n)/r,4)},0);return t*(t+1)/((t-1)*(t-2)*(t-3))*o-3*Math.pow(t-1,2)/((t-2)*(t-3))}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 4","NUM"]]]),V=[["array",["collect","number",1]],["x","number"],["significance",["or",["null",3],"integer++"]],["?",["assert","$array.length > 0","NUM"]]],S("percentrank.inc",function(e,t,n){var i=d(e,t,0);return i=i.toFixed(n+1),parseFloat(i.substr(0,i.length-1))}).args(V),S("percentrank.exc",function(e,t,n){var i=d(e,t,1);return i=i.toFixed(n+1),parseFloat(i.substr(0,i.length-1))}).args(V),D("percentrank","percentrank.inc"),S("covariance.p",function(e,t){return u(e,t,e.length)}).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 0","DIV/0"]]]),S("covariance.s",function(e,t){return u(e,t,e.length-1)}).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length == $array2.length","N/A"]],["?",["assert","$array1.length > 1","DIV/0"]]]),D("covar","covariance.p"),W=y.memoize(function(e){for(var t=2,n=1;t<=e;++t)n*=t;return n}),S("fact",W).args([["*n","integer+"]]),S("factdouble",function(e){for(var t=2+(1&e),n=1;t<=e;t+=2)n*=t;return n}).args([["*n","integer+"]]),S("multinomial",function(e){var t=1,n=0;return e.forEach(function(e){if(e<0)throw new F("NUM");n+=e,t*=W(e)}),W(n)/t}).args([["numbers",["collect","number"]]]),U=y.memoize(function(e,t){for(var n=t+1,i=1,r=1,o=1;i<=e-t;++n,++i)r*=n,o*=i;return r/o}),S("combin",U).args([["*n","integer++"],["*k",["and","integer",["[between]",0,"$n"]]]]),S("combina",function(e,t){return U(e+t-1,e-1)}).args([["*n","integer++"],["*k",["and","integer",["[between]",1,"$n"]]]]),S("average",function(e){var t=e.reduce(function(e,t){return e+t},0);return t/e.length}).args([["numbers",["collect",["and","number",["not","boolean"]]]],["?",["assert","$numbers.length > 0","DIV/0"]]]),S("averagea",function(e){var t=0,n=0;return e.forEach(function(e){"string"!=typeof e&&(t+=e),++n}),n?t/n:new F("DIV/0")}).args([["values",["collect","anyvalue"]]]),S("percentile.inc",h).args([["numbers",["collect","number",1]],["p",["and","number",["[between]",0,1]]]]),S("percentile.exc",p).args([["numbers",["collect","number",1]],["p",["and","number",["(between)",0,1]]]]),S("quartile.inc",function(e,t){return h(e,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),S("quartile.exc",function(e,t){return p(e,t/4)}).args([["numbers",["collect","number",1]],["quarter",["values",0,1,2,3,4]]]),D("quartile","quartile.inc"),D("percentile","percentile.inc"),q=["AVERAGE","COUNT","COUNTA","MAX","MIN","PRODUCT","STDEV.S","STDEV.P","SUM","VAR.S","VAR.P","MEDIAN","MODE.SNGL","LARGE","SMALL","PERCENTILE.INC","QUARTILE.INC","PERCENTILE.EXC","QUARTILE.EXC"],S("aggregate",function(e,t,n,i){var r=this;r.resolveCells(i,function(){var o,a;if(t>12){if(o=f(r,i[0],n),a=i[1],a instanceof A&&(a=r.getRefData(a)),"number"!=typeof a)return e(new F("VALUE"))}else o=f(r,i,n);r.func(q[t-1],e,o)})}).argsAsync([["funcId",["values",1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19]],["options",["or",["null",0],["values",0,1,2,3,4,5,6,7]]],["args","rest"]]),S("subtotal",function(e,t){var n,i,r=this,o=t>100;for(o&&(t-=100),n=[],i=2;i<arguments.length;++i)n.push(arguments[i]);r.resolveCells(n,function(){var i=f(r,n,o?1:0);r.func(q[t-1],e,i)})}).argsAsync([["funcId",["values",1,2,3,4,5,6,7,8,9,10,11,101,102,103,104,105,106,107,108,109,110,111]],["+",["ref",["or","ref","#matrix"]]]]),S("avedev",function(e){var t=e.reduce(function(e,t){return e+t},0)/e.length;return e.reduce(function(e,n){return e+Math.abs(n-t)},0)/e.length}).args([["numbers",["collect","number"]],["?",["assert","$numbers.length >= 2","NUM"]]]),S("binom.dist",m).args([["successes","integer+"],["trials",["and","integer",["assert","$trials >= $successes"]]],["probability",["and","number",["[between]",0,1]]],["cumulative","logical"]]),D("binomdist","binom.dist"),S("binom.inv",function(e,t,n){for(var i=0;i<=e;++i)if(m(i,e,t,!0)>=n)return i;return new F("N/A")}).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["alpha",["and","number",["[between]",0,1]]]]),D("critbinom","binom.inv"),S("binom.dist.range",function(e,t,n,i){var r,o=0;for(r=n;r<=i;++r)o+=U(e,r)*Math.pow(t,r)*Math.pow(1-t,e-r);return o}).args([["trials","integer+"],["probability",["and","number",["[between]",0,1]]],["successes_min",["and","integer",["[between]",0,"$trials"]]],["successes_max",["or",["and","integer",["[between]","$successes_min","$trials"]],["null","$successes_min"]]]]),S("negbinom.dist",function(e,t,n,i){if(i){for(var r=0;e>=0;)r+=U(e+t-1,e)*Math.pow(n,t)*Math.pow(1-n,e),e--;return r}return U(e+t-1,e)*Math.pow(n,t)*Math.pow(1-n,e)}).args([["number_f","integer+"],["number_s","integer+"],["probability_s",["and","number",["[between]",0,1]]],["cumulative","logical"]]),D("negbinomdist","negbinom.dist"),S("address",function(e,t,n,i,r){var o=new A(e-1,t-1,n-1);return r&&o.setSheet(r,!0),i?o.print(0,0):o.print()}).args([["row","integer++"],["col","integer++"],["abs",["or",["null",1],["values",1,2,3,4]]],["a1",["or",["null",!0],"logical"]],["sheet",["or","null","string"]]]),S("areas",function(e){var t=0;return function n(e){e instanceof A||e instanceof E?t++:e instanceof I&&e.refs.forEach(n)}(e),t}).args([["ref","ref"]]),S("choose",function(e,t){return e>t.length?new F("N/A"):t[e-1]}).args([["*index","integer"],["+",["value","anything"]]]),S("column",function(e){return e?e instanceof A?e.col+1:this.asMatrix(e).mapCol(function(t){return t+e.topLeft.col+1}):this.formula.col+1}).args([["ref",["or","area","null"]]]),S("columns",function(e){return e instanceof M?e.width():e.width}).args([["ref",["or","area","#matrix"]]]),S("formulatext",function(e){var t=this.getRefCells(e)[0];return t.formula?t.formula.print(t.row,t.col):new F("N/A")}).args([["ref","ref"]]),S("hlookup",function(e,t,n,i){var r=null;return t.eachCol(function(n){var o=t.get(0,n);if(i){if(o>e)return!0;r=n}else if(o===e)return r=n,!0}),null==r?new F("N/A"):t.get(n-1,r)}).args([["value","anyvalue"],["range","matrix"],["row","integer++"],["approx",["or","logical",["null",!0]]]]),S("index",function(e,t,n,i,r){var o,a,s,l=this;if(t instanceof I&&(t=t.refs[r-1]),!n&&!i||!t)return e(new F("N/A"));if(t instanceof A&&(t=t.toRangeRef()),t instanceof E){if(n&&i)return i>t.width()||n>t.height()?e(new F("REF")):(o=t.toCell(n-1,i-1),void l.resolveCells([o],function(){e(l.getRefData(o))}));if(!n)return a=t.toColumn(i-1),void l.resolveCells([a],function(){e(l.asMatrix(a))});if(!i)return s=t.toRow(n-1),void l.resolveCells([s],function(){e(l.asMatrix(s))})}else if(t instanceof R){if(t.width>1&&t.height>1){if(n&&i)return e(t.get(n-1,i-1));if(!n)return e(t.mapRow(function(e){return t.get(e,i-1)}));if(!i)return e(t.mapCol(function(e){return t.get(n-1,e)}))}if(1==t.width)return e(t.get(n-1,0));if(1==t.height)return e(t.get(0,i-1))}else e(new F("REF"))}).argsAsync([["range",["or","ref","matrix"]],["row",["or","integer+","null"]],["col",["or","integer+","null"]],["areanum",["or","integer++",["null",1]]]]),S("indirect",function(e){var t,n;try{if(t=this.formula,n=C.parseFormula(t.sheet,t.row,t.col,e),!(n.ast instanceof M))throw 1;return n.ast.absolute(t.row,t.col)}catch(i){return new F("REF")}}).args([["thing","string"]]),S("match",function(e,t,n){var i,r=1;return 0===n?i=G(e):n===-1?i=G("<="+e):1===n&&(i=G(">="+e)),t.each(function(t){return null!=t&&i(t)?(0!==n&&e!=t&&--r,!0):void r++},!0)&&r>0?r:new F("N/A")}).args([["value","anyvalue"],["range","matrix"],["type",["or",["values",-1,0,1],["null",1]]]]),S("offset",function(e,t,n,i,r){var o=(e instanceof A?e:e.topLeft).clone();return o.row+=t,o.col+=n,o.row<0||o.col<0?new F("VALUE"):i>1||r>1?new E(o,new A(o.row+i-1,o.col+r-1)).setSheet(e.sheet,e.hasSheet()):o}).args([["ref","area"],["*rows","integer"],["*cols","integer"],["*height",["or","integer++",["null","$ref.height()"]]],["*width",["or","integer++",["null","$ref.width()"]]]]),S("row",function(e){return e?e instanceof A?e.row+1:this.asMatrix(e).mapRow(function(t){return t+e.topLeft.row+1}):this.formula.row+1}).args([["ref",["or","area","null"]]]),S("rows",function(e){return e instanceof M?e.height():e.height}).args([["ref",["or","area","#matrix"]]]),S("vlookup",function(e,t,n,i){var r=null;return"number"!=typeof e&&(i=!1),"string"==typeof e&&(e=e.toLowerCase()),t.eachRow(function(n){var o=t.get(n,0);if(i){if(o>e)return!0;r=n}else if("string"==typeof o&&(o=o.toLowerCase()),o===e)return r=n,!0}),null==r?new F("N/A"):t.get(r,n-1)}).args([["value","anyvalue"],["range","matrix"],["col","integer++"],["approx",["or","logical",["null",!0]]]]),S("date",function(e,t,n){return H(e,t-1,n)}).args([["*year","integer"],["*month","integer"],["*date","integer"]]),S("day",function(e){return N(e).date}).args([["*date","date"]]),S("month",function(e){return N(e).month+1}).args([["*date","date"]]),S("year",function(e){return N(e).year}).args([["*date","date"]]),S("weekday",function(e){return N(e).day+1}).args([["*date","date"]]),S("weeknum",function(e,t){var n,i=H(N(e).year,0,1),r=N(i);return 21==t?(n=3-(r.day+6)%7,n<0&&(n+=7),i+=n,r.date+=n,r.day=4,t=1):t=1==t?0:2==t?1:(t-10)%7,n=r.day-t,n<0&&(n+=7),i-=n,Math.ceil((e+1-i)/7)}).args([["*date","date"],["*type",["or",["null",1],["values",1,2,11,12,13,14,15,16,17,21]]]]),S("isoweeknum",function(e){var t=N(e),n=t.day||7,i=Math.floor((t.ord-n+10)/7);return i<1?g(t.year-1):53==i&&i>g(t.year)?1:i}).args([["*date","date"]]),S("now",function(){return T.dateToSerial(new Date)}).args([]),S("today",function(){return 0|T.dateToSerial(new Date)}).args([]),S("time",function(e,t,n){return T.packTime(e,t,n,0)}).args([["*hours","integer"],["*minutes","integer"],["*seconds","integer"]]),S("hour",function(e){return T.unpackTime(e).hours}).args([["*time","datetime"]]),S("minute",function(e){return T.unpackTime(e).minutes}).args([["*time","datetime"]]),S("second",function(e){return T.unpackTime(e).seconds}).args([["*time","datetime"]]),S("edate",function(e,t){var n=N(e),i=n.month+t,r=n.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),n=Math.min(n.date,z(r,i)),H(r,i,n)}).args([["*start_date","date"],["*months","integer"]]),S("eomonth",function(e,t){var n=N(e),i=n.month+t,r=n.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),n=z(r,i),H(r,i,n)}).args([["*start_date","date"],["*months","integer"]]),S("workday",function(e,t,n){var i,r=t>0?1:-1;for(t=Math.abs(t),i=N(e).day;t>0;)e+=r,i=(i+r)%7,i>0&&i<6&&n.indexOf(e)<0&&--t;return e}).args([["start_date","date"],["days","integer"],["holidays",["collect","date"]]]),S("networkdays",function(e,t,n){var i,r,o;for(e>t&&(i=e,e=t,t=i),r=0,o=N(e).day;e<=t;)o>0&&o<6&&n.indexOf(e)<0&&r++,e++,o=(o+1)%7;return r}).args([["start_date","date"],["end_date","date"],["holidays",["collect","date"]]]),S("days",function(e,t){return t-e}).args([["*start_date","date"],["*end_date","date"]]),T._days_360=v,S("days360",v).args([["*start_date","date"],["*end_date","date"],["*method",["or","logical",["null",!1]]]]),S("yearfrac",function(e,t,n){switch(n){case 0:return v(e,t,!1)/360;case 1:return(t-e)/B(N(e).year);case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return v(e,t,!0)/360}}).args([["*start_date","date"],["*end_date","date"],["*method",["or",["null",0],["values",0,1,2,3,4]]]]),S("datevalue",function(e){var t=T.parseDate(e);return t?T.dateToSerial(t):new F("VALUE")}).args([["*text","string"]]),S("timevalue",function(e){var t,n,i,r,o=e.toLowerCase().match(/(\d+):(\d+)(:(\d+)(\.(\d+))?)?\s*(am?|pm?)?/);return o?(t=parseFloat(o[1]),n=parseFloat(o[2]),i=o[3]?parseFloat(o[4]):0,r=o[7],r&&(t>12||t<1)?new F("VALUE"):(/^p/.test(r)&&(t+=12),T.packTime(t,n,i,0))):new F("VALUE")}).args([["*text","string"]]),S("mdeterm",function(e){var t=e.each(function(e){if("number"!=typeof e)return new F("VALUE")},!0);return t||e.determinant()}).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),S("transpose",function(e){return e.transpose()}).args([["range","matrix"]]),S("mmult",function(e,t){return e.multiply(t)}).args([["a","matrix"],["b",["and","matrix",["assert","$b.height == $a.width"]]]]),S("munit",function(e){return new R(this).unit(e)}).args([["n","integer+"]]),S("minverse",function(e){var t=e.each(function(e){if("number"!=typeof e)return new F("VALUE")},!0);return t||e.inverse()||new F("VALUE")}).args([["m",["and","matrix",["assert","$m.width == $m.height"]]]]),S("rand",function(){return Math.random()}).args([]),S("randbetween",function(e,t){return e+Math.floor((t-e+1)*Math.random())}).args([["min","integer"],["max",["and","integer",["assert","$max >= $min"]]]]),S("true",function(){return!0}).args([]),S("false",function(){return!0}).args([]),S("roman",function(e){return y.arabicToRoman(e).toUpperCase()}).args([["*number","integer"]]),S("arabic",function(e){var t=y.romanToArabic(e);return null==t?new F("VALUE"):t}).args([["*roman","string"]]),S("base",function(e,t,n){for(var i=e.toString(t).toUpperCase();i.length<n;)i="0"+i;return i}).args([["*number","integer"],["*radix",["and","integer",["[between]",2,36]]],["*minLen",["or","integer+",["null",0]]]]),S("decimal",function(e,t){var n,i,r;for(e=e.toUpperCase(),n=0,i=0;i<e.length;++i){if(r=e.charCodeAt(i),r>=48&&r<=57)r-=48;else{if(!(r>=65&&r<55+t))return new F("VALUE");r-=55}n=n*t+r}return n}).args([["*text","string"],["*radix",["and","integer",["[between]",2,36]]]]),S("char",function(e){return String.fromCharCode(e)}).args([["*code","integer+"]]),j=/[\0-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,S("clean",function(e){return e.replace(j,"")}).args([["*text","string"]]),S("code",function(e){return e.charAt(0)}).args([["*text","string"]]),D("unichar","char"),D("unicode","code"),S("concatenate",function(e){var t,n="";for(t=0;t<e.length;++t)n+=e[t];return n}).args([["+",["*text","string"]]]),S("dollar",function(e,t){for(var n="$#,##0.DECIMALS;($#,##0.DECIMALS)",i="";t-- >0;)i+="0";return n=n.replace(/DECIMALS/g,i),x.formatting.text(e,n)}).args([["*number","number"],["*decimals",["or","integer++",["null",2]]]]),S("exact",function(e,t){return e===t}).args([["*text1","string"],["*text2","string"]]),S("find",function(e,t,n){var i=t.indexOf(e,n-1);return i<0?new F("VALUE"):i+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),S("fixed",function(e,t,n){var i,r=Math.pow(10,t);if(e=Math.round(e*r)/r,i=n?"0":"#,##0",t>0)for(i+=".";t-- >0;)i+="0";return x.formatting.text(e,i)}).args([["*number","number"],["*decimals",["or","integer",["null",2]]],["*noCommas",["or","boolean",["null",!1]]]]),S("left",function(e,t){return e.substr(0,t)}).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),S("right",function(e,t){return e.substr(-t)}).args([["*text","string"],["*length",["or","integer+",["null",1]]]]),S("len",function(e){return e.length}).args([["*text","string"]]),S("lower",function(e){return e.toLowerCase()}).args([["*text","string"]]),S("upper",function(e){return e.toUpperCase()}).args([["*text","string"]]),S("ltrim",function(e){return e.replace(/^\s+/,"")}).args([["*text","string"]]),S("rtrim",function(e){return e.replace(/\s+$/,"")}).args([["*text","string"]]),S("trim",function(e){return e.replace(/^\s+|\s+$/,"")}).args([["*text","string"]]),S("mid",function(e,t,n){return e.substr(t-1,n)}).args([["*text","string"],["*start","integer++"],["*length","integer+"]]),S("proper",function(e){return e.toLowerCase().replace(/\b./g,function(e){return e.toUpperCase()})}).args([["*text","string"]]),S("replace",function(e,t,n,i){return e.substr(0,--t)+i+e.substr(t+n)}).args([["*text","string"],["*start","integer++"],["*length","integer+"],["*newText","string"]]),S("rept",function(e,t){for(var n="";t-- >0;)n+=e;return n}).args([["*text","string"],["*number","integer+"]]),S("search",function(e,t,n){var i=t.toLowerCase().indexOf(e.toLowerCase(),n-1);return i<0?new F("VALUE"):i+1}).args([["*substring","string"],["*string","string"],["*start",["or","integer++",["null",1]]]]),
S("substitute",function(e,t,n,i){function r(){e=e.substring(0,o)+n+e.substring(o+t.length)}if(t===n)return e;for(var o=-1;(o=e.indexOf(t,o+1))>=0;)if(null==i)r();else if(0===--i){r();break}return e}).args([["*text","string"],["*oldText","string"],["*newText","string"],["*nth",["or","integer++","null"]]]),S("t",function(e){return"string"==typeof e?e:""}).args([["*value","anyvalue"]]),S("text",function(e,t){return x.formatting.text(e,t)}).args([["*value","anyvalue"],["*format","string"]]),S("value",function(e){return"number"==typeof e?e:"boolean"==typeof e?+e:(e=(e+"").replace(/[$€,]/g,""),e=parseFloat(e),isNaN(e)?new F("VALUE"):e)}).args([["*value","anyvalue"]]),_.prototype.toString=function(){return this.text},S("hyperlink",function(e,t){return new _(e,t)}).args([["*link","string"],["*text",["or","string",["null","$link"]]]]),S("iferror",function(e,t){return e instanceof F?t:e}).args([["*value","forced!"],["*value_if_error","anyvalue!"]]),G=function(){function e(e,t){if("string"==typeof t){var n=parseFloat(t);isNaN(n)||n!=t||(t=n)}return function(n){var i=t;return"string"==typeof n&&"string"==typeof i&&(n=n.toLowerCase(),i=i.toLowerCase()),e(n,i)}}function t(e){var t,n;return"string"==typeof e&&(e=e.toLowerCase()),/^[0-9.]+%$/.test(e)?(n=e.substr(0,e.length-1),t=parseFloat(n),isNaN(t)||t!=n||(e=t/100)):/^[0-9.]+$/.test(e)&&(t=parseFloat(e),isNaN(t)||t!=e||(e=t)),e}function n(e,n){return t(e)<t(n)}function i(e,n){return t(e)<=t(n)}function r(e,n){return t(e)>t(n)}function o(e,n){return t(e)>=t(n)}function a(e,t){return!s(e,t)}function s(e,n){return n instanceof RegExp?n.test(e):("string"!=typeof e&&"string"!=typeof n||(e+="",n+=""),t(e)==t(n))}var l=Object.create(null);return function(t){var d,u;return"function"==typeof t?t:(d=/^=(.*)$/.exec(t))?e(s,d[1]):(d=/^<>(.*)$/.exec(t))?e(a,d[1]):(d=/^<=(.*)$/.exec(t))?e(i,d[1]):(d=/^<(.*)$/.exec(t))?e(n,d[1]):(d=/^>=(.*)$/.exec(t))?e(o,d[1]):(d=/^>(.*)$/.exec(t))?e(r,d[1]):/[?*]/.exec(t)?(u=l[t],u||(u=t.replace(/(~\?|~\*|[\]({\+\.\|\^\$\\})\[]|[?*])/g,function(e){switch(e){case"~?":return"\\?";case"~*":return"\\*";case"?":return".";case"*":return".*";default:return"\\"+e}}),u=l[t]=RegExp("^"+u+"$","i")),e(s,u)):e(s,t)}}())},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/runtime.functions.2.min",["spreadsheet/runtime.min"],e)}(function(){"use strict";function e(e){var n,i,r,o;if(dt(e)>=3.3)return 1-t(e);for(n=e>0?1:-1,n==-1&&(e=-e),i=0,r=1,o=1;o<100;o++)i+=r,r*=2*e*e/(2*o+1);return 2*n/Math.sqrt(Math.PI)*e*Math.exp(-e*e)*i}function t(t){var n,i,r;if(dt(t)<3.3)return 1-e(t);for(n=1,t<0&&(n=-1,t=-t),i=t,r=8;r>=1;r-=.5)i=t+r/i;return i=1/(t+i),1==n?Math.exp(-t*t)/Math.sqrt(Math.PI)*i:2-Math.exp(-t*t)/Math.sqrt(Math.PI)*i}function n(e){var t,n=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],i=e,r=e+5.5,o=n[0];for(r-=(e+.5)*Math.log(r),t=1;t<=6;t++)i+=1,o+=n[t]/i;return-r+Math.log(Math.sqrt(2*Math.PI)*o/e)}function i(e){if(e>0)return Math.exp(n(e));var t=Math.PI,r=-e;return-t/(r*i(r)*Math.sin(t*r))}function r(e,t){return n(e)+n(t)-n(e+t)}function o(e,t){return Math.exp(r(e,t))}function a(e,t){return t<e+1?s(e,t):1-l(e,t)}function s(e,t){var i,r=1/e,o=r,a=e,s=n(e);for(i=1;i<=at&&(a++,o*=t/a,r+=o,!(dt(o)<dt(r)*st));i++);return r*Math.exp(-t+e*Math.log(t)-s)}function l(e,t){var i,r,o=lt,a=o,s=0,l=1,d=t+1-e,u=n(e);for(i=1;i<=at&&(s=d+l*s,dt(s)<lt&&(s=lt),a=d+l/a,dt(a)<lt&&(a=lt),s=1/s,r=a*s,o*=r,!(dt(r-1)<st));i++)d+=2,l=-i*(i-e);return o*Math.exp(-t-u+e*Math.log(t))}function d(e,t,n,r){return r?a(t,e/n):Math.pow(e/n,t-1)*Math.exp(-e/n)/(n*i(t))}function u(e,t,n){var i,r,o,a,s,l;if(0===e)return 0;if(1==e)return 1/0;for(i=0,r=10,o=0,a=t*n,a>1&&(r*=a),s=0;s<at&&(o=.5*(i+r),l=d(o,t,n,!0),!(dt(e-l)<1e-16));s++)l>e?r=o:i=o;return o}function c(t,n){return n?.5+.5*e(t/Math.sqrt(2)):Math.exp(-t*t/2)/Math.sqrt(2*Math.PI)}function h(e){var t,n,i=[-39.69683028665376,220.9460984245205,-275.9285104469687,138.357751867269,-30.66479806614716,2.506628277459239],r=[-54.47609879822406,161.5858368580409,-155.6989798598866,66.80131188771972,-13.28068155288572],o=[-.007784894002430293,-.3223964580411365,-2.400758277161838,-2.549732539343734,4.374664141464968,2.938163982698783],a=[.007784695709041462,.3224671290700398,2.445134137142996,3.754408661907416],s=.02425,l=1-s;return e<s?(t=Math.sqrt(-2*Math.log(e)),(((((o[0]*t+o[1])*t+o[2])*t+o[3])*t+o[4])*t+o[5])/((((a[0]*t+a[1])*t+a[2])*t+a[3])*t+1)):l<e?(t=Math.sqrt(-2*Math.log(1-e)),-(((((o[0]*t+o[1])*t+o[2])*t+o[3])*t+o[4])*t+o[5])/((((a[0]*t+a[1])*t+a[2])*t+a[3])*t+1)):(t=e-.5,n=t*t,(((((i[0]*n+i[1])*n+i[2])*n+i[3])*n+i[4])*n+i[5])*t/(((((r[0]*n+r[1])*n+r[2])*n+r[3])*n+r[4])*n+1))}function p(e,t,n,i){return i?c((e-t)/n,!0):Math.exp(-(e-t)*(e-t)/(2*n*n))/(n*Math.sqrt(2*Math.PI))}function f(e,t,n){return t+n*h(e)}function m(e,t,n){return Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-r(t,n))}function g(e,t,n){var i=Math.exp(t*Math.log(e)+n*Math.log(1-e)-r(t,n));return e<(t+1)/(t+n+2)?i*v(t,n,e)/t:1-i*v(n,t,1-e)/n}function v(e,t,n){var i,r,o,a,s,l=e+t,d=e+1,u=e-1,c=1,h=1-l*n/d;for(dt(h)<lt&&(h=lt),h=1/h,s=h,i=1;i<=at&&(r=2*i,o=i*(t-i)*n/((u+r)*(e+r)),h=1+o*h,dt(h)<lt&&(h=lt),c=1+o/c,dt(c)<lt&&(c=lt),h=1/h,s*=h*c,o=-(e+i)*(l+i)*n/((e+r)*(d+r)),h=1+o*h,dt(h)<lt&&(h=lt),c=1+o/c,dt(c)<lt&&(c=lt),h=1/h,a=h*c,s*=a,!(dt(a-1)<st));i++);return s}function _(e,t,n){var i,r,o=0,a=1,s=0;for(i=0;i<at&&(s=.5*(o+a),r=g(s,t,n),!(dt(e-r)<st));i++)r>e?a=s:o=s;return s}function b(e,t,n,i,r){return g((e-i)/(r-i),t,n)}function k(e,t,n,i,r,o){return i?g((e-r)/(o-r),t,n):m((e-r)/(o-r),t,n)/(o-r)}function w(e,t,n,i,r){return i+(r-i)*_(e,t,n)}function y(e,t,n){return d(e,t/2,2,n)}function x(e,t){return 1-y(e,t,!0)}function C(e,t){return u(e,t/2,2)}function T(e,t){return C(1-e,t)}function S(e,t){var n,i,r,o,a,s=e.length,l=e[0].length,d=0;for(n=0;n<s;n++)for(i=0;i<l;i++)r=t[n][i],o=e[n][i]-r,o*=o,d+=o/r;return a=(s-1)*(l-1),x(d,a)}function D(e,t,n){return n?1-Math.exp(-t*e):t*Math.exp(-t*e)}function F(e,t,n){var i,r;if(n)return 1-y(2*t,2*(e+1),!0);for(i=0,r=2;r<=e;r++)i+=Math.log(r);return Math.exp(e*Math.log(t)-t-i)}function E(e,t,n,i){if(i)return g(t*e/(n+t*e),t/2,n/2);var r=t/n;return t/=2,n/=2,r/o(t,n)*Math.pow(r*e,t-1)/Math.pow(1+r*e,t+n)}function A(e,t,n){return 1-E(e,t,n,!0)}function I(e,t,n){return n/t*(1/w(e,n/2,t/2,0,1)-1)}function R(e,t,n){return n/t*(1/w(1-e,n/2,t/2,0,1)-1)}function M(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=e[t];return n/i}function z(e,t){var n,i,r=0,o=e.length;for(n=0;n<o;n++)i=e[n]-t,r+=i*i;return r/(o-1)}function H(e,t){var n=e.length-1,i=t.length-1,r=z(e,M(e)),o=z(t,M(t));if(!r||!o)throw new Ze("DIV/0");return 2*E(r/o,n,i,!0)}function N(e){return.5*Math.log((1+e)/(1-e))}function B(e){var t=Math.exp(2*e);return(t-1)/(t+1)}function P(e,t,n){return n?1-.5*g(t/(e*e+t),t/2,.5):1/(Math.sqrt(t)*o(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)}function L(e,t){return 1-P(e,t,!0)}function O(e,t){return e<0&&(e=-e),2*L(e,t)}function V(e,t){var n=_(2*Math.min(e,1-e),t/2,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}function W(e,t){return V(1-e/2,t)}function U(e,t,n,i){var r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k=e.length,w=t.length;if(1==i){for(a=0,s=0,l=0;l<k;l++)d=e[l]-t[l],a+=d,s+=d*d;return u=a/k,r=u/Math.sqrt((s-a*u)/(k*(k-1))),1==n?L(r,k-1):O(r,k-1)}return c=M(e),h=M(t),p=z(e,c),f=z(t,h),3==i?(m=p/k,g=f/w,v=m+g,_=m/v,b=g/v,o=1/(_*_/(k-1)+b*b/(w-1)),r=dt(c-h)/Math.sqrt(v),1==n?L(r,o):O(r,o)):(o=k+w-2,r=dt(c-h)*Math.sqrt(o*k*w/((k+w)*((k-1)*p+(w-1)*f))),1==n?L(r,o):O(r,o))}function q(e,t,n){return-V(e/2,n-1)*t/Math.sqrt(n)}function j(e,t,n){return-h(e/2)*t/Math.sqrt(n)}function G(e){return c(e,!0)-.5}function $(e){return c(e)}function K(t,n,i,r){if(r)return.5+.5*e((Math.log(t)-n)/(i*Math.sqrt(2)));var o=Math.log(t)-n;return Math.exp(-o*o/(2*i*i))/(t*i*Math.sqrt(2*Math.PI))}function Y(e,t,n){return Math.exp(f(e,t,n))}function Q(e,t,n,i){var r,o,a,s=e.length,l=0;for(r=0;r<s;r++){if(t[r]<=0||t[r]>1)throw new Ze("NUM");l+=t[r]}if(1!=l)throw new Ze("NUM");for(o=0,r=0;r<s;r++)a=e[r],a>=n&&a<=i&&(o+=t[r]);return o}function X(e,t){var n,i,r,o=M(t),a=M(e),s=0,l=0;for(n=0,i=e.length;n<i;n++)r=t[n]-o,s+=r*(e[n]-a),l+=r*r;return s/l}function J(e,t){var n,i,r,o=M(t),a=M(e),s=0,l=0;for(n=0,i=e.length;n<i;n++)r=t[n]-o,s+=r*(e[n]-a),l+=r*r;return a-s*o/l}function Z(e,t){var n,i,r,o,a=M(e),s=M(t),l=0,d=0,u=0;for(n=0,i=e.length;n<i;n++)r=e[n]-a,o=t[n]-s,l+=r*o,d+=r*r,u+=o*o;return l/Math.sqrt(d*u)}function ee(e,t){var n=Z(e,t);return n*n}function te(e,t){var n,i,r,o=t.length,a=M(t),s=M(e),l=0,d=0,u=0;for(n=0;n<o;n++)i=t[n]-a,r=e[n]-s,l+=r*r,d+=i*r,u+=i*i;return Math.sqrt((l-d*d/u)/(o-2))}function ne(e,t,n){var i,r,o,a,s,l,d=M(n),u=M(t),c=0,h=0;for(i=0,r=n.length;i<r;i++)o=n[i]-d,a=t[i]-u,c+=o*a,h+=o*o;if(0===h)throw new Ze("N/A");return s=c/h,l=u-s*d,l+s*e}function ie(e){var t,n=e.height,i=0;for(t=0;t<n;t++)i+=e.data[t][0];return i/n}function re(e,t){var n,i,r=e.height,o=0;for(n=0;n<r;n++)i=e.data[n][0]-t,o+=i*i;return o}function oe(e,t,n,i){var r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y=0;for(t||(t=e.map(function(){return++y})),n&&(t=t.clone(),t.eachRow(function(e){t.data[e].unshift(1)}),++t.width),r=t.transpose(),o=r.multiply(t).inverse().multiply(r).multiply(e),a=[],y=o.height-1;y>=0;y--)a.push(o.data[y][0]);if(n||a.push(0),!i)return this.asMatrix([a]);for(s=t.multiply(o),l=e.adds(s,!0),d=n?ie(s):0,u=re(s,d),c=n?ie(l):0,h=re(l,c),p=[],p.push(u,h),f=u/(u+h),m=e.height-t.width,g=Math.sqrt(h/m),v=[],v.push(f,g),_=n?u/(t.width-1)/(h/m):f/t.width/((1-f)/m),b=[],b.push(_,m),k=r.multiply(t).inverse(),w=[],y=k.height-1;y>=0;y--)w.push(Math.sqrt(k.data[y][y]*h/m));return this.asMatrix([a,w,v,b,p])}function ae(e,t,n,i){return oe.call(this,e.map(Math.log),t,n,i).map(Math.exp)}function se(e,t,n,i){var r,o,a=0;return t||(t=e.map(function(){return++a})),i&&(t=t.clone(),t.eachRow(function(e){t.data[e].unshift(1)}),++t.width),r=t.transpose(),o=r.multiply(t).inverse().multiply(r).multiply(e),n?i&&(n=n.clone(),n.eachRow(function(e){n.data[e].unshift(1)}),++n.width):n=t,n.multiply(o)}function le(e,t,n,i){return se.call(this,e.map(Math.log),t,n,i).map(Math.exp)}function de(e,t,n,i){var r,o,a,s,l,d=n||20,u=i||1e-7,c=t;for(r=1;r<=d;r++)if(o=e(c),a=o[0],s=o[1],l=a/s,c-=l,Math.abs(l)<u)return c;return new Ze("NUM")}function ue(e,t,n,i,r){var o=Math.pow(1+e,t),a=e?(o-1)/e:t;return-(i*o+n*a*(1+e*r))}function ce(e,t,n,i,r){if(!e)return-i-n*t;var o=Math.pow(1+e,t);return-(i+n*(o-1)/e*(1+e*r))/o}function he(e,t,n,i,r){if(!e)return-(i+n)/t;var o=Math.pow(1+e,t);return-e*(i+n*o)/((1+e*r)*(o-1))}function pe(e,t,n,i,r){if(!e)return-(i+n)/t;var o=t*(1+e*r);return Math.log((o-i*e)/(o+n*e))/Math.log(1+e)}function fe(e,t,n,i,r,o){function a(o){var a=Math.pow(1+o,e-1),s=a*(1+o);return[n*s+t*(1/o+r)*(s-1)+i,e*n*a+t*(-(s-1)/(o*o)+(1/o+r)*e*a)]}return de(a,o)}function me(e,t,n,i,r,o){var a,s;return 1==o&&1==t?0:(a=he(e,n,i,r,o),s=ue(e,t-1,a,i,o)*e,o?s/(1+e):s)}function ge(e,t,n,i,r,o){var a=he(e,n,i,r,o);return a-me(e,t,n,i,r,o)}function ve(e,t,n,i,r,o){var a,s,l,d,u,c;return 1==o&&(i--,r--),a=Math.pow(1+e,t),s=Math.pow(1+e,i-1),l=Math.pow(1+e,r),d=e*n*a/(a-1),u=s*n-(s-1)/e*d,c=l*n-(l-1)/e*d,c-u}function _e(e,t,n,i,r,o){var a,s=0;for(a=i;a<=r;a++)s+=me(e,a,t,n,0,o);return s}function be(e,t){var n,i,r=0;for(n=0,i=t.length;n<i;n++)r+=t[n]*Math.pow(1+e,-n-1);return r}function ke(e,t){function n(t){var n,i,r=0,o=0;for(n=0,i=e.length;n<i;n++)r+=e[n]*Math.pow(1+t,-n-1),o+=-n*e[n]*Math.pow(1+t,-n-2);return[r,o]}return de(n,t)}function we(e,t){return Math.pow(1+e/t,t)-1}function ye(e,t){return t*(Math.pow(e+1,1/t)-1)}function xe(e,t,n){var i,r,o=0;for(i=0,r=t.length;i<r;i++)o+=t[i]*Math.pow(1+e,(n[0]-n[i])/365);return o}function Ce(e,t,n){function i(n){var i,r,o,a=e[0],s=0;for(i=1,r=e.length;i<r;i++)o=(t[0]-t[i])/365,a+=e[i]*Math.pow(1+n,o),s+=o*e[i]*Math.pow(1+n,o-1);return[a,s]}return de(i,n)}function Te(e,t,n,i){var r=-i*e;return r*(1-t/n)}function Se(e,t,n,i,r){var o,a,s=1-Math.pow(t/e,1/n);if(s=Math.floor(1e3*s+.5)/1e3,o=e*s*r/12,1==i)return o;for(a=1;a<n;a++){if(a==i-1)return(e-o)*s;o+=(e-o)*s}return(e-o)*s*(12-r)/12}function De(e,t,n,i,r){var o=r/n,a=-e*(Math.pow(1-o,i-1)-1),s=(e-a)*o;return s=Math.min(s,Math.max(0,e-a-t))}function Fe(e,t,n){return(e-t)/n}function Ee(e,t,n,i){return(e-t)*(n-i+1)*2/(n*(n+1))}function Ae(e,t,n,i,r,o,a){function s(e,n){var i,r,o;return r=1==p?1==n?e:0:e*Math.pow(1-p,n-1),o=e*Math.pow(1-p,n),i=o<t?r-t:r-o,i<0?0:i}function l(e,n,i){var r,o,a,l=e-t,d=Math.ceil(i),u=0,c=0,h=!1;for(o=1;o<=d;o++)h?r=u:(a=s(e,o),u=l/(n-o+1),u>a?(r=u,h=!0):(r=a,l-=a)),o==d&&(r*=i+1-d),c+=r;return c}var d,u,c,h,p=o>=n?1:o/n,f=Math.floor(i),m=Math.ceil(r),g=0;if(a)for(d=f+1;d<=m;d++)u=s(e,d),d==f+1?u*=Math.min(r,f+1)-i:d==m&&(u*=r+1-m),g+=u;else c=n,i!=Math.floor(i)&&o>1&&i>=n/2&&(h=i-n/2,i=n/2,r-=h,c+=1),e-=l(e,c,i),g=l(e,n-i,r-i);return g}function Ie(e,t){var n=tt(e),i=n.month+t,r=n.year+Math.floor(i/12);return i%=12,i<0&&(i+=12),n=Math.min(n.date,it(r,i)),et(r,i,n)}function Re(e,t,n){return 1==n||2==n||3==n?t-e:rt(e,t,n)}function Me(e,t,n){var i,r,o,a=tt(e),s=tt(t),l=s.year-a.year;l>0&&(l=(l-1)*n),o=12/n;do l++,i=Ie(t,-l*o);while(e<i);return l--,r=Ie(t,-l*o),[i,r]}function ze(e,t,n){var i,r,o,a=tt(t),s=tt(e),l=a.year-s.year;for(l>0&&(l=(l-1)*n),i=e,o=12/n;t>i;)r=i,l++,i=Ie(e,l*o);return[r,i]}function He(e,t,n,i){var r=Me(e,t,n)[0];return Re(r,e,i)}function Ne(e,t,n,i){if(1==i){var r=Me(e,t,n);return Re(r[0],r[1],1)}return 3==i?365/n:360/n}function Be(e,t,n,i){var r=Me(e,t,n)[1];return Re(e,r,i)}function Pe(e,t,n){return Me(e,t,n)[0]}function Le(e,t,n){return Me(e,t,n)[1]}function Oe(e,t,n){var i=tt(e),r=tt(t),o=12*(r.year-i.year)+r.month-i.month;return 1+(o*n/12|0)}function Ve(e,t){return 3==t?365:1==t?nt(e)?366:365:360}function We(e,t,n,i,r){var o=Ve(tt(t).year,r);return n*i*Re(e,t,r)/o}function Ue(e,t,n,i,r,o,a,s){function l(e,t){return(t-e)*o/v|0}var d,u,c,h,p,f,m=0,g=r*i/o,v=a%2===0?360:365;return n<=t?(d=Me(n,t,o),u=d[0],c=d[1],u<=e?g*Re(e,n,a)/Re(u,c,a):(d=Me(e,u,o),h=d[0],p=d[1],f=l(p,n),g*(f+Re(e,p,a)/Re(h,p,a)+(n<c?Re(u,n,a)/Re(u,c,a):0)))):(d=ze(t,n,o),u=d[0],c=d[1],f=l(t,n),m=c==n?g*f:g*(f+Re(u,n,a)/Re(u,c,a)),s?(d=Me(e,t,o),u=d[0],c=d[1],f=l(e,t),m+=g*(f+Re(e,c,a)/Re(u,c,a))):m)}function qe(e,t,n,i,r){var o=r%2===0?360:nt(tt(e).year)?366:365;return(i-n)/i*o/Re(e,t,r)}function je(e,t,n,i,r){var o=r%2===0?360:nt(tt(e).year)?366:365;return(i-n)/n*o/Re(e,t,r)}function Ge(e,t,n,i,r){var o=r%2===0?360:nt(tt(e).year)?366:365;return n/(1-i*Re(e,t,r)/o)}function $e(e,t,n,i,r,o,a){var s=1+((t-e)*o/(a%2===0?360:365)|0),l=Me(e,t,o),d=l[0],u=l[1],c=Re(d,e,a),h=Re(e,u,a),p=Re(d,u,a),f=100*n/o,m=i/o,g=h/p;return 1==s?(r+f)/(1+g*m)-c/p*f:r/Math.pow(1+m,s-1+g)+f*Math.pow(1+m,1-s-g)*(Math.pow(1+m,s)-1)/m-c/p*f}function Ke(e,t,n,i,r){var o=Re(e,t,r),a=Ve(tt(t).year,r);return i-n*i*o/a}var Ye,Qe,Xe,Je,Ze,et,tt,nt,it,rt,ot,at,st,lt,dt;kendo.support.browser.msie&&kendo.support.browser.version<9||(Ye=kendo.spreadsheet,Qe=Ye.calc,Xe=Qe.runtime,Je=Xe.defineFunction,Ze=Xe.CalcError,et=Xe.packDate,tt=Xe.unpackDate,nt=Xe.isLeapYear,it=Xe.daysInMonth,rt=Xe._days_360,Je("ERF",function(t,n){return null==n?e(t):e(n)-e(t)}).args([["lower_limit","number"],["upper_limit",["or","number","null"]]]),Je("ERFC",t).args([["x","number"]]),Je("GAMMALN",n).args([["x","number++"]]),Je("GAMMA",i).args([["x","number"]]),Je("GAMMA.DIST",d).args([["x","number+"],["alpha","number++"],["beta","number++"],["cumulative","logical"]]),Je("GAMMA.INV",u).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"]]),Je("NORM.S.DIST",c).args([["z","number"],["cumulative","logical"]]),Je("NORM.S.INV",h).args([["p",["and","number",["[between]",0,1]]]]),Je("NORM.DIST",p).args([["x","number"],["mean","number"],["stddev","number++"],["cumulative","logical"]]),Je("NORM.INV",f).args([["p",["and","number",["[between]",0,1]]],["mean","number"],["stddev","number++"]]),Je("BETADIST",b).args([["x","number"],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]],["?",["assert","$x >= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),Je("BETA.DIST",k).args([["x","number"],["alpha","number++"],["beta","number++"],["cumulative","logical"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]],["?",["assert","$x >= $A","NUM"]],["?",["assert","$x <= $B","NUM"]],["?",["assert","$A < $B","NUM"]]]),Je("BETA.INV",w).args([["p",["and","number",["[between]",0,1]]],["alpha","number++"],["beta","number++"],["A",["or","number",["null",0]]],["B",["or","number",["null",1]]]]),Je("CHISQ.DIST",y).args([["x","number+"],["deg_freedom","integer++"],["cumulative","logical"]]),Je("CHISQ.DIST.RT",x).args([["x","number+"],["deg_freedom","integer++"]]),Je("CHISQ.INV",C).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),Je("CHISQ.INV.RT",T).args([["p",["and","number",["[between]",0,1]]],["deg_freedom","integer++"]]),Je("CHISQ.TEST",function(e,t){return S(e.data,t.data)}).args([["actual_range","matrix"],["expected_range","matrix"],["?",["assert","$actual_range.width == $expected_range.width"]],["?",["assert","$actual_range.height == $expected_range.height"]]]),Je("EXPON.DIST",D).args([["x","number+"],["lambda","number++"],["cumulative","logical"]]),Je("POISSON.DIST",F).args([["x","integer+"],["mean","number+"],["cumulative","logical"]]),Je("F.DIST",E).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"],["cumulative","logical"]]),Je("F.DIST.RT",A).args([["x","number+"],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Je("F.INV",R).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Je("F.INV.RT",I).args([["p",["and","number",["[between]",0,1]]],["deg_freedom1","integer++"],["deg_freedom2","integer++"]]),Je("F.TEST",H).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),Je("FISHER",N).args([["x",["and","number",["(between)",-1,1]]]]),Je("FISHERINV",B).args([["y","number"]]),Je("T.DIST",P).args([["x","number"],["deg_freedom","integer++"],["cumulative","logical"]]),Je("T.DIST.RT",L).args([["x","number"],["deg_freedom","integer++"]]),Je("T.DIST.2T",O).args([["x","number+"],["deg_freedom","integer++"]]),Je("T.INV",V).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),Je("T.INV.2T",W).args([["p",["and","number",["(between]",0,1]]],["deg_freedom","integer++"]]),Je("T.TEST",U).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["tails",["and","integer",["values",1,2]]],["type",["and","integer",["values",1,2,3]]],["?",["assert","$type != 1 || $array1.length == $array2.length","N/A"]],["?",["assert","$array1.length >= 2","DIV/0"]],["?",["assert","$array2.length >= 2","DIV/0"]]]),Je("CONFIDENCE.T",q).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++",["assert","$size != 1","DIV/0"]]]]),Je("CONFIDENCE.NORM",j).args([["alpha",["and","number",["(between)",0,1]]],["standard_dev","number++"],["size",["and","integer++"]]]),Je("GAUSS",G).args([["z","number"]]),Je("PHI",$).args([["x","number"]]),Je("LOGNORM.DIST",K).args([["x","number++"],["mean","number"],["standard_dev","number++"],["cumulative","logical"]]),Je("LOGNORM.INV",Y).args([["probability",["and","number",["(between)",0,1]]],["mean","number"],["standard_dev","number++"]]),Je("PROB",Q).args([["x_range",["collect","number",1]],["prob_range",["collect","number",1]],["lower_limit","number"],["upper_limit",["or","number",["null","$lower_limit"]]],["?",["assert","$prob_range.length == $x_range.length","N/A"]]]),Je("SLOPE",X).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),Je("INTERCEPT",J).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),Je("PEARSON",Z).args([["array1",["collect","number",1]],["array2",["collect","number",1]],["?",["assert","$array2.length == $array1.length","N/A"]],["?",["assert","$array2.length > 0 && $array1.length > 0","N/A"]]]),Je("RSQ",ee).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]],["?",["assert","$known_x.length != 1 && $known_y.length != 1","N/A"]]]),Je("STEYX",te).args([["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length >= 3 && $known_y.length >= 3","DIV/0"]]]),Je("FORECAST",ne).args([["x","number"],["known_y",["collect","number",1]],["known_x",["collect","number",1]],["?",["assert","$known_x.length == $known_y.length","N/A"]],["?",["assert","$known_x.length > 0 && $known_y.length > 0","N/A"]]]),Je("LINEST",oe).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),Je("LOGEST",ae).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]],["stats",["or","logical",["null",!1]]]]),Je("TREND",se).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),Je("GROWTH",le).args([["known_y","matrix"],["known_x",["or","matrix","null"]],["new_x",["or","matrix","null"]],["const",["or","logical",["null",!0]]]]),Je("FV",ue).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["pv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$pmt || $pv"]]]),Je("PV",ce).args([["rate","number"],["nper","number"],["pmt",["or","number",["null",0]]],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$pmt || $fv"]]]),Je("PMT",he).args([["rate","number"],["nper","number"],["pmt","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Je("NPER",pe).args([["rate","number"],["pmt","number"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]]]),Je("RATE",fe).args([["nper","number"],["pmt",["or","number",["null",0]]],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["guess",["or","number++",["null",.01]]],["?",["assert","$pmt || $fv"]]]),Je("IPMT",me).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$per >= 1 && $per <= $nper"]]]),Je("PPMT",ge).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["fv",["or","number",["null",0]]],["type",["or",["values",0,1],["null",0]]],["?",["assert","$per >= 1 && $per <= $nper"]]]),Je("CUMPRINC",ve).args([["rate","number++"],["nper","number++"],["pv","number++"],["start_period","number++"],["end_period","number++"],["type",["or",["values",0,1],["null",0]]],["?",["assert","$end_period >= $start_period","NUM"]]]),Je("CUMIPMT",_e).args([["rate","number++"],["nper","number++"],["pv","number++"],["start_period","number++"],["end_period","number++"],["type",["or",["values",0,1],["null",0]]],["?",["assert","$end_period >= $start_period","NUM"]]]),Je("NPV",be).args([["rate","number"],["values",["collect","number"]],["?",["assert","$values.length > 0","N/A"]]]),Je("IRR",ke).args([["values",["collect","number",1]],["guess",["or","number",["null",.1]]]]),Je("EFFECT",we).args([["nominal_rate","number++"],["npery","integer++"]]),Je("NOMINAL",ye).args([["effect_rate","number++"],["npery","integer++"]]),Je("XNPV",xe).args([["rate","number"],["values",["collect","number",1]],["dates",["collect","date",1]],["?",["assert","$values.length == $dates.length","NUM"]]]),Je("XIRR",Ce).args([["values",["collect","number",1]],["dates",["collect","date",1]],["guess",["or","number",["null",.1]]],["?",["assert","$values.length == $dates.length","NUM"]]]),Je("ISPMT",Te).args([["rate","number"],["per","number++"],["nper","number++"],["pv","number"],["?",["assert","$per >= 1 && $per <= $nper"]]]),Je("DB",Se).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["month",["or","number",["null",12]]]]),Je("DDB",De).args([["cost","number"],["salvage","number"],["life","number++"],["period","number++"],["factor",["or","number",["null",2]]]]),Je("SLN",Fe).args([["cost","number"],["salvage","number"],["life","number++"]]),Je("SYD",Ee).args([["cost","number"],["salvage","number"],["life","number++"],["per","number++"]]),Je("VDB",Ae).args([["cost","number+"],["salvage","number+"],["life","number++"],["start_period","number+"],["end_period","number+"],["factor",["or","number+",["null",2]]],["no_switch",["or","logical",["null",!1]]],["?",["assert","$end_period >= $start_period","NUM"]]]),ot=[["settlement","date"],["maturity","date"],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]],Je("COUPDAYBS",He).args(ot),Je("COUPDAYS",Ne).args(ot),Je("COUPDAYSNC",Be).args(ot),Je("COUPPCD",Pe).args(ot),Je("COUPNCD",Le).args(ot),Je("COUPNUM",Oe).args(ot),Je("ACCRINTM",We).args([["issue","date"],["settlement","date"],["rate","number++"],["par",["or",["null",1e3],"number++"]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$issue < $settlement","NUM"]]]),Je("ACCRINT",Ue).args([["issue","date"],["first_interest","date"],["settlement","date"],["rate","number++"],["par",["or",["null",1e3],"number++"]],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["calc_method",["or","logical",["null",!0]]],["?",["assert","$issue < $settlement","NUM"]]]),Je("DISC",qe).args([["settlement","date"],["maturity","date"],["pr","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("INTRATE",je).args([["settlement","date"],["maturity","date"],["investment","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("RECEIVED",Ge).args([["settlement","date"],["maturity","date"],["investment","number++"],["discount","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("PRICE",$e).args([["settlement","date"],["maturity","date"],["rate","number++"],["yld","number++"],["redemption","number++"],["frequency",["and","integer",["values",1,2,4]]],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),Je("PRICEDISC",Ke).args([["settlement","date"],["maturity","date"],["discount","number++"],["redemption","number++"],["basis",["or",["null",0],["and","integer",["values",0,1,2,3,4]]]],["?",["assert","$settlement < $maturity","NUM"]]]),at=300,st=2.2204e-16,lt=1e-30,dt=Math.abs)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/borderpalette.min",["kendo.core.min","kendo.colorpicker.min","kendo.popup.min"],e)}(function(){!function(e){function t(e){return function(t){return t.preventDefault(),e.apply(this,arguments)}}var n,i,r,o,a,s;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=["allBorders","insideBorders","insideHorizontalBorders","insideVerticalBorders","outsideBorders","leftBorder","topBorder","rightBorder","bottomBorder","noBorders"],r=e.spreadsheet.messages.borderPalette={allBorders:"All borders",insideBorders:"Inside borders",insideHorizontalBorders:"Inside horizontal borders",insideVerticalBorders:"Inside vertical borders",outsideBorders:"Outside borders",leftBorder:"Left border",topBorder:"Top border",rightBorder:"Right border",bottomBorder:"Bottom border",noBorders:"No border"},o=e.spreadsheet.messages.colorPicker={reset:"Reset color",customColor:"Custom color...",apply:"Apply",cancel:"Cancel"},a=e.ui.Widget.extend({init:function(n,i){e.ui.Widget.call(this,n,i),this.element=n,this.color=i.color,this._resetButton(),this._colorPalette(),this._customColorPalette(),this._customColorButton(),this.resetButton.on("click",t(this.resetColor.bind(this))),this.customColorButton.on("click",t(this.customColor.bind(this)))},options:{name:"ColorChooser"},events:["change"],destroy:function(){e.unbind(this.dialog.element.find(".k-action-buttons")),this.dialog.destroy(),this.colorPalette.destroy(),this.resetButton.off("click"),this.customColorButton.off("click")},value:function(e){return void 0===e?this.color:(this.color=e,this.customColorButton.find(".k-icon").css("background-color",this.color),this.colorPalette.value(null),this.flatColorPicker.value(this.color),void 0)},_change:function(e){this.color=e,this.trigger("change",{value:e})},_colorPalette:function(){var e=n("<div />",{"class":"k-spreadsheet-color-palette"}),t=this.colorPalette=n("<div />").kendoColorPalette({palette:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],value:this.color,change:function(e){this.customColorButton.find(".k-icon").css("background-color","transparent"),this.flatColorPicker.value(null),this._change(e.value)}.bind(this)}).data("kendoColorPalette");e.append(t.wrapper).appendTo(this.element)},_customColorPalette:function(){var t,i,r=n("<div />",{"class":"k-spreadsheet-window",html:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>"+o.apply+"</button><button class='k-button' data-bind='click: close'>"+o.cancel+"</button></div>"}),a=this.dialog=r.appendTo(document.body).kendoWindow({animation:!1,scrollable:!1,resizable:!1,maximizable:!1,modal:!0,visible:!1,width:268,open:function(){this.center()}}).data("kendoWindow");a.one("activate",function(){this.element.find("[data-role=flatcolorpicker]").data("kendoFlatColorPicker")._hueSlider.resize()}),t=this.flatColorPicker=a.element.children().first().kendoFlatColorPicker().data("kendoFlatColorPicker"),i=e.observable({apply:function(){this.customColorButton.find(".k-icon").css("background-color",t.value()),this.colorPalette.value(null),this._change(t.value()),a.close()}.bind(this),close:function(){t.value(null),a.close()}}),e.bind(a.element.find(".k-action-buttons"),i)},_resetButton:function(){this.resetButton=n("<a class='k-button k-reset-color' href='#'><span class='k-icon k-i-reset-color'></span>"+o.reset+"</a>").appendTo(this.element)},_customColorButton:function(){this.customColorButton=n("<a class='k-button k-custom-color' href='#'><span class='k-icon'></span>"+o.customColor+"</a>").appendTo(this.element)},resetColor:function(){this.colorPalette.value(null),this.flatColorPicker.value(null),this._change(null)},customColor:function(){this.dialog.open()}}),s=e.ui.Widget.extend({init:function(n,i){e.ui.Widget.call(this,n,i),this.element=n,this.color="#000",this.element.addClass("k-spreadsheet-border-palette"),this._borderTypePalette(),
this._borderColorPalette(),this.element.on("click",".k-spreadsheet-border-type-palette .k-button",t(this._click.bind(this)))},options:{name:"BorderPalette"},events:["change"],destroy:function(){this.colorChooser.destroy(),this.element.off("click")},_borderTypePalette:function(){var t=r,o=i.map(function(n){return'<a title="'+t[n]+'" aria-label="'+t[n]+'" href="#" data-border-type="'+n+'" class="k-button k-button-icon"><span class="k-icon k-i-'+e.toHyphens(n)+'"></span></a>'}).join(""),a=n("<div />",{"class":"k-spreadsheet-border-type-palette",html:o});a.appendTo(this.element)},_borderColorPalette:function(){var e=n("<div />",{"class":"k-spreadsheet-border-color-palette"});e.appendTo(this.element),this.colorChooser=new a(e,{color:this.color,change:this._colorChange.bind(this)})},_click:function(e){this.type=n(e.currentTarget).data("borderType"),this.trigger("change",{type:this.type,color:this.color})},_colorChange:function(e){this.color=e.value,this.type&&this.trigger("change",{type:this.type,color:this.color})}}),e.spreadsheet.ColorChooser=a,e.spreadsheet.BorderPalette=s)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/toolbar.min",["kendo.toolbar.min","kendo.colorpicker.min","kendo.combobox.min","kendo.dropdownlist.min","kendo.popup.min","spreadsheet/borderpalette.min"],e)}(function(){!function(e){var t,n,i,r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C,T,S,D,F,E,A,I,R,M,z,H;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n=e.ui.ToolBar,i=e.spreadsheet.messages.toolbar={addColumnLeft:"Add column left",addColumnRight:"Add column right",addRowAbove:"Add row above",addRowBelow:"Add row below",alignment:"Alignment",alignmentButtons:{justtifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"},backgroundColor:"Background",bold:"Bold",borders:"Borders",copy:"Copy",cut:"Cut",deleteColumn:"Delete column",deleteRow:"Delete row",filter:"Filter",fontFamily:"Font",fontSize:"Font size",format:"Custom format...",formatTypes:{automatic:"Automatic",text:"Text",number:"Number",percent:"Percent",financial:"Financial",currency:"Currency",date:"Date",time:"Time",dateTime:"Date time",duration:"Duration",moreFormats:"More formats..."},formatDecreaseDecimal:"Decrease decimal",formatIncreaseDecimal:"Increase decimal",freeze:"Freeze panes",freezeButtons:{freezePanes:"Freeze panes",freezeRows:"Freeze rows",freezeColumns:"Freeze columns",unfreeze:"Unfreeze panes"},italic:"Italic",merge:"Merge cells",mergeButtons:{mergeCells:"Merge all",mergeHorizontally:"Merge horizontally",mergeVertically:"Merge vertically",unmerge:"Unmerge"},open:"Open...",paste:"Paste",quickAccess:{redo:"Redo",undo:"Undo"},exportAs:"Export...",toggleGridlines:"Toggle gridlines",sort:"Sort",sortButtons:{sortRangeAsc:"Sort range A to Z",sortRangeDesc:"Sort range Z to A"},textColor:"Text Color",textWrap:"Wrap text",underline:"Underline",validation:"Data validation...",hyperlink:"Link"},r={home:["open","exportAs",["cut","copy","paste"],["bold","italic","underline"],"hyperlink","backgroundColor","textColor","borders","fontSize","fontFamily","alignment","textWrap",["formatDecreaseDecimal","formatIncreaseDecimal"],"format","merge","freeze","filter","toggleGridlines"],insert:[["addColumnLeft","addColumnRight","addRowBelow","addRowAbove"],["deleteColumn","deleteRow"]],data:["sort","filter","validation"]},o={open:{type:"open",overflow:"never",iconClass:"file-excel"},exportAs:{type:"exportAsDialog",dialogName:"exportAs",overflow:"never",text:"",iconClass:"file-excel"},bold:{type:"button",command:"PropertyChangeCommand",property:"bold",value:!0,iconClass:"bold",togglable:!0},italic:{type:"button",command:"PropertyChangeCommand",property:"italic",value:!0,iconClass:"italic",togglable:!0},underline:{type:"button",command:"PropertyChangeCommand",property:"underline",value:!0,iconClass:"underline",togglable:!0},formatDecreaseDecimal:{type:"button",command:"AdjustDecimalsCommand",value:-1,iconClass:"decimal-decrease"},formatIncreaseDecimal:{type:"button",command:"AdjustDecimalsCommand",value:1,iconClass:"decimal-increase"},textWrap:{type:"button",command:"TextWrapCommand",property:"wrap",value:!0,iconClass:"text-wrap",togglable:!0},cut:{type:"button",command:"ToolbarCutCommand",iconClass:"cut"},copy:{type:"button",command:"ToolbarCopyCommand",iconClass:"copy"},paste:{type:"button",command:"ToolbarPasteCommand",iconClass:"paste"},separator:{type:"separator"},alignment:{type:"alignment",iconClass:"align-left"},backgroundColor:{type:"colorPicker",property:"background",iconClass:"paint"},textColor:{type:"colorPicker",property:"color",iconClass:"foreground-color"},fontFamily:{type:"fontFamily",property:"fontFamily",iconClass:"font-family"},fontSize:{type:"fontSize",property:"fontSize",iconClass:"font-size"},format:{type:"format",property:"format",iconClass:"custom-format"},filter:{type:"filter",property:"hasFilter",iconClass:"filter"},merge:{type:"merge",iconClass:"cells-merge"},freeze:{type:"freeze",iconClass:"pane-freeze"},borders:{type:"borders",iconClass:"borders-all"},formatCells:{type:"dialog",dialogName:"formatCells",overflow:"never"},hyperlink:{type:"dialog",dialogName:"hyperlink",iconClass:"link-horizontal",overflow:"never",text:""},toggleGridlines:{type:"button",command:"GridLinesChangeCommand",property:"gridLines",value:!0,iconClass:"border-no",togglable:!0},addColumnLeft:{type:"button",command:"AddColumnCommand",value:"left",iconClass:"table-column-insert-left"},addColumnRight:{type:"button",command:"AddColumnCommand",value:"right",iconClass:"table-column-insert-right"},addRowBelow:{type:"button",command:"AddRowCommand",value:"below",iconClass:"table-row-insert-below"},addRowAbove:{type:"button",command:"AddRowCommand",value:"above",iconClass:"table-row-insert-above"},deleteColumn:{type:"button",command:"DeleteColumnCommand",iconClass:"table-column-delete"},deleteRow:{type:"button",command:"DeleteRowCommand",iconClass:"table-row-delete"},sort:{type:"sort",iconClass:"sort-desc"},validation:{type:"dialog",dialogName:"validation",iconClass:"exception",overflow:"never"}},a=n.extend({init:function(e,i){var r,o;i.items=this._expandTools(i.tools||a.prototype.options.tools[i.toolbarName]),n.fn.init.call(this,e,i),r=this._click.bind(this),this.element.addClass("k-spreadsheet-toolbar"),this._addSeparators(this.element),o=this,this.element.on("keydown",function(e){var n;9===e.keyCode&&(n=o._nextTool(e.shiftKey?-1:1),n&&(document.activeElement.blur(),t(n).is(".k-upload-button")&&t(n).addClass("k-state-focused"),t(n).find("input").length?t(n).find("input").focus():n.focus(),e.preventDefault()))}),this.element.on("focusout",function(){t(this).find(".k-toolbar-first-visible").removeClass("k-state-focused")}),this.bind({click:r,toggle:r})},_nextTool:function(e){var n=this,i=n.element.find(".k-widget, .k-button, .k-button-group > a"),r=i.index(t(document.activeElement).closest(".k-widget, .k-button, .k-button-group > a"));if(r>0)return i[r+e]},_addSeparators:function(e){var t=e.children(".k-widget, a.k-button, .k-button-group");t.before("<span class='k-separator' />")},_expandTools:function(e){function n(e){var r=t.isPlainObject(e)?e:o[e]||{},a="k-icon k-i-"+r.iconClass,s=r.type,l={button:{showText:"overflow"},colorPicker:{toolIcon:a,spriteCssClass:a},borders:{spriteCssClass:a},alignment:{spriteCssClass:a},merge:{spriteCssClass:a},freeze:{spriteCssClass:a}},d=t.extend({name:r.name||e,text:i[r.name||e],icon:r.iconClass,attributes:{title:i[r.name||e],"aria-label":i[r.name||e]}},l[s],r);return"splitButton"==s&&(d.menuButtons=d.menuButtons.map(n)),d.attributes["data-tool"]=e,r.property&&(d.attributes["data-property"]=r.property),d}return e.reduce(function(e,i){return e.push(t.isArray(i)?{type:"buttonGroup",buttons:i.map(n)}:n.call(this,i)),e},[])},_click:function(e){var t,n=e.target.attr("data-tool"),i=o[n]||{},r=i.command;r&&(t={command:r,options:{property:i.property||null,value:i.value||null}},"boolean"==typeof t.options.value&&(t.options.value=!!e.checked||null),this.action(t))},events:["click","toggle","open","close","overflowOpen","overflowClose","action","dialog"],options:{name:"SpreadsheetToolBar",resizable:!0,tools:r},action:function(e){this.trigger("action",e)},dialog:function(e){this.trigger("dialog",e)},refresh:function(t){function n(e,t){var n,i=e.toolbar,r=e.overflow,o=i&&i.options.togglable||r&&r.options.togglable;o&&(n=!1,"boolean"==typeof t?n=t:"string"==typeof t&&(n=i.options.value===t),i.toggle(n),r&&r.toggle(n))}function i(e,t){var n=e.toolbar,i=e.overflow;n&&n.update&&n.update(t),i&&i.update&&i.update(t)}var r,o,a,s,l=t,d=this._tools();for(r=0;r<d.length;r++)o=d[r].property,a=d[r].tool,s=e.isFunction(l[o])?l[o]():l,"gridLines"==o&&(s=l.sheet().showGridLines()),"button"===a.type?n(a,s):i(a,s);this.resize()},_tools:function(){return this.element.find("[data-property]").toArray().map(function(e){return e=t(e),{property:e.attr("data-property"),tool:this._getItem(e)}}.bind(this))},destroy:function(){this.element.find("[data-command],.k-button").each(function(){var e=t(this),n=e.data("instance");n&&n.destroy&&n.destroy()}),n.fn.destroy.call(this)}}),e.spreadsheet.ToolBar=a,s=e.toolbar.Item.extend({init:function(e,n){var i=t("<select />").attr("title",e.attributes.title).attr("aria-label",e.attributes.title).kendoDropDownList({height:"auto"}).data("kendoDropDownList");this.dropDownList=i,this.element=i.wrapper,this.options=e,this.toolbar=n,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),i.bind("open",this._open.bind(this)),i.bind("change",this._change.bind(this)),this.element.width(e.width).attr({"data-command":"PropertyChangeCommand","data-property":e.property})},_open:function(){var t,n=this.dropDownList,i=n.list;i.css({whiteSpace:"nowrap",width:"auto"}),t=i.width(),t?t+=20:t=n._listWidth,i.css("width",t+e.support.scrollbar()),n._listWidth=t},_change:function(e){var t=e.sender,n=t.value(),i=t.dataItem(),r=i?i.popup:void 0;r?this.toolbar.dialog({name:r}):this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:"null"==n?null:n}})},value:function(e){return void 0===e?this.dropDownList.value():void this.dropDownList.value(e)}}),l=e.toolbar.Item.extend({init:function(e,n){this.element=t("<a href='#' class='k-button k-button-icon'><span class='"+e.spriteCssClass+"'></span><span class='k-icon k-i-arrow-60-down'></span></a>"),this.element.on("click touchend",this.open.bind(this)).attr("data-command",e.command),this.options=e,this.toolbar=n,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this._popup()},destroy:function(){this.popup.destroy()},open:function(e){e.preventDefault(),this.popup.toggle()},_popup:function(){var e=this.element;this.popup=t("<div class='k-spreadsheet-popup' />").appendTo(e).kendoPopup({anchor:e}).data("kendoPopup")}}),e.toolbar.registerComponent("dialog",e.toolbar.ToolBarButton.extend({init:function(t,n){e.toolbar.ToolBarButton.fn.init.call(this,t,n),this._dialogName=t.dialogName,this.element.bind("click touchend",this.open.bind(this)).data("instance",this)},open:function(){this.toolbar.dialog({name:this._dialogName})}})),e.toolbar.registerComponent("exportAsDialog",e.toolbar.Item.extend({init:function(e,n){this._dialogName=e.dialogName,this.toolbar=n,this._title=e.attributes.title,this.element=t("<button class='k-button k-button-icon'><span class='k-icon k-i-download' /></button>").attr("title",this._title).attr("aria-label",this._title).data("instance",this),this.element.bind("click",this.open.bind(this)).data("instance",this)},open:function(){this.toolbar.dialog({name:this._dialogName})}})),d=e.toolbar.OverflowButton.extend({init:function(t,n){e.toolbar.OverflowButton.fn.init.call(this,t,n),this.element.on("click touchend",this._click.bind(this)),this.message=this.options.text;var i=this.element.data("button");this.element.data(this.options.type,i)},_click:t.noop}),u=l.extend({init:function(t,n){l.fn.init.call(this,t,n),this.popup.element.addClass("k-spreadsheet-colorpicker"),this.colorChooser=new e.spreadsheet.ColorChooser(this.popup.element,{change:this._colorChange.bind(this)}),this.element.attr({"data-property":t.property}),this.element.data({type:"colorPicker",colorPicker:this,instance:this})},destroy:function(){this.colorChooser.destroy(),l.fn.destroy.call(this)},update:function(e){this.value(e)},value:function(e){this.colorChooser.value(e)},_colorChange:function(e){this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:e.sender.value()}}),this.popup.close()}}),c=d.extend({init:function(e,t){e.iconName="text",d.fn.init.call(this,e,t)},_click:function(){this.toolbar.dialog({name:"colorPicker",options:{title:this.options.property,property:this.options.property}})}}),e.toolbar.registerComponent("colorPicker",u,c),h=[8,9,10,11,12,13,14,16,18,20,22,24,26,28,36,48,72],p=12,f=e.toolbar.Item.extend({init:function(e,n){var i=t("<input />").attr("aria-label",e.attributes.title).kendoComboBox({change:this._valueChange.bind(this),clearButton:!1,dataSource:e.fontSizes||h,value:p}).data("kendoComboBox");this.comboBox=i,this.element=i.wrapper,this.options=e,this.toolbar=n,this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.element.width(e.width).attr({"data-command":"PropertyChangeCommand","data-property":e.property}),this.element.data({type:"fontSize",fontSize:this})},_valueChange:function(t){this.toolbar.action({command:"PropertyChangeCommand",options:{property:this.options.property,value:e.parseInt(t.sender.value())}})},update:function(t){this.value(e.parseInt(t)||p)},value:function(e){return void 0===e?this.comboBox.value():void this.comboBox.value(e)}}),m=d.extend({_click:function(){this.toolbar.dialog({name:"fontSize",options:{sizes:h,defaultSize:p}})},update:function(e){this._value=e||p,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),e.toolbar.registerComponent("fontSize",f,m),g=["Arial","Courier New","Georgia","Times New Roman","Trebuchet MS","Verdana"],v="Arial",_=s.extend({init:function(e,t){s.fn.init.call(this,e,t);var n=this.dropDownList;n.setDataSource(e.fontFamilies||g),n.value(v),this.element.data({type:"fontFamily",fontFamily:this})},update:function(e){this.value(e||v)}}),b=d.extend({_click:function(){this.toolbar.dialog({name:"fontFamily",options:{fonts:g,defaultFont:v}})},update:function(e){this._value=e||v,this.element.find(".k-text").text(this.message+" ("+this._value+") ...")}}),e.toolbar.registerComponent("fontFamily",_,b),k=e.spreadsheet.formats={automatic:null,text:"@",number:"#,0.00",percent:"0.00%",financial:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)',currency:"$#,##0.00;[Red]$#,##0.00",date:"m/d/yyyy",time:"h:mm:ss AM/PM",dateTime:"m/d/yyyy h:mm",duration:"[h]:mm:ss"},w=s.extend({_revertTitle:function(e){e.sender.value(""),e.sender.wrapper.width("auto")},init:function(e,t){var n,r;s.fn.init.call(this,e,t),n=this.dropDownList,r="<span class='k-icon k-i-"+e.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",n.bind("change",this._revertTitle.bind(this)),n.bind("dataBound",this._revertTitle.bind(this)),n.setOptions({dataValueField:"format",dataTextField:"name",dataValuePrimitive:!0,valueTemplate:r,template:"# if (data.sample) { #<span class='k-spreadsheet-sample'>#: data.sample #</span># } ##: data.name #"}),n.text(r),n.setDataSource([{format:k.automatic,name:i.formatTypes.automatic},{format:k.text,name:i.formatTypes.text},{format:k.number,name:i.formatTypes.number,sample:"1,499.99"},{format:k.percent,name:i.formatTypes.percent,sample:"14.50%"},{format:k.financial,name:i.formatTypes.financial,sample:"(1,000.12)"},{format:k.currency,name:i.formatTypes.currency,sample:"$1,499.99"},{format:k.date,name:i.formatTypes.date,sample:"4/21/2012"},{format:k.time,name:i.formatTypes.time,sample:"5:49:00 PM"},{format:k.dateTime,name:i.formatTypes.dateTime,sample:"4/21/2012 5:49:00"},{format:k.duration,name:i.formatTypes.duration,sample:"168:05:00"},{popup:"formatCells",name:i.formatTypes.moreFormats}]),this.element.data({type:"format",format:this})}}),y=d.extend({_click:function(){this.toolbar.dialog({name:"formatCells"})}}),e.toolbar.registerComponent("format",w,y),x=l.extend({init:function(e,t){l.fn.init.call(this,e,t),this._borderPalette(),this.element.data({type:"borders",instance:this})},destroy:function(){this.borderPalette.destroy(),l.fn.destroy.call(this)},_borderPalette:function(){var n=t("<div />").appendTo(this.popup.element);this.borderPalette=new e.spreadsheet.BorderPalette(n,{change:this._action.bind(this)})},_action:function(e){this.toolbar.action({command:"BorderChangeCommand",options:{border:e.type,style:{size:1,color:e.color}}})}}),C=d.extend({_click:function(){this.toolbar.dialog({name:"borders"})}}),e.toolbar.registerComponent("borders",x,C),T=l.extend({init:function(e,n){l.fn.init.call(this,e,n),this.element.attr({"data-property":"alignment"}),this._defineButtons(),this._commandPalette(),this.popup.element.on("click",".k-button",function(e){this._action(t(e.currentTarget))}.bind(this)),this.element.data({type:"alignment",alignment:this,instance:this})},_defineButtons:function(){this.buttons=[{property:"textAlign",value:"left",iconClass:"align-left",text:i.alignmentButtons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:i.alignmentButtons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:i.alignmentButtons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:i.alignmentButtons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:i.alignmentButtons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:i.alignmentButtons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:i.alignmentButtons.alignBottom}]},destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},update:function(e){var t=e.textAlign(),n=e.verticalAlign(),i=this.popup.element;i.find(".k-button").removeClass("k-state-active"),t&&i.find("[data-property=textAlign][data-value="+t+"]").addClass("k-state-active"),n&&i.find("[data-property=verticalAlign][data-value="+n+"]").addClass("k-state-active")},_commandPalette:function(){var e=this.buttons,n=t("<div />").appendTo(this.popup.element);e.forEach(function(i,r){var o="<a title='"+i.text+"' data-property='"+i.property+"' data-value='"+i.value+"' class='k-button k-button-icon'><span class='k-icon k-i-"+i.iconClass+"'></span></a>";0!==r&&e[r-1].property!==i.property&&n.append(t("<span class='k-separator' />")),n.append(o)})},_action:function(e){var t=e.attr("data-property"),n=e.attr("data-value");this.toolbar.action({command:"PropertyChangeCommand",options:{property:t,value:n}})}}),S=d.extend({_click:function(){this.toolbar.dialog({name:"alignment"})}}),e.toolbar.registerComponent("alignment",T,S),D=l.extend({init:function(e,n){l.fn.init.call(this,e,n),this._defineButtons(),this._commandPalette(),this.popup.element.on("click",".k-button",function(e){this._action(t(e.currentTarget))}.bind(this)),this.element.data({type:"merge",merge:this,instance:this})},_defineButtons:function(){this.buttons=[{value:"cells",iconClass:"cells-merge",text:i.mergeButtons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:i.mergeButtons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:i.mergeButtons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:i.mergeButtons.unmerge}]},destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},_commandPalette:function(){var e=t("<div />").appendTo(this.popup.element);this.buttons.forEach(function(t){var n="<a title='"+t.text+"' data-value='"+t.value+"' class='k-button k-button-icontext'><span class='k-icon k-i-"+t.iconClass+"'></span>"+t.text+"</a>";e.append(n)})},_action:function(e){var t=e.attr("data-value");this.toolbar.action({command:"MergeCellCommand",options:{value:t}})}}),F=d.extend({_click:function(){this.toolbar.dialog({name:"merge"})}}),e.toolbar.registerComponent("merge",D,F),E=l.extend({init:function(e,n){l.fn.init.call(this,e,n),this._defineButtons(),this._commandPalette(),this.popup.element.on("click",".k-button",function(e){this._action(t(e.currentTarget))}.bind(this)),this.element.data({type:"freeze",freeze:this,instance:this})},_defineButtons:function(){this.buttons=[{value:"panes",iconClass:"pane-freeze",text:i.freezeButtons.freezePanes},{value:"rows",iconClass:"row-freeze",text:i.freezeButtons.freezeRows},{value:"columns",iconClass:"column-freeze",text:i.freezeButtons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:i.freezeButtons.unfreeze}]},destroy:function(){this.popup.element.off(),l.fn.destroy.call(this)},_commandPalette:function(){var e=t("<div />").appendTo(this.popup.element);this.buttons.forEach(function(t){var n="<a title='"+t.text+"' data-value='"+t.value+"' class='k-button k-button-icontext'><span class='k-icon k-i-"+t.iconClass+"'></span>"+t.text+"</a>";e.append(n)})},_action:function(e){var t=e.attr("data-value");this.toolbar.action({command:"FreezePanesCommand",options:{value:t}})}}),A=d.extend({_click:function(){this.toolbar.dialog({name:"freeze"})}}),e.toolbar.registerComponent("freeze",E,A),I=s.extend({_revertTitle:function(e){e.sender.value(""),e.sender.wrapper.width("auto")},init:function(e,t){s.fn.init.call(this,e,t);var n=this.dropDownList;n.bind("change",this._revertTitle.bind(this)),n.bind("dataBound",this._revertTitle.bind(this)),n.setOptions({valueTemplate:"<span class='k-icon k-i-"+e.iconClass+"' style='line-height: 1em; width: 1.35em;'></span>",template:"<span class='k-icon k-i-#= iconClass #' style='line-height: 1em; width: 1.35em;'></span>#=text#",dataTextField:"text",dataValueField:"value"}),n.setDataSource([{value:"asc",sheet:!1,text:i.sortButtons.sortRangeAsc,iconClass:"sort-asc"},{value:"desc",sheet:!1,text:i.sortButtons.sortRangeDesc,iconClass:"sort-desc"}]),n.select(0),this.element.data({type:"sort",sort:this})},_change:function(e){var t=e.sender,n=t.dataItem();n&&this.toolbar.action({command:"SortCommand",options:{value:n.value,sheet:n.sheet}})},value:t.noop}),R=d.extend({_click:function(){this.toolbar.dialog({name:"sort"})}}),e.toolbar.registerComponent("sort",I,R),M=e.toolbar.ToolBarButton.extend({init:function(t,n){t.showText="overflow",e.toolbar.ToolBarButton.fn.init.call(this,t,n),this.element.on("click",this._click.bind(this)),this.element.data({type:"filter",filter:this})},_click:function(){this.toolbar.action({command:"FilterCommand"})},update:function(e){this.toggle(e)}}),z=d.extend({init:function(e,t){d.fn.init.call(this,e,t),this.element.data({type:"filter",filter:this})},_click:function(){this.toolbar.action({command:"FilterCommand"})},update:function(e){this.toggle(e)}}),e.toolbar.registerComponent("filter",M,z),H=e.toolbar.Item.extend({init:function(e,n){this.toolbar=n,this.element=t("<div class='k-button k-upload-button k-button-icon'><span class='k-icon k-i-folder-open' /></div>").data("instance",this),this._title=e.attributes.title,this._reset()},_reset:function(){this.element.find("input").remove(),t("<input type='file' autocomplete='off' accept='.xlsx'/>").attr("title",this._title).attr("aria-label",this._title).one("change",this._change.bind(this)).appendTo(this.element)},_change:function(e){this.toolbar.action({command:"OpenCommand",options:{file:e.target.files[0]}}),this._reset()}}),e.toolbar.registerComponent("open",H),e.spreadsheet.TabStrip=e.ui.TabStrip.extend({init:function(n,i){e.ui.TabStrip.fn.init.call(this,n,i),n.addClass("k-spreadsheet-tabstrip"),this._quickAccessButtons(),this.toolbars={};var r=i.dataSource;this.contentElements.each(function(e,n){this._toolbar(t(n),r[e].id,i.toolbarOptions[r[e].id])}.bind(this)),this.one("activate",function(){this.toolbars[this.options.dataSource[0].id].resize()})},events:e.ui.TabStrip.fn.events.concat(["action","dialog"]),destroy:function(){this.quickAccessToolBar.off("click"),e.ui.TabStrip.fn.destroy.call(this);for(var t in this.toolbars)this.toolbars[t].destroy()},action:function(e){this.trigger("action",e)},dialog:function(e){this.trigger("dialog",e)},refreshTools:function(e){var t,n=this.toolbars;for(t in n)n.hasOwnProperty(t)&&n[t].refresh(e)},_quickAccessButtons:function(){var n=[{title:i.quickAccess.undo,iconClass:"undo",action:"undo"},{title:i.quickAccess.redo,iconClass:"redo",action:"redo"}],r=e.template("<a href='\\#' title='#= title #' data-action='#= action #' class='k-button k-button-icon' aria-label='#= title #'><span class='k-icon k-i-#=iconClass#'></span></a>");this.quickAccessToolBar=t("<div />",{"class":"k-spreadsheet-quick-access-toolbar",html:e.render(r,n)}).insertBefore(this.wrapper),this.quickAccessToolBar.on("click",".k-button",function(e){e.preventDefault();var n=t(e.currentTarget).attr("data-action");this.action({action:n})}.bind(this)),this.quickAccessAdjust()},quickAccessAdjust:function(){this.tabGroup.css("padding-left",e._outerWidth(this.quickAccessToolBar))},_toolbar:function(t,n,i){var r,o;this.toolbars[n]&&(this.toolbars[n].destroy(),t.children(".k-toolbar").remove()),i&&(r=t.html("<div />").children("div"),o={tools:"boolean"==typeof i?void 0:i,toolbarName:n,action:this.action.bind(this),dialog:this.dialog.bind(this)},this.toolbars[n]=new e.spreadsheet.ToolBar(r,o))}}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/dialogs.min",["kendo.core.min","kendo.binder.min","kendo.validator.min"],e)}(function(){!function(e){function t(t,n){return e.spreadsheet.formatting.text(t,n)}function n(e,t){var n,i=[],o=[];for(n=0;n<t.length;n++)r.inArray(t[n][e],o)==-1&&(i.push(t[n]),o.push(t[n][e]));return i}function i(t,n){e.spreadsheet.dialogs.register(t,c.extend({options:{messageId:n}}))}var r,o,a,s,l,d,u,c,h,p,f,m,g,v,_,b,k,w,y,x,C,T,S,D,F;e.support.browser.msie&&e.support.browser.version<9||(r=e.jQuery,o=e.data.ObservableObject,a=e.spreadsheet.messages.dialogs={apply:"Apply",save:"Save",cancel:"Cancel",remove:"Remove",retry:"Retry",revert:"Revert",okText:"OK",formatCellsDialog:{title:"Format",categories:{number:"Number",currency:"Currency",date:"Date"}},fontFamilyDialog:{title:"Font"},fontSizeDialog:{title:"Font size"},bordersDialog:{title:"Borders"},alignmentDialog:{title:"Alignment",buttons:{justtifyLeft:"Align left",justifyCenter:"Center",justifyRight:"Align right",justifyFull:"Justify",alignTop:"Align top",alignMiddle:"Align middle",alignBottom:"Align bottom"}},mergeDialog:{title:"Merge cells",buttons:{mergeCells:"Merge all",mergeHorizontally:"Merge horizontally",mergeVertically:"Merge vertically",unmerge:"Unmerge"}},freezeDialog:{title:"Freeze panes",buttons:{freezePanes:"Freeze panes",freezeRows:"Freeze rows",freezeColumns:"Freeze columns",unfreeze:"Unfreeze panes"}},confirmationDialog:{text:"Are you sure you want to remove this sheet?",title:"Sheet remove"},validationDialog:{title:"Data Validation",hintMessage:"Please enter a valid {0} value {1}.",hintTitle:"Validation {0}",criteria:{any:"Any value",number:"Number",text:"Text",date:"Date",custom:"Custom Formula",list:"List"},comparers:{greaterThan:"greater than",lessThan:"less than",between:"between",notBetween:"not between",equalTo:"equal to",notEqualTo:"not equal to",greaterThanOrEqualTo:"greater than or equal to",lessThanOrEqualTo:"less than or equal to"},comparerMessages:{greaterThan:"greater than {0}",lessThan:"less than {0}",between:"between {0} and {1}",notBetween:"not between {0} and {1}",equalTo:"equal to {0}",notEqualTo:"not equal to {0}",greaterThanOrEqualTo:"greater than or equal to {0}",lessThanOrEqualTo:"less than or equal to {0}",custom:"that satisfies the formula: {0}"},labels:{criteria:"Criteria",comparer:"Comparer",min:"Min",max:"Max",value:"Value",start:"Start",end:"End",onInvalidData:"On invalid data",rejectInput:"Reject input",showWarning:"Show warning",showHint:"Show hint",hintTitle:"Hint title",hintMessage:"Hint message",ignoreBlank:"Ignore blank",showListButton:"Display button to show list",showCalendarButton:"Display button to show calendar"},placeholders:{typeTitle:"Type title",typeMessage:"Type message"}},exportAsDialog:{title:"Export...",labels:{scale:"Scale",fit:"Fit to page",fileName:"File name",saveAsType:"Save as type",exportArea:"Export",paperSize:"Paper size",margins:"Margins",orientation:"Orientation",print:"Print",guidelines:"Guidelines",center:"Center",horizontally:"Horizontally",vertically:"Vertically"}},modifyMergedDialog:{errorMessage:"Cannot change part of a merged cell."},rangeDisabledDialog:{errorMessage:"Destination range contains disabled cells."},intersectsArrayDialog:{errorMessage:"You cannot alter part of an array"},incompatibleRangesDialog:{errorMessage:"Incompatible ranges"},noFillDirectionDialog:{errorMessage:"Cannot determine fill direction"},duplicateSheetNameDialog:{errorMessage:"Duplicate sheet name"},overflowDialog:{errorMessage:"Cannot paste, because the copy area and the paste area are not the same size and shape."},useKeyboardDialog:{title:"Copying and pasting",errorMessage:"These actions cannot be invoked through the menu. Please use the keyboard shortcuts instead:",labels:{forCopy:"for copy",forCut:"for cut",forPaste:"for paste"}},unsupportedSelectionDialog:{errorMessage:"That action cannot be performed on multiple selection."},linkDialog:{title:"Hyperlink",labels:{text:"Text",url:"Address",removeLink:"Remove link"}}},s={},e.spreadsheet.dialogs={register:function(e,t){s[e]=t},registered:function(e){return!!s[e]},create:function(e,t){var n=s[e];if(n)return new n(t)}},l=e.spreadsheet.SpreadsheetDialog=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this,t),this.options=r.extend(!0,{},this.options,t),this.bind(this.events,t)},events:["close","activate"],options:{autoFocus:!0},dialog:function(){return this._dialog||(this._dialog=r("<div class='k-spreadsheet-window k-action-window k-popup-edit-form' />").addClass(this.options.className||"").append(e.template(this.options.template)({messages:e.spreadsheet.messages.dialogs||a,errors:this.options.errors})).appendTo(document.body).kendoWindow({autoFocus:!1,scrollable:!1,resizable:!1,modal:!0,visible:!1,width:this.options.width||320,title:this.options.title,open:function(){this.center()},close:this._onDialogClose.bind(this),activate:this._onDialogActivate.bind(this),deactivate:this._onDialogDeactivate.bind(this)}).data("kendoWindow")),this._dialog},_onDialogClose:function(){this.trigger("close",{action:this._action})},_onDialogActivate:function(){this.trigger("activate")},_onDialogDeactivate:function(){this.trigger("deactivate"),this.destroy()},destroy:function(){this._dialog&&(this._dialog.destroy(),this._dialog=null)},open:function(){this.dialog().open(),this.dialog().element.find(".k-primary").focus()},apply:function(){this.close()},close:function(){this._action="close",this.dialog().close()}}),d=e.spreadsheet.FormatCellsViewModel=o.extend({init:function(e){o.fn.init.call(this,e),this.useCategory(this.category)},useCategory:function(e){var t=e&&e.type||"number",n="currency"==t;this.category=e,this.set("showCurrencyFilter",n&&this.currencies.length>1),n?this.currency(this.currencies[0]):this.set("formats",this.allFormats[t+"Formats"]),this.useFirstFormat()},useFirstFormat:function(){this.formats.length&&this.set("format",this.formats[0].value)},currency:function(e){var n,i;return void 0!==e&&(this._currency=e,n=e.value,i=[{currency:n,decimals:!0},{currency:n,decimals:!0,iso:!0},{currency:n,decimals:!1}],i=i.map(function(e){return e=d.convert.currency(e),{value:e,name:t(1e3,e)}}),this.set("formats",i),this.useFirstFormat()),this._currency||this.currencies[0]},categoryFilter:function(e){return void 0!==e&&this.useCategory(e),this.category},preview:function(){var e=this.get("format"),n=this.value||0;return e&&e.length?t(n,e):n}}),d.convert={currency:function(e){function t(e,t){return Array(t+1).join(e);
}var n=e.currency,i=n.pattern[1];return e.decimals&&(i=i.replace(/n/g,"n"+n["."]+t("0",n.decimals))),i=e.iso?'"'+n.abbr+'" '+i.replace(/\s*\$\s*/g,""):i.replace(/\$/g,n.symbol),i=i.replace(/n/g,"?")},date:function(e){return/T|Z/.test(e)?"":e.toLowerCase().replace(/tt/g,"AM/PM").replace(/'/g,'"')}},u=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.formatCellsDialog||a,i={title:n.title,categories:[{type:"number",name:n.categories.number},{type:"currency",name:n.categories.currency},{type:"date",name:n.categories.date}]};l.fn.init.call(this,r.extend(i,t)),this._generateFormats()},options:{className:"k-spreadsheet-format-cells",template:"<div class='k-edit-form-container'><div class='k-root-tabs' data-role='tabstrip' data-text-field='name' data-bind='source: categories, value: categoryFilter' data-animation='false' /><div class='k-spreadsheet-preview' data-bind='text: preview' /><script type='text/x-kendo-template' id='format-item-template'>\\#: data.name \\#</script><select data-role='dropdownlist' class='k-format-filter' data-text-field='description' data-value-field='value.name' data-bind='visible: showCurrencyFilter, value: currency, source: currencies' /><ul data-role='staticlist' tabindex='0' class='k-list k-reset' data-template='format-item-template' data-value-primitive='true' data-value-field='value' data-bind='source: formats, value: format' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div></div>"},_generateFormats:function(){var i,o=this.options;o.currencies||(o.currencies=u.currenciesFrom(e.cultures)),o.numberFormats||(o.numberFormats=[{value:"#.00%",name:"100.00%"},{value:"#%",name:"100%"},{value:"#.00",name:"1024.00"},{value:"#,###.00",name:"1,024.00"}]),o.dateFormats||(i=e.cultures.current.calendars.standard.patterns,o.dateFormats=n("value",r.map(i,function(e){if(e=d.convert.date(e))return{value:e,name:t(34567.7678,e)}})))},open:function(t){var n,i,r=this.options,o=t.value(),a=r.categories.slice(0);this.viewModel=new d({currencies:r.currencies.slice(0),allFormats:{numberFormats:r.numberFormats.slice(0),dateFormats:r.dateFormats.slice(0)},categories:a,format:t.format(),category:o instanceof Date?a[2]:a[0],apply:this.apply.bind(this),close:this.close.bind(this),value:o}),l.fn.open.call(this),n=this.dialog().element,e.bind(n,this.viewModel),i=n.find("select.k-format-filter").data("kendoDropDownList"),r.currencies.length>10&&i.setOptions({filter:"contains"}),n.find(e.roleSelector("staticlist")).parent().addClass("k-list-wrapper")},apply:function(){var e=this.viewModel.format;l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"format",value:e}})}}),u.currenciesFrom=function(t){return n("description",r.map(t,function(t,n){var i,r;if(/-/.test(n))return i=t.numberFormat.currency,r=e.format("{0} ({1}, {2})",i.name,i.abbr,i.symbol),{description:r,value:i}}))},e.spreadsheet.dialogs.register("formatCells",u),e.spreadsheet.dialogs.FormatCellsDialog=u,c=l.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"},open:function(){var t,n;l.fn.open.call(this),t=this.options,n=t.text,t.messageId&&(n=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:n,close:this.close.bind(this)})}}),e.spreadsheet.dialogs.register("message",c),h=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.confirmationDialog||a,i={title:n.title,text:n.text};l.fn.init.call(this,r.extend(i,t))},options:{className:"k-spreadsheet-message",messageId:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: confirm'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>"},open:function(){var t,n;l.fn.open.call(this),t=this.options,n=t.text,t.messageId&&(n=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:n,confirm:this.confirm.bind(this),cancel:this.close.bind(this)})},isConfirmed:function(){return this._confirmed},confirm:function(){this._confirmed=!0,this.close()}}),e.spreadsheet.dialogs.register("confirmation",h),p=l.extend({options:{className:"k-spreadsheet-message",title:"",messageId:"",text:"",template:"<div class='k-spreadsheet-message-content' data-bind='text: text' /><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: retry'>#= messages.retry #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>"},open:function(){var t,n;l.fn.open.call(this),t=this.options,n=t.text,t.messageId&&(n=e.getter(t.messageId,!0)(e.spreadsheet.messages.dialogs)),e.bind(this.dialog().element,{text:n,retry:this.retry.bind(this),cancel:this.close.bind(this)})},retry:function(){this._retry=!0,this.close()}}),e.spreadsheet.dialogs.register("validationError",p),f=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.fontFamilyDialog||a;l.fn.init.call(this,r.extend({title:n.title},t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul"),n=this.options.fonts,i=this.options.defaultFont;this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:n}),template:"#: data #",value:i,change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontFamily",value:e.sender.value()[0]}})}}),e.spreadsheet.dialogs.register("fontFamily",f),m=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.fontSizeDialog||a;l.fn.init.call(this,r.extend({title:n.title},t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul"),n=this.options.sizes,i=this.options.defaultSize;this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:n}),template:"#: data #",value:i,change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(t){l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:"fontSize",value:e.parseInt(t.sender.value()[0])}})}}),e.spreadsheet.dialogs.register("fontSize",m),g=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.bordersDialog||a;l.fn.init.call(this,r.extend({title:n.title},t)),this.element=this.dialog().element,this._borderPalette(),this.viewModel=e.observable({apply:this.apply.bind(this),close:this.close.bind(this)}),e.bind(this.element.find(".k-action-buttons"),this.viewModel)},options:{width:177,template:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){l.fn.apply.call(this);var e=this.value();this.trigger("action",{command:"BorderChangeCommand",options:{border:e.type,style:{size:1,color:e.color}}})},_borderPalette:function(){var t=this.dialog().element.find("div:first");this.borderPalette=new e.spreadsheet.BorderPalette(t,{change:this.value.bind(this)})},value:function(e){return void 0===e?this._state:void(this._state=e)}}),e.spreadsheet.dialogs.register("borders",g),v=l.extend({init:function(t){l.fn.init.call(this,t),this.element=this.dialog().element,this.property=t.property,this.options.title=t.title,this.viewModel=e.observable({apply:this.apply.bind(this),close:this.close.bind(this)}),e.bind(this.element.find(".k-action-buttons"),this.viewModel)},options:{template:"<div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.apply #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:this.property,value:this.value()}})},value:function(e){return void 0===e?this._value:void(this._value=e.value)}}),_=v.extend({init:function(e){e.width=177,v.fn.init.call(this,e),this._colorPalette()},_colorPalette:function(){var e=this.dialog().element.find("div:first");this.colorPalette=e.kendoColorPalette({palette:["#ffffff","#000000","#d6ecff","#4e5b6f","#7fd13b","#ea157a","#feb80a","#00addc","#738ac8","#1ab39f","#f2f2f2","#7f7f7f","#a7d6ff","#d9dde4","#e5f5d7","#fad0e4","#fef0cd","#c5f2ff","#e2e7f4","#c9f7f1","#d8d8d8","#595959","#60b5ff","#b3bcca","#cbecb0","#f6a1c9","#fee29c","#8be6ff","#c7d0e9","#94efe3","#bfbfbf","#3f3f3f","#007dea","#8d9baf","#b2e389","#f272af","#fed46b","#51d9ff","#aab8de","#5fe7d5","#a5a5a5","#262626","#003e75","#3a4453","#5ea226","#af0f5b","#c58c00","#0081a5","#425ea9","#138677","#7f7f7f","#0c0c0c","#00192e","#272d37","#3f6c19","#750a3d","#835d00","#00566e","#2c3f71","#0c594f"],change:this.value.bind(this)}).data("kendoColorPalette")}}),e.spreadsheet.dialogs.register("colorPicker",_),b=v.extend({init:function(e){e.width=268,v.fn.init.call(this,e),this.dialog().setOptions({animation:!1}),this.dialog().one("activate",this._colorPicker.bind(this))},_colorPicker:function(){var e=this.dialog().element.find("div:first");this.colorPicker=e.kendoFlatColorPicker({change:this.value.bind(this)}).data("kendoFlatColorPicker")}}),e.spreadsheet.dialogs.register("customColor",b),k=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.alignmentDialog||a,i={title:n.title,buttons:[{property:"textAlign",value:"left",iconClass:"align-left",text:n.buttons.justtifyLeft},{property:"textAlign",value:"center",iconClass:"align-center",text:n.buttons.justifyCenter},{property:"textAlign",value:"right",iconClass:"align-right",text:n.buttons.justifyRight},{property:"textAlign",value:"justify",iconClass:"align-justify",text:n.buttons.justifyFull},{property:"verticalAlign",value:"top",iconClass:"align-top",text:n.buttons.alignTop},{property:"verticalAlign",value:"center",iconClass:"align-middle",text:n.buttons.alignMiddle},{property:"verticalAlign",value:"bottom",iconClass:"align-bottom",text:n.buttons.alignBottom}]};l.fn.init.call(this,r.extend(i,t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-property='#=property#' data-value='#=value#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];l.fn.apply.call(this),this.trigger("action",{command:"PropertyChangeCommand",options:{property:t.property,value:t.value}})}}),e.spreadsheet.dialogs.register("alignment",k),w=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.mergeDialog||a,i={title:n.title,buttons:[{value:"cells",iconClass:"cells-merge",text:n.buttons.mergeCells},{value:"horizontally",iconClass:"cells-merge-horizontally",text:n.buttons.mergeHorizontally},{value:"vertically",iconClass:"cells-merge-vertically",text:n.buttons.mergeVertically},{value:"unmerge",iconClass:"table-unmerge",text:n.buttons.unmerge}]};l.fn.init.call(this,r.extend(i,t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];l.fn.apply.call(this),this.trigger("action",{command:"MergeCellCommand",options:{value:t.value}})}}),e.spreadsheet.dialogs.register("merge",w),y=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.freezeDialog||a,i={title:n.title,buttons:[{value:"panes",iconClass:"pane-freeze",text:n.buttons.freezePanes},{value:"rows",iconClass:"row-freeze",text:n.buttons.freezeRows},{value:"columns",iconClass:"column-freeze",text:n.buttons.freezeColumns},{value:"unfreeze",iconClass:"table-unmerge",text:n.buttons.unfreeze}]};l.fn.init.call(this,r.extend(i,t)),this._list()},options:{template:"<ul class='k-list k-reset'></ul>"},_list:function(){var t=this.dialog().element.find("ul");this.list=new e.ui.StaticList(t,{dataSource:new e.data.DataSource({data:this.options.buttons}),template:"<a title='#=text#' data-value='#=value#'><span class='k-icon k-icon k-i-#=iconClass#'></span>#=text#</a>",change:this.apply.bind(this)}),this.list.dataSource.fetch()},apply:function(e){var t=e.sender.value()[0];l.fn.apply.call(this),this.trigger("action",{command:"FreezePanesCommand",options:{value:t.value}})}}),e.spreadsheet.dialogs.register("freeze",y),x=e.spreadsheet.ValidationCellsViewModel=o.extend({init:function(e){o.fn.init.call(this,e),this.bind("change",function(e){"criterion"===e.field&&(this.reset(),"custom"!==this.criterion&&"list"!==this.criterion||this.setHintMessageTemplate()),"comparer"===e.field&&this.setHintMessageTemplate(),"hintMessage"!=e.field&&"hintTitle"!=e.field||this._mute||(this.shouldBuild=!1),"from"!=e.field&&"to"!=e.field&&"hintMessageTemplate"!=e.field&&"type"!=e.field||!this.shouldBuild||this.buildMessages()}.bind(this)),this.reset()},buildMessages:function(){this._mute=!0,this.set("hintTitle",this.hintTitleTemplate?e.format(this.hintTitleTemplate,this.type):""),this.set("hintMessage",this.hintMessageTemplate?e.format(this.hintMessageTemplate,this.from,this.to):""),this._mute=!1},reset:function(){this.setComparers(),this.set("comparer",this.comparers[0].type),this.set("from",null),this.set("to",null),this.set("useCustomMessages",!1),this.shouldBuild=!0,this.hintTitleTemplate=this.defaultHintTitle,this.buildMessages()},setComparers:function(){var e,t,n=this.defaultComparers,i=[];if("text"===this.criterion)for(e=["equalTo","notEqualTo"],t=0;t<n.length;t++)e[0]==n[t].type&&(i.push(n[t]),e.shift());else i=n.slice();this.set("comparers",i)},setHintMessageTemplate:function(){"custom"!==this.criterion&&"list"!==this.criterion?this.set("hintMessageTemplate",e.format(this.defaultHintMessage,this.criterion,this.comparerMessages[this.comparer])):(this.set("hintMessageTemplate",""),this.set("hintMessage",""))},isAny:function(){return"any"===this.get("criterion")},isNumber:function(){return"number"===this.get("criterion")},showToForNumber:function(){return this.showTo()&&this.isNumber()},showToForDate:function(){return this.showTo()&&this.isDate()},isText:function(){return"text"===this.get("criterion")},isDate:function(){return"date"===this.get("criterion")},isList:function(){return"list"===this.get("criterion")},isCustom:function(){return"custom"===this.get("criterion")},showRemove:function(){return this.get("hasValidation")},showTo:function(){return"between"==this.get("comparer")||"notBetween"==this.get("comparer")},update:function(e){this.set("hasValidation",!!e),e&&this.fromValidationObject(e)},fromValidationObject:function(e){this.set("criterion",e.dataType),this.set("comparer",e.comparerType),this.set("from",e.from),this.set("to",e.to),this.set("type",e.type),this.set("ignoreBlank",e.allowNulls),this.set("showButton",e.showButton),e.messageTemplate||e.titleTemplate?(this.hintMessageTemplate=e.messageTemplate,this.hintMessage=e.messageTemplate,this.hintTitleTemplate=e.titleTemplate,this.hintTitle=e.titleTemplate,this.useCustomMessages=!0,this.buildMessages()):this.useCustomMessages=!1},toValidationObject:function(){if("any"===this.criterion)return null;var e={type:this.type,dataType:this.criterion,comparerType:this.comparer,from:this.from,to:this.to,allowNulls:this.ignoreBlank,showButton:this.showButton};return this.useCustomMessages&&(e.messageTemplate=this.shouldBuild?this.hintMessageTemplate:this.hintMessage,e.titleTemplate=this.hintTitle),e}}),C=l.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.validationDialog||a,i={title:n.title,hintMessage:n.hintMessage,hintTitle:n.hintTitle,criteria:[{type:"any",name:n.criteria.any},{type:"number",name:n.criteria.number},{type:"text",name:n.criteria.text},{type:"date",name:n.criteria.date},{type:"custom",name:n.criteria.custom},{type:"list",name:n.criteria.list}],comparers:[{type:"greaterThan",name:n.comparers.greaterThan},{type:"lessThan",name:n.comparers.lessThan},{type:"between",name:n.comparers.between},{type:"notBetween",name:n.comparers.notBetween},{type:"equalTo",name:n.comparers.equalTo},{type:"notEqualTo",name:n.comparers.notEqualTo},{type:"greaterThanOrEqualTo",name:n.comparers.greaterThanOrEqualTo},{type:"lessThanOrEqualTo",name:n.comparers.lessThanOrEqualTo}],comparerMessages:n.comparerMessages};l.fn.init.call(this,r.extend(i,t))},options:{width:450,criterion:"any",type:"reject",ignoreBlank:!0,showButton:!0,useCustomMessages:!1,errorTemplate:'<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-i-warning"> </span>#= message #<div class="k-callout k-callout-n"></div></div>',template:'<div class="k-edit-form-container"><div class="k-edit-label"><label>#: messages.validationDialog.labels.criteria #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.criteria #"data-text-field="name" data-value-field="type" data-bind="value: criterion, source: criteria" /></div><div data-bind="visible: isNumber"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.min #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.min #" title="#: messages.validationDialog.labels.min #" placeholder="e.g. 10" class="k-textbox" data-bind="value: from, enabled: isNumber" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.max #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.max #" title="#: messages.validationDialog.labels.max #" placeholder="e.g. 100" class="k-textbox" data-bind="value: to, enabled: showToForNumber" required="required" /></div></div></div><div data-bind="visible: isText"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isText" required="required" /></div></div><div data-bind="visible: isDate"><div class="k-edit-label"><label>#: messages.validationDialog.labels.comparer #:</label></div><div class="k-edit-field"><select data-role="dropdownlist" title="#: messages.validationDialog.labels.comparer #"data-text-field="name" data-value-field="type" data-bind="value: comparer, source: comparers" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.start #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.start #" title="#: messages.validationDialog.labels.start #" class="k-textbox" data-bind="value: from, enabled: isDate" required="required" /></div><div data-bind="visible: showTo"><div class="k-edit-label"><label>#: messages.validationDialog.labels.end #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.end #" title="#: messages.validationDialog.labels.end #" class="k-textbox" data-bind="value: to, enabled: showToForDate" required="required" /></div></div></div><div data-bind="visible: isCustom"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isCustom" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-label"><label>#: messages.validationDialog.labels.value #:</label></div><div class="k-edit-field"><input name="#: messages.validationDialog.labels.value #" title="#: messages.validationDialog.labels.value #" class="k-textbox" data-bind="value: from, enabled: isList" required="required" /></div></div><div data-bind="visible: isList"><div class="k-edit-field"><input type="checkbox" name="showButton" id="listShowButton" class="k-checkbox" data-bind="checked: showButton"/><label for="listShowButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showListButton #</label></div></div><div data-bind="visible: isDate"><div class="k-edit-field"><input type="checkbox" name="showButton" id="dateShowButton" class="k-checkbox" data-bind="checked: showButton"/><label for="dateShowButton" class="k-checkbox-label"> #: messages.validationDialog.labels.showCalendarButton #</label></div></div><div data-bind="invisible: isAny"><div class="k-edit-field"><input type="checkbox" title="#: messages.validationDialog.labels.ignoreBlank #" name="ignoreBlank" id="ignoreBlank" class="k-checkbox" data-bind="checked: ignoreBlank"/><label for="ignoreBlank" class="k-checkbox-label"> #: messages.validationDialog.labels.ignoreBlank #</label></div></div><div data-bind="invisible: isAny"><div class="k-hr"></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.onInvalidData #:</label></div><div class="k-edit-field"><input type="radio" title="#: messages.validationDialog.labels.rejectInput #" id="validationTypeReject" name="validationType" value="reject" data-bind="checked: type" class="k-radio" /><label for="validationTypeReject" class="k-radio-label">#: messages.validationDialog.labels.rejectInput #</label> <input type="radio" title="#: messages.validationDialog.labels.showWarning #" id="validationTypeWarning" name="validationType" value="warning" data-bind="checked: type" class="k-radio" /><label for="validationTypeWarning" class="k-radio-label">#: messages.validationDialog.labels.showWarning #</label></div></div><div data-bind="invisible: isAny" class="hint-wrapper"><div class="k-edit-field"><input type="checkbox" title="#: messages.validationDialog.labels.showHint #" name="useCustomMessages" id="useCustomMessages" class="k-checkbox" data-bind="checked: useCustomMessages" /><label class="k-checkbox-label" for="useCustomMessages"> #: messages.validationDialog.labels.showHint #</label></div><div data-bind="visible: useCustomMessages"><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintTitle #:</label></div><div class="k-edit-field"><input class="k-textbox" title="#: messages.validationDialog.labels.hintTitle #" placeholder="#: messages.validationDialog.placeholders.typeTitle #" data-bind="value: hintTitle" /></div><div class="k-edit-label"><label>#: messages.validationDialog.labels.hintMessage #:</label></div><div class="k-edit-field"><input class="k-textbox" title="#: messages.validationDialog.labels.hintMessage #" placeholder="#: messages.validationDialog.placeholders.typeMessage #" data-bind="value: hintMessage" /></div></div></div><div class="k-action-buttons"><button class="k-button" data-bind="visible: showRemove, click: remove">#: messages.remove #</button><button class="k-button k-primary" data-bind="click: apply">#: messages.apply #</button><button class="k-button" data-bind="click: close">#: messages.cancel #</button></div></div>'},open:function(t){var n,i=this.options;this.viewModel=new x({type:i.type,defaultHintMessage:i.hintMessage,defaultHintTitle:i.hintTitle,defaultComparers:i.comparers.slice(0),comparerMessages:i.comparerMessages,criteria:i.criteria.slice(0),criterion:i.criterion,ignoreBlank:i.ignoreBlank,showButton:i.showButton,apply:this.apply.bind(this),close:this.close.bind(this),remove:this.remove.bind(this)}),this.viewModel.update(t.validation()),l.fn.open.call(this),n=this.dialog().element,this.validatable&&this.validatable.destroy(),e.bind(n,this.viewModel),this.validatable=new e.ui.Validator(n.find(".k-edit-form-container"),{validateOnBlur:!1,errorTemplate:this.options.errorTemplate||void 0})},apply:function(){this.validatable.validate()&&(l.fn.apply.call(this),this.trigger("action",{command:"EditValidationCommand",options:{value:this.viewModel.toValidationObject()}}))},remove:function(){this.viewModel.set("criterion","any"),this.apply()}}),e.spreadsheet.dialogs.register("validation",C),e.spreadsheet.dialogs.ValidationDialog=C,T=l.extend({init:function(t){var n,i=e.spreadsheet.messages.dialogs.exportAsDialog||a;l.fn.init.call(this,r.extend({title:i.title},t)),this.viewModel=e.observable({title:this.options.title,name:this.options.name,extension:this.options.extension,fileFormats:this.options.fileFormats,excel:t.excelExport,pdf:{proxyURL:t.pdfExport.proxyURL,forceProxy:t.pdfExport.forceProxy,title:t.pdfExport.title,author:t.pdfExport.author,subject:t.pdfExport.subject,keywords:t.pdfExport.keywords,creator:t.pdfExport.creator,date:t.pdfExport.date,fitWidth:this.options.pdf.fitWidth,area:this.options.pdf.area,areas:this.options.pdf.areas,paperSize:this.options.pdf.paperSize,paperSizes:this.options.pdf.paperSizes,margin:this.options.pdf.margin,margins:this.options.pdf.margins,landscape:this.options.pdf.landscape,guidelines:this.options.pdf.guidelines,hCenter:this.options.pdf.hCenter,vCenter:this.options.pdf.vCenter},apply:this.apply.bind(this),close:this.close.bind(this)}),n=this.dialog(),this.viewModel.bind("change",function(e){"extension"===e.field&&(this.set("showPdfOptions",".pdf"===this.extension),n.center())}),e.bind(n.element,this.viewModel)},options:{name:"Workbook",extension:".xlsx",fileFormats:[{description:"Excel Workbook (.xlsx)",extension:".xlsx"},{description:"Portable Document Format(.pdf)",extension:".pdf"}],pdf:{fitWidth:!0,area:"workbook",areas:[{area:"workbook",text:"Entire Workbook"},{area:"sheet",text:"Active Sheet"},{area:"selection",text:"Selection"}],paperSize:"a4",paperSizes:[{value:"a2",text:"A2 (420 mm × 594 mm) "},{value:"a3",text:"A3 (297 mm x 420 mm) "},{value:"a4",text:"A4 (210 mm x 297 mm) "},{value:"a5",text:"A5 (148 mm x 210 mm) "},{value:"b3",text:"B3 (353 mm × 500 mm) "},{value:"b4",text:"B4 (250 mm x 353 mm) "},{value:"b5",text:"B5 (176 mm x 250 mm) "},{value:"folio",text:'Folio (8.5" x 13") '},{value:"legal",text:'Legal (8.5" x 14") '},{value:"letter",text:'Letter (8.5" x 11") '},{value:"tabloid",text:'Tabloid (11" x 17") '},{value:"executive",text:'Executive (7.25" x 10.5")'}],margin:{bottom:"0.75in",left:"0.7in",right:"0.7in",top:"0.75in"},margins:[{value:{bottom:"0.75in",left:"0.7in",right:"0.7in",top:"0.75in"},text:"Normal"},{value:{bottom:"0.75in",left:"0.25in",right:"0.25in",top:"0.75in"},text:"Narrow"},{value:{bottom:"1in",left:"1in",right:"1in",top:"1in"},text:"Wide"}],landscape:!0,guidelines:!0,hCenter:!0,vCenter:!0},width:520,template:"<div class='k-edit-label'><label>#: messages.exportAsDialog.labels.fileName #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: name' /></div><div ><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.saveAsType #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='description' data-value-field='extension' data-bind='value: extension, source: fileFormats' /></div></div><div class='k-export-config' data-bind='visible: showPdfOptions'><hr class='k-hr' /><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.exportArea #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='area' data-bind='value: pdf.area, source: pdf.areas' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.paperSize#:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-text-field='text' data-value-field='value' data-bind='value: pdf.paperSize, source: pdf.paperSizes' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.margins #:</label></div><div class='k-edit-field'><select data-role='dropdownlist' class='k-file-format' data-value-primitive='true'data-text-field='text' data-value-field='value' data-bind='value: pdf.margin, source: pdf.margins' /></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.orientation #:</label></div><div class='k-edit-field'><div class='k-button-group'><input type='radio' id='k-orientation-portrait' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='false' /><label class='k-button k-button-icon k-group-start k-orientation-button' for='k-orientation-portrait'><span class='k-icon k-i-page-portrait'></span></label><input type='radio' id='k-orientation-landscape' name='orientation' data-type='boolean' data-bind='checked: pdf.landscape' value='true' /><label class='k-button k-button-icon k-group-end k-orientation-button' for='k-orientation-landscape'><span class='k-icon k-i-page-landscape'></span></label></div></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.print #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='guidelines' type='checkbox' data-bind='checked: pdf.guidelines'/><label class='k-checkbox-label' for='guidelines'>#: messages.exportAsDialog.labels.guidelines#</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.scale #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='fitWidth' type='checkbox' data-bind='checked: pdf.fitWidth'/><label class='k-checkbox-label' for='fitWidth'>#: messages.exportAsDialog.labels.fit #</label></div><div class='k-edit-label'><label>#: messages.exportAsDialog.labels.center #:</label></div><div class='k-edit-field'><input class='k-checkbox' id='hCenter' type='checkbox' data-bind='checked: pdf.hCenter'/><label class='k-checkbox-label' for='hCenter'>#: messages.exportAsDialog.labels.horizontally #</label><input class='k-checkbox' id='vCenter' type='checkbox' data-bind='checked: pdf.vCenter'/><label class='k-checkbox-label' for='vCenter'>#: messages.exportAsDialog.labels.vertically #</label></div><div class='k-page-orientation'><span class='k-icon k-i-page-portrait' data-bind='invisible: pdf.landscape'></span><span class='k-icon k-i-page-landscape' data-bind='visible: pdf.landscape'></span></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: apply'>#: messages.save #</button><button class='k-button' data-bind='click: close'>#: messages.cancel #</button></div>"},apply:function(){l.fn.apply.call(this),this.trigger("action",{command:"SaveAsCommand",options:this.viewModel})}}),e.spreadsheet.dialogs.register("exportAs",T),i("modifyMerged","modifyMergedDialog.errorMessage"),i("rangeDisabled","rangeDisabledDialog.errorMessage"),i("intersectsArray","intersectsArrayDialog.errorMessage"),i("overflow","overflowDialog.errorMessage"),i("unsupportedSelection","unsupportedSelectionDialog.errorMessage"),i("incompatibleRanges","incompatibleRangesDialog.errorMessage"),
i("noFillDirection","noFillDirectionDialog.errorMessage"),i("duplicateSheetName","duplicateSheetNameDialog.errorMessage"),S=c.extend({options:{width:640,title:"Errors in import",template:"<div class='k-spreadsheet-message-content k-spreadsheet-import-errors'><div class='k--header-message'>We encountered #= errors.length # errors while reading this file. Please be aware that some formulas might be missing, or contain invalid results.</div><div class='k--errors'><table><thead><tr><th>Context</th><th>Error message</th></tr></thead># for (var i = 0; i < errors.length; ++i) { ## var err = errors[i]; #<tr><td>#: err.context #</td><td>#: err.error #</td></tr># } #</table></div></div><div class='k-action-buttons'><button class='k-button k-primary' data-bind='click: close'>#: messages.okText #</button></div>"}}),e.spreadsheet.dialogs.register("importError",S),D=c.extend({init:function(t){var n=e.spreadsheet.messages.dialogs.useKeyboardDialog||a;l.fn.init.call(this,r.extend({title:n.title},t))},options:{template:"#: messages.useKeyboardDialog.errorMessage #<div>Ctrl+C #: messages.useKeyboardDialog.labels.forCopy #</div><div>Ctrl+X #: messages.useKeyboardDialog.labels.forCut #</div><div>Ctrl+V #: messages.useKeyboardDialog.labels.forPaste #</div><div class=\"k-action-buttons\"><button class='k-button k-primary' data-bind='click: close'>#= messages.okText #</button></div>"}}),e.spreadsheet.dialogs.register("useKeyboard",D),F=l.extend({options:{template:"<div class='k-edit-label'><label>#: messages.linkDialog.labels.url #:</label></div><div class='k-edit-field'><input class='k-textbox' data-bind='value: url' title='#: messages.linkDialog.labels.url #' /></div><div class='k-action-buttons'><button class='k-button k-left' data-bind='click: remove'>#= messages.linkDialog.labels.removeLink #</button><button class='k-button k-primary' data-bind='click: apply'>#= messages.okText #</button><button class='k-button' data-bind='click: cancel'>#= messages.cancel #</button></div>",title:a.linkDialog.title,autoFocus:!1},open:function(t){var n,i,o=this;l.fn.open.apply(o,arguments),n=o.dialog().element,i=e.observable({url:t.link(),apply:function(){/\S/.test(i.url)||(i.url=null),o.trigger("action",{command:"HyperlinkCommand",options:{link:i.url}}),o.close()},remove:function(){i.url=null,i.apply()},cancel:o.close.bind(o)}),e.bind(n,i),n.find("input").focus().on("keydown",function(e){13==e.keyCode?(i.url=r(this).val(),e.stopPropagation(),e.preventDefault(),i.apply()):27==e.keyCode&&(e.stopPropagation(),e.preventDefault(),i.cancel())})}}),e.spreadsheet.dialogs.register("hyperlink",F))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/sheetbinder.min",["kendo.core.min","kendo.data.min","spreadsheet/sheet.min"],e)}(function(){!function(e){var t,n;e.support.browser.msie&&e.support.browser.version<9||(t=function(e){return e},n=e.Class.extend({init:function(e){this.options=$.extend({},this.options,e),this.columns=this._normalizeColumns(this.options.columns),this._sheet(),this._dataSource(),this._header(),this._boundRowsCount=0,this.dataSource.fetch()},_sheet:function(){this.sheet=this.options.sheet,this._sheetChangeHandler=this._sheetChange.bind(this),this._sheetDeleteRowHandler=this._sheetDeleteRow.bind(this),this._sheetInsertRowHandler=this._sheetInsertRow.bind(this),this.sheet.bind("change",this._sheetChangeHandler).bind("afterDeleteRow",this._sheetDeleteRowHandler).bind("afterInsertRow",this._sheetInsertRowHandler)},_sheetInsertRow:function(e){void 0!==e.index&&this.dataSource.insert(Math.max(e.index-1,0),{})},_sheetDeleteRow:function(e){var t,n;void 0!==e.index&&(t=this.dataSource,n=t.view()[e.index-1],n&&t.remove(n))},_header:function(){this.sheet.batch(function(){this.columns.forEach(function(e,t){this.sheet.range(0,t).value(e.title)}.bind(this))}.bind(this))},_sheetChange:function(n){var i,r,o,a,s,l,d;n.insertRow||n.deleteRow||n.recalc&&n.ref&&(i=this.dataSource,r=i.view(),o=this.columns,i.reader.model&&(a=i.reader.model.fields),!o.length&&r.length&&(o=Object.keys(r[0].toJSON())),s=o.map(function(n){var i=n.field;return i&&a&&a[i]&&"date"==a[i].type?e.spreadsheet.numberToDate:t}),this._skipRebind=!0,l=this.sheet._grid.normalize(n.ref),d=this.sheet.range(l).values(),l.forEach(function(e){var t,n,a,l,u;for(e=e.toRangeRef(),n=0,a=e.topLeft.row;a<=e.bottomRight.row;a++){for(t=r[a-1],t||(t=i.insert(a-1,{}),r=i.view()),l=0,u=e.topLeft.col;u<=e.bottomRight.col&&u<o.length;u++)t.set(o[u].field,s[u](d[n][l++]));n++}}),this._boundRowsCount=i.view().length,this._skipRebind=!1)},_normalizeColumns:function(e){return e.map(function(e){var t=e.field||e;return{field:t,title:e.title||t}})},_dataSource:function(){var t=this.options,n=t.dataSource;n=Array.isArray(n)?{data:n}:n,this.dataSource&&this._changeHandler?this.dataSource.unbind("change",this._changeHandler):this._changeHandler=this._change.bind(this),this.dataSource=e.data.DataSource.create(n).bind("change",this._changeHandler)},_change:function(){var t,n,i;this._skipRebind||(t=this.dataSource.view(),n=this.columns,!n.length&&t.length&&(this.columns=n=this._normalizeColumns(Object.keys(t[0].toJSON())),this._header()),i=n.map(function(t){return e.getter(t.field)}),this.sheet.batch(function(){var e,n,r,o=Math.max(t.length,this._boundRowsCount);for(e=0;e<o;e++)for(n=0;n<i.length;n++)r=t[e]?i[n](t[e]):null,this.sheet.range(e+1,n).value(r)}.bind(this)),this._boundRowsCount=t.length)},destroy:function(){this.dataSource.unbind("change",this._changeHandler),this.sheet.unbind("change",this._sheetChangeHandler).unbind("deleteRow",this._sheetDeleteRowHandler).unbind("insertRow",this._sheetInsertRowHandler)},options:{columns:[]}}),e.spreadsheet.SheetDataSourceBinder=n)}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/filtermenu.min",["kendo.core.min","kendo.popup.min","kendo.treeview.min","kendo.numerictextbox.min","kendo.datepicker.min","kendo.datetimepicker.min"],e)}(function(){!function(e){function t(e){var t,n={},i=[];for(t=0;t<e.length;t++)n[e[t].value]?!n[e[t].value].checked&&e[t].checked&&(n[e[t].value].checked=!0):(n[e[t].value]=e[t],i.push(e[t]));return i}function n(t,i){var r,o,a,s,l,d,u=!1,c=t instanceof e.data.HierarchicalDataSource&&t.data(),h=this,p=this.values;for(r=0;r<c.length;r++)o=c[r],a=(""+o.text).toLowerCase(),s=i===!0||""===i||a.indexOf(i)>=0,l=n.bind(h),d=l(o.children,i),u=u||d||s,o.hidden=!s&&!d,i.length||p&&!p.length?o.checked=!o.hidden:p&&p.indexOf(o.text)!=-1&&(o.checked=!0);return c&&t.filter({field:"hidden",operator:"neq",value:!0}),u}function i(t){var n,r,o=t instanceof e.data.HierarchicalDataSource&&t.data();for(n=0;n<o.length;n++)r=o[n],r.checked=!1,r.hasChildren&&i(r.children)}function r(e){var t,n,i=d.operators,r=[];for(t in e)if(e.hasOwnProperty(t))for(n in e[t])e[t].hasOwnProperty(n)&&r.push({text:i[t][n],value:n,unique:t+"_"+n,type:t});return r}var o,a,s,l,d,u,c,h,p;e.support.browser.msie&&e.support.browser.version<9||(o=e.jQuery,a=e.ui.Widget,s={details:"k-details",button:"k-button",detailsSummary:"k-details-summary",detailsContent:"k-details-content",icon:"k-icon",iconCollapse:"k-i-arrow-45-down-right",iconExpand:"k-i-arrow-60-right",iconSearch:"k-i-zoom",textbox:"k-textbox",wrapper:"k-spreadsheet-filter-menu",filterByCondition:"k-spreadsheet-condition-filter",filterByValue:"k-spreadsheet-value-filter",valuesTreeViewWrapper:"k-spreadsheet-value-treeview-wrapper",actionButtons:"k-action-buttons"},l=a.extend({init:function(t,n){a.fn.init.call(this,t,n),this.element.addClass(p.classNames.details),this._summary=this.element.find("."+p.classNames.detailsSummary).on("click",this._toggle.bind(this));var i=n.expanded?p.classNames.iconCollapse:p.classNames.iconExpand;this._icon=o("<span />",{"class":p.classNames.icon+" "+i}).prependTo(this._summary),this._container=e.wrap(this._summary.next(),!0),n.expanded||this._container.hide()},options:{name:"Details"},events:["toggle"],visible:function(){return this.options.expanded},toggle:function(t){var n=e.fx(this._container).expand("vertical");n.stop()[t?"reverse":"play"](),this._icon.toggleClass(p.classNames.iconExpand,t).toggleClass(p.classNames.iconCollapse,!t),this.options.expanded=!t},_toggle:function(){var e=this.visible();this.toggle(e),this.trigger("toggle",{show:e})}}),d=e.spreadsheet.messages.filterMenu={sortAscending:"Sort range A to Z",sortDescending:"Sort range Z to A",filterByValue:"Filter by value",filterByCondition:"Filter by condition",apply:"Apply",search:"Search",addToCurrent:"Add to current selection",clear:"Clear",blanks:"(Blanks)",operatorNone:"None",and:"AND",or:"OR",operators:{string:{contains:"Text contains",doesnotcontain:"Text does not contain",startswith:"Text starts with",endswith:"Text ends with",matches:"Text matches",doesnotmatch:"Text does not match"},date:{eq:"Date is",neq:"Date is not",lt:"Date is before",gt:"Date is after"},number:{eq:"Is equal to",neq:"Is not equal to",gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"}}},e.data.binders.spreadsheetFilterValue=e.data.Binder.extend({init:function(t,n,i){e.data.Binder.fn.init.call(this,t,n,i),this._change=o.proxy(this.change,this),o(this.element).on("change",this._change)},refresh:function(){var e=this,t=e.bindings.spreadsheetFilterValue.get();o(e.element).val(t instanceof Date?"":t)},change:function(){var e=this.element.value;this.bindings.spreadsheetFilterValue.set(e)}}),e.data.binders.widget.spreadsheetFilterValue=e.data.Binder.extend({init:function(t,n,i){e.data.Binder.fn.init.call(this,t.element[0],n,i),this.widget=t,this._change=o.proxy(this.change,this),this.widget.first("change",this._change)},refresh:function(){var e=this.bindings.spreadsheetFilterValue,t=e.get(),n=o(this.widget.element).data("filterType");this.widget.value("date"===n&&t instanceof Date||"number"===n&&!isNaN(t)?t:null)},change:function(){var e=this.widget.value(),t=this.bindings.spreadsheetFilterValue;t.set(e)}}),u={filterByValue:"<div class='"+s.detailsSummary+"'>#= messages.filterByValue #</div><div class='"+s.detailsContent+"'><div class='k-textbox k-space-right'><input placeholder='#= messages.search #' data-#=ns#bind='events: { input: filterValues }' /><span class='k-icon k-i-zoom' /></div><div data-#=ns#bind='visible: hasActiveSearch'><input class='k-checkbox' type='checkbox' data-#=ns#bind='checked: appendToSearch' id='_#=guid#' /><label class='k-checkbox-label' for='_#=guid#'>#= messages.addToCurrent #</label></div><div class='"+s.valuesTreeViewWrapper+"'><div data-#=ns#role='treeview' data-#=ns#checkboxes='{ checkChildren: true }' data-#=ns#bind='source: valuesDataSource, events: { check: valuesChange, select: valueSelect }' /></div></div>",filterByCondition:"<div class='"+s.detailsSummary+"'>#= messages.filterByCondition #</div><div class='"+s.detailsContent+'\'><div><select data-#=ns#role="dropdownlist"data-#=ns#bind="value: operator, source: operators, events: { change: operatorChange } "data-value-primitive="false"data-option-label="#=messages.operatorNone#"data-height="auto"data-text-field="text"data-value-field="unique"></select></div><div data-#=ns#bind="visible: isString"><input data-filter-type="string" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" class="k-textbox" /></div><div data-#=ns#bind="visible: isNumber"><input data-filter-type="number" data-#=ns#role="numerictextbox" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div><div data-#=ns#bind="visible: isDate"><input data-filter-type="date" data-#=ns#role="datepicker" data-#=ns#bind="spreadsheetFilterValue: customFilter.criteria[0].value" /></div></div>',menuItem:"<li data-command='#=command#' data-dir='#=dir#'><span class='k-icon k-i-#=iconClass#'></span>#=text#</li>",actionButtons:"<button data-#=ns#bind='click: apply' class='k-button k-primary'>#=messages.apply#</button><button data-#=ns#bind='click: clear' class='k-button'>#=messages.clear#</button>"},c=e.spreadsheet.FilterMenuViewModel=e.data.ObservableObject.extend({valuesChange:function(t){var n=t?t.sender.dataSource:this.valuesDataSource,i=function(e){return e.checked},r=function(t){return"date"===t.dataType?e.spreadsheet.dateToNumber(t.value):t.value},o=function(e,t,n){return n.lastIndexOf(e)===t},a=n.data(),s=a[0].children.data().toJSON(),l=s.filter(function(e){return"blank"===e.dataType});l=!!l.length&&l[0].checked,s=s.filter(i).map(r),this.appendToSearch&&this.valueFilter&&this.valueFilter.values.length&&(s=s.concat(this.valueFilter.values.toJSON()).sort().filter(o)),this.set("valueFilter",{values:s,blanks:l})},valueSelect:function(e){e.preventDefault();var t=e.sender.dataItem(e.node);t.set("checked",!t.checked)},hasActiveSearch:!1,appendToSearch:!1,filterValues:function(e){var t,r="string"==typeof e?e:o(e.target).val().toLowerCase(),a=this.valuesDataSource;this.set("hasActiveSearch",!!r),t=n.bind(this.valueFilter),i(a),t(a,r)},reset:function(){this.set("customFilter",{logic:"and",criteria:[{operator:null,value:null}]}),this.set("valueFilter",{values:[]})},operatorChange:function(e){var t=e.sender.dataItem();this.set("operatorType",t.type),this.get("customFilter")||this.reset(),this.set("customFilter.criteria[0].operator",t.value)},isNone:function(){return void 0===this.get("operatorType")},isString:function(){return"string"===this.get("operatorType")},isNumber:function(){return"number"===this.get("operatorType")},isDate:function(){return"date"===this.get("operatorType")}}),h=e.spreadsheet.FilterMenuController={valuesTree:function(e,t){return[{text:"All",expanded:!0,checked:!1,items:this.values(e.resize({top:1}),t)}]},values:function(n,i){var r=[],o=d,a=n.column(i),s=n.sheet();return a.forEachCell(function(t,n,i){var a,l,d,u=!0;s.isHiddenRow(t)&&(u=!1),a=i.value,l=i.dataType,d=i.text,l=void 0===a?"blank":i.format?e.spreadsheet.formatting.type(a,i.format):typeof a,d=null!==a&&i.format?e.spreadsheet.formatting.text(a,i.format):"blank"==l?o.blanks:a,"percent"!==l&&"currency"!==l||(l="number"),"date"===l&&(a=e.spreadsheet.numberToDate(a)),r.push({dataType:l,value:a,text:d,checked:u})}),r=t(r),r.sort(function(e,t){return e.dataType===t.dataType?0:"blank"===e.dataType||"blank"===t.dataType?"blank"===e.dataType?-1:1:"number"===e.dataType||"number"===t.dataType?"number"===e.dataType?-1:1:"date"===e.dataType||"date"===t.dataType?"date"===e.dataType?-1:1:0}),r},filterType:function(e,t){var n,i,r,o=e.sheet(),a=this.filterForColumn(t,o);return a=a&&a.filter.toJSON(),a&&"custom"==a.filter&&(i=a.criteria[0].value,i instanceof Date?n="date":"string"==typeof i?n="string":"number"==typeof i&&(n="number")),n||(r=this.values(e.row(1),t)[0],n=r&&r.dataType,"blank"==n&&(n=null)),n},filterForColumn:function(e,t){var n,i=t.filter();return i&&(n=i.columns.filter(function(t){return t.index===e})[0]),n},filter:function(e,t){var n,i,r,o,a=this.filterForColumn(e,t);if(a)return n=a.filter.toJSON(),i=n.filter,delete n.filter,r={type:i,options:n},o=n.criteria,o&&o.length&&(r.operator=o[0].operator),r}},p=a.extend({init:function(e,t){a.call(this,e,t),this.element.addClass(p.classNames.wrapper),this.viewModel=new c({active:"value",operator:null,operators:r(this.options.operators),clear:this.clear.bind(this),apply:this.apply.bind(this)}),this._filterInit(),this._popup(),this._sort(),this._filterByCondition(),this._filterByValue(),this._actionButtons()},options:{name:"FilterMenu",column:0,range:null,operators:{string:{contains:"Text contains",doesnotcontain:"Text does not contain",startswith:"Text starts with",endswith:"Text ends with",matches:"Text matches",doesnotmatch:"Text does not match"},date:{eq:"Date is",neq:"Date is not",lt:"Date is before",gt:"Date is after"},number:{eq:"Is equal to",neq:"Is not equal to",gte:"Is greater than or equal to",gt:"Is greater than",lte:"Is less than or equal to",lt:"Is less than"}}},events:["action"],destroy:function(){a.fn.destroy.call(this),this.menu.destroy(),this.valuesTreeView.destroy(),this.popup.destroy()},openFor:function(e){this.popup.setOptions({anchor:e}),this.popup.open()},close:function(){this.popup.close()},clear:function(){this.action({command:"ClearFilterCommand",options:{column:this.options.column}}),this.viewModel.reset(),this.close()},apply:function(){var e,t,n;this._active(),e={operatingRange:this.options.range,column:this.options.column},"value"===this.viewModel.active?(this.viewModel.valuesChange({sender:this.valuesTreeView}),t=this.viewModel.valueFilter.toJSON(),(t.blanks||t.values&&t.values.length)&&(e.valueFilter=t)):"custom"===this.viewModel.active&&(n=this.viewModel.customFilter.toJSON(),n.criteria.length&&null!==n.criteria[0].value&&(e.customFilter=n)),(e.valueFilter||e.customFilter)&&this.action({command:"ApplyFilterCommand",options:e})},action:function(e){this.trigger("action",o.extend({},e))},_filterInit:function(){var e,t=this.options.column,n=this.options.range,i=n.sheet(),r=h.filter(t,i);r?(e=h.filterType(n,t),this.viewModel.set("active",r.type),this.viewModel.set(r.type+"Filter",r.options),"custom"==r.type&&(this.viewModel.set("operator",e+"_"+r.operator),this.viewModel.set("operatorType",e))):this.viewModel.reset()},_popup:function(){this.popup=this.element.kendoPopup({copyAnchorStyles:!1}).data("kendoPopup")},_sort:function(){var t=e.template(p.templates.menuItem),n=d,i=[{command:"sort",dir:"asc",text:n.sortAscending,iconClass:"sort-asc"},{command:"sort",dir:"desc",text:n.sortDescending,iconClass:"sort-desc"}],r=o("<ul />",{html:e.render(t,i)}).appendTo(this.element);this.menu=r.kendoMenu({orientation:"vertical",select:function(e){var t=o(e.item).data("dir"),n=this.options.range.resize({top:1}),i={value:t,sheet:!1,operatingRange:n,column:this.options.column};n.isSortable()?this.action({command:"SortCommand",options:i}):this.close()}.bind(this)}).data("kendoMenu")},_appendTemplate:function(t,n,i,r){var a=e.template(t),s=o("<div class='"+n+"'/>").html(a({messages:d,guid:e.guid(),ns:e.ns}));return this.element.append(s),i&&(i=new l(s,{expanded:r,toggle:this._detailToggle.bind(this)})),e.bind(s,this.viewModel),s},_detailToggle:function(e){this.element.find("[data-role=details]").not(e.sender.element).data("kendoDetails").toggle(!e.show)},_filterByCondition:function(){var e="custom"===this.viewModel.active;this._appendTemplate(p.templates.filterByCondition,p.classNames.filterByCondition,!0,e)},_filterByValue:function(){var t,n="value"===this.viewModel.active,i=this._appendTemplate(p.templates.filterByValue,p.classNames.filterByValue,!0,n);this.valuesTreeView=i.find("[data-role=treeview]").data("kendoTreeView"),t=h.valuesTree(this.options.range,this.options.column),this.viewModel.set("valuesDataSource",new e.data.HierarchicalDataSource({data:t}))},_actionButtons:function(){this._appendTemplate(p.templates.actionButtons,p.classNames.actionButtons,!1)},_active:function(){var e=this.element.find("[data-role=details]").filter(function(e,t){return o(t).data("kendoDetails").visible()});e.hasClass(p.classNames.filterByValue)?this.viewModel.set("active","value"):e.hasClass(p.classNames.filterByCondition)&&this.viewModel.set("active","custom")}}),e.spreadsheet.FilterMenu=p,o.extend(!0,p,{classNames:s,templates:u}))}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/editor.min",["kendo.core.min"],e)}(function(){!function(e){function t(e,t){return e&&(e.top!==t.top||e.left!==t.left)}if(!(e.support.browser.msie&&e.support.browser.version<9)){var n=e.Observable.extend({init:function(t){e.Observable.fn.init.call(this),this.view=t,this.formulaBar=t.formulaBar,this._active=!1,this.barInput=t.formulaBar.formulaInput,this.cellInput=t.formulaInput,this.barInput.syncWith(this.cellInput),this.cellInput.syncWith(this.barInput),this.barInput.bind("keyup",this._triggerUpdate.bind(this)),this.cellInput.bind("keyup",this._triggerUpdate.bind(this)),this.barInput.bind("blur",this._blur.bind(this)),this.cellInput.bind("blur",this._blur.bind(this))},events:["activate","deactivate","change","update"],_blur:function(){this.deactivate()},_triggerUpdate:function(){this.trigger("update",{value:this.value()})},activeEditor:function(){var t=null,n=e._activeElement();return this.barElement()[0]===n?t=this.barInput:this.cellElement()[0]===n&&(t=this.cellInput),t},activate:function(e){return this._active=!0,this._rect=e.rect,this._range=e.range,this.cellInput.position(e.rect),this.cellInput.resize(e.rect),this.cellInput.tooltip(e.tooltip),this.cellInput.activeCell=this.barInput.activeCell=this._range.topLeft(),this.cellInput.activeSheet=this.barInput.activeSheet=this._range._sheet,this.trigger("activate"),this},deactivate:function(e){var t=this.cellInput;this._active&&(this._active=!1,e||t.value()==this._value||this.trigger("change",{value:t.value(),range:this._range}),this._rect=null,t.hide(),this.trigger("deactivate"))},enable:function(e){this.barInput.enable(e),this.cellInput.enable(e)},barElement:function(){return this.barInput.element},cellElement:function(){return this.cellInput.element},focus:function(e){e=e||"cell","cell"===e?(this.cellInput.element.focus(),this.cellInput.end()):this.barInput.element.focus()},isActive:function(){return this._active},isFiltered:function(){return this.barInput.popup.visible()||this.cellInput.popup.visible()},canInsertRef:function(e){var t=this.activeEditor();return t&&t.canInsertRef(e)},highlightedRefs:function(){var e=this.activeEditor(),t=[];return e&&(t=e.highlightedRefs()),t},scale:function(){this.cellInput.scale()},toggleTooltip:function(e){this.cellInput.toggleTooltip(t(this._rect,e))},value:function(e,t){return void 0===e?this.barInput.value():(null===e&&(e=""),this._value=e,this.barInput.value(e),this.cellInput.value(e),void this.barInput.element.toggleClass("k-spreadsheet-array-formula",!!t))},insertNewline:function(){this.activeEditor().insertNewline(),this.scale()},select:function(){this.activeEditor().select()}});e.spreadsheet.SheetEditor=n}}(kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/autofill.min",["spreadsheet/runtime.min","spreadsheet/range.min"],e)}(function(){"use strict";function e(e){var t,n,i,r,o,a=e.length,s=(a+1)/2,l=e.reduce(function(e,t){return e+t},0)/a,d=0,u=0;for(t=0;t<a;t++)n=t+1-s,i=e[t]-l,d+=n*i,u+=n*n;return u?(r=d/u,o=l-r*s,function(e){return o+r*(e+1)}):function(t){return e[t%e.length]}}function t(t){function r(e){var t,n=e[1]-e[0];for(t=2;t<e.length;++t)if(e[t]-e[t-1]!=n)return null;return n}function o(e){return e.map(function(e){return e.number})}var a=[],s=t.map(function(e){return e.formula||e.value});return i(s,function(t,n,i,l){var d,u,c,h,p;for("number"==i?(u=o(l),d=e(u)):"string"==i||"formula"==i||"boolean"==i?d=function(e,t){return s[t]}:Array.isArray(i)?1==l.length?d=function(e){return i[(l[0].number+e)%i.length]}:(c=r(o(l)),d=null==c?function(e){return l[e%l.length].value}:function(e){var t=l[0].number+c*e;return i[t%i.length]}):"null"!=i?(u=o(l),1==u.length&&u.push(u[0]+1),u=e(u),d=function(e,t){return s[t].replace(/^(.*\D)\d+/,"$1"+u(e,t))}):d=function(){return null},h={f:d,begin:t,end:n,len:n-t},p=t;p<n;++p)a[p]=h}),function(e,i){var r=a[i],o=e/s.length|0,l=e%s.length,d=o*r.len+l-r.begin,u=r.f(d,i),h=n(t[i]);return delete h.enable,u instanceof c?h.formula=u:h.value=u,h}}function n(e){var t={};return Object.keys(e||{}).forEach(function(n){t[n]=e[n]}),t}function i(e,t){var n,i,o=null,a=0,s=[];for(i=0;i<e.length;++i)n=r(e[i]),s.push(n),null!=o&&n.type!==o.type&&(t(a,i,o.type,s.slice(a,i)),a=i),o=n;t(a,i,o.type,s.slice(a,i))}function r(e){var t,n;if("number"==typeof e)return{type:"number",number:e};if("string"==typeof e)return(t=a(e))?t:(n=/^(.*\D)(\d+)/.exec(e),n?(e=e.replace(/^(.*\D)\d+/,"$1-######"),{type:e,match:n,number:parseFloat(n[2])}):{type:"string"});if("boolean"==typeof e)return{type:"boolean"};if(null==e)return{type:"null"};if(e instanceof c)return{type:"formula"};throw window.console.error(e),Error("Cannot fill data")}function o(){var e=kendo.culture();return[e.calendars.standard.days.namesAbbr,e.calendars.standard.days.names,e.calendars.standard.months.namesAbbr,e.calendars.standard.months.names]}function a(e){var t,n,i,r,a=e.toLowerCase(),s=o();for(t=0;t<s.length;++t)for(n=s[t],i=n.length;--i>=0;)if(r=n[i].toLowerCase(),r==a)return{type:n,number:i,value:e}}function s(e){var t,n,i=e.length,r=e[0].length,o=[];for(t=0;t<r;++t)for(o[t]=[],n=0;n<i;++n)o[t][n]=e[n][t];return o}var l,d,u,c,h,p,f;kendo.support.browser.msie&&kendo.support.browser.version<9||(l=kendo.spreadsheet,d=l.Range,u=l.calc.runtime,c=u.Formula,h="incompatibleRanges",p="noFillDirection",f=d.FillError=function(e){this.code=e},d.prototype._previewFillFrom=function(e,n){var i,r,o,a,l,d,u,c,m,g,v,_,b,k,w=this,y=w._sheet;if("string"==typeof e&&(e=y.range(e)),i=e._ref.toRangeRef().clone().setSheet(y.name()),r=w._ref.toRangeRef().clone().setSheet(y.name()),i.intersects(r)){if(i.eq(r))return null;if(r=r.clone(),i.topLeft.eq(r.topLeft))if(i.width()==r.width())r.topLeft.row+=i.height(),n=0;else{if(i.height()!=r.height())throw new f(h);r.topLeft.col+=i.width(),n=1}else{if(!i.bottomRight.eq(r.bottomRight))throw new f(h);if(i.width()==r.width())r.bottomRight.row-=i.height(),n=2;else{if(i.height()!=r.height())throw new f(h);r.bottomRight.col-=i.width(),n=3}}return y.range(r)._previewFillFrom(e,n)}if(null==n)if(i.topLeft.col==r.topLeft.col)n=i.topLeft.row<r.topLeft.row?0:2;else{if(i.topLeft.row!=r.topLeft.row)throw new f(p);n=i.topLeft.col<r.topLeft.col?1:3}if(o=1&n,a=2&n,o&&i.height()!=r.height()||!o&&i.width()!=r.width())throw new f(h);for(l=e._properties(),o?d=r.width():(l=s(l),d=r.height()),u=Array(l.length),c=0;c<l.length;++c)for(m=l[c],g=t(m),v=u[c]=Array(d),_=0;_<d;++_)b=a?-_-1:m.length+_,k=a?m.length-_%m.length-1:_%m.length,v[a?d-_-1:_]=g(b,k);return o||(u=s(u)),{props:u,direction:n,dest:w}},d.prototype.fillFrom=function(e,t){var n=this._previewFillFrom(e,t);return n.dest._properties(n.props),n.dest})},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/nameeditor.min",["kendo.core.min"],e)}(function(){!function(e){var t,n,i;e.support.browser.msie&&e.support.browser.version<9||(t=e.jQuery,n={input:"k-spreadsheet-name-editor",list:"k-spreadsheet-name-list"},i=e.ui.Widget.extend({init:function(i,r){var o,a,s;e.ui.Widget.call(this,i,r),i.addClass(n.input),o=r.messages.nameBox||"Name Box",a=new e.data.DataSource({transport:{read:function(t){var n=[];this._workbook.forEachName(function(t){!t.hidden&&t.value instanceof e.spreadsheet.Ref&&n.push({name:t.name})}),t.success(n)}.bind(this),cache:!1}}),s=t("<input />").attr("title",o).attr("aria-label",o),this.combo=s.appendTo(i).kendoComboBox({clearButton:!1,dataTextField:"name",dataValueField:"name",template:"#:data.name#<a class='k-button-delete' href='\\#'><span class='k-icon k-i-close'></span></a>",dataSource:a,autoBind:!1,ignoreCase:!0,change:this._on_listChange.bind(this),noDataTemplate:"<div></div>",open:function(){a.read()}}).getKendoComboBox(),this.combo.input.on("keydown",this._on_keyDown.bind(this)).on("focus",this._on_focus.bind(this)),this.combo.popup.element.addClass("k-spreadsheet-names-popup").on("mousemove",function(e){e.stopPropagation()}).on("click",".k-button-delete",function(e){e.preventDefault(),e.stopPropagation();var n=t(e.target).closest(".k-item");n=this.combo.dataItem(n),this._deleteItem(n.name)}.bind(this))},value:function(e){return void 0===e?this.combo.value():void this.combo.value(e)},_deleteItem:function(e){this.trigger("delete",{name:e})},_on_keyDown:function(e){switch(e.keyCode){case 27:this.combo.value(this._prevValue),this.trigger("cancel");break;case 13:this.trigger("enter")}},_on_focus:function(){this._prevValue=this.combo.value()},_on_listChange:function(){var e=this.combo.value();e&&this.trigger("select",{name:e})}}),e.spreadsheet.NameEditor=i)}(window.kendo)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("spreadsheet/print.min",["kendo.pdf.min","spreadsheet/sheet.min","spreadsheet/range.min","spreadsheet/references.min","spreadsheet/numformat.min","util/text-metrics.min"],e)}(function(){"use strict";function e(e,t,n,i,r){var o=0,a=[],s=t,l=0;return t&&n&&(n*=t),e.forEach(function(e,d){null!=i&&d<i&&(l+=e),t&&o+e>s&&(s-o<n&&(o=t*Math.ceil(o/t)+l,l>0&&r.push(o-l)),s+=t*Math.ceil(e/t)),a.push(o),o+=e}),a.push(o),a}function t(t,i,d){var u,c,h,p,f,m,g,v,b,k,w,y,x,C,T,S,D=t._grid;return i=D.normalize(i),u=[],c=[],h=[],p=t._getMergedCells(i),f=-1,m=-1,t.forEach(i,function(e,n,r){var o,s,l,g=e-i.topLeft.row,v=n-i.topLeft.col,b=t.rowHeight(e),k=t.columnWidth(n);v||c.push(b),g||h.push(k),!t.isHiddenColumn(n)&&!t.isHiddenRow(e)&&b&&k&&(o=d.forScreen||a(r),(d.emptyCells||o)&&(s=new _(e,n).print(),p.secondary[s]||(o?(f=Math.max(f,g),m=Math.max(m,v)):r.empty=!0,r.row=g,r.col=v,l=p.primary[s],l?(delete p.primary[s],r.merged=!0,r.rowspan=l.height(),r.colspan=l.width(),d.forScreen&&(r.width=t._columns.sum(l.topLeft.col,l.bottomRight.col),r.height=t._rows.sum(l.topLeft.row,l.bottomRight.row))):(r.rowspan=1,r.colspan=1),u.push(r))))}),c=c.slice(0,f+1),h=h.slice(0,m+1),g=d.pageWidth,v=d.pageHeight,b=d.scale||1,d.fitWidth&&(k=h.reduce(r,0),k>g&&(b=g/k)),g=Math.ceil(g/b),v=Math.ceil(v/b),w=[],y=e(c,v||0,d.maxEmpty,d.headerRows,w),x=e(h,g||0,d.maxEmpty),C=0,T=0,S=[],u=u.filter(function(e){return(!e.empty||!(e.row>f||e.col>m))&&(d.headerRows&&e.row<d.headerRows&&S.push(e),e.left=x[e.col],e.top=y[e.row],e.merged?d.forScreen?(e.right=e.left+e.width,e.bottom=e.top+e.height):(e.right=o(x,e.col+e.colspan),e.bottom=o(y,e.row+e.rowspan),e.width=e.right-e.left,e.height=e.bottom-e.top):(e.width=h[e.col],e.height=c[e.row],e.bottom=e.top+e.height,e.right=e.left+e.width),C=Math.max(C,e.right),T=Math.max(T,e.bottom),!0)}),Object.keys(p.primary).forEach(function(e){var n=p.primary[e];t.forEach(n.topLeft.toRangeRef(),function(e,r,o){var a=e-i.topLeft.row,s=r-i.topLeft.col;o.merged=!0,o.colspan=n.width(),o.rowspan=n.height(),o.top=a<0?-t._rows.sum(e,e-a-1):y[a],o.left=s<0?-t._columns.sum(r,r-s-1):x[s],o.height=t._rows.sum(n.topLeft.row,n.bottomRight.row),o.width=t._columns.sum(n.topLeft.col,n.bottomRight.col),o.height>0&&o.width>0&&(o.right=o.left+o.width,o.bottom=o.top+o.height,o.row=a,o.col=s,u.push(o))})}),d.headerRows&&(w.forEach(function(e){S.forEach(function(t){t=n(t),t.top+=e,t.bottom=t.top+t.height,u.push(t)}),y.push(e)}),y.sort(l)),{width:C,height:T,cells:u.sort(s),scale:b,xCoords:x,yCoords:y}}function n(e,t){return t||(t={}),Object.assign?Object.assign(t,e):Object.keys(e).reduce(function(t,n){return t[n]=e[n],t},t)}function i(e,t){return e.size===t.size&&e.color===t.color}function r(e,t){return e+t}function o(e,t){return t<e.length?e[t]:e[e.length-1]}function a(e){return null!=e.value||e.merged||null!=e.background||null!=e.borderRight||null!=e.borderBottom||null!=e.validation&&!e.validation.value}function s(e,t){return e.top<t.top?-1:e.top==t.top?e.left<t.left?-1:e.left==t.left?0:1:1}function l(e,t){return e<t?-1:e>t?1:0}function d(e,t,n,i){function r(r,o){var a,s,l,h,p,f,g=o*d,v=g+d,_=r*c,k=_+c,x=0,C=0,T=t.cells.filter(function(e){return!(e.right<=g||e.left>=v||e.bottom<=_||e.top>=k)&&(x=Math.max(e.bottom,x),C=Math.max(e.right,C),!0)});x=Math.min(x,k),C=Math.min(C,v),T.length>0&&(a=new b.Group,n.append(a),s=new b.Group,a.append(s),s.clip(b.Path.fromRect(new w.Rect([g-1,_-1],[C+1,x+1]))),l=w.Matrix.scale(t.scale,t.scale).multiplyCopy(w.Matrix.translate(-g,-_)),(i.hCenter||i.vCenter)&&(l=l.multiplyCopy(w.Matrix.translate(i.hCenter?(v-C)/2:0,i.vCenter?(k-x)/2:0))),s.transform(l),i.guidelines&&(h=null,t.xCoords.forEach(function(e){e=Math.min(e,C),e!==h&&e>=g&&e<=v&&(h=e,s.append((new b.Path).moveTo(e,_).lineTo(e,x).close().stroke(i.guideColor,y)))}),h=null,t.yCoords.forEach(function(e){e=Math.min(e,x),e!==h&&e>=_&&e<=k&&(h=e,s.append((new b.Path).moveTo(g,e).lineTo(C,e).close().stroke(i.guideColor,y)))})),p=m(),T.forEach(function(t){u(t,s,i),p.add(t,e)}),f=new b.Group,p.vert.forEach(function(e){e.forEach(function(e){
e.rendered||(e.rendered=!0,f.append((new b.Path).moveTo(e.x,e.top).lineTo(e.x,e.bottom).close().stroke(e.color,e.size)))})}),p.horiz.forEach(function(e){e.forEach(function(e){e.rendered||(e.rendered=!0,f.append((new b.Path).moveTo(e.left,e.y).lineTo(e.right,e.y).close().stroke(e.color,e.size)))})}),s.append(f))}var o,a,s=Math.ceil(t.width/i.pageWidth),l=Math.ceil(t.height/i.pageHeight),d=Math.ceil(i.pageWidth/t.scale),c=Math.ceil(i.pageHeight/t.scale);for(o=0;o<l;++o)for(a=0;a<s;++a)r(o,a)}function u(e,t,n){var i,r,o,a,s,l,d=new b.Group;if(t.append(d),i=new w.Rect([e.left,e.top],[e.width,e.height]),(e.background||e.merged)&&(r=i,n.guidelines&&(r=i.clone(),r.origin.x+=y/2+.1,r.origin.y+=y/2+.1,r.size.width-=y+.2,r.size.height-=y+.2),d.append(new b.Rect(r).fill(e.background||"#fff").stroke(null))),o=e.value,null!=o){if(a="number"==typeof o?"number":null,s=new b.Group,s.clip(b.Path.fromRect(i)),d.append(s),e.format?(l=k.textAndColor(o,e.format),o=l.text,l.type&&(a=l.type)):o+="",!e.textAlign)switch(a){case"number":case"date":case"percent":case"currency":e.textAlign="right";break;case"boolean":e.textAlign="center"}c(o,l&&l.color||e.color||"#000",e,s)}}function c(e,t,n,i){var r,o;switch(x||(x=document.createElement("div"),x.style.position="absolute",x.style.left="0px",x.style.top="0px",x.style.visibility="hidden",x.style.overflow="hidden",x.style.boxSizing="border-box",x.style.padding="2px 4px",x.style.lineHeight="normal",document.body.appendChild(x)),x.firstChild&&x.removeChild(x.firstChild),x.style.color=t,x.style.font=h(n),x.style.width=n.width+"px",x.style.textAlign=n.textAlign||"left",x.style.textDecoration=n.underline?"underline":"none",n.wrap?(x.style.whiteSpace="pre-wrap",x.style.overflowWrap=x.style.wordWrap="break-word"):(x.style.whiteSpace="pre",x.style.overflowWrap=x.style.wordWrap="normal"),x.appendChild(document.createTextNode(e)),r=0,n.verticalAlign){case"center":r=n.height-x.offsetHeight>>1;break;case void 0:case null:case"bottom":r=n.height-x.offsetHeight}r<0&&(r=0),o=kendo.drawing.drawDOM.drawText(x),o.transform(w.Matrix.translate(n.left,n.top+r)),i.append(o)}function h(e){var t=[];return e.italic&&t.push("italic"),e.bold&&t.push("bold"),t.push((e.fontSize||12)+"px"),t.push(e.fontFamily||"Arial"),t.join(" ")}function p(e,n,i,r){var o,a,s,l,u;null==i&&null==r&&(r=n,i={},n=v.SHEETREF),null==r&&(r=i,n instanceof v.Range||n instanceof v.Ref||"string"==typeof n?i={}:(i=n,n=v.SHEETREF)),i=kendo.jQuery.extend({paperSize:"A4",landscape:!0,margin:"1cm",guidelines:!0,guideColor:"#aaa",emptyCells:!0,fitWidth:!1,center:!1,headerRows:null,maxEmpty:.2,scale:1},i),o=new b.Group,a=kendo.pdf.getPaperOptions(i),o.options.set("pdf",{author:i.author,creator:i.creator,date:i.date,keywords:i.keywords,margin:a.margin,multiPage:!0,paperSize:a.paperSize,subject:i.subject,title:i.title}),s=a.paperSize[0],l=a.paperSize[1],a.margin&&(s-=a.margin.left+a.margin.right+1,l-=a.margin.top+a.margin.bottom+1),i.pageWidth=s,i.pageHeight=l,u=t(e,e._ref(n),i),d(e,u,o,i),r(o)}function f(){}function m(){function e(e,i){var r,o;i&&(r=i._properties,o=i._grid,e.borderLeft=r.get("vBorders",o.index(e.row,e.col)),e.borderRight=r.get("vBorders",o.index(e.row,e.col+e.colspan)),e.borderTop=r.get("hBorders",o.index(e.row,e.col)),e.borderBottom=r.get("hBorders",o.index(e.row+e.rowspan,e.col))),e.borderLeft&&t(e.row,e.col,e.borderLeft,e.left,e.top,e.bottom),e.borderRight&&t(e.row,e.col+e.colspan,e.borderRight,e.right,e.top,e.bottom),e.borderTop&&n(e.row,e.col,e.borderTop,e.top,e.left,e.right),e.borderBottom&&n(e.row+e.rowspan,e.col,e.borderBottom,e.bottom,e.left,e.right)}function t(e,t,n,r,a,s){var l=o[t]||(o[t]=new f),d=e>0&&l[e-1];d&&i(d,n)?(l[e]=d,d.bottom=s):l[e]={size:n.size,color:n.color,x:r,top:a,bottom:s}}function n(e,t,n,o,a,s){var l=r[e]||(r[e]=new f),d=t>0&&l[t-1];d&&i(d,n)?(l[t]=d,d.right=s):l[t]={size:n.size,color:n.color,y:o,left:a,right:s}}var r=new f,o=new f;return{add:e,horiz:r,vert:o}}function g(e){function t(e){var t,n;if(null!=e){for(t=12,n=e.length;--n>=0;)t+=r(e.charAt(n));return t}return 0}function i(e){return o?n(e,{borderLeft:o,borderTop:o,borderRight:o,borderBottom:o}):e}var r,o,a=new $.Deferred,s=a.promise();return e=n(e,{dataSource:null,guidelines:!0,guideColor:"#000",columns:null,headerBackground:"#999",headerColor:"#000",oddBackground:null,evenBackground:null,fontFamily:"Arial",fontSize:12,paperSize:"A4",margin:"1cm",landscape:!0,fitWidth:!1,scale:1,rowHeight:20,maxEmpty:.2}),kendo.drawing.pdf.defineFont(kendo.drawing.drawDOM.getFontFaces(document)),r=T(e.fontFamily,e.fontSize),o=e.guidelines?{size:1,color:e.guideColor}:null,e.dataSource.fetch(function(){var n,r,o,s,l,d=e.dataSource.data();return d.length?(n=e.columns,r=n.map(function(e){return e.title||e.field}),o=r.map(t),s=d.map(function(r,a){return{cells:n.map(function(n,s){var l=r[n.field];return o[s]=Math.max(t(l),o[s]),i({value:l,background:a%2?e.evenBackground:e.oddBackground})})}}),s.unshift({cells:r.map(function(t){return i({value:t,background:e.headerBackground,color:e.headerColor})})}),l=new kendo.spreadsheet.Sheet(s.length+1,n.length+1,e.rowHeight,50,20,20,{fontFamily:e.fontFamily,fontSize:e.fontSize,verticalAlign:"center"}),l.fromJSON({name:"Sheet1",rows:s,columns:o.map(function(e,t){return{index:t,width:e}})}),void l.draw({paperSize:e.paperSize,landscape:e.landscape,margin:e.margin,guidelines:!1,scale:e.scale,fitWidth:e.fitWidth,maxEmpty:e.maxEmpty,headerRows:1},a.resolve.bind(a))):a.reject("Empty dataset")}),s}var v,_,b,k,w,y,x,C,T;kendo.support.browser.msie&&kendo.support.browser.version<9||(v=kendo.spreadsheet,_=v.CellRef,b=kendo.drawing,k=v.formatting,w=kendo.geometry,y=.8,v.Sheet.prototype.draw=function(e,t,n){var i=this;i._workbook?i.recalc(i._workbook._context,function(){p(i,e,t,n)}):p(i,e,t,n)},f.prototype={forEach:function(e){Object.keys(this).forEach(function(t){e(this[t],t,this)},this)}},C={},T=function(e,t){var n,i,r,o,a=t+":"+e,s=C[a];if(!s){for(i=document.createElement("div"),i.style.position="fixed",i.style.left="-10000px",i.style.top="-10000px",i.style.fontFamily=e,i.style.fontSize=t+"px",i.style.whiteSpace="pre",r=32;r<128;++r)n=document.createElement("span"),n.appendChild(document.createTextNode(String.fromCharCode(r))),i.appendChild(n);for(document.body.appendChild(i),o={},r=32,n=i.firstChild;r<128&&n;++r,n=n.nextSibling)o[r]=n.offsetWidth;for(;n=i.firstChild;)i.removeChild(n);s=C[a]=function(e){var t=e.charCodeAt(0),r=o[t];return null==r&&(n=document.createElement("span"),n.appendChild(document.createTextNode(String.fromCharCode(t))),i.appendChild(n),r=o[t]=n.offsetWidth,i.removeChild(n)),r}}return s},v.draw={Borders:m,doLayout:t},v.drawTabularData=g)},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.spreadsheet.min",["util/undoredostack.min","util/text-metrics.min","util/parse-xml.min","kendo.excel.min","kendo.progressbar.min","kendo.pdf.min","spreadsheet/commands.min","spreadsheet/formulabar.min","spreadsheet/formulainput.min","spreadsheet/eventlistener.min","spreadsheet/rangelist.min","spreadsheet/propertybag.min","spreadsheet/references.min","spreadsheet/navigator.min","spreadsheet/axismanager.min","spreadsheet/clipboard.min","spreadsheet/range.min","spreadsheet/sheet.min","spreadsheet/sheetsbar.min","spreadsheet/excel-reader.min","spreadsheet/workbook.min","spreadsheet/formulacontext.min","spreadsheet/controller.min","spreadsheet/view.min","spreadsheet/customeditors.min","spreadsheet/grid.min","spreadsheet/axis.min","spreadsheet/filter.min","spreadsheet/sorter.min","spreadsheet/runtime.min","spreadsheet/calc.min","spreadsheet/numformat.min","spreadsheet/runtime.functions.min","spreadsheet/runtime.functions.2.min","spreadsheet/toolbar.min","spreadsheet/dialogs.min","spreadsheet/sheetbinder.min","spreadsheet/filtermenu.min","spreadsheet/editor.min","spreadsheet/autofill.min","spreadsheet/nameeditor.min","spreadsheet/print.min"],e)}(function(){return function(e,t){var n,i,r,o,a,s,l,d,u,c;e.support.browser.msie&&e.support.browser.version<9||(n=e.jQuery,i=n.extend({F10:121,F11:122,B:66,I:73,U:85,N:78,H:72,A:65,PAGEDOWN:34,PAGEUP:33,DELETE:46,R:82},e.keys),r=e.ui.Widget,o=e.spreadsheet.Workbook,a=e.spreadsheet.Controller,s=e.spreadsheet.View,l=".kendoSpreadsheet",d={recalc:!0,selection:!0,activeCell:!0,layout:!0,sheetSelection:!0,resize:!0,editorChange:!1,editorClose:!1},u={wrapper:"k-widget k-spreadsheet"},c=e.ui.Widget.extend({init:function(e,t){r.fn.init.call(this,e,t),this.element.addClass(c.classNames.wrapper),this._view=new s(this.element,{messages:this.options.messages.view,toolbar:this.options.toolbar,sheetsbar:this.options.sheetsbar}),this._workbook=new o(this.options,this._view),this._controller=new a(this._view,this._workbook),this._autoRefresh=!0,this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._view.enableClipboard(!1),this.refresh(),this._view.enableClipboard(!0),this._resizeHandler=function(){this.resize()}.bind(this),n(window).on("resize"+l,this._resizeHandler),this.element.on("keydown"+l,this._keyDown.bind(this))},_keyDown:function(e){var r,o=e.keyCode,a=n(".k-spreadsheet-quick-access-toolbar [title=Redo]");if(o===i.F11&&e.shiftKey)return this._view.sheetsbar._onAddSelect(),e.preventDefault(),t;if(e.altKey&&o===i.PAGEDOWN)this._view.sheetsbar.trigger("select",{name:this._view.sheetsbar._sheets[this._view.sheetsbar._selectedIndex+1].name(),isAddButton:!1});else if(e.altKey&&o===i.PAGEUP)this._view.sheetsbar.trigger("select",{name:this._view.sheetsbar._sheets[this._view.sheetsbar._selectedIndex-1].name(),isAddButton:!1});else{if(e.altKey&&o===i.DELETE)return r=function(e){var t=e.sender;t.isConfirmed()&&this._view.sheetsbar.trigger("remove",{name:this.activeSheet()._name(),confirmation:!0})}.bind(this),this._view.sheetsbar._openDialog("confirmation",{close:r}),e.preventDefault(),t;if(e.altKey&&o===i.R)return this._view.sheetsbar._createEditor(),e.preventDefault(),t;if(o===i.F10&&this._view.tabstrip||o===i.TAB&&!e.shiftKey&&n(document.activeElement).is(a))return this._view.tabstrip.toolbars[this._view.tabstrip.element.find("li.k-state-active").text().toLowerCase()].element.find(":not(.k-overflow-anchor):kendoFocusable:first").focus(),this._view.tabstrip.toolbars[this._view.tabstrip.element.find("li.k-state-active").text().toLowerCase()].element.find(".k-toolbar-first-visible").addClass("k-state-focused"),e.preventDefault(),t;if(e.ctrlKey&&o===i.B)n("[data-tool=bold]")[0].click();else if(e.ctrlKey&&o===i.I)n("[data-tool=italic]")[0].click();else if(e.ctrlKey&&o===i.U)n("[data-tool=underline]")[0].click();else{if(e.altKey&&o===i.H)return this._view.tabstrip.select(0),e.preventDefault(),t;if(e.altKey&&o===i.N)return this._view.tabstrip.select(1),e.preventDefault(),t;if(e.altKey&&o===i.A)return this._view.tabstrip.select(2),e.preventDefault(),t}}},_resize:function(){this.refresh({layout:!0})},_workbookChange:function(t){if(this._autoRefresh&&this.refresh(t),t.recalc&&t.ref){var n=t.range||new e.spreadsheet.Range(t.ref,this.activeSheet());this.trigger("change",{range:n})}},_workbookCut:function(e){this.trigger("cut",e)},_workbookCopy:function(e){this.trigger("copy",e)},_workbookPaste:function(e){this.trigger("paste",e)},activeSheet:function(e){return this._workbook.activeSheet(e)},moveSheetToIndex:function(e,t){return this._workbook.moveSheetToIndex(e,t)},insertSheet:function(e){return this._workbook.insertSheet(e)},sheets:function(){return this._workbook.sheets()},removeSheet:function(e){return this._workbook.removeSheet(e)},sheetByName:function(e){return this._workbook.sheetByName(e)},sheetIndex:function(e){return this._workbook.sheetIndex(e)},sheetByIndex:function(e){return this._workbook.sheetByIndex(e)},renameSheet:function(e,t){return this._workbook.renameSheet(e,t)},refresh:function(e){return e||(e=d),e.editorClose||(this._view.sheet(this._workbook.activeSheet()),this._controller.sheet(this._workbook.activeSheet()),this._workbook.refresh(e)),e.editorChange||(this._view.refresh(e),this._controller.refresh(),this._view.render(),this.trigger("render")),this},openDialog:function(e,t){return this._view.openDialog(e,t)},autoRefresh:function(e){return e!==t?(this._autoRefresh=e,e===!0&&this.refresh(),this):this._autoRefresh},toJSON:function(){return this._workbook.toJSON()},fromJSON:function(e){e.sheets?(this._workbook.destroy(),this._workbook=new o(n.extend({},this.options,e)),this._bindWorkbookEvents(),this._view.workbook(this._workbook),this._controller.workbook(this._workbook),this.activeSheet(this.activeSheet())):this.refresh()},fromFile:function(e,t){return this._workbook.fromFile(e,t)},saveAsPDF:function(e){this._workbook.saveAsPDF(n.extend({},this.options.pdf,e,{workbook:this._workbook}))},saveAsExcel:function(e){this._workbook.saveAsExcel(e)},draw:function(e,t){this._workbook.draw(e,t)},_workbookExcelExport:function(e){this.trigger("excelExport",e)&&e.preventDefault()},_workbookExcelImport:function(e){this.trigger("excelImport",e)?e.preventDefault():this._initProgress(e.promise)},_initProgress:function(t){var i=n("<div class='k-loading-mask' style='width: 100%; height: 100%; top: 0;'><div class='k-loading-color'/></div>").appendTo(this.element),r=n("<div class='k-loading-progress'>").appendTo(i).kendoProgressBar({type:"chunk",chunkCount:10,min:0,max:1,value:0}).data("kendoProgressBar");t.progress(function(e){r.value(e.progress)}).always(function(){e.destroy(i),i.remove()})},_workbookPdfExport:function(e){this.trigger("pdfExport",e)&&e.preventDefault()},_workbookInsertSheet:function(e){this.trigger("insertSheet",e)&&e.preventDefault()},_workbookRemoveSheet:function(e){this.trigger("removeSheet",e)&&e.preventDefault()},_workbookSelectSheet:function(e){this.trigger("selectSheet",e)&&e.preventDefault()},_workbookRenameSheet:function(e){this.trigger("renameSheet",e)&&e.preventDefault()},_workbookInsertRow:function(e){this.trigger("insertRow",e)&&e.preventDefault()},_workbookInsertColumn:function(e){this.trigger("insertColumn",e)&&e.preventDefault()},_workbookDeleteRow:function(e){this.trigger("deleteRow",e)&&e.preventDefault()},_workbookDeleteColumn:function(e){this.trigger("deleteColumn",e)&&e.preventDefault()},_workbookHideRow:function(e){this.trigger("hideRow",e)&&e.preventDefault()},_workbookHideColumn:function(e){this.trigger("hideColumn",e)&&e.preventDefault()},_workbookUnhideRow:function(e){this.trigger("unhideRow",e)&&e.preventDefault()},_workbookUnhideColumn:function(e){this.trigger("unhideColumn",e)&&e.preventDefault()},_workbookSelect:function(e){this.trigger("select",e)},_workbookChangeFormat:function(e){this.trigger("changeFormat",e)},_bindWorkbookEvents:function(){this._workbook.bind("cut",this._workbookCut.bind(this)),this._workbook.bind("copy",this._workbookCopy.bind(this)),this._workbook.bind("paste",this._workbookPaste.bind(this)),this._workbook.bind("change",this._workbookChange.bind(this)),this._workbook.bind("excelExport",this._workbookExcelExport.bind(this)),this._workbook.bind("excelImport",this._workbookExcelImport.bind(this)),this._workbook.bind("pdfExport",this._workbookPdfExport.bind(this)),this._workbook.bind("insertSheet",this._workbookInsertSheet.bind(this)),this._workbook.bind("removeSheet",this._workbookRemoveSheet.bind(this)),this._workbook.bind("selectSheet",this._workbookSelectSheet.bind(this)),this._workbook.bind("renameSheet",this._workbookRenameSheet.bind(this)),this._workbook.bind("insertRow",this._workbookInsertRow.bind(this)),this._workbook.bind("insertColumn",this._workbookInsertColumn.bind(this)),this._workbook.bind("deleteRow",this._workbookDeleteRow.bind(this)),this._workbook.bind("deleteColumn",this._workbookDeleteColumn.bind(this)),this._workbook.bind("hideRow",this._workbookHideRow.bind(this)),this._workbook.bind("hideColumn",this._workbookHideColumn.bind(this)),this._workbook.bind("unhideRow",this._workbookUnhideRow.bind(this)),this._workbook.bind("unhideColumn",this._workbookUnhideColumn.bind(this)),this._workbook.bind("select",this._workbookSelect.bind(this)),this._workbook.bind("changeFormat",this._workbookChangeFormat.bind(this))},destroy:function(){e.ui.Widget.fn.destroy.call(this),this._workbook.destroy(),this._controller.destroy(),this._view.destroy(),this._resizeHandler&&n(window).off("resize"+l,this._resizeHandler)},options:{name:"Spreadsheet",toolbar:!0,sheetsbar:!0,rows:200,columns:50,rowHeight:20,columnWidth:64,headerHeight:20,headerWidth:32,excel:{proxyURL:"",fileName:"Workbook.xlsx"},messages:{},pdf:{area:"workbook",fileName:"Workbook.pdf",proxyURL:"",paperSize:"a4",landscape:!0,margin:null,title:null,author:null,subject:null,keywords:null,creator:"Kendo UI PDF Generator v."+e.version,date:null},defaultCellStyle:{fontFamily:"Arial",fontSize:"12"}},defineName:function(e,t,n){return this._workbook.defineName(e,t,n)},undefineName:function(e){return this._workbook.undefineName(e)},nameValue:function(e){return this._workbook.nameValue(e)},forEachName:function(e){return this._workbook.forEachName(e)},cellContextMenu:function(){return this._view.cellContextMenu},rowHeaderContextMenu:function(){return this._view.rowHeaderContextMenu},colHeaderContextMenu:function(){return this._view.colHeaderContextMenu},events:["cut","copy","paste","pdfExport","excelExport","excelImport","change","render","removeSheet","selectSheet","renameSheet","insertRow","insertColumn","deleteRow","insertSheet","deleteColumn","hideRow","hideColumn","unhideRow","unhideColumn","select","changeFormat"]}),e.spreadsheet.ALL_REASONS=d,e.ui.plugin(c),n.extend(!0,c,{classNames:u}))}(window.kendo),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.pivot.configurator.min",["kendo.dom.min"],e)}(function(){return function(e,t){function n(e){for(var t,n=0,i=e.length;n<i;n++)if(2==e[n].type){t=!0;break}t&&e.splice(n+1,0,{caption:"KPIs",defaultHierarchy:"[KPIs]",name:"KPIs",uniqueName:"[KPIs]"})}function i(e){return{name:e.uniqueName,type:e.type}}function r(e){for(var t=0,n=e.length;t<n;t++)e[t].uniqueName=e[t].name,e[t].type="kpi";return e}function o(t){var n=e(t).closest(".k-pivot-setting");return n.length?n.data("kendoPivotSettingTarget"):null}function a(e,t,n){return{hierarchyUniqueName:e,uniqueName:t,caption:t,measure:t,name:t,type:n,kpi:!0}}function s(e){var t=e.name;return[a(t,e.value,"value"),a(t,e.goal,"goal"),a(t,e.status,"status"),a(t,e.trend,"trend")]}var l=window.kendo,d=l.ui,u=d.Widget,c=".kendoPivotConfigurator",h="mouseenter"+c+" mouseleave"+c,p=l.template('<p class="k-reset"><span class="k-icon #=icon#"></span>${name}</p><div class="k-list-container k-reset"/>'),f=u.extend({init:function(e,t){u.fn.init.call(this,e,t),this.element.addClass("k-widget k-fieldselector k-alt k-edit-form-container"),this._dataSource(),this._layout(),this.refresh(),l.notify(this)},events:[],options:{name:"PivotConfigurator",filterable:!1,sortable:!1,messages:{measures:"Drop Data Fields Here",columns:"Drop Column Fields Here",rows:"Drop Rows Fields Here",measuresLabel:"Measures",columnsLabel:"Columns",rowsLabel:"Rows",fieldsLabel:"Fields"}},_dataSource:function(){var t=this;t.dataSource&&t._refreshHandler?t.dataSource.unbind("change",t._refreshHandler).unbind("error",t._errorHandler).unbind("progress",t._progressHandler):(t._errorHandler=e.proxy(t._error,t),t._refreshHandler=e.proxy(t.refresh,t),t._progressHandler=e.proxy(t._requestStart,t)),t.dataSource=l.data.PivotDataSource.create(t.options.dataSource),t.dataSource.bind("change",t._refreshHandler).bind("error",t._errorHandler).bind("progress",t._progressHandler)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.measures&&this.measures.setDataSource(e),this.rows&&this.rows.setDataSource(e),this.columns&&this.columns.setDataSource(e),this.refresh()},_treeViewDataSource:function(){var t=this;return l.data.HierarchicalDataSource.create({schema:{model:{id:"uniqueName",hasChildren:function(e){return!("hierarchyUniqueName"in e||"aggregator"in e)}}},transport:{read:function(i){var o,a,l;e.isEmptyObject(i.data)?(o=t.dataSource.schemaDimensions(),o.done(function(e){t.dataSource.cubeBuilder||n(e),i.success(e)}).fail(i.error)):(a=t.treeView.dataSource.get(i.data.uniqueName),"[KPIs]"===a.uniqueName?(l=!0,o=t.dataSource.schemaKPIs(),o.done(function(e){i.success(r(e))}).fail(i.error)):"kpi"==a.type&&(l=!0,i.success(s(a))),l||(o=2==a.type?t.dataSource.schemaMeasures():a.dimensionUniqueName?t.dataSource.schemaLevels(i.data.uniqueName):t.dataSource.schemaHierarchies(i.data.uniqueName),o.done(i.success).fail(i.error)))}}})},_progress:function(e){l.ui.progress(this.element,e)},_error:function(){this._progress(!1)},_requestStart:function(){this._progress(!0)},_layout:function(){this.form=e('<div class="k-columns k-state-default k-floatwrap"/>').appendTo(this.element),this._fields(),this._targets()},_fields:function(){var t=e('<div class="k-state-default"><p class="k-reset"><span class="k-icon k-i-group"></span>'+this.options.messages.fieldsLabel+"</p></div>").appendTo(this.form),n='# if (item.type == 2 || item.uniqueName == "[KPIs]") { #<span class="k-icon k-i-#= (item.type == 2 ? "sum" : "kpi") #"></span># } else if (item.type && item.type !== "kpi") { #<span class="k-icon k-i-arrows-dimensions"></span># } ##: item.caption || item.name #';this.treeView=e("<div/>").appendTo(t).kendoTreeView({template:n,dataTextField:"caption",dragAndDrop:!0,autoBind:!1,dataSource:this._treeViewDataSource(),dragstart:function(e){var t=this.dataItem(e.sourceNode);(t.hasChildren||t.aggregator||t.measure)&&2!=t.type&&"[KPIs]"!==t.uniqueName||e.preventDefault()},drag:function(e){var t="k-i-cancel",n=o(e.dropTarget);n&&n.validate(this.dataItem(e.sourceNode))&&(t="k-i-plus"),e.setStatusClass(t)},drop:function(e){var t,n,r,a,l,d;if(e.preventDefault(),t=o(e.dropTarget),n=this.dataItem(e.sourceNode),t&&t.validate(n)){if(d=n.defaultHierarchy||n.uniqueName,"kpi"===n.type)for(l=s(n),a=l.length,d=[],r=0;r<a;r++)d.push(i(l[r]));else n.kpi&&(d=[i(n)]);t.add(d)}}}).data("kendoTreeView")},_createTarget:function(t,n){var i='<li class="k-item k-header" data-'+l.ns+'name="${data.name}">${data.name}',r=n.sortable,o="";return r&&(o+="#if (data.sortIcon) {#",o+='<span class="k-icon ${data.sortIcon}-sm"></span>',o+="#}#"),(n.filterable||r)&&(o+='<span class="k-icon k-i-more-vertical k-setting-fieldmenu"></span>'),o+='<span class="k-icon k-i-close k-setting-delete"></span>',i+='<span class="k-field-actions">'+o+"</span></li>",new l.ui.PivotSettingTarget(t,e.extend({dataSource:this.dataSource,hint:function(t){var n=e('<div class="k-fieldselector"><ul class="k-list k-reset"></ul></div>');return n.find(".k-list").append(t.clone()),n},template:i,emptyTemplate:'<li class="k-item k-empty">${data}</li>'},n))},_targets:function(){var t=e('<div class="k-state-default"/>').appendTo(this.form),n=e(p({name:this.options.messages.columnsLabel,icon:"k-i-columns"})).appendTo(t),i=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(n.last()),r=e(p({name:this.options.messages.rowsLabel,icon:"k-i-rows"})).appendTo(t),o=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(r.last()),a=e(p({name:this.options.messages.measuresLabel,icon:"k-i-sum"})).appendTo(t),s=e('<ul class="k-pivot-configurator-settings k-list k-reset" />').appendTo(a.last()),l=this.options;this.columns=this._createTarget(i,{filterable:l.filterable,sortable:l.sortable,connectWith:o,messages:{empty:l.messages.columns,fieldMenu:l.messages.fieldMenu}}),this.rows=this._createTarget(o,{filterable:l.filterable,sortable:l.sortable,setting:"rows",connectWith:i,messages:{empty:this.options.messages.rows,fieldMenu:this.options.messages.fieldMenu}}),this.measures=this._createTarget(s,{setting:"measures",messages:{empty:l.messages.measures}}),i.add(o).add(s).on(h,".k-item:not(.k-empty)",this._toggleHover)},_toggleHover:function(t){e(t.currentTarget).toggleClass("k-state-hover","mouseenter"===t.type)},_resize:function(){var e,t,n=this.element,i=this.options.height,r=l._outerHeight;i&&(n.height(i),n.is(":visible")&&(t=n.children(".k-columns").children("div.k-state-default"),i=n.innerHeight(),e=(r(n)-i)/2,i=i-(r(t,!0)-t.height())-e,t.height(i)))},refresh:function(){var e=this.dataSource;(e.cubeBuilder||this._cube!==e.cube()||this._catalog!==e.catalog())&&this.treeView.dataSource.fetch(),this._catalog=this.dataSource.catalog(),this._cube=this.dataSource.cube(),this._resize(),this._progress(!1)},destroy:function(){u.fn.destroy.call(this),this.dataSource.unbind("change",this._refreshHandler),this.form.find(".k-list").off(c),this.rows.destroy(),this.columns.destroy(),this.measures.destroy(),this.treeView.destroy(),this.element=null,this._refreshHandler=null}});d.plugin(f)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.angular.min",["kendo.core.min"],e)}(function(){return function(e,t,n){"use strict";function i(e){var t=S;try{return S=function(e){return e()},e()}finally{S=t}}function r(t,i,r,d,u,g){function v(){var n,g,v,_,b,x,T;return r.kRebind&&(n=e(e(i)[0].cloneNode(!0))),C=o(t,i,r,d,y).options,i.is("select")&&!function(t){var n,i;if(t.length>0)for(n=e(t[0]),!/\S/.test(n.text())&&/^\?/.test(n.val())&&n.remove(),i=0;i<t.length;i++)e(t[i]).off("$destroy")}(i[0].options),g=y.call(i,E=C).data(d),l(g,t,r,d,u),t.$emit("kendoWidgetCreated",g),v=p(t,g),r.kRebind&&m(g,t,i,n,r.kRebind,v,r),r.kNgDisabled&&(_=r.kNgDisabled,b=t.$eval(_),b&&g.enable(!b),a(g,t,i,_)),r.kNgReadonly&&(x=r.kNgReadonly,T=t.$eval(x),T&&g.readonly(T),s(g,t,i,x)),r.kNgModel&&h(g,t,r.kNgModel),k&&c(g,t,i,k,w),g&&f(g,i),g}var _,b,k,w,y,x,C,T,D,F,A,I,R,M;if(!(i instanceof jQuery))throw Error("The Kendo UI directives require jQuery to be available before AngularJS. Please include jquery before angular in the document.");if(_=r.kNgDelay,b=t.$eval(_),g=g||[],k=g[0],w=g[1],y=e(i)[d],!y)return window.console.error("Could not find: "+d),null;if(x=o(t,i,r,d,y),C=x.options,x.unresolved.length){for(T=[],D=0,F=x.unresolved.length;D<F;D++)A=x.unresolved[D],I=e.Deferred(function(e){var i=t.$watch(A.path,function(t){t!==n&&(i(),e.resolve())})}).promise(),T.push(I);return e.when.apply(null,T).then(v),n}return _&&!b?(R=t.$root||t,M=function(){var e=t.$watch(_,function(t){t!==n&&(e(),i.removeAttr(r.$attr.kNgDelay),_=null,S(v))})},/^\$(digest|apply)$/.test(R.$$phase)?M():t.$apply(M),n):v()}function o(i,r,o,a,s){function l(e,r){var o=t.copy(i.$eval(r));o===n?f.push({option:e,path:r}):d[e]=o}var d,u,c,h,p=a.replace(/^kendo/,""),f=[],m=o.kOptions||o.options,g=i.$eval(m);return m&&g===n&&f.push({option:"options",path:m}),d=t.extend({},o.defaultOptions,g),u=s.widget.prototype.options,c=s.widget.prototype.events,e.each(o,function(e,t){var n,i,r,o;"source"!==e&&"kDataSource"!==e&&"kScopeField"!==e&&"scopeField"!==e&&(n="data"+e.charAt(0).toUpperCase()+e.slice(1),0===e.indexOf("on")&&(i=e.replace(/^on./,function(e){return e.charAt(2).toLowerCase()}),c.indexOf(i)>-1&&(d[i]=t)),u.hasOwnProperty(n)?l(n,t):u.hasOwnProperty(e)&&!R[e]?l(e,t):I[e]||(r=e.match(/^k(On)?([A-Z].*)/),r&&(o=r[2].charAt(0).toLowerCase()+r[2].slice(1),r[1]&&"kOnLabel"!=e?d[o]=t:("kOnLabel"==e&&(o="onLabel"),l(o,t)))))}),h=o.kDataSource||o.source,h&&(d.dataSource=A(i,r,p,h)),d.$angular=[i],{options:d,unresolved:f}}function a(e,t,i,r){return kendo.ui.PanelBar&&e instanceof kendo.ui.PanelBar||kendo.ui.Menu&&e instanceof kendo.ui.Menu?(F.warn("k-ng-disabled specified on a widget that does not have the enable() method: "+e.options.name),n):(t.$watch(r,function(t,n){t!=n&&e.enable(!t)}),n)}function s(e,t,i,r){return"function"!=typeof e.readonly?(F.warn("k-ng-readonly specified on a widget that does not have the readonly() method: "+e.options.name),n):(t.$watch(r,function(t,n){t!=n&&e.readonly(t)}),n)}function l(e,t,n,i,r){if(n[r]){var o=T(n[r]).assign;if(!o)throw Error(r+" attribute used but expression in it is not assignable: "+n[i]);o(t,e)}}function d(e){return/checkbox|radio/i.test(e.attr("type"))?e.prop("checked"):e.val()}function u(e){return M.test(e[0].tagName)}function c(e,t,i,r,o){var a,s,l,c,h;e.value&&(s=!1,a=u(i)?function(){return d(i)}:function(){return e.value()},l=function(){var i=r.$viewValue;i===n&&(i=r.$modelValue),i===n&&(i=null),s=!0,setTimeout(function(){if(s=!1,e){var n=t[e.element.attr("k-ng-model")];n&&(i=n),e.options.autoBind!==!1||e.listView.bound()?e.value(i):i&&e.value(i)}},0)},r.$render=l,setTimeout(function(){r.$render!==l&&(r.$render=l)()}),u(i)&&i.on("change",function(){s=!0}),c=function(e){return function(){var n;s&&!i.is("select")||(e&&o&&(n=o.$pristine),r.$setViewValue(a()),e&&(r.$setPristine(),n&&o.$setPristine()),k(t))}},e.first("change",c(!1)),e.first("spin",c(!1)),kendo.ui.AutoComplete&&e instanceof kendo.ui.AutoComplete||e.first("dataBound",c(!0)),h=a(),isNaN(r.$viewValue)||h==r.$viewValue||(r.$isEmpty(r.$viewValue)?null!=h&&""!==h&&h!=r.$viewValue&&r.$setViewValue(h):e.value(r.$viewValue)),r.$setPristine())}function h(t,i,r){var o,a,s,l,d,u,c,h,p,f;return"function"!=typeof t.value?(F.warn("k-ng-model specified on a widget that does not have the value() method: "+t.options.name),n):(o=e(t.element).parents("form"),a=kendo.getter(o.attr("name"),!0)(i),s=T(r),l=s.assign,d=!1,u=kendo.ui.MultiSelect&&t instanceof kendo.ui.MultiSelect,c=function(e){return e&&u?e.length:0},h=c(s(i)),t.$angular_setLogicValue(s(i)),p=function(e,i){e===n&&(e=null),d||e==i&&c(e)==h||(h=c(e),t.$angular_setLogicValue(e))},u?i.$watchCollection(r,p):i.$watch(r,p),f=function(){d=!0,a&&a.$pristine&&a.$setDirty(),k(i,function(){l(i,t.$angular_getLogicValue()),h=c(s(i))}),d=!1},t.first("change",f),t.first("spin",f),n)}function p(e,t){var n=e.$on("$destroy",function(){n(),t&&(kendo.destroy(t.element),t=null)});return n}function f(t,n){function i(){a.disconnect()}function r(){a.observe(e(n)[0],{attributes:!0})}var o,a;window.MutationObserver&&t.wrapper&&(o=[].slice.call(e(n)[0].classList),a=new MutationObserver(function(n){i(),t&&(n.forEach(function(n){var i,r=e(t.wrapper)[0];switch(n.attributeName){case"class":i=[].slice.call(n.target.classList),i.forEach(function(e){o.indexOf(e)<0&&(r.classList.add(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.add(e))}),o.forEach(function(e){i.indexOf(e)<0&&(r.classList.remove(e),kendo.ui.ComboBox&&t instanceof kendo.ui.ComboBox&&t.input[0].classList.remove(e))}),o=i;break;case"disabled":"function"!=typeof t.enable||t.element.attr("readonly")||t.enable(!e(n.target).attr("disabled"));break;case"readonly":"function"!=typeof t.readonly||t.element.attr("disabled")||t.readonly(!!e(n.target).attr("readonly"))}}),r())}),r(),t.first("destroy",i))}function m(t,n,i,r,o,a,s){var l=n.$watch(o,function(o,d){var u,c,h,p,f;t._muteRebind||o===d||(l(),s._cleanUp&&s._cleanUp(),u=P[t.options.name],u&&u.forEach(function(t){var i=n.$eval(s["k"+t]);i&&r.append(e(i).attr(kendo.toHyphens("k"+t),""))}),c=e(t.wrapper)[0],h=e(t.element)[0],p="Upload"===t.options.name,p&&(i=e(h)),f=i.injector().get("$compile"),t._destroy(),a&&a(),t=null,h&&(c&&c.parentNode.replaceChild(h,c),e(i).replaceWith(r)),f(r)(n))},!0);k(n)}function g(e,t){return function(n,i){return e.call(t,n,i)}}function v(e,t){this[e]=kendo.stringify(t)}function _(e,n){function i(e,t){x.directive(e,["directiveFactory",function(n){return n.create(t,e)}])}var r,o,a,s,l=n?"Mobile":"";l+=e.fn.options.name,r=l,o="kendo"+l.charAt(0)+l.substr(1).toLowerCase(),l="kendo"+l,a=l.replace(/([A-Z])/g,"-$1"),H.indexOf(l.replace("kendo",""))==-1&&(s=l===o?[l]:[l,o],t.forEach(s,function(e){x.directive(e,function(){return{restrict:"E",replace:!0,template:function(e,t){var n=z[r]||"div",i=t.kScopeField||t.scopeField;return"<"+n+" "+a+(i?'="'+i+'"':"")+">"+e.html()+"</"+n+">"}}})})),N.indexOf(l.replace("kendo",""))>-1||(i(l,l),o!=l&&i(o,l))}function b(t){return t=e(t),kendo.widgetInstance(t,kendo.ui)||kendo.widgetInstance(t,kendo.mobile.ui)||kendo.widgetInstance(t,kendo.dataviz.ui)}function k(e,t){var n=e.$root||e,i=/^\$(digest|apply)$/.test(n.$$phase);t?i?t():n.$apply(t):i||n.$digest()}function w(t,n){t.$destroy(),n&&e(n).removeData("$scope").removeData("$$kendoScope").removeData("$isolateScope").removeData("$isolateScopeNoTemplate").removeClass("ng-scope")}function y(n,i,r){var o,a,s;
if(e.isArray(n))return t.forEach(n,function(e){y(e,i,r)});if("string"==typeof n){for(o=n.split("."),a=kendo;a&&o.length>0;)a=a[o.shift()];if(!a)return B.push([n,i,r]),!1;n=a.prototype}return s=n[i],n[i]=function(){var e=this,t=arguments;return r.apply({self:e,next:function(){return s.apply(e,arguments.length>0?arguments:t)}},t)},!0}var x,C,T,S,D,F,E,A,I,R,M,z,H,N,B,P;t&&t.injector&&(x=t.module("kendo.directives",[]),C=t.injector(["ng"]),T=C.get("$parse"),S=C.get("$timeout"),F=C.get("$log"),A=function(){var e={TreeList:"TreeListDataSource",TreeView:"HierarchicalDataSource",Scheduler:"SchedulerDataSource",PivotGrid:"PivotDataSource",PivotConfigurator:"PivotDataSource",PanelBar:"HierarchicalDataSource",Menu:"$PLAIN",ContextMenu:"$PLAIN"},t=function(e,t){return"$PLAIN"==t?e:kendo.data[t].create(e)};return function(n,i,r,o){var a=e[r]||"DataSource",s=n.$eval(o),l=t(s,a);return n.$watch(o,function(e){var n,r=b(i);r&&"function"==typeof r.setDataSource&&e!==s&&(n=t(e,a),r.setDataSource(n),s=e)}),l}}(),I={kDataSource:!0,kOptions:!0,kRebind:!0,kNgModel:!0,kNgDelay:!0},R={name:!0,title:!0,style:!0},M=/^(input|select|textarea)$/i,x.factory("directiveFactory",["$compile",function(t){var n,i,o=!1;return D=t,i=function(t,i){return{restrict:"AC",require:["?ngModel","^?form"],scope:!1,controller:["$scope","$attrs","$element",function(e,t){this.template=g(v,t),t._cleanUp=g(function(){this.template=null,t._cleanUp=null},this)}],link:function(a,s,l,d){var u,c=e(s),h=t.replace(/([A-Z])/g,"-$1");c.attr(h,c.attr("data-"+h)),c[0].removeAttribute("data-"+h),u=r(a,s,l,t,i,d),u&&(n&&clearTimeout(n),n=setTimeout(function(){a.$emit("kendoRendered"),o||(o=!0,e("form").each(function(){var t=e(this).controller("form");t&&t.$setPristine()}))}))}}},{create:i}}]),z={Editor:"textarea",NumericTextBox:"input",DatePicker:"input",DateTimePicker:"input",TimePicker:"input",AutoComplete:"input",ColorPicker:"input",MaskedTextBox:"input",MultiSelect:"input",Upload:"input",Validator:"form",Button:"button",MobileButton:"a",MobileBackButton:"a",MobileDetailButton:"a",ListView:"ul",MobileListView:"ul",PanelBar:"ul",TreeView:"ul",Menu:"ul",ContextMenu:"ul",ActionSheet:"ul"},H=["MobileView","MobileDrawer","MobileLayout","MobileSplitView","MobilePane","MobileModalView"],N=["MobileApplication","MobileView","MobileModalView","MobileLayout","MobileActionSheet","MobileDrawer","MobileSplitView","MobilePane","MobileScrollView","MobilePopOver"],t.forEach(["MobileNavBar","MobileButton","MobileBackButton","MobileDetailButton","MobileTabStrip","MobileScrollView","MobileScroller"],function(e){N.push(e),e="kendo"+e,x.directive(e,function(){return{restrict:"A",link:function(t,n,i){r(t,n,i,e,e)}}})}),B=[],kendo.onWidgetRegistered(function(t){B=e.grep(B,function(e){return!y.apply(null,e)}),_(t.widget,"Mobile"==t.prefix)}),y(["ui.Widget","mobile.ui.Widget"],"angular",function(r,o){var a,s=this.self;return"init"==r?(!o&&E&&(o=E),E=null,o&&o.$angular&&(s.$angular_scope=o.$angular[0],s.$angular_init(s.element,o)),n):(a=s.$angular_scope,a&&i(function(){var i,l,d=o(),u=d.elements,c=d.data;if(u.length>0)switch(r){case"cleanup":t.forEach(u,function(t){var n=e(t).data("$$kendoScope");n&&n!==a&&n.$$kendoScope&&w(n,t)});break;case"compile":i=s.element.injector(),l=i?i.get("$compile"):D,t.forEach(u,function(t,i){var r,o;d.scopeFrom?r=d.scopeFrom:(o=c&&c[i],o!==n?(r=e.extend(a.$new(),o),r.$$kendoScope=!0):r=a),e(t).data("$$kendoScope",r),l(t)(r)}),k(a)}}),n)}),y("ui.Widget","$angular_getLogicValue",function(){return this.self.value()}),y("ui.Widget","$angular_setLogicValue",function(e){this.self.value(e)}),y("ui.Select","$angular_getLogicValue",function(){var e=this.self.dataItem(),t=this.self.options.dataValueField;return e?this.self.options.valuePrimitive?t?e[t]:e:e.toJSON():null}),y("ui.Select","$angular_setLogicValue",function(e){var t=this.self,i=t.options,r=i.dataValueField,o=i.text||"";e===n&&(e=""),r&&!i.valuePrimitive&&e&&(o=e[i.dataTextField]||"",e=e[r||i.dataTextField]),t.options.autoBind!==!1||t.listView.bound()?t.value(e):!o&&e&&i.valuePrimitive?t.value(e):t._preselect(e,o)}),y("ui.MultiSelect","$angular_getLogicValue",function(){var t=this.self.dataItems().slice(0),n=this.self.options.dataValueField;return n&&this.self.options.valuePrimitive&&(t=e.map(t,function(e){return e[n]})),t}),y("ui.MultiSelect","$angular_setLogicValue",function(t){var n,i,r,o;null==t&&(t=[]),n=this.self,i=n.options,r=i.dataValueField,o=t,r&&!i.valuePrimitive&&(t=e.map(t,function(e){return e[r]})),i.autoBind!==!1||i.valuePrimitive||n.listView.bound()?n.value(t):n._preselect(o,t)}),y("ui.Widget","$angular_init",function(t,n){var i,r,o,a,s=this.self;if(n&&!e.isArray(n))for(i=s.$angular_scope,r=s.events.length;--r>=0;)o=s.events[r],a=n[o],a&&"string"==typeof a&&(n[o]=s.$angular_makeEventHandler(o,i,a))}),y("ui.Widget","$angular_makeEventHandler",function(e,t,n){return n=T(n),function(e){k(t,function(){n(t,{kendoEvent:e})})}}),y(["ui.Grid","ui.ListView","ui.TreeView","ui.PanelBar"],"$angular_makeEventHandler",function(e,n,i){return"change"!=e?this.next():(i=T(i),function(e){var r,o,a,s,l,d,u,c,h,p=e.sender,f=p.options,m={kendoEvent:e};for(t.isString(f.selectable)&&(r=f.selectable.indexOf("cell")!==-1,o=f.selectable.indexOf("multiple")!==-1),p._checkBoxSelection&&(o=!0),a=m.selected=this.select(),s=m.data=[],l=m.columns=[],u=0;u<a.length;u++)c=r?a[u].parentNode:a[u],h=p.dataItem(c),r?(t.element.inArray(h,s)<0&&s.push(h),d=t.element(a[u]).index(),t.element.inArray(d,l)<0&&l.push(d)):s.push(h);o||(m.dataItem=m.data=s[0],m.angularDataItem=kendo.proxyModelSetters(m.dataItem),m.selected=a[0]),k(n,function(){i(n,m)})})}),y("ui.Grid","$angular_init",function(i,r){if(this.next(),r.columns){var o=e.extend({},kendo.Template,r.templateSettings);t.forEach(r.columns,function(e){!e.field||e.template||e.format||e.values||e.encoded!==n&&!e.encoded||(e.template="<span ng-bind='"+kendo.expr(e.field,"dataItem")+"'>#: "+kendo.expr(e.field,o.paramName)+"#</span>")})}}),y("mobile.ui.ButtonGroup","value",function(e){var t=this.self;return null!=e&&(t.select(t.element.children("li.km-button").eq(e)),t.trigger("change"),t.trigger("select",{index:t.selectedIndex})),t.selectedIndex}),y("mobile.ui.ButtonGroup","_select",function(){this.next(),this.self.trigger("change")}),x.directive("kendoMobileApplication",function(){return{terminal:!0,link:function(e,t,n){r(e,t,n,"kendoMobileApplication","kendoMobileApplication")}}}).directive("kendoMobileView",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=r(e,t,n,"kendoMobileView","kendoMobileView")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileDrawer",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=r(e,t,n,"kendoMobileDrawer","kendoMobileDrawer")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileModalView",function(){return{scope:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=r(e,t,n,"kendoMobileModalView","kendoMobileModalView")},post:function(e,t,n){n._instance._layout(),n._instance._scroller()}}}}).directive("kendoMobileSplitView",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,n._instance=r(e,t,n,"kendoMobileSplitView","kendoMobileSplitView")},post:function(e,t,n){n._instance._layout()}}}}).directive("kendoMobilePane",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,r(e,t,n,"kendoMobilePane","kendoMobilePane")}}}}).directive("kendoMobileLayout",function(){return{link:{pre:function(e,t,n){r(e,t,n,"kendoMobileLayout","kendoMobileLayout")}}}}).directive("kendoMobileActionSheet",function(){return{restrict:"A",link:function(t,n,i){n.find("a[k-action]").each(function(){e(this).attr("data-"+kendo.ns+"action",e(this).attr("k-action"))}),r(t,n,i,"kendoMobileActionSheet","kendoMobileActionSheet")}}}).directive("kendoMobilePopOver",function(){return{terminal:!0,link:{pre:function(e,t,n){n.defaultOptions=e.viewOptions,r(e,t,n,"kendoMobilePopOver","kendoMobilePopOver")}}}}).directive("kendoViewTitle",function(){return{restrict:"E",replace:!0,template:function(e){return"<span data-"+kendo.ns+"role='view-title'>"+e.html()+"</span>"}}}).directive("kendoMobileHeader",function(){return{restrict:"E",link:function(e,t){t.addClass("km-header").attr("data-role","header")}}}).directive("kendoMobileFooter",function(){return{restrict:"E",link:function(e,t){t.addClass("km-footer").attr("data-role","footer")}}}).directive("kendoMobileScrollViewPage",function(){return{restrict:"E",replace:!0,template:function(e){return"<div data-"+kendo.ns+"role='page'>"+e.html()+"</div>"}}}),t.forEach(["align","icon","rel","transition","actionsheetContext"],function(e){var t="k"+e.slice(0,1).toUpperCase()+e.slice(1);x.directive(t,function(){return{restrict:"A",priority:2,link:function(n,i,r){i.attr(kendo.attr(kendo.toHyphens(e)),n.$eval(r[t]))}}})}),P={TreeMap:["Template"],MobileListView:["HeaderTemplate","Template"],MobileScrollView:["EmptyTemplate","Template"],Grid:["AltRowTemplate","DetailTemplate","RowTemplate"],ListView:["EditTemplate","Template","AltTemplate"],Pager:["SelectTemplate","LinkTemplate"],PivotGrid:["ColumnHeaderTemplate","DataCellTemplate","RowHeaderTemplate"],Scheduler:["AllDayEventTemplate","DateHeaderTemplate","EventTemplate","MajorTimeHeaderTemplate","MinorTimeHeaderTemplate"],PanelBar:["Template"],TreeView:["Template"],Validator:["ErrorTemplate"]},function(){var e={};t.forEach(P,function(n,i){t.forEach(n,function(t){e[t]||(e[t]=[]),e[t].push("?^^kendo"+i)})}),t.forEach(e,function(e,t){var n="k"+t,i=kendo.toHyphens(n);x.directive(n,function(){return{restrict:"A",require:e,terminal:!0,compile:function(t,r){if(""===r[n]){t.removeAttr(i);var o=t[0].outerHTML;return function(t,r,a,s){for(var l;!l&&s.length;)l=s.shift();l?(l.template(n,o),r.remove()):F.warn(i+" without a matching parent widget found. It can be one of the following: "+e.join(", "))}}}}})})}())}(window.kendo.jQuery,window.angular),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()}),function(e,define){define("kendo.web.min",["kendo.core.min","kendo.router.min","kendo.view.min","kendo.fx.min","kendo.dom.min","kendo.data.odata.min","kendo.data.xml.min","kendo.data.min","kendo.ooxml.min","kendo.excel.min","kendo.data.signalr.min","kendo.binder.min","kendo.drawing.min","kendo.validator.min","kendo.userevents.min","kendo.draganddrop.min","kendo.mobile.scroller.min","kendo.groupable.min","kendo.reorderable.min","kendo.resizable.min","kendo.sortable.min","kendo.selectable.min","kendo.button.min","kendo.buttongroup.min","kendo.pager.min","kendo.popup.min","kendo.notification.min","kendo.tooltip.min","kendo.list.min","kendo.calendar.min","kendo.datepicker.min","kendo.dateinput.min","kendo.autocomplete.min","kendo.dropdownlist.min","kendo.combobox.min","kendo.multiselect.min","kendo.colorpicker.min","kendo.columnmenu.min","kendo.columnsorter.min","kendo.grid.min","kendo.listview.min","kendo.listbox.min","kendo.filebrowser.min","kendo.imagebrowser.min","kendo.editor.min","kendo.numerictextbox.min","kendo.maskedtextbox.min","kendo.mediaplayer.min","kendo.menu.min","kendo.editable.min","kendo.pivot.fieldmenu.min","kendo.filtercell.min","kendo.panelbar.min","kendo.progressbar.min","kendo.responsivepanel.min","kendo.tabstrip.min","kendo.timepicker.min","kendo.toolbar.min","kendo.datetimepicker.min","kendo.treeview.draganddrop.min","kendo.treeview.min","kendo.slider.min","kendo.splitter.min","kendo.upload.min","kendo.dialog.min","kendo.window.min","kendo.virtuallist.min","kendo.scheduler.view.min","kendo.scheduler.dayview.min","kendo.scheduler.agendaview.min","kendo.scheduler.monthview.min","kendo.scheduler.recurrence.min","kendo.scheduler.min","kendo.gantt.list.min","kendo.gantt.timeline.min","kendo.gantt.min","kendo.treelist.min","kendo.pivotgrid.min","kendo.spreadsheet.min","kendo.pivot.configurator.min","kendo.angular.min"],e)}(function(){"bundle all";return window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.web.min.js.map