@progress/telerik-jquery-report-viewer 19.23.1009

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,17 @@
1
+ /*!
2
+ * Copyright 2023 Progress Software Corporation and/or one of its subsidiaries or affiliates. All rights reserved.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e()}((function(){var e={name:"@progress/kendo-ui",productName:"Kendo UI",productCodes:["KENDOUICOMPLETE","KENDOUI","KENDOUI","KENDOUICOMPLETE"],publishDate:0,version:"2022.3.2112".replace(/^\s+|\s+$/g,""),licensingDocsUrl:"https://docs.telerik.com/kendo-ui/intro/installation/using-license-code"};!function(t,n,i){var a,r=n.kendo=n.kendo||{cultures:{}},o=t.extend,s=t.each,l=Array.isArray,d=t.noop,u=Math,c=n.JSON||{},p={},h=/%/,f=/\{(\d+)(:[^\}]+)?\}/g,m=/(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+(?:\.?)\d*)px\s*(\d+)?/i,g=/^(\+|-?)\d+(\.?)\d*$/,v="function",_="string",b="number",k="object",w="null",y="boolean",x="undefined",C="aria-labelledby",T="aria-label",S={},I={},D=[].slice,E=["themeColor","fillMode","shape","size","rounded","positionMode"],A=function(){var e,t,n,a,r,o,s=arguments,l=arguments[0]||{},d=1,u=arguments.length,c=!1;for("boolean"==typeof l&&(c=l,l=arguments[d]||{},d++),"object"!=typeof l&&"function"!=typeof l&&(l={}),d===u&&(l=this,d--);d<u;d++)if(null!=(r=s[d]))for(a in r)"filters"!=a&&"concat"!=a&&":"!=a&&(e=l[a],l!==(n=r[a])&&(c&&n&&(jQuery.isPlainObject(n)||(t=Array.isArray(n)))?(t?(t=!1,o=e&&Array.isArray(e)?e:[]):o=e&&jQuery.isPlainObject(e)?e:{},l[a]=A(c,o,n)):n!==i&&(l[a]=n)));return l};function F(){}r.version="2022.3.2112".replace(/^\s+|\s+$/g,""),F.extend=function(e){var t,n,i=function(){},a=this,r=e&&e.init?e.init:function(){a.apply(this,arguments)};for(t in i.prototype=a.prototype,n=r.fn=r.prototype=new i,e)null!=e[t]&&e[t].constructor===Object?n[t]=o(!0,{},i.prototype[t],e[t]):n[t]=e[t];return n.constructor=r,r.extend=a.extend,r},F.prototype._initOptions=function(e){this.options=G({},this.options,e)};var z=r.isFunction=function(e){return"function"==typeof e},P=function(){this._defaultPrevented=!0},H=function(){return!0===this._defaultPrevented},N=F.extend({init:function(){this._events={}},bind:function(e,t,n){var a,r,o,s,l=this,d=typeof e===_?[e]:e,u=typeof t===v;if(t===i){for(a in e)l.bind(a,e[a]);return l}for(a=0,r=d.length;a<r;a++)e=d[a],(s=u?t:t[e])&&(n&&(o=s,s=function(){l.unbind(e,s),o.apply(l,arguments)},s.original=o),(l._events[e]=l._events[e]||[]).push(s));return l},one:function(e,t){return this.bind(e,t,!0)},first:function(e,t){var n,i,a,r=this,o=typeof e===_?[e]:e,s=typeof t===v;for(n=0,i=o.length;n<i;n++)e=o[n],(a=s?t:t[e])&&(r._events[e]=r._events[e]||[]).unshift(a);return r},trigger:function(e,t){var n,i,a=this,r=a._events[e];if(r){for((t=t||{}).sender=a,t._defaultPrevented=!1,t.preventDefault=P,t.isDefaultPrevented=H,n=0,i=(r=r.slice()).length;n<i;n++)r[n].call(a,t);return!0===t._defaultPrevented}return!1},unbind:function(e,t){var n,a=this,r=a._events[e];if(e===i)a._events={};else if(r)if(t)for(n=r.length-1;n>=0;n--)r[n]!==t&&r[n].original!==t||r.splice(n,1);else a._events[e]=[];return a}});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+="}var O=/^\w+/,M=/\$\{([^}]*)\}/g,B=/\\\}/g,L=/__CURLY__/g,V=/\\#/g,U=/__SHARP__/g,W=["","0","00","000","0000"];function j(e,t,n){return(n=(t=t||2)-(e+="").length)?W[t].substring(0,n)+e:e}function q(e,t){var n=r._outerWidth,i=r._outerHeight,a=e.parent(".k-animation-container"),o=a[0].style;a.is(":hidden")&&a.css({display:"",position:""}),h.test(o.width)||h.test(o.height)||a.css({width:t?n(e)+1:n(e),height:i(e),boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"})}function G(e){var t=arguments,n=1,i=arguments.length;for(n=1;n<i;n++)K(e,t[n]);return e}function K(e,t){var i,a,o,s,l,d=r.data.ObservableArray,u=r.data.LazyObservableArray,c=r.data.DataSource,p=r.data.HierarchicalDataSource;for(i in t)!(s=(o=typeof(a=t[i]))===k&&null!==a?a.constructor:null)||s===Array||s===d||s===u||s===c||s===p||s===RegExp||r.isFunction(n.ArrayBuffer)&&s===ArrayBuffer||a instanceof HTMLElement?o!==x&&(e[i]=a):a instanceof Date?e[i]=new Date(a.getTime()):z(a.clone)?e[i]=a.clone():(l=e[i],e[i]=typeof l===k&&l||{},K(e[i],a));return e}function $(e,t,n){for(var a in t)if(t.hasOwnProperty(a)&&t[a].test(e))return a;return n!==i?n:e}function Y(e){return e.replace(/\-(\w)/g,(function(e,t){return t.toUpperCase()}))}function Q(e,n){var i,a={};return document.defaultView&&document.defaultView.getComputedStyle?(i=document.defaultView.getComputedStyle(e,""),n&&t.each(n,(function(e,t){a[t]=i.getPropertyValue(t)}))):(i=e.currentStyle,n&&t.each(n,(function(e,t){a[t]=i[Y(t)]}))),r.size(a)||(a=i),a}a={paramName:"data",useWithBlock:!0,render:function(e,t){var n,i,a="";for(n=0,i=t.length;n<i;n++)a+=e(t[n]);return a},compile:function(e,t){var n,i,a,s=o({},this,t),l=s.paramName,d=l.match(O)[0],u=s.useWithBlock,c="var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;";if(z(e))return e;for(c+=u?"with("+l+"){":"",c+="$kendoOutput=",i=e.replace(B,"__CURLY__").replace(M,"#=$kendoHtmlEncode($1)#").replace(L,"}").replace(V,"__SHARP__").split("#"),a=0;a<i.length;a++)c+=R(i[a],a%2==0);c+=u?";}":";",c=(c+="return $kendoOutput;").replace(U,"#");try{return(n=new Function(d,c))._slotCount=Math.floor(i.length/2),n}catch(t){throw new Error(r.format("Invalid template:'{0}' Generated code:'{1}'",e,c))}}},function(){var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},r={}.toString;function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=a[e];return typeof t===_?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function s(i,a){var l,d,u,c,p,h,f=e,m=a[i];if(m&&typeof m===k&&typeof m.toJSON===v&&(m=m.toJSON(i)),typeof n===v&&(m=n.call(a,i,m)),(h=typeof m)===_)return o(m);if(h===b)return isFinite(m)?String(m):w;if(h===y||h===w)return String(m);if(h===k){if(!m)return w;if(e+=t,p=[],"[object Array]"===r.apply(m)){for(c=m.length,l=0;l<c;l++)p[l]=s(l,m)||w;return u=0===p.length?"[]":e?"[\n"+e+p.join(",\n"+e)+"\n"+f+"]":"["+p.join(",")+"]",e=f,u}if(n&&typeof n===k)for(c=n.length,l=0;l<c;l++)typeof n[l]===_&&(u=s(d=n[l],m))&&p.push(o(d)+(e?": ":":")+u);else for(d in m)Object.hasOwnProperty.call(m,d)&&(u=s(d,m))&&p.push(o(d)+(e?": ":":")+u);return u=0===p.length?"{}":e?"{\n"+e+p.join(",\n"+e)+"\n"+f+"}":"{"+p.join(",")+"}",e=f,u}}typeof Date.prototype.toJSON!==v&&(Date.prototype.toJSON=function(){var e=this;return isFinite(e.valueOf())?j(e.getUTCFullYear(),4)+"-"+j(e.getUTCMonth()+1)+"-"+j(e.getUTCDate())+"T"+j(e.getUTCHours())+":"+j(e.getUTCMinutes())+":"+j(e.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),typeof c.stringify!==v&&(c.stringify=function(i,a,r){var o;if(e="",t="",typeof r===b)for(o=0;o<r;o+=1)t+=" ";else typeof r===_&&(t=r);if(n=a,a&&typeof a!==v&&(typeof a!==k||typeof a.length!==b))throw new Error("JSON.stringify");return s("",{"":i})})}(),function(){var e=/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,n=/^(n|c|p|e)(\d*)$/i,a=/(\\.)|(['][^']*[']?)|(["][^"]*["]?)/g,o=/\,/g,s="",l=".",d="#",c="0",p="en-US",h={}.toString;function m(e){if(e){if(e.numberFormat)return e;if(typeof e===_){var t=r.cultures;return t[e]||t[e.split("-")[0]]||null}return null}return null}function g(e){return e&&(e=m(e)),e||r.cultures.current}r.cultures["en-US"]={name:p,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}}},r.culture=function(e){var t,n=r.cultures;if(e===i)return n.current;(t=m(e)||n[p]).calendar=t.calendars.standard,n.current=t},r.findCulture=m,r.getCulture=g,r.culture(p);var v=function(e,t,n,a){var r,o,s,l,d,u,c=e.indexOf(a["."]),p=a.groupSize.slice(),h=p.shift();if(n=-1!==c?c:n+1,(o=(r=e.substring(t,n)).length)>=h){for(s=o,l=[];s>-1;)if((d=r.substring(s-h,s))&&l.push(d),s-=h,0===(h=(u=p.shift())!==i?u:h)){s>0&&l.push(r.substring(0,s));break}r=l.reverse().join(a[","]),e=e.substring(0,t)+r+e.substring(n)}return e},k=function(e,t,n){return t=t||0,e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t))),n&&(e=-e),(e=+((e=e.toString().split("e"))[0]+"e"+(e[1]?+e[1]-t:-t))).toFixed(Math.min(t,20))},w=function(t,r,p){if(r){if("[object Date]"===h.call(t))return function(t,n,a){var r=(a=g(a)).calendars.standard,o=r.days,s=r.months;return(n=r.patterns[n]||n).replace(e,(function(e){var n,a,l;return"d"===e?a=t.getDate():"dd"===e?a=j(t.getDate()):"ddd"===e?a=o.namesAbbr[t.getDay()]:"dddd"===e?a=o.names[t.getDay()]:"M"===e?a=t.getMonth()+1:"MM"===e?a=j(t.getMonth()+1):"MMM"===e?a=s.namesAbbr[t.getMonth()]:"MMMM"===e?a=s.names[t.getMonth()]:"yy"===e?a=j(t.getFullYear()%100):"yyyy"===e?a=j(t.getFullYear(),4):"h"===e?a=t.getHours()%12||12:"hh"===e?a=j(t.getHours()%12||12):"H"===e?a=t.getHours():"HH"===e?a=j(t.getHours()):"m"===e?a=t.getMinutes():"mm"===e?a=j(t.getMinutes()):"s"===e?a=t.getSeconds():"ss"===e?a=j(t.getSeconds()):"f"===e?a=u.floor(t.getMilliseconds()/100):"ff"===e?((a=t.getMilliseconds())>99&&(a=u.floor(a/10)),a=j(a)):"fff"===e?a=j(t.getMilliseconds(),3):"tt"===e?a=t.getHours()<12?r.AM[0]:r.PM[0]:"zzz"===e?(l=(n=t.getTimezoneOffset())<0,a=u.abs(n/60).toString().split(".")[0],n=u.abs(n)-60*a,a=(l?"+":"-")+j(a),a+=":"+j(n)):"zz"!==e&&"z"!==e||(l=(a=t.getTimezoneOffset()/60)<0,a=u.abs(a).toString().split(".")[0],a=(l?"+":"-")+("zz"===e?j(a):a)),a!==i?a:e.slice(1,e.length-1)}))}(t,r,p);if(typeof t===b)return function(e,t,r){var u,p,h,f,m,_,b,w,y,x,C,T,S,I,D,E,A,F,z,P,H=(r=g(r)).numberFormat,N=H["."],R=H.decimals,O=H.pattern[0],M=[],B=e<0,L=s,V=s,U=-1;if(e===i)return s;if(!isFinite(e))return e;if(!t)return r.name.length?e.toLocaleString():e.toString();if(m=n.exec(t)){if(h="p"===(t=m[1].toLowerCase()),((p="c"===t)||h)&&(N=(H=p?H.currency:H.percent)["."],R=H.decimals,u=H.symbol,O=H.pattern[B?0:1]),(f=m[2])&&(R=+f),"e"===t)return(f?e.toExponential(R):e.toExponential()).replace(l,H["."]);if(h&&(e*=100),B=(e=k(e,R))<0,_=(e=e.split(l))[0],b=e[1],B&&(_=_.substring(1)),V=v(_,0,_.length,H),b&&(V+=N+b),"n"===t&&!B)return V;for(e=s,y=0,x=O.length;y<x;y++)e+="n"===(C=O.charAt(y))?V:"$"===C||"%"===C?u:C;return e}if((t.indexOf("'")>-1||t.indexOf('"')>-1||t.indexOf("\\")>-1)&&(t=t.replace(a,(function(e){var t=e.charAt(0).replace("\\",""),n=e.slice(1).replace(t,"");return M.push(n),"??"}))),t=t.split(";"),B&&t[1])t=t[1],S=!0;else if(0===e&&t[2]){if(-1==(t=t[2]).indexOf(d)&&-1==t.indexOf(c))return t}else t=t[0];if((h=-1!=t.indexOf("%"))&&(e*=100),(p=-1!=(z=t.indexOf("$")))&&"\\"===t[z-1]&&(t=t.split("\\").join(""),p=!1),(p||h)&&(N=(H=p?H.currency:H.percent)["."],R=H.decimals,u=H.symbol),(T=t.indexOf(",")>-1)&&(t=t.replace(o,s)),I=t.indexOf(l),x=t.length,-1!=I)if(b=(b=(b=e.toString().split("e"))[1]?k(e,Math.abs(b[1])):b[0]).split(l)[1]||s,A=(E=t.lastIndexOf(c)-I)>-1,F=(D=t.lastIndexOf(d)-I)>-1,y=b.length,A||F||(x=(t=t.substring(0,I)+t.substring(I+1)).length,I=-1,y=0),A&&E>D)y=E;else if(D>E)if(F&&y>D){for(var W=k(e,D,B);W.charAt(W.length-1)===c&&D>0&&D>E;)D--,W=k(e,D,B);y=D}else A&&y<E&&(y=E);if(e=k(e,y,B),D=t.indexOf(d),E=t.indexOf(c),U=-1==D&&-1!=E?E:-1!=D&&-1==E?D:D>E?E:D,D=t.lastIndexOf(d),E=t.lastIndexOf(c),P=-1==D&&-1!=E?E:-1!=D&&-1==E||D>E?D:E,U==x&&(P=U),-1!=U){for(_=(V=e.toString().split(l))[0],b=V[1]||s,w=_.length,b.length,B&&-1*e>=0&&(B=!1),e=t.substring(0,U),B&&!S&&(e+="-"),y=U;y<x;y++){if(C=t.charAt(y),-1==I){if(P-y<w){e+=_;break}}else if(-1!=E&&E<y&&(L=s),I-y<=w&&I-y>-1&&(e+=_,y=I),I===y){e+=(b?N:s)+b,y+=P-I+1;continue}C===c?(e+=C,L=C):C===d&&(e+=L)}if(T&&(e=v(e,U+(B&&!S?1:0),Math.max(P,w+U),H)),P>=U&&(e+=t.substring(P+1)),p||h){for(V=s,y=0,x=e.length;y<x;y++)V+="$"===(C=e.charAt(y))||"%"===C?u:C;e=V}if(x=M.length)for(y=0;y<x;y++)e=e.replace("??",M[y])}return e}(t,r,p)}return t!==i?t:""};r.format=function(e){var t=arguments;return e.replace(f,(function(e,n,i){var a=t[parseInt(n,10)+1];return w(a,i?i.substring(1):"")}))},r._extractFormat=function(e){return"{0:"===e.slice(0,3)&&(e=e.slice(3,e.length-1)),e},r._activeElement=function(){try{return document.activeElement}catch(e){return document.documentElement.activeElement}},r._round=k,r._outerWidth=function(e,n){return t(e).outerWidth(n||!1)||0},r._outerHeight=function(e,n){return t(e).outerHeight(n||!1)||0},r.toString=w}(),function(){var e=/\u00A0/g,n=/\s/g,a=/[eE][\-+]?[0-9]+/,o=/[+|\-]\d{1,2}/,s=/[+|\-]\d{1,2}:?\d{2}/,d=/^\/Date\((.*?)\)\/$/,c=/[+-]\d*/,p=[[],["G","g","F"],["D","d","y","m","T","t"]],h=[["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"]],f={2:/^\d{1,2}/,3:/^\d{1,3}/,4:/^\d{4}/},m={}.toString;function g(e,t,n){return!(e>=t&&e<=n)}function v(e){return e.charAt(0)}function _(e){return t.map(e,v)}function k(e){for(var t=0,n=e.length,i=[];t<n;t++)i[t]=(e[t]+"").toLowerCase();return i}function w(e){var t,n={};for(t in e)n[t]=k(e[t]);return n}function y(e,t,n,a){if(!e)return null;var l,d,u,c,p,h,m,v,b,k,y,x,C=function(e){for(var n=0;t[R]===e;)n++,R++;return n>0&&(R-=1),n},T=function(t){var n=f[t]||new RegExp("^\\d{1,"+t+"}"),i=e.substr(O,t).match(n);return i?(i=i[0],O+=i.length,parseInt(i,10)):null},S=function(t,n){for(var i,a,r,o=0,s=t.length,l=0,d=0;o<s;o++)a=(i=t[o]).length,r=e.substr(O,a),n&&(r=r.toLowerCase()),r==i&&a>l&&(l=a,d=o);return l?(O+=l,d+1):null},I=function(){var n=!1;return e.charAt(O)===t[R]&&(O++,n=!0),n},D=n.calendars.standard,E=null,A=null,F=null,z=null,P=null,H=null,N=null,R=0,O=0,M=!1,B=new Date,L=D.twoDigitYearMax||2029,V=B.getFullYear();for(t||(t="d"),(c=D.patterns[t])&&(t=c),u=(t=t.split("")).length;R<u;R++)if(l=t[R],M)"'"===l?M=!1:I();else if("d"===l){if(d=C("d"),D._lowerDays||(D._lowerDays=w(D.days)),null!==F&&d>2)continue;if(null===(F=d<3?T(2):S(D._lowerDays[3==d?"namesAbbr":"names"],!0))||g(F,1,31))return null}else if("M"===l){if(d=C("M"),D._lowerMonths||(D._lowerMonths=w(D.months)),null===(A=d<3?T(2):S(D._lowerMonths[3==d?"namesAbbr":"names"],!0))||g(A,1,12))return null;A-=1}else if("y"===l){if(null===(E=T(d=C("y"))))return null;2==d&&("string"==typeof L&&(L=V+parseInt(L,10)),(E=V-V%100+E)>L&&(E-=100))}else if("h"===l){if(C("h"),12==(z=T(2))&&(z=0),null===z||g(z,0,11))return null}else if("H"===l){if(C("H"),null===(z=T(2))||g(z,0,23))return null}else if("m"===l){if(C("m"),null===(P=T(2))||g(P,0,59))return null}else if("s"===l){if(C("s"),null===(H=T(2))||g(H,0,59))return null}else if("f"===l){if(d=C("f"),x=e.substr(O,d).match(f[3]),null!==(N=T(d))&&(N=parseFloat("0."+x[0],10),N=r._round(N,3),N*=1e3),null===N||g(N,0,999))return null}else if("t"===l){if(d=C("t"),v=D.AM,b=D.PM,1===d&&(v=_(v),b=_(b)),!(p=S(b))&&!S(v))return null}else if("z"===l){if(h=!0,d=C("z"),"Z"===e.substr(O,1)){I();continue}if(!(m=e.substr(O,6).match(d>2?s:o)))return null;if(k=(m=m[0].split(":"))[0],!(y=m[1])&&k.length>3&&(O=k.length-2,y=k.substring(O),k=k.substring(0,O)),g(k=parseInt(k,10),-12,13))return null;if(d>2&&(y=m[0][0]+y,y=parseInt(y,10),isNaN(y)||g(y,-59,59)))return null}else if("'"===l)M=!0,I();else if(!I())return null;return a&&!/^\s*$/.test(e.substr(O))?null:(null===E&&null===A&&null===F&&(null!==z||null!==P||H||null)?(E=V,A=B.getMonth(),F=B.getDate()):(null===E&&(E=V),null===F&&(F=1)),p&&z<12&&(z+=12),h?(k&&(z+=-k),y&&(P+=-y),e=new Date(Date.UTC(E,A,F,z,P,H,N))):function(e,t){t||23!==e.getHours()||e.setHours(e.getHours()+2)}(e=new Date(E,A,F,z,P,H,N),z),E<100&&e.setFullYear(E),e.getDate()!==F&&h===i?null:e)}function x(e,t,n,i){if("[object Date]"===m.call(e))return e;var a,o,s,f,g=0,v=null;if(e&&0===e.indexOf("/D")&&(v=d.exec(e)))return v=v[1],o=c.exec(v.substring(1)),v=new Date(parseInt(v,10)),o&&(s=o[0],f="-"===s.substr(0,1)?-1:1,s=s.substring(1),o=f*(60*parseInt(s.substr(0,2),10)+parseInt(s.substring(2),10)),v=r.timezone.apply(v,0),v=r.timezone.convert(v,0,-1*o)),v;for(n=r.getCulture(n),t||(t=function(e){var t,n,i,a=u.max(p.length,h.length),r=(e.calendar||e.calendars.standard).patterns,o=[];for(i=0;i<a;i++){for(t=p[i],n=0;n<t.length;n++)o.push(r[t[n]]);o=o.concat(h[i])}return o}(n)),a=(t=l(t)?t:[t]).length;g<a;g++)if(v=y(e,t[g],n,i))return v;return v}r.parseDate=function(e,t,n){return x(e,t,n,!1)},r.parseExactDate=function(e,t,n){return x(e,t,n,!0)},r.parseInt=function(e,t){var n=r.parseFloat(e,t);return n&&(n|=0),n},r.parseFloat=function(t,i,o){if(!t&&0!==t)return null;if(typeof t===b)return t;t=t.toString();var s,l,d=(i=r.getCulture(i)).numberFormat,u=d.percent,c=d.currency,p=c.symbol,h=u.symbol,f=t.indexOf("-");return a.test(t)?(t=parseFloat(t.replace(d["."],".")),isNaN(t)&&(t=null),t):f>0?null:(f=f>-1,t.indexOf(p)>-1||o&&o.toLowerCase().indexOf("c")>-1?(s=(d=c).pattern[0].replace("$",p).split("n"),t.indexOf(s[0])>-1&&t.indexOf(s[1])>-1&&(t=t.replace(s[0],"").replace(s[1],""),f=!0)):t.indexOf(h)>-1&&(l=!0,d=u,p=h),t=t.replace("-","").replace(p,"").replace(e," ").split(d[","].replace(e," ")).join("").replace(n,"").replace(d["."],"."),t=parseFloat(t),isNaN(t)?t=null:f&&(t*=-1),t&&l&&(t/=100),t)}}(),function(){p._scrollbar=i,p.scrollbar=function(e){if(isNaN(p._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),p._scrollbar=t=n.offsetWidth-n.scrollWidth,document.body.removeChild(n),t}return p._scrollbar},p.isRtl=function(e){return t(e).closest(".k-rtl").length>0};var e=document.createElement("table");try{e.innerHTML="<tr><td></td></tr>",p.tbodyInnerHtml=!0}catch(e){p.tbodyInnerHtml=!1}p.touch="ontouchstart"in n;var a=document.documentElement.style,r=p.transitions=!1,o=p.transforms=!1,l="HTMLElement"in n?HTMLElement.prototype:[];p.hasHW3D="WebKitCSSMatrix"in n&&"m11"in new n.WebKitCSSMatrix||"MozPerspective"in a||"msPerspective"in a,p.cssFlexbox="flexWrap"in a||"WebkitFlexWrap"in a||"msFlexWrap"in a,s(["Moz","webkit","O","ms"],(function(){var t=this.toString(),n=typeof e.style[t+"Transition"]===_;if(n||typeof e.style[t+"Transform"]===_){var i=t.toLowerCase();return o={css:"ms"!=i?"-"+i+"-":"",prefix:t,event:"o"===i||"webkit"===i?i:""},n&&((r=o).event=r.event?r.event+"TransitionEnd":"transitionend"),!1}})),e=null,p.transforms=o,p.transitions=r,p.devicePixelRatio=n.devicePixelRatio===i?1:n.devicePixelRatio;try{p.screenWidth=n.outerWidth||n.screen?n.screen.availWidth:n.innerWidth,p.screenHeight=n.outerHeight||n.screen?n.screen.availHeight:n.innerHeight}catch(e){p.screenWidth=n.screen.availWidth,p.screenHeight=n.screen.availHeight}p.detectOS=function(e){var t,i=!1,a=[],r=!/mobile safari/i.test(e),o={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/},s={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/},l={tablet:/playbook|ipad|fire/i},d={omini:/Opera\sMini/i,omobile:/Opera\sMobi/i,firefox:/Firefox|Fennec/i,mobilesafari:/version\/.*safari/i,ie:/MSIE|Windows\sPhone/i,chrome:/chrome|crios/i,webkit:/webkit/i};for(var u in o)if(o.hasOwnProperty(u)&&(a=e.match(o[u]))){if("windows"==u&&"plugins"in navigator)return!1;(i={}).device=u,i.tablet=$(u,l,!1),i.browser=$(e,d,"default"),i.name=$(u,s),i[i.name]=!0,i.majorVersion=a[2],i.minorVersion=(a[3]||"0").replace("_","."),t=i.minorVersion.replace(".","").substr(0,2),i.flatVersion=i.majorVersion+t+new Array(3-(t.length<3?t.length:2)).join("0"),i.cordova=typeof n.PhoneGap!==x||typeof n.cordova!==x,i.appMode=n.navigator.standalone||/file|local|wmapp/.test(n.location.protocol)||i.cordova,i.android&&(p.devicePixelRatio<1.5&&i.flatVersion<400||r)&&(p.screenWidth>800||p.screenHeight>800)&&(i.tablet=u);break}return i};var d=p.mobileOS=p.detectOS(navigator.userAgent);p.wpDevicePixelRatio=d.wp?screen.width/320:0,p.hasNativeScrolling=!1,(d.ios||d.android&&d.majorVersion>2||d.wp)&&(p.hasNativeScrolling=d),p.delayedClick=function(){if(p.touch){if(d.ios)return!0;if(d.android)return!p.browser.chrome||!(p.browser.version<32)&&!(t("meta[name=viewport]").attr("content")||"").match(/user-scalable=no/i)}return!1},p.mouseAndTouchPresent=p.touch&&!(p.mobileOS.ios||p.mobileOS.android),p.detectBrowser=function(e){var t=!1,n=[],i={edge:/(edge)[ \/]([\w.]+)/i,webkit:/(chrome|crios)[ \/]([\w.]+)/i,safari:/(webkit)[ \/]([\w.]+)/i,opera:/(opera)(?:.*version|)[ \/]([\w.]+)/i,msie:/(msie\s|trident.*? rv:)([\w.]+)/i,mozilla:/(mozilla)(?:.*? rv:([\w.]+)|)/i};for(var a in i)if(i.hasOwnProperty(a)&&(n=e.match(i[a]))){(t={})[a]=!0,t[n[1].toLowerCase().split(" ")[0].split("/")[0]]=!0,t.version=parseInt(document.documentMode||n[2],10),t.chrome&&e.match(/(edg)[ \/]([\w.]+)/i)&&(t.chromiumEdge=!0);break}return t},p.browser=p.detectBrowser(navigator.userAgent),!d&&p.touch&&p.browser.safari&&(d=p.mobileOS={ios:!0,tablet:"tablet",device:"ipad"}),p.detectClipboardAccess=function(){var e={copy:!!document.queryCommandSupported&&document.queryCommandSupported("copy"),cut:!!document.queryCommandSupported&&document.queryCommandSupported("cut"),paste:!!document.queryCommandSupported&&document.queryCommandSupported("paste")};return p.browser.chrome&&(e.paste=!1,p.browser.version>=43&&(e.copy=!0,e.cut=!0)),e},p.clipboard=p.detectClipboardAccess(),p.zoomLevel=function(){try{var e=p.browser,t=0,i=document.documentElement;return e.msie&&11==e.version&&i.scrollHeight>i.clientHeight&&!p.touch&&(t=p.scrollbar()),p.touch?i.clientWidth/n.innerWidth:e.msie&&e.version>=10?((top||n).document.documentElement.offsetWidth+t)/(top||n).innerWidth:1}catch(e){return 1}},function(e){var n="",i=t(document.documentElement),a=parseInt(e.version,10);e.msie?n="ie":e.mozilla?n="ff":e.safari?n="safari":e.webkit?n="webkit":e.opera?n="opera":e.edge&&(n="edge"),n&&(n="k-"+n+" k-"+n+a),p.mobileOS&&(n+=" k-mobile"),p.cssFlexbox||(n+=" k-no-flexbox"),i.addClass(n)}(p.browser),p.eventCapture=document.documentElement.addEventListener;var u=document.createElement("input");p.placeholder="placeholder"in u,p.propertyChangeEvent="onpropertychange"in u,p.input=function(){for(var e,t=["number","date","time","month","week","datetime","datetime-local"],n=t.length,i="test",a={},r=0;r<n;r++)e=t[r],u.setAttribute("type",e),u.value=i,a[e.replace("-","")]="text"!==u.type&&u.value!==i;return a}(),u.style.cssText="float:left;",p.cssFloat=!!u.style.cssFloat,u=null,p.stableSort=function(){for(var e=[{index:0,field:"b"}],t=1;t<513;t++)e.push({index:t,field:"a"});return e.sort((function(e,t){return e.field>t.field?1:e.field<t.field?-1:0})),1===e[0].index}(),p.matchesSelector=l.webkitMatchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.matchesSelector||l.matches||function(e){for(var n=document.querySelectorAll?(this.parentNode||document).querySelectorAll(e)||[]:t(e),i=n.length;i--;)if(n[i]==this)return!0;return!1},p.matchMedia="matchMedia"in n,p.pushState=n.history&&n.history.pushState,p.hashChange="onhashchange"in n,p.customElements="registerElement"in n.document;var c=p.browser.chrome,h=p.browser.crios,f=p.browser.mozilla,m=p.browser.safari;p.msPointers=!c&&n.MSPointerEvent,p.pointers=!c&&!h&&!f&&!m&&n.PointerEvent,p.kineticScrollNeeded=d&&(p.touch||p.msPointers||p.pointers)}();var X={};function J(e,t,n,i){return typeof e===_&&(z(t)&&(i=t,t=400,n=!1),z(n)&&(i=n,n=!1),typeof t===y&&(n=t,t=400),e={effects:e,duration:t,reverse:n,complete:i}),o({effects:{},duration:400,reverse:!1,init:d,teardown:d,hide:!1},e,{completeCallback:e.complete,complete:d})}function Z(e,n,i,a,r){for(var o,s=0,l=e.length;s<l;s++)(o=t(e[s])).queue((function(){X.promise(o,J(n,i,a,r))}));return e}t.extend(X,{enabled:!0,Element:function(e){this.element=t(e)},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}}),X.promiseShim=X.promise,"kendoAnimate"in t.fn||o(t.fn,{kendoStop:function(e,t){return this.stop(e,t)},kendoAnimate:function(e,t,n,i){return Z(this,e,t,n,i)},kendoAddClass:function(e,t){return r.toggleClass(this,e,t,!0)},kendoRemoveClass:function(e,t){return r.toggleClass(this,e,t,!1)},kendoToggleClass:function(e,t,n){return r.toggleClass(this,e,t,n)}});var ee=/&/g,te=/</g,ne=/"/g,ie=/'/g,ae=/>/g;var re=function(e){return e.target};p.touch&&(re=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},s(["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap"],(function(e,n){t.fn[n]=function(e){return this.on(n,e)}}))),p.touch?p.mobileOS?(p.mousedown="touchstart",p.mouseup="touchend",p.mousemove="touchmove",p.mousecancel="touchcancel",p.click="touchend",p.resize="orientationchange"):(p.mousedown="mousedown touchstart",p.mouseup="mouseup touchend",p.mousemove="mousemove touchmove",p.mousecancel="mouseleave touchcancel",p.click="click",p.resize="resize"):p.pointers?(p.mousemove="pointermove",p.mousedown="pointerdown",p.mouseup="pointerup",p.mousecancel="pointercancel",p.click="pointerup",p.resize="orientationchange resize"):p.msPointers?(p.mousemove="MSPointerMove",p.mousedown="MSPointerDown",p.mouseup="MSPointerUp",p.mousecancel="MSPointerCancel",p.click="MSPointerUp",p.resize="orientationchange resize"):(p.mousemove="mousemove",p.mousedown="mousedown",p.mouseup="mouseup",p.mousecancel="mouseleave",p.click="click",p.resize="resize");var oe=/^([a-z]+:)?\/\//i;o(r,{widgets:[],_widgetRegisteredCallbacks:[],ui:r.ui||{},fx:r.fx||function(e){return new r.effects.Element(e)},effects:r.effects||X,mobile:r.mobile||{},data:r.data||{},dataviz:r.dataviz||{},drawing:r.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:r.support||p,animate:r.animate||Z,ns:"",attr:function(e){return"data-"+r.ns+e},getShadows:function(e){var t=e.css(r.support.transitions.css+"box-shadow")||e.css("box-shadow"),n=t&&t.match(m)||[0,0,0,0,0],i=u.max(+n[3],+(n[4]||0));return{left:-n[1]+i,right:+n[1]+i,bottom:+n[2]+i}},wrap:function(e,i){var a,o=r._outerWidth,s=r._outerHeight,l=e.parent(),d=o(n);if(l.removeClass("k-animation-container-sm"),l.hasClass("k-animation-container"))q(e,i);else{var u=e[0].style.width,c=e[0].style.height,p=h.test(u),f=h.test(c),m=e.hasClass("k-tooltip")||e.is(".k-menu-horizontal.k-context-menu");a=p||f,!p&&(!i||i&&u||m)&&(u=i?o(e)+1:o(e)),(!f&&(!i||i&&c)||e.is(".k-menu-horizontal.k-context-menu"))&&(c=s(e)),e.wrap(t("<div/>").addClass("k-animation-container").attr("role","region").css({width:u,height:c})),l=e.parent(),a&&e.css({width:"100%",height:"100%",boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"})}return d<o(l)&&(l.addClass("k-animation-container-sm"),q(e,i)),l},deepExtend:G,getComputedStyles:Q,isScrollable:function(e){if("false"===e.dataset[r.ns+"scrollable"])return!1;if(e&&e.className&&"string"==typeof e.className&&e.className.indexOf("k-auto-scrollable")>-1)return!0;var t=Q(e,["overflow"]).overflow;return t.indexOf("auto")>-1||t.indexOf("scroll")>-1},scrollLeft:function e(n,a){var r,o,s=p.browser.webkit,l=p.browser.mozilla,d=p.browser.version;if(n instanceof t&&a!==i)n.each((function(t,n){e(n,a)}));else if(r=n instanceof t?n[0]:n){if(o=p.isRtl(n),a===i)return o&&s&&(d<85||p.browser.safari)?r.scrollWidth-r.clientWidth-r.scrollLeft:Math.abs(r.scrollLeft);o&&s&&(d<85||p.browser.safari)?r.scrollLeft=r.scrollWidth-r.clientWidth-a:r.scrollLeft=o&&(l||s)&&a>0?-a:a}},size:function(e){var t,n=0;for(t in e)e.hasOwnProperty(t)&&"toJSON"!=t&&n++;return n},toCamelCase:Y,toHyphens:function(e){return e.replace(/([a-z][A-Z])/g,(function(e){return e.charAt(0)+"-"+e.charAt(1).toLowerCase()}))},getOffset:r.getOffset||function(e,t,i){t||(t="offset");var a=e[t](),r={top:a.top,right:a.right,bottom:a.bottom,left:a.left};if(p.browser.msie&&(p.pointers||p.msPointers)&&!i){var o=p.isRtl(e)?1:-1;r.top-=n.pageYOffset-document.documentElement.scrollTop,r.left-=n.pageXOffset+o*document.documentElement.scrollLeft}return r},parseEffects:r.parseEffects||function(e){var t={};return s("string"==typeof e?e.split(" "):e,(function(e){t[e]=this})),t},toggleClass:r.toggleClass||function(e,t,n,i){return t&&(t=t.split(" "),s(t,(function(t,n){e.toggleClass(n,i)}))),e},directions:r.directions||{left:{reverse:"right"},right:{reverse:"left"},down:{reverse:"up"},up:{reverse:"down"},top:{reverse:"bottom"},bottom:{reverse:"top"},in:{reverse:"out"},out:{reverse:"in"}},Observable:N,Class:F,Template:a,template:a.compile.bind(a),render:a.render.bind(a),stringify:c.stringify.bind(c),eventTarget:re,htmlEncode:function(e){return(""+e).replace(ee,"&amp;").replace(te,"&lt;").replace(ae,"&gt;").replace(ne,"&quot;").replace(ie,"&#39;")},unescape:function(e){var t;try{t=n.decodeURIComponent(e)}catch(n){t=e.replace(/%u([\dA-F]{4})|%([\dA-F]{2})/gi,(function(e,t,n){return String.fromCharCode(parseInt("0x"+(t||n),16))}))}return t},isLocalUrl:function(e){return e&&!oe.test(e)},expr:function(e,t,n){return typeof t==_&&(n=t,t=!1),n=n||"d",(e=e||"")&&"["!==e.charAt(0)&&(e="."+e),t?(e=function(e,t){var n,i,a,r,o=t||"d",s=1;for(i=0,a=e.length;i<a;i++)""!==(r=e[i])&&(0!==(n=r.indexOf("["))&&(-1==n?r="."+r:(s++,r="."+r.substring(0,n)+" || {})"+r.substring(n))),s++,o+=r+(i<a-1?" || {})":")"));return new Array(s).join("(")+o}((e=(e=e.replace(/"([^.]*)\.([^"]*)"/g,'"$1_$DOT$_$2"')).replace(/'([^.]*)\.([^']*)'/g,"'$1_$DOT$_$2'")).split("."),n),e=e.replace(/_\$DOT\$_/g,".")):e=n+e,e},getter:function(e,t){var n=e+t;return S[n]=S[n]||new Function("d","return "+r.expr(e,t))},setter:function(e){return I[e]=I[e]||new Function("d,value",r.expr(e)+"=value")},accessor:function(e){return{get:r.getter(e),set:r.setter(e)}},guid:function(){var e,t,n="",i="abcdef";for(n+=i[Math.floor(Math.random()*Math.floor(i.length))],e=1;e<32;e++)t=16*u.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,"["+r.attr("role")+"=$1],").slice(0,-1)},directiveSelector:function(e){var t=e.split(" ");if(t)for(var n=0;n<t.length;n++)"view"!=t[n]&&(t[n]=t[n].replace(/(\w*)(view|bar|strip|over)$/,"$1-$2"));return t.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=r.widgets.length;t<n;t++)e(r.widgets[t]);r._widgetRegisteredCallbacks.push(e)},logToConsole:function(e,t){var i=n.console;!r.suppressLog&&void 0!==i&&i.log&&i[t||"log"](e)}});var se=N.extend({init:function(t,n){var i=this;KendoLicensing.validatePackage(e),i.element=r.jQuery(t).handler(i),i.angular("init",n),N.fn.init.call(i);var a,s=n?n.dataSource:null;n&&(a=(i.componentTypes||{})[(n||{}).componentType]),s&&(n=o({},n,{dataSource:{}})),n=i.options=o(!0,{},i.options,i.defaults,a||{},n),s&&(n.dataSource=s),i.element.attr(r.attr("role"))||i.element.attr(r.attr("role"),(n.name||"").toLowerCase()),i.element.data("kendo"+n.prefix+n.name,i),i.bind(i.events,n)},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(e){this._clearCssClasses(e),this._setEvents(e),t.extend(this.options,e),this._applyCssClasses()},_setEvents:function(e){for(var t,n=this,i=0,a=n.events.length;i<a;i++)t=n.events[i],n.options[t]&&e[t]&&(n.unbind(t,n.options[t]),n._events&&n._events[t]&&delete n._events[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 r.dimensions(this.element)},size:function(e){if(!e)return this.getSize();this.setSize(e)},setSize:t.noop,_resize:t.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},_applyCssClasses:function(e){var t,n,i,a,o=this.__proto__.options,s=this.options,l=e||this.wrapper||this.element,d=[];if(r.cssProperties.propertyDictionary[o.name]){for(t=0;t<E.length;t++)n=E[t],a=this.options._altname||o.name,o.hasOwnProperty(n)&&("themeColor"===n?(i=r.cssProperties.getValidClass({widget:a,propName:"fillMode",value:s.fillMode}))&&i.length&&d.push(r.cssProperties.getValidClass({widget:a,propName:n,value:s[n],fill:s.fillMode})):d.push(r.cssProperties.getValidClass({widget:a,propName:n,value:s[n]})));l.addClass(d.join(" "))}},_ariaLabel:function(e){var n,i=this.element,a=i.attr("id"),o=t('label[for="'+a+'"]'),s=i.attr(T),l=i.attr(C);e[0]!==i[0]&&(s?e.attr(T,s):l?e.attr(C,l):o.length&&(n=o.attr("id")||this._generateLabelId(o,a||r.guid()),e.attr(C,n)))},_clearCssClasses:function(e,t){var n,i,a,o=this.__proto__.options,s=this.options,l=t||this.wrapper||this.element;if(r.cssProperties.propertyDictionary[o.name])for(n=0;n<E.length;n++)i=E[n],a=this.options._altname||o.name,o.hasOwnProperty(i)&&e.hasOwnProperty(i)&&("themeColor"===i?l.removeClass(r.cssProperties.getValidClass({widget:a,propName:i,value:s[i],fill:s.fillMode})):("fillMode"===i&&l.removeClass(r.cssProperties.getValidClass({widget:a,propName:"themeColor",value:s.themeColor,fill:s.fillMode})),l.removeClass(r.cssProperties.getValidClass({widget:a,propName:i,value:s[i]}))))},_generateLabelId:function(e,t){var n=t+"_label";return e.attr("id",n),n}}),le=se.extend({dataItems:function(){return this.dataSource.flatView()},_angularItems:function(e){var n=this;n.angular(e,(function(){return{elements:n.items(),data:t.map(n.dataItems(),(function(e){return{dataItem:e}}))}}))}});r.dimensions=function(e,t){var n=e[0];return t&&e.css(t),{width:n.offsetWidth,height:n.offsetHeight}},r.notify=d;var de=/template$/i,ue=/^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/,ce=/^\{(\d+)(:[^\}]+)?\}|^\[[A-Za-z_]+\]$/,pe=/([A-Z])/g;function he(e,t){var n;return 0===t.indexOf("data")&&(t=(t=t.substring(4)).charAt(0).toLowerCase()+t.substring(1)),t=t.replace(pe,"-$1"),null===(n=e.getAttribute("data-"+r.ns+t))?n=i:"null"===n?n=null:"true"===n?n=!0:"false"===n?n=!1:g.test(n)&&"mask"!=t&&"format"!=t?n=parseFloat(n):ue.test(n)&&!ce.test(n)&&(n=new Function("return ("+n+")")()),n}function fe(e,n,a){var o,s,l={},d=e.getAttribute("data-"+r.ns+"role");for(o in n)(s=he(e,o))!==i&&(de.test(o)&&"drawer"!=d&&("string"==typeof s?t("#"+s).length?s=r.template(t("#"+s).html()):a&&(s=r.template(a[s])):s=e.getAttribute(o)),l[o]=s);return l}function me(e,n){return t.contains(e,n)?-1:1}function ge(){var e=t(this);return t.inArray(e.attr("data-"+r.ns+"role"),["slider","rangeslider","breadcrumb"])>-1||e.is(":visible")}r.initWidget=function(e,a,o){var s,l,d,u,c,p,h,f,m,g;if(o?o.roles&&(o=o.roles):o=r.ui.roles,p=(e=e.nodeType?e:e[0]).getAttribute("data-"+r.ns+"role")){d=(m=-1===p.indexOf("."))?o[p]:r.getter(p)(n);var v=t(e).data(),b=d?"kendo"+d.fn.options.prefix+d.fn.options.name:"";for(var k in g=m?new RegExp("^kendo.*"+p+"$","i"):new RegExp("^"+b+"$","i"),v)if(k.match(g)){if(k!==b)return v[k];s=v[k]}if(d){for(f=he(e,"dataSource"),a=t.extend({},fe(e,t.extend({},d.fn.options,d.fn.defaults)),a),f&&(a.dataSource=typeof f===_?r.getter(f)(n):f),u=0,c=d.fn.events.length;u<c;u++)(h=he(e,l=d.fn.events[u]))!==i&&(a[l]=r.getter(h)(n));return s?t.isEmptyObject(a)||s.setOptions(a):s=new d(e,a),s}}},r.rolesFromNamespaces=function(e){var t,n,i=[];for(e[0]||(e=[r.ui,r.dataviz.ui]),t=0,n=e.length;t<n;t++)i[t]=e[t].roles;return o.apply(null,[{}].concat(i.reverse()))},r.init=function(e){var n=r.rolesFromNamespaces(D.call(arguments,1));t(e).find("[data-"+r.ns+"role]").addBack().each((function(){r.initWidget(this,{},n)}))},r.destroy=function(e){t(e).find("[data-"+r.ns+"role]").addBack().each((function(){var e=t(this).data();for(var n in e)0===n.indexOf("kendo")&&typeof e[n].destroy===v&&e[n].destroy()}))},r.resize=function(e,n){var i=t(e).find("[data-"+r.ns+"role]").addBack().filter(ge);if(i.length){var a=t.makeArray(i);a.sort(me),t.each(a,(function(){var e=r.widgetInstance(t(this));e&&e.resize(n)}))}},r.parseOptions=fe,o(r.ui,{Widget:se,DataBoundWidget:le,roles:{},progress:function(e,n,i){var a,o,s,l,d,u=e.find(".k-loading-mask"),c=r.support,p=c.browser;d=(i=t.extend({},{width:"100%",height:"100%",top:e.scrollTop(),opacity:!1},i)).opacity?"k-loading-mask k-opaque":"k-loading-mask",n?u.length||(o=(a=c.isRtl(e))?"right":"left",l=r.scrollLeft(e),s=p.webkit&&a?e[0].scrollWidth-e.width()-2*l:0,u=t(r.format("<div class='{0}'><span role='alert' aria-live='polite' class='k-loading-text'>{1}</span><div class='k-loading-image'></div><div class='k-loading-color'></div></div>",d,r.ui.progress.messages.loading)).width(i.width).height(i.height).css("top",i.top).css(o,Math.abs(l)+s).prependTo(e)):u&&u.remove()},plugin:function(e,n,a){var o,s=e.fn.options.name;a=a||"",(n=n||r.ui)[s]=e,n.roles[s.toLowerCase()]=e,o="getKendo"+a+s;var l={name:s="kendo"+a+s,widget:e,prefix:a||""};r.widgets.push(l);for(var d=0,u=r._widgetRegisteredCallbacks.length;d<u;d++)r._widgetRegisteredCallbacks[d](l);t.fn[s]=function(n){var a,o=this;return typeof n===_?(a=D.call(arguments,1),this.each((function(){var e,l,d=t.data(this,s);if(!d)throw new Error(r.format("Cannot call method '{0}' of {1} before it is initialized",n,s));if(typeof(e=d[n])!==v)throw new Error(r.format("Cannot find method '{0}' of {1}",n,s));if((l=e.apply(d,a))!==i)return o=l,!1}))):this.each((function(){return new e(this,n)})),o},t.fn[s].widget=e,t.fn[o]=function(){return this.data(s)}}}),r.ui.progress.messages={loading:"Loading..."};var ve={bind:function(){return this},nullObject:!0,options:{}},_e=se.extend({init:function(e,t){se.fn.init.call(this,e,t),this.element.autoApplyNS(),this.wrapper=this.element,this.element.addClass("km-widget")},destroy:function(){se.fn.destroy.call(this),this.element.kendoDestroy()},options:{prefix:"Mobile"},events:[],view:function(){var e=this.element.closest(r.roleSelector("view splitview modalview drawer"));return r.widgetInstance(e,r.mobile.ui)||ve},viewHasNativeScrolling:function(){var e=this.view();return e&&e.options.useNativeScrolling},container:function(){var e=this.element.closest(r.roleSelector("view layout modalview drawer splitview"));return r.widgetInstance(e.eq(0),r.mobile.ui)||ve}});function be(e,n){var i=e.nodeName.toLowerCase();return(/input|select|textarea|button|object/.test(i)?!e.disabled:"a"===i&&e.href||n)&&function(e){return t.expr.pseudos.visible(e)&&!t(e).parents().addBack().filter((function(){return"hidden"===t.css(this,"visibility")})).length}(e)}o(r.mobile,{init:function(e){r.init(e,r.mobile.ui,r.ui,r.dataviz.ui)},appLevelNativeScrolling:function(){return r.mobile.application&&r.mobile.application.options&&r.mobile.application.options.useNativeScrolling},roles:{},ui:{Widget:_e,DataBoundWidget:le.extend(_e.prototype),roles:{},plugin:function(e){r.ui.plugin(e,r.mobile.ui,"Mobile")}}}),G(r.dataviz,{init:function(e){r.init(e,r.dataviz.ui)},ui:{roles:{},themes:{},views:[],plugin:function(e){r.ui.plugin(e,r.dataviz.ui)}},roles:{}}),r.touchScroller=function(e,n){return n||(n={}),n.useNative=!0,t(e).map((function(e,i){return i=t(i),!(!p.kineticScrollNeeded||!r.mobile.ui.Scroller||i.data("kendoMobileScroller"))&&(i.kendoMobileScroller(n),i.data("kendoMobileScroller"))}))[0]},r.preventDefault=function(e){e.preventDefault()},r.widgetInstance=function(e,t){var i,a,o=e.data(r.ns+"role"),s=[],l=e.data("kendoView");if(o){if("content"===o&&(o="scroller"),"editortoolbar"===o){var d=e.data("kendoEditorToolbar");if(d)return d}if("view"===o&&l)return l;if(t)if(t[0])for(i=0,a=t.length;i<a;i++)s.push(t[i].roles[o]);else s.push(t.roles[o]);else s=[r.ui.roles[o],r.dataviz.ui.roles[o],r.mobile.ui.roles[o]];for(o.indexOf(".")>=0&&(s=[r.getter(o)(n)]),i=0,a=s.length;i<a;i++){var u=s[i];if(u){var c=e.data("kendo"+u.fn.options.prefix+u.fn.options.name);if(c)return c}}}},r.onResize=function(e){var i=e;return p.mobileOS.android&&(i=function(){setTimeout(e,600)}),t(n).on(p.resize,i),i},r.unbindResize=function(e){t(n).off(p.resize,e)},r.attrValue=function(e,t){return e.data(r.ns+t)},r.days={Sunday:0,Monday:1,Tuesday:2,Wednesday:3,Thursday:4,Friday:5,Saturday:6},t.extend(t.expr.pseudos,{kendoFocusable:function(e){var n=t.attr(e,"tabindex");return be(e,!isNaN(n)&&n>-1)}});var ke=["mousedown","mousemove","mouseenter","mouseleave","mouseover","mouseout","mouseup","click"],we={setupMouseMute:function(){var e=0,n=ke.length,i=document.documentElement;if(!we.mouseTrap&&p.eventCapture){we.mouseTrap=!0,we.bustClick=!1,we.captureMouse=!1;for(var a=function(e){we.captureMouse&&("click"===e.type?we.bustClick&&!t(e.target).is("label, input, [data-rel=external]")&&(e.preventDefault(),e.stopPropagation()):e.stopPropagation())};e<n;e++)i.addEventListener(ke[e],a,!0)}},muteMouse:function(e){we.captureMouse=!0,e.data.bustClick&&(we.bustClick=!0),clearTimeout(we.mouseTrapTimeoutID)},unMuteMouse:function(){clearTimeout(we.mouseTrapTimeoutID),we.mouseTrapTimeoutID=setTimeout((function(){we.captureMouse=!1,we.bustClick=!1}),400)}},ye={down:"touchstart mousedown",move:"mousemove touchmove",up:"mouseup touchend touchcancel",cancel:"mouseleave touchcancel"};p.touch&&(p.mobileOS.ios||p.mobileOS.android)?ye={down:"touchstart",move:"touchmove",up:"touchend touchcancel",cancel:"touchcancel"}:p.pointers?ye={down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel pointerleave"}:p.msPointers&&(ye={down:"MSPointerDown",move:"MSPointerMove",up:"MSPointerUp",cancel:"MSPointerCancel MSPointerLeave"}),p.msPointers&&!("onmspointerenter"in n)&&t.each({MSPointerEnter:"MSPointerOver",MSPointerLeave:"MSPointerOut"},(function(e,n){t.event.special[e]={delegateType:n,bindType:n,handle:function(e){var i,a=this,r=e.relatedTarget,o=e.handleObj;return r&&(r===a||t.contains(a,r))||(e.type=o.origType,i=o.handler.apply(this,arguments),e.type=n),i}}}));var xe=function(e){return ye[e]||e},Ce=/([^ ]+)/g;r.applyEventMap=function(e,t){return e=e.replace(Ce,xe),t&&(e=e.replace(Ce,"$1."+t)),e},r.keyDownHandler=function(e,t){var n=t._events.kendoKeydown;if(!n)return!0;n=n.slice(),e.sender=t,e.preventKendoKeydown=!1;for(var i=0,a=n.length;i<a;i++)n[i].call(t,e);return!e.preventKendoKeydown};var Te=t.fn.on;function Se(e,t){return new Se.fn.init(e,t)}A(!0,Se,t),Se.fn=Se.prototype=new t,Se.fn.constructor=Se,Se.fn.init=function(e,n){return n&&n instanceof t&&!(n instanceof Se)&&(n=Se(n)),t.fn.init.call(this,e,n,Ie)},Se.fn.init.prototype=Se.fn;var Ie=Se(document);o(Se.fn,{handler:function(e){return this.data("handler",e),this},autoApplyNS:function(e){return this.data("kendoNS",e||r.guid()),this},on:function(){var e=this,t=e.data("kendoNS");if(1===arguments.length)return Te.call(e,arguments[0]);var n=e,i=D.call(arguments);typeof i[i.length-1]===x&&i.pop();var a=i[i.length-1],o=r.applyEventMap(i[0],t);if(p.mouseAndTouchPresent&&o.search(/mouse|click/)>-1&&this[0]!==document.documentElement){we.setupMouseMute();var s=2===i.length?null:i[1],l=o.indexOf("click")>-1&&o.indexOf("touchend")>-1;Te.call(this,{touchstart:we.muteMouse,touchend:we.unMuteMouse},s,{bustClick:l})}if(-1!==arguments[0].indexOf("keydown")&&i[1]&&i[1].options){i[0]=o;var d=i[1],u=i[i.length-1];return i[i.length-1]=function(e){if(r.keyDownHandler(e,d))return u.apply(this,[e])},Te.apply(e,i),e}return typeof a===_&&(n=e.data("handler"),a=n[a],i[i.length-1]=function(e){a.call(n,e)}),i[0]=o,Te.apply(e,i),e},kendoDestroy:function(e){return(e=e||this.data("kendoNS"))&&this.off("."+e),this}}),r.jQuery=Se,r.eventMap=ye,r.timezone=function(){var e={Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},t={Sun:0,Mon:1,Tue:2,Wed:3,Thu:4,Fri:5,Sat:6};function n(n,i){var a,r,o,s=i[3],l=i[4],d=i[5],u=i[8];return u||(i[8]=u={}),u[n]?u[n]:(isNaN(l)?0===l.indexOf("last")?(a=new Date(Date.UTC(n,e[s]+1,1,d[0]-24,d[1],d[2],0)),r=t[l.substr(4,3)],o=a.getUTCDay(),a.setUTCDate(a.getUTCDate()+r-o-(r>o?7:0))):l.indexOf(">=")>=0?(a=new Date(Date.UTC(n,e[s],l.substr(5),d[0],d[1],d[2],0)),r=t[l.substr(0,3)],o=a.getUTCDay(),a.setUTCDate(a.getUTCDate()+r-o+(r<o?7:0))):l.indexOf("<=")>=0&&(a=new Date(Date.UTC(n,e[s],l.substr(5),d[0],d[1],d[2],0)),r=t[l.substr(0,3)],o=a.getUTCDay(),a.setUTCDate(a.getUTCDate()+r-o-(r>o?7:0))):a=new Date(Date.UTC(n,e[s],l,d[0],d[1],d[2],0)),u[n]=a)}function i(e,t,i){if(!(t=t[i])){var a=i.split(":"),r=0;return a.length>1&&(r=60*a[0]+Number(a[1])),[-1e6,"max","-","Jan",1,[0,0,0],r,"-"]}var o=new Date(e).getUTCFullYear();t=jQuery.grep(t,(function(e){var t=e[0],n=e[1];return t<=o&&(n>=o||t==o&&"only"==n||"max"==n)})),t.push(e),t.sort((function(e,t){return"number"!=typeof e&&(e=Number(n(o,e))),"number"!=typeof t&&(t=Number(n(o,t))),e-t}));var s=t[jQuery.inArray(e,t)-1]||t[t.length-1];return isNaN(s)?s:null}function a(e,t,n,a){typeof e!=b&&(e=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));var r=function(e,t,n){var i=t[n];if("string"==typeof i&&(i=t[i]),!i)throw new Error('Timezone "'+n+'" is either incorrect, or kendo.timezones.min.js is not included.');for(var a=i.length-1;a>=0;a--){var r=i[a][3];if(r&&e>r)break}var o=i[a+1];if(!o)throw new Error('Timezone "'+n+'" not found on '+e+".");return o}(e,t,a);return{zone:r,rule:i(e,n,r[1])}}return{zones:{},rules:{},offset:function(e,t){if("Etc/UTC"==t||"Etc/GMT"==t)return 0;var n=a(e,this.zones,this.rules,t),i=n.zone,o=n.rule;return r.parseFloat(o?i[0]-o[6]:i[0])},convert:function(e,t,n){var i,a=n;typeof t==_&&(t=this.offset(e,t)),typeof n==_&&(n=this.offset(e,n));var r=e.getTimezoneOffset(),o=(e=new Date(e.getTime()+6e4*(t-n))).getTimezoneOffset();return typeof a==_&&(a=this.offset(e,a)),i=o-r+(n-a),new Date(e.getTime()+6e4*i)},apply:function(e,t){return this.convert(e,e.getTimezoneOffset(),t)},remove:function(e,t){return this.convert(e,t,e.getTimezoneOffset())},abbr:function(e,t){var n=a(e,this.zones,this.rules,t),i=n.zone,r=n.rule,o=i[2];return o.indexOf("/")>=0?o.split("/")[r&&+r[6]?1:0]:o.indexOf("%s")>=0?o.replace("%s",r&&"-"!=r[7]?r[7]:""):o},toLocalDate:function(e){return this.apply(new Date(e),"Etc/UTC")}}}(),r.date=function(){var e=6e4,t=864e5;function n(e,t){return 0===t&&23===e.getHours()&&(e.setHours(e.getHours()+2),!0)}function a(e,t,i){var a=e.getHours();i=i||1,t=(t-e.getDay()+7*i)%7,e.setDate(e.getDate()+t),n(e,a)}function o(e,t,n){return a(e=new Date(e),t,n),e}function s(e){return new Date(e.getFullYear(),e.getMonth(),1)}function l(e,n){var i=new Date(e.getFullYear(),0,1,-6),a=function(e,t){return 1!==t?c(o(e,t,-1),4):c(e,4-(e.getDay()||7))}(e,n),r=a.getTime()-i.getTime(),s=Math.floor(r/t);return 1+Math.floor(s/7)}function d(e){return n(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0,0),0),e}function u(e){return f(e).getTime()-d(f(e))}function c(e,i){var a=e.getHours();return p(e=new Date(e),i*t),n(e,a),e}function p(t,n,i){var a,r=t.getTimezoneOffset();t.setTime(t.getTime()+n),i||(a=t.getTimezoneOffset()-r,t.setTime(t.getTime()+a*e))}function h(){return d(new Date)}function f(e){var t=new Date(1980,1,1,0,0,0);return e&&t.setHours(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()),t}function m(e,t){var n=new Date(e);return new Date(n.setFullYear(n.getFullYear()+t))}return{adjustDST:n,dayOfWeek:o,setDayOfWeek:a,getDate:d,isInDateRange:function(e,n,i){var a,r=n.getTime(),o=i.getTime();return r>=o&&(o+=t),(a=e.getTime())>=r&&a<=o},isInTimeRange:function(e,n,i){var a,r=u(n),o=u(i);return!e||r==o||(n>=i&&(i+=t),r>(a=u(e))&&(a+=t),o<r&&(o+=t),a>=r&&a<=o)},isToday:function(e){return d(e).getTime()==h().getTime()},nextDay:function(e){return c(e,1)},previousDay:function(e){return c(e,-1)},toUtcTime:function(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())},MS_PER_DAY:t,MS_PER_HOUR:36e5,MS_PER_MINUTE:e,setTime:p,setHours:function(e,t){return n(e=new Date(e.getFullYear(),e.getMonth(),e.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()),t.getHours()),e},addDays:c,today:h,toInvariantTime:f,firstDayOfMonth:s,lastDayOfMonth:function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,0),n=s(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},weekInYear:function(e,t){t===i&&(t=r.culture().calendar.firstDay);var n=c(e,-7),a=c(e,7),o=l(e,t);return 0===o?l(n,t)+1:53===o&&l(a,t)>1?1:o},getMilliseconds:u,firstDayOfYear:function(e){return new Date(e.getFullYear(),0,1)},lastDayOfYear:function(e){return new Date(e.getFullYear(),11,31)},nextYear:function(e){return m(e,1)},previousYear:function(e){return m(e,-1)}}}(),r.stripWhitespace=function(e){if(document.createNodeIterator)for(var 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(var n=0;n<e.childNodes.length;n++){var i=e.childNodes[n];3!=i.nodeType||/\S/.test(i.nodeValue)||(e.removeChild(i),n--),1==i.nodeType&&r.stripWhitespace(i)}};var De=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(e){setTimeout(e,1e3/60)};r.animationFrame=function(e){De.call(n,e)};var Ee=[];r.queueAnimation=function(e){Ee[Ee.length]=e,1===Ee.length&&r.runNextAnimation()},r.runNextAnimation=function(){r.animationFrame((function(){Ee[0]&&(Ee.shift()(),Ee[0]&&r.runNextAnimation())}))},r.parseQueryStringParams=function(e){for(var t={},n=(e.split("?")[1]||"").split(/&|=/),i=n.length,a=0;a<i;a+=2)""!==n[a]&&(t[decodeURIComponent(n[a])]=decodeURIComponent(n[a+1]));return t},r.elementUnderCursor=function(e){if(void 0!==e.x.client)return document.elementFromPoint(e.x.client,e.y.client)},r.wheelDeltaY=function(e){var t,n=e.originalEvent,a=n.wheelDeltaY;return n.wheelDelta?(a===i||a)&&(t=n.wheelDelta):n.detail&&n.axis===n.VERTICAL_AXIS&&(t=10*-n.detail),t},r.throttle=function(e,t){var n,i=0;if(!t||t<=0)return e;var a=function(){var a=this,r=+new Date-i,o=arguments;function s(){e.apply(a,o),i=+new Date}if(!i)return s();n&&clearTimeout(n),r>t?s():n=setTimeout(s,t-r)};return a.cancel=function(){clearTimeout(n)},a},r.caret=function(e,n,a){var r,o=n!==i;if(a===i&&(a=n),e[0]&&(e=e[0]),!o||!e.disabled){try{if(e.selectionStart!==i)if(o){e.focus();var s=p.mobileOS;s.wp||s.android?setTimeout((function(){e.setSelectionRange(n,a)}),0):e.setSelectionRange(n,a)}else n=[e.selectionStart,e.selectionEnd];else if(document.selection)if(t(e).is(":visible")&&e.focus(),r=e.createTextRange(),o)r.collapse(!0),r.moveStart("character",n),r.moveEnd("character",a-n),r.select();else{var l,d,u=r.duplicate();r.moveToBookmark(document.selection.createRange().getBookmark()),u.setEndPoint("EndToStart",r),d=(l=u.text.length)+r.text.length,n=[l,d]}}catch(e){n=[]}return n}},r.compileMobileDirective=function(e,t){var i=n.angular;return e.attr("data-"+r.ns+"role",e[0].tagName.toLowerCase().replace("kendo-mobile-","").replace("-","")),i.element(e).injector().invoke(["$compile",function(n){n(e)(t),/^\$(digest|apply)$/.test(t.$$phase)||t.$digest()}]),r.widgetInstance(e,r.mobile.ui)},r.antiForgeryTokens=function(){var e={},n=t("meta[name=csrf-token],meta[name=_csrf]").attr("content"),a=t("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return t("input[name^='__RequestVerificationToken']").each((function(){e[this.name]=this.value})),a!==i&&n!==i&&(e[a]=n),e},r.cycleForm=function(e){var t=e.find("input, .k-widget, .k-dropdownlist, .k-combobox").first(),n=e.find("button, .k-button").last();function i(e){var t=r.widgetInstance(e);t&&t.focus?t.focus():e.trigger("focus")}n.on("keydown",(function(e){e.keyCode!=r.keys.TAB||e.shiftKey||(e.preventDefault(),i(t))})),t.on("keydown",(function(e){e.keyCode==r.keys.TAB&&e.shiftKey&&(e.preventDefault(),i(n))}))},r.focusElement=function(e){var i=[],a=e.parentsUntil("body").filter((function(e,t){return"visible"!==r.getComputedStyles(t,["overflow"]).overflow})).add(n);a.each((function(e,n){i[e]=t(n).scrollTop()}));try{e[0].setActive()}catch(t){e[0].focus()}a.each((function(e,n){t(n).scrollTop(i[e])}))},r.focusNextElement=function(){if(document.activeElement){var e=t(":kendoFocusable"),n=e.index(document.activeElement);if(n>-1)(e[n+1]||e[0]).focus()}},r.trim=function(e){return e?e.toString().trim():""},r.getWidgetFocusableElement=function(e){var n=e.closest(":kendoFocusable"),i=r.widgetInstance(e);return n.length?n:i?"Editor"===i.options.name?t(i.body):i.wrapper.find(":kendoFocusable").first():e},r.addAttribute=function(e,t,n){var i=e.attr(t)||"";i.indexOf(n)<0&&e.attr(t,(i+" "+n).trim())},r.removeAttribute=function(e,t,n){var i=e.attr(t)||"";e.attr(t,i.replace(n,"").trim())},r.toggleAttribute=function(e,t,n){(e.attr(t)||"").indexOf(n)<0?r.addAttribute(e,t,n):r.removeAttribute(e,t,n)},r.matchesMedia=function(e){var t=r._bootstrapToMedia(e)||e;return p.matchMedia&&n.matchMedia(t).matches},r._bootstrapToMedia=function(e){return{xs:"(max-width: 576px)",sm:"(min-width: 576px)",md:"(min-width: 768px)",lg:"(min-width: 992px)",xl:"(min-width: 1200px)"}[e]},r.fileGroupMap={audio:[".aif",".iff",".m3u",".m4a",".mid",".mp3",".mpa",".wav",".wma",".ogg",".wav",".wma",".wpl"],video:[".3g2",".3gp",".avi",".asf",".flv",".m4u",".rm",".h264",".m4v",".mkv",".mov",".mp4",".mpg",".rm",".swf",".vob",".wmv"],image:[".ai",".dds",".heic",".jpe","jfif",".jif",".jp2",".jps",".eps",".bmp",".gif",".jpeg",".jpg",".png",".ps",".psd",".svg",".svgz",".tif",".tiff"],txt:[".doc",".docx",".log",".pages",".tex",".wpd",".wps",".odt",".rtf",".text",".txt",".wks"],presentation:[".key",".odp",".pps",".ppt",".pptx"],data:[".xlr",".xls",".xlsx"],programming:[".tmp",".bak",".msi",".cab",".cpl",".cur",".dll",".dmp",".drv",".icns",".ico",".link",".sys",".cfg",".ini",".asp",".aspx",".cer",".csr",".css",".dcr",".htm",".html",".js",".php",".rss",".xhtml"],pdf:[".pdf"],config:[".apk",".app",".bat",".cgi",".com",".exe",".gadget",".jar",".wsf"],zip:[".7z",".cbr",".gz",".sitx",".arj",".deb",".pkg",".rar",".rpm",".tar.gz",".z",".zip",".zipx"],"disc-image":[".dmg",".iso",".toast",".vcd",".bin",".cue",".mdf"]},r.getFileGroup=function(e,t){var n=r.fileGroupMap,a=Object.keys(n),o="file";if(e===i||!e.length)return o;for(var s=0;s<a.length;s+=1){if(n[a[s]].indexOf(e.toLowerCase())>-1)return t?"file-"+a[s]:a[s]}return o},r.getFileSizeMessage=function(e){if(0===e)return"0 Byte";var t=parseInt(Math.floor(Math.log(e)/Math.log(1024)),10);return Math.round(e/Math.pow(1024,t),2)+" "+["Bytes","KB","MB","GB","TB"][t]},r.selectorFromClasses=function(e){return"."+e.split(" ").join(".")};var Ae=["base","primary","secondary","tertiary","inherit","info","success","warning","error","dark","light","inverse"],Fe=["solid","outline","flat"],ze=["rectangle","square"],Pe=[["small","sm"],["medium","md"],["large","lg"]],He=[["small","sm"],["medium","md"],["large","lg"]],Ne=["fixed","static","sticky","absolute"],Re=["both","horizontal","vertical"],Oe=["auto","hidden","visible","scroll","clip"];r.cssProperties=function(){var e={};function t(t,n,i){e[t]||(e[t]={}),e[t][n]=i||n}function n(e,n){for(var i=0;i<n.length;i++)l(n[i])?t(e,n[i][0],n[i][1]):t(e,n[i])}return n("themeColor",Ae),n("fillMode",Fe),n("shape",ze),n("size",Pe),n("positionMode",Ne),n("rounded",He),n("resize",Re),n("overflow",Oe),{positionModeValues:Ne,roundedValues:He,sizeValues:Pe,shapeValues:ze,fillModeValues:Fe,themeColorValues:Ae,defaultValues:e,propertyDictionary:{},registerValues:function(e,t){var n,i,a,o,s,d,u=r.cssProperties.propertyDictionary;for(n=0;n<t.length;n++)for(a=t[n].prop,s=t[n].values,u[e][a]||(u[e][a]={}),o=u[e][a],i=0;i<s.length;i++)d=s[i],l(s[i])?o[d[0]]=d[1]:o[d]=d},getValidClass:function(e){var t,n,i=e.widget,a=e.propName,o=e.value,s=e.fill,l=r.cssProperties,d=l.defaultValues[a],u=l.propertyDictionary[i];return u&&(n=(t=u[a])&&t[o]||d[o])?("themeColor"===a?u.prefix+s+"-":"positionMode"===a?"k-pos-":"rounded"===a?"k-rounded-":"resize"===a?"k-resize-":"overflow"===a?"k-overflow-":u.prefix)+n:""},registerPrefix:function(e,t){var n=r.cssProperties.propertyDictionary;n[e]||(n[e]={}),n[e].prefix=t}}}(),r.registerCssClass=function(e,t,n){r.propertyToCssClassMap[e]||(r.propertyToCssClassMap[e]={}),r.propertyToCssClassMap[e][t]=n||t},r.registerCssClasses=function(e,t){for(var n=0;n<t.length;n++)l(t[n])?r.registerCssClass(e,t[n][0],t[n][1]):r.registerCssClass(e,t[n])},r.getValidCssClass=function(e,t,n){var i=r.propertyToCssClassMap[t][n];if(i)return e+i},r.propertyToCssClassMap={},r.registerCssClasses("themeColor",Ae),r.registerCssClasses("fill",Fe),r.registerCssClasses("shape",ze),r.registerCssClasses("size",Pe),r.registerCssClasses("positionMode",Ne),r.whenAll=function(e){var n,i=1==arguments.length&&Array.isArray(e)?e:Array.prototype.slice.call(arguments),a=i.length,o=a,s=t.Deferred(),l=0,d=0,u=Array(a),c=Array(a),p=Array(a);function h(e,t,n){return function(){n!=i&&d++,s.notifyWith(t[e]=this,n[e]=Array.prototype.slice.call(arguments)),--o||s[(d?"reject":"resolve")+"With"](t,n)}}for(;l<a;l++)(n=i[l])&&r.isFunction(n.promise)?n.promise().done(h(l,p,i)).fail(h(l,u,c)):(s.notifyWith(this,n),--o);return o||s.resolveWith(p,i),s.promise()},function(){function e(e,n,i,a){var o=t("<form>").attr({action:i,method:"POST",target:a}),s=r.antiForgeryTokens();s.fileName=n;var l=e.split(";base64,");for(var d in s.contentType=l[0].replace("data:",""),s.base64=l[1],s)s.hasOwnProperty(d)&&t("<input>").attr({value:s[d],name:d,type:"hidden"}).appendTo(o);o.appendTo("body").submit().remove()}var i=document.createElement("a"),a="download"in i&&!r.support.browser.edge;function o(e,t){var n=e;if("string"==typeof e){for(var i=e.split(";base64,"),a=i[0],r=atob(i[1]),o=new Uint8Array(r.length),s=0;s<r.length;s++)o[s]=r.charCodeAt(s);n=new Blob([o.buffer],{type:a})}navigator.msSaveBlob(n,t)}function s(e,t){n.Blob&&e instanceof Blob&&(e=URL.createObjectURL(e)),i.download=t,i.href=e;var a=document.createEvent("MouseEvents");a.initMouseEvent("click",!0,!1,n,0,0,0,0,0,!1,!1,!1,!1,0,null),i.dispatchEvent(a),setTimeout((function(){URL.revokeObjectURL(e)}))}r.saveAs=function(t){var n=e;t.forceProxy||(a?n=s:navigator.msSaveBlob&&(n=o)),n(t.dataURI,t.fileName,t.proxyURL,t.proxyTarget)}}(),r.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},r.getSeriesColors=function(){var e=t('<div class="k-var--series-a"></div><div class="k-var--series-b"></div><div class="k-var--series-c"></div><div class="k-var--series-d"></div><div class="k-var--series-e"></div><div class="k-var--series-f"></div>'),n=[];return e.appendTo(t("body")),e.each((function(e,i){n.push(t(i).css("background-color"))})),e.remove(),n},r.isElement=function(e){return e instanceof Element||e instanceof HTMLDocument},r.defaults=r.defaults||{},r.setDefaults=function(e,t){var n=e.split("."),a=r.defaults;e=n.pop(),n.forEach((function(e){a[e]===i&&(a[e]={}),a=a[e]})),t.constructor===Object?a[e]=G({},a[e],t):a[e]=t},r.class2type={},jQuery.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){r.class2type["[object "+t+"]"]=t.toLowerCase()})),r.type=function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?r.class2type[Object.prototype.toString.call(e)]||"object":typeof e};var KendoLicensing={validatePackage:function(){},setScriptKey:function(){}};n.KendoLicensing={setScriptKey:KendoLicensing.setScriptKey}}(jQuery,window);!function(e,t){var n=window.kendo,i=e.extend,a="\r\n",r="\r\n\r\n",o=n.isFunction,s={eq:"eq",neq:"ne",gt:"gt",gte:"ge",lt:"lt",lte:"le",contains:"substringof",doesnotcontain:"substringof",endswith:"endswith",startswith:"startswith",isnull:"eq",isnotnull:"ne",isnullorempty:"eq",isnotnullorempty:"ne",isempty:"eq",isnotempty:"ne"},l=i({},s,{contains:"contains"}),d={pageSize:e.noop,page:e.noop,filter:function(e,t,n){t&&(t=c(t,n))&&(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)}},u={read:{dataType:"jsonp"}};function c(e,t){var i,a,r,o,d,u,p,h,f=[],m=e.logic||"and",g=e.filters;for(i=0,a=g.length;i<a;i++)r=(e=g[i]).field,p=e.value,u=e.operator,e.filters?e=c(e,t):(h=e.ignoreCase,r=r.replace(/\./g,"/"),e=s[u],t&&(e=l[u]),"isnullorempty"===u?e=n.format("{0} {1} null or {0} {1} ''",r,e):"isnotnullorempty"===u?e=n.format("{0} {1} null and {0} {1} ''",r,e):"isnull"===u||"isnotnull"===u?e=n.format("{0} {1} null",r,e):"isempty"===u||"isnotempty"===u?e=n.format("{0} {1} ''",r,e):e&&undefined!==p&&("string"===(o=n.type(p))?(d="'{1}'",p=p.replace(/'/g,"''"),!0===h&&(r="tolower("+r+")")):"date"===o?t?(d="{1:yyyy-MM-ddTHH:mm:ss+00:00}",p=n.timezone.apply(p,"Etc/UTC")):d="datetime'{1:yyyy-MM-ddTHH:mm:ss}'":d="{1}",e.length>3?"substringof"!==e?d="{0}({2},"+d+")":(d="{0}("+d+",{2})","doesnotcontain"===u&&(t?(d="{0}({2},'{1}') eq -1",e="indexof"):d+=" eq false")):d="{2} {0} "+d,e=n.format(d,e,p,r))),f.push(e);return e=f.join(" "+m+" "),f.length>1&&(e="("+e+")"),e}function p(e){for(var t in e)0===t.indexOf("@odata")&&delete e[t]}function h(){return Math.floor(65536*(1+Math.random())).toString(16).substr(1)}function f(e){return e+h()+"-"+h()+"-"+h()}function m(e,t){var n="\r\n--"+e;return t&&(n+="--"),n}function g(e,t,i,a){var r=e.options[a].url,s=n.format("{0} ",i);return o(r)?s+r(t):s+r}function v(e,t){var n="";return n+=m(e,!1),n+="\r\nContent-Type: application/http",n+="\r\nContent-Transfer-Encoding: binary",n+="\r\nContent-ID: "+t}function _(e,t,i,o,s,l,d){var u="";return u+=function(e,t){var n="";return n+="--"+e+a,n+="Content-Type: multipart/mixed; boundary="+t+a}(t,i),u+=function(e,t,i,o,s,l){for(var d,u,c="",p=0;p<e.length;p++)c+=v(t,i),c+=r+g(s,e[p],s.options[o].type,o)+" HTTP/1.1",l||(c+=(d=e[p],u=void 0,u="",u+="\r\nContent-Type: application/json;odata=minimalmetadata",u+="\r\nPrefer: return=representation",u+=r+n.stringify(d))),c+=a,i++;return c}(e,i,o,l,s,d),u+=m(i,!0),u+=a}i(!0,n.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,i){var a,r,o,s;if(e=e||{},t=t||"read",s=(s=(this.options||u)[t])?s.dataType:"json","read"===t)for(o in a={$inlinecount:"allpages"},"json"!=s&&(a.$format="json"),e)d[o]?d[o](a,e[o],i):a[o]=e[o];else{if("json"!==s)throw new Error("Only json dataType can be used for "+t+" operation.");if("destroy"!==t){for(o in e)"number"==typeof(r=e[o])&&(e[o]=r+"");a=n.stringify(e)}}return a}}}}),i(!0,n.data,{schemas:{"odata-v4":{type:"json",data:function(t){if(Array.isArray(t)){for(var n=0;n<t.length;n++)p(t[n]);return t}return p(t=e.extend({},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 i=n.data.transports.odata.parameterMap(e,t,!0);return"read"==t&&(i.$count=!0,delete i.$inlinecount),i&&i.$filter&&(i.$filter=i.$filter.replace(/('[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}')/gi,(function(e){return e.substring(1,e.length-1)}))),i},submit:function(t){var a=function(e,t){var n=i({},e.options.batch),a=f("sf_batch_"),r="",s=0,l=e.options.batch.url,d=f("sf_changeset_");return n.type=e.options.batch.type,n.url=o(l)?l():l,n.headers=i(n.headers||{},{"Content-Type":"multipart/mixed; boundary="+a}),t.updated.length&&(r+=_(t.updated,a,d,s,e,"update",!1),s+=t.updated.length,d=f("sf_changeset_")),t.destroyed.length&&(r+=_(t.destroyed,a,d,s,e,"destroy",!0),s+=t.destroyed.length,d=f("sf_changeset_")),t.created.length&&(r+=_(t.created,a,d,s,e,"create",!1)),r+=m(a,!0),n.data=r,n}(this,t.data),r=t.data;(r.updated.length||r.destroyed.length||r.created.length)&&e.ajax(i(!0,{},{success:function(e){var i,a=function(e){var t,i,a,r,o,s=e.match(/--changesetresponse_[a-z0-9-]+$/gm),l=0,d=[];d.push({models:[],passed:!0});for(var u=0;u<s.length;u++)(r=s[u]).lastIndexOf("--",r.length-1)?u<s.length-1&&d.push({models:[],passed:!0}):(l=l?e.indexOf(r,l+r.length):e.indexOf(r),i=(t=e.substring(l,e.indexOf("--",l+1))).match(/^HTTP\/1\.\d (\d{3}) (.*)$/gm).pop(),(a=n.parseFloat(i.match(/\d{3}/g).pop()))>=200&&a<=299?(o=t.match(/\{.*\}/gm))&&d[d.length-1].models.push(JSON.parse(o[0])):d[d.length-1].passed=!1);return d}(e),o=0;r.updated.length&&((i=a[o]).passed&&t.success(i.models.length?i.models:[],"update"),o++),r.destroyed.length&&((i=a[o]).passed&&t.success([],"destroy"),o++),r.created.length&&(i=a[o]).passed&&t.success(i.models,"create")},error:function(e,n,i){t.error(e,n,i)}},a))}}}})}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=Array.isArray,a=e.isPlainObject,r=e.map,o=e.each,s=e.extend,l=n.getter,d=n.Class.extend({init:function(e){var t=this,l=e.total,d=e.model,u=e.parse,c=e.errors,p=e.serialize,h=e.data;if(d){if(a(d)){var f=e.modelBase||n.data.Model;d.fields&&o(d.fields,(function(e,i){a(i)&&i.field?n.isFunction(i.field)||(i=s(i,{field:t.getter(i.field)})):i={field:t.getter(i)},d.fields[e]=i}));var m=d.id;if(m){var g={};g[t.xpathToMember(m,!0)]={field:t.getter(m)},d.fields=s(g,d.fields),d.id=t.xpathToMember(m)}d=f.define(d)}t.model=d}if(l&&("string"==typeof l?(l=t.getter(l),t.total=function(e){return parseInt(l(e),10)}):"function"==typeof l&&(t.total=l)),c&&("string"==typeof c?(c=t.getter(c),t.errors=function(e){return c(e)||null}):"function"==typeof c&&(t.errors=c)),h&&("string"==typeof h?(h=t.xpathToMember(h),t.data=function(e){var n,a=t.evaluate(e,h);return a=i(a)?a:[a],t.model&&d.fields?(n=new t.model,r(a,(function(e){if(e){var t,i={};for(t in d.fields)i[t]=n._parse(t,d.fields[t].field(e));return i}}))):a}):"function"==typeof h&&(t.data=h)),"function"==typeof u){var v=t.parse;t.parse=function(e){var n=u.call(t,e);return v.call(t,n)}}"function"==typeof p&&(t.serialize=p)},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 t,n,a,r,o,s,l,d={},u=e.attributes,c=u.length;for(l=0;l<c;l++)d["@"+(s=u[l]).nodeName]=s.nodeValue;for(n=e.firstChild;n;n=n.nextSibling)3===(a=n.nodeType)||4===a?d["#text"]=n.nodeValue:1===a&&(t=this.parseDOM(n),o=d[r=n.nodeName],i(o)?o.push(t):o=undefined!==o?[o,t]:t,d[r]=o);return d},evaluate:function(e,t){for(var n,a,r,o,s,l=t.split(".");n=l.shift();)if(e=e[n],i(e)){for(a=[],t=l.join("."),s=0,r=e.length;s<r;s++)o=this.evaluate(e[s],t),o=i(o)?o:[o],a.push.apply(a,o);return a}return e},parse:function(t){var n,i,a={};return n=t.documentElement||e.parseXML(t).documentElement,i=this.parseDOM(n),a[n.nodeName]=i,a},xpathToMember:function(e,t){return e?(e=e.replace(/^\//,"").replace(/\//g,".")).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:d,readers:{xml:d}})}(window.kendo.jQuery);!function(e,t){var n,i=e.extend,a=e.isPlainObject,r=e.isEmptyObject,o=Array.isArray,s=e.grep,l=e.ajax,d=e.each,u=e.noop,c=window.kendo,p=c.isFunction,h=c.Observable,f=c.Class,m="string",g="function",v="create",_="read",b="update",k="destroy",w="change",y="sync",x="get",C="error",T="requestStart",S="progress",I="requestEnd",D="itemsLoaded",E="itemLoad",A=[v,_,b,k],F=function(e){return e},z=c.getter,P=c.stringify,H=Math,N=[].push,R=[].join,O=[].pop,M=[].splice,B=[].shift,L=[].slice,V=[].unshift,U={}.toString,W=c.support.stableSort,j=/^\/Date\((.*?)\)\/$/,q=[],G=h.extend({init:function(e,t){var n=this;n.type=t||Q,h.fn.init.call(n),n.length=e.length,n.wrapAll(e,n),n._loadPromises=[],n._loadedNodes=[]},at:function(e){return this[e]},toJSON:function(e){var t,n,i=this.length,a=new Array(i);for(t=0;t<i;t++)(n=this[t])instanceof Q&&(n=n.toJSON(e)),a[t]=n;return a},parent:u,wrapAll:function(e,t){var n,i,a=this,r=function(){return a};for(t=t||[],n=0,i=e.length;n<i;n++)t[n]=a.wrap(e[n],r);return t},wrap:function(e,t){var n=this;return null!==e&&"[object Object]"===U.call(e)&&(e instanceof n.type||e instanceof ee||(e=e instanceof Q?e.toJSON():e,e=new n.type(e)),e.parent=t,e.bind(w,(function(t){var i=e.hasOwnProperty("hasSubgroups");n.trigger(w,{field:t.field,node:t.node,index:t.index,items:t.items||[this],action:t.node||i?t.action||"itemloaded":"itemchange"})})),e.bind(E,(function(e){n._loadPromises.push(e.promise),n._loading=!0,e.promise.done((function(){n._loadedNodes.push(e.node);var t=n._loadPromises.indexOf(e.promise);n._loadPromises.splice(t,1),n._loadPromises.length||(n._loading=!1,n.trigger(D,{collection:n,nodes:n._loadedNodes}),n._loadedNodes=[])}))}))),e},loading:function(){return this._loading},push:function(){var e,t=this.length,n=this.wrapAll(arguments);return e=N.apply(this,n),this.omitChangeEvent||this.trigger(w,{action:"add",index:t,items:n}),e},slice:L,sort:[].sort,join:R,pop:function(){var e=this.length,t=O.apply(this);return e&&this.trigger(w,{action:"remove",index:e-1,items:[t]}),t},splice:function(e,t,n){var i,a,r,o=this.wrapAll(L.call(arguments,2));if((i=M.apply(this,[e,t].concat(o))).length)for(this.omitChangeEvent||this.trigger(w,{action:"remove",index:e,items:i}),a=0,r=i.length;a<r;a++)i[a]&&i[a].children&&i[a].unbind(w);return n&&(this.omitChangeEvent||this.trigger(w,{action:"add",index:e,items:o})),i},shift:function(){var e=this.length,t=B.apply(this);return e&&this.trigger(w,{action:"remove",index:0,items:[t]}),t},unshift:function(){var e,t=this.wrapAll(arguments);return e=V.apply(this,t),this.trigger(w,{action:"add",index:0,items:t}),e},indexOf:function(e){var t,n;for(t=0,n=this.length;t<n;t++)if(this[t]===e)return t;return-1},forEach:function(e,t){for(var n=0,i=this.length,a=t||window;n<i;n++)e.call(a,this[n],n,this)},map:function(e,t){for(var n=0,i=[],a=this.length,r=t||window;n<a;n++)i[n]=e.call(r,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,a=[],r=this.length,o=t||window;i<r;i++)n=this[i],e.call(o,n,i,this)&&(a[a.length]=n);return a},find:function(e,t){for(var n,i=0,a=this.length,r=t||window;i<a;i++)if(n=this[i],e.call(r,n,i,this))return n},every:function(e,t){for(var n,i=0,a=this.length,r=t||window;i<a;i++)if(n=this[i],!e.call(r,n,i,this))return!1;return!0},some:function(e,t){for(var n,i=0,a=this.length,r=t||window;i<a;i++)if(n=this[i],e.call(r,n,i,this))return!0;return!1},remove:function(e){var t=this.indexOf(e);-1!==t&&this.splice(t,1)},empty:function(){this.splice(0,this.length)}});"undefined"!=typeof Symbol&&Symbol.iterator&&!G.prototype[Symbol.iterator]&&(G.prototype[Symbol.iterator]=[][Symbol.iterator]);var K=G.extend({init:function(e,t,n){h.fn.init.call(this),this.type=t||Q,n&&(this._events=n);for(var i=0;i<e.length;i++)this[i]=e[i];this.length=i,this._parent=function(){return this}.bind(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}});function $(e,t,n,i){return function(a){var r,o={};for(r in a)o[r]=a[r];o.field=i?n+"."+a.field:n,t==w&&e._notifyChange&&e._notifyChange(o),e.trigger(t,o)}}function Y(e,t){var n,i,a=[],r=[];for(function(e){return"object"==typeof e&&Object.getPrototypeOf(e)===Object.getPrototypeOf({})||Object.getPrototypeOf(e)===Object.getPrototypeOf(new Date)||"object"!=typeof e}(e=e||{})||(r=Object.getOwnPropertyNames(Object.getPrototypeOf(e))),n=Object.getOwnPropertyNames(e).concat(r),i=q.filter((function(e){return n.indexOf(e)<0}));e;)Object.getOwnPropertyNames(e).forEach((function(e){-1===a.indexOf(e)&&(!t||i.indexOf(e)<0)&&a.push(e)})),e=Object.getPrototypeOf(e);return a}q=Y({},!1);var Q=h.extend({init:function(e){var t,n=this,i=Y(e,!0),a=function(){return n};h.fn.init.call(this),this._handlers={},i.forEach((function(i){"object"==typeof(t=e[i])&&t&&!t.getTime&&"_"!=i.charAt(0)&&(t=n.wrap(t,i,a)),n[i]=t})),n.uid=c.guid()},shouldSerialize:function(e,t){return this.hasOwnProperty(e)&&"_handlers"!==e&&"_events"!==e&&(t&&t[e]||typeof this[e]!==g)&&"uid"!==e},forEach:function(e){for(var t in this)this.shouldSerialize(t)&&e(this[t],t)},toJSON:function(e){var t,n,i={};for(n in this)this.shouldSerialize(n,e)&&(((t=this[n])instanceof Q||t instanceof G)&&(t=t.toJSON(e)),i[n]=t);return i},get:function(e){var t=this;return t.trigger(x,{field:e}),"this"===e?t:c.getter(e,!0)(t)},_set:function(e,t){var n=e.indexOf(".")>=0;if(n)for(var i=e.split("."),a="";i.length>1;){a+=i.shift();var r=c.getter(a,!0)(this);if(r instanceof Q)return r.set(i.join("."),t),n;a+="."}return c.setter(e)(this,t),n},set:function(e,t){var n=this,i=!1,a=e.indexOf(".")>=0,r=c.getter(e,!0)(n);return r!==t&&(r instanceof h&&this._handlers[e]&&(this._handlers[e].get&&r.unbind(x,this._handlers[e].get),r.unbind(w,this._handlers[e].change)),(i=n.trigger("set",{field:e,value:t}))||(a||(t=n.wrap(t,e,(function(){return n}))),(!n._set(e,t)||e.indexOf("(")>=0||e.indexOf("[")>=0)&&n.trigger(w,{field:e}))),i},parent:u,wrap:function(e,t,n){var i,a,r=this,o=U.call(e);if(null!=e&&("[object Object]"===o||"[object Array]"===o)){var s=e instanceof G,l=e instanceof qe;"[object Object]"!==o||l||s?("[object Array]"===o||s||l)&&(s||l||(e=new G(e)),a=$(r,w,t,!1),e.bind(w,a),r._handlers[t]={change:a}):(e instanceof Q||(e=new Q(e)),i=$(r,x,t,!0),e.bind(x,i),a=$(r,w,t,!0),e.bind(w,a),r._handlers[t]={get:i,change:a}),e.parent=n}return e}});function X(e,t){if(e===t)return!0;var n,i=c.type(e);if(i!==c.type(t))return!1;if("date"===i)return e.getTime()===t.getTime();if("object"!==i&&"array"!==i)return!1;for(n in e)if(!X(e[n],t[n]))return!1;return!0}var J={number:function(e){return typeof e===m&&"null"===e.toLowerCase()?null:c.parseFloat(e)},date:function(e){return typeof e===m&&"null"===e.toLowerCase()?null:c.parseDate(e)},boolean:function(e){return typeof e===m?"null"===e.toLowerCase()?null:"true"===e.toLowerCase():null!=e?!!e:e},string:function(e){return typeof e===m&&"null"===e.toLowerCase()?null:null!=e?e+"":e},default:function(e){return e}},Z={string:"",number:0,date:new Date,boolean:!1,default:""};var ee=Q.extend({init:function(n){var i=this;if((!n||e.isEmptyObject(n))&&(n=e.extend({},i.defaults,n),i._initializers))for(var a=0;a<i._initializers.length;a++){var r=i._initializers[a];n[r]=i.defaults[r]()}Q.fn.init.call(i,n),i.dirty=!1,i.dirtyFields={},i.idField&&(i.id=i.get(i.idField),i.id===t&&(i.id=i._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=e,r=this.fields||{};return(e=r[e])||(e=function(e,t){var n,i;for(i in e){if(n=e[i],a(n)&&n.field&&n.field===t)return n;if(n===t)return n}return null}(r,i)),e&&!(n=e.parse)&&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])||!1!==e.editable},set:function(e,t){var n=this,i=n.dirty;n.editable(e)&&(X(t=n._parse(e,t),n.get(e))?n.trigger("equalSet",{field:e,value:t}):(n.dirty=!0,n.dirtyFields[e]=!0,Q.fn.set.call(n,e,t)&&!i&&(n.dirty=i,n.dirty||(n.dirtyFields[e]=!1))))},accept:function(e){var t,n=this,i=function(){return n};for(t in e){var a=e[t];"_"!=t.charAt(0)&&(a=n.wrap(e[t],t,i)),n._set(t,a)}n.idField&&(n.id=n.get(n.idField)),n.dirty=!1,n.dirtyFields={}},isNew:function(){return this.id===this._defaultId}});ee.define=function(n,a){a===t&&(a=n,n=ee);var r,o,s,l,d,u,c,p,h=i({defaults:{}},a),f={},g=h.id,v=[];if(g&&(h.idField=g),h.id&&delete h.id,g&&(h.defaults[g]=h._defaultId=""),"[object Array]"===U.call(h.fields)){for(u=0,c=h.fields.length;u<c;u++)typeof(s=h.fields[u])===m?f[s]={}:s.field&&(f[s.field]=s);h.fields=f}for(o in h.fields)l=(s=h.fields[o]).type||"default",d=null,p=o,o=typeof s.field===m?s.field:o,s.nullable||"function"==typeof(d=h.defaults[p!==o?p:o]=s.defaultValue!==t?s.defaultValue:Z[l.toLowerCase()])&&v.push(o),a.id===o&&(h._defaultId=d),h.defaults[p!==o?p:o]=d,e.isPlainObject(s)?s.parse=s.parse||J[l]:s={parse:J[l]};return v.length>0&&(h._initializers=v),(r=n.extend(h)).define=function(e){return ee.define(r,e)},h.fields&&(r.fields=h.fields,r.idField=h.idField),r};var te={selector:function(e){return p(e)?e:z(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,a,r=e[0](t,n);for(i=1,a=e.length;i<a;i++)r=r||e[i](t,n);return r}}},ne=i({},te,{asc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),a=t(n);return i&&i.getTime&&a&&a.getTime&&(i=i.getTime(),a=a.getTime()),i===a?e.__position-n.__position:null==i?-1:null==a?1:i.localeCompare?i.localeCompare(a):i>a?1:-1}},desc:function(e){var t=this.selector(e);return function(e,n){var i=t(e),a=t(n);return i&&i.getTime&&a&&a.getTime&&(i=i.getTime(),a=a.getTime()),i===a?e.__position-n.__position:null==i?1:null==a?-1:a.localeCompare?a.localeCompare(i):i<a?1:-1}},create:function(e){return this[e.dir](e.field)}});n=function(e,t){var n,i=e.length,a=new Array(i);for(n=0;n<i;n++)a[n]=t(e[n],n,e);return a};var ie=function(){function e(e){return"string"==typeof e&&(e=e.replace(/[\r\n]+/g,"")),JSON.stringify(e)}function t(t){return function(n,i,a,r){return i+="",a&&(n="("+n+" + '').toString()"+(r?".toLocaleLowerCase('"+r+"')":".toLowerCase()"),i=r?i.toLocaleLowerCase(r):i.toLowerCase()),t(n,e(i),a)}}function n(t,n,i,a,r){if(null!=i){if(typeof i===m){var o=j.exec(i);o?i=new Date(+o[1]):a?(i=e(r?i.toLocaleLowerCase(r):i.toLowerCase()),n="(("+n+" || '')+'')"+(r?".toLocaleLowerCase('"+r+"')":".toLowerCase()")):i=e(i)}i.getTime&&(n="("+n+"&&"+n+".getTime?"+n+".getTime():"+n+")",i=i.getTime())}return n+" "+t+" "+i}function i(e){for(var t="/^",n=!1,i=0;i<e.length;++i){var a=e.charAt(i);if(n)t+="\\"+a;else{if("~"==a){n=!0;continue}"*"==a?t+=".*":"?"==a?t+=".":".+^$()[]{}|\\/\n\r\u2028\u2029 ".indexOf(a)>=0?t+="\\"+a:t+=a}n=!1}return t+"$/"}return{quote:function(t){return t&&t.getTime?"new Date("+t.getTime()+")":e(t)},eq:function(e,t,i,a){return n("==",e,t,i,a)},neq:function(e,t,i,a){return n("!=",e,t,i,a)},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){return e+".indexOf("+t+", "+e+".length - "+(t?t.length-2:0)+") >= 0"})),doesnotendwith:t((function(e,t){return e+".indexOf("+t+", "+e+".length - "+(t?t.length-2:0)+") < 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 i(t=t.substring(1,t.length-1))+".test("+e+")"})),doesnotmatch:t((function(e,t){return"!"+i(t=t.substring(1,t.length-1))+".test("+e+")"})),isempty:function(e){return e+" === ''"},isnotempty:function(e){return e+" !== ''"},isnull:function(e){return"("+e+" == null)"},isnotnull:function(e){return"("+e+" != null)"},isnullorempty:function(e){return"("+e+" === null) || ("+e+" === '')"},isnotnullorempty:function(e){return"("+e+" !== null) && ("+e+" !== '')"}}}();function ae(e){this.data=e||[]}function re(e,n){if(e){var i=typeof e===m?{field:e,dir:n}:e,a=o(i)?i:i!==t?[i]:[];return s(a,(function(e){return!!e.dir}))}}function oe(e,n){var i={};if(e)for(var a=typeof e===m?{field:e,dir:n}:e,r=o(a)?a:a!==t?[a]:[],s=0;s<r.length;s++)i[r[s].field]={dir:r[s].dir,index:s+1};return i}ae.filterExpr=function(e){var n,i,a,r,o,s,l=[],d=[],u=[],p=e.filters;for(n=0,i=p.length;n<i;n++)o=(a=p[n]).field,s=a.operator,a.filters?(a=(r=ae.filterExpr(a)).expression.replace(/__o\[(\d+)\]/g,(function(e,t){return t=+t,"__o["+(u.length+t)+"]"})).replace(/__f\[(\d+)\]/g,(function(e,t){return t=+t,"__f["+(d.length+t)+"]"})),u.push.apply(u,r.operators),d.push.apply(d,r.fields)):(typeof o===g?(r="__f["+d.length+"](d)",d.push(o)):r=c.expr(o),typeof s===g?(a="__o["+u.length+"]("+r+", "+ie.quote(a.value)+")",u.push(s)):a=ie[(s||"eq").toLowerCase()](r,a.value,a.ignoreCase===t||a.ignoreCase,e.accentFoldingFiltering)),l.push(a);return{expression:"("+l.join({and:" && ",or:" || "}[e.logic])+")",fields:d,operators:u}};var se={"==":"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"};function le(e){var t,n,i,a,r=e.filters;if(r)for(t=0,n=r.length;t<n;t++)(a=(i=r[t]).operator)&&typeof a===m&&(i.operator=se[a.toLowerCase()]||a),le(i)}function de(e){if(e&&!r(e))return!o(e)&&e.filters||(e={logic:"and",filters:o(e)?e:[e]}),le(e),e}function ue(e,t){return!e.logic&&!t.logic&&(e.field===t.field&&e.value===t.value&&e.operator===t.operator)}function ce(e){return r(e=e||{})?{logic:"and",filters:[]}:de(e)}function pe(e,t){return t.logic||e.field>t.field?1:e.field<t.field?-1:0}function he(e,i,a,r){var s=typeof e===m?{field:e,dir:i,compare:a,skipItemSorting:r}:e,l=o(s)?s:s!==t?[s]:[];return n(l,(function(e){return{field:e.field,dir:e.dir||"asc",aggregates:e.aggregates,compare:e.compare,skipItemSorting:e.skipItemSorting}}))}function fe(e,t,n){for(var i=he(e,t,n),a=0;a<i.length;a++)delete i[a].compare;return i}function me(e,t){return e&&e.getTime&&t&&t.getTime?e.getTime()===t.getTime():e===t}function ge(e,t,n,i,a,r){var o,s,l,d=(t=t||[]).length;for(o=0;o<d;o++){l=(s=t[o]).aggregate;var u=s.field;e[u]=e[u]||{},r[u]=r[u]||{},r[u][l]=r[u][l]||{},e[u][l]=ve[l.toLowerCase()](e[u][l],n,c.accessor(u),i,a,r[u][l])}}ae.normalizeFilter=de,ae.compareFilters=function e(t,n){if(t=ce(t),n=ce(n),t.logic!==n.logic)return!1;var i,a,r=(t.filters||[]).slice(),o=(n.filters||[]).slice();if(r.length!==o.length)return!1;r=r.sort(pe),o=o.sort(pe);for(var s=0;s<r.length;s++)if(i=r[s],a=o[s],i.logic&&a.logic){if(!e(i,a))return!1}else if(!ue(i,a))return!1;return!0},ae.prototype={toArray:function(){return this.data},range:function(e,t){return new ae(this.data.slice(e,e+t))},skip:function(e){return new ae(this.data.slice(e))},take:function(e){return new ae(this.data.slice(0,e))},select:function(e){return new ae(n(this.data,e))},order:function(e,t,n){var i={dir:t};return e&&(e.compare?i.compare=e.compare:i.field=e),new ae(n?this.data.sort(te.create(i)):this.data.slice(0).sort(te.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 a,r,o=re(e,t),s=[];if(n=n||te,o.length){for(a=0,r=o.length;a<r;a++)s.push(n.create(o[a]));return this.orderBy({compare:n.combine(s)},i)}return this},filter:function(e){var t,n,i,a,r,o,s,l,d=this.data,u=[];if(!(e=de(e))||0===e.filters.length)return this;for(a=ae.filterExpr(e),o=a.fields,s=a.operators,r=l=new Function("d, __f, __o","return "+a.expression),(o.length||s.length)&&(l=function(e){return r(e,o,s)}),t=0,i=d.length;t<i;t++)l(n=d[t])&&u.push(n);return new ae(u)},group:function(e,t,n){e=he(e||[]),t=t||this.data;var i,a=new ae(this.data);return e.length>0&&(i=e[0],a=n&&n.groupPaging?new ae(t).groupAllData(i,t).select((function(a){var r=new ae(t).filter([{field:a.field,operator:"eq",value:a.value,ignoreCase:!1}]),o=e.length>1?new ae(a.items).group(e.slice(1),r.toArray(),n).toArray():a.items;return{field:a.field,value:a.value,hasSubgroups:e.length>1,items:o,aggregates:r.aggregate(i.aggregates),uid:c.guid(),itemCount:o.length,subgroupCount:o.length}})):a.groupBy(i).select((function(n){var a=new ae(t).filter([{field:n.field,operator:"eq",value:n.value,ignoreCase:!1}]);return{field:n.field,value:n.value,items:e.length>1?new ae(n.items).group(e.slice(1),a.toArray()).toArray():n.items,hasSubgroups:e.length>1,aggregates:a.aggregate(i.aggregates)}}))),a},groupBy:function(e){if(r(e)||!this.data.length)return new ae([]);var t,n,i,a,o=e.field,s=e.skipItemSorting?this.data:this._sortForGrouping(o,e.dir||"asc"),l=c.accessor(o),d=l.get(s[0],o),u={field:o,value:d,items:[]},p=[u];for(i=0,a=s.length;i<a;i++)t=s[i],me(d,n=l.get(t,o))||(u={field:o,value:d=n,items:[]},p.push(u)),u.items.push(t);return new ae(p=this._sortGroups(p,e))},groupAllData:function(e,t){if(r(e)||this.data&&!this.data.length)return new ae([]);var n,i,a,o,s=e.field,l=e.skipItemSorting?t:new ae(t).sort(s,e.dir||"asc",ne).toArray(),d=c.accessor(s),u=d.get(l[0],s),p={field:s,value:u,items:[]},h=[p];for(a=0,o=l.length;a<o;a++)n=l[a],me(u,i=d.get(n,s))||(p={field:s,value:u=i,items:[]},h.push(p)),p.items.push(n);return new ae(h=this._sortGroups(h,e))},_sortForGrouping:function(e,t){var n,i,a=this.data;if(!W){for(n=0,i=a.length;n<i;n++)a[n].__position=n;for(n=0,i=(a=new ae(a).sort(e,t,ne).toArray()).length;n<i;n++)delete a[n].__position;return a}return this.sort(e,t).toArray()},_sortGroups:function(e,t){var n=e;return t&&p(t.compare)&&(n=new ae(n).order({compare:t.compare},t.dir||"asc").toArray()),n},aggregate:function(e){var t,n,i={},a={};if(e&&e.length)for(t=0,n=this.data.length;t<n;t++)ge(i,e,this.data[t],t,n,a);return i}};var ve={sum:function(e,t,n){var i=n.get(t);return _e(e)?_e(i)&&(e+=i):e=i,e},count:function(e){return(e||0)+1},average:function(e,n,i,a,r,o){var s=i.get(n);return o.count===t&&(o.count=0),_e(e)?_e(s)&&(e+=s):e=s,_e(s)&&o.count++,a==r-1&&_e(e)&&(e/=o.count),e},max:function(e,t,n){var i=n.get(t);return _e(e)||be(e)||(e=i),e<i&&(_e(i)||be(i))&&(e=i),e},min:function(e,t,n){var i=n.get(t);return _e(e)||be(e)||(e=i),e>i&&(_e(i)||be(i))&&(e=i),e}};function _e(e){return"number"==typeof e&&!isNaN(e)}function be(e){return e&&e.getTime}function ke(e){var t,n=e.length,i=new Array(n);for(t=0;t<n;t++)i[t]=e[t].toJSON();return i}ae.normalizeGroup=he,ae.normalizeSort=re,ae.process=function(e,a,s){var l,d,u=(a=a||{}).group,c=function(e){for(var t=o(e)?e:[e],n=0;n<t.length;n++)if(t[n]&&p(t[n].compare))return!0;return!1}(he(u||[])),h=new ae(e),f=fe(u||[]),m=re(a.sort||[]),g=c?m:f.concat(m),v=a.filterCallback,_=a.filter,b=a.skip,k=a.take;return g&&s&&(h=h.sort(g,t,t,s)),_&&(h=h.filter(_),v&&(h=v(h)),d=h.toArray().length),g&&(s||(h=h.sort(g)),u&&(e=h.toArray())),c?(h=h.group(u,e,a),b===t||k===t||a.groupPaging||(h=new ae(ze(h.toArray())).range(b,k),l=n(f,(function(e){return i({},e,{skipItemSorting:!0})})),h=h.group(l,e,a))):(b!==t&&k!==t&&(b+k>(d=h.data.length)&&a.virtual&&(b=(b-=b+k-d)<0?0:b),h=h.range(b,k)),!u||r(u)&&0===u.length||(h=h.group(u,e,a))),{total:d,data:h.toArray()}};var we=f.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)}}),ye=f.extend({init:function(e){var t,n=this;e=n.options=i({},n.options,e),d(A,(function(t,n){typeof e[n]===m&&(e[n]={url:e[n]})})),n.cache=e.cache?xe.create(e.cache):{find:u,add:u},t=e.parameterMap,e.submit&&(n.submit=e.submit),p(e.push)&&(n.push=e.push),n.push||(n.push=F),n.parameterMap=p(t)?t:function(e){var n={};return d(e,(function(e,i){e in t&&(e=t[e],a(e)&&(i=e.value(i),e=e.key)),n[e]=i})),n}},options:{parameterMap:F},create:function(e){return l(this.setup(e,v))},read:function(n){var i,a,r=this.cache;n=this.setup(n,_),i=n.success||u,n.error,(a=r.find(n.data))!==t?i(a):(n.success=function(e){r.add(n.data,e),i(e)},e.ajax(n))},update:function(e){return l(this.setup(e,b))},destroy:function(e){return l(this.setup(e,k))},setup:function(e,t){e=e||{};var n,a=this.options[t],r=p(a.data)?a.data(e.data):a.data;return e=i(!0,{},a,e),n=i(!0,{},r,e.data),e.data=this.parameterMap(n,t),p(e.url)&&(e.url=e.url(n)),e}}),xe=f.extend({init:function(){this._store={}},add:function(e,n){e!==t&&(this._store[P(e)]=n)},find:function(e){return this._store[P(e)]},clear:function(){this._store={}},remove:function(e){delete this._store[P(e)]}});function Ce(e,t,n,i,a){var r,o,s,l,d,u={};for(l=0,d=e.length;l<d;l++)for(o in r=e[l],t)(s=a[o])&&s!==o&&(u[s]||(u[s]=c.setter(s)),u[s](r,t[o](r)),delete r[o])}function Te(e,t,n,i,a){var r,o,s,l,d;for(l=0,d=e.length;l<d;l++)for(o in r=e[l],t)r[o]=n._parse(o,t[o](r)),(s=a[o])&&s!==o&&delete r[s]}function Se(e,t,n,i,a){var r,o,s,l;for(o=0,l=e.length;o<l;o++)(s=i[(r=e[o]).field])&&s!=r.field&&(r.field=s),r.value=n._parse(r.field,r.value),r.items&&(r.hasSubgroups?Se(r.items,t,n,i,a):Te(r.items,t,n,0,a))}function Ie(e,t,n,i,a,r){return function(o){return o=e(o),De(t,n,i,a,r)(o)}}function De(e,t,n,i,a){return function(o){return o&&!r(n)&&("[object Array]"===U.call(o)||o instanceof G||(o=[o]),t(o,n,new e,i,a)),o||[]}}xe.create=function(e){var t={inmemory:function(){return new xe}};return a(e)&&p(e.find)?e:!0===e?new xe:t[e]()};var Ee=f.extend({init:function(e){var t,n,i,r,o=this;for(t in e=e||{})n=e[t],o[t]=typeof n===m?z(n):n;r=e.modelBase||ee,a(o.model)&&(o.model=i=r.define(o.model));var s=o.data.bind(o);if(o._dataAccessFunction=s,o.model){var l,u,c=o.groups.bind(o),p=o.serialize.bind(o),h={},f={},g={},v={},_=!1;(i=o.model).fields&&(d(i.fields,(function(e,t){var n;l=e,a(t)&&t.field?l=t.field:typeof t===m&&(l=t),a(t)&&t.from&&(n=t.from),_=_||n&&n!==e||l!==e,u=n||l,f[e]=-1!==u.indexOf(".")?z(u,!0):z(u),g[e]=z(e),h[n||l]=e,v[e]=n||l})),!e.serialize&&_&&(o.serialize=Ie(p,i,Ce,g,h,v))),o._dataAccessFunction=s,o._wrapDataAccessBase=De(i,Te,f,h,v),o.data=Ie(s,i,Te,f,h,v),o.groups=Ie(c,i,Se,f,h,v)}},errors:function(e){return e?e.errors:null},parse:F,data:F,total:function(e){return e.length},groups:F,aggregates:function(){return{}},serialize:function(e){return e}});function Ae(e,t){var n,i;if(t.items&&t.items.length)for(var a=0;a<t.items.length;a++)n=e.items[e.items.length-1],i=t.items[a],n&&i?n.hasSubgroups&&n.value==i.value?Ae(n,i):n.field&&n.value==i.value?(n.items.omitChangeEvent=!0,n.items.push.apply(n.items,i.items),n.items.omitChangeEvent=!1):(e.items.omitChangeEvent=!0,e.items.push.apply(e.items,[i]),e.items.omitChangeEvent=!1):i&&(e.items.omitChangeEvent=!0,e.items.push.apply(e.items,[i]),e.items.omitChangeEvent=!1)}function Fe(e,t,n,i){for(var a,r,o=0;t.length&&i;){var s=(r=(a=t[o]).items).length;if(e&&e.field===a.field&&e.value===a.value?(e.hasSubgroups&&e.items.length?Fe(e.items[e.items.length-1],a.items,n,i):(r=r.slice(n,n+i),e.items=e.items.concat(r)),t.splice(o--,1)):a.hasSubgroups&&r.length?(Fe(a,r,n,i),a.items.length||t.splice(o--,1)):(r=r.slice(n,n+i),a.items=r,a.items.length||t.splice(o--,1)),0===r.length?n-=s:(n=0,i-=r.length),++o>=t.length)break}o<t.length&&t.splice(o,t.length-o)}function ze(e,t){for(var n,i,a=[],r=(e||[]).length,o=p(t)?t:function(e,t){return e[t]},s=0;s<r;s++)if((n=o(e,s)).hasSubgroups)a=a.concat(ze(n.items));else{i=n.items;for(var l=0;l<i.length;l++)a.push(o(i,l))}return a}function Pe(e){var t,n,i,a,r=[];for(t=0,n=e.length;t<n;t++){var o=e.at(t);if(o.items)if(o.hasSubgroups)r=r.concat(Pe(o.items));else for(i=o.items,a=0;a<i.length;a++)r.push(i.at(a))}return r}function He(e,t){var n,i,a;if(t)for(n=0,i=e.length;n<i;n++)(a=e.at(n)).items&&(a.hasSubgroups?He(a.items,t):a.items=new K(a.items,t,a.items._events))}function Ne(e,t){for(var n=0;n<e.length;n++)if(e[n].hasSubgroups){if(Ne(e[n].items,t))return!0}else if(t(e[n].items,e[n]))return!0}function Re(e,t,n,i){for(var a=0;a<e.length&&e[a].data!==t&&!Oe(e[a].data,n,i);a++);}function Oe(e,t,n){for(var i=0,a=e.length;i<a;i++){if(e[i]&&e[i].hasSubgroups)return Oe(e[i].items,t,n);if(e[i]===t||e[i]===n)return e[i]=n,!0}}function Me(e,n,i,a,r){for(var o=0,s=e.length;o<s;o++){var l=e[o];if(l&&!(l instanceof a))if(l.hasSubgroups===t||r){for(var d=0;d<n.length;d++)if(n[d]===l){e[o]=n.at(d),Re(i,n,l,e[o]);break}}else Me(l.items,n,i,a,r)}}function Be(e,t){return t?Ve(e,(function(e){return e.uid&&e.uid==t.uid||e[t.idField]===t.id&&t.id!==t._defaultId})):-1}function Le(e,t){return t?Ve(e,(function(e){return e.uid==t.uid})):-1}function Ve(e,t){var n,i;if(e){for(n=0,i=e.length;n<i;n++)if(t(e[n]))return n;return-1}}function Ue(e,t){if(e&&!r(e)){var n,i=e[t];return n=a(i)?i.from||i.field||t:e[t]||t,p(n)?t:n}return t}function We(e,t){var n,i,a={};for(var r in e)"filters"!==r&&(a[r]=e[r]);if(e.filters)for(a.filters=[],n=0,i=e.filters.length;n<i;n++)a.filters[n]=We(e.filters[n],t);else a.field=Ue(t.fields,a.field);return a}function je(e,t){var n,i,a,r,s=[];for(n=0,i=e.length;n<i;n++){for(var l in a={},r=e[n])a[l]=r[l];a.field=Ue(t.fields,a.field),a.aggregates&&o(a.aggregates)&&(a.aggregates=je(a.aggregates,t)),s.push(a)}return s}var qe=h.extend({init:function(e){var n,a=this;if(e&&(n=e.data),e=a.options=i({},a.options,e),a._map={},a._prefetch={},a._data=[],a._pristineData=[],a._ranges=[],a._view=[],a._pristineTotal=0,a._destroyed=[],a._pageSize=e.pageSize,a._page=e.page||(e.pageSize?1:t),a._sort=re(e.sort),a._sortFields=oe(e.sort),a._filter=de(e.filter),a._group=he(e.group),a._aggregate=e.aggregate,a._total=e.total,a._groupPaging=e.groupPaging,a._groupPaging&&(a._groupsState={}),a._shouldDetachObservableParents=!0,h.fn.init.call(a),a.transport=Ge.create(e,n,a),p(a.transport.push)&&a.transport.push({pushCreate:a._pushCreate.bind(a),pushUpdate:a._pushUpdate.bind(a),pushDestroy:a._pushDestroy.bind(a)}),null!=e.offlineStorage)if("string"==typeof e.offlineStorage){var r=e.offlineStorage;a._storage={getItem:function(){return JSON.parse(localStorage.getItem(r))},setItem:function(e){localStorage.setItem(r,P(a.reader.serialize(e)))}}}else a._storage=e.offlineStorage;a.reader=new c.data.readers[e.schema.type||"json"](e.schema),a.reader.model,a._detachObservableParents(),a._data=a._observe(a._data),a._online=!0,a.bind(["push",C,w,T,y,I,S],e)},options:{data:null,schema:{modelBase:ee},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()||[]},_isGrouped:function(){return(this.group()||[]).length},_isServerGrouped:function(){var e=this.group()||[];return this.options.serverGrouping&&e.length},_isServerGroupPaged:function(){return this._isServerGrouped()&&this._groupPaging},_isGroupPaged:function(){var e=this._group||[];return this._groupPaging&&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 Pe(e);if(!t)for(var n=0;n<e.length;n++)e.at(n)}return e},parent:u,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,a=this._flatData(t,this.options.useRanges);if(a)for(n=0,i=a.length;n<i;n++)if(a[n].uid==e)return a[n]},indexOf:function(e){return Le(this._data,e)},at:function(e){return this._data.at(e)},data:function(e){var n=this;if(e===t){if(n._data)for(var i=0;i<n._data.length;i++)n._data.at(i);return n._data}n._detachObservableParents(),n._data=this._observe(e),n._pristineData=e.slice(0),n._storeData(),n._ranges=[],n.trigger("reset"),n._addRange(n._data),n._total=n._data.length,n._pristineTotal=n._total,n._process(n._data)},view:function(e){if(e===t)return this._view;this._view=this._observeView(e)},_observeView:function(e){var t=this;Me(e,t._data,t._ranges,t.reader.model||Q,t._isServerGrouped());var n=new K(e,t.reader.model);return n.parent=function(){return t.parent()},n},flatView:function(){return(this.group()||[]).length?Pe(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 ee||(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(t,n){var i=this._getCurrentRangeSpan();n||(n=t,t=0),o(n)||(n=[n]);var a=[],r=this.options.autoSync;this.options.autoSync=!1;try{for(var s=0;s<n.length;s++){var l=n[s],d=this.insert(t,l);a.push(d);var u=d.toJSON();this._isServerGrouped()&&(u=this._wrapInEmptyGroup(u)),this._pristineData.push(u),i&&i.length&&e(i).last()[0].pristineData.push(u),t++}}finally{this.options.autoSync=r}a.length&&this.trigger("push",{type:"create",items:a})},pushCreate:function(e){this.pushInsert(this._data.length,e)},pushUpdate:function(e){o(e)||(e=[e]);for(var t=[],n=0;n<e.length;n++){var i=e[n],a=this._createNewModel(i),r=this.get(a.id);r?(t.push(r),r.accept(i),r.trigger(w),this._updatePristineForModel(r,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,t){o(e)||(e=[e]);var n=void 0===t||t,i=[],a=this.options.autoSync;this.options.autoSync=!1;try{for(var r=0;r<e.length;r++){var s=e[r],l=this._createNewModel(s),d=!1;this._eachItem(this._data,(function(e){for(var t=0;t<e.length;t++){var n=e.at(t);if(n.id===l.id){i.push(n),e.splice(t,1),d=!0;break}}})),d&&n&&(this._removePristineForModel(l),this._destroyed.pop())}}finally{this.options.autoSync=a}return i},pushMove:function(e,t){var n=this._moveItems(e,t);n.length&&this.trigger("push",{type:"update",items:n})},_moveItems:function(e,t){o(t)||(t=[t]);var n=[],i=this.options.autoSync;this.options.autoSync=!1;try{for(var a=0;a<t.length;a++){var r=t[a],s=this._createNewModel(r);this._eachItem(this._data,(function(t){for(var i=0;i<t.length;i++){var a=t.at(i);if(a.id===s.id){n.push(a),t.splice(e>=i?--e:e,0,t.splice(i,1)[0]),e++;break}}}))}}finally{this.options.autoSync=i}return n},remove:function(e){var t,n=this,i=n._isServerGrouped();return!i||!e.uid||e.isNew&&e.isNew()||n._pushInDestroyed(e),this._eachItem(n._data,(function(n){if(t=function(e,t){if(e){var n,i,a=e.length;for(i=0;i<a;i++)if((n=e[i]).uid&&n.uid==t.uid)return e.splice(i,1),n}}(n,e),t&&i)return!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=this,n=[],i=[],a=t._destroyed,r=e.Deferred().resolve().promise();if(t.online()){if(!t.reader.model)return r;n=t.created(),i=t.updated();var o=[];t.options.batch&&t.transport.submit?o=t._sendSubmit(n,i,a):(o.push.apply(o,t._send("create",n)),o.push.apply(o,t._send("update",i)),o.push.apply(o,t._send("destroy",a))),r=e.when.apply(null,o).then((function(){var e,n,i=arguments;for(e=0,n=arguments.length;e<n;e++)i[e]&&t._accept(i[e]);t._storeData(!0),t._syncEnd(),t._change({action:"sync"}),t.trigger(y),t._isServerGroupPaged()&&t.read()}))}else t._storeData(!0),t._syncEnd(),t._change({action:"sync"});return r},_syncEnd:u,cancelChanges:function(e){var t=this;e instanceof c.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._changesCanceled(),t._change(),t._markOfflineUpdatesAsDirty(),t._isServerGrouped()&&t.read())},_changesCanceled:u,_markOfflineUpdatesAsDirty:function(){var e=this;null!=e.options.offlineStorage&&e._eachItem(e._data,(function(e){for(var t=0;t<e.length;t++){var 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,a=t.models,s=t.response,l=0,d=i._isServerGrouped(),u=i._pristineData,c=t.type;if(i.trigger(I,{response:s,type:c}),s&&!r(s)){if(s=i.reader.parse(s),i._handleCustomErrors(s))return;s=i.reader.data(s),o(s)||(s=[s])}else s=e.map(a,(function(e){return e.toJSON()}));for("destroy"===c&&(i._destroyed=[]),l=0,n=a.length;l<n;l++)"destroy"!==c?(a[l].accept(s[l]),"create"===c?u.push(d?i._wrapInEmptyGroup(a[l].toJSON()):s[l]):"update"===c&&i._updatePristineForModel(a[l],s[l])):i._removePristineForModel(a[l])},_updatePristineForModel:function(e,t){this._executeOnPristineForModel(e,(function(e,n){c.deepExtend(n[e],t)}))},_executeOnPristineForModel:function(e,t){this._eachPristineItem((function(n){var i=Be(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){return(this._isServerGrouped()?this.reader.groups:this.reader.data).call(this.reader,e)},_eachPristineItem:function(e){var t=this,n=t.options,i=t._getCurrentRangeSpan();t._eachItem(t._pristineData,e),n.serverPaging&&n.useRanges&&d(i,(function(n,i){t._eachItem(i.pristineData,e)}))},_eachItem:function(e,t){e&&e.length&&(this._isServerGrouped()?Ne(e,t):t(e))},_pristineForModel:function(e){var t,n;return this._eachPristineItem((function(i){if((n=Be(i,e))>-1)return t=i[n],!0})),t},_cancelModel:function(e){var t=this,n=this._pristineForModel(e);this._eachItem(this._data,(function(i){var a=Le(i,e);a>=0&&(!n||e.isNew()&&!n.__state__?(t._modelCanceled(e),i.splice(a,1),t._removeModelFromRanges(e)):(i[a].accept(n),"update"==n.__state__&&(i[a].dirty=!0)))}))},_modelCanceled:u,_submit:function(t,n){var a=this;a.trigger(T,{type:"submit"}),a.trigger(S),a.transport.submit(i({success:function(n,i){var a=e.grep(t,(function(e){return e.type==i}))[0];a&&a.resolve({response:n,models:a.models,type:i})},error:function(e,n,i){for(var r=0;r<t.length;r++)t[r].reject(e);a.error(e,n,i)}},n))},_sendSubmit:function(t,n,i){var a=this,r=[];return a.options.batch&&(t.length&&r.push(e.Deferred((function(e){e.type="create",e.models=t}))),n.length&&r.push(e.Deferred((function(e){e.type="update",e.models=n}))),i.length&&r.push(e.Deferred((function(e){e.type="destroy",e.models=i}))),a._submit(r,{data:{created:a.reader.serialize(ke(t)),updated:a.reader.serialize(ke(n)),destroyed:a.reader.serialize(ke(i))}})),r},_promise:function(t,n,a){var r=this;return e.Deferred((function(e){r.trigger(T,{type:a}),r.trigger(S),r.transport[a].call(r.transport,i({success:function(t){e.resolve({response:t,models:n,type:a})},error:function(t,n,i){e.reject(t),r.error(t,n,i)}},t))})).promise()},_send:function(e,t){var n,i,a=this,r=[],o=a.reader.serialize(ke(t));if(a.options.batch)t.length&&r.push(a._promise({data:{models:o}},t,e));else for(n=0,i=t.length;n<i;n++)r.push(a._promise({data:o[n]},[t[n]],e));return r},read:function(t){var n=this,i=n._params(t),a=e.Deferred();return n._queueRequest(i,(function(){var e=n.trigger(T,{type:"read"});e?(n._dequeueRequest(),a.resolve(e)):(n.trigger(S),n._ranges=[],n.trigger("reset"),n.online()?n.transport.read({data:i,success:function(e){n._ranges=[],n.success(e,i),a.resolve()},error:function(){var e=L.call(arguments);n.error.apply(n,e),a.reject.apply(a,e)}}):null!=n.options.offlineStorage&&(n.success(n.offlineData(),i),a.resolve()))})),a.promise()},_readAggregates:function(e){return this.reader.aggregates(e)},success:function(e){var t,n,i=this,a=i.options;if(i.trigger(I,{response:e,type:"read"}),i.online()){if(e=i.reader.parse(e),i._handleCustomErrors(e))return void i._dequeueRequest();i._total=i.reader.total(e),i._isServerGroupPaged()&&(i._serverGroupsTotal=i._total),i._pageSize>i._total&&(i._pageSize=i._total,i.options.pageSize&&i.options.pageSize>i._pageSize&&(i._pageSize=i.options.pageSize)),i._aggregate&&a.serverAggregates&&(i._aggregateResult=i._readAggregates(e)),e=i._readData(e),i._destroyed=[]}else{e=i._readData(e),t=[];var r,o={},s=i.reader.model,l=s?s.idField:"id";for(r=0;r<this._destroyed.length;r++){var d=this._destroyed[r][l];o[d]=d}for(r=0;r<e.length;r++){var u=e[r];"destroy"==u.__state__?o[u[l]]||this._pushInDestroyed(this._createNewModel(u)):t.push(u)}e=t,i._total=e.length}if(i._pristineTotal=i._total,n=i._skip&&i._data.length&&i._skip<i._data.length,i.options.endless){n&&i._pristineData.splice(i._skip,i._pristineData.length),t=e.slice(0);for(var c=0;c<t.length;c++)i._pristineData.push(t[c])}else i._pristineData=e.slice(0);if(i._detachObservableParents(),i.options.endless){i._data.unbind(w,i._changeHandler),i._isServerGrouped()&&i._data[i._data.length-1].value===e[0].value&&(Ae(i._data[i._data.length-1],e[0]),e.shift()),e=i._observe(e),n&&i._data.splice(i._skip,i._data.length);for(var p=0;p<e.length;p++)i._data.push(e[p]);i._data.bind(w,i._changeHandler)}else i._data=i._observe(e);i._markOfflineUpdatesAsDirty(),i._storeData(),i._addRange(i._data),i._process(i._data),i._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=u)},_storeData:function(e){var t=this._isServerGrouped(),n=this.reader.model;if(null!=this.options.offlineStorage){for(var i=function e(i){for(var a=[],r=0;r<i.length;r++){var o=i.at(r),s=o.toJSON();t&&o.items?s.items=e(o.items):(s.uid=o.uid,n&&(o.isNew()?s.__state__="create":o.dirty&&(s.__state__="update"))),a.push(s)}return a}(this._data),a=[],r=0;r<this._destroyed.length;r++){var o=this._destroyed[r].toJSON();o.__state__="destroy",a.push(o)}this.offlineData(i.concat(a)),e&&(this._pristineData=this.reader.reader?this.reader.reader._wrapDataAccessBase(i):this.reader._wrapDataAccessBase(i))}},_addRange:function(e,t){var n,i=this,a=void 0!==t?t:i._skip||0,r={data:e,pristineData:e.toJSON(),timestamp:i._timeStamp()};this._isGroupPaged()?(n=a+e.length,r.outerStart=a,r.outerEnd=n):n=a+i._flatData(e,!0).length,r.start=a,r.end=n,i._ranges.push(r),i._sortRanges(),i._isGroupPaged()&&(i._groupsFlat||(i._groupsFlat=[]),i._appendToGroupsFlat(r.data),i._updateOuterRangesLength())},_appendToGroupsFlat:function(e){for(var t=e.length,n=0;n<t;n++)this._groupsFlat.push(e[n])},_getGroupByUid:function(e){for(var t,n=this._groupsFlat.length,i=0;i<n;i++)if((t=this._groupsFlat[i]).uid===e)return t},_sortRanges:function(){this._ranges.sort((function(e,t){return e.start-t.start}))},error:function(e,t,n){this._dequeueRequest(),this.trigger(I,{}),this.trigger(C,{xhr:e,status:t,errorThrown:n})},_params:function(e){var t=this,n=i({take:t.take(),skip:t.skip(),page:t.page(),pageSize:t.pageSize(),sort:t._sort,filter:t._filter,group:t._group,aggregate:t._aggregate,groupPaging:!!t._groupPaging},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=je(n.group,t.reader.model)):delete n.group,t.options.serverFiltering?t.reader.model&&n.filter&&(n.filter=We(n.filter,t.reader.model)):delete n.filter,t.options.serverSorting?t.reader.model&&n.sort&&(n.sort=je(n.sort,t.reader.model)):delete n.sort,t.options.serverAggregates?t.reader.model&&n.aggregate&&(n.aggregate=je(n.aggregate,t.reader.model)):delete n.aggregate,t.options.groupPaging||delete n.groupPaging,n},_queueRequest:function(e,n){var i=this;i._requestInProgress?i._pending={callback:n.bind(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(C,{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=this,n=t.reader.model;(t._shouldDetachObservableParents=!0,e instanceof G)?(t._shouldDetachObservableParents=!1,t._shouldWrap(e)&&(e.type=t.reader.model,e.wrapAll(e,e))):(e=new(t.pageSize()&&!t.options.serverPaging?K:G)(e,t.reader.model)).parent=function(){return t.parent()};return t._isServerGrouped()&&He(e,n),!(t._changeHandler&&t._data&&t._data instanceof G)||t.options.useRanges&&t.options.serverPaging?t._changeHandler=t._change.bind(t):t._data.unbind(w,t._changeHandler),e.bind(w,t._changeHandler)},_updateTotalForAction:function(e,t){var n=this,i=parseInt(n._total,10);_e(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},_pushInDestroyed:function(e){this._destroyed.find((function(t){return t.uid===e.uid}))||this._destroyed.push(e)},_change:function(e){var t,n,i=this,a=e?e.action:"";if("remove"===a)for(t=0,n=e.items.length;t<n;t++)e.items[t].isNew&&e.items[t].isNew()||i._pushInDestroyed(e.items[t]);if(!i.options.autoSync||"add"!==a&&"remove"!==a&&"itemchange"!==a)i._updateTotalForAction(a,e?e.items:[]),i._process(i._data,e);else{var r=function(t){"sync"===t.action&&(i.unbind("change",r),i._updateTotalForAction(a,e.items))};i.first("change",r),i.sync()}},_calculateAggregates:function(e,t){t=t||{};var n=new ae(e),i=t.aggregate,a=t.filter;return a&&(n=n.filter(a)),n.aggregate(i)},_process:function(e,n){var i,a=this,r={};if(!0!==a.options.serverPaging&&(r.skip=a._skip,r.take=a._take||a._pageSize,r.skip===t&&a._page!==t&&a._pageSize!==t&&(r.skip=(a._page-1)*a._pageSize),a.options.useRanges&&(r.skip=a.currentRangeStart())),!0!==a.options.serverSorting&&(r.sort=a._sort),!0!==a.options.serverFiltering&&(r.filter=a._filter),!0!==a.options.serverGrouping&&(r.group=a._group),!0!==a.options.serverAggregates&&(r.aggregate=a._aggregate),a.options.serverGrouping&&a._clearEmptyGroups(e),r.groupPaging=a._groupPaging,i=a._isGroupPaged()&&n&&("page"===n.action||"expandGroup"===n.action||"collapseGroup"===n.action)?a._queryProcess(e,{aggregate:a._aggregate}):a._queryProcess(e,r),a._filter&&n&&"add"===n.action){var o=n.items[0];i.data.find((function(e){return e.uid===o.uid}))||(i.data.splice(o.index,0,a._isGrouped()?a._wrapInEmptyGroup(o):o),i.total++)}!0!==a.options.serverAggregates&&(a._aggregateResult=a._calculateAggregates(i.dataToAggregate||e,r)),a._setView(i,r,n),a._setFilterTotal(i.total,!1),(n=n||{}).items=n.items||a._view,a.trigger(w,n)},_setView:function(e,t,n){var i=this;if(i._isGroupPaged()&&!i._isServerGrouped())if(!n||"page"!==n.action&&"expandGroup"!==n.action&&"collapseGroup"!==n.action){i._ranges=[];var a=new ae(e.data);i._addRange(i._observe(e.data)),t.skip+t.take>e.data.length&&(t.skip=e.data.length-t.take),i.view(a.range(t.skip,t.take).toArray())}else i.view(e.data),i._updateOuterRangesLength();else i.view(e.data)},_clearEmptyGroups:function(e){for(var t=e.length-1;t>=0;t--){var n=e[t];n.hasSubgroups&&this._clearEmptyGroups(n.items),!n.items||n.items.length||n.itemCount||M.apply(n.parent(),[t,1])}},_queryProcess:function(e,t){return this.options.inPlaceSort?ae.process(e,t,this.options.inPlaceSort):ae.process(e,t)},_mergeState:function(n){var i,a=this;return n!==t&&(a._pageSize=n.pageSize,a._page=n.page,a._sort=n.sort,a._filter=n.filter,a._group=n.group,a._aggregate=n.aggregate,a._skip=a._currentRangeStart=n.skip,a._take=n.take,a._skip===t&&(a._skip=a._currentRangeStart=a.skip(),n.skip=a.skip()),a._take===t&&a._pageSize!==t&&(a._take=a._pageSize,n.take=a._take),a.options.virtual&&(n.virtual=a.options.virtual),n.sort&&(a._sort=n.sort=re(n.sort),a._sortFields=oe(n.sort)),n.filter&&(a._filter=n.filter=a.options.accentFoldingFiltering&&!e.isEmptyObject(n.filter)?e.extend({},de(n.filter),{accentFoldingFiltering:a.options.accentFoldingFiltering}):de(n.filter)),n.group&&(a._group=n.group=he(n.group)),n.aggregate&&(a._aggregate=n.aggregate=(i=n.aggregate,o(i)?i:[i]))),n},query:function(n){var i;if(this.options.serverSorting||this.options.serverPaging||this.options.serverFiltering||this.options.serverGrouping||this.options.serverAggregates||(this._data===t||0===this._data.length)&&!this._destroyed.length){if(this.options.endless){var a=n.pageSize-this.pageSize();a>0?(a=this.pageSize(),n.page=n.pageSize/a,n.pageSize=a):(n.page=1,this.options.endless=!1)}return this.read(this._mergeState(n))}var r=this.trigger(T,{type:"read"});return r||(this.trigger(S),n&&(n.groupPaging=this._groupPaging),i=this._queryProcess(this._data,this._mergeState(n)),this._setFilterTotal(i.total,!0),this._aggregateResult=this._calculateAggregates(i.dataToAggregate||this._data,n),this._setView(i,n),this.trigger(I,{type:"read"}),this.trigger(w,{items:i.data,action:n?n.action:""})),e.Deferred().resolve(r).promise()},_hasExpandedSubGroups:function(e){var t=!1,n=e.items?e.items.length:0;if(!e.hasSubgroups)return!1;for(var i=0;i<n;i++)if(this._groupsState[e.items[i].uid]){t=!0;break}return t},_findGroupedRange:function(e,t,n,i,a){for(var r,o,s,l,d,u=this,c=e.length,p=0;p<c&&(r=e[p],!(n.taken>=n.take));p++)if(u._getGroupByUid(r.uid)||u._groupsFlat.push(r),u._groupsState[r.uid]){if(u._isServerGroupPaged()){if(u._fetchGroupItems(r,n,i,a))return void(u._fetchingGroupItems=!0);if(l=(r.subgroupCount||r.itemCount)+1,d=n.skip-n.skipped,!u._hasExpandedSubGroups(r)&&d>l){n.skipped+=l;continue}}if(n.includeParents&&n.skipped<n.skip?(n.skipped++,r.excludeHeader=!0):n.includeParents&&(n.taken++,r.excludeHeader=!1),r.hasSubgroups&&r.items&&r.items.length)r.currentItems=[],i||(i=[]),i.push(r),u._findGroupedRange(r.items,r.currentItems,n,i,a),i.pop(),r.currentItems.length||n.taken>0?t.push(r):r.excludeHeader=!1;else{o=[],s=r.items.length;for(var h=0;h<s;h++)if(n.skipped<n.skip)n.skipped++;else{if(n.taken>=n.take)break;o.push(r.items[h]),n.taken++}o.length||n.taken>0?(r.currentItems=o,t.push(r)):r.excludeHeader=!1}}else{if(n.skipped<n.skip){n.skipped++;continue}t.push(r),n.taken++}},_expandedSubGroupItemsCount:function(e,t,n){var i,a,r=this,o=0,s="number"==typeof t,l=s?t:e.subgroupCount;if(!e.hasSubgroups)return o;for(var d=0;d<l&&(i=e.items[d]);d++)if(i.hasSubgroups&&r._groupsState[e.uid]?(o+=a=r._expandedSubGroupItemsCount(i,l,!0),s&&(l-=a)):!i.hasSubgroups&&r._groupsState[i.uid]&&(o+=a=i.items?i.items.length:0,s&&(l-=a)),n&&(o+=1,s&&(l-=1)),s&&o>l)return o;return o},_fetchGroupItems:function(e,t,n,i){var a,r,o,s,l=this,d=e.hasSubgroups?e.subgroupCount:e.itemCount,u=t.take,c=t.skipped,p=l.take();return t.includeParents&&(c<t.skip?c+=1:u-=1),!e.items||e.items&&!e.items.length?(l.getGroupItems(e,t,n,i,0),!0):(s=this._expandedSubGroupItemsCount(e,t.skip-c),!((a=Math.max(t.skip-(c+s),0))>=d)&&(r=e.items[a],o=e.items[Math.min(a+u,d-1)],r.notFetched?(l.getGroupItems(e,t,n,i,H.max(H.floor(a/p),0)*p,H.round((a+p)/p)),!0):o.notFetched?(l.getGroupItems(e,t,n,i,H.max(H.floor((a+p)/p),0)*p,H.round((a+p)/p)),!0):void 0))},getGroupItems:function(e,t,n,i,a,r){var o,s,l,d,u=this;e.items||(e.items=[]),o=u.take(),s=this._composeItemsFilter(e,n),l={page:r||1,pageSize:o,skip:a,take:o,filter:s,aggregate:u._aggregate,sort:u._sort},(d=u.findSubgroups(e))&&d.length&&(l.group=d,l.groupPaging=!0),clearTimeout(u._timeout),u._timeout=setTimeout((function(){u._queueRequest(l,(function(){u.trigger(T,{type:"read"})?u._dequeueRequest():u.transport.read({data:l,success:u._groupItemsSuccessHandler(e,t.skip,u.take(),i,a),error:function(){var e=L.call(arguments);u.error.apply(u,e)}})}))}),100)},_groupItemsSuccessHandler:function(e,t,n,i,a){var r=this,o=r._timeStamp();i=p(i)?i:u;var s=r.options.schema&&r.options.schema.total?r.options.schema.total:"Total";return function(l){var d,u,c=ee.define(r.options.schema.model);r._dequeueRequest(),r.trigger(I,{response:l,type:"read"}),u=p(s)?s(l):l[s],l=r.reader.parse(l),e.hasSubgroups?(d=r.reader.groups(l),e.subgroupCount=u):d=(d=r.reader.data(l)).map((function(e){return new c(e)})),e.items.omitChangeEvent=!0;for(var h=0;h<u;h++)h>=a&&h<a+n?e.items.splice(h,1,d[h-a]):e.items[h]||e.items.splice(h,0,{notFetched:!0});e.items.omitChangeEvent=!1,r._updateRangePristineData(e),r._fetchingGroupItems=!1,e.countAdded||(r._serverGroupsTotal+=u,e.countAdded=!0),r.range(t,n,i,"expandGroup"),(o>=r._currentRequestTimeStamp||!r._skipRequestsInProgress)&&r.trigger(w,{})}},findSubgroups:function(e){var t=this._group.map((function(e){return e.field})).indexOf(e.field);return this._group.slice(t+1,this._group.length)},_composeItemsFilter:function(e,t){var n=this.filter()||{logic:"and",filters:[]};if(n.logic="and",(n=i(!0,{},n)).filters.push({field:e.field,operator:"eq",value:e.value}),t)for(var a=0;a<t.length;a++)n.filters.push({field:t[a].field,operator:"eq",value:t[a].value});return n},_updateRangePristineData:function(e){for(var t,n,i,a,r,o=this,s=o._ranges,l=s.length,d=0;d<l;d++){a=(i=s[d]).data.length,r=[],t=null;for(var u=0;u<a&&(n=i.data[u],r.push(u),!(n.uid===e.uid||n.hasSubgroups&&n.items.length&&o._containsSubGroup(n,e,r)));u++)r.pop();if(r.length){for(t=s[d].pristineData;r.length>1;)t=t[r.splice(0,1)[0]].items;t[r[0]]=o._cloneGroup(e);break}}},_containsSubGroup:function(e,t,n){var i,a=e.items.length;if(e.hasSubgroups&&a)for(var r=0;r<a;r++){if(i=e.items[r],n.push(r),i.uid===t.uid||i.hasSubgroups&&i.items.length&&this._containsSubGroup(i,t,n))return!0;n.pop()}},_cloneGroup:function(e){var t=this;return(e="function"==typeof e.toJSON?e.toJSON():e).items&&e.items.length&&(e.items=e.items.map((function(e){return t._cloneGroup(e)}))),e},_setFilterTotal:function(e,n){var i=this;i.options.serverFiltering||(e!==t?i._total=e:n&&(i._total=i._data.length))},fetch:function(e){var t=this;return this._query().done((function(n){!0!==n&&p(e)&&e.call(t)}))},_query:function(e){var t=this;return t.query(i({},{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;if(e!==t){e=H.max(H.min(H.max(e,1),i.totalPages()),1);var a=i.take();return i._isGroupPaged()?(e-=1,void i.range(e*a,a,null,"page")):void i._query(i._pageableQueryOptions({page:e}))}return(n=i.skip())!==t?H.round((n||0)/(i.take()||1))+1:t},pageSize:function(e){var n=this;if(e===t)return n.take();n._query(n._pageableQueryOptions({pageSize:e,page:1}))},sort:function(e){var n=this;return e!==t?(n.trigger("sort"),void n._query({sort:e})):n._sort},filter:function(e){var n=this;if(e===t)return n._filter;n.trigger("reset"),n._query({filter:e,page:1})},group:function(e){var n=this,i={group:e};if(n._groupPaging&&(e===t||e&&e.length||(n._ranges=[]),i.page=1),e===t)return n._group;n._query(i)},getGroupsFlat:function(e){var t,n,i=[];for(t=0,n=e.length;t<n;t++){var a=e[t];a.hasSubgroups&&(i=i.concat(this.getGroupsFlat(a.items))),i.push(a)}return i},total:function(){return parseInt(this._total||0,10)},groupsTotal:function(e){var t=this;return t._group.length?t._isServerGrouped()?(t._serverGroupsTotal||(t._serverGroupsTotal=t.total()),t._serverGroupsTotal):t._calculateGroupsTotal(t._ranges.length?t._ranges[0].data:[],e):t.total()},_calculateGroupsTotal:function(e,t,n,i){var a,r,o=this;if(n=n||"items",o._group.length&&e){a=0,r=e.length;for(var s=0;s<r;s++)a+=o.groupCount(e[s],t,n,i);return o._groupsTotal=a,a}return o._groupsTotal=o._data.length,o._groupsTotal},groupCount:function(e,t,n,i){var a=this,r=0;return e.hasSubgroups&&a._groupsState[e.uid]?((t&&!e.excludeHeader||i)&&(r+=1),e[n].forEach((function(e){r+=a.groupCount(e,t,n,i)}))):a._groupsState[e.uid]?((t&&!e.excludeHeader||i)&&r++,r+=e[n]?e[n].length:0):r++,r},countGroupRange:function(e){for(var t=0,n=e.length,i=0;i<n;i++)t+=this.groupCount(e[i],!0);return t},aggregate:function(e){if(e===t)return this._aggregate;this._query({aggregate:e})},aggregates:function(){var e=this._aggregateResult;return r(e)&&(e=this._emptyAggregates(this.aggregate())),e},_emptyAggregates:function(e){var t={};if(!r(e)){var n={};o(e)||(e=[e]);for(var i=0;i<e.length;i++)n[e[i].aggregate]=0,t[e[i].field]=n}return t},_pageableQueryOptions:function(e){return e},_wrapInEmptyGroup:function(e){var t,n,i,a=this.group();for(i=a.length-1,0;i>=0;i--)n=a[i],t={value:e.get?e.get(n.field):e[n.field],field:n.field,items:t?[t]:[e],hasSubgroups:!!t,aggregates:this._emptyAggregates(n.aggregates)};return t},totalPages:function(){var e=this,t=e.pageSize()||e.total(),n=e._isGroupPaged()?e.groupsTotal(!0):e.total();return H.ceil((n||0)/t)},inRange:function(e,t){var n=this,i=H.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,a){this._currentRequestTimeStamp=this._timeStamp(),this._skipRequestsInProgress=!0;var r=this._isGroupPaged()?this.groupsTotal(!0):this.total();"expandGroup"!==a&&"collapseGroup"!==a||this._updateOuterRangesLength(),e=H.min(e||0,r),i=p(i)?i:u;var o,s=this,l=H.max(H.floor(e/n),0)*n,d=H.min(l+n,r);if(((o=s._findRange(e,H.min(e+n,r),i)).length||0===r)&&!s._fetchingGroupItems)return s._processRangeData(o,e,n,s._originalPageSkip||l,s._originalSize||d,{action:a}),s._originalPageSkip=null,s._originalSize=null,void i();s._isGroupPaged()&&(s._originalPageSkip=l,s._originalSize=d,l=H.max(H.floor(s._adjustPageSkip(e,n)/n),0)*n,d=H.min(l+n,r)),n===t||s._fetchingGroupItems||(s._isGroupPaged()&&!s._groupRangeExists(l,n)||!s._rangeExists(l,d)?s.prefetch(l,n,(function(){e>l&&d<s.total()&&!s._rangeExists(d,H.min(d+n,s.total()))?s.prefetch(d,n,(function(){s.range(e,n,i)})):s.range(e,n,i)})):l<e&&s.prefetch(d,n,(function(){s.range(e,n,i)})))},_findRange:function(e,n,i){var a,r,o,s,l,d,u,c,p,h,f,m,g=this,v=g._ranges,_=[],b=g.options,k=b.serverSorting||b.serverPaging||b.serverFiltering||b.serverGrouping||b.serverAggregates,w={take:n-e,skip:e,skipped:0,taken:0,includeParents:!0},y=g._isGroupPaged(),x=y?"outerStart":"start",C=y?"outerEnd":"end";for(r=0,f=v.length;r<f;r++){if(a=v[r],y){if(a.outerStart>=n)return[];if(e>a.outerEnd){w.skipped+=a.outerEnd-(m||0),m=a.outerEnd;continue}if(void 0!==m&&m!=a.outerStart&&(w.skipped+=a.outerStart-m),w.skipped>w.skip)return[];for(void 0===m&&e>0&&a.start>0&&(w.skipped=a.outerStart),o=r;;){if(this._findGroupedRange(a.data,_,w,null,i),g._calculateGroupsTotal(_,!0,"currentItems")>=w.take)return _;if(g._fetchingGroupItems)return[];if(!v[++o]||v[o].outerStart!==a.outerEnd)break;a=v[o]}}else if(e>=a[x]&&e<=a[C]){for(h=0,o=r;o<f;o++)if(a=v[o],(p=g._flatData(a.data,!0)).length&&e+h>=a.start){if(d=a.data,u=a.end,!k){if(b.inPlaceSort)c=g._queryProcess(a.data,{filter:g.filter()});else{var T=fe(g.group()||[]).concat(re(g.sort()||[]));c=g._queryProcess(a.data,{sort:T,filter:g.filter()})}p=d=c.data,c.total!==t&&(u=c.total)}if(s=0,e+h>a.start&&(s=e+h-a.start),l=p.length,u>n&&(l-=u-n),h+=l-s,_=g._mergeGroups(_,d,s,l),n<=a.end&&h==n-e)return _}break}m=a.outerEnd}return[]},_getRangesMismatch:function(e){for(var t=this._ranges,n=0,i=0;;){var a=t[i];if(!a||a.outerStart>e)break;a.outerEnd!=a.end&&(n=a.outerEnd-a.end),i++}return n},_mergeGroups:function(e,t,n,i){if(this._isServerGrouped()){var a,r=t.toJSON();return e.length&&(a=e[e.length-1]),Fe(a,r,n,i),e.concat(r)}return e.concat(t.slice(n,i))},_processRangeData:function(e,n,i,a,r,o){var s=this;s._pending=t,s._skip=n>s.skip()&&!s._omitPrefetch?H.min(r,(s.totalPages()-1)*s.take()):a,s._currentRangeStart=n,s._take=i;var l=s.options.serverPaging,d=s.options.serverSorting,u=s.options.serverFiltering,c=s.options.serverAggregates;try{s.options.serverPaging=!0,s._isServerGrouped()||s.group()&&s.group().length||(s.options.serverSorting=!0),s.options.serverFiltering=!0,s.options.serverPaging=!0,s.options.serverAggregates=!0,l&&(s._detachObservableParents(),s._data=e=s._observe(e)),s._process(e,o)}finally{s.options.serverPaging=l,s.options.serverSorting=d,s.options.serverFiltering=u,s.options.serverAggregates=c}},skip:function(){var e=this;return e._skip===t?e._page!==t?(e._page-1)*(e.take()||1):t:e._skip},currentRangeStart:function(){return this._currentRangeStart||0},take:function(){return this._take||this._pageSize},_prefetchSuccessHandler:function(e,t,n,i){var a=this,r=a._timeStamp();return function(o){var s,l,d,u=!1,c={start:e,end:t,data:[],timestamp:a._timeStamp()};if(a._dequeueRequest(),a.trigger(I,{response:o,type:"read"}),o=a.reader.parse(o),(d=a._readData(o)).length){for(s=0,l=a._ranges.length;s<l;s++)if(a._ranges[s].start===e){u=!0,c=a._ranges[s],a._isGroupPaged()||(c.pristineData=d,c.data=a._observe(d),c.end=c.start+a._flatData(c.data,!0).length,a._sortRanges());break}u||a._addRange(a._observe(d),e)}a._total=a.reader.total(o),(i||r>=a._currentRequestTimeStamp||!a._skipRequestsInProgress)&&(n&&d.length?n():a.trigger(w,{}))}},prefetch:function(e,t,n){var i=this,a=H.min(e+t,i.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._isGroupPaged()&&!i._isServerGrouped()&&i._groupRangeExists(e,a)?n&&n():i._isServerGroupPaged()&&!i._groupRangeExists(e,a)||!i._rangeExists(e,a)?(clearTimeout(i._timeout),i._timeout=setTimeout((function(){i._queueRequest(r,(function(){i.trigger(T,{type:"read"})?i._dequeueRequest():(i._omitPrefetch&&i.trigger(S),i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,a,n),error:function(){var e=L.call(arguments);i.error.apply(i,e)}}))}))}),100)):n&&n()},_multiplePrefetch:function(e,t,n){var i=this,a=H.min(e+t,i.total()),r={take:t,skip:e,page:e/t+1,pageSize:t,sort:i._sort,filter:i._filter,group:i._group,aggregate:i._aggregate};i._rangeExists(e,a)?n&&n():i.trigger(T,{type:"read"})||i.transport.read({data:i._params(r),success:i._prefetchSuccessHandler(e,a,n,!0)})},_adjustPageSkip:function(e,t){var n,i,a=this,r=a._getPrevRange(e),o=a.total();if(r){if(!(i=a._getRangesMismatch(e)))return e;e-=i}if((n=H.max(H.floor(e/t),0)*t)>o)for(;!((n-=t)<o););return n},_getNextRange:function(e){var t,n,i=this._ranges;for(t=0,n=i.length;t<n;t++)if(i[t].start<=e&&i[t].end>=e)return i[t]},_getPrevRange:function(e){var t,n,i=this._ranges;for(t=i.length-1;t>=0;t--)if(i[t].outerStart<=e){n=i[t];break}return n},_rangeExists:function(e,t){var n,i,a=this._ranges;for(n=0,i=a.length;n<i;n++)if(a[n].start<=e&&a[n].end>=t)return!0;return!1},_groupRangeExists:function(e,t){var n,i,a=this,r=a._ranges,o=0,s=a.groupsTotal(!0);for(t>s&&!a._isServerGrouped()&&(t=s),n=0,i=r.length;n<i;n++){var l=r[n];l.outerStart<=e&&l.outerEnd>=e?o+=l.outerEnd-e:l.outerStart<=t&&l.outerEnd>=t&&(o+=t-l.outerStart)}return o>=t-e},_getCurrentRangeSpan:function(){var e,t,n=this,i=n._ranges,a=n.currentRangeStart(),r=a+(n.take()||0),o=[],s=i.length;for(t=0;t<s;t++)((e=i[t]).start<=a&&e.end>=a||e.start>=a&&e.start<=r)&&o.push(e);return o},_removeModelFromRanges:function(e){for(var t,n=0,i=this._ranges.length;n<i;n++)t=this._ranges[n],this._removeModelFromRange(t,e);this._updateRangesLength()},_removeModelFromRange:function(e,t){this._eachItem(e.data,(function(e){if(e)for(var n=0;n<e.length;n++){var i=e[n];if(i.uid&&i.uid==t.uid){[].splice.call(e,n,1);break}}}))},_insertModelInRange:function(e,t){var n,i,a=this,r=a._ranges||[],o=r.length;for(i=0;i<o;i++)if((n=r[i]).start<=e&&n.end>=e){a._getByUid(t.uid,n.data)||(a._isServerGrouped()?n.data.splice(e,0,a._wrapInEmptyGroup(t)):n.data.splice(e,0,t));break}a._updateRangesLength()},_updateRangesLength:function(){var e,t,n=this,i=n._ranges||[],a=i.length,r=!1,o=0,s=0;for(t=0;t<a;t++)e=i[t],s=(n._isGroupPaged()?e.data.length:n._flatData(e.data,!0).length)-H.abs(e.end-e.start),r||0===s?r&&(e.start+=o,e.end+=o):(r=!0,o=s,e.end+=o)},_updateOuterRangesLength:function(){var e,t,n,i,a=this,r=a._ranges||[],o=r.length,s=0;for(t=0;t<o;t++)e=r[t],i=a._isGroupPaged()?a._calculateGroupsTotal(e.data,!0,"items",!0):a._flatData(e.data,!0).length,n?(n.end!=e.start&&(s=e.start-n.end),e.outerStart=n.outerEnd+s,s=0):e.outerStart=e.start,e.outerEnd=e.outerStart+i,n=e}}),Ge={};Ge.create=function(t,n,r){var o,s=t.transport?e.extend({},t.transport):null;return s?(s.read=typeof s.read===m?{url:s.read}:s.read,"jsdo"===t.type&&(s.dataSource=r),t.type&&(c.data.transports=c.data.transports||{},c.data.schemas=c.data.schemas||{},c.data.transports[t.type]?a(c.data.transports[t.type])?s=i(!0,{},c.data.transports[t.type],s):o=new c.data.transports[t.type](i(s,{data:n})):c.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=i(!0,{},c.data.schemas[t.type],t.schema)),o||(o=p(s.read)?s:new ye(s))):o=new we({data:t.data||[]}),o},qe.create=function(n){(o(n)||n instanceof G)&&(n={data:n});var a,s,l,d=n||{},u=d.data,p=d.fields,h=d.table,f=d.select,m={};if(u||!p||d.transport||(h?u=function(t,n){var i,a,r,o,s,l,d,u=e(t)[0].tBodies[0],c=u?u.rows:[],p=n.length,h=[];for(i=0,a=c.length;i<a;i++){for(s={},d=!0,o=c[i].cells,r=0;r<p;r++)"th"!==(l=o[r]).nodeName.toLowerCase()&&(d=!1,s[n[r].field]=l.innerHTML);d||h.push(s)}return h}(h,p):f&&(u=function(t,n){var i,a,r,o,s,l,d=(t=e(t)[0]).options,u=n[0],c=n[1],p=[];for(i=0,a=d.length;i<a;i++)s={},(r=(o=d[i]).parentNode)===t&&(r=null),o.disabled||r&&r.disabled||(r&&(s.optgroup=r.label),s[u.field]=o.text,l=(l=o.attributes.value)&&l.specified?o.value:o.text,s[c.field]=l,p.push(s));return p}(f,p),d.group===t&&u[0]&&u[0].optgroup!==t&&(d.group="optgroup"))),c.data.Model&&p&&(!d.schema||!d.schema.model)){for(a=0,s=p.length;a<s;a++)(l=p[a]).type&&(m[l.field]=l);r(m)||(d.schema=i(!0,d.schema,{model:{fields:m}}))}return d.data=u,f=null,d.select=null,h=null,d.table=null,d instanceof qe?d:new qe(d)};var Ke=ee.define({idField:"id",init:function(e){var t=this,n=t.hasChildren||e&&e.hasChildren,a="items",r={};if(c.data.Model.fn.init.call(t,e),typeof t.children===m&&(a=t.children),r={schema:{data:a,model:{hasChildren:n,id:t.idField,fields:t.fields}}},typeof t.children!==m&&i(r,t.children),r.data=e,n||(n=r.schema.data),typeof n===m&&(n=c.getter(n)),p(n)){var o=n.call(t,t);o&&0===o.length?t.hasChildren=!1:t.hasChildren=!!o}t._childrenOptions=r,t.hasChildren&&t._initChildren(),t._loaded=!(!e||!e._loaded)},_initChildren:function(){var e,t,n,i=this;i.children instanceof Ye||(t=(e=i.children=new Ye(i._childrenOptions)).transport,n=t.parameterMap,t.parameterMap=function(e,t){return e[i.idField||"id"]=i.id,n&&(e=n.call(i,e,t)),e},e.parent=function(){return i},e.bind(w,(function(e){e.node=e.node||i,i.trigger(w,e)})),e.bind(C,(function(e){var t=i.parent();t&&(e.node=e.node||i,t.trigger(C,e))})),e.bind(D,(function(e){var t=i.parent();t&&t.trigger(D,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(){this[this._childrenOptions.schema.data||"items"]=this.children.data()},_childrenLoaded:function(){this._loaded=!0,this._updateChildrenField()},load:function(){var n,i,a={},r="_query";return this.hasChildren?(this._initChildren(),n=this.children,a[this.idField||"id"]=this.id,this._loaded||(n._data=t,r="read"),n.one(w,this._childrenLoaded.bind(this)),this._matchFilter&&(a.filter={field:"_matchFilter",operator:"eq",value:!0}),i=n[r](a),this._loaded||this.trigger(E,{promise:i,node:this})):this.loaded(!0),i||e.Deferred().resolve().promise()},parentNode:function(){return this.parent().parent()},loaded:function(e){if(e===t)return this._loaded;this._loaded=e},shouldSerialize:function(e){return ee.fn.shouldSerialize.call(this,e)&&"children"!==e&&"_loaded"!==e&&"hasChildren"!==e&&"_childrenOptions"!==e}});function $e(e){return function(){var t=this._data,n=qe.fn[e].apply(this,L.call(arguments));return this._data!=t&&this._attachBubbleHandlers(),n}}var Ye=qe.extend({init:function(e){var t=Ke.define({children:e});e.filter&&!e.serverFiltering&&(this._hierarchicalFilter=e.filter,e.filter=null),qe.fn.init.call(this,i(!0,{},{schema:{modelBase:t,model:t}},e)),this._attachBubbleHandlers()},_attachBubbleHandlers:function(){var e=this;e._data.bind(C,(function(t){e.trigger(C,t)})),e._data.bind(D,(function(t){e.trigger(D,t)}))},loading:function(){return!!this._data&&(this._data.loading()||this._childrenLoading())},_childrenLoading:function(){var e=!1;return this._data.forEach((function(t){t.hasChildren&&t.children.loading()&&(e=!0)})),e},read:function(e){var t=qe.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=de(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=qe.fn.remove.call(i,e),n&&!i.data().length&&(n.hasChildren=!1),t},success:$e("success"),data:$e("data"),insert:function(e,t){var n=this.parent();return n&&n._initChildren&&(n.hasChildren=!0,n._initChildren()),qe.fn.insert.call(this,e,t)},filter:function(e){if(e===t)return 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})},_markHierarchicalQuery:function(t){var n,i,a,r,o,s=this.options.accentFoldingFiltering;return(t=s?e.extend({},de(t),{accentFoldingFiltering:s}):de(t))&&0!==t.filters.length?(n=ae.filterExpr(t),a=n.fields,r=n.operators,i=o=new Function("d, __f, __o","return "+n.expression),(a.length||r.length)&&(o=function(e){return i(e,a,r)}),this._updateHierarchicalFilter(o),!0):(this._updateHierarchicalFilter((function(){return!0})),!1)},_updateHierarchicalFilter:function(e){for(var t,n=this._data,i=!1,a=0;a<n.length;a++)(t=n[a]).hasChildren?(t._matchFilter=t.children._updateHierarchicalFilter(e),t._matchFilter||(t._matchFilter=e(t))):t._matchFilter=e(t),t._matchFilter&&(i=!0);return i},_find:function(e,t){var n,i,a,r,o=this._data;if(o){if(a=qe.fn[e].call(this,t))return a;for(n=0,i=(o=this._flatData(this._data)).length;n<i;n++)if((r=o[n].children)instanceof Ye&&(a=r[e](t)))return a}},get:function(e){return this._find("get",e)},getByUid:function(e){return this._find("getByUid",e)}});function Qe(t,n){var i,a,r,o,s,l,d,u,p=e(t).children(),h=[],f=n[0].field,m=n[1]&&n[1].field,g=n[2]&&n[2].field,v=n[3]&&n[3].field;function _(e,t){return e.filter(t).add(e.find(t))}for(i=0,a=p.length;i<a;i++)r={_loaded:!0},l=(o=p.eq(i))[0].firstChild,t=(u=o.children()).filter("ul"),u=u.filter(":not(ul)"),(s=o.attr("data-id"))&&(r.id=s),l&&(r[f]=3==l.nodeType?l.nodeValue:u.text()),m&&(r[m]=_(u,"a").attr("href")),v&&(r[v]=_(u,"img").attr("src")),g&&(d=_(u,".k-sprite").prop("className"),r[g]=d&&c.trim(d.replace("k-sprite",""))),t.length&&(r.items=Qe(t.eq(0),n)),"true"==o.attr("data-hasChildren")&&(r.hasChildren=!0),h.push(r);return h}Ye.create=function(e){var t=(e=e&&e.push?{data:e}:e)||{},n=t.data,i=t.fields,a=t.list;return n&&n._dataSource?n._dataSource:(n||!i||t.transport||a&&(n=Qe(a,i)),t.data=n,t instanceof Ye?t:new Ye(t))};var Xe=c.Observable.extend({init:function(e,t,n){c.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 t=this.pageSize,n=!0;return e>=this.total()?(this.trigger("endreached",{index:e}),null):this.useRanges?this.useRanges?((e<this.dataOffset||e>=this.skip+t)&&(n=this.range(Math.floor(e/t)*t)),e===this.prefetchThreshold&&this._prefetch(),e===this.midPageThreshold?this.range(this.nextMidRange,!0):e===this.nextPageThreshold?this.range(this.nextFullRange):e===this.pullBackThreshold&&(this.offset===this.skip?this.range(this.previousMidRange):this.range(this.previousFullRange)),n?this.dataSource.at(e-this.dataOffset):(this.trigger("endreached",{index:e}),null)):void 0: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=H.max(H.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,a=H.max(H.floor(e/i),0)*i,r=this.dataSource;return t&&(a+=i),r.inRange(e,i)?(this.offset=e,this._recalculate(),this._goToRange(e),!0):!this.prefetch||(r.prefetch(a,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}}),Je=c.Observable.extend({init:function(e,t){var n=this;c.Observable.fn.init.call(n),this.dataSource=e,this.batchSize=t,this._total=0,this.buffer=new Xe(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=this.buffer,i=e*this.batchSize,a=this.batchSize,r=[];n.offset>i&&n.at(n.offset-1);for(var o=0;o<a&&null!==(t=n.at(i+o));o++)r.push(t);return r},total:function(){return this._total},destroy:function(){this.buffer.destroy(),this.unbind()}});i(!0,c.data,{readers:{json:Ee},Query:ae,DataSource:qe,HierarchicalDataSource:Ye,Node:Ke,Comparer:te,ObservableObject:Q,ObservableArray:G,LazyObservableArray:K,LocalTransport:we,RemoteTransport:ye,Cache:xe,DataReader:Ee,Model:ee,Buffer:Xe,BatchBuffer:Je})}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=n.Class,o=n.support,s=n.getOffset,l=n._outerWidth,d=n._outerHeight,u="open",c="close",p="deactivate",h="activate",f="center",m="right",g="top",v="bottom",_="absolute",b="hidden",k="body",w="location",y="position",x="visible",C="effects",T="k-active",S="k-state-border",I=/k-state-border-(\w+)/,D=".k-picker-wrap, .k-dropdown-wrap, .k-link",E=e(document.documentElement),A=e(window),F="scroll",z=o.transitions.css+"transform",P=e.extend,H=".kendoPopup",N=["font-size","font-family","font-stretch","font-style","font-weight","line-height"];function R(t,n){return!(!t||!n)&&(t===n||e.contains(t,n))}var O=a.extend({init:function(t,i){var r,s=this;(i=i||{}).isRtl&&(i.origin=i.origin||"bottom right",i.position=i.position||"top right"),a.fn.init.call(s,t,i),t=s.element,i=s.options,s.collisions=i.collision?i.collision.split(" "):[],s.downEvent=n.applyEventMap("down",n.guid()),1===s.collisions.length&&s.collisions.push(s.collisions[0]),r=e(s.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"),i.appendTo=e(e(i.appendTo)[0]||r[0]||document.body),s.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl",!!i.isRtl).css({position:_}).appendTo(i.appendTo).attr("aria-hidden",!0).on("mouseenter"+H,(function(){s._hovered=!0})).on("wheel"+H,(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"+H,(function(){s._hovered=!1})),s.wrapper=e(),!1===i.animation&&(i.animation={open:{effects:{}},close:{hide:!0,effects:{}}}),P(i.animation.open,{complete:function(){s.wrapper.css({overflow:x}),s._activated=!0,s._trigger(h)}}),P(i.animation.close,{complete:function(){s._animationClose()}}),s._mousedownProxy=function(e){s._mousedown(e)},o.mobileOS.android?s._resizeProxy=function(e){setTimeout((function(){s._resize(e)}),600)}:s._resizeProxy=function(e){s._resize(e)},i.toggleTarget&&e(i.toggleTarget).on(i.toggleEvent+H,s.toggle.bind(s))},events:[u,h,c,p],options:{name:"Popup",toggleEvent:"click",origin:"bottom left",position:"top left",anchor:k,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}},omitOriginOffsets:!1},_animationClose:function(){var e=this,t=e.wrapper.data(w);e.wrapper.hide(),t&&e.wrapper.css(t),e.options.anchor!=k&&e._hideDirClass(),e._closing=!1,e._trigger(p)},destroy:function(){var t,i=this,r=i.options,o=i.element.off(H);a.fn.destroy.call(i),r.toggleTarget&&e(r.toggleTarget).off(H),r.modal||(E.off(i.downEvent,i._mousedownProxy),i._toggleResize(!1)),n.destroy(i.element.children()),o.removeData(),r.appendTo[0]===document.body&&((t=o.parent(".k-animation-container"))[0]?t.remove():o.remove())},open:function(i,a){var r,s,l=this,d={isFixed:!isNaN(parseInt(a,10)),x:i,y:a},c=l.element,p=l.options,h=e(p.anchor),f=c[0]&&c.hasClass("km-widget"),m=c.find("[role='listbox']");if(!l.visible()){if(p.copyAnchorStyles&&(f&&"font-size"==N[0]&&N.shift(),c.css(n.getComputedStyles(h[0],N))),c.data("animating")||l._trigger(u))return;l._activated=!1,p.modal||(E.off(l.downEvent,l._mousedownProxy).on(l.downEvent,l._mousedownProxy),l._toggleResize(!1),l._toggleResize(!0)),l.wrapper=s=n.wrap(c,p.autosize).css({overflow:b,display:"block",position:_}).attr("aria-hidden",!1),m.attr("aria-label")?s.attr("aria-label",m.attr("aria-label")):m.attr("aria-labelledby")&&s.attr("aria-labelledby",m.attr("aria-labelledby")),o.mobileOS.android&&s.css(z,"translatez(0)"),s.css(y),e(p.appendTo)[0]==document.body&&s.css(g,"-10000px"),l.flipped=l._position(d),r=l._openAnimation(),p.anchor!=k&&l._showDirClass(r),c.is(":visible")||c.data("olddisplay")!==t||(c.show(),c.data("olddisplay",c.css("display")),c.hide()),c.data(C,r.effects).kendoStop(!0).kendoAnimate(r).attr("aria-hidden",!1)}},_location:function(t){var i,a=this,r=a.element,s=a.options,l=e(s.anchor),d=r[0]&&r.hasClass("km-widget");s.copyAnchorStyles&&(d&&"font-size"==N[0]&&N.shift(),r.css(n.getComputedStyles(l[0],N))),a.wrapper=i=n.wrap(r,s.autosize).css({overflow:b,display:"block",position:_}),o.mobileOS.android&&i.css(z,"translatez(0)"),i.css(y),e(s.appendTo)[0]==document.body&&i.css(g,"-10000px"),a._position(t||{});var u=i.offset();return{width:n._outerWidth(i),height:n._outerHeight(i),left:u.left,top:u.top}},_openAnimation:function(){var e=P(!0,{},this.options.animation.open);return e.effects=n.parseEffects(e.effects,this.flipped),e},_hideDirClass:function(){var t=e(this.options.anchor),i=((t.attr("class")||"").match(I)||["","down"])[1],a=S+"-"+i;t.removeClass(a).children(D).removeClass(T).removeClass(a),this.element.removeClass(S+"-"+n.directions[i].reverse)},_showDirClass:function(t){var i=t.effects.slideIn?t.effects.slideIn.direction:"down",a=S+"-"+i;e(this.options.anchor).addClass(a).children(D).addClass(T).addClass(a),this.element.addClass(S+"-"+n.directions[i].reverse)},position:function(){this.visible()&&(this.flipped=this._position())},toggle:function(){this[this.visible()?c:u]()},visible:function(){return this.element.is(":visible")},close:function(t){var i,a,r,o,s=this,l=s.options;if(s.visible()){if(i=s.wrapper[0]?s.wrapper:n.wrap(s.element).hide(),s._toggleResize(!1),s._closing||s._trigger(c))return void s._toggleResize(!0);s.element.find(".k-popup").each((function(){var n=e(this).data("kendoPopup");n&&n.close(t)})),E.off(s.downEvent,s._mousedownProxy),t?a={hide:!0,effects:{}}:(a=P(!0,{},l.animation.close),r=s.element.data(C),!(o=a.effects)&&!n.size(o)&&r&&n.size(r)&&(a.effects=r,a.reverse=!0),s._closing=!0),s.element.kendoStop(!0).attr("aria-hidden",!0),i.css({overflow:b}).attr("aria-hidden",!0),s.element.kendoAnimate(a),t&&s._animationClose()}},_trigger:function(e){return this.trigger(e,{type:e})},_resize:function(e){var t=this;-1!==o.resize.indexOf(e.type)?(clearTimeout(t._resizeTimeout),t._resizeTimeout=setTimeout((function(){t._position(),t._resizeTimeout=null}),50)):(!t._hovered||t._activated&&t.element.find(".k-list").length>0)&&t.close()},_toggleResize:function(e){var t=e?"on":"off",n=o.resize;o.mobileOS.ios||o.mobileOS.android||o.browser.safari||(n+=" scroll"),e&&!this.scrollableParents&&(this.scrollableParents=this._scrollableParents()),this.scrollableParents&&this.scrollableParents.length&&this.scrollableParents[t](F,this._resizeProxy),A[t](n,this._resizeProxy)},_mousedown:function(t){var i=this,a=i.element[0],r=i.options,o=e(r.anchor)[0],s=r.toggleTarget,l=n.eventTarget(t),d=e(l).closest(".k-popup"),u=d.parent().parent(".km-shim").length;d=d[0],!u&&d&&d!==i.element[0]||"popover"!==e(t.target).closest("a").data("rel")&&(R(a,l)||R(o,l)||s&&R(e(s)[0],l)||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,a,r,o){var s=0;return o=o||t,r!==a&&r!==f&&a!==f&&(e+o>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 n.isScrollable(t)}))},_position:function(t){var i,a,r,u,c,p,h,f=this,m=f.element,g=f.wrapper,v=f.options,b=e(v.viewport),k=o.zoomLevel(),x=!!(b[0]==window&&window.innerWidth&&k<=1.02),C=e(v.anchor),T=v.origin.toLowerCase().split(" "),S=v.position.toLowerCase().split(" "),I=f.collisions,D=10002,E=0,A=document.documentElement;(c=v.viewport===window?{top:window.pageYOffset||document.documentElement.scrollTop||0,left:window.pageXOffset||document.documentElement.scrollLeft||0}:b.offset(),x?(p=window.innerWidth,h=window.innerHeight):(p=b.width(),h=b.height()),x&&A.scrollHeight-A.clientHeight>0)&&(p-=(v.isRtl?-1:1)*n.support.scrollbar());if((i=C.parents().filter(g.siblings()))[0])if(r=Math.max(Number(i.css("zIndex")),0))D=r+10;else for(u=(a=C.parentsUntil(i)).length;E<u;E++)(r=Number(e(a[E]).css("zIndex")))&&D<r&&(D=r+10);g.css("zIndex",D),t&&t.isFixed?g.css({left:t.x,top:t.y}):g.css(f._align(T,S));var F=s(g,y,C[0]===g.offsetParent()[0]),z=s(g);C.offsetParent().parent(".k-animation-container,.k-popup,.k-group").length&&(F=s(g,y,!0),z=s(g)),z.top-=c.top,z.left-=c.left,f.wrapper.data(w)||g.data(w,P({},F));var H=P({},z),N=P({},F),R=v.adjustSize;"fit"===I[0]&&(N.top+=f._fit(H.top,d(g)+R.height,h/k)),"fit"===I[1]&&(N.left+=f._fit(H.left,l(g)+R.width,p/k));var O=P({},N),M=d(m),B=d(g);return!g.height()&&M&&(B+=M),"flip"===I[0]&&(N.top+=f._flip(H.top,M,d(C),h/k,T[0],S[0],B)),"flip"===I[1]&&(N.left+=f._flip(H.left,l(m),l(C),p/k,T[1],S[1],l(g))),m.css(y,_),g.css(N),N.left!=O.left||N.top!=O.top},_align:function(t,n){var i,a=this,r=a.wrapper,o=e(a.options.anchor),u=t[0],c=t[1],p=n[0],h=n[1],g=s(o),_=e(a.options.appendTo),b=l(r),k=d(r)||d(r.children().first()),w=l(o),y=d(o),x=a.options.omitOriginOffsets?0:g.top,C=a.options.omitOriginOffsets?0:g.left,T=Math.round;return _[0]!=document.body&&(x-=(i=s(_)).top,C-=i.left),u===v&&(x+=y),u===f&&(x+=T(y/2)),p===v&&(x-=k),p===f&&(x-=T(k/2)),c===m&&(C+=w),c===f&&(C+=T(w/2)),h===m&&(C-=b),h===f&&(C-=T(b/2)),{top:x,left:C}}});i.plugin(O);var M=n.support.stableSort,B="kendoTabKeyTrap",L=r.extend({init:function(t){this.element=e(t),this.element.autoApplyNS(B)},trap:function(){this.element.on("keydown",this._keepInTrap.bind(this))},removeTrap:function(){this.element.kendoDestroy(B)},destroy:function(){this.element.kendoDestroy(B),this.element=t},shouldTrap:function(){return!0},_keepInTrap:function(e){if(9===e.which&&this.shouldTrap()&&!e.isDefaultPrevented()){var t=this._focusableElements(),n=this._sortFocusableElements(t),i=this._nextFocusable(e,n);this._focus(i),e.preventDefault()}},_focusableElements:function(){var t=this.element.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], *[contenteditable]").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;if(M)t=e.sort((function(e,t){return e.tabIndex-t.tabIndex}));else{var 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)}return 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){"IFRAME"!=e.nodeName?(e.focus(),"INPUT"==e.nodeName&&e.setSelectionRange&&this._haveSelectionRange(e)&&e.setSelectionRange(0,e.value.length)):e.contentWindow.document.body.focus()},_haveSelectionRange:function(e){var t=e.type.toLowerCase();return"text"===t||"search"===t||"url"===t||"tel"===t||"password"===t}});i.Popup.TabKeyTrap=L}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.ui,r=".kendoFloatingLabel",o="k-empty",s="k-focus",l="k-disabled",d="k-no-click",u="k-readonly",c=i.extend({init:function(a,r){var o=this;i.fn.init.call(o,a,r),r=e.extend(!0,{},r),o.widget=o.options.widget,o.widgetWrapper=o.widget.wrapper[0],o.refresh(),o._editable({readonly:o.options.widget.options.readonly!==t&&o.options.widget.options.readonly,disable:o.options.widget.options.enable!==t&&!o.options.widget.options.enable}),o.widgetWrapper.style.width&&(o.element.css("width",o.widgetWrapper.style.width),o.widgetWrapper.style.width="100%"),o.element.addClass("k-floating-label-container"),n.notify(o)},options:{name:"FloatingLabel",widget:null,useReadOnlyClass:!1,floatCheck:function(e){return!e.element.val()}},readonly:function(e){this._editable({readonly:e===t||e,disable:!1})},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)})},refresh:function(){var e=this,t=e.element;t.removeClass(o).removeClass(s),e.options.floatCheck({element:e.options.widget.element,floating:e.element})&&t.addClass(o),(document.activeElement===e.options.widget.element[0]||e.options.widget.input&&document.activeElement===e.options.widget.input[0])&&t.addClass(s)},destroy:function(){this.element.off(r),i.fn.destroy.call(this)},_editable:function(e){var t=this,n=t.element,i=e.disable,a=e.readonly;n.off(r),a||i?n.toggleClass(l,i).toggleClass(t.options.useReadOnlyClass?u:d,a):(n.removeClass(l).removeClass(t.options.useReadOnlyClass?u:d),n.on("focusin"+r,t.refresh.bind(t)),n.on("focusout"+r,t.refresh.bind(t)))}});a.plugin(c)}(window.kendo.jQuery);var t=window.kendo,n=t.jQuery,i=t.ui.Widget,a=t.isFunction,r=i.extend({options:{name:"Label",widget:null},init:function(e,t){var a=this;e=e||n("<label></label>"),i.fn.init.call(a,e,t),t=n.extend(!0,{},t),a.widget=t.widget,t.floating&&a._floatingLabel(),a._label()},destroy:function(){this.floatingLabel&&this.floatingLabel.destroy(),i.fn.destroy.call(this)},_unwrapFloating:function(){var e=this;e.floatingLabel&&(e.floatingLabel.destroy(),e.widget.wrapper.unwrap(e._floatingLabelContainer))},setOptions:function(e){var t=this,a=!1;("string"==typeof e||n.isPlainObject(e)&&!1===e.floating)&&(a=!0),e=n.isPlainObject(e)?e:{content:e},i.fn.setOptions.call(t,e),a&&t.floatingLabel?(t._unwrapFloating(),t.floatingLabel.destroy(),delete t.floatingLabel):!0!==e.floating||t.floatingLabel||(t.element.remove(),t._floatingLabel()),t._label(),t.floatingLabel&&t.floatingLabel.refresh()},_label:function(){var e=this,n=e.widget.element,i=e.options,r=n.attr("id"),o=i.content;a(o)&&(o=o.call(e)),o||(o=""),r||(r=i.name+"_"+t.guid(),n.attr("id",r)),e.element.addClass("k-label k-input-label").attr("for",r).text(o).insertBefore(e.options.beforeElm||e.widget.wrapper)},_floatingLabel:function(){var e=this,i=n.extend({},e.options);delete i.name,(i.floating||!1)&&(e._floatingLabelContainer=e.widget.wrapper.wrap("<span></span>").parent(),e.floatingLabel=new t.ui.FloatingLabel(e._floatingLabelContainer,n.extend({},i)))}});t.ui.plugin(r);!function(e,t){var n=window.kendo,i=n.ui,a=n._outerHeight,r=/^\d+(\.\d+)?%$/i,o=i.Widget,s=n.keys,l=n.support,d=n.htmlEncode,u=n._activeElement,c=n._outerWidth,p=n.data.ObservableArray,h="id",f="change",m="k-focus",g="k-hover",v="k-selected",_="k-i-loading k-input-loading-icon",b="k-list-ul",k=".k-list-group-sticky-header",w=".k-list-item",y="open",x="close",C="cascade",T="select",S="click",I="mouseenter",D="activate",E="deactivate",A="dataBinding",F="dataBound",z="selectedItemChange",P="selected",H="requestStart",N="requestEnd",R="focus",O=e.extend,M=Array.isArray,B=l.browser,L="k-hidden",V="width",U="text",W=B.msie,j=/"/g,q={ComboBox:["DropDownList","MultiColumnComboBox"],DropDownList:["ComboBox","MultiColumnComboBox"],MultiColumnComboBox:["ComboBox","DropDownList"]},G="aria-labelledby",K="aria-label",$="aria-activedescendant",Y="aria-expanded",Q="aria-hidden",X="aria-busy",J="aria-selected",Z=".k-table-group-row",ee=n.ui.DataBoundWidget.extend({init:function(t,i){var a,r=this;o.fn.init.call(r,t,i),t=r.element,i=r.options,r._isSelect=t.is(T),r._isSelect&&r.element[0].length&&(i.dataSource||(i.dataTextField=i.dataTextField||U,i.dataValueField=i.dataValueField||"value")),r._listSize=n.cssProperties.getValidClass({widget:"List",propName:"size",value:i.size}),r.ul=e('<ul unselectable="on"/>').attr({tabIndex:-1,"aria-hidden":!0}),r.list=e("<div class='k-list'/>").addClass(r._listSize).append(r.ul),(a=t.attr(h))||(a=n.guid()),r.list.attr(h,a+"-list"),r.ul.attr(h,a+"_listbox"),i.columns&&i.columns.length&&(r.list.removeClass("k-list").addClass("k-data-table"),r.list.removeClass(r._listSize).addClass("k-table-md"),r.ul.removeClass(b).addClass("k-table"),r._columnsHeader()),r._header(),r._noData(),r._footer(),r._accessors(),r._initValue()},options:{valuePrimitive:!1,footerTemplate:"",headerTemplate:"",noDataTemplate:!0,size:"medium",messages:{noData:"No data found.",clear:"clear"}},setOptions:function(e){o.fn.setOptions.call(this,e),e&&e.enable!==t&&(e.enabled=e.enable),e.columns&&e.columns.length&&this._columnsHeader(),this._header(),this._noData(),this._footer(),this._renderFooter(),this._renderNoData(),e.label&&this._inputLabel?this.label.setOptions(e.label):!1===e.label?(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel):e.label&&this._label()},focus:function(){this._focused.trigger(R)},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,i=t.options,a=e.isPlainObject(i.label)?i.label:{content:i.label};t.label=new n.ui.Label(null,e.extend({},a,{widget:t,floatCheck:t._floatCheck.bind(t)})),t._inputLabel=t.label.element},_floatCheck:function(){return!this.listView||!(this.value()||!!this.text&&this.text())&&!this.popup.visible()},_refreshFloatingLabel:function(){var e=this;e.label&&e.label.floatingLabel&&e.label.floatingLabel.refresh()},_header:function(){var t=this,i=e(t.header),a=t.options.headerTemplate;if(this._angularElement(i,"cleanup"),n.destroy(i),i.remove(),a){var r="function"!=typeof a?n.template(a):a;i=e(r({})),t.header=i[0]?i:null,t.list.parent.length>0&&t.list.before(i),this._angularElement(t.header,"compile")}else t.header=null},_columnsHeader:function(){var t=this,i=e(t.columnsHeader);this._angularElement(i,"cleanup"),n.destroy(i),i.remove();for(var a="<div class='k-table-header'><div class='k-table-header-wrap'><table class='k-table' role='presentation'>",o="<colgroup>",s="<tr class='k-table-row'>",l=0;l<this.options.columns.length;l++){var d=this.options.columns[l],u=d.title||d.field||"",c=d.headerTemplate||u,p="function"!=typeof c?n.template(c):c,h=d.width,f=parseInt(h,10),m="";h&&!isNaN(f)&&(m+="style='width:",m+=f,m+=r.test(h)?"%":"px",m+=";'"),o+="<col "+m+"/>",s+="<th class='k-table-th'>",s+=p(d),s+="</th>"}a+=o+="</colgroup>",a+="<thead class='k-table-thead'>",a+=s+="</tr>",a+="</thead></table></div></div>",t.columnsHeader=i=e(a),t.list.prepend(i),this._angularElement(t.columnsHeader,"compile")},_noData:function(){var t=this,i=e(t.noData),a=!0===t.options.noDataTemplate?t.options.messages.noData:t.options.noDataTemplate;t.angular("cleanup",(function(){return{elements:i}})),n.destroy(i),i.remove(),a?(t.noData=e('<div class="k-no-data" style="display: none;"></div>').appendTo(t.list),t.noDataTemplate="function"!=typeof a?n.template(a):a):t.noData=null},_footer:function(){var t=this,i=e(t.footer),a=t.options.footerTemplate,r=this.options.columns&&this.options.columns.length?'<div class="k-table-footer"><span class="k-table-td"></span></div>':'<div class="k-list-footer"></div>';this._angularElement(i,"cleanup"),n.destroy(i),i.remove(),a?(t.footer=e(r).appendTo(t.list),t.footerTemplate="function"!=typeof a?n.template(a):a):t.footer=null},_listOptions:function(t){var i=this,a=i.options,r=a.virtual,o={change:i._listChange.bind(i)},s=i._listBound.bind(i),l=i._focused,d=i.element.attr("id"),u=e('label[for="'+i.element.attr("id")+'"]'),c=l.attr(G);return!c&&u.length&&(c=u.attr("id")||i._generateLabelId(u,d||n.guid())),r="object"==typeof r?r:{},(t=e.extend({autoBind:!1,selectable:!0,dataSource:i.dataSource,click:i._click.bind(i),activate:i._activateItem.bind(i),columns:a.columns,deactivate:i._deactivateItem.bind(i),dataBinding:function(){i.trigger(A)},dataBound:s,height:a.height,dataValueField:a.dataValueField,dataTextField:a.dataTextField,groupTemplate:a.groupTemplate,fixedGroupTemplate:a.fixedGroupTemplate,template:a.template,ariaLabel:l.attr(K),ariaLabelledBy:c,listSize:i._listSize},t,r,o)).template||(t.template="#:"+n.expr(t.dataTextField,"data")+"#"),a.$angular&&(t.$angular=a.$angular),t},_initList:function(){var e=this,t=e._listOptions({selectedItemChange:e._listChange.bind(e)});e.options.virtual?(e.listView=new n.ui.VirtualList(e.ul,t),e.list.addClass("k-virtual-list")):e.listView=new n.ui.StaticList(e.ul,t),e.listView.bind("listBound",e._listBound.bind(e)),e._setListValue()},_setListValue:function(e){(e=e||this.options.value)!==t&&this.listView.value(e).done(this._updateSelectionState.bind(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(){this._clear&&this._clear.addClass(L)},_showClear:function(){this._clear&&this._clear.removeClass(L)},_clearValue:function(){this._clearText(),this._accessor(""),this.listView.value([]),this._isSelect&&(this._customOption=t),this._isFilterEnabled()&&!this.options.enforceMinLength&&(this._filter({word:"",open:!1}),this.options.highlightFirst&&this.listView.focus(0)),this._change()},_clearText:function(){this.text("")},_clearFilter:function(){this.options.virtual||this.listView.bound(!1),this._filterSource()},_filterSource:function(t,n){var i=this,a=i.options,r=a.filterFields&&t&&t.logic&&t.filters&&t.filters.length,o=i.dataSource,s=O({},o.filter()||{}),l=t||s.filters&&s.filters.length&&!t,d=se(s,a.dataTextField);if(this._clearFilterExpressions(s),(t||d)&&i.trigger("filtering",{filter:t}))return e.Deferred().reject().promise();var u={filters:[],logic:"and"};r?u.filters.push(t):this._pushFilterExpression(u,t),oe(s)&&(u.logic===s.logic?u.filters=u.filters.concat(s.filters):u.filters.push(s)),i._cascading&&this.listView.setDSFilter(u);var c=O({},{page:l?1:o.page(),pageSize:l?o.options.pageSize:o.pageSize(),sort:o.sort(),filter:o.filter(),group:o.group(),aggregate:o.aggregate()},{filter:u});return o[n?"read":"query"](o._mergeState(c))},_pushFilterExpression:function(e,t){oe(t)&&""!==t.value&&e.filters.push(t)},_clearFilterExpressions:function(e){if(e.filters){for(var t,n=0;n<e.filters.length;n++)"fromFilter"in e.filters[n]&&(t=n);isNaN(t)||e.filters.splice(t,1)}},_angularElement:function(e,t){e&&this.angular(t,(function(){return{elements:e}}))},_renderNoData:function(){var e=this,t=e.noData;t&&(this._angularElement(t,"cleanup"),t.html(e.noDataTemplate({instance:e})),this._angularElement(t,"compile"))},_toggleNoData:function(t){e(this.noData).toggle(t)},_toggleHeader:function(e){this.listView.content.prev(k).toggle(e)},_renderFooter:function(){var e=this,t=e.footer?this.options.columns&&this.options.columns.length?e.footer.children().first():e.footer:null;t&&(this._angularElement(t,"cleanup"),t.html(e.footerTemplate({instance:e})),this._angularElement(t,"compile"))},_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.type&&"string"!==e.type&&(t.options.ignoreCase=!1)},_focus:function(e){return this.listView.focus(e)},_filter:function(e){var t,n=this,i=n.options,a=e.word,r=i.filterFields,o=i.dataTextField;if(r&&r.length){t={logic:"or",filters:[],fromFilter:!0};for(var s=0;s<r.length;s++)this._pushFilterExpression(t,n._buildExpression(a,r[s]))}else t=n._buildExpression(a,o);n._open=e.open,n._filterSource(t)},_buildExpression:function(e,t){var n=this.options,i=n.ignoreCase,a=this.dataSource.options.accentFoldingFiltering;return{value:i?a?e.toLocaleLowerCase(a):e.toLowerCase():e,field:t,operator:n.filter,ignoreCase:i}},_clearButton:function(){var t=this,n=t.options.messages.clear;t._clear||(t._clear=e('<span unselectable="on" class="k-clear-value" title="'+n+'"><span class="k-icon k-i-x"></span></span>').attr({role:"button",tabIndex:-1})),t.options.clearButton||t._clear.remove(),this._hideClear()},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.listView&&(this.listView._emptySearch=!n.trim(e).length),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;o.fn.destroy.call(e),e._unbindDataSource(),e.listView.destroy(),e.list.off(t),e.popup.destroy(),e._form&&e._form.off("reset",e._resetHandler),e.label&&e.label.destroy()},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.popup.visible()&&this._focused.add(this.filterInput).attr($,e.attr("id"))},_deactivateItem:function(){this._focused.add(this.filterInput).removeAttr($)},_accessors:function(){var e=this,t=e.element,i=e.options,a=n.getter,r=t.attr(n.attr("text-field")),o=t.attr(n.attr("value-field"));!i.dataTextField&&r&&(i.dataTextField=r),!i.dataValueField&&o&&(i.dataValueField=o),e._text=a(i.dataTextField),e._value=a(i.dataValueField)},_aria:function(e){var n,i=this,a=i.options,r=i._focused;a.suggest!==t&&(n="none"===a.filter?!0===a.suggest?"inline":"none":!0===a.suggest?"both":"list",r.attr("aria-autocomplete",n)),e=e?e+" "+i.ul[0].id:i.ul[0].id,r.attr({"aria-controls":e}),i.filterInput&&i.filterInput.length>0&&i.filterInput.attr("aria-controls",e),i.ul.attr("aria-live",i._isFilterEnabled()?"polite":"off"),i._ariaLabel(i._focused)},_blur:function(){var e=this;e._change(),e.close(),e._userTriggered=!1},_isValueChanged:function(e){return e!==te(this._old,typeof e)},_change:function(){var e,n=this,i=n.selectedIndex,a=n.options.value,r=n.value();n._isSelect&&!n.listView.bound()&&a&&(r=a),n._isValueChanged(r)||n._valueBeforeCascade!==t&&n._valueBeforeCascade!==te(n._old,typeof n._valueBeforeCascade)&&n._userTriggered?e=!0:i===t||i===n._oldIndex||n.listView.isFiltered()||(e=!0),e&&(null===n._old||""===n._old||""===r?n._valueBeforeCascade=n._old=r:n.dataItem()?n._valueBeforeCascade=n._old=n.options.dataValueField?n.dataItem()[n.options.dataValueField]:n.dataItem():n._valueBeforeCascade=n._old=null,n._oldIndex=i,n._typing||n.element.trigger(f),n.trigger(f)),n.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;return this.listView.content.parent().prevAll(":visible").each((function(){var n=e(this);t+=a(n,!0)})),t},_height:function(t){var n,i=this,r=i.list,o=i.options.height,s=i.popup.visible(),l=this.options.columns&&this.options.columns.length;if(t||i.options.noDataTemplate){if(n=r.parent().add(r.closest(".k-animation-container")).show(),!r.parent().is(":visible"))return void n.hide();o=i.listView.content[0].scrollHeight>o?o:"auto",n.height(o),"auto"!==o&&(o-=i._offsetHeight(),l&&(o=o-(a(e(i.footer))||0)-(a(e(i.columnsHeader))||0))),l?i.listView.content.outerHeight(o):i.listView.content.parent().outerHeight(o),s||r.parent().hide()}return o},_openHandler:function(e){var t;this._adjustListWidth(),this.trigger(y)?e.preventDefault():(this._focused.attr(Y,!0),this.ul.attr(Q,!1),(t=this.listView.focus())&&this._focused.add(this.filterInput).attr($,t.attr("id")))},_adjustListWidth:function(){var e,t,n=this,i=n.list.parent(),a=i[0].style.width,r=n.wrapper;if(i.data(V)||!a)return e=window.getComputedStyle?window.getComputedStyle(r[0],null):0,t=parseFloat(e&&e.width)||c(r),e&&B.msie&&(t+=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight)+parseFloat(e.borderLeftWidth)+parseFloat(e.borderRightWidth)),a="border-box"!==i.css("box-sizing")?t-(c(i)-i.width()):t,i.css({fontFamily:r.css("font-family"),width:n.options.autoWidth?"auto":a,minWidth:a,whiteSpace:n.options.autoWidth?"nowrap":"normal"}).data(V,a),!0},_closeHandler:function(e){this.trigger(x)?e.preventDefault():(this._focused.attr(Y,!1),this.ul.attr(Q,!0),this._focused.add(this.filterInput).removeAttr($))},_focusItem:function(){var e=this.listView,n=!e.focus(),i=ae(e.select());i===t&&this.options.highlightFirst&&n&&(i=0),i!==t?e.focus(i):n&&e.scrollToIndex(0)},_calculateGroupPadding:function(e){var t=this.ul.children(".k-first").first(),i=this.listView.content.prev(k),a=0,r="right";i[0]&&"none"!==i[0].style.display&&("auto"!==e&&(a=n.support.scrollbar()),this.element.parents(".k-rtl").length&&(r="left"),a+=parseFloat(t.css("border-"+r+"-width"),10)+parseFloat(t.children(".k-list-item-group-label").css("padding-"+r),10),i.css("padding-"+r,a))},_calculatePopupHeight:function(e){var t=this._height(this.dataSource.flatView().length||e);this._calculateGroupPadding(t),this._calculateColumnsHeaderPadding(t)},_calculateColumnsHeaderPadding:function(e){if(this.options.columns&&this.options.columns.length){var t=l.isRtl(this.wrapper),i=n.support.scrollbar();this.columnsHeader.css(t?"padding-left":"padding-right","auto"!==e?i:0)}},_refreshScroll:function(){var e=this.listView,t=e.element.height()>e.content.height();this.options.autoWidth&&e.content.css({overflowX:"hidden",overflowY:t?"scroll":"auto"})},_resizePopup:function(e){this.options.virtual||(this.popup.element.is(":visible")?this._calculatePopupHeight(e):(this.popup.one("open",function(e){return function(){this._calculatePopupHeight(e)}.bind(this)}.call(this,e)),this.popup.one(D,this._refreshScroll.bind(this))))},_popup:function(){var e=this,t=this;t.list.wrap("<div>"),t.popup=new i.Popup(t.list.parent(),O({},t.options.popup,{anchor:t.wrapper,open:t._openHandler.bind(t),close:t._closeHandler.bind(t),animation:t.options.animation,isRtl:l.isRtl(t.wrapper),autosize:t.options.autoWidth,activate:function(){e._refreshFloatingLabel()},deactivate:function(){e._refreshFloatingLabel()}})),t.popup.element.prepend(t.header).on("mousedown"+this.ns,this._listMousedown.bind(this))},_toggleHover:function(t){e(t.currentTarget).toggleClass(g,t.type===I)},_toggle:function(e,n){var i=this,a=l.mobileOS&&(l.touch||l.MSPointers||l.pointers);e=e!==t?e:!i.popup.visible(),n||a||i._focused[0]===u()||(i._prevent=!0,i._focused.trigger(R),i._prevent=!1),i[e?y:x]()},_triggerCascade:function(){var e=this;e._cascadeTriggered&&e.value()===te(e._cascadedValue,typeof e.value())||(e._cascadedValue=e.value(),e._cascadeTriggered=!0,e.trigger(C,{userTriggered:e._userTriggered}))},_triggerChange:function(){this._valueBeforeCascade!==this.value()&&this.trigger(f)},_unbindDataSource:function(){var e=this;e.dataSource.unbind(H,e._requestStartHandler).unbind(N,e._requestEndHandler).unbind("error",e._errorHandler)},requireValueMapper:function(e,t){if(((e.value instanceof Array?e.value.length:e.value)||(t instanceof Array?t.length:t))&&e.virtual&&"function"!=typeof e.virtual.valueMapper)throw new 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")}});function te(e,n){return e!==t&&""!==e&&null!==e&&("boolean"===n?("boolean"!=typeof e&&(e="true"===e.toString().toLowerCase()),e=Boolean(e)):"number"===n?e=Number(e):"string"===n&&(e=e.toString())),e}O(ee,{inArray:function(e,t){var n,i,a=t.children;if(!e||e.parentNode!==t)return-1;for(n=0,i=a.length;n<i;n++)if(e===a[n])return n;return-1},unifyType:te}),n.ui.List=ee,i.Select=ee.extend({init:function(e,t){ee.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())&&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._cascadeValue=n._old=n._accessor(),n._oldIndex=n.selectedIndex,n._refreshFloatingLabel()}))},_accessor:function(e,t){return this[this._isSelect?"_accessorSelect":"_accessorInput"](e,t)},_accessorInput:function(e){var n=this.element[0];if(e===t)return n.value;null===e&&(e=""),n.value=e},_accessorSelect:function(e,n){var i=this.element[0];if(e===t)return re(i).value||"";re(i).selected=!1,n===t&&(n=-1),null!==e&&""!==e&&-1==n?this._custom(e):e?i.value=e:i.selectedIndex=n},_syncValueAndText:function(){return!0},_custom:function(t){var n=this,i=n.element,a=n._customOption;a||(a=e("<option/>"),n._customOption=a,i.append(a)),a.text(t),a[0].selected=!0},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass(_),e._focused.attr(X,!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(X,!0),t._arrowIcon.addClass(_),t._hideClear())}),100)))},_requestEnd:function(){this._request=!1,this._hideBusy()},_dataSource:function(){var e,t=this,i=t.element,a=t.options,r=a.dataSource||{};r=Array.isArray(r)?{data:r}:r,t._isSelect&&((e=i[0].selectedIndex)>-1&&(a.index=e),r.select=i,r.fields=[{field:a.dataTextField},{field:a.dataValueField}]),t.dataSource?t._unbindDataSource():(t._requestStartHandler=t._showBusy.bind(t),t._requestEndHandler=t._requestEnd.bind(t),t._errorHandler=t._hideBusy.bind(t)),t.dataSource=n.data.DataSource.create(r).bind(H,t._requestStartHandler).bind(N,t._requestEndHandler).bind("error",t._errorHandler)},_firstItem:function(){this.listView.focusFirst()},_lastItem:function(){this.listView.focusLast()},_nextItem:function(){return this.listView.focusNext()},_prevItem:function(){return this.listView.focusPrev()},_getNormalizedDataItem:function(e){var t,n=this,i=n.listView,a="number"==typeof e,r=n.optionLabel&&n.optionLabel.length;return t=a?r?--e:e:i.getElementIndex(e),i.dataItemByIndex(t)},_getNormalizedSelectCandidate:function(e){var t=e;return this.optionLabel&&this.optionLabel.length&&"number"==typeof e&&t++,t},_move:function(e){var t,n,i,a,r,o=this,l=o.listView,d=e.keyCode,c=d===s.DOWN,p=o.options.virtual;if(d===s.UP||c){if(e.altKey)o.toggle(c);else{if(!l.bound()&&!o.ul[0].firstChild)return o._fetch||(o.dataSource.one(f,(function(){o._fetch=!1,o._move(e)})),o._fetch=!0,o._filterSource()),e.preventDefault(),!0;i=o._focus(),o._fetch||i&&!i.hasClass(v)||(c?(a=o._nextItem(),(p&&a<=0||!o._focus()&&!a)&&o._lastItem()):(a=o._prevItem(),(p&&a>=l.dataSource.total()-1||!o._focus()&&!a)&&o._firstItem())),r=o._getNormalizedSelectCandidate(o._get(o._focus())||a||0),o._select(r,!0).done((function(){var e=function(){o.popup.visible()||o._blur(),null===o._cascadedValue?o._cascadedValue=o.value():o._cascadedValue=o.dataItem()?o.dataItem()[o.options.dataValueField]||o.dataItem():null};o.trigger(T,{dataItem:o._getNormalizedDataItem(r),item:o._focus()})?o._select(i).done(e):e()}))}e.preventDefault(),n=!0}else if(d===s.ENTER||d===s.TAB){o.popup.visible()&&e.preventDefault(),i=o._focus(),t=o.dataItem(),o.popup.visible()||t&&o.text()===o._text(t)||(i=null);var h,m=o.filterInput&&o.filterInput[0]===u();if(i){var g=!0;if((t=l.dataItemByIndex(l.getElementIndex(i)))&&(g=o._value(t)!==ee.unifyType(o.value(),typeof o._value(t))),g&&o.trigger(T,{dataItem:t,item:i}))return;h=o._select(i)}else o.input&&((o._syncValueAndText()||o._isSelect)&&o._accessor(o.input.val()),o.listView.value(o.input.val()));o._focusElement&&o._focusElement(o.wrapper),m&&d===s.TAB?o.wrapper.focusout():h&&"function"==typeof h.done?h.done((function(){o._blur()})):o._blur(),o.close(),n=!0}else if(d===s.ESC)o.popup.visible()&&e.preventDefault(),o.close(),n=!0;else if(o.popup.visible()&&(d===s.PAGEDOWN||d===s.PAGEUP)){e.preventDefault();var _=d===s.PAGEDOWN?1:-1;l.scrollWith(_*l.screenHeight()),n=!0}return n},_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 a,r,o,s,l=this,u=l.element,c=u[0],p=e.length,h="",f=0;for(n&&(h=n);f<p;f++)a="<option",r=e[f],o=l._text(r),(s=l._value(r))!==t&&(-1!==(s+="").indexOf('"')&&(s=s.replace(j,"&quot;")),a+=' value="'+s+'"'),a+=">",o!==t&&(a+=d(o)),h+=a+="</option>";u.html(h),i!==t&&(c.value=i,c.value&&!i&&(c.selectedIndex=-1)),-1!==c.selectedIndex&&(a=re(c))&&a.setAttribute(P,P)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(t._initial)}))},t._form=a.on("reset",t._resetHandler))},_parentWidget:function(){var t=this.options.name;if(this.options.cascadeFrom){var n=e("#"+this.options.cascadeFrom),i=n.data("kendo"+t);if(!i)for(var a=0;a<q[t].length&&!(i=n.data("kendo"+q[t][a]));a+=1);return i}},_cascade:function(){var e,t=this,n=t.options;if(n.cascadeFrom){if(!(e=t._parentWidget()))return;t._cascadeHandlerProxy=t._cascadeHandler.bind(t),t._cascadeFilterRequests=[],n.autoBind=!1,e.bind("set",(function(){t.one("set",(function(e){t._selectedValue=e.value||t._accessor()}))})),e.first(C,t._cascadeHandlerProxy),e.listView.bound()?(t._toggleCascadeOnFocus(),t._cascadeSelect(e)):(e.one(F,(function(){t._toggleCascadeOnFocus(),e.popup.visible()&&e._focused.trigger(R)})),e.value()||t.enable(!1))}},_toggleCascadeOnFocus:function(){var e=this,t=e._parentWidget(),n=W&&t instanceof i.DropDownList?"blur":"focusout";t._focused.add(t.filterInput).on(R,(function(){t.unbind(C,e._cascadeHandlerProxy),t.unbind(f,e._cascadeHandlerProxy),t.first(f,e._cascadeHandlerProxy)})),t._focused.add(t.filterInput).on(n,(function(){t.unbind(f,e._cascadeHandlerProxy),t.unbind(C,e._cascadeHandlerProxy),t.first(C,e._cascadeHandlerProxy)}))},_cascadeHandler:function(e){var t=this._parentWidget(),n=this.value();this._userTriggered=e.userTriggered||t._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!==te(t.listView.value()[0],typeof n)&&t.value(n),t.dataSource.view()[0]&&-1!==t.selectedIndex||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=this,a=e.dataItem(),r=a?a[i.options.cascadeFromParentField]||e._value(a):null,o=i.options.cascadeFromField||e.options.dataValueField;if(i._valueBeforeCascade=n!==t?n:i.value(),r||0===r){se(i.dataSource.filter()||{},o);var s=function(){var t=i._cascadeFilterRequests.shift();t&&i.unbind("dataBound",t),(t=i._cascadeFilterRequests[0])&&i.first("dataBound",t),i._cascadeChange(e)};i._cascadeFilterRequests.push(s),1===i._cascadeFilterRequests.length&&i.first("dataBound",s),i._cascading=!0,i._filterSource({field:o,operator:"eq",value:r}),i._cascading=!1}else i.enable(!1),i._clearSelection(e),i._triggerCascade(),i._triggerChange(),i._userTriggered=!1;i._refreshFloatingLabel()}});var ne=".StaticList",ie=n.ui.DataBoundWidget.extend({init:function(t,i){if(o.fn.init.call(this,t,i),this.element.attr("role","listbox").on("click.StaticList","li",this._click.bind(this)).on("mouseenter.StaticList","li",(function(){e(this).addClass(g)})).on("mouseleave.StaticList","li",(function(){e(this).removeClass(g)})),i&&i.ariaLabel?this.element.attr(K,i.ariaLabel):i&&i.ariaLabelledBy&&this.element.attr(G,i.ariaLabelledBy),l.touch&&this._touchHandlers(),"multiple"===this.options.selectable&&this.element.attr("aria-multiselectable",!0),this.options.columns&&this.options.columns.length){var a=this.element.parent().find(".k-table-thead"),r=e('<tr class="k-table-group-row"><th class="k-table-th" colspan="'+this.options.columns.length+'"></th></tr>');a.append(r),this.header=r.find(".k-table-th"),this.content=this.element.wrap("<div class='k-table-body k-table-scroller' unselectable='on'></div>").parent(),this.element.addClass("k-table-list")}else this.content=this.element.wrap("<div class='k-list-content k-list-scroller' unselectable='on'></div>").parent(),this.header=this.content.before('<div class="k-list-group-sticky-header" style="display:none"></div>').prev(),this.element.addClass(b);this.bound(!1),this._optionID=n.guid(),this._selectedIndices=[],this._view=[],this._dataItems=[],this._values=[];var s=this.options.value;s&&(this._values=Array.isArray(s)?s.slice(0):[s]),this._getter(),this._templates(),this.setDataSource(this.options.dataSource),this._createOnScrollProxy()},options:{name:"StaticList",dataValueField:null,valuePrimitive:!1,selectable:!0,template:null,groupTemplate:null,fixedGroupTemplate:null,ariaLabel:null,ariaLabelledBy:null},events:[S,f,D,E,A,F,z],setDataSource:function(e){var t,i=this,a=e||{};a=Array.isArray(a)?{data:a}:a,a=n.data.DataSource.create(a),i.dataSource?(i.dataSource.unbind(f,i._refreshHandler),t=i.value(),i.value([]),i.bound(!1),i.value(t)):i._refreshHandler=i.refresh.bind(i),i.setDSFilter(a.filter()),i.dataSource=a.bind(f,i._refreshHandler),i._fixedHeader()},_touchHandlers:function(){var t,n,i=this,a=this.options.columns&&this.options.columns.length?".k-table-row":w,r=function(e){return(e.originalEvent||e).changedTouches[0].pageY};i.element.on("touchstart.StaticList",(function(e){t=r(e)})),i.element.on("touchend.StaticList",(function(o){o.isDefaultPrevented()||(n=r(o),Math.abs(n-t)<10&&(i._touchTriggered=!0,i._triggerClick(e(o.target).closest(a).get(0))))}))},skip:function(){return this.dataSource.skip()},setOptions:function(e){o.fn.setOptions.call(this,e),this._getter(),this._templates(),this._render(),e.label?this.label.setOptions(e.label):!1===e.label&&(this.label._unwrapFloating(),this._inputLabel.remove(),delete this._inputLabel)},destroy:function(){this.element.off(ne),this._refreshHandler&&this.dataSource.unbind(f,this._refreshHandler),clearTimeout(this._scrollId),o.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,a=t.scrollTop,r=t.clientHeight,o=n+i;a>n?a=n:o>a+r&&(a=o-r),t.scrollTop=a}},selectedDataItems:function(e){if(e===t)return this._dataItems.slice();this._dataItems=e,this._values=this._getValues(e)},_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(ae(this.element[0].children))},focus:function(n){var i,a=this,r=a._optionID;if(n===t)return a._current;n=ae(a._get(n)),n=e(this.element[0].children[n]),a._current&&(a._current.removeClass(m).removeAttr(h),a.trigger(E)),(i=!!n[0])&&(n.addClass(m),a.scroll(n),n.attr("id",r)),a._current=i?n:null,a.trigger(D)},focusIndex:function(){return this.focus()?this.focus().index():t},skipUpdate:function(e){this._skipUpdate=e},select:function(n){var i,a,r=this,o=r.options.selectable,s="multiple"!==o&&!1!==o,l=r._selectedIndices,d=[this.element.find(".k-selected").index()],u=[];if(n===t)return l.slice();1===(n=r._get(n)).length&&-1===n[0]&&(n=[]);var c=e.Deferred().resolve(),p=r.isFiltered();return p&&!s&&r._deselectFiltered(n)?c:s&&!p&&-1!==e.inArray(ae(n),l)&&-1!==e.inArray(ae(n),d)?(r._dataItems.length&&r._view.length&&(r._dataItems=[r._view[l[0]].item]),c):(i=(a=r._deselect(n)).removed,(n=a.indices).length&&(s&&(n=[ae(n)]),u=r._select(n)),(u.length||i.length)&&(r._valueComparer=null,r.trigger(f,{added:u,removed:i})),c)},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(e){e=Array.isArray(e)||e instanceof p?e.slice(0):[e],this._values=e,this._valueComparer=null},value:function(n){var i,a=this,r=a._valueDeferred;return n===t?a._values.slice():(a.setValue(n),r&&"resolved"!==r.state()||(a._valueDeferred=r=e.Deferred()),a.bound()&&(i=a._valueIndices(a._values),"multiple"===a.options.selectable&&a.select(-1),a.select(i),r.resolve()),a._skipUpdate=!1,r)},items:function(){return this.element.children(w)},_click:function(e){this._touchTriggered?this._touchTriggered=!1:e.isDefaultPrevented()||this._triggerClick(e.currentTarget)},_createOnScrollProxy:function(){this._onScroll=function(){var e=this;clearTimeout(e._scrollId),e._scrollId=setTimeout((function(){e._renderHeader()}),50)}.bind(this)},_triggerClick:function(t){this.trigger(S,{item:e(t)})||this.select(t)},_valueExpr:function(e,t){var n,i,a=this,r=0,o=[];if(!a._valueComparer||a._valueType!==e){for(a._valueType=e;r<t.length;r++)o.push(te(t[r],e));n="for (var idx = 0; idx < "+o.length+"; idx++) { if (current === values[idx]) { return idx; }} return -1;",i=new Function("current","values",n),a._valueComparer=function(e){return i(e,o)}}return a._valueComparer},_dataItemPosition:function(e,t){var n=this._valueGetter(e);return this._valueExpr(typeof n,t)(n)},_getter:function(){this._valueGetter=n.getter(this.options.dataValueField)},_deselect:function(t){var n,i,a,r=this,o=r.element[0].children,s=r.options.selectable,l=r._selectedIndices,d=r._dataItems,u=r._values,c=[],p=0;if(t=t.slice(),!0!==s&&t.length){if("multiple"===s)for(;p<t.length;p++)if(i=t[p],e(o[i]).hasClass(v))for(n=0;n<l.length;n++)if((a=l[n])===i){e(o[a]).removeClass(v).attr(J,!1);var h=this._view[i].item,f=this._dataItemPosition(h,this._values);c.push({position:f,dataItem:h}),d.splice(n,1),l.splice(n,1),t.splice(p,1),u.splice(n,1),1,p-=1,n-=1;break}}else{for(;p<l.length;p++)e(o[l[p]]).removeClass(v).attr(J,!1),c.push({position:p,dataItem:d[p]});r._values=[],r._dataItems=[],r._selectedIndices=[]}return{indices:t,removed:c}},_deselectFiltered:function(t){for(var n,i,a,r=this.element[0].children,o=[],s=0;s<t.length;s++)i=t[s],n=this._view[i].item,(a=this._dataItemPosition(n,this._values))>-1&&(o.push(this.removeAt(a)),e(r[i]).removeClass(v));return!!o.length&&(this.trigger(f,{added:[],removed:o}),!0)},_select:function(t){var n,i,a=this,r=a.element[0].children,o=a._view,s=[],l=0;for(-1!==ae(t)&&a.focus(t);l<t.length;l++)n=o[i=t[l]],-1!==i&&n&&(n=n.item,a._selectedIndices.push(i),a._dataItems.push(n),a._values.push(a._valueGetter(n)),e(r[i]).addClass(v).attr(J,!0),s.push({dataItem:n}));return s},getElementIndex:function(t){return e(t).data("offset-index")},_get:function(e){return"number"==typeof e?e=[e]:M(e)||(e=[(e=this.getElementIndex(e))!==t?e:-1]),e},_template:function(){var e=this.options,t=e.template;return t?(t=n.template(t),t=function(e){return'<li tabindex="-1" role="option" unselectable="on" class="k-list-item">'+t(e)+"</li>"}):t=n.template('<li tabindex="-1" role="option" unselectable="on" class="k-list-item"><span class="k-list-item-text">${'+n.expr(e.dataTextField,"data")+"}</span></li>",{useWithBlock:!1}),t},_templates:function(){var e,t=this.options,i={template:t.template,groupTemplate:t.groupTemplate,fixedGroupTemplate:t.fixedGroupTemplate};if(t.columns)for(var a=0;a<t.columns.length;a++){var r=t.columns[a],o=r.field?r.field.toString():U;i["column"+a]=r.template||"#: "+o+"#"}for(var s in i)(e=i[s])&&"function"!=typeof e&&(i[s]=n.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,a=0;if(t=t?t.slice():[],!e.length)return[];for(;a<i.length;a++)-1!==(n=this._dataItemPosition(i[a].item,e))&&(t[n]=a);return this._normalizeIndices(t)},_firstVisibleItem:function(){for(var t=this.element[0],n=this.content[0].scrollTop,i=e(t.children[0]).height(),a=Math.floor(n/i)||0,r=t.children[a]||t.lastChild,o=r.offsetTop<n;r;)if(o){if(r.offsetTop+i>n||!r.nextSibling)break;r=r.nextSibling}else{if(r.offsetTop<=n||!r.previousSibling)break;r=r.previousSibling}return this._view[e(r).data("offset-index")]},_fixedHeader:function(){this.isGrouped()&&this.templates.fixedGroupTemplate?(this.header.closest(Z).length?this.header.closest(Z).show():this.header.show(),this.content.scroll(this._onScroll)):(this.header.closest(Z).length?this.header.closest(Z).hide():this.header.hide(),this.content.off("scroll",this._onScroll))},_renderHeader:function(){var e=this.templates.fixedGroupTemplate;if(e){var t=this._firstVisibleItem();t&&t.group.toString().length&&this.header.html(e(t.group))}},_renderItem:function(e){var t='<li tabindex="-1" role="option" unselectable="on" ',n=e.item,i=0!==e.index,a=e.selected,r=this.isGrouped(),o=this.options.columns&&this.options.columns.length,s=e.index%2==1?" k-table-alt-row":"";return t+=o?'class="k-table-row'+s:'class="k-list-item',i&&e.newGroup&&(t+=" k-first"),e.isLastGroupedItem&&o&&(t+=" k-last"),a&&(t+=" k-selected"),t+='" aria-selected="'+(a?"true":"false")+'" data-offset-index="'+e.index+'">',o?t+=this._renderColumns(n):(t+='<span class="k-list-item-text">',t+=this.templates.template(n),t+="</span>"),i&&e.newGroup?t+=o?'<span class="k-table-td k-table-group-td"><span>'+this.templates.groupTemplate(e.group)+"</span></span>":'<div class="k-list-item-group-label">'+this.templates.groupTemplate(e.group)+"</div>":r&&o&&(t+='<span class="k-table-td k-table-spacer-td"></span>'),t+"</li>"},_renderColumns:function(e){for(var t="",n=0;n<this.options.columns.length;n++){var i=this.options.columns[n].width,a=parseInt(i,10),o="";i&&!isNaN(a)&&(o+="style='width:",o+=a,o+=r.test(i)?"%":"px",o+=";'"),t+="<span class='k-table-td' "+o+">",t+=this.templates["column"+n](e),t+="</span>"}return t},_render:function(){var e,t,n,i,a="",r=0,o=0,s=[],l=this.dataSource.view(),d=this.value(),u=this.isGrouped();if(u)for(r=0;r<l.length;r++)for(t=l[r],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,isLastGroupedItem:i===t.items.length-1,index:o},s[o]=e,o+=1,a+=this._renderItem(e),n=!1;else for(r=0;r<l.length;r++)e={selected:this._selected(l[r],d),item:l[r],index:r},s[r]=e,a+=this._renderItem(e);this._view=s,this.element[0].innerHTML=a,u&&s.length&&this._renderHeader()},_selected:function(e,t){return(!this.isFiltered()||"multiple"===this.options.selectable)&&-1!==this._dataItemPosition(e,t)},setDSFilter:function(e){this._lastDSFilter=O({},e)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!n.data.Query.compareFilters(this.dataSource.filter(),this._lastDSFilter)},refresh:function(e){var t,n=this,i=e&&e.action,a=n.options.skipUpdateOnBind,r="itemchange"===i;n.trigger(A),n._angularItems("cleanup"),n._fixedHeader(),n._render(),n.bound(!0),r||"remove"===i?(t=function(e,t){var n,i,a,r,o=t.length,s=e.length,l=[],d=[];if(s)for(a=0;a<s;a++){for(n=e[a],i=!1,r=0;r<o;r++)if(n===t[r]){i=!0,l.push({index:a,item:n});break}i||d.push(n)}return{changed:l,unchanged:d}}(n._dataItems,e.items)).changed.length&&(r?n.trigger(z,{items:t.changed}):n.value(n._getValues(t.unchanged))):n.isFiltered()||n._skipUpdate||n._emptySearch?(n.focus(0),n._skipUpdate&&(n._skipUpdate=!1,n._selectedIndices=n._valueIndices(n._values,n._selectedIndices))):a||i&&"add"!==i||n.value(n._values),n._valueDeferred&&n._valueDeferred.resolve(),n._angularItems("compile"),n.trigger(F)},bound:function(e){if(e===t)return this._bound;this._bound=e},isGrouped:function(){return(this.dataSource.group()||[]).length}});function ae(e){return e[e.length-1]}function re(e){var t=e.selectedIndex;return t>-1?e.options[t]:{}}function oe(t){return!(!t||e.isEmptyObject(t))&&!(t.filters&&!t.filters.length)}function se(t,n){var i,a=!1;return t.filters&&(i=e.grep(t.filters,(function(e){return a=se(e,n),e.filters?e.filters.length:e.field!=n})),a||t.filters.length===i.length||(a=!0),t.filters=i),a}i.plugin(ie),n.cssProperties.registerPrefix("List","k-list-")}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.effects,a=e.each,r=e.extend,o=n.support,s=o.browser,l=o.transforms,d=o.transitions,u={scale:0,scalex:0,scaley:0,scale3d:0},c={translate:0,translatex:0,translatey:0,translate3d:0},p=void 0!==document.documentElement.style.zoom&&!l,h=/matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i,f=/^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i,m=/translatex?$/i,g=/(zoom|fade|expand)(\w+)/,v=/(zoom|fade|expand)/,_=/[xy]$/i,b=["perspective","rotate","rotatex","rotatey","rotatez","rotate3d","scale","scalex","scaley","scalez","scale3d","skew","skewx","skewy","translate","translatex","translatey","translatez","translate3d","matrix","matrix3d"],k=["rotate","scale","scalex","scaley","skew","skewx","skewy","translate","translatex","translatey","matrix"],w={rotate:"deg",scale:"",skew:"px",translate:"px"},y=l.css,x=Math.round,C="px",T="auto",S="width",I="height",D="hidden",E="origin",A="abortId",F="overflow",z="translate",P="position",H="completeCallback",N=y+"transition",R=y+"transform",O=y+"backface-visibility",M=y+"perspective",B="1500px",L="perspective(1500px)",V={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"}};if(n.directions=V,r(e.fn,{kendoStop:function(e,t){return d?i.stopQueue(this,e||!1,t||!1):this.stop(e,t)}}),l&&!d){a(k,(function(t,n){e.fn[n]=function(t){if(void 0===t)return K(this,n);var i=e(this)[0],a=n+"("+t+w[n.replace(_,"")]+")";return-1==i.style.cssText.indexOf(R)?e(this).css(R,a):i.style.cssText=i.style.cssText.replace(new RegExp(n+"\\(.*?\\)","i"),a),this},e.fx.step[n]=function(t){e(t.elem)[n](t.now)}}));var U=e.fx.prototype.cur;e.fx.prototype.cur=function(){return-1!=k.indexOf(this.prop)?parseFloat(e(this.elem)[this.prop]()):U.apply(this,arguments)}}function W(e){return parseInt(e,10)}function j(e,t){return W(e.css(t))}function q(e){for(var t in e)-1!=b.indexOf(t)&&-1==k.indexOf(t)&&delete e[t];return e}function G(e,t){var n,i,a,r,s=[],d={};for(i in t)n=i.toLowerCase(),r=l&&-1!=b.indexOf(n),!o.hasHW3D&&r&&-1==k.indexOf(n)?delete t[i]:(a=t[i],r?s.push(i+"("+a+")"):d[i]=a);return s.length&&(d[R]=s.join(" ")),d}function K(e,t){if(l){var n=e.css(R);if("none"==n)return"scale"==t?1:0;var i=n.match(new RegExp(t+"\\s*\\(([\\d\\w\\.]+)")),a=0;return i?a=W(i[1]):(i=n.match(h)||[0,0,0,0,0],t=t.toLowerCase(),m.test(t)?a=parseFloat(i[3]/i[2]):"translatey"==t?a=parseFloat(i[4]/i[2]):"scale"==t?a=parseFloat(i[2]):"rotate"==t&&(a=parseFloat(Math.atan2(i[2],i[1])))),a}return parseFloat(e.css(t))}n.toggleClass=function(e,t,n,i){return t&&(t=t.split(" "),d&&(n=r({exclusive:"all",duration:400,ease:"ease-out"},n),e.css(N,n.exclusive+" "+n.duration+"ms "+n.ease),setTimeout((function(){e.css(N,"").css(I)}),n.duration)),a(t,(function(t,n){e.toggleClass(n,i)}))),e},n.parseEffects=function(e,t){var n={};return"string"==typeof e?a(e.split(" "),(function(e,i){var a=!v.test(i),r=i.replace(g,(function(e,t,n){return t+":"+n.toLowerCase()})).split(":"),o=r[1],s={};r.length>1&&(s.direction=t&&a?V[o].reverse:o),n[r[0]]=s})):a(e,(function(e){var i=this.direction;i&&t&&!v.test(e)&&(this.direction=V[i].reverse),n[e]=this})),n},d&&r(i,{transition:function(t,n,i){var a,o,s=0,l=t.data("keys")||[];i=r({duration:200,ease:"ease-out",complete:null,exclusive:"all"},i);var u=!1,c=function(){u||(u=!0,o&&(clearTimeout(o),o=null),t.removeData(A).dequeue().css(N,"").css(N),i.complete.call(t))};i.duration=e.fx&&e.fx.speeds[i.duration]||i.duration,a=G(0,n),e.merge(l,function(e){var t=[];for(var n in e)t.push(n);return t}(a)),e.hasOwnProperty("uniqueSort")?t.data("keys",e.uniqueSort(l)).height():t.data("keys",e.unique(l)).height(),t.css(N,i.exclusive+" "+i.duration+"ms "+i.ease).css(N),t.css(a).css(R),d.event&&(t.one(d.event,c),0!==i.duration&&(s=500)),o=setTimeout(c,i.duration+s),t.data(A,o),t.data(H,c)},stopQueue:function(e,t,i){var a,r=e.data("keys"),o=!i&&r,s=e.data(H);return o&&(a=n.getComputedStyles(e[0],r)),s&&s(),o&&e.css(a),e.removeData("keys").stop(t)}});var $=n.Class.extend({init:function(e,t){var n=this;n.element=e,n.effects=[],n.options=t,n.restore=[]},run:function(t){var n,a,o,s,u,c,p=this,h=t.length,f=p.element,m=p.options,g=e.Deferred(),v={},_={};for(p.effects=t,g.done(p.complete.bind(p)),f.data("animating",!0),a=0;a<h;a++)for((n=t[a]).setReverse(m.reverse),n.setOptions(m),p.addRestoreProperties(n.restore),n.prepare(v,_),o=0,c=(u=n.children()).length;o<c;o++)u[o].duration(m.duration).run();for(var b in m.effects)r(_,m.effects[b].properties);for(f.is(":visible")||r(v,{display:f.data("olddisplay")||"block"}),l&&!m.reset&&(s=f.data("targetTransform"))&&(v=r(s,v)),v=G(0,v),l&&!d&&(v=q(v)),f.css(v).css(R),a=0;a<h;a++)t[a].setup();return m.init&&m.init(),f.data("targetTransform",_),i.animate(f,_,r({},m,{complete:g.resolve})),g.promise()},stop:function(){e(this.element).kendoStop(!0,!0)},addRestoreProperties:function(e){for(var t,n=this.element,i=0,a=e.length;i<a;i++)t=e[i],this.restore.push(t),n.data(t)||n.data(t,n.css(t))},restoreCallback:function(){for(var e=this.element,t=0,n=this.restore.length;t<n;t++){var i=this.restore[t];e.css(i,e.data(i))}},complete:function(){var e=this,t=0,n=e.element,i=e.options,a=e.effects,r=a.length;for(n.removeData("animating").dequeue(),i.hide&&n.data("olddisplay",n.css("display")).hide(),this.restoreCallback(),p&&!l&&setTimeout(this.restoreCallback.bind(this),0);t<r;t++)a[t].teardown();i.completeCallback&&i.completeCallback(n)}});i.promise=function(e,t){var a,r,o=[],s=new $(e,t),l=n.parseEffects(t.effects);for(var d in t.effects=l,l)(a=i[Q(d)])&&(r=new a(e,l[d].direction),o.push(r));o[0]?s.run(o):(e.is(":visible")||e.css({display:e.data("olddisplay")||"block"}).css("display"),t.init&&t.init(),e.dequeue(),s.complete())},r(i,{animate:function(n,o,p){var h=!1!==p.transition;delete p.transition,d&&"transition"in i&&h?i.transition(n,o,p):l?n.animate(q(o),{queue:!1,show:!1,hide:!1,duration:p.duration,complete:p.complete}):n.each((function(){var n=e(this),i={};a(b,(function(e,a){var s,d=o?o[a]+" ":null;if(d){var p=o;if(a in u&&o[a]!==t)s=d.match(f),l&&r(p,{scale:+s[0]});else if(a in c&&o[a]!==t){var h=n.css(P),m="absolute"==h||"fixed"==h;n.data(z)||(m?n.data(z,{top:j(n,"top")||0,left:j(n,"left")||0,bottom:j(n,"bottom"),right:j(n,"right")}):n.data(z,{top:j(n,"marginTop")||0,left:j(n,"marginLeft")||0}));var g=n.data(z);if(s=d.match(f)){var v="translatey"==a?0:+s[1],_="translatey"==a?+s[1]:+s[2];m?(isNaN(g.right)?isNaN(v)||r(p,{left:g.left+v}):isNaN(v)||r(p,{right:g.right-v}),isNaN(g.bottom)?isNaN(_)||r(p,{top:g.top+_}):isNaN(_)||r(p,{bottom:g.bottom-_})):(isNaN(v)||r(p,{marginLeft:g.left+v}),isNaN(_)||r(p,{marginTop:g.top+_}))}}!l&&"scale"!=a&&a in p&&delete p[a],p&&r(i,p)}})),s.msie&&delete i.scale,n.animate(i,{queue:!1,show:!1,hide:!1,duration:p.duration,complete:p.complete})}))}}),i.animatedPromise=i.promise;var Y=n.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 $(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,a=this,o=a.element,s=0,u=a.restore,c=u.length,p=e.Deferred(),h={},f={},m=a.children(),g=m.length;for(p.done(a._complete.bind(a)),o.data("animating",!0),s=0;s<c;s++)t=u[s],o.data(t)||o.data(t,o.css(t));for(s=0;s<g;s++)m[s].duration(a._duration).run();return a.prepare(h,f),o.is(":visible")||r(h,{display:o.data("olddisplay")||"block"}),l&&(n=o.data("targetTransform"))&&(h=r(n,h)),h=G(0,h),l&&!d&&(h=q(h)),o.css(h).css(R),a.setup(),o.data("targetTransform",f),i.animate(o,f,{duration:a._duration,complete:p.resolve}),p.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(){for(var e=this.element,t=0,n=this.restore.length;t<n;t++){var i=this.restore[t];e.css(i,e.data(i))}},_complete:function(){var e=this,t=e.element;t.removeData("animating").dequeue(),e.restoreCallback(),e.shouldHide()&&t.data("olddisplay",t.css("display")).hide(),p&&!l&&setTimeout(e.restoreCallback.bind(e),0),e.teardown()},setOptions:function(e){r(!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}});function Q(e){return e.charAt(0).toUpperCase()+e.substring(1)}function X(e,t){var n=Y.extend(t),r=n.prototype.directions;i[Q(e)]=n,i.Element.prototype[e]=function(e,t,i,a){return new n(this.element,e,t,i,a)},a(r,(function(t,a){i.Element.prototype[e+Q(a)]=function(e,t,i){return new n(this.element,a,e,t,i)}}))}var J=["left","right","up","down"],Z=["in","out"];function ee(e,t,n,i){X(e,{directions:Z,startValue:function(e){return this._startValue=e,this},endValue:function(e){return this._endValue=e,this},shouldHide:function(){return this._shouldHide},prepare:function(e,a){var r,o,s="out"===this._direction,l=this.element.data(t);r=!(isNaN(l)||l==n)?l:void 0!==this._startValue?this._startValue:s?n:i,o=void 0!==this._endValue?this._endValue:s?i:n,this._reverse?(e[t]=o,a[t]=r):(e[t]=r,a[t]=o),this._shouldHide=a[t]===i}})}X("slideIn",{directions:J,divisor:function(e){return this.options.divisor=e,this},prepare:function(e,t){var i,a=this,r=a.element,o=n._outerWidth,s=n._outerHeight,d=V[a._direction],u=-d.modifier*(d.vertical?s(r):o(r))/(a.options&&a.options.divisor||1)+C;a._reverse&&(i=e,e=t,t=i),l?(e[d.transition]=u,t[d.transition]="0px"):(e[d.property]=u,t[d.property]="0px")}}),X("tile",{directions:J,init:function(e,t,n){Y.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,i=e.options.previous,a=e.options.previousDivisor||1,r=e._direction,o=[n.fx(e.element).slideIn(r).setReverse(t)];return i&&o.push(n.fx(i).slideIn(V[r].reverse).divisor(a).setReverse(!t)),o}}),ee("fade","opacity",1,0),ee("zoom","scale",1,.01),X("slideMargin",{prepare:function(e,t){var n,i=this,a=i.element,r=i.options,o=a.data(E),s=r.offset,l=i._reverse;l||null!==o||a.data(E,parseFloat(a.css("margin-"+r.axis))),n=a.data(E)||0,t["margin-"+r.axis]=l?n:n+s}}),X("slideTo",{prepare:function(e,t){var n=this,i=n.element,a=n.options.offset.split(","),r=n._reverse;l?(t.translatex=r?0:a[0],t.translatey=r?0:a[1]):(t.left=r?0:a[0],t.top=r?0:a[1]),i.css("left")}}),X("expand",{directions:["horizontal","vertical"],restore:[F],prepare:function(e,n){var i=this,a=i.element,r=i.options,o=i._reverse,s="vertical"===i._direction?I:S,l=a[0].style[s],d=a.data(s),u=parseFloat(d||l),c=x(a.css(s,T)[s]());e.overflow=D,u=r&&r.reset?c||u:u||c,n[s]=(o?0:u)+C,e[s]=(o?u:0)+C,d===t&&a.data(s,l)},shouldHide:function(){return this._reverse},teardown:function(){var e=this.element,t="vertical"===this._direction?I:S,n=e.data(t);n!=T&&""!==n||setTimeout((function(){e.css(t,T).css(t)}),0)}});var te={position:"absolute",marginLeft:0,marginTop:0,scale:1};X("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,a=n.element,o=i.box(a),s=i.box(n.options.target),l=K(a,"scale"),d=i.fillScale(s,o),u=i.transformOrigin(s,o);r(e,te),t.scale=1,a.css(R,"scale(1)").css(R),a.css(R,"scale("+l+")"),e.top=o.top,e.left=o.left,e.transformOrigin=u.x+C+" "+u.y+C,n._reverse?e.scale=d:t.scale=d}});var ne={top:"rect(auto auto $size auto)",bottom:"rect($size auto auto auto)",left:"rect(auto $size auto auto)",right:"rect(auto auto auto $size)"},ie={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)"}};function ae(e,t){var i=e[n.directions[t].vertical?I:S]()/2+"px";return ne[t].replace("$size",i)}X("turningPage",{directions:J,init:function(e,t,n){Y.prototype.init.call(this,e,t),this._container=n},prepare:function(e,t){var i=this,a=i._reverse,r=a?V[i._direction].reverse:i._direction,o=ie[r];e.zIndex=1,i._clipInHalf&&(e.clip=ae(i._container,n.directions[r].reverse)),e[O]=D,t[R]=L+(a?o.start:o.end),e[R]=L+(a?o.end:o.start)},setup:function(){this._container.append(this.element)},face:function(e){return this._face=e,this},shouldHide:function(){var e=this._reverse,t=this._face;return e&&!t||!e&&t},clipInHalf:function(e){return this._clipInHalf=e,this},temporary:function(){return this.element.addClass("temp-page"),this}}),X("staticPage",{directions:J,init:function(e,t,n){Y.prototype.init.call(this,e,t),this._container=n},restore:["clip"],prepare:function(e,t){var n=this,i=n._reverse?V[n._direction].reverse:n._direction;e.clip=ae(n._container,i),e.opacity=.999,t.opacity=1},shouldHide:function(){var e=this._reverse,t=this._face;return e&&!t||!e&&t},face:function(e){return this._face=e,this}}),X("pageturn",{directions:["horizontal","vertical"],init:function(e,t,n,i){Y.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,i=t.options,a="horizontal"===t._direction?"left":"top",r=n.directions[a].reverse,o=t._reverse,s=i.face.clone(!0).removeAttr("id"),l=i.back.clone(!0).removeAttr("id"),d=t.element;return o&&(e=a,a=r,r=e),[n.fx(i.face).staticPage(a,d).face(!0).setReverse(o),n.fx(i.back).staticPage(r,d).setReverse(o),n.fx(s).turningPage(a,d).face(!0).clipInHalf(!0).temporary().setReverse(o),n.fx(l).turningPage(r,d).clipInHalf(!0).temporary().setReverse(o)]},prepare:function(e,t){e[M]=B,e.transformStyle="preserve-3d",e.opacity=.999,t.opacity=1},teardown:function(){this.element.find(".temp-page").remove()}}),X("flip",{directions:["horizontal","vertical"],init:function(e,t,n,i){Y.prototype.init.call(this,e,t),this.options={},this.options.face=n,this.options.back=i},children:function(){var e,t=this,i=t.options,a="horizontal"===t._direction?"left":"top",r=n.directions[a].reverse,o=t._reverse,s=t.element;return o&&(e=a,a=r,r=e),[n.fx(i.face).turningPage(a,s).face(!0).setReverse(o),n.fx(i.back).turningPage(r,s).setReverse(o)]},prepare:function(e){e[M]=B,e.transformStyle="preserve-3d"}});var re=!o.mobileOS.android;X("replace",{_before:e.noop,_after:e.noop,init:function(t,n,i){Y.prototype.init.call(this,t),this._previous=e(n),this._transitionClass=i},duration:function(){throw new 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(".km-touch-scrollbar, .km-actionsheet-wrapper"))){var n=this.container;n.removeClass("k-fx-end").removeClass(this._containerClass()).off(d.event,this.completeProxy),this._previous.hide().removeClass("k-fx-current"),this.element.removeClass("k-fx-next"),re&&n.css(F,""),this.isAbsolute||this._both().css(P,""),this.deferred.resolve(),delete this.deferred}},run:function(){if(this._additionalEffects&&this._additionalEffects[0])return this.compositeRun();var t=this,i=t.element,a=t._previous,r=i.parents().filter(a.parents()).first(),o=t._both(),s=e.Deferred(),l=i.css(P);return r.length||(r=i.parent()),this.container=r,this.deferred=s,this.isAbsolute="absolute"==l,this.isAbsolute||o.css(P,"absolute"),re&&(r.css(F),r.css(F,"hidden")),d?(i.addClass("k-fx-hidden"),r.addClass(this._containerClass()),this.completeProxy=this.complete.bind(this),r.on(d.event,this.completeProxy),n.animationFrame((function(){i.removeClass("k-fx-hidden").addClass("k-fx-next"),a.css("display","").addClass("k-fx-current"),t._before(a,i),n.animationFrame((function(){r.removeClass("k-fx-start").addClass("k-fx-end"),t._after(a,i)}))}))):this.complete(),s.promise()},stop:function(){this.complete()}});var oe=n.Class.extend({init:function(){var e=this;e._tickProxy=e._tick.bind(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,n.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()):n.animationFrame(e._tickProxy))}}),se=oe.extend({init:function(e){r(this,e),oe.fn.init.call(this)},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))}}});r(se,{easeOutExpo:function(e,t,n,i){return e==i?t+n:n*(1-Math.pow(2,-10*e/i))+t},easeOutBack:function(e,t,n,i,a){return n*((e=e/i-1)*e*(((a=1.70158)+1)*e+a)+1)+t}}),i.Animation=oe,i.Transition=se,i.createEffect=X,i.box=function(t){var i=(t=e(t)).offset();return i.width=n._outerWidth(t),i.height=n._outerHeight(t),i},i.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}},i.fillScale=function(e,t){return Math.min(e.width/t.width,e.height/t.height)},i.fitScale=function(e,t){return Math.max(e.width/t.width,e.height/t.height)}}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.support,a=n.Class,r=n.Observable,o=Date.now,s=e.extend,l=i.mobileOS,d=l&&l.android,u=800,c=i.browser.msie?5:0,p="press",h="hold",f="select",m="start",g="move",v="end",_="cancel",b="tap",k="doubleTap",w="release",y="gesturechange",x="gestureend",C="gesturetap",T={api:0,touch:0,mouse:9,pointer:9},S=!i.touch||i.mouseAndTouchPresent;function I(e,t){var n=e.x.location,i=e.y.location,a=t.x.location,r=t.y.location,o=n-a,s=i-r;return{center:{x:(n+a)/2,y:(i+r)/2},distance:Math.sqrt(o*o+s*s)}}function D(e){var t,n,a,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(t=(n=o?o.changedTouches:[]).length;l<t;l++)a=n[l],r.push({location:a,event:e,target:a.target,currentTarget:s,id:a.identifier,type:"touch"});else i.pointers||i.msPointers?r.push({location:o,event:e,target:e.target,currentTarget:s,id:o.pointerId,type:"pointer"}):r.push({id:1,event:e,target:e.target,currentTarget:s,location:e,type:"mouse"});return r}var E=a.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=o()},move:function(e){var t=this,n=e["page"+t.axis],i=o(),a=i-t.timeStamp||1;!n&&d||(t.delta=n-t.location,t._updateLocationData(e),t.initialDelta=n-t.startLocation,t.velocity=t.delta/a,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]}}),A=a.extend({init:function(e,t,n){s(this,{x:new E("X",n.location),y:new E("Y",n.location),type:n.type,useClickAsTap:e.useClickAsTap,threshold:e.threshold||T[n.type],userEvents:e,target:t,currentTarget:n.currentTarget,initialTouch:n.target,id:n.id,pressEvent:n,_clicks:e._clicks,supportDoubleTap:e.supportDoubleTap,_moved:!1,_finished:!1})},press:function(){this._holdTimeout=setTimeout(this._hold.bind(this),this.userEvents.minHold),this._trigger(p,this.pressEvent)},_tap:function(e){var t=this;t.userEvents._clicks++,1==t.userEvents._clicks&&(t._clickTimeout=setTimeout((function(){1==t.userEvents._clicks?t._trigger(b,e):t._trigger(k,e),t.userEvents._clicks=0}),300))},_hold:function(){this._trigger(h,this.pressEvent)},move:function(e){var t=this,n="api"!==e.type&&t.userEvents._shouldNotMove;if(!t._finished&&!n){if(t.x.move(e.location),t.y.move(e.location),!t._moved){if(t._withinIgnoreThreshold())return;if(z.current&&z.current!==t.userEvents)return t.dispose();t._start(e)}t._finished||t._trigger(g,e)}},end:function(e){this.endTime=o(),this._finished||(this._finished=!0,this._trigger(w,e),this._moved?this._trigger(v,e):this.useClickAsTap||(this.supportDoubleTap?this._tap(e):this._trigger(b,e)),clearTimeout(this._holdTimeout),this.dispose())},dispose:function(){var t=this.userEvents.touches;this._finished=!0,this.pressEvent=null,clearTimeout(this._holdTimeout),t.splice(e.inArray(this,t),1)},skip:function(){this.dispose()},cancel:function(){this.dispose()},isMoved:function(){return this._moved},_start:function(e){clearTimeout(this._holdTimeout),this.startTime=o(),this._moved=!0,this._trigger(m,e)},_trigger:function(e,t){var n=this,i=t.event,a={touch:n,x:n.x,y:n.y,target:n.target,event:i};n.userEvents.notify(e,a)&&i.preventDefault()},_withinIgnoreThreshold:function(){var e=this.x.initialDelta,t=this.y.initialDelta;return Math.sqrt(e*e+t*t)<=this.threshold}});function F(e){for(var t=n.eventMap.up.split(" "),i=0,a=t.length;i<a;i++)e(t[i])}var z=r.extend({init:function(t,a){var o,l=this,d=n.guid();if(a=a||{},o=l.filter=a.filter,l.threshold=a.threshold||c,l.minHold=a.minHold||u,l.touches=[],l._maxTouches=a.multiTouch?2:1,l.allowSelection=a.allowSelection,l.captureUpIfMoved=a.captureUpIfMoved,l.useClickAsTap=!a.fastTap&&!i.delayedClick(),l.eventNS=d,l._clicks=0,l.supportDoubleTap=a.supportDoubleTap,t=e(t).handler(l),r.fn.init.call(l),s(l,{element:t,surface:a.global&&S?e(t[0].ownerDocument.documentElement):e(a.surface||t),stopPropagation:a.stopPropagation,pressed:!1}),l.surface.handler(l).on(n.applyEventMap("move",d),"_move").on(n.applyEventMap("up cancel",d),"_end"),t.on(n.applyEventMap("down",d),o,"_start"),l.useClickAsTap&&t.on(n.applyEventMap("click",d),o,"_click"),i.pointers||i.msPointers)if(i.browser.version<11){var T="pinch-zoom double-tap-zoom";t.css("-ms-touch-action",a.touchAction&&"none"!=a.touchAction?T+" "+a.touchAction:T)}else t.css("touch-action",a.touchAction||"none");if(a.preventDragEvent&&t.on(n.applyEventMap("dragstart",d),n.preventDefault),t.on(n.applyEventMap("mousedown",d),o,{root:t},"_select"),l.captureUpIfMoved&&i.eventCapture){var I=l.surface[0],D=l.preventIfMoving.bind(l);F((function(e){I.addEventListener(e,D,!0)}))}l.bind([p,h,b,k,m,g,v,w,_,"gesturestart",y,x,C,f],a)},preventIfMoving:function(e){this._isMoved()&&e.preventDefault()},destroy:function(){var e=this;if(!e._destroyed){if(e._destroyed=!0,e.captureUpIfMoved&&i.eventCapture){var t=e.surface[0];F((function(n){t.removeEventListener(n,e.preventIfMoving)}))}e.element.kendoDestroy(e.eventNS),e.surface.kendoDestroy(e.eventNS),e.element.removeData("handler"),e.surface.removeData("handler"),e._disposeAll(),e.unbind(),delete e.surface,delete e.element,delete e.currentTarget}},capture:function(){z.current=this},cancel:function(){this._disposeAll(),this.trigger(_)},notify:function(e,t){var n=this.touches;if(this._isMultiTouch()){switch(e){case g:e=y;break;case v:e=x;break;case b:e=C}s(t,{touches:n},I(n[0],n[1]))}return this.trigger(e,s(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(f,{event:e})||e.preventDefault()},_start:function(t){var n,i,a=this,r=0,o=a.filter,s=D(t),l=s.length,d=t.which;if(!(d&&d>1||a._maxTouchesReached()))for(z.current=null,a.currentTarget=t.currentTarget,a.stopPropagation&&t.stopPropagation();r<l&&!a._maxTouchesReached();r++)i=s[r],(n=o?e(i.currentTarget):a.element).length&&(i=new A(a,n,i),a.touches.push(i),i.press(),a._isMultiTouch()&&a.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:o(),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,i,a,r,o={},s=D(t),l=this.touches;for(n=0;n<l.length;n++)o[(i=l[n]).id]=i;for(n=0;n<s.length;n++)(r=o[(a=s[n]).id])&&r[e](a)},_apiCall:function(t,n,i,a){this[t]({api:!0,pageX:n,pageY:i,clientX:n,clientY:i,target:e(a||this.element)[0],stopPropagation:e.noop,preventDefault:e.noop})}});z.defaultThreshold=function(e){c=e},z.minHold=function(e){u=e},n.getTouches=D,n.touchDelta=I,n.UserEvents=z}(window.kendo.jQuery);!function(e,t){var n,i=window.kendo,a=i.support,r=window.document,o=e(window),s=i.Class,l=i.ui.Widget,d=i.Observable,u=i.UserEvents,c=e.extend,p=i.getOffset,h={},f={},m={},g=i.elementUnderCursor,v="keyup",_="change",b="dragstart",k="hold",w="drag",y="dragend",x="dragcancel",C="hintDestroyed",T="dragenter",S="dragleave",I="drop";function D(e,t){return parseInt(e.css(t),10)||0}function E(e,t){return Math.min(Math.max(e,t.min),t.max)}function A(e,t){var n=p(e),a=i._outerWidth,r=i._outerHeight,o=n.left+D(e,"borderLeftWidth")+D(e,"paddingLeft"),s=n.top+D(e,"borderTopWidth")+D(e,"paddingTop");return{x:{min:o,max:o+e.width()-a(t,!0)},y:{min:s,max:s+e.height()-r(t,!0)}}}var F,z=d.extend({init:function(t,n){var a=this,r=t[0];a.capture=!1,r.addEventListener?(e.each(i.eventMap.down.split(" "),(function(){r.addEventListener(this,a._press.bind(a),!0)})),e.each(i.eventMap.up.split(" "),(function(){r.addEventListener(this,a._release.bind(a),!0)}))):(e.each(i.eventMap.down.split(" "),(function(){r.attachEvent(this,a._press.bind(a))})),e.each(i.eventMap.up.split(" "),(function(){r.attachEvent(this,a._release.bind(a))}))),d.fn.init.call(a),a.bind(["press","release"],n||{})},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1},_press:function(e){this.trigger("press"),this.capture&&e.preventDefault()},_release:function(e){var t=this;t.trigger("release"),t.capture&&(e.preventDefault(),t.cancelCapture())}}),P=d.extend({init:function(t){var n=this;d.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,a=t.getSize();(0!==n||t.forcedEnabled)&&(t.max=t.virtual?-t._virtualMin:0,t.size=a,t.total=i,t.min=Math.min(t.max,a-i),t.minScale=a/n,t.centerOffset=(i-a)/2,t.enabled=t.forcedEnabled||i>a,e||t.trigger(_,t))}}),H=d.extend({init:function(e){var t=this;d.fn.init.call(t),t.x=new P(c({horizontal:!0},e)),t.y=new P(c({horizontal:!1},e)),t.container=e.container,t.forcedMinScale=e.minScale,t.maxScale=e.maxScale||100,t.bind(_,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(_)}}),N=d.extend({init:function(e){c(this,e),d.fn.init.call(this)},outOfBounds:function(){return this.dimension.outOfBounds(this.movable[this.axis])},dragMove:function(e){var t=this,n=t.dimension,i=t.axis,a=t.movable,r=a[i]+e;n.enabled&&((r<n.min&&e<0||r>n.max&&e>0)&&(e*=t.resistance),a.translateAxis(i,e),t.trigger(_,t))}}),R=s.extend({init:function(t){var n,i,a,r,o=this;c(o,{elastic:!0},t),a=o.elastic?.5:0,r=o.movable,o.x=n=new N({axis:"x",dimension:o.dimensions.x,resistance:a,movable:r}),o.y=i=new N({axis:"y",dimension:o.dimensions.y,resistance:a,movable:r}),o.userEvents.bind(["press","move","end","gesturestart","gesturechange"],{gesturestart:function(e){o.gesture=e,o.offset=o.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,a=o.gesture,s=a.center,l=e.center,d=e.distance/a.distance,u=o.dimensions.minScale,c=o.dimensions.maxScale;r.scale<=u&&d<1&&(d+=.8*(1-d)),r.scale*d>=c&&(d=c/r.scale);var p=r.x+o.offset.left,h=r.y+o.offset.top;t={x:(p-s.x)*d+l.x-p,y:(h-s.y)*d+l.y-h},r.scaleWith(d),n.dragMove(t.x),i.dragMove(t.y),o.dimensions.rescale(r.scale),o.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()}})}}),O=a.transitions.prefix+"Transform";F=a.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+")"};var M=d.extend({init:function(t){var n=this;d.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(F(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){c(this,e),this.refresh()},refresh:function(){var e,t=this,n=t.x,a=t.y;t.round&&(n=Math.round(n),a=Math.round(a)),(e=F(n,a,t.scale))!=t.coordinates&&(i.support.browser.msie&&i.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[O]=e,t._saveCoordinates(e),t.trigger(_))},_saveCoordinates:function(e){this.coordinates=e}});function B(e,t){var n,i=t.options.group,a=e[i];if(l.fn.destroy.call(t),a.length>1){for(n=0;n<a.length;n++)if(a[n]==t){a.splice(n,1);break}}else a.length=0,delete e[i]}var L=l.extend({init:function(e,t){var n=this;l.fn.init.call(n,e,t);var i=n.options.group;i in f?f[i].push(n):f[i]=[n]},events:[T,S,I],options:{name:"DropTarget",group:"default"},destroy:function(){B(f,this)},_trigger:function(e,t){var n=h[this.options.group];if(n)return this.trigger(e,c({},t.event,{draggable:n,dropTarget:t.dropTarget}))},_over:function(e){this._trigger(T,e)},_out:function(e){this._trigger(S,e)},_drop:function(e){var t=h[this.options.group];t&&(t.dropped=!this._trigger(I,e))}});L.destroyGroup=function(e){var t,n=f[e]||m[e];if(n){for(t=0;t<n.length;t++)l.fn.destroy.call(n[t]);n.length=0,delete f[e],delete m[e]}},L._cache=f;var V=L.extend({init:function(e,t){var n=this;l.fn.init.call(n,e,t);var i=n.options.group;i in m?m[i].push(n):m[i]=[n]},destroy:function(){B(m,this)},options:{name:"DropTargetArea",group:"default",filter:null}}),U=l.extend({init:function(e,t){var n=this;l.fn.init.call(n,e,t),n._activated=!1,n.userEvents=new u(n.element,{global:!0,allowSelection:!0,filter:n.options.filter,threshold:n.options.distance,start:n._start.bind(n),hold:n._hold.bind(n),move:n._drag.bind(n),end:n._end.bind(n),cancel:n._cancel.bind(n),select:n._select.bind(n)}),i.support.touch&&n.element.find(n.options.filter).css("touch-action","none"),n._afterEndHandler=n._afterEnd.bind(n),n._captureEscape=n._captureEscape.bind(n)},events:[k,b,w,y,x,C],options:{name:"Draggable",distance:i.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){e.keyCode===i.keys.ESC&&(this._trigger(x,{event:e}),this.userEvents.cancel())},_updateHint:function(t){var n,i=this,a=i.options,r=i.boundaries,o=a.axis,s=i.options.cursorOffset;s?n={left:t.x.location+s.left,top:t.y.location+s.top}:(i.hintOffset.left+=t.x.delta,i.hintOffset.top+=t.y.delta,n=e.extend({},i.hintOffset)),r&&(n.top=E(n.top,r.y),n.left=E(n.left,r.x)),"x"===o?delete n.top:"y"===o&&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(t){var n=this,a=n.options,o=a.container?e(a.container):null,s=a.hint;if(this._shouldIgnoreTarget(t.touch.initialTouch)||a.holdToDrag&&!n._activated)n.userEvents.cancel();else{if(n.currentTarget=t.target,n.currentTargetOffset=p(n.currentTarget),s){n.hint&&n.hint.stop(!0,!0).remove(),n.hint=i.isFunction(s)?e(s.call(n,n.currentTarget)):s;var l=p(n.currentTarget);n.hintOffset=l,n.hint.css({position:"absolute",zIndex:2e4,left:l.left,top:l.top}).appendTo(r.body),n.angular("compile",(function(){n.hint.removeAttr("ng-repeat");for(var i=e(t.target);!i.data("$$kendoScope")&&i.length;)i=i.parent();return{elements:n.hint.get(),scopeFrom:i.data("$$kendoScope")}}))}h[a.group]=n,n.dropped=!1,o&&(n.boundaries=A(o,n.hint)),e(r).on(v,n._captureEscape),n._trigger(b,t)&&(n.userEvents.cancel(),n._afterEnd()),n.userEvents.capture()}},_hold:function(e){this.currentTarget=e.target,this._trigger(k,e)?this.userEvents.cancel():this._activated=!0},_drag:function(t){t.preventDefault();var n=this._elementUnderCursor(t);if(this.options.autoScroll&&this._cursorElement!==n&&(this._scrollableParent=q(n),this._cursorElement=n),this._lastEvent=t,this._processMovement(t,n),this.options.autoScroll&&this._scrollableParent[0]){var i=G(t.x.location,t.y.location,W(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(this._autoScroll.bind(this),50))}this.hint&&this._updateHint(t)},_processMovement:function(t,i){this._withDropTarget(i,(function(i,a){if(i){if(n){if(a===n.targetElement)return;n._trigger(S,c(t,{dropTarget:e(n.targetElement)}))}i._trigger(T,c(t,{dropTarget:e(a)})),n=c(i,{targetElement:a})}else n&&(n._trigger(S,c(t,{dropTarget:e(n.targetElement)})),n=null)})),this._trigger(w,c(t,{dropTarget:n,elementUnderCursor:i}))},_autoScroll:function(){var e=this._scrollableParent[0],t=this._scrollVelocity,n=this._scrollCompenstation;if(e){var i,a,s=this._elementUnderCursor(this._lastEvent);this._processMovement(this._lastEvent,s);var l=e===j()[0];l?(i=r.body.scrollHeight>o.height(),a=r.body.scrollWidth>o.width()):(i=e.offsetHeight<=e.scrollHeight,a=e.offsetWidth<=e.scrollWidth);var d=e.scrollTop+t.y,u=i&&d>0&&d<e.scrollHeight,c=e.scrollLeft+t.x,p=a&&c>0&&c<e.scrollWidth;u?e.scrollTop+=t.y:i&&d<0&&(e.scrollTop=0),p?e.scrollLeft+=t.x:a&&c<0&&(e.scrollLeft=0),this.hint&&l&&(p||u)&&(u&&(n.top+=t.y),p&&(n.left+=t.x),this.hint.css(n))}},_end:function(t){this._withDropTarget(this._elementUnderCursor(t),(function(i,a){i&&(i._drop(c({},t,{dropTarget:e(a)})),n=null)})),clearInterval(this._scrollInterval),this._scrollInterval=null,this._cancel(this._trigger(y,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){return this.trigger(e,c({},t.event,{x:t.x,y:t.y,currentTarget:this.currentTarget,initialTarget:t.touch?t.touch.initialTouch:null,dropTarget:t.dropTarget,elementUnderCursor:t.elementUnderCursor}))},_elementUnderCursor:function(t){var n=g(t),i=this.hint;return i&&function(t,n){try{return e.contains(t,n)||t==n}catch(e){return!1}}(i[0],n)&&(i.hide(),(n=g(t))||(n=g(t)),i.show()),n},_withDropTarget:function(t,n){var i,r=this.options.group,o=f[r],s=m[r];(o&&o.length||s&&s.length)&&(i=function(t,n,i){for(var r,o,s=0,l=n&&n.length,d=i&&i.length;t&&t.parentNode;){for(s=0;s<l;s++)if((r=n[s]).element[0]===t)return{target:r,targetElement:t};for(s=0;s<d;s++)if(o=i[s],e.contains(o.element[0],t)&&a.matchesSelector.call(t,o.options.filter))return{target:o,targetElement:t};t=t.parentNode}}(t,o,s),i?n(i.target,i.targetElement):n())},destroy:function(){var e=this;l.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 h[t.options.group],t.trigger("destroy"),t.trigger(C),e(r).off(v,t._captureEscape)}});function W(e){var t,n,i,a=j()[0];return e[0]===a?{top:n=a.scrollTop,left:i=a.scrollLeft,bottom:n+o.height(),right:i+o.width()}:((t=e.offset()).bottom=t.top+e.height(),t.right=t.left+e.width(),t)}function j(){return e(i.support.browser.edge||i.support.browser.safari?r.body:r.documentElement)}function q(t){var n=j();if(!t||t===r.body||t===r.documentElement)return n;for(var a=e(t)[0];a&&!i.isScrollable(a)&&a!==r.body;)a=a.parentNode;return a===r.body?n:e(a)}function G(e,t,n){var i={x:0,y:0},a=50;return e-n.left<a?i.x=-(a-(e-n.left)):n.right-e<a&&(i.x=a-(n.right-e)),t-n.top<a?i.y=-(a-(t-n.top)):n.bottom-t<a&&(i.y=a-(n.bottom-t)),i}i.ui.plugin(L),i.ui.plugin(V),i.ui.plugin(U),i.TapCapture=z,i.containerBoundaries=A,c(i.ui,{Pane:R,PaneDimensions:H,Movable:M}),i.ui.Draggable.utils={autoScrollVelocity:G,scrollableViewPort:W,findScrollableParent:q}}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.mobile,a=n.effects,r=i.ui,o=e.extend,s=r.Widget,l=n.Class,d=n.ui.Movable,u=n.ui.Pane,c=n.ui.PaneDimensions,p=a.Transition,h=a.Animation,f=Math.abs,m="km-scroller-release",g="km-scroller-refresh",v="change",_="scroll",b=h.extend({init:function(e){var t=this;h.fn.init.call(t),o(t,e),t.userEvents.bind("gestureend",t.start.bind(t)),t.tapCapture.bind("press",t.cancel.bind(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)}}),k=h.extend({init:function(e){var t=this;h.fn.init.call(t),o(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",t.start.bind(t)),t.userEvents.bind("gestureend",t.start.bind(t)),t.userEvents.bind("tap",t.onEnd.bind(t))},onCancel:function(){this.transition.cancel()},freeze:function(e){this.cancel(),this._moveTo(e)},onEnd:function(){var e=this;e.paneAxis.outOfBounds()?e._snapBack():e._end()},done:function(){return f(this.velocity)<1},start:function(e){var t,n=this;n.dimension.enabled&&(n.paneAxis.outOfBounds()?n.transition._started?(n.transition.cancel(),n.velocity=Math.min(e.touch[n.axis].velocity*n.velocityMultiplier,55),h.fn.start.call(n)):n._snapBack():(t=2===e.touch.id?0:e.touch[n.axis].velocity,n.velocity=Math.max(Math.min(t*n.velocityMultiplier,55),-55),n.tapCapture.captureNext(),h.fn.start.call(n)))},tick:function(){var e=this,t=e.dimension,n=e.paneAxis.outOfBounds()?.5:e.friction,i=e.velocity*=n,a=e.movable[e.axis]+i;!e.elastic&&t.outOfBounds(a)&&(a=Math.max(Math.min(a,t.max),t.min),e.velocity=0),e.movable.moveAxis(e.axis,a)},_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:500,ease:p.easeOutExpo})}}),w=h.extend({init:function(e){n.effects.Animation.fn.init.call(this),o(this,e,{origin:{},destination:{},offset:{}})},tick:function(){this._updateCoordinates(),this.moveTo(this.origin)},done:function(){return f(this.offset.y)<5&&f(this.offset.x)<5},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=undefined},_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}}}),y=l.extend({init:function(t){var n=this,i="x"===t.axis,a=e('<div role="scrollbar" aria-controls="'+t.controlsId+'" class="km-touch-scrollbar km-'+(i?"horizontal":"vertical")+'-scrollbar" />');i&&a.attr("aria-orientation","horizontal"),o(n,t,{element:a,elementSize:0,movable:new d(a),scrollMovable:t.movable,alwaysVisible:t.alwaysVisible,size:i?"width":"height"}),n.scrollMovable.bind(v,n.refresh.bind(n)),n.container.append(a),t.alwaysVisible&&n.show()},refresh:function(){var e=this,t=e.axis,n=e.dimension,i=n.size,a=e.scrollMovable,r=i/n.total,o=Math.round(-a[t]*r),s=Math.round(i*r);r>=1?this.element.css("display","none"):this.element.css("display",""),o+s>i?s=i-o:o<0&&(s+=o,o=0),e.elementSize!=s&&(e.element.css(e.size,s+"px"),e.elementSize=s),e._ariaValue(o,n.size-e.elementSize),e.movable.moveAxis(t,o)},show:function(){this.element.css({opacity:.7,visibility:"visible"})},hide:function(){this.alwaysVisible||this.element.css({opacity:0})},_ariaValue:function(e,t){var n=this.element;e>t&&(e=t),n.attr("aria-valuemax",t),n.attr("aria-valuenow",e)}}),x=s.extend({init:function(t,i){var a=this;if(s.fn.init.call(a,t,i),t=a.element,a._native=a.options.useNative&&n.support.hasNativeScrolling,a._native)return t.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'),void o(a,{scrollElement:t,fixedContainer:t.children().first()});t.css("overflow","hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>');var r=t.children().eq(1),l=new n.TapCapture(t),p=new d(r),h=new c({element:r,container:t,forcedEnabled:a.options.zoom}),m=this.options.avoidScrolling,g=new n.UserEvents(t,{touchAction:"pan-y",fastTap:!0,allowSelection:!0,preventDragEvent:!0,captureUpIfMoved:!0,multiTouch:a.options.zoom,supportDoubleTap:a.options.supportDoubleTap,start:function(t){h.refresh();var n=f(t.x.velocity),i=f(t.y.velocity),r=2*n>=i,o=2*i>=n;!e.contains(a.fixedContainer[0],t.event.target)&&!m(t)&&a.enabled&&(h.x.enabled&&r||h.y.enabled&&o)?g.capture():g.cancel()}}),k=new u({movable:p,dimensions:h,userEvents:g,elastic:a.options.elastic}),y=new b({movable:p,dimensions:h,userEvents:g,tapCapture:l}),x=new w({moveTo:function(e){a.scrollTo(e.x,e.y)}});p.bind(v,(function(){a.scrollTop=-p.y,a.scrollLeft=-p.x,a.trigger(_,{scrollTop:a.scrollTop,scrollLeft:a.scrollLeft})})),a.options.mousewheelScrolling&&t.on("DOMMouseScroll mousewheel",this._wheelScroll.bind(this)),o(a,{movable:p,dimensions:h,zoomSnapBack:y,animatedScroller:x,userEvents:g,pane:k,tapCapture:l,pulled:!1,enabled:!0,scrollElement:r,scrollTop:0,scrollLeft:0,fixedContainer:t.children().first()}),a._initAxis("x"),a._initAxis("y"),a._wheelEnd=function(){a._wheel=!1,a.userEvents.end(0,a._wheelY)},h.refresh(),a.options.pullToRefresh&&a._initPullToRefresh()},_wheelScroll:function(e){if(!e.ctrlKey){this._wheel||(this._wheel=!0,this._wheelY=0,this.userEvents.press(0,this._wheelY)),clearTimeout(this._wheelTimeout),this._wheelTimeout=setTimeout(this._wheelEnd,50);var t=n.wheelDeltaY(e);t&&(this._wheelY+=t,this.userEvents.move(0,this._wheelY)),e.preventDefault()}},makeVirtual:function(){this.dimensions.y.makeVirtual()},virtualSize:function(e,t){this.dimensions.y.virtualSize(e,t)},height:function(){return this.dimensions.y.size},scrollHeight:function(){return this.scrollElement[0].scrollHeight},scrollWidth:function(){return this.scrollElement[0].scrollWidth},options:{name:"Scroller",zoom:!1,pullOffset:140,visibleScrollHints:!1,elastic:!0,useNative:!1,mousewheelScrolling:!0,avoidScrolling:function(){return!1},pullToRefresh:!1,messages:{pullTemplate:"Pull to refresh",releaseTemplate:"Release to refresh",refreshTemplate:"Refreshing"}},events:["pull",_,"resize"],_resize:function(){this._native||this.contentResized()},setOptions:function(e){s.fn.setOptions.call(this,e),e.pullToRefresh&&this._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?(n.scrollLeft(this.scrollElement,f(e)),this.scrollElement.scrollTop(f(t))):(this.dimensions.refresh(),this.movable.moveTo({x:e,y:t}))},animatedScrollTo:function(e,t,n){var i,a;this._native?this.scrollTo(e,t):(i={x:this.movable.x,y:this.movable.y},a={x:e,y:t},this.animatedScroller.setCoordinates(i,a),this.animatedScroller.setCallback(n),this.animatedScroller.start())},pullHandled:function(){var e=this;e.refreshHint.removeClass(g),e.hintContainer.html(e.pullTemplate({})),e.yinertia.onEnd(),e.xinertia.onEnd(),e.userEvents.cancel()},destroy:function(){s.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",e._paneChange.bind(e)),e.userEvents.bind("end",e._dragEnd.bind(e))},_dragEnd:function(){var e=this;e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(m).addClass(g),e.hintContainer.html(e.refreshTemplate({})),e.yinertia.freeze(e.options.pullOffset/2),e.trigger("pull"))},_paneChange:function(){var e=this;e.movable.y/.5>e.options.pullOffset?e.pulled||(e.pulled=!0,e.refreshHint.removeClass(g).addClass(m),e.hintContainer.html(e.releaseTemplate({}))):e.pulled&&(e.pulled=!1,e.refreshHint.removeClass(m),e.hintContainer.html(e.pullTemplate({})))},_initAxis:function(e){var t,i=this,a=i.element.attr("id"),r=i.movable,o=i.dimensions[e],s=i.tapCapture,l=i.pane[e];a||(a=n.guid(),i.element.attr("id",a)),t=new y({axis:e,movable:r,dimension:o,container:i.element,alwaysVisible:i.options.visibleScrollHints,controlsId:a}),o.bind(v,(function(){t.refresh()})),l.bind(v,(function(){t.show()})),i[e+"inertia"]=new k({axis:e,paneAxis:l,movable:r,tapCapture:s,userEvents:i.userEvents,dimension:o,elastic:i.options.elastic,friction:i.options.friction||.96,velocityMultiplier:i.options.velocityMultiplier||10,end:function(){t.hide(),i.trigger("scrollEnd",{axis:e,scrollTop:i.scrollTop,scrollLeft:i.scrollLeft})}})}});r.plugin(x)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=i.DataBoundWidget,o=/^\d+(\.\d+)?%$/i,s="k-list-item",l="k-table-row",d="k-list-item-group-label",u="k-selected",c="k-focus",p="k-hover",h="change",f="click",m="listBound",g="itemChange",v="activate",_="deactivate",b=".k-table-group-row",k=".VirtualList";function w(e){return e[e.length-1]}function y(e){return e instanceof Array?e:[e]}function x(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function C(e,t,n){var i=document.createElement(n||"div");return t&&(i.className=t),e.appendChild(i),i}function T(n,i,a){var r=a.template,s=this.options.columns&&this.options.columns.length,l=i.index%2==1?"k-table-alt-row":"";n=e(n),i.item||(r=a.placeholderTemplate),0===i.index&&this.header&&i.group&&this.header.html(a.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),s&&i.item?(l.length>0?n.addClass(l):n.removeClass("k-table-alt-row"),n.html(function(e,t,n){for(var i="",a=0;a<e.columns.length;a++){var r=e.columns[a].width,s=parseInt(r,10),l="";r&&(l+="style='width:",l+=s,l+=o.test(r)?"%":"px",l+=";'"),i+="<span class='k-table-td' "+l+">",i+=n["column"+a](t),i+="</span>"}return i}(this.options,i.item,a))):(n.find("."+d).remove(),n.find(".k-list-item-text").html(r(i.item||{}))),n.toggleClass(c,i.current),n.toggleClass(u,i.selected),n.toggleClass("k-first",i.newGroup),n.toggleClass("k-last",i.isLastGroupedItem),n.toggleClass("k-loading-item",!i.item),0!==i.index&&i.newGroup?s?e('<span class="k-table-td k-table-group-td"><span>'+a.groupTemplate(i.group)+"</span></span>").appendTo(n):e("<div class="+d+"></div>").appendTo(n).html(a.groupTemplate(i.group)):i.group&&s&&n.append(e('<span class="k-table-td k-table-spacer-td"></span>')),i.top!==t&&function(e,t){e.style.webkitTransform="translateY("+t+"px)",e.style.transform="translateY("+t+"px)"}(n[0],i.top),this.angular("compile",(function(){return{elements:[n],data:[{dataItem:i.item,group:i.group,newGroup:i.newGroup}]}}))}function S(e){return e&&"resolved"!==e.state()}var I=r.extend({init:function(t,i){var r,o,s,l=this,d=i.columns&&i.columns.length?"k-table-body k-table-scroller":"k-list-content k-virtual-content";if(l.bound(!1),l._fetching=!1,a.fn.init.call(l,t,i),l.options.itemHeight||(l.options.itemHeight=(r=i.listSize,(s=e('<div class="k-list '+r+' k-virtual-list"><div class="k-list-content k-virtual-content"><ul class="k-list-ul"><li class="k-list-item"><span class="k-list-item-text">test</span></li></ul></div></div>')).css({position:"absolute",left:"-200000px",visibility:"hidden"}),s.appendTo(document.body),o=parseFloat(n.getComputedStyles(s.find(".k-list-item")[0],["height"]).height),s.remove(),o)),i=l.options,l.element.attr("role","listbox"),l.content=l.wrapper=l.element.wrap("<div unselectable='on' class='"+d+"'></div>").parent(),l.options.columns&&l.options.columns.length){var u=l.element.closest(".k-data-table").find(".k-table-thead"),c=e('<tr class="k-table-group-row"><th class="k-table-th" colspan="'+l.options.columns.length+'"></th></tr>');u.append(c),l.header=c.find(".k-table-th"),l.element.addClass("k-table-list k-virtual-table")}else l.header=l.content.before("<div class='k-list-group-sticky-header'></div>").prev(),l.element.addClass("k-list-ul");i.ariaLabel?this.element.attr("aria-label",i.ariaLabel):i.ariaLabelledBy&&this.element.attr("aria-labelledby",i.ariaLabelledBy),l.element.on("mouseenter.VirtualList","li:not(.k-loading-item)",(function(){e(this).addClass(p)})).on("mouseleave.VirtualList","li",(function(){e(this).removeClass(p)})),l._values=y(l.options.value),l._selectedDataItems=[],l._selectedIndexes=[],l._rangesList={},l._promisesList=[],l._optionID=n.guid(),l._templates(),l.setDataSource(i.dataSource),l.content.on("scroll.VirtualList",n.throttle((function(){l._renderItems(),l._triggerListBound()}),i.delay)),l._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,ariaLabel:null,ariaLabelledBy:null},events:[h,f,m,g,v,_],setOptions:function(e){var t=this.options.columns&&this.options.columns.length?l:s;a.fn.setOptions.call(this,e),this._selectProxy&&!1===this.options.selectable?this.element.off(f,"."+t,this._selectProxy):!this._selectProxy&&this.options.selectable&&this._selectable(),this._templates(),this.refresh()},items:function(){return e(this._items)},destroy:function(){this.wrapper.off(k),this.dataSource.unbind(h,this._refreshHandler),a.fn.destroy.call(this)},setDataSource:function(e){var t,i=this,a=e||{};a=Array.isArray(a)?{data:a}:a,a=n.data.DataSource.create(a),i.dataSource?(i.dataSource.unbind(h,i._refreshHandler),i._clean(),i.bound(!1),i._deferValueSet=!0,t=i.value(),i.value([]),i.mute((function(){i.value(t)}))):i._refreshHandler=i.refresh.bind(i),i.dataSource=a.bind(h,i._refreshHandler),i.setDSFilter(a.filter()),0!==a.view().length?i.refresh():i.options.autoBind&&a.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(m))},_getValues:function(t){var n=this._valueGetter;return e.map(t,(function(e){return n(e)}))},_highlightSelectedItems:function(){for(var e=0;e<this._selectedDataItems.length;e++){var t=this._getElementByDataItem(this._selectedDataItems[e]);t.length&&t.addClass(u)}},refresh:function(e){var t,n=this,i=e&&e.action,a="itemchange"===i,r=this.isFiltered();n._mute||(n._deferValueSet=!1,n._fetching?(n._renderItems&&n._renderItems(!0),n._triggerListBound()):(r&&n.focus(0),n._createList(),i||!n._values.length||r||n.options.skipUpdateOnBind||n._emptySearch?(n.bound(!0),n._highlightSelectedItems(),n._triggerListBound()):(n._selectingValue=!0,n.bound(!0),n.value(n._values,!0).done((function(){n._selectingValue=!1,n._triggerListBound()})))),(a||"remove"===i)&&(t=function(e,t){var n,i,a,r,o=t.length,s=e.length,l=[],d=[];if(s)for(a=0;a<s;a++){for(n=e[a],i=!1,r=0;r<o;r++)if(n===t[r]){i=!0,l.push({index:a,item:n});break}i||d.push(n)}return{changed:l,unchanged:d}}(n._selectedDataItems,e.items)).changed.length&&(a?n.trigger("selectedItemChange",{items:t.changed}):n.value(n._getValues(t.unchanged))),n._fetching=!1)},removeAt:function(e){var t=this._values.splice(e,1)[0];return{position:e,dataItem:this._removeSelectedDataItem(t)}},_removeSelectedDataItem:function(e){var t=this,n=t._valueGetter;for(var i in t._selectedDataItems)if(n(t._selectedDataItems[i])===e)return t._selectedIndexes.splice(i,1),t._selectedDataItems.splice(i,1)[0]},setValue:function(e){this._values=y(e)},value:function(n,i){var a=this;return n===t?a._values.slice():(null===n&&(n=[]),n=y(n),a._valueDeferred&&"resolved"!==a._valueDeferred.state()||(a._valueDeferred=e.Deferred()),!("multiple"===a.options.selectable&&a.select().length&&n.length)&&n.length||a.select(-1),a._values=n,(a.bound()&&!a._mute&&!a._deferValueSet||i)&&a._prefetchByValue(n),a._valueDeferred)},_checkValuesOrder:function(e){if(this._removedAddedIndexes&&this._removedAddedIndexes.length===e.length){var t=this._removedAddedIndexes.slice();return this._removedAddedIndexes=null,t}return e},_prefetchByValue:function(e){for(var t,n=this,i=n._dataView,a=n._valueGetter,r=n.options.mapValueTo,o=[],s=0;s<e.length;s++)for(var l=0;l<i.length;l++)(t=i[l].item)&&(x(t)?e[s]===t:e[s]===a(t))&&o.push(i[l].index);if(o.length===e.length)return n._values=[],void n.select(o);"function"==typeof n.options.valueMapper?n.options.valueMapper({value:"multiple"===this.options.selectable?e:e[0],success:function(e){"index"===r?n.mapValueToIndex(e):"dataItem"===r&&n.mapValueToDataItem(e)}}):n.value()[0]?(n._selectingValue=!1,n._triggerListBound()):n.select([-1])},mapValueToIndex:function(e){if((e=e===t||-1===e||null===e?[]:y(e)).length){var n=this._deselect([]).removed;n.length&&this._triggerChange(n,[])}else e=[-1];this.select(e)},mapValueToDataItem:function(n){var i,a;if((n=n===t||null===n?[]:y(n)).length){i=e.map(this._selectedDataItems,(function(e,t){return{index:t,dataItem:e}})),a=e.map(n,(function(e,t){return{index:t,dataItem:e}})),this._selectedDataItems=n,this._selectedIndexes=[];for(var r=0;r<this._selectedDataItems.length;r++){var o=this._getElementByDataItem(this._selectedDataItems[r]);this._selectedIndexes.push(this._getIndecies(o)[0]),o.addClass(u)}this._triggerChange(i,a),this._valueDeferred&&this._valueDeferred.resolve()}else this.select([-1])},deferredRange:function(t){var n=this.dataSource,i=this.itemCount,a=this._rangesList,r=e.Deferred(),o=[],s=Math.floor(t/i)*i,l=Math.ceil(t/i)*i,d=l===s?[l]:[s,l];return e.each(d,(function(t,r){var s,l=r+i,d=a[r];d&&d.end===l?s=d.deferred:(s=e.Deferred(),a[r]={end:l,deferred:s},n._multiplePrefetch(r,i,(function(){s.resolve()}))),o.push(s)})),e.when.apply(e,o).then((function(){r.resolve()})),r},prefetch:function(t){var n=this,i=this.itemCount,a=!n._promisesList.length;return S(n._activeDeferred)||(n._activeDeferred=e.Deferred(),n._promisesList=[]),e.each(t,(function(e,t){n._promisesList.push(n.deferredRange(n._getSkip(t,i)))})),a&&e.when.apply(e,n._promisesList).done((function(){n._promisesList=[],n._activeDeferred.resolve()})),n._activeDeferred},_findDataItem:function(e,t){var n;if("group"===this.options.type)for(var i=0;i<e.length;i++){if(!((n=e[i].items).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(t){var i=this,a=i.itemCount,r=i._getSkip(t,a),o=this._getRange(r,a);return i._getRange(r,a).length?("group"===i.options.type&&(n.ui.progress(e(i.wrapper),!0),i.mute((function(){i.dataSource.range(r,a,(function(){n.ui.progress(e(i.wrapper),!1)})),o=i.dataSource.view()}))),i._findDataItem(o,[t-r])):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(n){var i,a,r,o,s=this.options.itemHeight,l=this._optionID,d=!0;if(n===t)return(o=this.element.find(".k-focus")).length?o:null;if("function"==typeof n){r=this.dataSource.flatView();for(var u=0;u<r.length;u++)if(n(r[u])){n=u;break}}if(n instanceof Array&&(n=w(n)),isNaN(n)?(i=e(n),a=parseInt(e(i).attr("data-offset-index"),10)):(a=n,i=this._getElementByIndex(a)),-1===a)return this.element.find(".k-focus").removeClass(c),void(this._focusedIndex=t);if(i.length){i.hasClass(c)&&(d=!1),this._focusedIndex!==t&&((o=this._getElementByIndex(this._focusedIndex)).removeClass(c).removeAttr("id"),d&&this.trigger(_)),this._focusedIndex=a,i.addClass(c).attr("id",l);var p=this._getElementLocation(a);"top"===p?this.scrollTo(a*s):"bottom"===p?this.scrollTo(a*s+s-this._screenHeight):"outScreen"===p&&this.scrollTo(a*s),d&&this.trigger(v)}else this._focusedIndex=a,this.items().removeClass(c),this.scrollToIndex(a)},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-1)},focusPrev:function(){var e,t=this._focusedIndex;return!isNaN(t)&&t>0?(t-=1,this.focus(t),(e=this.focus())&&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.hasClass("k-loading-item")&&(t-=1,this.focus(t)),t):(t=0,this.focus(t),t)},_triggerChange:function(e,t){t=t||[],((e=e||[]).length||t.length)&&this.trigger(h,{removed:e,added:t})},select:function(n){var i,a,r,o,s,l=this,d="multiple"!==l.options.selectable,u=S(l._activeDeferred),c=this.isFiltered(),p=[];if(n===t)return l._selectedIndexes.slice();if(l._selectDeferred&&"resolved"!==l._selectDeferred.state()||(l._selectDeferred=e.Deferred()),i=l._getIndecies(n),r=d&&!c&&w(i)===w(this._selectedIndexes),(p=l._deselectCurrentValues(i)).length||!i.length||r)return l._triggerChange(p),l._valueDeferred&&l._valueDeferred.resolve().promise(),l._selectDeferred.resolve().promise();1===i.length&&-1===i[0]&&(i=[]),a=i,s=l._deselect(i),p=s.removed,i=s.indices,d&&(u=!1,i.length&&(i=[w(i)]));var h=function(){var e=l._select(i);(a.length===i.length||d)&&l.focus(i),l._triggerChange(p,e),l._valueDeferred&&l._valueDeferred.resolve(),l._selectDeferred.resolve()};return o=l.prefetch(i),u||(o?o.done(h):h()),l._selectDeferred.promise()},bound:function(e){if(e===t)return this._listCreated;this._listCreated=e},mute:function(e){this._mute=!0,e(),this._mute=!1},setDSFilter:function(t){this._lastDSFilter=e.extend({},t)},isFiltered:function(){return this._lastDSFilter||this.setDSFilter(this.dataSource.filter()),!n.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){for(var n,i=this._dataView,a=this._valueGetter,r=0;r<i.length;r++)if(i[r].item&&x(i[r].item)?i[r].item===t:i[r].item&&t&&a(i[r].item)==a(t)){n=i[r];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=this.content.scrollTop(),n=this._screenHeight,i=this.options.itemHeight,a=e*i,r=a+i,o=t+n;return a===t-i||r>t&&a<t?"top":a===o||a<o&&o<r?"bottom":a>=t&&a<=t+(n-i)?"inScreen":"outScreen"},_templates:function(){var e=this.options,t={template:e.template,placeholderTemplate:e.placeholderTemplate,groupTemplate:e.groupTemplate,fixedGroupTemplate:e.fixedGroupTemplate};if(e.columns)for(var i=0;i<e.columns.length;i++){var a=e.columns[i],r=a.field?a.field.toString():"text";t["column"+i]=a.template||"#: "+r+"#"}for(var o in t)"function"!=typeof t[o]&&(t[o]=n.template(t[o]||""));this.templates=t},_generateItems:function(e,t){for(var n,i,a=[],r=this.options.itemHeight+"px",o=this.options.columns&&this.options.columns.length?l:s;t-- >0;)(i=document.createElement("span")).className="k-list-item-text",(n=document.createElement("li")).tabIndex=-1,n.className=o,n.setAttribute("role","option"),n.style.height=r,n.style.minHeight=r,n.appendChild(i),e.appendChild(n),a.push(n);return a},_saveInitialRanges:function(){var t=this.dataSource._ranges,n=e.Deferred();n.resolve(),this._rangesList={};for(var i=0;i<t.length;i++)this._rangesList[t[i].start]={end:t[i].end,deferred:n}},_createList:function(){var e,t,n,i,a,r,o=this,s=o.content.get(0),l=o.options,d=o.dataSource;o.bound()&&o._clean(),o._saveInitialRanges(),o._buildValueGetter(),o.setScreenHeight(),o.itemCount=(e=o._screenHeight,t=l.listScreens,n=l.itemHeight,Math.ceil(e*t/n)),o.itemCount>d.total()&&(o.itemCount=d.total()),o._items=o._generateItems(o.element[0],o.itemCount),o._setHeight(l.itemHeight*d.total()),o.options.type=(d.group()||[]).length?"group":"flat","flat"===o.options.type?o.header.closest(b).length?o.header.closest(b).hide():o.header.hide():o.header.closest(b).length?o.header.closest(b).show():o.header.show(),o.getter=o._getter((function(){o._renderItems(!0)})),o._onScroll=function(e,t){var n=o._listItems(o.getter);return o._fixedHeader(e,n(e,t))},o._renderItems=o._whenChanged((a=s,r=o._onScroll,function(e){return r(a.scrollTop,e)}),(i=o._reorderList(o._items,T.bind(o)),function(e,t){return i(e.items,e.index,t),e})),o._renderItems(),o._calculateGroupPadding(o._screenHeight),o._calculateColumnsHeaderPadding()},_setHeight:function(e){var t,n=this.heightContainer;if(n?t=n.offsetHeight:n=this.heightContainer=C(this.content[0],"k-height-container"),e!==t)for(n.innerHTML="";e>0;){var i=Math.min(e,25e4);C(n).style.height=i+"px",e-=i}},_getter:function(){var e=null,t=this.dataSource,n=t.skip(),i=this.options.type,a=this.itemCount,r={};return t.pageSize()<a&&this.mute((function(){t.pageSize(a)})),function(o,s){var l=this;if(t.inRange(s,a)){var d;if(n!==s&&this.mute((function(){t.range(s,a),n=s})),"group"===i){if(!r[s])for(var u=r[s]=[],c=t.view(),p=0,h=c.length;p<h;p++)for(var f=c[p],m=0,g=f.items.length;m<g;m++)u.push({item:f.items[m],group:f.value});d=r[s][o-s]}else d=t.view()[o-s];return d}return e!==s&&(e=s,n=s,l._getterDeferred&&l._getterDeferred.reject(),l._getterDeferred=l.deferredRange(s),l._getterDeferred.then((function(){var e=l._indexConstraint(l.content[0].scrollTop);l._getterDeferred=null,s<=e&&e<=s+a&&(l._fetching=!0,t.range(s,a))}))),null}},_fixedHeader:function(e,t){var n=this.currentVisibleGroup,i=this.options.itemHeight,a=Math.floor((e-t.top)/i),r=t.items[a];if(r&&r.item){var o=r.group;if(o!==n){var s=o||"";this.header.html(this.templates.fixedGroupTemplate(s)),this.currentVisibleGroup=o}}return t},_itemMapper:function(e,t,n){var i=this.options.type,a=this.options.itemHeight,r=this._focusedIndex,o=!1,s=!1,l=!1,d=null,u=this._valueGetter;if("group"===i&&(e&&(l=0===t||!1!==this._currentGroup&&this._currentGroup!==e.group,this._currentGroup=e.group),d=e?e.group:null,e=e?e.item:null),"dataItem"===this.options.mapValueTo&&this._selectedDataItems.length&&e){for(var c=0;c<this._selectedDataItems.length;c++)if(u(this._selectedDataItems[c])===u(e)){o=!0;break}}else if(!this.isFiltered()&&n.length&&e)for(var p=0;p<n.length;p++)if(x(e)?n[p]===e:n[p]===u(e)){n.splice(p,1),o=!0;break}return r===t&&(s=!0),{item:e||null,group:d,newGroup:l,selected:o,current:s,index:t,top:t*a}},_range:function(e){var t,n=this.itemCount,i=this._values.slice(),a=[];this._view={},this._currentGroup=!1;for(var r=e,o=e+n;r<o;r++)t=this._itemMapper(this.getter(r,e),r,i),a[a.length-1]&&(a[a.length-1].isLastGroupedItem=t.newGroup),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 e=this._screenHeight,t=function(e,t){var n=(e.listScreens-1-e.threshold)*t,i=e.threshold*t;return function(e,t,a){return t>a?t-e.top<n:0===e.top||t-e.top>i}}(this.options,e);return function(e,n){var i=this.result,a=this._lastScrollTop;return!n&&i&&t(i,e,a)||(i=this._getDataItemsCollection(e,a)),this._lastScrollTop=e,this.result=i,i}.bind(this)},_whenChanged:function(e,t){var n;return function(i){var a=e(i);a!==n&&(n=a,t(a,i))}},_reorderList:function(t,i){var a,r,o=this,s=t.length,l=-1/0;return i=(a=i,r=this.templates,function(t,i){for(var o=0,s=t.length;o<s;o++)a(t[o],i[o],r),i[o].item&&this.trigger(g,{item:e(t[o]),data:i[o].item,ns:n.ui})}).bind(this),function(e,n,a){var r,d,u=n-l;a||Math.abs(u)>=s?(r=t,d=e):(r=function(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}(t,u),d=u>0?e.slice(-u):e.slice(0,-u)),i(r,d,o.bound()),l=n}},_bufferSizes:function(){var e,t,n,i=this.options;return e=this._screenHeight,t=i.listScreens,n=i.oppositeBuffer,{down:e*n,up:e*(t-1-n)}},_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(){var e=this.options.columns&&this.options.columns.length?l:s;this.options.selectable&&(this._selectProxy=this._clickHandler.bind(this),this.element.on("click.VirtualList","."+e,this._selectProxy))},getElementIndex:function(e){return e instanceof jQuery?parseInt(e.attr("data-offset-index"),10):t},_getIndecies:function(e){var t,n=[];if("function"==typeof e){t=this.dataSource.flatView();for(var i=0;i<t.length;i++)if(e(t[i])){n.push(i);break}}"number"==typeof e&&n.push(e);var a=this.getElementIndex(e);return isNaN(a)||n.push(a),e instanceof Array&&(n=e),n},_deselect:function(n){var i,a,r,o=[],s=this._selectedIndexes,l=this._selectedDataItems,d=0,c=this.options.selectable,p=0,h=this._valueGetter,f=null;if(n=n.slice(),!0!==c&&n.length){if("multiple"===c)for(var m=0;m<n.length;m++){if(f=null,d=e.inArray(n[m],s),a=this.dataItemByIndex(n[m]),-1===d&&a)for(var g=0;g<l.length;g++)(x(a)?l[g]===a:h(l[g])===h(a))&&(r=this._getElementByIndex(n[m]),f=this._deselectSingleItem(r,g,n[m],p));else(i=s[d])!==t&&(r=this._getElementByIndex(i),f=this._deselectSingleItem(r,d,i,p));f&&(n.splice(m,1),o.push(f),p++,m--)}}else{for(var v=0;v<s.length;v++)s[v]!==t?this._getElementByIndex(s[v]).removeClass(u):l[v]&&this._getElementByDataItem(l[v]).removeClass(u),o.push({index:s[v],position:v,dataItem:l[v]});this._values=[],this._selectedDataItems=[],this._selectedIndexes=[]}return{indices:n,removed:o}},_deselectSingleItem:function(e,t,n,i){if(e.hasClass(u))return e.removeClass(u),this._values.splice(t,1),this._selectedIndexes.splice(t,1),{index:n,position:t+i,dataItem:this._selectedDataItems.splice(t,1)[0]}},_deselectCurrentValues:function(t){var n,i,a,r,o=this.element[0].children,s=this._values,l=[],d=0;if("multiple"!==this.options.selectable||!this.isFiltered())return[];if(-1===t[0])return e(o).removeClass(u),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(a=-1,i=t[d],this.dataItemByIndex(i)&&(n=this._valueGetter(this.dataItemByIndex(i))),r=0;r<s.length;r++)if(n==s[r]){a=r;break}a>-1&&(l.push(this.removeAt(a)),e(o[i]).removeClass(u))}return l},_getSkip:function(e,t){return((e<t?1:Math.floor(e/t)+1)-1)*t},_select:function(t){var n,i,a=this,r="multiple"!==this.options.selectable,o=this.dataSource,s=this.itemCount,l=this._valueGetter,d=[];return r&&(a._selectedIndexes=[],a._selectedDataItems=[],a._values=[]),i=o.skip(),e.each(t,(function(e,t){var r=a._getSkip(t,s);a.mute((function(){o.range(r,s),n=a._findDataItem(o.view(),[t-r]),a._selectedIndexes.push(t),a._selectedDataItems.push(n),a._values.push(x(n)?n:l(n)),d.push({index:t,dataItem:n}),a._getElementByIndex(t).addClass(u),o.range(i,s)}))})),a._values=a._checkValuesOrder(a._values),d},_clickHandler:function(t){var n=e(t.currentTarget);!t.isDefaultPrevented()&&n.attr("data-uid")&&this.trigger(f,{item:n})},_buildValueGetter:function(){this._valueGetter=n.getter(this.options.dataValueField)},_calculateGroupPadding:function(e){var t=this.items().first(),i=this.header,a=0;i[0]&&"none"!==i[0].style.display&&("auto"!==e&&(a=n.support.scrollbar()),a+=parseFloat(t.css("border-right-width"),10)+parseFloat(t.children(".k-group").css("right"),10),i.css("padding-right",a))},_calculateColumnsHeaderPadding:function(){if(this.options.columns&&this.options.columns.length){var e=n.support.isRtl(this.wrapper),t=n.support.scrollbar(),i=this.content.parent().parent().find(".k-table-header"),a=this.dataSource.total();i.css(e?"padding-left":"padding-right",a?t:0)}}});n.ui.VirtualList=I,n.ui.plugin(I)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.Class;n.html=n.html||{};var a=i.extend({init:function(t,n){this.element=e(t),delete(n=n||{}).name,this._initOptions(n)},options:{stylingOptions:[]},_addClasses:function(){var e=this,t=e.options,i=t.stylingOptions,a=e.wrapper.data("added-classes");i=i.map((function(e){var i;return"themeColor"!==e||(i=n.cssProperties.getValidClass({widget:t.name,propName:"fillMode",value:t.fillMode}))&&0!==i.length?n.cssProperties.getValidClass({widget:t.name,propName:e,value:t[e],fill:t.fillMode}):""})),a&&e.wrapper.removeClass(a.join(" ")),e.wrapper.data("added-classes",i),e.wrapper.addClass(i.join(" "))},html:function(){return this.wrapper[0].outerHTML}});e.extend(n.html,{HTMLBase:a})}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.html.HTMLBase,a="k-button-icon",r=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.wrapper=n.element.addClass("k-button"),n.element.attr("type")||n.element.attr("type",n.options.type),n._addClasses(),n.iconElement(),n._textElement()},options:{name:"HTMLButton",type:"button",icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base",stylingOptions:["size","rounded","fillMode","themeColor"]},iconElement:function(){var t,i,r,o=this,s=o.element,l=o.options,d=l.icon,u=l.iconClass,c=l.spriteCssClass,p=l.imageUrl;(c||p||d||u)&&(r=!0,s.contents().filter((function(){return!e(this).hasClass("k-sprite")&&!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")})).each((function(e,t){(1==t.nodeType||3==t.nodeType&&n.trim(t.nodeValue).length>0)&&(r=!1)}))),r&&o.element.addClass("k-icon-button"),p?((i=s.children("img.k-image").first())[0]||(i=e('<img alt="icon" class="k-image" />').prependTo(s)),i.attr("src",p),i.addClass(a)):d||u?((t=s.children("span.k-icon").first())[0]||(t=e("<span></span>").prependTo(s)),t.attr("class",d?"k-icon k-i-"+d:u),t.addClass(a)):c&&((t=s.children("span.k-sprite").first())[0]||(t=e('<span class="k-sprite"></span>').prependTo(s)),t.addClass(c+" "+a))},_textElement:function(){this.element.contents().filter((function(){return!(e(this).hasClass(a)||e(this).hasClass("k-sprite")||e(this).hasClass("k-icon")||e(this).hasClass("k-image"))})).each((function(e,t){if(1==t.nodeType||3==t.nodeType&&n.trim(t.nodeValue).length>0){if(3===t.nodeType){var i=document.createElement("span");t.parentNode.insertBefore(i,t),i.appendChild(t),t=i}t.classList.add("k-button-text")}}))}});e.extend(n.html,{renderButton:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("<button></button>")),new r(n,i).html()},HTMLButton:r}),n.cssProperties.registerPrefix("HTMLButton","k-button-"),n.cssProperties.registerValues("HTMLButton",[{prop:"fillMode",values:n.cssProperties.fillModeValues.concat(["link"])},{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n.html,r=i.List,o=i.Select,s=n.caret,l=n.support,d=l.placeholder,u=n._activeElement,c=n.keys,p=".kendoComboBox",h=p+"FocusEvent",f="click"+p,m="mousedown"+p,g="disabled",v="readonly",_="change",b="k-focus",k="k-disabled",w="aria-disabled",y="aria-readonly",x="filter",C="accept",T="rebind",S=/(\r\n|\n|\r)/gm,I=[16,17,18,19,20,33,34,37,39,45,91,92,144,145],D=o.extend({init:function(t,i){var a,r=this;r.ns=p,i=Array.isArray(i)?{dataSource:i}:i,o.fn.init.call(r,t,i),i=r.options,t=r.element.on("focus"+p,r._focusHandler.bind(r)),i.placeholder=i.placeholder||t.attr("placeholder"),r._reset(),r._wrapper(),r._input(),r._clearButton(),r._tabindex(r.input),r._popup(),r._dataSource(),r._ignoreCase(),r._enable(),r._attachFocusEvents(),r._oldIndex=r.selectedIndex=-1,r._initialIndex=i.index,r.requireValueMapper(r.options),r._initList(),r._cascade(),i.autoBind?r._filterSource():(!(a=i.text)&&r._isSelect&&(a=t.children(":selected").text()),a&&r._setText(a)),a||r._placeholder(),e(r.element).parents("fieldset").is(":disabled")&&r.enable(!1),n.notify(r),r._toggleCloseVisibility(),r._applyCssClasses(),i.label&&r._label(),r._aria()},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:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},virtual:!1,template:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,syncValueAndText:!0,autoWidth:!1,popup:null,size:"medium",fillMode:"solid",rounded:"medium",label:null},events:["open","close",_,"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(p),e.input.off(h),e.element.off(p),e.wrapper.off(p),clearTimeout(e._pasteTimeout),e._arrow.off(f+" "+m),e._clear.off(f+" "+m),o.fn.destroy.call(e)},_isValueChanged:function(e){return e!==r.unifyType(this._old,typeof e)&&e!==r.unifyType(this._oldText,typeof e)},_change:function(){var e=this,t=e.text(),n=t&&t!==e._oldText&&t!==e.options.placeholder,i=e.selectedIndex,a=-1===i;if(!e.options.syncValueAndText&&!e.value()&&a&&n)return e._old="",e._oldIndex=i,e._oldText=t,e._typing||e.element.trigger(_),e.trigger(_),void(e._typing=!1);o.fn._change.call(e),e._oldText=e.text&&e.text(),e._toggleCloseVisibility()},_attachFocusEvents:function(){var e=this;e.input.on("focus"+h,e._inputFocus.bind(e)).on("focusout"+h,e._inputFocusout.bind(e))},_focusHandler:function(e){e.target===this.element[0]&&this.input.trigger("focus")},_arrowClick:function(){this._toggle()},_inputFocus:function(){this.wrapper.addClass(b),this._placeholder(!1)},_inputFocusout:function(t){var n=this,i=n.value(),a=!e(t.relatedTarget).closest(".k-clear-value").length;n._userTriggered=!0,n.wrapper.removeClass(b),clearTimeout(n._typingTimeout),n._typingTimeout=null,a&&n.text(n.text());var r=n._focus(),o=this.listView.dataItemByIndex(this.listView.getElementIndex(r));i!==n.value()&&n.trigger("select",{dataItem:o,item:r})?n.value(i):(n._placeholder(),n._valueBeforeCascade=n._old,a&&(n._blur(),n.element.trigger("blur")))},_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,a=t.wrapper.off(p),r=t.element.add(t.input.off(p)),o=t._arrow.off(f+" "+m),s=t._clear;i||n?(a.addClass(n?k:"").removeClass(n?"":k),r.attr(g,n).attr(v,i).attr(w,n).attr(y,i)):(a.removeClass(k).on("mouseenter.kendoComboBox mouseleave.kendoComboBox",t._toggleHover),r.prop(g,!1).prop(v,!1).attr(w,!1).attr(y,!1),o.on(f,t._arrowClick.bind(t)).on(m,(function(e){e.preventDefault()})),s.on(f+" touchend"+p,t._clearValue.bind(t)),t.input.on("keydown"+p,t._keydown.bind(t)).on("input"+p,t._search.bind(t)).on("paste"+p,t._inputPaste.bind(t)),t.wrapper.on(f+p,t._focusHandler.bind(t))),t._toggleCloseVisibility()},open:function(){var e=this,t=e._state,n=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0,i=!e.ul.find(e.listView.focus()).length;e.popup.visible()||(!e.listView.bound()&&t!==x||t===C?(e._open=!0,e._state=T,1!==e.options.minLength&&!n||n&&e.value()&&-1===e.selectedIndex?(e.refresh(),e._openPopup(),this.options.virtual||e.listView.bound(!1)):e._filterSource()):e._allowOpening()&&(e.popup._hovered=!0,e._openPopup(),e.options.virtual?e._focusItem():i&&e.options.highlightFirst&&e.listView.focus(0)))},_scrollToFocusedItem:function(){var e=this.listView;e.scrollToIndex(e.getElementIndex(e.focus()))},_openPopup:function(){this.popup.one("activate",this._scrollToFocusedItem.bind(this)),this.popup.open()},_updateSelectionState:function(){var e=this,n=e.options.text,i=e.options.value;e.listView.isFiltered()||(-1===e.selectedIndex?(n!==t&&null!==n||(n=i),e._accessor(i),e.input.val(n||e.input.val()),e._placeholder()):-1===e._oldIndex&&(e._oldIndex=e.selectedIndex))},_buildOptions:function(e){var n=this;if(n._isSelect){var i=n._customOption;n._state===T&&(n._state=""),n._customOption=t,n._options(e,"",n.value()),i&&i[0].selected&&!n.listView._emptySearch&&n._custom(i.val())}},_updateSelection:function(){var t=this,n=t.listView,i=t._initialIndex,a=null!==i&&i>-1;if(t._state===x)e(n.focus()).removeClass("k-selected");else if(!t._fetch){n.value().length||(a?t.select(i):t._accessor()&&n.value(t._accessor())),t._initialIndex=null;var r=n.selectedDataItems()[0];r&&(t._value(r)!==t.value()?t._custom(t._value(r)):t._value(r)!==t.element[0].value&&t._accessor(t._value(r)),t.text()&&t.text()!==t._text(r)&&t._selectValue(r))}},_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]===u(),i=e.dataSource.flatView(),a=e.listView.skip(),r=i.length,o=e.dataSource._group?e.dataSource._group.length:0,s=a===t||0===a;e._presetValue=!1,e._renderFooter(),e._renderNoData(),e._toggleNoData(!r),e._toggleHeader(!!o&&!!r),e._resizePopup(),e.popup.position(),e._buildOptions(i),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 this.dataSource.total()||e||(e=-1),e},_select:function(e,t){var n=this;return-1===(e=n._get(e))&&(n.input[0].value="",n._accessor("")),n.listView.select(e).done((function(){t||n._state!==x||(n._state=C),n._toggleCloseVisibility()}))},_selectValue:function(e){var n=this.listView.select(),i="",a="";(n=n[n.length-1])===t&&(n=-1),this.selectedIndex=n,this.listView.isFiltered()&&-1!==n&&(this._valueBeforeCascade=this._old),-1!==n||e?((e||0===e)&&(i=this._dataValue(e),a=this._text(e)),null===i&&(i="")):(this.options.syncValueAndText?i=a=this.options.dataTextField===this.options.dataValueField?this._accessor():this.input[0].value:a=this.text(),this.listView.focus(-1)),this._setDomInputValue(a),this._accessor(i!==t?i:a,n),this._placeholder(),this._triggerCascade()},_setDomInputValue:function(e){var t,n=this,i=s(this.input);if(i&&i.length&&(t=i[0]),this._prev=this.input[0].value=e,t&&-1===this.selectedIndex){var a=l.mobileOS;a.wp||a.android?setTimeout((function(){n.input[0].setSelectionRange(t,t)}),0):this.input[0].setSelectionRange(t,t)}},refresh:function(){this.listView.refresh()},_toggleCloseVisibility:function(){var e=this.element.is(":disabled")||this.element.is("[readonly]");this.text()&&!e?this._showClear():this._hideClear()},suggest:function(e){var n,i=this,a=i.input[0],o=i.text(),l=s(a)[0],d=i._last,p=i.dataSource.options.accentFoldingFiltering;d!=c.BACKSPACE&&d!=c.DELETE?("string"!=typeof(e=e||"")&&(e[0]&&(e=i.dataSource.view()[r.inArray(e[0],i.ul[0])]),e=e?i._text(e):""),l<=0&&(l=(p?o.toLocaleLowerCase(p):o.toLowerCase()).indexOf(p?e.toLocaleLowerCase(p):e.toLowerCase())+1),e?(e=e.toString(),(n=(p?e.toLocaleLowerCase(p):e.toLowerCase()).indexOf(p?o.toLocaleLowerCase(p):o.toLowerCase()))>-1&&(o+=e.substring(n+o.length))):o=o.substring(0,l),o.length===l&&e||(a.value=o,a===u()&&s(a,l,o.length))):i._last=t},text:function(e){e=null===e?"":e;var n,i,a=this,o=a.input[0],s=a.options.ignoreCase,l=e;if(e===t)return o.value;!1!==a.options.autoBind||a.listView.bound()?(n=a.dataItem())&&a._text(n).replace&&a._text(n).replace(S,"")===e&&(i=a._value(n))===r.unifyType(a._old,typeof i)?a._triggerCascade():(s&&(l=l.toLowerCase()),a.dataItem()&&a._text(a.dataItem())===e||(a._select((function(e){return e=a._text(e),s&&(e=(e+"").toLowerCase()),e===l})).done((function(){a.selectedIndex<0&&(o.value=e,a.options.syncValueAndText&&a._accessor(e),a._cascadeTriggered=!0,a._triggerCascade(),a._refreshFloatingLabel()),a._prev=o.value})),a._toggleCloseVisibility())):a._setText(e)},toggle:function(e){this._toggle(e,!0)},value:function(e){var n=this,i=n.options,a=n.listView;if(e===t)return(e=n._accessor()||n.listView.value()[0])===t||null===e?"":e;n.requireValueMapper(n.options,e),n.trigger("set",{value:e}),(e!==i.value||n.input.val()!==i.text||n.options.cascadeFrom)&&(n._accessor(e),n._isFilterEnabled()&&a.bound()&&a.isFiltered()?n._clearFilter():n._fetchData(),a.value(e).done((function(){-1!==n.selectedIndex||a._selectedDataItems&&a._selectedDataItems.length||(n._accessor(e),n.input.val(e),n._placeholder(!0)),n._userTriggered?n._old=n._accessor():n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._prev=n._oldText=n.input.val(),n._state===x&&(n._state=C),n._toggleCloseVisibility(),n._refreshFloatingLabel()})))},_hideBusy:function(){var e=this;clearTimeout(e._busy),e._arrowIcon.removeClass("k-i-loading k-input-loading-icon"),e._focused.attr("aria-busy",!1),e._busy=null,e._toggleCloseVisibility()},_click:function(e){var t=this,n=e.item,i=t.listView.dataItemByIndex(t.listView.getElementIndex(n)),a=!0;e.preventDefault(),i&&((a=t._value(i)!==r.unifyType(t.value(),typeof t._value(i)))||t.input.val(t._text(i))),a&&t.trigger("select",{dataItem:i,item:n})?t.close():(t._userTriggered=!0,t._select(n).done((function(){t._blur()})))},_syncValueAndText:function(){return this.options.syncValueAndText},_inputValue:function(){return this.text()},_searchByWord:function(e){var n=this,i=n.options,a=n.dataSource,r=i.ignoreCase;if(r&&(e=e.toLowerCase()),n.ul[0].firstChild){this.listView.focus(this._get((function(i){var a=n._text(i);if(a!==t)return(""==(a+="")||""!==e)&&(r&&(a=a.toLowerCase()),0===a.indexOf(e))})));var o=this.listView.focus();o&&(i.suggest&&n.suggest(o),this.open()),this.options.highlightFirst&&!e&&this.listView.focusFirst()}else a.one(_,(function(){a.view()[0]&&n.search(e)})).fetch()},_input:function(){var e,t,n,i=this,r=i.element.removeClass("k-input-inner")[0],o=r.accessKey,s=i.wrapper,l="input.k-input-inner",u=r.name||"",c=i.options;u&&(u='name="'+u+'_input" '),(e=s.find(l))[0]||(n=a.renderButton('<button type="button" class="k-input-button" aria-label="expand combobox"></button>',{icon:"arrow-s",size:c.size,fillMode:c.fillMode,shape:"none",rounded:"none"}),s.append("<input "+u+'class="k-input-inner" type="text" autocomplete="off"/>').append(n).append(i.element),e=s.find(l)),e[0].style.cssText=r.style.cssText,e[0].title=r.title,(t=parseInt(this.element.prop("maxlength")||this.element.attr("maxlength"),10))>-1&&(e[0].maxLength=t),e.addClass(r.className).css({width:"",height:r.style.height,position:""}).attr({role:"combobox","aria-expanded":!1}).show(),d&&e.attr("placeholder",i.options.placeholder),o&&(r.accessKey="",e[0].accessKey=o),i._focused=i.input=e,i._arrow=s.find(".k-input-button").attr({role:"button",tabIndex:-1}),i._arrowIcon=i._arrow.find(".k-icon")},_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,i=t.options.dataTextField||"text",a=n>=112&&n<=135,o=I.indexOf(n)>-1;if(t._last=n,clearTimeout(t._typingTimeout),t._typingTimeout=null,n===c.HOME)t._firstItem();else if(n===c.END)t._lastItem();else if(n===c.ENTER||n===c.TAB&&t.popup.visible()){var s=t.listView.focus(),l=t.dataItem(),d=!0;if(t.popup.visible()||l&&t.text()===t._text(l)||(s=null),s){if(t.popup.visible()&&e.preventDefault(),(l=t.listView.dataItemByIndex(t.listView.getElementIndex(s)))&&(d=t._value(l)!==r.unifyType(t.value(),typeof t._value(l))),d&&t.trigger("select",{dataItem:l,item:s}))return;t._userTriggered=!0,t._select(s).done((function(){t._blur(),t._valueBeforeCascade=t._old=t.value()}))}else(t._syncValueAndText()||t._isSelect)&&(t.dataItem()&&t.dataItem()[i]===t.input.val()||t._accessor(t.input.val())),t.options.highlightFirst?(t.listView.value(t.input.val()),t._blur()):t._oldText=t.text()}else n==c.TAB||t._move(e)||o||a||e.ctrlKey?n===c.ESC&&!t.popup.visible()&&t.text()&&t._clearValue():t._search()},_placeholder:function(e){if(!d){var n,i=this,a=i.input,r=i.options.placeholder;if(r){if(n=i.value(),e===t&&(e=!n),a.toggleClass("k-readonly",e),!e){if(n)return;r=""}a.val(r),r||a[0]!==u()||s(a[0],0,0)}}},_search:function(){var e=this;clearTimeout(e._typingTimeout),e._typingTimeout=setTimeout((function(){var n=e.text();""!==n&&e._prev!==n?(e._prev=n,"none"===e.options.filter&&e.options.virtual&&e.listView.select(-1),e.search(n),e._toggleCloseVisibility()):""===n&&""!==e._prev&&e._prev!==t&&(e._clearValue(),e._open=!0,e._state=T),e._typingTimeout=null}),e.options.delay)},_setText:function(e){this.input.val(e),this._prev=e},_wrapper:function(){var e=this.element,t=e.parent();t.is("span.k-input")||((t=e.hide().wrap("<span />").parent())[0].style.cssText=e[0].style.cssText),this.wrapper=t.addClass("k-input k-combobox").addClass(e[0].className).removeClass("input-validation-error").css("display","")},_clearSelection:function(e,t){var n=e.value(),i=n&&-1===e.selectedIndex;-1==this.selectedIndex&&this.value()||(t||!n||i)&&(this.options.value="",this.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()},_clearText:function(){this._old=this.value(),this.text("")},_clearValue:function(){o.fn._clearValue.call(this),this.input.trigger("focus")}});i.plugin(D),n.cssProperties.registerPrefix("ComboBox","k-input-"),n.cssProperties.registerValues("ComboBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=Math.abs,r="aria-selected",o="k-selected",s="k-selecting",l="k-selectable",d="change",u="unselect",c="k-unselecting",p=n.support.browser.msie,h=!1,f=e.extend;!function(e){e('<div class="parent"><span></span></div>').on("click",">*",(function(){h=!0})).find("span").trigger("click").end().off()}(e);var m=i.extend({init:function(t,a){var r,o,s=this;i.fn.init.call(s,t,a),s._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>"),s._lastActive=null,s.element.addClass(l),s.relatedTarget=s.options.relatedTarget,r=s.options.multiple,o=s.options.dragToSelect,s.userEvents=new n.UserEvents(s.element,{global:!0,allowSelection:!0,filter:(h?"":".k-selectable ")+s.options.filter,tap:s._tap.bind(s),touchAction:r?"none":"pan-x pan-y"}),r&&(o&&s.userEvents.bind("start",s._start.bind(s)).bind("move",s._move.bind(s)).bind("end",s._end.bind(s)),s.userEvents.bind("select",s._select.bind(s)))},events:[d,u],options:{name:"Selectable",filter:">*",inputSelectors:"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,label.k-checkbox-label.k-no-text,.k-icon.k-i-collapse,.k-icon.k-i-expand,span.k-numeric-wrap,.k-focusable",multiple:!1,dragToSelect:!0,relatedTarget:e.noop,ignoreOverlapped:!1,addIdToRanges:!1},_isElement:function(e){var t,n=this.element,i=n.length,a=!1;for(e=e[0],t=0;t<i;t++)if(n[t]===e){a=!0;break}return a},_tap:function(t){var n,i=e(t.target),a=this,r=t.event.ctrlKey||t.event.metaKey,s=a.options.multiple,u=s&&t.event.shiftKey,c=a.options.selectedClass||o,p=t.event.which,h=t.event.button;!a._isElement(i.closest("."+l))||p&&3==p||h&&2==h||this._allowSelection(t.event.target)&&(n=i.hasClass(c),i=i.add(a.relatedTarget(i)),s?u?(a._lastRange&&g(a._lastRange,i)||(a.selectRange(a._firstSelectee(),i,t),a._notify(d,t)),a._lastRange=i):(a._lastRange=null,n&&r?(a._unselect(i),a._notify(d,t)):r?(a.value(i,t),a._notify(d,t)):(!n||a.value().length>1)&&(a.clear(),a.value(i,t),a._notify(d,t)),a._lastActive=a._downTarget=i):n&&r?(a._unselect(i),a._notify(d,t)):n||(a.clear(),a.value(i,t),a._notify(d,t)))},_start:function(t){var n,i=this,a=e(t.target),r=i.options.selectedClass||o,s=a.hasClass(r),d=t.event.ctrlKey||t.event.metaKey;this._allowSelection(t.event.target)&&(i._downTarget=a,i._isElement(a.closest("."+l))?(i.options.useAllItems?i._items=i.element.find(i.options.filter):(n=a.closest(i.element),i._items=n.find(i.options.filter)),t.sender.capture(),i._marquee.appendTo(document.body).css({left:t.x.client+1,top:t.y.client+1,width:0,height:0}),d||i.clear(),a=a.add(i.relatedTarget(a)),s&&(i._selectElement(a,!0),d&&a.addClass(c))):i.userEvents.cancel())},_move:function(e){var t={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:a(e.x.initialDelta),height:a(e.y.initialDelta)};this._marquee.css(t),this._invalidateSelectables(t,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(t){var i=this,a=n.attr("range-selected"),r=n.guid();i._marquee.remove(),i._unselect(i.element.find(i.options.filter+"."+c)).removeClass(c);var o=i.element.find(i.options.filter+"."+s);if(o=o.add(i.relatedTarget(o)),i.options.addIdToRanges)for(var l=0;l<i._currentlyActive.length;l++)e(i._currentlyActive[l]).attr(a,r);i._lastRange&&g(i._lastRange,o)||(i.value(o,t),i._notify(d,t)),i._lastRange=o,i._lastActive=i._downTarget,i._items=null},_invalidateSelectables:function(e,t){var n,i,a,r,l=this._downTarget[0],d=this._items,u=this.options.selectedClass||o;for(this._currentlyActive=[],n=0,i=d.length;n<i;n++)a=(r=d.eq(n)).add(this.relatedTarget(r)),v(r,e)?(r.hasClass(u)?t&&l!==r[0]&&a.removeClass(u).addClass(c):r.hasClass(s)||r.hasClass(c)||this._collidesWithActiveElement(a,e)||a.addClass(s),this._currentlyActive.push(a[0])):r.hasClass(s)?a.removeClass(s):t&&r.hasClass(c)&&a.removeClass(c).addClass(u)},_collidesWithActiveElement:function(e,t){if(!this.options.ignoreOverlapped)return!1;var i,a=this._currentlyActive,r=e[0].getBoundingClientRect(),o=!1,s=n.support.isRtl(e)?"right":"left",l={};t.right=t.left+t.width,t.bottom=t.top+t.height;for(var d=0;d<a.length;d++)if(_(r,i=a[d].getBoundingClientRect())){if(l[s]="left"===s?i.right:i.left,(r=f({},r,l)).left>r.right)return!0;o=!_(r,t)}return o},value:function(e){var t=this,n=t._selectElement.bind(t);if(!e)return t.element.find(t.options.filter+"."+(t.options.selectedClass||o));e.each((function(){n(this)}))},selectedRanges:function(){var t=n.attr("range-selected"),i={};return this.element.find("["+t+"]").each((function(n,a){var r=e(a).attr(t),o=i[r];o||(o=i[r]=[]),o.push(e(a))})),i},selectedSingleItems:function(){var t=this,i=n.attr("range-selected");return t.element.find(t.options.filter+"."+(t.options.selectedClass||o)+":not(["+i+"])").toArray().map((function(t){return e(t)}))},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value()).length>0?e[0]:t.element.find(t.options.filter)[0]},_selectElement:function(t,n){var i=e(t),a=this.options.selectedClass||o,l=!n&&this._notify("select",{element:t});i.removeClass(s),l||(i.addClass(a),this.options.aria&&i.attr(r,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){if(!this.trigger(u,{element:e})){var t=n.attr("range-selected");return e.removeClass(this.options.selectedClass||o).removeAttr(t),this.options.aria&&e.attr(r,!1),e}},_select:function(t){this._allowSelection(t.event.target)&&(!p||p&&!e(n._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+"."+(this.options.selectedClass||o));this._unselect(e)},selectRange:function(t,n){var i,a,r,o=this;for(o.clear(),o.element.length>1&&(r=o.options.continuousItems()),r&&r.length||(r=o.element.find(o.options.filter)),(t=e.inArray(e(t)[0],r))>(n=e.inArray(e(n)[0],r))&&(a=t,t=n,n=a),o.options.useAllItems||(n+=o.element.length-1),i=t;i<=n;i++)o._selectElement(r[i],!0)},destroy:function(){var e=this;i.fn.destroy.call(e),e.element.off(".kendoSelectable"),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}});function g(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function v(e,t){if(!e.is(":visible"))return!1;var i=n.getOffset(e),a=t.left+t.width,r=t.top+t.height;return i.right=i.left+n._outerWidth(e),i.bottom=i.top+n._outerHeight(e),!(i.left>a||i.right<t.left||i.top>r||i.bottom<t.top)}function _(e,t){return!(e.right<=t.left||e.left>=t.right||e.bottom<=t.top||e.top>=t.bottom)}m.parseOptions=function(e){var t=e.mode||e,n="string"==typeof t&&t.toLowerCase();return{multiple:n&&n.indexOf("multiple")>-1,cell:n&&n.indexOf("cell")>-1}},n.ui.plugin(m)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.support,a=n.ui,r=a.Widget,o=n.keys,s=n.parseDate,l=n.date.adjustDST,d=n.date.weekInYear,u=n.ui.Selectable,c=n._extractFormat,p=n.template,h=n.getCulture,f=n.support.transitions,m=f?f.css+"transform-origin":"",g=p('<td class="#=data.cssClass#" role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>',{useWithBlock:!1}),v=p('<td role="gridcell" class="k-calendar-td k-out-of-range"><a class="k-link"></a></td>',{useWithBlock:!1}),_=p('<td role="gridcell" class="k-calendar-td k-out-of-range">&nbsp;</td>',{useWithBlock:!1}),b=p('<td class="k-calendar-td k-alt">#= data.weekNumber #</td>',{useWithBlock:!1}),k=n._outerWidth,w=".kendoCalendar",y="click"+w,x="id",C="slideIn",T="month",S="century",I="change",D="navigate",E="value",A="k-disabled",F="k-focus",z="k-other-month",P="td:has(.k-link)",H="td:has(.k-link):not(.k-disabled):not(.k-out-of-range)",N="k-selected",R="focus",O=i.touch?"touchstart":"mouseenter",M=i.touch?"touchstart"+w:"mouseenter"+w,B=i.touch?"touchend"+w+" touchmove"+w:"mouseleave"+w,L=864e5,V="_prevArrow",U="_nextArrow",W="aria-disabled",j="aria-selected",q="aria-label",G=e.extend,K=Date,$={month:0,year:1,decade:2,century:3},Y=".k-header, .k-calendar-header",Q=r.extend({init:function(t,i){var a,o=this;(i=i||{}).componentType=i.componentType||"classic",r.fn.init.call(o,t,i),t=o.wrapper=o.element,(i=o.options).url=n.unescape(i.url),o.options.disableDates=fe(o.options.disableDates),o._templates(),o._selectable(),o._header(),o._viewWrapper(),o.options.hasFooter?o._footer(o.footer):(o._today=o.element.find("a.k-nav-today"),o._toggle()),t.addClass("k-widget k-calendar "+(i.weekNumber?" k-week-number":"")).on(M+" "+B,P,le).on("keydown.kendoCalendar","table.k-content",o._move.bind(o)).on(y+" touchend",P,(function(t){var n=t.currentTarget.firstChild,a=ge(n);-1!=n.href.indexOf("#")&&t.preventDefault(),"month"==o._view.name&&o.options.disableDates(a)||"month"==o._view.name&&"single"!=i.selectable||o._click(e(n))})).on("mouseup"+w,"table.k-content, .k-footer",(function(){o._focusView(!1!==o.options.focusOnNav)})).attr(x),o._isMultipleSelection()&&o.options.weekNumber&&t.on(y,"td:not(:has(.k-link))",(function(t){var n=e(t.currentTarget).closest("tr").find(H).first(),i=o.selectable._lastActive=e(t.currentTarget).closest("tr").find(H).last();o.selectable.selectRange(n,i),o.selectable.trigger(I,{event:t}),o._current=o._value=ge(i.find("a")),o._setCurrent(o._current)})),pe(i),a=s(i.value,i.format,i.culture),o._selectDates=[],o._index=$[i.start],o._current=new K(+ne(a,i.min,i.max)),o._addClassProxy=function(){if(o._active=!0,o._cell.hasClass(A)){var e=o._view.toDateString(te());o._cell=o._cellByDate(e)}o._cell.addClass(F)},o._removeClassProxy=function(){o._active=!1,o._cell&&o._cell.removeClass(F)},o.value(a),o._isMultipleSelection()&&i.selectDates.length>0&&o.selectDates(i.selectDates),n.notify(o)},options:{name:"Calendar",value:null,min:new K(1900,0,1),max:new K(2099,11,31),dates:[],disableDates:null,url:"",culture:"",footer:"",format:"",month:{},weekNumber:!1,selectable:"single",selectDates:[],start:T,depth:T,size:"medium",animation:{horizontal:{effects:C,reverse:!0,duration:500,divisor:2},vertical:{effects:"zoomIn",duration:400}},messages:{weekColumnHeader:"",today:"Today",navigateTo:"Navigate to ",parentViews:{month:"year view",year:"decade view",decade:"century view"}},componentType:"classic"},events:[I,D],componentTypes:{classic:{header:{template:'<div class="k-header k-hstack"><a tabindex="-1" href="\\#" #=actionAttr#="prev" role="button" class="k-nav-prev k-button #=size# k-rounded-md k-button-flat k-button-flat-base k-icon-button" aria-label="Previous"><span class="k-button-icon k-icon k-i-arrow-60-left"></span></a><a tabindex="-1" href="\\#" #=actionAttr#="nav-up" role="button" id="nav-up" class="k-nav-fast k-button #=size# k-rounded-md k-button-flat k-button-flat-base k-flex"></a><a tabindex="-1" href="\\#" #=actionAttr#="next" role="button" class="k-nav-next k-button #=size# k-rounded-md k-button-flat k-button-flat-base k-icon-button" aria-label="Next"><span class="k-icon k-i-arrow-60-right"></span></a></div>'},hasFooter:!0,linksSelector:".k-button",contentClasses:"k-calendar-table k-content"},modern:{header:{template:'<div class="k-calendar-header k-hstack"><a href="\\#" #=actionAttr#="nav-up" id="nav-up" role="button" class="k-calendar-title k-title k-button #=size# k-rounded-md k-button-flat k-button-flat-base "></a><span class="k-spacer"></span><span class="k-calendar-nav k-hstack"><a tabindex="-1" #=actionAttr#="prev" class="k-button #=size# k-rounded-md k-button-flat k-button-flat-base k-icon-button k-prev-view"><span class="k-button-icon k-icon k-i-arrow-60-left"></span></a><a tabindex="-1" #=actionAttr#="today" class="k-nav-today">#=messages.today#</a><a tabindex="-1" #=actionAttr#="next" class="k-button #=size# k-rounded-md k-button-flat k-button-flat-base k-icon-button k-next-view"><span class="k-button-icon k-icon k-i-arrow-60-right"></span></a></span></div>'},hasFooter:!1,linksSelector:".k-button",contentClasses:"k-calendar-table k-content k-calendar-content"}},setOptions:function(t){var n=this;pe(t),t.disableDates=fe(t.disableDates),n._destroySelectable(),t.messages&&(t.messages=e.extend({},!0,n.options.messages,t.messages)),r.fn.setOptions.call(n,t),n._templates(),n._selectable(),n._viewWrapper(),n.options.hasFooter?n._footer(n.footer):(n.element.find(".k-footer").hide(),n._toggle()),n._index=$[n.options.start],n.navigate(),t.weekNumber&&n.element.addClass("k-week-number")},destroy:function(){var e=this,t=e._today;e.element.off(w),e._title.off(w),e._prevArrow.off(w),e._nextArrow.off(w),e._destroySelectable(),n.destroy(e._table),t&&n.destroy(t.off(w)),r.fn.destroy.call(e)},current:function(){return this._current},view:function(){return this._view},focus:function(e){e=e||this._table,this._bindTable(e),e.trigger("focus")},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},navigateToPast:function(){this._navigate(V,-1)},navigateToFuture:function(){this._navigate(U,1)},navigateUp:function(){var e=this,t=e._index;e._title.hasClass(A)||e.navigate(e._current,++t)},navigateDown:function(e){var t=this,n=t._index,i=t.options.depth;e&&(n!==$[i]?t.navigate(e,--n):me(t._value,t._current)&&me(t._value,e)||(t.value(e),t.trigger(I)))},navigate:function(n,i){i=isNaN(i)?$[i]:i;var a,r,o,s,l=this,d=l.options,u=d.culture,c=d.min,p=d.max,h=l._title,f=l._table,m=l._oldTable,g=l._current,v=n&&+n>+g,_=i!==t&&i!==l._index,b=l.element.children(".k-calendar-view");if(n||(n=g),l._current=n=new K(+ne(n,c,p)),i===t?i=l._index:l._index=i,l._view=r=X.views[i],o=r.compare,s=i===$.century,h.toggleClass(A,s).attr(W,s),s=o(n,c)<1,l._prevArrow.toggleClass(A,s).attr(W,s),s=o(n,p)>-1,l._nextArrow.toggleClass(A,s).attr(W,s),f&&m&&m.data("animating")&&(m.kendoStop(!0,!0),f.kendoStop(!0,!0)),l._oldTable=f,!f||l._changeView){h.html(r.title(n,c,p,u)),l.options.messages.parentViews&&l._view.name!==S?h.attr("title",l.options.messages.navigateTo+l.options.messages.parentViews[l._view.name]):h.removeAttr("title"),l._table=a=e(r.content(G({min:c,max:p,date:n,url:d.url,dates:d.dates,format:d.format,otherMonth:!0,culture:u,disableDates:d.disableDates,isWeekColumnVisible:d.weekNumber,messages:d.messages,contentClasses:l.options.contentClasses},l[r.name]))),l._aria(),he(a,r.name);var k=f&&f.data("start")===a.data("start");l._animate({from:f,to:a,vertical:_,future:v,replace:k}),b.removeClass("k-calendar-monthview k-calendar-yearview k-calendar-decadeview k-calendar-centuryview"),b.addClass("k-calendar-"+r.name+"view"),l.trigger(D),l._focus(n)}i===$[d.depth]&&l._selectDates.length>0&&l._visualizeSelectedDatesInView(),"single"===l.options.selectable&&i===$[d.depth]&&l._value&&!l.options.disableDates(l._value)&&l._selectCell(l._value),l._setCurrent(n),!f&&l._cell&&l._cell.removeClass(F),l._changeView=!0},selectDates:function(n){var i,a,r=this;if(n===t)return r._selectDates;a=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(a,(function(e){if(e)return+r._validateValue(new Date(e.setHours(0,0,0,0)))==+e})),r._selectDates=i.length>0?i:0===a.length?a:r._selectDates,r._visualizeSelectedDatesInView()},value:function(e){var n=this,i=n._view,a=n._view;if(e===t)return n._value;if((e=n._validateValue(e))&&n._isMultipleSelection()){var r=new Date(+e);r.setHours(0,0,0,0),n._selectDates=[r],n.selectable._lastActive=null}i&&null===e&&n._cell?n._cell.removeClass(N):(n._changeView=!e||a&&0!==a.compare(e,n._current),n.navigate(e))},_aria:function(){var e=this._table;e.attr("aria-labelledby",this._title.attr("id")),"month"===this._view.name&&"multiple"===this.options.selectable&&e.attr("aria-multiselectable","true")},_validateValue:function(e){var n=this,i=n.options,a=i.min,r=i.max;return null===e&&(n._current=ue(n._current.getFullYear(),n._current.getMonth(),n._current.getDate())),null!==(e=s(e,i.format,i.culture))&&(ie(e=new K(+e),a,r)||(e=null)),null!==e&&n.options.disableDates(new Date(+e))?n._value===t&&(n._value=null):n._value=e,n._value},_visualizeSelectedDatesInView:function(){var t=this,i={};e.each(t._selectDates,(function(e,t){i[n.calendar.views[0].toDateString(t)]=t})),t.selectable.clear();var a=t._table.find(P).filter((function(t,a){return i[e(a.firstChild).attr(n.attr(E))]}));a.length>0&&t.selectable._selectElement(a,!0)},_isMultipleSelection:function(){return"multiple"===this.options.selectable},_selectable:function(){var e=this;if(e._isMultipleSelection()){var t=e.options.selectable,n=u.parseOptions(t);e.selectable=new u(e.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:n.multiple,filter:"table.k-month:eq(0) "+H,change:e._onSelect.bind(e),relatedTarget:e._onRelatedTarget.bind(e)})}},_onRelatedTarget:function(e){var t=this;t.selectable.options.multiple&&e.is(H)&&(t._current=ge(e.find("a")),t._setCurrent(t._current))},_onSelect:function(t){var n=this,i=t;u.parseOptions(n.options.selectable).multiple?(i.event.ctrlKey||i.event.metaKey?e(i.event.currentTarget).is(H)?n._toggleSelection(e(i.event.currentTarget)):(n._cellsBySelector(H).each((function(t,i){var a=ge(e(i).find("a"));n._deselect(a)})),n._addSelectedCellsToArray()):i.event.shiftKey?n._rangeSelection(n._cell):e(i.event.currentTarget).is(P)?n.value(ge(e(i.event.currentTarget).find("a"))):(n._selectDates=[],n._addSelectedCellsToArray()),n.trigger(I)):e(i.event.currentTarget).is("td")&&!e(i.event.currentTarget).hasClass("k-selected")?e(i.event.currentTarget).addClass("k-selected"):n._click(e(i.event.currentTarget).find("a"))},_destroySelectable:function(){var e=this;e.selectable&&(e.selectable.destroy(),e.selectable=null)},_toggleSelection:function(e){var t=ge(e.find("a"));e.hasClass("k-selected")?this._selectDates.push(t):this._deselect(t)},_rangeSelection:function(e,t){var n,i=this,a=t||ge(i.selectable.value().first().find("a")),r=ge(e.find("a"));i.selectable._lastActive||i._value?a=i.selectable._lastActive?ge(i.selectable._lastActive.find("a")):new Date(+i._value):i.selectable._lastActive=t?i._cellByDate(i._view.toDateString(t),H):i.selectable.value().first(),i._selectDates=[],n=oe(a,r),se(i._selectDates,n,a,i.options.disableDates),i._visualizeSelectedDatesInView()},_cellsBySelector:function(e){return this._table.find(e)},_addSelectedCellsToArray:function(){var t=this;t.selectable.value().each((function(n,i){var a=ge(e(i.firstChild));t.options.disableDates(a)||t._selectDates.push(a)}))},_deselect:function(e){var t=this._selectDates.map(Number).indexOf(+e);-1!=t&&this._selectDates.splice(t,1)},_dateInView:function(e){var t=ge(this._cellsBySelector(H).first().find("a"));return+e<=+ge(this._cellsBySelector(H).last().find("a"))&&+e>=+t},_isNavigatable:function(e,t){var n,i=this,a=i.options.disableDates;return"month"==i._view.name?!a(e):(n=i.wrapper.find(".k-focus").index(),i.wrapper.find(".k-content td").eq(n+t).is(H)||!a(e))},_move:function(i){var a,r,s,l,d=this,u=d.options,c=i.keyCode,p=d._view,h=d._index,f=d.options.min,m=d.options.max,g=new K(+d._current),v=n.support.isRtl(d.wrapper),_=d.options.disableDates;if(i.target===d._table[0]&&(d._active=!0),c==o.RIGHT&&!v||c==o.LEFT&&v?(a=1,r=!0):c==o.LEFT&&!v||c==o.RIGHT&&v?(a=-1,r=!0):c==o.UP?(a=0===h?-7:-4,r=!0):c==o.DOWN?(a=0===h?7:4,r=!0):c==o.SPACEBAR?(a=0,r=!0):c==o.HOME||c==o.END?(l=p[s=c==o.HOME?"first":"last"](g),(g=new K(l.getFullYear(),l.getMonth(),l.getDate(),g.getHours(),g.getMinutes(),g.getSeconds(),g.getMilliseconds())).setFullYear(l.getFullYear()),r=!0):84===c&&(d._todayClick(i),r=!0),i.ctrlKey||i.metaKey){if(c==o.RIGHT&&!v||c==o.LEFT&&v)d.navigateToFuture(),r=!0;else if(c==o.LEFT&&!v||c==o.RIGHT&&v)d.navigateToPast(),r=!0;else if(c==o.UP)d.navigateUp(),r=!0;else if(c==o.DOWN)d._click(e(d._cell[0].firstChild)),r=!0;else if((c==o.ENTER||c==o.SPACEBAR)&&d._isMultipleSelection()){d._keyboardToggleSelection(i);var b=ge(e(d._cell[0]).find("a"));d._setCurrent(b)}}else i.shiftKey?(a!==t||s)&&(s||p.setDate(g,a),ie(g,f,m)||(g=ne(g,u.min,u.max)),_(g)&&(g=d._nextNavigatable(g,a)),f=ue(f.getFullYear(),f.getMonth(),f.getDate()),d._isMultipleSelection()?d._keyboardRangeSelection(i,g):d._focus(g)):(c==o.ENTER||c==o.SPACEBAR?("month"==p.name&&d._isMultipleSelection()?(d.value(ge(e(d._cell.find("a")))),d.selectable._lastActive=e(d._cell[0]),d.trigger(I)):d._click(e(d._cell[0].firstChild)),r=!0):c==o.PAGEUP?(r=!0,d.navigateToPast()):c==o.PAGEDOWN&&(r=!0,d.navigateToFuture()),(a||s)&&(s||p.setDate(g,a),ie(g,f=ue(f.getFullYear(),f.getMonth(),f.getDate()),m)||(g=ne(g,u.min,u.max)),d._isNavigatable(g,a)||(g=d._nextNavigatable(g,a)),d._isMultipleSelection()?d._dateInView(g)?(d._current=g,d._setCurrent(g)):d.navigate(g):d._focus(g)));return r&&i.preventDefault(),d._current},_keyboardRangeSelection:function(e,t){var n,i,a=this;if(!a._dateInView(t))return a._selectDates=[],i=oe(n=a.selectable._lastActive?ge(a.selectable._lastActive.find("a")):t,new Date(+t)),se(a._selectDates,i,n,a.options.disableDates),a.navigate(t),a._current=t,a.selectable._lastActive=a.selectable._lastActive||a._cellByDate(a._view.toDateString(t),H),void a.trigger(I);a.selectable.options.filter=a.wrapper.find("table").length>1&&+t>+a._current?"table.k-month:eq(1) "+H:"table.k-month:eq(0) "+H,a._setCurrent(t),a._current=t,a._rangeSelection(a._cellByDate(a._view.toDateString(t),H),t),a.trigger(I),a.selectable.options.filter="table.k-month:eq(0) "+H},_keyboardToggleSelection:function(t){var n=this;t.currentTarget=n._cell[0],n.selectable._lastActive=e(n._cell[0]),e(n._cell[0]).hasClass(N)?n.selectable._unselect(e(n._cell[0])):n.selectable.value(e(n._cell[0])),n.selectable.trigger(I,{event:t})},_nextNavigatable:function(e,t){var n=this,i=!0,a=n._view,r=n.options.min,o=n.options.max,s=n.options.disableDates,l=new Date(e.getTime());for(a.setDate(l,-t);i;){if(a.setDate(e,t),!ie(e,r,o)){e=l;break}i=s(e)}return e},_animate:function(e){var t=this,n=e.from,i=e.to,a=t._active,r=t.element.children(".k-calendar-view");n?n.parent().data("animating")?(n.off(w),n.parent().kendoStop(!0,!0).remove(),n.remove(),r.append(i),t._focusView(a)):!n.is(":visible")||!1===t.options.animation||e.replace?(i.insertAfter(n),n.off(w).remove(),t._focusView(a)):t[e.vertical?"_vertical":"_horizontal"](n,i,e.future):(r.append(i),t._bindTable(i))},_horizontal:function(e,t,n){var i=this,a=i._active,r=i.options.animation.horizontal,o=r.effects,s=k(e),l=k(e,!0)-s;o&&-1!=o.indexOf(C)&&(e.add(t).css({width:s}),e.wrap("<div/>"),i._focusView(a,e),e.parent().css({position:"relative",width:2*s+2*l,display:"flex","margin-left":n?0:-s-l}),t[n?"insertAfter":"insertBefore"](e),G(r,{effects:C+":"+(n?"right":"left"),complete:function(){e.off(w).remove(),i._oldTable=null,t.unwrap(),i._focusView(a)}}),e.parent().kendoStop(!0,!0).kendoAnimate(r))},_vertical:function(e,t){var n,i,a=this,r=a.options.animation.vertical,o=r.effects,s=a._active;o&&-1!=o.indexOf("zoom")&&(t.insertBefore(e),e.css({position:"absolute",width:t.width()}),m&&(i=(i=(n=a._cellByDate(a._view.toDateString(a._current))).position()).left+parseInt(n.width()/2,10)+"px "+(i.top+parseInt(n.height()/2,10))+"px",t.css(m,i)),e.kendoStop(!0,!0).kendoAnimate({effects:"fadeOut",duration:600,complete:function(){e.off(w).remove(),a._oldTable=null,a._focusView(s)}}),t.kendoStop(!0,!0).kendoAnimate(r))},_cellByDate:function(t,i){return this._table.find(i||"td:not(.k-other-month)").filter((function(){return e(this.firstChild).attr(n.attr(E))===t}))},_selectCell:function(e){var t=this,n=t._selectedCell,i=t._view.toDateString(e);n&&n[0]&&(n[0].removeAttribute(j),n.removeClass(N)),n=t._cellByDate(i,"multiple"==t.options.selectable?P:"td:not(.k-other-month)"),t._selectedCell=n,n.addClass(N).attr(j,!0)},_setCurrent:function(e){var t=this,i=n.guid(),a=t._cell,r=t._view.toDateString(e);a&&a[0]&&(a.removeClass(F),a[0].removeAttribute(q),a[0].removeAttribute(x)),a=t._cellByDate(r,"multiple"==t.options.selectable?P:"td:not(.k-other-month)"),t._cell=a,a.attr(x,i).addClass(F),t._table[0]&&(t._table[0].removeAttribute("aria-activedescendant"),t._table.attr("aria-activedescendant",i))},_bindTable:function(e){e.on("focus.kendoCalendar",this._addClassProxy).on("blur.kendoCalendar",this._removeClassProxy)},_click:function(e){var t=this,n=t.options,i=new Date(+t._current),a=ge(e);l(a,0),"month"==t._view.name&&t.options.disableDates(a)&&(a=t._value),t._view.setDate(i,a),t.navigateDown(ne(i,n.min,n.max))},_focus:function(e){var t=this;0!==t._view.compare(e,t._current)?t.navigate(e):(t._current=e,t._setCurrent(e))},_focusView:function(e,t){e&&this.focus(t)},_viewWrapper:function(){var t=this.element,n=t.children(".k-calendar-view");n[0]||(n=e("<div class='k-calendar-view' />").insertAfter(t.find(Y)))},_footer:function(t){var i=this,a=te(),r=i.element,o=r.find(".k-footer");if(!t)return i._toggle(!1),void o.hide();o[0]||(o=e('<div class="k-footer"><a tabindex="-1" href="#" class="k-link k-nav-today"></a></div>').appendTo(r)),i._today=o.show().find(".k-link").html(t(a)).attr("title",n.toString(a,"D",i.options.culture)),i._toggle()},_header:function(){var t=this,i=t.element,a=t.options.linksSelector;i.find(Y)[0]||i.html(n.template(t.options.header.template)(e.extend(!0,{},t.options,{actionAttr:n.attr("action"),size:n.getValidCssClass("k-button-","size",t.options.size)}))),i.find(a).on(y+" touchend"+w,(function(){return!1})),t._title=i.find("["+n.attr("action")+'="nav-up"]').on(y+" touchend"+w,(function(){t._active=!1!==t.options.focusOnNav,t.navigateUp()})),t._prevArrow=i.find("["+n.attr("action")+'="prev"]').on(y+" touchend"+w,(function(){t._active=!1!==t.options.focusOnNav,t.navigateToPast()})),t._nextArrow=i.find("["+n.attr("action")+'="next"]').on(y+" touchend"+w,(function(){t._active=!1!==t.options.focusOnNav,t.navigateToFuture()})),i.find("["+n.attr("action")+'="today"]').on(y+" touchend"+w,t._todayClick.bind(t))},_navigate:function(e,t){var n=this,i=n._index+1,a=new K(+n._current);n._isMultipleSelection()&&(a=ge(n._table.find("td:not(.k-other-month):not(.k-out-of-range)").has(".k-link").first().find("a")),n._current=new Date(+a));(e=n[e]).hasClass(A)||(i>3?a.setFullYear(a.getFullYear()+100*t):X.views[i].setDate(a,t),n.navigate(a))},_option:function(e,n){var i,a=this,r=a.options,o=a._value||a._current;if(n===t)return r[e];(n=s(n,r.format,r.culture))&&(r[e]=new K(+n),((i="min"===e?n>o:o>n)||function(e,t){if(e)return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth();return!1}(o,n))&&(i&&(a._value=null),a._changeView=!0),a._changeView||(a._changeView=!(!r.month.content&&!r.month.empty)),a.navigate(a._value),a._toggle())},_toggle:function(e){var n=this,i=n.options,a=n.options.disableDates(te()),r=n._today,o=n._todayClass();e===t&&(e=ie(te(),i.min,i.max)),r&&(r.off(y),e&&!a?r.addClass(o).removeClass(A).on(y,n._todayClick.bind(n)):r.removeClass(o).addClass(A).on(y,de))},_todayClass:function(){return"k-nav-today"},_todayClick:function(e){var t=this,n=$[t.options.depth],i=t.options.disableDates,a=te();e.preventDefault(),i(a)||(0===t._view.compare(t._current,a)&&t._index==n&&(t._changeView=!1),t._isMultipleSelection()&&(t._selectDates=[a],t.selectable._lastActive=null),t._value=a,t.navigate(a,n),t.trigger(I))},_templates:function(){var e=this,t=e.options,i=t.footer,a=t.month,r=a.content,o=a.weekNumber,s=a.empty,l='#= kendo.toString(data,"D","'+t.culture+'") #';e.month={content:p('<td class="#=data.cssClass#" role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" '+n.attr(E)+'="#=data.dateString#" title="#=data.title#">'+(r||"#=data.value#")+"</a></td>",{useWithBlock:!!r}),empty:p('<td role="gridcell">'+(s||"&nbsp;")+"</td>",{useWithBlock:!!s}),weekNumber:p('<td class="k-alt">'+(o||"#= data.weekNumber #")+"</td>",{useWithBlock:!!o})},e.year={content:p('<td class="#=data.cssClass#" role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#" aria-label="#=data.label#">#=data.value#</a></td>',{useWithBlock:!1})},i&&!0!==i&&(l=i),e.footer=!1!==i?p(l,{useWithBlock:!1}):null},_updateAria:function(e,t){var i,a=this,r=a._cell,o=a.view().valueType(),s=t||a.current();return i="month"===o?n.toString(s,"MMMM"):"date"===o?n.toString(s,"D"):r.text(),r.attr("aria-label",e({current:s,valueType:o,text:i})),r.attr("id")}});a.plugin(Q);var X={firstDayOfMonth:function(e){return ue(e.getFullYear(),e.getMonth(),1)},firstVisibleDay:function(e,t){var i=(t=t||n.culture().calendar).firstDay,a=new K(e.getFullYear(),e.getMonth(),1,e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds());for(a.setFullYear(e.getFullYear());a.getDay()!=i;)X.setTime(a,-864e5);return a},setTime:function(e,t){var n=e.getTimezoneOffset(),i=new K(e.getTime()+t),a=i.getTimezoneOffset()-n;e.setTime(i.getTime()+6e4*a)},views:[{name:T,title:function(e,t,n,i){return ce(i).months.names[e.getMonth()]+" "+e.getFullYear()},content:function(e){var t=this,i=0,a=e.min,r=e.max,o=e.date,s=e.dates,u=e.format,c=e.culture,p=e.url,h=e.showHeader,f=e.otherMonth,m=e.isWeekColumnVisible,g=p&&s[0],v=ce(c),_=v.firstDay,b=v.days,k=ae(b.names,_),w=ae(b.namesShort,_),y=X.firstVisibleDay(o,v),x=t.first(o),C=t.last(o),T=t.toDateString,S=te(),I='<table tabindex="0" role="grid" class="'+e.contentClasses+'" cellspacing="0" data-start="'+T(y)+'">';for(h&&(I+='<caption class="k-calendar-caption k-month-header">'+this.title(o,a,r,c)+"</caption>"),I+='<thead class="k-calendar-thead"><tr role="row" class="k-calendar-tr">',m&&(I+='<th scope="col" class="k-calendar-th k-alt">'+e.messages.weekColumnHeader+"</th>");i<7;i++)I+='<th scope="col" class="k-calendar-th" aria-label="'+k[i]+'">'+w[i]+"</th>";return l(S,0),S=+S,Z({cells:42,perRow:7,html:I+='</tr></thead><tbody class="k-calendar-tbody"><tr role="row" class="k-calendar-tr">',start:ue(y.getFullYear(),y.getMonth(),y.getDate()),isWeekColumnVisible:m,weekNumber:e.weekNumber,min:ue(a.getFullYear(),a.getMonth(),a.getDate()),max:ue(r.getFullYear(),r.getMonth(),r.getDate()),otherMonth:f,content:e.content,lastDayOfMonth:C,empty:e.empty,setter:t.setDate,disableDates:e.disableDates,build:function(e,t,i){var a=["k-calendar-td"],r=e.getDay(),o="",l="#";return(e<x||e>C)&&a.push(z),i(e)&&a.push(A),+e===S&&a.push("k-today"),0!==r&&6!==r||a.push("k-weekend"),g&&function(e,t){for(var n=0,i=t.length;n<i;n++)if(e===+t[n])return!0;return!1}(+e,s)&&(l=p.replace("{0}",n.toString(e,u,c)),o=" k-action-link"),{date:e,dates:s,ns:n.ns,title:n.toString(e,"D",c),value:e.getDate(),dateString:T(e),cssClass:a.join(" "),linkClass:o,url:l}},weekNumberBuild:function(e){return{weekNumber:d(e,n.culture().calendar.firstDay),currentDate:e}}})},first:function(e){return X.firstDayOfMonth(e)},last:function(e){var t=ue(e.getFullYear(),e.getMonth()+1,0),n=X.firstDayOfMonth(e),i=Math.abs(t.getTimezoneOffset()-n.getTimezoneOffset());return i&&t.setHours(n.getHours()+i/60),t},compare:function(e,t){var n=e.getMonth(),i=e.getFullYear(),a=t.getMonth(),r=t.getFullYear();return i>r?1:i<r?-1:n==a?0:n>a?1:-1},setDate:function(e,t){var n=e.getHours();t instanceof K?e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()):X.setTime(e,t*L),l(e,n)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/"+e.getDate()},valueType:function(){return"date"}},{name:"year",title:function(e){return e.getFullYear()},content:function(e){var t=ce(e.culture).months,i=t.namesAbbr,a=t.names,r=this.toDateString,o=e.min,s=e.max,l="";return e.showHeader&&(l+='<table tabindex="0" role="grid" class="k-calendar-table k-content k-meta-view" cellspacing="0">',l+='<caption class="k-calendar-caption k-meta-header">',l+=this.title(e.date),l+="</caption>",l+='<tbody class="k-calendar-tbody">',l+='<tr role="row" class="k-calendar-tr">'),Z({min:ue(o.getFullYear(),o.getMonth(),1),max:ue(s.getFullYear(),s.getMonth(),1),start:ue(e.date.getFullYear(),0,1),html:l,setter:this.setDate,content:e.content,build:function(e){return{value:i[e.getMonth()],label:a[e.getMonth()],ns:n.ns,dateString:r(e),cssClass:["k-calendar-td"].join(" ")}}})},first:function(e){return ue(e.getFullYear(),0,e.getDate())},last:function(e){return ue(e.getFullYear(),11,e.getDate())},compare:function(e,t){return ee(e,t)},setDate:function(e,t){var n,i=e.getHours();t instanceof K?(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)),l(e,i)},toDateString:function(e){return e.getFullYear()+"/"+e.getMonth()+"/1"},valueType:function(){return"month"}},{name:"decade",title:function(e,t,n){return J(e,t,n,10)},content:function(e){var t=e.date.getFullYear(),i=this.toDateString,a="";return e.showHeader&&(a+='<table tabindex="0" role="grid" class="k-calendar-table k-content k-meta-view" cellspacing="0">',a+='<caption class="k-meta-header">',a+=this.title(e.date,e.min,e.max),a+="</caption>",a+='<tbody class="k-calendar-thead">',a+='<tr role="row" class="k-calendar-tr">'),Z({start:ue(t-t%10-1,0,1),min:ue(e.min.getFullYear(),0,1),max:ue(e.max.getFullYear(),0,1),otherMonth:e.otherMonth,html:a,setter:this.setDate,build:function(e,t){var a=["k-calendar-td"];return 0!==t&&11!==t||a.push(z),{value:e.getFullYear(),ns:n.ns,dateString:i(e),cssClass:a.join(" ")}}})},first:function(e){var t=e.getFullYear();return ue(t-t%10,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return ue(t-t%10+9,e.getMonth(),e.getDate())},compare:function(e,t){return ee(e,t,10)},setDate:function(e,t){re(e,t,1)},toDateString:function(e){return e.getFullYear()+"/0/1"},valueType:function(){return"year"}},{name:S,title:function(e,t,n){return J(e,t,n,100)},content:function(e){var t=e.date.getFullYear(),i=e.min.getFullYear(),a=e.max.getFullYear(),r=this.toDateString,o=i,s=a,l="";return(s-=s%10)-(o-=o%10)<10&&(s=o+9),e.showHeader&&(l+='<table tabindex="0" role="grid" class="k-calendar-table k-content k-meta-view" cellspacing="0">',l+='<caption class="k-calendar-caption k-meta-header">',l+=this.title(e.date,e.min,e.max),l+="</caption>",l+='<tbody class="k-calendar-tbody">',l+='<tr role="row" class="k-calendar-tr">'),Z({start:ue(t-t%100-10,0,1),min:ue(o,0,1),max:ue(s,0,1),otherMonth:e.otherMonth,html:l,setter:this.setDate,build:function(e,t){var o=["k-calendar-td"],s=e.getFullYear(),l=s+9;return 0!==t&&11!==t||o.push(z),s<i&&(s=i),l>a&&(l=a),{ns:n.ns,value:s+" - "+l,dateString:r(e),cssClass:o.join(" ")}}})},first:function(e){var t=e.getFullYear();return ue(t-t%100,e.getMonth(),e.getDate())},last:function(e){var t=e.getFullYear();return ue(t-t%100+99,e.getMonth(),e.getDate())},compare:function(e,t){return ee(e,t,100)},setDate:function(e,t){re(e,t,10)},toDateString:function(e){var t=e.getFullYear();return t-t%10+"/0/1"},valueType:function(){return"decade"}}]};function J(e,t,n,i){var a,r=e.getFullYear(),o=t.getFullYear(),s=n.getFullYear();return a=(r-=r%i)+(i-1),r<o&&(r=o),a>s&&(a=s),r+"-"+a}function Z(e){var t,n=0,i=e.min,a=e.max,r=e.start,o=e.setter,s=e.build,d=e.weekNumberBuild,u=e.cells||12,c=e.isWeekColumnVisible,p=e.perRow||4,h=e.otherMonth,f=e.lastDayOfMonth,m=e.weekNumber||b,k=e.content||g,w=e.empty||v,y=e.otherMonthCellTemplate||_,x=e.html||'<table tabindex="0" role="grid" class="k-calendar-table k-content k-meta-view" cellspacing="0"><tbody class="k-calendar-tbody"><tr role="row" class="k-calendar-tr">';for(c&&(x+=m(d(r)));n<u;n++)n>0&&n%p==0&&(x+='</tr><tr role="row" class="k-calendar-tr">',c&&(x+=m(h||+r<=+f?d(r):{weekNumber:"&nbsp;"}))),r=ue(r.getFullYear(),r.getMonth(),r.getDate()),l(r,0),x+=-1===(t=s(r,n,e.disableDates)).cssClass.indexOf(z)||h?ie(r,i,a)?k(t):w(t):y(t),o(r,1);return x+"</tr></tbody></table>"}function ee(e,t,n){var i=e.getFullYear(),a=t.getFullYear(),r=a,o=0;return n&&(r=(a-=a%n)-a%n+n-1),i>r?o=1:i<a&&(o=-1),o}function te(){var e=new K;return new K(e.getFullYear(),e.getMonth(),e.getDate())}function ne(e,t,n){var i=te();return e&&(i=new K(+e)),t>i?i=new K(+t):n<i&&(i=new K(+n)),i}function ie(e,t,n){return+e>=+t&&+e<=+n}function ae(e,t){return e.slice(t).concat(e.slice(0,t))}function re(e,t,n){t=t instanceof K?t.getFullYear():e.getFullYear()+n*t,e.setFullYear(t)}function oe(e,t){if(+t<+e){var i=+e;X.views[0].setDate(e,t),X.views[0].setDate(t,new Date(i))}var a=Date.UTC(e.getFullYear(),e.getMonth(),e.getDate()),r=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate());return Math.ceil((+r-+a)/n.date.MS_PER_DAY)}function se(e,t,n,i){for(var a=0;a<=t;a++){var r=new Date(n.getTime());i(r=new Date(r.setDate(r.getDate()+a)))||e.push(r)}}function le(t){e(this).hasClass("k-disabled")||e(this).toggleClass("k-hover",O.indexOf(t.type)>-1||t.type==R)}function de(e){e.preventDefault()}function ue(e,t,n){var i=new K(e,t,n);return i.setFullYear(e,t,n),i}function ce(e){return h(e).calendars.standard}function pe(e){var n=$[e.start],i=$[e.depth],a=h(e.culture);e.format=c(e.format||a.calendars.standard.patterns.d),isNaN(n)&&(n=0,e.start=T),(i===t||i>n)&&(e.depth=T),null===e.dates&&(e.dates=[])}function he(e,t){e.addClass("k-"+t)}function fe(t){return n.isFunction(t)?t:Array.isArray(t)?function(t){var n,i=[],a=["su","mo","tu","we","th","fr","sa"],r="if (found) { return true } else {return false}";if(t[0]instanceof K)i=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].setHours(0,0,0,0));return t}(t),n="var clonedDate = new Date(date); var found = date && window.kendo.jQuery.inArray(clonedDate.setHours(0, 0, 0, 0),["+i+"]) > -1;"+r;else{for(var o=0;o<t.length;o++){var s=t[o].slice(0,2).toLowerCase(),l=e.inArray(s,a);l>-1&&i.push(l)}n="var clonedDate = new Date(date); var found = date && window.kendo.jQuery.inArray(clonedDate.getDay(),["+i+"]) > -1;"+r}return new Function("date",n)}(t):e.noop}function me(e,t){return e instanceof Date&&t instanceof Date&&(e=e.getTime(),t=t.getTime()),e===t}function ge(t){var i=e(t).attr(n.attr(E)).split("/");return i=ue(i[0],i[1],i[2])}X.isEqualDatePart=function(e,t){return!!e&&(e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate())},X.isEqualDate=me,X.restrictValue=ne,X.isInRange=ie,X.addClassToViewContainer=he,X.normalize=pe,X.viewsEnum=$,X.disabled=fe,X.toDateObject=ge,X.getToday=te,X.createDate=ue,n.calendar=X}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.caret,a=n.ui,r=a.Widget,o=n.keys,s=".kendoDateInput",l={}.toString,d=e.isPlainObject,u=(n.support.propertyChangeEvent?"propertychange.kendoDateInput input":"input")+s,c="k-focus",p="k-disabled",h="k-invalid",f="disabled",m="readonly",g="change",v="dMyHhmftsz",_=r.extend({init:function(t,i){var a=this;r.fn.init.call(a,t,i),t=a.element,(i=a.options).format=n._extractFormat(i.format||n.getCulture(i.culture).calendars.standard.patterns.d),i.min=n.parseDate(t.attr("min"))||n.parseDate(i.min),i.max=n.parseDate(t.attr("max"))||n.parseDate(i.max);var o=t.parent().attr("class")||"",l=o.indexOf("picker")>=0&&o.indexOf("rangepicker")<0;l?a.wrapper=t.parent():(a.wrapper=t.wrap("<span class='k-dateinput k-input'></span>").parent(),a.wrapper.addClass(t[0].className).removeClass("input-validation-error"),a.wrapper[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height})),a._validationIcon=e("<span class='k-input-validation-icon k-icon k-i-warning k-hidden'></span>").insertAfter(t),a._form(),a.element.addClass(l?" ":"k-input-inner").attr("autocomplete","off").on("focus"+s,(function(){a.wrapper.addClass(c)})).on("focusout"+s,(function(){a.wrapper.removeClass(c),a._change()}));try{t[0].setAttribute("type","text")}catch(e){t[0].type="text"}t.is("[disabled]")||e(a.element).parents("fieldset").is(":disabled")?a.enable(!1):a.readonly(t.is("[readonly]")),a.value(a.options.value||t.val()),a._applyCssClasses(),i.label&&a._label(),n.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"},size:"medium",fillMode:"solid",rounded:"medium",label:null},events:[g],min:function(e){if(e===t)return this.options.min;this.options.min=e},max:function(e){if(e===t)return this.options.max;this.options.max=e},setOptions:function(e){var t=this;r.fn.setOptions.call(t,e),this._unbindInput(),this._bindInput(),this._updateElementValue(),e.label&&t._inputLabel?t.label.setOptions(e.label):!1===e.label?(t.label._unwrapFloating(),t._inputLabel.remove(),delete t._inputLabel):e.label&&t._label()},destroy:function(){var e=this;e.element.off(s),e._formElement&&e._formElement.off("reset",e._resetHandler),e.label&&e.label.destroy(),r.fn.destroy.call(e)},value:function(e){if(e===t)return this._dateTime.getDateObject();null===e&&(e=""),"[object Date]"!==l.call(e)&&(e=n.parseDate(e,this.options.format,this.options.culture)),e&&!e.getTime()&&(e=null),this._dateTime=new b(e,this.options.format,this.options.culture,this.options.messages),this._updateElementValue(),this._oldValue=e,this.label&&this.label.floatingLabel&&this.label.floatingLabel.refresh()},_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]},_toggleDateMask:function(e){e?this._updateElementValue():this.element.val("")},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,i=t.options,a=d(i.label)?i.label:{content:i.label};t.label=new n.ui.Label(null,e.extend({},a,{widget:t,floatCheck:function(){return t._toggleDateMask(!0),!t.value()&&document.activeElement!==t.element[0]&&(t._toggleDateMask(!1),!0)}})),t._inputLabel=t.label.element},_bindInput:function(){var e=this;e.element.on("focus"+s,(function(){e.wrapper.addClass(c)})).on("focusout"+s,(function(){e.wrapper.removeClass(c),e._change()})).on("paste"+s,e._paste.bind(e)).on("keydown"+s,e._keydown.bind(e)).on(u,e._input.bind(e)).on("mouseup"+s,e._mouseUp.bind(e)).on("DOMMouseScroll"+s+" mousewheel"+s,e._scroll.bind(e))},_unbindInput:function(){this.element.off("keydown"+s).off("paste"+s).off("focus"+s).off("focusout"+s).off(u).off("mouseup"+s).off("DOMMouseScroll"+s+" mousewheel"+s)},_editable:function(e){var t=this,n=t.element,i=e.disable,a=e.readonly,r=t.wrapper;t._unbindInput(),a||i?(i&&(r.addClass(p),n.attr(f,i),n&&n.length&&n[0].removeAttribute(m)),a&&n.attr(m,a)):(r.removeClass(p),n&&n.length&&(n[0].removeAttribute(f),n[0].removeAttribute(m)),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(g),e.element.trigger(g))},_input:function(){var e=this,t=e.element[0],a=!1;if(n._activeElement()===t){var r=function(e,t,n,i){var a=e[i+e.length-n.length];e=e.substring(0,i+e.length-n.length),n=n.substring(0,i);var r,o=[];if(e===n&&i>0)return o.push([t[i-1],n[i-1]]),o;if(0===e.indexOf(n)&&(0===n.length||t[n.length-1]!==t[n.length])){var s="";for(r=n.length;r<e.length;r++)t[r]!==s&&v.indexOf(t[r])>=0&&(s=t[r],o.push([s,""]));return o}if(" "===n[n.length-1]||n[n.length-1]===a)return[[t[i-1]," "]];if(0===n.indexOf(e)||-1===v.indexOf(t[i-1])){var l=t[0];for(r=Math.max(0,e.length-1);r<t.length;r++)if(v.indexOf(t[r])>=0){l=t[r];break}return[[l,n[i-1]]]}return[[t[i-1],n[i-1]]]}(this._oldText,this._format,this.element[0].value,i(this.element[0])[0]),o=1===r.length&&" "===r[0][1];if(!o)for(var s=0;s<r.length;s++){var l=this._dateTime.parsePart(r[s][0],r[s][1]);a=a||!l}if(this._updateElementValue(),r.length&&" "!==r[0][0]&&(this._selectSegment(r[0][0]),!o)){var d=r[0][0];setTimeout((function(){e._selectSegment(d)}))}if(o){this._keydown({keyCode:39,preventDefault:function(){}})}a&&e._blinkInvalidState()}},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){this.wrapper.addClass(h),this._validationIcon.removeClass("k-hidden")},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(h),e._validationIcon.addClass("k-hidden"),e._invalidStateTimeout=null},_mouseUp:function(){var e=i(this.element[0]);e[0]===e[1]&&this._selectNearestSegment()},_scroll:function(e){if(n._activeElement()===this.element[0]&&!this.element.is("[readonly]")){var t={keyCode:37,preventDefault:function(){}};(e=window.event||e).shiftKey?t.keyCode=(e.wheelDelta||-e.detail)>0?37:39:t.keyCode=(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"),a=i?e("#"+i):n.closest("form"),r=n[0].value;!r&&t.options.value&&(r=t.options.value),a[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(r)}))},t._formElement=a.on("reset",t._resetHandler))},_paste:function(e){e.preventDefault()},_keydown:function(e){var t,a=e.keyCode;if(37==a||39==a){e.preventDefault(),(t=i(this.element[0]))[0]!=t[1]&&this._selectNearestSegment();for(var r=37==a?-1:1,s=-1==r?i(this.element[0])[0]-1:i(this.element[0])[1]+1;s>=0&&s<this._format.length;){if(v.indexOf(this._format[s])>=0){this._selectSegment(this._format[s]);break}s+=r}}if(38==a||40==a){e.preventDefault(),t=i(this.element[0]);var l=this._format[t[0]];if(v.indexOf(l)>=0){var d=1;"m"==l&&(d=this.options.interval||1),this._dateTime.modifyPart(l,38==a?1*d:-1*d),this._updateElementValue(),this._selectSegment(l),this.element.trigger(g)}}if(n.support.browser.msie&&n.support.browser.version<10){var u=e.keyCode?e.keyCode:e.which;if(8===u||46===u){var c=this;setTimeout((function(){c._input()}),0)}}a===o.ENTER&&this._change()},_selectNearestSegment:function(){for(var e=i(this.element[0])[0],t=e,n=e-1;t<this._format.length||n>=0;t++,n--){if(t<this._format.length&&-1!==v.indexOf(this._format[t]))return void this._selectSegment(this._format[t]);if(n>=0&&-1!==v.indexOf(this._format[n]))return void this._selectSegment(this._format[n])}},_selectSegment:function(e){for(var t=-1,n=0,a=0;a<this._format.length;a++)this._format[a]===e&&(n=a+1,-1===t&&(t=a));t<0&&(t=0),i(this.element,t,n)}});n.cssProperties.registerPrefix("DateInput","k-input-"),n.cssProperties.registerValues("DateInput",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),a.plugin(_);var b=function(e,i,a,r){var o=null,s=!0,l=!0,d=!0,u=!0,c=!0,p=!0,h="",f="",m={},g=["","0","00","000","0000"];function v(e,t,n){return(n=(t=t||2)-(e+="").length)?g[t].substring(0,n)+e:e}var _=/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,b=null,k=null,w=null,y=!1,x=function(e){var n,i,a;switch(e){case"d":a=d?o.getDate():m.day;break;case"dd":a=d?v(o.getDate()):m.day;break;case"ddd":a=d&&l&&s?w.namesAbbr[o.getDay()]:m.weekday;break;case"dddd":a=d&&l&&s?w.names[o.getDay()]:m.weekday;break;case"M":a=l?o.getMonth()+1:m.month;break;case"MM":a=l?v(o.getMonth()+1):m.month;break;case"MMM":a=l?b.namesAbbr[o.getMonth()]:m.month;break;case"MMMM":a=l?b.names[o.getMonth()]:m.month;break;case"yy":a=s?v(o.getFullYear()%100):m.year;break;case"yyyy":a=s?v(o.getFullYear(),4):m.year;break;case"h":a=u?o.getHours()%12||12:m.hour;break;case"hh":a=u?v(o.getHours()%12||12):m.hour;break;case"H":a=u?o.getHours():m.hour;break;case"HH":a=u?v(o.getHours()):m.hour;break;case"m":a=c?o.getMinutes():m.minute;break;case"mm":a=c?v(o.getMinutes()):m.minute;break;case"s":a=p?o.getSeconds():m.second;break;case"ss":a=p?v(o.getSeconds()):m.second;break;case"f":a=Math.floor(o.getMilliseconds()/100);break;case"ff":(a=o.getMilliseconds())>99&&(a=Math.floor(a/10)),a=v(a);break;case"fff":a=v(o.getMilliseconds(),3);break;case"tt":a=u?o.getHours()<12?k.AM[0]:k.PM[0]:m.dayperiod;break;case"zzz":i=(n=o.getTimezoneOffset())<0,a=Math.abs(n/60).toString().split(".")[0],n=Math.abs(n)-60*a,a=(i?"+":"-")+v(a),a+=":"+v(n);break;case"z":case"zz":i=(a=o.getTimezoneOffset()/60)<0,a=Math.abs(a).toString().split(".")[0],a=(i?"+":"-")+("zz"===e?v(a):a)}if(a=a!==t?a:e.slice(1,e.length-1),y){a=""+a;var r="";"ddd"==e&&(e="EEE"),"dddd"==e&&(e="EEEE");for(var h=0;h<a.length;h++)r+=e[0];return r}return a};function C(e){return y=e,x}function T(e,t){switch(e){case"y":s=t;break;case"M":l=t,t||(o.setMonth(0),h="");break;case"d":d=t;break;case"H":case"h":u=t,t||(f="");break;case"m":c=t;break;case"s":p=t;break;default:return}}if(this.setValue=function(e){d=e},this.getValue=function(){return d},this.modifyPart=function(e,t){var n=new Date(o&&o.getTime?o.getTime():o);switch(e){case"y":n.setFullYear(n.getFullYear()+t);break;case"M":var i=n.getMonth()+t;n.setMonth(i),n.getMonth()%12!=(i+12)%12&&(n.setDate(1),n.setMonth(i));break;case"d":case"E":n.setDate(n.getDate()+t);break;case"H":case"h":n.setHours(n.getHours()+t);break;case"m":n.setMinutes(n.getMinutes()+t);break;case"s":n.setSeconds(n.getSeconds()+t);break;case"t":n.setHours((n.getHours()+12)%24)}n.getFullYear()>0&&(T(e,!0),o=n)},this.parsePart=function(e,t){if(!t)return T(e,!1),!0;var n,i=new Date(o&&o.getTime?o.getTime():o),a=new Date(i.getFullYear(),i.getMonth()+1,0).getDate();switch(e){case"d":var r=(d?10*i.getDate():0)+parseInt(t,10);if(isNaN(r))return;for(;r>a;)r=parseInt(r.toString().slice(1),10);if(r<1)d=!1;else{if(i.setDate(r),i.getMonth()!==o.getMonth())return;d=!0}break;case"M":var m=(l?10*(i.getMonth()+1):0)+parseInt(t,10);if(isNaN(m)){var g=k.months.names;for(h+=t.toLowerCase();h.length>0;){for(var v=0;v<g.length;v++)if(0===g[v].toLowerCase().indexOf(h))return i.setMonth(v),l=!0,o=i,!0;h=h.substring(1,h.length)}return!1}for(;m>12;)m=parseInt(m.toString().slice(1),10);m<1?l=!1:(i.setMonth(m-1),i.getMonth()!==m-1&&(i.setDate(1),i.setMonth(m-1)),l=!0);break;case"y":var _=(s?10*i.getFullYear():0)+parseInt(t,10);if(isNaN(_))return;for(;_>9999;)_=parseInt(_.toString().slice(1),10);_<1?s=!1:(i.setFullYear(_),s=!0);break;case"h":if(n=(u?10*(i.getHours()%12||12):0)+parseInt(t,10),isNaN(n))return;for(;n>12;)n=parseInt(n.toString().slice(1),10);i.setHours(12*Math.floor(i.getHours()/12)+n%12),u=!0;break;case"H":if(n=(u?10*i.getHours():0)+parseInt(t,10),isNaN(n))return;for(;n>23;)n=parseInt(n.toString().slice(1),10);i.setHours(n),u=!0;break;case"m":var b=(c?10*i.getMinutes():0)+parseInt(t,10);if(isNaN(b))return;for(;b>59;)b=parseInt(b.toString().slice(1),10);i.setMinutes(b),c=!0;break;case"s":var w=(p?10*i.getSeconds():0)+parseInt(t,10);if(isNaN(w))return;for(;w>59;)w=parseInt(w.toString().slice(1),10);i.setSeconds(w),p=!0;break;case"t":if(u){for(f+=t.toLowerCase();f.length>0;){if(0===k.AM[0].toLowerCase().indexOf(f)&&i.getHours()>=12||0===k.PM[0].toLowerCase().indexOf(f)&&i.getHours()<12)return i.setHours((i.getHours()+12)%24),o=i,!0;f=f.substring(1,f.length)}return!1}}return o=i,!0},this.toPair=function(e,t,i){return e?(t=n.getCulture(t),e=(k=t.calendars.standard).patterns[e]||e,w=k.days,b=k.months,m=i,[e.replace(_,C(!1)),e.replace(_,C(!0))]):["",""]},this.getDateObject=function(){return s&&l&&d&&u&&c&&p?new Date(o.getTime()):null},e)o=new Date(e.getTime());else{o=new Date;for(var S=this.toPair(i,a,r)[1],I=0;I<S.length;I++)T(S[I],!1)}}}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n.html,r=i.Widget,o=n.parseDate,s=n.keys,l=n.support,d=n.template,u=n._activeElement,c="<div />",p=".kendoDatePicker",h="click"+p,f=l.mouseAndTouchPresent?n.applyEventMap("up",p.slice(1)):h,m="open",g="close",v="change",_="disabled",b="readonly",k="k-focus",w="k-selected",y="k-disabled",x="mousedown"+p,C="navigate",T="id",S="month",I="aria-disabled",D="aria-readonly",E="aria-expanded",A="aria-hidden",F="aria-activedescendant",z=n.calendar,P=z.isInRange,H=z.restrictValue,N=z.isEqualDatePart,R=e.extend,O=Date;function M(t){var n=t.parseFormats,i=t.format;z.normalize(t),(n=Array.isArray(n)?n:[n]).length||n.push("yyyy-MM-dd"),-1===e.inArray(i,n)&&n.splice(0,0,t.format),t.parseFormats=n}function B(e){e.preventDefault()}var L=function(t){var a,r=this,o=document.body,s=e(c).attr(A,"true").addClass("k-calendar-container");r.options=t=t||{},a=t.id,t.omitPopup?s=t.dateDiv:(s.appendTo(o),r.popup=new i.Popup(s,R(t.popup,t,{name:"Popup",isRtl:n.support.isRtl(t.anchor)}))),a&&(a+="_dateview",s.attr(T,a),r._dateViewID=a),r.div=s,r.value(t.value)};L.prototype={_calendar:function(){var t,a=this,r=a.calendar,o=a.options;r||(t=e(c).attr(T,n.guid()).appendTo(o.omitPopup?o.dateDiv:a.popup.element).on(x,B).on(h,"td:has(.k-link)",a._click.bind(a)),a.calendar=r=new i.Calendar(t,{componentType:o.componentType,size:o.size,messages:o.messages}),a._setOptions(o),t.addClass(n.getValidCssClass("k-calendar-","size",o.size)),r.navigate(a._value||a._current,o.start),a.value(a._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,messages:e.messages,disableDates:e.disableDates})},setOptions:function(e){var t=this,n=t.options,i=e.disableDates;i&&(e.disableDates=z.disabled(i)),t.options=R(n,e,{change:n.change,close:n.close,open:n.open}),t.calendar&&t._setOptions(t.options)},destroy:function(){this.popup&&this.popup.destroy()},open:function(){var e,t=this;t._calendar(),e=t.popup._hovered,t.popup._hovered=!0,t.popup.open(),setTimeout((function(){t.popup._hovered=e}),1)},close:function(){this.popup&&this.popup.close()},min:function(e){this._option("min",e)},max:function(e){this._option("max",e)},toggle:function(){this[this.popup.visible()?g:m]()},move:function(e){var t=this,n=e.keyCode,i=t.calendar,a=e.ctrlKey&&n==s.DOWN||n==s.ENTER,r=!1;if(e.altKey)n==s.DOWN?(t.open(),e.preventDefault(),r=!0):n==s.UP&&(t.close(),e.preventDefault(),r=!0);else if(t.popup&&t.popup.visible()){if(n==s.ESC||a&&i._cell.hasClass(w))return t.close(),e.preventDefault(),!0;n!=s.SPACEBAR&&(t._current=i._move(e)),r=!0}return r},current:function(e){this._current=e,this.calendar&&this.calendar._focus(e)},value:function(e){var t=this,n=t.calendar,i=t.options,a=i.disableDates;a&&a(e)&&(e=null),t._value=e,t._current=new O(+H(e,i.min,i.max)),n&&n.value(e)},_click:function(e){-1!==e.currentTarget.className.indexOf(w)&&(this.calendar.trigger("change"),this.close())},_option:function(e,t){var n=this.calendar;this.options[e]=t,n&&n[e](t)}},L.normalize=M,n.DateView=L;var V=r.extend({init:function(i,a){var s,l,d=this;r.fn.init.call(d,i,a),i=d.element,(a=d.options).disableDates=n.calendar.disabled(a.disableDates),a.min=o(i.attr("min"))||o(a.min),a.max=o(i.attr("max"))||o(a.max),d.options.readonly=a.readonly!==t?a.readonly:Boolean(d.element.attr("readonly")),d.options.enable=a.enable!==t?a.enable:!Boolean(i.is("[disabled]")||e(i).parents("fieldset").is(":disabled")),M(a),d._initialOptions=R({},a),d._wrapper(),d.dateView=new L(R({},a,{id:i.attr(T),anchor:d.wrapper,change:function(){d._change(this.value()),d.close()},close:function(e){d.trigger(g)?e.preventDefault():(i.attr(E,!1),l.attr(A,!0),setTimeout((function(){i.removeAttr("aria-activedescendant")})))},open:function(e){var t,n=d.options;d.trigger(m)?e.preventDefault():(d.element.val()!==d._oldText&&(t=o(i.val(),n.parseFormats,n.culture),d.dateView[t?"current":"value"](t)),i.attr(E,!0),l.attr(A,!1),d._updateARIA(t))}})),l=d.dateView.div,d._icon();try{i[0].setAttribute("type","text")}catch(e){i[0].type="text"}i.addClass("k-input-inner").attr({role:"combobox","aria-expanded":!1,"aria-haspopup":"grid","aria-controls":d.dateView._dateViewID,autocomplete:"off"}),d._reset(),d._template(),!d.options.enable?d.enable(!1):d.readonly(i.is("[readonly]")),s=o(a.value||d.element.val(),a.parseFormats,a.culture),d._createDateInput(a),d._old=d._update(s||d.element.val()),d._oldText=i.val(),d._applyCssClasses(),a.label&&d._label(),n.notify(d)},events:[m,g,v],options:{name:"DatePicker",value:null,footer:"",format:"",culture:"",parseFormats:[],min:new Date(1900,0,1),max:new Date(2099,11,31),start:S,depth:S,animation:{},month:{},dates:[],disableDates:null,ARIATemplate:"Current focused #=data.valueType# is #=data.text#",dateInput:!1,weekNumber:!1,messages:{weekColumnHeader:""},componentType:"classic",size:"medium",fillMode:"solid",rounded:"medium",label:null},setOptions:function(e){var i=this,a=i._value;r.fn.setOptions.call(i,e),(e=i.options).min=o(e.min),e.max=o(e.max),M(e),i._dateIcon.off(p),i._dateIcon.remove(),i.dateView.setOptions(e),i._icon(),i._editable({readonly:e.readonly===t?i.options.readonly:e.readonly,disable:!(e.enable===t?i.options.enable:e.enable)}),i._createDateInput(e),i._dateInput||i.element.val(n.toString(a,e.format,e.culture)),a&&i._updateARIA(a),e.label&&i._inputLabel?i.label.setOptions(e.label):!1===e.label?(i.label._unwrapFloating(),i._inputLabel.remove(),delete i._inputLabel):e.label&&i._label()},_editable:function(e){var t=this,n=t._dateIcon.off(p),i=t.element.off(p),a=t.wrapper.off(p),r=e.readonly,o=e.disable;r||o?(a.addClass(o?y:"").removeClass(o?"":y),i.attr(_,o).attr(b,r).attr(I,o).attr(D,r)):(a.removeClass(y).on("mouseenter.kendoDatePicker mouseleave.kendoDatePicker",t._toggleHover),i&&i.length&&(i[0].removeAttribute(_),i[0].removeAttribute(b)),i.attr(I,!1).attr(D,!1).on("keydown"+p,t._keydown.bind(t)).on("focusout"+p,t._blur.bind(t)).on("focus"+p,(function(){t.wrapper.addClass(k)})),n.on(f,t._click.bind(t)).on(x,B))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this._dateInput&&this._dateInput._editable({readonly:e===t||e,disable:!1}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this._dateInput&&this._dateInput._editable({readonly:!1,disable:!(e=e===t||e)}),this.label&&this.label.floatingLabel&&this.label.floatingLabel.enable(e=e===t||e)},_label:function(){var t=this,i=t.options,a=e.isPlainObject(i.label)?i.label:{content:i.label};t.label=new n.ui.Label(null,e.extend({},a,{widget:t})),t._inputLabel=t.label.element},destroy:function(){var e=this;e.label&&e.label.destroy(),r.fn.destroy.call(e),e.dateView.calendar&&e._navigateCalendarHandler&&(e.dateView.calendar.unbind(C,e._navigateCalendarHandler),e._navigateCalendarHandler=null),e.dateView.destroy(),e.element.off(p),e._dateIcon.off(p),e._form&&e._form.off("reset",e._resetHandler)},open:function(){this.dateView.open(),this._navigateCalendar()},close:function(){this.dateView.close()},min:function(e){return this._option("min",e)},max:function(e){return this._option("max",e)},value:function(e){var n=this;if(e===t)return n._value;n._old=n._update(e),null===n._old&&(n._dateInput?n._dateInput.value(n._old):n.element.val("")),n._oldText=n.element.val(),n.label&&n.label.floatingLabel&&n.label.floatingLabel.refresh()},_toggleHover:function(t){e(t.currentTarget).toggleClass("k-hover","mouseenter"===t.type)},_blur:function(){var e=this,t=e.element.val();e.close(),t!==e._oldText&&(e._change(t),t||e.dateView.current(n.calendar.getToday())),e.wrapper.removeClass(k)},_click:function(e){var t=this;t.dateView.toggle(),t._navigateCalendar(),t._focusElement(e.type)},_focusElement:function(e){var t=this.element;l.touch&&(!l.mouseAndTouchPresent||(e||"").match(/touch/i))||t[0]===u()||t.trigger("focus")},_change:function(e){var t,i=this,a=i.element.val();e=i._update(e);var r=(t=!n.calendar.isEqualDate(i._old,e))&&!i._typing,o=a!==i.element.val();(r||o)&&i.element.trigger(v),t&&(i._old=e,i._oldText=i.element.val(),i.trigger(v)),i._typing=!1},_keydown:function(e){var t=this,n=t.dateView,i=t.element.val(),a=!1;n.popup.visible()||e.keyCode!=s.ENTER||i===t._oldText?(a=n.move(e),t._updateARIA(n._current),a?t._dateInput&&e.stopImmediatePropagation&&e.stopImmediatePropagation():t._typing=!0):t._change(i)},_icon:function(){var t,n=this,i=n.element,r=n.options;(t=i.next("button.k-input-button"))[0]||(t=e(a.renderButton('<button aria-label="select" tabindex="-1" class="k-input-button k-button k-icon-button"></button>',{icon:"calendar",size:r.size,fillMode:r.fillMode,shape:"none",rounded:"none"})).insertAfter(i)),n._dateIcon=t.attr({role:"button"})},_setCalendarAttribute:function(){var e=this;setTimeout((function(){e.element.attr(F,e.dateView.calendar._table.attr(F))}))},_navigateCalendar:function(){var e=this;e._navigateCalendarHandler||(e._navigateCalendarHandler=e._setCalendarAttribute.bind(e)),e.dateView.calendar&&e.dateView.calendar.unbind(C,e._navigateCalendarHandler).bind(C,e._navigateCalendarHandler)},_option:function(e,n){var i=this.options;if(n===t)return i[e];(n=o(n,i.parseFormats,i.culture))&&(i[e]=new O(+n),this.dateView[e](n))},_update:function(e){var t,i=this,a=i.options,r=a.min,s=a.max,l=i._value,d=o(e,a.parseFormats,a.culture),u=null===d&&null===l||d instanceof Date&&l instanceof Date;return a.disableDates(d)&&(d=null,i._old||i.element.val()||(e=null)),+d==+l&&u?((t=n.toString(d,a.format,a.culture))===e||i._dateInput&&!d||i.element.val(null===d?e:t),d):(null!==d&&N(d,r)?d=H(d,r,s):P(d,r,s)||(d=null),i._value=d,i.dateView.value(d),i._dateInput&&d?i._dateInput.value(d||e):i.element.val(n.toString(d||e,a.format,a.culture)),i._updateARIA(d),d)},_wrapper:function(){var e,t=this.element;(e=t.parents(".k-datepicker"))[0]||(e=t.wrap("<span />").parent()),e[0].style.cssText=t[0].style.cssText,t.css({height:t[0].style.height}),this.wrapper=e.addClass("k-datepicker k-input").addClass(t[0].className).removeClass("input-validation-error")},_reset:function(){var t=this,i=t.element,a=i.attr("form"),r=t.options,o=r.disableDates,s=r.parseFormats.length?r.parseFormats:null,l=t._initialOptions.value,d=a?e("#"+a):i.closest("form"),u=i[0].defaultValue;l&&o&&o(l)&&(l=null),u&&n.parseDate(u,s,r.culture)||!l||i.attr("value",n.toString(l,r.format,r.culture)),d[0]&&(t._resetHandler=function(){t.value(l||i[0].defaultValue),t.max(t._initialOptions.max),t.min(t._initialOptions.min)},t._form=d.on("reset",t._resetHandler))},_template:function(){this._ariaTemplate=d(this.options.ARIATemplate).bind(this)},_createDateInput:function(e){this._dateInput&&(this._dateInput.destroy(),this._dateInput=null),e.dateInput&&(this._dateInput=new i.DateInput(this.element,{culture:e.culture,format:e.format,size:e.size,fillMode:e.fillMode,rounded:e.rounded,min:e.min,max:e.max}))},_updateARIA:function(e){var t=this,n=t.dateView.calendar;t.element&&t.element.length&&t.element[0].removeAttribute(F),n&&t.element.attr(F,n._updateAria(t._ariaTemplate,e))}});n.cssProperties.registerPrefix("DatePicker","k-input-"),n.cssProperties.registerValues("DatePicker",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),i.plugin(V)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n.html,r=i.List,o=i.Select,s=n.support,l=n._activeElement,d=n.data.ObservableObject,u=n.keys,c=".kendoDropDownList",p=c+"FocusEvent",h="disabled",f="readonly",m="change",g="k-focus",v="k-disabled",_="aria-disabled",b="aria-readonly",k="mouseenter"+c+" mouseleave"+c,w="tabindex",y="filter",x="accept",C=o.extend({init:function(i,a){var r,s,l=this,d=a&&a.index;l.ns=c,a=Array.isArray(a)?{dataSource:a}:a,o.fn.init.call(l,i,a),a=l.options,i=l.element.on("focus"+c,l._focusHandler.bind(l)),l._focusInputHandler=l._focusInput.bind(l),l.optionLabel=e(),l._optionLabel(),l._inputTemplate(),l._reset(),l._prev="",l._word="",l._wrapper(),l._tabindex(),l.wrapper.data(w,l.wrapper.attr(w)),l._span(),l._popup(),l._mobile(),l._dataSource(),l._ignoreCase(),l._filterHeader(),a.label&&this._label(),l._aria(),l._enable(),l._attachFocusHandlers(),l._oldIndex=l.selectedIndex=-1,d!==t&&(a.index=d),l._initialIndex=a.index,l.requireValueMapper(l.options),l._initList(),l.listView.one("dataBound",l._attachAriaActiveDescendant.bind(l)),l._cascade(),l.one("set",(function(e){!e.sender.listView.bound()&&l.hasOptionLabel()&&l._textAccessor(l._optionLabelText())})),a.autoBind?l.dataSource.fetch():-1===l.selectedIndex&&((s=a.text||"")||((r=a.optionLabel)&&0===a.index?s=r:l._isSelect&&(s=i.children(":selected").text())),l._textAccessor(s)),e(l.element).parents("fieldset").is(":disabled")&&l.enable(!1),l.listView.bind("click",(function(e){e.preventDefault()})),n.notify(l),l._applyCssClasses()},options:{name:"DropDownList",enabled:!0,autoBind:!0,index:0,text:null,value:null,delay:500,height:200,dataTextField:"",dataValueField:"",optionLabel:"",cascadeFrom:"",cascadeFromField:"",cascadeFromParentField:"",ignoreCase:!0,animation:{},filter:"none",minLength:1,enforceMinLength:!1,virtual:!1,template:null,valueTemplate:null,optionLabelTemplate:null,groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",autoWidth:!1,popup:null,filterTitle:null,size:"medium",fillMode:"solid",rounded:"medium",label:null},events:["open","close",m,"select","filtering","dataBinding","dataBound","cascade","set","kendoKeydown"],setOptions:function(e){o.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;o.fn.destroy.call(e),e.wrapper.off(c),e.wrapper.off(p),e.element.off(c),e._arrow.off(),e._arrow=null,e._arrowIcon=null,e.optionLabel.off(),e.filterInput&&e.filterInput.off(p)},open:function(){var e=this,t=!!e.dataSource.filter()&&e.dataSource.filter().filters.length>0,n=this.listView;e.popup.visible()||(e.listView.bound()&&e._state!==x?e._allowOpening()&&(e._focusFilter=!0,e.popup.one("activate",e._focusInputHandler),e.popup._hovered=!0,e.wrapper.attr("aria-activedescendant",n._optionID),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.wrapper.attr("aria-activedescendant",n._optionID),e.popup.open(),e._resizeFilterInput()):e._filterSource()))},close:function(){this._attachAriaActiveDescendant(),this.popup.close()},_attachAriaActiveDescendant:function(){var e=this.wrapper,t=e.find(".k-input-inner").attr("id");e.attr("aria-describedby",t)},_focusInput:function(){this._focusElement(this.filterInput)},_resizeFilterInput:function(){var e=this.filterInput,t=this._prevent;if(e){var i=this.filterInput[0]===l(),a=n.caret(this.filterInput[0])[0];this._prevent=!0,e.addClass("k-hidden"),e.closest(".k-list-filter").css("width",this.popup.element.css("width")),e.removeClass("k-hidden"),i&&(e.trigger("focus"),n.caret(e[0],a)),this._prevent=t}},_allowOpening:function(){return this.hasOptionLabel()||this.filterInput||o.fn._allowOpening.call(this)},toggle:function(e){this._toggle(e,!0)},current:function(e){var n;if(e===t)return!(n=this.listView.focus())&&0===this.selectedIndex&&this.hasOptionLabel()?this.optionLabel:n;this._focus(e)},dataItem:function(n){var i=this,a=null;if(null===n)return n;if(n===t)a=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);a=i.dataSource.flatView()[n]}return a||(a=i._optionLabelDataItem()),a},refresh:function(){this.listView.refresh()},text:function(e){var n,i=this,a=i.options.ignoreCase;if((e=null===e?"":e)===t)return i._textAccessor();"string"==typeof e?(n=a?e.toLowerCase():e,i._select((function(e){return e=i._text(e),a&&(e=(e+"").toLowerCase()),e===n})).done((function(){i._textAccessor(i.dataItem()||e),i._refreshFloatingLabel()}))):i._textAccessor(e)},_clearFilter:function(){e(this.filterInput).val(""),o.fn._clearFilter.call(this)},value:function(e){var n=this,i=n.listView,a=n.dataSource;return e===t?(e=n._accessor()||n.listView.value()[0])===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&&a.unbind(m,n._valueSetter),n._valueSetter=function(){n.value(e)}.bind(n),void a.one(m,n._valueSetter)):(n._isFilterEnabled()&&i.bound()&&i.isFiltered()?n._clearFilter():n._fetchData(),void i.value(e).done((function(){n._old=n._valueBeforeCascade=n._accessor(),n._oldIndex=n.selectedIndex,n._refreshFloatingLabel()}))))},hasOptionLabel:function(){return this.optionLabel&&!!this.optionLabel[0]},_optionLabel:function(){var t=this,i=t.options,a=i.optionLabel,r=i.optionLabelTemplate;if(!a)return t.optionLabel.off().remove(),void(t.optionLabel=e());r||(r="#:",r+="string"==typeof a?"data":n.expr(i.dataTextField,"data"),r+="#"),"function"!=typeof r&&(r=n.template(r)),t.optionLabelTemplate=r,t.hasOptionLabel()||(t.optionLabel=e('<div role="option" class="k-list-optionlabel"></div>').prependTo(t.list)),t.optionLabel.html(r(a)).off().on("click.kendoDropDownList touchend.kendoDropDownList",t._click.bind(t)).on(k,t._toggleHover),t.angular("compile",(function(){return{elements:t.optionLabel,data:[{dataItem:t._optionLabelDataItem()}]}}))},_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 d(i):n._assignInstance(n._optionLabelText(),""):t},_buildOptions:function(e){var n=this;if(n._isSelect){var i=n.listView.value()[0],a=n._optionLabelDataItem(),o=a&&n._value(a);i!==t&&null!==i||(i=""),a&&(o!==t&&null!==o||(o=""),a='<option value="'+o+'">'+n._text(a)+"</option>"),n._options(e,a,i),i!==r.unifyType(n._accessor(),typeof i)&&(n._customOption=null,n._custom(i))}},_listBound:function(){var e,t=this,n=t._initialIndex,i=t._state===y,a=t.dataSource.flatView();t._presetValue=!1,t._renderFooter(),t._renderNoData(),t._toggleNoData(!a.length),t._resizePopup(!0),t.popup.position(),t._buildOptions(a),i||(t._open&&t.toggle(t._allowOpening()),t._open=!1,t._fetch||(a.length?(!t.listView.value().length&&n>-1&&null!==n&&t.select(n),t._initialIndex=null,(e=t.listView.selectedDataItems()[0])&&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&&-1===this._oldIndex)&&(this._oldIndex=this.selectedIndex)},_filterPaste:function(){this._search()},_attachFocusHandlers:function(){var e=this;e.wrapper.on("focusin"+p,e._focusinHandler.bind(e)).on("focusout"+p,e._focusoutHandler.bind(e)),e.filterInput&&e.filterInput.on("focusin"+p,e._focusinHandler.bind(e)).on("focusout"+p,e._focusoutHandler.bind(e))},_focusHandler:function(){this.wrapper.trigger("focus")},_focusinHandler:function(){this.wrapper.addClass(g),this._prevent=!1},_focusoutHandler:function(){var e=this,t=window.self!==window.top;e._prevent||(clearTimeout(e._typingTimeout),s.mobileOS.ios&&t?e._change():e._blur(),e.wrapper.removeClass(g),e._prevent=!0,e._open=!1,e.element.trigger("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,i=t.element,a=e.disable,r=e.readonly,o=t.wrapper.add(t.filterInput).off(c),s=t.wrapper.off(k);r||a?a?(o.removeAttr(w),s.addClass(v)):s.removeClass(v):(i.prop(h,!1).prop(f,!1),s.removeClass(v).on(k,t._toggleHover),o.attr(w,o.data(w)).attr(_,!1).attr(b,!1).on("keydown"+c,t,t._keydown.bind(t)).on(n.support.mousedown+c,t._wrapperMousedown.bind(t)).on("paste"+c,t._filterPaste.bind(t)),t.wrapper.on("click"+c,t._wrapperClick.bind(t)),t.filterInput?o.on("input"+c,t._search.bind(t)):o.on("keypress"+c,t._keypress.bind(t))),i.attr(h,a).attr(f,r),o.attr(_,a).attr(b,r)},_keydown:function(e){var t,n,i=this,a=e.keyCode,r=e.altKey,o=i.popup.visible();if(i.filterInput&&(t=i.filterInput[0]===l()),a===u.LEFT?(a=u.UP,n=!0):a===u.RIGHT&&(a=u.DOWN,n=!0),!n||!t)if(e.keyCode=a,(r&&a===u.UP||a===u.ESC)&&i._focusElement(i.wrapper),i._state===y&&a===u.ESC&&(i._clearFilter(),i._open=!1,i._state=x),a===u.ENTER&&i._typingTimeout&&i.filterInput&&o)e.preventDefault();else if(a!==u.SPACEBAR||t||(i.toggle(!o),e.preventDefault()),!(n=i._move(e))){if(!o||!i.filterInput){var s=i._focus();if(a===u.HOME?(n=!0,i._firstItem()):a===u.END&&(n=!0,i._lastItem()),n){if(i.trigger("select",{dataItem:i._getElementDataItem(i._focus()),item:i._focus()}))return void i._focus(s);i._select(i._focus(),!0).done((function(){o||i._blur()})),e.preventDefault()}}r||n||!i.filterInput||i._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=this,i=n.dataSource.flatView(),a=i.length+(n.hasOptionLabel()?1:0),r=function(e,t){for(var n=0;n<e.length;n++)if(e.charAt(n)!==t)return!1;return!0}(n._word,n._last),o=n.selectedIndex;o=-1===o?0:S(o+=r?1:0,a),i=i.toJSON?i.toJSON():i.slice(),i=n._shuffleData(i,o);for(var s=0;s<a&&(t=n._text(i[s]),!r||!n._matchText(t,n._last))&&!n._matchText(t,n._word);s++);s!==a&&(e=n._focus(),n._select(S(o+s,a)).done((function(){var t=function(){n.popup.visible()||n._change()};n.trigger("select",{dataItem:n._getElementDataItem(n._focus()),item:n._focus()})?n._select(e).done(t):t()})))},_keypress:function(e){var t=this;if(0!==e.which&&e.keyCode!==n.keys.ENTER){var i=String.fromCharCode(e.charCode||e.keyCode);t.options.ignoreCase&&(i=i.toLowerCase())," "===i&&e.preventDefault(),t._word+=i,t._last=i,t._search()}},_popupOpen:function(){var e=this.popup;e.wrapper=n.wrap(e.element),e.element.closest(".km-root")[0]&&(e.wrapper.addClass("km-popup km-widget"),this.wrapper.addClass("km-widget"))},_popup:function(){o.fn._popup.call(this),this.popup.one("open",this._popupOpen.bind(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(t){var n=this,i=t.item||e(t.currentTarget);t.preventDefault(),n.trigger("select",{dataItem:n._getElementDataItem(i),item:i})?n.close():(n._userTriggered=!0,n._select(i).done((function(){n._blur(),n._focusElement(n.wrapper)})))},_focusElement:function(e){var t=l(),n=this.wrapper,i=this.filterInput,a=e===i?n:i,r=s.mobileOS&&(s.touch||s.MSPointers||s.pointers);i&&i[0]===e[0]&&r||i&&(a[0]===t||this._focusFilter)&&(this._focusFilter=!1,this._prevent=!0,this._focused=e.trigger("focus"))},_searchByWord:function(e){if(e){var t=this;t.options.ignoreCase&&(e=e.toLowerCase()),t._select((function(n){return t._matchText(t._text(n),e)}))}},_inputValue:function(){return this.text()},_search:function(){var e=this,t=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 void t.fetch().done((function(){e._selectNext()}));e._selectNext()}},_get:function(t){var n,i,a,r="function"==typeof t,o=r?e():e(t);if(this.hasOptionLabel()&&("number"==typeof t?t>-1&&(t-=1):o.hasClass("k-list-optionlabel")&&(t=-1)),r){for(n=this.dataSource.flatView(),a=0;a<n.length;a++)if(t(n[a])){t=a,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(){var e;return this.optionLabel.hasClass("k-focus")?(this._resetOptionLabel(),this.listView.focusFirst(),e=1):e=this.listView.focusNext(),e},_prevItem:function(){var e;if(!this.optionLabel.hasClass("k-focus"))return e=this.listView.focusPrev(),this.listView.focus()||this.options.virtual||this._focus(this.optionLabel),e},_focusItem:function(){var e=this.options,n=this.listView,i=n.focus(),a=n.select();(a=a[a.length-1])===t&&e.highlightFirst&&!i&&(a=0),a!==t?n.focus(a):!e.optionLabel||e.virtual&&"dataItem"===e.virtual.mapValueTo?n.scrollToIndex(0):(this._focus(this.optionLabel),this._select(this.optionLabel),this.listView.content.scrollTop(0))},_resetOptionLabel:function(e){this.optionLabel.removeClass("k-focus"+(e||"")).removeAttr("id")},_focus:function(e){var n=this.listView,i=this.optionLabel;if(e===t)return!(e=n.focus())&&i.hasClass("k-focus")&&(e=i),e;this._resetOptionLabel(),e=this._get(e),n.focus(e),-1===e&&(i.addClass("k-focus").attr("id",n._optionID),this.filterInput&&this.filterInput.removeAttr("aria-activedescendant").attr("aria-activedescendant",n._optionID))},_select:function(e,t){var n=this;return e=n._get(e),n.listView.select(e).done((function(){t||n._state!==y||(n._state=x),-1===e&&n._selectValue(null)}))},_selectValue:function(e){var n=this,i=n.options.optionLabel,a=n.listView.select(),r="",o="";(a=a[a.length-1])===t&&(a=-1),this._resetOptionLabel(" k-selected"),e||0===e?(o=e,r=n._dataValue(e),i&&(a+=1)):i&&(n._focus(n.optionLabel.addClass("k-selected")),o=n._optionLabelText(),r="string"==typeof i?"":n._value(i),a=0),n.selectedIndex=a,null===r&&(r=""),n._textAccessor(o),n._accessor(r,a),n._triggerCascade()},_mobile:function(){var e=this.popup,t=s.mobileOS;e.element.parents(".km-root").eq(0).length&&t&&(e.options.animation.open.effects=t.android||t.meego?"fadeIn":t.ios||t.wp?"slideIn:up":e.options.animation.open.effects)},_filterHeader:function(){this.filterInput&&(this.filterInput.off(c).closest(".k-list-filter").remove(),this.filterInput=null),this._isFilterEnabled()&&(this.filterInput=e('<input class="k-input-inner" type="text" />').attr({placeholder:this.element.attr("placeholder"),title:this.options.filterTitle||this.element.attr("title"),role:"searchbox","aria-label":this.options.filterTitle,"aria-haspopup":"listbox","aria-autocomplete":"list"}),this.list.parent().prepend(e('<div class="k-list-filter"><span class="k-searchbox k-input k-input-md k-rounded-md k-input-solid" type="text" autocomplete="off"><span class="k-input-icon k-icon k-i-search"></span></span></div>')).find(".k-searchbox").append(this.filterInput))},_span:function(){var e,t,i=this,r=i.wrapper,o="span.k-input-value-text",s=n.guid(),l=i.options;(e=r.find(o))[0]||(t=a.renderButton('<span role="button" class="k-input-button" aria-label="select"></span>',{icon:"arrow-s",size:l.size,fillMode:l.fillMode,shape:"none",rounded:"none"}),r.append('<span id="'+s+'" unselectable="on" class="k-input-inner"><span class="k-input-value-text"></span></span>').append(t).append(i.element),e=r.find(o)),i.span=e,i._arrow=r.find(".k-input-button"),i._arrowIcon=i._arrow.find(".k-icon")},_wrapper:function(){var e,t=this,n=t.element,i=n[0];(e=n.parent()).is("span.k-picker")||((e=n.wrap("<span />").parent())[0].style.cssText=i.style.cssText,e[0].title=i.title),t._focused=t.wrapper=e.addClass("k-picker k-dropdownlist").addClass(i.className).removeClass("input-validation-error").css("display","").attr({accesskey:n.attr("accesskey"),unselectable:"on",role:"combobox","aria-expanded":!1}),n.hide().removeAttr("accesskey")},_clearSelection:function(e){this.select(e.value()?0:-1)},_openHandler:function(e){this._adjustListWidth(),this.trigger("open")?e.preventDefault():(this.wrapper.attr("aria-expanded",!0),this.ul.attr("aria-hidden",!1))},_closeHandler:function(e){this.trigger("close")?e.preventDefault():(this.wrapper.attr("aria-expanded",!1),this.ul.attr("aria-hidden",!0))},_inputTemplate:function(){var e=this,t=e.options.valueTemplate;if(t=t?n.template(t):n.template("#:this._text(data)#",{useWithBlock:!1}).bind(e),e.valueTemplate=t,e.hasOptionLabel()&&!e.options.optionLabelTemplate)try{e.valueTemplate(e._optionLabelDataItem())}catch(e){throw new Error("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")}},_textAccessor:function(n){var i=null,a=this.valueTemplate,r=this._optionLabelText(),o=this.span;if(n===t)return o.text();e.isPlainObject(n)||n instanceof d?i=n:r&&r===n&&(i=this.options.optionLabel),i||(i=this._assignInstance(n,this._accessor())),this.hasOptionLabel()&&(i!==r&&this._text(i)!==r||(a=this.optionLabelTemplate,"string"!=typeof this.options.optionLabel||this.options.optionLabelTemplate||(i=r)));var s=function(){return{elements:o.get(),data:[{dataItem:i}]}};this.angular("cleanup",s);try{o.html(a(i))}catch(e){o.html("")}this.angular("compile",s)},_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 n=this.options.dataTextField,i={};return n?(T(i,n.split("."),e),T(i,this.options.dataValueField.split("."),t),i=new d(i)):i=e,i}});function T(e,t,n){for(var i,a=0,r=t.length-1;a<r;++a)(i=t[a])in e||(e[i]={}),e=e[i];e[t[r]]=n}function S(e,t){return e>=t&&(e-=t),e}i.plugin(C),n.cssProperties.registerPrefix("DropDownList","k-picker-"),n.cssProperties.registerValues("DropDownList",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=n.isFunction,o=e.extend,s="horizontal",l="vertical",d="start",u="resize",c="resizeend",p=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),n.orientation=n.options.orientation.toLowerCase()!=l?s:l,n._positionMouse=n.orientation==s?"x":"y",n._position=n.orientation==s?"left":"top",n._sizingDom=n.orientation==s?"outerWidth":"outerHeight",n.draggable=new i.Draggable(t.draggableElement||e,{distance:1,filter:t.handle,drag:n._resize.bind(n),dragcancel:n._cancel.bind(n),dragstart:n._start.bind(n),dragend:n._stop.bind(n)}),n.userEvents=n.draggable.userEvents},events:[u,c,d],options:{name:"Resizable",orientation:s},resize:function(){},_max:function(e){var n=this,i=n.hint?n.hint[n._sizingDom]():0,a=n.options.max;return r(a)?a(e):a!==t?n._initialElementPosition+a-i:a},_min:function(e){var n=this.options.min;return r(n)?n(e):n!==t?this._initialElementPosition+n:n},_start:function(t){var n=this,i=n.options.hint,a=e(t.currentTarget);n._initialElementPosition=a.position()[n._position],n._initialMousePosition=t[n._positionMouse].startLocation,i&&(n.hint=r(i)?e(i(a)):i,n.hint.css({position:"absolute"}).css(n._position,n._initialElementPosition).appendTo(n.element)),n.trigger(d,t),n._maxPosition=n._max(t),n._minPosition=n._min(t),e(document.body).css("cursor",a.css("cursor"))},_resize:function(e){var n,i=this,a=i._maxPosition,r=i._minPosition,s=i._initialElementPosition+(e[i._positionMouse].location-i._initialMousePosition);n=r!==t?Math.max(r,s):s,i.position=n=a!==t?Math.min(a,n):n,i.hint&&i.hint.toggleClass(i.options.invalidClass||"",n==a||n==r).css(i._position,n),i.resizing=!0,i.trigger(u,o(e,{position:n}))},_stop:function(t){var n=this;n.hint&&n.hint.remove(),n.resizing=!1,n.trigger(c,o(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;a.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,a=n.targetPosition,r=n.position;r===t&&(r=a[i]),a[i]=r+e,n.userEvents.move(a.left,a.top)},end:function(){this.userEvents.end(),this.target=this.position=t}});n.ui.plugin(p)}(window.kendo.jQuery);!function(e,t){var n,i=window.kendo,a=i.ui.Widget,r=i.ui.Popup.TabKeyTrap,o=i.ui.Draggable,s=e.isPlainObject,l=i._activeElement,d=i._outerWidth,u=i._outerHeight,c=e.extend,p=e.each,h=i.template,f="body",m=".kendoWindow",g=".kendoWindowModal",v=".k-window",_=".k-window-title",b=_+"bar",k=".k-window-content",w=".k-resize-handle",y=".k-overlay",x="k-content-frame",C="k-i-loading",T="k-hover",S="k-focus",I="k-window-maximized",D="k-display-inline-flex",E=":visible",A="hidden",F="cursor",z="open",P="activate",H="deactivate",N="close",R="refresh",O="resizeStart",M="resizeEnd",B="dragstart",L="dragend",V="restore",U="error",W="overflow",j="original-overflow-rule",q="zIndex",G=".k-window-actions .k-i-window-minimize,.k-window-actions .k-i-window-maximize",K=".k-i-pin",$=".k-i-unpin",Y=K+","+$,Q=".k-window-titlebar .k-window-action",X=".k-window-titlebar .k-i-refresh",J="WindowEventsHandled",Z=/^0[a-z]*$/i,ee=i.isLocalUrl,te={small:"k-window-sm",medium:"k-window-md",large:"k-window-lg"};function ne(e){return void 0!==e}function ie(e,t){return parseInt(e.css(t),10)||0}function ae(e,t,n){return e&&isNaN(e)&&e.toString().indexOf("px")<0?e:Math.max(Math.min(parseInt(e,10),n===1/0?n:parseInt(n,10)),t===-1/0?t:parseInt(t,10))}function re(){return!this.type||this.type.toLowerCase().indexOf("script")>=0}function oe(t){for(var n={top:t.offsetTop,left:t.offsetLeft},i=t.offsetParent;i;){n.top+=i.offsetTop,n.left+=i.offsetLeft;var a=e(i).css("overflowX"),r=e(i).css("overflowY");"auto"!==r&&"scroll"!==r||(n.top-=i.scrollTop),"auto"!==a&&"scroll"!==a||(n.left-=i.scrollLeft),i=i.offsetParent}return n}var se=a.extend({init:function(n,o){var l,d,u,c,p,h,f,g,w=this,y={},C=o&&o.actions&&!o.actions.length;a.fn.init.call(w,n,o),c=(o=w.options).position,n=w.element,p=o.content,f=e(window),C&&(o.actions=[]),w.appendTo=e(o.appendTo),w.containment=o.draggable.containment?e(o.draggable.containment).first():null,p&&!s(p)&&(p=o.content={url:p}),n.find("script").filter(re).remove(),n.parent().is(w.appendTo)||w.containment||c.top!==t&&c.left!==t||(n.is(E)?(y=n.offset(),!0):(d=n.css("visibility"),u=n.css("display"),n.css({visibility:A,display:""}),y=document.body.contains(n[0])?n.offset():{top:0,left:0},n.css({visibility:d,display:u})),c.top===t&&(c.top=y.top),c.left===t&&(c.left=y.left)),ne(o.visible)&&null!==o.visible||(o.visible=n.is(E)),l=w.wrapper=n.closest(v),n.is(".k-window-content")&&l[0]||(n.addClass("k-window-content"),n.attr("tabindex",0),w._createWindow(n,o),l=w.wrapper=n.closest(v),w.title(w.options.title),w._dimensions()),w.minTop=w.minLeft=-1/0,w.maxTop=w.maxLeft=1/0,w._position(),p&&w.refresh(p),o.visible&&w.toFront(null,!o.modal),h=l.children(k),o.visible&&o.modal&&w._overlay(l.is(E)).css({opacity:.5}),l.on("mouseenter"+m,Q,w._buttonEnter.bind(w)).on("mouseleave"+m,Q,w._buttonLeave.bind(w)).on("click"+m,"> "+Q,w._windowActionHandler.bind(w)).on("keydown"+m,w,w._keydown.bind(w)).on("focus"+m,w._focus.bind(w)).on("blur"+m,w._blur.bind(w)),h.on("keydown"+m,w,w._keydownContent.bind(w)),h.find("."+x)[0]&&!f.data(J)&&(f.on("blur"+m,(function(){var t=e(document.activeElement).parent(k);t.length&&i.widgetInstance(t)._focus()})),f.on("focus"+m,(function(){e(k).not(".k-dialog-content").each((function(t,n){i.widgetInstance(e(n))._blur()}))})),f.data(J,!0)),this._resizable(),this._draggable(),o.pinned&&this.wrapper.is(":visible")&&w.pin(),(g=n.attr("id"))&&(g+="_wnd_title",l.attr({role:"dialog","aria-labelledby":g}).children(b).children(_).attr("id",g)),l.add(l.children(".k-resize-handle,"+b)).on(i.support.mousedown+m,w.toFront.bind(w)),w.touchScroller=i.touchScroller(n),w._resizeHandler=w._onDocumentResize.bind(w),w._marker=i.guid().substring(0,8),e(window).on("resize"+m+w._marker,w._resizeHandler),o.visible&&(w.trigger(z),w.trigger(P)),i.notify(w),this.options.modal&&(this._tabKeyTrap=new r(l),this._tabKeyTrap.trap(),this._tabKeyTrap.shouldTrap=function(){return l.data("isFront")})},_buttonEnter:function(t){e(t.currentTarget).addClass(T)},_buttonLeave:function(t){e(t.currentTarget).removeClass(T)},_focus:function(){this.wrapper.addClass(S)},_blur:function(){this.wrapper.removeClass(S)},_dimensions:function(){var e=this.wrapper,t=this.options,n=t.width,i=t.height,a=t.maxHeight,r=t.size,o=["minWidth","minHeight","maxWidth","maxHeight"],s="content-box"==e.css("box-sizing"),l=s?ie(e,"border-left-width")+ie(e,"border-right-width"):0,d=s?ie(e,"border-top-width")+ie(e,"border-bottom-width"):0,u=s?ie(e,"padding-top"):0;this.containment&&!this._isPinned&&(this._updateBoundaries(),t.maxHeight=Math.min(this.containment.height-(d+u),a),t.maxWidth=Math.min(this.containment.width-l,t.maxWidth));for(var c=0;c<o.length;c++){var p=t[o[c]]||"";p!=1/0&&e.css(o[c],p)}a!=1/0&&this.element.css("maxHeight",a),n?e.outerWidth(ae(n,t.minWidth,t.maxWidth)):e.outerWidth(""),i?e.outerHeight(ae(i,t.minHeight,t.maxHeight)):e.outerHeight(""),t.visible||e.removeClass(D).hide(),r&&te[r]&&e.addClass(te[r])},_position:function(){var e,t,n=this.wrapper,i=this.options.position;this._updateBoundaries(),this.containment&&(i.top=i.top||0,i.left=i.left||0,e=i.top.toString().indexOf("%")>0?parseInt(this.containment.height*(parseFloat(i.top)/100),10):i.top,t=i.left.toString().indexOf("%")>0?parseInt(this.containment.width*(parseFloat(i.left)/100),10):i.left,i.top=ae(e,this.minTop,this.maxTop),i.left=ae(t,this.minLeft,this.maxLeft)),i.top&&i.top.toString().indexOf("px")>0&&(i.top=Number(i.top.replace("px",""))),i.left&&i.left.toString().indexOf("px")>0&&(i.left=Number(i.left.replace("px",""))),0===i.top&&(i.top=i.top.toString()),0===i.left&&(i.left=i.left.toString()),n.css({top:i.top||"",left:i.left||""})},_updateBoundaries:function(){var e=this.containment;if(!e)return null;e.width=e.innerWidth(),e.height=e.innerHeight(),parseInt(e.width,10)>e[0].clientWidth&&(e.width-=i.support.scrollbar()),parseInt(e.height,10)>e[0].clientHeight&&(e.height-=i.support.scrollbar()),e.position=oe(e[0]),this._isPinned?(this.minTop=this.minLeft=-1/0,this.maxTop=this.maxLeft=1/0):(this.minTop=e.scrollTop(),this.minLeft=e.scrollLeft(),this.maxLeft=this.minLeft+e.width-d(this.wrapper,!0),this.maxTop=this.minTop+e.height-u(this.wrapper,!0))},_animationOptions:function(e){var t=this.options.animation;return t&&t[e]||{open:{effects:{}},close:{hide:!0,effects:{}}}[e]},_resize:function(){i.resize(this.element.children())},_resizable:function(){var t=this.options.resizable,i=this.wrapper;this.resizing&&(i.off("dblclick"+m).children(w).remove(),this.resizing.destroy(),this.resizing=null),t&&(i.on("dblclick"+m,b,function(t){e(t.target).closest(".k-window-action").length||this.toggleMaximization()}.bind(this)),p("n e s w se sw ne nw".split(" "),(function(e,t){i.append(n.resizeHandle(t))})),this.resizing=new le(this)),i=null},_draggable:function(){var e=this.options.draggable;this.dragging&&(this.dragging.destroy(),this.dragging=null),e&&(this.dragging=new de(this,e.dragHandle||b))},_actions:function(){var t=this.options,a=t.actions,r=t.pinned,o=this.wrapper.children(b).find(".k-window-actions"),s=["maximize","minimize"];a=e.map(a,(function(e){return e=r&&"pin"===e.toLowerCase()?"unpin":e,{name:s.indexOf(e.toLowerCase())>-1?"window-"+e:e}})),o.html(i.render(n.action,a))},setOptions:function(t){var n=this,i=n.options.size,r=this.containment&&!n._isPinned?this.containment:e(document),o=JSON.parse(JSON.stringify(t));c(t.position,n.options.position),c(t.position,o.position),n._containerScrollTop=r.scrollTop(),n._containerScrollLeft=r.scrollLeft(),a.fn.setOptions.call(n,t);var s=!1!==n.options.scrollable;if(n.restore(),void 0!==t.title&&n.title(t.title),n.wrapper.removeClass(te[i]),n._dimensions(),n._position(),n._resizable(),n._draggable(),n._actions(),void 0!==t.modal){var l=!1!==n.options.visible;n._enableDocumentScrolling(),n._overlay(t.modal&&l)}n.element.css(W,s?"":"hidden")},events:[z,P,H,N,"minimize","maximize",R,V,O,"resize",M,B,L,"kendoKeydown",U],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,size:"auto",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},_keydownContent:function(e){var t=i.keys;e.keyCode==t.ESC&&this._closable()&&(e.stopPropagation(),this._close(!1))},_keydown:function(e){var t,n,a,r,o,s,l=this,d=l.options,u=i.keys,c=e.keyCode,p=l.wrapper,h=10,f=d.isMaximized,m=d.isMinimized;c==u.ESC&&l._closable()&&(e.stopPropagation(),l._close(!1)),e.target!=e.currentTarget||l._closing||(e.altKey&&82==c&&l.refresh(),e.altKey&&80==c&&(l.options.pinned?l.unpin():l.pin()),e.altKey&&c==u.UP?m?(l.restore(),l.wrapper.trigger("focus")):f||(l.maximize(),l.wrapper.trigger("focus")):e.altKey&&c==u.DOWN&&(m||f?f&&(l.restore(),l.wrapper.trigger("focus")):(l.minimize(),l.wrapper.trigger("focus"))),t=i.getOffset(p),l.containment&&!l._isPinned&&(t=l.options.position),!d.draggable||e.ctrlKey||e.altKey||f||(l._updateBoundaries(),c==u.UP?(t.top=ae(t.top-h,l.minTop,l.maxTop),n=p.css("top",t.top)):c==u.DOWN?(t.top=ae(t.top+h,l.minTop,l.maxTop),n=p.css("top",t.top)):c==u.LEFT?(t.left=ae(t.left-h,l.minLeft,l.maxLeft),n=p.css("left",t.left)):c==u.RIGHT&&(t.left=ae(t.left+h,l.minLeft,l.maxLeft),n=p.css("left",t.left))),d.resizable&&e.ctrlKey&&!f&&!m&&(c==u.UP?(n=!0,r=p.outerHeight()-h):c==u.DOWN&&(n=!0,r=l.containment&&!l._isPinned?Math.min(p.outerHeight()+h,l.containment.height-t.top-ie(p,"padding-top")-ie(p,"borderBottomWidth")-ie(p,"borderTopWidth")):p.outerHeight()+h),c==u.LEFT?(n=!0,a=p.outerWidth()-h):c==u.RIGHT&&(n=!0,a=l.containment&&!l._isPinned?Math.min(p.outerWidth()+h,l.containment.width-t.left-ie(p,"borderLeftWidth")-ie(p,"borderRightWidth")):p.outerWidth()+h),n&&(o=ae(a,d.minWidth,d.maxWidth),s=ae(r,d.minHeight,d.maxHeight),isNaN(o)||(p.outerWidth(o),l.options.width=o+"px"),isNaN(s)||(p.outerHeight(s),l.options.height=s+"px"),l.resize())),n&&e.preventDefault())},_overlay:function(t){var n=this.containment?this.containment.children(y):this.appendTo.children(y),i=this.wrapper,a=t?"block":"none",r=parseInt(i.css(q),10)-1;return n.length||(n=e("<div class='k-overlay' />")),n.insertBefore(i[0]).css({zIndex:r,display:a}),this.options.modal.preventScroll&&!this.containment&&this._stopDocumentScrolling(),n},_actionForIcon:function(e){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"}[/\bk-i(-\w+)+\b/.exec(e[0].className)[0]]},_windowActionHandler:function(t){if(!this._closing){var n=e(t.target).closest(".k-window-action").find(".k-icon"),i=this._actionForIcon(n);return i?(t.preventDefault(),this[i](),!1):void 0}},_modals:function(){for(var t,n=this,i=e(v+E),a=[],r=0;r<i.length;r+=1)(t=n._object(e(i[r])))&&t.options&&t.options.modal&&t.options.visible&&t.options.appendTo===n.options.appendTo&&(!t.containment||n.containment&&t.containment[0]===n.containment[0])&&a.push(t.wrapper[0]);return a.sort((function(e,t){return e.style.zIndex-t.style.zIndex})),n=null,e(a)},_object:function(e){var n=e.children(k),a=i.widgetInstance(n);return a||t},center:function(){var t,n,i=this,a=i.options.position,r=i.wrapper,o=e(window),s=0,l=0;return i.options.isMaximized||(i.options.pinned&&!i._isPinned&&i.pin(),i.options.pinned||(s=o.scrollTop(),l=o.scrollLeft()),this.containment&&!i.options.pinned?(t=this.minTop+(this.maxTop-this.minTop)/2,n=this.minLeft+(this.maxLeft-this.minLeft)/2):(i._scrollIsAppended=!0,n=l+Math.max(0,(o.width()-r.outerWidth())/2),t=s+Math.max(0,(o.height()-r.outerHeight()-ie(r,"paddingTop"))/2)),r.css({left:n,top:t}),a.top=t,a.left=n),i},title:function(t){var a,r=this,o=!0,s=r.wrapper,l=s.children(b),d=l.children(_);return arguments.length?(e.isPlainObject(t)?(a=void 0!==t.text?t.text:"",o=!1!==t.encoded):a=t,!1===a?(s.addClass("k-window-titleless"),s.css("padding-top",0),l.remove()):l.length?d.html(o?i.htmlEncode(a):a):(s.prepend(n.titlebar({title:o?i.htmlEncode(a):a})),r._actions(),l=s.children(b)),r.options.title=a,r):d.html()},content:function(e,t){var n=this.wrapper.children(k),a=n.children(".km-scroll-container");return n=a[0]?a:n,ne(e)?(this.angular("cleanup",(function(){return{elements:n.children()}})),i.destroy(this.element.children()),n.empty().html(e),this.angular("compile",(function(){for(var e=[],i=n.length;--i>=0;)e.push({dataItem:t});return{elements:n.children(),data:e}})),this):n.html()},open:function(){var t,n,a=this,r=a.wrapper,o=a.options,s=this._animationOptions("open"),l=r.children(k),d=this.containment&&!a._isPinned?this.containment:e(document);if(!a.trigger(z)){if(a._closing&&r.kendoStop(!0,!0),a._closing=!1,a.toFront(),o.autoFocus&&a.wrapper.trigger("focus"),o.visible=!0,o.modal){if(n=!!a._modals().length,(t=a._overlay(n)).kendoStop(!0,!0),s.duration&&i.effects.Fade&&!n){var u=i.fx(t).fadeIn();u.duration(s.duration||0),u.endValue(.5),u.play()}else t.css("opacity",.5);t.show(),e(window).on("focus"+g,(function(){r.data("isFront")&&!e(document.activeElement).closest(r).length&&a.wrapper.trigger("focus")}))}r.is(E)||(l.css(W,A),a.wrapper.find(Q).addClass("k-button-flat"),r.addClass(D).kendoStop().kendoAnimate({effects:s.effects,duration:s.duration,complete:this._activate.bind(this)}))}return o.isMaximized&&(a._containerScrollTop=d.scrollTop(),a._containerScrollLeft=d.scrollLeft(),a._stopDocumentScrolling()),this.options.pinned&&!this._isPinned&&this.pin(),a},_activate:function(){var e=!1!==this.options.scrollable;this.options.autoFocus&&this.wrapper.trigger("focus"),this.element.css(W,e?"":"hidden"),i.resize(this.element.children()),this.trigger(P)},_removeOverlay:function(n){var a=this._modals(),r=this.options,o=r.modal&&!a.length,s=this._animationOptions("close");if(o){if(!n&&s.duration&&i.effects.Fade){var l=i.fx(r.modal?this._overlay(!0):e(t)).fadeOut();l.duration(s.duration||0),l.startValue(.5),l.play()}else this._overlay(!1).remove();r.modal.preventScroll&&this._enableDocumentScrolling()}else a.length&&(this._object(a.last())._overlay(!0),r.modal.preventScroll&&this._stopDocumentScrolling())},_close:function(t){var n,i=this,a=i.wrapper,r=i.options,o=this._animationOptions("open"),s=this._animationOptions("close"),l=this.containment&&!i._isPinned?this.containment:e(document);i._closing||(n=i.trigger(N,{userTriggered:!t}),i._closing=!n,a.is(E)&&!n&&(r.visible=!1,e(v).each((function(t,n){var i=e(n).children(k);n!=a&&i.find("> ."+x).length>0&&i.children(y).remove()})),this._removeOverlay(),i.wrapper.find(Q).removeClass("k-button-flat"),a.kendoStop().kendoAnimate({effects:s.effects||o.effects,reverse:!0===s.reverse,duration:s.duration,complete:this._deactivate.bind(this)}),e(window).off(g)),i.options.isMaximized&&(i._enableDocumentScrolling(),i._containerScrollTop&&i._containerScrollTop>0&&l.scrollTop(i._containerScrollTop),i._containerScrollLeft&&i._containerScrollLeft>0&&l.scrollLeft(i._containerScrollLeft)),i.options.iframe&&i.wrapper.trigger("blur"))},_deactivate:function(){var e=this;if(e.wrapper.removeClass(D).hide().css("opacity",""),e.trigger(H),e.options.modal){var t=e._object(e._modals().last());t&&t.toFront()}},close:function(){return this._close(!0),this},_actionable:function(t){return e(t).is(Q+","+Q+" .k-icon, :input, a, .k-input, .k-icon, [role='gridcell'], .k-input-value-text")},_shouldFocus:function(t){var n=l(),i=this.wrapper;return this.options.autoFocus&&!e(n).is(i)&&!this._actionable(t)&&(!i.find(n).length||!i.find(t).length)},toFront:function(t,i){var a=this,r=a.wrapper,o=r[0],s=a.containment&&!a._isPinned,l=this._animationOptions("open"),d=+r.css(q),u=d,c=t&&t.target||null;if(e(v).each((function(t,i){var a=e(i),s=a.css(q),l=a.children(k);isNaN(s)||(d=Math.max(+s,d)),r.data("isFront",i==o),i!=o&&l.find("."+x).length&&!l.find(y).length&&l.append(n.overlay)})),(!r[0].style.zIndex||u<d)&&r.css(q,d+2),a.element.find("> .k-overlay").remove(),a._shouldFocus(c)){i||setTimeout((function(){a.wrapper.focus()}),l?l.duration:0);var p=s?a.containment.scrollTop():e(window).scrollTop(),h=parseInt(r.position().top,10);!a.options.pinned&&h>0&&h<p&&(p>0?e(window).scrollTop(h):r.css("top",p))}return r=null,a},toggleMaximization:function(){return this._closing?this:this[this.options.isMaximized?"restore":"maximize"]()},restore:function(){var t=this,n=t.options,i=n.minHeight,a=t.restoreOptions,r=t.containment&&!t._isPinned?t.containment:e(document);return n.isMaximized||n.isMinimized?(i&&i!=1/0&&t.wrapper.css("min-height",i),a&&!n.isMaximized&&(a.height=ae(a.height,t.options.minHeight,t.options.maxHeight),n.position.top+parseInt(a.height,10)>t.maxTop&&(n.position.top=ae(n.position.top,t.minTop,t.maxTop-parseInt(a.height,10)),c(a,{left:n.position.left,top:n.position.top}))),t.wrapper.css({position:n.pinned?"fixed":"absolute",left:a.left,top:a.top,width:a.width,height:a.height}).removeClass(I).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-window-restore").parent().remove().end().end().find(G).parent().show().end().end().find(Y).parent().show(),n.isMaximized?t.wrapper.find(".k-i-window-maximize").parent().trigger("focus"):n.isMinimized&&t.wrapper.find(".k-i-window-minimize").parent().trigger("focus"),t.options.width=a.width,t.options.height=a.height,t.options.modal.preventScroll||t._enableDocumentScrolling(),t._containerScrollTop&&t._containerScrollTop>0&&r.scrollTop(t._containerScrollTop),t._containerScrollLeft&&t._containerScrollLeft>0&&r.scrollLeft(t._containerScrollLeft),n.isMaximized=n.isMinimized=!1,t.wrapper.removeAttr("aria-labelled-by"),t.resize(),t.trigger(V),t):t},_sizingAction:function(e,t){var i=this,a=i.wrapper,r=a[0].style,o=i.options;return o.isMaximized||o.isMinimized||(i.restoreOptions={width:r.width,height:r.height},a.children(w).hide().end().children(b).find(G).parent().hide().eq(0).before(n.action({name:"window-restore"})),t.call(i),i.wrapper.children(b).find(Y).parent().toggle("maximize"!==e),i.trigger(e),a.find(".k-i-window-restore").parent().trigger("focus")),i},maximize:function(){return this._sizingAction("maximize",(function(){var t=this,n=t.wrapper,i=this.containment&&!t._isPinned,a=n.position(),r=e(document);c(t.restoreOptions,{left:a.left+(i?this.containment.scrollLeft():0),top:a.top+(i?this.containment.scrollTop():0)}),this._containerScrollTop=i?this.containment.scrollTop():r.scrollTop(),this._containerScrollLeft=i?this.containment.scrollLeft():r.scrollLeft(),t._stopDocumentScrolling(),n.css({top:i?this.containment.scrollTop():0,left:i?this.containment.scrollLeft():0,position:i?"absolute":"fixed"}).addClass(I),t.options.isMaximized=!0,t._onDocumentResize()})),this},_stopDocumentScrolling:function(){var t=this,n=t.containment;if(n&&!t._isPinned)return t._storeOverflowRule(n),n.css(W,A),void t.wrapper.css({maxWidth:n.innerWidth(),maxHeight:n.innerHeight()});var i=e("body");t._storeOverflowRule(i),i.css(W,A);var a=e("html");t._storeOverflowRule(a),a.css(W,A)},_enableDocumentScrolling:function(){var t=this,n=t.containment;if(n&&!t._isPinned)return t._restoreOverflowRule(n),void t.wrapper.css({maxWidth:n.width,maxHeight:n.height});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(j,t)}},_isOverflowStored:function(e){return"string"==typeof e.data(j)},_restoreOverflowRule:function(e){var n=e.data(j);null!==n&&n!==t?(e.css(W,n),e.removeData(j)):e.css(W,"")},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("aria-labelled-by",this.element.attr("aria-labelled-by")),this._updateBoundaries(),this},isMinimized:function(){return this.options.isMinimized},pin:function(){var t=this,n=e(window),i=t.wrapper,a=t.options,r=a.position,o=this.containment?oe(i[0]).top+ie(this.containment,"borderTopWidth"):ie(i,"top"),s=this.containment?oe(i[0]).left+ie(this.containment,"borderLeftWidth"):ie(i,"left");t.options.isMaximized||(r.top=o,r.left=s,!t._scrollIsAppended||this.containment&&"fixed"===this.containment.css("position")||(r.top-=n.scrollTop(),r.left-=n.scrollLeft(),t._scrollIsAppended=!1),i.css(c(r,{position:"fixed"})),i.children(b).find(K).addClass("k-i-unpin").removeClass("k-i-pin"),t._isPinned=!0,t.options.pinned=!0,this.containment&&(a.maxWidth=a.maxHeight=1/0,i.css({maxWidth:"",maxHeight:""})))},unpin:function(){var t=this,n=e(window),i=t.wrapper,a=t.options,r=t.options.position,o=t.containment,s=parseInt(i.css("top"),10)+n.scrollTop(),l=parseInt(i.css("left"),10)+n.scrollLeft();t.options.isMaximized||(t._isPinned=!1,t._scrollIsAppended=!0,t.options.pinned=!1,o&&(t._updateBoundaries(),a.maxWidth=Math.min(o.width,a.maxWidth),a.maxHeight=Math.min(o.height-ie(i,"padding-top"),a.maxHeight),i.css({maxWidth:a.maxWidth,maxHeight:a.maxHeight}),s=s<o.position.top?t.minTop:s>o.position.top+o.height?t.maxTop:s+o.scrollTop()-(o.position.top+ie(o,"border-top-width")),l=l<o.position.left?t.minLeft:l>o.position.left+o.width?t.maxLeft:l+o.scrollLeft()-(o.position.left+ie(o,"border-left-width"))),r.top=ae(s,t.minTop,t.maxTop),r.left=ae(l,t.minLeft,t.maxLeft),i.css(c(r,{position:""})),i.children(b).find($).addClass("k-i-pin").removeClass("k-i-unpin"))},_onDocumentResize:function(){var t,n,a=this,r=a.wrapper,o=e(window),s=i.support.zoomLevel(),l="content-box"==r.css("box-sizing");if(a.options.isMaximized){var d=l?ie(r,"border-left-width")+ie(r,"border-right-width"):0,u=l?ie(r,"border-top-width")+ie(r,"border-bottom-width"):0,c=l?ie(r,"padding-top"):0;a.containment&&!a._isPinned?(t=a.containment.innerWidth()-d,n=a.containment.innerHeight()-(u+c)):(t=o.width()/s-d,n=o.height()/s-(u+c)),r.css({width:t,height:n}),a.options.width=t,a.options.height=n,a.resize()}},refresh:function(t){var i,a,r,o=this,l=o.options,d=e(o.element);return s(t)||(t={url:t}),t=c(l.content,t),a=ne(l.iframe)?l.iframe:t.iframe,(r=t.url)?(ne(a)||(a=!ee(r)),a?((i=d.find("."+x)[0])?i.src=r||i.src:d.html(n.contentFrame(c({},l,{content:t}))),d.find("."+x).off("load"+m).on("load"+m,this._triggerRefresh.bind(this))):o._ajaxRequest(t)):(t.template&&o.content(h(t.template)({})),o.trigger(R)),d.toggleClass("k-window-iframecontent",!!a),o},_triggerRefresh:function(){this.trigger(R)},_ajaxComplete:function(){clearTimeout(this._loadingIconTimeout),this.wrapper.find(X).removeClass(C)},_ajaxError:function(e,t){this.trigger(U,{status:t,xhr:e})},_ajaxSuccess:function(e){return function(t){var n=t;e&&(n=h(e)(t||{})),this.content(n,t),this.element.prop("scrollTop",0),this.trigger(R)}},_showLoading:function(){this.wrapper.find(X).addClass(C)},_ajaxRequest:function(t){this._loadingIconTimeout=setTimeout(this._showLoading.bind(this),100),e.ajax(c({type:"GET",dataType:"html",cache:!1,error:this._ajaxError.bind(this),complete:this._ajaxComplete.bind(this),success:this._ajaxSuccess(t.template).bind(this)},t))},_destroy:function(){this.resizing&&this.resizing.destroy(),this.dragging&&this.dragging.destroy(),this.wrapper.off(m).children(k).off(m).end().find(".k-resize-handle,.k-window-titlebar").off(m),e(window).off("resize"+m+this._marker),e(window).off(g),e(window).off(m),clearTimeout(this._loadingIconTimeout),a.fn.destroy.call(this),this.unbind(t),i.destroy(this.wrapper)},destroy:function(){this._destroy(),this.options.modal&&this._removeOverlay(!0),this.wrapper.empty().remove(),this.wrapper=this.appendTo=this.element=e()},_createWindow:function(){var t,a,r=this.element,o=this.options,s=i.support.isRtl(r);!1===o.scrollable&&r.css("overflow","hidden"),a=e(n.wrapper(o)),t=r.find("iframe:not(.k-content-frame)").map((function(){var e=this.getAttribute("src");return this.src="",e})),a.toggleClass("k-rtl",s).attr("tabindex",0).append(r).find("iframe:not(.k-content-frame)").each((function(e){this.src=t[e]})),this.containment?this.containment.prepend(a):this.appendTo&&a.appendTo(this.appendTo),a.find(".k-window-title").css(s?"left":"right",d(a.find(".k-window-actions"))+10),r.css("visibility","").show(),r.find("[data-role=editor]").each((function(){var t=e(this).data("kendoEditor");t&&t.refresh()})),a=r=null}});function le(e){var t=this;t.owner=e,t._preventDragging=!1,t._draggable=new o(e.wrapper,{filter:">.k-resize-handle",group:e.wrapper.id+"-resizing",dragstart:t.dragstart.bind(t),drag:t.drag.bind(t),dragend:t.dragend.bind(t)}),t._draggable.userEvents.bind("press",t.addOverlay.bind(t)),t._draggable.userEvents.bind("release",t.removeOverlay.bind(t))}function de(e,t){var n=this;n.owner=e,n._preventDragging=!1,n._draggable=new o(e.wrapper,{filter:t,group:e.wrapper.id+"-moving",dragstart:n.dragstart.bind(n),drag:n.drag.bind(n),dragend:n.dragend.bind(n),dragcancel:n.dragcancel.bind(n)}),n._draggable.userEvents.stopPropagation=!1}n={wrapper:h("<div class='k-widget k-window'></div>"),action:h("<a role='button' href='\\#' class='k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-window-action' aria-label='#= name #'><span class='k-button-icon k-icon k-i-#= name.toLowerCase() #'></span></a>"),titlebar:h("<div class='k-window-titlebar k-hstack'><span class='k-window-title'>#= title #</span><div class='k-window-actions k-hstack'></div></div>"),overlay:"<div class='k-overlay'></div>",contentFrame:h("<iframe frameborder='0' title='#= title #' class='k-content-frame' src='#= content.url #'>This page requires frames in order to show content</iframe>"),resizeHandle:h("<div aria-hidden='true' class='k-resize-handle k-resize-#= data #'></div>")},le.prototype={addOverlay:function(){this.owner.wrapper.append(n.overlay)},removeOverlay:function(){this.owner.wrapper.find(y).remove()},dragstart:function(t){var n=this,a=n.owner,r=a.wrapper;if(n._preventDragging=a.trigger(O),!n._preventDragging){n.elementPadding=parseInt(r.css("padding-top"),10),n.initialPosition=i.getOffset(r,"position"),n.resizeDirection=t.currentTarget.prop("className").replace("k-resize-handle k-resize-",""),n.initialSize={width:r.outerWidth(),height:r.outerHeight()},a._updateBoundaries(),n.containerOffset=a.containment?a.containment.position:i.getOffset(a.appendTo);var o=r.offsetParent();if(o.is("html"))n.containerOffset.top=n.containerOffset.left=0;else{var s=o.css("margin-top"),l=o.css("margin-left");if(!Z.test(s)||!Z.test(l)){var d=oe(r[0]),u=d.left-n.containerOffset.left-n.initialPosition.left,c=d.top-n.containerOffset.top-n.initialPosition.top;n._relativeElMarginLeft=u>1?u:0,n._relativeElMarginTop=c>1?c:0,n.initialPosition.left+=n._relativeElMarginLeft,n.initialPosition.top+=n._relativeElMarginTop}}r.children(w).not(t.currentTarget).hide(),e(f).css(F,t.currentTarget.css(F))}},drag:function(t){if(!this._preventDragging){var n,a,r,o,s=this,l=s.owner,d=l.wrapper,u=l.options,c=u.position,p=s.resizeDirection,h=s.containerOffset,f=s.initialPosition,m=s.initialSize,g=l.containment&&!l._isPinned,v=i.support.isRtl(l.containment),_=g&&v&&l.containment.innerWidth()>l.containment.width?i.support.scrollbar():0,b=g?{top:l.containment.scrollTop(),left:l.containment.scrollLeft()}:{top:0,left:0},k=Math.max(t.x.location,0),w=Math.max(t.y.location,0);p.indexOf("e")>=0?(n=l.containment&&k-m.width>=l.maxLeft-b.left+h.left+_?l.maxLeft+_-f.left+m.width-b.left:k-f.left-h.left,d.outerWidth(ae(n,u.minWidth,u.maxWidth))):p.indexOf("w")>=0&&(n=ae((o=f.left+m.width+h.left)-k,u.minWidth,u.maxWidth),c.left=o-n-h.left-_-(s._relativeElMarginLeft||0)+b.left,l.containment&&c.left<=l.minLeft&&(c.left=l.minLeft,n=ae(o-_-c.left-h.left+b.left,u.minWidth,u.maxWidth)),d.css({left:c.left,width:n}));var y=w;l.options.pinned&&(y-=e(window).scrollTop()),p.indexOf("s")>=0?(a=y-f.top-s.elementPadding-h.top,y-m.height-s.elementPadding>=l.maxTop+h.top-b.top&&(a=l.maxTop-f.top+m.height-b.top),d.outerHeight(ae(a,u.minHeight,u.maxHeight))):p.indexOf("n")>=0&&(a=ae((r=f.top+m.height+h.top)-y,u.minHeight,u.maxHeight),c.top=r-a-h.top-(s._relativeElMarginTop||0)+b.top,c.top<=l.minTop&&l.containment&&(c.top=l.minTop,a=ae(r-c.top-h.top+b.top,u.minHeight,u.maxHeight)),d.css({top:c.top,height:a})),n&&(l.options.width=n+"px"),a&&(l.options.height=a+"px"),l.resize()}},dragend:function(t){if(!this._preventDragging){var n=this,i=n.owner,a=i.wrapper;return a.children(w).not(t.currentTarget).show(),e(f).css(F,""),i.touchScroller&&i.touchScroller.reset(),27==t.keyCode&&a.css(n.initialPosition).css(n.initialSize),i.trigger(M),!1}},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},de.prototype={dragstart:function(t){var a=this.owner,r=a.options.draggable,o=a.element,s=o.find(".k-window-actions"),l=i.getOffset(a.appendTo);this._preventDragging=a.trigger(B)||!r,this._preventDragging||a.isMaximized()||(a.initialWindowPosition=i.getOffset(a.wrapper,"position"),a.initialPointerPosition={left:a.options.position.left,top:a.options.position.top},a.startPosition={left:t.x.client-a.initialWindowPosition.left,top:t.y.client-a.initialWindowPosition.top},a._updateBoundaries(),a.containment||(s.length>0?a.minLeft=d(s)+parseInt(s.css("right"),10)-d(o):a.minLeft=20-d(o),a.minLeft-=l.left,a.minTop=-l.top),e(n.overlay).appendTo(a.wrapper).css({opacity:0}),a.wrapper.children(w).hide(),e(f).css(F,t.currentTarget.css(F)))},drag:function(t){var n,a,r=this.owner,o=r.options.position,s=r.options.draggable.axis;this._preventDragging||r.isMaximized()||(s&&"x"!==s.toLowerCase()||(n=t.x.client-r.startPosition.left,r.containment&&!r._isPinned&&(n+=r.containment.scrollLeft()),o.left=ae(n,r.minLeft,r.maxLeft)),s&&"y"!==s.toLowerCase()||(a=t.y.client-r.startPosition.top,r.containment&&!r._isPinned&&(a+=r.containment.scrollTop()),o.top=ae(a,r.minTop,r.maxTop)),i.support.transforms?e(r.wrapper).css("transform","translate("+(o.left-r.initialPointerPosition.left)+"px, "+(o.top-r.initialPointerPosition.top)+"px)"):e(r.wrapper).css(o))},_finishDrag:function(){var t=this.owner;t.wrapper.children(w).toggle(!t.options.isMinimized).end().find(y).remove(),e(f).css(F,"")},dragcancel:function(e){this._preventDragging||(this._finishDrag(),e.currentTarget.closest(v).css(this.owner.initialWindowPosition))},dragend:function(){var t=this.owner;if(!this._preventDragging&&!t.isMaximized())return e(t.wrapper).css(t.options.position).css("transform",""),this._finishDrag(),t.trigger(L),!1},destroy:function(){this._draggable&&this._draggable.destroy(),this._draggable=this.owner=null}},i.ui.plugin(se)}(window.kendo.jQuery);window.kendo=window.kendo||{};var o=kendo.Class,s=kendo.support,l={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"},d=s.browser,u=function(e){var t=Object.keys(l);t.push("transparent");var n=new RegExp("^("+t.join("|")+")(\\W|$)","i");return u=function(e){return n.exec(e)},n.exec(e)},c=o.extend({init:function(){},toHSV:function(){return this},toRGB:function(){return this},toHex:function(e){return this.toBytes().toHex(e)},toBytes:function(){return this},toCss:function(e){return"#"+this.toHex(e)},toCssRgba:function(){var e=this.toBytes();return"rgba("+e.r+", "+e.g+", "+e.b+", "+parseFloat(Number(this.a).toFixed(3))+")"},toDisplay:function(){return d.msie&&d.version<9?this.toCss():this.toCssRgba()},equals:function(e){return e===this||null!=e&&this.toCssRgba()===b(e).toCssRgba()},diff:function(e){if(null===e)return NaN;var t=this.toBytes(),n=e.toBytes();return 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 h(e.r,e.g,e.b,e.a)),e}}),p=c.extend({init:function(e,t,n,i){c.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,a=n.g,r=n.b,o=Math.min(i,a,r),s=Math.max(i,a,r),l=s-o,d=s;return 0===l?new m(0,0,d,this.a):(0!==s?(t=l/s,e=i===s?(a-r)/l:a===s?2+(r-i)/l:4+(i-a)/l,(e*=60)<0&&(e+=360)):(t=0,e=-1),new m(e,t,d,this.a))},toHSL:function(){var e,t,n=this,i=n.r,a=n.g,r=n.b,o=Math.max(i,a,r),s=Math.min(i,a,r),l=(o+s)/2;if(o===s)e=t=0;else{var d=o-s;switch(t=l>.5?d/(2-o-s):d/(o+s),o){case i:e=(a-r)/d+(a<r?6:0);break;case a:e=(r-i)/d+2;break;case r:e=(i-a)/d+4}}return new g(60*e,100*t,100*l,this.a)},toBytes:function(){return new h(255*this.r,255*this.g,255*this.b,this.a)}}),h=p.extend({init:function(e,t,n,i){p.fn.init.call(this,Math.round(e),Math.round(t),Math.round(n),i)},toRGB:function(){return new p(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(e){var t=f(this.r,2)+f(this.g,2)+f(this.b,2);return e&&e.alpha&&(t+=f(Math.round(255*this.a),2)),t},toBytes:function(){return this}});function f(e,t,n){void 0===n&&(n="0");for(var i=e.toString(16);t>i.length;)i=n+i;return i}var m=c.extend({init:function(e,t,n,i){c.fn.init.call(this),this.h=e,this.s=t,this.v=n,this.a=i},toRGB:function(){var e,t,n,i=this,a=i.h,r=i.s,o=i.v;if(0===r)e=t=n=o;else{a/=60;var s=Math.floor(a),l=a-s,d=o*(1-r),u=o*(1-r*l),c=o*(1-r*(1-l));switch(s){case 0:e=o,t=c,n=d;break;case 1:e=u,t=o,n=d;break;case 2:e=d,t=o,n=c;break;case 3:e=d,t=u,n=o;break;case 4:e=c,t=d,n=o;break;default:e=o,t=d,n=u}}return new p(e,t,n,this.a)},toHSL:function(){return this.toRGB().toHSL()},toBytes:function(){return this.toRGB().toBytes()}}),g=c.extend({init:function(e,t,n,i){c.fn.init.call(this),this.h=e,this.s=t,this.l=n,this.a=i},toRGB:function(){var e,t,n,i=this.h/360,a=this.s/100,r=this.l/100;if(0===a)e=t=n=r;else{var o=r<.5?r*(1+a):r+a-r*a,s=2*r-o;e=v(s,o,i+1/3),t=v(s,o,i),n=v(s,o,i-1/3)}return new p(e,t,n,this.a)},toHSV:function(){return this.toRGB().toHSV()},toBytes:function(){return this.toRGB().toBytes()}});function v(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 _(e){return parseFloat(parseFloat(parseInt(e,16)/255).toFixed(3))}function b(e,t){var n,i;if(null==e||"none"===e)return null;if(e instanceof c)return e;var a=e.toLowerCase();if(n=u(a))return(a="transparent"===n[1]?new p(1,1,1,0):b(l[n[1]],t)).match=[n[1]],a;if((n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(a))?i=new h(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(a))?i=new h(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),1):(n=/^#?([0-9a-f])([0-9a-f])([0-9a-f])([0-9a-f])\b/i.exec(a))?i=new h(parseInt(n[1]+n[1],16),parseInt(n[2]+n[2],16),parseInt(n[3]+n[3],16),_(n[4]+n[4])):(n=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})\b/i.exec(a))?i=new h(parseInt(n[1],16),parseInt(n[2],16),parseInt(n[3],16),_(n[4])):(n=/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(a))?i=new h(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),1):(n=/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(a))?i=new h(parseInt(n[1],10),parseInt(n[2],10),parseInt(n[3],10),parseFloat(n[4])):(n=/^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(a))?i=new p(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,1):(n=/^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))&&(i=new p(parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3])/100,parseFloat(n[4]))),i)i.match=n;else if(!t)throw new Error("Cannot parse color: "+a);return i}var k=o.extend({init:function(e){var t=this;if(1===arguments.length)for(var n=k.formats,i=this.resolveColor(e),a=0;a<n.length;a++){var r=n[a].re,o=n[a].process,s=r.exec(i);if(s){var l=o(s);t.r=l[0],t.g=l[1],t.b=l[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=t.replace(/ /g,"")).toLowerCase(),t=k.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)},isDark:function(){return this.percBrightness()<180}});k.fromBytes=function(e,t,n,i){return new h(e,t,n,null!=i?i:1)},k.fromRGB=function(e,t,n,i){return new p(e,t,n,null!=i?i:1)},k.fromHSV=function(e,t,n,i){return new m(e,t,n,null!=i?i:1)},k.fromHSL=function(e,t,n,i){return new g(e,t,n,null!=i?i:1)},k.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)]}}],k.namedColors=l,kendo.deepExtend(kendo,{parseColor:b,namedColors:l,Color:k});!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.ui.Draggable,r=n._outerWidth,o=n._outerHeight,s=e.extend,l=n.format,d=n.parseFloat,u=Array.isArray,c=Math,p=n.support,h=p.pointers,f=p.msPointers,m="change",g="slide",v=".slider",_="touchstart"+v+" mousedown"+v,b=h?"pointerdown"+v:f?"MSPointerDown"+v:_,k="touchend"+v+" mouseup"+v,w=h?"pointerup":f?"MSPointerUp"+v:k,y="moveSelection",x="keydown"+v,C="click"+v,T="mouseover"+v,S="focus"+v,I="blur"+v,D=".k-draghandle",E=".k-slider-track",A=".k-tick",F="k-disabled",z="disabled",P="tabindex",H=n.getTouches,N="aria-valuetext",R="aria-valuenow",O=i.extend({init:function(e,t){var a=this;if(i.fn.init.call(a,e,t),t=a.options,a._isHorizontal="horizontal"==t.orientation,a._isRtl=a._isHorizontal&&n.support.isRtl(e),a._position=a._isHorizontal?"left":"bottom",a._sizeFn=a._isHorizontal?"width":"height",a._outerSize=a._isHorizontal?r:o,t.tooltip.format=t.tooltip.enabled&&t.tooltip.format||"{0}",t.smallStep<=0)throw new Error("Kendo UI Slider smallStep must be a positive number.");a._createHtml(),a._trackDiv=a.wrapper.find(E),a._maxSelection=a._trackDiv[a._sizeFn](),a._sliderItemsInit(),a._reset(),a._tabindex(a.wrapper.find(D)),a[t.enabled?"enable":"disable"]();var s=n.support.isRtl(a.wrapper)?-1:1;a._keyMap={37:B(-1*s*t.smallStep),40:B(-t.smallStep),39:B(1*s*t.smallStep),38:B(+t.smallStep),35:L(t.max),36:L(t.min),33:B(+t.largeStep),34:B(-t.largeStep)},a._ariaLabel(a.wrapper.find(D)),n.notify(a)},events:[m,g],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.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-2)/((n.max-n.min)/n.smallStep),a=t._calculateItemsWidth(c.floor(q(t._distance())/q(n.smallStep)));"none"!=n.tickPlacement&&i>=2&&(e(this.element).parent().find(".k-slider-items").remove(),t._trackDiv.before(function(e,t){var n,i="<ul class='k-reset k-slider-items' role='presentation'>",a=c.floor(U(t/e.smallStep))+1;for(n=0;n<a;n++)i+="<li class='k-tick'></li>";return i+="</ul>"}(n,t._distance())),t._setItemsTitle()),t._calculateSteps(a),"none"!=n.tickPlacement&&i>=2&&n.largeStep>=n.smallStep&&(t._setItemsLargeTick(),t.wrapper.find(A).first().addClass("k-first"),t.wrapper.find(A).last().addClass("k-last"))},getSize:function(){return n.dimensions(this.wrapper)},_setItemsTitle:function(){for(var t=this.options,n=this.wrapper.find(A),i=t.min,a=n.length,r=0;r<=a;r+=1)e(n[r]).attr("title",l(t.tooltip.format,U(i))),i+=t.smallStep},_setItemsLargeTick:function(){var t,n=this,i=n.options,a=n.wrapper.find(A),r=0;if(q(i.largeStep)%q(i.smallStep)==0||n._distance()/i.largeStep>=3)for(n._isHorizontal||n._isRtl||(a=e.makeArray(a).reverse()),r=0;r<a.length;r++){t=e(a[r]);var o=U(q(n._values[r]-this.options.min));o%q(i.smallStep)==0&&o%q(i.largeStep)==0&&(t.addClass("k-tick-large").html("<span class='k-label'>"+t.attr("title")+"</span>"),0!==r&&r!==a.length-1&&t.css("line-height",t[n._sizeFn]()+"px"))}},_calculateItemsWidth:function(e){var t,n,i,a=this,r=a.options,o=parseFloat(a._trackDiv.css(a._sizeFn))+1,s=a._distance(),l=q(s)/q(r.smallStep),d=o/q(s);for(l-e>0&&(o-=q(s)%q(r.smallStep)*d),t=o/e,n=[],i=0;i<e-1;i++)n[i]=t;return n[e-1]=n[e]=t/2,a._roundWidths(n)},_roundWidths:function(e){var t,n=0,i=e.length;for(t=0;t<i;t++)n+=e[t]-c.floor(e[t]),e[t]=c.floor(e[t]);return n=c.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(c.round(i*n),10)]+=1;return t},_calculateSteps:function(e){var t,n=this,i=n.options,a=i.min,r=0,o=n._distance(),s=c.ceil(q(o)/q(i.smallStep)),l=1;if(s+=q(o)/q(i.smallStep)%1==0?1:0,e.splice(0,0,2*e[s-2]),e.splice(s-1,1,2*e.pop()),n._pixelSteps=[r],n._values=[a],0!==s){for(;l<s;)r+=(e[l-1]+e[l])/2,n._pixelSteps[l]=r,a+=i.smallStep,n._values[l]=U(a),l++;t=q(o)%q(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,a=i.options,r=c.max(a.smallStep*(i._maxSelection/i._distance()),0),o=0,s=r/2;if(i._isHorizontal?(o=e-t.startPoint,i._isRtl&&(o=i._maxSelection-o)):o=t.startPoint-e,i._maxSelection-(parseInt(i._maxSelection%r,10)-3)/2<o)return a.max;for(n=0;n<i._pixelSteps.length;n++)if(c.abs(i._pixelSteps[n]-o)-1<=s)return U(i._values[n])},_getFormattedValue:function(e,t){var i,a,r,o="",s=this.options.tooltip;return u(e)?(a=e[0],r=e[1]):t&&t.type&&(a=t.selectionStart,r=t.selectionEnd),t&&(i=t.tooltipTemplate),!i&&s.template&&(i=n.template(s.template)),u(e)||t&&t.type?o=i?i({selectionStart:a,selectionEnd:r}):(a=l(s.format,a))+" - "+(r=l(s.format,r)):(t&&(t.val=e),o=i?i({value:e}):l(s.format,e)),o},_getDraggableArea:function(){var e=this,t=n.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,n=e.element,i=e.options,a=n.find("input");2==a.length?(a.eq(0).prop("value",V(i.selectionStart)),a.eq(1).prop("value",V(i.selectionEnd))):n.prop("value",V(i.value)),e.wrapper=n.wrap(function(e,t,n){var i=n?" k-slider-horizontal":" k-slider-vertical",a=e.style?e.style:t.attr("style"),r=t.attr("class")?" "+t.attr("class"):"",o="";"bottomRight"==e.tickPlacement?o=" k-slider-bottomright":"topLeft"==e.tickPlacement&&(o=" k-slider-topleft");return"<div class='k-widget k-slider"+i+r+"'"+(a=a?" style='"+a+"'":"")+"><div class='k-slider-track-wrap"+o+"'></div></div>"}(i,n,e._isHorizontal)).hide().parents(".k-slider"),i.showButtons&&e.wrapper.find(".k-slider-track-wrap").after(M(i,"increase",e._isHorizontal,e._isRtl)).before(M(i,"decrease",e._isHorizontal,e._isRtl)),n.before(function(e,n,i){var a,r,o,s=n.is("input")?1:2,l=2==s?e.leftDragHandleTitle:e.dragHandleTitle,d=e.value,u=e.selectionStart,c=e.selectionEnd;1===s?null!==(a=n.val())&&a!==t&&"null"!==a&&(null!==d&&d!==t||(d=a)):(r=n.find("input").eq(0).val(),o=n.find("input").eq(1).val(),null!==r&&r!==t&&"null"!==r&&(null!==u&&u!==t||(u=r)),null!==o&&o!==t&&"null"!==o&&(null!==c&&c!==t||(c=o)));return"<div class='k-slider-track'><div class='k-slider-selection'>\x3c!-- --\x3e</div><span tabindex='0' class='k-draghandle' title='"+l+"' role='slider' "+(!1===i?"aria-orientation='vertical' ":"")+"aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(s>1?u||e.min:d||e.min)+"'></span>"+(s>1?"<span tabindex='0' class='k-draghandle' title='"+e.rightDragHandleTitle+"'role='slider' "+(!1===i?"aria-orientation='vertical' ":"")+"aria-valuemin='"+e.min+"' aria-valuemax='"+e.max+"' aria-valuenow='"+(c||e.max)+"'></span>":"")+"</div>"}(i,n,e._isHorizontal))},_focus:function(t){var n=this,i=t.target,a=n.value(),r=n._drag;r||(i==n.wrapper.find(D).eq(0)[0]?(r=n._firstHandleDrag,n._activeHandle=0):(r=n._lastHandleDrag,n._activeHandle=1),a=a[n._activeHandle]),e(i).addClass("k-focus k-selected"),r&&(n._activeHandleDrag=r,r.selectionStart=n.options.selectionStart,r.selectionEnd=n.options.selectionEnd,r._updateTooltip(a))},_focusWithMouse:function(t){t=e(t);var n=this,i=t.is(D)?t.index():0;window.setTimeout((function(){n.wrapper.find(D)[2==i?1:0].focus()}),1),n._setTooltipTimeout()},_blur:function(t){var n=this,i=n._activeHandleDrag;e(t.target).removeClass("k-focus k-selected"),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(){window.clearTimeout(this._tooltipTimeout);var e=this._drag||this._activeHandleDrag;e&&e.tooltipDiv&&e.tooltipDiv.stop(!0,!1).css("opacity",1)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._form=a.on("reset",t._formResetHandler.bind(t)))},min:function(e){if(!e)return this.options.min;this.setOptions({min:e})},max:function(e){if(!e)return this.options.max;this.setOptions({max:e})},setOptions:function(e){i.fn.setOptions.call(this,e),this._sliderItemsInit(),this._refresh()},destroy:function(){this._form&&this._form.off("reset",this._formResetHandler),i.fn.destroy.call(this)}});function M(e,t,n){var i="";return i=n?"increase"===t?"k-i-arrow-e":"k-i-arrow-w":"increase"==t?"k-i-arrow-n":"k-i-arrow-s","<a role='button' class='k-button k-button-md k-rounded-full k-button-solid k-button-solid-base k-icon-button k-button-"+t+"' title='"+e[t+"ButtonTitle"]+"' aria-label='"+e[t+"ButtonTitle"]+"'><span class='k-button-icon k-icon "+i+"'></span></a>"}function B(e){return function(t){return t+e}}function L(e){return function(){return e}}function V(e){return(e+"").replace(".",n.cultures.current.numberFormat["."])}function U(e){var t,n;return t=function(e){var t=e.toString(),n=0;return(t=t.split("."))[1]&&(n=t[1].length),n>10?10:n}(e=parseFloat(e,10)),n=c.pow(10,t||0),c.round(e*n)/n}function W(e,n){var i=d(e.getAttribute(n));return null===i&&(i=t),i}function j(e){return void 0!==e}function q(e){return 1e4*e}var G=O.extend({init:function(n,i){var a,r=this;n.type="text",i=s({},{value:W(n,"value"),min:W(n,"min"),max:W(n,"max"),smallStep:W(n,"step")},i),n=e(n),i&&i.enabled===t&&(i.enabled=!n.is("[disabled]")),O.fn.init.call(r,n,i),j((i=r.options).value)&&null!==i.value||(i.value=i.min,n.prop("value",V(i.min))),i.value=c.max(c.min(i.value,i.max),i.min),a=r.wrapper.find(D),r._selection=new G.Selection(a,r,i),r._drag=new G.Drag(a,"",r,i),r._refreshAriaAttr(i.value)},options:{name:"Slider",showButtons:!0,increaseButtonTitle:"Increase",decreaseButtonTitle:"Decrease",dragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},value:null},enable:function(t){var i,a,r=this,o=r.options;if(r.disable(),!1!==t){if(r.wrapper.removeClass(F),r.wrapper.find("input").prop(z,!1),i=function(t){var n=H(t)[0];if(n){var i=r._isHorizontal?n.location.pageX:n.location.pageY,a=r._getDraggableArea(),o=e(t.target);o.hasClass("k-draghandle")?o.addClass("k-focus k-selected"):(r._update(r._getValueFromPosition(i,a)),r._focusWithMouse(t.target),r._drag.dragstart(t),t.preventDefault())}},r.wrapper.find(".k-tick, .k-slider-track").on(b,i).end().on(b,(function(){e(document.documentElement).one("selectstart",n.preventDefault)})).on(w,(function(){r._drag._end()})),r.wrapper.find(D).attr(P,0).on(k,(function(){r._setTooltipTimeout()})).on(C,(function(e){r._focusWithMouse(e.target),e.preventDefault()})).on(S,r._focus.bind(r)).on(I,r._blur.bind(r)),a=function(e){var t=r._nextValueByIndex(r._valueIndex+1*e);r._setValueInRange(t),r._drag._updateTooltip(t)},o.showButtons){var s=function(e,t){this._clearTooltipTimeout(),(1===e.which||p.touch&&0===e.which)&&(a(t),this.timeout=setTimeout(function(){this.timer=setInterval((function(){a(t)}),60)}.bind(this),200))}.bind(r);r.wrapper.find(".k-button").on(k,function(e){this._clearTimer(),r._focusWithMouse(e.target)}.bind(r)).on(T,(function(t){e(t.currentTarget).addClass("k-hover")})).on("mouseout"+v,function(t){e(t.currentTarget).removeClass("k-hover"),this._clearTimer()}.bind(r)).on(_,(function(t){var n=e(t.target).closest(".k-button").is(".k-button-increase")?1:-1;s(t,n)})).on("click",n.preventDefault)}r.wrapper.find(D).off(x,!1).on(x,this._keydown.bind(r)),o.enabled=!0}},disable:function(){var t=this;t.wrapper.addClass(F),e(t.element).prop(z,z),t.wrapper.find(".k-button").off(_).on(_,(function(t){t.preventDefault(),e(this).addClass("k-active")})).off(k).on(k,(function(t){t.preventDefault(),e(this).removeClass("k-active")})).off("mouseleave"+v).on("mouseleave"+v,n.preventDefault).off(T).on(T,n.preventDefault),t.wrapper.find(".k-tick, .k-slider-track").off(b).off(w),t.wrapper.find(D).attr(P,-1).off(k).off(x).off(C).off(S).off(I),t.options.enabled=!1},_update:function(e){var t=this,n=t.value()!=e;t.value(e),n&&t.trigger(m,{value:t.options.value})},value:function(e){var t=this,n=t.options;if(e=U(e),isNaN(e))return n.value;e>=n.min&&e<=n.max&&n.value!=e&&(t.element.prop("value",V(e)),n.value=e,t._refreshAriaAttr(e),t._refresh())},_refresh:function(){this.trigger(y,{value:this.options.value})},_refreshAriaAttr:function(e){var t,n=this._drag;t=n&&n._tooltipDiv?n._tooltipDiv.text():this._getFormattedValue(e,null),this.wrapper.find(D).attr(R,e).attr(N,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 t=this,n=t.options;e=U(e),isNaN(e)?t._update(n.min):(e=c.max(c.min(e,n.max),n.min),t._update(e))},_nextValueByIndex:function(e){var t=this._values.length;return this._isRtl&&(e=t-1-e),this._values[c.max(0,c.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;O.fn.destroy.call(e),e.wrapper.off(v).find(".k-button").off(v).end().find(D).off(v).end().find(".k-tick, .k-slider-track").off(v).end(),e._drag.draggable.destroy(),e._drag._removeTooltip(!0)}});G.Selection=function(e,t,n){function i(i){var a=i-n.min,r=t._valueIndex=c.ceil(U(a/n.smallStep)),o=parseInt(t._pixelSteps[r],10),s=t._trackDiv.find(".k-slider-selection"),l=t._isRtl?2:0;s[t._sizeFn](t._isRtl?t._maxSelection-o:o),e.css(t._position,o-l)}i(n.value),t.bind([g,y],(function(e){i(parseFloat(e.value,10))})),t.bind(m,(function(e){i(parseFloat(e.sender.value(),10))}))},G.Drag=function(e,t,n,i){var r=this;r.owner=n,r.options=i,r.element=e,r.type=t,r.draggable=new a(e,{distance:0,dragstart:r._dragstart.bind(r),drag:r.drag.bind(r),dragend:r.dragend.bind(r),dragcancel:r.dragcancel.bind(r)}),e.click(!1),e.on("dragstart",(function(e){e.preventDefault()}))},G.Drag.prototype={dragstart:function(e){this.owner._activeDragHandle=this,this.draggable.userEvents.cancel(),this._dragstart(e),this.dragend()},_dragstart:function(t){var n=this,i=n.owner,a=n.options;a.enabled?(this.owner._activeDragHandle=this,i.element.off(T),i.wrapper.find(".k-focus").removeClass("k-focus k-selected"),n.element.addClass("k-focus k-selected"),e(document.documentElement).css("cursor","pointer"),n.draggableArea=i._getDraggableArea(),n.step=c.max(a.smallStep*(i._maxSelection/i._distance()),0),n.type?(n.selectionStart=a.selectionStart,n.selectionEnd=a.selectionEnd,i._setZIndex(n.type)):n.oldVal=n.val=a.value,n._removeTooltip(!0),n._createTooltip()):t.preventDefault()},_createTooltip:function(){var t,i=this,a=i.owner,r=i.options.tooltip,o="",s=e(window);r.enabled&&(r.template&&(i.tooltipTemplate=n.template(r.template)),e(".k-slider-tooltip").remove(),i.tooltipDiv=e("<div class='k-tooltip k-slider-tooltip'>\x3c!-- --\x3e</div>").appendTo(document.body),o=a._getFormattedValue(i.val||a.value(),i),i.type||(t="k-callout-"+(a._isHorizontal?"s":"e"),i.tooltipInnerDiv="<div class='k-callout "+t+"'>\x3c!-- --\x3e</div>",o+=i.tooltipInnerDiv),i.tooltipDiv.html(o),i._scrollOffset={top:s.scrollTop(),left:n.scrollLeft(s)},i.moveTooltip())},drag:function(e){var t,n=this,i=n.owner,a=e.x.location,r=e.y.location,o=n.draggableArea.startPoint,s=n.draggableArea.endPoint;e.preventDefault(),i._isHorizontal?i._isRtl?n.val=n.constrainValue(a,o,s,a<s):n.val=n.constrainValue(a,o,s,a>=s):n.val=n.constrainValue(r,s,o,r<=s),n.oldVal!=n.val&&(n.oldVal=n.val,n.type?("firstHandle"==n.type?n.val<n.selectionEnd?n.selectionStart=n.val:n.selectionStart=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(g,t)),n._updateTooltip(n.val)},_updateTooltip:function(e){var t=this,n="";t.options.tooltip.enabled&&(t.tooltipDiv||t._createTooltip(),n=t.owner._getFormattedValue(U(e),t),t.type||(n+=t.tooltipInnerDiv),t.tooltipDiv.html(n),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.owner;return e._focusWithMouse(this.element),e.element.on(T),!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,i,a,s,l=this,d=l.owner,u=0,c=0,p=l.element,h=n.getOffset(p),f=e(window),m=l.tooltipDiv.find(".k-callout"),g=r(l.tooltipDiv),v=o(l.tooltipDiv);l.type?(t=d.wrapper.find(D),h=n.getOffset(t.eq(0)),i=n.getOffset(t.eq(1)),d._isHorizontal?(u=i.top,c=h.left+(i.left-h.left)/2):(u=h.top+(i.top-h.top)/2,c=i.left),s=r(t.eq(0))+16):(u=h.top,c=h.left,s=r(p)+16),d._isHorizontal?(c-=parseInt((g-d._outerSize(p))/2,10),u-=v+8+(m.length?m.height():0)):(u-=parseInt((v-d._outerSize(p))/2,10),c-=g+8+(m.length?m.width():0)),d._isHorizontal?(u+=a=l._flip(u,v,s,o(f)+l._scrollOffset.top),c+=l._fit(c,g,r(f)+l._scrollOffset.left)):(a=l._flip(c,g,s,r(f)+l._scrollOffset.left),u+=l._fit(u,v,o(f)+l._scrollOffset.top),c+=a),a>0&&m&&(m.removeClass(),m.addClass("k-callout k-callout-"+(d._isHorizontal?"n":"w"))),l.tooltipDiv.css({top:u,left:c})},_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 a=0;return e+t>i&&(a+=-(n+t)),e+a<0&&(a+=n+t),a},constrainValue:function(e,t,n,i){var a=this;return t<e&&e<n?a.owner._getValueFromPosition(e,a.draggableArea):i?a.options.max:a.options.min}},n.ui.plugin(G);var K=O.extend({init:function(n,i){var a=this,r=e(n).find("input"),o=r.eq(0)[0],l=r.eq(1)[0];o.type="text",l.type="text",i&&i.showButtons&&(window.console&&window.console.warn("showbuttons option is not supported for the range slider, ignoring"),i.showButtons=!1),(i=s({},{selectionStart:W(o,"value"),min:W(o,"min"),max:W(o,"max"),smallStep:W(o,"step")},{selectionEnd:W(l,"value"),min:W(l,"min"),max:W(l,"max"),smallStep:W(l,"step")},i))&&i.enabled===t&&(i.enabled=!r.is("[disabled]")),O.fn.init.call(a,n,i),j((i=a.options).selectionStart)&&null!==i.selectionStart||(i.selectionStart=i.min,r.eq(0).prop("value",V(i.min))),j(i.selectionEnd)&&null!==i.selectionEnd||(i.selectionEnd=i.max,r.eq(1).prop("value",V(i.max)));var d=a.wrapper.find(D);this._selection=new K.Selection(d,a,i),a._firstHandleDrag=new G.Drag(d.eq(0),"firstHandle",a,i),a._lastHandleDrag=new G.Drag(d.eq(1),"lastHandle",a,i),a._refreshAriaAttr(i.selectionStart,i.selectionEnd)},options:{name:"RangeSlider",leftDragHandleTitle:"drag",rightDragHandleTitle:"drag",tooltip:{format:"{0:#,#.##}"},selectionStart:null,selectionEnd:null},enable:function(t){var i,a=this,r=a.options;a.disable(),!1!==t&&(a.wrapper.removeClass(F),a.wrapper.find("input").prop(z,!1),i=function(t){var n=H(t)[0];if(n){var i,o,s,l=a._isHorizontal?n.location.pageX:n.location.pageY,d=a._getDraggableArea(),u=a._getValueFromPosition(l,d),c=e(t.target);if(c.hasClass("k-draghandle"))return a.wrapper.find(".k-focus").removeClass("k-focus k-selected"),void c.addClass("k-focus k-selected");u<r.selectionStart?(i=u,o=r.selectionEnd,s=a._firstHandleDrag):u>a.selectionEnd?(i=r.selectionStart,o=u,s=a._lastHandleDrag):u-r.selectionStart<=r.selectionEnd-u?(i=u,o=r.selectionEnd,s=a._firstHandleDrag):(i=r.selectionStart,o=u,s=a._lastHandleDrag),s.dragstart(t),a._setValueInRange(i,o),a._focusWithMouse(s.element)}},a.wrapper.find(".k-tick, .k-slider-track").on(b,i).end().on(b,(function(){e(document.documentElement).one("selectstart",n.preventDefault)})).on(w,(function(){a._activeDragHandle&&a._activeDragHandle._end()})),a.wrapper.find(D).attr(P,0).on(k,(function(){a._setTooltipTimeout()})).on(C,(function(e){a._focusWithMouse(e.target),e.preventDefault()})).on(S,a._focus.bind(a)).on(I,a._blur.bind(a)),a.wrapper.find(D).off(x,n.preventDefault).eq(0).on(x,function(e){this._keydown(e,"firstHandle")}.bind(a)).end().eq(1).on(x,function(e){this._keydown(e,"lastHandle")}.bind(a)),a.options.enabled=!0)},disable:function(){var e=this;e.wrapper.addClass(F),e.wrapper.find("input").prop(z,z),e.wrapper.find(".k-tick, .k-slider-track").off(b).off(w),e.wrapper.find(D).attr(P,-1).off(k).off(x).off(C).off(S).off(I),e.options.enabled=!1},_keydown:function(e,t){var n,i,a,r=this,o=r.options.selectionStart,s=r.options.selectionEnd;e.keyCode in r._keyMap&&(r._clearTooltipTimeout(),"firstHandle"==t?(a=r._activeHandleDrag=r._firstHandleDrag,(o=r._keyMap[e.keyCode](o))>s&&(s=o)):(a=r._activeHandleDrag=r._lastHandleDrag,o>(s=r._keyMap[e.keyCode](s))&&(o=s)),r._setValueInRange(U(o),U(s)),n=Math.max(o,r.options.selectionStart),i=Math.min(s,r.options.selectionEnd),a.selectionEnd=Math.max(i,r.options.selectionStart),a.selectionStart=Math.min(n,r.options.selectionEnd),a._updateTooltip(r.value()[r._activeHandle]),e.preventDefault())},_update:function(e,t){var n=this,i=n.value(),a=i[0]!=e||i[1]!=t;n.value([e,t]),a&&n.trigger(m,{values:[e,t],value:[e,t]})},value:function(e){return e&&e.length?this._value(e[0],e[1]):this._value()},_value:function(e,t){var n=this,i=n.options,a=i.selectionStart,r=i.selectionEnd;if(isNaN(e)&&isNaN(t))return[a,r];e=U(e),t=U(t),e>=i.min&&e<=i.max&&t>=i.min&&t<=i.max&&e<=t&&(a==e&&r==t||(n.element.find("input").eq(0).prop("value",V(e)).end().eq(1).prop("value",V(t)),i.selectionStart=e,i.selectionEnd=t,n._refresh(),n._refreshAriaAttr(e,t)))},values:function(e,t){return u(e)?this._value(e[0],e[1]):this._value(e,t)},_refresh:function(){var e=this,t=e.options;e.trigger(y,{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,a=i.wrapper.find(D),r=i._activeHandleDrag;n=i._getFormattedValue([e,t],r),a.eq(0).attr(R,e),a.eq(1).attr(R,t),a.attr(N,n)},_setValueInRange:function(e,t){var n=this.options;e=c.max(c.min(e,n.max),n.min),t=c.max(c.min(t,n.max),n.min),e==n.max&&t==n.max&&this._setZIndex("firstHandle"),this._update(c.min(e,t),c.max(e,t))},_setZIndex:function(t){this.wrapper.find(D).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,a=n[1].value;e.values(""===i||isNaN(i)?t.min:i,""===a||isNaN(a)?t.max:a)}))},destroy:function(){var e=this;O.fn.destroy.call(e),e.wrapper.off(v).find(".k-tick, .k-slider-track").off(v).end().find(D).off(v),e._firstHandleDrag.draggable.destroy(),e._lastHandleDrag.draggable.destroy()}});K.Selection=function(e,t,n){function i(i){var a=(i=i||[])[0]-n.min,r=i[1]-n.min,o=c.ceil(U(a/n.smallStep)),s=c.ceil(U(r/n.smallStep)),l=t._pixelSteps[o],d=t._pixelSteps[s],u=t._isRtl?2:0;e.eq(0).css(t._position,l-u).end().eq(1).css(t._position,d-u),function(e,n){var i,a,r=t._trackDiv.find(".k-slider-selection");i=c.abs(e-n),r[t._sizeFn](i),t._isRtl?(a=c.max(e,n),r.css("right",t._maxSelection-a-1)):(a=c.min(e,n),r.css(t._position,a-1))}(l,d)}i(t.value()),t.bind([m,g,y],(function(e){i(e.values)}))},n.ui.plugin(K)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.ui,r="<span class='k-badge-icon k-icon k-i-#= icon #'></span>",o="<span class='k-badge-icon k-svg-icon'>#= icon #</span>",s=i.extend({init:function(e,t){var a=this;i.fn.init.call(a,e,t),a._content(),a._appearance(),n.notify(a)},destroy:function(){i.fn.destroy.call(this)},options:{name:"Badge",cutoutBorder:!1,data:{},fillMode:"solid",icon:"",max:1/0,position:"inline",align:"",rounded:"medium",roundings:{small:"sm",medium:"md",large:"lg",full:"full"},sizes:{small:"sm",medium:"md",large:"lg"},size:"medium",template:null,text:"",themeColor:"secondary",visible:!0,_classNames:[]},_content:function(){var e=this,t=e.options.text,i=e.options.template,a=e.options.data,r=e.options.icon;if(null!==i)return e._text=t,e._template=n.template(i).bind(e),void e.element.html(e._template(a));""===r?""===t?e.text(e.element.html()):e.text(t):e.icon(r)},_appearance:function(){var e=this;e._themeColor=e.options.themeColor,e._shape=e.options.shape,e._sizes=e.options.sizes,e._size=e.options.size,e._fillMode=e.options.fillMode,e._rounded=e.options.rounded,e._roundings=e.options.roundings,e._cutoutBorder=e.options.cutoutBorder,e._align=e.options.align,e._position=e.options.position,e._visible=e.options.visible,e._updateClassNames()},_updateClassNames:function(){var e=this,n=["k-badge"],i=e.options._classNames,a=e._themeColor,r=e._shape,o=e._sizes,s=e._size,l=o[s]===t?s:o[s],d=e._fillMode,u=e._rounded,c=e._roundings,p=c[u]===t?u:c[u],h=e._cutoutBorder,f=e._align,m=e._position,g=e._visible;e.element.removeClass((function(t,n){0===n.indexOf("k-")&&-1===i.indexOf(n)&&e.element.removeClass(n)})),"string"==typeof d&&""!==d&&n.push("k-badge-"+d),"string"==typeof a&&""!==a&&n.push("k-badge-"+d+"-"+a),"string"==typeof s&&""!==s&&n.push("k-badge-"+l),"string"==typeof u&&""!==u&&n.push("k-rounded-"+p),"string"==typeof r&&""!==r&&n.push("k-badge-"+r),"boolean"==typeof h&&!0===h&&n.push("k-badge-border-cutout"),"string"==typeof m&&""!==m&&n.push("k-badge-"+m),"string"==typeof m&&""!==m&&"inline"!==m&&"string"==typeof f&&2==f.split(" ").length&&n.push("k-"+f.replace(" ","-")),!1===g&&n.push("k-hidden"),e.element.addClass(n.join(" "))},setOptions:function(e){var t=this;t.element.removeClass((function(e,n){n.indexOf("k-")>=0&&t.element.removeClass(n)})),i.fn.setOptions.call(t,e),t._content(),t._appearance()},text:function(e){var n=this,i=n.options.max;if(0===arguments.length||e===t)return n._text;n._text=e,!0!==e&&!1!==e&&null!==e?"string"!=typeof e?"number"!=typeof e?"object"==typeof e&&"toString"in e&&n.element.html(e.toString()):e>i?n.element.html(i+"+"):n.element.html(e):n.element.html(e):n.element.html("")},icon:function(e){var i,a=this;return 0===arguments.length||e===t?a._icon:(a._icon=e,0===e.indexOf("<svg")?(i=n.template(o),void a.element.html(i({icon:e}))):(i=n.template(r),void a.element.html(i({icon:e}))))},themeColor:function(e){var n=this;if(0===arguments.length||e===t)return n._themeColor;n._themeColor=e,n._updateClassNames()},rounded:function(e){var n=this;if(0===arguments.length||e===t)return n._rounded;n._rounded=e,n._updateClassNames()},hide:function(){this._visible=!1,this._updateClassNames()},show:function(){this._visible=!0,this._updateClassNames()}});a.plugin(s)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.html,r=n.ui,o=n.keys,s="click",l=n.support.mousedown,d=n.support.mouseup,u=".kendoButton",c="disabled",p="k-focus",h="k-active";n.setDefaults("button",{icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",badge:null});var f=i.extend({init:function(t,r){var o=this;i.fn.init.call(o,t,r),t=o.wrapper=o.element,r=o.options,a.renderButton(t,e.extend({},r)),t.attr("role","button"),r.enable=r.enable&&r.enabled&&!t.attr(c),o.enable(r.enable),r.enable&&o._tabindex(),o._badge(),t.on(s+u,o._click.bind(o)).on("focus"+u,o._focus.bind(o)).on("blur"+u,o._blur.bind(o)).on("keydown"+u,o._keydown.bind(o)).on("keyup"+u,o._removeActive.bind(o)).on(l+u,o._addActive.bind(o)).on(d+u+" mouseout"+u,o._removeActive.bind(o)),n.notify(o)},destroy:function(){var e=this;e.wrapper.off(u),e.badge&&e.badge.destroy(),i.fn.destroy.call(e)},events:[s],options:{name:"Button",enable:!0,enabled:!0,icon:"",iconClass:"",spriteCssClass:"",imageUrl:"",badge:null,size:"medium",shape:"rectangle",rounded:"medium",fillMode:"solid",themeColor:"base"},_isNativeButton:function(){return"button"==this.element.prop("tagName").toLowerCase()},_click:function(e){this.options.enable&&this.trigger(s,{event:e})&&e.preventDefault()},_focus:function(){this.options.enable&&this.element.addClass(p)},_blur:function(){var e=this;e.element.removeClass(p),setTimeout((function(){e.element.removeClass(h)}))},_keydown:function(e){var t=this;e.keyCode!=o.ENTER&&e.keyCode!=o.SPACEBAR||(t._addActive(),t._isNativeButton()||(e.keyCode==o.SPACEBAR&&e.preventDefault(),t._click(e)))},_removeActive:function(){this.element.removeClass(h)},_addActive:function(){this.options.enable&&this.element.addClass(h)},enable:function(e){var n=this,i=n.element;e===t&&(e=!0),e=!!e,n.options.enable=e,i.toggleClass("k-disabled",!e).attr("aria-disabled",!e).attr(c,!e),e&&n._tabindex();try{i.trigger("blur")}catch(e){}},_badge:function(){var n,i=this,a=i.options.badge;null!==a&&a!==t&&(a.constructor!==Object&&(a={text:a}),a.position!==t&&""!==a.position||(a.position="edge",a.align!==t&&""!==a.align||(a.align="top end")),a._classNames=["k-button-badge"],i.element.addClass("k-badge-container"),n=e("<span />").appendTo(i.element),i.badge=new r.Badge(n,a))}});!1===f.fn.hasOwnProperty("defaults")&&Object.defineProperty(f.fn,"defaults",{get:function(){return n.defaults.button}}),n.cssProperties.registerPrefix("Button","k-button-"),n.cssProperties.registerValues("Button",[{prop:"fillMode",values:n.cssProperties.fillModeValues.concat(["link"])},{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),n.ui.plugin(f)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.Observable,a=n.data.ObservableObject,r=n.data.ObservableArray,o={}.toString,s={},l=n.Class,d="value",u="source",c="events",p="checked",h=!0,f="change";!function(){var e=document.createElement("a");try{delete e.test}catch(e){h=!1}}();var m=i.extend({init:function(e,t){var n=this;i.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 i,n._access=function(e){n.dependencies[e.field]=!0},n.observable&&(n._change=function(e){n.change(e)},n.source.bind(f,n._change))},_parents:function(){var t=this.parents,n=this.get();if(n&&"function"==typeof n.parent){var i=n.parent();e.inArray(i,t)<0&&(t=[i].concat(t))}return t},change:function(e){var t,n,i=e.field,a=this;if("this"===a.path)a.trigger(f,e);else for(t in a.dependencies)if(0===t.indexOf(i)&&(!(n=t.charAt(i.length))||"."===n||"["===n)){a.trigger(f,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])instanceof a&&(o=n.get(r));if(o===t)for(n=e.source;o===t&&n;)(n=n.parent())instanceof a&&(o=n.get(r));return"function"==typeof o&&((i=r.lastIndexOf("."))>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(f,e._change).bind(f,e._change)),e.stop(e.source),o},set:function(e){var t=this.currentSource||this.source,i=n.getter(this.path)(t);"function"==typeof i?t!==this.source?i.call(t,this.source,e):i.call(t,e):t.set(this.path,e)},destroy:function(){this.observable&&(this.source.unbind(f,this._change),this.currentSource&&this.currentSource.unbind(f,this._change)),this.unbind()}}),g=m.extend({get:function(){var e,t=this.source,n=this.path,i=0;for(e=t.get(n);!e&&t;)(t=this.parents[++i])instanceof a&&(e=t.get(n));if(e)return e.bind(t)}}),v=m.extend({init:function(e,t,n){m.fn.init.call(this,e,t),this.template=n},render:function(e){var t;return this.start(this.source),t=n.render(this.template,e),this.stop(this.source),t}}),_=l.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).bind(f,(function(e){n.refresh(t||e)})),n.refresh(t)},destroy:function(){}}),b=_.extend({dataType:function(){return(this.element.getAttribute("data-"+n.ns+"type")||this.element.type||"text").toLowerCase()},parsedValue:function(){return this._parseValue(this.element.value,this.dataType())},_parseValue:function(e,t){return"date"==t?e=n.parseDate(e,"yyyy-MM-dd"):"datetime-local"==t?e=n.parseDate(e,["yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mm"]):"number"==t?e=n.parseFloat(e):"boolean"==t&&(e=e.toLowerCase(),e=null!==n.parseFloat(e)?Boolean(n.parseFloat(e)):"true"===e.toLowerCase()),e}});function k(t,i,a){return _.extend({init:function(e,t,n){var i=this;_.fn.init.call(i,e.element[0],t,n),i.widget=e,i._dataBinding=i.dataBinding.bind(i),i._dataBound=i.dataBound.bind(i),i._itemChange=i.itemChange.bind(i)},itemChange:function(e){D(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,a=e.removedItems||i.items();for(t=0,n=a.length;t<n;t++)F(a[t],!1)},_ns:function(t){t=t||n.ui;var i=[n.ui,n.dataviz.ui,n.mobile.ui];return i.splice(e.inArray(t,i),1),i.unshift(t),n.rolesFromNamespaces(i)},dataBound:function(e){var a,r,o,s,l=this.widget,d=e.addedItems||l.items(),u=l[i],c=n.data.HierarchicalDataSource;if(!(c&&u instanceof c)&&d.length)for(o=e.addedDataItems||u.flatView(),s=this.bindings[t]._parents(),a=0,r=o.length;a<r;a++)d[a]&&D(d[a],o[a],this._ns(e.ns),[o[a]].concat(s))},refresh:function(e){var r,o,s,l=this,d=l.widget;(e=e||{}).action||(l.destroy(),d.bind("dataBinding",l._dataBinding),d.bind("dataBound",l._dataBound),d.bind("itemChange",l._itemChange),r=l.bindings[t].get(),d[i]instanceof n.data.DataSource&&d[i]!=r&&(r instanceof n.data.DataSource?d[a](r):r&&r._dataSource?d[a](r._dataSource):(o=n.ui.Select&&d instanceof n.ui.Select,s=n.ui.MultiSelect&&d instanceof n.ui.MultiSelect,n.ui.DropDownTree&&d instanceof n.ui.DropDownTree?d.treeview[i].data(r):d[i].data(r),l.bindings.value&&(o||s)&&d.value(P(l.bindings.value.get(),d.options.dataValueField)))))},destroy:function(){var e=this.widget;e.unbind("dataBinding",this._dataBinding),e.unbind("dataBound",this._dataBound),e.unbind("itemChange",this._itemChange)}})}s.attr=_.extend({refresh:function(e){this.element.setAttribute(e,this.bindings.attr[e].get())}}),s.css=_.extend({init:function(e,t,n){_.fn.init.call(this,e,t,n),this.classes={}},refresh:function(t){var n=e(this.element),i=this.bindings.css[t];(this.classes[t]=i.get())?n.addClass(t):n.removeClass(t)}}),s.style=_.extend({refresh:function(e){this.element.style[e]=this.bindings.style[e].get()||""}}),s.enabled=_.extend({refresh:function(){this.bindings.enabled.get()?this.element.removeAttribute("disabled"):this.element.setAttribute("disabled","disabled")}}),s.readonly=_.extend({refresh:function(){this.bindings.readonly.get()?this.element.setAttribute("readonly","readonly"):this.element.removeAttribute("readonly")}}),s.disabled=_.extend({refresh:function(){this.bindings.disabled.get()?this.element.setAttribute("disabled","disabled"):this.element.removeAttribute("disabled")}}),s.events=_.extend({init:function(e,t,n){_.fn.init.call(this,e,t,n),this.handlers={}},refresh:function(t){var n=e(this.element),i=this.bindings.events[t],a=this.handlers[t];a&&n.off(t,a),a=this.handlers[t]=i.get(),n.on(t,i.source,a)},destroy:function(){var t,n=e(this.element);for(t in this.handlers)n.off(t,this.handlers[t])}}),s.text=_.extend({refresh:function(){var t=this.bindings.text.get(),i=this.element.getAttribute("data-"+n.ns+"format")||"";null==t&&(t=""),e(this.element).text(n.toString(t,i))}}),s.visible=_.extend({refresh:function(){this.bindings.visible.get()?this.element.style.display="":this.element.style.display="none"}}),s.invisible=_.extend({refresh:function(){this.bindings.invisible.get()?this.element.style.display="none":this.element.style.display=""}}),s.html=_.extend({refresh:function(){this.element.innerHTML=this.bindings.html.get()}}),s.value=b.extend({init:function(t,n,i){b.fn.init.call(this,t,n,i),this._change=this.change.bind(this),this.eventName=i.valueUpdate||f,e(this.element).on(this.eventName,this._change),this._initChange=!1},change:function(){this._initChange=this.eventName!=f,this.bindings.value.set(this.parsedValue()),this._initChange=!1},refresh:function(){if(!this._initChange){var e=this.bindings.value.get();null==e&&(e="");var t=this.dataType();"date"==t?e=n.toString(e,"yyyy-MM-dd"):"datetime-local"==t&&(e=n.toString(e,"yyyy-MM-ddTHH:mm:ss")),this.element.value=e}this._initChange=!1},destroy:function(){e(this.element).off(this.eventName,this._change)}}),s.source=_.extend({init:function(e,t,i){_.fn.init.call(this,e,t,i);var a=this.bindings.source.get();a instanceof n.data.DataSource&&!1!==i.autoBind&&a.fetch()},refresh:function(e){var t=this,i=t.bindings.source.get();i instanceof r||i instanceof n.data.DataSource?"add"==(e=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,i=this.container().nodeName.toLowerCase();return t||(t="select"==i?e.valueField||e.textField?n.format('<option value="#:{0}#">#:{1}#</option>',e.valueField||e.textField,e.textField||e.valueField):"<option>#:data#</option>":"tbody"==i?"<tr><td>#:data#</td></tr>":"ul"==i||"ol"==i?"<li>#:data#</li>":"#:data#",t=n.template(t)),t},add:function(t,i){var a,r,o,s,l=this.container(),d=l.cloneNode(!1),u=l.children[t];if(e(d).html(n.render(this.template(),i)),d.children.length)for(a=this.bindings.source._parents(),r=0,o=i.length;r<o;r++)s=d.children[0],l.insertBefore(s,u||null),D(s,i[r],this.options.roles,[i[r]].concat(a))},remove:function(e,t){var n,i=this.container();for(n=0;n<t.length;n++){var a=i.children[e];F(a,!0),a.parentNode==i&&i.removeChild(a)}},render:function(){var t,i,a,s=this.bindings.source.get(),l=this.container(),d=this.template();if(null!=s)if(s instanceof n.data.DataSource&&(s=s.view()),s instanceof r||"[object Array]"===o.call(s)||(s=[s]),this.bindings.template){if(z(l,!0),e(l).html(this.bindings.template.render(s)),l.children.length)for(t=this.bindings.source._parents(),i=0,a=s.length;i<a;i++)D(l.children[i],s[i],this.options.roles,[s[i]].concat(t))}else e(l).html(n.render(d,s))}}),s.input={checked:b.extend({init:function(t,n,i){b.fn.init.call(this,t,n,i),this._change=this.change.bind(this),e(this.element).change(this._change)},change:function(){var e=this.element,t=this.value();if("radio"==e.type)t=this.parsedValue(),this.bindings.checked.set(t);else if("checkbox"==e.type){var n,i=this.bindings.checked.get();if(i instanceof r){if((t=this.parsedValue())instanceof Date){for(var a=0;a<i.length;a++)if(i[a]instanceof Date&&+i[a]==+t){n=a;break}}else n=i.indexOf(t);n>-1?i.splice(n,1):i.push(t)}else this.bindings.checked.set(t)}},refresh:function(){var e=this.bindings.checked.get(),t=e,i=this.dataType(),a=this.element;if("checkbox"==a.type)if(t instanceof r){var o=-1;if((e=this.parsedValue())instanceof Date){for(var s=0;s<t.length;s++)if(t[s]instanceof Date&&+t[s]==+e){o=s;break}}else o=t.indexOf(e);a.checked=o>=0}else a.checked=t;else"radio"==a.type&&("date"==i?e=n.toString(e,"yyyy-MM-dd"):"datetime-local"==i&&(e=n.toString(e,"yyyy-MM-ddTHH:mm:ss")),null!=e&&a.value===e.toString()?a.checked=!0:a.checked=!1)},value:function(){var e=this.element,t=e.value;return"checkbox"==e.type&&(t=e.checked),t},destroy:function(){e(this.element).off(f,this._change)}})},s.select={source:s.source.extend({refresh:function(i){var a=this,o=a.bindings.source.get();if(o instanceof r||o instanceof n.data.DataSource){if("add"==(i=i||{}).action)a.add(i.index,i.items);else if("remove"==i.action)a.remove(i.index,i.items);else if(("itemchange"==i.action||i.action===t)&&(a.render(),a.bindings.value&&a.bindings.value)){var s=P(a.bindings.value.get(),e(a.element).data("valueField"));null===s?a.element.selectedIndex=-1:a.element.value=s}}else a.render()}}),value:b.extend({init:function(t,n,i){b.fn.init.call(this,t,n,i),this._change=this.change.bind(this),e(this.element).change(this._change)},parsedValue:function(){var e,t,n,i,a=this.dataType(),r=[];for(n=0,i=this.element.options.length;n<i;n++)(t=this.element.options[n]).selected&&(e=(e=t.attributes.value)&&e.specified?t.value:t.text,r.push(this._parseValue(e,a)));return r},change:function(){var e,i,o,s,l,d,u=[],c=this.element,p=this.options.valueField||this.options.textField,h=this.options.valuePrimitive;for(l=0,d=c.options.length;l<d;l++)(i=c.options[l]).selected&&(s=(s=i.attributes.value)&&s.specified?i.value:i.text,p?u.push(s):u.push(this._parseValue(s,this.dataType())));if(p)for((e=this.bindings.source.get())instanceof n.data.DataSource&&(e=e.view()),o=0;o<u.length;o++)for(l=0,d=e.length;l<d;l++){var f=e[l].get(p);if(String(f)===u[o]){u[o]=e[l];break}}(s=this.bindings.value.get())instanceof r?s.splice.apply(s,[0,s.length].concat(u)):h||!(s instanceof a||null===s||s===t)&&p?this.bindings.value.set(u[0].get(p)):this.bindings.value.set(u[0])},refresh:function(){var e,t,i=this.element,o=i.options,s=this.bindings.value.get(),l=s,d=this.options.valueField||this.options.textField,u=this.dataType();l instanceof r||(l=new r([s])),i.selectedIndex=-1;for(var c=0;c<l.length;c++)for(s=l[c],d&&s instanceof a&&(s=s.get(d)),"date"==u?s=n.toString(l[c],"yyyy-MM-dd"):"datetime-local"==u&&(s=n.toString(l[c],"yyyy-MM-ddTHH:mm:ss")),e=0;e<o.length;e++)""===(t=o[e].value)&&""!==s&&(t=o[e].text),null!=s&&t==s.toString()&&(o[e].selected=!0,!0)},destroy:function(){e(this.element).off(f,this._change)}})},s.widget={events:_.extend({init:function(e,t,n){_.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:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=this.change.bind(this),this.widget.bind(f,this._change)},change:function(){this.bindings.checked.set(this.value())},refresh:function(){"radio"===this.element.type?this.widget.check(this.bindings.checked.get().toString()===this.value()):this.widget.check(!0===this.bindings.checked.get())},value:function(){var e=this.element,t=e.value;return"on"!=t&&"off"!=t&&"checkbox"!=this.element.type||(t=e.checked),t},destroy:function(){this.widget.unbind(f,this._change)}}),start:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this._change=this.change.bind(this),this.widget=e,this.widget.bind(f,this._change)},change:function(){this.bindings.start.set(this.widget.range().start)},refresh:function(){var e=this.bindings.start.get(),t=this.widget._range?this.widget._range.end:null;this.widget.range({start:e,end:t})},destroy:function(){this.widget.unbind(f,this._change)}}),end:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this._change=this.change.bind(this),this.widget=e,this.widget.bind(f,this._change)},change:function(){this.bindings.end.set(this.widget.range().end)},refresh:function(){var e=this.bindings.end.get(),t=this.widget._range?this.widget._range.start:null;this.widget.range({start:t,end:e})},destroy:function(){this.widget.unbind(f,this._change)}}),visible:_.extend({init:function(e,t,n){_.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:_.extend({init:function(e,t,n){_.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":""}}),floatingLabel:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),e.floatingLabel&&e.floatingLabel.refresh()}}),enabled:_.extend({init:function(e,t,n){_.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:_.extend({init:function(e,t,n){_.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:k("source","dataSource","setDataSource"),value:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=this.change.bind(this),this.widget.first(f,this._change);var i=this.bindings.value.get();this._valueIsObservableObject=!n.valuePrimitive&&(null==i||i instanceof a),this._valueIsObservableArray=i instanceof r,this._initChange=!1},_source:function(){var e;return this.widget.dataItem&&(e=this.widget.dataItem())&&e instanceof a?[e]:(this.bindings.source&&(e=this.bindings.source.get()),(!e||e instanceof n.data.DataSource)&&(e=this.widget.dataSource.flatView()),e)},change:function(){var e,t,n,i,a,r,s,l=this.widget.value(),d=this.options.dataValueField||this.options.dataTextField,u="[object Array]"===o.call(l),c=this._valueIsObservableObject,p=[];if(this._initChange=!0,d)if(""===l&&(c||this.options.valuePrimitive))l=null;else{for(s=this._source(),u&&(t=l.length,p=l.slice(0)),a=0,r=s.length;a<r;a++)if(i=(n=s[a]).get(d),u){for(e=0;e<t;e++)if(i==p[e]){p[e]=n;break}}else if(i==l){l=c?n:i;break}p[0]&&(l=this._valueIsObservableArray?p:c||!d?p[0]:p[0].get(d))}this.bindings.value.set(l),this._initChange=!1},refresh:function(){if(!this._initChange){var e,n=this.widget,i=n.options,o=i.dataTextField,s=i.dataValueField||o,l=this.bindings.value.get(),d=i.text||"",u=0,c=[];if(l===t&&(l=null),s)if(l instanceof r){for(e=l.length;u<e;u++)c[u]=l[u].get(s);l=c}else l instanceof a&&(d=l.get(o),l=l.get(s));!1!==i.autoBind||i.cascadeFrom||!n.listView||n.listView.bound()?n.value(l):(o!==s||d||(d=l),d||!l&&0!==l||!i.valuePrimitive?n._preselect(l,d):n.value(l))}this._initChange=!1},destroy:function(){this.widget.unbind(f,this._change)}}),dropdowntree:{value:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=this.change.bind(this),this.widget.first(f,this._change),this._initChange=!1},change:function(){var e=this,n=e.bindings.value.get(),i=e.options.valuePrimitive,a=e.widget.treeview.select(),o=e.widget._isMultipleSelection()?e.widget._getAllChecked():e.widget.treeview.dataItem(a)||e.widget.value(),s=i||!1===e.widget.options.autoBind?e.widget.value():o,l=this.options.dataValueField||this.options.dataTextField;if(s=s.slice?s.slice(0):s,e._initChange=!0,n instanceof r){for(var d,u,c,p=[],h=s.length,f=0,m=0,g=n[f];g!==t;){for(c=!1,m=0;m<h;m++)if(i?s[m]==g:(u=(u=s[m]).get?u.get(l):u)==(g.get?g.get(l):g)){s.splice(m,1),h-=1,c=!0;break}c?f+=1:(p.push(g),w(n,f,1),d=f),g=n[f]}w(n,n.length,0,s),p.length&&n.trigger("change",{action:"remove",items:p,index:d}),s.length&&n.trigger("change",{action:"add",items:s,index:n.length-1})}else e.bindings.value.set(s);e._initChange=!1},refresh:function(){if(!this._initChange){var e,t,n=this.options,i=this.widget,o=n.dataValueField||n.dataTextField,s=this.bindings.value.get(),l=s,d=0,u=[];if(o)if(s instanceof r){for(e=s.length;d<e;d++)t=s[d],u[d]=t.get?t.get(o):t;s=u}else s instanceof a&&(s=s.get(o));!1===n.autoBind&&!0!==n.valuePrimitive?i._preselect(l,s):i.value(s)}},destroy:function(){this.widget.unbind(f,this._change)}})},gantt:{dependencies:k("dependencies","dependencies","setDependenciesDataSource")},multiselect:{value:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this.widget=e,this._change=this.change.bind(this),this.widget.first(f,this._change),this._initChange=!1},change:function(){var e=this,n=e.bindings.value.get(),i=e.options.valuePrimitive,a=i?e.widget.value():e.widget.dataItems(),o=this.options.dataValueField||this.options.dataTextField;if(a=a.slice(0),e._initChange=!0,n instanceof r){for(var s,l,d,u=[],c=a.length,p=0,h=0,f=n[p];f!==t;){for(d=!1,h=0;h<c;h++)if(i?a[h]==f:(l=(l=a[h]).get?l.get(o):l)==(f.get?f.get(o):f)){a.splice(h,1),c-=1,d=!0;break}d?p+=1:(u.push(f),w(n,p,1),s=p),f=n[p]}w(n,n.length,0,a),u.length&&n.trigger("change",{action:"remove",items:u,index:s}),a.length&&n.trigger("change",{action:"add",items:a,index:n.length-1})}else e.bindings.value.set(a);e._initChange=!1},refresh:function(){if(!this._initChange){var e,n,i=this.options,o=this.widget,s=i.dataValueField||i.dataTextField,l=this.bindings.value.get(),d=l,u=0,c=[];if(l===t&&(l=null),s)if(l instanceof r){for(e=l.length;u<e;u++)n=l[u],c[u]=n.get?n.get(s):n;l=c}else l instanceof a&&(l=l.get(s));!1!==i.autoBind||!0===i.valuePrimitive||o._isBound()?o.value(l):o._preselect(d,l)}},destroy:function(){this.widget.unbind(f,this._change)}})},scheduler:{source:k("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,a,r=this.widget,o=e.addedItems||r.items();if(o.length)for(i=e.addedDataItems||r.dataItems(),a=this.bindings.source._parents(),t=0,n=i.length;t<n;t++)D(o[t],i[t],this._ns(e.ns),[i[t]].concat(a))}})},grid:{source:k("source","dataSource","setDataSource").extend({dataBound:function(e){var t,n,i,a,r=this.widget,o=e.addedItems||r.items();if(o.length)for(a=e.addedDataItems||r.dataItems(),i=this.bindings.source._parents(),t=0,n=a.length;t<n;t++)D(o[t],a[t],this._ns(e.ns),[a[t]].concat(i))}})},badge:{text:_.extend({init:function(e,t,n){_.fn.init.call(this,e.element[0],t,n),this.widget=e},refresh:function(){var e=this.bindings.text.get();null==e&&(e=""),this.widget.text(e)}})}};var w=function(e,t,n,i){n=n||0;var a,r=(i=i||[]).length,o=e.length,s=[].slice.call(e,t+n),l=s.length;if(r){for(r=t+r,a=0;t<r;t++)e[t]=i[a],a++;e.length=r}else if(n)for(e.length=t,n+=t;t<n;)delete e[--n];if(l){for(l=t+l,a=0;t<l;t++)e[t]=s[a],a++;e.length=l}for(t=e.length;t<o;)delete e[t],t++},y=l.extend({init:function(e,t){this.target=e,this.options=t,this.toDestroy=[]},bind:function(e){var t,n,i,a,r,o,s=this instanceof x,l=this.binders();for(t in e)t==d?n=!0:t==u?i=!0:t!=c||s?t==p?r=!0:"css"==t?o=!0:this.applyBinding(t,e,l):a=!0;i&&this.applyBinding(u,e,l),n&&this.applyBinding(d,e,l),r&&this.applyBinding(p,e,l),a&&!s&&this.applyBinding(c,e,l),o&&!s&&this.applyBinding("css",e,l),s&&this.target&&this.target.floatingLabel&&this.applyBinding("floatingLabel",e,l)},binders:function(){return s[this.target.nodeName.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,a=n[e]||s[e],r=this.toDestroy,o=t[e];if(a)if(a=new a(this.target,t,this.options),r.push(a),o instanceof m)a.bind(o),r.push(o);else for(i in o)a.bind(o,i),r.push(o[i]);else if("template"!==e)throw new 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()}}),x=y.extend({binders:function(){return s.widget[this.target.options.name.toLowerCase()]||{}},applyBinding:function(e,t,n){var i,a=n[e]||s.widget[e],r=this.toDestroy,o=t[e];if(!a)throw new Error("The "+e+" binding is not supported by the "+this.target.options.name+" widget");if(a=new a(this.target,t,this.target.options),r.push(a),o instanceof m)a.bind(o),r.push(o);else for(i in o)a.bind(o,i),r.push(o[i])}});var C=/[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g,T=/\s/g;function S(e){var t,n,i,a,r,o,s,l={};for(t=0,n=(s=e.match(C)).length;t<n;t++)a=(i=s[t]).indexOf(":"),r=i.substring(0,a),"{"==(o=i.substring(a+1)).charAt(0)&&(o=S(o)),l[r]=o;return l}function I(e,t,n){var i,a={};for(i in e)a[i]=new n(t,e[i]);return a}function D(e,t,i,a){if(e&&!e.getAttribute("data-"+n.ns+"stop")){var r,o,s,l=e.getAttribute("data-"+n.ns+"role"),d=e.getAttribute("data-"+n.ns+"bind"),u=[],c=!0,p={};a=a||[t],(l||d)&&A(e,!1),l&&(s=function(e,t){var i=n.initWidget(e,{},t);if(i)return new x(i)}(e,i)),d&&(d=S(d.replace(T,"")),s||((p=n.parseOptions(e,{textField:"",valueField:"",template:"",valueUpdate:f,valuePrimitive:!1,autoBind:!0},t)).roles=i,s=new y(e,p)),s.source=t,o=I(d,a,m),p.template&&(o.template=new v(a,"",p.template)),o.click&&(d.events=d.events||{},d.events.click=d.click,o.click.destroy(),delete o.click),o.source&&(c=!1),d.attr&&(o.attr=I(d.attr,a,m)),d.style&&(o.style=I(d.style,a,m)),d.events&&(o.events=I(d.events,a,g)),d.css&&(o.css=I(d.css,a,m)),s.bind(o)),s&&(e.kendoBindingTarget=s);var h=e.children;if(c&&h&&!e.getAttribute("data-"+n.ns+"stop")){for(r=0;r<h.length;r++)u[r]=h[r];for(r=0;r<u.length;r++)D(u[r],t,i,a)}}}function E(t,i){var a,r,o,s=n.rolesFromNamespaces([].slice.call(arguments,2));for(i=n.observable(i),a=0,r=(t=e(t)).length;a<r;a++)1===(o=t[a]).nodeType&&D(o,i,s)}function A(t,i){var a=t.kendoBindingTarget;if(a&&(a.destroy(),h?delete t.kendoBindingTarget:t.removeAttribute?t.removeAttribute("kendoBindingTarget"):t.kendoBindingTarget=null),i){var r=n.widgetInstance(e(t));r&&"function"==typeof r.destroy&&r.destroy()}}function F(e,t){A(e,t),z(e,t)}function z(e,t){var n=e.children;if(n)for(var i=0,a=n.length;i<a;i++)F(n[i],t)}function P(e,t){var n,i,o=[],s=0;if(!t)return e;if(e instanceof r){for(n=e.length;s<n;s++)i=e[s],o[s]=i.get?i.get(t):i[t];e=o}else e instanceof a&&(e=e.get(t));return e}n.unbind=function(t){var n,i;for(n=0,i=(t=e(t)).length;n<i;n++)F(t[n],!1)},n.bind=E,n.data.binders=s,n.data.Binder=_,n.notify=function(e,t){var n=e.element,i=n[0].kendoBindingTarget;i&&E(n,i.source,t)},n.observable=function(e){return e instanceof a||(e=new a(e)),e},n.observableHierarchy=function(e){var t=n.data.HierarchicalDataSource.create(e);return t.fetch(),function e(t){var n,i;for(n=0;n<t.length;n++)t[n]._initChildren(),(i=t[n].children).fetch(),t[n].items=i.data(),e(t[n].items)}(t.data()),t._data._dataSource=t,t._data}}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.ui,r=e.isPlainObject,o=".kendoTextBox",s="change",l="disabled",d="readonly",u="k-input-inner",c="k-focus",p="k-disabled",h="k-no-click",f="aria-disabled",m=i.extend({init:function(a,r){var o=this;i.fn.init.call(o,a,r),r=e.extend(!0,{},r),o.options.value=r.value||o.element.val(),o.options.readonly=r.readonly!==t?r.readonly:Boolean(o.element.attr("readonly")),o.options.enable=r.enable!==t?r.enable:!Boolean(o.element.attr("disabled")),o.options.placeholder=r.placeholder||o.element.attr("placeholder"),o.value(o.options.value),o._wrapper(),o._label(),o._editable({readonly:o.options.readonly,disable:!o.options.enable}),o.element.addClass(u).attr("placeholder",o.options.placeholder).attr("autocomplete","off"),n.notify(o),o._applyCssClasses()},events:[s],options:{name:"TextBox",value:"",readonly:!1,enable:!0,placeholder:"",label:null,rounded:"medium",size:"medium",fillMode:"solid"},value:function(e){var n=this;if(e===t)return n._value;n._value=e,n.element.val(e),n.floatingLabel&&n.floatingLabel.refresh()},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.floatingLabel&&this.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.floatingLabel&&this.floatingLabel.enable(e=e===t||e)},focus:function(){this.element[0].focus()},destroy:function(){var e=this;e.floatingLabel&&e.floatingLabel.destroy(),e.element.off(o),e.element[0].style.width="",e.element.removeClass(u),i.fn.destroy.call(e)},setOptions:function(e){this.destroy(),this._inputLabel&&(this._inputLabel.remove(),this._inputLabel=null),this._floatingLabelContainer?(this.floatingLabel.destroy(),this.floatingLabel=null,this.element.unwrap(),this.element.unwrap(),this._floatingLabelContainer=null):this.element.unwrap(),n.deepExtend(this.options,e),this.init(this.element,this.options)},_editable:function(e){var t=this,n=t.element,i=t.wrapper,a=e.disable,r=e.readonly;n.off(o),r||a?(n.attr(l,a).attr(d,r).attr(f,a),i.toggleClass(p,a).toggleClass(h,r)):(n.prop(l,!1).prop(d,!1).attr(f,!1),i.removeClass(p).removeClass(h),n.on("focusin"+o,t._focusin.bind(t)),n.on("focusout"+o,t._focusout.bind(t)),n.on("change"+o,t._change.bind(t)))},_label:function(){var t,i,a=this,o=a.element,s=a.options,l=o.attr("id");null!==s.label&&(t=!!r(s.label)&&s.label.floating,i=r(s.label)?s.label.content:s.label,t&&(a._floatingLabelContainer=a.wrapper.wrap("<span></span>").parent(),a.floatingLabel=new n.ui.FloatingLabel(a._floatingLabelContainer,{widget:a})),n.isFunction(i)&&(i=i.call(a)),i||(i=""),l||(l=s.name+"_"+n.guid(),o.attr("id",l)),a._inputLabel=e("<label class='k-label k-input-label' for='"+l+"'>"+i+"</label>'").insertBefore(a.wrapper))},_focusin:function(){this.wrapper.addClass(c)},_focusout:function(){this.wrapper.removeClass(c)},_change:function(e){var t=this,n=t.element.val();t._value=n,t.trigger(s,{value:n,originalEvent:e})},_wrapper:function(){var e,t=this.element,n=t[0];(e=t.wrap("<span class='k-input k-textbox'></span>").parent())[0].style.cssText=n.style.cssText,n.style.width="100%",this.wrapper=e.addClass(n.className).removeClass("input-validation-error")}});n.cssProperties.registerPrefix("TextBox","k-input-"),n.cssProperties.registerValues("TextBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),a.plugin(m)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.caret,a=n.keys,r=n.html,o=n.ui,s=o.Widget,l=n._activeElement,d=n._extractFormat,u=n.parseFloat,c=n.support.placeholder,p=n.getCulture,h="change",f="disabled",m="readonly",g="k-input-inner",v="spin",_=".kendoNumericTextBox",b="mouseenter"+_+" mouseleave.kendoNumericTextBox",k="k-focus",w="k-hover",y="focus",x=".",C="k-selected",T="k-disabled",S="k-invalid",I="aria-disabled",D=/^(-)?(\d*)$/,E=null,A=e.isPlainObject,F=e.extend,z=s.extend({init:function(i,a){var r,o,l,u,c,p=this,h=a&&a.step!==t;s.fn.init.call(p,i,a),a=p.options,i=p.element.on("focusout"+_,p._focusout.bind(p)).attr("role","spinbutton"),a.placeholder=a.placeholder||i.attr("placeholder"),r=p.min(i.attr("min")),o=p.max(i.attr("max")),l=p._parse(i.attr("step")),a.min===E&&r!==E&&(a.min=r),a.max===E&&o!==E&&(a.max=o),h||l===E||(a.step=l),p._initialOptions=F({},a),c=i.attr("type"),p._reset(),p._wrapper(),p._arrows(),p._validation(),p._input(),n.support.mobileOS?p._text.on("touchend"+_+" "+y+_,(function(){n.support.browser.edge?p._text.one(y+_,(function(){p._focusin()})):p._focusin(),p.selectValue()})):p._text.on(y+_,p._click.bind(p)),i.attr("aria-valuemin",a.min!==E?a.min*a.factor:a.min).attr("aria-valuemax",a.max!==E?a.max*a.factor:a.max),a.format=d(a.format),(u=a.value)==E&&(u="number"==c?parseFloat(i.val()):i.val()),p.value(u),!a.enable||i.is("[disabled]")||e(p.element).parents("fieldset").is(":disabled")?p.enable(!1):p.readonly(i.is("[readonly]")),p.angular("compile",(function(){return{elements:p._text.get()}})),p._label(),p._ariaLabel(p._text),p._applyCssClasses(),n.notify(p)},options:{name:"NumericTextBox",decimals:E,enable:!0,restrictDecimals:!1,min:E,max:E,value:E,step:1,round:!0,culture:"",format:"n",spinners:!0,placeholder:"",selectOnFocus:!1,factor:1,upArrowText:"Increase value",downArrowText:"Decrease value",label:null,size:"medium",fillMode:"solid",rounded:"medium"},events:[h,v],_editable:function(e){var t=this,n=t.element,i=e.disable,a=e.readonly,r=t._text.add(n),o=t.wrapper.off(b);t._toggleText(!0),t._upArrowEventHandler.unbind("press"),t._downArrowEventHandler.unbind("press"),n.off("keydown"+_).off("keyup"+_).off("input"+_).off("paste"+_),t._inputLabel&&t._inputLabel.off(_),a||i?(o.addClass(i?T:"").removeClass(i?"":T),r.attr(f,i).attr(m,a).attr(I,i)):(o.removeClass(T).on(b,t._toggleHover),r.prop(f,!1).prop(m,!1).attr(I,!1),t._upArrowEventHandler.bind("press",(function(e){e.preventDefault(),t._spin(1),t._upArrow.addClass(C)})),t._downArrowEventHandler.bind("press",(function(e){e.preventDefault(),t._spin(-1),t._downArrow.addClass(C)})),t.element.on("keydown"+_,t._keydown.bind(t)).on("keyup"+_,t._keyup.bind(t)).on("paste"+_,t._paste.bind(t)).on("input"+_,t._inputHandler.bind(t)),t._inputLabel&&t._inputLabel.on("click"+_,t.focus.bind(t)))},readonly:function(e){this._editable({readonly:e===t||e,disable:!1}),this.floatingLabel&&this.floatingLabel.readonly(e===t||e)},enable:function(e){this._editable({readonly:!1,disable:!(e=e===t||e)}),this.floatingLabel&&this.floatingLabel.enable(e=e===t||e)},setOptions:function(e){var n=this;s.fn.setOptions.call(n,e),n.wrapper.toggleClass("k-expand-padding",!n.options.spinners),n._text.prop("placeholder",n.options.placeholder),n._placeholder(n.options.placeholder),n.element.attr({"aria-valuemin":n.options.min!==E?n.options.min*n.options.factor:n.options.min,"aria-valuemax":n.options.max!==E?n.options.max*n.options.factor:n.options.max}),n.options.format=d(n.options.format),n._upArrowEventHandler.destroy(),n._upArrowEventHandler=null,n._downArrowEventHandler.destroy(),n._downArrowEventHandler=null,n._arrowsWrap.remove(),n._arrows(),n._applyCssClasses(),n._inputLabel&&(n._inputLabel.off(_),n._inputLabel.remove(),n.floatingLabel&&(n.floatingLabel.destroy(),n._floatingLabelContainer&&n.wrapper.unwrap())),n._label(),n._editable({readonly:n.options.readonly,disable:!n.options.enable}),e.value!==t&&n.value(e.value)},destroy:function(){var e=this;e._inputLabel&&(e._inputLabel.off(_),e.floatingLabel&&e.floatingLabel.destroy()),e.element.add(e._text).add(e._upArrow).add(e._downArrow).off(_),e._upArrowEventHandler.destroy(),e._downArrowEventHandler.destroy(),e._form&&e._form.off("reset",e._resetHandler),s.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=this;if(e===t)return n._value;(e=n._parse(e))===n._adjust(e)&&(n._update(e),n._old=n._value,n.floatingLabel&&n.floatingLabel.refresh())},focus:function(){this._focusin()},_adjust:function(e){var t=this.options,n=t.min,i=t.max;return e===E||(n!==E&&e<n?e=n:i!==E&&e>i&&(e=i)),e},_arrows:function(){var t,i=this,a=function(){clearTimeout(i._spinning),t.removeClass(C)},r=i.options,o=r.spinners,s=i.element;(t=s.siblings(".k-icon-button"))[0]||(t=e(P("increase",r.upArrowText,r)+P("decrease",r.downArrowText,r)).appendTo(i.wrapper),i._arrowsWrap=t.wrapAll('<span class="k-input-spinner k-spin-button"/>').parent()),o||(t.parent().toggle(o),i.wrapper.addClass("k-expand-padding")),i._upArrow=t.eq(0),i._upArrowEventHandler=new n.UserEvents(i._upArrow,{release:a}),i._downArrow=t.eq(1),i._downArrowEventHandler=new n.UserEvents(i._downArrow,{release:a})},_validation:function(){var t=this.element;this._validationIcon=e("<span class='k-input-validation-icon k-icon k-i-warning k-hidden'></span>").insertAfter(t)},_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,a,r,o=e.target,s=i(o)[0],l=o.value.substring(0,s),d=t._format(t.options.format),u=d[","],c=0;u&&(a=new RegExp("\\"+u,"g"),r=new RegExp("(-)?("+d.symbol+")?([\\d\\"+u+"]+)(\\"+d["."]+")?(\\d+)?")),r&&(n=r.exec(l)),n&&(c=n[0].replace(a,"").length,-1!=l.indexOf("(")&&t._value<0&&c++),t._focusin(),i(t.element[0],c),t.selectValue()}))},selectValue:function(){this.options.selectOnFocus&&this.element[0].select()},_getFactorValue:function(e){var t=this.options.factor;return t&&1!==t&&null!==(e=n.parseFloat(e))&&(e/=t),e},_change:function(e){var t=this;e=t._getFactorValue(e),t._update(e),e=t._value,t._old!=e&&(t._old=e,t._typing||t.element.trigger(h),t.trigger(h)),t._typing=!1},_culture:function(e){return e||p(this.options.culture)},_focusin:function(){var e=this;e.wrapper.addClass(k),e._toggleText(!1),e.element[0].focus()},_focusout:function(){var e=this;clearTimeout(e._focusing),e.wrapper.removeClass(k).removeClass(w),e._blur(),e._removeInvalidState()},_format:function(e,t){var n=this._culture(t).numberFormat;return(e=e.toLowerCase()).indexOf("c")>-1?n=n.currency:e.indexOf("p")>-1&&(n=n.percent),n},_input:function(){var t,i=this,a=i.options,r=i.element.addClass(g).show()[0],o=r.accessKey;(t=i.wrapper.find(x+g).first()).length<2&&(t=e('<input type="text"/>').attr(n.attr("validate"),!1).insertBefore(r));try{r.setAttribute("type","text")}catch(e){r.type="text"}t[0].title=r.title,t[0].tabIndex=r.tabIndex,t[0].style.cssText=r.style.cssText,t.prop("placeholder",a.placeholder),o&&(t.attr("accesskey",o),r.accessKey=""),i._text=t.addClass(r.className).attr({role:"spinbutton","aria-valuemin":a.min!==E?a.min*a.factor:a.min,"aria-valuemax":a.max!==E?a.max*a.factor:a.max,autocomplete:"off"})},_keydown:function(e){var t=this,n=e.keyCode;n===a.NUMPAD_DOT&&(t._numPadDot=!0),n!=a.DOWN?n!=a.UP?n!=a.ENTER?(n!=a.TAB&&(t._typing=!0),t._cachedCaret=i(t.element)):t._change(t.element.val()):t._step(1):t._step(-1)},_keyup:function(){this._removeInvalidState()},_inputHandler:function(){var e=this.element,t=e.val(),n=this.options.min,a=this._format(this.options.format),r=a["."],o=null!==n&&n>=0&&"-"===t.charAt(0);this._numPadDot&&r!==x&&(t=t.replace(x,r),this.element.val(t),this._numPadDot=!1),this._isPasted&&this._parse(t)&&(t=this._parse(t).toString().replace(x,a["."])),this._numericRegex(a).test(t)&&!o?this._oldText=t:(this._blinkInvalidState(),this.element.val(this._oldText),this._cachedCaret&&(i(e,this._cachedCaret[0]),this._cachedCaret=null)),this._isPasted=!1},_blinkInvalidState:function(){var e=this;e._addInvalidState(),clearTimeout(e._invalidStateTimeout),e._invalidStateTimeout=setTimeout(e._removeInvalidState.bind(e),100)},_addInvalidState:function(){this.wrapper.addClass(S),this._validationIcon.removeClass("k-hidden")},_removeInvalidState:function(){var e=this;e.wrapper.removeClass(S),e._validationIcon.addClass("k-hidden"),e._invalidStateTimeout=null},_numericRegex:function(e){var t=this,n=e["."],i=t.options.decimals,a="*";return n===x&&(n="\\"+n),i===E&&(i=e.decimals),0===i&&t.options.restrictDecimals?D:(t.options.restrictDecimals&&(a="{0,"+i+"}"),t._separator!==n&&(t._separator=n,t._floatRegExp=new RegExp("^(-)?(((\\d+("+n+"\\d"+a+")?)|("+n+"\\d"+a+")))?$")),t._floatRegExp)},_paste:function(e){var t=this,n=e.target,i=n.value,a=t._format(t.options.format);t._isPasted=!0,setTimeout((function(){var e=t._parse(n.value);e===E?t._update(i):(n.value=e.toString().replace(x,a["."]),t._adjust(e)===e&&t._numericRegex(a).test(n.value)||(i=t._getFactorValue(n.value),t._update(i)))}))},_option:function(e,n){var i=this,a=i.element,r=i.options;if(n===t)return r[e];((n=i._parse(n))||"step"!==e)&&(r[e]=n,a.add(i._text).attr("aria-value"+e,n),a.attr(e,n))},_spin:function(e,t){var n=this;t=t||500,clearTimeout(n._spinning),n._spinning=setTimeout((function(){n._spin(e,50)}),t),n._step(e)},_step:function(e){var t=this,n=t.element,i=t._value,a=t._parse(n.val())||0,r=t.options.decimals||2;l()!=n[0]&&t._focusin(),t.options.factor&&a&&(a/=t.options.factor),a=+(a+t.options.step*e).toFixed(r),a=t._adjust(a),t._update(a),t._typing=!1,i!==a&&t.trigger(v)},_toggleHover:function(t){e(t.currentTarget).toggleClass(w,"mouseenter"===t.type)},_toggleText:function(e){var t=this;t._text.toggle(e),e?t._text.removeAttr("aria-hidden"):t._text.attr("aria-hidden","true"),t.element.toggle(!e)},_parse:function(e,t){return u(e,this._culture(t),this.options.format)},_round:function(e,t){return(this.options.round?n._round:H)(e,t)},_update:function(e){var t,i,a=this,r=a.options,o=r.factor,s=r.format,l=r.decimals,d=a._culture(),u=a._format(s,d);l===E&&(l=u.decimals),(i=(e=a._parse(e,d))!==E)&&(e=parseFloat(a._round(e,l),10)),a._value=e=a._adjust(e),a._placeholder(n.toString(e,s,d)),i?(o&&(e=parseFloat(a._round(e*o,l),10)),-1!==(e=e.toString()).indexOf("e")&&(e=a._round(+e,l)),t=e,e=e.replace(x,u["."])):(e=null,t=null),a.element.val(e),a._oldText=e,a.element.add(a._text).attr("aria-valuenow",t)},_placeholder:function(e){var t=this._text;t.val(e),c||e||t.val(this.options.placeholder),t.attr("title",this.element.attr("title")||t.val())},_label:function(){var i,a,r=this,o=r.element,s=r.options,l=o.attr("id");null!==s.label&&(i=!!A(s.label)&&s.label.floating,a=A(s.label)?s.label.content:s.label,i&&(r._floatingLabelContainer=r.wrapper.wrap("<span></span>").parent(),r.floatingLabel=new n.ui.FloatingLabel(r._floatingLabelContainer,{widget:r})),n.isFunction(a)&&(a=a.call(r)),a||(a=""),l||(l=s.name+"_"+n.guid(),o.attr("id",l)),r._inputLabel=e("<label class='k-label k-input-label' for='"+l+"'>"+a+"</label>'").insertBefore(r.wrapper),r.element.attr("disabled")===t&&r.element.attr("readonly")===t&&r._inputLabel.on("click"+_,r.focus.bind(r)))},_wrapper:function(){var e,t=this.element,n=t[0];(e=t.parents(".k-numerictextbox")).is("span.k-numerictextbox")||(e=t.hide().wrap("<span/>").parent()),e[0].style.cssText=n.style.cssText,n.style.width="",this.wrapper=e.addClass("k-numerictextbox k-input").addClass(n.className).removeClass("input-validation-error").css("display","")},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(n[0].value),t.max(t._initialOptions.max),t.min(t._initialOptions.min)}))},t._form=a.on("reset",t._resetHandler))}});function P(e,t,n){var i="increase"===e?"arrow-n":"arrow-s",a="increase"===e?"increase":"decrease";return r.renderButton('<button role="button" tabindex="-1" unselectable="on" class="k-spinner-'+a+'" aria-label="'+t+'" title="'+t+'"></button>',F({},n,{icon:i,shape:null,rounded:null}))}function H(e,t){var n=parseFloat(e,10).toString().split(x);return n[1]&&(n[1]=n[1].substring(0,t)),n.join(x)}n.cssProperties.registerPrefix("NumericTextBox","k-input-"),n.cssProperties.registerValues("NumericTextBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),o.plugin(z)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=n.parseColor,o=n.ui.Popup.TabKeyTrap,s=e.extend,l=".kendoColorTools",d="keydown"+l,u="k-disabled",c=a.extend({init:function(e,t){var n=this;a.fn.init.call(n,e,t),e=n.element,t=n.options,e.is("input")?(n._initialValue(),n._preventDefaultLabelClick()):n._value=r(t.value),n._tabIndex=e.attr("tabIndex")||0,t._standalone&&(n._triggerSelect=n._triggerChange)},options:{name:"ColorSelector",ARIATemplate:'Current selected color is #=data || "none"#',value:null,_standalone:!0},events:["change","select","forceSelect","cancel"],color:function(e){return e!==t&&(this._value=r(e),this.element.is("input")&&this._updateInput(this._value),this._updateUI(this._value)),this._value},value:function(e){return(e=this.color(e))&&(e=this.options.opacity?e.toCssRgba():e.toCss()),e||null},enable:function(e){0===arguments.length&&(e=!0),this.element.is("input")&&this.element.attr("disabled",!e),this.wrapper.toggleClass(u,!e),this._onEnable(e)},_attachFocusEvents:function(){this.wrapper.on(d,this._navKeydown.bind(this)).on("focusout"+l,this._navFocusout.bind(this))},_initialValue:function(){var e=this.element,t=this.options.value||e.attr("value");t&&(this._value=r(t,!0)),this.element.val(t)},_innerTabindex:function(e){this.wrapper.find(".k-draghandle, .k-button, .k-input-inner").attr("tabindex",e)},_isInputTypeColor:function(){var e=this.element[0];return/^input$/i.test(e.tagName)&&/^color$/i.test(e.type)},_navFocusout:function(){var e=this,t=e.wrapper[0];setTimeout((function(){t.contains(document.activeElement)||e._releaseInnerFocus()}))},_navKeydown:function(e){var i=this.wrapper;e.keyCode===n.keys.ENTER&&i.attr("tabindex")?(e.preventDefault(),this._trapInnerFocus()):e.keyCode===n.keys.ESC&&i.attr("tabindex")===t&&(this._releaseInnerFocus(),this.wrapper.trigger("focus"))},_releaseInnerFocus:function(){this._tabKeyTrap.removeTrap(),this.wrapper.attr("tabindex",this._tabIndex),this._innerTabindex(-1)},_select:function(e,t){var n=this._value;e=this.color(e),t||(e&&(!n||!e.equals(n))||null===e&&e!==n?(this.element.trigger("change"),this.trigger("change",{value:this.value()})):this._standalone||this.trigger("cancel"))},_navigation:function(){var e=this.value();e&&e.indexOf("rgba")>-1&&(e=e.replace("rgba","RGBA")),this.options._otOfPicker?(this._innerTabindex(-1),this._attachFocusEvents(),this._tabKeyTrap=new o(this.wrapper),this._ariaTemplate=n.template(this.options.ARIATemplate),this.wrapper.attr({"aria-label":this._ariaTemplate(e||""),tabindex:this._tabIndex})):(this.wrapper.removeAttr("tabindex"),this.wrapper.removeAttr("aria-label"),this.wrapper.removeAttr("role"),this.wrapper.removeAttr("aria-keyshortcuts"))},_trapInnerFocus:function(){this._innerTabindex(0),this.wrapper.removeAttr("tabindex"),this.wrapper.find(".k-hsv-draghandle").trigger("focus"),this._tabKeyTrap.trap()},_triggerSelect:function(e){p(this,"select",e)},_triggerChange:function(e){p(this,"change",e)},destroy:function(){this.element&&this.element.off(l),this.wrapper&&(this.wrapper.off(d),this.wrapper.off(l).find("*").off(l),this.wrapper=null),a.fn.destroy.call(this)},_preventDefaultLabelClick:function(){var e=this.element,t=e.closest("label"),n=e.attr("id");n&&(t=t.add('label[for="'+n+'"]')),t.on("click",(function(e){e.preventDefault()}))},_updateUI:e.noop,_updateInput:function(e){var t,i="";e&&(i=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(i)),this.options._otOfPicker&&(this._ariaTemplate||(this._ariaTemplate=n.template(this.options.ARIATemplate)),(t=this.value())&&t.indexOf("rgba")>-1&&(t=t.replace("rgba","RGBA")),this.wrapper.attr("aria-label",this._ariaTemplate(t||"")))},_selectOnHide:function(){return null},_cancel:function(){this.trigger("cancel")}});function p(e,t,n){((n=r(n))&&!n.equals(e.color())||n!==e.color())&&("change"==t&&(e._value=n,e._updateInput(e._value)),n&&1!=n.a?n=n.toCssRgba():n&&(n=n.toCss()),e.trigger(t,{value:n}))}s(i,{colorpicker:{ColorSelector:c}})}(window.kendo.jQuery),function(e,t){var n=kendo.ui.colorpicker,i=e.extend,a=kendo.Color,r=kendo.parseColor;function o(e,t){return n=s(l(e,t)),i=s(l(t,{r:0,g:0,b:0,a:1})),(Math.max(n,i)+.05)/(Math.min(n,i)+.05);var n,i}function s(e){var t=[e.r,e.g,e.b].map((function(e){return(e/=255)<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)}));return.2126*t[0]+.7152*t[1]+.0722*t[2]}function l(e,t){var n=d(e.r,0,255),i=d(e.g,0,255),a=d(e.b,0,255),r=d(e.a,0,1),o=d(t.r,0,255),s=d(t.g,0,255),l=d(t.b,0,255);return{r:Math.round((1-r)*o+r*n),g:Math.round((1-r)*s+r*i),b:Math.round((1-r)*l+r*a)}}function d(e,n,i){return null===(a=e)||a===t||isNaN(e)||e<=n?n:e>=i?i:e;var a}function u(e,t){if(0===e.length)return"";var n=e.reduce((function(e,n,i,a){return 0===i?kendo.format("M {0},{1}",n[0],n[1]):kendo.format("{0} {1}",e,t(n,i,a))}),"");return kendo.format('<path d="{0}" fill="none" stroke="white" stroke-width="1"/>',n)}function c(e,t){var n=t[0]-e[0],i=t[1]-e[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),angle:Math.atan2(i,n)}}i(n,{contrastToolUtils:{getContrastFromTwoRGBAs:o,renderSvgCurveLine:function(e,t,n){var s,l,p=function(s,l,u,c,h){var f=(u+c)/2,m=i({},t,{s:l/e.width,v:1-f/e.height}),g=o(r(function(e){var t=d(e.h,0,359.9),n=d(e.s,0,1),i=d(e.v,0,1),r=d(e.a,0,1);return a.fromHSV(t,n,i,r).toCssRgba()}(m)).toBytes(),r(n).toBytes());return u+.5>c?g<s+1&&g>s-1?f:null:h(g,s)?p(s,l,u,c-(c-u)/2,h):p(s,l,u+(c-u)/2,c,h)},h=function(e,t){return e>t},f=function(e,t){return e<t},m=function(t,n,i){for(var a=[],r=0;r<=e.width;r+=e.width/n){var o=p(t,r,0,e.height,i?f:h);null!==o&&a.push([r,o])}return a},g=(l=c,s=function(e,t,n,i){var a=.1,r=l(t||e,n||e),o=r.angle+(i?Math.PI:0),s=r.length*a;return[e[0]+Math.cos(o)*s,e[1]+Math.sin(o)*s]},function(e,t,n){var i=s(n[t-1],n[t-2],e),a=s(e,n[t-1],n[t+1],!0);return kendo.format("C {0},{1} {2},{3} {4},{5}",i[0],i[1],a[0],a[1],e[0],e[1])});return'<svg xmlns="http://www.w3.org/2000/svg" style="position: absolute; overflow: visible; pointer-events: none; left: 0px; top: 0px; z-index: 3;" >'+(u(m(4.5,16,!1),g)+u(m(4.5,16,!0),g)+u(m(7,16,!1),g)+u(m(7,16,!0),g))+"</svg>"}}})}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n.Observable,r=n.parseColor,o=e.extend,s=n.Color,l=n.keys,d="#ffffff",u="#000000",c="keydown.kendoColorTools",p=i.colorpicker.ColorSelector,h=i.colorpicker.contrastToolUtils;function f(e){e.preventDefault()}var m=a.extend({init:function(e,t){var i=this;i.element=e,i.options=t,i._viewModel=n.observable({switchMode:i.switchMode.bind(i),keydown:i.keydown.bind(i),mode:function(e){return e===this.get("format")},format:t.format,formats:t.formats,rgb:null,hex:function(){return null!==this.get("rgb")&&this.get("rgb").toCss({alpha:t.opacity})}}),i._changeHandler=i.change.bind(i),i._viewModel.bind("change",i._changeHandler),i._render(),i.element.on(c,i.keydown.bind(i)),a.fn.init.call(i)},_template:n.template('# if (options.formats && options.formats.length > 1) { #<div class="k-vstack"><button class="k-colorgradient-toggle-mode" data-#:ns#role="button" data-#:ns#icon="arrows-kpi" data data-#:ns#bind="click: switchMode" data-#:ns#fill-mode="flat" data-#:ns#size="#: options.size #" title="#: options.messages.toggleFormat #"></button></div># } ## if (options.formats && options.formats.indexOf("hex") >= 0) { #<div class="k-vstack k-flex-1" data-#:ns#bind="visible: mode(\'hex\')"><input type="text" data-#:ns#bind="value: hex" data-#:ns#role="textbox" data-#:ns#size="#: options.size #" tabindex="#:options.tabindex#" aria-label="#: options.messages.hex #"/><label class="k-colorgradient-input-label">HEX</label></div># } ## if (options.formats && options.formats.indexOf("rgb") >= 0) { #<div class="k-vstack" data-#:ns#bind="visible: mode(\'rgb\')"><input tabindex="#:options.tabindex#" data-#:ns#bind="value: rgb.r" data-#:ns#role="numerictextbox" data-#:ns#size="#: options.size #" data-#:ns#max="255" data-#:ns#min="0" data-#:ns#decimals="0" data-#:ns#spinners="false" data-#:ns#format="n0" aria-label="#: options.messages.red #" /><label class="k-colorgradient-input-label">R</label></div><div class="k-vstack" data-#:ns#bind="visible: mode(\'rgb\')"><input tabindex="#:options.tabindex#" data-#:ns#bind="value: rgb.g" data-#:ns#role="numerictextbox" data-#:ns#size="#: options.size #" data-#:ns#max="255" data-#:ns#min="0" data-#:ns#decimals="0" data-#:ns#spinners="false" data-#:ns#format="n0" aria-label="#: options.messages.green #" /><label class="k-colorgradient-input-label">G</label></div><div class="k-vstack" data-#:ns#bind="visible: mode(\'rgb\')"><input tabindex="#:options.tabindex#" data-#:ns#bind="value: rgb.b" data-#:ns#role="numerictextbox" data-#:ns#size="#: options.size #" data-#:ns#max="255" data-#:ns#min="0" data-#:ns#decimals="0" data-#:ns#spinners="false" data-#:ns#format="n0" aria-label="#: options.messages.blue #"/><label class="k-colorgradient-input-label">B</label></div>#if(options.opacity){#<div class="k-vstack" data-#:ns#bind="visible: mode(\'rgb\')"><input tabindex="#:options.tabindex#" data-#:ns#bind="value: rgb.a" data-#:ns#role="numerictextbox" data-#:ns#size="#: options.size #" data-#:ns#step="0.1" data-#:ns#max="1" data-#:ns#min="0" data-#:ns#decimals="1" data-#:ns#spinners="false" data-#:ns#format="n1" aria-label="#: options.messages.alpha #" /><label class="k-colorgradient-input-label">A</label></div># } ## } #'),destroy:function(){var e=this;e._viewModel.unbind("change",e._changeHandler),n.unbind(e.element),n.destroy(e.element),e.element.off(c),delete e._viewModel,delete e._changeHandler},change:function(e){var t=this;e.field.indexOf("rgb")>=0?(t._color=t._tryParseColor(t._viewModel.rgb.toCssRgba()),t._viewModel.set("hex",t._color.toCss({alpha:t.options.opacity}))):"hex"===e.field&&(t._color=t._tryParseColor(e.sender[e.field]),t._viewModel.set("rgb",t._color)),t._preventChangeEvent||t.trigger("change",{value:t._color})},keydown:function(t){var n=this,i=e(t.target).data("kendoTextBox");t.keyCode===l.ENTER&&e(t.target).is("input")&&(i&&i._change&&i._change(),n.trigger("change",{value:n._color}),n.trigger("select",{value:n._color}))},reset:function(){var e=this;e._preventChangeEvent=!0,e._viewModel.set("rgb",r(u)),delete e._preventChangeEvent},switchMode:function(){var e=this,t=e._viewModel,n=t.format,i=t.formats.indexOf(n)+1;i=i>=t.formats.length?0:i,e._preventChangeEvent=!0,e._viewModel.set("format",t.formats[i]),delete e._preventChangeEvent},value:function(e){var t=this;t._color=e&&e.toBytes()||r(u),t._preventChangeEvent=!0,t._viewModel.set("rgb",t._color),delete t._preventChangeEvent},_render:function(){var e=this;e.element.append(e._template({ns:n.ns,guid:n.guid(),options:e.options})).parent(),n.bind(e.element,e._viewModel),e.element.attr("data-"+n.ns+"stop","stop")},_tryParseColor:function(e){try{e=r(e)||this._color}catch(t){e=this._color}return e}}),g=p.extend({init:function(t,i){var a,r=this;p.fn.init.call(r,t,i),(i=r.options=n.deepExtend({},r.options,i)).messages.previewInput&&(i.messages.hex=i.messages.previewInput),i.messages=i.messages?e.extend(r.options.messages,i.messages):r.options.messages,t=r.element,r._wrapper(),r._sliders(),r._hsvArea(),a=r._value,r._gradientInputs(),r._updateUI(a),r._navigation()},options:{name:"ColorGradient",opacity:!1,hsvDragARIATemplate:'Color well with two-dimensional slider for selecting saturation and value. Selected color is #=data || "none"#',input:!0,format:"hex",formats:["rgb","hex"],contrastTool:!1,size:"medium",messages:{contrastRatio:"Contrast ratio:",fail:"Fail",pass:"Pass",hex:"HEX",toggleFormat:"Toggle format",red:"Red channel",green:"Green channel",blue:"Blue channel",alpha:"Alpha channel"},_otOfPicker:!0},_template:n.template('<div class="k-colorgradient-canvas k-hstack"><div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div role="slider" aria-orientation="undefined" class="k-hsv-draghandle k-draghandle"></div></div><div class="k-hsv-controls k-hstack"><input class="k-hue-slider k-colorgradient-slider" /># if (opacity) { #<input class="k-alpha-slider k-colorgradient-slider" /># } #</div></div># if (input) { #<div class="k-colorgradient-inputs k-hstack"></div># } ## if (contrastTool) { #<div class="k-colorgradient-color-contrast k-vbox"></div># } #'),focus:function(){this._hsvHandle.focus()},setBackgroundColor:function(t){var n=this;n.options.contrastTool&&(n.options.contrastTool=e.isPlainObject(n.options.contrastTool)?o({},n.options.contrastTool,{backgroundColor:t}):{backgroundColor:t},n._updateColorContrast(n.color()||r(d)))},_getHSV:function(e,t,n,i){var a=this,o=a._hsvRect,l=o.width(),d=o.height(),c=this._hsvHandle.position();return l&&d?(null==e&&(e=a._hueSlider.value()),null==t&&(t=c.left/l),null==n&&(n=1-c.top/d),null==i&&(i=a._opacitySlider?a._opacitySlider.value()/100:1),s.fromHSV(e,t,n,i)):a.color()?a.color().toHSV():r(u)},_gradientInputs:function(){var e=this,t=e.options;e._colorgradientInputs.length&&(e._colorInput=new m(e._colorgradientInputs,o({},t,{tabindex:0})),e._colorInput.bind("change",(function(t){e._updateUI(t.value,!0)})),e._colorInput.bind("select",(function(t){var n=r(t.value);e._select(n),e.trigger("forceSelect",{value:e.value()})})))},_hsvArea:function(){var e,t,i=this,a=i.wrapper.find(".k-hsv-rectangle"),r=a.find(".k-draghandle").attr("tabIndex",0).on(c,(e=i._hsvKeydown,t=i,function(){return e.apply(t,arguments)})),o=this.value();function s(e,t){var n,a,r=this.offset,o=e-r.left,s=t-r.top,l=this.width,d=this.height;n=(o=o<0?0:o>l?l:o)/l,a=1-(s=s<0?0:s>d?d:s)/d,i._svChange(n,a)}o&&o.indexOf("rgba")>-1&&(o=o.replace("rgba","RGBA")),this._hsvDragAriaTemplate||(this._hsvDragAriaTemplate=n.template(this.options.hsvDragARIATemplate)),r.attr("aria-label",this._hsvDragAriaTemplate(o||"")),i._hsvEvents=new n.UserEvents(a,{global:!0,press:function(e){this.offset=n.getOffset(a),this.width=a.width(),this.height=a.height(),r.focus(),s.call(this,e.x.location,e.y.location)},start:function(){a.addClass("k-dragging"),r.focus()},move:function(e){e.preventDefault(),s.call(this,e.x.location,e.y.location)},end:function(){a.removeClass("k-dragging")}}),i._hsvRect=a,i._hsvHandle=r},_hsvKeydown:function(e){var t=this;function n(n,i){var a=t._getHSV();a[n]+=i*(e.shiftKey?.01:.05),a[n]<0&&(a[n]=0),a[n]>1&&(a[n]=1),t._updateUI(a),f(e)}function i(n){var i=t._getHSV();i.h+=n*(e.shiftKey?1:5),i.h<0&&(i.h=0),i.h>359&&(i.h=359),t._updateUI(i),f(e)}switch(e.keyCode){case l.LEFT:e.ctrlKey?i(-1):n("s",-1);break;case l.RIGHT:e.ctrlKey?i(1):n("s",1);break;case l.UP:n(e.ctrlKey&&t._opacitySlider?"a":"v",1);break;case l.DOWN:n(e.ctrlKey&&t._opacitySlider?"a":"v",-1);break;case l.ENTER:t._select(t._getHSV());break;case l.F2:t._colorInput.element.find("input").trigger("focus").select();break;case l.ESC:t._cancel()}},_onEnable:function(e){var t=this.wrapper;this._hueSlider.enable(e),this._opacitySlider&&this._opacitySlider.enable(e),t.find("input").attr("disabled",!e),this.options._standalone&&(e?t.removeAttr("aria-disabled"):t.attr("aria-disabled",!0))},_reset:function(){var e=this;e._colorInput&&e._colorInput.reset(),e._resetHsv(),e._resetColorContrast()},_resetColorContrast:function(){var e=this,t=e.options.contrastTool;e._contrastTool.length&&e._updateColorContrast(t.backgroundColor?r(t.backgroundColor):r(d))},_resetHsv:function(){var e=r(u);this._updateHsv(e)},_sliders:function(){var e=this,t=e.wrapper,n=t.find(".k-hue-slider"),i=t.find(".k-alpha-slider");function a(t){e._updateUI(e._getHSV(t.value,null,null,null))}function r(t){e._updateUI(e._getHSV(null,null,null,t.value/100))}n.attr("aria-label","hue"),e._hueSlider=n.kendoSlider({min:0,max:360,tickPlacement:"none",showButtons:!1,orientation:"vertical",slide:a,change:a}).data("kendoSlider"),i.attr("aria-label","opacity"),e._opacitySlider=i.kendoSlider({min:0,max:100,tickPlacement:"none",showButtons:!1,orientation:"vertical",slide:r,change:r}).data("kendoSlider")},_svChange:function(e,t){var n=this._getHSV(null,e,t,null);this._updateUI(n)},_updateColorContrast:function(e){var t=this,i=t.options.contrastTool,a=i.backgroundColor?r(i.backgroundColor):r(d),o=h.getContrastFromTwoRGBAs(r(e.toCssRgba()),a),s=n.template('<div class="k-contrast-ratio"><span class="k-contrast-ratio-text">#:messages.contrastRatio# #:kendo.toString(ratio, "n2")#</span><span class="k-contrast-validation k-text-success">#if (ratio > 4.5) {#<span class="k-icon k-i-check"></span>#}##if (ratio > 7) {#<span class="k-icon k-i-check"></span>#}#</span></div>'),l=n.template('<div><span>#:level#: #:limit# </span>#if (ratio > limit) {#<span class="k-contrast-validation k-text-success">#:messages.pass# <span class="k-icon k-i-check"></span></span>#} else {#<span class="k-contrast-validation k-text-error">#:messages.fail# <span class="k-icon k-i-close"></span></span>#}#</div>'),u="";u+=s({messages:t.options.messages,ratio:o}),u+=l({messages:t.options.messages,ratio:o,limit:4.5,level:"AA"}),u+=l({messages:t.options.messages,ratio:o,limit:7,level:"AAA"}),t._contrastTool.find(".k-contrast-ratio, div").remove(),t._contrastTool.append(u),t._updateContrastSvg(a)},_updateContrastSvg:function(t){var n,i=this._hsvRect,a="k-color-contrast-svg",r={width:i.width(),height:i.height()};r.width&&r.height&&(n=e(h.renderSvgCurveLine(r,this._getHSV(),t)).addClass(a),i.find("."+a).remove(),i.append(n))},_updateHsv:function(e){var t=this,n=t._hsvRect;e=e.toHSV(),t._hsvHandle.css({left:e.s*n.width()+"px",top:(1-e.v)*n.height()+"px"}),t._hueElements.css("background-color",s.fromHSV(e.h,1,1,1).toCss()),t._hueSlider.value(e.h),t._opacitySlider&&(t._opacitySlider.wrapper.find(".k-slider-track").css("background","linear-gradient(to top, transparent, "+s.fromHSV(e.h,1,1,1).toCss()),t._opacitySlider.value(100*e.a)),t._updateHsvAria(e.s,e.v)},_updateHsvAria:function(e,t){var n=this.value();n&&n.indexOf("rgba")>-1&&(n=n.replace("rgba","RGBA")),this._hsvHandle.attr({"aria-label":this._hsvDragAriaTemplate(n||""),"aria-valuenow":Math.round(100*e),"aria-valuetext":"saturation: "+Math.round(100*e)+"%, value: "+Math.round(100*t)+"%"})},_updateUI:function(e,t){var n=this;e?(!t&&n._colorInput&&n._colorInput.value(e),n._triggerSelect(e),n._updateHsv(e),n._contrastTool.length&&n._updateColorContrast(e)):n._reset()},_wrapper:function(){var t,n=this.options;(t=this.element.is("input")?this.element.addClass("k-hidden").wrap("<div>").parent():this.element).addClass("k-colorgradient").attr({role:"textbox","aria-keyshortcuts":"Enter"}).append(this._template(n)),this._hueElements=e(".k-hsv-rectangle, .k-alpha-slider .k-slider-track",t),this._colorgradientInputs=e(".k-colorgradient-inputs",t),this._contrastTool=e(".k-colorgradient-color-contrast",t),this.wrapper=t},destroy:function(){this._hsvEvents.destroy(),this._hueSlider.destroy(),this._opacitySlider&&this._opacitySlider.destroy(),this._colorInput&&this._colorInput.destroy(),this._hueSlider=this._opacitySlider=this._hsvRect=this._hsvHandle=this._hueElements=this._selectedColor=this._colorAsText=this._contrastTool=null,p.fn.destroy.call(this)}});i.plugin(g)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=n.parseColor,r=n.keys,o=".",s="background-color",l="k-selected",d="k-focus",u="k-colorpalette-tile",c=i.colorpicker.ColorSelector;function p(e){e.preventDefault()}function h(e,t){return function(){return e.apply(t,arguments)}}var f=c.extend({init:function(e,t){var i=this;c.fn.init.call(i,e,t),i._tabIndex=this.element.attr("tabindex")||0,i._wrapper(),t=i.options,i._selectedID=(t.ariaId||n.guid())+"_selected",i._ariaTemplate=n.template(i.options.ARIATemplate),i._value&&(i._updateUI(i._value),i.wrapper.find(".k-focus").removeClass(d)),i.wrapper.attr("aria-label",i._ariaTemplate(i.value()||"")),i._attachEvents()},focus:function(){this.wrapper&&!this.wrapper.is("[unselectable='on']")&&this.wrapper.trigger("focus")},options:{name:"ColorPalette",columns:10,tileSize:null,palette:"basic"},_attachEvents:function(){var e=this;e.wrapper.on("click.kendoColorTools",o+u,(function(t){e._select(t.currentTarget)})).on("keydown.kendoColorTools",h(e._keydown,e)).on("blur.kendoColorTools",(function(){e.wrapper.find(o+u).removeClass(d)})).on("focus.kendoColorTools",h(e._focus,e))},_colors:function(){var t=this.options,n=t.palette||"basic";return"websafe"==n?(n="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",t.columns=18):"basic"==n&&(n="000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7"),"string"==typeof n&&(n=n.split(",")),Array.isArray(n)&&(n=e.map(n,(function(e){return a(e)}))),n},_current:function(t){this.wrapper.find(o+u).removeClass(d).removeAttr("id"),e(t).addClass(d).attr("id",this._selectedID),this.wrapper.removeAttr("aria-activedescendant").attr("aria-activedescendant",this._selectedID)},_focus:function(){var e=this.wrapper;0===e.find("#"+this._selectedID).length&&this._current(e.find(o+u).first())},_keydown:function(e){var t,n,i=this.wrapper.find(o+u),a=i.filter(".k-focus").get(0)||i.filter(".k-selected").get(0),s=e.keyCode;if(a&&(n=Array.prototype.indexOf.call(a.parentNode.children,a)),s==r.LEFT)t=a?a.previousSibling:i[i.length-1];else if(s==r.RIGHT)t=a?a.nextSibling:i[0];else if(s==r.DOWN)t=a?a.parentNode.nextSibling?a.parentNode.nextSibling.children[n]:null:i[0];else if(s==r.UP)t=a?a.parentNode.previousSibling?a.parentNode.previousSibling.children[n]:null:i.get[i.length-1];else if(s==r.ENTER){if(p(e),a)return this._select(a),void this.trigger("forceSelect",{value:this.value()})}else s==r.ESC&&this._cancel();t&&1!==t.nodeType&&(t=null),t&&(p(e),this._current(t))},_onEnable:function(e){this.options._standalone&&(e?(this.wrapper.attr("tabindex",this._tabIndex),this.wrapper.removeAttr("aria-disabled")):(this.wrapper.removeAttr("tabindex"),this.wrapper.attr("aria-disabled",!0)))},_select:function(t){var n=this.wrapper.find(o+u);t=e(t),c.fn._select.call(this,t.css(s)),n.removeClass(l).removeAttr("aria-selected"),t.addClass(l).attr("aria-selected",!0)},_template:n.template('<div class="k-colorpalette-table-wrap"><table class="k-colorpalette-table k-palette" 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-colorpalette-tile#= selected ? " k-selected" : "" #" aria-label="#= colors[i].toCss() #"></td># } #</tr></table></div>'),_tileSize:function(){var e,t,n=this.options.tileSize;if(n){if(/number|string/.test(typeof n))e=t=parseFloat(n);else{if("object"!=typeof n)throw new Error("Unsupported value for the 'tileSize' argument");e=parseFloat(n.width),t=parseFloat(n.height)}this.wrapper.find(o+u).css({width:e,height:t})}},_updateUI:function(t){var n=null,i=this.wrapper.find(o+u);this.wrapper.find(o+u).each((function(){var i=a(e(this).css(s));if(i&&i.equals(t))return n=this,!1})),this._current(n),i.removeClass(l),n&&(e(n).addClass(l),this.wrapper.attr("aria-label",this._ariaTemplate(this.value()||"")))},_wrapper:function(){var t,n=this.options,i=this._colors();(t=this.element.is("input")?this.element.addClass("k-hidden").wrap("<div>").parent():this.element).addClass("k-colorpalette").attr("role","grid").append(e(this._template({colors:i,columns:n.columns,tileSize:n.tileSize,value:this._value,id:n.ariaId}))).attr("tabindex",this._tabIndex),this.wrapper=t,this._tileSize()}});i.plugin(f)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=n.html,r=n.Color,o=e.extend,s="background-color",l=".kendoColorTools",d="click"+l,u=i.colorpicker.ColorSelector,c=n.keys,p="k-no-color",h="k-selected",f=".k-color-preview-mask",m="aria-pressed",g="aria-disabled",v={gradient:i.ColorGradient,palette:i.ColorPalette};var _=u.extend({init:function(e,t){var i=this;t&&!1===t.autoupdate&&(t._standalone=!1),u.fn.init.call(i,e,t),t=i.options=n.deepExtend({},i.options,t),e=i.element,i._wrapper();var a=i.color();i._changeView(t.view),i._setViewSize(),a?(i._updateUI(a),i._previousColor.children(f).css(s,a.toDisplay()),i._selectedColor.children(f).css(s,a.toDisplay())):(i._selectedColor.addClass(p),i._previousColor.addClass(p)),i._attachEvents(),i._navigation()},destroy:function(){var e=this;u.fn.destroy.call(this),e._view&&(e._view.destroy(),e._viewsContainer.empty()),e.element.off(l),e._selectedColor=e._previousColor=e._viewsContainer=e._view=null},options:{name:"FlatColorPicker",opacity:!1,buttons:!1,input:!0,preview:!0,clearButton:!1,format:"hex",formats:["rgb","hex"],view:"gradient",views:["gradient","palette"],palette:null,autoupdate:!0,backgroundColor:null,columns:10,tileSize:24,messages:{apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:null,contrastRatio:"Contrast ratio:",fail:"Fail",pass:"Pass",hex:"HEX",toggleFormat:"Toggle format",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",gradient:"Gradient view",palette:"Palette view"},size:"medium",_otOfPicker:!0},setBackgroundColor:function(e){var t=this;t._view&&t._view.setBackgroundColor&&t._view.setBackgroundColor(e)},_attachEvents:function(){var t,n,i=this;i.wrapper.on("keydown.kendoColorTools",(t=i._keydown,n=i,function(){return t.apply(n,arguments)})).on(d,".k-coloreditor-reset",(function(){i._clearColor=!0,i._updateUI(null),i._view.value(null)})).on(d,".k-coloreditor-apply",(function(){i._clearColor?i._select(null):i._select(i._view.color())})).on(d,".k-coloreditor-cancel",(function(){delete i._clearColor,i._updateUI(i.color()),i._cancel()})).on(d,".k-button[data-view]",(function(t){var n=e(t.target).closest("[data-view]");n.is("."+h)||(i.wrapper.find(".k-button[data-view]").removeClass(h).attr(m,!1),n.addClass(h).attr(m,!0),i._changeView(n.data("view")))}))},_select:function(e){u.fn._select.call(this,e),this._updatePreviousColor(e)},_updatePreviousColor:function(e){var t=this;e?(t._previousColor.removeClass(p),t._previousColor.children(f).css(s,e.toDisplay())):(t._previousColor.addClass(p),t._previousColor.children(f).css(s,""))},_changeView:function(t){var n,i,a=this,o=e.extend({},a.options),s=v[t];a._view&&a._view._colorInput&&(a.options.format=a._view._colorInput._viewModel.format),a.options.view=t,delete o.name,delete o.change,delete o.select,delete o.cancel,delete o._standalone,a._view&&(n=a._view.color(),a._view.destroy(),a._viewsContainer.empty()),n&&(n=n.toHSV(),i=r.fromHSV(a._cachedHue||0,n.s,n.v,n.a),a._cachedHue=n.toHSV().h,n=n.equals(i)?i:n),o._otOfPicker=!1,s&&(a._view=new v[t](e("<div></div>").appendTo(a._viewsContainer),o),a._view.value(n),a._view.bind("change",(function(e){delete a._clearColor,a._updateUI(e.sender.color(),!0)})),a._view.bind("forceSelect",(function(e){delete a._clearColor,a._select(e.sender.color())})))},_onEnable:function(e){var t=this;t._view&&t._view._onEnable(e),t.options._standalone&&(e?t.wrapper.removeAttr(g):t.wrapper.attr(g,!0))},focus:function(){this._view&&this._view.focus()},_updateUI:function(e,t){var n=this;e&&e.toDisplay?(n._selectedColor.removeClass(p),n._selectedColor.children(f).css(s,e.toDisplay())):(n._selectedColor.addClass(p),n._selectedColor.children(f).css(s,"")),n._triggerSelect(e),n.options.autoupdate&&n._updatePreviousColor(e),t||n._view.value(e)},_setViewSize:function(){var e=this,t=e.wrapper[0],n=parseInt(e.options.tileSize.width||e.options.tileSize,10),i=parseInt(e.options.tileSize.width||e.options.tileSize,10),a=e.options.columns;t.style.setProperty("--kendo-color-preview-columns",a),t.style.setProperty("--kendo-color-preview-width",n+"px"),t.style.setProperty("--kendo-color-preview-height",i+"px")},_keydown:function(e){e.keyCode==c.ESC&&this._cancel()},_template:function(){var e=this.options,t=o({},e,{fillMode:"flat",themeColor:"base",rounded:"medium"});return n.template('<div class="k-coloreditor-header k-hstack"># if (views && views.length > 1) { #<div class="k-coloreditor-header-actions k-hstack"><div role="group" class="k-button-group k-button-group-flat">'+a.renderButton('<button aria-pressed="false" data-view="gradient" title="#:messages.gradient#"></button>',o({icon:"color-canvas"},t))+a.renderButton('<button aria-pressed="false" data-view="palette" title="#:messages.palette#"></button>',o({icon:"palette"},t))+'</div></div># } #<div class="k-spacer"></div><div class="k-coloreditor-header-actions k-hstack"># if (clearButton) { #'+a.renderButton('<button class="k-coloreditor-reset" title="#:messages.clearColor#"></button>',o({icon:"reset-color"},t))+'# } ## if (preview) { #<div class="k-coloreditor-preview k-vstack"><span class="k-coloreditor-preview-color k-color-preview"><span class="k-color-preview-mask"></span></span><span class="k-coloreditor-current-color k-color-preview"><span class="k-color-preview-mask"></span></span></div># } #</div></div><div class="k-coloreditor-views k-vstack"></div># if (buttons) { #<div class="k-coloreditor-footer k-actions k-hstack k-justify-content-end">'+a.renderButton('<button class="k-coloreditor-cancel" title="#:messages.cancel#">#: messages.cancel #</button>',o({},t,{fillMode:"solid"}))+a.renderButton('<button class="k-coloreditor-apply" title="#:messages.apply#">#: messages.apply #</button>',o({},t,{fillMode:"solid",themeColor:"primary"}))+"</div># } #")(e)},_wrapper:function(){var t,n=this.options;(t=this.element.is("input")?this.element.addClass("k-hidden").wrap("<div>").parent():this.element).addClass("k-flatcolorpicker k-coloreditor").attr({role:"textbox","aria-keyshortcuts":"Enter"}).append(this._template()),this._selectedColor=e(".k-coloreditor-preview-color",t),this._previousColor=e(".k-coloreditor-current-color",t),this._viewsContainer=e(".k-coloreditor-views",t),t.find(".k-button[data-view="+n.view+"]").addClass(h).attr(m,!0),this.wrapper=t}});i.plugin(_)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=n.Color,o=n.parseColor,s=n.keys,l=".kendoColorTools",d="click"+l,u="keydown"+l,c=i.colorpicker.ColorSelector,p=i.FlatColorPicker,h=a.extend({init:function(t,i){var r=this;i&&i.palette&&!i.view&&(i.view="palette"),a.fn.init.call(r,t,i),i=r.options=n.deepExtend({},r.options,i);var s=(t=r.element).attr("value")||t.val();s=o(s||i.value,!0),r._value=i.value=s;var l=n.html.renderButton('<button class="k-input-button" unselectable="on" aria-label="select" tabindex="-1"></button>',e.extend({},r.options,{icon:"arrow-s"})),d=r._inputWrapper=r.wrapper=e(r._template(e.extend({},r.options,{_buttonHtml:l})));r._applyCssClasses(),t.hide().after(d),t.is("input")&&(t.appendTo(d),r._preventDefaultLabelClick()),r._tabIndex=t.attr("tabIndex")||0,r.enable(!t.attr("disabled"));var u=t.attr("accesskey");u&&(t.attr("accesskey",null),d.attr("accesskey",u)),r.bind("activate",(function(e){e.isDefaultPrevented()||r.toggle()})),r._updateUI(s)},destroy:function(){this.wrapper.off(l).find("*").off(l),this._popup&&(this._selector.destroy(),this._popup.destroy()),this._selector=this._popup=this.wrapper=null,a.fn.destroy.call(this)},enable:function(e){var t=this,n=t.wrapper,i=n.find(".k-input-button");0===arguments.length&&(e=!0),t.element.attr("disabled",!e),n.attr("aria-disabled",!e),i.off(l).on("mousedown"+l,f),n.addClass("k-disabled").removeAttr("tabIndex").add("*",n).off(l),e?n.removeClass("k-disabled").attr("tabIndex",t._tabIndex).on("mouseenter"+l,(function(){n.addClass("k-hover")})).on("mouseleave"+l,(function(){n.removeClass("k-hover")})).on("focus"+l,(function(){n.addClass("k-focus")})).on("blur"+l,(function(){n.removeClass("k-focus")})).on(u,m(t._keydown,t)).on(d,".k-input-button",m(t.toggle,t)).on(d,".k-input-inner",(function(){t.trigger("activate")})):t.close()},_template:n.template('<span role="textbox" aria-haspopup="true" class="k-colorpicker k-picker k-icon-picker"><span class="k-input-inner"><span class="k-value-icon k-color-preview #: toolIcon ? "k-icon-color-preview" : "" #"># if (toolIcon) { #<span class="k-color-preview-icon k-icon #= toolIcon #"></span># } #<span class="k-color-preview-mask"></span></span></span >#= _buttonHtml #</span>'),options:{name:"ColorPicker",closeOnSelect:!1,contrastTool:!1,palette:null,columns:10,toolIcon:null,value:null,messages:{apply:"Apply",cancel:"Cancel",noColor:"no color",clearColor:"Clear color",previewInput:null,contrastRatio:"Contrast ratio:",fail:"Fail",pass:"Pass",hex:"HEX",toggleFormat:"Toggle format",red:"Red",green:"Green",blue:"Blue",alpha:"Alpha",gradient:"Gradient view",palette:"Palette view"},opacity:!1,buttons:!0,preview:!0,clearButton:!1,input:!0,format:"hex",formats:["rgb","hex"],view:"gradient",views:["gradient","palette"],backgroundColor:null,ARIATemplate:'Current selected color is #=data || "none"#',size:"medium",rounded:"medium",fillMode:"solid"},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()},setBackgroundColor:function(e){var t=this,n=function(){t._selector.setBackgroundColor(e)};t.options.contrastTool.backgroundColor=e,t._selector&&t._popup&&t._popup.visible()?t._selector.setBackgroundColor(e):t._popup&&(t._popup.unbind("activate",n),t._popup.bind("activate",n))},_noColorIcon:function(){return this.wrapper.find(".k-color-preview")},color:c.fn.color,value:c.fn.value,_select:c.fn._select,_triggerSelect:c.fn._triggerSelect,_isInputTypeColor:c.fn._isInputTypeColor,_preventDefaultLabelClick:function(){var e=this,t=e.element,n=t.closest("label"),i=t.attr("id");i&&(n=n.add('label[for="'+i+'"]')),n.on("click",(function(t){e.open(),t.preventDefault()}))},_updateUI:function(e,t){this._updateInput(e),this._triggerSelect(e),this.wrapper.find(".k-color-preview-mask").css("background-color",e?e.toDisplay():""),this._noColorIcon().toggleClass("k-no-color",!e),this._selector&&!t&&this._selector.value(e)},_updateInput:function(e){var t="";e&&(t=this._isInputTypeColor()||1==e.a?e.toCss():e.toCssRgba(),this.element.val(t)),this._ariaTemplate||(this._ariaTemplate=n.template(this.options.ARIATemplate)),this.wrapper.attr("aria-label",this._ariaTemplate(t))},_keydown:function(e){var t=e.keyCode;this._getPopup().visible()?(t==s.ESC?this._selector._cancel():this._selector._keydown(e),f(e)):t!=s.ENTER&&t!=s.DOWN||(this.open(),f(e))},_getPopup:function(){var t=this,i=t._popup;if(!i){var a,s=t.options;a=p,s.autoupdate=!0!==s.buttons,delete s.select,delete s.change,delete s.cancel,s._otOfPicker=!1;var l=n.guid(),d=e('<div id="'+l+'" class="k-colorpicker-popup"></div>').appendTo(document.body),u=t._selector=new a(e("<div></div>").appendTo(d),s);t.wrapper.attr("aria-owns",l),t._popup=i=d.kendoPopup({anchor:t.wrapper,adjustSize:{width:5,height:0}}).data("kendoPopup"),u.bind({select:function(e){t._updateUI(o(e.value),!0)},change:function(e){t.options.buttons?t._select(u.color()):t._updateUI(o(e.value),!0),(t.options.buttons||"palette"===t._selector.options.view&&t.options.closeOnSelect)&&t.close()},cancel:function(){t.close()}}),i.bind({close:function(n){if(t.trigger("close"))n.preventDefault();else{t.wrapper.removeClass("k-focus");var i=u.color();t.options.buttons?t._select(t.color()):t._select(i),(i=t.color())&&i.h&&(t._cachedHue=i.h),event&&event instanceof MouseEvent&&0===e(event.target).parents(".k-colorpicker-popup").length||setTimeout((function(){t.wrapper&&!t.wrapper.is("[unselectable='on']")&&t.wrapper.trigger("focus")}),0)}},open:function(e){t.trigger("open")?e.preventDefault():t.wrapper.addClass("k-focus")},activate:function(){var e,n=t.color();n&&(n=n.toHSV(),e=r.fromHSV(t._cachedHue||0,n.s,n.v,n.a),n=n.equals(e)?e:n),u.value(n),u.focus(),t.wrapper.addClass("k-focus")}})}return i}});function f(e){e.preventDefault()}function m(e,t){return function(){return e.apply(t,arguments)}}i.plugin(h),n.cssProperties.registerPrefix("ColorPicker","k-picker-"),n.cssProperties.registerValues("ColorPicker",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r="change",o="disabled",s="checked",l=a.extend({init:function(e,t){var i=this;a.fn.init.call(i,e,t),i._wrapper(),i._initSettings(),i._attachEvents(),n.notify(i,n.ui)},events:[r],options:{name:"ToggleInputBase"},NS:".kendoToggleInputBase",RENDER_INPUT:e.noop,check:function(e){var t=this,n=t.element[0];if(undefined===e)return n.checked;n.checked!==e&&(t.options.checked=n.checked=e),e?t.element.attr(s,s):t.element.prop(s,!1)},destroy:function(){a.fn.destroy.call(this),this.wrapper.off(this.NS)},enable:function(e){var t=this.element;void 0===e&&(e=!0),this.options.enabled=e,e?t.prop(o,!1):t.attr(o,o)},toggle:function(){this.check(!this.element[0].checked)},_attachEvents:function(){this.element.on(r+this.NS,this._change.bind(this))},_change:function(){var e=this.element[0].checked;this.trigger(r,{checked:e})},_initSettings:function(){var e=this,t=e.element[0],n=e.options;null===n.checked&&(n.checked=t.checked),e.check(n.checked),n.enabled=n.enabled&&!e.element.attr(o),e.enable(n.enabled)},_wrapper:function(){var t=this,n=t.options;(0,t.RENDER_INPUT)(t.element,e.extend({},n)),t.element.removeClass("input-validation-error"),t.wrapper=t.element}});i.plugin(l)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.html.HTMLBase,a=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n._wrapper(),n._addClasses()},options:{label:null,labelPosition:"after",labelId:null,encoded:!0},_wrapper:function(){var t=this,i=t.element[0],a=t.options,r=i.id;t.wrapper=t.element.addClass(a.inputClass).prop("type",a.type),!r&&a.label&&(i.id=r=n.guid()),a.label&&(t.labelEl=e("<label for='"+r+"' class='"+a.labelClass+"'>"),a.encoded?t.labelEl.text(a.label):t.labelEl.html(a.label),a.labelId&&t.labelEl.attr("id",a.labelId),a.optional&&t.labelEl.append("<span class='"+a.optionalClass+"'>"+a.optionalText+"</span>"),t.element[a.labelPosition](t.labelEl))},html:function(){var e=this,t="after"===e.options.labelPosition,n=i.fn.html.call(e);return e.labelEl?t?n+e.labelEl[0].outerHTML:e.labelEl[0].outerHTML+n:n}}),r=a.extend({init:function(e,t){a.fn.init.call(this,e,t),this._addClasses()},options:{name:"HTMLCheckBox",inputClass:"k-checkbox",labelClass:"k-checkbox-label",optionalClass:"k-label-optional",optionalText:"(Optional)",type:"checkbox",rounded:"medium",size:"medium",stylingOptions:["size","rounded"]}}),o=a.extend({init:function(e,t){a.fn.init.call(this,e,t),this._addClasses()},options:{name:"HTMLRadioButton",inputClass:"k-radio",labelClass:"k-radio-label",optionalClass:"k-label-optional",optionalText:"(Optional)",type:"radio",size:"medium",stylingOptions:["size"]}});e.extend(n.html,{renderCheckBox:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("<input />")),new r(n,i).html()},renderRadioButton:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("<input />")),new o(n,i).html()},HTMLInput:a,HTMLCheckBox:r,HTMLRadioButton:o}),n.cssProperties.registerPrefix("HTMLCheckBox","k-checkbox-"),n.cssProperties.registerValues("HTMLCheckBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),n.cssProperties.registerPrefix("HTMLRadioButton","k-radio-")}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.ToggleInputBase.extend({options:{name:"CheckBox",checked:null,enabled:!0,encoded:!0,label:null,rounded:"medium",size:"medium"},RENDER_INPUT:n.html.renderCheckBox,NS:".kendoCheckBox",value:function(e){return"string"==typeof e&&(e="true"===e),this.check.apply(this,[e])}});n.cssProperties.registerPrefix("CheckBox","k-checkbox-"),n.cssProperties.registerValues("CheckBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),i.plugin(a)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=".kendoValidator",r="k-invalid-msg",o=new RegExp(r,"i"),s="k-invalid",l="k-valid",d="k-validation-summary",u="k-text-error",c="k-messagebox k-messagebox-error",p="aria-invalid",h=/^[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,f=/^(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,m=":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])",g=":checkbox:not([disabled],[readonly])",v="[type=number],[type=range]",_="blur",b="name",k="form",w="novalidate",y="validate",x="change",C="validateInput",T=function(e,t){return"string"==typeof t&&(t=new RegExp("^(?:"+t+")$")),t.test(e)},S=function(e,t,n){var i=e.val();return!e.filter(t).length||""===i||T(i,n)},I=function(e,t){return!!e.length&&null!=e[0].attributes[t]};function D(t){return e.parseHTML?e(e.parseHTML(t)):e(t)}function E(t,i){for(var a,r=e(),s=0,l=t.length;s<l;s++)a=t[s],o.test(a.className)&&a.getAttribute(n.attr("for"))===i&&(r=r.add(a));return r}function A(e,t){return!!e&&("string"==typeof e.nodeName&&"LABEL"===e.nodeName&&("string"==typeof e.getAttribute("for")&&"string"==typeof t.getAttribute("id")&&e.getAttribute("for")===t.getAttribute("id")))}n.ui.validator||(n.ui.validator={rules:{},messages:{},allowSubmit:e.noop,validateOnInit:e.noop});var F=i.extend({init:function(t,a){var r=this,o=function(t){var i,a=n.ui.validator.ruleResolvers||{},r={};for(i in a)e.extend(!0,r,a[i].resolve(t));return r}(t),s="["+n.attr("validate")+"!=false]";(a=a||{}).rules=e.extend({},n.ui.validator.rules,o.rules,a.rules),a.messages=e.extend({},n.ui.validator.messages,o.messages,a.messages),i.fn.init.call(r,t,a),r._errorTemplate=n.template(r.options.errorTemplate),r._summaryTemplate=n.template(r.options.validationSummary.template||'<ul>#for(var i = 0; i < errors.length; i += 1){#<li><a data-field="#=errors[i].field#" href="\\#">#= errors[i].message #</a></li># } #</ul>'),r.element.is(k)&&r.element.attr(w,w),r._inputSelector=m+s,r._checkboxSelector=g+s,r._errors={},r._attachEvents(),r._isValidated=!1,r._validateOnInit()&&r.validate()},events:[y,x,C],options:{name:"Validator",errorTemplate:'<span class="k-form-error">#= 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",captcha:"The text you entered doesn't match the image."},rules:{required:function(e){var t=!e.attr("name")&&!e.is(":checked"),n=e.attr("name"),i=n&&n.indexOf("'")>-1?'"':"'",a=e.attr("name")&&!this.element.find("input[name="+i+e.attr("name")+i+"]:checked").length,r=e.filter("[type=checkbox]").length&&(t||a),o=e.filter("[type=radio]").length&&!this.element.find("input[name="+i+e.attr("name")+i+"]:checked").length,s=e.val();return!(I(e,"required")&&(!s||""===s||0===s.length||r||o))},pattern:function(e){return!e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length||""===e.val()||T(e.val(),e.attr("pattern"))},min:function(e){return!e.filter(v+",["+n.attr("type")+"=number]").filter("[min]").length||""===e.val()||(parseFloat(e.attr("min"))||0)<=n.parseFloat(e.val())},max:function(e){return!e.filter(v+",["+n.attr("type")+"=number]").filter("[max]").length||""===e.val()||(parseFloat(e.attr("max"))||0)>=n.parseFloat(e.val())},step:function(e){if(e.filter(v+",["+n.attr("type")+"=number]").filter("[step]").length&&""!==e.val()){var t,i=parseFloat(e.attr("min"))||0,a=parseFloat(e.attr("step"))||1,r=parseFloat(e.val()),o=(s=((s=a)+"").split(".")).length>1?s[1].length:0;return o?(t=Math.pow(10,o),Math.floor((r-i)*t)%(a*t)/Math.pow(100,o)==0):(r-i)%a==0}var s;return!0},email:function(e){return S(e,"[type=email],["+n.attr("type")+"=email]",h)},url:function(e){return S(e,"[type=url],["+n.attr("type")+"=url]",f)},date:function(e){return!e.filter("[type^=date],["+n.attr("type")+"=date]").length||""===e.val()||null!==n.parseDate(e.val(),e.attr(n.attr("format")))},captcha:function(e){if(e.filter("["+n.attr("role")+"=captcha]").length){var t=this,i=n.widgetInstance(e),a=function(e){return null!=e};if(e.data("captcha_validating")||a(i.isValid())||!i.getCaptchaId()||(e.data("captcha_validating",!0),t._validating=!0,i.validate().done((function(){t._validating=!1,t._checkElement(e)})).fail((function(e){t._validating=!1,e.error&&"handler_not_defined"===e.error&&window.console.warn("Captcha's validationHandler is not defined! You should either define a proper validation endpoint or declare a callback function to ensure the required behavior.")}))),a(i.isValid()))return e.removeData("captcha_validating"),i.isValid()}return!0}},validateOnBlur:!0,validationSummary:!1},_allowSubmit:function(){return n.ui.validator.allowSubmit(this.element,this.errors())},_validateOnInit:function(){return n.ui.validator.validateOnInit(this.element)},destroy:function(){i.fn.destroy.call(this),this.element.off(a),this.validationSummary&&(this.validationSummary.off(a),this.validationSummary=null)},value:function(){return!!this._isValidated&&0===this.errors().length},_submit:function(e){return!(!this.validate()&&!this._allowSubmit()||this._validating)||(e.stopPropagation(),e.stopImmediatePropagation(),e.preventDefault(),!1)},_checkElement:function(e){var t=this.value();this.validateInput(e),this.value()!==t&&this.trigger(x)},_attachEvents:function(){var t=this;t.element.is(k)&&t.element.on("submit"+a,t._submit.bind(t)),t.options.validateOnBlur&&(t.element.is(m)?(t.element.on(_+a,(function(){t._checkElement(t.element)})),t.element.is(g)&&t.element.on("click"+a,(function(){t._checkElement(t.element)}))):(t.element.on(_+a,t._inputSelector,(function(){t._checkElement(e(this))})),t.element.on("click"+a,t._checkboxSelector,(function(){t._checkElement(e(this))}))))},validate:function(){var e,t,n,i=!1,a=this.value();if(this._errors={},this.element.is(m))i=this.validateInput(this.element);else{var r=!1;for(t=0,n=(e=this.element.find(this._inputSelector)).length;t<n;t++)this.validateInput(e.eq(t))||(r=!0);i=!r}return this.options.validationSummary&&!a&&this.showValidationSummary(),this.trigger(y,{valid:i,errors:this.errors()}),a!==i&&this.trigger(x),i},validateInput:function(t){t=e(t),this._isValidated=!0;var i,a,r=this,o=r._errorTemplate,d=r._checkValidity(t),c=d.valid,h=t.attr(b)||"",f=r._findMessageContainer(h).add(t.next(".k-invalid-msg").filter((function(){var t=e(this);return!t.filter("["+n.attr("for")+"]").length||t.attr(n.attr("for"))===h}))).addClass("k-hidden"),m=c?"":r._extractMessage(t,d.key),g=c?"":D(o({message:(a=m,a.replace(/&amp/g,"&amp;").replace(/&quot;/g,'"').replace(/&#39;/g,"'").replace(/&lt;/g,"<").replace(/&gt;/g,">")),field:h})),v=!t.attr(p),_=t.is(".k-input-inner"),k=t.parent(".k-input");if(t.removeAttr(p),t.hasClass("k-hidden")&&(i=n.widgetInstance(t.closest(".k-signature"))),c||t.data("captcha_validating"))delete r._errors[h];else{r._errors[h]=m;var w=f.attr("id");if(r._decorateMessageContainer(g,h),w&&g.attr("id",w),0!==f.length)f.replaceWith(g);else{i=i||n.widgetInstance(t);var y=t.parent().get(0),x=t.next().get(0),T=t.prev().get(0);!i&&t.is("[type=radio]")&&(i=n.widgetInstance(t.closest(".k-radio-list"))),!i&&t.is("[type=checkbox]")&&(i=n.widgetInstance(t.closest(".k-checkbox-list"))),i&&i.wrapper&&(i.element!==i.wrapper||"Signature"==i.options.name)?g.insertAfter(i.wrapper):y&&"LABEL"===y.nodeName?g.insertAfter(y):x&&A(x,t[0])?g.insertAfter(x):T&&A(T,t[0])?g.insertAfter(t):_&&k.length?g.insertAfter(k):g.insertAfter(t)}g.removeClass("k-hidden"),t.attr(p,!0)}if(v!==c&&this.trigger(C,{valid:c,input:t,error:m,field:h}),(i=i&&"Signature"==i.options.name?i:n.widgetInstance(t))&&(i._inputWrapper||i.wrapper)||(t.toggleClass(s,!c),t.toggleClass(l,c)),i){var S=i._inputWrapper||i.wrapper,I=i._inputLabel;S&&(S.toggleClass(s,!c),S.toggleClass(l,c)),I&&I.toggleClass(u,!c)}if(v!==c){var E=g?g.attr("id"):f.attr("id");r._associateMessageContainer(t,E),this.options.validationSummary&&this.options.validateOnBlur&&this.showValidationSummary()}return c},hideMessages:function(){var e="."+r,t=this.element;this._disassociateMessageContainers(),t.is(m)?t.next(e).addClass("k-hidden"):t.find(e).addClass("k-hidden")},reset:function(){var e=this,t=e.element.find(".k-invalid"),n=e.element.find(".k-text-error");e._errors=[],e.hideMessages(),e.hideValidationSummary(),t.removeAttr(p),t.removeClass(s),n.removeClass(u)},_findMessageContainer:function(t){for(var i,a=n.ui.validator.messageLocators,r=e(),o=0,s=this.element.length;o<s;o++)r=r.add(E(this.element[o].getElementsByTagName("*"),t));for(i in a)r=r.add(a[i].locate(this.element,t));return r},_decorateMessageContainer:function(e,t){var i,a=n.ui.validator.messageLocators;for(i in e.addClass(r).attr(n.attr("for"),t||""),e.attr("id")||e.attr("id",t+"-error"),a)a[i].decorate(e,t)},_extractMessage:function(e,t){var i,a=this.options.messages[t],r=e.attr(b);return n.ui.Validator.prototype.options.messages[t]||(i=n.isFunction(a)?a(e):a),a=n.isFunction(a)?a(e):a,n.format(e.attr(n.attr(t+"-msg"))||e.attr("validationMessage")||i||a||e.attr("title")||"",r,e.attr(t)||e.attr(n.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},setOptions:function(e){e.validationSummary&&this.hideValidationSummary(),n.deepExtend(this.options,e),this.destroy(),this.init(this.element,this.options),this._setEvents(this.options)},_getInputNames:function(){for(var t=this.element.find(this._inputSelector),n=[],i=0,a=t.length;i<a;i++){var r=e(t[i]);I(r,b)&&(-1===n.indexOf(r.attr(b))||0===r.closest(".k-checkbox-list").length&&0===r.closest(".k-radio-list").length)&&n.push(r.attr(b))}return n},_associateMessageContainer:function(e,t){var i=n.getWidgetFocusableElement(e);i&&t&&n.toggleAttribute(i,"aria-describedby",t)},_disassociateMessageContainers:function(){for(var t,n,i=this,a=i.element.find(".k-invalid").addBack(),o=0;o<a.length;o+=1)(t=e(a[o])).is("input")&&(n=i._findMessageContainer(t.attr(b)).add(t.next("."+r)).attr("id"),i._associateMessageContainer(t,n))},_errorsByName:function(){for(var e=this,t=e._getInputNames(),n=[],i=0;i<t.length;i+=1){var a=t[i];e._errors[a]&&n.push({field:a,message:e._errors[a]})}return n},_renderSummary:function(){var t,n=this,i=this.options.validationSummary,r=this.element.prev();return(t=i.container?e(i.container):r&&r.hasClass(d)?r:e("<div />").insertBefore(n.element)).addClass([d,c].join(" ")),t.attr("role","alert"),t.on("click"+a,n._summaryClick.bind(n)),t},_summaryClick:function(t){t.preventDefault();var i,a=e(t.target),r=this.element.find("[name='"+a.data("field")+"']");r.length&&(i=n.getWidgetFocusableElement(r))&&i.trigger("focus")},showValidationSummary:function(){var e,t=this,n=t.validationSummary,i=t._errorsByName();n||(n=t.validationSummary=t._renderSummary()),e=D(t._summaryTemplate({errors:i})),n.html(e),n.toggleClass("k-hidden",!i.length)},hideValidationSummary:function(){var e=this.validationSummary;e&&e.addClass("k-hidden")}});n.ui.plugin(F)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=e.extend,o=n.isFunction,s=e.isPlainObject,l=e.inArray,d=/("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g,u="change",c="equalSet",p=["url","email","number","date","boolean"];function h(e){return(e=null!=e?e:"").type||n.type(e)||"string"}function f(e){var t,i,a=(e.model.fields||e.model)[e.field],r=h(a),d=a?a.validation:{},u=a?a.attributes:{},c=n.attr("type"),f=n.attr("bind"),m={id:e.id||e.field,name:e.field,title:e.title?e.title:e.field};for(t in d){if(i=d[t],l(t,p)>=0)m[c]=t;else if(!o(i)){var g=n.getCulture();if("number"==typeof i&&g.name.length){var v=g.numberFormat,_=i.toString().replace(".",v["."]);m[t]=_}else m[t]=s(i)?i.value||t:i}m[n.attr(t+"-msg")]=i.message,m.autocomplete="off"}for(var b in u)m[b]=u[b];return l(r,p)>=0&&(m[c]=r),m[f]=("boolean"===r?"checked:":"value:")+e.field,m}function m(e,t){var n=e.attr("id");return n&&(t.id=n,e.removeAttr("id")),t}var g=["AutoComplete","CheckBox","CheckBoxGroup","ColorGradient","ColorPicker","ColorPalette","ComboBox","DateInput","DatePicker","DateTimePicker","DropDownTree","Editor","FlatColorPicker","MaskedTextBox","MultiColumnComboBox","MultiSelect","NumericTextBox","RadioGroup","Rating","Slider","Switch","TimePicker","DropDownList","TextBox","TextArea","Captcha","Signature"],v={hidden:function(t,n){var i=f(n);e('<input type="hidden"/>').attr(i).appendTo(t)},number:function(t,i){var a=f(i);e('<input type="text"/>').attr(a).appendTo(t).kendoNumericTextBox({format:i.format}),e("<span "+n.attr("for")+'="'+i.field+'" class="k-invalid-msg k-hidden"/>').appendTo(t)},date:function(t,i){var a=f(i),r=i.format;r&&(r=n._extractFormat(r)),a[n.attr("format")]=r,e('<input type="text"/>').attr(a).appendTo(t).kendoDatePicker({format:i.format}),e("<span "+n.attr("for")+'="'+i.field+'" class="k-invalid-msg k-hidden"/>').appendTo(t)},string:function(t,n){var i=f(n);e('<input type="text"/>').attr(i).appendTo(t).kendoTextBox()},boolean:function(t,n){var i=f(n);k(e('<input type="checkbox" />').attr(i).kendoCheckBox().appendTo(t),t,n)},values:function(t,i){var a=f(i),r=n.stringify(function(e){var t,n,i,a,r,o;if(e&&e.length)for(o=[],t=0,n=e.length;t<n;t++)r=(i=e[t]).text||i.value||i,a=null==i.value?i.text||i:i.value,o[t]={text:r,value:a};return o}(i.values));e("<select "+n.attr("text-field")+'="text"'+n.attr("value-field")+'="value"'+n.attr("source")+"='"+(r?r.replace(/\'/g,"&apos;"):r)+"'"+n.attr("role")+'="dropdownlist"/>').attr(a).appendTo(t),e("<span "+n.attr("for")+'="'+i.field+'" class="k-invalid-msg k-hidden"/>').appendTo(t)},kendoEditor:function(t,n){var i=f(n),a=n.editor,r="kendo"+a,o=n.editorOptions,s=function(e,t){if(e.length)return"DropDownTree"===e&&t&&t.checkboxes||"MultiSelect"===e?"<select />":"RadioGroup"===e||"CheckBoxGroup"===e?"<ul />":"Signature"===e?"<div></div>":"Editor"===e||"TextArea"===e?"<textarea />":"<input />"}(a,o);k(e(s).attr(i).appendTo(t)[r](o),t,n)}},_={number:function(t,n){var i=f(n);i=m(t,i),e('<input type="number"/>').attr(i).appendTo(t)},date:function(t,n){var i=f(n);i=m(t,i),e('<input type="date"/>').attr(i).appendTo(t)},string:function(t,n){var i=f(n);i=m(t,i),e('<input type="text" />').attr(i).appendTo(t)},boolean:function(t,n){var i=f(n);i=m(t,i),e('<input type="checkbox" />').attr(i).appendTo(t)},values:function(t,n){var i=f(n),a=n.values,r=e("<select />");for(var o in i=m(t,i),a)e('<option value="'+a[o].value+'">'+a[o].text+"</option>").appendTo(r);r.attr(i).appendTo(t)}};function b(e,t){var n,i,a=e&&e.validation||{};for(n in a)i=a[n],s(i)&&i.value&&(i=i.value),o(i)&&(t[n]=i)}function k(t,n,i){(i&&i.shouldRenderHidden||!1)&&(t.val(!0),n.append(e("<input type='hidden' name='"+i.field+"' value='false' data-skip='true' data-validate='false'/>")))}var w=a.extend({init:function(e,t){var n=this;t.target&&(t.$angular=t.target.options.$angular,t.target.pane&&(n._isMobile=!0)),a.fn.init.call(n,e,t),n._validateProxy=n._validate.bind(n),n.refresh()},events:[u],options:{name:"Editable",editors:v,mobileEditors:_,clearContainer:!0,validateOnBlur:!0,validationSummary:!1,errorTemplate:'<div class="k-tooltip k-tooltip-error k-validator-tooltip"><span class="k-tooltip-icon k-icon k-i-warning"></span><span class="k-tooltip-content">#= message #</span><span class="k-callout k-callout-n"></span></div>',skipFocus:!1},editor:function(t,i){var a=this,o=a._isMobile?_:a.options.editors,l=s(t),u=l?t.field:t,c=a.options.model||{},p=l&&t.values?"values":h(i),f=l&&"string"==typeof t.editor&&"hidden"===t.editor,m=l&&!f&&t.editor,v=l&&-1!==e.inArray(t.editor,g),b=m?t.editor:o[f?"hidden":p],k=a.element.find("["+n.attr("container-for")+"="+u.replace(d,"\\$1")+"]");b=b||o.string,v?b=o.kendoEditor:m&&"string"==typeof t.editor&&(b=function(e){e.append(t.editor)}),b(k=k.length?k:a.element,r(!0,{},l?t:{field:u},{model:c}))},_validate:function(t){var i,a=this,r=t.value,o=a._validationEventInProgress,s={},l=n.attr("bind"),c=t.field.replace(d,"\\$1"),p=new RegExp("(value|checked)\\s*:\\s*"+c+"\\s*(,|$)");s[t.field]=t.value,(i=e(":input["+l+'*="'+c+'"]',a.element).filter("["+n.attr("validate")+"!='false']").filter((function(){return p.test(e(this).attr(l))}))).length>1&&(i=i.filter((function(){var t=e(this);return!t.is(":radio")||t.val()==r})));try{a._validationEventInProgress=!0,(!a.validatable.validateInput(i)||!o&&a.trigger(u,{values:s}))&&t.preventDefault()}finally{a._validationEventInProgress=!1}},end:function(){return this.validatable.validate()},destroy:function(){var e=this;e.angular("cleanup",(function(){return{elements:e.element}})),a.fn.destroy.call(e),e.options.model.unbind("set",e._validateProxy),e.options.model.unbind(c,e._validateProxy),n.unbind(e.element),e.validatable&&e.validatable.destroy(),n.destroy(e.element),e.element.removeData("kendoValidator"),e.element.is("["+n.attr("role")+"=editable]")&&e.element.removeAttr(n.attr("role"))},refresh:function(){var t,i,a,r,o,l,d=this,u=d.options.fields||[],p=d.options.clearContainer?d.element.empty():d.element,h=d.options.model||{},f={};for(Array.isArray(u)||(u=[u]),t=0,i=u.length;t<i;t++)a=u[t],r=s(a)?a.field:a,b(o=(h.fields||h)[r],f),d.editor(a,o);if(d.options.target&&d.angular("compile",(function(){return{elements:p,data:p.map((function(){return{dataItem:h}}))}})),!i)for(r in l=h.fields||h)b(l[r],f);!function(t){t.find(":input:not(:button, .k-combobox .k-input, .k-checkbox-list .k-checkbox, .k-radio-list .k-radio, ["+n.attr("role")+"=listbox], ["+n.attr("role")+"=upload], ["+n.attr("skip")+"], [type=file])").each((function(){var t=n.attr("bind"),i=this.getAttribute(t)||"",a="checkbox"===this.type||"radio"===this.type?"checked:":"value:",r=this.getAttribute("name")===w.antiForgeryTokenName,o=this.name;-1===i.indexOf(a)&&o&&!r&&(i+=(i.length?",":"")+a+o,e(this).attr(t,i))}))}(p),d.validatable&&d.validatable.destroy(),n.bind(p,d.options.model),d.options.validateOnBlur&&(d.options.model.unbind("set",d._validateProxy).bind("set",d._validateProxy),d.options.model.unbind(c,d._validateProxy).bind(c,d._validateProxy)),d.validatable=new n.ui.Validator(p,{validateOnBlur:d.options.validateOnBlur,validationSummary:d.options.validationSummary,errorTemplate:d.options.errorTemplate||undefined,rules:f}),d.options.skipFocus||p.find(":kendoFocusable").eq(0).trigger("focus")}});w.antiForgeryTokenName="__RequestVerificationToken",i.plugin(w)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=n.keys,o=n.template,s=".k-i-arrow-end-left",l=".k-i-arrow-end-right",d=".k-i-arrow-60-left",u=".k-i-arrow-60-right",c="k-pager-md k-pager-sm",p=":kendoFocusable:not([tabindex='-1'])",h="change",f=".kendoPager",m="click",g=Number.MAX_VALUE,v=!1,_=n.template('<a href="\\#" role="button" title="#=text#" aria-label="#=text#" class="k-link k-pager-nav #= wrapClassName #"><span class="k-icon #= className #"></span></a>');function b(e){return e.template({idx:e.idx,text:e.text,ns:n.ns,numeric:e.numeric,title:e.title||"",tabindex:e.navigatable?0:-1,navigatable:e.navigatable})}function k(e,t,n,i){return e({idx:t,text:n||t,selected:i||!1})}function w(e,t,n,i){return _({className:e.substring(1),text:t,wrapClassName:n||"",id:i||""})}function y(e,t,i,a){e.find(t).parent().attr(n.attr("page"),i).attr("tabindex",a?-1:0).attr("aria-disabled",a).toggleClass("k-disabled",a)}function x(e,t){y(e,s,1,t<=1)}function C(e,t){y(e,d,Math.max(1,t-1),t<=1)}function T(e,t,n){y(e,u,Math.min(n,t+1),t>=n)}function S(e,t,n){y(e,l,n,t>=n)}var I=a.extend({init:function(t,i){var r,o,c,p=this;if(a.fn.init.call(p,t,i),i=p.options,p._createDataSource(i),p.linkTemplate=n.template(p.options.linkTemplate),p.selectTemplate=n.template(p.options.selectTemplate),p.numericSelectItemTemplate=n.template(p.options.numericSelectItemTemplate),r=p.page(),o=p.totalPages(),p._refreshHandler=p.refresh.bind(p),p.dataSource.bind(h,p._refreshHandler),p.downEvent=n.applyEventMap("down",n.guid()),v=n.support.isRtl(t),i.navigatable&&(p._id=p.element.attr("id")||n.guid()),p._template(),i.previousNext&&(p.element.find(s).length||(p.element.append(w(s,i.messages.first,"k-pager-first",p._id)),x(p.element,r)),p.element.find(d).length||(p.element.append(w(d,i.messages.previous,null,p._id)),C(p.element,r))),i.numeric&&(p._numericWrap||(p._numericWrap=p.element.find(".k-pager-numbers-wrap"),0===p._numericWrap.length&&(p._numericWrap=e("<div class='k-pager-numbers-wrap' />").appendTo(p.element))),p._numericSelect||(p._numericSelect=p._numericWrap.find(".k-dropdown"),0===p._numericSelect.length&&(p._numericSelect=e("<select aria-label='"+p.options.messages.numbersSelectLabel+"' class='k-dropdown k-picker k-dropdown-list' />").appendTo(p._numericWrap))),p.list||(p.list=p._numericWrap.find(".k-pager-numbers"),0===p.list.length&&(p.list=e('<ul class="k-pager-numbers" />').appendTo(p._numericWrap))),i.dataSource&&!i.dataSource.total()&&(p._numericSelect.empty().append("<option value='0' />"),p.list.empty().append(p.selectTemplate({text:0,tabindex:i.navigatalbe?0:-1,navigatable:i.navigatable,title:n.format(i.messages.pageButtonLabel,0)})))),i.input&&(p.element.find(".k-pager-input").length||p.element.append('<span class="k-pager-input k-label">'+i.messages.page+'<span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input class="k-input-inner" /></span>'+n.format(i.messages.of,o)+"</span>"),p.element.on("keydown"+f,".k-pager-input input",p._keydown.bind(p))),i.previousNext&&(p.element.find(u).length||(p.element.append(w(u,i.messages.next,null,p._id)),T(p.element,r,o)),p.element.find(l).length||(p.element.append(w(l,i.messages.last,"k-pager-last",p._id)),S(p.element,r,o))),i.pageSizes){if(!p.element.find(".k-pager-sizes").length){var g=i.pageSizes.length?i.pageSizes:["all",5,10,20],_=e.map(g,(function(e){return e.toLowerCase&&"all"===e.toLowerCase()?"<option value='all'>"+i.messages.allPages+"</option>":"<option>"+e+"</option>"}));e('<span class="k-pager-sizes k-label"><select></select>'+i.messages.itemsPerPage+"</span>").appendTo(p.element).find("select").html(_.join("")).end().appendTo(p.element)}p.element.find(".k-pager-sizes select").val(p.pageSize()),n.ui.DropDownList&&p.element.find(".k-pager-sizes select").show().attr("aria-label",i.messages.pageSizeDropDownLabel).kendoDropDownList(),p.element.on(h+f,".k-pager-sizes select",p._change.bind(p))}i.refresh&&(p.element.find(".k-pager-refresh").length||p.element.append('<a role="button" href="#" class="k-pager-refresh k-link" title="'+i.messages.refresh+'" aria-label="'+i.messages.refresh+'"><span class="k-icon k-i-reload"></span></a>'),p.element.on(m+f,".k-pager-refresh",p._refreshClick.bind(p))),i.info&&(p.element.find(".k-pager-info").length||p.element.append('<span class="k-pager-info k-label" />')),p.element.on(m+f,"a",p._click.bind(p)).on(h+f,"select.k-dropdown",p._numericSelectChange.bind(p)).addClass("k-pager-wrap k-widget k-floatwrap"),i.autoBind&&p.refresh(),p._resizeHandler=p.resize.bind(p,!0),e(window).on("resize"+f,p._resizeHandler),(c=p._getWidthSizeClass(p.element.outerWidth()))&&p.element.addClass(c),p._navigatable(),n.notify(p)},destroy:function(){var t=this;a.fn.destroy.call(t),t.element.off(f),t.dataSource.unbind(h,t._refreshHandler),t._refreshHandler=null,e(window).off("resize"+f,this._resizeHandler),n.destroy(t.element),t.element=t.list=null},events:[h],options:{name:"Pager",ARIATemplate:"Page navigation, page #=page# of #=totalPages#",selectTemplate:'<li><span role="button" aria-current="page" tabindex="#=tabindex#" aria-label="#=title#" class="k-link k-selected">#=text#</span></li>',linkTemplate:'<li><a role="button" tabindex="#=tabindex#" href="\\#" class="k-link" data-#=ns#page="#=idx#" #if (title !== "") {# title="#=title#" #}#>#=text#</a></li>',numericSelectItemTemplate:'<option value="#= idx #" #if (selected) {# selected="selected" #}#>#= text #</option>',buttonCount:10,autoBind:!0,numeric:!0,info:!0,input:!1,previousNext:!0,pageSizes:!1,refresh:!1,responsive:!0,navigatable:!1,messages:{allPages:"All",display:"{0} - {1} of {2} items",empty:"No items to display",page:"Page",of:"of {0}",itemsPerPage:"items per page",pageButtonLabel:"Page {0}",pageSizeDropDownLabel:"Page sizes drop down",numbersSelectLabel:"Page select",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(h,t._refreshHandler),t.dataSource=t.options.dataSource=e,e.bind(h,t._refreshHandler),t.options.autoBind&&e.fetch()},_aria:function(){this.element.attr({role:"application","aria-roledescription":"pager","aria-keyshortcuts":"Enter ArrowRight ArrowLeft"})},_resize:function(e){if(e.width){var t=this._getWidthSizeClass(e.width),n=this.element;t?n.hasClass(t)||(n.removeClass(c),n.addClass(t)):n.removeClass(c)}},_createDataSource:function(e){this.dataSource=n.data.DataSource.create(e.dataSource)},refresh:function(t){var i,a,r,o=this,s=1,l=o.page(),d="",u="",c=o.options,p=o.pageSize(),h=o._collapsedTotal(),f=o.dataSource._isGroupPaged()?o.dataSource.groupsTotal(!0):o.dataSource.total(),m=o.totalPages(),v=o.linkTemplate,_=c.navigatable,w=o.numericSelectItemTemplate,y=c.buttonCount;if(!t||"itemchange"!=t.action){if(c.numeric){for(l>y&&(s=0===(r=l%y)?l-y+1:l-r+1),a=Math.min(s+y-1,m),s>1&&(d+=b({template:v,navigatable:_,idx:s-1,text:"...",numeric:!1,title:c.messages.morePages}),u+=k(w,s-1,c.messages.morePages)),i=s;i<=a;i++)d+=b({template:i==l?o.selectTemplate:v,navigatable:_,idx:i,text:i,numeric:!0,title:n.format(c.messages.pageButtonLabel,i)}),u+=k(w,i,i,i==l);a<m&&(d+=b({template:v,navigatable:_,idx:i,text:"...",numeric:w,title:c.messages.morePages}),u+=k(w,i,c.messages.morePages)),""===d&&(d=o.selectTemplate({text:0,tabindex:_?0:-1,navigatable:_,title:n.format(c.messages.pageButtonLabel,0)}),u=e("<option value='0' />")),o.list.html(d),o._numericSelect.html(u)}if(c.info&&(d=f>0?n.format(c.messages.display,o.dataSource.options.endless?1:Math.min((l-1)*(o.dataSource.pageSize()||0)+1,h),Math.min(l*p,h),f):c.messages.empty,o.element.find(".k-pager-info").html(d)),c.input&&o.element.find(".k-pager-input").html(o.options.messages.page+'<span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input class="k-input-inner" aria-label="'+o.options.messages.page+" "+l+'"></span>'+n.format(c.messages.of,m)).find("input").val(l).attr("disabled",f<1).attr("aria-disabled",f<1).toggleClass("k-disabled",f<1),c.previousNext&&(x(o.element,l),C(o.element,l),T(o.element,l,m),S(o.element,l,m)),c.pageSizes){var I=p;o.element.find(".k-pager-sizes option[value='all']").length>0&&(p===this.dataSource.total()||p==g)&&(p="all",I=c.messages.allPages),o.element.find(".k-pager-sizes select").val(p).filter("["+n.attr("role")+"=dropdownlist]").kendoDropDownList("value",p).kendoDropDownList("text",I)}o._restoreFocus(s,a,m),o._excludeChildrenFromTab(),o._updateAria()}},_excludeChildrenFromTab:function(){var t=n._activeElement();!this.options.navigatable||t!==this.element[0]&&e.contains(this.element[0],t)||this.element.find(p).attr("tabindex",-1)},_restoreFocus:function(e,t,n){var i=this;i.options.navigatable&&(i._focusSelected&&(i.element.find(".k-selected").trigger("focus"),i._focusSelected=null),null!==i._focusMore&&(t<n&&i._focusMore&&i.list.find("li").last().find("a").trigger("focus"),!i._focusMore&&e>1&&i.list.find("li").first().find("a").trigger("focus"),i._focusMore=null))},_restoreTabIndexes:function(){this.element.find("[tabindex='-1']:not(.k-disabled)").attr("tabindex",0)},_collapsedTotal:function(){return this.dataSource.total()},_keydown:function(e){if(e.keyCode===n.keys.ENTER){var t=this.element.find(".k-pager-input").find("input"),i=parseInt(t.val(),10);(isNaN(i)||i<1||i>this.totalPages())&&(i=this.page()),t.val(i),this.page(i)}},_refreshClick:function(e){e.preventDefault(),this.dataSource.read()},_change:function(e){var n=e.currentTarget.value,i=parseInt(n,10),a=this.dataSource;isNaN(i)?"all"==(n+"").toLowerCase()&&(a._pageSize=t,a._take=t,a._skip=0,a.fetch()):a.pageSize(i)},_template:function(){this._ariaTemplate=o(this.options.ARIATemplate).bind(this)},_updateAria:function(){this.options.navigatable&&this.element.attr("aria-label",this._ariaTemplate({page:this.page(),totalPages:this.totalPages()}))},_navigatable:function(){var e=this;e.options.navigatable&&(e._aria(),e.element.attr("id",e._id),e._template(),e._updateAria(),e._tabindex(e.element),e.element.on("keydown"+f,e,e._keyDown.bind(e)),e.element.on("focusout"+f,(function(){e.element.removeClass("k-focus")})),e.element.on("focusin"+f,(function(t){e.element.addClass("k-focus"),t.target===e.element[0]?e.element.find(p).attr("tabindex",-1):e.element.removeClass("k-focus")})))},_keyDown:function(t){var n,i,a=this,o=e(t.target),s=!1;o[0]===a.element[0]&&t.keyCode==r.ENTER&&(a._restoreTabIndexes(),a.element.find(p).first().trigger("focus"),s=!0),o[0]!==a.element[0]&&t.keyCode==r.ESC&&(a.element.trigger("focus"),s=!0),o[0]===a.element[0]&&t.keyCode==r.HOME&&(a.page(1),s=!0),o[0]===a.element[0]&&t.keyCode==r.END&&(a.page(a.totalPages()),s=!0),o[0]!==a.element[0]||t.keyCode!=(v?r.LEFT:r.RIGHT)&&t.keyCode!=r.PAGEDOWN||(a.page(a.page()+1),s=!0),o[0]!==a.element[0]||t.keyCode!=(v?r.RIGHT:r.LEFT)&&t.keyCode!=r.PAGEUP||(a.page(a.page()-1||1),s=!0),o[0]!==a.element[0]&&t.keyCode==r.TAB&&(i=(n=a.element.find(p)).index(o),t.shiftKey?i-1<0?n.last().trigger("focus"):n.eq(i-1).trigger("focus"):i+1<n.length?n.eq(i+1).trigger("focus"):n.first().trigger("focus"),s=!0),s&&(t.preventDefault(),t.stopPropagation())},_numericSelectChange:function(e){var t=e.currentTarget,n=t.value,i=parseInt(n,10);t.blur(),this.page(i)},_click:function(t){var i=e(t.currentTarget);t.preventDefault(),this.options.navigatable&&(i.attr("title")==this.options.messages.morePages?this._focusMore=i.parent().index():i.hasClass("k-pager-refresh")||i.hasClass("k-pager-nav")||(this._focusSelected=!0)),i.is(".k-disabled")||this.page(parseInt(i.attr(n.attr("page")),10))},totalPages:function(){return Math.ceil((this.dataSource.total()||0)/(this.pageSize()||1))},pageSize:function(){return this.dataSource.pageSize()||this.dataSource.total()},page:function(e){if(!e)return this.dataSource.total()>0?this.dataSource.page():0;this.trigger("pageChange",{index:e})||(this.dataSource.page(e),this.trigger(h,{index:e}))},_getWidthSizeClass:function(e){var t=c.split(" ");return this.options.responsive?e<=480?t[1]:e<=600?t[0]:null:null}});i.plugin(I)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i="change",a="cancel",r="dataBound",o="dataBinding",s=n.ui.Widget,l=n.keys,d="",u="> *:not(.k-loading-mask)",c="progress",p="error",h="k-focus",f="k-selected",m="k-edit-item",g="k-listview-pager",v="k-listview-item",_="role",b="aria-label",k="aria-multiselectable",w="aria-activedescendant",y="edit",x="remove",C="save",T="touchstart",S=".kendoListView",I=n._activeElement,D=n.ui.progress,E=n.data.DataSource,A=n.ui.DataBoundWidget.extend({init:function(e,t){var i=this;t=Array.isArray(t)?{dataSource:t}:t,s.fn.init.call(i,e,t),t=i.options,i.wrapper=e=i.element,e[0].id?i._itemId=e[0].id+"_lv_active":i._itemId=n.guid()+"_lv_active",i._element(),i._layout(),i._dataSource(),i._setContentHeight(),i._templates(),i._navigatable(),i._selectable(),i._pageable(),i._crudHandlers(),i._scrollable(),i.options.autoBind&&i.dataSource.fetch(),n.notify(i)},events:[i,a,o,r,y,x,C,"kendoKeydown"],options:{name:"ListView",ariaLabel:null,autoBind:!0,selectable:!1,navigatable:!1,pageable:!1,height:null,template:d,altTemplate:d,editTemplate:d,contentTemplate:"<div data-content='true' />",contentElement:"div",bordered:!0,borders:"",layout:"",flex:{direction:"row",wrap:"nowrap"},grid:{},scrollable:!1},setOptions:function(e){s.fn.setOptions.call(this,e),this._layout(),this._templates(),this.selectable&&(this.selectable.destroy(),this.selectable=null),this._selectable()},_templates:function(){var e=this.options;this.template=n.template(e.template||d),this.altTemplate=n.template(e.altTemplate||e.template),this.editTemplate=n.template(e.editTemplate||d)},_item:function(e){return this.content.children()[e]()},items:function(){return this.content.children(":not(.k-loading-mask)")},dataItem:function(t){var i=n.attr("uid"),a=e(t).closest("["+i+"]").attr(i);return this.dataSource.getByUid(a)},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&e.fetch(),"endless"===this.options.scrollable&&this._bindScrollable()},_unbindDataSource:function(){var e=this;e.dataSource.unbind(i,e._refreshHandler).unbind(c,e._progressHandler).unbind(p,e._errorHandler)},_dataSource:function(){var n=this,a=n.options.pageable,r=n.options.dataSource;e.isPlainObject(a)&&a.pageSize!==t&&(r.pageSize=a.pageSize),n.dataSource&&n._refreshHandler?n._unbindDataSource():(n._refreshHandler=n.refresh.bind(n),n._progressHandler=n._progress.bind(n),n._errorHandler=n._error.bind(n)),n.dataSource=E.create(r).bind(i,n._refreshHandler).bind(c,n._progressHandler).bind(p,n._errorHandler)},_progress:function(e){var t=this.wrapper;e&&this.content.height()&&(t=this.content),D(t,e,{opacity:!0})},_error:function(){D(this.content,!1)},_element:function(){var t=this.options,n=t.height;this.element.addClass("k-widget k-listview"),t.contentElement?this.content=e(document.createElement(t.contentElement)).appendTo(this.element):this.content=this.element,n&&this.element.css("height",n)},_layout:function(){var e=this,n=e.options,i=n.flex,a=n.grid,r=e.element,o=["k-widget","k-listview"],s=e.content,l=["k-listview-content"];r.add(s).removeClass((function(e,t){if(t.indexOf("k-")>=0)return!0})),!0===n.bordered&&o.push("k-listview-bordered"),"string"==typeof n.borders&&n.borders!==d&&o.push("k-listview-borders-"+n.borders),"string"==typeof n.contentPadding&&n.contentPadding!==d&&l.push("k-listview-content-padding-"+n.contentPadding),"string"==typeof n.layout&&n.layout!==d&&l.push("k-d-"+n.layout),"flex"===n.layout&&"object"==typeof i&&("string"==typeof i.direction&&""!==i.direction&&l.push("k-flex-"+i.direction),"string"==typeof i.wrap&&""!==i.wrap&&l.push("k-flex-"+i.wrap)),"grid"===n.layout&&"object"==typeof a&&("number"==typeof a.cols?s.css("grid-template-columns","repeat("+a.cols+", 1fr)"):"string"==typeof a.cols&&s.css("grid-template-columns",a.cols),"number"==typeof a.rows?s.css("grid-template-rows","repeat("+a.rows+", "+(a.rowHeight!==t?a.rowHeight:"1fr")+")"):"string"==typeof a.rows&&s.css("grid-template-rows",a.rows),("number"==typeof a.gutter||"string"==typeof a.gutter)&&s.css("grid-gap",a.gutter)),e.element.addClass(o.join(" ")),e.content.addClass(l.join(" "))},_setContentHeight:function(){var e,t=this;t.options.scrollable&&t.wrapper.is(":visible")&&(e=t.wrapper.innerHeight(),t.content.height(e))},refresh:function(e){var t,i,a,s,l,d=this,u=d.dataSource.view(),c="",p=d.template,h=d.altTemplate,f=d.options.selectable?"option":"listitem",m=I(),g=d._endlessFetchInProgress,b=g?d._skipRerenderItemsCount:0,k=d.options.scrollable;if("itemchange"!==(e=e||{}).action){if(!d.trigger(o,{action:e.action||"rebind",items:e.items,index:e.index})){for(d._angularItems("cleanup"),g||d._destroyEditable(),s=b,l=u.length;s<l;s++)c+=s%2?h(u[s]):p(u[s]);for(g?d.content.append(c):d.content.html(c),i=d.items().not(".k-loading-mask"),d._ariaAttributes(u.length),s=b,l=u.length;s<l;s++)(a=i.eq(s)).addClass(v),a.attr(n.attr("uid"),u[s].uid).attr(_,f),d.options.selectable&&a.attr("aria-selected","false"),d.options.pageable&&(a.attr("aria-setsize",d.dataSource.total()),a.attr("aria-posinset",d.dataSource.indexOf(d.dataItem(a))+1));d.content[0]===m&&d.options.navigatable&&(d._focusNext?d.current(d.current().next()):k||d.current(i.eq(0))),d.element.attr(w)&&0===d.element.find("#"+d.element.attr(w)).length&&d.element.removeAttr(w),d._setContentHeight(),d._angularItems("compile"),d._progress(!1),d._endlessFetchInProgress=null,d.trigger(r,{action:e.action||"rebind",items:e.items,index:e.index})}}else d._hasBindingTarget()||d.editable||(t=e.items[0],(a=d.items().filter("["+n.attr("uid")+"="+t.uid+"]")).length>0&&(s=a.index(),d.angular("cleanup",(function(){return{elements:[a]}})),a.replaceWith(p(t)),(a=d.items().eq(s)).attr(n.attr("uid"),t.uid),d.angular("compile",(function(){return{elements:[a],data:[{dataItem:t}]}})),d.trigger("itemChange",{item:a,data:t})))},_ariaAttributes:function(e){var t=this.content,i=this.options.selectable;this._ariaLabelValue=this._ariaLabelValue||this.options.ariaLabel,0===e?(t.removeAttr(_),t.removeAttr(k),t.attr(b)&&(this._ariaLabelValue=t.attr(b),t.removeAttr(b))):(t.attr(_,i?"listbox":"list"),i&&n.ui.Selectable.parseOptions(i).multiple&&t.attr(k,!0),this._ariaLabelValue&&t.attr(b,this._ariaLabelValue))},_pageable:function(){var t,i,a=this,r=a.options.pageable,o=a.options.navigatable;r&&((t=a.wrapper.find("."+g)).length||(t=e("<div />").addClass(g)),"top"===r.position?t.addClass(n.format("{0}-{1}",g,r.position)).prependTo(a.wrapper):t.appendTo(a.wrapper),a.pager&&a.pager.destroy(),"object"==typeof r&&r instanceof n.ui.Pager?a.pager=r:(t=r.pagerId?e("#"+r.pagerId):t,i=e.extend({},r,{dataSource:a.dataSource,navigatable:o,pagerId:null}),a.pager=new n.ui.Pager(t,i)))},_selectable:function(){var t,a,r=this,o=r.options.selectable,s=r.options.navigatable;o&&(t=n.ui.Selectable.parseOptions(o).multiple,r.selectable=new n.ui.Selectable(r.element,{aria:!0,multiple:t,filter:r.options.contentElement?".k-listview-content "+u:u,change:function(){r.trigger(i)}}),s&&r.element.on("keydown"+S,(function(n){if(e(n.target).is(r.element)&&n.keyCode===l.SPACEBAR){if(a=r.current(),n.target==n.currentTarget&&n.preventDefault(),t)if(n.ctrlKey){if(a&&a.hasClass(f))return a.removeClass(f),void r.trigger(i)}else r.selectable.clear();else r.selectable.clear();r.selectable.value(a),r.trigger(i)}})))},_scrollable:function(){var e=this,t=e.options.scrollable;t&&(e.content.css({"overflow-y":"scroll",position:"relative","-webkit-overflow-scrolling":"touch"}),"endless"===t&&e._bindScrollable())},_bindScrollable:function(){var e=this,t=e._endlessPageSize=e.dataSource.options.pageSize;e.content.off("scroll"+S).on("scroll"+S,(function(){this.scrollTop+this.clientHeight-this.scrollHeight>=-15&&!e._endlessFetchInProgress&&e._endlessPageSize<e.dataSource.total()&&(e._skipRerenderItemsCount=e._endlessPageSize,e._endlessPageSize=e._skipRerenderItemsCount+t,e.dataSource.options.endless=!0,e._endlessFetchInProgress=!0,e.dataSource.pageSize(e._endlessPageSize))}))},current:function(e){var n=this,i=n.element,a=n._current,r=n._itemId;if(e===t)return a;a&&a[0]&&(a[0].id===r&&a.removeAttr("id"),a.removeClass(h),i.removeAttr(w)),e&&e[0]&&(r=e[0].id||r,n._scrollTo(e[0]),i.attr(w,r),e.addClass(h).attr("id",r)),n._current=e},_scrollTo:function(t){var n,i=this.content,a=!1,r="scroll";"auto"===i.css("overflow")||i.css("overflow")===r||i.css("overflow-y")===r?n=i[0]:(n=window,a=!0);var o=function(i,o){var s=a?e(t).offset()[i.toLowerCase()]:t["offset"+i],l=t["client"+o],d=e(n)[r+i](),u=e(n)[o.toLowerCase()]();s+l>d+u?e(n)[r+i](s+l-u):s<d&&e(n)[r+i](s)};o("Top","Height"),o("Left","Width")},_navigatable:function(){var t=this,i=t.options.navigatable,a=t.element,r=t.content;i&&(t._tabindex(),a.on("focus"+S,(function(){var e=t._current;e&&e.is(":visible")||(e=t._item("first")),t.current(e)})).on("focusout"+S,(function(){t._current&&t._current.removeClass(h)})).on("keydown"+S,t,(function(i){var a,o=i.keyCode,s=t.current(),d=e(i.target),u=!d.is(":button, textarea, a, a > .t-icon, input"),c=d.is(":text, :password"),p=n.preventDefault,h=r.find("."+m),f=I(),v=t.options.scrollable;if(!(d.hasClass(g)||!u&&!c&&o!==l.ESC||c&&o!==l.ESC&&o!==l.ENTER)){if(o!==l.UP&&o!==l.LEFT||(s&&s[0]&&(s=s.prev()),s&&s[0]?t.current(s):v||t.current(t._item("last")),p(i)),o!==l.DOWN&&o!==l.RIGHT||(v?"endless"!==t.options.scrollable||s.next().length?(s=s.next())&&s[0]&&t.current(s):(t.content[0].scrollTop=t.content[0].scrollHeight,t._focusNext=!0):(s=s.next(),t.current(s&&s[0]?s:t._item("first"))),p(i)),o===l.PAGEUP&&(t.current(null),t.dataSource.page(t.dataSource.page()-1),p(i)),o===l.PAGEDOWN&&(t.current(null),t.dataSource.page(t.dataSource.page()+1),p(i)),o===l.HOME&&(t.current(t._item("first")),p(i)),o===l.END&&(t.current(t._item("last")),p(i)),o===l.ENTER)if(0!==h.length&&(u||c)){a=t.items().index(h),f&&f.blur(),t.save();t.one("dataBound",(function(){t.element.trigger("focus"),t.current(t.items().eq(a))}))}else""!==t.options.editTemplate&&t.edit(s);if(o===l.ESC){if(0===(h=r.find("."+m)).length)return;a=t.items().index(h),t.cancel(),t.element.trigger("focus"),t.current(t.items().eq(a))}}})),a.on("mousedown"+S+" "+T+S,t.options.contentElement?".k-listview-content "+u:u,function(i){t.current(e(i.currentTarget)),e(i.target).is(":button, a, :input, a > .k-icon, textarea")||n.focusElement(a)}.bind(t)))},clearSelection:function(){this.selectable.clear()},select:function(t){var n=this.selectable;return(t=e(t)).length?(n.options.multiple||(n.clear(),t=t.first()),void n.value(t)):n.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,a=this,r=a.editable,o=a.options.selectable?"option":"listitem",s=a.template;return r&&(r.element.index()%2&&(s=a.altTemplate),a.angular("cleanup",(function(){return{elements:[r.element]}})),e=a._modelFromElement(r.element),a._destroyEditable(),i=r.element.index(),r.element.replaceWith(s(e)),(t=a.items().eq(i)).addClass(v),t.attr(n.attr("uid"),e.uid),t.attr(_,o),a._hasBindingTarget()&&n.bind(t,e),a.angular("compile",(function(){return{elements:[t],data:[{dataItem:e}]}}))),!0},edit:function(e){var t,i,a=this,r=a._modelFromElement(e),o=r.uid;a.cancel(),i=(e=a.items().filter("["+n.attr("uid")+"="+o+"]")).index(),e.replaceWith(a.editTemplate(r)),t=a.items().eq(i).addClass(m).attr(n.attr("uid"),r.uid),a.editable=t.kendoEditable({model:r,clearContainer:!1,errorTemplate:!1,target:a}).data("kendoEditable"),a.trigger(y,{model:r,item:t})},save:function(){var e,t=this,n=t.editable;if(n){var i=n.element;e=t._modelFromElement(i),n.end()&&!t.trigger(C,{model:e,item:i})&&(t._closeEditable(),t.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(x,{model:i,item:e})||(e.attr("id")===t.element.attr(w)&&t.element.removeAttr(w),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=this,t=e.dataSource;if(e.editable){var n=e.editable.element,i=e._modelFromElement(n);e.trigger(a,{model:i,container:n})||(t.cancelChanges(i),e._closeEditable())}},_crudHandlers:function(){var t=this,i=T+S,a="click"+S;t.content.on(i+" "+a,".k-edit-button",(function(i){i.preventDefault();var a=e(this).closest("["+n.attr("uid")+"]");setTimeout((function(){t.edit(a)}))})),t.content.on(i+" "+a,".k-delete-button",(function(i){i.preventDefault();var a=e(this).closest("["+n.attr("uid")+"]");setTimeout((function(){t.remove(a)}))})),t.content.on(a,".k-update-button",(function(e){t.save(),e.preventDefault()})),t.content.on(a,".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(S),e.content.off(S),e._endlessFetchInProgress=e._endlessPageSize=e._skipRerenderItemsCount=e._focusNext=null,e.pager&&e.pager.destroy(),n.destroy(e.element)}});n.ui.plugin(A)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.antiForgeryTokens,r=n.logToConsole,o=/\.([^\.]+)$/,s=".kendoUpload",l="select",d="upload",u="success",c="error",p="complete",h="cancel",f="clear",m="pause",g="resume",v="progress",_="remove",b="invalidMaxFileSize",k="invalidMinFileSize",w="invalidFileExtension",y="k-focus",x="tabindex",C="k-i-upload",T="k-i-warning",S="k-i-check",I=i.extend({init:function(e,t){var a=this;i.fn.init.call(a,e,t),a.name=e.name,a.multiple=a.options.multiple,a.directory=a.options.directory,a.localization=a.options.localization;var r=a.element;a.wrapper=r.closest(".k-upload"),0===a.wrapper.length&&(a.wrapper=a._wrapInput(r)),a._activeInput(r),a.toggle(a.options.enabled);var o=a._ns=s+"-"+n.guid();r.closest("form").on("submit"+o,a._onParentFormSubmit.bind(a)).on("reset"+o,a._onParentFormReset.bind(a)),a._initUploadModule(),a._toggleDropZone(),a.wrapper.on("click",".k-upload-action",a._onFileAction.bind(a)).on("click",".k-clear-selected",a._onClearSelected.bind(a)).on("click",".k-upload-selected",a._onUploadSelected.bind(a)).on("keydown",a._onKeyDown.bind(a)).on("focusout",a._focusout.bind(a)),a.element.val()&&a._onInputChange({target:a.element})},events:[l,d,u,c,p,h,f,v,_,m,g],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",uploadSuccess:"File(s) uploaded successfully.",uploadFail:"File(s) failed to upload.",invalidMaxFileSize:"File size too large.",invalidMinFileSize:"File size too small.",invalidFileExtension:"File type not allowed."},validation:{allowedExtensions:[],maxFileSize:0,minFileSize:0},dropZone:""},_initUploadModule:function(){var e=this,t=e.options;if(t.async.saveUrl){e._module=e._supportsFormData()?new A(e):new E(e),e._async=!0;var n=t.files;n.length>0&&e._renderInitialFiles(n)}else e._module=new D(e)},setOptions:function(t){var n=this,a=n.element;e(n.options.dropZone).off(n._ns),i.fn.setOptions.call(n,t),n.multiple=n.options.multiple,n.directory=n.options.directory,a.attr("multiple",!!n._supportsMultiple()&&n.multiple),n.directory&&(a.attr("webkitdirectory",n.directory),a.attr("directory",n.directory)),n.toggle(n.options.enabled),n._initUploadModule(),n._toggleDropZone()},enable:function(e){e=void 0===e||e,this.toggle(e)},disable:function(){this.toggle(!1)},toggle:function(e){e=void 0===e?e:!e,this.wrapper.toggleClass("k-disabled",e),this.element.prop("disabled",e)},focus:function(){this.element.trigger("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(s),i.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(){this._module.onSaveSelected()},getFiles:function(){for(var t,n=[],i=this.wrapper.find(".k-file"),a=0;a<i.length;a++)if(t=e(i[a]).data("fileNames"))for(var r=0;r<t.length;r++)n.push(t[r]);return n},clearAllFiles:function(){var e=this;e.wrapper.find(".k-file").each((function(t,n){e._removeFileByDomElement(n,!1)}))},removeAllFiles:function(){var e=this;e.wrapper.find(".k-file").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,i){var a;"string"==typeof t&&(a=e(".k-file["+n.attr("uid")+'="'+t+'"]',this.wrapper)).length>0&&this._removeFileByDomElement(a,i)},clearFile:function(e){this._removeFile(e,!1)},removeFile:function(e){this._removeFile(e,!0)},_removeFile:function(t,n){var i,a=this,r=a.wrapper.find(".k-file");"function"==typeof t&&r.each((function(r,o){i=e(o).data("fileNames"),t(i)&&a._removeFileByDomElement(o,n)}))},_removeFileByDomElement:function(t,n){var i=this,a={target:e(t,i.wrapper)};i.options.async.saveUrl?(e(t).hasClass("k-file-progress")?i._module.onCancel(a):i._module.onRemove(a,{},n),0===e(".k-file",i.wrapper).length?i._hideHeaderUploadstatus():i._updateHeaderUploadStatus()):i._module.onRemove(a,{},n)},_addInput:function(t){if(t[0].nodeType){var n=this,i=t.clone().val("");i.insertAfter(n.element).data("kendo"+n.options.prefix+n.options.name,n),e(n.element).hide().attr(x,"-1").removeAttr("id").off(s),n._activeInput(i),n.element.trigger("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"+s,(function(e){i.hasClass("k-disabled")&&e.preventDefault()})).on("focus"+s,(function(){e(this).parent().addClass(y)})).on("blur"+s,(function(){e(this).parent().removeClass(y)})).on("change"+s,n._onInputChange.bind(n))},_adjustFocusState:function(e,t){e.removeClass(y),e.attr(x,-1),t.addClass(y),t.attr(x,0)},_arrowKeyNavigation:function(e,t,i){var a,r=this,o=n.keys;t===o.DOWN?(e.preventDefault(),e.stopPropagation(),a=r.wrapper.find(".k-upload-files .k-file").first(),i.length>0&&(i.hasClass("k-upload-action")&&(i.removeClass(y),i=i.closest(".k-file")),a=i.next()),r._adjustFocusState(i,a),a&&0!==a.length||(a=r.wrapper.find(".k-clear-selected"))):t===o.UP?(e.preventDefault(),e.stopPropagation(),a=r.wrapper.find(".k-upload-files .k-file:last"),i.length>0&&(i.hasClass("k-upload-action")&&(i.removeClass(y),i=i.closest(".k-file")),a=i.prev()),r._adjustFocusState(i,a)):t===o.RIGHT?(i.hasClass("k-upload-action")?(a=i.next(".k-upload-action"))&&0!==a.length||(a=i.parent().find(".k-upload-action:first")):i.length>0&&(a=i.find(".k-upload-action:first")),a&&a.length>0&&(i.removeClass(y),a.addClass(y))):t===o.LEFT&&(i.hasClass("k-upload-action")?(a=i.prev(".k-upload-action"))&&0!==a.length||(a=i.parent().find(".k-upload-action:last")):i.length>0&&(a=i.find(".k-upload-action:last")),a&&a.length>0&&(i.removeClass(y),a.addClass(y))),a&&0!==a.length||t!==o.UP&&t!==o.DOWN||(a=r.element),a&&a.length>0&&(r._preventFocusRemove=!0,a.trigger("focus"))},_asyncCommandKeyNavigation:function(t,i,a){var r=this,o=n.keys,s=e(i,r.wrapper);if(r._retryClicked=!1,t===o.ESC&&i.find(".k-i-cancel").length>0)r.trigger(h,a),r._module.onCancel({target:s}),r._checkAllComplete(),r._updateHeaderUploadStatus(),r._preventFocusRemove=!0,r.element.trigger("focus");else if(t===o.SPACEBAR)i.find(".k-i-pause-sm").length>0?(r.trigger(m,a),r.pause(i),r._updateHeaderUploadStatus()):i.find(".k-i-play-sm").length>0&&(r.trigger(g,a),r.resume(i));else if(t===o.ENTER&&!i.is(".k-file-progress, .k-file-success, .k-file-invalid")){if(r.options.async.chunkSize&&!r.options.async.concurrent&&e(".k-file-progress",r.wrapper).length>0)return;e(".k-i-warning",i).remove(),e(".k-progressbar",i).finish().show(),r._module.metaData[s.data("uid")]||r._module.prepareChunk(s),r._module.onRetry({target:s}),r._retryClicked=!0}},_commandKeyNavigation:function(t,i){var a=this,r=n.keys,o=i.data("fileNames"),s=a._filesContainValidationErrors(o),l={files:o,headers:{}};t===r.DELETE?a.trigger(_,l)||(a._module.onRemove({target:e(i,a.wrapper)},l,!s),a._preventFocusRemove=!0,a.element.trigger("focus")):t===r.TAB?(i.removeClass(y),i.attr(x,-1)):a.options.async.saveUrl&&a._asyncCommandKeyNavigation(t,i,l)},_focusout:function(){var e=this.wrapper.find(".k-upload-files .k-file.k-focus");this._preventFocusRemove?this._preventFocusRemove=!1:(e.removeClass(y),e.attr(x,-1))},_onKeyDown:function(e){var t=this,i=t.wrapper.find(".k-upload-files .k-file.k-focus,.k-upload-action.k-focus"),a=n.keys,r=[a.DELETE,a.ESC,a.ENTER,a.SPACEBAR,a.TAB],o=e.keyCode;o===a.DOWN||o===a.UP||o===a.LEFT||o===a.RIGHT?t._arrowKeyNavigation(e,o,i):i.length>0&&i.hasClass("k-file")&&r.indexOf(o)>-1&&!t.wrapper.hasClass("k-disabled")&&(o===a.SPACEBAR&&(e.preventDefault(),e.stopPropagation()),t._commandKeyNavigation(o,i))},_onInputChange:function(t){var n=this,i=e(t.target),a=N(n._inputFiles(i),n._isAsyncNonBatch());R(a,n.options.validation),n.trigger(l,{files:a})?(n._addInput(i),i.remove()):n._module.onSelect({target:i},a)},_readDirectory:function(t){var n=new e.Deferred,i=t.createReader(),a=[],r=function(){i.readEntries((function(e){e.length?(a=a.concat(e),r()):n.resolve(a)}),n.reject)};return r(),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(){r("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=e.originalEvent.dataTransfer,i=this,a=n.files;if(j(e),i.options.directoryDrop&&n.items){t=n.items.length,i.droppedFolderCounter=0,i.droppedFolderFiles=[];for(var r=0;r<t;r++)if(n.items[r].webkitGetAsEntry){var o=n.items[r].webkitGetAsEntry();o.isDirectory?i._traverseFileTree(o,!0):o.isFile&&i.droppedFolderFiles.push(n.files[r])}else i._proceedDroppedItems(a)}else i._proceedDroppedItems(a)},_proceedDroppedItems:function(t){var n=this,i=N(P(t),n._isAsyncNonBatch());t.length>0&&!n.wrapper.hasClass("k-disabled")&&(!n.multiple&&i.length>1&&i.splice(1,i.length-1),R(i,n.options.validation),n.trigger(l,{files:i})||n._module.onSelect({target:e(".k-dropzone",n.wrapper)},i))},_filesContainValidationErrors:function(t){var n=!1;return e(t).each((function(e,t){if(t.validationErrors&&t.validationErrors.length>0)return n=!0,!1})),n},_isAsyncNonBatch:function(){return this._async&&!this.options.async.batch||!1},_renderInitialFiles:function(e){var t=this,n=0;for(e=N(e,!0),n=0;n<e.length;n++){var i=e[n],a=t._enqueueFile(i.name,{fileNames:[i]});a.addClass("k-file-success").data("files",[e[n]]),t._supportsRemove()&&t._fileAction(a,_)}},_prepareTemplateData:function(e,t){var n=t.fileNames,i={},a=0,r=0;for(r=0;r<n.length;r++)a+=n[r].size;return i.name=e,i.size=a,i.files=t.fileNames,i},_prepareDefaultSingleFileEntryTemplate:function(t){var i=t.fileNames[0],a=B(t.fileNames),r=n.getFileGroup(i.extension,!0),o=i.validationErrors,s="";return o&&o.length>0?s+="<li class='k-file k-file-invalid'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-file-invalid-group-wrapper'><span class='k-file-group k-icon k-i-"+r+"'></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 !k-text-error'>"+this.localization[o[0]]+"</span></span>":s+="<li class='k-file'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-file-group-wrapper'><span class='k-file-group k-icon k-i-"+r+"'></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'>"+a+"</span></span>",e(s+="<strong class='k-upload-status'></strong>")},_prepareDefaultMultipleFileEntriesTemplate:function(t){var n,i,a=t.fileNames,r=this._filesContainValidationErrors(a),o=B(a),s="";for(s+=r?"<li class='k-file k-file-invalid'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-multiple-files-invalid-group-wrapper'><span class='k-file-group k-icon k-i-files'></span>":"<li class='k-file'><div class='k-progressbar k-hidden'><span class='k-progress'></span></div><span class='k-multiple-files-group-wrapper'><span class='k-file-group k-icon k-i-files'></span>",s+="<span class='k-file-state'></span></span>",a.sort((function(e,t){return e.validationErrors?-1:t.validationErrors?1:0})),s+="<span class='k-multiple-files-wrapper'>",n=0;n<a.length;n++){var l=B([i=a[n]]);s+="<span class='k-file-name-size-wrapper'>",i.validationErrors&&i.validationErrors.length>0?s+="<span class='k-file-name k-file-name-invalid' title='"+i.name+"'>"+i.name+"</span>":s+="<span class='k-file-name' title='"+i.name+"'>"+i.name+"</span>",s+="<span class='k-file-size'>"+l+"</span></span>"}return s+=r?"<span class='k-file-validation-message !k-text-error'>"+this.localization.invalidFiles+"</span>":"<span class='k-file-information'>Total: "+a.length+" files, "+o+"</span>",e(s+="</span><strong class='k-upload-status'></strong>")},_enqueueFile:function(t,i){var a,r,o,s,l=this,d=i.fileNames[0].uid,u=e(".k-upload-files",l.wrapper),c=l.options.template;return 0===u.length&&(u=e("<ul class='k-upload-files k-reset'></ul>").appendTo(l.wrapper),l.options.showFileList||u.hide(),l.wrapper.removeClass("k-upload-empty")),a=e(".k-file",u),c?(o=l._prepareTemplateData(t,i),c=n.template(c),(r=e("<li class='k-file'>"+c(o)+"</li>")).find(".k-upload-action").addClass("k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base"),l.angular("compile",(function(){return{elements:r,data:[o]}}))):r=1===i.fileNames.length?l._prepareDefaultSingleFileEntryTemplate(i):l._prepareDefaultMultipleFileEntriesTemplate(i),r.attr(n.attr("uid"),d).appendTo(u).data(i),l._async||e(".k-progress",r).width("100%"),!l.multiple&&a.length>0&&(s={files:a.data("fileNames"),headers:{}},l.trigger(_,s)||l._module.onRemove({target:e(a,l.wrapper)},s)),r},_removeFileEntry:function(t){var n,i,a,r=this,o=t.closest(".k-upload-files");t.remove(),n=e(".k-file",o),i=e(".k-file-success, .k-file-error",o),a=e(".k-file-invalid",o),i.length!==n.length&&a.length!==n.length||this._hideActionButtons(),0===n.length?(o.remove(),r.wrapper.addClass("k-upload-empty"),r._hideHeaderUploadstatus()):r._updateHeaderUploadStatus()},_fileAction:function(e,t,n){var i,a={remove:"k-i-x",cancel:"k-i-cancel",retry:"k-i-retry",pause:"k-i-pause-sm"},r={remove:"k-i-close",cancel:"k-i-cancel",retry:"k-i-reload-sm",pause:"k-i-pause-sm"};a.hasOwnProperty(t)&&(n||this._clearFileAction(e),this.options.template?(i=e.find(".k-upload-action").first()).find(".k-icon").length?i.next(".k-upload-action").length&&i.next(".k-upload-action").addClass("k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button").append("<span class='k-button-icon k-icon "+r[t]+" "+a[t]+"' title='"+this.localization[t]+"'aria-label='"+this.localization[t]+"'></span>").show():i.addClass("k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button").append("<span class='k-button-icon k-icon "+r[t]+" "+a[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(a[t],this.localization[t],r[t]))))},_fileState:function(t,n){var i=this.localization,a={uploading:{text:i.statusUploading},uploaded:{text:i.statusUploaded},failed:{text:i.statusFailed}}[n];a&&e("span.k-file-state",t).text(a.text)},_renderAction:function(t,n,i){return""!==t?e("<button type='button' class='k-button k-icon-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-upload-action' aria-label='"+n+"' tabindex='-1'><span class='k-button-icon k-icon "+i+" "+t+"' title='"+n+"'></span></button>").on("focus",(function(){e(this).addClass(y)})).on("blur",(function(){e(this).removeClass(y)})):e("<button type='button' class='k-button k-button-md k-rounded-md k-button-solid k-button-solid-base'><span class=\"k-button-text\">"+n+"</span></button>")},_clearFileAction:function(t){e(".k-upload-action",t).empty().hide()},_onFileAction:function(t){var n=this;if(!n.wrapper.hasClass("k-disabled")){var i=e(t.target).closest(".k-upload-action"),a=i.find(".k-icon"),r=i.closest(".k-file"),o=r.data("fileNames"),s=n._filesContainValidationErrors(o),l={files:o,headers:{}};n._retryClicked=!1,a.hasClass("k-i-x")?n.trigger(_,l)||(n._module.onRemove({target:e(r,n.wrapper)},l,!s),n.element.trigger("focus")):a.hasClass("k-i-cancel")?(n.trigger(h,l),n._module.onCancel({target:e(r,n.wrapper)}),n._checkAllComplete(),n._updateHeaderUploadStatus(),n.element.trigger("focus")):a.hasClass("k-i-pause-sm")?(n.trigger(m,l),n.pause(r),n._updateHeaderUploadStatus()):a.hasClass("k-i-play-sm")?(n.trigger(g,l),n.resume(r)):a.hasClass("k-i-retry")&&(e(".k-i-warning",r).remove(),e(".k-progressbar",r).finish().show(),n._module.onRetry({target:e(r,n.wrapper)}),n._retryClicked=!0),r.addClass(y)}return!1},_onUploadSelected:function(){return this.wrapper.hasClass("k-disabled")||this._module.onSaveSelected(),!1},_onClearSelected:function(){var e=this;return e.wrapper.hasClass("k-disabled")||e.trigger(f,{})||e.clearAllFiles(),!1},_onFileProgress:function(t,n){n>100&&(n=100),e(".k-progressbar",t.target).removeClass("k-hidden"),this.options.template||(0===e(".k-upload-pct",t.target).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(v,{files:K(t).data("fileNames"),percentComplete:n})},_onUploadSuccess:function(e,t,n){var i=this,a=K(e),r=a.data("fileNames"),o=a.find(".k-file-information"),s=a.find(".k-file-size");i.trigger(u,{files:a.data("fileNames"),response:t,operation:"upload",XMLHttpRequest:n})?i._setUploadErrorState(a):(i._fileState(a,"uploaded"),a.removeClass("k-file-progress").addClass("k-file-success"),o.length>0?o.addClass("k-hidden").after('<span class="k-file-validation-message !k-text-success">'+r.length+" "+i.localization.uploadSuccess+"</span>"):s.length>0&&s.addClass("k-hidden").after('<span class="k-file-validation-message !k-text-success">'+i.localization.uploadSuccess+"</span>"),i._updateHeaderUploadStatus(),i._supportsRemove()?i._fileAction(a,_):i._clearFileAction(a)),i._hideUploadProgress(a),i._checkAllComplete()},_onUploadError:function(e,t){var n=this,i=n._module,a=K(e),o=a.data("uid");n._setUploadErrorState(a),n.trigger(c,{operation:"upload",files:a.data("fileNames"),XMLHttpRequest:t}),r("Server response: "+t.responseText),n.options.async.chunkSize?i._decreasePosition&&i._decreasePosition(o):n._hideUploadProgress(a),n._checkAllComplete(),this.options.async.autoRetryAfter&&this._autoRetryAfter(a)},_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,a=t.data("fileNames"),r=t.find(".k-file-information"),o=t.find(".k-file-size");i._fileState(t,"failed"),t.removeClass("k-file-progress").addClass("k-file-error"),r.length>0?r.addClass("k-hidden").after('<span class="k-file-validation-message !k-text-error">'+a.length+" "+i.localization.uploadFail+"</span>"):o.length>0&&o.addClass("k-hidden").after('<span class="k-file-validation-message !k-text-error">'+i.localization.uploadFail+"</span>"),i._updateUploadProgress(t),(n=e(".k-upload-pct",t)).length>0&&n.remove(),this._updateHeaderUploadStatus(),this._fileAction(t,"retry"),this._fileAction(t,_,!0),i._retryClicked&&t.trigger("focus")},_updateUploadProgress:function(t){var n=this;if(n.options.async.chunkSize){var i=t.data("uid");if(n._module.metaData){var a=n._module.metaData[i];if(a){var r=a.totalChunks?Math.round(a.chunkIndex/a.totalChunks*100):100;n._onFileProgress({target:e(t,n.wrapper)},r)}}}else e(".k-progress",t).width("100%")},_hideUploadProgress:function(t){e(".k-progressbar",t).delay(1e3).fadeOut(2e3,(function(){e(this).find(".k-progress").css("width","0%")}))},_showActionButtons:function(){var t=this,n=e(".k-action-buttons",t.wrapper),i=e(".k-upload-selected",t.wrapper),a=e(".k-clear-selected",t.wrapper);0===i.length&&(i=t._renderAction("",this.localization.uploadSelectedFiles).addClass("k-upload-selected").addClass("k-button-solid-primary").removeClass("k-button-solid-base"),a=t._renderAction("",this.localization.clearSelectedFiles).addClass("k-clear-selected")),n.length||(n=e("<div />").addClass("k-action-buttons").append(a,i)),this.wrapper.append(n)},_hideActionButtons:function(){e(".k-action-buttons",this.wrapper).remove()},_showHeaderUploadStatus:function(t){var n=this,i=n.localization,a=e(".k-dropzone",n.wrapper),r=e(".k-upload-status-total",n.wrapper);0!==r.length&&r.remove(),e(".k-dropzone-hint",n.wrapper).addClass("k-hidden"),r='<strong class="k-upload-status k-upload-status-total"><span class="k-icon"></span></strong>',t?(r=e(r).append(i.headerStatusUploading)).find(".k-icon").addClass(C):(r=e(r).append(i.headerStatusUploaded)).find(".k-icon").addClass(T),a.length>0?a.append(r):e(".k-upload-button",n.wrapper).after(r)},_updateHeaderUploadStatus:function(){var t,n,i=this,a=e(".k-upload-status-total",this.wrapper),r=e(".k-file",i.wrapper).not(".k-file-success, .k-file-error, .k-file-invalid"),o=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!==r.length&&i.options.async.concurrent?(0===r.length||o.length>0||s.length>0)&&(t=e(".k-file.k-file-error, .k-file.k-file-invalid",i.wrapper),a=e(".k-upload-status-total",i.wrapper),n=e(".k-icon",a).removeClass().addClass("k-icon").addClass(0!==t.length?T:S),a.html(n).append(i.localization.headerStatusUploaded)):(n=e(".k-icon",a).removeClass().addClass("k-icon").addClass("k-i-pause-sm"),a.html(n).append(i.localization.headerStatusPaused))},_hideHeaderUploadstatus:function(){var t=this.options.dropZone;e(".k-upload-status-total",this.wrapper).remove(),""===t&&e(".k-dropzone-hint",this.wrapper).removeClass("k-hidden")},_onParentFormSubmit:function(){var t=this.element;if(void 0!==this._module.onAbort&&this._module.onAbort(),!t.value){var n=e(t);n.attr("disabled","disabled"),window.setTimeout((function(){n.prop("disabled",!1)}),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!(n.support.browser.opera||n.support.browser.safari&&e)},_supportsDrop:function(){var e=this._userAgent().toLowerCase();return!(!/chrome/.test(e)&&/safari/.test(e)&&/windows/.test(e))&&this._supportsFormData()&&this.options.async.saveUrl},_userAgent:function(){return navigator.userAgent},_setupDropZone:function(){var t=this,n=t._ns,i=e(".k-dropzone",t.wrapper).on("dragenter"+n,j).on("dragover"+n,(function(e){e.originalEvent&&(e.originalEvent.dataTransfer.dropEffect="copy"),e.preventDefault()})).on("drop"+n,t._onDrop.bind(t));i.find(".k-dropzone-hint").length||i.append(e("<em class='k-dropzone-hint'>"+t.localization.dropFilesHere+"</em>")),q(i,n,(function(){i.closest(".k-upload").hasClass("k-disabled")||i.addClass("k-dropzone-hovered")}),(function(){i.removeClass("k-dropzone-hovered")})),t._bindDocumentDragEventWrappers(i)},_setupCustomDropZone:function(){var t=this,n=e(t.options.dropZone);t.wrapper.find(".k-dropzone-hint").length?e(".k-dropzone-hint",t.wrapper).addClass("k-hidden"):e(".k-dropzone",t.wrapper).append(e("<em class='k-dropzone-hint k-hidden'>"+t.localization.dropFilesHere+"</em>"));var i=t._ns;n.on("dragenter"+i,j).on("dragover"+i,(function(e){e.originalEvent&&(e.originalEvent.dataTransfer.dropEffect="copy"),e.preventDefault()})).on("drop"+i,t._onDrop.bind(t)),q(n,i,(function(i){t.wrapper.hasClass("k-disabled")||(n.removeClass("k-dropzone-hovered"),n.addClass("k-dropzone-hovered"),e(i.target).addClass("k-dropzone-hovered"))}),(function(){n.removeClass("k-dropzone-hovered"),n.find(".k-dropzone-hovered").removeClass("k-dropzone-hovered")})),t._bindDocumentDragEventWrappers(n)},_bindDocumentDragEventWrappers:function(t){var n=this,i=n._ns;q(e(document),i,(function(){n.wrapper.hasClass("k-disabled")||(t.addClass("k-dropzone-active"),t.closest(".k-upload").removeClass("k-upload-empty"),t.find(".k-dropzone-hint").removeClass("k-hidden"))}),(function(){t.removeClass("k-dropzone-active"),t.find(".k-dropzone-hint").addClass("k-hidden"),0===e("li.k-file",t.closest(".k-upload")).length&&t.closest(".k-upload").addClass("k-upload-empty")}))},_toggleDropZone:function(){var t=this,n=t.options.dropZone;t._supportsDrop()&&(e(n).off(t._ns),e(".k-dropzone",t.wrapper).off(t._ns),""!==n?t._setupCustomDropZone():t._setupDropZone())},_supportsRemove:function(){return!!this.options.async.removeUrl},_submitRemove:function(t,n,i,r){var o=this.options.async.removeField||"fileNames",s=e.extend(n.data,a());s[o]=t,jQuery.ajax({type:this.options.async.removeVerb,dataType:"json",dataFilter:W,url:this.options.async.removeUrl,traditional:!0,data:s,headers:n.headers,success:i,error:r,xhrFields:{withCredentials:this.options.async.withCredentials}})},_wrapInput:function(t){var n=this,i=n.options,a=!!t.attr("id")&&e("[for='"+t.attr("id")+"']").length>0;return t.wrap("<div class='k-widget k-upload'><div class='k-dropzone'><div class='k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button'></div></div></div>"),i.async.saveUrl?t.closest(".k-upload").addClass("k-upload-async"):t.closest(".k-upload").addClass("k-upload-sync"),t.closest(".k-upload").addClass("k-upload-empty"),t.closest(".k-button").append("<span>"+n.localization.select+"</span>"),a||t.attr("aria-label")||t.attr("aria-label",n.localization.select),t.closest(".k-upload")},_checkAllComplete:function(){0===e(".k-file.k-file-progress",this.wrapper).length&&this.trigger(p)},_inputFiles:function(e){return z(e)}}),D=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")};D.prototype={onSelect:function(t,n){var i=this.upload,a=e(t.target),r=i._filesContainValidationErrors(n);i._addInput(a);var o={fileNames:n};r?a.remove():o.relatedInput=a;var s=i._enqueueFile(F(a),o);r&&i._hideUploadProgress(s),i._fileAction(s,_)},onRemove:function(e){var t=K(e),n=t.data("relatedInput");n&&n.remove(),this.upload._removeFileEntry(t)}};var E=function(e){this.name="iframeUploadModule",this.element=e.wrapper,this.upload=e,this.iframes=[]};I._frameId=0,E.prototype={onSelect:function(t,n){var i=this.upload,a=e(t.target),r=i._filesContainValidationErrors(n),o=this.prepareUpload(a,n,r);i.options.async.autoUpload?r?(i._fileAction(o,_),i._showHeaderUploadStatus(!1)):this.performUpload(o):(i._fileAction(o,_),r?i._updateHeaderUploadStatus():i._showActionButtons()),r&&i._hideUploadProgress(o)},prepareUpload:function(t,n,i){var a,r,o,s,l=this.upload,d=e(l.element),u=l.options.async.saveField||t.attr("name");return l._addInput(t),t.attr("name",u),i?(t.remove(),r={fileNames:n}):(o=this.createFrame(l.name+"_"+I._frameId++),this.registerFrame(o),s=this.createForm(l.options.async.saveUrl,o.attr("name")).append(d),r={frame:o,relatedInput:d,fileNames:n}),a=l._enqueueFile(F(t),r),o&&o.data({form:s,file:a}),a},performUpload:function(t){var n={files:t.data("fileNames")},i=t.data("frame"),r=this.upload,o=t.find(".k-file-validation-message"),s=t.find(".k-file-information"),l=t.find(".k-file-size");if(r.trigger(d,n))r._removeFileEntry(i.data("file")),this.cleanupFrame(i),this.unregisterFrame(i);else{r._hideActionButtons(),r._showHeaderUploadStatus(!0),i.appendTo(document.body);var u=i.data("form").attr("action",r.options.async.saveUrl).appendTo(document.body);for(var c in n.data=e.extend({},n.data,a()),n.data){var p=u.find("input[name='"+c+"']");0===p.length&&(p=e("<input>",{type:"hidden",name:c}).prependTo(u)),p.val(n.data[c])}r._fileAction(t,h),r._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),o.length>0&&o.remove(),s.length>0?s.removeClass("k-hidden"):l.length>0&&l.removeClass("k-hidden"),i.one("load",this.onIframeLoad.bind(this)),u[0].submit()}},onSaveSelected:function(){var t=this,n=t.upload;e(".k-file",this.element).each((function(){var i=e(this),a=G(i),r=n._filesContainValidationErrors(i.data("fileNames"));a||r||t.performUpload(i)}))},onIframeLoad:function(t){var n,i=e(t.target);try{n=i.contents().text()}catch(e){n="Error trying to get server response: "+e}this.processResponse(i,n)},processResponse:function(t,n){var i=t.data("file"),a=this,r={responseText:n};U(n,(function(n){e.extend(r,{statusText:"OK",status:"200"}),a.upload._onFileProgress({target:e(i,a.upload.wrapper)},100),a.upload._onUploadSuccess({target:e(i,a.upload.wrapper)},n,r),a.cleanupFrame(t),a.unregisterFrame(t)}),(function(){e.extend(r,{statusText:"error",status:"500"}),a.upload._onUploadError({target:e(i,a.upload.wrapper)},r)}))},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=K(e);this.performUpload(t)},onRemove:function(e,t,n){var i=this,a=i.upload,r=K(e),o=r.data("frame");o?(i.unregisterFrame(o),a._removeFileEntry(r),i.cleanupFrame(o)):r.hasClass("k-file-success")?V(r,a,t,n):a._removeFileEntry(r)},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){void 0!==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)}};var A=function(e){this.name="formDataUploadModule",this.element=e.wrapper,this.upload=e,this.position={},this.metaData={},this.cancelled={},this.resume={},this.paused={},this.retries={}};function F(t){return e.map(z(t),(function(e){return e.name})).join(", ")}function z(e){var t,n,i=e[0];return i.files?P(i.files):[{name:(t=i.value,n=t.lastIndexOf("\\"),-1!=n?t.substr(n+1):t),extension:H(i.value),size:null}]}function P(t){return e.map(t,(function(e){return i=(t=e).name||t.fileName,{name:n.htmlEncode(i),extension:H(i),size:"number"==typeof t.size?t.size:t.fileSize,rawFile:t};var t,i}))}function H(e){var t=e.match(o);return t?t[0]:""}function N(t,i){var a=n.guid();return e.map(t,(function(e){return e.uid=i?n.guid():a,e}))}function R(t,n){for(var i,a=(i=n.allowedExtensions,e.map(i,(function(e){return("."===e.substring(0,1)?e:"."+e).toLowerCase()}))),r=n.maxFileSize,o=n.minFileSize,s=0;s<t.length;s++)O(t[s],a),M(t[s],o,r)}function O(t,n){n.length>0&&n.indexOf(t.extension.toLowerCase())<0&&(t.validationErrors=t.validationErrors||[],-1===e.inArray(w,t.validationErrors)&&t.validationErrors.push(w))}function M(t,n,i){0!==n&&t.size<n&&(t.validationErrors=t.validationErrors||[],-1===e.inArray(k,t.validationErrors)&&t.validationErrors.push(k)),0!==i&&t.size>i&&(t.validationErrors=t.validationErrors||[],-1===e.inArray(b,t.validationErrors)&&t.validationErrors.push(b))}function B(e){var t=0;if("number"!=typeof e[0].size)return"";for(var n=0;n<e.length;n++)e[n].size&&(t+=e[n].size);return(t/=1024)<1024?t.toFixed(2)+" KB":(t/1024).toFixed(2)+" MB"}function L(t){return!t.multiple&&e(".k-file",t.wrapper).length>1}function V(t,n,i,a){if(n._supportsRemove()){var o=t.data("fileNames"),s=e.map(o,(function(e){return e.name}));!1!==a?n._submitRemove(s,i,(function(e,i,a){n.trigger(u,{operation:"remove",files:o,response:e,XMLHttpRequest:a})||n._removeFileEntry(t)}),(function(e){L(n)&&n._removeFileEntry(t),n.trigger(c,{operation:"remove",files:o,XMLHttpRequest:e}),r("Server response: "+e.responseText)})):n._removeFileEntry(t)}else!L(n)&&a||n._removeFileEntry(t)}function U(e,t,n){var i=!1,a="";try{a=JSON.parse(W(e)),i=!0}catch(e){n()}i&&t(a)}function W(e){return void 0!==e&&""!==e||(e="{}"),e}function j(e){e.originalEvent&&(e.originalEvent.dataTransfer.dropEffect="copy"),e.stopPropagation(),e.preventDefault()}function q(e,t,n,i){var a,r;e.on("dragenter"+t,(function(e){n(e),r=new Date,a||(a=setInterval((function(){new Date-r>100&&(i(),clearInterval(a),a=null)}),100))})).on("dragover"+t,(function(){r=new Date}))}function G(e){return e.is(".k-file-progress, .k-file-success, .k-file-error")}function K(t){return e(t.target).closest(".k-file")}A.prototype={onSelect:function(t,n){var i,a,r=this.upload,o=this,s=e(t.target),l=this.prepareUpload(s,n);e.each(l,(function(t){i=r._filesContainValidationErrors(e(this.data("fileNames"))),r.options.async.autoUpload?i?(r._fileAction(this,_),r._showHeaderUploadStatus(!1)):r.options.async.chunkSize?(o.prepareChunk(this),a=this.prev(),(r.options.async.concurrent||0===t&&!a.length||0===t&&a.hasClass("k-file-success"))&&o.performUpload(this)):o.performUpload(this):(r._fileAction(this,_),i?r._updateHeaderUploadStatus():(r._showActionButtons(),this.addClass("k-toupload"))),i&&r._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,a,r,o=this.upload,s=t.length,l=[];if(!0===o.options.async.batch)n=e.map(t,(function(e){return e.name})).join(", "),(o.directory||o.options.directoryDrop)&&e(t).each((function(){(this.rawFile.webkitRelativePath||this.rawFile.relativePath)&&(this.name=this.rawFile.webkitRelativePath||this.rawFile.relativePath)})),(r=o._enqueueFile(n,{fileNames:t})).data("files",t),l.push(r);else for(i=0;i<s;i++)n=(a=t[i]).name,(o.directory||o.options.directoryDrop)&&(a.rawFile.webkitRelativePath||a.rawFile.relativePath)&&(a.name=a.rawFile.webkitRelativePath||a.rawFile.relativePath),(r=o._enqueueFile(n,{fileNames:[a]})).data("files",[a]),l.push(r);return l},performUpload:function(t){var n,i=this.upload,r=this.createFormData(),o=this.createXHR(),s={files:t.data("fileNames"),XMLHttpRequest:o},l=t.find(".k-file-validation-message"),u=t.find(".k-file-information"),c=t.find(".k-file-size");if(i.trigger(d,s))this.removeFileEntry(t);else{if(0===t.find(".k-i-cancel").length&&(i.options.async.chunkSize&&i._fileAction(t,m),i._fileAction(t,h,i.options.async.chunkSize)),i.wrapper.find(".k-toupload").length||i._hideActionButtons(),i._showHeaderUploadStatus(!0),s.formData)r=s.formData;else{for(var p in s.data=e.extend({},s.data,a()),s.data)r.append(p,s.data[p]);(n=t.data("files"))&&this.populateFormData(r,n)}i._fileState(t,"uploading"),e(t).removeClass("k-file-error").addClass("k-file-progress"),l.length>0&&l.remove(),u.length>0?u.removeClass("k-hidden"):c.length>0&&c.removeClass("k-hidden"),i.options.async.useArrayBuffer&&window.FileReader?this._readFile(i.options.async.saveUrl,r,t,o):this.postFormData(i.options.async.saveUrl,r,t,o)}},_readFile:function(t,n,i,a){var r=this,o=r.upload,s=i.data("files")[0],l=new FileReader;l.onload=function(l){try{r.fileArrayBuffer?r.fileArrayBuffer=r._appendBuffer(r.fileArrayBuffer,l.target.result):r.fileArrayBuffer=l.target.result}catch(t){return void o._onUploadError({target:e(i,o.wrapper)},a)}r.position[s.uid]>s.size?(r.postFormData(o.options.async.saveUrl,r.fileArrayBuffer,i,a),r.fileArrayBuffer=null):r._readFile(t,n,i,a)},l.onerror=function(){o._onUploadError({target:e(i,o.wrapper)},a)},l.readAsArrayBuffer(r._getCurrentChunk(s.rawFile,s.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=G(t),a=n._filesContainValidationErrors(t.data("fileNames"));return!i&&!a})).each((function(i){var a=e(this),r=a.prev();a.removeClass("k-toupload"),n.options.async.chunkSize?(t.prepareChunk(a),(n.options.async.concurrent||0===i&&!r.length||0===i&&r.hasClass("k-file-success")||r.hasClass("k-file-error"))&&t.performUpload(a)):t.performUpload(a)}))},onCancel:function(e){var t=K(e);this.upload.options.async.chunkSize&&(this.cancelled[t.data("uid")]=!0),this.stopUploadRequest(t),this.removeFileEntry(t)},onPause:function(e){var t=K(e).data("uid"),n=this.upload.options.async;n.chunkSize&&(this.retries[t]=n.maxAutoRetries+1,this.paused[t]=!0,this.resume[t]=!1)},onResume:function(e){var t=K(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=K(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.upload,a=K(e),r=this.upload.options.async;r.chunkSize&&(this.retries[a.data("uid")]=r.maxAutoRetries+1),a.hasClass("k-file-success")?V(a,i,t,n):this.removeFileEntry(a)},createXHR:function(){return new XMLHttpRequest},postFormData:function(e,t,n,i){var a=this;n.data("request",i),i.addEventListener("load",(function(e){a.onRequestSuccess.call(a,e,n)}),!1),i.addEventListener(c,(function(e){a.onRequestError.call(a,e,n)}),!1),i.upload.addEventListener("progress",(function(e){a.onRequestProgress.call(a,e,n)}),!1),i.open("POST",e,!0),i.withCredentials=this.upload.options.async.withCredentials;var 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,a,r=t.length,o=this.upload;if(o.options.async.chunkSize){a=t[0].uid,n=this._getCurrentChunk(t[0].rawFile,a),e.append(o.options.async.saveField||o.name,n);var s=JSON.stringify(this.metaData[a]);e.append("metadata",s)}else for(i=0;i<r;i++)e.append(o.options.async.saveField||o.name,t[i].rawFile);return e},onRequestSuccess:function(t,n){var i=t.target,a=this;function r(){a.upload._onUploadError({target:e(n,a.upload.wrapper)},i)}i.status>=200&&i.status<=299?U(i.responseText,(function(t){var r=a.upload.options.async.batch,o=a.upload.options.async.chunkSize,s=a.upload.options.async.concurrent,l=t.fileUid;a.paused[l]||a.cancelled[l]||(delete a.retries[l],!o||r||t.uploaded?!o||r||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,i),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,i),a.performUpload(n.next())):(a._increaseChunkIndex(l),a.performUpload(n)))}),r):r()},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,i=this.upload.wrapper.find(".k-upload-selected").length>0;this.cleanupFileEntry(e),!t||n||i||e.next().length&&this.performUpload(e.next()),this.upload._removeFileEntry(e)},onRequestProgress:function(t,n){var i,a=Math.round(100*t.loaded/t.total),r=n.data("uid");this.upload.options.async.chunkSize&&(a=(i=this.metaData[r])&&i.totalChunks?Math.round(i.chunkIndex/i.totalChunks*100):100),this.upload._onFileProgress({target:e(n,this.upload.wrapper)},a)},stopUploadRequest:function(e){e.data("request")&&e.data("request").abort()},prepareChunk:function(e){var t=e.data("files")[0],n=t.rawFile,i=t.uid,a=this.upload.options.async.chunkSize;this.position[i]=0,this.metaData[i]={chunkIndex:0,contentType:n.type,fileName:n.name,relativePath:t.name,totalFileSize:n.size,totalChunks:Math.ceil(n.size/a),uploadUid:i}},_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],a=this.upload.options.async,r=a.chunkSize||a.bufferChunkSize;return this.position[t]||(this.position[t]=0),this.position[t]+=r,(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}},n.ui.plugin(I)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=e.extend,r=e.isPlainObject,o=".kendoBreadcrumb",s="aria-hidden",l="click",d="blur",u="keydown",c="change",p=".",h={widget:"k-widget k-breadcrumb",overlay:"k-breadcrumb-container",textbox:"k-input-inner",textboxWrapper:"k-textbox k-input k-input-md k-rounded-md k-input-solid",link:"k-breadcrumb-link",item:"k-breadcrumb-item",delimiter:"k-breadcrumb-delimiter-icon",rootItem:"k-breadcrumb-root-item",rootLink:"k-breadcrumb-root-link",overflowIcon:"k-breadcrumb-overflow-icon",focused:"k-focus",hidden:"k-hidden",inputWrapper:"k-breadcrumb-input-container"},f=i.extend({init:function(e,t){var a=this;t=t||{},i.fn.init.call(a,e,t),a._wrapper(),t.editable&&(a._editable(),a._tabindex()),a.wrapper.on(l+o,"a:not(.k-disabled)",a._click.bind(a)),t.value||t.bindToLocation||!t.items?a._value():t.items&&a.items(t.items),a._resizeHandler=n.onResize((function(){a.resize(!0)}))},options:{editable:!1,navigational:!1,bindToLocation:!1,items:null,name:"Breadcrumb",gap:0,rootIcon:"home",delimiterIcon:"arrow-chevron-right",messages:{rootTitle:"Go to root"}},events:[c,l],destroy:function(){var e=this;i.fn.destroy.call(e),n.unbindResize(e._resizeHandler),e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(o)},items:function(e){var n=this;if(e===t)return n.options.items;n.options.items=e,n._segments=e,n.refresh()},_update:function(e){var t=this;e!==t.value()&&(t._generateSegments(e),t.refresh(),t.trigger(c,{sender:this,value:e}))},_generateSegments:function(e){var t,n,i=this,a=i.options.items;if(n=i._split(e),a){i._segments=[];for(var r=0;r<n.length;r++)""!==(t=i._path(a.slice(0,r+1)))&&e.indexOf(t)>-1&&a[r]&&a[r].text===n[r]?i._segments.push(a[r]):i._segments.push(n[r])}else i.options.items=i._segments=n},_click:function(t){var n=this,i=n.options,a=e(t.target).closest(p+h.item),r=a.prevAll().addBack(),o=n._getItems(r),s=n._path(o),d=n._segments[a.index()];i.navigational||t.preventDefault(),n.trigger(l,{sender:n,originalEvent:t,isRoot:"rootitem"===d.type,item:d})||n._update(s)},_getItems:function(t){var n=this;return e.map(t,(function(t){return n._segments[e(t).index()]||t.innerText}))},_edit:function(){var e=this,t=e.input;e.oldValue=e.value(),e.inputWrapper.css("height",e.wrapper.height()),e.overlay.hide(),e.input.val(e.value()),e.input.attr(s,!1),e.inputWrapper.show(),setTimeout((function(){t.select()}))},_blur:function(e){var t=this,n=t.input,i=t.inputWrapper,a=t.wrapper,r=t.overlay,o=n.val().replace(/\/{2,}/g,"/");r.is(":visible")||(e&&(o=t.oldValue),n.attr(s,!0),i.hide(),r.show(),n.val(""),t._update(o),a.removeClass(h.focused))},_keydown:function(e){var t=this,i=e.keyCode,a=i===n.keys.ENTER,r=i===n.keys.ESC;(a||r)&&(t._blur(r),setTimeout((function(){t.overlay.find("a").first().trigger("focus")})))},isNavigational:function(e){var t=e.hasClass(h.textbox)||e.closest(p+h.item);return e[0]!==this.wrapper[0]&&(t&&!e.hasClass("k-breadcrumb-last-item"))},_wrapperKeydown:function(t){var i=e(t.target),a=this.isNavigational(i);t.keyCode!==n.keys.ENTER||a||this._edit()},_wrapperClick:function(t){var n=e(t.target);this.isNavigational(n)||this._edit()},_wrapperFocus:function(t){e(t.target).addClass(h.focused)},_wrapperBlur:function(t){e(t.target).removeClass(h.focused)},_wrapper:function(){var t=this,n=this.element,i=n.is("input"),a=e('<div class="'+h.inputWrapper+'"><span class="'+h.textboxWrapper+'"></span></div>');t.wrapper=i?n.wrap(e("<nav />")).parent():n,i?(t.element.wrap(a).addClass(h.textbox),t.inputWrapper=t.wrapper.find(p+h.inputWrapper).hide()):t.inputWrapper=t.wrapper.append(a).find(p+h.inputWrapper).hide(),t.wrapper.addClass(h.widget),t.wrapper.attr("aria-label","Breadcrumb"),t.overlay=t.wrapper.append(e("<ol />").addClass(h.overlay)).find(p+h.overlay)},_editable:function(){var t=this,n=t.element.is("input");t.input=n?t.element:e("<input />"),t.inputWrapper.find(p+h.textboxWrapper.split(" ")[0]).append(t.input),t.input.addClass(h.textbox).attr(s,!0),t.input.on(d+o,t._blur.bind(t,!1)).on(u+o,t._keydown.bind(t)),t.wrapper.on("focus"+o,t._wrapperFocus.bind(t)).on(d+o,t._wrapperBlur.bind(t)).on(u+o,t._wrapperKeydown.bind(t)).on(l+o,t._wrapperClick.bind(t))},_value:function(){var e=this,t=e.options;t.value?e.value(t.value):t.bindToLocation?e.value(window.location.href.replace(/http(s?):\/\//,"").replace(/\/$/,"")):e.value("")},_split:function(e){return e.split("/").filter((function(e,t){return!(t>0&&""===e)}))},isRtl:function(){return n.support.isRtl(this.wrapper)},refresh:function(){var i,o,s,l,d=this,u=d.options,c=u.messages,p=d.options.delimiterIcon,f="",m="",g=""===d.value(),v=d._segments;for("arrow-chevron-right"==p&&d.isRtl()&&(p="arrow-chevron-left"),o=0,s=v.length;o<s;o++)i=v[o],l=o===v.length-1,i!==t&&(f?m+=i.text||i||"":m="/","string"==typeof i?(i={type:f?"item":"rootitem",href:u.navigational?m:"#",text:i,showIcon:!f,showText:!!f,icon:f?"":u.rootIcon,itemClass:f?"":"k-breadcrumb-root-item",linkClass:f?"":h.rootLink,delimiterIcon:p,renderDelimiter:!l&&!g,lastSegment:l,iconClass:""},d._segments.splice(o,1,i)):r(i)&&(i=a({},i,{type:i.type?i.type.toLowerCase():"item"}),"rootitem"===(i=a({},i,{text:i.text||"",title:i.text||"",icon:i.icon||("rootitem"===i.type?u.rootIcon:""),iconClass:i.iconClass||"",lastSegment:l,renderDelimiter:!l&&v.length>1,href:u.navigational?i.href:"#",delimiterIcon:p,itemClass:i.itemClass||"",linkClass:i.linkClass||"",showIcon:i.showIcon===t?"rootitem"===i.type&&"item"!==i.type:i.showIcon,showText:i.showText===t?"item"===i.type&&"rootitem"!==i.type:i.showText})).type&&(i.itemClass+=" k-breadcrumb-root-item",i.linkClass+=" "+h.rootLink)),"rootitem"===i.type&&""===i.text&&(i.title=c.rootTitle),m+=m.match(/\/$/)?"":"/",f+=n.template(this.itemTemplate)(i));this.overlay.empty().append(e(f)),this.resize(!0)},itemTemplate:'<li class="k-breadcrumb-item #:itemClass# #if(lastSegment){#k-breadcrumb-last-item#}#"><a href="#:href#" class="#:linkClass# #if(type !== "rootitem"){# k-breadcrumb-link#}##if(showText && showIcon){# k-breadcrumb-icontext-link#}##if(showIcon && !showText){# k-breadcrumb-icon-link#}##if(lastSegment && type !== "rootitem"){# k-disabled#}#"#if(lastSegment){# aria-current="page"#}##if(lastSegment && type !== "rootitem"){# aria-disabled="true" #}#title="#:text || title#">#if(showIcon) {#<span class="#if(icon){#k-icon k-i-#:icon##}# #:iconClass#"></span>#}##if(showText) {##:text##}#</a>#if(renderDelimiter) {#<span class="k-breadcrumb-delimiter-icon k-icon k-i-#:delimiterIcon#" aria-hidden="true"></span>#}##if(type === "rootitem" && renderDelimiter) {#<span class="k-breadcrumb-delimiter-icon k-hidden k-icon k-i-#:delimiterIcon#" aria-hidden="true"></span>#}#</li>',_displayOverflowIcons:function(e){var t=this.wrapper.find(p+h.rootItem);e?t.find(p+h.delimiter).addClass(h.overflowIcon).removeClass(h.hidden):t.find(p+h.overflowIcon).removeClass(h.overflowIcon).last().addClass(h.hidden)},_shrinkItems:function(){var t,i=this,a=i.wrapper,r=i.overlay,o=i.overlay.find(p+h.item+":visible:not(.k-breadcrumb-root-item)"),s=a.width()-i.options.gap;if(1!=o.length)for(var l=0;l<o.length;l+=1)if(t=e(o[l]),n._outerWidth(r)>=s){if(l==o.length-1)break;t.hide(),i._displayOverflowIcons(!0)}},_showItem:function(e,t,i){return!!(e.length&&i>t+n._outerWidth(e,!0))&&(e.show(),!0)},_stretchItems:function(){var t,i,a=this,r=a.wrapper,o=a.overlay,s=a.overlay.find(p+h.item+":hidden:not(.k-breadcrumb-root-item)"),l=r.width()-a.options.gap;s.length||a._displayOverflowIcons(!1);for(var d=s.length-1;d>=0&&(t=e(s[d]),!((i=n._outerWidth(o))>l)&&this._showItem(t,i,l));d--);},_resize:function(){this._shrinkItems(),this._stretchItems()},getSize:function(){return n.dimensions(this.wrapper)},value:function(e){var n=this;return e!==t?(n._generateSegments(e),void n.refresh()):n._path(n._segments)},_path:function(t){return e.map(t,(function(e){var t=r(e)?e.text:e;return"/"===t?"":t})).join("/")}});n.ui.plugin(f)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=e.isPlainObject,r=e.extend,o=n.support.placeholder,s=n.isFunction,l=/(^\/|\/$)/g,d="change",u="apply",c="error",p="click",h=".kendoFileBrowser",f=".kendoSearchBox",m="name",g="size",v="type",_={field:v,dir:"asc"},b=n.template('<div class="k-listview-item k-listview-item-empty"><span class="k-file-preview"><span class="k-file-icon k-icon k-i-none"></span></span><span class="k-file-name">${text}</span></div>');function k(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}function w(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}r(!0,n.data,{schemas:{filebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),r(!0,n.data,{transports:{filebrowser:n.data.RemoteTransport.extend({init:function(t){n.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,i){i.data=e.extend({},i.data,{path:this.options.path()}),s(this.options[t])?this.options[t].call(this,i):n.data.RemoteTransport.fn[t].call(this,i)},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"}}})}});var y=i.extend({init:function(e,t){var n=this;t=t||{},i.fn.init.call(n,e,t),n.element.addClass("k-filebrowser"),n.element.on(p+h,".k-filebrowser-toolbar button:not(.k-disabled):has(.k-i-close)",n._deleteClick.bind(n)).on(p+h,".k-filebrowser-toolbar button:not(.k-disabled):has(.k-i-folder-add)",n._addClick.bind(n)).on("keydown"+h,".k-listview-item.k-selected input",n._directoryKeyDown.bind(n)).on("blur"+h,".k-listview-item.k-selected input",n._directoryBlur.bind(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:[c,d,u],destroy:function(){var e=this;i.fn.destroy.call(e),e.dataSource.unbind(c,e._errorHandler),e.element.add(e.list).add(e.toolbar).off(h),n.destroy(e.element)},value:function(){var e,t=this,i=t._selectedItem(),a=t.options.transport.fileUrl;if(i&&"f"===i.get(v))return e=k(t.path(),i.get(m)).replace(l,""),a&&(e=s(a)?a(e):n.format(a,encodeURIComponent(e))),e},_selectedItem:function(){var e=this.listView.select();if(e.length)return this.dataSource.getByUid(e.attr(n.attr("uid")))},_toolbar:function(){var t=this,i=n.template('<div class="k-widget k-filebrowser-toolbar k-toolbar k-floatwrap"># if (showCreate) { #<button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button"><span class="k-i-button-icon k-icon k-i-folder-add"></span></button># } ## if (showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-upload-button"><span class="k-button-icon k-icon k-i-plus"></span><span class="k-button-text">#=messages.uploadFile#</span><input type="file" name="file" /></div></div># } ## if (showDelete) { #<button type="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-disabled"><span class="k-button-icon k-icon k-i-close"></span></button># } #<div class="k-tiles-arrange"><label>#=messages.orderBy#: <select></select></label></div><span class="k-toolbar-spacer"></span><input data-role="searchbox" /></div>'),a=t.options.messages,r=[{text:a.orderByName,value:"name"},{text:a.orderBySize,value:"size"}];t.toolbar=e(i({messages:a,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:a.dropFilesHere},async:{saveUrl:t.options.transport.uploadUrl,autoUpload:!0},upload:t._fileUpload.bind(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.searchBox=t.toolbar.find("input[data-role='searchbox']").kendoSearchBox({label:t.options.messages.search,change:function(){t.search(this.value())}}).data("kendoSearchBox"),t._attachDropzoneEvents()},_attachDropzoneEvents:function(){var t,n,i,a,r,o=this;o.options.transport.uploadUrl&&(t=e(document.documentElement),n=o._dropEnter.bind(o),i=o._dropLeave.bind(o),t.on("dragenter"+h,(function(){n(),r=new Date,a||(a=setInterval((function(){new Date-r>100&&(i(),clearInterval(a),a=null)}),100))})).on("dragover"+h,(function(){r=new Date})),o._scrollHandler=o._positionDropzone.bind(o))},_dropEnter:function(){this._positionDropzone(),e(document).on("scroll"+h,this._scrollHandler)},_dropLeave:function(){this._removeDropzone(),e(document).off("scroll"+h,this._scrollHandler)},_positionDropzone:function(){var e=this.element,t=e.offset();this.toolbar.find(".k-dropzone").addClass("k-filebrowser-dropzone").offset(t).css({width:e[0].clientWidth,height:e[0].clientHeight,lineHeight:e[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(),i=n.format(e.options.messages.deleteFile,t.find(".k-file-name").text());t.length&&e._showMessage(i,"confirm")&&e.listView.remove(t)},_addClick:function(){this.createDirectory()},_getFieldName:function(e){return function(e,t){var n=e[t];return a(n)?n.from||n.field||t:n}(this.dataSource.reader.model.fields,e)},_fileUpload:function(e){var t,i=this,a=i.options,r=a.fileTypes,o=new RegExp(("("+r.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),s=e.files[0].name,l=e.files[0].size,d=m,u=g;o.test(s)?(e.data={path:i.path()},(t=i._createFile(s,l))?i.upload.one("success",(function(e){var a=i._insertFileToList(t);a._override&&(a.set(d,e.response[i._getFieldName(d)]),a.set(u,e.response[i._getFieldName(u)]),i.listView.dataSource.pushUpdate(a)),i._tiles=i.listView.items().filter("["+n.attr("type")+"=f]")})):e.preventDefault()):(e.preventDefault(),i._showMessage(n.format(a.messages.invalidFileType,s,r)))},_findFile:function(e){var t,n,i,a=this.dataSource.data();for(e=e.toLowerCase(),t=0,i=a.length;t<i;t++)if("f"===a[t].get("type")&&a[t].get("name").toLowerCase()===e){n=a[t];break}return n},_createFile:function(e,t){var i=this,a={},r=i._findFile(e);return r?i._showMessage(n.format(i.options.messages.overwriteFile,e),"confirm")?(r._override=!0,r):null:(a.type="f",a.name=e,a.size=t,a)},_insertFileToList:function(e){var t;if(e._override)return e;for(var n=this.dataSource,i=n.view(),a=0,r=i.length;a<r;a++)if("f"===i[a].get(v)){t=a;break}return n.insert(++t,e)},createDirectory:function(){var e,t,i=this,a=0,r=v,o=m,s=i.dataSource.data(),l=i._nameDirectory(),d=new i.dataSource.reader.model;for(e=0,t=s.length;e<t;e++)"d"===s[e].get(r)&&(a=e);d.set(r,"d"),d.set(o,l),i.listView.one("dataBound",(function(){var e=i.listView.items().filter("["+n.attr("uid")+"="+d.uid+"]");e.length&&this.edit(e),this.element.scrollTop(e.attr("offsetTop")-this.element[0].offsetHeight),setTimeout((function(){i.listView.element.find(".k-edit-item input").select()}))})).one("save",(function(e){var t=e.model.get(o);t?e.model.set(o,i._nameExists(t,d.uid)?i._nameDirectory():t):e.model.set(o,l)})),i.dataSource.insert(++a,d)},_directoryKeyDown:function(e){13==e.keyCode&&e.currentTarget.blur()},_directoryBlur:function(){this.listView.save()},_nameExists:function(e,t){var n,i,a=this.dataSource.data();for(n=0,i=a.length;n<i;n++)if("d"===a[n].get("type")&&a[n].get("name").toLowerCase()===e.toLowerCase()&&a[n].uid!==t)return!0;return!1},_nameDirectory:function(){var t,n,i,a="New folder",r=this.dataSource.data(),o=[],s=m;for(n=0,i=r.length;n<i;n++)"d"===r[n].get("type")&&r[n].get(s).toLowerCase().indexOf(a.toLowerCase())>-1&&o.push(r[n].get(s));if(e.inArray(a,o)>-1){n=2;do{t=a+" ("+n+")",n++}while(e.inArray(t,o)>-1);a=t}return a},orderBy:function(e){this.dataSource.sort([{field:v,dir:"asc"},{field:e,dir:"asc"}])},search:function(e){this.dataSource.filter({field:m,operator:"contains",value:e})},_content:function(){var t=this;t.list=e('<div class="k-filemanager-listview" />').appendTo(t.element).on("dblclick"+h,".k-listview-item",t._dblClick.bind(t)),t.listView=new n.ui.ListView(t.list,{layout:"flex",flex:{direction:"row",wrap:"wrap"},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-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),n.ui.progress(t.listView.content,!1))},dataBound:function(){t.dataSource.view().length?t._tiles=this.items().filter("["+n.attr("type")+"=f]"):this.content.append(b({text:t.options.messages.emptyFolder}))},change:t._listViewChange.bind(t)})},_dblClick:function(t){var i=this,a=e(t.currentTarget);if(a.hasClass("k-edit-item")&&i._directoryBlur(),a.filter("["+n.attr("type")+"=d]").length){var r=i.dataSource.getByUid(a.attr(n.attr("uid")));r&&(i.path(k(i.path(),r.get(m))),i.breadcrumbs.value("/"+i.path()))}else a.filter("["+n.attr("type")+"=f]").length&&i.trigger(u)},_listViewChange:function(){var e=this._selectedItem();e&&(this.toolbar.find(".k-i-close").parent().removeClass("k-disabled"),this.trigger(d,{selected:e}))},_dataSource:function(){var e=this,t=e.options,i=t.transport,o=r({},_),s={field:m,dir:"asc"},l={type:i.type||"filebrowser",sort:[o,s]};a(i)&&(i.path=e.path.bind(e),l.transport=i),a(t.schema)?l.schema=t.schema:i.type&&a(n.data.schemas[i.type])&&n.data.schemas[i.type],e.dataSource&&e._errorHandler?e.dataSource.unbind(c,e._errorHandler):e._errorHandler=e._error.bind(e),e.dataSource=n.data.DataSource.create(l).bind(c,e._errorHandler)},_navigation:function(){var t=this,n=e('<div class="k-floatwrap"><nav></nav></div>').appendTo(this.element);t.breadcrumbs=n.find("nav").first().kendoBreadcrumb({editable:!0,gap:50,value:t.options.path||"/",change:function(){t.path(this.value())}}).data("kendoBreadcrumb")},_error:function(e){var t,n=this;if(!n.trigger(c,e)){t=e.xhr.status,"error"==e.status?"404"==t?n._showMessage(n.options.messages.directoryNotFound):"0"!=t&&n._showMessage("Error! The requested URL returned "+t+" - "+e.xhr.statusText):"timeout"==t&&n._showMessage("Error! Server timeout.");var i=n.dataSource;i.hasChanges()&&i.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='<div class="k-listview-item k-selected" '+n.attr("uid")+'="#=uid#" ';return e+=n.attr("type")+'="${'+'type}">',e+='#if(type == "d") { #',e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-loading"></span></div>',e+="#}#",e+='#if(type == "d") { #',e+='<span class="k-file-name"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input class="k-input-inner" '+n.attr("bind")+'="value:'+'name"/></span></span>',e+="#}#",e+="</div>",n.template(e).bind({sizeFormatter:w})},_itemTmpl:function(){var e='<div class="k-listview-item" '+n.attr("uid")+'="#=uid#" ';return e+=n.attr("type")+'="${'+'type}">',e+='#if(type == "d") { #',e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-folder"></span></div>',e+="#}else{#",e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-file"></span></div>',e+="#}#",e+='<span class="k-file-name">${name}</span>',e+='#if(type == "f") { # <span class="k-file-size">${this.sizeFormatter(size)}</span> #}#',e+="</div>",n.template(e).bind({sizeFormatter:w})},path:function(e){var n=this,i=n._path||"";return e!==t?(n._path=e.replace(l,"")+"/",void n.dataSource.read({path:n._path})):(i&&(i=i.replace(l,"")),"/"===i||""===i?"":i+"/")}}),x=i.extend({init:function(e,t){var n=this;t=t||{},i.fn.init.call(n,e,t),o&&n.element.attr("placeholder",n.options.label),n._wrapper(),n.element.on("keydown"+f,n._keydown.bind(n)).on("change"+f,n._updateValue.bind(n)),n.wrapper.on(p+f,"a",n._click.bind(n)),o||n.element.on("focus"+f,n._focus.bind(n)).on("blur"+f,n._blur.bind(n))},options:{name:"SearchBox",label:"Search",value:""},events:[d],destroy:function(){var e=this;e.wrapper.add(e.element).add(e.label).off(f),i.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(d))},_blur:function(){this._updateValue(),this._toggleLabel()},_toggleLabel:function(){o||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-inner"),n.length||(n=t.wrap(e('<div class="k-widget k-search-wrap"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"></span></div>')).parents(".k-search-wrap"),o||e('<label style="display:block">'+this.options.label+"</label>").insertBefore(t),e('<span class="k-input-suffix"><a href="#" class="k-icon k-i-zoom k-search"/></span>').appendTo(n.find(".k-textbox"))),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),void n._toggleLabel()):n.options.value}});n.ui.plugin(y),n.ui.plugin(x)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.FileBrowser,a=e.isPlainObject,r=e.extend,o=n.isFunction,s=/(^\/|\/$)/g,l="error",d=".kendoImageBrowser",u="name",c="size",p="type",h={field:p,dir:"asc"},f=n.template('<div class="k-listview-item k-listview-item-empty"><span class="k-file-preview"><span class="k-file-icon k-icon k-i-none"></span></span><span class="k-file-name">${text}</span></div>');function m(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}r(!0,n.data,{schemas:{imagebrowser:{data:function(e){return e.items||e||[]},model:{id:"name",fields:{name:"name",size:"size",type:"type"}}}}}),r(!0,n.data,{transports:{imagebrowser:n.data.RemoteTransport.extend({init:function(t){n.data.RemoteTransport.fn.init.call(this,e.extend(!0,{},this.options,t))},_call:function(t,i){i.data=e.extend({},i.data,{path:this.options.path()}),o(this.options[t])?this.options[t].call(this,i):n.data.RemoteTransport.fn[t].call(this,i)},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"}}})}});var g=i.extend({init:function(e,t){t=t||{},i.fn.init.call(this,e,t),this.element.addClass("k-imagebrowser")},options:{name:"ImageBrowser",fileTypes:"*.png,*.gif,*.jpg,*.jpeg"},value:function(){var e,i=this,a=i._selectedItem(),r=i.options.transport.imageUrl;if(a&&"f"===a.get(p))return e=function(e,n){return e!==t&&e.match(/\/$/)||(e=(e||"")+"/"),e+n}(i.path(),a.get(u)).replace(s,""),r&&(e=o(r)?r(e):n.format(r,encodeURIComponent(e))),e},_fileUpload:function(e){var i,a=this,r=a.options,o=r.fileTypes,s=new RegExp(("("+o.split(",").join(")|(")+")").replace(/\*\./g,".*."),"i"),l=e.files[0].name,d=e.files[0].size,p=u,h=c;s.test(l)?(e.data={path:a.path()},(i=a._createFile(l,d))?(i._uploading=!0,a.upload.one("error",(function(){i=t})),a.upload.one("success",(function(e){if(i){delete i._uploading;var t=a._insertFileToList(i);t.set(p,e.response[a._getFieldName(p)]),t.set(h,e.response[a._getFieldName(h)]),a._tiles=a.listView.items().filter("["+n.attr("type")+"=f]"),a._scroll()}}))):e.preventDefault()):(e.preventDefault(),a._showMessage(n.format(r.messages.invalidFileType,l,o)))},_content:function(){var t=this;t.list=e('<div class="k-filemanager-listview" />').appendTo(t.element).on("dblclick"+d,".k-listview-item",t._dblClick.bind(t)),t.listView=new n.ui.ListView(t.list,{layout:"flex",flex:{direction:"row",wrap:"wrap"},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-disabled"),"remove"!==e.action&&"sync"!==e.action||(e.preventDefault(),n.ui.progress(t.listView.content,!1))},dataBound:function(){t.dataSource.view().length?(t._tiles=this.items().filter("["+n.attr("type")+"=f]"),t._scroll()):this.content.append(f({text:t.options.messages.emptyFolder}))},change:t._listViewChange.bind(t)}),t.listView.content.on("scroll"+d,t._scroll.bind(t))},_dataSource:function(){var e=this,t=e.options,i=t.transport,o=r({},h),s={field:u,dir:"asc"},d={type:i.type||"imagebrowser",sort:[o,s]};a(i)&&(i.path=e.path.bind(e),d.transport=i),a(t.schema)?d.schema=t.schema:i.type&&a(n.data.schemas[i.type])&&n.data.schemas[i.type],e.dataSource&&e._errorHandler?e.dataSource.unbind(l,e._errorHandler):e._errorHandler=e._error.bind(e),e.dataSource=n.data.DataSource.create(d).bind(l,e._errorHandler)},_loadImage:function(t){var i=this,a=e(t),r=i.dataSource.getByUid(a.attr(n.attr("uid"))),s=r.get(u),l=i.options.transport.thumbnailUrl,c=e("<img />",{alt:s}),p="?";r._uploading||(c.hide().on("load"+d,(function(){e(this).prev().remove().end().addClass("k-image k-file-image").fadeIn()})),a.find(".k-i-loading").after(c),o(l)?l=l(i.path(),encodeURIComponent(s)):(l.indexOf("?")>=0&&(p="&"),l=l+p+"path="+encodeURIComponent(i.path()+s),r._override&&(l+="&_="+(new Date).getTime(),delete r._override)),c.attr("src",l),t.loaded=!0)},_scroll:function(){var t=this;t.options.transport&&t.options.transport.thumbnailUrl&&(clearTimeout(t._timeout),t._timeout=setTimeout((function(){var i=n._outerHeight(t.listView.content),a=t.listView.content.scrollTop(),r=a+i;t._tiles.each((function(){var n,i=(n=this).offsetTop-e(n).height(),o=i+this.offsetHeight;if((i>=a&&i<r||o>=a&&o<r)&&t._loadImage(this),i>r)return!1})),t._tiles=t._tiles.filter((function(){return!this.loaded}))}),250))},_itemTmpl:function(){var e='<div class="k-listview-item" '+n.attr("uid")+'="#=uid#" ';return e+=n.attr("type")+'="${'+'type}">',e+='#if(type == "d") { #',e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-folder"></span></div>',e+="#}else{#",this.options.transport&&this.options.transport.thumbnailUrl?e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-loading"></span></div>':e+='<div class="k-file-preview"><span class="k-file-icon k-icon k-i-file"></span></div>',e+="#}#",e+='<span class="k-file-name">${name}</span>',e+='#if(type == "f") { # <span class="k-file-size">${this.sizeFormatter(size)}</span> #}#',e+="</div>",n.template(e).bind({sizeFormatter:m})}});n.ui.plugin(g)}(window.kendo.jQuery),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(e,t){var n=window.kendo,i=n.Class,a=n.ui.Widget,r=n.support.mobileOS,o=n.support.browser,s=e.extend,l=n.deepExtend,d=n.keys,u="select",c="select.k-select-overlay",p="k-placeholder",h=i.extend({init:function(e){this.options=e},getHtml:function(){var e=this.options;return n.template(e.template,{useWithBlock:!1})(e)}}),f={editorWrapperTemplate:'<table cellspacing="0" cellpadding="0" class="k-widget k-editor" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-toolbar k-editor-toolbar" role="toolbar"></ul></td></tr><tr><td class="k-editable-area k-editor-content"></td></tr></tbody></table>',buttonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button type="button" tabindex="0" role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-tool" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span><span class="k-tool-text k-button-text">#= data.title #</span></button>',iconTextButtonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button type="button" tabindex="0" role="button" class="k-i-import k-button k-button-md k-rounded-md k-button-solid k-button-solid-base" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="k-button-icon #= iconCssClass #"></span><span class="k-button-text">#= data.title #</span></button>',tableWizardButtonTemplate:'# var iconCssClass = "k-icon k-i-" + kendo.toHyphens(data.cssClass.replace("k-", ""));## var dataPopup = data.popup ? "data-popup" : "";#<button type="button" tabindex="0" role="button" class="k-tool k-button k-button-md k-rounded-md k-button-solid k-button-solid-base" #= dataPopup # title="#= data.title #" aria-label="#= data.title #"><span class="#= iconCssClass #"></span><span class="k-tool-text">#= data.title #</span></button>',colorPickerTemplate:'<input class="k-colorpicker k-icon k-i-#= data.cssClass.replace("k-", "") #" />',comboBoxTemplate:'<select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #"></select>',dropDownListTemplate:'<span class="k-editor-dropdown"><select title="#= data.title #" aria-label="#= data.title #" class="#= data.cssClass #"></select></span>',separatorTemplate:'<span class="k-separator"></span>',overflowAnchorTemplate:'<button type="button" tabindex="0" role="button" class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-tool k-overflow-anchor" data-popup title="#= data.title #" aria-label="#= data.title #" aria-haspopup="true" aria-expanded="false"><span class="k-icon k-i-more-vertical k-button-icon"></span></button>',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",insertUpperRomanList:"list-roman-upper",insertLowerRomanList:"list-roman-lower",import:"import",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",mergeCellsHorizontally:"cells-merge-horizontally",mergeCellsVertically:"cells-merge-vertically",splitCellHorizontally:"cell-split-horizontally",splitCellVertically:"cell-split-vertically",tableWizard:"table-properties",tableWizardInsert:"table-wizard",tableAlignLeft:"table-position-left",tableAlignCenter:"table-position-center",tableAlignRight:"table-position-right",cleanFormatting:"clear-css",copyFormat:"copy-format",applyFormat:"apply-format"}[e];return t||e},registerTool:function(e,t){var n=t.options;n&&n.template&&(n.template.options.cssClass="k-"+f.getToolCssClass(e)),t.name||(t.options.name=e,t.name=e.toLowerCase()),x.defaultTools[e]=t},registerFormat:function(e,t){x.fn.options.formats[e]=t},cacheComments:function(e,t){for(var n in t)e=e.replace(t[n],"{"+n+"}");return e},retrieveComments:function(e,t){for(var n in t)e=e.replace("{"+n+"}",t[n]);return e}},m=void 0!==document.documentElement.contentEditable,g=["bold","italic","underline"],v=["justifyLeft","justifyCenter","justifyRight"],_=["insertUnorderedList","insertOrderedList"],b=["indent","outdent"],k=["copyFormat","applyFormat"],w=["createLink","unlink"],y=["tableWizard","createTable","addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn","mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically","tableAlignLeft","tableAlignCenter","tableAlignRight"],x=a.extend({init:function(i,r){var o,d,u,c,p,h,g=this,v=n.ui.editor,_=v.Dom;if(m){if(a.fn.init.call(g,i,r),g.options=l({},g.options,r),g.options.tools=g.options.tools.slice(),h=(i=g.element)[0],c=_.name(h),this._registerHandler(i.closest("form"),"submit",g.update.bind(g,t)),(u=s({},g.options)).editor=g,"textarea"==c?(g._wrapTextarea(),d=g.wrapper.find(".k-editor-toolbar"),h.id&&d.attr("aria-controls",h.id)):(g.element.attr("contenteditable",!0).addClass("k-widget k-editor k-editor-inline"),u.popup=!0,d=e('<ul class="k-toolbar k-editor-toolbar" role="toolbar" />').insertBefore(i)),g.toolbar=new v.Toolbar(d[0],u),g.toolbar.bindTo(g),"textarea"==c&&setTimeout((function(){var e=g.wrapper[0].style.height,t=parseInt(e,10),n=g.wrapper.height();e.indexOf("px")>0&&!isNaN(t)&&n>t&&g.wrapper.height(t-(n-t))})),g._resizable(),g._initializeContentElement(g),g.keyboard=new v.Keyboard([new v.BackspaceHandler(g),new v.TypingHandler(g),new v.SystemHandler(g),new v.SelectAllHandler(g)]),g.clipboard=new v.Clipboard(this),g.undoRedoStack=new n.util.UndoRedoStack,r&&r.value)o=r.value;else if(g.textarea){(o=h.value).replace(/\s/g,"").length||(o=o.replace(/\s/g,"")),g.options.encoded&&h.defaultValue&&h.defaultValue.trim().length&&(o=h.defaultValue);var b=v.Serializer.htmlToDom(o,e("<div></div>")[0],g.options.deserialization);p=_.getAllComments(b),o=(o=f.cacheComments(o,p)).replace(/[\r\n\v\f\t ]+/gi," "),o=f.retrieveComments(o,p)}else o=h.innerHTML;g.value(o||"\ufeff"),this._registerHandler(document,{mousedown:function(){g._endTyping()},mouseup:function(e){g._mouseup(e)}}),g._initializeImmutables(),"textarea"==c&&g._ariaLabel(g.wrapper.find("iframe")),g.toolbar.resize(),n.notify(g)}},setOptions:function(e){var t=this;a.fn.setOptions.call(t,e),e.tools&&t.toolbar.bindTo(t),this._initializePlaceholder()},_togglePlaceholder:function(t){var n=this,i=n.body,a=e(i),r=n.options.placeholder;n.textarea&&r&&(a.attr("aria-label",(function(){return t?r:""})),a.toggleClass(p,t))},_endTyping:function(){var e=this.keyboard;try{e.isTypingInProgress()&&(e.endTyping(!0),this.saveSelection())}catch(e){}},_selectionChange:function(){this._selectionStarted=!1,this.saveSelection(),this.trigger("select",{})},_resizable:function(){var i=this.options.resizable;if((e.isPlainObject(i)?i.content===t||!0===i.content:i)&&this.textarea){var a=e("<div class='k-resize-handle'><span class='k-icon k-i-arrow-45-down-right'></span></div>").insertAfter(this.textarea);if(this.wrapper.addClass("k-resizable"),this.wrapper.kendoResizable(s({},this.options.resizable,{draggableElement:a,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,a=this.options.max||1/0;n=Math.min(a,Math.max(i,n)),this.editor.height(n)},resizeend:function(){this.editor.find(".k-overlay").remove(),this.editor=null}})),n.support.mobileOS.ios)this.wrapper.getKendoResizable().draggable.options.ignore=c}},_initializeElementResizing:function(){var e=this;n.ui.editor.ElementResizingFactory.current.create(e),e._showElementResizeHandlesProxy=e._showElementResizeHandles.bind(e),e.bind(u,e._showElementResizeHandlesProxy)},_destroyElementResizing:function(){var e=this,t=e.elementResizing;t&&(t.destroy(),e.elementResizing=null),e._showElementResizeHandlesProxy&&e.unbind(u,e._showElementResizeHandlesProxy)},_showElementResizeHandles:function(){var e=this.elementResizing;e&&e.element&&e.element.parentNode?e.showResizeHandles():!e||e.element&&e.element.parentNode||this._destroyElementResizing()},_initializeColumnResizing:function(){n.ui.editor.ColumnResizing.create(this)},_destroyColumnResizing:function(){var e=this;e.columnResizing&&(e.columnResizing.destroy(),e.columnResizing=null)},_initializeRowResizing:function(){n.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,a=n[0].style.height,r=f.editorWrapperTemplate,o=e(r).insertBefore(n),s=o.find(".k-editable-area");o.css({width:i,height:a}),n.attr("autocomplete","off").appendTo(s).addClass("k-content k-raw-content").css("display","none"),t.textarea=n,t.wrapper=o},_createContentElement:function(t){var i,a,s,l,d=this,u=d.textarea,c=d.options.domain,p=c||document.domain,h="",f='javascript:""';return u.hide(),i=e("<iframe />",{title:d.options.messages.editAreaTitle,frameBorder:"0"})[0],e(i).css("display","").addClass("k-content k-iframe").attr("tabindex",u[0].tabIndex).insertBefore(u),(c||p!=location.hostname)&&(f="javascript:document.write('"+(h='<script>document.domain="'+p+'"<\/script>')+"')",i.src=f),i.src||(i.src=""),a=i.contentWindow||i,s=a.document||i.contentDocument,e(i).one("load",(function(){d.toolbar.decorateFrom(s.body)})),l=document.getElementsByTagName("html")[0].getAttribute("lang")||"en",s.open(),s.write("<!DOCTYPE html><html lang='"+l+"'><head><meta charset='utf-8' /><title>Kendo UI Editor content</title><style>html{padding:0;margin:0;height:100%;min-height:100%;cursor:text;}body{padding:0;margin:0;}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;"+(n.support.isRtl(u)?"direction:rtl;":"")+(r.ios?"word-break:keep-all;":"")+(o.edge||o.chrome?"height:100%;":"")+"}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 th{outline:0;border: 1px dotted #999;}.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-element-resize-handle-wrapper {position: absolute; background-color: #fff; border: 1px solid #000; z-index: 100; width: 5px; height: 5px;}.k-element-resize-handle {width: 100%; height: 100%;}.k-element-resize-handle.k-resize-east{cursor:e-resize;}.k-element-resize-handle.k-resize-north{cursor:n-resize;}.k-element-resize-handle.k-resize-northeast{cursor:ne-resize;}.k-element-resize-handle.k-resize-northwest{cursor:nw-resize;}.k-element-resize-handle.k-resize-south{cursor:s-resize;}.k-element-resize-handle.k-resize-southeast{cursor:se-resize;}.k-element-resize-handle.k-resize-southwest{cursor:sw-resize;}.k-element-resize-handle.k-resize-west{cursor:w-resize;}.k-table.k-element-resizing{opacity:0.6;}.k-placeholder{color:grey}k\\:script{display:none;}</style>"+h+e.map(t,(function(e){return"<link rel='stylesheet' href='"+e+"'>"})).join("")+"</head><body autocorrect='off' contenteditable='true'></body></html>"),s.close(),a},_blur:function(){var e=this.textarea,t=e?e.val():this._oldValue,n=this.options.encoded?this.encodedValue():this.value();this.update(),e&&e.trigger("blur"),n!=t&&(this.trigger("change"),e&&e.trigger("change"))},_spellCorrect:function(e){var t,i=!1;this._registerHandler(e.body,{contextmenu:function(){e.one("select",(function(){t=null})),e._spellCorrectTimeout=setTimeout((function(){t=new n.ui.editor.RestorePoint(e.getRange(),e.body),i=!1}),10)},input:function(){t&&(!n.support.browser.mozilla||i?n.ui.editor._finishUpdate(e,t):i=!0)}})},_registerHandler:function(t,i,a){var r,o,s=".kendoEditor";if(t=e(t),this._handlers||(this._handlers=[]),t.length)if(e.isPlainObject(i))for(var l in i)i.hasOwnProperty(l)&&this._registerHandler(t,l,i[l]);else for(r=n.applyEventMap(i).split(" "),o=0;o<r.length;o++)this._handlers.push({element:t,type:r[o]+s,handler:a}),t.on(r[o]+s,a)},_deregisterHandlers:function(){for(var e=this._handlers,t=0;t<e.length;t++){var n=e[t];n.element.off(n.type,n.handler)}this._handlers=[]},_initializeContentElement:function(){var i,a,r,o=this;if(o.textarea){if(o.window=o._createContentElement(o.options.stylesheets),!(i=o.document=o.window.contentDocument||o.window.document).body){var s=i.createElement("body");s.setAttribute("contenteditable","true"),s.setAttribute("autocorrect","off"),i.getElementsByTagName("html")[0].appendChild(s);var l=setInterval((function(){e(o.document).find("body").length>1&&(e(o.document).find("body").last().remove(),window.clearInterval(l))}),10)}o.body=i.body,a=o.window,r=i,this._registerHandler(i,"mouseup",this._mouseup.bind(this))}else o.window=window,i=o.document=document,o.body=o.element[0],a=o.body,r=o.body,o.toolbar.decorateFrom(o.body);this._registerHandler(a,"blur",this._blur.bind(this)),o._registerHandler(r,"down",o._mousedown.bind(o));try{i.execCommand("enableInlineTableEditing",null,!1)}catch(e){}n.support.touch&&this._registerHandler(i,{keydown:function(){n._activeElement()!=i.body&&o.window.focus()}}),this._initializePlaceholder(),this._spellCorrect(o),this._registerHandler(o.document,{"mouseover dragenter":function(t){var n=e(o.body).height();e(o.body.parentElement).height()>n&&"html"===t.target.nodeName.toLowerCase()&&(o._cachedHeight=""+o.body.style.height,o.body.style.height="100%")},"mouseout dragleave drop contextmenu":function(e){var n=function(){o._cachedHeight!==t&&e.target===o.body&&(o.body.style.height=o._cachedHeight,delete o._cachedHeight)};"contextmenu"===e.type?setTimeout((function(){n()}),10):n()}}),this._registerHandler(o.body,{keydown:function(e){var t;if((e.keyCode===d.BACKSPACE||e.keyCode===d.DELETE)&&"true"!==o.body.getAttribute("contenteditable"))return!1;if(e.keyCode===d.F10)return setTimeout(o.toolbar.focus.bind(o.toolbar),100),o.toolbar.preventPopupHide=!0,void e.preventDefault();if(e.keyCode==d.LEFT||e.keyCode==d.RIGHT){t=o.getRange();var n=e.keyCode==d.LEFT,i=t[n?"startContainer":"endContainer"],a=t[n?"startOffset":"endOffset"],r=a+(n?-1:1),s=n?r:a;3==i.nodeType&&"\ufeff"==i.nodeValue[s]&&(t.setStart(i,r),t.collapse(!0),o.selectRange(t))}var l=o.toolbar.tools,u=o.keyboard.toolFromShortcut(l,e),c=u?l[u].options:{};if(u&&!c.keyPressCommand)return e.preventDefault(),/^(undo|redo)$/.test(u)||o.keyboard.endTyping(!0),o.trigger("keydown",e),o.exec(u),o._runPostContentKeyCommands(e),!1;o.keyboard.clearTimeout(),o.keyboard.keydown(e)},keypress:function(e){setTimeout((function(){o._runPostContentKeyCommands(e),o._showElementResizeHandles()}),0)},keyup:function(t){var n=[d.BACKSPACE,d.TAB,d.PAGEUP,d.PAGEDOWN,d.END,d.HOME,d.LEFT,d.UP,d.RIGHT,d.DOWN,d.INSERT,d.DELETE];(e.inArray(t.keyCode,n)>-1||65==t.keyCode&&t.ctrlKey&&!t.altKey&&!t.shiftKey)&&(window.clearTimeout(this._refreshInterval),this._refreshInterval=window.setTimeout((function(){o._selectionChange()}),200)),o.keyboard.keyup(t)},click:function(e){var t;"img"===n.ui.editor.Dom.name(e.target)&&((t=o.createRange()).selectNode(e.target),o.selectRange(t))},"cut copy paste drop dragover":function(e){o.clipboard["on"+e.type](e)},focusin:function(){o.body.hasAttribute("contenteditable")&&(e(this).addClass("k-active"),o.toolbar.show(),o._togglePlaceholder(!1))},focusout:function(){setTimeout((function(){var t=n._activeElement(),i=o.body,a=o.toolbar;if(a.options.popup){var r=a.window.element.get(0);r&&!e.contains(r,t)&&r!=t&&(a.preventPopupHide=!1)}t==i||e.contains(i,t)||a.focused()||a.preventPopupHide||(e(i).removeClass("k-active"),a.hide()),o._togglePlaceholder(!o.value().trim())}),10)}}),o._initializeColumnResizing(),o._initializeRowResizing(),o._initializeElementResizing()},_initializePlaceholder:function(){var t,n,i=this,a=i.options.placeholder;i.textarea&&a&&(t="<style id='placeholder'>.k-placeholder:before { content: '"+a+"'; }</style>",(n=e(i.document.head)).find("#placeholder").remove(),n.append(t),i._togglePlaceholder(!i.value().trim()))},_initializeImmutables:function(){var e=this,t=n.ui.editor;e.options.immutables&&(e.immutables=new t.Immutables(e))},_mousedown:function(t){var n=this;if(n._selectionStarted=!0,e(n.body).parents(".k-window").length&&t.stopPropagation(),!o.gecko){var i=e(t.target).closest("a[href]");(2==t.which||1==t.which&&t.ctrlKey)&&i&&i.is("a[href]")&&window.open(i.attr("href"),"_new"),t.target.tagName&&"html"===t.target.tagName.toLowerCase()&&setTimeout((function(){n.body.focus()}),0)}},_mouseup:function(t){var i=this;n.support.mobileOS.ios&&t&&e(t.target).is(c)||i._selectionStarted&&setTimeout((function(){i._selectionChange()}),1)},_runPostContentKeyCommands:function(e){for(var t=this.getRange(),n=this.keyboard.toolsFromShortcut(this.toolbar.tools,e),i=0;i<n.length;i++){var a=n[i],r=a.options;if(r.keyPressCommand)new r.command({range:t}).changesContent()&&(this.keyboard.endTyping(!0),this.exec(a.name))}},refresh:function(){var e=this;if(e.textarea){e._destroyResizings();var t=e.value();e.textarea.val(t),e.wrapper.find("iframe").remove(),e._initializeContentElement(e),e.value(t)}},events:["select","change","execute","error","paste","keydown","keyup"],options:{name:"Editor",messages:{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",mergeCellsHorizontally:"Merge cells horizontally",mergeCellsVertically:"Merge cells vertically",splitCellHorizontally:"Split cells horizontally",splitCellVertically:"Split cells vertically",tableAlignLeft:"Table Align Left",tableAlignCenter:"Table Align Center",tableAlignRight:"Table Align Right",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 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",print:"Print",headerRows:"Header Rows",headerColumns:"Header Cols",tableSummaryPlaceholder:"Summary attribute is not HTML5 compatible.",associateNone:"None",associateScope:"Associate using 'scope' attribute",associateIds:"Associate using Ids",copyFormat:"Copy format",applyFormat:"Apply format",borderNone:"None",undo:"Undo",redo:"Redo"},placeholder:"",formats:{},encoded:!0,domain:null,resizable:!1,deserialization:{custom:null},serialization:{entities:!0,semantic:!0,scripts:!1,optimizeTags:!1,keepEOL:!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"],g,["undo","redo"],v,k,_,b,w,["insertImage"],y)},destroy:function(){a.fn.destroy.call(this),this._endTyping(!0),this._deregisterHandlers(),clearTimeout(this._spellCorrectTimeout),this._focusOutside(),this.toolbar.destroy(),this._destroyUploadWidget(),this._destroyResizings(),n.destroy(this.wrapper)},_destroyResizings:function(){var e=this;e._destroyElementResizing(),n.ui.editor.ElementResizingFactory.current.dispose(e),e._destroyRowResizing(),n.ui.editor.RowResizing.dispose(e),e._destroyColumnResizing(),n.ui.editor.ColumnResizing.dispose(e)},_focusOutside:function(){n.support.browser.msie&&this.textarea&&e("<input style='position:fixed;left:1px;top:1px;width:1px;height:1px;font-size:0;border:0;opacity:0' />").appendTo(document.body).trigger("focus").trigger("blur").remove()},_destroyUploadWidget:function(){var e=this;e._uploadWidget&&(e._uploadWidget.destroy(),e._uploadWidget=null)},state:function(e){var t,i,a=x.defaultTools[e],r=a&&(a.options.finder||a.finder),o=n.ui.editor.RangeUtils;return!!r&&(t=this.getRange(),!(i=o.textNodes(t)).length&&t.collapsed&&(i=[t.startContainer]),r.getFormat?r.getFormat(i):r.isFormatted(i))},value:function(e){var i=this.body,a=n.ui.editor,r=this.options,o=a.Serializer.domToXhtml(i,r.serialization);if(e===t)return o;e!=o&&(a.Serializer.htmlToDom(e,i,r.deserialization),this.selectionRestorePoint=null,this.update(),this.toolbar.refreshTools())},saveSelection:function(t){var i=(t=t||this.getRange()).commonAncestorContainer,a=this.body;(i==a||e.contains(a,i))&&(this.selectionRestorePoint=new n.ui.editor.RestorePoint(t,a))},_focusBody:function(){var e,t=this.body,i=this.wrapper&&this.wrapper.find("iframe")[0],a=this.document.documentElement,r=n._activeElement();!i&&t.scrollHeight>t.clientHeight?(e=t.scrollTop,t.focus(),t.scrollTop=e):r!=t&&r!=i&&(e=a.scrollTop,t.focus(),a.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._togglePlaceholder(!e.trim())):this._oldValue=e},encodedValue:function(){return n.ui.editor.Dom.encode(this.value())},createRange:function(e){return n.ui.editor.RangeUtils.createRange(e||this.document)},getSelection:function(){return n.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=n.ui.editor.Dom,i=this.body;return e&&t.isAncestorOrSelf(i,e.startContainer)&&t.isAncestorOrSelf(i,e.endContainer)},_deleteSavedRange:function(){"_range"in this&&delete this._range},selectedHtml:function(){return n.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents())},paste:function(t,i){this.focus();var a=new n.ui.editor.InsertHtmlCommand(e.extend({range:this.getRange(),html:t},i));a.editor=this,a.exec()},exec:function(e,t){var n,i,a=this,r=null;if(!e)throw new Error("kendoEditor.exec(): `name` parameter cannot be empty");if("true"!==a.body.getAttribute("contenteditable")&&"print"!==e&&"pdf"!==e&&"exportAs"!==e)return!1;if(e=e.toLowerCase(),a.keyboard.isTypingInProgress()||(a._focusBody(),a.selectRange(a._range||a.getRange())),!(i=a.toolbar.toolById(e)))for(var o in x.defaultTools)if(o.toLowerCase()==e){i=x.defaultTools[o];break}if(i){if(n=a.getRange(),i.command&&(r=i.command(s({range:n,body:a.body,immutables:!!a.immutables},t))),a.trigger("execute",{name:e,command:r}))return;if(/^(undo|redo)$/i.test(e))a.undoRedoStack[e]();else if(r&&(a.execCommand(r),r.async))return void(r.change=a._selectionChange.bind(a));a._selectionChange()}},execCommand:function(e){e.managesUndoRedo||this.undoRedoStack.push(e),e.editor=this,e.exec()}});x.defaultTools={},n.ui.plugin(x);var C=i.extend({init:function(e){this.options=e},initialize:function(e,t){e.attr({unselectable:"on",title:t.title,"aria-label":t.title})},command:function(e){return new this.options.command(e)},update:e.noop});C.exec=function(e,t,n){e.exec(t,{value:n})};var T=C.extend({command:e.noop,update:function(e,t,n){switch(this.options.name){case"undo":e.attr("disabled",!n.canUndo());break;case"redo":e.attr("disabled",!n.canRedo())}}});f.registerTool("separator",new C({template:new h({template:f.separatorTemplate})})),f.registerTool("undo",new T({key:"Z",ctrl:!0,template:new h({template:f.buttonTemplate,title:"Undo"})})),f.registerTool("redo",new T({key:"Y",ctrl:!0,template:new h({template:f.buttonTemplate,title:"Redo"})}));var S="\ufeff",I=S;(o.msie||o.edge)&&(I=S="&nbsp;"),s(n.ui,{editor:{ToolTemplate:h,EditorUtils:f,Tool:C,emptyElementContent:S,emptyTableCellContent:I}}),n.PDFMixin&&(n.PDFMixin.extend(x.prototype),x.prototype._drawPDF=function(){return n.drawing.drawDOM(this.body,this.options.pdf)},x.prototype.saveAsPDF=function(){var t=new e.Deferred,i=t.promise(),a={promise:i};if(!this.trigger("pdfExport",a)){var r=this.options.pdf;return this._drawPDF(t).then((function(e){return n.drawing.exportPDF(e,r)})).done((function(e){n.saveAs({dataURI:e,fileName:r.fileName,proxyURL:r.proxyURL,proxyTarget:r.proxyTarget,forceProxy:r.forceProxy}),t.resolve()})).fail((function(e){t.reject(e)})),i}})}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.map,i=e.extend,a=t.support.browser,r="style",o="float",s="cssFloat",l="styleFloat",d="class",u="k-marker";function c(e){var t,n,i={};for(t=0,n=e.length;t<n;t++)i[e[t]]=!0;return i}var p=c("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")),h="p,div,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(","),f=h.concat(["ul","ol","li"]),m=c(f),g=c("area,base,br,col,command,embed,hr,img,input,keygen,link,menuitem,meta,param,source,track,wbr".split(",")),v="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(","),_=c(v),b=c("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")),k=["hgroup","ol","ul","dl","object","video","audio","table","colgroup","tbody","thead","tfoot","tr","select","optgroup"],w=function(e){1==e.nodeType&&e.normalize()};a.msie&&a.version>=8&&(w=function(e){if(1==e.nodeType&&e.firstChild){var t=e.firstChild,n=t;for(w(n);n=n.nextSibling;)w(n),3==n.nodeType&&3==t.nodeType&&(n.nodeValue=t.nodeValue+n.nodeValue,z.remove(t)),t=n}});var y,x=/^\s+$/,C=/^[\n\r\t]+$/,T=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,S=/\ufeff/g,I=/^(\s+|\ufeff)$/,D="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(","),E=/[<>\&]/g,A=/[\u00A0-\u2666<>\&]/g,F={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"},z={block:m,inline:_,findNodeIndex:function(e,t){var n=0;if(!e)return-1;for(;e=e.previousSibling;)t&&3==e.nodeType||n++;return n},isDataNode:function(e){return e&&null!==e.nodeValue&&null!==e.data},isAncestorOf:function(t,n){try{return!z.isDataNode(t)&&(e.contains(t,z.isDataNode(n)?n.parentNode:n)||n.parentNode==t)}catch(e){return!1}},isAncestorOrSelf:function(e,t){return z.isAncestorOf(e,t)||e==t},findClosestAncestor:function(e,t){if(z.isAncestorOf(e,t))for(;t&&t.parentNode!=e;)t=t.parentNode;return t},getAllComments:function(e){for(var t=[],n=document.createNodeIterator(e,NodeFilter.SHOW_COMMENT,(function(){return NodeFilter.FILTER_ACCEPT}),!1),i=n.nextNode();i;)t.push(i.nodeValue),i=n.nextNode();return t},getNodeLength:function(e){return z.isDataNode(e)?e.length:e.childNodes.length},splitDataNode:function(e,t){for(var n,i=e.cloneNode(!1),a="",r=e.nextSibling;r&&3==r.nodeType&&r.nodeValue;)a+=r.nodeValue,n=r,r=r.nextSibling,z.remove(n);e.deleteData(t,e.length),i.deleteData(0,t),i.nodeValue+=a,z.insertAfter(i,e)},attrEquals:function(e,n){for(var i in n){var a=e[i];if(i==o&&(a=e[t.support.cssFloat?s:l]),"object"==typeof a){if(!z.attrEquals(a,n[i]))return!1}else if(a!=n[i])return!1}return!0},blockParentOrBody:function(e){return z.parentOfType(e,f)||e.ownerDocument.body},blockParents:function(t){var n,i,a=[];for(n=0,i=t.length;n<i;n++){var r=z.parentOfType(t[n],z.blockElements);r&&e.inArray(r,a)<0&&a.push(r)}return a},windowFromDocument:function(e){return e.defaultView||e.parentWindow},normalize:w,blockElements:f,nonListBlockElements:h,inlineElements:v,empty:p,fillAttrs:b,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=T.exec(e);return t?"#"+n(t.slice(1),(function(e){return(e=parseInt(e,10).toString(16)).length>1?e:"0"+e})).join(""):e},encode:function(e,t){var n=!t||t.entities?A:E;return e.replace(n,(function(e){var t=e.charCodeAt(0),n=F[t];return n?"&"+n+";":e}))},isBom:function(e){return e&&3===e.nodeType&&/^[\ufeff]+$/.test(e.nodeValue)},stripBom:function(e){return(e||"").replace(S,"")},stripBomNode:function(e){z.isBom(e)&&e.parentNode.removeChild(e)},insignificant:function(e){var t=e.attributes;return"k-marker"==e.className||z.is(e,"br")&&("k-br"==e.className||t._moz_dirty||t._moz_editor_bogus_node)||z.is(e,"span")&&"k-br"==e.className},tableCell:function(e){return z.is(e,"td")||z.is(e,"th")},significantNodes:function(t){return e.grep(t,(function(e){var t=z.name(e);return"br"!=t&&(!z.insignificant(e)&&(!z.emptyTextNode(e)&&!(1==e.nodeType&&!p[t]&&z.emptyNode(e))))}))},emptyTextNode:function(e){return e&&3==e.nodeType&&I.test(e.nodeValue)},emptyNode:function(e){return 1==e.nodeType&&!z.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||!z.isWhitespace(e)}))},lastTextNode:function(e){var t=null;if(3==e.nodeType)return e;for(var n=e.lastChild;n;n=n.previousSibling)if(t=z.lastTextNode(n))return t;return t},is:function(e,t){return e&&z.name(e)==t},isMarker:function(e){return e.className==u},isWhitespace:function(e){return x.test(e.nodeValue)},allowsTextContent:function(e){var t=!0;return k.every((function(n){return!z.is(e,n)||(t=!1,!1)})),t},allWhitespaceContent:function(e){for(var t=e.firstChild;t&&z.isWhitespace(t);)t=t.nextSibling;return!t},isEmptyspace:function(e){return C.test(e.nodeValue)},htmlIndentSpace:function(t){if(!z.isDataNode(t)||!z.isWhitespace(t))return!1;if(C.test(t.nodeValue))return!0;var n=function(e,t){for(;e[t];)if(e=e[t],z.significantNodes([e]).length>0)return e},i=t.parentNode,a=n(t,"previousSibling"),r=n(t,"nextSibling");if(S.test(t.nodeValue))return!(!a&&!r);if(e(i).is("tr,tbody,thead,tfoot,table,ol,ul"))return!0;if(z.isBlock(i)||z.is(i,"body")){var o=a&&z.isBlock(a),s=r&&z.isBlock(r);if(!r&&o||!a&&s||o&&s)return!0}return!1},isBlock:function(e){return m[z.name(e)]},isSelfClosing:function(e){return g[z.name(e)]},isEmpty:function(e){return p[z.name(e)]},isInline:function(e){return _[z.name(e)]},isBr:function(e){return"br"==z.name(e)},list:function(e){var t=e?z.name(e):"";return"ul"==t||"ol"==t||"dl"==t},scrollContainer:function(e){var t=z.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,a,r,o,s=t.ownerDocument,l=z.windowFromDocument(s).innerHeight,d=z.scrollContainer(s);z.isDataNode(t)?n?(o=z.create(s,"span",{innerHTML:"&#xfeff;"}),z.insertBefore(o,t),i=e(o)):i=e(t.parentNode):i=e(t),a=i.offset().top,r=i[0].offsetHeight,!n&&r||(r=parseInt(i.css("line-height"),10)||Math.ceil(1.2*parseInt(i.css("font-size"),10))||15),o&&z.remove(o),r+a>d.scrollTop+l&&(d.scrollTop=r+a-l)},persistScrollTop:function(e){y=z.scrollContainer(e).scrollTop},offset:function(e,t){for(var n={top:e.offsetTop,left:e.offsetLeft},i=e.offsetParent;i&&(!t||z.isAncestorOf(t,i));)n.top+=i.offsetTop,n.left+=i.offsetLeft,i=i.offsetParent;return n},restoreScrollTop:function(e){"number"==typeof y&&(z.scrollContainer(e).scrollTop=y,y=void 0)},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){for(var t=e.childNodes.length-1;t>=0;t--){var n=e.childNodes[t];z.isDataNode(n)?z.stripBom(n.nodeValue).length||z.remove(n):n.className!=u&&(z.trim(n),(!z.isEmpty(n)&&0===n.childNodes.length||z.isBlock(n)&&z.allWhitespaceContent(n))&&z.remove(n))}return e},closest:function(e,t){for("string"==typeof t&&(t=[t]);e&&t.indexOf(z.name(e))<0;)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 z.sibling(e,"nextSibling")},prev:function(e){return z.sibling(e,"previousSibling")},parentOfType:function(e,t){do{e=e.parentNode}while(e&&!z.ofType(e,t));return e},ofType:function(t,n){return e.inArray(z.name(t),n)>=0},changeTag:function(e,t,n){var i,a,o,s,l,u=z.create(e.ownerDocument,t),c=e.attributes;if(!n)for(i=0,a=c.length;i<a;i++)(l=c[i]).specified&&(o=l.nodeName,s=l.nodeValue,o==d?u.className=s:o==r?u.style.cssText=e.style.cssText:u.setAttribute(o,s));for(;e.firstChild;)u.appendChild(e.firstChild);return z.insertBefore(u,e),z.remove(e),u},editableParent:function(e){for(;e&&(3==e.nodeType||"true"!==e.contentEditable);)e=e.parentNode;return e},wrap:function(e,t){return z.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=z.closestBy(t,(function(e){return e.parentNode&&z.significantNodes(e.parentNode.childNodes).length>1}));return e(n).is("body,.k-editor")?void 0:n},create:function(e,t,n){return z.attr(e.createElement(t),n)},createEmptyNode:function(e,t,n){var i=z.attr(e.createElement(t),n);return i.innerHTML="\ufeff",i},attr:function(e,t){for(var n in(t=i({},t))&&r in t&&(z.style(e,t.style),delete t.style),t)null===t[n]?(e.removeAttribute(n),delete t[n]):"className"==n&&(e[n]=t[n]);return i(e,t)},mergeAttributes:function(t,n,i){t.attributes.length&&e.each(t.attributes,(function(){"contenteditable"===this.name||i&&this.name===r||e(n).attr(this.name,this.value),i&&this.name===r&&e.each(t.style,(function(){n.style[this]=t.style[this]}))}))},style:function(t,n){e(t).css(n||{})},unstyle:function(e,n){for(var i in n)i==o&&(i=t.support.cssFloat?s:l),e.style[i]="";""===e.style.cssText&&e.removeAttribute(r)},inlineStyle:function(t,i,r){var o,s=e(z.create(t.ownerDocument,i,r));return t.appendChild(s[0]),o=n(D,(function(e){return a.msie&&"line-height"==e&&"1px"==s.css(e)?"line-height:1.5":e+":"+s.css(e)})).join(";"),s.remove(),o},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":z.getEffectiveBackground(e.parent())},innerText:function(e){var t=e.innerHTML;return t=(t=t.replace(/<!--(.|\s)*?-->/gi,"")).replace(/<\/?[^>]+?\/?>/gm,"")},removeClass:function(e,n){var i,a,r=" "+e.className+" ",o=n.split(" ");for(i=0,a=o.length;i<a;i++)r=r.replace(" "+o[i]+" "," ");(r=t.trim(r)).length?e.className=r:e.removeAttribute(d)},commonAncestor:function(){var e,t,n,i,a,r=arguments,o=arguments.length,s=[],l=1/0,d=null;if(!o)return null;if(1==o)return arguments[0];for(e=0;e<o;e++){for(t=[],n=r[e];n;)t.push(n),n=n.parentNode;s.push(t.reverse()),l=Math.min(l,t.length)}if(1==o)return s[0][0];for(e=0;e<l;e++){for(i=s[0][e],a=1;a<o;a++)if(i!=s[a][e])return d;d=i}return d},closestSplittableParent:function(t){var i;(i=1==t.length?z.parentOfType(t[0],["ul","ol"]):z.commonAncestor.apply(null,t))||(i=z.parentOfType(t[0],["p","td"])||t[0].ownerDocument.body),z.isInline(i)&&(i=z.blockParentOrBody(i));var a=n(t,z.editableParent),r=z.commonAncestor(a)[0];return e.contains(i,r)&&(i=r),i},closestEditable:function(t,n){var i,a=z.editableParent(t);return((i=z.ofType(t,n)?t:z.parentOfType(t,n))&&a&&e.contains(i,a)||!i&&a)&&(i=a),i},closestEditableOfType:function(t,n){var i=z.closestEditable(t,n);if(i&&z.ofType(i,n)&&!e(i).is(".k-editor"))return i},filter:function(e,t,n){return z.filterBy(t,(function(t){return z.name(t)==e}),n)},filterBy:function(e,t,n){for(var i,a=0,r=e.length,o=[];a<r;a++)((i=t(e[a]))&&!n||!i&&n)&&o.push(e[a]);return o},ensureTrailingBreaks:function(t){var n=e(t).find("p,td,th"),i=n.length,a=0;if(i)for(;a<i;a++)z.ensureTrailingBreak(n[a]);else z.ensureTrailingBreak(t)},removeTrailingBreak:function(t){e(t).find("br[type=_moz],.k-br").remove()},ensureTrailingBreak:function(e){z.removeTrailingBreak(e);var t,n=e.lastChild,i=n&&z.name(n);(!i||"br"!=i&&"img"!=i||"br"==i&&"k-br"!=n.className)&&((t=e.ownerDocument.createElement("br")).className="k-br",e.appendChild(t))},reMapTableColumns:function(e,t){z._mapColIndices(e,t)},clearTableMappings:function(t,n){e(t).find("["+n+"]").removeAttr(n)},_mapColIndices:function(e,t){for(var n={},i=0;i<e.rows.length;i++)for(var a=e.rows[i].cells,r=0,o=0;o<a.length;o++,r++){var s=a[o];if(s.rowSpan>1&&this._mapColspan(s,i,r,n),n[i])for(;n[i][r];)r++;s.setAttribute(t,r),s.colSpan>1&&(r=r+s.colSpan-1)}},_mapColspan:function(e,t,n,i){for(var a,r=e.rowSpan,o=e.colSpan,s=0;s<o;s++){a=n+s;for(var l=t+1;l<t+r;l++){if(i[l]||(i[l]={},i[l].length=0),i[t])for(;i[t][a];)a++;i[l][a]=!0,i[l].length++}}},associateWithIds:function(e){var t,n,i=this,a=0,r=e.rows,o=r.length,s=[],l=[];if(e.tHead)a=(t=e.tHead.rows).length;else for(a=i._getNumberOfHeaderRows(e),t=[],n=0;n<a;n++)t.push(r[n]);for(n=0;n<a;n++)s.push([]);for(n=0;n<o;n++)l.push([]);i._generateIdsForColumns(s,t),i._generateIdsForRows(s,l,a,r),i._assignIds(s,l,a,r)},_generateIdsForColumns:function(e,t){var n,i,a,r,o,s,l,d,u,c,p=(new Date).getTime(),h=t?t.length:0;for(l=0;l<h;l++)for(n=t[l].cells,a=0,d=0;d<n.length;d++){for(r="table"+l+d+ ++p,(i=n[d]).setAttribute("id",r),o=i.getAttribute("colspan")||1,s=i.getAttribute("rowspan")||1;e[l][d+a];)a+=1;for(u=0;u<s;u++)for(c=0;c<o;c++)e[l+u][d+a+c]=r}},_generateIdsForRows:function(t,n,i,a){var r,o,s,l,d,u,c,p,h,f,m,g,v,_=(new Date).getTime(),b=a.length,k=function(e){v.push(e[g])};for(p=i;p<b;p++)for(r=a[p],o=e(r.cells).filter("th"),l=0,h=0;h<o.length;h++){for(d="table"+p+h+ ++_,(s=o[h]).setAttribute("id",d),u=s.getAttribute("colspan")||1,c=s.getAttribute("rowspan")||1;n[p][h+l];)l+=1;for(f=0;f<c;f++)for(m=0;m<u;m++)n[p+f][h+l+m]=d;g=s.getAttribute("col-index"),v=[],t.forEach(k),v=v.filter(this._onlyUnique),s.setAttribute("headers",v.join(" ").trim())}},_assignIds:function(t,n,i,a){var r,o,s,l,d,u,c,p=a.length,h=function(e){c.push(e[u])};for(l=i;l<p;l++)for(r=a[l],o=e(r.cells).filter("td"),d=0;d<o.length;d++)s=o[d],u=s.getAttribute("col-index"),c=n[l].slice(),t.forEach(h),c=c.filter(this._onlyUnique),s.setAttribute("headers",c.join(" ").trim())},_getNumberOfColumns:function(t){var n,i,a,r=e(t).find("th, td"),o=0;for(i=0;i<r.length;i++)n=r[i],(a=Number(n.getAttribute("col-index"))+1)>o&&(o=a);return o},_getNumberOfHeaderColumns:function(e,t){var n,i,a,r,o,s=e.rows,l=0;for(a=t;a<s.length;a++)for(i=s[a],r=0;r<i.cells.length;r++)o=i.cells[r],this.is(o,"th")&&(n=Number(o.getAttribute("col-index"))+1)>l&&(l=n);return l},_getNumberOfHeaderRows:function(e){var t,n,i,a,r=e.rows,o=e.tHead&&e.tHead.rows?e.tHead.rows.length:0;if(0===o)for(a=(n=r[0]).cells&&n.cells.length;n&&a&&this.is(n.cells[0],"th");){for(t=0;t<a;t++)i=n?n.cells[t]:null,this.is(i,"th")||(n=null);n&&(o+=1,a=(n=this.next(n))&&n.cells&&n.cells.length)}return o},_onlyUnique:function(e,t,n){return n.indexOf(e)===t}};t.ui.editor.Dom=z}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.editor,a=i.Dom,r=e.extend,o="xx-small,x-small,small,medium,large,x-large,xx-large".split(","),s=/"/g,l=/<br[^>]*>/i,d=/^\d+(\.\d*)?(px)?$/i,u=/<p>(?:&nbsp;)?<\/p>/i,c=/(\*?[-#\/\*\\\w]+(?:\[[0-9a-z_-]+\])?)\s*:\s*((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)/g,p=/^sizzle-\d+/i,h=/^k-script-/i,f=/\s*onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i,m='<br class="k-br">',g="<span class='k-br'>\ufeff</span>",v=document.createElement("div");v.innerHTML=" <hr>";var _=3===v.firstChild.nodeType;v=null;var b=n.isFunction,k={toEditableHtml:function(e){return(e||"").replace(/<!\[CDATA\[(.*)?\]\]>/g,"\x3c!--[CDATA[$1]]--\x3e").replace(/<(\/?)script([^>]*)>/gi,"<$1k:script$2>").replace(/<img([^>]*)>/gi,(function(e){return e.replace(f,"")})).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi,"$1").replace(/^<(table|blockquote)/i,m+"<$1").replace(/^[\s]*(&nbsp;|\u00a0)/i,"$1").replace(/<\/(table|blockquote)>$/i,"</$1>"+m)},_toEditableImmutables:function(t){for(var n=i.Immutables.immutable,r=a.emptyTextNode,o=t.firstChild,s=t.lastChild;r(o);)o=o.nextSibling;for(;r(s);)s=s.previousSibling;o&&n(o)&&e(g).prependTo(t),s&&n(s)&&e(g).appendTo(t)},_fillEmptyElements:function(t){e(t).find("p,td").each((function(){var t=e(this);if(/^\s*$/g.test(t.text())&&!t.find("img,input").length){for(var i=this;i.children[0]&&3!=i.children[0].nodeType;)i=i.children[0];1!=i.nodeType||a.empty[a.name(i)]||(a.is(i,"td")?i.innerHTML=n.ui.editor.emptyTableCellContent:i.innerHTML=n.ui.editor.emptyElementContent)}}))},_removeSystemElements:function(t){e(".k-paste-container",t).remove()},_resetOrderedLists:function(e){var t,n,i,a=e.getElementsByTagName("ol");for(t=0;t<a.length;t++)i=(n=a[t]).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,a=this.attributes,r=[];for(t=0,n=a.length;t<n;t++)i=(e=a[t]).nodeName,e.specified&&/^on/i.test(i)&&(this.setAttribute("k-script-"+i,e.value),r.push(i));for(t=0,n=r.length;t<n;t++)this.removeAttribute(r[t])}))},htmlToDom:function(t,i,r){var o=n.support.browser.msie,s=r||{},l=s.immutables;return t=k.toEditableHtml(t),b(s.custom)&&(t=s.custom(t)||t),i.innerHTML=t,l&&l.deserialize(i),o&&(a.normalize(i),k._resetOrderedLists(i)),k._preventScriptExecution(i),k._fillEmptyElements(i),k._removeSystemElements(i),k._toEditableImmutables(i),e("table",i).addClass("k-table"),i},domToXhtml:function(r,f){var m=[],g=f&&f.immutables;function v(t){return e.grep(t,(function(e){return"style"!=e.name}))}function b(e,t){m.push("<"+t),x(e),m.push(">")}var k={iframe:{start:function(e){b(e,"iframe")},end:function(){m.push("</iframe>")}},"k:script":{start:function(e){b(e,"script")},end:function(){m.push("<\/script>")},skipEncoding:!0},span:{canOptimize:!0,semantic:!0,start:function(t){var n=t.style,i=v(y(t));i.length&&(m.push("<span"),x(t,i),m.push(">")),"underline"==n.textDecoration&&m.push("<u>");var r=[];if(n.color&&r.push('color="'+a.toHex(n.color)+'"'),n.fontFamily&&r.push('face="'+n.fontFamily+'"'),n.fontSize){var s=e.inArray(n.fontSize,o);r.push('size="'+s+'"')}for(var l=[],d=["text-decoration","color","font"],u=0;u<n.length;u++){var c=n[u];d.filter((function(e){return c.startsWith(e)})).length<=0&&l.push(c+": "+n[c])}l.length&&r.push('style="'+l.join(";")+'"'),r.length&&m.push("<font "+r.join(" ")+">")},end:function(e){var t=e.style;(t.color||t.fontFamily||t.fontSize)&&m.push("</font>"),"underline"==t.textDecoration&&m.push("</u>"),v(y(e)).length&&m.push("</span>")}},strong:{semantic:!0,start:function(e){b(e,"b")},end:function(){m.push("</b>")}},em:{semantic:!0,start:function(e){b(e,"i")},end:function(){m.push("</i>")}},b:{semantic:!1,start:function(e){b(e,"strong")},end:function(){m.push("</strong>")}},i:{semantic:!1,start:function(e){b(e,"em")},end:function(){m.push("</em>")}},u:{semantic:!1,start:function(t){m.push("<span");var n=y(t),i=e(n).filter((function(e,t){return"style"==t.name}))[0],a={nodeName:"style",value:"text-decoration:underline;"};i&&(a.value=i.value,/text-decoration/i.test(a.value)||(a.value="text-decoration:underline;"+a.value),n.splice(e.inArray(i,n),1)),n.push(a),x(t,n),m.push(">")},end:function(){m.push("</span>")}},font:{canOptimize:!0,semantic:!1,start:function(e){m.push('<span style="');var t=e.getAttribute("color"),n=o[e.getAttribute("size")],i=e.getAttribute("face");t&&(m.push("color:"),m.push(a.toHex(t)),m.push(";")),i&&(m.push("font-family:"),m.push(i),m.push(";")),n&&(m.push("font-size:"),m.push(n),m.push(";")),m.push('">')},end:function(){m.push("</span>")}}};function w(e){var t,i=function(e){var t,i,r,o=n.trim,l=o(e),d=[];for(c.lastIndex=0;t=c.exec(l);)i=o(t[1].toLowerCase()),r=o(t[2]),"font-size-adjust"!=i&&"font-stretch"!=i&&(i.indexOf("color")>=0?r=a.toHex(r):i.indexOf("font")>=0?r=r.replace(s,"'"):/\burl\(/g.test(r)&&(r=r.replace(s,"")),d.push({property:i,value:r}));return d}(e);for(t=0;t<i.length;t++)m.push(i[t].property),m.push(":"),m.push(i[t].value),m.push(";")}function y(e){var t,n,i,r,o,s,l=[],d=e.attributes;for(n=0,i=d.length;n<i;n++)r=(t=d[n]).nodeName,o=t.value,s=t.specified,"value"==r&&"value"in e&&e.value||"type"==r&&"text"==o?s=!0:"class"!=r||o?p.test(r)||"complete"==r||"altHtml"==r||"start"==r&&a.is(e,"ul")||"start"==r&&a.is(e,"ol")&&"1"==o||r.indexOf("_moz")>=0?s=!1:h.test(r)?s=!!f.scripts:"data-role"==r&&"resizable"==o&&(a.is(e,"tr")||a.is(e,"td"))&&(s=!1):s=!1,s&&l.push(t);return l}function x(i,r){var o,s,l,u,c;if(r=r||y(i),a.is(i,"img")){var p=i.style.width,f=i.style.height,g=e(i);p&&d.test(p)&&(g.attr("width",parseInt(p,10)),a.unstyle(i,{width:t})),f&&d.test(f)&&(g.attr("height",parseInt(f,10)),a.unstyle(i,{height:t}))}if(r.length)for(o=0,s=r.length;o<s;o++)u=(l=r[o]).nodeName,c=l.value,"class"==u&&"k-table"==c||(u=u.replace(h,""),m.push(" "),m.push(u),m.push('="'),"style"==u?w(c||i.style.cssText):"src"==u||"href"==u?m.push(n.htmlEncode(i.getAttribute(u,2))):m.push(a.fillAttrs[u]?u:c),m.push('"'))}function C(e,t,n){for(var i=e.firstChild;i;i=i.nextSibling)S(i,t,n)}function T(e){return e.nodeValue.replace(/\ufeff/g,"")}function S(t,n,r){var o,s,l,d,u,c,p=t.nodeType;if(g&&i.Immutables.immutable(t))m.push(g.serialize(t));else if(1==p){if(o=a.name(t),(c=e(t)).hasClass("k-element-resize-handle-wrapper")||c.hasClass("k-column-resize-handle-wrapper")||c.hasClass("k-row-resize-handle-wrapper"))return;if(!o||a.insignificant(t))return;if(!f.scripts&&("script"==o||"k:script"==o))return;if(s=k[o]){if(s.canOptimize&&f.optimizeTags&&function(e){return 0===e.attributes.length}(t))return void C(t,!1,s.skipEncoding);if(void 0===s.semantic||f.semantic^s.semantic)return s.start(t),C(t,!1,s.skipEncoding),void s.end(t)}m.push("<"),m.push(o),x(t),a.empty[o]?m.push(" />"):(m.push(">"),C(t,n||a.is(t,"pre")),m.push("</"),m.push(o),m.push(">"))}else if(3==p){if(function(e){if(a.isBom(e)){do{if(e=e.parentNode,a.is(e,"td")&&1===e.childNodes.length)return!0;if(1!==e.childNodes.length)return!1}while(!a.isBlock(e));return!0}return!1}(t))return void m.push("&nbsp;");d=T(t),!n&&_&&(l=t.parentNode,(u=t.previousSibling)||(u=(a.isInline(l)?l:t).previousSibling),u&&""!==u.innerHTML&&!a.isBlock(u)||(d=f.keepEOL?d.replace(/[\r\n\v\f\t ]+/," "):d.replace(/^[\r\n\v\f\t ]+/,"")),d=d.replace(/ +/," ")),m.push(r?d:a.encode(d,f))}else 4==p?(m.push("<![CDATA["),m.push(t.data),m.push("]]>")):8==p&&(t.data.indexOf("[CDATA[")<0?(m.push("\x3c!--"),m.push(t.data),m.push("--\x3e")):(m.push("<!"),m.push(t.data),m.push(">")))}function I(){n.isFunction(f.custom)&&(m=f.custom(m)||m)}return k.script=k["k:script"],void 0===(f=f||{}).semantic&&(f.semantic=!0),function(e){var t=e.childNodes.length;return t&&3==e.firstChild.nodeType&&(1==t||2==t&&a.insignificant(e.lastChild))}(r)?(m=a.encode(T(r.firstChild).replace(/[\r\n\v\f\t ]+/," "),f),I(),m):(C(r),m=m.join(""),I(),""===m.replace(l,"").replace(u,"")?"":m)}};r(i,{Serializer:k})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui.DropDownList,a=n.ui.editor.Dom,r=i.extend({init:function(e,t){var a=this;i.fn.init.call(a,e,t),n.support.mobileOS.ios&&(this._initSelectOverlay(),this.bind("dataBound",this._initSelectOverlay.bind(this))),a.text(a.options.title),a.element.attr("title",a.options.title),a.wrapper.attr("title",a.options.title),a.bind("open",(function(){if(a.options.autoSize){var e,t=a.list;t.css({whiteSpace:"nowrap",width:"auto"}),(e=t.width())>0?e+=20:e=a._listWidth,t.css("width",e+n.support.scrollbar()),a._listWidth=e}}))},options:{name:"SelectBox",index:-1,size:"medium",fillMode:"solid",rounded:"medium"},_initSelectOverlay:function(){for(var t,i=this,a=i.value(),r=this.dataSource.view(),o="",s=n.htmlEncode,l=0;l<r.length;l++)o+="<option value='"+s((t=r[l]).value)+"'",t.value==a&&(o+=" selected"),o+=">"+s(t.text)+"</option>";var d=e("<select class='k-select-overlay'>"+o+"</select>"),u=e(this.element).closest(".k-dropdownlist");u.next(".k-select-overlay").remove(),d.insertAfter(u),d.on("change",(function(){i.value(this.value),i.trigger("change")}))},value:function(e){var t=this,n=i.fn.value.call(t,e);if(undefined===e)return n;i.fn.value.call(t)||t.text(t.options.title)},decorate:function(t){var n,i,r,o,s=this.dataSource,l=s.data();for(t&&this.list.css("background-color",a.getEffectiveBackground(e(t))),n=0;n<l.length;n++)i=l[n].tag||"span",r=l[n].className,o=(o=a.inlineStyle(t,i,{className:r})).replace(/"/g,"'"),l[n].style=o+";display:inline-block";s.trigger("change")}});n.ui.plugin(r),n.ui.editor.SelectBox=r,n.cssProperties.registerPrefix("SelectBox","k-picker-"),n.cssProperties.registerValues("SelectBox",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,a=t.ui.editor,r=t.support.browser,o=a.Dom,s=o.findNodeIndex,l=o.isDataNode,d=o.findClosestAncestor,u=o.getNodeLength,c=o.normalize,p={selectionFromWindow:function(e){if(e)return"getSelection"in e?e.getSelection():new v(e.document)},selectionFromRange:function(e){var t=S.documentFromRange(e);return p.selectionFromDocument(t)},selectionFromDocument:function(e){return p.selectionFromWindow(o.windowFromDocument(e))}},h=n.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,m(this),f(this,!0)},setEnd:function(e,t){this.endContainer=e,this.endOffset=t,m(this),f(this,!1)},setStartBefore:function(e){this.setStart(e.parentNode,s(e))},setStartAfter:function(e){this.setStart(e.parentNode,s(e)+1)},setEndBefore:function(e){this.setEnd(e.parentNode,s(e))},setEndAfter:function(e){this.setEnd(e.parentNode,s(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(d(e.commonAncestorContainer,e.startContainer)),e.collapse(!0),function e(t){for(;t.next();)t.hasPartialSubtree()?e(t.getSubtreeIterator()):t.remove()}(new g(t))},cloneContents:function(){var e=S.documentFromRange(this);return function t(n){for(var i,a=e.createDocumentFragment();i=n.next();)i=i.cloneNode(!n.hasPartialSubtree()),n.hasPartialSubtree()&&i.appendChild(t(n.getSubtreeIterator())),a.appendChild(i);return a}(new g(this))},extractContents:function(){var e=this,t=e.cloneRange();e.startContainer!=e.commonAncestorContainer&&e.setStartAfter(d(e.commonAncestorContainer,e.startContainer)),e.collapse(!0);var n=S.documentFromRange(e);return function t(i){for(var a,r=n.createDocumentFragment();a=i.next();)i.hasPartialSubtree()?(a=a.cloneNode(!1)).appendChild(t(i.getSubtreeIterator())):i.remove(e.originalRange),r.appendChild(a);return r}(new g(t))},insertNode:function(e){var t=this;l(t.startContainer)?(t.startOffset!=t.startContainer.nodeValue.length&&o.splitDataNode(t.startContainer,t.startOffset),o.insertAfter(e,t.startContainer)):o.insertAt(t.startContainer,e,t.startOffset),t.setStart(t.startContainer,t.startOffset)},cloneRange:function(){return e.extend(new h(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,")"].join("")}});function f(e,t){(function(e){try{return function(e,t,n,i){if(e==t)return i-n;for(var a=t;a&&a.parentNode!=e;)a=a.parentNode;if(a)return s(a)-n;for(a=e;a&&a.parentNode!=t;)a=a.parentNode;if(a)return i-s(a)-1;for(var r=o.commonAncestor(e,t),l=e;l&&l.parentNode!=r;)l=l.parentNode;l||(l=r);for(var d=t;d&&d.parentNode!=r;)d=d.parentNode;return d||(d=r),l==d?0:s(d)-s(l)}(e.startContainer,e.endContainer,e.startOffset,e.endOffset)<0}catch(e){return!0}})(e)&&(t?(e.commonAncestorContainer=e.endContainer=e.startContainer,e.endOffset=e.startOffset):(e.commonAncestorContainer=e.startContainer=e.endContainer,e.startOffset=e.endOffset),e.collapsed=!0)}function m(e){e.collapsed=e.startContainer==e.endContainer&&e.startOffset==e.endOffset;for(var t=e.startContainer;t&&t!=e.endContainer&&!o.isAncestorOf(t,e.endContainer);)t=t.parentNode;e.commonAncestorContainer=t}h.fromNode=function(e){return new h(e.ownerDocument)};var g=n.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||l(t.startContainer)?d(n,t.startContainer):t.startContainer.childNodes[t.startOffset],this._end=t.endContainer!=n||l(t.endContainer)?d(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,l(e._current)&&(e.range.endContainer==e._current&&(t=t.cloneNode(!0)).deleteData(e.range.endOffset,t.length-e.range.endOffset),e.range.startContainer==e._current&&(t=t.cloneNode(!0)).deleteData(0,e.range.startOffset)),t},traverse:function(e){var t,n=this;for(;n._current=n._next,n._next=n._current&&n._current.nextSibling!=n._end?n._current.nextSibling:null,t=n._current;)n.hasPartialSubtree()?n.getSubtreeIterator().traverse(e):e(t);return t},remove:function(e){var t,n,i,a=this,r=a.range.startContainer==a._current,d=a.range.endContainer==a._current;if(l(a._current)&&(r||d))t=r?a.range.startOffset:0,i=(n=d?a.range.endOffset:a._current.length)-t,e&&(r||d)&&(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);else{var u=a._current.parentNode;if(e&&(a.range.startContainer==u||a.range.endContainer==u)){var c=s(a._current);u==e.startContainer&&c<=e.startOffset&&(e.startOffset-=1),u==e.endContainer&&c<e.endOffset&&(e.endOffset-=1)}o.remove(a._current)}},hasPartialSubtree:function(){return!l(this._current)&&(o.isAncestorOrSelf(this._current,this.range.startContainer)||o.isAncestorOrSelf(this._current,this.range.endContainer))},getSubtreeIterator:function(){return new g(this.getSubRange())},getSubRange:function(){var e=this,t=e.range.cloneRange();return t.selectNodeContents(e._current),o.isAncestorOrSelf(e._current,e.range.startContainer)&&t.setStart(e.range.startContainer,e.range.startOffset),o.isAncestorOrSelf(e._current,e.range.endContainer)&&t.setEnd(e.range.endContainer,e.range.endOffset),t}}),v=n.extend({init:function(e){this.ownerDocument=e,this.rangeCount=1},addRange:function(e){var t=this.ownerDocument.body.createTextRange();_(t,e,!1),_(t,e,!0),t.select()},removeAllRanges:function(){var e=this.ownerDocument.selection;"None"!=e.type&&e.empty()},getRangeAt:function(){var e,t,n=new h(this.ownerDocument),i=this.ownerDocument.selection;try{if(((e=i.createRange()).item?e.item(0):e.parentElement()).ownerDocument!=this.ownerDocument)return n}catch(e){return n}if("Control"==i.type)n.selectNode(e.item(0));else{t=function(e){var t=e.duplicate(),n=e.duplicate();return t.collapse(!0),n.collapse(!1),o.commonAncestor(e.parentElement(),t.parentElement(),n.parentElement())}(e),b(e,n,t,!0),b(e,n,t,!1),9==n.startContainer.nodeType&&n.setStart(n.endContainer,n.startOffset),9==n.endContainer.nodeType&&n.setEnd(n.startContainer,n.endOffset),0===e.compareEndPoints("StartToEnd",e)&&n.collapse(!1);var a=n.startContainer,r=n.endContainer,d=this.ownerDocument.body;if(!(n.collapsed||0!==n.startOffset||n.endOffset!=u(n.endContainer)||a==r&&l(a)&&a.parentNode==d)){for(var c=!1,p=!1;0===s(a)&&a==a.parentNode.firstChild&&a!=d;)a=a.parentNode,c=!0;for(;s(r)==u(r.parentNode)-1&&r==r.parentNode.lastChild&&r!=d;)r=r.parentNode,p=!0;a==d&&r==d&&c&&p&&(n.setStart(a,0),n.setEnd(r,u(d)))}}return n}});function _(e,t,n){var i,a=t[n?"startContainer":"endContainer"],r=t[n?"startOffset":"endOffset"],s=0,d=l(a),u=d?a:a.childNodes[r]||null,c=d?a.parentNode:a,p=t.ownerDocument,h=p.body.createTextRange();3!=a.nodeType&&4!=a.nodeType||(s=r),c||(c=p.body),"img"==c.nodeName.toLowerCase()?(h.moveToElementText(c),h.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",h)):(i=c.insertBefore(o.create(p,"a"),u),h.moveToElementText(i),o.remove(i),h[n?"moveStart":"moveEnd"]("character",s),h.collapse(!1),e.setEndPoint(n?"StartToStart":"EndToStart",h))}function b(e,t,n,i){var a,r,d,u,c,p,h,f=o.create(t.ownerDocument,"a"),m=e.duplicate(),g=i?"StartToStart":"StartToEnd",v=!1;f.innerHTML="\ufeff",m.collapse(i),r=m.parentElement(),o.isAncestorOrSelf(n,r)||(r=n);do{v?r.insertBefore(f,f.previousSibling):(r.appendChild(f),v=!0),m.moveToElementText(f)}while((a=m.compareEndPoints(g,e))>0&&f.previousSibling);d=f.nextSibling,-1==a&&l(d)?(m.setEndPoint(i?"EndToStart":"EndToEnd",e),o.remove(f),p=[d,m.text.length]):(u=!i&&f.previousSibling,c=i&&f.nextSibling,l(c)?p=[c,0]:l(u)?p=[u,u.length]:(h=s(f),p=r.nextSibling&&h==r.childNodes.length-1?[r.nextSibling,0]:[r,h]),o.remove(f)),t[i?"setStart":"setEnd"].apply(t,p)}var k=n.extend({init:function(e){this.enumerate=function(){var t=[];return new g(e).traverse((function e(n){if(o.is(n,"img")||3==n.nodeType&&(!o.isEmptyspace(n)||"\ufeff"==n.nodeValue))t.push(n);else for(n=n.firstChild;n;)e(n),n=n.nextSibling})),t}}}),w=g.extend({hasPartialSubtree:function(){var e=a.Immutables&&a.Immutables.immutable;return e&&!e(this._current)&&g.fn.hasPartialSubtree.call(this)},getSubtreeIterator:function(){return new w(this.getSubRange())}}),y=n.extend({init:function(e){this.enumerate=function(){var t=[],n=a.Immutables&&a.Immutables.immutable;return new w(e).traverse((function e(i){if(n&&!n(i))if(o.is(i,"img")||3==i.nodeType&&(!o.isEmptyspace(i)||"\ufeff"==i.nodeValue))t.push(i);else for(i=i.firstChild;i;)e(i),i=i.nextSibling})),t}}}),x=n.extend({init:function(e,t,n){var i=this;i.range=e,i.rootNode=S.documentFromRange(e),i.body=t||i.getEditable(e),"body"!=o.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=a.Immutables.removeImmutables(i.body)),i.html=i.body.innerHTML,i.immutables&&!i.serializedImmutables.empty&&a.Immutables.restoreImmutables(i.body,i.serializedImmutables)},index:function(e){for(var t=0,n=e.nodeType;e=e.previousSibling;){var i=e.nodeType;3==i&&n==i||t++,n=i}return t},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;o.removeChildren(e.body),e.body.innerHTML=e.html,e.immutables&&!e.serializedImmutables.empty&&a.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 a=this.rootNode,r=n.length,o=i;r--&&a;)a=a.childNodes[n[r]];for(;a&&3==a.nodeType&&a.nodeValue.length<o;)o-=a.nodeValue.length,a=a.nextSibling;a&&o>=0&&e[t?"setStart":"setEnd"](a,o)},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}}),C=n.extend({init:function(){this.caret=null},addCaret:function(e){var t=this.caret=o.create(S.documentFromRange(e),"span",{className:"k-marker"});return e.insertNode(t),o.stripBomNode(t.previousSibling),o.stripBomNode(t.nextSibling),e.selectNode(t),t},removeCaret:function(e){var t=this,n=t.caret.previousSibling,i=0;n&&(i=l(n)?n.nodeValue.length:s(n));var a=t.caret.parentNode,d=n?s(n):0;o.remove(t.caret),c(a);var u=a.childNodes[d];if(l(u))e.setStart(u,i);else if(u){var p=o.lastTextNode(u);p?e.setStart(p,p.nodeValue.length):e[n?"setStartAfter":"setStartBefore"](u)}else r.msie||a.innerHTML||(a.innerHTML='<br _moz_dirty="" />'),e.selectNodeContents(a);e.collapse(!0)},add:function(e,t){var n=this,i=e.collapsed&&!S.isExpandable(e),a=S.documentFromRange(e);t&&e.collapsed&&(n.addCaret(e),e=S.expand(e));var r=e.cloneRange();if(r.collapse(!1),n.end=o.create(a,"span",{className:"k-marker"}),r.insertNode(n.end),(r=e.cloneRange()).collapse(!0),n.start=n.end.cloneNode(!0),r.insertNode(n.start),n._removeDeadMarkers(n.start,n.end),i){var s=a.createTextNode("\ufeff");o.insertAfter(s.cloneNode(),n.start),o.insertBefore(s,n.end)}return c(e.commonAncestorContainer),e.setStartBefore(n.start),e.setEndAfter(n.end),e},_removeDeadMarkers:function(e,t){e.previousSibling&&"\ufeff"==e.previousSibling.nodeValue&&o.remove(e.previousSibling),t.nextSibling&&"\ufeff"==t.nextSibling.nodeValue&&o.remove(t.nextSibling)},_normalizedIndex:function(e){for(var t=s(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=this,a=i.start,r=i.end;for(c(e.commonAncestorContainer);!a.nextSibling&&a.parentNode;)a=a.parentNode;for(;!r.previousSibling&&r.parentNode;)r=r.parentNode;t=a.previousSibling&&3==a.previousSibling.nodeType&&a.nextSibling&&3==a.nextSibling.nodeType,n=r.previousSibling&&3==r.previousSibling.nodeType&&r.nextSibling&&3==r.nextSibling.nodeType;var s=(a=a.nextSibling)===(r=r.previousSibling)&&o.isBom(a);s&&a.length>1&&(a.nodeValue=a.nodeValue.charAt(0));var d=s,u=!1;if(a==i.end&&(u=!!i.start.previousSibling,a=r=i.start.previousSibling||i.end.nextSibling,d=!0),o.remove(i.start),o.remove(i.end),!a||!r)return e.selectNodeContents(e.commonAncestorContainer),void e.collapse(!0);var p=d?l(a)?a.nodeValue.length:a.childNodes.length:0,h=l(r)?r.nodeValue.length:r.childNodes.length;if(3==a.nodeType)for(;a.previousSibling&&3==a.previousSibling.nodeType;)p+=(a=a.previousSibling).nodeValue.length;if(3==r.nodeType)for(;r.previousSibling&&3==r.previousSibling.nodeType;)h+=(r=r.previousSibling).nodeValue.length;var f=a.parentNode,m=r.parentNode,g=this._normalizedIndex(a),v=this._normalizedIndex(r);c(f),3==a.nodeType&&(a=f.childNodes[g]),c(m),3==r.nodeType&&(r=m.childNodes[v]),d?(3==a.nodeType?e.setStart(a,p):e[u?"setStartAfter":"setStartBefore"](a),e.collapse(!0)):(3==a.nodeType?e.setStart(a,p):e.setStartBefore(a),3==r.nodeType?e.setEnd(r,h):e.setEndAfter(r)),i.caret&&i.removeCaret(e)}}),T=/[\u0009-\u000d]|\u0020|\u00a0|\ufeff|\.|,|;|:|!|\(|\)|\?/,S={nodes:function(e){var t=S.textNodes(e);return t.length||(e.selectNodeContents(e.commonAncestorContainer),(t=S.textNodes(e)).length||(t=o.significantChildNodes(e.commonAncestorContainer))),t},textNodes:function(e){return new k(e).enumerate().filter((function(e){return o.allowsTextContent(e.parentElement)}))},editableTextNodes:function(e){var t=a.Immutables&&a.Immutables.immutableParent,n=[];return t&&!t(e.commonAncestorContainer)&&(n=new y(e).enumerate().filter((function(e){return o.allowsTextContent(e.parentElement)}))),n},documentFromRange:function(e){var t=e.startContainer;return 9==t.nodeType?t:t.ownerDocument},createRange:function(e){return e.createRange()},selectRange:function(e){var t=S.image(e);t&&(e.setStartAfter(t),e.setEndAfter(t));var n=p.selectionFromRange(e);n.removeAllRanges(),n.addRange(e)},stringify:function(e){return t.format("{0}:{1} - {2}:{3}",o.name(e.startContainer),e.startOffset,o.name(e.endContainer),e.endOffset)},split:function(e,t,n){function i(i){var a=e.cloneRange();a.collapse(i),a[i?"setStartBefore":"setEndAfter"](t);var r=a.extractContents();n&&(r=o.trim(r)),o[i?"insertBefore":"insertAfter"](r,t)}i(!0),i(!1)},mapAll:function(t,n){var i=[];return new g(t).traverse((function(t){var a=n(t);a&&e.inArray(a,i)<0&&i.push(a)})),i},getAll:function(e,t){var n=t;return"string"==typeof t&&(t=function(e){return o.is(e,n)}),S.mapAll(e,(function(e){if(t(e))return e}))},getMarkers:function(e){return S.getAll(e,(function(e){return"k-marker"==e.className}))},image:function(e){var t=S.getAll(e,"img");if(1==t.length)return t[0]},isStartOf:function(e,t){if(0!==e.startOffset)return!1;for(var n=e.cloneRange();0===n.startOffset&&n.startContainer!=t;){for(var i=o.findNodeIndex(n.startContainer),a=n.startContainer.parentNode;i>0&&a[i-1]&&o.insignificant(a[i-1]);)i--;n.setStart(a,i)}return 0===n.startOffset&&n.startContainer==t},isEndOf:function(e,t){var n=e.cloneRange();n.collapse(!1);var i=n.startContainer;o.isDataNode(i)&&n.startOffset==o.getNodeLength(i)&&(n.setStart(i.parentNode,o.findNodeIndex(i)+1),n.collapse(!0)),n.setEnd(t,o.getNodeLength(t));var a=[];return new g(n).traverse((function(e){o.insignificant(e)||o.isDataNode(e)&&/^[\ufeff]*$/.test(e.nodeValue)||a.push(e)})),!a.length},wrapSelectedElements:function(e){for(var t=o.editableParent(e.startContainer),n=o.editableParent(e.endContainer);0===e.startOffset&&e.startContainer!=t;)e.setStart(e.startContainer.parentNode,o.findNodeIndex(e.startContainer));function i(e,t){var n=o.getNodeLength(t);if(e==n)return!0;for(var i=e;i<n;i++)if(!o.insignificant(t.childNodes[i]))return!1;return!0}for(;i(e.endOffset,e.endContainer)&&e.endContainer!=n;)e.setEnd(e.endContainer.parentNode,o.findNodeIndex(e.endContainer)+1);return e},expand:function(e){var t=e.cloneRange(),n=t.startContainer.childNodes[0===t.startOffset?0:t.startOffset-1],i=t.endContainer.childNodes[t.endOffset];if(!l(n)||!l(i))return t;var a=n.nodeValue,r=i.nodeValue;if(!a||!r)return t;var o=a.split("").reverse().join("").search(T),s=r.search(T);return o&&s?(s=-1==s?r.length:s,o=-1==o?0:a.length-o,t.setStart(n,o),t.setEnd(i,s),t):t},isExpandable:function(e){var t=e.startContainer,n=S.documentFromRange(e);if(t==n||t==n.body)return!1;var i=e.cloneRange(),a=t.nodeValue;if(!a)return!1;var r=a.substring(0,i.startOffset),o=a.substring(i.startOffset),s=0,l=0;return r&&(s=r.split("").reverse().join("").search(T)),o&&(l=o.search(T)),s&&l}};i(a,{SelectionUtils:p,W3CRange:h,RangeIterator:g,W3CSelection:v,RangeEnumerator:k,RestorePoint:x,Marker:C,RangeUtils:S})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.Class,a=n.ui.editor,r=a.Dom,o=n.template,s=a.RangeUtils,l=["ul","ol","tbody","thead","table"],d="k-immutable",u="[k-immutable]",c=function(t){return e(t).is("body,.k-editor")},p=function(e){return e.getAttribute&&"false"==e.getAttribute("contenteditable")},h=function(e){return r.closestBy(e,p,c)},f=function(e){return!!h(e.commonAncestorContainer)||!(!h(e.startContainer)&&!h(e.endContainer)||0!==s.editableTextNodes(e).length)},m=function(e){for(var t="",n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",i=e||10;i>0;--i)t+=n.charAt(Math.round(Math.random()*(n.length-1)));return t},g=function(e){var t=e?e.options:undefined;t&&t.finder&&t.finder._initOptions({immutables:!0})},v=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;g(n.justifyLeft),g(n.justifyCenter),g(n.justifyRight),g(n.justifyFull)},serialize:function(e){var t,n=this._toHtml(e);return-1===n.indexOf(d)?(t=this.randomId(),n=n.replace(/>/,' k-immutable="'+t+'">')):t=n.match(/k-immutable\s*=\s*['"](.*)['"]/)[1],this.serializedImmutables[t]=e,n},_toHtml:function(e){var t,n=this.options.serialization;switch(typeof n){case"string":return o(n)(e);case"function":return n(e);default:return"<"+(t=r.name(e))+"></"+t+">"}},deserialize:function(t){var i=this,a=this.options.deserialization;e(u,t).each((function(){var t=this.getAttribute(d),r=i.serializedImmutables[t];n.isFunction(a)&&a(this,r),e(this).replaceWith(r)})),i.serializedImmutables={}},randomId:function(e){return m(e)},keydown:function(e,t){var i,a,r=(i=e.keyCode,a=n.keys,i===a.BACKSPACE||i==a.DELETE);if(r&&this._cancelDeleting(e,t)||!r&&this._cancelTyping(e,t))return e.preventDefault(),!0},_cancelTyping:function(e,t){var n=this.editor.keyboard;return t.collapsed&&!n.typingInProgress&&n.isTypingKey(e)&&f(t)},_cancelDeleting:function(e,t){var i=n.keys,a=e.keyCode===i.BACKSPACE,o=e.keyCode==i.DELETE;if(!a&&!o)return!1;var s=!1;if(t.collapsed){if(f(t))return!0;var d=this.nextImmutable(t,o);if(d&&a){var u=r.closest(t.commonAncestorContainer,"li");if(u){var c=r.closest(d,"li");if(c&&c!==u)return s}}if(d&&!r.tableCell(d)){if(r.parentOfType(d,l)===r.parentOfType(t.commonAncestorContainer,l)){for(;d&&1==d.parentNode.childNodes.length;)d=d.parentNode;if(r.tableCell(d))return s;this._removeImmutable(d,t)}s=!0}}return s},nextImmutable:function(e,t){var n=e.commonAncestorContainer;if(r.isBom(n)||t&&s.isEndOf(e,n)||!t&&s.isStartOf(e,n)){var i=this._nextNode(n,t);if(i&&r.isBlock(i)&&!h(i))for(;i&&i.children&&i.children[t?0:i.children.length-1];)i=i.children[t?0:i.children.length-1];return h(i)}},_removeImmutable:function(e,t){var n=this.editor,i=new a.RestorePoint(t,n.body);r.remove(e),a._finishUpdate(n,i)},_nextNode:function(e,t){for(var n,i=t?"nextSibling":"previousSibling",a=e;a&&!n;)(n=a[i])&&r.isDataNode(n)&&/^\s|[\ufeff]$/.test(n.nodeValue)&&(n=(a=n)[i]),n||(a=a.parentNode);return n}});v.immutable=p,v.immutableParent=h,v.expandImmutablesIn=function(e){var t=h(e.startContainer),n=h(e.endContainer);(t||n)&&(t&&e.setStartBefore(t),n&&e.setEndAfter(n))},v.immutablesContext=f,v.toolsToBeUpdated=["bold","italic","underline","strikethrough","superscript","subscript","forecolor","backcolor","fontname","fontsize","createlink","unlink","autolink","addcolumnleft","addcolumnright","addrowabove","addrowbelow","deleterow","deletecolumn","mergecells","formatting","cleanformatting"],v.removeImmutables=function(t){var n,i,a,o={empty:!0};return e(t).find("[contenteditable='false']").each((function(t,s){n=r.name(s),i=m(),a="<"+n+" "+"k-immutable='"+i+"'></"+n+">",o[i]={node:s,style:e(s).attr("style")},o.empty=!1,e(s).replaceWith(a)})),o},v.restoreImmutables=function(t,n){var i,a;e(t).find(u).each((function(t,r){i=r.getAttribute(d),a=n[i],e(r).replaceWith(a.node),a.style!=e(a.node).attr("style")&&e(a.node).removeAttr("style").attr("style",a.style)}))},a.Immutables=v}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,a=i.Dom,r=i.RestorePoint,o=i.Marker,s=e.extend;var l=n.extend({init:function(e){this.options=e,this.restorePoint=new r(e.range,e.body,{immutables:e.immutables}),this.marker=new o,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(n,i){var a=this.editor;return e(n).appendTo(document.body).kendoWindow(s({},a.options.dialogOptions,i)).closest(".k-window").toggleClass("k-rtl",t.support.isRtl(a.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()&&(t.ui.editor.Immutables.expandImmutablesIn(e),this.restorePoint=new r(e,this.editor.body))}}),d=n.extend({init:function(e,t){this.body=e.body,this.startRestorePoint=e,this.endRestorePoint=t},redo:function(){a.removeChildren(this.body),this.body.innerHTML=this.endRestorePoint.html,this.editor.selectRange(this.endRestorePoint.toRange())},undo:function(){a.removeChildren(this.body),this.body.innerHTML=this.startRestorePoint.html,this.editor.selectRange(this.startRestorePoint.toRange())}});s(i,{_finishUpdate:function(e,t){var n=e.selectionRestorePoint=new r(e.getRange(),e.body),i=new d(t,n);return i.editor=e,e.undoRedoStack.push(i),e.toolbar.refreshTools(),n},Command:l,GenericCommand:d})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.ui,a=i.editor,r=i.Widget,o=e.extend,s=n.keys,l=".kendoEditor",d=a.EditorUtils,u=a.ToolTemplate,c=a.Tool,p=n._outerWidth,h=n._outerHeight,f="overflowAnchor",m=".k-tool-group:visible .k-tool:not(.k-disabled):not([disabled]),.k-tool.k-overflow-anchor:visible,.k-tool-group:visible .k-colorpicker:not(input),.k-tool-group:visible .k-selectbox,.k-tool-group:visible .k-dropdownlist,.k-tool-group:visible .k-combobox .k-input-inner",g={"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-list-roman-upper":"insertUpperRomanList","k-i-list-roman-lower":"insertLowerRomanList","k-i-import":"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-table-position-left":"tableAlignLeft","k-i-table-position-center":"tableAlignCenter","k-i-table-position-right":"tableAlignRight","k-i-clear-css":"cleanFormatting","k-i-cells-merge-horizontally":"mergeCellsHorizontally","k-i-cells-merge-vertically":"mergeCellsVertically","k-i-cell-split-horizontally":"splitCellHorizontally","k-i-cell-split-vertically":"splitCellVertically","k-i-copy-format":"copyFormat","k-i-apply-format":"applyFormat",".k-i-undo":"undo","k-i-redo":"redo"},v=c.extend({initialize:function(e,t){var n=t.editor.toolbar;e.attr("aria-controls",t.editor.element.attr("id")).on("click",function(){this.overflowPopup.toggle()}.bind(n))},options:{name:f},command:e.noop,update:e.noop,destroy:e.noop});d.registerTool(f,new v({key:"",ctrl:!0,template:new u({template:d.overflowAnchorTemplate})}));var _=r.extend({init:function(e,t){var i=this;t=o({},t,{name:"EditorToolbar"}),r.fn.init.call(i,e,t),t.popup&&i._initPopup(),t.resizable&&t.resizable.toolbar&&(i._resizeHandler=n.onResize((function(){i.resize(!0)})),i.element.addClass("k-toolbar-resizable"))},events:["execute"],groups:{basic:["bold","italic","underline","strikethrough"],undo:["undo","redo"],scripts:["subscript","superscript"],alignment:["justifyLeft","justifyCenter","justifyRight","justifyFull"],links:["insertImage","insertFile","createLink","unlink"],lists:["insertUnorderedList","insertOrderedList","insertUpperRomanList","insertLowerRomanList","indent","outdent"],tablesInsert:["createTable"],tablesAddDelete:["addColumnLeft","addColumnRight","addRowAbove","addRowBelow","deleteRow","deleteColumn"],tablesMerge:["mergeCellsHorizontally","mergeCellsVertically","splitCellHorizontally","splitCellVertically"],tablesPosition:["tableAlignLeft","tableAlignCenter","tableAlignRight"],advanced:["viewHtml","cleanFormatting","print","pdf","exportAs","import"],fonts:["fontName","fontSize"],colors:["foreColor","backColor"],formatPainter:["copyFormat","applyFormat"]},overflowFlaseTools:["formatting","fontName","fontSize","foreColor","backColor","insertHtml"],_initPopup:function(){var t=this;this.window=e(this.element).wrap("<div class='editorToolbarWindow' />").parent().prepend("<span class='k-editortoolbar-dragHandle'><span class='k-icon k-i-handler-drag'></span></span>").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",t).find(".k-tool:not(.k-disabled), .k-overflow-button").toggleClass("k-overflow-button",t)},_initOverflowPopup:function(t){var i=this;i.overflowPopup=e("<ul class='k-editor-overflow-popup k-overflow-container k-list-container'></ul>").appendTo("body").kendoPopup({anchor:t,origin:n.support.isRtl(i.element)?"bottom left":"bottom right",position:n.support.isRtl(i.element)?"top left":"top right",copyAnchorStyles:!1,open:function(e){this.element.is(":empty")&&e.preventDefault(),i._toggleOverflowStyles(this.element,!0),t.attr("aria-expanded",!0)},close:function(){t.attr("aria-expanded",!1)},activate:i.focusOverflowPopup.bind(i)}).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(){var t=n._activeElement(),i=this.window,a=this.overflowPopup;return i&&e(t).closest(i.wrapper).length||a&&a.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",n.resize.bind(n)),n._editor=t,n.options.resizable&&n.options.resizable.toolbar&&t.options.tools.push(f),n.tools=n.expandTools(t.options.tools),n.render(),n.element.find(".k-combobox .k-input-inner").on("keydown",(function(t){var n=e(this).closest(".k-combobox").data("kendoComboBox"),i=t.keyCode;i==s.RIGHT||i==s.LEFT?n.close():i==s.DOWN&&(n.dropDown.isOpened()||(t.stopImmediatePropagation(),n.open()))})),n._attachEvents(),n.items().each((function(){var i=n._toolName(this),a="moreVertical"!==i?n.tools[i]:n.tools.overflowAnchor,r=a&&a.options,o=t.options.messages,s=r&&r.tooltip||o[i],l=e(this);if(a&&a.initialize){if("fontSize"==i||"fontName"==i){var d=o[i+"Inherit"];l.find("input").val(d).end().find("span.k-input-inner").text(d).end()}a.initialize(l,{title:n._appendShortcutSequence(s,a),editor:n._editor}),l.closest(".k-dropdownlist",n.element).addClass("k-editor-widget"),l.closest(".k-combobox",n.element).addClass("k-editor-widget"),l.closest(".k-colorpicker",n.element).next(".k-colorpicker").addClass("k-editor-widget")}})),t.bind("select",n.resize.bind(n)),n.update(),i&&i.wrapper.css({top:"",left:"",width:""})},show:function(){var e,t,i,a=this,r=a.window,o=a.options.editor,s=n.support.browser;r&&(e=r.wrapper,t=o.element,e.is(":visible")&&a.window.options.visible||(e[0].style.width||e.width(this._getWindowWidth()),r._moved||(i=t.offset(),e.css({top:Math.max(0,parseInt(i.top,10)-h(e)-parseInt(a.window.element.css("padding-bottom"),10)),left:Math.max(0,parseInt(i.left,10))})),(s.msie||s.edge)&&a._overlaps(t)?setTimeout((function(){r.open()}),0):r.open()))},_getWindowWidth:function(){var e=this.window.wrapper,t=this.options.editor.element;return p(t)-parseInt(e.css("border-left-width"),10)-parseInt(e.css("border-right-width"),10)},_overlaps:function(e){var t=this.window.wrapper,n=t.offset(),i=n.left,a=n.top,r=e.offset(),o=r.left,s=r.top;return!(o+e.width()<i||o>i+t.width()||s+e.height()<a||s>a+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).trigger("focus").find(m).first().trigger("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(m).first().trigger("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 n.ui.Editor.defaultTools)},expandTools:function(t){var i,r,s,l,d=this._nativeTools,u=n.deepExtend({},n.ui.Editor.defaultTools),c={};for(r=0;r<t.length;r++)l=(i=t[r]).name,e.isPlainObject(i)?l&&u[l]?(c[l]=o({},u[l]),o(c[l].options,i)):((s=o({cssClass:"k-i-gear",type:"button",title:""},i)).name||(s.name="custom"),s.cssClass="k-"+s.name,s.template||"button"!=s.type||(s.template=a.EditorUtils.buttonTemplate,s.title=s.title||s.tooltip),c[l]={options:s}):u[i]&&(c[i]=u[i]);for(r=0;r<d.length;r++)c[d[r]]||(c[d[r]]=u[d[r]]);return c},render:function(){var t,i,a,r,o,s,l,d,u=this,c=u.tools,p=u._editor.element,h=u.element.empty(),m=u._editor.options.tools,g=0,v=u.options.resizable&&u.options.resizable.toolbar,_=this.overflowFlaseTools;function b(e){var i="";return e.getHtml?i=e.getHtml():(n.isFunction(e)||(e=n.template(e)),i=e(t)),n.trim(i)}function k(){l.children().length&&(v&&(l.data("position",g),g++),l.appendTo(h))}function w(t){t!==f?(l=e("<li class='k-tool-group' role='presentation' />")).data("overflow",-1===e.inArray(t,_)):l=e("<li class='k-overflow-tools' />")}for(h.empty(),m.length&&(r=m[0].name||m[0]),w(r),d=0;d<m.length;d++)r=m[d].name||m[d],!(t=c[r]&&c[r].options)&&e.isPlainObject(r)&&(t=r),i=t&&t.template,"break"==r&&(k(),e("<li class='k-row-break' role='presentation' />").appendTo(u.element),w(r)),i&&(o==(s=u.toolGroupFor(r))&&r!=f||(k(),w(r),o=s),r==f&&(i.options.title=u.options.messages.overflowAnchor),i=b(i),a=e(i).appendTo(l),"custom"==s&&(k(),w(r)),t.exec&&a.hasClass("k-tool")&&a.on("click",t.exec.bind(p[0])));k(),e(u.element).children(":has(> .k-tool)").not(".k-overflow-tools").addClass("k-button-group"),u.updateGroups(),v&&u._initOverflowPopup(u.element.find(".k-overflow-anchor")),u.angular("compile",(function(){return{elements:u.element}}))},updateGroups:function(){e(this.element).children().not(".k-overflow-tools").each((function(){e(this).children().removeClass("k-group-start 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(){r.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&&n.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 i=this,a="[role=button].k-tool",r=a+":not(.k-disabled), [role=button].k-i-import:not(.k-disabled)",o=a+".k-disabled",d=[a,".k-dropdownlist",".k-colorpicker"].join(",");t.off(l).on("mouseenter"+l,r,(function(){e(this).addClass("k-hover")})).on("mouseleave"+l,r,(function(){e(this).removeClass("k-hover")})).on("mousedown"+l,d,(function(e){e.preventDefault()})).on("keydown"+l,m,(function(t){var a,r,o,l=this,d=i.options.resizable&&i.options.resizable.toolbar,u=n.support.isRtl(i.element)?-1:1,c=t.keyCode;function p(e,t,n){var i=t.find(m),a=i.index(l)+e;return n&&(a=Math.max(0,Math.min(i.length-1,a))),i[a]}c==s.RIGHT||c==s.LEFT?r=e(l).is(".k-dropdownlist")?e(l):p(c==s.RIGHT?1*u:-1*u,i.element,!0):!d||c!=s.UP&&c!=s.DOWN?c==s.HOME?(r=i.element.find(m)[0],t.preventDefault()):c==s.END?(r=(a=i.element.find(m).filter((function(){return"hidden"!==e(this).css("visibility")})))[a.length-1],t.preventDefault()):c==s.ESC?(i.overflowPopup&&i.overflowPopup.visible()&&i.overflowPopup.close(),r=i._editor):c!=s.TAB||t.ctrlKey||t.altKey||(o=d&&e(l.parentElement).hasClass("k-overflow-tool-group")?i.overflowPopup.element:i.element,t.shiftKey?r=p(-1,o):(r=p(1,o))&&"hidden"!==e(r).closest(".k-overflow-tools").css("visibility")||(r=i._editor)):r=p(c==s.DOWN?1:-1,i.overflowPopup.element,!0),r&&(t.preventDefault(),r.focus()),c!==s.ENTER&&c!==s.SPACEBAR||!e(l).is("button")&&!e(l).is("a")||e(l).attr("href")||i._executeToolCommand(l,t)})).on("click"+l,r,(function(e){i._executeToolCommand(this,e)})).on("click"+l,o,(function(e){e.preventDefault()}))},_executeToolCommand:function(t,n){var i=e(t);n.preventDefault(),n.stopPropagation(),i.removeClass("k-hover"),i.is("[data-popup]")||this._editor.exec(this._toolName(t))},_toolName:function(t){if(t){var i=t.className;/k-tool\b/i.test(i)&&(i=t.firstChild.className);var a=e.grep(i.split(" "),(function(e){return!/^k-(widget|tool|tool-icon|icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e)}));if(a[0]){var r=a[0];return g[r]&&(r=g[r]),r.indexOf("k-i-")>=0?n.toCamelCase(r.substring(r.indexOf("k-i-")+4)):r.substring(r.lastIndexOf("-")+1)}return"custom"}},refreshTools:function(){var t=this,n=t._editor,i=n.getRange(),r=a.RangeUtils.textNodes(i),o=n.options.immutables,s=t._immutablesContext(i);(r=a.Dom.filterBy(r,a.Dom.htmlIndentSpace,!0)).length||(r=[i.startContainer]),t.items().each((function(){var i=t.tools[t._toolName(this)];if(i){var a=e(this);i.update&&i.update(a,r,n.undoRedoStack),o&&t._updateImmutablesState(i,a,s)}})),this.update()},_immutablesContext:function(e){if(this._editor.options.immutables)return e.collapsed?a.Immutables.immutablesContext(e):0===a.RangeUtils.editableTextNodes(e).length},_updateImmutablesState:function(t,n,i){var r=t.name,o=n,s=t.options.trackImmutables;if(undefined===s&&(s=e.inArray(r,a.Immutables.toolsToBeUpdated)>-1),s){var l=i?"none":"";if(!n.is(".k-tool")){var d=n.data();for(var u in d)if(u.match(/^kendo[A-Z][a-zA-Z]*/)){o=d[u].wrapper;break}}o.css("display",l);var c=o.closest("li");0===c.children(":visible").length&&c.css("display",l)}},update:function(){this.updateGroups()},_resize:function(e){var t=e.width,n=this.options.resizable&&this.options.resizable.toolbar,i=this.overflowPopup,a=this.options.editor.element,r=this.window;this.refreshTools(),n&&(r&&(r.wrapper.width(this._getWindowWidth()),r._moved||r.wrapper.css({left:Math.max(0,parseInt(a.offset().left,10))})),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",p(i,!0))}))},_shrink:function(e){var t,n;if(e<this._groupsWidth())for(var i=(n=this._visibleGroups().filter(":not(.k-overflow-tools)")).length-1;i>=0&&(t=n.eq(i),!(e>this._groupsWidth()));i--)this._hideGroup(t)},_stretch:function(e){var t,n;if(e>this._groupsWidth()){n=this._hiddenGroups();for(var 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"))).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.addClass("k-hidden")},_showGroup:function(t,n){var i,a,r;return!!t.hasClass("k-disabled")||(t.hasClass("k-overflow-tool-group")?r=t.data("outerWidth"):(t.removeClass("k-hidden"),r=p(t,!0),t.addClass("k-hidden")),!!(t.length&&n>this._groupsWidth()+r)&&(t.hasClass("k-overflow-tool-group")?(0===(i=t.data("position"))?t.detach().prependTo(this.element):(a=this.element.children().filter((function(t,n){return e(n).data("position")===i-1})),t.detach().insertAfter(a)),t.removeClass("k-overflow-tool-group")):t.removeClass("k-hidden"),!0))}});e.extend(a,{Toolbar:_})}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.EditorUtils,o=a.Command,s=a.Tool,l=a.ToolTemplate,d=a.Dom,u=o.extend({init:function(e){var t=this;t.options=e,o.fn.init.call(t,e),t.attributes=null,t.async=!0},exec:function(){var i,a,o=this,s=o.editor,l=s.options,c=s.options.messages,p=e(n.template(u.template)(c)).appendTo(document.body),h=".k-editor-textarea > textarea";function f(e){e.preventDefault(),p.data("kendoWindow").destroy(),s.immutables&&(s.immutables.serializedImmutables={}),s.focus()}l.serialization.immutables=s.immutables,a=d.getAllComments(s.body),i=r.cacheComments(s.value(),a),i=u.indent(i),i=r.retrieveComments(i,a),l.serialization.immutables=t,this.createDialog(p,{title:c.viewHtml,width:600,height:400,resizable:!0,close:f,visible:!1}).find(h).val(i).end().find(".k-dialog-update").on("click",(function(e){l.deserialization.immutables=s.immutables,s.value(p.find(h).val()),l.deserialization.immutables=t,f(e),o.change&&o.change(),s.trigger("change")})).end().find(".k-dialog-close").on("click",f).end().data("kendoWindow").center().open(),p.find(h).trigger("focus")}});i(u,{template:"<div class='k-editor-dialog k-popup-edit-form k-viewhtml-dialog'><span class='k-input k-textarea k-input-solid k-input-md k-rounded-md k-editor-textarea'><textarea class='k-input-inner !k-overflow-auto !k-resize-none'></textarea></span><div class='k-edit-buttons'><button class='k-dialog-update k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary'><span class='k-button-text'>#: dialogUpdate #</span></button><button class='k-dialog-close k-button k-button-md k-rounded-md k-button-solid k-button-solid-base'><span class='k-button-text'>#: dialogCancel #</span></button></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=u,a.EditorUtils.registerTool("viewHtml",new s({command:u,template:new l({template:r.buttonTemplate,title:"View HTML"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,a=i.Tool,r=i.Command,o=i.EditorUtils,s=r.extend({init:function(e){e.formatter=e.formatter();var t=e.formatter.finder;t&&o.formatByName("immutable",t.format)&&t._initOptions({immutables:e.immutables}),r.fn.init.call(this,e)}}),l=a.extend({init:function(e){a.fn.init.call(this,e)},command:function(e){return new s(n(e,{formatter:this.options.formatter}))},update:function(e,t){var n=this.options.finder.isFormatted(t);e.toggleClass("k-selected",n),e.attr("aria-pressed",n)}});e.extend(i,{FormatCommand:s,FormatTool:l})}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,a=t.ui.Editor.fn.options.formats,r=i.EditorUtils,o=i.Tool,s=i.ToolTemplate,l=i.FormatTool,d=i.Dom,u=i.RangeUtils,c=e.extend,p=i.EditorUtils.registerTool,h=i.EditorUtils.registerFormat,f="mousedown.kendoEditor",m="k-marker",g=n.extend({init:function(e){this.format=e},numberOfSiblings:function(e){var t,n=0,i=0,a=0,r=e.parentNode;for(t=r.firstChild;t;t=t.nextSibling)t!=e&&(t.className==m?a++:3==t.nodeType?n++:i++);return a>1&&r.firstChild.className==m&&r.lastChild.className==m?0:i+n},findSuitable:function(e,t){if(!t&&this.numberOfSiblings(e)>0)return null;for(var 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,a,r,o=this.format,s=d.attrEquals;for(t=0,n=o.length;t<n;t++){if(i=e,a=o[t].tags,r=o[t].attr,i&&d.ofType(i,a)&&s(i,r))return i;for(;i;)if((i=d.parentOfType(i,a))&&s(i,r))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}}),v=n.extend({init:function(e,t){this.finder=new g(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)(e);t.length>0&&this.activate(e,t)},immutables:function(){return this.editor&&this.editor.options.immutables},apply:function(e){var t,n,i,a,r=[];if(e.length>1)for(t=0,n=e.length;t<n;t++)i=e[t],a=this.format(i,!0),r.push(a);else i=e[0],a=this.format(i,!1);this.consolidate(r)},format:function(e,t){var n=this.finder.findSuitable(e),i=this.attributes,a=i&&i.style||{};if(n)d.is(n,"font")&&(a.color&&n.removeAttribute("color"),a.fontName&&n.removeAttribute("face"),a.fontSize&&n.removeAttribute("size")),d.attr(n,i);else{for(;!d.isBlock(e.parentNode)&&1==e.parentNode.childNodes.length&&"true"!==e.parentNode.contentEditable&&t;)e=e.parentNode;n=this.wrap(e)}return n},remove:function(e){var t,n,i;for(t=0,n=e.length;t<n;t++)(i=this.finder.findFormat(e[t]))&&(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),a=i.length;if(a>0)for(t=0;t<a;t++)(n=this.finder.findFormat(i[t]))&&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==m&&n.appendChild(t.previousSibling),t.tagName==n.tagName&&t.previousSibling==n&&t.style.cssText==n.style.cssText&&t.className===n.className){for(;t.firstChild;)n.appendChild(t.firstChild);d.remove(t)}}}),_=g.extend({init:function(e,t,n){this.format=e,this.greedyProperty=t,this.fontAttr=n,g.fn.init.call(this,e)},getInlineCssValue:function(e){var n,i,a,r,o,s,l,u,c,p,h,f,m=e.attributes,g=t.trim;if(m)for(n=0,i=m.length;n<i;n++){if(r=(a=m[n]).nodeName,o=a.nodeValue,a.specified&&"style"==r)for(u=0,c=(s=g(o||e.style.cssText).split(";")).length;u<c;u++)if((l=s[u]).length){if(h=g((p=l.split(":"))[0].toLowerCase()),f=g(p[1]),h!=this.greedyProperty)continue;return h.indexOf("color")>=0?d.toHex(f):f}if(this.fontAttr&&a.specified&&r==this.fontAttr)return h=a.nodeValue,f=a.nodeValue,h.indexOf("color")>=0?d.toHex(f):f}},getFormatInner:function(t){var n,i,a,r=e(d.isDataNode(t)?t.parentNode:t).parentsUntil("[contentEditable]").addBack().toArray().reverse();for(n=0,i=r.length;n<i;n++)if(a="className"==this.greedyProperty?r[n].className:this.getInlineCssValue(r[n]))return a;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)}}),b=v.extend({init:function(e,n,i){v.fn.init.call(this,e,n),this.values=n,this.finder=new _(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)}}),k=l.extend({init:function(e){l.fn.init.call(this,c(e,{finder:new g(e.format),formatter:function(){return new v(e.format)}}))}}),w=o.extend({update:function(e,t){var n=e.data(this.type);n.close(),n.value(this.finder.getFormat(t))}}),y=w.extend({init:function(e){o.fn.init.call(this,e),this.type=t.support.browser.msie||t.support.touch?"kendoDropDownList":"kendoComboBox",this.format=[{tags:["span","font"]}],this.finder=new _(this.format,e.cssAttr,e.fontAttr)},command:function(e){var t=this.options,n=this.format,a={};return new i.FormatCommand(c(e,{formatter:function(){return a[t.domAttr]=e.value,new b(n,{style:a},t.cssAttr)}}))},initialize:function(e,n){var i,a,r=n.editor,s=this.options,l=s.name,d=[];s.defaultValue&&(d=[{text:r.options.messages[s.defaultValue[0].text],value:s.defaultValue[0].value}]),i=d.concat(s.items?s.items:r.options[l]||[]),e.attr({title:n.title}),e[this.type]({dataTextField:"text",dataValueField:"value",dataSource:i,change:function(){r._range=a,o.exec(r,l,this.value())},close:function(){setTimeout((function(){r._deleteSavedRange()}),0)},highlightFirst:!1}),e.closest(".k-combobox").removeClass("k-"+l).find("*").addBack().attr("unselectable","on");var u=e.data(this.type);u.value("inherit"),u.wrapper.on(f,".k-select,.k-input-button,.k-input",(function(){var e=r.getRange();a=r._containsRange(e)?e:a})).on("keydown.kendoEditor",(function(e){e.keyCode===t.keys.ENTER&&(r._deleteSavedRange(),e.preventDefault())}))}}),x=o.extend({init:function(e){o.fn.init.call(this,e),this.format=[{tags:["span","font"]}],this.finder=new _(this.format,e.cssAttr)},options:{palette:"websafe",columns:18},update:function(){this._widget.close()},command:function(e){var t=this.options,n=this.format,a={};return new i.FormatCommand(c(e,{formatter:function(){return a[t.domAttr]=e.value,new b(n,{style:a},t.cssAttr)}}))},initialize:function(n,i){var a=this,s=i.editor,l=this.name,d=c({},x.fn.options,this.options),u=d.palette,p=d.columns;(n=this._widget=new t.ui.ColorPicker(n,{closeOnSelect:!0,views:["palette"],preview:!1,input:!1,buttons:!1,toolIcon:"k-icon k-i-"+r.getToolCssClass(d.name),palette:u,columns:p,change:function(){var e=n.value();t.support.browser.msie&&a.storedRange&&a._inputFocused&&s.selectRange(a.storedRange),e&&o.exec(s,l,e),delete a.storedRange,delete a._inputFocused,s.focus()},open:function(t){var n=t.sender;a.storedRange=s.getRange(),n._popup.element.on(f,(function(t){e(t.target).is("input.k-color-value")||t.preventDefault()})),n._popup.element.is("[unselectable='on']")||n._popup.element.attr({unselectable:"on"}).find("*:not(input)").attr("unselectable","on").end().find("input").on("focus",(function(){a._inputFocused=!0})),setTimeout((function(){n._popup.element.find(".k-colorpalette").trigger("focus")}))},close:function(e){e.sender._popup.element.off(f),t.support.browser.msie&&a.storedRange&&a._inputFocused&&s.selectRange(a.storedRange)},activate:function(e){e.preventDefault(),"rgba(255, 255, 255, 0)"!==e.sender._value.toCssRgba()&&n.trigger("change")}})).wrapper.attr({title:i.title,unselectable:"on"}).find("*:not(input)").attr("unselectable","on"),n.value("transparent")}});c(i,{InlineFormatFinder:g,InlineFormatter:v,DelayedExecutionTool:w,GreedyInlineFormatFinder:_,GreedyInlineFormatter:b,InlineFormatTool:k,FontTool:y,ColorTool:x}),h("bold",[{tags:["strong","b"]},{tags:["span"],attr:{style:{fontWeight:"bold"}}}]),p("bold",new k({key:"B",ctrl:!0,format:a.bold,template:new s({template:r.buttonTemplate,title:"Bold"})})),h("italic",[{tags:["em","i"]},{tags:["span"],attr:{style:{fontStyle:"italic"}}}]),p("italic",new k({key:"I",ctrl:!0,format:a.italic,template:new s({template:r.buttonTemplate,title:"Italic"})})),h("underline",[{tags:["span"],attr:{style:{textDecoration:"underline"}}},{tags:["u"]}]),p("underline",new k({key:"U",ctrl:!0,format:a.underline,template:new s({template:r.buttonTemplate,title:"Underline"})})),h("strikethrough",[{tags:["del","strike"]},{tags:["span"],attr:{style:{textDecoration:"line-through"}}}]),p("strikethrough",new k({format:a.strikethrough,template:new s({template:r.buttonTemplate,title:"Strikethrough"})})),h("superscript",[{tags:["sup"]}]),p("superscript",new k({format:a.superscript,template:new s({template:r.buttonTemplate,title:"Superscript"})})),h("subscript",[{tags:["sub"]}]),p("subscript",new k({format:a.subscript,template:new s({template:r.buttonTemplate,title:"Subscript"})})),p("foreColor",new x({cssAttr:"color",fontAttr:"color",domAttr:"color",name:"foreColor",template:new s({template:r.colorPickerTemplate,title:"Color"})})),p("backColor",new x({cssAttr:"background-color",domAttr:"backgroundColor",name:"backColor",template:new s({template:r.colorPickerTemplate,title:"Background Color"})})),p("fontName",new y({cssAttr:"font-family",fontAttr:"face",domAttr:"fontFamily",name:"fontName",defaultValue:[{text:"fontNameInherit",value:"inherit"}],template:new s({template:r.comboBoxTemplate,title:"Font Name"})})),p("fontSize",new y({cssAttr:"font-size",fontAttr:"size",domAttr:"fontSize",name:"fontSize",defaultValue:[{text:"fontSizeInherit",value:"inherit"}],template:new s({template:r.comboBoxTemplate,title:"Font Size"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.Class,a=e.extend,r=n.ui.editor,o=r.Dom,s=r.RangeUtils,l=r.EditorUtils,d=r.Command,u=r.Tool,c=r.ToolTemplate,p=r.InlineFormatter,h=r.InlineFormatFinder,f=s.textNodes,m=s.editableTextNodes,g=r.EditorUtils.registerTool,v=n.keys,_="http://",b=/^\w*:\/\//,k=/[\w\/\$\-_\*\?]/i,w=i.extend({findSuitable:function(e){return o.parentOfType(e,["a"])}}),y=i.extend({init:function(){this.finder=new w},apply:function(e,t){var n,i,a,r,l,d=this.immutables?m(e):f(e);if(t.innerText){i=s.documentFromRange(e),n=s.getMarkers(e),e.deleteContents(),r=o.create(i,"a",t),e.insertNode(r),l=r.parentNode,"a"==o.name(l)&&o.insertAfter(r,l),o.emptyNode(l)&&o.remove(l);for(var u=r,c=0;c<n.length;c++)o.insertAfter(n[c],u),u=n[c];n.length&&(o.insertBefore(i.createTextNode("\ufeff"),n[1]||n[0]),o.insertAfter(i.createTextNode("\ufeff"),n[1]||n[0]),e.setStartBefore(n[0]),e.setEndAfter(n[n.length-1]))}else(a=new p([{tags:["a"]}],t)).finder=this.finder,a.apply(d)}}),x=d.extend({init:function(e){var t=this;e.formatter={toggle:function(e){var n=t.immutables()?m(e):f(e);new p([{tags:["a"]}]).remove(n)}},this.options=e,d.fn.init.call(this,e)}}),C=d.extend({init:function(e){var t;this.options=e,d.fn.init.call(this,e),this.formatter=new y,e.url?this.exec=function(){this.formatter.immutables=t,this.formatter.apply(e.range,{href:e.url,innerText:e.text||e.url,target:e.target})}:(this.attributes=null,this.async=!0)},_dialogTemplate:function(){return n.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'><span class=\"k-textbox k-input k-input-md k-rounded-md k-input-solid\"><input type='text' class='k-input-inner' id='k-editor-link-url'></span></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'><span class=\"k-textbox k-input k-input-md k-rounded-md k-input-solid\"><input type='text' class='k-input-inner' id='k-editor-link-text'></span></div><div class='k-edit-label'><label for='k-editor-link-title'>#: messages.linkToolTip #</label></div><div class='k-edit-field'><span class=\"k-textbox k-input k-input-md k-rounded-md k-input-solid\"><input type='text' class='k-input-inner' id='k-editor-link-title'></span></div><div class='k-edit-label'></div><div class='k-edit-field'><input type='checkbox' class='k-checkbox k-checkbox-md k-rounded-md' id='k-editor-link-target'><label for='k-editor-link-target' class='k-checkbox-label'>#: messages.linkOpenInNewWindow #</label></div><div class='k-edit-buttons'><button class=\"k-dialog-insert k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary\"><span class=\"k-button-text\">#: messages.dialogInsert #</span></button><button class=\"k-dialog-close k-button k-button-md k-rounded-md k-button-solid k-button-solid-base\"><span class=\"k-button-text\">#: messages.dialogCancel #</span></button></div></div></div>")({messages:this.editor.options.messages})},exec:function(){var t=this.editor.options.messages;this._initialText="",this._range=this.lockRange(!0),this.formatter.immutables=this.immutables();var n=f(this._range),i=n.length?this.formatter.finder.findSuitable(n[0]):null,a=n.length&&"img"==o.name(n[0]),r=this.createDialog(this._dialogTemplate(),{title:t.createLink,close:this._close.bind(this),visible:!1});i&&(this._range.selectNodeContents(i),n=f(this._range)),this._initialText=this.linkText(n),r.find(".k-dialog-insert").on("click",this._apply.bind(this)).end().find(".k-dialog-close").on("click",this._close.bind(this)).end().find(".k-edit-field input").on("keydown",this._keydown.bind(this)).end().find("#k-editor-link-url").val(this.linkUrl(i)).end().find("#k-editor-link-text").val(this._initialText).end().find("#k-editor-link-title").val(i?i.title:"").end().find("#k-editor-link-target").attr("checked",!!i&&"_blank"==i.target).end().find(".k-editor-link-text-row").toggle(!a),this._dialog=r.data("kendoWindow").center().open(),e("#k-editor-link-url",r).trigger("focus").select()},_keydown:function(e){var t=n.keys;e.keyCode==t.ENTER?this._apply(e):e.keyCode==t.ESC&&this._close(e)},_apply:function(t){var i,a,r,s=this._dialog.element,l=e("#k-editor-link-url",s).val(),d=e("#k-editor-link-text",s);l&&l!=_&&(l.indexOf("@")>0&&!/^(\w+:)|(\/\/)/i.test(l)&&(l="mailto:"+l),this.attributes={href:l},(i=e("#k-editor-link-title",s).val())&&(this.attributes.title=i),d.is(":visible")&&((a=n.trim(d.val()))||this._initialText?a&&a!==this._initialText&&(this.attributes.innerText=o.stripBom(a)):this.attributes.innerText=l),r=e("#k-editor-link-target",s).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(),o.windowFromDocument(s.documentFromRange(this._range)).focus(),this.releaseRange(this._range)},linkUrl:function(e){return e?e.getAttribute("href",2):_},linkText:function(e){var t,n="";for(t=0;t<e.length;t++)n+=e[t].nodeValue;return o.stripBom(n||"")},redo:function(){var e=this.lockRange(!0);this.formatter.apply(e,this.attributes),this.releaseRange(e)}}),T=d.extend({init:function(e){d.fn.init.call(this,e),this.formatter=new y},exec:function(){var e=this.detectLink();if(e){var t=this.getRange(),i=new n.ui.editor.Marker,a=t.cloneRange();a.setStart(e.start.node,e.start.offset),a.setEnd(e.end.node,e.end.offset),t=this.lockRange(),i.add(a),this.formatter.apply(a,{href:this._ensureWebProtocol(e.text)}),i.remove(a),this.releaseRange(t)}},detectLink:function(){var e=this.getRange(),t=e.startContainer,n=e.startOffset;!t.previousSibling&&(o.isBom(t)&&!t.nextSibling||!n&&o.isDataNode(t))&&(t=t.parentNode,n=0);var i=new F({node:t,offset:n,cancelAtNode:function(e){return e&&"a"===o.name(e)}});return new I(i).detectLink()},changesContent:function(){return!!this.detectLink()},_ensureWebProtocol:function(e){return this._hasProtocolPrefix(e)?e:this._prefixWithWebProtocol(e)},_hasProtocolPrefix:function(e){return b.test(e)},_prefixWithWebProtocol:function(e){return _+e}}),S=u.extend({init:function(t){this.options=t,this.finder=new h([{tags:["a"]}]),u.fn.init.call(this,e.extend(t,{command:x}))},initialize:function(e,t){u.fn.initialize.call(this,e,t),e.addClass("k-disabled")},update:function(e,t){e.toggleClass("k-disabled",!this.finder.isFormatted(t)).removeClass("k-hover")}}),I=i.extend({init:function(e){this.traverser=e,this.start=E(),this.end=E(),this.text=""},detectLink:function(){var e=this.traverser.node,t=this.traverser.offset;if(o.isDataNode(e)){var n=e.data.substring(0,t);if(/\s{2}$/.test(o.stripBom(n)))return}else if(0===t){var i=o.closestEditableOfType(e,o.blockElements);i&&i.previousSibling&&this.traverser.init({node:i.previousSibling})}if(this.traverser.traverse(this._detectEnd.bind(this)),!this.end.blank()&&(this.traverser=this.traverser.clone(this.end),this.traverser.traverse(this._detectStart.bind(this)),!this._isLinkDetected())){var a=this.traverser.extendOptions(this.start);new z(a).traverse(this._skipStartPuntuation.bind(this)),this._isLinkDetected()||(this.start=E())}return this.start.blank()?null:{start:this.start,end:this.end,text:this.text}},_isLinkDetected:function(){return b.test(this.text)||/^w{3}\./i.test(this.text)},_detectEnd:function(e,t){var n=D(e,k);if(n>-1)return this.end.node=t,this.end.offset=n+1,!1},_detectStart:function(e,t){var n=D(e,/\s/),i=n+1;if(this.text=e.substring(i)+this.text,this.start.node=t,this.start.offset=i,n>-1)return!1},_skipStartPuntuation:function(e,t,n){var i,a=(i=/\w/.exec(e))?i.index:-1,r=a;if(-1===a&&(r=e.length),this.text=this.text.substring(r),this.start.node=t,this.start.offset=r+(0|n),a>-1)return!1}});function D(e,t){for(var n=e.length;n--&&!t.test(e[n]););return n}var E=function(){return{node:null,offset:null,blank:function(){return null===this.node&&null===this.offset}}},A=i.extend({init:function(n){this.node=n.node,this.offset=n.offset===t?o.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){if(n&&!this.cancel){if(3!==n.nodeType){var a=this.edgeNode(n);return this.cancel=this.cancel||this.cancelAtNode(a),this._traverse(e,a)}var r=n.data;i!==t&&(r=this.subText(r,i)),this.cancel=!1===e(r,n,i);var s=this.next(n);if(!s)for(var l=n.parentNode;!s&&o.isInline(l);)s=this.next(l),l=l.parentNode;this.cancel=this.cancel||this.cancelAtNode(s),this._traverse(e,s)}},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){}}),F=A.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 F(t)}}),z=A.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(n.ui.editor,{LinkFormatFinder:w,LinkFormatter:y,UnlinkCommand:x,LinkCommand:C,AutoLinkCommand:T,UnlinkTool:S,DomTextLinkDetection:I,LeftDomTextTraverser:F,RightDomTextTraverser:z}),g("createLink",new u({key:"K",ctrl:!0,command:C,template:new c({template:l.buttonTemplate,title:"Create Link"})})),g("unlink",new S({key:"K",ctrl:!0,shift:!0,template:new c({template:l.buttonTemplate,title:"Remove Link"})})),g("autoLink",new u({key:[v.ENTER,v.SPACEBAR],keyPressCommand:!0,command:T}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,a=t.ui.editor,r=t.ui.Editor.fn.options.formats,o=a.Dom,s=a.ToolTemplate,l=a.FormatTool,d=a.EditorUtils,u=d.registerTool,c=d.registerFormat,p=a.RangeUtils,h=n.extend({init:function(e){this.format=e},contains:function(e,t){var n,i,a;for(n=0,i=t.length;n<i;n++)if(!(a=t[n])||!o.isAncestorOrSelf(e,a))return!1;return!0},findSuitable:function(t){var n,i,a,r=this.format,s=[];for(n=0,i=t.length;n<i;n++){for(var l=r.length-1;l>=0&&!(a=o.ofType(t[n],r[l].tags)?t[n]:o.closestEditableOfType(t[n],r[l].tags));l--);if(!a||"true"===a.contentEditable)return[];e.inArray(a,s)<0&&s.push(a)}for(this._resolveListsItems(s),n=0,i=s.length;n<i;n++)if(this.contains(s[n],s))return[s[n]];return s},_resolveListsItems:function(e){var t,n,i;for(t=0;t<e.length;t++)n=e[t],i=(i=o.is(n,"li")?n:o.wrapper(n))&&o.list(i)?i.children[0]:i,o.is(i,"li")&&(n=e[t]=i)},findFormat:function(e,t){var n,i,r,s,l,d=this.format,u=o.editableParent(e),c=this.options&&this.options.immutables,p=a.Immutables;for(n=0,i=d.length;n<i;n++){if(r=e,s=d[n].tags,l=d[n].attr,c&&s&&"immutable"==s[0]){var h=p.immutableParent(r);if(h&&o.attrEquals(h,l))return r}for(;r&&o.isAncestorOf(u,r);){if(o.ofType(r,s)&&o.attrEquals(r,l))return r;if(t&&t(r))break;r=r.parentNode}}return null},getFormat:function(e){var t,n,i=this,a=function(e){return i.findFormat(o.isDataNode(e)?e.parentNode:e)},r=a(e[0]);if(!r)return"";for(t=1,n=e.length;t<n;t++)if(r!=a(e[t]))return"";return r.nodeName.toLowerCase()},isFormatted:function(e,t){for(var n=0,i=e.length;n<i;n++)if(!this.findFormat(e[n],t))return!1;return!0}}),f=n.extend({init:function(e,t){this.format=e,this.values=t,this.finder=new h(e)},wrap:function(e,t,n){var i=1==n.length?o.blockParentOrBody(n[0]):o.commonAncestor.apply(null,n);o.isInline(i)&&(i=o.blockParentOrBody(i));var a,r,s=o.significantChildNodes(i),l=o.findNodeIndex(s[0]),d=o.create(i.ownerDocument,e,t);for(a=0;a<s.length;a++)r=s[a],o.isBlock(r)?(o.attr(r,t),d.childNodes.length&&(o.insertBefore(d,r),d=d.cloneNode(!1)),l=o.findNodeIndex(r)+1):d.appendChild(r);d.firstChild&&o.insertAt(i,d,l)},apply:function(t){var n,a=this.values;function r(e){return i({},e&&e.attr,a)}this._handleImmutables(t,!0);var s=o.filter("img",t),l=r(d.formatByName("img",this.format));if(e.each(s,(function(){o.attr(this,l)})),s.length!=t.length){var u=o.filter("img",t,!0),c=this.finder.findSuitable(u);if(c.length)for(var p=0,h=c.length;p<h;p++)n=d.formatByName(o.name(c[p]),this.format),o.attr(c[p],r(n));else n=this.format[0],this.wrap(n.tags[0],r(n),u)}},_handleImmutables:function(e,t){if(this.immutables()){var n=d.formatByName("immutable",this.format);if(n)for(var i=a.Immutables,r=e.length-1;r>=0;r--){var s=i.immutableParent(e[r]);s&&(s!==e[r+1]&&(t?o.attr(s,n.attr):o.unstyle(s,n.attr.style)),e.splice(r,1))}}},immutables:function(){return this.editor&&this.editor.options.immutables},remove:function(e){var t,n,i,a,r;for(this._handleImmutables(e,!1),t=0,n=e.length;t<n;t++)(i=this.finder.findFormat(e[t]))&&(r=o.name(i),(a=d.formatByName(r,this.format)).attr.style&&o.unstyle(i,a.attr.style),a.attr.className&&o.removeClass(i,a.attr.className))},toggle:function(e){var t=this,n=o.filterBy(p.nodes(e),o.htmlIndentSpace,!0);t.finder.isFormatted(n)?t.remove(n):t.apply(n)}}),m=n.extend({init:function(e,t){var n=this;n.format=e,n.values=t,n.finder=new h(e)},apply:function(e){var t,n,i,r,s,l,d,u,c=this.format,p=o.blockParents(e),h=c[0].tags[0];if(p.length)for(t=0,n=p.length;t<n;t++)u=p[t],this.immutables()&&a.Immutables.immutableParent(u)||("li"==(d=o.name(u))?(i=u.parentNode,r=new a.ListFormatter(i.nodeName.toLowerCase(),h),(s=this.editor.createRange()).selectNode(p[t]),r.toggle(s)):h&&("td"==d||u.attributes.contentEditable)?new f(c,this.values).apply(u.childNodes):(l=o.changeTag(u,h),o.attr(l,c[0].attr)));else{var m=new f(c,this.values);m.editor=this.editor,m.apply(e)}},toggle:function(e){var t=p.textNodes(e);t.length||(e.selectNodeContents(e.commonAncestorContainer),(t=p.textNodes(e)).length||(t=o.significantChildNodes(e.commonAncestorContainer))),this.apply(t)},immutables:function(){return this.editor&&this.editor.options.immutables}}),g=l.extend({init:function(e){l.fn.init.call(this,i(e,{finder:new h(e.format),formatter:function(){return new f(e.format)}}))}});i(a,{BlockFormatFinder:h,BlockFormatter:f,GreedyBlockFormatter:m,BlockFormatTool:g});var v=["ul","ol","li"];c("justifyLeft",[{tags:o.nonListBlockElements,attr:{style:{textAlign:"left"}}},{tags:["img"],attr:{style:{float:"left",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{float:"left",display:"",marginLeft:"",marginRight:""}}},{tags:v,attr:{style:{textAlign:"left",listStylePosition:""}}}]),u("justifyLeft",new g({format:r.justifyLeft,template:new s({template:d.buttonTemplate,title:"Justify Left"})})),c("justifyCenter",[{tags:o.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:v,attr:{style:{textAlign:"center",listStylePosition:"inside"}}}]),u("justifyCenter",new g({format:r.justifyCenter,template:new s({template:d.buttonTemplate,title:"Justify Center"})})),c("justifyRight",[{tags:o.nonListBlockElements,attr:{style:{textAlign:"right"}}},{tags:["img"],attr:{style:{float:"right",display:"",marginLeft:"",marginRight:""}}},{tags:["immutable"],attr:{style:{float:"right",display:"",marginLeft:"",marginRight:""}}},{tags:v,attr:{style:{textAlign:"right",listStylePosition:"inside"}}}]),u("justifyRight",new g({format:r.justifyRight,template:new s({template:d.buttonTemplate,title:"Justify Right"})})),c("justifyFull",[{tags:o.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:v,attr:{style:{textAlign:"justify",listStylePosition:""}}}]),u("justifyFull",new g({format:r.justifyFull,template:new s({template:d.buttonTemplate,title:"Justify Full"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=e.extend,a=t.ui.editor,r=a.Dom,o=a.RangeUtils,s=a.EditorUtils,l=a.Command,d=a.ToolTemplate,u=a.FormatTool,c=a.BlockFormatFinder,p=o.textNodes,h=a.EditorUtils.registerTool,f=c.extend({init:function(e){this.tag=e.tag,this.attr=e.attr,this.altAttr=e.altAttr;var t=this.tags=["ul"==this.tag?"ol":"ul",this.tag],n=[{tags:t,attr:this.attr}];this.altAttr&&n.push({tags:t,attr:this.altAttr}),c.fn.init.call(this,n)},matchesType:function(e){return r.attrEquals(e,this.attr)||this.altAttr&&r.attrEquals(e,this.altAttr)},isList:function(e){return r.list(e)},isFormatted:function(e){var t,n,i=[];for(n=0;n<e.length;n++)(t=this.findFormat(e[n],this.isList))&&r.name(t)==this.tag&&this.matchesType(t)&&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],this.isList);return t&&r.name(t)==this.tag?t:null}}),m=n.extend({init:function(t,n){var i=this;t=e.isPlainObject(t)?t:{tag:t,attr:null},i.tag=t.tag,i.attr=t.attr,i.finder=new f(t),i.unwrapTag=n},isList:function(e){return r.list(e)},immutables:function(){return this.editor&&!!this.editor.options.immutables},wrap:function(t,n){var i,o,s=r.create(t.ownerDocument,"li"),l=this.immutables()?a.Immutables.immutable:e.noop;for(i=0;i<n.length;i++)if(o=n[i],r.is(o,"li"))t.appendChild(o);else if(this.isList(o))for(;o.firstChild;)t.appendChild(o.firstChild);else if(r.is(o,"td")){for(;o.firstChild;)s.appendChild(o.firstChild);t.appendChild(s),o.appendChild(t),t=t.cloneNode(!1),s=s.cloneNode(!1)}else s.appendChild(o),r.isBlock(o)&&(t.appendChild(s),l(o)||r.unwrap(o),s=s.cloneNode(!1));s.firstChild&&t.appendChild(s)},containsAny:function(e,t){for(var n=0;n<t.length;n++)if(r.isAncestorOrSelf(e,t[n]))return!0;return!1},suitable:function(e,t){if("k-marker"==e.className){var n=e.nextSibling;if(n&&r.isBlock(n))return!1;if((n=e.previousSibling)&&r.isBlock(n))return!1}return this.containsAny(e,t)||r.isInline(e)||3==e.nodeType},_parentLists:function(t){var n=r.closestEditable(t);return e(t).parentsUntil(n,"ul,ol")},split:function(e){var t,n,i,a=p(e);if(a.length){t=r.parentOfType(a[0],["li"]),n=r.parentOfType(a[a.length-1],["li"]),e.setStartBefore(t),e.setEndAfter(n);for(var s=0,l=a.length;s<l;s++){var d=this.finder.findFormat(a[s]);d&&((i=this._parentLists(d)).length?o.split(e,i.last()[0],!0):o.split(e,d,!0))}}},merge:function(e,t){for(var n,i=t.previousSibling;i&&("k-marker"==i.className||3==i.nodeType&&r.isWhitespace(i));)i=i.previousSibling;if(i&&r.name(i)==e&&this.finder.matchesType(i)){for(;t.firstChild;)i.appendChild(t.firstChild);r.remove(t),t=i}for(n=t.nextSibling;n&&("k-marker"==n.className||3==n.nodeType&&r.isWhitespace(n));)n=n.nextSibling;if(n&&r.name(n)==e&&this.finder.matchesType(n)){for(;t.lastChild;)n.insertBefore(t.lastChild,n.firstChild);r.remove(t)}},breakable:function(e){return e!=e.ownerDocument.body&&!/table|tbody|thead|tr|td/.test(r.name(e))&&!e.attributes.contentEditable},findSuitableNode:function(e){var t,n=this,i=n.finder,a=n.tag;return(t=i.findSuitable(e))||(t=(i=new f({tag:"ul"==a?"ol":"ul"})).findSuitable(e)),t||(t=(t=(i=new f({tag:a})).findSuitable(e))&&n.finder.matchesType(t)?null:t),t},applyOnSection:function(t,n){var i,a=this.tag,o=this.attr,s=r.closestSplittableParent(n),l=[],d=this.findSuitableNode(n);function u(){l.push(this)}/table|tbody|thead/.test(r.name(s))?i=e.map(n,(function(e){return r.parentOfType(e,["td"])})):(i=r.significantChildNodes(s),e.grep(i,r.isBlock).length&&(i=e.grep(i,function(e){return this.containsAny(e,n)}.bind(this))),i.length||(i=n));for(var c=0;c<i.length;c++){var p=i[c];(!d||!r.isAncestorOrSelf(d,p))&&this.suitable(p,n)&&(d&&this.isList(p)?(e.each(p.children,u),r.remove(p)):l.push(p))}for(l.length==i.length&&this.breakable(s)&&(l=[s]),d||(d=r.create(s.ownerDocument,a,o),r.isBlock(l[0])&&r.mergeAttributes(l[0],d),r.insertBefore(d,l[0])),this.wrap(d,l);r.isBom(d.nextSibling);)r.remove(d.nextSibling);this.finder.matchesType(d)||(d.removeAttribute("type"),d.style.listStyleType="",r.mergeAttributes(r.create(s.ownerDocument,a,o),d,!0)),d&&""===d.getAttribute("type")&&d.removeAttribute("type"),r.is(d,a)||r.changeTag(d,a),this.merge(a,d)},apply:function(t){var n,i,o,s,l=0,d=[],u=t.length,c=this.immutables()?a.Immutables.immutableParent:e.noop;function p(){n&&d.push({section:n,nodes:i})}for(l=0;l<u;l++)s=c(t[l])||t[l],o=r.closestEditable(s,["td","th","body"]),n&&o==n?i.push(s):(p(),i=[s],n=o);for(p(),l=0;l<d.length;l++)this.applyOnSection(d[l].section,d[l].nodes)},unwrap:function(e){var t,n,i,a,o=e.ownerDocument.createDocumentFragment(),s=this.unwrapTag;for(n=e.firstChild;n;n=n.nextSibling){for(i=r.create(e.ownerDocument,s||"p");n.firstChild;)a=n.firstChild,r.isBlock(a)?(i.firstChild&&(o.appendChild(i),i=r.create(e.ownerDocument,s||"p")),o.appendChild(a)):i.appendChild(a);i.firstChild&&o.appendChild(i)}(t=this._parentLists(e))[0]?(r.insertAfter(o,t.last()[0]),t.last().remove()):r.insertAfter(o,e),r.remove(e)},remove:function(e){for(var t,n=0,i=e.length;n<i;n++)(t=this.finder.findFormat(e[n]))&&this.unwrap(t)},toggle:function(e){var t=this,n=p(e),i=e.commonAncestorContainer;if(!n.length&&(e.selectNodeContents(i),!(n=p(e)).length)){var a=i.ownerDocument.createTextNode("");e.startContainer.appendChild(a),n=[a],e.selectNode(a.parentNode)}n=r.filterBy(n,r.htmlIndentSpace,!0),t.finder.isFormatted(n)?(t.split(e),t.remove(n)):t.apply(n)}}),g=l.extend({init:function(e){e.formatter=new m({tag:e.tag,attr:e.attr}),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)}))},command:function(e){return new g(i(e,{tag:this.options.tag,attr:this.options.attr}))}});i(a,{ListFormatFinder:f,ListFormatter:m,ListCommand:g,ListTool:v}),h("insertUnorderedList",new v({tag:"ul",attr:{style:{listStyleType:""},type:""},template:new d({template:s.buttonTemplate,title:"Insert unordered list"})})),h("insertOrderedList",new v({tag:"ol",attr:{style:{listStyleType:""},type:""},template:new d({template:s.buttonTemplate,title:"Insert ordered list"})})),h("insertUpperRomanList",new v({tag:"ol",attr:{style:{listStyleType:"upper-roman"}},altAttr:{type:"I"},template:new d({template:s.buttonTemplate,title:"Insert upper roman list"})})),h("insertLowerRomanList",new v({tag:"ol",attr:{style:{listStyleType:"lower-roman"}},altAttr:{type:"i"},template:new d({template:s.buttonTemplate,title:"Insert lower roman list"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.ui.editor,i=n.Tool,a=n.ToolTemplate,r=n.DelayedExecutionTool,o=n.Command,s=n.Dom,l=n.EditorUtils,d=n.RangeUtils,u=l.registerTool,c=r.extend({init:function(e){var n=this;i.fn.init.call(n,t.deepExtend({},n.options,e)),n.type="kendoSelectBox",n.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=e.value;if(!t)return e;if(e.tag||e.className)return e;var n=t.indexOf(".");return 0===n?e.className=t.substring(1):-1==n?e.tag=t:(e.tag=t.substring(0,n),e.className=t.substring(n+1)),e},command:function(t){var i=this,a=t.value;return a=this.toFormattingItem(a),new n.FormatCommand({range:t.range,formatter:function(){var t,r=(a.tag||a.context||"span").split(","),o=[{tags:r,attr:{className:a.className||""}}];return(t=e.inArray(r[0],s.inlineElements)>=0?new n.GreedyInlineFormatter(o):new n.GreedyBlockFormatter(o)).editor=i.editor,t}})},initialize:function(e,n){var a,r=n.editor,o=this.options,s=o.name,l=this;l.editor=r,e.width(o.width),a=e.kendoSelectBox({autoWidth:!0,dataTextField:"text",dataValueField:"value",dataSource:o.items||r.options[s],title:r.options.messages[s],autoSize:!0,change:function(){var e=this.dataItem();e&&i.exec(r,s,e.toJSON())},dataBound:function(){var e,t=this.dataSource.data();for(e=0;e<t.length;e++)t[e]=l.toFormattingItem(t[e])},highlightFirst:!1,template:t.template('<span unselectable="on" style="display:block;#=(data.style||"")#">#:data.text#</span>')}).data("kendoSelectBox"),e.attr("title",n.title),a.wrapper.attr("title",n.title),e.addClass("k-decorated").closest(".k-dropdownlist, .k-combobox").removeClass("k-"+s).find("*").addBack().attr("unselectable","on")},getFormattingValue:function(t,n){for(var i=0;i<t.length;i++){var a=t[i],r=(a.tag||a.context||"")+(a.className?"."+a.className:"");if(e(n[0]).closest(r)[0]){if(1==n.length)return a.value;for(var o=1;o<n.length&&e(n[o]).closest(r)[0];o++)if(o==n.length-1)return a.value}}return""},update:function(t,n){var i=e(t).data(this.type);if(i){var a,o,l=i.dataSource,d=l.data(),u=s.commonAncestor.apply(null,n);if(u==s.closestEditable(u)||this._ancestor!=u){for(this._ancestor=u,a=0;a<d.length;a++)o=d[a].context,d[a].visible=!o||!!e(u).closest(o).length;l.filter([{field:"visible",operator:"eq",value:!0}]),r.fn.update.call(this,t,n),i.value(this.getFormattingValue(l.view(),n)),i.wrapper.toggleClass("k-disabled",!l.view().length)}}},destroy:function(){this._ancestor=null}}),p=o.extend({exec:function(){var e=this.lockRange(!0);this.tagsToClean=this.options.remove||"strong,em,span,sup,sub,del,b,i,u,font".split(","),d.wrapSelectedElements(e);for(var t=d.mapAll(e,(function(e){return e})),n=t.length-1;n>=0;n--){var i=t[n];this.immutableParent(i)||this.clean(i)}this.releaseRange(e)},clean:function(i){if(i&&!s.isMarker(i)){var a=s.name(i);if("ul"==a||"ol"==a){var r=new n.ListFormatter(a),o=i.previousSibling,l=i.nextSibling;for(r.unwrap(i);o&&o!=l;o=o.nextSibling)this.clean(o)}else if("blockquote"==a)s.changeTag(i,"p");else if(1!=i.nodeType||s.insignificant(i))!function(e){var i=s.closestEditableOfType(e,["li"]);if(i){var a=new n.ListFormatter(s.name(i.parentNode)),r=t.ui.editor.W3CRange.fromNode(e);r.selectNode(i),a.toggle(r)}}(i);else{for(var d=i.childNodes.length-1;d>=0;d--)this.clean(i.childNodes[d]);i.removeAttribute("style"),i.removeAttribute("class")}e.inArray(a,this.tagsToClean)>-1&&s.unwrap(i)}},immutableParent:function(e){return this.immutables()&&n.Immutables.immutableParent(e)}});e.extend(n,{FormattingTool:c,CleanFormatCommand:p}),u("formatting",new c({template:new a({template:l.dropDownListTemplate,title:"Format"})})),u("cleanFormatting",new i({command:p,template:new a({template:l.buttonTemplate,title:"Clean formatting"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.EditorUtils,o=a.Dom,s=r.registerTool,l=a.ToolTemplate,d=a.RangeUtils,u=a.Command,c=n.keys,p="#k-editor-image-url",h="#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=this.attributes,i=d.documentFromRange(t);if(n.src&&"http://"!=n.src){var a=function(){setTimeout((function(){n.width||e.removeAttribute("width"),n.height||e.removeAttribute("height"),e.removeAttribute("complete")}))};if(!e)return(e=o.create(i,"img",n)).onload=e.onerror=a,t.deleteContents(),t.insertNode(e),e.nextSibling||o.insertAfter(i.createTextNode("\ufeff"),e),a(),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;e.onload=e.onerror=a,o.attr(e,n),a()}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\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-image-url"></span></div><div class=\'k-edit-label\'><label for="k-editor-image-title">#: messages.imageAltText #</label></div><div class=\'k-edit-field\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-image-title"></span></div><div class=\'k-edit-label\'><label for="k-editor-image-width">#: messages.imageWidth #</label></div><div class=\'k-edit-field\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-image-width"></span></div><div class=\'k-edit-label\'><label for="k-editor-image-height">#: messages.imageHeight #</label></div><div class=\'k-edit-field\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-image-height"></span></div></div><div class="k-edit-buttons"><button class="k-dialog-insert k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary"><span class="k-button-text">#: messages.dialogInsert #</span></button><button class="k-dialog-close k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"><span class="k-button-text">#: messages.dialogCancel #</span></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(){var e,t=this,a=t.lockRange(),r=!1,s=d.image(a),l=s&&s.getAttribute("width")||"",u=s&&s.getAttribute("height")||"",g=n.support.browser.msie,v=t.editor.options,_=v.messages,b=v.imageBrowser,k=!!(n.ui.ImageBrowser&&b&&b.transport&&undefined!==b.transport.read),w={title:_.insertImage,visible:!1,resizable:k};function y(n){var i=e.element,o=parseInt(i.find(f).val(),10),l=parseInt(i.find(m).val(),10);t.attributes={src:i.find(p).val().replace(/ /g,"%20"),alt:i.find(h).val()},t.attributes.width=null,t.attributes.height=null,!isNaN(o)&&o>0&&(t.attributes.width=o),!isNaN(l)&&l>0&&(t.attributes.height=l),r=t.insertImage(s,a),x(n),t.change&&t.change()}function x(n){n.preventDefault(),e.destroy(),o.windowFromDocument(d.documentFromRange(a)).focus(),r||t.releaseRange(a)}this.expandImmutablesIn(a),w.close=x,k&&(w.width=750);var C=(e=this.createDialog(t._dialogTemplate(k),w).toggleClass("k-filebrowser-dialog",k).find(".k-dialog-insert").on("click",y).end().find(".k-dialog-close").on("click",x).end().find(".k-edit-field input").on("keydown",(function(e){e.keyCode==c.ENTER?y(e):e.keyCode==c.ESC&&x(e)})).end().find(p).val(s?s.getAttribute("src",2):"http://").end().find(h).val(s?s.alt:"").end().find(f).val(l).end().find(m).val(u).end().data("kendoWindow")).element;if(k&&(this._imageBrowser=new n.ui.ImageBrowser(C.find(".k-imagebrowser"),i({},b)),this._imageBrowser.bind("change",(function(e){"f"===e.selected.get("type")&&C.find(p).val(this.value())})),this._imageBrowser.bind("apply",y)),g){var T=C.closest(".k-window").height();C.css("max-height",T)}e.center().open(),C.find(p).trigger("focus").select()}});n.ui.editor.ImageCommand=g,s("insertImage",new a.Tool({command:g,template:new l({template:r.buttonTemplate,title:"Insert Image"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.EditorUtils,o=a.Command,s=a.Tool,l=r.registerTool,d=a.ToolTemplate,u='<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>',c=o.extend({exec:function(){(this.editor._uploadWidget||this._initializeUploadWidget()).element.click()},_initializeUploadWidget:function(){var t=this,n=t.editor,i=n.options.import,a=e('<input id="editorImport" name="files" type="file" />').kendoUpload({success:t._onUploadSuccess.bind(t),progress:t._onUploadProgress.bind(t),select:t._onUploadSelect.bind(t),error:t._onUploadError.bind(t),complete:t._onUploadComplete.bind(t),showFileList:!1,multiple:!1,async:{saveUrl:i.proxyURL,autoUpload:!0,saveField:"file"},validation:{allowedExtensions:i.allowedExtensions,maxFileSize:i.maxFileSize}}).getKendoUpload();return n._uploadWidget=a,a},_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;a.Dom.is(t,"body")?this._iframeWrapper=this._container=this.editor.wrapper.find("iframe").parent().css({position:"relative"}).append(u):this._container=e(t).append(u),n.ui.progress(this._container,!0)},_removeLoadingOverlay:function(){n.ui.progress(this._container,!1),e(this._iframeWrapper).css({position:""}),delete this._container,delete this._iframeWrapper}});i(a,{ImportCommand:c}),l("import",new s({command:c,template:new d({template:r.iconTextButtonTemplate,title:"Import"})}))}(window.kendo.jQuery),function(e){var t=window.kendo.ui.editor,n=t.Command,i=t.GenericCommand,a=t.EditorUtils,r=a.registerTool,o=t.Tool,s=t.ToolTemplate,l=t.RestorePoint,d=e.extend,u=n.extend({init:function(e){n.fn.init.call(this,e),this.managesUndoRedo=!0},exec:function(){var e=this.editor,t=this.options,n=t.range,a=e.body,r=new l(n,a),o=t.html||t.value||"";e.selectRange(n),e.clipboard.paste(o,t),t.postProcess&&t.postProcess(e,e.getRange());var s=new i(r,new l(e.getRange(),a));s.editor=e,e.undoRedoStack.push(s),e.focus()}}),c=o.extend({initialize:function(e,n){var i=n.editor,a=this.options,r=a.items?a.items:i.options.insertHtml;this._selectBox=new t.SelectBox(e,{dataSource:r,dataTextField:"text",dataValueField:"value",change:function(){o.exec(i,"insertHtml",this.value())},title:i.options.messages.insertHtml,highlightFirst:!1}),e.attr("title",n.title),this._selectBox.wrapper.attr("title",n.title)},command:function(e){return new u(e)},update:function(e){var t=e.data("kendoSelectBox")||e.find("select").data("kendoSelectBox");t.close(),t.value(t.options.title)}});d(t,{InsertHtmlCommand:u,InsertHtmlTool:c}),r("insertHtml",new c({template:new s({template:a.dropDownListTemplate,title:"Insert HTML",initialValue:"Insert HTML"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.EditorUtils,o=a.Command,s=a.Tool,l=r.registerTool,d=a.ToolTemplate,u=o.extend({init:function(e){var t=this;t.options=e,o.fn.init.call(t,e),t.attributes=null,t.exportType=e.exportType},exec:function(){var e=this.lockRange(!0);this.postToProxy(),this.releaseRange(e)},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(),t.antiForgeryInput()]),i},valueInput:function(){var t=this.editor;return e("<input>").attr({value:t.encodedValue(),name:"value",type:"hidden"})},exportTypeInput:function(){return e("<input>").attr({value:this.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"})},antiForgeryInput:function(){var t=e("meta[name=csrf-param],meta[name=_csrf_header]").attr("content");return e("input[name^='__RequestVerificationToken']").clone().add(e("input[name^='"+t+"']").clone())}}),c=s.extend({init:function(e){var t=this;s.fn.init.call(t,n.deepExtend({},t.options,e)),t.type="kendoSelectBox"},options:{items:[{text:"Docx",value:"docx"},{text:"Rtf",value:"rtf"},{text:"Pdf",value:"pdf"},{text:"Html",value:"html"},{text:"Plain Text",value:"txt"}],width:140},command:function(e){var t=e.value;return new a.ExportAsCommand({range:e.range,exportType:t.exportType})},initialize:function(e,t){var i,a=this,r=t.editor,o=a.options,s=o.name,l=a.changeHandler.bind(a),d=o.items||r.options[s],u=r.options.messages[s];d.unshift({text:u,value:""}),a.editor=r,e.width(o.width),i=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>'),valueTemplate:'<span class="k-editor-export"><span class="k-icon k-i-export"></span><span class="k-export-tool-text">'+u+"</span></span>"}).data("kendoSelectBox"),e.attr("title",t.title),i.wrapper.attr("title",t.title),e.addClass("k-decorated").closest(".k-dropdownlist").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&&s.exec(this.editor,this.options.name,{exportType:e})},destroy:function(){this._ancestor=null}});i(a,{ExportAsTool:c,ExportAsCommand:u}),l("exportAs",new c({template:new d({template:r.dropDownListTemplate,title:"Export As"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=n.Class,a=e.extend,r=n.ui.editor,o=r.Dom,s=r.EditorUtils,l=s.registerTool,d=r.Command,u=r.Tool,c=r.ToolTemplate,p=r.RangeUtils,h=o.blockElements,f=r.BlockFormatFinder,m=r.BlockFormatter;function g(t,n){var i="rtl"==e(t).css("direction")?"Right":"Left",a="td"!=o.name(t)?"margin"+i:"padding"+i;if(undefined===n)return t.style[a]||0;n>0?t.style[a]=n+"px":(t.style[a]="",t.style.cssText||t.removeAttribute("style"))}var v=i.extend({init:function(){this.finder=new f([{tags:o.blockElements}])},apply:function(t){t=o.filterBy(t,o.htmlIndentSpace,!0);var n,i,a,r,s,l=this.finder.findSuitable(t),d=[];if((l=this.mapImmutables(l)).length){for(n=0,i=l.length;n<i;n++)o.is(l[n],"li")?e(l[n]).index()?e.inArray(l[n].parentNode,d)<0&&d.push(l[n]):d.push(l[n].parentNode):d.push(l[n]);for(;d.length;)if(a=d.shift(),o.is(a,"li")){r=a.parentNode;var u=(s=e(a).prev("li")).find("ul,ol").last(),c=e(a).children("ul,ol")[0];if(c&&s[0])u[0]?(u.append(a),u.append(e(c).children()),o.remove(c)):(s.append(c),c.insertBefore(a,c.firstChild));else for((c=s.children("ul,ol")[0])||(c=o.create(a.ownerDocument,o.name(r),this.getListTypeAttr(r)),s.append(c));a&&a.parentNode==r;)c.appendChild(a),a=d.shift()}else{var p=parseInt(g(a),10)+30;g(a,p);for(var h=0;h<d.length;h++)e.contains(a,d[h])&&d.splice(h,1)}}else{new m([{tags:["p"]}],{style:{marginLeft:30}}).apply(t)}},getListTypeAttr:function(e){var t=e.getAttribute("type"),n=e.style.listStyleType;return t?{type:t}:{style:{listStyleType:n}}},mapImmutables:function(t){if(this.immutables){var n=[];return e.map(t,(function(t){var i=r.Immutables.immutableParent(t);if(i){if(-1!==e.inArray(i,n))return null;n.push(i)}return i||t}))}return t},remove:function(t){t=o.filterBy(t,o.htmlIndentSpace,!0);var n,i,a,r,s,l,d,u,c=this.finder.findSuitable(t);for(i=0,a=(c=this.mapImmutables(c)).length;i<a;i++){if((d=e(c[i])).is("li")){if((s=(r=d.parent()).parent()).is("li,ul,ol")&&!g(r[0])){if(n&&e.contains(n,s[0]))continue;(l=d.nextAll("li")).length&&e(r[0].cloneNode(!1)).appendTo(d).append(l),s.is("li")?d.insertAfter(s):d.appendTo(s),r.children("li").length||r.remove();continue}if(n==r[0])continue;n=r[0]}else n=c[i];u=parseInt(g(n),10)-30,g(n,u)}}}),_=d.extend({init:function(e){e.formatter={toggle:function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.apply(p.nodes(e))}.bind(this)},d.fn.init.call(this,e)}}),b=d.extend({init:function(e){e.formatter={toggle:function(e){var t=new v;t.immutables=this.editor&&this.editor.options.immutables,t.remove(p.nodes(e))}.bind(this)},d.fn.init.call(this,e)}}),k=u.extend({init:function(e){u.fn.init.call(this,e),this.finder=new f([{tags:h}])},initialize:function(t,n){u.fn.initialize.call(this,t,n),e.extend(this.options,{immutables:n.editor&&n.editor.options.immutables}),t.addClass("k-disabled")},update:function(t,n){var i,a,s,l,d,u,c=this.finder.findSuitable(n);for(s=0,l=c.length;s<l;s++)if(d=c[s],this.options.immutables&&(u=r.Immutables.immutableParent(d))&&(d=u),(i=g(d))||(a=e(d).parents("ul,ol").length,i=o.is(d,"li")&&(a>1||g(d.parentNode))||o.ofType(d,["ul","ol"])&&a>0),i)return void t.removeClass("k-disabled");t.addClass("k-disabled").removeClass("k-hover")}});a(r,{IndentFormatter:v,IndentCommand:_,OutdentCommand:b,OutdentTool:k}),l("indent",new u({command:_,template:new c({template:s.buttonTemplate,title:"Indent"})})),l("outdent",new k({command:b,template:new c({template:s.buttonTemplate,title:"Outdent"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=e.extend,i=t.ui.editor,a=i.Dom,r=i.Command,o=i.Tool,s=i.BlockFormatter,l=a.normalize,d=i.RangeUtils,u=i.EditorUtils.registerTool,c=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},_insertMarker:function(e,t){var n,i=a.create(e,"a");return i.className="k-marker",t.insertNode(i),i.parentNode||((n=t.commonAncestorContainer).innerHTML="",n.appendChild(i)),l(i.parentNode),i},_moveFocus:function(e,t){if(a.isEmpty(t))e.setStartBefore(t);else{e.selectNodeContents(t);var n=d.textNodes(e)[0];if(!n){for(;t.childNodes.length&&!a.is(t.firstChild,"br");)t=t.firstChild;n=t}if(a.isEmpty(n))e.setStartBefore(n);else{a.emptyNode(n)&&(n.innerHTML="\ufeff");var i=n.firstChild||n;a.isDataNode(i)?e.setStart(i,0):e.setStartBefore(i)}}},shouldTrim:function(e){var t="p,h1,h2,h3,h4,h5,h6".split(","),n=a.parentOfType(e.startContainer,t),i=a.parentOfType(e.endContainer,t);return n&&!i||!n&&i},_blankAfter:function(e){for(;e&&(a.isMarker(e)||""===a.stripBom(e.nodeValue));)e=e.nextSibling;return!e},exec:function(){var t,n,r,o,u,c,p,h,f,m,g=this.getRange(),v=d.documentFromRange(g),_=i.emptyElementContent;if(this.expandImmutablesIn(g),m=this.shouldTrim(g),g.deleteContents(),u=this._insertMarker(v,g),a.stripBomNode(u.previousSibling),a.stripBomNode(u.nextSibling),c=a.closestEditableOfType(u,["li"]),p=a.closestEditableOfType(u,"h1,h2,h3,h4,h5,h6".split(",")),h=a.is(u.parentNode,"table")&&u.parentNode,c){if(a.emptyNode(c)){o=a.create(v,"p"),a.next(c)&&((f=g.cloneRange()).selectNode(c),d.split(f,c.parentNode));var b=e("br",c);1==b.length&&b.remove();var k=c.parentNode,w=c.parentNode.children.length,y=w>1&&1==c.childNodes.length&&c.children[0];a.insertAfter(o,k),a.remove(1==w?c.parentNode:c),y&&y!==u?(o.appendChild(y),o.appendChild(u)):o.innerHTML=_,r=o}}else p&&this._blankAfter(u)?(o=this._insertParagraphAfter(p),a.remove(u),r=o):h&&(o=this._insertParagraphAfter(h),a.remove(u),r=o);r||(c||p||new s([{tags:["p"]}]).apply([u]),g.selectNode(u),t=a.parentOfType(u,[c?"li":p?a.name(p):"p"]),d.split(g,t,m),n=t.previousSibling,a.is(n,"li")&&n.firstChild&&!a.is(n.firstChild,"br")&&(n=n.firstChild),r=t.nextSibling,this.clean(n,{links:!0}),this.clean(r,{links:!0}),a.is(r,"li")&&r.firstChild&&!a.is(r.firstChild,"br")&&(r=r.firstChild),a.remove(t),l(n)),l(r),this._moveFocus(g,r),g.collapse(!0),a.scrollTo(r,!0),d.selectRange(g)},_insertParagraphAfter:function(e){var t=this.getRange(),n=d.documentFromRange(t),r=i.emptyElementContent,o=a.create(n,"p");return a.insertAfter(o,e),o.innerHTML=r,o},clean:function(t,n){var r=t;if(t.firstChild&&a.is(t.firstChild,"br")&&a.remove(t.firstChild),a.isDataNode(t)&&!t.nodeValue&&(t=t.parentNode),t){for(var o=!1;t.firstChild&&1==t.firstChild.nodeType;)o=o||a.significantNodes(t.childNodes).length>1,t=t.firstChild;if(a.isEmpty(t)||"k-br"==t.className||!/^\s*$/.test(t.innerHTML)||o||(e(r).find(".k-br").remove(),t.innerHTML=i.emptyElementContent),n&&n.links)for(;t!=r;){if(a.is(t,"a")&&a.emptyNode(t)){a.unwrap(t);break}t=t.parentNode}}}}),p=r.extend({init:function(e){this.options=e,r.fn.init.call(this,e)},exec:function(){var n=this.getRange();this.expandImmutablesIn(n);var i,r,o=a.create(d.documentFromRange(n),"br"),s=n.startContainer,u=t.support.browser,c=u.msie&&u.version<11,p=a.is(s,"table")&&s;n.deleteContents(),p?a.insertAfter(o,p):(r=e(s).closest(".k-br"),n.insertNode(o),r.length&&a.unwrap(r[0])),l(o.parentNode),c||o.nextSibling&&!a.isWhitespace(o.nextSibling)||(o.nextSibling&&a.isWhitespace(o.nextSibling)&&e(o.nextSibling).remove(),(i=o.cloneNode(!0)).className="k-br",a.insertAfter(i,o)),n.setStartAfter(o),n.collapse(!0),a.scrollTo(o.nextSibling||o,!0),d.selectRange(n)}});n(i,{ParagraphCommand:c,NewLineCommand:p}),u("insertLineBreak",new o({key:13,shift:!0,command:p})),u("insertParagraph",new o({key:13,command:c}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.EditorUtils,o=a.Dom,s=r.registerTool,l=a.ToolTemplate,d=a.RangeUtils,u=a.Command,c=a.LinkFormatter,p=d.textNodes,h=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=o.create(i,"a",{href:n.href})).innerHTML=n.innerHTML,e.title=n.title,t.deleteContents(),t.insertNode(e),e.nextSibling||o.insertAfter(i.createTextNode("\ufeff"),e),t.setStartAfter(e),t.setEndAfter(e),d.selectRange(t),!0;o.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\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-file-url"></span></div><div class=\'k-edit-label\'><label for="k-editor-file-text">#: messages.fileText #</label></div><div class=\'k-edit-field\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-file-text"></span></div><div class=\'k-edit-label\'><label for="k-editor-file-title">#: messages.fileTitle #</label></div><div class=\'k-edit-field\'><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input type="text" class="k-input-inner" id="k-editor-file-title"></span></div></div><div class="k-edit-buttons"><button class="k-dialog-insert k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary"><span class="k-button-text">#: messages.dialogInsert #</span></button><button class="k-dialog-close k-button k-button-md k-rounded-md k-button-solid k-button-solid-base"><span class="k-button-text">#: messages.dialogCancel #</span></button></div></div></div>')({messages:this.editor.options.messages,showBrowser:e})},redo:function(){var e=this.lockRange();this.formatter.apply(e,this.attributes),this.releaseRange(e)},exec:function(){var e,t=this,a=t.lockRange(),r=p(a),s=!1,l=r.length?this.formatter.finder.findSuitable(r[0]):null,u=n.support.browser.msie,c=t.editor.options,v=c.messages,_=c.fileBrowser,b=!!(n.ui.FileBrowser&&_&&_.transport&&undefined!==_.transport.read),k={title:v.insertFile,visible:!1,resizable:b};function w(n){var i=e.element,r=i.find(f).val().replace(/ /g,"%20"),o=i.find(m).val(),d=i.find(g).val();t.attributes={href:r,innerHTML:""!==o?o:r,title:d},s=t.insertFile(l,a),y(n),t.change&&t.change()}function y(n){n.preventDefault(),e.destroy(),o.windowFromDocument(d.documentFromRange(a)).focus(),s||t.releaseRange(a)}this.expandImmutablesIn(a),k.close=y,b&&(k.width=750);var x=(e=this.createDialog(t._dialogTemplate(b),k).toggleClass("k-filebrowser-dialog",b).find(".k-dialog-insert").on("click",w).end().find(".k-dialog-close").on("click",y).end().find(".k-edit-field input").on("keydown",(function(e){e.keyCode==h.ENTER?w(e):e.keyCode==h.ESC&&y(e)})).end().find(f).val(l?l.getAttribute("href",2):"http://").end().find(m).val(l?l.innerText:"").end().find(g).val(l?l.title:"").end().data("kendoWindow")).element;if(b&&(t._fileBrowser=new n.ui.FileBrowser(x.find(".k-filebrowser"),i({},_)),t._fileBrowser.bind("change",(function(e){"f"===e.selected.get("type")&&x.find(f).val(this.value())})),t._fileBrowser.bind("apply",w)),u){var C=x.closest(".k-window").height();x.css("max-height",C)}e.center().open(),x.find(f).trigger("focus").select()}});n.ui.editor.FileCommand=v,s("insertFile",new a.Tool({command:v,template:new l({template:r.buttonTemplate,title:"Insert File"})}))}(window.kendo.jQuery),function(e,t){var n=window.kendo,i=e.extend,a=n.ui.editor,r=a.Dom,o=a.EditorUtils,s=a.RangeUtils,l=a.Command,d="kendoEditor",u="k-active",c="k-selected",p="scope",h="row",f="col",m="rowgroup",g="colgroup",v="colspan",_="rowspan",b="table",k="thead",w="tbody",y="tr",x="td",C="th",T=a.Tool,S=a.ToolTemplate,I=a.InsertHtmlCommand,D=a.BlockFormatFinder,E=a.BlockFormatTool,A=a.FormatCommand,F=a.EditorUtils.registerTool,z=a.EditorUtils.registerFormat,P=n.ui.Editor.fn.options.formats,H=n.getTouches,N=n.template,R=new D([{tags:[b]}]),O=I.extend({init:function(t){var n=e.extend({postProcess:this.postProcess,skipCleaners:!0},t||{});I.fn.init.call(this,n)},_tableHtml:function(e,t){e=e||1,t=t||1;var n=N("<td style='width:#=width#%;'>#=content#</td>")({width:100/t,content:a.emptyTableCellContent}),i=100/e;return"<table class='k-table' data-last>"+new Array(e+1).join("<tr style='height:"+i+"%;'>"+new 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(x)[0],0),n.collapse(!0),t.selectRange(n)},exec:function(){var e=this.options;e.html=this._tableHtml(e.rows,e.columns),I.fn.exec.call(this)}}),M=T.extend({initialize:function(t,n){T.fn.initialize.call(this,t,n);var i=e(this.options.popupTemplate).appendTo("body").kendoPopup({anchor:t,copyAnchorStyles:!1,open:this._open.bind(this),activate:this._activate.bind(this),close:this._close.bind(this)}).data("kendoPopup");t.on("click",this._toggle.bind(this)).on("keydown",this._keydown.bind(this));var r=this._editor=n.editor;this._popup=i;var s=new a.TableWizardTool({template:new S({template:o.tableWizardButtonTemplate,title:r.options.messages.tableWizard}),command:a.TableWizardCommand,insertNewTable:!0});F("tableWizardInsert",s);var l=e("<div>"+s.options.template.getHtml()+"</div>");l.appendTo(i.element),r.toolbar&&r.toolbar.attachToolsEvents(l)},popup:function(){return this._popup},_activate:e.noop,_open:function(){this._popup.options.anchor.addClass(u)},_close:function(){this._popup.options.anchor.removeClass(u)},_keydown:function(e){var t=n.keys,i=e.keyCode;i==t.DOWN&&e.altKey||i==t.ENTER||i==t.SPACEBAR?this._popup.open():i==t.ESC&&this._popup.close()},_toggle:function(t){e(t.target).closest(".k-tool").hasClass("k-disabled")||this.popup().toggle()},update:function(e){var t=this.popup();t.wrapper&&"block"==t.wrapper.css("display")&&t.close(),e.removeClass("k-hover")},destroy:function(){this._popup.destroy()}}),B=M.extend({init:function(t){this.cols=8,this.rows=6,M.fn.init.call(this,e.extend(t,{command:O,popupTemplate:"<div class='k-ct-popup'><div>"+new Array(this.cols*this.rows+1).join("<span class='k-ct-cell k-disabled'></span>")+"</div><div class='k-status'></div></div>"}))},_activate:function(){var t,i,a=this,r=a._popup.element,o=r.find(".k-ct-cell"),s=o.eq(0),l=o.eq(o.length-1),u=n.getOffset(s),c=n.getOffset(l),p=a.cols,h=a.rows;function f(n){var a=e(window);return{row:Math.floor((n.clientY+a.scrollTop()-u.top)/i)+1,col:Math.floor((n.clientX+a.scrollLeft()-u.left)/t)+1}}r.find("*").addBack().attr("unselectable","on"),c.left+=l[0].offsetWidth,c.top+=l[0].offsetHeight,t=(c.left-u.left)/p,i=(c.top-u.top)/h,r.autoApplyNS(d).on("mousemove",".k-ct-cell",(function(e){a._setTableSize(f(e))})).on("mouseleave",".k-ct-cell",(function(){a._setTableSize()})).on("down",".k-ct-cell",(function(e){e.preventDefault();var t=H(e)[0];a._exec(f(t.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,a=i.find(".k-status"),r=i.find(".k-ct-cell"),o=this.cols,s=this._editor.options.messages;this._valid(t)?(a.text(n.format(s.createTableHint,t.row,t.col)),r.each((function(n){e(this).toggleClass(c,n%o<t.col&&n/o<t.row)}))):(a.text(s.createTable),r.removeClass(c))},_keydown:function(e){var t=this._popup.visible();if(M.fn._keydown.call(this,e),this._popup.visible()){var i,a=n.keys,r=e.keyCode,o=this._popup.element.find(".k-ct-cell"),s=Math.max(o.filter(".k-selected").last().index(),0),l=Math.floor(s/this.cols),d=s%this.cols,u=!1;r!=a.DOWN||e.altKey?r==a.UP?(u=!0,l--):r==a.RIGHT?(u=!0,d++):r==a.LEFT?(u=!0,d--):r==a.TAB&&(i=this._popup.element.find(".k-button")).length>0&&(u=!0,i.trigger("focus")):(u=!0,l++);var c={row:Math.max(1,Math.min(this.rows,l+1)),col:Math.max(1,Math.min(this.cols,d+1))};r==a.ENTER&&t?this._exec(c):this._setTableSize(c),u&&(e.preventDefault(),e.stopImmediatePropagation())}},_open:function(){var e=this._editor.options.messages;M.fn._open.call(this),this.popup().element.find(".k-status").text(e.createTable).end().find(".k-ct-cell").removeClass(c)},_close:function(){M.fn._close.call(this),this.popup().element.off("."+d)}}),L=l.extend({undo:function(){var t=this.restorePoint;t.restoreHtml(),e(this.editor.body).find(".k-element-resize-handle-wrapper").each((function(e,t){t.remove()})),this.editor.selectRange(t.toRange())},_clearColIndexAttr:function(e){r.clearTableMappings(e,"col-index")},_mapColIndices:function(e){r.reMapTableColumns(e,"col-index")},_findRowSpanCell:function(t,n,i){for(var a,r,o=n;o>=0;o--)if(a=t.rows[o],(r=e(a).find("[col-index="+i+"]")).length)return r},_resetElementResizing:function(e){e._destroyResizings(),e._initializeColumnResizing(),e._initializeRowResizing(),e._initializeElementResizing()},_findNextTdInRow:function(e,t){for(var n,i=e.find("td:last-child"),a=parseInt(i.attr("col-index"),10)+i.prop("colSpan")-1,r=t;r<=a;r++)if((n=e.find("[col-index="+r+"]")).length)return n},_adjustColgroups:function(e,t){for(var n,i,a,o=t.getElementsByTagName(f),s=t.getElementsByTagName(g),l=e.cells,d=l.length;o.length>0;)o[0].remove();for(;s.length>0;)s[0].remove();for(n=d-1;n>=0;n--)(a=l[n]).getAttribute(p)===g?((i=r.createEmptyNode(this.editor.document,g)).setAttribute("span",a.getAttribute(v)),t.prepend(i)):t.prepend(r.createEmptyNode(this.editor.document,f))},_associateHeaderIds:function(t){r.clearTableMappings(t,"col-index"),r.reMapTableColumns(t,"col-index"),e(t).find("th, td").removeAttr("id headers"),r.associateWithIds(t)},_getNumberOfColumns:function(e){return r._getNumberOfColumns(e,"td, th")}}),V=L.extend({exec:function(){var t,n,i,o,s,l,d=this.lockRange(!0),u=r.closest(d.endContainer,[x,C]),c=r.closest(u,b),f=this.options.position||"after";if(!c||this.immutables()&&a.Immutables.immutableParent(u))this.releaseRange(d);else{this._mapColIndices(c),n=u.parentNode,s=r.findNodeIndex(n,!0),u.rowSpan>1&&"after"===f&&(n=c.rows[s+u.rowSpan-1]),t=this._getNumberOfColumns(c),o=n.cloneNode(!0),e(o).empty();for(var g=0;g<t;g+=i.prop("colSpan"))(i=e(n).find("[col-index="+g+"]")).length?i.prop("rowSpan")>1&&"after"===f&&i?i.attr(_,i.prop("rowSpan")+1):this._appendCell(o,i):(s=r.findNodeIndex(n,!0),(i=this._findRowSpanCell(n.parentElement,s,g)).closest(y).index()+i.prop("rowSpan")-1===s&&"after"===f?this._appendCell(o,i):i.attr(_,i.prop("rowSpan")+1)),(l=e(o).find("[col-index="+g+"]")).attr(p)!==m||l.attr(_)||l.attr(p,h);"before"==f?r.insertBefore(o,n):r.insertAfter(o,n),e(c).find("[headers]").length>0&&this._associateHeaderIds(c),this._clearColIndexAttr(c),this.releaseRange(d),this._resetElementResizing(this.editor)}},_appendCell:function(e,t){var n;(n=t.clone()).html(a.emptyTableCellContent),n.removeAttr(_),n.appendTo(e)}}),U=L.extend({exec:function(){var t,n,i,o,s=this.lockRange(!0),l=r.closest(s.endContainer,[x,C]),d=r.closest(l,b),u=d.getElementsByTagName(f),c=d.getElementsByTagName(g),h=d&&d.rows,m=this.options.position||"after";if(!l||this.immutables()&&a.Immutables.immutableParent(l))this.releaseRange(s);else{for(this._mapColIndices(d),t=parseInt(l.getAttribute("col-index"),10),l.colSpan>1&&"after"===m&&(l.setAttribute("col-index",t+l.colSpan-1),t=t+l.colSpan-1),n=0;n<h.length;n++)(i=this._processForColSpan(h[n],t,m,l))&&((o=i.cloneNode()).innerHTML=a.emptyTableCellContent,o.removeAttribute(v),o.getAttribute(p)&&o.getAttribute(p)===g&&o.setAttribute(p,f),"before"==m?r.insertBefore(o,i):r.insertAfter(o,i),this._resizeCells(o,i));(u.length>0||c.length>0)&&this._adjustColgroups(h[0],d),e(d).find("[headers]").length>0&&this._associateHeaderIds(d),this._clearColIndexAttr(d),this.releaseRange(s),this._resetElementResizing(this.editor)}},_processForColSpan:function(t,n,i,a){var r,o,s=n-1;if((r=e(t).find("[col-index="+n+"]")[0])&&r.colSpan>1&&"after"===i&&r!==a)r.colSpan+=1;else{if(r)return r;for(;s>=0&&!((r=e(t).find("[col-index="+s+"]")[0])&&r.colSpan>1);s--);if(r){if((o=parseInt(r.getAttribute("col-index"),10)+r.colSpan-1)===n&&"after"===i)return r;n<=o&&r.setAttribute(v,r.colSpan+1)}}},_resizeCells:function(e,t){var n,i,a,r=e.style.width;r&&(n=parseFloat(r),i=r.slice(n.toString().length),a=n/2+i,e.style.width=a,t.style.width=a)}}),W=L.extend({exec:function(){var t,n=this.lockRange(),i=s.mapAll(n,(function(t){return e(t).closest(y)[0]})),o=r.closest(n.endContainer,[x,C]),l=i[0],d=o?o.rowSpan:1,u=e(i[0]).index(),c=r.closest(l,b),p=l.parentElement;if(!c||this.immutables()&&a.Immutables.immutableParent(l))this.releaseRange(n);else{for(var h=0;h<d;h++)i.indexOf(p.rows[u+h])<0&&i.push(p.rows[u+h]);if(c.rows.length<=i.length)(t=r.next(c))&&!r.insignificant(t)||(t=r.prev(c)),t&&t.rows&&(t=t.rows[0].cells[0]),r.remove(c),this._resetElementResizing(this.editor);else if(p.rows.length<=i.length)(t=p.nextSibling)||(t=p.previousSibling),r.remove(p);else{this._mapColIndices(c);for(var f=0;f<i.length;f++)l=i[f],r.removeTextSiblings(l),t=(t=r.next(l)||r.prev(l)).cells[0],this._focusElement(n,t),t=null,this._handleRowSpanCells(c,l),r.remove(l);this._clearColIndexAttr(c)}e(c).find("[headers]").length>0?this._associateHeaderIds(c):r.is(p,k)&&e(c).find("[scope]").length>0&&this._adjustColgroups(p.rows[0],c),t&&this._focusElement(n,t),this._resetElementResizing(this.editor)}},_focusElement:function(e,t){e.setStart(t,0),e.collapse(!0),this.editor.selectRange(e)},_handleRowSpanCells:function(t,n){var i,a,o,s,l=r.findNodeIndex(n,!0),d=t.rows[0],u=d.cells[d.cells.length-1],c=parseInt(u.getAttribute("col-index"),10)+u.colSpan-1;for(i=0;i<=c;i+=a.prop("colSpan"))(a=e(n).find("[col-index="+i+"]")).length&&a.prop("rowSpan")>1&&(s=t.rows[l+1],(o=e(s).find("[col-index="+(i+1)+"]")).length?o.before(a):e(s).append(a),this._reduceRowSpan(a)),a.length||(a=this._findRowSpanCell(n.parentElement,l,i),this._reduceRowSpan(a))},_reduceRowSpan:function(e){var t=e.prop("rowSpan")-1;t<=1?(e.removeAttr(_),e.attr(p)===m&&e.attr(p,h)):e.attr(_,t)}}),j=L.extend({exec:function(){var t,n,i,o,s=this.lockRange(),l=r.closest(s.endContainer,[x,C]),d=r.closest(l,b),u=d&&d.rows,c=r.findNodeIndex(l,!0),p=u&&u[0].cells.length,h=d.getElementsByTagName(f),m=d.getElementsByTagName(g);if(!l||this.immutables()&&a.Immutables.immutableParent(l))this.releaseRange(s);else{if(1==p||l.colSpan==p)(t=r.next(d))&&!r.insignificant(t)||(t=r.prev(d)),t&&t.rows&&(t=t.rows[0].cells[0]),r.remove(d),this._resetElementResizing(this.editor);else{for(r.removeTextSiblings(l),t=r.next(l)||r.prev(l),this._mapColIndices(d),c=parseInt(l.getAttribute("col-index"),10),o=0;o<l.colSpan;o++)for(n=0;n<u.length;n+=i.prop("rowSpan")||1)(i=e(u[n]).find("[col-index="+(c+o)+"]")).length&&i.prop("colSpan")<=1?i.remove():this._handleColSpanCells(u[n],c+o);this._clearColIndexAttr(d)}(h.length>0||m.length>0)&&this._adjustColgroups(u[0],d),e(d).find("[headers]").length>0&&this._associateHeaderIds(d),t&&(s.setStart(t,0),s.collapse(!0),this.editor.selectRange(s)),this._resetElementResizing(this.editor)}},_handleColSpanCells:function(t,n){var i=e(t).find("[col-index="+n+"]");if(i.length&&i.prop("colSpan")>1){var a=i.clone(!0);return i.after(a),this._reduceColSpan(a),a.attr("col-index",parseInt(i.attr("col-index"),10)+1),void i.remove()}for(var r=n;r>=0;r--)if((i=e(t).find("[col-index="+r+"]")).length)return this._reduceColSpan(i),void i.attr("col-index",parseInt(i.attr("col-index"),10)+1)},_reduceColSpan:function(e){var t=e.prop("colSpan")-1;t<=1?(e.removeAttr(v),e.attr(p)===g&&e.attr(p,f)):e.attr(v,t)}}),q=L.extend({exec:function(){var t,n,i,o,s,l=this.lockRange(),d=r.closest(l.endContainer,[x,C]);if(d)if(t=r.closest(d,b),n=d.parentNode,i=r.findNodeIndex(d,!0),n.children[i+1],this.immutables()&&a.Immutables.immutableParent(d))this.releaseRange(l);else{if(this._mapColIndices(t),i=parseInt(e(d).attr("col-index"),10),!(o=e(n).find("[col-index="+(i+1+this._getColspan(d)-1)+"]").get(0))||o.rowSpan!==d.rowSpan||d.tagName!==o.tagName)return this._clearColIndexAttr(t),void this.releaseRange(l);s=this._getColspan(d)+this._getColspan(o),e(d).prop(v,s).append(r.emptyNode(o)?"":"<br/>"+o.innerHTML),e(d).width(d.offsetWidth),e(o).remove(),d.getAttribute(p)===f&&d.setAttribute(p,g),d.getAttribute(p)===g&&this._adjustColgroups(n,t),e(t).find("[headers]").length>0&&this._associateHeaderIds(t),this._clearColIndexAttr(t),this.releaseRange(l),this._resetElementResizing(this.editor)}else this.releaseRange(l)},_getColspan:function(e){return parseInt(e.getAttribute(v),10)||1}}),G=L.extend({exec:function(){var t,n,i,o,s,l,d,u=this.lockRange(),c=r.closest(u.endContainer,[x,C]);if(c)if(t=r.closest(c,y),n=r.closest(c,[k,w]),i=r.closest(c,b),o=r.findNodeIndex(c,!0),(s=r.findNodeIndex(t,!0))+1!==n.rows.length)if((l=n.rows[s+this._getRowspan(c)])&&l.children[o],this.immutables()&&a.Immutables.immutableParent(c))this.releaseRange(u);else{if(this._mapColIndices(i),o=e(c).attr("col-index"),!(d=e(l).find("[col-index="+o+"]").get(0))||d.colSpan!==c.colSpan||c.tagName!==d.tagName)return this._clearColIndexAttr(i),void this.releaseRange(u);e(c).prop(_,this._getRowspan(c)+this._getRowspan(d)).append(r.emptyNode(d)?"":"<br/>"+d.innerHTML),c.getAttribute(p)===h&&c.setAttribute(p,m),e(d).remove(),e(i).find("[headers]").length>0&&this._associateHeaderIds(i),this._clearColIndexAttr(i),this.releaseRange(u)}else this.releaseRange(u);else this.releaseRange(u)},_getRowspan:function(e){return parseInt(e.getAttribute(_),10)||1}}),K=L.extend({exec:function(){var t=this.lockRange(),n=this.options.type,i="row"===n?v:_,o=r.closest(t.endContainer,[x,C]),s=r.closest(o,[k,w]),l=r.closest(o,b),d=r.createEmptyNode(this.editor.document,o.nodeName.toLowerCase());!o||this.immutables()&&a.Immutables.immutableParent(o)||(this._mapColIndices(l),"row"===n&&e(o).is("["+i+"]")?this._splitCellHorizontally(o,s,i,d):"column"===n&&e(o).is("["+i+"]")&&this._splitCellVertically(o,s,i,d),e(o).prop(i.toLowerCase())<=1&&e(o).removeAttr(i),e(l).find("[headers]").length>0&&this._associateHeaderIds(l),this._clearColIndexAttr(l)),this.releaseRange(t)},_getRowspanValue:function(e){return parseInt(e.getAttribute(_),10)},_getColspanValue:function(e){return parseInt(e.getAttribute(v),10)},_splitCellHorizontally:function(t,n,i,a){var r=t.rowSpan,o=t.colSpan,s=e(a),l=Math.floor(o/2);l>1&&s.attr(v,l),r>1&&s.attr(_,r),e(t).prop(i,o-l).after(s),e(t).width(t.offsetWidth),s.width(s[0].offsetWidth),t.hasAttribute(p)&&(t.getAttribute(p)===g?(s.attr(p,f),t.getAttribute(v)&&"1"!==t.getAttribute(v)||t.setAttribute(p,f),this._adjustColgroups(t.parentNode,n.parentNode)):s.attr(p,t.getAttribute(p)))},_splitCellVertically:function(t,n,i,a){var o=r.closest(t,y),s=parseInt(e(t).attr("col-index"),10),l=r.findNodeIndex(o,!0),d=t.rowSpan,u=t.colSpan,c=Math.floor(d/2),f=e(n).find(y).eq(l+d-c),g=this._findNextTdInRow(f,s+u),b=e(a);c>1&&b.attr(_,c),u>1&&b.attr(v,u),g&&g.length?g.before(b):f.append(b),e(t).prop(i,d-c),t.hasAttribute(p)&&(t.getAttribute(p)===m?(b.attr(p,h),t.getAttribute(_)&&"1"!==t.getAttribute(_)||t.setAttribute(p,h)):b.attr(p,t.getAttribute(p)))}}),$=T.extend({command:function(e){var t={row:{insert:V,delete:W,merge:q,split:K},column:{insert:U,delete:j,merge:G,split:K}};return(e=i(e,this.options)).action=e.action||"insert",new t[e.type][e.action](e)},initialize:function(e,t){T.fn.initialize.call(this,e,t),e.addClass("k-disabled"),e.attr("disabled","disabled")},update:function(e,t){!0===!R.isFormatted(t)?(e.parent().addClass("k-hidden k-disabled"),e.attr("disabled","disabled"),e.addClass("k-disabled")):(e.parent().removeClass("k-hidden k-disabled"),e.prop("disabled",!1),e.removeClass("k-disabled"))}}),Y=A.extend({exec:function(){var e=this.editor;A.fn.exec.call(this),e.elementResizing&&e.elementResizing._showResizeHandles()}}),Q=E.extend({initialize:function(e,t){E.fn.initialize.call(this,e,t),e.addClass("k-disabled"),e.attr("disabled","disabled")},update:function(e,t){var n=!R.isFormatted(t),i=this.options.finder.isFormatted(t,this.isTable);!0===n?(e.parent().addClass("k-hidden k-disabled"),e.attr("disabled","disabled"),e.addClass("k-disabled")):(e.parent().removeClass("k-hidden k-disabled"),e.prop("disabled",!1),e.removeClass("k-disabled")),e.toggleClass("k-selected",i),e.attr("aria-pressed",i)},command:function(e){return new Y(i(e,{formatter:this.options.formatter}))},isTable:function(e){return r.is(e,"table")}});i(n.ui.editor,{PopupTool:M,TableCommand:O,InsertTableTool:B,TableFormatTool:Q,TableFormatCommand:Y,TableModificationTool:$,InsertRowCommand:V,InsertColumnCommand:U,DeleteRowCommand:W,DeleteColumnCommand:j,MergeCellsHorizontallyCommand:q,MergeCellsVerticallyCommand:G,SplitCellCommand:K}),F("createTable",new B({template:new S({template:o.buttonTemplate,popup:!0,title:"Create table"})})),F("addColumnLeft",new $({type:"column",position:"before",template:new S({template:o.buttonTemplate,title:"Add column on the left"})})),F("addColumnRight",new $({type:"column",template:new S({template:o.buttonTemplate,title:"Add column on the right"})})),F("addRowAbove",new $({type:"row",position:"before",template:new S({template:o.buttonTemplate,title:"Add row above"})})),F("addRowBelow",new $({type:"row",template:new S({template:o.buttonTemplate,title:"Add row below"})})),F("deleteRow",new $({type:"row",action:"delete",template:new S({template:o.buttonTemplate,title:"Delete row"})})),F("deleteColumn",new $({type:"column",action:"delete",template:new S({template:o.buttonTemplate,title:"Delete column"})})),F("mergeCellsHorizontally",new $({type:"row",action:"merge",template:new S({template:o.buttonTemplate,title:"Merge Cell Right"})})),F("mergeCellsVertically",new $({type:"column",action:"merge",template:new S({template:o.buttonTemplate,title:"Merge Cell Down"})})),F("splitCellHorizontally",new $({type:"row",action:"split",template:new S({template:o.buttonTemplate,title:"Split Cell"})})),F("splitCellVertically",new $({type:"column",action:"split",template:new S({template:o.buttonTemplate,title:"Split Cell"})})),z("tableAlignLeft",[{tags:["table"],attr:{style:{marginLeft:"",marginRight:"auto"}}},{tags:["table"],attr:{align:"left"}}]),F("tableAlignLeft",new Q({format:P.tableAlignLeft,template:new S({template:o.buttonTemplate,title:"Table Align Left"})})),z("tableAlignCenter",[{tags:["table"],attr:{style:{marginLeft:"auto",marginRight:"auto"}}},{tags:["table"],attr:{align:"center"}}]),F("tableAlignCenter",new Q({format:P.tableAlignCenter,template:new S({template:o.buttonTemplate,title:"Table Align Center"})})),z("tableAlignRight",[{tags:["table"],attr:{style:{marginLeft:"auto",marginRight:""}}},{tags:["table"],attr:{align:"right"}}]),F("tableAlignRight",new Q({format:P.tableAlignRight,template:new S({template:o.buttonTemplate,title:"Table Align Left"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,a=i.RangeUtils,r=i.Dom,o=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 p(t),new h(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.document,n=r.create(t,"div"),i=t.createDocumentFragment();for(n.innerHTML=e;n.firstChild;)i.appendChild(n.firstChild);return i},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 o(e,n.body),r.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,a=n._startModification();a&&(e.call(n,i,a.range),setTimeout((function(){t.call(n,i,a.range),n._endModification(a)})))},_removeBomNodes:function(e){for(var t=a.textNodes(e),n=0;n<t.length;n++)t[n].nodeValue=r.stripBom(t[n].nodeValue)||t[n].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=n.resolve.bind(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){if("FileReader"in window&&!(l.msie&&l.version>10)){var t=e.clipboardData||e.originalEvent.clipboardData||window.clipboardData||{},n=t.items||t.files;return this._insertImages(n)}},_insertImages:function(t){if(t){var n=e.grep(t,(function(e){return/^image\//i.test(e.type)}));if(!e.grep(t,(function(e){return/^text\/html/i.test(e.type)})).length&&n.length){var i=this._startModification();if(i)return e.when.apply(e,e.map(n,this._fileToDataURL)).done(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(i)}.bind(this)),!0}}},onpaste:function(n){"false"!==this.editor.body.contentEditable&&(this._handleImagePaste(n)?n.preventDefault():(this.expandImmutablesIn(),this._contentModification((function(i,a){var o=r.create(i.document,"div",{className:"k-paste-container",innerHTML:"\ufeff"}),s=t.support.browser,l=i.body;if(this._decoreateClipboardNode(o,l),l.appendChild(o),s.webkit&&this._moveToCaretPosition(o,a),s.msie&&s.version<11){n.preventDefault();var d=i.createRange();d.selectNodeContents(o),i.selectRange(d);var u=i.document.body.createTextRange();u.moveToElementText(o),e(l).off("paste"),u.execCommand("Paste"),e(l).on("paste",this.onpaste.bind(this))}else{var c=i.createRange();c.selectNodeContents(o),i.selectRange(c)}a.deleteContents()}),(function(t,n){var i,a="";t.selectRange(n),(i=e(t.body).children(".k-paste-container")).each((function(){var e=this.lastChild;e&&r.is(e,"br")&&r.remove(e),a+=this.innerHTML})),i.remove(),this._triggerPaste(a,{clean:!0})}))))},ondragover:function(e){(l.msie||l.edge)&&(e.stopPropagation(),e.preventDefault())},ondrop:function(e){if("FileReader"in window){var t=(e.originalEvent||e).dataTransfer||{},n=t.items||t.files;this._insertImages(n)&&e.preventDefault()}},_decoreateClipboardNode:function(t,n){if((l.msie||l.webkit)&&((t=e(t)).css({borderWidth:"0px",width:"0px",height:"0px",overflow:"hidden",margin:"0",padding:"0"}),l.msie)){var i=e(n.ownerDocument.documentElement);t.css({fontVariant:"normal",fontWeight:"normal",lineSpacing:"normal",lineHeight:"normal",textDecoration:"none"});var a=i.css("color");a&&t.css("color",a);var r=i.css("fontFamily");r&&t.css("fontFamily",r);var o=i.css("fontSize");o&&t.css("fontSize",o)}},_moveToCaretPosition:function(t,n){var i=this.editor.body,a=r.offset(t,i),o=this._caretOffset(n,i),s="translate("+(o.left-a.left)+"px,"+(o.top-a.top)+"px)";e(t).css({"-webkit-transform":s,transform:s})},_caretOffset:function(e,t){var n,i=this.editor,a=r.create(i.document,"span",{innerHTML:"\ufeff"}),o=e.startContainer;if(e.collapsed){var s=r.isDataNode(o);s&&(r.isBom(o)||0===e.startOffset)?r.insertBefore(a,o):s&&e.startOffset===o.length?r.insertAfter(a,o):(e.insertNode(a),n=!0)}else o=o===t?o.childNodes[e.startOffset]:o,r.insertBefore(a,o);var l=r.offset(a,t),d=a.previousSibling,u=a.nextSibling;if(r.remove(a),n&&r.isDataNode(d)&&r.isDataNode(u)&&!r.isBom(d)&&!r.isBom(u)){var c=d.length;u.data=d.data+u.data,e.setStart(u,c),r.remove(d),e.collapse(!0),i.selectRange(e)}return l},expandImmutablesIn:function(e){var n=this.editor;if(n&&n.options.immutables){var i=n.body;if(e=e||n.getRange(),t.ui.editor.Immutables.expandImmutablesIn(e),e.startContainer===i&&0===e.startOffset){var a=i.ownerDocument.createTextNode("\ufeff");i.insertBefore(a,i.childNodes[0]),e.setStartBefore(a)}n.selectRange(e)}},splittableParent:function(e,t){var n,i;if(e)return r.closestEditableOfType(t,["p","ul","ol"])||t.parentNode;if(n=t.parentNode,i=t.ownerDocument.body,r.isInline(n))for(;n.parentNode!=i&&!r.isBlock(n.parentNode);)n=n.parentNode;return n},paste:function(t,n){var i,o,l,u=this.editor;if(this.expandImmutablesIn(),!(n=d({clean:!1,split:!0},n)).skipCleaners)for(i=0,o=this.cleaners.length;i<o;i++)this.cleaners[i].applicable(t)&&(t=this.cleaners[i].clean(t));n.clean&&(t=(t=t.replace(/(<br>(\s|&nbsp;)*)+(<\/?(div|p|li|col|t))/gi,"$3")).replace(/<(a|span)[^>]*><\/\1>/gi,"")),t=(t=t.replace(/<(a|span|font)([^>]*)> <\/\1>/gi,"<$1$2>&nbsp;</$1>")).replace(/^<li/i,"<ul><li").replace(/li>$/g,"li></ul>");var c=this.isBlock(t);u.focus();var p=u.getRange();p.deleteContents(),p.startContainer==u.document&&p.selectNodeContents(u.body);var h=new s,f=h.addCaret(p),m=this.splittableParent(c,f),g=!1,v=m!=u.body&&!r.is(m,"td");n.split&&v&&(c||r.isInline(m))&&(p.selectNode(f),a.split(p,m,!0),g=!0);var _=this.htmlToFragment(t);if(_.firstChild&&"k-paste-container"===_.firstChild.className){var b=[];for(i=0,o=_.childNodes.length;i<o;i++)b.push(_.childNodes[i].innerHTML);_=this.htmlToFragment(b.join("<br />"))}if(l=_.childNodes,e(l).filter("table").addClass("k-table").end().find("table").addClass("k-table"),e(l).each((function(e,t){r.isBlock(t)&&!r.isSelfClosing(t)&&""===t.innerHTML&&t.appendChild(u.document.createTextNode("\ufeff"))})),p.insertNode(_),m=this.splittableParent(c,f),g){for(;f.parentNode!=m;)r.unwrap(f.parentNode);r.unwrap(f.parentNode)}r.normalize(p.commonAncestorContainer),f.style.display="inline",r.restoreScrollTop(u.document),r.scrollTo(f),h.removeCaret(p);var k=p.commonAncestorContainer.parentNode;(p.collapsed&&"tbody"==r.name(k)||p.collapsed&&"thead"==r.name(k))&&(p.setStartAfter(e(k).closest("table")[0]),p.collapse(!0));var w=e(p.commonAncestorContainer.parentNode).closest("table");if(w.get(0)){for(var y=w.parent().contents(),x=y.length-1,C=y.get(x);null!==C.nodeValue&&(" "===C.nodeValue||""===C.nodeValue);)x-=1,C=y.get(x);C!==w.get(0)||w.parents("table").length||r.insertAfter(r.createEmptyNode(u.document,"p"),w[0])}u.selectRange(p)}}),c=n.extend({init:function(e){this.options=e||{},this.replacements=[]},clean:function(e,t){var n,i,a=t||this.replacements;for(n=0,i=a.length;n<i;n+=2)e=e.replace(a[n],a[n+1]);return e}}),p=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)}}),h=c.extend({init:function(e){c.fn.init.call(this,e);this.replacements=[/<span\s+class="Apple-tab-span"[^>]*>\s*<\/span>/gi," ",/\t/gi," ",/&nbsp;&nbsp; &nbsp;/gi," "]},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,"<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.exec(n),a=n&&i&&i[1];return t?"</span>":a?'<span style="font-family:'+a+'">':"<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,a=r.innerText(e),o=i.match(/^(?:<span [^>]*texhtml[^>]*>)?<span [^>]*(?:Symbol|Wingdings)[^>]*>([^<]+)/i),s=o&&o[1],l=/^[a-z\d]/i.test(s),d=function(e){return e.replace(/^(?:&nbsp;|[\u00a0\n\r\s])+/,"")};return o&&(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(a))}:/^\s*\w+[\.\)][\u00a0 ]{2,}/.test(i)?{tag:"ol",style:this._guessOrderedListStyle(d(a))}:void 0},_convertToLi:function(e){var t;return 1==e.childNodes.length?(t=e.firstChild.nodeType===r.nodeTypes.TEXT_NODE?r.innerText(e):e.firstChild.innerHTML.replace(/^\w+[\.\)](&nbsp;)+ /,""),t=this._checkForBullet(t)):t=this._getHtmlNoBullet(e),r.remove(e),r.create(document,"li",{innerHTML:t})},_checkForBullet:function(e){var t=r.create(document,"p",{innerHTML:e});return/^\s*\w+[\.\)]\s+/.test(t.innerText)?this._getHtmlNoBullet(t):e},_getHtmlNoBullet:function(e){var t=r.name(e);return r.remove(e.firstChild),3==e.firstChild.nodeType&&/^[ivxlcdm]+\.$/i.test(e.firstChild.nodeValue)&&r.remove(e.firstChild),/^(&nbsp;|\s)+$/i.test(e.firstChild.innerHTML)&&r.remove(e.firstChild),"p"!=t?"<"+t+">"+e.innerHTML+"</"+t+">":e.innerHTML},_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){return e=e.replace(/style=['"]?[^'"]*?mso-list:\s?[a-zA-Z]+(\d+)\s[a-zA-Z]+(\d+)\s(\w+)/gi,(function(e,n,i){return t.format('data-list="{0}" data-level="{1}" {2}',n,i,e)}))},_createList:function(e,t){return r.create(document,e,{style:{listStyleType:t}})},lists:function(t){var n,i,a,o,s,d,u,c,p,h,f,m,g,v=e(t).find(r.blockElements.join(",")),_=-1,b={},k=["p","h1","h2","h3","h4","h5","h6"];for(c=0;c<v.length;c++){p=v[c];var w=(g=e(p).data()).list;if(n=r.name(p),!!!e(p).parents("table").length){var y=this.listType(p,g);if(!(h=y&&y.tag)||k.indexOf(n)<0)p.innerHTML?i&&!d&&i.appendChild(p):r.remove(p);else if(!l.msie){var x=h+w;b[f=g.level||parseFloat(p.style.marginLeft||0)]||(b[f]={}),(!a||a<0)&&(a=f,o=w,s=e(t).find("[data-list='"+o+"']").last()[0],u=this._createList(h,y.style),r.insertBefore(u,p),_=f,b[f][x]=u),d=s===p,m=b[f][x],(f>_||!m)&&(m=this._createList(h,y.style),b[f][x]=m,i.appendChild(m)),i=this._convertToLi(p),m.appendChild(i),d?a=_=-1:_=f}}}},removeAttributes:function(e){for(var t,n=e.attributes,i=n.length,a=[],o=function(e){(function(e){return["border","background","padding"].filter((function(t){return 0===e.trim().indexOf(t)})).length>0})(e)&&a.push(e.trim())};i--;)"colspan"!=r.name(n[i])&&("style"!==(t=n[i]).name||"TD"!==e.nodeName&&"TH"!==e.nodeName||t.value.split(";").forEach(o),e.removeAttributeNode(n[i]));a.length>0&&e.setAttribute("style",a.join(";"))},createColGroup:function(n){var i=n.cells,a=e(n).closest("table"),r=a.children("colgroup");i.length<2||(r.length&&(i=r.children(),r[0].parentNode.removeChild(r[0])),(r=e(e.map(i,(function(e){var n=e.width;return n&&0!==parseInt(n,10)?t.format('<col style="width:{0}px;"/>',n):"<col />"})).join(""))).is("colgroup")||(r=e("<colgroup/>").append(r)),r.prependTo(a))},convertHeaders:function(t){var n,i=t.cells,a=e.map(i,(function(t){var n=e(t).children("p").children("strong")[0];if(n&&"strong"==r.name(n))return n}));if(a.length==i.length){for(n=0;n<a.length;n++)r.unwrap(a[n]);for(e(t).closest("table").find("colgroup").after("<thead></thead>").end().find("thead").append(t),n=0;n<i.length;n++)r.changeTag(i[n],"th")}},removeParagraphs:function(t){var n,i,a,o;for(n=0;n<t.length;n++)for(this.removeAttributes(t[n]),i=0,a=(o=e(t[n]).children("p")).length;i<a;i++)i<a-1&&r.insertAfter(r.create(document,"br"),o[i]),r.unwrap(o[i])},removeTextNodes:function(e){var t,n,i,a,o;for(t=0;t<e.length;t++)for(i=(o=e[t]).childNodes,n=0;n<i.length;n++)(a=i[n]).nodeType===r.nodeTypes.TEXT_NODE&&o.removeChild(a)},tables:function(t){var n,i,a,r,o,s=e(t).find("table"),l=this;for(r=0;r<s.length;r++){for(a=i=(n=s[r].rows)[0],o=1;o<n.length;o++)n[o].cells.length>a.cells.length&&(a=n[o]);l.createColGroup(a),l.convertHeaders(i),l.removeAttributes(s[r]),l.removeParagraphs(s.eq(r).find("td,th")),l.removeTextNodes(s.eq(r).find("tr"))}},headers:function(t){for(var n=e(t).find("p.MsoTitle"),i=0;i<n.length;i++)r.changeTag(n[i],"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=i.msConvertLists?this.extractListLevels(e):e,e=c.fn.clean.call(n,e),e=n.stripEmptyAnchors(e),t=r.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=r.create(document,"div",{innerHTML:e});return(t=this.cleanDom(t)).innerHTML},cleanDom:function(e){return e}}),v=g.extend({cleanDom:function(t){var n=this.collectTags();return e(t).find(n).each((function(){r.unwrap(this)})),t},collectTags:function(){if(this.options.span)return"span"},applicable:function(){return this.options.span}}),_=g.extend({cleanDom:function(t){var n=this.collectAttr();return e(t).find("["+n.join("],[")+"]").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=this.separators,t="",n=this.lines;this.flashInlineBlockText();for(var i=0,a=n.length,r=a-1;i<a;i++){for(var o=n[i],s=0,l=o.length,d=l-1;s<l;s++){t+=o[s].text,s!==d&&(t+=e.text)}i!==r&&(t+=e.line)}return t},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){if(e){var t=this.callback(e),n=e.firstChild;!t&&n&&this.enumerate(n),this.enumerate(e.nextSibling)}}}),y=c.extend({init:function(e){c.fn.init.call(this,e),this.hasText=!1,this.enumerator=new w(this.buildText.bind(this))},clean:function(e){var t=r.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(r.isDataNode(e)){if(r.isEmptyspace(e))return;this.htmlLines.appendText(e.nodeValue.replace("\n",this.separators.line)),this.hasText=!0}else{if(r.isBlock(e)&&this.hasText)return(this.actions[r.name(e)]||this.actions.block)(this,e);r.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}).cleanDom(t);return e.htmlLines.appendInlineBlockText(n),!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:p,TabCleaner:h,MSWordFormatCleaner:f,WebkitFormatCleaner:m,HtmlTagsCleaner:v,HtmlAttrCleaner:_,HtmlContentCleaner:y,HtmlTextLines:k,CustomCleaner:x})}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.Class,i=t.ui.editor,a=i.RangeUtils,r=i.Dom,o=i.RestorePoint,s=i.Marker,l=t.support.browser,d="<span class='k-br'>\ufeff</span>",u=e.extend,c=r.nodeTypes,p="previousSibling";function h(e,t,n){for(var i=e?e[t]:null;i&&!n(i);)i=i[t];return i}var f="td,th,caption",m="table,tbody,thead,tfoot,tr",g=function(t){return!t.collapsed&&e(t.commonAncestorContainer).is(m)},v=n.extend({remove:function(t){var n=new s;n.add(t,!1);var i=a.getAll(t,(function(t){return e(t).is("table,tbody,thead,tfoot,tr,td,th,caption")})),o=a.documentFromRange(t),l=n.start,d=n.end,u=f.split(","),c=r.parentOfType(l,u),p=r.parentOfType(d,u);this._removeContent(l,c,!0),this._removeContent(d,p,!1),e(i).each((function(t,n){((n=e(n)).is(f)?n:n.find(f)).each((function(e,t){t.innerHTML="&#65279;"}))})),c&&!l.previousSibling&&r.insertBefore(o.createTextNode("\ufeff"),l),p&&!d.nextSibling&&r.insertAfter(o.createTextNode("\ufeff"),d),c?t.setStartBefore(l):i[0]&&(c=(c=e(i[0])).is(f)?c:c.find(f).first()).length&&t.setStart(c.get(0),0),t.collapse(!0),r.remove(l),r.remove(d)},_removeContent:function(t,n,i){if(n){var a,o=i?"nextSibling":"previousSibling",s=function(t){for(;t&&!t[o];)t=t.parentNode;return t&&e.contains(n,t)?t[o]:null};for(t=s(t);t;)a=s(t),r.remove(t),t=a}}}),_=n.extend({init:function(e){this.editor=e},keydown:function(t){var n=this,a=n.editor,r=a.keyboard,s=r.isTypingKey(t),d=u(e.Event(),t);if(n.editor.trigger("keydown",d),d.isDefaultPrevented())return t.preventDefault(),!0;if(!d.isDefaultPrevented()&&s&&!r.isTypingInProgress()){var c=a.getRange(),p=a.body;if(n.startRestorePoint=new o(c,p),g(c))new v(a).remove(c),a.selectRange(c);if(l.webkit&&!c.collapsed&&function(e,t){return t.startContainer===e&&t.endContainer===e&&0===t.startOffset&&t.endOffset==e.childNodes.length}(p,c)&&(p.innerHTML=""),a.immutables&&i.Immutables.immutablesContext(c))new i.BackspaceHandler(a).deleteSelection(c);return r.startTyping((function(){n._removeBomSpan(),n.endRestorePoint=i._finishUpdate(a,n.startRestorePoint)})),!0}return!1},keyup:function(e){var t=this.editor.keyboard;return this.editor.trigger("keyup",e),!!t.isTypingInProgress()&&(t.endTyping(),!0)},_removeBomSpan:function(){var e=this.editor.getRange().commonAncestorContainer;r.emptyNode(e)||(3===e.nodeType&&(e=e.parentNode),r.insignificant(e)&&(e.textContent=r.stripBom(e.textContent),r.unwrap(e)))}}),b=n.extend({init:function(e){this.editor=e},_addCaret:function(e){var n=r.create(this.editor.document,"a");return!t.support.browser.chrome&&e.firstChild&&e.firstChild.nodeType===c.ELEMENT_NODE&&(e=e.firstChild),r.insertAt(e,n,0),r.stripBomNode(n.previousSibling),r.stripBomNode(n.nextSibling),n},_restoreCaret:function(e){var t=this.editor.createRange();!e.nextSibling&&r.isDataNode(e.previousSibling)?t.setStart(e.previousSibling,e.previousSibling.length):t.setStartAfter(e),t.collapse(!0),this.editor.selectRange(t),r.remove(e)},_handleDelete:function(e){var t=e.endContainer,n=r.closestEditableOfType(t,r.blockElements);if(n&&i.RangeUtils.isEndOf(e,n)){var a=r.next(n);if(!a||"p"!=r.name(a))return!1;var o=r.significantChildNodes(a)[0];o=o&&r.isInline(o)?o:a;var s=this._addCaret(o);return this._merge(n,a),this._restoreCaret(s),!0}return!1},_cleanBomBefore:function(e){for(var t=e.startOffset,n=e.startContainer,i=n.nodeValue,a=0;t-a>=0&&"\ufeff"==i[t-a-1];)a++;a>0&&(n.deleteData(t-a,a),e.setStart(n,Math.max(0,t-a)),e.collapse(!0),this.editor.selectRange(e))},_handleBackspace:function(t){var n,a=t.startContainer,o=r.closestEditableOfType(a,["li"]),s=r.closestEditableOfType(a,"p,h1,h2,h3,h4,h5,h6".split(",")),l=this.editor;if(r.isDataNode(a)){if(t.collapsed&&/^\s[\ufeff]+$/.test(a.nodeValue))return t.setStart(a,0),t.setEnd(a,a.length),l.selectRange(t),!1;this._cleanBomBefore(t)}n=h(s,p,(function(e){return!r.htmlIndentSpace(e)})),t.collapsed&&t.startOffset!==t.endOffset&&t.startOffset<0&&(t.startOffset=0,t.endOffset=0,l.selectRange(t));var d=o&&i.RangeUtils.isStartOf(t,o),u=o&&e(o).index(),c=d&&u>0;if(c&&(s=o,n=r.prev(o)),s&&n&&r.is(n,"table")&&i.RangeUtils.isStartOf(t,s))return""===s.innerText&&(s.innerHTML="\ufeff"),!0;if(i.RangeUtils.isStartOf(t,s)&&parseInt(s.style.marginLeft,10)>0)return l.exec("outdent"),!0;if(s&&n&&i.RangeUtils.isStartOf(t,s)||c){var f=r.significantChildNodes(s)[0];f=f&&r.isInline(f)?f:s;var m=this._addCaret(f);return this._merge(n,s),this._restoreCaret(m),!0}if(d&&0===u){var g=o.firstChild;g||(o.innerHTML=i.emptyElementContent,g=o.firstChild);var v=new i.ListFormatter(r.name(o.parentNode),"p");return t.selectNodeContents(o),v.toggle(t),r.insignificant(g)?t.setStartBefore(g):t.setStart(g,0),l.selectRange(t),!0}var _=a.childNodes[t.startOffset-1],b=t,k=_&&r.closestEditableOfType(_,["a"]),w=h(_||a,p,(function(e){return!r.isDataNode(e)||!r.isBom(e)&&e.length>0}));if((k||(0===t.startOffset||_)&&r.is(w,"a"))&&(k=k||w,(b=l.createRange()).setStart(k,k.childNodes.length),b.collapse(!0)),(k=k||r.closestEditableOfType(_||b.startContainer,["a"]))&&i.RangeUtils.isEndOf(b,k)){var y=new i.UnlinkCommand({range:b,body:l.body,immutables:!!l.immutables});l.execCommand(y),l._selectionChange()}return!1},_handleSelection:function(t){var n,a=t.commonAncestorContainer,o=r.closest(a,"table"),l=i.emptyElementContent,d=this.editor;if(g(t))return new v(d).remove(t),d.selectRange(t),!0;var u=new s;u.add(t,!1),t.commonAncestorContainer===d.body&&this._surroundFullyContent(u,t),d.immutables&&this._handleImmutables(u),this._surroundFullySelectedAnchor(u,t),t.setStartAfter(u.start),t.setEndBefore(u.end);var c=t.startContainer,p=t.endContainer;return t.deleteContents(),"li"===p.tagName.toLocaleLowerCase()&&r.emptyNode(p)&&(t.selectNode(p),t.deleteContents()),o&&""===e(o).text()&&(t.selectNode(o),t.deleteContents()),a=t.commonAncestorContainer,"p"===r.name(a)&&""===a.innerHTML&&(a.innerHTML=l,t.setStart(a,0)),this._join(c,p),r.insertAfter(d.document.createTextNode("\ufeff"),u.start),u.remove(t),c=t.startContainer,"tr"==r.name(c)&&(c=c.childNodes[Math.max(0,t.startOffset-1)],t.setStart(c,r.getNodeLength(c))),t.collapse(!0),d.selectRange(t),n=c.parentElement||c.parentNode,r.isDataNode(c)&&!r.emptyNode(n)&&this._cleanBomBefore(t),!0},_handleImmutables:function(e){var t=i.Immutables.immutableParent,n=t(e.start),a=t(e.start);n&&r.insertBefore(e.start,n),a&&r.insertAfter(e.end,a),n&&r.remove(n),a&&a.parentNode&&r.remove(a)},_surroundFullyContent:function(e,t){var n=t.commonAncestorContainer.children,i=n[0],a=n[n.length-1];this._moveMarker(e,t,i,a)},_surroundFullySelectedAnchor:function(t,n){var i=t.start,a=e(i).closest("a").get(0),r=t.end,o=e(r).closest("a").get(0);this._moveMarker(t,n,a,o)},_moveMarker:function(e,t,n,i){var o=e.start,s=e.end;n&&a.isStartOf(t,n)&&r.insertBefore(o,n),i&&a.isEndOf(t,i)&&r.insertAfter(s,i)},_root:function(e){for(;e&&"body"!=r.name(e)&&e.parentNode&&"body"!=r.name(e.parentNode);)e=e.parentNode;return e},_join:function(e,t){(e=this._root(e))!=(t=this._root(t))&&r.is(t,"p")&&this._merge(e,t)},_merge:function(e,t){for(r.removeTrailingBreak(e);e&&t.firstChild;)1==e.nodeType?(e=r.list(e)?e.children[e.children.length-1]:e)&&e.appendChild(t.firstChild):e.nodeType===c.TEXT_NODE?this._mergeWithTextNode(e,t.firstChild):e.parentNode.appendChild(t.firstChild);r.remove(t)},_mergeWithTextNode:function(e,t){e&&e.nodeType===c.TEXT_NODE&&(e.nextSibling&&this._isCaret(e.nextSibling)?r.insertAfter(t,e.nextSibling):r.insertAfter(t,e))},_isCaret:function(t){return e(t).is("a")},keydown:function(e){var n,a,r=this.editor,s=r.getRange(),l=e.keyCode,d=t.keys,u=l===d.BACKSPACE,c=l==d.DELETE;r.immutables&&r.immutables.keydown(e,s)||(!u&&!c||s.collapsed?u?n="_handleBackspace":c&&(n="_handleDelete"):n="_handleSelection",n&&(a=new o(s,r.body),this[n](s)&&(e.preventDefault(),i._finishUpdate(r,a))))},deleteSelection:function(e){this._handleSelection(e)},keyup:e.noop}),k=n.extend({init:function(e){this.editor=e,this.systemCommandIsInProgress=!1},createUndoCommand:function(){this.startRestorePoint=this.endRestorePoint=i._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 o(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)}}),w=n.extend({init:function(e){this.editor=e},keydown:function(e){!l.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),setTimeout((function(){e.selectRange(t)}))},_toSelectableImmutables:function(){for(var t=this.editor.body,n=i.Immutables.immutable,a=r.emptyTextNode,o=t.firstChild,s=t.lastChild;a(o);)o=o.nextSibling;for(;a(s);)s=s.previousSibling;o&&n(o)&&e(d).prependTo(t),s&&n(s)&&e(d).appendTo(t)},keyup:e.noop}),y=n.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,a,r=String.fromCharCode(n.keyCode),o=this._getShortcutModifier(n,navigator.platform);for(i in t)if(((a=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options)).key==r||a.key==n.keyCode)&&a.ctrl==o&&a.alt==n.altKey&&a.shift==n.shiftKey)return i},_getShortcutModifier:function(e,t){return t.toUpperCase().indexOf("MAC")>=0?e.metaKey:e.ctrlKey},toolsFromShortcut:function(t,n){var i,a,r=String.fromCharCode(n.keyCode),o=[],s=function(e){return e==r||e==n.keyCode||e==n.charCode};for(i in t)a=e.extend({ctrl:!1,alt:!1,shift:!1},t[i].options),(Array.isArray(a.key)?e.grep(a.key,s).length>0:s(a.key))&&a.ctrl==n.ctrlKey&&a.alt==n.altKey&&a.shift==n.shiftKey&&o.push(t[i]);return o},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(e){var t=this;t.clearTimeout(),e?t.stopTyping():t.timeout=window.setTimeout(t.stopTyping.bind(t),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")}});u(i,{TypingHandler:_,SystemHandler:k,BackspaceHandler:b,SelectAllHandler:w,Keyboard:y})}(window.kendo.jQuery),function(e){var t=window.kendo.ui.editor,n=t.Command,i=t.EditorUtils,a=i.registerTool,r=t.Tool,o=t.ToolTemplate,s=e.extend,l=n.extend({init:function(e){this.async=!0,n.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._initializeElementResizing()}))}});s(t,{ExportPdfCommand:l}),a("pdf",new r({command:l,template:new o({template:i.buttonTemplate,title:"Export PDF"})}))}(window.kendo.jQuery),function(e){var t=window.kendo,n=t.ui.editor,i=n.Command,a=n.EditorUtils,r=a.registerTool,o=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}),r("print",new o({command:d,template:new s({template:a.buttonTemplate,title:"Print"})}))}(window.kendo.jQuery),function(e){var t=window.kendo.ui.editor,n=t.Tool,i=t.Command,a=t.ToolTemplate,r=t.EditorUtils,o=t.Dom,s=t.RangeUtils,l=r.registerTool,d=i.extend({init:function(e){i.fn.init.call(this,e)},exec:function(){var e=this.lockRange(!0);this.inlineStyles=[],this.blockStyles=[],this.collectStyles(e),this.editor.inlineStyles=this.inlineStyles,this.editor.blockStyles=this.blockStyles,this.releaseRange(e)},collectStyles:function(e){var t,n=s.nodes(e);for(t=1===n.length?n[0].parentNode:e.startContainer;t&&!o.is(t,"body")&&"editor"!==t.getAttribute("data-role");)o.isBlock(t)?(this.populateStyles(t,"blockStyles"),t=o.is(t,"li")?t.parentNode:null):(this.populateStyles(t,"inlineStyles"),t=t.parentNode)},populateStyles:function(e,t){var n,i,a,r,o,s=e.style,l=e.attributes,d={tags:[e.tagName],attr:{style:{}}};for(o=0;s&&o<s.length;o++)n=s[i=s[o]],d.attr.style[i]=n;for(o=0;l&&o<l.length;o++)a=l[o].nodeName,r=l[o].nodeValue,"style"!==a&&("class"===a?d.attr.className=r:d.attr[a]=r);this[t].push(d)}}),u=i.extend({init:function(e){i.fn.init.call(this,e)},exec:function(){var e,t=this.lockRange(!0),n=s.getMarkers(t),i=this.editor,a=i.inlineStyles,r=i.blockStyles;(a&&0!==a.length||r&&0!==r.length)&&(3===n.length&&(this.marker.removeCaret(t),this.marker.caret=null),this.removeEmptyElementsFromRange(t),e=s.nodes(t),this.cleanInlineParents(e),o.normalize(t.commonAncestorContainer),2===n.length?(t.setStartAfter(n[0]),t.setEndBefore(n[1])):(t.setStartBefore(e[0]),t.setEndAfter(e[0])),(e=s.nodes(t))&&r&&r.length&&this.applyBlockStyles(e,r),e&&a&&a.length&&this.applyInlineStyles(e,a),this.releaseRange(t))},removeEmptyElementsFromRange:function(e){var t,n;if((t=s.getAll(e,(function(e){return o.isInline(e)&&!e.firstChild&&!o.isMarker(e)})))&&t.length>0)for(n=0;n<t.length;n++)t[n].parentNode.removeChild(t[n])},cleanInlineParents:function(e){var t,n,i,a,r,s,l;for(t=0;t<e.length;t++)if(i=(n=e[t]).parentNode,!this.immutableParent(n))for(;i&&o.isInline(i);){for(a=i.childNodes,r=0;r<a.length;r++)s=a[r],o.isMarker(s)||s===n||((l=i.cloneNode(!0)).innerHTML="",o.wrap(s,l));o.unwrap(i),i=n.parentNode}},applyBlockStyles:function(e,t){var n,i,a,r,s,l,d,u,c,p,h,f,m,g,v,_=t[0].tags[0],b=t[0].attr,k=this.editor.document;for(n=0,i=e.length;n<i;n++)if(a=e[n],!o.isWhitespace(a)&&!this.immutableParent(a))if("BODY"!==(s=o.blockParentOrBody(a)).tagName&&s.tagName!==_){if("LI"!==s.tagName&&"TD"!==s.tagName&&"TH"!==s.tagName){for(d=[],u=[],c=a.previousSibling,p=a.nextSibling;c;)o.isMarker(c)||d.push(c),c=c.previousSibling;if(d.length)for((h=s.cloneNode(!0)).innerHTML="",o.insertBefore(h,d[0]),g=0;g<d.length;g++)m=d[g],o.insertAt(h,m,0);for(;p;)o.isMarker(p)||u.push(p),p=p.nextSibling;if(u.length)for((f=s.cloneNode(!0)).innerHTML="",o.insertBefore(f,u[0]),g=0;g<u.length;g++)m=u[g],f.appendChild(m);o.unwrap(s)}r=o.create(k,_,b),o.wrap(a,r)}else s.tagName===_&&o.attr(s,b);if(s&&2===t.length&&"LI"!==s.tagName&&"LI"===_){for(v=[];o.is(r,"li");)v.push(r),r=o.prev(r);for(l=o.create(k,t[1].tags[0],t[1].attr),o.insertBefore(l,v[v.length-1]),l.appendChild(v[0]),n=1,i=v.length;n<i;n++)o.insertBefore(v[n],l.firstChild)}else s&&2===t.length&&"LI"!==s.tagName&&(l=o.create(k,t[1].tags[0],t[1].attr),o.wrap(r,l))},applyInlineStyles:function(e,t){var n,i,a,r,s,l,d=this.editor.document;for(r=0;r<t.length;r++)n=t[r],i=o.create(d,n.tags[0],n.attr),a&&i.appendChild(a),a=i;if(a)for(r=0;r<e.length;r++)if(l=e[r],!o.isWhitespace(l)&&!this.immutableParent(l)){for(s=a.cloneNode(!0),o.insertBefore(s,l);s.children&&s.children.length;)s=s.children[0];s.appendChild(l)}},immutables:function(){return this.editor&&this.editor.options.immutables},immutableParent:function(e){return this.immutables()&&t.Immutables.immutableParent(e)}}),c=n.extend({init:function(e){n.fn.init.call(this,e)},command:function(e){return new d(e)}}),p=n.extend({init:function(e){n.fn.init.call(this,e)},command:function(e){return new u(e)}});e.extend(t,{CopyFormatCommand:d,ApplyFormatCommand:u,CopyFormatTool:c,ApplyFormatTool:p}),l("copyFormat",new c({template:new a({template:r.buttonTemplate,title:"Copy format"})})),l("applyFormat",new p({template:new a({template:r.buttonTemplate,title:"Apply format"})}))}(window.kendo.jQuery),function(e,t){var n=window,i=n.Math,a=i.min,r=i.max,o=n.parseFloat,s=e.jQuery,l=s.extend,d=e.ui.editor,u=/(\d+)(\.?)(\d*)%/,c=/(\d+)(\.?)(\d*)px/,p="string";function h(e){return typeof e===p&&u.test(e)}l(d,{ResizingUtils:{constrain:function(e){var t=e.value,n=e.min,i=e.max;return r(a(o(t),o(i)),o(n))},getScrollBarWidth:function(t){return t&&!s(t).is("body")&&t.scrollHeight>t.clientHeight?e.support.scrollbar():0},calculatePercentageRatio:function(e,t){return h(e)?o(e):o(e)/t*100},inPercentages:h,inPixels:function(e){return typeof e===p&&c.test(e)},toPercentages:function(e){return o(e)+"%"},toPixels:function(e){return o(e)+"px"}}})}(window.kendo),function(e,t){var n=e.jQuery,i=n.extend,a=n.noop,r=e.ui.editor,o=e.Class,s="keydown",l="mouseleave",d="mouseup",u="table",c=o.extend({init:function(e,t){var a=this;a.options=i({},a.options,t),a.options.tags=Array.isArray(a.options.tags)?a.options.tags:[a.options.tags],n(e).is(u)&&(a.element=e,a._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(s+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("mousemove"+t.eventNamespace,t.tags.join(","),e.detectElementBorderHovering.bind(e))},resizingInProgress:function(){var e=this._resizable;return!!e&&!!e.resizing},resize:a,detectElementBorderHovering:function(e){var t=this,i=t.options.handle,a=n(e.currentTarget),r=t.resizeHandle,o=i.dataAttribute;t.resizingInProgress()||(!a.is(":last-child")&&t.elementBorderHovered(a,e)?r?r.data(o)&&r.data(o)!==a[0]&&t.showResizeHandle(a,e):t.showResizeHandle(a,e):r&&t._destroyResizeHandle())},elementBorderHovered:a,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:a,setResizeHandleDimensions:a,setResizeHandleDataAttributes:function(e){this.resizeHandle.data(this.options.handle.dataAttribute,e)},_attachResizeHandleEventHandlers:function(){var e=this,t=e.options,n=t.eventNamespace,i=t.handle.classNames.marker,a=e.resizeHandle;e.resizeHandle.on("mousedown"+n,(function(){a.find("."+i).show()})).on(d+n,(function(){a.find("."+i).hide()}))},_hideResizeMarker:function(){this.resizeHandle.find("."+this.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:n.onResizeStart.bind(n),resize:n.onResize.bind(n),resizeend:n.onResizeEnd.bind(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:a,onResizeEnd:function(e){var t=this;t.resize(e),t._destroyResizeHandle(),t._enableKeyboard()},_enableKeyboard:function(){var e=this.options;n(e.rootElement).off(s+e.eventNamespace)},_disableKeyboard:function(){var e=this.options;n(e.rootElement).on(s+e.eventNamespace,(function(e){e.preventDefault()}))},_forceResizing:function(e){var t=this._resizable;t&&t.userEvents&&t.userEvents._end(e)}}),p=o.extend({create:function(e,t){var i=this,a=t.name,r=t.eventNamespace;n(e.body).on("mouseenter"+r,u,(function(n){var r=n.currentTarget,o=e[a];n.stopPropagation(),o?o.element===r||o.resizingInProgress()||(i._destroyResizing(e,t),i._initResizing(e,r,t)):i._initResizing(e,r,t)})).on(l+r,u,(function(r){var o,s=e[a];r.stopPropagation(),!s||s.resizingInProgress()||s.resizeHandle||(o=n(s.element).parents(u)[0])&&(i._destroyResizing(e,t),i._initResizing(e,o,t))})).on(l+r,(function(){var n=e[a];n&&!n.resizingInProgress()&&i._destroyResizing(e,t)})).on(d+r,(function(r){var o,s=e[a];s&&s.resizingInProgress()&&(o=n(r.target).parents(u)[0])&&(s._forceResizing(r),i._destroyResizing(e,t),i._initResizing(e,o,t))}))},dispose:function(e,t){n(e.body).off(t.eventNamespace)},_initResizing:function(t,n,i){var a=i.name,r=i.type;t[a]=new r(n,{rtl:e.support.isRtl(t.element),rootElement:t.body})},_destroyResizing:function(e,t){var n=t.name;e[n]&&(e[n].destroy(),e[n]=null)}});p.current=new p,c.create=function(e,t){p.current.create(e,t)},c.dispose=function(e,t){p.current.dispose(e,t)},i(r,{TableElementResizing:c})}(window.kendo),function(e,t){var n=window.Math.abs,i=e.jQuery,a=i.extend,r=e.ui.editor,o=r.Dom,s=r.TableElementResizing,l=r.ResizingUtils,d=l.constrain,u=l.calculatePercentageRatio,c=l.getScrollBarWidth,p=l.inPercentages,h=l.toPercentages,f=l.toPixels,m=e._outerWidth,g=".kendoEditorColumnResizing",v="k-column-resize-handle",_="k-column-resize-marker",b="body",k="tbody",w="thead",y="tr",x="col-index",C=",",T=s.extend({options:{tags:["td","th"],min:20,rootElement:null,eventNamespace:g,rtl:!1,handle:{dataAttribute:"column",width:10,height:0,classNames:{handle:v,marker:_},template:'<div class="k-column-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="k-column-resize-handle"><div class="k-column-resize-marker"></div></div></div>'}},elementBorderHovered:function(e,t){var n=this.options,a=n.handle.width,r=e.offset().left+(n.rtl?0:m(e)),o=t.clientX+i(e[0].ownerDocument).scrollLeft();return o>r-a&&o<r+a},setResizeHandlePosition:function(t){var n=this,a=i(n.element.tHead||n.element.tBodies[0]),r=n.options,o=r.rtl,s=r.handle.width,l=i(r.rootElement),d=l.is(b)?0:l.scrollTop(),u=l.is(b)?0:e.scrollLeft(l),p=o?0:m(t),h=o?c(l[0]):0,f=t.offset().left-(l.offset().left+parseFloat(l.css("borderLeftWidth")))-parseFloat(t.css("marginLeft")),g=a.offset().top-(l.offset().top+parseFloat(l.css("borderTopWidth")))-parseFloat(a.css("marginTop")),v=e.support.browser;o&&(v.mozilla||v.webkit&&v.version>=85)&&(u*=-1),n.resizeHandle.css({top:g+d,left:f+p+(u-h)-s/2,position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=i(e.element).children(w),n=i(e.element).children(k),a=t.length>0?t.height()+n.height():n.height();e.resizeHandle.css({width:e.options.handle.width,height:a})},setResizeHandleDragPosition:function(t){var n=this,a=i(i(t.currentTarget).data(n.options.handle.dataAttribute)),r=n.options,o=i(r.rootElement),s=r.handle?r.handle.width:0,l=r.min,u=r.rtl,p=m(a),h=a.offset().left-(o.offset().left+parseFloat(o.css("borderLeftWidth")))-parseFloat(a.css("marginLeft")),f=m(a.next()),g=i(n.resizeHandle),v=o.is(b)?0:e.scrollLeft(o),_=u?c(o[0]):0,k=g.offset().left-(o.offset().left+parseFloat(o.css("borderLeftWidth")))-parseFloat(g.css("marginLeft")),w=e.support.browser;u&&(w.mozilla||w.webkit&&w.version>=85)&&(v*=-1);var y=d({value:k+(v-_)+t.x.delta,min:h+(v-_)-(u?f:0)+l,max:h+p+(v-_)+(u?0:f)-s-l});g.css({left:y})},resize:function(e){var t,n,a,r,s,l=this,u=i(i(e.currentTarget).data(l.options.handle.dataAttribute)),c=l.options,p=c.rtl?-1:1,h=c.min,f=p*e.x.initialDelta;o.reMapTableColumns(l.element,x),r=parseInt(u.attr(x),10),u.prop("colSpan")>1&&(u=i(l.element).find("[col-index="+(r+u.prop("colSpan")-1)+"]").eq(0),r=parseInt(u.attr(x),10)),s=i(l.element).find("[col-index="+(r+1)+"]:not([colspan])"),l._setTableComputedWidth(),l._setColumnsComputedWidth(),a=m(u),n=m(s),t=d({value:a+f,min:h,max:a+n-h}),l._resizeColumn(u[0],t),l._resizeTopAndBottomColumns(u[0],t),l._resizeAdjacentColumns(parseInt(u.attr(x),10),n,a,a-t),o.clearTableMappings(l.element,x)},_setTableComputedWidth:function(){var e=this.element;""===e.style.width&&(e.style.width=f(m(i(e))))},_setColumnsComputedWidth:function(){var e,t=i(this.element.tHead||this.element.tBodies[0]),n=m(t),a=t.children(y).children("td"),r=a.length,o=a.map((function(){return m(i(this))}));for(e=0;e<r;e++)p(a[e].style.width)?a[e].style.width=h(u(o[e],n)):a[e].style.width=f(o[e])},_resizeTopAndBottomColumns:function(e,t){var n,a=this,r=i(e).attr(x),o=i(a.element).children("tbody,thead").children(y).children(a.options.tags.join(C)).filter((function(){return i(this).attr(x)===r&&this!==e})),s=o.length;for(n=0;n<s;n++)a._resizeColumn(o[n],t)},_resizeColumn:function(e,t){var n=i(this.element.tHead||this.element.tBodies[0]);p(e.style.width)?e.style.width=h(u(t,m(n))):e.style.width=f(t)},_resizeAdjacentColumns:function(e,t,n,a){var r,o=this,s=i(o.element).children("tbody,thead").children(y).children(o.options.tags.join(C)).filter((function(){return parseInt(i(this).attr(x),10)===e+1})),l=s.length;for(r=0;r<l;r++)o._resizeAdjacentColumn(s[r],t,n,a)},_resizeAdjacentColumn:function(e,t,i,a){var r,o=this.options.min;r=d({value:t+a,min:o,max:n(i+t-o)}),this._resizeColumn(e,r)}});T.create=function(e){s.create(e,{name:"columnResizing",type:T,eventNamespace:g})},T.dispose=function(e){s.dispose(e,{eventNamespace:g})},a(r,{ColumnResizing:T})}(window.kendo),function(e,t){var n=window.Math.abs,i=e.jQuery,a=i.extend,r=e.ui.editor,o=r.TableElementResizing,s=r.ResizingUtils,l=s.getScrollBarWidth,d=s.constrain,u=s.calculatePercentageRatio,c=s.inPercentages,p=s.toPercentages,h=s.toPixels,f=e._outerHeight,m=".kendoEditorRowResizing",g="k-row-resize-handle",v="k-row-resize-marker",_="body",b="tr",k="tbody",w="thead",y=o.extend({options:{tags:[b],min:20,rootElement:null,eventNamespace:m,rtl:!1,handle:{dataAttribute:"row",width:0,height:10,classNames:{handle:g,marker:v},template:'<div class="k-row-resize-handle-wrapper" unselectable="on" contenteditable="false"><div class="k-row-resize-handle"><div class="k-row-resize-marker-wrapper"><div class="k-row-resize-marker"></div></div></div></div>'}},elementBorderHovered:function(e,t){var n=this.options.handle.height,a=e.offset().top+f(e),r=t.clientY+i(e[0].ownerDocument).scrollTop();return r>a-n&&r<a+n},setResizeHandlePosition:function(t){var n=this.options,a=n.handle.height,r=i(n.rootElement),o=r.is(_)?0:r.scrollTop(),s=r.is(_)?0:e.scrollLeft(r),d=n.rtl?l(r[0]):0,u=t.offset().left-(r.offset().left+parseFloat(r.css("borderLeftWidth")))-parseFloat(t.css("marginLeft")),c=t.offset().top-(r.offset().top+parseFloat(r.css("borderTopWidth")))-parseFloat(t.css("marginTop")),p=e.support.browser;n.rtl&&(p.mozilla||p.webkit&&p.version>=85)&&(s*=-1),this.resizeHandle.css({top:c+f(t)+o-a/2,left:u+(s-d),position:"absolute"})},setResizeHandleDimensions:function(){var e=this,t=i(e.element.tHead||e.element.tBodies[0]);e.resizeHandle.css({width:t.width(),height:e.options.handle.height})},setResizeHandleDragPosition:function(e){var t=this,n=t.options,a=n.min,r=i(t.element).children(w),o=i(t.element).children(k),s=r.length>0?r:o,l=i(t.resizeHandle),u=i(e.currentTarget).data(n.handle.dataAttribute),c=i(u),p=i(n.rootElement),h=p.is(_)?0:p.scrollTop(),m=s.offset().top-(p.offset().top+parseFloat(p.css("borderTopWidth")))-parseFloat(s.css("marginTop")),g=c.offset().top-(p.offset().top+parseFloat(p.css("borderTopWidth")))-parseFloat(c.css("marginTop")),v=l.offset().top-(Math.max(0,p.offset().top)+parseFloat(p.css("borderTopWidth")))-parseFloat(l.css("marginTop")),b=d({value:v+h+e.y.delta,min:g+h+a,max:m+f(r)+f(o)+h-n.handle.height-a});l.css({top:b})},resize:function(e){var t=this,a=t.options,r=i(e.currentTarget).data(a.handle.dataAttribute),o=f(i(r)),s=i(t.element),l=f(s),u=s.children(w),p=u.length>0?u.height():0,m=s.children(k).height(),g=r.style.height,v=d({value:o+e.y.initialDelta,min:a.min,max:n(p+m-a.min)});t._setRowsHeightInPixels(),r.style.height=h(v),t._setTableHeight(l+(v-o)),c(g)&&t._setRowsHeightInPercentages()},_setRowsHeightInPixels:function(){var e,t=i(this.element).children("tbody,thead").children(b),n=t.length,a=t.map((function(){return f(i(this))}));for(e=0;e<n;e++)t[e].style.height=h(a[e])},_setRowsHeightInPercentages:function(){var e,t=this,n=i(t.element).children(w),a=n.length>0?n.height():0,r=i(t.element).children(k).height(),o=i(t.element).children("thead,tbody").children(b),s=o.length,l=o.map((function(){return f(i(this))}));for(e=0;e<s;e++)o[e].style.height=p(u(l[e],a+r))},_setTableHeight:function(e){var t=this.element;c(t.style.height)?t.style.height=p(u(e,i(t).parent().height())):t.style.height=h(e)}});y.create=function(e){o.create(e,{name:"rowResizing",type:y,eventNamespace:m})},y.dispose=function(e){o.dispose(e,{eventNamespace:m})},a(r,{RowResizing:y})}(window.kendo),function(e,t){var n=e.jQuery,i=n.extend,a=n.noop,r=e.ui.editor,o=e.Class,s=e.ui.Draggable,l=e.Observable,d=r.ResizingUtils.getScrollBarWidth,u=e._outerWidth,c=e._outerHeight,p=".kendoEditorElementResizeHandle",h="k-element-resize-handle",f="dragStart",m="drag",g="dragEnd",v="halfInside",_="mouseover",b="mouseout",k="east",w="north",y="northeast",x="northwest",C="south",T="southeast",S="southwest",I="west",D=l.extend({init:function(e){var t=this;l.fn.init.call(t),t.options=i({},t.options,e),t.element=n(t.options.template).appendTo(t.options.appendTo)[0],t._attachEventHandlers(),t._addStyles(),t._initDraggable(),t._initPositioningStrategy(),t._initDraggingStrategy(),n(t.element).data("table",t.options.resizableElement)},destroy:function(){var e=this;n(e.element).off(p).remove(),e.element=null,e._destroyDraggable(),e.unbind()},options:{appendTo:null,direction:T,resizableElement:null,rtl:!1,template:"<div class='k-element-resize-handle-wrapper' unselectable='on' contenteditable='false'><div class='k-element-resize-handle'></div></div>"},events:[f,m,g,_,b],show:function(){this._setPosition()},_setPosition:function(){var e=this._positioningStrategy.getPosition();n(this.element).css({top:e.top,left:e.left,position:"absolute"})},_attachEventHandlers:function(){var e=this;n(e.element).on(_+p,e._onMouseOver.bind(e)).on(b+p,e._onMouseOut.bind(e))},_onMouseOver:function(){this.trigger(_)},_onMouseOut:function(){this.trigger(b)},_addStyles:function(){n(this.element).children("."+h).addClass("k-resize-"+this.options.direction)},_initPositioningStrategy:function(){var e=this,t=e.options;e._positioningStrategy=F.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 s(t,{dragstart:e._onDragStart.bind(e),drag:e._onDrag.bind(e),dragend:e._onDragEnd.bind(e)}))},_onDragStart:function(){this.trigger(f)},_onDrag:function(e){this.trigger(m,this._draggingStrategy.adjustDragDelta({deltaX:e.x.delta,deltaY:e.y.delta,initialDeltaX:e.x.initialDelta,initialDeltaY:e.y.initialDelta}))},_onDragEnd:function(){this.trigger(g)},_destroyDraggable:function(){var e=this;e._draggable&&(e._draggable.destroy(),e._draggable=null)},_initDraggingStrategy:function(){this._draggingStrategy=V.create({name:this.options.direction})}}),E=o.extend({init:function(){this._items=[]},register:function(e,t){this._items.push({name:e,type:t})},create:function(e){var t,n,i,a=this._items,r=a.length,o=e.name?e.name.toLowerCase():"";for(i=0;i<r;i++)if((n=a[i]).name.toLowerCase()===o){t=n;break}if(t)return new t.type(e)}}),A=E.extend({});A.current=new A;var F=o.extend({init:function(e){this.options=i({},this.options,e)},options:{handle:null,offset:v,resizableElement:null,rootElement:null,rtl:!1},getPosition:function(){var e=this,t=e.calculatePosition(),n=e.applyHandleOffset(t);return e.applyScrollOffset(n)},calculatePosition:a,applyHandleOffset:function(e){var t=this.options,i=n(t.handle);return t.offset===v?{top:e.top-c(i)/2,left:e.left-u(i)/2}:e},applyScrollOffset:function(t){var i,a=this.options,r=n(a.rootElement),o=a.rtl?d(r[0]):0,s=e.support.browser;return r.is("body")?t:(i=e.scrollLeft(r)||0,a.rtl&&(s.mozilla||s.webkit&&s.version>=85)&&(i*=-1),{top:t.top+(r.scrollTop()||0),left:t.left+i-o})}});F.create=function(e){return A.current.create(e)};var z=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+c(e)/2,left:t.left+u(e)+i}}});A.current.register(k,z);var P=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top,left:t.left+u(e)/2+i}}});A.current.register(w,P);var H=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top,left:t.left+u(e)+i}}});A.current.register(y,H);var N=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top,left:t.left+i}}});A.current.register(x,N);var R=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+c(e),left:t.left+u(e)/2+i}}});A.current.register(C,R);var O=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+c(e),left:t.left+u(e)+i}}});A.current.register(T,O);var M=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+c(e),left:t.left+i}}});A.current.register(S,M);var B=F.extend({calculatePosition:function(){var e=n(this.options.resizableElement),t=e.position(),i=parseInt(e.css("marginLeft"),10);return{top:t.top+c(e)/2,left:t.left+i}}});A.current.register(I,B);var L=E.extend({});L.current=new L;var V=o.extend({init:function(e){this.options=i({},this.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}}});V.create=function(e){return L.current.create(e)};var U=V.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:0,modifier:0}}}),W=U.extend({options:{deltaX:{modifier:1}}});L.current.register(k,W);var j=U.extend({options:{deltaX:{modifier:-1}}});L.current.register(I,j);var q=V.extend({options:{deltaX:{adjustment:0,modifier:0},deltaY:{adjustment:1,modifier:1}}}),G=q.extend({options:{deltaY:{modifier:-1}}});L.current.register(w,G);var K=q.extend({options:{deltaY:{modifier:1}}});L.current.register(C,K);var $=V.extend({options:{deltaX:{adjustment:1,modifier:1},deltaY:{adjustment:1,modifier:1}}}),Y=$.extend({options:{deltaX:{modifier:1},deltaY:{modifier:-1}}});L.current.register(y,Y);var Q=$.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:-1}}});L.current.register(x,Q);var X=$.extend({options:{deltaX:{modifier:1},deltaY:{modifier:1}}});L.current.register(T,X);var J=$.extend({options:{deltaX:{modifier:-1},deltaY:{modifier:1}}});L.current.register(S,J),i(r,{ElementResizeHandle:D})}(window.kendo),function(e,t){var n=window.Math,i=n.min,a=n.max,r=e.jQuery,o=r.contains,s=r.extend,l=e.support.browser,d=e.ui.editor,u=e.Class,c=d.ElementResizeHandle,p=d.ResizingUtils,h=p.calculatePercentageRatio,f=p.constrain,m=p.inPercentages,g=p.inPixels,v=p.toPercentages,_=p.toPixels,b=e._outerWidth,k=e._outerHeight,w=d.RangeUtils,y=".kendoEditorElementResizing",x="k-element-resize-handle-wrapper",C="k-element-resizing",T="dragStart",S="drag",I="dragEnd",D="keydown",E="mousedown",A="select",F="tr",z="tbody",P="thead",H="table",N=["TABLE","IMG"],R="width",O="height";function M(e){return void 0===e}var B=u.extend({init:function(e,t){var n=this;n.options=s({},n.options,t),n.handles=[],N.indexOf(e.nodeName)>=0&&(n.element=e)},destroy:function(){var e=this;r(e.element).off(y),e.element=null,r(e.options.rootElement).off(D+y),e._destroyResizeHandles()},options:{appendHandlesTo:null,rtl:!1,rootElement:null,minWidth:10,minHeight:10,handles:[{direction:"northwest"},{direction:"north"},{direction:"northeast"},{direction:"east"},{direction:"southeast"},{direction:"south"},{direction:"southwest"},{direction:"west"}]},resize:function(e){var t=this,n=s({},{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(){return!1},_resizeHeight:function(){return!1},_getMaxDimensionValue:function(t){var n=this,i=r(n.element),a=t.toLowerCase(),o=n.options.rtl?-1:1,s=r(n.element).parent(),l=s[0],d=s[a](),u=o*(t===R?e.scrollLeft(s):s.scrollTop());return l&&l===i.closest("td")[0]?""!==l.style[a]||m(n.element.style[a])?d+u:1/0:d+u},showResizeHandles:function(){this._initResizeHandles(),this._showResizeHandles()},_initResizeHandles:function(){var e,t=this,n=t.handles,i=t.options,a=t.options.handles,r=a.length;if(!(n&&n.length>0)){for(e=0;e<r;e++)t.handles.push(new c(s({appendTo:i.appendHandlesTo,resizableElement:t.element,rootElement:i.rootElement,rtl:i.rtl},a[e])));t._bindToResizeHandlesEvents()}},_destroyResizeHandles:function(){for(var e=this,t=e.handles?e.handles.length:0,n=0;n<t;n++)e.handles[n].destroy();e.handles=[]},_showResizeHandles:function(){var e,t=(this.handles||[]).length;for(e=0;e<t;e++)this.handles[e].show()},_bindToResizeHandlesEvents:function(){return!1},_onResizeHandleDragStart:function(){var e=this,t=r(e.element);t.addClass(C),e._initialElementHeight=k(t),e._initialElementWidth=b(t),e._disableKeyboard()},_onResizeHandleDrag:function(e){this.resize(e)},_onResizeHandleDragEnd:function(){r(this.element).removeClass(C),this._enableKeyboard()},_enableKeyboard:function(){r(this.options.rootElement).off(D+y)},_disableKeyboard:function(){r(this.options.rootElement).on(D+y,(function(e){e.preventDefault()}))}}),L=B.extend({_bindToResizeHandlesEvents:function(){var e,t,n=this,i=n.handles||[],a=i.length;for(e=0;e<a;e++)(t=i[e]).bind(T,n._onResizeHandleDragStart.bind(n)),t.bind(S,n._onResizeHandleDrag.bind(n)),t.bind(I,n._onResizeHandleDragEnd.bind(n))},_hasRowsInPixels:function(){for(var e=r(this.element).children("thead,tbody").children(F),t=0;t<e.length;t++)if(""===e[t].style.height||g(e[t].style.height))return!0;return!1},_resizeWidth:function(e,t){var n,o,s,l,d=this,u=r(d.element),c=u[0].style.width,p=b(u),g=u.parent().width(),k=d._getMaxDimensionValue(R);0!==e&&(M(d._initialElementWidth)&&(d._initialElementWidth=p),l=f({value:d._initialElementWidth+t,min:d.options.minWidth,max:k}),m(c)?(p+e>g?(o=a(l,g),s=i(l,g)):(o=i(l,g),s=a(l,g)),n=v(h(o,s))):n=_(l),d._setColumnsWidth(),u[0].style.width=n)},_resizeHeight:function(e,t){var n,o,s,l,d=this,u=r(d.element),c=u[0].style.height,p=k(u),g=u.parent().height(),b=d._getMaxDimensionValue(O),w=d.options.minHeight,y=d._hasRowsInPixels();0!==e&&(M(d._initialElementHeight)&&(d._initialElementHeight=p),l=f({value:d._initialElementHeight+t,min:w,max:b}),y&&e<0&&d._setRowsHeightInPercentages(),m(c)?(p+e>g?(o=a(l,g),s=i(l,g)):(o=i(l,g),s=a(l,g)),n=v(h(o,s))):n=_(l),u[0].style.height=n,y&&e<0&&d._setRowsHeightInPixels())},_setColumnsWidth:function(){var e,t=r(this.element),n=t.parent()[0],i=t.closest("td"),a=i.closest(F).children(),o=a.length;if(function(e){var t=e.style.width;return""!==t?!!m(t):!!r(e).hasClass("k-table")}(t[0])&&n===i[0]&&""===n.style.width)for(e=0;e<o;e++)a[e].style.width=_(r(a[e]).width())},_setRowsHeightInPercentages:function(){var e,t=this,n=r(t.element).children(P),i=n.length>0?n.height():0,a=r(t.element).children(z).height(),o=r(t.element).children("thead,tbody").children(F),s=o.length,l=o.map((function(){return k(r(this))}));for(e=0;e<s;e++)o[e].style.height=v(h(l[e],i+a))},_setRowsHeightInPixels:function(){var e,t=r(this.element).children("thead,tbody").children(F),n=t.length,i=t.map((function(){return k(r(this))}));for(e=0;e<n;e++)t[e].style.height=_(i[e])}}),V=B.extend({_bindToResizeHandlesEvents:function(){var e,t,n=this,i=n.handles||[],a=i.length;for(e=0;e<a;e++)(t=i[e]).bind(T,n._onResizeHandleDragStart.bind(n)),"north"===t.options.direction||"south"===t.options.direction?t.bind(S,n._onResizeHandleDragVertical.bind(n)):"east"===t.options.direction||"west"===t.options.direction?t.bind(S,n._onResizeHandleDragHorizontal.bind(n)):t.bind(S,n._onResizeHandleDragLocked.bind(n)),t.bind(I,n._onResizeHandleDragEnd.bind(n))},_getDeltas:function(e){return s({},{deltaX:0,deltaY:0,initialDeltaX:0,initialDeltaY:0},e)},_onResizeHandleDragVertical:function(e){var t=this._getDeltas(e);this._resizeHeight(t.deltaY,t.initialDeltaY),this.showResizeHandles()},_onResizeHandleDragHorizontal:function(e){var t=this._getDeltas(e);this._resizeWidth(t.deltaX,t.initialDeltaX),this.showResizeHandles()},_onResizeHandleDragLocked:function(e){var t,n=Math.min(Math.abs(e.initialDeltaX),Math.abs(e.initialDeltaY)),i=this._initialElementWidth,a=this._initialElementHeight;n===e.initialDeltaX||n===-1*e.initialDeltaX?(e.initialDeltaY=e.initialDeltaX*a/i,e.deltaY=e.deltaX):n!==e.initialDeltaY&&n!==-1*e.initialDeltaY||(e.initialDeltaX=e.initialDeltaY*i/a,e.deltaX=e.deltaY),t=this._getDeltas(e),this._resizeWidth(t.deltaX,t.initialDeltaX),this._resizeHeight(t.deltaY,t.initialDeltaY),this.showResizeHandles()},_resizeWidth:function(e,t){var n,i,a=this,o=r(a.element),s=b(o);0!==e&&(M(a._initialElementWidth)&&(a._initialElementWidth=s),i=f({value:a._initialElementWidth+t,min:a.options.minWidth,max:a._getMaxDimensionValue(R)}),n=_(i),o[0].style.width=n,o.attr(R,Math.floor(i)))},_resizeHeight:function(e,t){var n,i,a=this,o=r(a.element),s=k(o);0!==e&&(M(a._initialElementHeight)&&(a._initialElementHeight=s),i=f({value:a._initialElementHeight+t,min:a.options.minHeight,max:Number.MAX_SAFE_INTEGER}),n=_(i),o[0].style.height=n,o.attr(O,Math.floor(i)))}}),U=u.extend({create:function(e){var t=this;r(e.body).on("dragstart"+y,(function(){var t=w.nodes(e.getRange()),n=!1;t.forEach((function(e){"IMG"===e.nodeName&&(n=!0)})),n&&t.length>1&&e.elementResizing._destroyResizeHandles()})).on("drop"+y,(function(){setTimeout((function(){var t=w.image(e.getRange());t&&(e.elementResizing._destroyResizeHandles(),e.elementResizing.element=t,e.elementResizing.showResizeHandles())}))})).on(E+y,"table,img",(function(n){var i=n.target,a=n.currentTarget,r=e.elementResizing,s=r?r.element:null;if(r){if(s&&a!==s){if(o(a,s)&&s!==i&&o(s,i))return;s!==i&&(e._destroyElementResizing(),t._initResizing(e,a))}}else t._initResizing(e,a);e._showElementResizeHandles()})).on(E+y,(function(t){var n=e.elementResizing,i=n?n.element:null,a=t.target,s=r(a).hasClass(x)||r(a).parents("."+x).length>0;!n||i===a||o(i,a)||s||e._destroyElementResizing()}))},dispose:function(e){r(e.body).off(y)},_initResizing:function(t,n){l.msie||(r(n).is(H)?t.elementResizing=t.tableResizing=new L(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body}):r(n).is("img")&&(t.elementResizing=new V(n,{appendHandlesTo:t.body,rtl:e.support.isRtl(t.element),rootElement:t.body})),t._showElementResizeHandlesProxy&&(t.unbind(A,t._showElementResizeHandlesProxy),t.bind(A,t._showElementResizeHandlesProxy)))}});U.current=new U,s(d,{TableResizing:L,ImageResizing:V,ElementResizing:B,ElementResizingFactory:U})}(window.kendo),function(e,t){var n=window.kendo,i=n.ui.editor,a=i.EditorUtils,r=i.RangeUtils,o=i.Dom,s=a.registerTool,l=i.ToolTemplate,d=i.Command,u=new i.BlockFormatFinder([{tags:["table"]}]),c=new i.BlockFormatFinder([{tags:["td","th"]}]),p=/([a-z]+|%)$/i,h="scope",f="col-index",m="th",g="td",v=d.extend({exec:function(){var e=this,a=e.editor,r=e.range=e.lockRange(),o=e._sourceTable=e.options.insertNewTable?t:e._selectedTable(r),s=e._selectedTableCells=o?e._selectedCells(r):t,l={visible:!1,messages:a.options.messages,closeCallback:e.onDialogClose.bind(e),table:e.parseTable(o,s),dialogOptions:a.options.dialogOptions,isRtl:n.support.isRtl(a.wrapper)};new i.TableWizardDialog(l).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.editor.document;o.windowFromDocument(t).focus(),d.fn.releaseRange.call(this,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,a=n.get(i);null!==a.nodeValue&&(" "===a.nodeValue||""===a.nodeValue);)i-=1,a=n.get(i);a===t&&o.insertAfter(o.createEmptyNode(this.editor.document,"p"),t)},updateTable:function(t,n,i){for(var a,r,s=this,l=e(n.rows).toArray(),d=t.tableProperties,u=d.rows,c=n.tHead,p=s._lastInCollection;i.length>1;)i.pop();a=i.length?p(i).parentNode:p(l),s._deleteTableRows(l,l.length-u),l.length<u&&s._addRows(a,u,l),o.reMapTableColumns(n,f),s._updateColumns(l,d.columns,i,a),s._updateTableProperties(n,d),r=t.cellProperties,i[0]&&o.attr(i[0],{id:r.id||null}),(r.selectAllCells?e(l).children():e(i)).each((function(e,t){s._updateCellProperties(t,r)})),s._updateCaption(n,d),c?s._updateHeadersWithThead(n,t):s._updateHeadersNoThead(n,t),s._updateHeaderAssociates(n,d),o.clearTableMappings(n,f)},_isHeadingRow:function(e){return o.is(e.cells[0],m)&&o.is(e.parentNode,"thead")},_isHeadingCell:function(e){return o.is(e,m)},cellsWithHeadersAssociated:function(t){var n=e(t.rows).children(),i=[],a=function(e){return i.indexOf(e)>-1};return n.each((function(e,t){t.id&&o.is(t,m)&&i.push(t.id)})),!!n.filter((function(e,t){var n,i=t.getAttribute("headers");return!!(i&&!o.is(t,m)&&(n=i.split(" "))&&n.length>0)&&n.some(a)})).length},_insertCells:function(e,t,n){n=isNaN(n)?-1:n;for(var i=0;i<e;i++)t.insertCell(n).innerHTML="&nbsp;"},_deleteTableRows:function(e,t){for(var n,i,a=0;a<t;a++)(i=(n=e.pop()).parentNode).removeChild(n),i.rows.length||o.remove(i)},createNewTable:function(e){var t,n=this,i=n.editor.document,a=e.tableProperties,r=o.create(i,"table"),s=0;n._updateTableProperties(r,a),n._updateCaption(r,a),a.headerRows&&a.headerRows>0&&(t=r.createTHead(),n._createTableRows(e,t,s,!0),s+=a.headerRows);var l=r.createTBody();return n._createTableRows(e,l,s,!1),o.reMapTableColumns(r,f),"ids"===a.cellsWithHeaders?o.associateWithIds(r):"scope"===a.cellsWithHeaders&&n._addScopes(r,a.headerRows,a.headerColumns),o.clearTableMappings(r,f),r},_createTableRows:function(e,t,n,i){for(var a,r=e.tableProperties,o=e.cellProperties,s=r.columns,l=i?r.headerRows:r.rows,d=o.selectAllCells,u=r.headerColumns,c=n;c<l;c++){a=t.insertRow();for(var p,h=0;h<s;h++)p=i||u>h?document.createElement(m):document.createElement(g),a.appendChild(p),p.innerHTML="&nbsp;",0===c&&0===h&&o.id&&(p.id=o.id),this._updateCellProperties(p,d||0===c&&0===h?o:{})}},_addRows:function(t,n,i){for(var a,r=e(t).index(),o=t.cells.length,s=n-i.length,l=t.parentNode;s;)a=l.insertRow(r+1),this._insertCells(o-a.cells.length,a),s--},_updateColumns:function(t,n,i,a){var r=this,o=r._lastInCollection,s=o(t[0].cells),l=Number(s.getAttribute(f))+s.colSpan;if(l>n&&e(t).each((function(e,t){for(var i=o(t.cells),a=Number(i.getAttribute(f))+i.colSpan;a>n;)i.colSpan&&i.colSpan>1?i.colSpan-=1:t.deleteCell(-1),i=o(t.cells),a=Number(i.getAttribute(f))+i.colSpan})),l<n){var d=e(o(i)||o(a.cells)).index();e(t).each((function(e,t){var i=o(t.cells);r._insertCells(n-Number(i.getAttribute(f))-i.colSpan,t,d+1)}))}},_updateTableProperties:function(t,n){var i=this._getStylesData(n);o.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,o.attr(e,{style:n||null,className:t.className||null})},_updateCaption:function(e,t){if(e.caption&&!t.captionContent)e.deleteCaption();else if(t.captionContent){var n=e.createCaption();n.innerHTML=t.captionContent;var i=this._getAlignmentData(t.captionAlignment);o.attr(n,{style:{textAlign:i.textAlign,verticalAlign:i.verticalAlign}})}},_updateHeadersNoThead:function(e,t){var n,i,a,r,s=t.tableProperties,l=e.rows;for(a=0;a<l.length;a++)for(n=l[a].cells,r=0;r<n.length;r++)i=n[r],!this._isHeadingCell(i)&&(a<s.headerRows||s.headerColumns>i.getAttribute(f))?o.changeTag(i,m,!1):this._isHeadingCell(i)&&a>=s.headerRows&&s.headerColumns<=i.getAttribute(f)&&o.changeTag(i,g,!1)},_updateHeadersWithThead:function(e,t){var n,i,a,r=this,s=t.tableProperties,l=e.tHead,d=0,u=e.tBodies[0];if(u||(u=e.createTBody()),s.headerRows&&s.headerRows>0){for(l||(l=e.createTHead());l.rows.length<s.headerRows;)l.appendChild(u.rows[0]);for(;l.rows.length>s.headerRows;)u.appendChild(l.rows[0]);r._swapToHeaderCells(l)}else if(l){for(;l.rows.length>0;)u.appendChild(l.rows[l.rows.length-1]);e.deleteTHead()}for(;u.rows.length>d;){for(n=u.rows[d],a=0;a<n.cells.length;a++)i=n.cells[a],r._isHeadingCell(i)&&s.headerColumns<=i.getAttribute(f)?o.changeTag(i,g,!1):!r._isHeadingCell(i)&&s.headerColumns>i.getAttribute(f)&&o.changeTag(i,m,!1);d+=1}},_updateHeaderAssociates:function(e,t){var n=this;"ids"===t.cellsWithHeaders?(n.cellsWithHeadersAssociated(e)||n._removeScopes(e),o.associateWithIds(e)):"scope"===t.cellsWithHeaders?(n.cellsWithHeadersAssociated(e)&&n._removeAssociates(e),n._addScopes(e,t.headerRows,t.headerColumns)):n.cellsWithHeadersAssociated(e)?n._removeAssociates(e):n._removeScopes(e)},_addScopes:function(e,t,n){var i,a,r,o,s=e.rows;for(i=0;i<s.length;i++)for(r=s[i],a=0;a<r.cells.length;a++)o=r.cells[a],i<t?o.setAttribute(h,"col"):o.getAttribute(f)<n&&o.setAttribute(h,"row")},_removeScopes:function(t){e(t).find(m).removeAttr(h),e(t).find("col").remove(),e(t).find("colgroup").remove()},_removeAssociates:function(t){e(t).find("th, td").removeAttr("id headers")},_swapToHeaderCells:function(t){e(t).find("td").each((function(e,t){o.changeTag(t,m,!1)}))},_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||"",borderWidth:e.borderWidth,borderStyle:e.borderStyle,borderColor:e.borderColor||"",borderCollapse:e.collapseBorders?"collapse":null,whiteSpace:n}},_getAlignmentData:function(e){var t="",n=t;if(e)if(-1!=e.indexOf(" ")){var i=e.split(" ");t=i[0],n=i[1]}else t=e;return{textAlign:t,verticalAlign:n}},parseTable:function(n,i){if(!n)return{tableProperties:{},selectedCells:[]};var a=this,r=n.style,s=n.rows,l=n.caption,d=e(l?l.cloneNode(!0):t);d.find(".k-marker").remove();var u=n.className;u=(u=(u=u.replace(/^k-table\s|\sk-table$/,"")).replace(/\sk-table\s/," ")).replace(/^k-table$/,"");var c,p=a._getAlignment(n,!0),h=l?a._getAlignment(l):t,m=o._getNumberOfHeaderRows(n);c=a.cellsWithHeadersAssociated(n)?"ids":e(n).find("th[scope]").length>0?"scope":"none",o.reMapTableColumns(n,f);var g=o._getNumberOfColumns(n),v=o._getNumberOfHeaderColumns(n,m);o.clearTableMappings(n,f);var _={tableProperties:{width:r.width||n.width?parseFloat(r.width||n.width):null,height:r.height||n.height?parseFloat(r.height||n.height):null,columns:g,rows:s.length,widthUnit:a._getUnit(r.width),heightUnit:a._getUnit(r.height),cellSpacing:n.cellSpacing,cellPadding:n.cellPadding,alignment:p.textAlign,bgColor:r.backgroundColor||n.bgColor,className:u,id:n.id,borderWidth:r.borderWidth||n.border,borderColor:r.borderColor,borderStyle:r.borderStyle||"",collapseBorders:!!r.borderCollapse,summary:n.summary,captionContent:l?d.html():"",captionAlignment:l&&h.textAlign?h.textAlign+" "+h.verticalAlign:"",headerRows:m,headerColumns:v,cellsWithHeaders:c},selectedCells:[]};return _.rows=a.parseTableRows(s,i,_),_},parseTableRows:function(t,n,i){for(var a,r,o,s,l=[],d=0;d<t.length;d++){a={cells:[]},r=t[d].cells,l.push(a);for(var u=0;u<r.length;u++)o=r[u],s=this.parseCell(o),-1!=e.inArray(o,n)&&i.selectedCells.push(s),a.cells.push(s)}return l},parseCell:function(e){var t=this,n=e.style,i=t._getAlignment(e);return i=i.textAlign?i.textAlign+" "+i.verticalAlign:"",{width:n.width||e.width?parseFloat(n.width||e.width):null,height:n.height||e.height?parseFloat(n.height||e.height):null,widthUnit:t._getUnit(n.width),heightUnit:t._getUnit(n.height),cellMargin:n.margin,cellPadding:n.padding,alignment:i,bgColor:n.backgroundColor||e.bgColor,className:e.className,id:e.id,borderWidth:n.borderWidth||e.border,borderColor:n.borderColor,borderStyle:n.borderStyle,wrapText:"nowrap"!=n.whiteSpace}},_getAlignment:function(e,t){var n=e.style,i=n.textAlign||e.align||"";if(t)return{textAlign:i};var a=n.verticalAlign||e.vAlign||"";return i&&a?{textAlign:i,verticalAlign:a}:!i&&a?{textAlign:"left",verticalAlign:a}:i&&!a?{textAlign:i,verticalAlign:"top"}:{textAlign:"",verticalAlign:""}},_getUnit:function(e){var t=(e||"").match(p);return t?t[0]:"px"},_selectedTable:function(e){var t=o.filterBy(r.nodes(e),o.htmlIndentSpace,!0);return u.findSuitable(t)[0]},_selectedCells:function(e){var t=o.filterBy(r.nodes(e),o.htmlIndentSpace,!0);return c.findSuitable(t)},_lastInCollection:function(e){return e[e.length-1]}}),_=i.Tool.extend({command:function(e){return e.insertNewTable=this.options.insertNewTable,new v(e)}}),b=_.extend({update:function(e,t){!0===!u.isFormatted(t)?(e.parent().addClass("k-hidden k-disabled"),e.attr("disabled","disabled"),e.addClass("k-disabled")):(e.parent().removeClass("k-hidden k-disabled"),e.prop("disabled",!1),e.removeClass("k-disabled"))}});n.ui.editor.TableWizardTool=_,n.ui.editor.TableWizardCommand=v,s("tableWizard",new b({command:v,insertNewTable:!1,template:new l({template:a.buttonTemplate,title:"Table Wizard"})}))}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n.keys,r=e.map,o=e.each,s=n.trim,l=e.extend,d=n.isFunction,u=n.template,c=n._outerWidth,p=n._outerHeight,h=i.Widget,f=/^(a|div)$/i,m=".kendoTabStrip",g="href",v="prev",_="next",b="show",k="k-link",w="k-last",y="click",x="k-image",C="k-first",T="select",S="activate",I="k-tabstrip-content k-content",D="contentUrl",E="mouseenter",A="contentLoad",F="k-disabled",z="k-active",P="k-focus",H="k-hover",N="k-tab-on-top",R=".k-item:not(.k-disabled)",O=".k-item",M="aria-hidden",B="aria-controls",L="aria-disabled",V="aria-selected",U="aria-labelledby",W={content:u("<div class='k-tabstrip-content k-content' #= contentAttributes(data) # tabindex='0'>#= content(item) #</div>"),itemWrapper:u("<#= tag(item) # class='k-link' #= contentUrl(item) # #= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) #</#= tag(item) #>"),item:u("<li class='#= wrapperCssClass(group, item) #' role='tab' #=item.active ? \"aria-selected='true'\" : ''#>#= itemWrapper(data) #</li>"),image:u("<img class='k-image' alt='' src='#= imageUrl #' />"),sprite:u("<span class='k-sprite #= spriteCssClass #'></span>"),empty:u("")},j={wrapperCssClass:function(e,t){var n=["k-tabstrip-item","k-item"],i=t.index;return!1===t.enabled&&n.push("k-disabled"),0===i&&n.push("k-first"),i==e.length-1&&n.push("k-last"),n.join(" ")},textAttributes:function(e){return e.url?" href='"+e.url+"'":""},text:function(e){return!1===e.encoded?e.text:n.htmlEncode(e.text)},tag:function(e){return e.url?"a":"span"},contentAttributes:function(e){return!0!==e.active?" style='display:none' aria-hidden='true'":""},content:function(e){return e.content?e.content:e.contentUrl?"":"&nbsp;"},contentUrl:function(e){return e.contentUrl?n.attr("content-url")+'="'+e.contentUrl+'"':""}};function q(t){t.children("img").addClass(x),t.children("a").addClass(k).children("img").addClass(x),t.filter("li[disabled]").addClass(F).attr(L,"true").prop("disabled",!1),t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass("k-active "+N),t.attr("role","tab"),t.filter(".k-active").attr(V,!0),t.each((function(){var t=e(this);t.children("."+k).length||t.contents().filter((function(){return!(this.nodeName.match(f)||3==this.nodeType&&!s(this.nodeValue))})).wrapAll("<span UNSELECTABLE='on' class='k-link'/>")}))}function G(e){var t=e.children(".k-item");t.filter(".k-first:not(:first-child)").removeClass(C),t.filter(".k-last:not(:last-child)").removeClass(w),t.filter(":first-child").addClass(C),t.filter(":last-child").addClass(w)}function K(e,t){return"<span aria-hidden='true' class='k-button k-button-md k-rounded-md k-button-flat k-button-flat-base k-icon-button k-tabstrip-"+e+"' unselectable='on'><span class='k-button-icon k-icon "+t+"'></span></span>"}var $=h.extend({init:function(e,t){var i,a=this;h.fn.init.call(a,e,t),a._animations(a.options),t=a.options,a._contentUrls=t.contentUrls||[],a._wrapper(),a._isRtl=n.support.isRtl(a.wrapper),a._tabindex(),a._updateClasses(),a._dataSource(),a.tabGroup.attr("role","tablist"),t.dataSource&&a.dataSource.fetch(),a._tabPosition(),a._scrollable(),a._processContentUrls(),a._attachEvents(),a.options.value&&(i=a.options.value),a._initialActivate(),a.value(i),n.notify(a)},events:[T,S,b,"error",A,"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:200}},setDataSource:function(e){var t=this;t.options.dataSource=e,t._dataSource(),t.dataSource.fetch()},setOptions:function(e){var t=this,n=t.options.animation;t._animations(e),e.contentUrls&&(t._contentUrls=e.contentUrls),e.animation=l(!0,n,e.animation),e.navigatable?t.wrapper.on("keydown"+m,t._keyDownProxy):t.wrapper.off("keydown"+m,t._keyDownProxy),h.fn.setOptions.call(t,e)},activateTab:function(e){if(!this.tabGroup.children("[data-animating]").length){e=this.tabGroup.find(e);var t=this,i=t.options.animation,a=i.open,r=l({},i.close),o=r&&"effects"in r,s=e.parent().children(),d=s.filter(".k-active"),u=s.index(e),c=a&&"duration"in a&&"effects"in a;r=l(o?r:l({reverse:!0},a),{hide:!0}),n.size(a.effects)?(d.kendoRemoveClass(z,{duration:r.duration}),e.kendoRemoveClass(H,{duration:r.duration})):(d.removeClass(z),e.removeClass(H));var h=t.contentAnimators;if(t.inRequest&&(t.xhr.abort(),t.inRequest=!1),0===h.length)return t.tabGroup.find("."+N).removeClass(N),e.addClass(N).css("z-index"),e.addClass(z),t._current(e),t.trigger("change"),t._scrollableModeActive&&t._scrollTabsToItem(e),!1;var f=h.filter(".k-active"),m=t.contentHolder(u),g=m.closest(".k-content");if(t.tabsHeight=p(t.tabGroup)+parseInt(t.wrapper.css("border-top-width"),10)+parseInt(t.wrapper.css("border-bottom-width"),10),0===m.length)return f.removeClass(z).attr(M,!0).kendoStop(!0,!0).kendoAnimate(r),!1;e.attr("data-animating",!0);var v=!(!e.children("."+k).data(D)&&!t._contentUrls[u])&&m.is(":empty"),_=function(){d.removeAttr(V),e.attr(V,!0),t._current(e),g.addClass(z).removeAttr(M).kendoStop(!0,!0).kendoAnimate(l({init:function(){t.trigger(b,{item:e[0],contentElement:m[0]}),n.resize(m)}},a,{complete:function(){e.removeAttr("data-animating"),t.trigger(S,{item:e[0],contentElement:m[0]}),n.resize(m),c&&(n.support.browser.msie||n.support.browser.edge)&&m.finish().animate({opacity:.9},"fast","linear",(function(){m.finish().animate({opacity:1},"fast","linear")}))}}))},w=function(){v?(e.removeAttr("data-animating"),t.ajaxRequest(e,m,(function(){e.attr("data-animating",!0),_(),t.trigger("change")}))):(_(),t.trigger("change")),t._scrollableModeActive&&t._scrollTabsToItem(e)},y=t.element.css("min-height");return t.element.css("min-height",t.element.outerHeight()),f.removeClass(z),t.tabGroup.find("."+N).removeClass(N),e.addClass(N).css("z-index"),n.size(a.effects)?e.kendoAddClass(z,{duration:a.duration}):e.addClass(z),f.attr(M,!0),f.length?f.kendoStop(!0,!0).kendoAnimate(l({complete:w},r)):w(),t.element.css("min-height",y),!0}},ajaxRequest:function(t,i,a,r){t=this.tabGroup.find(t);var o=this,s=e.ajaxSettings.xhr,l=t.find("."+k),u=t.width()/2,c=!1,p=t.find(".k-loading").removeClass("k-complete");p[0]||(p=e("<span class='k-loading'/>").prependTo(t));var h=2*u-p.width(),f=function(){p.animate({marginLeft:(parseInt(p.css("marginLeft"),10)||0)<u?h:0},500,f)};n.support.browser.msie&&n.support.browser.version<10&&setTimeout(f,40),r=r||l.data(D)||o._contentUrls[t.index()]||l.attr(g),o.inRequest=!0;var m={type:"GET",cache:!1,url:r,dataType:"html",data:{},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){o.trigger("error",{xhr:e,status:t})&&this.complete()},stopProgress:function(){clearInterval(c),p.stop(!0).addClass("k-progress")[0].style.cssText=""},complete:function(e){o.inRequest=!1,this.noProgress?setTimeout(this.stopProgress,500):this.stopProgress(),"abort"==e.statusText&&p.remove()},success:function(e){p.addClass("k-complete");try{var 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)),o.angular("cleanup",(function(){return{elements:i.get()}})),n.destroy(i),i.html(e)}catch(e){var d=window.console;d&&d.error&&d.error(e.name+": "+e.message+" in "+r),this.error(this.xhr,"error")}a&&a.call(o,i),o.angular("compile",(function(){return{elements:i.get()}})),o.trigger(A,{item:t[0],contentElement:i[0]})}};"object"==typeof r&&(m=e.extend(!0,{},m,r),d(m.url)&&(m.url=m.url())),o.xhr=e.ajax(m)},append:function(e){var t=this,n=t._create(e);return o(n.tabs,(function(e){var i=n.contents[e];t.tabGroup.append(this),"bottom"==t.options.tabPosition?t.tabWrapper.before(i):t.wrapper.append(i),t.angular("compile",(function(){return{elements:[i]}}))})),G(t.tabGroup),t._updateContentElements(),t.resize(!0),t},contentElement:function(i){if(isNaN(i-0))return t;var a=this.contentElements&&this.contentElements[0]&&!n.kineticScrollNeeded?this.contentElements:this.contentAnimators,r=e(this.tabGroup.children()[i]).attr(B);if(a)for(var o=0,s=a.length;o<s;o++)if(a.eq(o).closest(".k-content")[0].id==r)return a[o];return t},contentHolder:function(t){var i=e(this.contentElement(t)),a=i.children(".km-scroll-container");return n.support.touch&&a[0]?a:i},deactivateTab:function(e){var t=this,i=t.options.animation,a=i.open,r=l({},i.close),o=r&&"effects"in r;e=t.tabGroup.find(e),r=l(o?r:l({reverse:!0},a),{hide:!0}),n.size(a.effects)?e.kendoRemoveClass(z,{duration:a.duration}):e.removeClass(z),e.removeAttr(V),t.contentAnimators.filter(".k-active").kendoStop(!0,!0).kendoAnimate(r).removeClass(z).attr(M,!0)},destroy:function(){var e=this;h.fn.destroy.call(e),e._refreshHandler&&e.dataSource.unbind("change",e._refreshHandler),e.wrapper.off(m),e.tabGroup.off(m),e._scrollableModeActive&&(e._scrollPrevButton.off().remove(),e._scrollNextButton.off().remove()),n.destroy(e.wrapper)},disable:function(e){return this._toggleDisabled(e,!1),this},enable:function(e,t){return this._toggleDisabled(e,!1!==t),this},insertAfter:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).prev():this.tabGroup.find(n);var i=this,a=i._create(t),r=i.element.find("[id='"+n.attr(B)+"']");return o(a.tabs,(function(t){var o=a.contents[t],s=a.newTabsCreated?i._contentUrls.length-(a.tabs.length-t):e(o).index()-1;n.after(this),r.after(o),i._moveUrlItem(s,e(this).index()),i.angular("compile",(function(){return{elements:[o]}}))})),G(i.tabGroup),i._updateContentElements(a.newTabsCreated),i.resize(!0),i},insertBefore:function(t,n){n=e(t).is(e(n))?this.tabGroup.find(n).next():this.tabGroup.find(n);var i=this,a=i._create(t),r=i.element.find("[id='"+n.attr(B)+"']");return o(a.tabs,(function(t){var o=a.contents[t],s=a.newTabsCreated?i._contentUrls.length-(a.tabs.length-t):e(o).index()-1;n.before(this),r.before(o),i._moveUrlItem(s,e(this).index()),i.angular("compile",(function(){return{elements:[o]}}))})),G(i.tabGroup),i._updateContentElements(a.newTabsCreated),i.resize(!0),i},items:function(){return this.tabGroup[0].children},refresh:function(e){var t,i,a,r=this,o=r.options,s=n.getter(o.dataEncodedField),l=n.getter(o.dataTextField),d=n.getter(o.dataContentField),u=n.getter(o.dataContentUrlField),c=n.getter(o.dataImageUrlField),p=n.getter(o.dataUrlField),h=n.getter(o.dataSpriteCssClass),f=[],m=r.dataSource.view();for((e=e||{}).action&&(m=e.items),t=0,a=m.length;t<a;t++)i={text:l(m[t])},o.dataEncodedField&&(i.encoded=s(m[t])),o.dataContentField&&(i.content=d(m[t])),o.dataContentUrlField&&(i.contentUrl=u(m[t])),o.dataUrlField&&(i.url=p(m[t])),o.dataImageUrlField&&(i.imageUrl=c(m[t])),o.dataSpriteCssClass&&(i.spriteCssClass=h(m[t])),f[t]=i;if("add"==e.action)e.index<r.tabGroup.children().length?r.insertBefore(f,r.tabGroup.children().eq(e.index)):r.append(f);else if("remove"==e.action)for(t=0;t<m.length;t++)r.remove(e.index);else"itemchange"==e.action?(t=r.dataSource.view().indexOf(m[0]),e.field===o.dataTextField&&r.tabGroup.children().eq(t).find(".k-link").text(m[0].get(e.field)),e.field===o.dataUrlField&&(r._contentUrls[t]=m[0].get(e.field))):(r.trigger("dataBinding"),r.remove("li"),r._contentUrls=[],r.append(f),r.trigger("dataBound"))},reload:function(t){t=this.tabGroup.find(t);var n=this,i=n._contentUrls;return t.each((function(){var t=e(this),a=t.find("."+k).data(D)||i[t.index()],r=n.contentHolder(t.index());a&&n.ajaxRequest(t,r,null,a)})),n},remove:function(t){var i,a=this,r=typeof t;return"string"===r?t=a.tabGroup.find(t):"number"===r&&(t=a.tabGroup.children().eq(t)),i=t.map((function(){var t=e(this).index(),i=a.contentElement(t);return n.destroy(i),a._removeUrlItem(t),i})),t.remove(),i.empty(),i.remove(),a._updateContentElements(),a.resize(!0),a},select:function(t){var n=this;return 0===arguments.length?n.tabGroup.children("li.k-active"):(isNaN(t)||(t=n.tabGroup.children().get(t)),t=n.tabGroup.find(t),e(t).each((function(t,i){(i=e(i)).hasClass(z)||n.trigger(T,{item:i[0],contentElement:n.contentHolder(i.index())[0]})||n.activateTab(i)})),n)},value:function(i){var a=this;if(i===t)return a.select().text();i!=a.value()&&a.tabGroup.children().each((function(){n.trim(e(this).text())==i&&a.select(this)}))},_active:function(){var e=this.tabGroup.children().filter(".k-active");(e=e[0]?e:this._endItem("first"))[0]&&this._current(e)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{effects:{}}})},_appendUrlItem:function(e){this._contentUrls.push(e)},_attachEvents:function(){var e=this,t=e.options;e.wrapper.on(E+m+" mouseleave"+m,".k-tabstrip-items > .k-item:not(.k-disabled):not(.k-active)",e._toggleHover).on("focus"+m,e._active.bind(e)).on("blur"+m,(function(){e._current(null)})),e._keyDownProxy=e._keydown.bind(e),t.navigatable&&e.wrapper.on("keydown"+m,e._keyDownProxy),e.tabGroup.on(y+m,".k-disabled .k-link",!1).on(y+m," > "+R,e._itemClick.bind(e))},_click:function(e){var t,n,i=this,a=e.find("."+k),r=a.attr(g),o=i.options.collapsible,s=e.index(),l=i.contentHolder(s),d=e.parent().children().filter(".k-focus");if(e.closest(".k-widget")[0]==i.wrapper[0]){if(e.is(".k-disabled"+(o?"":",.k-active")))return d.removeClass(P),i._focused=e,e.addClass(P),i._current(e),i._scrollableModeActive&&i._scrollTabsToItem(e),!0;if(n=a.data(D)||i._contentUrls[s]||r&&("#"==r.charAt(r.length-1)||-1!=r.indexOf("#"+i.element[0].id+"-")),t=!r||n,i.tabGroup.children("[data-animating]").length)return t;if(i.trigger(T,{item:e[0],contentElement:l[0]}))return!0;if(!1!==t)return o&&e.is(".k-active")?(i.deactivateTab(e),!0):(i.activateTab(e)&&(t=!0),t)}},_create:function(t){var i,a,o,s=this,d=!1;return t=t instanceof n.data.ObservableArray?t.toJSON():t,e.isPlainObject(t)||Array.isArray(t)?(t=Array.isArray(t)?t:[t],d=!0,i=r(t,(function(n,i){return s._appendUrlItem(t[i].contentUrl||null),e($.renderItem({group:s.tabGroup,item:l(n,{index:i})}))})),a=r(t,(function(t,n){if("string"==typeof t.content||t.contentUrl)return e($.renderContent({item:l(t,{index:n})}))}))):(i="string"==typeof t&&"<"!=t[0]?s.element.find(t):e(t),a=e(),i.each((function(){if(/k-tabstrip-items/.test(this.parentNode.className)){var t=s.element.find("[id='"+this.getAttribute(B)+"']");o=t}else o=e("<div class='"+I+"'/>");a=a.add(o)})),q(i)),{tabs:i,contents:a,newTabsCreated:d}},_current:function(e){var n=this._focused;if(e===t)return n;n&&n.removeClass(P),e&&(e.hasClass(z)||e.addClass(P)),this._focused=e},_dataSource:function(){var e=this;e.dataSource&&e._refreshHandler?e.dataSource.unbind("change",e._refreshHandler):e._refreshHandler=e.refresh.bind(e),e.dataSource=n.data.DataSource.create(e.options.dataSource).bind("change",e._refreshHandler)},_elementId:function(e,t,i){var a=e.attr("id"),r=this.element.attr("id"),o=n.guid();if(!a||a.indexOf(r+"-")>-1){var s=(r||o)+"-";return i&&(s+="tab-"),s+(t+1)}return a},_endItem:function(e){return this.tabGroup.children(R)[e]()},_getItem:function(e){return this.tabGroup.children(O)[e]()},_initialActivate:function(){var e=this,t=e.tabGroup.children("li.k-active"),n=e.contentHolder(t.index());t[0]&&n.length>0&&0===n[0].childNodes.length&&e.activateTab(t.eq(0))},_item:function(e,t){var n;return n=t===v?"last":"first",e?((e=e[t]())[0]||(e=this.tabGroup.children(O)[n]()),e.hasClass(F)&&e.addClass(P),(e.hasClass(F)||e.hasClass(z))&&(this._focused=e),e):this._endItem(n)},_itemClick:function(t){var i=this.wrapper[0];if(i!==document.activeElement)if(n.support.browser.msie)try{i.setActive()}catch(e){i.focus()}else i.focus();this._click(e(t.currentTarget))&&t.preventDefault()},_keydown:function(e){var t,n=this,i=e.keyCode,r=n._current(),o=n._isRtl,s=/top|bottom/.test(n.options.tabPosition);if(e.target==e.currentTarget&&r){if(i!==a.DOWN||s)if(i!==a.UP||s)if(i===a.RIGHT&&s)t=o?v:_;else if(i===a.LEFT&&s)t=o?_:v;else if(i==a.ENTER||i==a.SPACEBAR)n._click(r),e.preventDefault();else{if(i==a.HOME)return n._click(n._getItem("first")),void e.preventDefault();if(i==a.END)return n._click(n._getItem("last")),void e.preventDefault()}else t=v;else t=_;t&&(n._click(n._item(r,t)),e.preventDefault())}},_moveUrlItem:function(e,t){this._contentUrls.splice(t,0,this._contentUrls.splice(e,1)[0])},_processContentUrls:function(){var t=this;t._contentUrls.length?t.tabGroup.children(".k-item").each((function(n,i){var a=t._contentUrls[n];"string"==typeof a&&e(i).find(">."+k).data(D,a)})):t._contentUrls.length=t.tabGroup.find("li.k-item").length},_removeUrlItem:function(e){this._contentUrls.splice(e,1)},_resize:function(){this._scrollable()},_scrollable:function(){var e,t,i,a,r=this,o=r.options;if(r._scrollableAllowed())if(r.wrapper.addClass("k-tabstrip-scrollable"),e=r.wrapper[0].offsetWidth,(t=r.tabGroup[0].scrollWidth)>e&&!r._scrollableModeActive){r._nowScrollingTabs=!1,r._isRtl=n.support.isRtl(r.element);var s=n.support.touch?"touchstart":"mousedown",l=n.support.touch?"touchend":"mouseup",d=n.support.browser,u=r._isRtl&&!d.msie&&!d.edge;r.tabWrapper.prepend(K("prev","k-i-arrow-60-left")),r.tabWrapper.append(K("next","k-i-arrow-60-right")),i=r._scrollPrevButton=r.tabWrapper.children(".k-tabstrip-prev"),a=r._scrollNextButton=r.tabWrapper.children(".k-tabstrip-next"),i.on(s+m,(function(){r._nowScrollingTabs=!0,r._scrollTabsByDelta(o.scrollable.distance*(u?1:-1))})),a.on(s+m,(function(){r._nowScrollingTabs=!0,r._scrollTabsByDelta(o.scrollable.distance*(u?-1:1))})),i.add(a).on(l+m,(function(){r._nowScrollingTabs=!1})),r._scrollableModeActive=!0,r._toggleScrollButtons()}else r._scrollableModeActive&&t<=e?(r._scrollableModeActive=!1,r.wrapper.removeClass("k-tabstrip-scrollable"),r._scrollPrevButton.off().remove(),r._scrollNextButton.off().remove()):r._scrollableModeActive?r._toggleScrollButtons():r.wrapper.removeClass("k-tabstrip-scrollable")},_scrollableAllowed:function(){var e=this.options;return e.scrollable&&!e.scrollable.distance&&(e.scrollable={distance:200}),e.scrollable&&!isNaN(e.scrollable.distance)&&("top"==e.tabPosition||"bottom"==e.tabPosition)},_scrollTabsToItem:function(e){var t,i=this,a=i.tabGroup,r=n.scrollLeft(a),o=c(e),s=i._isRtl?e.position().left:e.position().left-a.children().first().position().left,l=a[0].offsetWidth,d=n.support.browser;i._isRtl&&(d.mozilla||d.webkit&&d.version>=85)&&(r*=-1),i._isRtl?s<0?t=r+s-(l-r):s+o>l&&(t=r+s-o):r+l<s+o?t=s+o-l:r>s&&(t=s),a.finish().animate({scrollLeft:t},"fast","linear",(function(){i._toggleScrollButtons()}))},_scrollTabsByDelta:function(e){var t=this,i=t.tabGroup,a=n.scrollLeft(i),r=n.support.browser;t._isRtl&&(r.mozilla||r.webkit&&r.version>=85)&&(a*=-1),i.finish().animate({scrollLeft:a+e},"fast","linear",(function(){t._nowScrollingTabs&&!jQuery.fx.off?t._scrollTabsByDelta(e):t._toggleScrollButtons()}))},_tabPosition:function(){var e=this,t=e.options.tabPosition;e.wrapper.addClass("k-floatwrap k-tabstrip-"+t),"bottom"==t&&e.tabWrapper.appendTo(e.wrapper),"left"!==t&&"right"!==t||e.tabGroup.attr("aria-orientation","vertical"),e.resize(!0)},_toggleHover:function(t){e(t.currentTarget).toggleClass(H,t.type==E)},_toggleDisabled:function(t,n){(t=this.tabGroup.find(t)).each((function(){e(this).toggleClass(F,!n).attr(L,!n)}))},_toggleScrollButtons:function(){var e=this,t=e.tabGroup,i=n.scrollLeft(t);e._scrollPrevButton.toggleClass("k-disabled",0===i),e._scrollNextButton.toggleClass("k-disabled",i===t[0].scrollWidth-t[0].offsetWidth)},_updateClasses:function(){var n,i,a,r=this,o=/top|bottom/.test(r.options.tabPosition);r.wrapper.addClass("k-widget k-tabstrip"),r.tabGroup||(r.tabGroup=r.wrapper.children("ul"),r.tabGroup.wrap("<div />"),r.tabWrapper=r.tabGroup.parent()),r.tabGroup[0]||(r.tabGroup=e("<ul />").prependTo(r.wrapper),r.tabGroup.wrap("<div />"),r.tabWrapper=r.tabGroup.parent()),r.tabWrapper.addClass("k-tabstrip-items-wrapper"),r.tabWrapper.addClass(o?"k-hstack":"k-vstack"),r.tabGroup.addClass("k-tabstrip-items k-reset"),(n=r.tabGroup.find("li").addClass("k-tabstrip-item k-item")).length&&(a=(i=n.filter(".k-active").index())>=0?i:t,r.tabGroup.contents().filter((function(){return 3==this.nodeType&&!s(this.nodeValue)})).remove()),i>=0&&n.eq(i).addClass(N),r.contentElements=r.wrapper.children("div:not(.k-tabstrip-items-wrapper)"),r.contentElements.addClass(I).eq(a).addClass(z).css({display:"block"}),n.length&&(q(n),G(r.tabGroup),r._updateContentElements(!0))},_updateContentElements:function(t){var i=this,a=i._contentUrls,r=i.tabGroup.children(".k-item"),o=i.wrapper.children("div:not(.k-tabstrip-items-wrapper)"),s=i._elementId.bind(i);o.length&&r.length>o.length?o.each((function(n){var i,a=s(e(this),n),o=r.filter("[aria-controls="+(a||0)+"]")[0];!o&&t&&(o=r[n]),o&&(o.setAttribute(B,a),i=o.id=s(e(o),n,!0),this.setAttribute(U,i)),this.setAttribute("id",a)})):r.each((function(t){var n,r=o.eq(t),l=s(r,t);this.setAttribute(B,l),n=this.id=s(e(this),t,!0),!r.length&&a[t]?e("<div class='"+I+"'/>").appendTo(i.wrapper).attr("id",l):(r.attr("id",l),e(this).children(".k-loading")[0]||a[t]||e("<span class='k-loading k-complete'/>").prependTo(this)),r.attr("role","tabpanel"),r.attr("tabindex","0"),r.attr(U,n),r.filter(":not(.k-active)").attr(M,!0)})),i.contentElements=i.contentAnimators=i.wrapper.children("div:not(.k-tabstrip-items-wrapper)"),i.tabsHeight=p(i.tabGroup)+parseInt(i.wrapper.css("border-top-width"),10)+parseInt(i.wrapper.css("border-bottom-width"),10),n.kineticScrollNeeded&&n.mobile.ui.Scroller&&(n.touchScroller(i.contentElements),i.contentElements=i.contentElements.children(".km-scroll-container"))},_wrapper:function(){var e=this;e.element.is("ul")?e.wrapper=e.element.wrapAll("<div />").parent():e.wrapper=e.element}});l($,{renderItem:function(e){e=l({tabStrip:{},group:{}},e);var t=W.empty,n=e.item;return W.item(l(e,{image:n.imageUrl?W.image:t,sprite:n.spriteCssClass?W.sprite:t,itemWrapper:W.itemWrapper},j))},renderContent:function(e){return W.content(l(e,j))}}),n.ui.plugin($)}(window.kendo.jQuery),function(e,t){var n=window.kendo,i={format:"0",min:0},a=["px","em"],r=["solid","dotted","dashed","double","groove","ridge","inset","outset","initial","inherit","none","hidden"],o={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=n.Class.extend({init:function(e){this.options=e},open:function(){var t,i=this,a=i.options,r=a.dialogOptions,o=a.table,s=a.messages,l=n.support.browser.msie;function d(e){e.preventDefault(),i.destroy(),t.destroy()}function u(e){d(e),a.closeCallback()}r.close=u,r.title=s.tableWizard,r.visible=a.visible;var c=(t=e(i._dialogTemplate(s)).appendTo(document.body).kendoWindow(r).closest(".k-window").toggleClass("k-rtl",a.isRtl).end().find(".k-dialog-ok").on("click",(function(e){i.collectDialogValues(o),d(e),i.change&&i.change(),a.closeCallback(o)})).end().find(".k-dialog-close").on("click",u).end().data("kendoWindow")).element;if(i._initTabStripComponent(c),i._initTableViewComponents(c,o),i._initCellViewComponents(c,o),i._initAccessibilityViewComponents(c,o),t.center(),t.open(),l){var p=c.closest(".k-window").height();c.css("max-height",p)}},_initTabStripComponent:function(e){(this.components={}).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.value(),t.headerRows=n.headerRows.value(),t.headerColumns=n.headerColumns.value()},_addUnit:function(t,n){n&&-1==e.inArray(n,t)&&t.push(n)},_initTableViewComponents:function(e,t){var n=this,i=n.components.tableView={},o=t.tableProperties=t.tableProperties||{};o.borderStyle=o.borderStyle||"";n._addUnit(a,o.widthUnit),n._addUnit(a,o.heightUnit),n._initNumericTextbox(e.find("#k-editor-table-width"),"width",o,i),n._initNumericTextbox(e.find("#k-editor-table-height"),"height",o,i),n._initNumericTextbox(e.find("#k-editor-table-columns"),"columns",o,i,{min:1,value:4,change:function(e){var t=n.components.accessibilityView.headerColumns,i=t.value(),a=e.sender.value();a<i&&t.value(a),t.max(a)}}),n._initNumericTextbox(e.find("#k-editor-table-rows"),"rows",o,i,{min:1,value:4,change:function(e){var t=n.components.accessibilityView.headerRows,i=t.value(),a=e.sender.value();a<i&&t.value(a),t.max(a)}}),n._initDropDownList(e.find("#k-editor-table-width-type"),"widthUnit",o,i,a),n._initDropDownList(e.find("#k-editor-table-height-type"),"heightUnit",o,i,a),n._initNumericTextbox(e.find("#k-editor-table-cell-spacing"),"cellSpacing",o,i),n._initNumericTextbox(e.find("#k-editor-table-cell-padding"),"cellPadding",o,i),n._initTableAlignmentDropDown(e.find("#k-editor-table-alignment"),o),n._initColorPicker(e.find("#k-editor-table-bg"),"bgColor",o,i),n._initInput(e.find("#k-editor-css-class"),"className",o,i),n._initInput(e.find("#k-editor-id"),"id",o,i),n._initNumericTextbox(e.find("#k-editor-border-width"),"borderWidth",o,i),n._initColorPicker(e.find("#k-editor-border-color"),"borderColor",o,i),n._initBorderStyleDropDown(e.find("#k-editor-border-style"),"borderStyle",o,i,r),n._initCheckbox(e.find("#k-editor-collapse-borders"),"collapseBorders",o,i)},_initCellViewComponents:function(e,t){var n=this.components.cellView={};t.selectedCells=t.selectedCells=t.selectedCells||[];var i=t.selectedCells[0]||{borderStyle:"",wrapText:!0};this._addUnit(a,i.widthUnit),this._addUnit(a,i.heightUnit),this._initCheckbox(e.find("#k-editor-selectAllCells"),"selectAllCells",t.tableProperties,n),this._initNumericTextbox(e.find("#k-editor-cell-width"),"width",i,n),this._initNumericTextbox(e.find("#k-editor-cell-height"),"height",i,n),this._initDropDownList(e.find("#k-editor-cell-width-type"),"widthUnit",i,n,a),this._initDropDownList(e.find("#k-editor-cell-height-type"),"heightUnit",i,n,a),this._initNumericTextbox(e.find("#k-editor-table-cell-margin"),"cellMargin",i,n),this._initNumericTextbox(e.find("#k-editor-table-cells-padding"),"cellPadding",i,n),this._initCellAlignmentDropDown(e.find("#k-editor-cell-alignment"),i),this._initColorPicker(e.find("#k-editor-cell-bg"),"bgColor",i,n),this._initInput(e.find("#k-editor-cell-css-class"),"className",i,n),this._initInput(e.find("#k-editor-cell-id"),"id",i,n),this._initNumericTextbox(e.find("#k-editor-cell-border-width"),"borderWidth",i,n),this._initColorPicker(e.find("#k-editor-cell-border-color"),"borderColor",i,n),this._initBorderStyleDropDown(e.find("#k-editor-cell-border-style"),"borderStyle",i,n,r),this._initCheckbox(e.find("#k-editor-wrap-text"),"wrapText",i,n)},_initAccessibilityViewComponents:function(e,t){var n=this.components.accessibilityView={},i=t.tableProperties;this._initInput(e.find("#k-editor-table-caption"),"captionContent",i,n),this._initAccessibilityAlignmentDropDown(e.find("#k-editor-accessibility-alignment"),i),this._initInput(e.find("#k-editor-accessibility-summary"),"summary",i,n),this._initAssociationDropDown(e.find("#k-editor-cells-headers"),"cellsWithHeaders",{valuePrimitive:!0},i,n),this._initNumericTextbox(e.find("#k-editor-table-header-rows"),"headerRows",i,n,{max:i.rows||4}),this._initNumericTextbox(e.find("#k-editor-table-header-columns"),"headerColumns",i,n,{max:i.columns||4})},_initNumericTextbox:function(t,n,a,r,o){var s=r[n]=t.kendoNumericTextBox(o?e.extend({},i,o):i).data("kendoNumericTextBox");n in a&&s.value(parseInt(a[n],10))},_initDropDownList:function(e,t,n,i,a){var r=i[t]=e.kendoDropDownList({dataSource:a}).data("kendoDropDownList");this._setComponentValue(r,n,t)},_initBorderStyleDropDown:function(e,t,n,i,a){var r=i[t]=e.kendoDropDownList({dataSource:a,optionLabel:this.options.messages.borderNone}).data("kendoDropDownList");this._setComponentValue(r,n,t)},_initTableAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.tableView,a=o.dataSource;a[0].tooltip=n.alignLeft,a[1].tooltip=n.alignCenter,a[2].tooltip=n.alignRight,a[3].tooltip=n.alignRemove,this._initAlignmentDropDown(e,o,"alignment",t,i)},_initCellAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.cellView,a=s.dataSource;a[0].tooltip=n.alignLeftTop,a[1].tooltip=n.alignCenterTop,a[2].tooltip=n.alignRightTop,a[3].tooltip=n.alignLeftMiddle,a[4].tooltip=n.alignCenterMiddle,a[5].tooltip=n.alignRightMiddle,a[6].tooltip=n.alignLeftBottom,a[7].tooltip=n.alignCenterBottom,a[8].tooltip=n.alignRightBottom,a[9].tooltip=n.alignRemove,this._initAlignmentDropDown(e,s,"alignment",t,i)},_initAccessibilityAlignmentDropDown:function(e,t){var n=this.options.messages,i=this.components.accessibilityView,a=l.dataSource;a[0].tooltip=n.alignLeftTop,a[1].tooltip=n.alignCenterTop,a[2].tooltip=n.alignRightTop,a[3].tooltip=n.alignLeftBottom,a[4].tooltip=n.alignCenterBottom,a[5].tooltip=n.alignRightBottom,a[6].tooltip=n.alignRemove,this._initAlignmentDropDown(e,l,"captionAlignment",t,i)},_initAlignmentDropDown:function(e,t,n,i,a){var r=a[n]=e.kendoDropDownList(t).data("kendoDropDownList");r.list.addClass("k-align").css("width","110px"),this._setComponentValue(r,i,n)},_initAssociationDropDown:function(e,t,n,i,a){var r=a[t]=e.kendoDropDownList(n).data("kendoDropDownList");this._setComponentValue(r,i,t)},_setComponentValue:function(e,t,n){n in t&&e.value(t[n])},_initColorPicker:function(e,t,n,i){var a=i[t]=e.kendoColorPicker({buttons:!1,clearButton:!0}).data("kendoColorPicker");n[t]&&a.value(n[t])},_initInput:function(e,t,n,i){var a=i[t]=e.get(0);t in n&&(a.value=n[t])},_initCheckbox:function(e,t,n,i){var a=i[t]=e.get(0);t in n&&(a.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('<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-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"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input id="k-editor-css-class" class="k-input-inner" type="text" /></span></div><div class="k-edit-label"><label for="k-editor-id">#= messages.id #</label></div><div class="k-edit-field"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input id="k-editor-id" class="k-input-inner" type="text" /></span></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 k-checkbox-md k-rounded-md" /><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 k-checkbox-md k-rounded-md" /><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"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input id="k-editor-cell-css-class" class="k-input-inner" type="text" /></span></div><div class="k-edit-label"><label for="k-editor-cell-id">#= messages.id #</label></div><div class="k-edit-field"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input id="k-editor-cell-id" class="k-input-inner" type="text" /></span></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 k-checkbox-md k-rounded-md" /><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-header-rows">#= messages.headerRows #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-header-rows" /></div><div class="k-edit-label"><label for="k-editor-table-header-columns">#= messages.headerColumns #</label></div><div class="k-edit-field"><input type="numeric" id="k-editor-table-header-columns" /></div><div class="k-edit-label"><label for="k-editor-table-caption">#= messages.caption #</label></div><div class="k-edit-field"><span class="k-textbox k-input k-input-md k-rounded-md k-input-solid"><input id="k-editor-table-caption" class="k-input-inner" type="text"/></span></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"><span class="k-input k-textarea k-input-solid k-input-md k-rounded-md"><textarea id="k-editor-accessibility-summary" rows="5" class="k-input-inner k-editor-accessibility-summary" placeholder="#= messages.tableSummaryPlaceholder #"></textarea></span></div><div class="k-edit-label"><label for="k-editor-cells-headers">#= messages.associateCellsWithHeaders #</label></div><div class="k-edit-field"><select id="k-editor-cells-headers"><option value="none">#= messages.associateNone #</option><option value="scope">#= messages.associateScope #</option><option value="ids">#= messages.associateIds #</option></select></div></div></div><div class="k-edit-buttons"><button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-dialog-ok"><span class="k-button-text">#= messages.dialogOk #</span></button><button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-dialog-close"><span class="k-button-text">#= messages.dialogCancel #</span></button></div></div></div>')({messages:e})}});n.ui.editor.TableWizardDialog=d}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n._activeElement,r=n.support.touch&&n.support.mobileOS,o=Array.isArray,s=n.data.HierarchicalDataSource,l="mousedown",d="click",u=e.extend,c=e.each,p=n.template,h=n.keys,f=i.Widget,m=/^(ul|a|div)$/i,g=".kendoMenu",v="open",_="k-menu",b="k-link k-menu-link",k=".k-link",w=".k-menu-expand-arrow-icon",y="k-last",x="close",C="timer",T="k-first",S="k-image",I="select",D="zIndex",E="activate",A="deactivate",F="touchstart"+g+" MSPointerDown"+g+" pointerdown"+g,z=n.support.pointers,P=n.support.msPointers,H=P||z,N="change",R="error",O=n.support.touch?"touchstart":"",M=z?"pointerover":P?"MSPointerOver":"mouseenter",B=z?"pointerout":P?"MSPointerOut":"mouseleave",L="DOMMouseScroll"+g+" mousewheel"+g,V=n.support.resize+g,U="group",W="groupparent",j=e(document.documentElement),q="kendoPopup",G="k-hover",K="k-focus",$="k-disabled",Y=".k-menu",Q=".k-menu-group",X=".k-animation-container",J=".k-menu-group,.k-animation-container",Z=":not(.k-list) > .k-item:not([role='treeitem'])",ee=".k-item",te=".k-item:not(.k-disabled)",ne=":not(.k-item.k-separator)",ie=".k-menu-scroll-button",ae={2:1,touch:1},re="dataBound",oe="aria-expanded",se="role",le={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField",imageAttr:"dataImageAttrField",content:"dataContentField"},de={wrapperCssClass:function(e,t){var n="k-item k-menu-item",i=t.index;return!1===t.enabled&&(n+=" k-disabled"),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+=" k-selected"),n},itemCssAttributes:function(e){var t="",n=e.attr||{};for(var i in n)n.hasOwnProperty(i)&&"class"!==i&&(t+=i+'="'+n[i]+'" ');return t},imageCssAttributes:function(e){var t="",n=e&&e.toJSON?e.toJSON():{};for(var i in n.class?n.class+=" "+S:n.class=S,n)n.hasOwnProperty(i)&&(t+=i+'="'+n[i]+'" ');return t},contentCssAttributes:function(e){var t="",n=e.contentAttr||{},i="k-content k-group k-menu-group k-menu-group-md";for(var a in n.class?n.class+=" "+i:n.class=i,n)n.hasOwnProperty(a)&&(t+=a+'="'+n[a]+'" ');return t},textClass:function(){return b},arrowClass:function(e,t){var n="k-menu-expand-arrow-icon k-icon";return t.horizontal?n+=" k-i-arrow-s":n+=" k-i-arrow-e",n},groupAttributes:function(e){return!0!==e.expanded?" style='display:none'":""},groupCssClass:function(){return"k-group k-menu-group k-menu-group-md"},content:function(e){return e.content?e.content:"&nbsp;"}};function ue(t,n){try{return e.contains(t,n)}catch(e){return!1}}function ce(t){(t=e(t)).attr(n.attr("omit-wrap"))||(t.addClass("k-item k-menu-item").children("img").addClass(S),t.children("a").addClass(b).children("img").addClass(S),t.filter(":not([disabled])"),t.filter(".k-separator").removeClass("k-menu-item").addClass("k-menu-separator").empty().append("&nbsp;"),t.filter("li[disabled]").addClass($).prop("disabled",!1).attr("aria-disabled",!0),t.filter("[role]").length||t.attr(se,"menuitem"),t.children(k).length||t.contents().filter((function(){return!(this.nodeName.match(m)||3===this.nodeType&&!n.trim(this.nodeValue))})).wrapAll("<span class='"+b+"'></span>").filter((function(e,t){return 3===t.nodeType})).wrap("<span class='k-menu-link-text'></span>"),pe(t),he(t))}function pe(t){(t=e(t)).find("> .k-link > .k-menu-expand-arrow > [class*=k-i-arrow]:not(.k-sprite)").parent().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),i=function(e){var t,i=e.parent().parent(),a=n.support.isRtl(i);t=i.hasClass(_+"-horizontal")?"k-i-arrow-s":a?"k-i-arrow-w":"k-i-arrow-e";return t}(t);t.append("<span aria-hidden='true' class='k-menu-expand-arrow'><span class='k-menu-expand-arrow-icon k-icon "+i+"'></span></span>")}))}function he(t){(t=e(t)).filter(".k-first:not(:first-child)").removeClass(T),t.filter(".k-last:not(:last-child)").removeClass(y),t.filter(":first-child").addClass(T),t.filter(":last-child").addClass(y)}function fe(e){if(e&&e.length)for(var t in e){var n=e.eq(t);n.find("ul").length?n.attr("aria-haspopup",!0):n.removeAttr("aria-haspopup")}}function me(e){if(!e.hasClass(_))return e.parentsUntil("."+_,"li")}function ge(t,i){var a=function(e){var t=e.select,i=n.isFunction;if(t&&i(t))return t;return null}(i);a&&function(t,n){e(t).children(".k-link").data({selectHandler:n})}(t,a),i.items&&e(t).children("ul").children("li").each((function(e){ge(this,i.items[e])}))}function ve(e){return e?"li[data-groupparent='"+e+"']":"li[data-groupparent]"}function _e(e){var t=e?"[data-group='"+e+"']":"[data-group]";return"ul"+t+",div"+t}function be(t,n){var i=t.find(ve()),a=[];return i.each((function(i,r){for(var o=(r=e(r)).data(W),s=t;o;)(s=n.find(_e(o)+":visible")).length&&a.push(s),o=(r=s.find(ve())).data(W)})),a}function ke(t,n){var i=t.data(U);return i?n.find(ve(i)):e([])}function we(t,n){var i=t.data(W);return i?n.children(X).children(_e(i)):e([])}function ye(e,t){for(var n=0,i=e.parentNode;i&&!isNaN(i[t]);)n+=i[t],i=i.parentNode;return n}function xe(e){return H&&e.originalEvent&&e.originalEvent.pointerType in ae}function Ce(e){e.contents().filter((function(){return"LI"!=this.nodeName})).remove()}var Te=n.ui.DataBoundWidget.extend({init:function(e,t){var i=this;f.fn.init.call(i,e,t),e=i.wrapper=i.element,t=i.options,i._accessors(),i._templates(),i._dataSource(),i._updateClasses(),i._animations(t),i.nextItemZIndex=100,i._tabindex(),i._initOverflow(t),i._attachMenuEventsHandlers(),t.openOnClick&&(i.clicked=!1),e.attr(se,"menubar"),e[0].id&&(i._ariaId=n.format("{0}_mn_active",e[0].id)),n.notify(i)},events:[v,x,E,A,I,re],options:{name:"Menu",animation:{open:{duration:200},close:{duration:100}},orientation:"horizontal",direction:"default",openOnClick:!1,closeOnClick:!0,hoverDelay:100,scrollable:!1,popupCollision:t},_initData:function(){var e=this;e.dataSource&&(e.angular("cleanup",(function(){return{elements:e.element.children()}})),e.element.empty(),e.append(e.dataSource.view(),e.element),e.angular("compile",(function(){return{elements:e.element.children()}})))},_attachMenuEventsHandlers:function(){var t=this,n=t.element,i=t.options,a=t._overflowWrapper();t._checkActiveProxy=t._checkActiveElement.bind(t),(a||n).on(F,ee,t._focusHandler.bind(t)).on(d+g,".k-item.k-disabled",!1).on(d+g,ee,t._click.bind(t)).on(F+" "+l+g,".k-content",t._preventClose.bind(t)).on(M+g,te,t._mouseenter.bind(t)).on(B+g,te,t._mouseleave.bind(t)).on(l+g,te,t._mousedown.bind(t)).on(O+g+" "+M+g+" "+B+g+" "+l+g+" "+d+g,".k-item:not(.k-disabled) > .k-link",t._toggleHover.bind(t)),n.on("keydown"+g,t._keydown.bind(t)).on("focus"+g,t._focus.bind(t)).on("focus"+g,".k-content",t._focus.bind(t)).on("blur"+g,t._removeHoverItem.bind(t)).on("blur"+g,"[tabindex]",t._checkActiveProxy),a&&a.on(B+g,J,t._mouseleavePopup.bind(t)).on(M+g,J,t._mouseenterPopup.bind(t)),i.openOnClick&&(t._documentClickHandler=t._documentClick.bind(t),e(document).on("click",t._documentClickHandler))},_detachMenuEventsHandlers:function(){var t=this,n=t._overflowWrapper();n&&n.off(g),t.element.off(g),t._documentClickHandler&&e(document).off("click",t._documentClickHandler)},_initOverflow:function(t){var n,i,a=this,r="horizontal"==t.orientation;if(t.scrollable){a._openedPopups={},a._scrollWrapper=a.element.wrap("<div class='k-menu-scroll-wrapper k-"+t.orientation+"'></div>").parent(),r&&Ce(a.element),n=e(a.templates.scrollButton({direction:r?"left":"up"})),i=e(a.templates.scrollButton({direction:r?"right":"down"})),n.add(i).appendTo(a._scrollWrapper),a._initScrolling(a.element,n,i,r);var o=a.element.outerWidth(),s=a.element[0].style.width;s="auto"===s?"":s,r&&e(window).on(V,(function(){setTimeout((function(){a._setOverflowWrapperWidth(o,s),a._toggleScrollButtons(a.element,n,i,r)}),300)})),a._setOverflowWrapperWidth(o,s),a._toggleScrollButtons(a.element,n,i,r)}},_overflowWrapper:function(){return this._scrollWrapper||this._popupsWrapper},_setOverflowWrapperWidth:function(e,t){var n=this,i=n._scrollWrapper.css("width");n._scrollWrapper.css({width:""});var a=n._scrollWrapper.outerWidth();n._scrollWrapper.css({width:i});var r=n.element.outerWidth(),o=n.element[0].offsetWidth-n.element[0].clientWidth;if(r!=a&&a>0){var s=t?Math.min(e,a):a;n.element.width(s-o),n._scrollWrapper.width(s)}},_reinitOverflow:function(e){var t=this;(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)&&(t._detachMenuEventsHandlers(),t._destroyOverflow(),t._initOverflow(e),t._attachMenuEventsHandlers())},_destroyOverflow:function(){var n=this,i=n._overflowWrapper();i&&(i.off(g),i.find(ie).off(g).remove(),i.children(X).each((function(t,n){var a=e(n).children(Q);a.off(L);var r=ke(a,i);r.length&&r.append(n)})),i.find(ve()).removeAttr("data-groupparent"),i.find(_e()).removeAttr("data-group"),n.element.off(L),e(window).off(V),i.contents().unwrap(),n._scrollWrapper=n._popupsWrapper=n._openedPopups=t)},_initScrolling:function(t,i,a,o){var s=this,l=s.options.scrollable,d=s.isNumeric(l.distance)?l.distance:50,u=d/2,c="-="+d,p="+="+d,h="-="+2*d,f="+="+2*d,m=!1,v=!1,_=function(e){var n=o?{scrollLeft:e}:{scrollTop:e};t.finish().animate(n,"fast","linear",(function(){m&&_(e)})),s._toggleScrollButtons(t,i,a,o)},b=function(e){m||v||(_(e.data.direction),m=!0)},k=function(n){var l=o?{scrollLeft:n.data.direction}:{scrollTop:n.data.direction};v=function(e){var t=e.originalEvent;return r&&/touch/i.test(t.type||"")}(n)||xe(n),t.stop().animate(l,"fast","linear",(function(){v?(s._toggleScrollButtons(t,i,a,o),m=!0):e(n.currentTarget).trigger(M)})),m=!1,n.stopPropagation(),n.preventDefault()};i.on(M+g,{direction:c},b).on(n.eventMap.down+g,{direction:h},k),a.on(M+g,{direction:p},b).on(n.eventMap.down+g,{direction:f},k),i.add(a).on(B+g,(function(){t.stop(),m=!1,s._toggleScrollButtons(t,i,a,o)})),t.on(L,(function(e){if(!e.ctrlKey&&!e.shiftKey&&!e.altKey){var n=function(e){var t=0;return e.wheelDelta&&(t=(t=-e.wheelDelta/120)>0?Math.ceil(t):Math.floor(t)),e.detail&&(t=Math.round(e.detail/3)),t}(e.originalEvent),r=(n>0?"+=":"-=")+Math.abs(n)*u,l=o?{scrollLeft:r}:{scrollTop:r};s._closeChildPopups(t),t.finish().animate(l,"fast","linear",(function(){s._toggleScrollButtons(t,i,a,o)})),e.preventDefault()}}))},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},_toggleScrollButtons:function(e,t,i,a){var r=a?n.scrollLeft(e):e.scrollTop(),o=a?"scrollWidth":"scrollHeight",s=a?"offsetWidth":"offsetHeight";t.toggle(0!==r),i.toggle(r<e[0][o]-e[0][s]-1)},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=u(!0,t,e.animation),"dataSource"in e&&this._dataSource(e),this._updateClasses(),this._reinitOverflow(e),f.fn.setOptions.call(this,e)},destroy:function(){var e=this;f.fn.destroy.call(e),e._detachMenuEventsHandlers(),e._destroyOverflow(),n.destroy(e.element)},enable:function(e,t){return this._toggleDisabled(e,!1!==t),this},disable:function(e){return this._toggleDisabled(e,!1),this},attemptGetItem:function(t){t=t||this.element;var n=this.element.find(t),i=this._overflowWrapper();return n.length||t===this.element?n:i?i.find(t):e()},append:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.length?this._childPopupElement(t):null);return c(n.items,(function(t){n.group.append(this),pe(this),ge(this,e[t]||e)})),pe(t),he(n.group.find(".k-first, .k-last").add(n.items)),fe(me(n.group)),this},insertBefore:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.parent());return c(n.items,(function(n){t.before(this),pe(this),he(this),ge(this,e[n]||e)})),he(t),this},insertAfter:function(e,t){t=this.attemptGetItem(t);var n=this._insert(e,t,t.parent());return c(n.items,(function(n){t.after(this),pe(this),he(this),ge(this,e[n]||e)})),he(t),this},_insert:function(t,i,a){var r,s,l=this;i&&i.length||(a=l.element);var d=e.isPlainObject(t)||t instanceof n.data.ObservableObject,c={firstLevel:a.hasClass(_),horizontal:a.hasClass(_+"-horizontal"),expanded:!0,length:a.children().length};return i&&!a.length&&(a=e(l.renderGroup({group:c,options:l.options})).css("display","none").appendTo(i)),d||o(t)||t instanceof n.data.ObservableArray?r=e(e.map(d?[t]:t,(function(t,n){return"string"==typeof t?e(t).get():e(l.renderItem({group:c,item:u(t,{index:n})})).get()}))):(s=(r="string"==typeof t&&"<"!=t.charAt(0)?l.element.find(t):e(t)).find("> ul").addClass("k-menu-group k-menu-group-md").attr(se,"menu"),(r=r.filter("li")).add(s.find("> li")).each((function(){ce(this)}))),{items:r,group:a}},remove:function(e){var t=(e=this.attemptGetItem(e)).parentsUntil(this.element,Z),n=e.parent("ul:not(.k-menu)");if(e.remove(),n&&!n.children(Z).length){var i=me(n),a=n.parent(X);a.length?a.remove():n.remove(),fe(i)}return t.length&&(pe(t=t.eq(0)),he(t)),this},_openAfterLoad:function(e,t){var n=this;t.loaded()?(n.open(e),n._loading=!1):t.one(N,(function(){e.find(w).removeClass("k-i-loading"),n._loading&&(n.open(e),n._loading=!1)}))},open:function(i){var a=this,o=a.options,s="horizontal"==o.orientation,l=o.direction,d=n.support.isRtl(a.wrapper),c=a._overflowWrapper();i=(c||a.element).find(i);var p=a.dataSource&&a.dataSource.getByUid(i.data(n.ns+"uid"));if(p&&p.hasChildren&&!p.loaded()&&!a._loading)return a._loading=!0,i.find(w).addClass("k-i-loading"),p.load(),void a._openAfterLoad(i,p);/^(top|bottom|default)$/.test(l)&&(l=d?s?(l+" left").replace("default","bottom"):"left":s?(l+" right").replace("default","bottom"):"right");var h=">.k-popup:visible,>.k-animation-container>.k-popup:visible",f=function(){e(this).data(q)&&a.close(e(this).closest("li.k-item"),!0)};return i.siblings().find(h).each(f),c&&i.find(h).each(f),a.options.openOnClick&&(a.clicked=!0),i.each((function(){var i=e(this);clearTimeout(i.data(C)),i.data(C,setTimeout((function(){var p,h,f=i.find("> .k-menu-group, > .k-animation-container > .k-menu-group").filter(":hidden").first();if(!f[0]&&c&&(h=a._getPopup(i),f=h&&h.element),!f.is(":visible")&&f[0]&&!1===a._triggerEvent({item:i[0],type:v})){if(!f.find(".k-menu-group")[0]&&f.children(".k-item").length>1){var m=e(window).height();f.css({maxHeight:m-(n._outerHeight(f)-f.height())-n.getShadows(f).bottom,overflow:"auto"})}else f.css({maxHeight:"",overflow:""});i.data(D,i.css(D));var g=a.nextItemZIndex++;i.css(D,g),a.options.scrollable&&i.parent().siblings(ie).css({zIndex:++g}),p=f.data(q);var b=i.parent().hasClass(_),k=b&&s,w=function(e,t,i){e=e.split(" ")[!t+0]||e;var a={origin:["bottom",i?"right":"left"],position:["top",i?"right":"left"]};return/left|right/.test(e)?(a.origin=["top",e],a.position[1]=n.directions[e].reverse):(a.origin[0]=e,a.position[0]=n.directions[e].reverse),a.origin=a.origin.join(" "),a.position=a.position.join(" "),a}(l,b,d),y=o.animation.open.effects,C=y!==t?y:"slideIn:"+function(e,t){return(e=e.split(" ")[!t+0]||e).replace("top","up").replace("bottom","down")}(l,b);p?((p=f.data(q)).options.origin=w.origin,p.options.position=w.position,p.options.animation.open.effects=C):(p=f.kendoPopup({activate:function(){a._triggerEvent({item:this.wrapper.parent(),type:E})},deactivate:function(e){a._closing=!1,e.sender.element.removeData("targetTransform").css({opacity:""}),a._triggerEvent({item:this.wrapper.parent(),type:A})},origin:w.origin,position:w.position,collision:o.popupCollision!==t?o.popupCollision:k?"fit":"fit flip",anchor:i,appendTo:c||i,animation:{open:u(!0,{effects:C},o.animation.open),close:o.animation.close},open:a._popupOpen.bind(a),close:function(e){a._closing=e.sender.element;var t=e.sender.wrapper.parent();if(c){var i=e.sender.element.data(U);i&&(t=(c||a.element).find(ve(i))),e.sender.wrapper.children(ie).hide()}a._triggerEvent({item:t[0],type:x})?e.preventDefault():(t.css(D,t.data(D)),t.removeData(D),a.options.scrollable&&t.parent().siblings(ie).css({zIndex:""}),(r||H||n.support.mouseAndTouchPresent)&&(t.removeClass(G),a._removeHoverItem()))}}).data(q),f.closest(X).removeAttr(se)),f.removeAttr("aria-hidden"),i.attr(oe,!0),a._configurePopupOverflow(p,i),p._hovered=!0,p.open(),a._initPopupScrolling(p)}}),a.options.hoverDelay))})),a},_configurePopupOverflow:function(e,t){if(this.options.scrollable&&(this._wrapPopupElement(e),!t.attr("data-groupparent"))){var n=(new Date).getTime();t.attr("data-groupparent",n),e.element.attr("data-group",n)}},_wrapPopupElement:function(e){e.element.parent().is(X)||(e.wrapper=n.wrap(e.element,e.options.autosize).css({overflow:"hidden",display:"block",position:"absolute"}))},_initPopupScrolling:function(e,t,n){this.options.scrollable&&e.element[0].scrollHeight>e.element[0].offsetHeight&&this._initPopupScrollButtons(e,t,n)},_initPopupScrollButtons:function(t,n,i){var a=this,r=t.wrapper.children(ie),o=a.options.animation,s=(o&&o.open&&o.open.duration||0)+30;setTimeout((function(){if(!r.length){var o=e(a.templates.scrollButton({direction:n?"left":"up"})),s=e(a.templates.scrollButton({direction:n?"right":"down"}));r=o.add(s).appendTo(t.wrapper),a._initScrolling(t.element,o,s,n),i||r.on(M+g,(function(){var n=a._overflowWrapper();e(be(t.element,n)).each((function(e,t){var i=n.find(ve(t.data(U)));a.close(i)}))})).on(B+g,(function(){setTimeout((function(){e.isEmptyObject(a._openedPopups)&&a._closeParentPopups(t.element)}),30)}))}a._toggleScrollButtons(t.element,r.first(),r.last(),n)}),s)},_popupOpen:function(e){this._keyTriggered||e.sender.element.children(".k-focus").removeClass(K),this.options.scrollable&&this._setPopupHeight(e.sender)},_setPopupHeight:function(t,i){var a=t.element,r=a.add(a.parent(X));r.height(a.hasClass(_)&&this._initialHeight||"");var o=t._location(i),s=e(window).height(),l=o.height,d=i?0:Math.max(o.top,0),u=i?0:ye(this._overflowWrapper()[0],"scrollTop"),c=window.innerHeight-s,p=s-n.getShadows(a).bottom+c;if(!(p+u>l+d)){var h=Math.min(p,p-d+u);r.css({overflow:"hidden",height:h+"px"})}},close:function(t,n){var i=this,a=i._overflowWrapper(),r=a||i.element;(t=r.find(t)).length||(t=r.find(">.k-item"));return t.each((function(){var r=e(this);r.attr(oe,!1),!n&&i._isRootItem(r)&&(i.clicked=!1),clearTimeout(r.data(C)),r.data(C,setTimeout((function(){var n,o,s,l=i._getPopup(r);if(l&&(s=r.data(W),!a||!s||!i._openedPopups[s.toString()]||i._forceClose)){if(!i._forceClose&&(n=l.element,o=!1,e.isEmptyObject(i._openedPopups)||e(be(n,a)).each((function(e,t){return!(o=!!i._openedPopups[t.data(U).toString()])})),o))return;l.close(),l.element.attr("aria-hidden",!0),a&&i._forceClose&&t.last().is(r[0])&&delete i._forceClose}}),i.options.hoverDelay))})),i},_getPopup:function(e){var t=e.find(".k-menu-group:not(.k-list-container):not(.k-calendar-container):visible").first().data(q),n=this._overflowWrapper();if(!t&&n){var i=e.data(W);if(i)t=n.find(_e(i)).data(q)}return t},_toggleDisabled:function(t,n){this.element.find(t).each((function(){e(this).toggleClass($,!n).attr("aria-disabled",!n)}))},_toggleHover:function(t){var i=e(n.eventTarget(t)||t.target).closest(Z),a=t.type==M||-1!==l.indexOf(t.type);i.siblings().removeClass(G),i.parents("li.k-disabled").length||i.toggleClass(G,a||"mousedown"==t.type||"pointerover"==t.type||t.type==O),this._removeHoverItem()},_preventClose:function(){this.options.closeOnClick||(this._closurePrevented=!0)},_checkActiveElement:function(t){var i=this,a=e(t?t.currentTarget:this._hoverItem()),r=i._findRootParent(a)[0];this._closurePrevented||setTimeout((function(){document.hasFocus()&&(ue(r,n._activeElement())||!t||ue(r,t.currentTarget))||i.close(r)}),0),this._closurePrevented=!1},_removeHoverItem:function(){var e=this._hoverItem();e&&e.hasClass(K)&&(e.removeClass(K),this._oldHoverItem=null)},_updateClasses:function(){var e,t=this.element;t.removeClass("k-menu-horizontal k-menu-vertical"),t.addClass("k-widget k-reset k-menu-init "+_).addClass(_+"-"+this.options.orientation),"vertical"===this.options.orientation?t.attr("aria-orientation","vertical"):t.attr("aria-orientation","horizontal"),t.find("li > ul").filter((function(){return!n.support.matchesSelector.call(this,".k-menu-init div ul")})).addClass("k-group k-menu-group k-menu-group-md").attr(se,"menu").hide().attr("aria-hidden",t.is(":visible")).parent("li").attr("aria-haspopup","true").end().find("li > div").addClass("k-content").attr("tabindex","-1"),t.find("li[aria-haspopup]").attr(oe,!1),e=t.find("> li,.k-menu-group > li"),t.removeClass("k-menu-init"),e.each((function(){ce(this)}))},_mouseenter:function(t){var n=this,i=e(t.currentTarget),a=n._itemHasChildren(i),o=i.data(W)||i.parent().data(U),s=xe(t),l=!1;o&&(n._openedPopups[o.toString()]=!0),n._closing&&(l=!!n._closing.find(i).length),l||t.delegateTarget!=i.parents(Y)[0]&&t.delegateTarget!=i.parents(".k-menu-scroll-wrapper,.k-popups-wrapper")[0]||(n._keyTriggered=!1,n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(Z))||n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(Z))||(!(!1===n.options.openOnClick||!1===n.options.openOnClick.rootMenuItems&&n._isRootItem(i.closest(Z))||!1===n.options.openOnClick.subMenuItems&&!n._isRootItem(i.closest(Z))||n.clicked)||r||s&&n._isRootItem(i.closest(Z))||!ue(t.currentTarget,t.relatedTarget)&&a&&n.open(i),(!0===n.options.openOnClick&&n.clicked||r)&&i.siblings().each((function(e,t){n.close(t,!0)}))))},_mousedown:function(t){var n=this,i=e(t.currentTarget);(n.options.openOnClick.subMenuItems&&!n._isRootItem(i)||r)&&i.siblings().each((function(e,t){n.close(t,!0)}))},_mouseleave:function(t){var i=this,a=e(t.currentTarget),o=a.data(W),s=a.children(X).length||a.children(Q).length||o,l=e(window);if(o&&delete i._openedPopups[o.toString()],!a.parentsUntil(X,".k-list-container,.k-calendar-container")[0])return!1!==i.options.openOnClick&&(i.options.openOnClick.rootMenuItems||!i._isRootItem(a))&&(i.options.openOnClick.subMenuItems||i._isRootItem(a))||r||xe(t)||ue(t.currentTarget,t.relatedTarget||t.target)||!s||ue(t.currentTarget,n._activeElement())?void((n.support.browser.msie&&!t.toElement&&!t.relatedTarget&&!xe(t)||t.clientX<0||t.clientY<0||t.clientY>l.height()||t.clientX>l.width())&&i.close(a)):(i.close(a,!0),void(i._loading=!1));t.stopImmediatePropagation()},_mouseenterPopup:function(t){var n=e(t.currentTarget);if(!n.parent().is(X)){var i=(n=n.children("ul")).data(U);i&&(this._openedPopups[i.toString()]=!0)}},_mouseleavePopup:function(t){var n=e(t.currentTarget);!xe(t)&&n.is(X)&&this._closePopups(n.children("ul"))},_closePopups:function(t){var n=this,i=n._overflowWrapper(),a=t.data(U);if(a){delete n._openedPopups[a.toString()];var r=i.find(ve(a));setTimeout((function(){if(n.options.openOnClick)n._closeChildPopups(t);else if(e.isEmptyObject(n._openedPopups)){var i=n._innerPopup(t);n._closeParentPopups(i)}else n.close(r,!0)}),0)}},_closeChildPopups:function(t){var n=this,i=n._overflowWrapper();e(be(t,i)).each((function(){var e=i.find(ve(this.data(U)));n.close(e,!0)}))},_innerPopup:function(e){var t=be(e,this._overflowWrapper());return t[t.length-1]||e},_closeParentPopups:function(e){var t=this,n=t._overflowWrapper(),i=e.data(U),a=n.find(ve(i));for(i=a.parent().data(U),t.close(a,!0);i&&!t._openedPopups[i]&&!a.parent().is(Y);)a=n.find(ve(i)),t.close(a,!0),i=a.parent().data(U)},_click:function(t){var i,a,r,o,s=this,l=s.options,d=e(n.eventTarget(t)),u=d[0],c=d[0]?d[0].nodeName.toUpperCase():"",p="INPUT"==c||"SELECT"==c||"BUTTON"==c||"LABEL"==c,h=d.closest(k),f=d.closest(Z),m=f[0],g=h.attr("href"),_=d.attr("href"),b=e("<a href='#' />").attr("href"),w=!!g&&g!==b,y=w&&!!g.match(/^#/),C=!!_&&_!==b,T=s._overflowWrapper();if(!u||u.parentNode&&m){for(e(d).hasClass("k-menu-expand-arrow-icon")&&(this._lastClickedElement=m);u&&u.parentNode!=m;)u=u.parentNode;if(!e(u).is("div:not(.k-animation-container,.k-list-container)"))if(f.hasClass($))t.preventDefault();else{if(t.handled||!s._triggerSelect(d,m)||p||t.preventDefault(),t.handled=!0,a=f.children(J),T){var S=f.data(W);S&&(a=T.find(_e(S)))}if(r=a.is(":visible"),o=l.openOnClick&&r&&s._isRootItem(f),l.closeOnClick&&(!w||y)&&(!a.length||o)){f.removeClass(G).css("height"),s._oldHoverItem=s._findRootParent(f);var I=s._parentsUntil(h,s.element,Z);return s._forceClose=!!T,s.close(I),s.clicked=!1,void(-1!="MSPointerUp".indexOf(t.type)&&t.preventDefault())}w&&t.enterKey&&h[0].click(),(s._isRootItem(f)&&!1!==l.openOnClick||l.openOnClick.subMenuItems||n.support.touch||xe(t)&&s._isRootItem(f.closest(Z)))&&(w||p||C||t.preventDefault(),s.clicked=!0,i=a.is(":visible")?x:v,(l.closeOnClick||i!=x)&&s[i](f))}}},_parentsUntil:function(t,n,i){var a=this._overflowWrapper();if(a){var r=function(t,n){var i=[],a=function(e){for(;e.parentNode&&!n.is(e.parentNode);)i.push(e.parentNode),e=e.parentNode},r=t[0]||t;a(r);for(var o=i[i.length-1];e(o).is(X)&&(r=ke(e(o).children("ul"),n)[0]);)i.push(r),a(r),o=i[i.length-1];return i}(t,a),o=[];return e(r).each((function(){var t=e(this);if(t.is(n))return!1;t.is(i)&&o.push(this)})),e(o)}return t.parentsUntil(n,i)},_triggerSelect:function(e,t){var n,i=(e=e.is(".k-link")?e:e.closest(".k-link")).data("selectHandler");i&&(n=this._getEventData(e),i.call(this,n));var a=n&&n.isDefaultPrevented(),r=this._triggerEvent({item:t,type:I});return a||r},_getEventData:function(e){return{sender:this,target:e,_defaultPrevented:!1,preventDefault:function(){this._defaultPrevented=!0},isDefaultPrevented:function(){return this._defaultPrevented}}},_documentClick:function(n){var i=this,a=e(n.target).hasClass("k-menu-expand-arrow-icon")?i._lastClickedElement:n.target;ue((i._overflowWrapper()||i.element)[0],a)?i._lastClickedElement=t:i.clicked=!1},_focus:function(t){var n=this,i=t.target,r=n._hoverItem(),o=a();if(i!=n.wrapper[0]&&!e(i).is(":kendoFocusable"))return t.stopPropagation(),e(i).closest(".k-content").closest(".k-menu-group").closest(".k-item").addClass(K),void n.wrapper.trigger("focus");o===t.currentTarget&&(r.length?n._moveHover([],r):n._oldHoverItem||n._moveHover([],n.wrapper.children().first()))},_keydown:function(e){var t,i,a,r=this,o=e.keyCode,s=r._oldHoverItem,l=n.support.isRtl(r.wrapper);if(e.target==e.currentTarget||o==h.ESC){if(s||(s=r._oldHoverItem=r._hoverItem()),i=r._itemBelongsToVertival(s),a=r._itemHasChildren(s),r._keyTriggered=!0,o==h.RIGHT)t=r[l?"_itemLeft":"_itemRight"](s,i,a);else if(o==h.LEFT)t=r[l?"_itemRight":"_itemLeft"](s,i,a);else if(o==h.DOWN)t=r._itemDown(s,i,a);else if(o==h.UP)t=r._itemUp(s,i,a);else if(o==h.HOME)r._moveHover(s,s.parent().children().first()),e.preventDefault();else if(o==h.END)r._moveHover(s,s.parent().children().last()),e.preventDefault();else if(o==h.ESC)t=r._itemEsc(s,i);else if(o==h.ENTER||o==h.SPACEBAR)(t=s.children(".k-link")).length>0&&(r._click({target:t[0],preventDefault:function(){},enterKey:!0}),a&&!s.hasClass($)?(r.open(s),r._moveHover(s,r._childPopupElement(s).children().first())):s.is("li")&&"menuitemcheckbox"===s.attr("role")?s.find(".k-checkbox").attr("checked",!0):r._moveHoverToRoot(s,r._findRootParent(s)));else if(o==h.TAB)return t=r._findRootParent(s),r._moveHover(s,t),void r._checkActiveElement();t&&t[0]&&(e.preventDefault(),e.stopPropagation())}},_hoverItem:function(){return this.wrapper.find(".k-item.k-hover,.k-item.k-focus").filter(":visible")},_itemBelongsToVertival:function(e){var t=this.wrapper.hasClass("k-menu-vertical");return e.length&&e.parent().hasClass("k-menu-group")||t},_itemHasChildren:function(e){return!!(e&&e.length&&e[0].nodeType)&&(e.children(".k-menu-group, div.k-animation-container").length>0||!!e.data(W)&&!!this._overflowWrapper().children(_e(e.data(W))))},_moveHover:function(t,n){var i=this,a=i._ariaId;t.length&&n.length&&t.removeClass(K),n.length&&(n[0].id&&(a=n[0].id),n.addClass(K),i._oldHoverItem=n,a&&(i.element.removeAttr("aria-activedescendant"),e("#"+a).removeAttr("id"),n.attr("id",a),i.element.attr("aria-activedescendant",a)),i._scrollToItem(n))},_moveHoverToRoot:function(e,t){this._moveHover(e,t)},_findRootParent:function(e){return this._isRootItem(e)?e:this._parentsUntil(e,Y,"li.k-item").last()},_isRootItem:function(e){return e.parent().hasClass(_)},_itemRight:function(e,t,n){var i,a,r,o=this;if(t){if(n&&!e.hasClass($))o.open(e),i=o._childPopupElement(e).children().first();else if("horizontal"==o.options.orientation){if(a=o._findRootParent(e),r=o._overflowWrapper()){var s=we(a,r);o._closeChildPopups(s)}o.close(a),i=a.nextAll(ee+ne).eq(0)}}else(i=e.nextAll(ee+ne).eq(0)).length||(i=e.prevAll(ee+ne).last()),o.close(e);return i&&!i.length?i=o.wrapper.children(".k-item").first():i||(i=[]),o._moveHover(e,i),i},_itemLeft:function(e,t){var n,i,a=this;return t?(n=e.parent().closest(".k-item"),i=a._overflowWrapper(),!n.length&&i&&(n=ke(e.parent(),i)),a.close(n),a._isRootItem(n)&&"horizontal"==a.options.orientation&&(n=n.prevAll(ee+ne).eq(0))):((n=e.prevAll(ee+ne).eq(0)).length||(n=e.nextAll(ee+ne).last()),a.close(e)),n.length||(n=a.wrapper.children(".k-item").last()),a._moveHover(e,n),n},_itemDown:function(e,t,n){var i,a=this;if(t)i=e.nextAll(ee+ne).eq(0);else{if(!n||e.hasClass($))return;a.open(e),i=a._childPopupElement(e).children().first()}return!i.length&&e.length?i=e.parent().children().first():e.length||(i=a.wrapper.children(".k-item").first()),a._moveHover(e,i),i},_itemUp:function(e,t){var n;if(t)return!(n=e.prevAll(ee+ne).eq(0)).length&&e.length?n=e.parent().children().last():e.length||(n=this.wrapper.children(".k-item").last()),this._moveHover(e,n),n},_scrollToItem:function(e){var t=this;if(t.options.scrollable&&e&&e.length){var i,a=e.parent(),r=!!a.hasClass(_)&&"horizontal"==t.options.orientation,o=r?"scrollLeft":"scrollTop",s=r?n._outerWidth:n._outerHeight,l=a[o](),d=s(e),u=e[0][r?"offsetLeft":"offsetTop"],c=s(a),p=a.siblings(ie),h=p.length?s(p.first()):0;if(l+c<u+d+h?i=u+d-c+h:l>u-h&&(i=u-h),!isNaN(i)){var f={};f[o]=i,a.finish().animate(f,"fast","linear",(function(){t._toggleScrollButtons(a,p.first(),p.last(),r)}))}}},_itemEsc:function(e,t){var n,i,a=this;return t?(0===(n=e.parent().closest(".k-item")).length&&(i=e.closest(".k-group").data("group"),n=a.wrapper.find(".k-item[data-groupparent='"+i+"']")),a.close(n),a._moveHover(e,n),n):e},_childPopupElement:function(e){var t=e.find(".k-menu-group"),n=this._overflowWrapper();return!t.length&&n&&(t=we(e,n)),t},_triggerEvent:function(e){return this.trigger(e.type,{type:e.type,item:e.item})},_focusHandler:function(t){var i=this,a=e(n.eventTarget(t)).closest(Z);a.hasClass($)||setTimeout((function(){i._moveHover([],a),a.children(".k-content")[0]&&a.parent().closest(".k-item").removeClass(K)}),200)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={open:{effects:{}},close:{hide:!0,effects:{}}})},_dataSource:function(e){var t=this,n=e?e.dataSource:t.options.dataSource;n&&(n=o(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"uid"},{field:"text"},{field:"url"},{field:"cssClass"},{field:"spriteCssClass"},{field:"imageUrl"},{field:"imageAttr"},{field:"attr"},{field:"contentAttr"},{field:"content"},{field:"encoded"},{field:"items"},{field:"select"}]),t.dataSource=s.create(n),t._bindDataSource(),t.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=this.refresh.bind(this),this._errorHandler=this._error.bind(this),this.dataSource.bind(N,this._refreshHandler),this.dataSource.bind(R,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(N,this._refreshHandler),e.unbind(R,this._errorHandler))},_error:function(){},findByUid:function(e){return(this._overflowWrapper()||this.element).find("["+n.attr("uid")+"="+e+"]")},refresh:function(e){var t=this,n=e.node,i=e.action,a=n?t.findByUid(n.uid):t.element,r=e.items,o=e.index,s=t._updateItem.bind(t),l=t._removeItem.bind(t);"add"==i?t._appendItems(r,o,a):"remove"==i?r.forEach(l):"itemchange"==i?r.forEach(s):"itemloaded"===i?t.append(e.items,a):this._initData(),this.trigger(re,{item:a,dataItem:n})},_appendItems:function(e,t,n){var i=n.find(ee).eq(t);i.length?this.insertBefore(e,i):this.append(e,n)},_removeItem:function(e){var t=this.findByUid(e.uid);this.remove(t)},_updateItem:function(e){var t=this,n=t.findByUid(e.uid),i=n.next(),a=e.parentNode();t.remove(n),i.length?t.insertBefore(e,i):t.append(e,a&&t.findByUid(a.uid))},_accessors:function(){var e,t,i,a=this.options,r=this.element;for(e in le)t=a[le[e]],i=r.attr(n.attr(e+"-field")),!t&&i&&(t=i),t||(t=e),o(t)||(t=[t]),a[le[e]]=t},_fieldAccessor:function(t){var i=this.options[le[t]]||[],a=i.length,r="(function(item) {";return 0===a?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(i,(function(e){return"function(d){ return "+n.expr(e)+"}"})).join(",")+"];",r+="if(item.level){return levels[Math.min(item.level(), "+a+"-1)](item);}else",r+="{return levels["+a+"-1](item)}"),r+="})"},_templates:function(){var e=this,t=e.options,i=e._fieldAccessor.bind(e);t.template&&"string"==typeof t.template?t.template=p(t.template):t.template||(t.template=p("<span class='k-menu-link-text'># var text = "+i("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {##= text ## } else { ##: text ## } #</span>")),e.templates={content:p("#var contentHtml = "+i("content")+"(item);#<div #= contentCssAttributes(item.toJSON ? item.toJSON() : item) # tabindex='-1'>#= contentHtml || '' #</div>"),group:p("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"),itemWrapper:p("# var url = "+i("url")+"(item); ## var imageUrl = "+i("imageUrl")+"(item); ## var imgAttributes = "+i("imageAttr")+"(item);## var tag = url ? 'a' : 'span' #<#= tag # class='#= textClass(item) #' #if(url){#href='#= url #'#}#># if (imageUrl) { #<img #= imageCssAttributes(imgAttributes) # alt='' src='#= imageUrl #' /># } ##= sprite(item) ##= data.menu.options.template(data) ##= arrow(data) #</#= tag #>"),item:p("#var contentHtml = "+i("content")+"(item);#<li class='#= wrapperCssClass(group, item) #' #= itemCssAttributes(item.toJSON ? item.toJSON() : item) # role='menuitem' #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#"+n.attr("uid")+"='#= item.uid #' # if(item.items && item.items.length > 0) { # # if(item.expanded) { # aria-expanded='true'# } else { # aria-expanded='false'# } ## } #>#= itemWrapper(data) ##if (item.hasChildren || item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl || contentHtml) { ##= renderContent(data) ## } #</li>"),scrollButton:p("<span class='k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-icon-button k-menu-scroll-button k-scroll-#= direction #' unselectable='on'><span class='k-button-icon k-icon k-i-arrow-60-#= direction #'></span></span>"),arrow:p("<span aria-hidden='true' class='k-menu-expand-arrow'><span class='#= arrowClass(item, group) #'></span></span>"),sprite:p("# var spriteCssClass = "+i("spriteCssClass")+"(data); if(spriteCssClass) {#<span class='k-sprite #= spriteCssClass #'></span>#}#"),empty:p("")}},renderItem:function(e){var t=this;e=u({menu:t,group:{}},e);var n=t.templates.empty,i=e.item;return t.templates.item(u(e,{sprite:t.templates.sprite,itemWrapper:t.templates.itemWrapper,renderContent:t.renderContent,arrow:i.items||i.content||i[t.options.dataContentField[0]]?t.templates.arrow:n,subGroup:t.renderGroup},de))},renderGroup:function(e){return(this.templates||e.menu.templates).group(u({renderItems:function(e){for(var t="",n=0,i=e.items,a=i?i.length:0,r=u({length:a},e.group);n<a;n++)t+=e.menu.renderItem(u(e,{group:r,item:u({index:n},i[n])}));return t}},e,de))},renderContent:function(e){return e.menu.templates.content(u(e,de))}}),Se=Te.extend({init:function(t,i){var a=this;Te.fn.init.call(a,t,i),a.element.attr(se,"menu"),a._marker=n.guid().substring(0,8),a.target=e(a.options.target),a._popup(),a._wire()},_initOverflow:function(t){var n=this;t.scrollable&&!n._overflowWrapper()&&(n._openedPopups={},n._popupsWrapper=(n.element.parent().is(X)?n.element.parent():n.element).wrap("<div class='k-popups-wrapper "+t.orientation+"'></div>").parent(),"horizontal"==n.options.orientation&&Ce(n.element),t.appendTo&&(t.appendTo=e(t.appendTo),t.appendTo.append(n._popupsWrapper)),n._initialHeight=n.element[0].style.height,n._initialWidth=n.element[0].style.width)},options:{name:"ContextMenu",filter:null,showOn:"contextmenu",orientation:"vertical",alignToAnchor:!1,copyAnchorStyles:!0,target:"body"},events:[v,x,E,A,I],setOptions:function(t){var n=this;Te.fn.setOptions.call(n,t),n.target.off(n.showOn+g+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(),Te.fn.setOptions.call(this,t)},destroy:function(){var e=this;e.target.off(e.options.showOn+g+e._marker),j.off(n.support.mousedown+g+e._marker,e._closeProxy),e.userEvents&&e.userEvents.destroy(),Te.fn.destroy.call(e)},open:function(i,a){var r=this;if(i=e(i)[0],ue(r.element[0],e(i)[0])||r._itemHasChildren(e(i)))Te.fn.open.call(r,i);else if(!1===r._triggerEvent({item:r.element,type:v})){if(r.popup.visible()&&r.options.filter&&(r.popup.close(!0),r.popup.element.kendoStop(!0)),a!==t){var o=r._overflowWrapper();if(o){var s=o.offset();i-=s.left,a-=s.top}r.popup.wrapper.hide(),r._configurePopupScrolling(i,a),r.popup.open(i,a)}else r.popup.options.anchor=i||r.popup.anchor||r.target,r.popup.element.kendoStop(!0),r._configurePopupScrolling(),r.popup.open();j.off(r.popup.downEvent,r.popup._mousedownProxy),j.on(n.support.mousedown+g+r._marker,r._closeProxy),r.element.trigger("focus")}return r},_configurePopupScrolling:function(e,n){var i=this,a=i.popup,r="horizontal"==i.options.orientation;i.options.scrollable&&(i._wrapPopupElement(a),a.element.parent().css({position:"",height:""}),a.element.css({visibility:"hidden",display:"",position:""}),r?i._setPopupWidth(a,isNaN(e)?t:{isFixed:!0,x:e,y:n}):i._setPopupHeight(a,isNaN(e)?t:{isFixed:!0,x:e,y:n}),a.element.css({visibility:"",display:"none",position:"absolute"}),i._initPopupScrollButtons(a,r,!0),a.element.siblings(ie).hide())},_setPopupWidth:function(t,i){var a=t.element,r=a.add(a.parent(X));r.width(this._initialWidth||"");var o=t._location(i),s=e(window).width(),l=o.width,d=Math.max(o.left,0),u=i?0:ye(this._overflowWrapper()[0],"scrollLeft"),c=n.getShadows(a),p=s-c.left-c.right;p+u>l+d||r.css({overflow:"hidden",width:p-d+u+"px"})},close:function(){var t=this;ue(t.element[0],e(arguments[0])[0])||t._itemHasChildren(arguments[0])?Te.fn.close.call(t,arguments[0]):t.popup.visible()&&!1===t._triggerEvent({item:t.element,type:x})&&(t._removeHoverItem(),t.element.find("#"+t._ariaId).removeAttr("id"),t.popup.close(),j.off(n.support.mousedown+g+t._marker,t._closeProxy),t.unbind(I,t._closeTimeoutProxy),t.popup.options.anchor.focus())},_showHandler:function(t){var i,a=t,r=this,o=r.options,s=n.support.mobileOS?e(a.target):e(a.currentTarget);t.event&&((a=t.event).pageX=t.x.location,a.pageY=t.y.location),ue(r.element[0],t.relatedTarget||t.target)||(r._eventOrigin=a,a.preventDefault(),a.stopImmediatePropagation(),r.element.find(".k-focus").removeClass(K),(o.filter&&s.is(o.filter)||!o.filter)&&(o.alignToAnchor?(r.popup.options.anchor=a.currentTarget,r.open(a.currentTarget)):(r.popup.options.anchor=a.currentTarget,r._targetChild?(i=r.target.offset(),r.open(a.pageX-i.left,a.pageY-i.top)):r.open(a.pageX,a.pageY))))},_closeHandler:function(t){var n=this,i=e(t.relatedTarget||t.target),a=i.closest(n.target.selector)[0]==n.target[0],r=i.closest(ee),o=n._itemHasChildren(r),s=n._overflowWrapper(),l=ue(n.element[0],i[0])||s&&ue(s[0],i[0]);n._eventOrigin=t;var d=3!==t.which;n.popup.visible()&&(d&&a||!a)&&(n.options.closeOnClick&&!o&&l||!l)&&(l?(this.unbind(I,this._closeTimeoutProxy),n.bind(I,n._closeTimeoutProxy)):n.close())},_wire:function(){var e=this,t=e.options,i=e.target;e._preventProxy=null,e._showProxy=e._showHandler.bind(e),e._closeProxy=e._closeHandler.bind(e),e._closeTimeoutProxy=e.close.bind(e),i[0]&&(n.support.mobileOS&&"contextmenu"==t.showOn&&(e.userEvents=new n.UserEvents(i,{filter:t.filter,allowSelection:!1}),e._preventProxy=function(){return!1},e.userEvents.bind("hold",e._showProxy)),t.filter?i.on(t.showOn+g+e._marker,t.filter,e._preventProxy||e._showProxy):i.on(t.showOn+g+e._marker,e._preventProxy||e._showProxy),i.on("keydown",(function(t){t.keyCode===n.keys.F10&&t.shiftKey&&(t.preventDefault(),e.open(t.target))})))},_triggerEvent:function(n){var i=this,a=e(i.popup.options.anchor)[0],r=i._eventOrigin;return i._eventOrigin=t,i.trigger(n.type,u({type:n.type,item:n.item||this.element[0],target:a},r?{event:r}:{}))},_popup:function(){var t=this,n=t._overflowWrapper();t._triggerProxy=t._triggerEvent.bind(t),t.popup=t.element.addClass("k-context-menu").kendoPopup({autosize:"horizontal"===t.options.orientation,anchor:t.target||"body",copyAnchorStyles:t.options.copyAnchorStyles,collision:t.options.popupCollision||"fit",animation:t.options.animation,activate:t._triggerProxy,deactivate:t._triggerProxy,appendTo:n||t.options.appendTo,close:n?function(t){e(be(t.sender.element,n)).each((function(e,t){var n=t.data(q);n&&n.close(!0)}))}:e.noop}).data(q),t._targetChild=ue(t.target[0],t.popup.element[0])},_moveHoverToRoot:function(e,t){this._moveHover(e,t),this.close()},_focus:function(e){var t=this._oldHoverItem=this._hoverItem()||[];Te.fn._focus.call(this,e),a()===e.currentTarget&&this._moveHover(t,this.wrapper.children().first())}});i.plugin(Te),i.plugin(Se)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.html.HTMLBase,a=i.extend({init:function(e,t){i.fn.init.call(this,e,t),this._wrapper()},options:{name:"HTMLChip",size:"medium",rounded:"medium",fillMode:"solid",themeColor:"base",attr:{},icon:"",iconAttr:{},removable:!1,removableAttr:{},removeIcon:"x-circle",content:"",text:"",stylingOptions:["size","rounded","fillMode","themeColor"]},_wrapper:function(){var t=this,n=t.options;t.wrapper=t.element.wrap("<span class='k-chip'></span>").parent().attr(n.attr),t._addClasses(),n.icon&&t.wrapper.prepend(e("<span class='k-chip-icon k-icon k-i-"+n.icon+"'></span>").attr(n.iconAttr)),t.element.addClass("k-chip-content"),n.text&&t.element.html('<span class="k-chip-label">'+n.text+"</span>"),n.removable&&t.wrapper.append(e("<span class='k-chip-action k-chip-remove-action'><span class='k-icon k-i-"+n.removeIcon+"'></span></span>").attr(n.removableAttr))}});e.extend(n.html,{renderChip:function(t,n){return t&&!e.isPlainObject(t)||(n=t,t=e("<span></span>")),new a(t,n).html()},HTMLChip:a}),n.cssProperties.registerPrefix("HTMLChip","k-chip-")}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.html.HTMLBase,a=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.wrapper=n.element.addClass("k-chip-list"),n._addClasses()},options:{name:"HTMLChipList",size:"medium",stylingOptions:["size"]}});e.extend(n.html,{renderChipList:function(n,i){return(arguments[0]===t||e.isPlainObject(arguments[0]))&&(i=n,n=e("<div></div>")),new a(n,i).html()},HTMLChipList:a}),n.cssProperties.registerPrefix("HTMLChipList","k-chip-list-")}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.List,r=n.html,o=e.extend({A:65},n.keys),s=n._activeElement,l=n.data.ObservableArray,d="id",u=".k-chip",c="accept",p="filter",h="rebind",f="open",m="close",g="change",v="select",_="deselect",b="aria-disabled",k="aria-readonly",w="aria-expanded",y="aria-hidden",x="aria-activedescendant",C="aria-busy",T="k-focus",S="k-selected",I="k-hidden",D="k-hover",E="k-disabled",A="k-no-click",F="disabled",z="readonly",P=".kendoMultiSelect",H="click"+P,N="mouseenter"+P,R="mouseleave"+P,O=/"/g,M=Array.isArray,B=["font-family","font-size","font-stretch","font-style","font-weight","letter-spacing","text-transform","line-height"],L=a.extend({init:function(t,i){var r,o=this;o.ns=P,a.fn.init.call(o,t,i),o._optionsMap={},o._customOptions={},o._wrapper(),o._tagList(),o._input(),o._textContainer(),o._loader(),o._clearButton(),o._arrowButton(),o._tabindex(o.input),t=o.element.attr("multiple","multiple").hide(),(i=o.options).placeholder||(i.placeholder=t.data("placeholder")),(r=t.attr(d))||(r=n.guid()),r&&(o._tagID=r+"_tag_active",r+="_taglist",o.tagList.attr(d,r)),o._initialOpen=!0,i.label&&this._label(),o._aria(),o._dataSource(),o._ignoreCase(),o._popup(),o._tagTemplate(),o.requireValueMapper(o.options),o._initList(),o._reset(),o._enable(),o._placeholder(),i.autoBind?o.dataSource.fetch():i.value&&o._preselect(i.value),e(o.element).parents("fieldset").is(":disabled")&&o.enable(!1),o._toggleCloseVisibility(),o._applyCssClasses(),n.notify(o)},options:{name:"MultiSelect",tagMode:"multiple",enabled:!0,autoBind:!0,autoClose:!0,highlightFirst:!0,dataTextField:"",dataValueField:"",filter:"startswith",ignoreCase:!0,minLength:1,messages:{singleTag:"item(s) selected",clear:"clear",deleteTag:"delete",noData:"No data found.",downArrow:"select"},enforceMinLength:!1,delay:100,value:null,maxSelectedItems:null,placeholder:"",height:200,animation:{},virtual:!1,itemTemplate:"",tagTemplate:"",groupTemplate:"#:data#",fixedGroupTemplate:"#:data#",clearButton:!0,autoWidth:!1,popup:null,size:"medium",fillMode:"solid",rounded:"medium",label:null},events:[f,m,g,v,_,"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);a.fn.setOptions.call(this,e),this.listView.setOptions(t),this._accessors(),this._aria(),this._tagTemplate(),this._placeholder(),this._clearButton(),this._arrowButton()},currentTag:function(e){var n=this;if(e===t)return n._currentTag;n._currentTag&&(n._currentTag.removeClass(T).removeAttr(d),n._currentTag.find(".k-chip-action").attr(y,!0),n.input.removeAttr(x)),e&&(e.addClass(T).attr(d,n._tagID),e.find(".k-chip-action").removeAttr(y),n.input.attr(x,n._tagID)),n._currentTag=e},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),a.fn.destroy.call(e)},_aria:function(){var e=this,t=e.ul[0].id,n="none"===this.options.filter?"none":"list",i=e.tagList.attr(d);e.input.attr({role:"combobox","aria-expanded":!1,"aria-controls":t,"aria-autocomplete":n,"aria-describedby":i}),e._ariaLabel(e._focused)},_activateItem:function(){this.popup.visible()&&a.fn._activateItem.call(this),this.currentTag(null)},_listOptions:function(t){var i=this,r=a.fn._listOptions.call(i,e.extend(t,{selectedItemChange:i._selectedItemChange.bind(i),selectable:"multiple"})),o=this.options.itemTemplate||this.options.template,s=r.itemTemplate||o||r.template;return s||(s="#:"+n.expr(r.dataTextField,"data")+"#"),r.template=s,r},_setListValue:function(){a.fn._setListValue.call(this,this._initialValues.slice(0))},_listChange:function(e){var n=this.dataSource.flatView(),i=this._optionsMap,a=this._value;this._state===h&&(this._state="");for(var r=0;r<e.added.length;r++)if(i[a(e.added[r].dataItem)]===t){this._render(n);break}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(u).eq(t.index).children("span").first().html(this.tagTextTemplate(t.item))},_wrapperMousedown:function(t){var i=this,a="input"!==t.target.nodeName.toLowerCase(),r=e(t.target),o=r.closest(".k-multiselect-toggle-button, .k-chip").children(".k-i-arrow-s")[0],l=r.closest(".k-i-x, .k-i-x-circle")[0];!a||l&&n.support.mobileOS||!t.cancelable||t.preventDefault(),l||(o&&i.popup.visible()?i.toggle(!1):(i.input[0]!==s()&&a&&i.input.trigger("focus"),1!==i.options.minLength||i.popup.visible()||i.open()))},_inputFocus:function(){this._placeholder(!1,!0),this.wrapper.addClass(T)},_inputFocusout:function(){var e=this;clearTimeout(e._typingTimeout),e.wrapper.removeClass(T),e._placeholder(!e.listView.selectedDataItems()[0],!0),e.close(),e._state===p&&(e._state=c,e.listView.skipUpdate(!0)),e.listView.bound()&&e.listView.isFiltered()&&(e.persistTagList=!0,e._clearFilter()),e.element.trigger("blur")},_removeTag:function(e,n){var i,a=this,r=a._state,o=e.index(),s=a.listView,l=s.value()[o],d=a.listView.selectedDataItems()[o],u=a._customOptions[l],h=s.element[0].children;if(a.trigger(_,{dataItem:d,item:e}))a._close();else{u!==t||r!==c&&r!==p||(u=a._optionsMap[l]);var f=function(){a.currentTag(null),n&&a._change(),a._close()};u===t&&s.select().length?(a.persistTagList=!1,s.select(s.select()[o]).done(f)):((i=a.element[0].children[u])&&(i.selected=!1),s.removeAt(o),s._removedAddedIndexes&&s._removedAddedIndexes.splice(o,1),h[u]&&h[u].classList.remove("k-selected"),"single"!==a.options.tagMode?e.remove():a._updateTagListHTML(),f())}},_tagListClick:function(t){t.preventDefault(),t.stopPropagation();var n=e(t.currentTarget);n.is(".k-i-x-circle")&&this._removeTag(n.closest(u),!0)},_clearValue:function(){var t=this;"single"===t.options.tagMode?t._clearSingleTagValue():t.tagList.children(u).each((function(n,i){t._removeTag(e(i),!1)})),t.input.val(""),t._search(),t._change(),t.focus(),t._hideClear(),t._state===p&&(t._state=c)},_clearSingleTagValue:function(){for(var e=this,t=e.dataItems(),n=e.tagList.children(u),i=e.persistTagList,a=0;a<t.length;a+=1)if(e.trigger(_,{dataItem:t[a],item:n.first()}))return void e._close();i&&(e.persistTagList=!1),e.listView.value([]),e.persistTagList=i},_focusHandler:function(){var e=this.input,t=s();e[0]===t||this.input.trigger("focus")},_editable:function(t){var n=this,i=t.disable,a=t.readonly,r=n.wrapper.off(P),o=n.tagList.off(P),s=n.input.off(P);a||i?(r.toggleClass(E,i).toggleClass(A,a),s.attr(F,i).attr(z,a).attr(b,i).attr(k,a),n.element.prop(F,i)):(r.removeClass(E).removeClass(A).on("mouseenter.kendoMultiSelect mouseleave.kendoMultiSelect",n._toggleHover).on("mousedown"+P+" touchend"+P,n._wrapperMousedown.bind(n)).on(H,n._focusHandler.bind(n)),n.input.on("keydown.kendoMultiSelect",n._keydown.bind(n)).on("paste"+P,n._search.bind(n)).on("input"+P,n._search.bind(n)).on("focus"+P,n._inputFocus.bind(n)).on("focusout"+P,n._inputFocusout.bind(n)),n._clear.on(H+" touchend"+P,n._clearValue.bind(n)),s.prop(F,!1).prop(z,!1).attr(b,!1).attr(k,!1),n.element.prop(F,!1),o.on(N,u,(function(){e(this).addClass(D)})).on(R,u,(function(){e(this).removeClass(D)})).on(H+" touchend"+P,".k-chip .k-icon",n._tagListClick.bind(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,a.fn._filterSource.call(this,e,t)},close:function(){this._activeItem=null,this.input.removeAttr(x),this.popup.close()},open:function(){var t,n=this,i=n.input.val().toLowerCase(),a=n.listView.dataSource.filter();a&&a.filters.length>0&&(t=(a.filters[0].value||"").toString().toLowerCase()),n._request&&(n._retrieveData=!1),n._retrieveData||!n.listView.bound()||n._state===c&&i!==t?(n._open=!0,n._state=h,n.listView.skipUpdate(!0),n.persistTagList=!(n._initialOpen&&!n.listView.bound()),n._filterSource(),n._focusItem()):n._allowOpening()&&(!n._initialOpen||n.options.autoBind||n.options.virtual||!n.options.value||e.isPlainObject(n.options.value[0])||n.value(n.value()||n._initialValues),n.popup._hovered=!0,n._initialOpen=!1,n.popup.open(),n._focusItem())},toggle:function(e){this[(e=e!==t?e:!this.popup.visible())?f:m]()},refresh:function(){this.listView.refresh()},_floatCheck:function(){return!this.listView||!(this.value()&&this.value().length)&&!this.popup.visible()},_listBound:function(){var e=this,t=e.dataSource.flatView();e._render(t),e._renderFooter(),e._renderNoData(),e._toggleNoData(!t.length),e._resizePopup(),e._open&&(e._open=!1,e.toggle(e._allowOpening())),e.popup.position(),e._updateItemFocus(),e._touchScroller&&e._touchScroller.reset(),e._hideBusy(),e.trigger("dataBound")},_updateItemFocus:function(){var e=this,n=e.dataSource.flatView(),i=e.listView.skip(),a=i===t||0===i;n.length&&a&&(e.options.highlightFirst?e.listView.focusFirst():e.listView.focus(-1))},_inputValue:function(){var e=this.input.val();return this.options.placeholder===e&&(e=""),e},value:function(e){var n=this,i=n.listView,a=i.value().slice(),r=n.options.maxSelectedItems,o=i.bound()&&i.isFiltered();if(e===t)return a;n.persistTagList=!1,n.requireValueMapper(n.options,e),e=n._normalizeValues(e),null!==r&&e.length>r&&(e=e.slice(0,r)),o&&n._clearFilter(),i.value(e),n._old=n._valueBeforeCascade=e.slice(),o||n._fetchData(),n._toggleCloseVisibility()},_preselect:function(t,i){var a=this;M(t)||t instanceof n.data.ObservableArray||(t=[t]),(e.isPlainObject(t[0])||t[0]instanceof n.data.ObservableObject||!a.options.dataValueField)&&(a.dataSource.data(t),a.value(i||a._initialValues),a._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;0===e.listView.value().length||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,i=e.options,a=i.dataSource||{};(a=M(a)?{data:a}:a).select=t,a.fields=[{field:i.dataTextField},{field:i.dataValueField}],e.dataSource&&e._refreshHandler?e._unbindDataSource():(e._progressHandler=e._showBusy.bind(e),e._errorHandler=e._hideBusy.bind(e)),e.dataSource=n.data.DataSource.create(a).bind("progress",e._progressHandler).bind("error",e._errorHandler)},_reset:function(){var t=this,n=t.element,i=n.attr("form"),a=i?e("#"+i):n.closest("form");a[0]&&(t._resetHandler=function(){setTimeout((function(){t.value(t._initialValues),t._placeholder()}))},t._form=a.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)})):M(t)||t instanceof l?M(t)&&(t=t.slice()):t=[t],t},_change:function(){var e=this,t=e.value();(function(e,t){var n;if(null===e&&null!==t||null!==e&&null===t)return!1;if((n=e.length)!==t.length)return!1;for(;n--;)if(e[n]!==t[n])return!1;return!0})(t,e._old)||(e._old=t.slice(),e.trigger(g),e.element.trigger(g)),e.popup.position(),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(i){var a,r=this,s=i.keyCode,l=r._currentTag,d=r.listView,p=r.input.val(),h=n.support.isRtl(r.wrapper),f=r.popup.visible(),m=0;if(s!==o.ENTER&&(this._multipleSelection=!1),s===o.DOWN){if(i.preventDefault(),!f)return r.open(),void(d.focus()||d.focusFirst());d.focus()?(!r._activeItem&&i.shiftKey&&(r._activeItem=d.focus(),m=-1),a=d.getElementIndex(r._getActiveItem().first()),d.focusNext(),d.focus()?i.shiftKey&&!r.options.virtual&&(this._multipleSelection=!0,r._selectRange(a,d.getElementIndex(d.focus().first())+m)):d.focusLast()):d.focusFirst()}else if(s===o.UP)f&&(!r._activeItem&&i.shiftKey&&(r._activeItem=d.focus(),m=1),a=d.getElementIndex(r._getActiveItem().first()),d.focusPrev(),d.focus()?i.shiftKey&&!r.options.virtual&&(this._multipleSelection=!0,r._selectRange(a,d.getElementIndex(d.focus().first())+m)):r.close()),i.preventDefault();else if(s===o.LEFT&&!h||s===o.RIGHT&&h)p||(l=l?l.prev(u):r.tagList.children(u).last())[0]&&r.currentTag(l);else if(s===o.RIGHT&&!h||s===o.LEFT&&h)!p&&l&&(l=l.next(u),r.currentTag(l[0]?l:null));else if(i.ctrlKey&&!i.altKey&&s===o.A&&f&&!r.options.virtual)this._multipleSelection=!0,this._getSelectedIndices().length===d.items().length&&(r._activeItem=null),d.items().length&&r._selectRange(0,d.items().length-1);else if(s===o.ENTER&&f){if(!d.focus())return;if(i.preventDefault(),this._multipleSelection&&(this._multipleSelection=!1,d.focus().hasClass(S)))return void r._close();r._select(d.focus()).done((function(){r._change(),r._close()}))}else if(s===o.SPACEBAR&&i.ctrlKey&&f)r._activeItem&&d.focus()&&d.focus()[0]===r._activeItem[0]&&(r._activeItem=null),e(d.focus()).hasClass(S)||(r._activeItem=d.focus()),r._select(d.focus()).done((function(){r._change()})),i.preventDefault();else if(s===o.SPACEBAR&&i.shiftKey&&f&&!r.options.virtual){var g=d.getElementIndex(r._getActiveItem()),v=d.getElementIndex(d.focus());g!==t&&v!==t&&r._selectRange(g,v),i.preventDefault()}else if(s===o.ESC)f?i.preventDefault():(r.tagList.children(u).each((function(t,n){r._removeTag(e(n),!1)})),r._change()),r.close();else if(s===o.HOME)f?d.focus()?(i.ctrlKey&&i.shiftKey&&!r.options.virtual&&r._selectRange(d.getElementIndex(d.focus()[0]),0),d.focusFirst()):r.close():p||(l=r.tagList.children(u).first()[0])&&r.currentTag(e(l));else if(s===o.END)f?d.focus()?(i.ctrlKey&&i.shiftKey&&!r.options.virtual&&r._selectRange(d.getElementIndex(d.focus()[0]),d.element.children().length-1),d.focusLast()):r.close():p||(l=r.tagList.children(u).last()[0])&&r.currentTag(e(l));else if(s!==o.DELETE&&s!==o.BACKSPACE||p)if(!r.popup.visible()||s!==o.PAGEDOWN&&s!==o.PAGEUP)clearTimeout(r._typingTimeout),r._search();else{i.preventDefault();var _=s===o.PAGEDOWN?1:-1;d.scrollWith(_*d.screenHeight())}else{if(r._state=c,"single"===r.options.tagMode)return r._clearSingleTagValue(),r._change(),void r._close();s!==o.BACKSPACE||l||(l=r.tagList.children(u).last()),l&&l[0]&&r._removeTag(l,!0)}},_hideBusy:function(){var e=this;clearTimeout(e._busy),e.input.attr(C,!1),e._loading.addClass(I),e._request=!1,e._busy=null,e._toggleCloseVisibility()},_showBusyHandler:function(){this.input.attr(C,!0),this._loading.removeClass(I),this._hideClear()},_showBusy:function(){var e=this;e._request=!0,e._busy||(e._busy=setTimeout(e._showBusyHandler.bind(e),100))},_placeholder:function(e,i){var a=this,r=a.input,o=s(),l=a.options.placeholder,d=r.val(),u=r[0]===o,c=d.length;u&&!a.options.autoClose&&d!==l||(c=0,d=""),e===t&&(e=!1,r[0]!==o&&(e=!a.listView.selectedDataItems()[0])),a._prev=d,r.toggleClass("k-readonly",e).val(e?l:d),u&&!i&&n.caret(r[0],c,c)},_option:function(e,i,a){var r="<option";return e!==t&&(-1!==(e+="").indexOf('"')&&(e=e.replace(O,"&quot;")),r+=' value="'+e+'"'),a&&(r+=" selected"),r+=">",i!==t&&(r+=n.htmlEncode(i)),r+"</option>"},_render:function(e){var t,n,i,a,r=this.listView.selectedDataItems(),o=this.listView.value(),s=e.length,l="";o.length!==r.length&&(r=this._buildSelectedItems(o));var d={},u={};for(a=0;a<s;a++)n=e[a],i=this._value(n),-1!==(t=this._selectedItemIndex(i,r))&&r.splice(t,1),u[i]=a,l+=this._option(i,this._text(n),-1!==t);if(r.length)for(a=0;a<r.length;a++)n=r[a],d[i=this._value(n)]=s,u[i]=s,s+=1,l+=this._option(i,this._text(n),!0);this._customOptions=d,this._optionsMap=u,this.element.html(l)},_buildSelectedItems:function(e){for(var t,n=this.options.dataValueField,i=this.options.dataTextField,a=[],r=0;r<e.length;r++)(t={})[n]=e[r],t[i]=e[r],a.push(t);return a},_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;clearTimeout(e._typingTimeout),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()&&a.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.added&&this.persistTagList.added.length===t.length&&this.persistTagList.removed&&this.persistTagList.removed.length===e.length?this.persistTagList=!1:(this.listView._removedAddedIndexes=this._old.slice(),this.persistTagList={added:e,removed:t})},_selectValue:function(e,t){var n,i,a,r=this,o=r.dataSource.total(),s=r.tagList,l=r._value;if(this.persistTagList)this.updatePersistTagList(e,t);else{if(r._angularTagItems("cleanup"),"multiple"===r.options.tagMode){for(a=t.length-1;a>-1;a--)n=t[a],s.children(u).length&&(s[0].removeChild(s[0].children[n.position]),r._setOption(l(n.dataItem),!1));for(a=0;a<e.length;a++)i=e[a],r.input.before(r.tagTemplate(i.dataItem)),r._setOption(l(i.dataItem),!0)}else{for((!r._maxTotal||r._maxTotal<o)&&(r._maxTotal=o),this._updateTagListHTML(),a=t.length-1;a>-1;a--)r._setOption(l(t[a].dataItem),!1);for(a=0;a<e.length;a++)r._setOption(l(e[a].dataItem),!0)}r._refreshFloatingLabel(),r._angularTagItems("compile"),r._placeholder()}},_updateTagListHTML:function(){var t=this,n=t.value(),i=t.dataSource.total();t.tagList.children(u).each((function(t,n){e(n).remove()})),n.length&&t.input.before(t.tagTemplate({values:n,dataItems:t.dataItems(),maxTotal:t._maxTotal,currentTotal:i}))},_select:function(t){var n=e.Deferred().resolve();if(!t)return n;var i=this,a=i.listView,r=a.dataItemByIndex(a.getElementIndex(t)),o=t.hasClass("k-selected");return i._state===h&&(i._state=""),i._allowSelection()||o?i.trigger(o?_:v,{dataItem:r,item:t})?(i._close(),n):(i.persistTagList=!1,a.select(t).done((function(){i._placeholder(),i._state===p&&(i._state=c,a.skipUpdate(!0))}))):n},_selectRange:function(t,n){var i,a=this,r=this.listView,o=this.options.maxSelectedItems,s=this._getSelectedIndices().slice(),l=[],d=function(t){r.select(t).done((function(){t.forEach((function(t){var n=r.dataItemByIndex(t),i=r.element.children()[t],o=e(i).hasClass("k-selected");a.trigger(o?v:_,{dataItem:n,item:e(i)})})),a._change()}))};if(s.length-1==n-t)return d(s);if(t<n)for(i=t;i<=n;i++)l.push(i);else for(i=t;i>=n;i--)l.push(i);for(null!==o&&l.length>o&&(l=l.slice(0,o)),i=0;i<l.length;i++){var u=l[i];-1==this._getSelectedIndices().indexOf(u)?s.push(u):s.splice(s.indexOf(u),1)}return s.length?(a.persistTagList=!1,d(s)):void 0},_input:function(){var t=this,n=t.element,i=n[0].accessKey,a=t.tagList.children("input.k-input-inner");a[0]||(a=e('<input class="k-input-inner" />').appendTo(t.tagList)),n.removeAttr("accesskey"),t._focused=t.input=a.attr({autocomplete:"off",title:n[0].title}),i&&t._focused.attr("accesskey",i)},_tagList:function(){var t=this,n=t.options,i=t.wrapper.children(".k-input-values");i[0]||(i=e(r.renderChipList('<div unselectable="on" class="k-input-values k-selection-multiple" />',e.extend({},n))).appendTo(t.wrapper)),t.tagList=i},_tagTemplate:function(){var t,i=this,a=i.options,o=a.tagTemplate,s=a.dataSource,l="multiple"===a.tagMode,d=a.messages.singleTag;i.element[0].length&&!s&&(a.dataTextField=a.dataTextField||"text",a.dataValueField=a.dataValueField||"value"),t=l?n.template("#:"+n.expr(a.dataTextField,"data")+"#",{useWithBlock:!1}):n.template("#:values.length# "+d),i.tagTextTemplate=o=o?n.template(o):t,i.tagTemplate=function(t){return r.renderChip('<span unselectable="on"></span>',e.extend({},a,{fillMode:"solid",rounded:"medium",themeColor:"base",text:o(t),attr:{unselectable:"on"},removable:l,removableAttr:{unselectable:"on","aria-hidden":!0,"aria-label":i.options.messages.deleteTag,title:i.options.messages.deleteTag},icon:l?"":"arrow-s",iconAttr:{unselectable:"on","aria-hidden":!0,"aria-label":"open"}}))}},_loader:function(){this._loading=e('<span class="k-icon k-i-loading k-input-loading-icon k-hidden"></span>').insertAfter(this.tagList)},_clearButton:function(){a.fn._clearButton.call(this),this.options.clearButton&&(this._clear.insertAfter(this.tagList),this.wrapper.addClass("k-multiselect-clearable"))},_arrowButton:function(){var t=this.options.messages.downArrow,n=e(r.renderButton('<button type="button" aria-label="'+t+'" class="k-input-button k-multiselect-toggle-button"></button>',e.extend({},this.options,{icon:"arrow-s"})));this._arrow&&(this._arrow.remove(),this._arrow=null),this.options.downArrow&&(this._arrow=n.attr({tabIndex:-1}),this._arrow.appendTo(this.wrapper))},_textContainer:function(){var t=n.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 e=this.element,t=e.parent("span.k-multiselect");t[0]||((t=e.wrap('<span class="k-multiselect k-input" unselectable="on" />').parent())[0].style.cssText=e[0].style.cssText),this.wrapper=t.addClass(e[0].className).removeClass("input-validation-error").css("display","")},_closeHandler:function(e){this.trigger(m)?e.preventDefault():(this.input.attr(w,!1),this.ul.attr(y,!0))},_openHandler:function(e){this._adjustListWidth(),this.trigger(f)?e.preventDefault():(this.input.attr(w,!0),this.ul.attr(y,!1))}});i.plugin(L),n.cssProperties.registerPrefix("MultiSelect","k-input-"),n.cssProperties.registerValues("MultiSelect",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}])}(window.kendo.jQuery);!function(e,t){var n,i=window.kendo,a=i.ui,r=i.keys,o=e.extend,s=e.each,l=Array.isArray,d=i.template,u=a.Widget,c=i.data.HierarchicalDataSource,p=/^(ul|a|div)$/i,h=".kendoPanelBar",f="href",m="k-last",g="k-link",v="."+g,_="error",b=".k-item",k=".k-group:visible",w="k-image",y="k-first",x="change",C="expand",T="select",S="click",I="k-content",D="activate",E="collapse",A="dataBound",F="mouseenter",z="contentLoad",P="k-active",H="> .k-panel",N="> .k-content",R="k-focus",O="k-disabled",M="k-selected",B=".k-selected",L="k-highlight",V=b+":not(.k-disabled)",U="> .k-item:not(.k-disabled) > .k-link, .k-panel > .k-item:not(.k-disabled) > .k-link",W="> li > .k-selected, .k-panel > li > .k-selected",j="aria-disabled",q="aria-expanded",G="aria-hidden",K="aria-selected",$=":visible",Y="single",Q={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},X={aria:function(e){var t="";return(e.items||e.content||e.contentUrl||e.expanded)&&(t+="aria-expanded='"+(e.expanded?"true":"false")+"' "),!1===e.enabled&&(t+="aria-disabled='true'"),t},wrapperCssClass:function(e,t){var n="k-item",i=t.index;return n+=e.firstLevel?" k-panelbar-header":" k-panelbar-item",!1===t.enabled?n+=" k-disabled":!0===t.expanded&&(n+=" k-active"),0===i&&(n+=" k-first"),i==e.length-1&&(n+=" k-last"),t.cssClass&&(n+=" "+t.cssClass),t.level&&(n+=" k-level-"+t.level()),n},textClass:function(e){var t=g;return e.selected&&(t+=" k-selected"),t},textAttributes:function(e){return e?" href='"+e+"'":""},arrowClass:function(e){var t="k-icon";return t+=e.expanded?" k-panelbar-toggle k-panelbar-collapse k-i-arrow-chevron-up":" k-panelbar-toggle k-panelbar-expand k-i-arrow-chevron-down"},text:function(e){return!1===e.encoded?e.text:i.htmlEncode(e.text)},groupAttributes:function(e){return!0!==e.expanded?" style='display:none'":""},ariaHidden:function(e){return!0!==e.expanded},groupCssClass:function(){return"k-panelbar-group k-group k-panel"},contentAttributes:function(e){return!0!==e.item.expanded?" style='display:none'":""},content:function(e){return e.content?e.content:e.contentUrl?"":"&nbsp;"},contentUrl:function(e){return e.contentUrl?'href="'+e.contentUrl+'"':""}};function J(t){(t=e(t)).filter(".k-first:not(:first-child)").removeClass(y),t.filter(".k-last:not(:last-child)").removeClass(m),t.filter(":first-child").addClass(y),t.filter(":last-child").addClass(m)}function Z(t){(t=e(t)).addClass("k-level-"+t.parentsUntil(".k-panelbar","ul").length)}n=function(e){return e.children("span").children(".k-icon")};var ee=i.ui.DataBoundWidget.extend({init:function(e,t){var n,a,r=this;l(t)&&(t={dataSource:t}),a=t&&!!t.dataSource,u.fn.init.call(r,e,t),e=r.wrapper=r.element.addClass("k-panelbar"),t=r.options,e[0].id&&(r._itemId=e[0].id+"_pb_active"),r._tabindex(),r._accessors(),r._dataSource(),r._templates(),r._initData(a),r._updateClasses(),r._animations(t),e.on(S+h,U,r._click.bind(r)).on(F+h+" mouseleave"+h,U,r._toggleHover).on(S+h,".k-item.k-disabled > .k-link",!1).on(S+h,".k-request-retry",r._retryRequest.bind(r)).on("keydown"+h,r._keydown.bind(r)).on("focus"+h,(function(){var e=r.select();r._current(e[0]?e:r._first())})).on("blur"+h,(function(){r._current(null)})).attr("role","tree"),(n=e.find("li.k-active > ."+I))[0]&&r.expand(n.parent(),!1),t.dataSource||r._angularCompile(),i.notify(r)},events:[C,E,T,D,x,_,A,z],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",template:"",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){this.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(){u.fn.destroy.call(this),this.element.off(h),this._angularCleanup(),i.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=e._fieldAccessor.bind(e);t.template&&"string"==typeof t.template?t.template=d(t.template):t.template||(t.template=d("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {#<span class='k-panelbar-item-text'>#= text #</span># } else { #<span class='k-panelbar-item-text'>#: text #</span># } #")),e.templates={content:d("<div class='k-panelbar-content k-content'#= contentAttributes(data) #>#= content(item) #</div>"),group:d("<ul role='group' aria-hidden='#= ariaHidden(group) #' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"),itemWrapper:d("# 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) #' #= contentUrl ##= textAttributes(url) #># if (imageUrl) { #<img class='k-panelbar-item-icon k-image' alt='' src='#= imageUrl #' /># } ## if (spriteCssClass) { #<span class='k-sprite #= spriteCssClass #'></span># } ##= data.panelBar.options.template(data) ##= arrow(data) #</#= tag #>"),item:d("<li aria-selected='false' role='treeitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'"+i.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:d("<li class='k-item'><span class='k-icon k-i-loading'></span> #: data.messages.loading #</li>"),retry:d("<li class='k-item'>#: data.messages.requestFailed # <button class='k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-request-retry'><span class='k-button-text'>#: data.messages.retry #</span></button></li>"),arrow:d("<span class='#= arrowClass(item) #'></span>"),empty:d("")}},setOptions:function(e){var t=this.options.animation;this._animations(e),e.animation=o(!0,t,e.animation),"dataSource"in e&&this.setDataSource(e.dataSource),u.fn.setOptions.call(this,e)},expand:function(t,n){var i=this,a={};if(t=this.element.find(t),!i._animating||!t.find("ul").is(":visible"))return i._animating=!0,n=!1!==n,t.each((function(r,o){o=e(o);var s=t.children(".k-group,.k-content");s.length||(s=i._addGroupElement(t));var l=s.add(o.find(N));if(!o.hasClass(O)&&l.length>0){if(i.options.expandMode==Y&&i._collapseAllExpanded(o))return i;t.find(".k-highlight").removeClass(L),o.addClass(L),n||(a=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(C,o)||i._toggleItem(o,!1,!1),n||(i.options.animation=a)}})),i;i.one("complete",(function(){setTimeout((function(){i.expand(t)}))}))},collapse:function(t,n){var i=this,a={};return i._animating=!0,n=!1!==n,(t=i.element.find(t)).each((function(t,r){var o=(r=e(r)).find(H).add(r.find(N));!r.hasClass(O)&&o.is($)&&(r.removeClass(L),n||(a=i.options.animation,i.options.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),i._triggerEvent(E,r)||i._toggleItem(r,!0),n||(i.options.animation=a))})),i},updateArrow:function(t){var n=this;(t=e(t)).children(v).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-toggle k-panelbar-collapse k-i-arrow-chevron-up":" k-panelbar-toggle k-panelbar-expand k-i-arrow-chevron-down")+"'/>")}))},_accessors:function(){var e,t,n,a=this.options,r=this.element;for(e in Q)t=a[Q[e]],n=r.attr(i.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),l(t)||(t=[t]),a[Q[e]]=t},_progress:function(e,t){var i=this.element,a=this.templates.loading({messages:this.options.messages});1==arguments.length?(t=e)?i.html(a):i.empty():n(e).toggleClass("k-i-loading",t).removeClass("k-i-refresh")},_refreshRoot:function(t){var n=this,i={firstLevel:!0,expanded:!0,length:n.element.children().length};this.element.empty();var r=e.map(t,(function(t,a){return"string"==typeof t?e(t):(t.items=[],e(n.renderItem({group:i,item:o(t,{index:a})})))}));this.element.append(r);for(var s=this.element.children(".k-item"),l=0;l<t.length;l++)this.trigger("itemChange",{item:s.eq(l).find(".k-link").first(),data:t[l],ns:a});this._angularCompileElements(r,t)},_refreshChildren:function(t,n){var i,r,o;n.children(".k-group").empty();var s=t.children.data();if(s.length)for(this.append(t.children,n),this.options.loadOnDemand&&this._toggleGroup(n.children(".k-group"),!1),r=n.children(".k-group").children("li"),i=0;i<r.length;i++)o=r.eq(i),this.trigger("itemChange",{item:o.find(".k-link").first(),data:this.dataItem(o),ns:a});else!function(t){var n=t,i=t.children("ul"),a=n.children(".k-link").children(".k-icon");t.hasClass("k-panelbar")||(!a.length&&i.length?a=e("<span class='k-icon' />").appendTo(n):i.length&&i.children().length||(a.remove(),i.remove()))}(n),r=n.children(".k-group").children("li"),this._angularCompileElements(r,s)},findByUid:function(t){for(var n,a=this.element.find(".k-item"),r=i.attr("uid"),o=0;o<a.length;o++)if(a[o].getAttribute(r)==t){n=a[o];break}return e(n)},refresh:function(e){var n=this.options,i=e.node,a=e.action,r=e.items,o=this.wrapper,s=n.loadOnDemand;if(e.field){if(!r[0]||!r[0].level)return;return this._updateItems(r,e.field)}if(i&&(o=this.findByUid(i.uid),this._progress(o,!1)),"add"==a?this._appendItems(e.index,r,o):"remove"==a?this.remove(this.findByUid(r[0].uid)):"itemchange"==a?this._updateItems(r):"itemloaded"==a?this._refreshChildren(i,o):this._refreshRoot(r),"remove"!=a)for(var l=0;l<r.length;l++)if(!s||r[l].expanded){var d=r[l];this._hasChildItems(d)&&d.load()}this.trigger(A,{node:i?o:t})},_error:function(e){var t=e.node&&this.findByUid(e.node.uid),i=this.templates.retry({messages:this.options.messages});t?(this._progress(t,!1),this._expanded(t,!1),n(t).addClass("k-i-refresh"),e.node.loaded(!1)):(this._progress(!1),this.element.html(i))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch()},items:function(){return this.element.find(".k-item > span:first-child")},setDataSource:function(e){this.options.dataSource=e,this._dataSource(),this.options.autoBind&&(this._progress(!0),this.dataSource.fetch())},_bindDataSource:function(){this._refreshHandler=this.refresh.bind(this),this._errorHandler=this._error.bind(this),this.dataSource.bind(x,this._refreshHandler),this.dataSource.bind(_,this._errorHandler)},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(x,this._refreshHandler),e.unbind(_,this._errorHandler))},_fieldAccessor:function(t){var n=this.options[Q[t]]||[],a=n.length,r="(function(item) {";return 0===a?r+="return item['"+t+"'];":(r+="var levels = ["+e.map(n,(function(e){return"function(d){ return "+i.expr(e)+"}"})).join(",")+"];",r+="if(item.level){return levels[Math.min(item.level(), "+a+"-1)](item);}else",r+="{return levels["+a+"-1](item)}"),r+="})"},_dataSource:function(){var e=this,t=e.options.dataSource;t&&(t=l(t)?{data:t}:t,e._unbindDataSource(),t.fields||(t.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),e.dataSource=c.create(t),e._bindDataSource())},_appendItems:function(t,n,i){var a,r,s=this;i.hasClass("k-panelbar")?(a=i.children("li"),r=i):((r=i.children(".k-group")).length||(r=s._addGroupElement(i)),a=r.children("li"));var l={firstLevel:i.hasClass("k-panelbar"),expanded:!0,length:a.length},d=e.map(n,(function(t,n){return e("string"==typeof t?t:s.renderItem({group:l,item:o(t,{index:n})}))}));void 0===t&&(t=a.length);for(var u=0;u<d.length;u++)0===a.length||0===t?r.append(d[u]):d[u].insertAfter(a[t-1]);s._angularCompileElements(d,n),s.dataItem(i)&&(s.dataItem(i).hasChildren=!0,s.updateArrow(i))},_updateItems:function(t,n){var i,r,s,l,d=this,u={panelBar:d.options,item:l,group:{}},c="expanded"!=n;if("selected"==n)if(t[0][n]){var p=d.findByUid(t[0].uid);p.hasClass(O)||d.select(p,!0)}else d.clearSelection();else{var h=e.map(t,(function(e){return d.findByUid(e.uid)}));for(c&&d.angular("cleanup",(function(){return{elements:h}})),i=0;i<t.length;i++)u.item=l=t[i],u.panelBar=d,r=(s=h[i]).parent(),c&&(u.group={firstLevel:r.hasClass("k-panelbar"),expanded:s.parent().hasClass(P),length:s.children().length},s.children(".k-link").remove(),s.prepend(d.templates.itemWrapper(o(u,{arrow:l.hasChildren||l.content||l.contentUrl?d.templates.arrow:d.templates.empty},X)))),"expanded"==n?d._toggleItem(s,!l[n],!l[n]||"true"):"enabled"==n&&(d.enable(s,l[n]),l[n]||l.selected&&l.set("selected",!1)),s.length&&this.trigger("itemChange",{item:s.find(".k-link").first(),data:l,ns:a});c&&d.angular("compile",(function(){return{elements:h,data:e.map(t,(function(e){return[{dataItem:e}]}))}}))}},_toggleDisabled:function(e,t){(e=this.element.find(e)).toggleClass(O,!t).attr(j,!t)},dataItem:function(t){var n=e(t).closest(b).attr(i.attr("uid")),a=this.dataSource;return a&&a.getByUid(n)},select:function(n,i){var a=this;return n===t?a.element.find(W).parent():((n=a.element.find(n)).length?n.each((function(){var t=e(this),n=t.children(v);if(t.hasClass(O))return a;a._updateSelected(n,i)})):this._updateSelected(n),a)},clearSelection:function(){this.select(e())},enable:function(e,t){return this._toggleDisabled(e,!1!==t),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(H):null);return s(n.items,(function(){n.group.append(this),J(this),Z(this)})),this.updateArrow(t),J(n.group.find(".k-first, .k-last")),n.group.height("auto"),this},insertBefore:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return s(n.items,(function(){t.before(this),J(this),Z(this)})),J(t),n.group.height("auto"),this},insertAfter:function(e,t){t=this.element.find(t);var n=this._insert(e,t,t.parent());return s(n.items,(function(){t.after(this),J(this),Z(this)})),J(t),n.group.height("auto"),this},remove:function(e){var t=this,n=(e=this.element.find(e)).parentsUntil(t.element,b),i=e.parent("ul");return e.remove(),!i||i.hasClass("k-panelbar")||i.children(b).length||i.remove(),n.length&&(n=n.eq(0),t.updateArrow(n),J(n)),t},reload:function(t){var n=this;(t=n.element.find(t)).each((function(){var t=e(this);n._ajaxRequest(t,t.children("."+I),!t.is($))}))},_first:function(){return this.element.children(V).first()},_last:function(){var e=this.element.children(V).last(),t=e.children(k);return t[0]?t.children(V).last():e},_current:function(n){var i=this,a=i._focused,r=i._itemId;if(n===t)return a;i.element.removeAttr("aria-activedescendant"),a&&a.length&&(a[0].id===r&&a.removeAttr("id"),a.children(v).removeClass(R)),e(n).length&&(r=n[0].id||r,n.attr("id",r).children(v).addClass(R),i.element.attr("aria-activedescendant",r)),i._focused=n},_keydown:function(e){var t=this,n=e.keyCode,i=t._current();e.target==e.currentTarget&&(n==r.DOWN||n==r.RIGHT?(t._current(t._nextItem(i)),e.preventDefault()):n==r.UP||n==r.LEFT?(t._current(t._prevItem(i)),e.preventDefault()):n==r.ENTER||n==r.SPACEBAR?(t._click(e),e.preventDefault()):n==r.HOME?(t._current(t._first()),e.preventDefault()):n==r.END&&(t._current(t._last()),e.preventDefault()))},_nextItem:function(e){if(!e)return this._first();var t=e.children(k),n=e.nextAll(":visible").first();return t[0]&&(n=t.children("."+y)),n[0]||(n=e.parent(k).parent(b).next()),n[0]||(n=this._first()),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(k).children("."+m))[0]&&(n=t);else(n=e.parent(k).parent(b))[0]||(n=this._last());return n},_insert:function(t,n,i){var a,r,s=this,l=e.isPlainObject(t),d=n&&n[0];if(d||(i=s.element),r={firstLevel:i.hasClass("k-panelbar"),expanded:e(n).hasClass(P),length:i.children().length},d&&!i.length&&(i=e(s.renderGroup({group:r,options:s.options})).appendTo(n)),l||Array.isArray(t)||t instanceof c){if(t instanceof c&&(t=t.data()),a=e.map(l?[t]:t,(function(t,n){return e("string"==typeof t?t:s.renderItem({group:r,item:o(t,{index:n})}))})),d){var u=s.dataItem(n);u?(u.hasChildren=!0,n.attr(q,u.expanded).not(".k-active").children("ul").attr(G,!u.expanded)):n.attr(q,!1)}}else a="string"==typeof t&&"<"!=t.charAt(0)?s.element.find(t):e(t),s._updateItemsClasses(a);return t.length||(t=[t]),s._angularCompileElements(a,t),{items:a,group:i}},_toggleHover:function(t){var n=e(t.currentTarget);n.parents("li.k-disabled").length||n.toggleClass("k-hover",t.type==F)},_updateClasses:function(){var t,n,i,a,r,o=this;a=(t=o.element.find("li > ul").not((function(){return e(this).parentsUntil(".k-panelbar","div").length})).addClass("k-panelbar-group k-group k-panel").attr("role","group")).parent(),i=(r=o.dataItem(a))&&r.expanded||!1,t.parent().not("[aria-expanded]").attr(q,i).not(".k-active").children("ul").attr(G,!i).hide(),n=o.element.add(t).children(),o._updateItemsClasses(n),o.updateArrow(n),J(n)},_updateItemsClasses:function(e){for(var t=e.length,n=0;n<t;n++)this._updateItemClasses(e[n],n)},_updateItemClasses:function(t,n){var a,r,o=this._selected,s=this.options.contentUrls,l=s&&s[n],d=this.element[0];t=e(t).addClass("k-item").attr({role:"treeitem","aria-selected":!1}),i.support.browser.msie&&t.css("list-style-position","inside").css("list-style-position",""),t.children("img").addClass(w),(r=t.children("a").addClass(g))[0]&&(r.attr("href",l),r.children("img").addClass(w)),t.filter("li[disabled]").addClass("k-disabled").attr(j,!0).prop("disabled",!1),t.children("div").addClass(I+" k-panelbar-content").attr(G,!0).hide().parent().attr(q,!1),(r=t.children(B))[0]&&(o&&o.attr(K,!1).children(B).removeClass(M),r.addClass(M),this._selected=t.attr(K,!0)),t.children(v)[0]||(a="<span class='k-link'><span class='k-panelbar-item-text'></span></span>",s&&s[n]&&t[0].parentNode==d&&(a='<a class="k-link" href="'+s[n]+'"></a>'),t.contents().filter((function(){return!(this.nodeName.match(p)||3==this.nodeType&&!i.trim(this.nodeValue.trim))})).wrapAll(a)),t.parent(".k-panelbar")[0]?t.addClass("k-panelbar-header"):t.addClass("k-panelbar-item"),/k\-level\-\d+/i.test(t.attr("class"))||t.addClass("k-level-"+t.parentsUntil(this.element,"ul").length)},_click:function(t){var n,i,a,r=this,o=t.type==S?e(t.target):r._current().children(v),s=r.element;if(!o.parents("li.k-disabled").length&&o.closest(".k-panelbar")[0]==s[0]&&(!o.is(":kendoFocusable")||o.hasClass(g))){var l=o.closest(v),d=l.closest(b);r._updateSelected(l);var u=d.children(".k-group,.k-content"),c=this.dataItem(d);if(!u.length&&(r.options.loadOnDemand&&c&&c.hasChildren||this._hasChildItems(d)||d.content||d.contentUrl)&&(u=r._addGroupElement(d)),i=d.find(H).add(d.find(N)),n=!(!((a=l.attr(f))&&("#"==a.charAt(a.length-1)||-1!=a.indexOf("#"+r.element[0].id+"-")))&&!i.length),i.data("animating")&&n)t.preventDefault();else if(r._triggerEvent(T,d)&&(n=!0),!1!==n)if(r.options.expandMode==Y&&r._collapseAllExpanded(d)&&n)t.preventDefault();else{if(i.length){var p=i.is($);r._triggerEvent(p?E:C,d)||(n=r._toggleItem(d,p))}n&&t.preventDefault()}}},_hasChildItems:function(e){return e.items&&e.items.length>0||e.hasChildren},_toggleItem:function(e,n,i){var a,r,o=this,s=e.find(H),l=e.find(v).attr(f),d=o.dataItem(e),u=!n,c=d&&d.loaded();return d&&!i&&d.expanded!==u?(d.set("expanded",u),a=d.hasChildren||!!d.content||!!d.contentUrl):(!d||i&&"true"!==i||c||d.content||d.contentUrl?s.length?(this._toggleGroup(s,n),a=!0):(r=e.children("."+I)).length&&(a=!0,r.is(":empty")&&l!==t?o._ajaxRequest(e,r,n):o._toggleGroup(r,n)):(o.options.loadOnDemand&&this._progress(e,!0),e.children(".k-group,.k-content").remove(),a=d.hasChildren,d.load()),a)},_toggleGroup:function(e,t){var n=this,i=n.options.animation,a=i.expand,r=i.collapse&&"effects"in i.collapse,s=o({},i.expand,i.collapse);r||(s=o(s,{reverse:!0})),e.is($)==t?(e.attr(G,!!t),e.parent().attr(q,!t).toggleClass(P,!t).find("> .k-link > .k-panelbar-collapse,> .k-link > .k-panelbar-expand").toggleClass("k-i-arrow-chevron-up",!t).toggleClass("k-panelbar-collapse",!t).toggleClass("k-i-arrow-chevron-down",t).toggleClass("k-panelbar-expand",t),t?(a=o(s,{hide:!0})).complete=function(){n._animationCallback()}:a=o({complete:function(e){n._triggerEvent(D,e.closest(b)),n._animationCallback()}},a),e.toggle(0).kendoStop(!0,!0).kendoAnimate(a)):n._animating=!1},_animationCallback:function(){this.trigger("complete"),this._animating=!1},_addGroupElement:function(t){var n=e('<ul role="group" aria-hidden="true" class="k-panelbar-group k-group k-panel" style="display:none"></ul>');return t.append(n),n},_collapseAllExpanded:function(t){var n,i=this,a=!1,r=t.find(H).add(t.find(N));return r.is($)&&(a=!0),r.is($)||0===r.length||((n=t.siblings()).find(H).add(n.find(N)).filter((function(){return e(this).is($)})).each((function(t,n){n=e(n),(a=i._triggerEvent(E,n.closest(b)))||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)}))}))}))),a},_ajaxRequest:function(t,n,i){var a=this,r=t.find(".k-panelbar-collapse, .k-panelbar-expand"),o=t.find(v),s=setTimeout((function(){r.addClass("k-i-loading")}),100),l=o.attr(f);e.ajax({type:"GET",cache:!1,url:l,dataType:"html",data:{},error:function(e,t){r.removeClass("k-i-loading"),a.trigger(_,{xhr:e,status:t})&&this.complete()},complete:function(){clearTimeout(s),r.removeClass("k-i-loading")},success:function(e){function r(){return{elements:n.get()}}try{a.angular("cleanup",r),n.html(e),a.angular("compile",r)}catch(e){var o=window.console;o&&o.error&&o.error(e.name+": "+e.message+" in "+l),this.error(this.xhr,"error")}a._toggleGroup(n,i),a.trigger(z,{item:t[0],contentElement:n[0]})}})},_triggerEvent:function(e,t){return this.trigger(e,{item:t[0]})},_updateSelected:function(e,t){var n=this,i=n.element,a=e.parent(b),r=n._selected,o=n.dataItem(a);r&&r.attr(K,!1),n._selected=a.attr(K,!0),i.find(W).removeClass(M),i.find("> .k-highlight, .k-panel > .k-highlight").removeClass(L),e.addClass(M),e.parentsUntil(i,b).filter(":has(.k-link)").addClass(L),n._current(a[0]?a:null),o&&o.set("selected",!0),t||n.trigger(x)},_animations:function(e){e&&"animation"in e&&!e.animation&&(e.animation={expand:{effects:{}},collapse:{hide:!0,effects:{}}})},renderItem:function(e){var t=this;e=o({panelBar:t,group:{}},e);var n=t.templates.empty,i=e.item;return t.templates.item(o(e,{itemWrapper:t.templates.itemWrapper,renderContent:t.renderContent,arrow:t._hasChildItems(i)||i.content||i.contentUrl?t.templates.arrow:n,subGroup:!e.loadOnDemand||i.expanded?t.renderGroup:n},X))},renderGroup:function(e){return(this.templates||e.panelBar.templates).group(o({renderItems:function(e){for(var t="",n=0,i=e.items,a=i?i.length:0,r=o({length:a},e.group);n<a;n++)t+=e.panelBar.renderItem(o(e,{group:r,item:o({index:n},i[n])}));return t}},e,X))},renderContent:function(e){return e.panelBar.templates.content(o(e,X))}});i.ui.plugin(ee)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=n.keys,r=e.extend,o=i.Widget,s=/^\d+(\.\d+)?px$/i,l=/^\d+(\.\d+)?%$/i,d=".kendoSplitter",u="expand",c="collapse",p="contentLoad",h="error",f="layoutChange",m="horizontal",g="vertical",v="click",_="pane",b="k-focus",k="k-pane",w=".k-pane";function y(e){return l.test(e)}function x(e){return s.test(e)||/^\d+$/.test(e)}function C(e){return!y(e)&&!x(e)}function T(e,t){var n=parseInt(e,10);return y(e)&&(n=Math.floor(n*t/100)),n}function S(e,t){return function(n,i){var a=this.element.find(n).data(_);if(1==arguments.length)return a[e];if(a[e]=i,t){var r=this.element.data("kendo"+this.options.name);r.resize(!0)}}}var I=o.extend({init:function(e,t){var i,r=this;o.fn.init.call(r,e,t),r.wrapper=r.element,r.options.orientation&&(i=r.options.orientation.toLowerCase()!=g),r.orientation=i?m:g,r._dimension=i?"width":"height",r._keys={decrease:i?a.LEFT:a.UP,increase:i?a.RIGHT:a.DOWN},r._resizeStep=10,r._marker=n.guid().substring(0,8),r._initPanes(),r.resizing=new A(r),r.element.triggerHandler("init"+d)},events:[u,c,p,h,"resize",f],_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"+d,t._keydown.bind(t)).on("mousedown"+d,(function(e){e.currentTarget.focus()})).on("focus"+d,(function(t){e(t.currentTarget).addClass(b)})).on("blur"+d,(function(n){e(n.currentTarget).removeClass(b),t.resizing&&t.resizing.end()})).on("mouseenter"+d,(function(){e(this).addClass("k-splitbar-"+t.orientation+"-hover")})).on("mouseleave"+d,(function(){e(this).removeClass("k-splitbar-"+t.orientation+"-hover")})).on("mousedown"+d,t._addOverlays.bind(t)).end().children(".k-splitbar").on("dblclick"+d,t._togglePane.bind(t)).children(".k-collapse-next, .k-collapse-prev").on(v+d,t._arrowClick(c)).end().children(".k-expand-next, .k-expand-prev").on(v+d,t._arrowClick(u)).end().end(),e(window).on("resize"+d+t._marker,t.resize.bind(t,!1)),e(document).on("mouseup"+d+t._marker,t._removeOverlays.bind(t))},_detachEvents:function(){var t=this;t.element.children(".k-splitbar-draggable-"+t.orientation).off(d).end().children(".k-splitbar").off("dblclick"+d).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(d),e(window).off(d+t._marker),e(document).off(d+t._marker)},options:{name:"Splitter",orientation:m,panes:[]},destroy:function(){o.fn.destroy.call(this),this._detachEvents(),this.resizing&&this.resizing.destroy(),n.destroy(this.element),this.wrapper=this.element=null},_keydown:function(t){var n,i=this,r=t.keyCode,o=i.resizing,s=e(t.currentTarget),l=i._keys,d=r===l.increase,p=r===l.decrease;d||p?(t.ctrlKey?(n=s[p?"next":"prev"](),o&&o.isResizing()&&o.end(),n[i._dimension]()?i._triggerAction(c,s[p?"prev":"next"]()):i._triggerAction(u,n)):o&&o.move((p?-1:1)*i._resizeStep,s),t.preventDefault()):r===a.HOME?(n=s.prev(),i.collapse(n),t.preventDefault()):r===a.END?(n=s.prev(),i.expand(n),t.preventDefault()):r===a.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(k)).data(_,n||{}).toggleClass("k-scrollable",!n||!1!==n.scrollable),this.ajaxRequest(t)},ajaxRequest:function(e,t,i){var a,r=this;a=(e=r.element.find(e)).data(_),(t=t||a.contentUrl)&&(e.append("<span class='k-icon k-i-loading k-pane-loading' />"),n.isLocalUrl(t)?jQuery.ajax({url:t,data:i||{},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(p,{pane:e[0]})},error:function(t,n){r.trigger(h,{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){var n=t.data(_),i=n.collapsed&&e==u||!n.collapsed&&e==c;n.collapsible&&i&&!this.trigger(e,{pane:t[0]})&&this[e](t[0])},_togglePane:function(t){var n,i=this,a=e(t.target);a.closest(".k-splitter")[0]==i.element[0]&&1===(n=a.children(".k-icon:not(.k-resize-handle)")).length&&(n.is(".k-collapse-prev")?i._triggerAction(c,a.prev()):n.is(".k-collapse-next")?i._triggerAction(c,a.next()):n.is(".k-expand-prev")?i._triggerAction(u,a.prev()):n.is(".k-expand-next")&&i._triggerAction(u,a.next()))},_arrowClick:function(t){var n=this;return function(i){var a,r=e(i.target);r.closest(".k-splitter")[0]==n.element[0]&&(a=r.is(".k-"+t+"-prev")?r.parent().prev():r.parent().next(),n._triggerAction(t,a))}},_updateSplitBar:function(e,t,i,a){var r=function(e,t){return t?"<div class='k-icon "+e+"'></div>":""},o=this.orientation,s=!1!==t.resizable&&!1!==i.resizable,l=t.collapsible,d=t.collapsed,u=i.collapsible,c=i.collapsed,p=a.attr("id");p||(p=n.guid(),a.attr("id",p)),e.addClass("k-splitbar k-splitbar-"+o).attr("role","separator").attr("aria-valuemin","0").attr("aria-valuemax","100").attr("aria-controls",p).removeClass("k-splitbar-"+o+"-hover").toggleClass("k-splitbar-draggable-"+o,s&&!d&&!c).toggleClass("k-splitbar-static-"+o,!s&&!l&&!u).html(r("k-collapse-prev k-i-arrow-60-up",l&&!d&&!c&&o==g)+r("k-collapse-prev k-i-arrow-60-left",l&&!d&&!c&&o==m)+r("k-expand-prev k-i-arrow-60-down",l&&d&&!c&&o==g)+r("k-expand-prev k-i-arrow-60-right",l&&d&&!c&&o==m)+r("k-resize-handle k-i-hbar",s&&o==g)+r("k-resize-handle k-i-vbar",s&&o==m)+r("k-collapse-next k-i-arrow-60-down",u&&!c&&!d&&o==g)+r("k-collapse-next k-i-arrow-60-right",u&&!c&&!d&&o==m)+r("k-expand-next k-i-arrow-60-up",u&&c&&!d&&o==g)+r("k-expand-next k-i-arrow-60-left",u&&c&&!d&&o==m)),t.labelId?e.attr("aria-labelledby",t.labelId):t.label&&e.attr("aria-label",t.label),o==m&&e.attr("aria-orientation",g),s||l||u||e.removeAttr("tabindex")},_updateSplitBars:function(){var t=this;this.element.children(".k-splitbar").each((function(){var n=e(this),i=n.prevAll(w).first(),a=i.data(_),r=n.nextAll(w).first().data(_);r&&t._updateSplitBar(n,a,r,i)}))},_removeSplitBars:function(){this.element.children(".k-splitbar").remove()},_panes:function(){return this.element?this.element.children(w):e()},_resetAriaValueNow:function(e,t){var n,i,a;for(n=0;n<e.length;n++)a=t[n]+t[n+1]||1,i=Math.round(t[n]/a*100),e[n].setAttribute("aria-valuenow",i)},_resize:function(){var t=this,i=t.element,a=i.children(w),r=t.orientation==m,o=i.children(".k-splitbar"),s=o.length,l=r?"width":"height",d=i[l](),u=[];t.wrapper.addClass("k-splitter-resizing"),0===s?(s=a.length-1,a.slice(0,s).after("<div tabindex='0' class='k-splitbar' data-marker='"+t._marker+"' />"),t._updateSplitBars(),o=i.children(".k-splitbar")):t._updateSplitBars(),o.each((function(){d-=this[r?"offsetWidth":"offsetHeight"]}));var c=0,p=e();a.css({position:"absolute",top:0})[l]((function(){var t,n=e(this),i=n.data(_)||{};if(n.removeClass("k-collapsed"),i.collapsed)t=i.collapsedSize?T(i.collapsedSize,d):0,n.css("overflow","hidden").addClass("k-collapsed");else{if(C(i.size))return p=p.add(this),void u.push(!1);t=T(i.size,d)}return c+=t,u.push(t),t})),d-=c;var h=p.length,g=Math.floor(d/h);p.slice(0,h-1).css(l,g).end().eq(h-1).css(l,d-(h-1)*g),u.forEach((function(e,t){!1===e&&(u[t]=g)})),t._resetAriaValueNow(o,u);var v=0,b=r?"height":"width",k=r?"left":"top",y=r?"offsetWidth":"offsetHeight";if(0===h){var x=a.filter((function(){return!(e(this).data(_)||{}).collapsed})).last();x[l](d+x[0][y])}i.children().css(b,i[b]()).each((function(e,t){"script"!=t.tagName.toLowerCase()&&(t.style[k]=Math.floor(v)+"px",v+=t[y])})),t._detachEvents(),t._attachEvents(),t.wrapper.removeClass("k-splitter-resizing"),n.resize(a),t.trigger(f)},toggle:function(e,n){var i,a=this;i=(e=a.element.find(e)).data(_),(n||i.collapsible)&&(1==arguments.length&&(n=i.collapsed!==t&&i.collapsed),i.collapsed=!n,i.collapsed?e.css("overflow","hidden"):e.css("overflow",""),a.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.wrapper.children(".k-pane").index(n),a=e("<div />").insertBefore(e(n));return this._addPane(t,i,a)},insertAfter:function(t,n){n=e(n),t=t||{};var i=this.wrapper.children(".k-pane").index(n),a=e("<div />").insertAfter(e(n));return this._addPane(t,i+1,a)},remove:function(t){var i=this;return(t=i.wrapper.find(t)).length&&(n.destroy(t),t.each((function(t,n){i.options.panes.splice(i.wrapper.children(".k-pane").index(n),1),e(n).remove()})),i._removeSplitBars(),i.options.panes.length&&i.resize(!0)),i},size:S("size",!0),min:S("min"),max:S("max")});i.plugin(I);var D={sizingProperty:"height",sizingDomProperty:"offsetHeight",alternateSizingProperty:"width",positioningProperty:"top",mousePositioningProperty:"pageY"},E={sizingProperty:"width",sizingDomProperty:"offsetWidth",alternateSizingProperty:"height",positioningProperty:"left",mousePositioningProperty:"pageX"};function A(e){var t=this,i=e.orientation;t.owner=e,t._element=e.element,t.orientation=i,r(t,i===m?E:D),t._resizable=new n.ui.Resizable(e.element,{orientation:i,handle:".k-splitbar-draggable-"+i+"[data-marker="+e._marker+"]",hint:t._createHint.bind(t),start:t._start.bind(t),max:t._max.bind(t),min:t._min.bind(t),invalidClass:"k-restricted-size-"+i,resizeend:t._stop.bind(t)})}A.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+"' />").css(n.alternateSizingProperty,t[n.alternateSizingProperty]())},_start:function(t){var n=this,i=e(t.currentTarget),a=i.prev(),r=i.next(),o=a.data(_),s=r.data(_),l=parseInt(a[0].style[n.positioningProperty],10),d=parseInt(r[0].style[n.positioningProperty],10)+r[0][n.sizingDomProperty]-i[0][n.sizingDomProperty],u=parseInt(n._element.css(n.sizingProperty),10),c=function(e){var t=parseInt(e,10);return(x(e)?t:u*t/100)||0},p=c(o.min),h=c(o.max)||d-l,f=c(s.min),m=c(s.max)||d-l;n.previousPane=a,n.nextPane=r,n._maxPosition=Math.min(d-f,l+h),n._minPosition=Math.max(l+p,d-m)},_max:function(){return this._maxPosition},_min:function(){return this._minPosition},_stop:function(t){var i=this,a=e(t.currentTarget),r=i.owner;if(r._panes().children(".k-splitter-overlay").remove(),t.keyCode!==n.keys.ESC){var o=t.position,s=a.prev(),l=a.next(),d=s.data(_),u=l.data(_),c=o-parseInt(s[0].style[i.positioningProperty],10),p=parseInt(l[0].style[i.positioningProperty],10)+l[0][i.sizingDomProperty]-o-a[0][i.sizingDomProperty],h=i._element.children(w).filter((function(){return C(e(this).data(_).size)})).length;(!C(d.size)||h>1)&&(C(d.size)&&h--,d.size=c+"px"),(!C(u.size)||h>1)&&(u.size=p+"px"),r.resize(!0)}return!1}}}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=n.ui.Popup,r=n.isFunction,o=e.isPlainObject,s=e.extend,l=e(document),d=n.isLocalUrl,u="_tb_active",c="aria-describedby",p="show",h="hide",f="error",m="contentLoad",g="requestStart",v="k-content-frame",_=n.template("<iframe frameborder='0' class='k-content-frame' src='#= content.url #'>This page requires frames in order to show content</iframe>"),b=".kendoTooltip",k={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"}},w={top:"bottom",bottom:"top",left:"right",right:"left",center:"center"},y={bottom:"n",top:"s",left:"e",right:"w",center:"n"},x={horizontal:{offset:"top",size:"outerHeight"},vertical:{offset:"left",size:"outerWidth"}};function C(e){for(;e.length&&!T(e);)e=e.parent()}function T(e){var t=e.data(n.ns+"title");if(t)return e.attr("title",t),e.removeData(n.ns+"title"),!0}function S(e){var t=e.attr("title");if(t)return e.data(n.ns+"title",t),e.attr("title",""),!0}function I(e){for(;e.length&&!e.is("body")&&!S(e);)e=e.parent()}var D=i.extend({init:function(e,t){var a,r=this;i.fn.init.call(r,e,t),a=r.options.position.match(/left|right/)?"horizontal":"vertical",r.dimensions=x[a],n.support.touch&&this._isShownOnMouseEnter()&&r.element.on(n.support.mousedown+b,r.options.filter,r._showOn.bind(r)),r.element.on(r.options.showOn+b,r.options.filter,r._showOn.bind(r)),"click"===r.options.showOn&&r.element.on("keydown"+b,r.options.filter,r._keydown.bind(r))},options:{name:"TooltipBase",filter:"",offset:0,showAfter:100,hideAfter:100,callout:!0,position:"bottom",showOn:"mouseenter",animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},destroy:function(){var e=this.popup;e&&(e.element.off(b),e.destroy()),clearTimeout(this.timeout),i.fn.destroy.call(this)},hide:function(){this.popup&&this.popup.close()},show:function(e){e=e||this.element,this._saveTitle(e),this._show(e)},target:function(){return this.popup?this.popup.options.anchor:null},_keydown:function(t){var i=e(t.currentTarget);t.keyCode==n.keys.ENTER&&this._show(i)},_showOn:function(t){var n=this,i=e(t.currentTarget);n._isShownOnClick()&&!n._isShownOnMouseEnter()?n._show(i):n._isShownOnFocus()?(n._saveTitle(i),n._show(i)):(clearTimeout(n.timeout),n.timeout=setTimeout((function(){n._show(i)}),n.options.showAfter))},_isShownOnFocus:function(){return this.options.showOn&&this.options.showOn.match(/focus/)},_isShownOnMouseEnter:function(){return this.options.showOn&&this.options.showOn.match(/mouseenter/)},_isShownOnClick:function(){return this.options.showOn&&this.options.showOn.match(/click/)},_positionCallout:function(){var t=this,n=t.options.position,i=t.dimensions,a=i.offset,r=t.popup,o=r.options.anchor,s=e(o).offset(),l=e(r.element).offset(),d=y[r.flipped?w[n]:n],u=s[a]-l[a]+e(o)[i.size]()/2;t._offset(n,t.options.offset),t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-"+d).css(a,u)},_offset:function(e,t,i){var a=this,r="top"==e||"left"==e,o=a.popup.flipped,s=r&&o||!r&&!o?1:-1,l=r?"margin-"+e:"margin-"+w[e],d=(i||n._outerWidth(a.arrow))/2+t;a.popup.wrapper.css(l,d*s+"px")},_addDescribedBy:function(){var e=this,t=e.popup.options.anchor,i=t[0].id||e.element[0].id||n.guid(),a=[];t.attr(c)&&a.push(t.attr(c)),i&&(a.push(i+u),t.attr(c,a.join(" ")),e.popup.element.attr("id",i+u))},_removeDescribedBy:function(e){var t,n,i,a=this.popup.element.attr("id"),r=e.attr(c);r&&((t=r.split(" "))&&t.length>0&&(n=t.filter((function(e){return e!==a}))),n&&n.length>0?(i=n.join(" "),e.attr(c,i)):e.removeAttr(c))},_openPopup:function(){this.popup&&(this.popup._hovered=!0,this.popup.open())}});n.ui.plugin(D);var E=D.extend({init:function(e,t){var i,a=this;D.fn.init.call(a,e,t),i=a.options.position.match(/left|right/)?"horizontal":"vertical",a.dimensions=x[i],a._documentKeyDownHandler=a._documentKeyDown.bind(a),(this._isShownOnMouseEnter()||this._isShownOnClick())&&a.element.on("mouseenter"+b,a.options.filter,a._mouseenter.bind(a)),this.options.autoHide&&this._isShownOnMouseEnter()&&a.element.on("mouseleave"+b,a.options.filter,a._mouseleave.bind(a)),this.options.autoHide&&this._isShownOnFocus()&&a.element.on("blur"+b,a.options.filter,a._blur.bind(a)),n.support.touch&&a.element.on(n.support.mousedown+b,a.options.filter,a._mouseenter.bind(a))},options:{name:"Tooltip",filter:"",content:function(e){return e.target.data(n.ns+"title")},showAfter:100,callout:!0,offset:0,position:"bottom",showOn:"mouseenter",autoHide:!0,width:null,height:null,animation:{open:{effects:"fade:in",duration:0},close:{duration:40,hide:!0}}},events:[p,h,m,f,g],_mouseenter:function(t){I(e(t.currentTarget))},_saveTitle:function(e){I(e)},_appendContent:function(e){var t,i=this,a=i.options.content,s=i.content,l=i.options.iframe;o(a)&&a.url?("iframe"in i.options||(l=!d(a.url)),i.trigger(g,{options:a,target:e}),l?(s.hide(),(t=s.find("."+v)[0])?t.src=a.url||t.src:s.html(_({content:a})),s.find("."+v).off("load"+b).on("load"+b,(function(){i.trigger(m),s.show()}))):(s.empty(),n.ui.progress(s,!0),i._ajaxRequest(a))):a&&r(a)?(a=a({sender:this,target:e}),s.html(a||"")):s.html(a),i.angular("compile",(function(){return{elements:s}}))},_ajaxRequest:function(e){var t=this;jQuery.ajax(s({type:"GET",dataType:"html",cache:!1,error:function(e,i){n.ui.progress(t.content,!1),t.trigger(f,{status:i,xhr:e})},success:function(e){n.ui.progress(t.content,!1),t.content.html(e),n._outerHeight(t.popup.element)>n._outerHeight(t.popup.wrapper)&&(t.popup.wrapper.css("height",n._outerHeight(t.popup.element)+"px"),t.popup.position(),t._positionCallout()),t.trigger(m)}.bind(t)},e))},_documentKeyDown:function(e){e.keyCode===n.keys.ESC&&this.hide()},refresh:function(){var e=this.popup;e&&e.options.anchor&&this._appendContent(e.options.anchor)},_show:function(e){var t=this,n=t.target();t.popup||t._initPopup(),n&&n[0]!=e[0]&&(t.popup.close(),t.popup.element.kendoStop(!0,!0)),n&&n[0]==e[0]||(t._appendContent(e),t.popup.options.anchor=e),t.popup.one("deactivate",(function(){C(e),t._removeDescribedBy(e),this.element.removeAttr("id").attr("aria-hidden",!0),l.off("keydown"+b,t._documentKeyDownHandler)})),t._openPopup()},_initPopup:function(){var t=this,i=t.options,r=e(n.template('<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#"><div class="k-tooltip-content"></div>#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close" title="Close"></a></div> #}##if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>')({callout:i.callout&&"center"!==i.position,dir:y[i.position],autoHide:i.autoHide}));t.popup=new a(r,s({autosize:!0,activate:function(){t._addDescribedBy(),i.callout?t._positionCallout():t._offset(t.options.position,t.options.offset),this.element.removeAttr("aria-hidden"),l.on("keydown"+b,t._documentKeyDownHandler),t.trigger(p),t.popup._hovered=undefined},close:function(){t.trigger(h)},copyAnchorStyles:!1,animation:i.animation},k[i.position])),r.css({width:i.width,height:i.height}),t.content=r.find(".k-tooltip-content"),t.arrow=r.find(".k-callout"),i.autoHide&&this._isShownOnMouseEnter()?r.on("mouseleave"+b,t._mouseleave.bind(t)):r.on("click"+b,".k-tooltip-button",t._closeButtonClick.bind(t))},_closeButtonClick:function(e){e.preventDefault(),this.hide()},_mouseleave:function(e){var t=this;clearTimeout(t.timeout),t.timeout=setTimeout((function(){t._closePopup(e.currentTarget)}),t.options.hideAfter)},_blur:function(e){this._closePopup(e.currentTarget)},_closePopup:function(t){this.popup&&!this.popup._hovered?this.popup.close():C(e(t))},destroy:function(){this.element.off(b),l.off("keydown"+b,this._documentKeyDownHandler),D.fn.destroy.call(this)}});n.ui.plugin(E)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=e.extend,r="visibility",o="k-hover";i.HierarchicalDragAndDrop=n.Class.extend({init:function(t,r){this.element=t,this.hovered=t,this.options=a({dragstart:e.noop,drag:e.noop,drop:e.noop,dragend:e.noop},r),this._draggable=new i.Draggable(t,{ignore:"input,a:not(.k-in),textarea,.k-multiselect-wrap,select,button,a.k-button>.k-icon,button.k-button>.k-icon,span.k-icon.k-i-arrow-60-right,span.k-icon.k-i-arrow-45-down-right",filter:r.filter,autoScroll:r.autoScroll,cursorOffset:{left:10,top:n.support.mobileOS?-40/n.support.zoomLevel():10},hint:this._hint.bind(this),dragstart:this.dragstart.bind(this),dragcancel:this.dragcancel.bind(this),drag:this.drag.bind(this),dragend:this.dragend.bind(this),$angular:r.$angular,holdToDrag:r.holdToDrag})},_hint:function(e){return"<div class='k-drag-clue'><span class='k-icon k-drag-status'></span>"+this.options.hintText(e)+"</div>"},_removeTouchHover:function(){n.support.touch&&this.hovered&&(this.hovered.find(".k-hover").removeClass(o),this.hovered=!1)},_hintStatus:function(e){var t=this._draggable.hint.find(".k-drag-status")[0];if(!e)return n.trim(t.className.replace(/(p|k)-(icon|drag-status)/g,""));t.className="k-icon k-drag-status "+e},dragstart:function(t){this.source=t.currentTarget.closest(this.options.itemSelector),this.options.dragstart(this.source)&&t.preventDefault(),this.options.reorderable?this.dropHint=e("<div class='k-drop-hint k-drop-hint-h'><div class='k-drop-hint-start'></div><div class='k-drop-hint-line'></div></div>").css(r,"hidden").appendTo(this.element):this.dropHint=e()},drag:function(t){var i,a,s,l,d,u,c,p,h,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",(i=(h=g.itemFromTarget(_)).item).length?(this._removeTouchHover(),a=n._outerHeight(i),l=h.content,g.reorderable?(d=a/(l.length>0?4:2),s=n.getOffset(i).top,u=t.y.location<s+d,c=s+a-d<t.y.location,p=l.length&&!u&&!c):(p=!0,u=!1,c=!1),this.hovered=!!p&&b,this.dropHint.css(r,p?"hidden":"visible"),this._lastHover&&this._lastHover[0]!=l[0]&&this._lastHover.removeClass(o),this._lastHover=l.toggleClass(o,p),p?m="k-i-plus":((f=i.position()).top+=u?0:a,this.dropHint.css(f)[u?"prependTo":"appendTo"](g.dropHintContainer(i)),u&&h.first&&(m="k-i-insert-up"),c&&h.last&&(m="k-i-insert-down"))):_[0]!=this.dropHint[0]&&(this._lastHover&&this._lastHover.removeClass(o),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(r,"hidden"),this._hintStatus(m)},dragcancel:function(){this.dropHint.remove()},dragend:function(e){var t,n,i,a="over",s=this.source,l=this.dropHint,d=this.dropTarget;"visible"==l.css(r)?(a=this.options.dropPositionFrom(l),t=l.closest(this.options.itemSelector)):d&&((t=d.closest(this.options.itemSelector)).length||(t=d.closest(this.options.allowedContainers))),n={originalEvent:e.originalEvent,source:s[0],destination:t[0],valid:"k-i-cancel"!=this._hintStatus(),setValid:function(e){this.valid=e},dropTarget:d[0],position:a},i=this.options.drop(n),l.remove(),this._removeTouchHover(),this._lastHover&&this._lastHover.removeClass(o),n.valid&&!i?(this._draggable.dropped=!0,this.options.dragend({originalEvent:e.originalEvent,source:s,destination:t,position:a})):this._draggable.dropped=n.valid},destroy:function(){this._lastHover=this.hovered=null,this._draggable.destroy()}})}(window.kendo.jQuery);!function(e,t){var n,i,a,r,o,s=window.kendo,l=s.ui,d=s.data,u=e.extend,c=s.template,p=Array.isArray,h=l.Widget,f=d.HierarchicalDataSource,m=s.keys,g=".kendoTreeView",v=".kendoTreeViewTemp",_="select",b="check",k="navigate",w="change",y="error",x="checked",C="indeterminate",T="dragstart",S="drag",I="drop",D="dragend",E="dataBound",A="itemsLoaded",F="loadCompleted",z="requestEnd",P="click",H="undefined",N="k-hover",R="k-treeview",O=".k-item",M="string",B="aria-checked",L="aria-selected",V="aria-disabled",U="aria-expanded",W="aria-activedescendant",j="aria-busy",q="k-disabled",G={text:"dataTextField",url:"dataUrlField",spriteCssClass:"dataSpriteCssClassField",imageUrl:"dataImageUrlField"},K=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&typeof e.nodeName===M};function $(e){return function(t){var n=t.children(".k-animation-container");return n.length||(n=t),n.children(e)}}function Y(e){return s.template(e,{useWithBlock:!1})}function Q(e){return e.find(".k-checkbox-wrapper:first input[type=checkbox]")}function X(e){return function(t,n){var i,a=(n=n.closest(O)).parent();return a.parent().is("li")&&(i=a.parent()),this._dataSourceMove(t,a,i,(function(t,i){var a=this.dataItem(n),r=a&&n.parent().children().length!==a.parent().length?a.parent().indexOf(a):n.index();return this._insert(t.data(),i,r+e)}))}}function J(t){var n=t.children("div"),i=t.children("ul"),a=n.find(".k-treeview-toggle > .k-icon"),r=t.children("input[type=checkbox]"),l=n.children(".k-in");t.hasClass("k-treeview")||(n.length||(n=e("<div />").prependTo(t)),!a.length&&i.length?a=e("<span class='k-treeview-toggle'><span class='k-icon' /></span>").prependTo(n):i.length&&i.children().length||(a.parent().remove(),i.remove(),t.removeAttr(U)),r.length&&e("<span class='k-checkbox-wrapper' />").appendTo(n).append(r),l.length||((l=t.children("a").eq(0).addClass("k-in k-link")).length||(l=e("<span class='k-treeview-leaf k-in' />")),l.appendTo(n),n.length&&function(e,t){for(var n;e&&"ul"!=e.nodeName.toLowerCase();)n=e,e=e.nextSibling,3==n.nodeType&&(n.nodeValue=s.trim(n.nodeValue)),o.test(n.className)?t.insertBefore(n,t.firstChild):t.appendChild(n)}(n[0].nextSibling,l[0])))}i=$(".k-group"),a=$(".k-group,.k-content"),r=function(e){return e.children("div").find(".k-treeview-toggle > .k-icon")},o=/k-sprite/,n=s.ui.DataBoundWidget.extend({init:function(e,t){var n,i,a=this,r=t&&!!t.dataSource;p(t)&&(t={dataSource:t}),t&&typeof t.loadOnDemand==H&&p(t.dataSource)&&(t.loadOnDemand=!1),h.prototype.init.call(a,e,t),e=a.element,t=a.options,a._dataSourceUids={},i=e.is("ul")&&e||e.hasClass(R)&&e.children("ul"),(n=!r&&i.length)&&(t.dataSource.list=i),a._animation(),a._accessors(),a._templates(),e.hasClass(R)?(a.wrapper=e,a.root=e.children("ul").eq(0)):(a._wrapper(),i&&(a.root=e,a._group(a.wrapper))),a._applyCssClasses(),a._tabindex(),a.wrapper.attr("role","tree"),a.wrapper.find(">ul").attr("role","none"),a._dataSource(n),a._attachEvents(),a._dragging(),n?a._syncHtmlAndDataSource():t.autoBind&&(a._progress(!0),a.dataSource.fetch(this._attemptLoadCompleted.bind(this))),t.checkboxes&&t.checkboxes.checkChildren&&a.updateIndeterminate(),a.element[0].id?a._ariaId=s.format("{0}_tv_active",a.element[0].id):a._ariaId=s.guid()+"_tv_active",s.notify(a)},_attachEvents:function(){var t=this,n=".k-in:not(.k-selected,.k-disabled)",i="mouseenter";t._clickHandler=t._click.bind(t),t.wrapper.on(i+g,".k-in.k-selected",(function(e){e.preventDefault()})).on(i+g,n,(function(){e(this).addClass(N)})).on("mouseleave"+g,n,(function(){e(this).removeClass(N)})).on(P+g,n,t._clickHandler).on("dblclick"+g,".k-in:not(.k-disabled)",t._toggleButtonClick.bind(t)).on(P+g,".k-i-expand,.k-i-collapse",t._toggleButtonClick.bind(t)).on("keydown"+g,t,t._keydown.bind(t)).on("keypress"+g,t._keypress.bind(t)).on("focus"+g,t._focus.bind(t)).on("blur"+g,t._blur.bind(t)).on("mousedown"+g,".k-in,.k-checkbox-wrapper :checkbox,.k-i-expand,.k-i-collapse",t._mousedown.bind(t)).on("change"+g,".k-checkbox-wrapper :checkbox",t._checkboxChange.bind(t)).on("click"+g,".k-request-retry",t._retryRequest.bind(t)).on("click"+g,".k-link.k-disabled",(function(e){e.preventDefault()})).on("click"+g,(function(n){var i=e(n.target);i.is(":kendoFocusable")||i.find("input,select,textarea,button,object").is(":kendoFocusable")||t.focus()}))},_syncHtmlAndDataSource:function(e,t){e=e||this.root;var n,i,a,r,o,l=(t=t||this.dataSource).view(),d=s.attr("uid"),u=s.attr("expanded"),c=this.options.checkboxes,p=e.children("li");for(n=0;n<p.length;n++)r=(a=l[n]).uid,(i=p.eq(n)).attr("role","treeitem").attr(d,r).attr(L,i.hasClass("k-selected")),a.expanded="true"===i.attr(u),a.hasChildren&&i.attr(U,a.expanded),c&&(o=Q(i),a.checked=o.prop(x),o.attr("id","_"+r),o.next(".k-checkbox-label").attr("for","_"+r),i.attr(B,i.checked)),this._syncHtmlAndDataSource(i.children("ul"),a.children)},_animation:function(){var e=this.options,t=e.animation,n=t.collapse&&"effects"in t.collapse,i=u({},t.expand,t.collapse);n||(i=u(i,{reverse:!0})),!1===t&&(t={expand:{effects:{}},collapse:{hide:!0,effects:{}}}),t.collapse=u(i,{hide:!0}),e.animation=t},_dragging:function(){var t=this.options.dragAndDrop,n=this.dragging;if(t&&!n){var i=this;this.dragging=new l.HierarchicalDragAndDrop(this.element,{reorderable:!0,$angular:this.options.$angular,autoScroll:this.options.autoScroll,filter:"div:not(.k-disabled) .k-in",allowedContainers:".k-treeview",itemSelector:".k-treeview .k-item",hintText:this._hintText.bind(this),contains:function(t,n){return e.contains(t,n)},dropHintContainer:function(e){return e},itemFromTarget:function(e){var t=e.closest(".k-treeview-top,.k-treeview-mid,.k-treeview-bot");return{item:t,content:e.closest(".k-in"),first:t.hasClass("k-treeview-top"),last:t.hasClass("k-treeview-bot")}},dropPositionFrom:function(e){return e.prevAll(".k-in").length>0?"after":"before"},dragstart:function(e){return i.wrapper.attr(s.attr("scrollable"),!1),i.trigger(T,{sourceNode:e[0]})},drag:function(e){i.trigger(S,{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(t){var n=e(t.dropTarget).closest("a");return n&&n.attr("href")&&i._tempPreventNavigation(n),i.trigger(I,{originalEvent:t.originalEvent,sourceNode:t.source,destinationNode:t.destination,valid:t.valid,setValid:function(e){this.valid=e,t.setValid(e)},dropTarget:t.dropTarget,dropPosition:t.position})},dragend:function(e){var t=e.source,n=e.destination,a=e.position;function r(t){i.options.checkboxes&&i.options.checkboxes.checkChildren&&i.updateIndeterminate(),i.current(t),i.element.focus(),i.trigger(D,{originalEvent:e.originalEvent,sourceNode:t&&t[0],destinationNode:n[0],dropPosition:a})}i.wrapper.removeAttr(s.attr("scrollable")),"over"==a?i.append(t,n,r):("before"==a?t=i.insertBefore(t,n):"after"==a&&(t=i.insertAfter(t,n)),r(t))}})}else!t&&n&&(n.destroy(),this.dragging=null)},_tempPreventNavigation:function(e){e.on(P+g+v,(function(t){t.preventDefault(),e.off(P+g+v)}))},_hintText:function(e){return this.templates.dragClue({item:this.dataItem(e),treeview:this.options})},_templates:function(){var e=this,t=e.options,n=e._fieldAccessor.bind(e);t.template&&typeof t.template==M?t.template=c(t.template):t.template||(t.template=Y("# var text = "+n("text")+"(data.item); ## if (typeof data.item.encoded != 'undefined' && data.item.encoded === false) {#<span class='k-treeview-leaf-text'>#= text #</span># } else { #<span class='k-treeview-leaf-text'>#: text #</span># } #")),e._checkboxes(),e.templates={setAttributes:function(e){var t="",n=e.attr||{};for(var i in n)n.hasOwnProperty(i)&&"class"!==i&&(t+=i+'="'+n[i]+'" ');return t},wrapperCssClass:function(e,t){var n="k-item k-treeview-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,a=e.length-1;return e.firstLevel&&0===i&&(n+="k-treeview-top "),n+=0===i&&i!=a?"k-treeview-top":i==a?"k-treeview-bot":"k-treeview-mid"},textClass:function(e,t){var n="k-treeview-leaf k-in";return t&&(n+=" k-link"),!1===e.enabled&&(n+=" k-disabled"),!0===e.selected&&(n+=" k-selected"),n},toggleButtonClass:function(e){var t="k-icon";return!0!==e.expanded?t+=" k-i-expand":t+=" k-i-collapse",t},groupAttributes:function(e){var t="";return e.firstLevel||(t="role='group'"),t+(!0!==e.expanded?" style='display:none'":"")},groupCssClass:function(e){var t="k-group k-treeview-group";return e.firstLevel&&(t+=" k-treeview-lines"),t},dragClue:Y("#= data.treeview.template(data) #"),group:Y("<ul class='#= data.r.groupCssClass(data.group) #'#= data.r.groupAttributes(data.group) #>#= data.renderItems(data) #</ul>"),itemContent:Y("# 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 #'></span># } ##= data.treeview.template(data) #"),itemElement:Y("# var item = data.item, r = data.r; ## var url = "+n("url")+"(item); #<div class='#= r.cssClass(data.group, item) #'># if (item.hasChildren) { #<span class='k-treeview-toggle'><span class='#= r.toggleButtonClass(item) #'></span></span># } ## 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:Y("# var item = data.item, r = data.r; #<li role='treeitem' class='#= r.wrapperCssClass(data.group, item) #'"+s.attr("uid")+'=\'#= item.uid #\' #= r.setAttributes(item.toJSON ? item.toJSON() : item) # # if (data.treeview.checkboxes) { #aria-checked=\'#= item.checked ? "true" : "false" #\' # } #aria-selected=\'#= item.selected ? "true" : "false" #\' #=item.enabled === false ? "aria-disabled=\'true\'" : \'\'## if (item.hasChildren) { #aria-expanded=\'#= item.expanded ? "true" : "false" #\' # } #data-expanded=\'#= item.expanded ? "true" : "false" #\' >#= r.itemElement(data) #</li>'),loading:Y("<div class='k-icon k-i-loading'></div> #: data.messages.loading #"),retry:Y("#: data.messages.requestFailed # <button class='k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-request-retry'><span class='k-button-text'>#: data.messages.retry #</span></button>")}},items:function(){return this.element.find(".k-item > div:first-child")},setDataSource:function(e){var t=this.options;t.dataSource=e,this._dataSourceUids={},this._dataSource(),t.checkboxes&&t.checkboxes.checkChildren&&this.dataSource.one("change",this.updateIndeterminate.bind(this,null)),this.options.autoBind&&this.dataSource.fetch(this._attemptLoadCompleted.bind(this))},_bindDataSource:function(){var e=this;e._refreshHandler=e.refresh.bind(e),e._errorHandler=e._error.bind(e),e._loadCompletedHandler=e._loadCompleted.bind(e),e._requestEndHandler=e._dsRequestEnd.bind(e),e._loadedNodes=[],e.dataSource.bind(w,e._refreshHandler),e.dataSource.bind(y,e._errorHandler),e.dataSource.bind(A,e._loadCompletedHandler),e.dataSource.bind(z,e._requestEndHandler)},_dsRequestEnd:function(e){var t=this;setTimeout((function(){"read"!==e.type||t._loadCompletedFired||t._attemptLoadCompleted()}))},_loadCompleted:function(e){var t=this;t._loadedNodes=t._loadedNodes.concat(e.nodes),t.dataSource.loading()||!1!==t.options.loadOnDemand||(t.trigger(F,{nodes:t._loadedNodes}),t._loadedNodes=[])},_attemptLoadCompleted:function(){var e,t,n=this,i=n.dataSource.view();if(!1===n.options.loadOnDemand){for(t=0;t<i.length;t++)if((e=i[t]).hasChildren&&(!e.children||!e.children.data()||0===e.children.data().length))return;n._loadCompletedFired=!0,n.trigger(F,{nodes:[]})}},_unbindDataSource:function(){var e=this.dataSource;e&&(e.unbind(w,this._refreshHandler),e.unbind(y,this._errorHandler),e.unbind(A,this._loadCompletedHandler),e.unbind(z,this._requestEndHandler))},_dataSource:function(e){var t=this,n=t.options.dataSource;n=p(n)?{data:n}:n,t._unbindDataSource(),n.fields||(n.fields=[{field:"text"},{field:"url"},{field:"spriteCssClass"},{field:"imageUrl"}]),t.dataSource=n=f.create(n),e&&(n.fetch(),function e(t){for(var n=0;n<t.length;n++)t[n]._initChildren(),t[n].children.fetch(),e(t[n].children.view())}(n.view())),t._bindDataSource()},events:[T,S,I,D,E,F,"expand","collapse",_,w,k,b,"kendoKeydown"],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,size:"medium"},_accessors:function(){var e,t,n,i=this.options,a=this.element;for(e in G)t=i[G[e]],n=a.attr(s.attr(e+"-field")),!t&&n&&(t=n),t||(t=e),p(t)||(t=[t]),i[G[e]]=t},_fieldAccessor:function(t){var n=this.options[G[t]],i=n.length,a="(function(item) {";return 0===i?a+="return item['"+t+"'];":(a+="var levels = ["+e.map(n,(function(e){return"function(d){ return "+s.expr(e)+"}"})).join(",")+"];",a+="return levels[Math.min(item.level(), "+i+"-1)](item)"),a+="})"},setOptions:function(e){h.fn.setOptions.call(this,e),this._animation(),this._dragging(),this._templates()},_trigger:function(e,t){return this.trigger(e,{node:t.closest(O)[0]})},_setChecked:function(e,t){if(e&&s.isFunction(e.view))for(var n=0,i=e.view();n<i.length;n++)!1!==i[n].enabled&&this._setCheckedValue(i[n],t),i[n].children&&this._setChecked(i[n].children,t)},_setCheckedValue:function(e,t){e.checked=t},_setIndeterminate:function(e){var t,n,a,r=i(e),o=!0;if(r.length&&(n=(t=Q(r.children())).length)){if(n>1){for(a=1;a<n;a++)if(t[a].checked!=t[a-1].checked||t[a].indeterminate||t[a-1].indeterminate){o=!1;break}}else o=!t[0].indeterminate;return e.attr(B,o?t[0].checked:"mixed"),Q(e).data(C,!o).prop(C,!o).prop(x,o&&t[0].checked)}},updateIndeterminate:function(e){e=e||this.wrapper;var t,n,a,r=i(e).children();if(r.length){for(t=0;t<r.length;t++)this.updateIndeterminate(r.eq(t));if(e.is(".k-treeview"))return;n=this._setIndeterminate(e),a=this.dataItem(e),n&&n.prop(x)?a.checked=!0:a&&delete a.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 input[type=checkbox]"),this._skip=!0,!1===n.prop(C)?this.dataItem(i).set(x,n.prop(x)):this.dataItem(i).set(x,!1),this._skip=!1,this._bubbleIndeterminate(i,!0))}},_checkboxChange:function(t){var n=e(t.target),i=n.prop(x),a=n.closest(O),r=this.dataItem(a);this._preventChange||(r.checked!=i&&(r.set(x,i),a.attr(B,i),this._trigger(b,a)),n.is(":focus")&&(this._trigger(k,a),this.focus()))},_toggleButtonClick:function(t){var n=e(t.currentTarget).closest(O);n.is("[aria-disabled='true']")||this.toggle(n)},_mousedown:function(t){var n=this,i=e(t.currentTarget),a=e(t.currentTarget).closest(O),r=s.support.browser;a.is("[aria-disabled='true']")||((r.msie||r.edge)&&i.is(":checkbox")&&(i.prop(C)?(n._preventChange=!1,i.prop(x,!i.prop(x)),i.trigger(w),i.on(P+g,(function(e){e.preventDefault()})),n._preventChange=!0):(i.off(P+g),n._preventChange=!1)),n._clickTarget=a,n.current(a))},_focusable:function(e){return e&&e.length&&e.is(":visible")&&!e.find(".k-in").first().hasClass(q)},_focus:function(){var t=this.select(),n=this._clickTarget;s.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=[],a=[],r=document.documentElement;do{(n=n.parentNode).scrollHeight>n.clientHeight&&(i.push(n),a.push(n.scrollTop))}while(n!=r);for(s.focusElement(t),e=0;e<i.length;e++)i[e].scrollTop=a[e]},_blur:function(){this.current().find(".k-in").first().removeClass("k-focus")},_enabled:function(e){return!e.children("div").children(".k-in").hasClass(q)},parent:function(t){var n,i,a=/\bk-treeview\b(?!-)/,r=/\bk-item\b/;typeof t==M&&(t=this.element.find(t)),K(t)||(t=t[0]),i=r.test(t.className);do{t=t.parentNode,r.test(t.className)&&(i?n=t:i=!0)}while(!a.test(t.className)&&!n);return e(n)},_nextVisible:function(e){var t,n=this,a=n._expanded(e);function r(e){for(;e.length&&!e.next().length;)e=n.parent(e);return e.next().length?e.next():e}return e.length&&e.is(":visible")?a&&(t=i(e).children().first()).length||(t=r(e)):t=n.root.children().eq(0),t},_previousVisible:function(e){var t,n,a=this;if(!e.length||e.prev().length)for(n=e.length?e.prev():a.root.children().last();a._expanded(n)&&(t=i(n).children().last()).length;)n=t;else n=a.parent(e)||e;return n},_keydown:function(n){var i,a=this,r=n.keyCode,o=a.current(),l=a._expanded(o),d=o.find(".k-checkbox-wrapper").first().find(":checkbox"),u=s.support.isRtl(a.element);n.target==n.currentTarget&&(!u&&r==m.RIGHT||u&&r==m.LEFT?l?i=a._nextVisible(o):o.find(".k-in").first().hasClass(q)||a.expand(o):!u&&r==m.LEFT||u&&r==m.RIGHT?l&&!o.find(".k-in").first().hasClass(q)?a.collapse(o):(i=a.parent(o),a._enabled(i)||(i=t)):r==m.DOWN?i=a._nextVisible(o):r==m.UP?i=a._previousVisible(o):r==m.HOME?i=a._nextVisible(e()):r==m.END?i=a._previousVisible(e()):r!=m.ENTER||o.find(".k-in").first().hasClass(q)?r==m.SPACEBAR&&d.length&&(o.find(".k-in").first().hasClass(q)||(d.prop(x,!d.prop(x)).data(C,!1).prop(C,!1),a._checkboxChange({target:d})),i=o):o.find(".k-in").first().hasClass("k-selected")||a._trigger(_,o)||a.select(o),i&&(n.preventDefault(),o[0]!=i[0]&&(a._trigger(k,i),a.current(i))))},_keypress:function(e){var t,n=this,i=n.current().get(0),a=e.key;1===a.length&&(n._match||(n._match=""),n._match+=a,clearTimeout(n._matchTimer),n._matchTimer=setTimeout((function(){n._match=""}),300),(t=i&&n._matchNextByText(Array.prototype.indexOf.call(n.element.find(".k-item"),i),n._match)).length||(t=n._matchNextByText(-1,n._match)),t.get(0)&&t.get(0)!==i&&(n._trigger(k,t),n.current(t)))},_matchNextByText:function(t,n){return this.element.find(".k-in").filter((function(i,a){return i>t&&e(a).is(":visible")&&0===e(a).text().toLowerCase().indexOf(n)})).eq(0).closest(O)},_click:function(t){var n=e(t.currentTarget),i=a(n.closest(O)),r=n.attr("href");(r?"#"==r||r.indexOf("#"+this.element.id+"-")>=0:i.length&&!i.children().length)&&t.preventDefault(),n.hasClass(".k-selected")||this._trigger(_,n)||this.select(n)},_wrapper:function(){var e,t,n=this,i=n.element;i.is("ul")?(e=i.wrap("<div />").parent(),t=i):t=(e=i).children("ul").eq(0),n.wrapper=e.addClass("k-treeview"),n.root=t},_getSelectedNode:function(){return this.element.find(".k-selected").closest(O)},_group:function(e){var t=this,n=e.hasClass(R),i={firstLevel:n,expanded:n||t._expanded(e)},a=e.children("ul");a.addClass(t.templates.groupCssClass(i)).css("display",i.expanded?"":"none"),n||a.attr("role","group"),t._nodes(a,i)},_nodes:function(t,n){var i,a=this,r=t.children("li");n=u({length:r.length},n),r.each((function(t,r){r=e(r),i={index:t,expanded:a._expanded(r)},J(r),a._updateNodeClasses(r,n,i),a._group(r)}))},_checkboxes:function(){var t,n,i=this.options,a=i.checkboxes;a&&(n="<input id='_#= item.uid #' aria-hidden='true' type='checkbox' tabindex='-1'",a.name&&(n+=" name='"+a.name+"'"),n+=" />",t=(t=s.html.renderCheckBox(e(n),e.extend({},i,{rounded:"medium"}))).replace(/(<input[^/>]*)/,"$1 #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #"),typeof(a=u({template:t},i.checkboxes)).template==M&&(a.template=c(a.template)),i.checkboxes=a)},_updateNodeClasses:function(e,t,n){var i=e.children("div"),a=e.children("ul"),r=this.templates;if(!e.hasClass("k-treeview")){(n=n||{}).expanded=typeof n.expanded!=H?n.expanded:this._expanded(e),n.index=typeof n.index!=H?n.index:e.index(),n.enabled=typeof n.enabled!=H?n.enabled:!i.children(".k-in").hasClass("k-disabled"),(t=t||{}).firstLevel=typeof t.firstLevel!=H?t.firstLevel:e.parent().parent().hasClass(R),t.length=typeof t.length!=H?t.length:e.parent().children().length,e.removeClass("k-first k-last").addClass(r.wrapperCssClass(t,n)),i.removeClass("k-treeview-top k-treeview-mid k-treeview-bot").addClass(r.cssClass(t,n));var o=i.children(".k-in"),s=o[0]&&"a"==o[0].nodeName.toLowerCase();o.removeClass("k-in k-link k-disabled").addClass(r.textClass(n,s)),(a.length||"true"==e.attr("data-hasChildren"))&&(i.find(".k-treeview-toggle > .k-icon").removeClass("k-i-expand k-i-collapse").addClass(r.toggleButtonClass(n)),a.addClass("k-group k-treeview-group"))}},_processNodes:function(t,n){for(var i=this.element.find(t),a=0;a<i.length;a++)n.call(this,a,e(i[a]).closest(O))},dataItem:function(t){var n=e(t).closest(O).attr(s.attr("uid")),i=this.dataSource;return i&&i.getByUid(n)},_dataItem:function(t){var n=e(t).closest(O).attr(s.attr("uid"));return this.dataSource&&this._dataSourceUids[n]},_insertNode:function(t,n,a,r,o){var l,d,u,c,p,h,f=this,m=i(a),g=m.children().length+1,v={firstLevel:a.hasClass(R),expanded:!o,length:g},_="",b=function(e,t){e.appendTo(t)};for(u=0;u<t.length;u++)(c=t[u]).index=n+u,_+=f._renderItem({group:v,item:c});if((d=e(_)).length){for(f.angular("compile",(function(){return{elements:d.get(),data:t.map((function(e){return{dataItem:e}}))}})),m.length||(m=e(f._renderGroup({group:v})).appendTo(a),a.attr(U,!0)),r(d,m),a.hasClass("k-item")&&(J(a),f._updateNodeClasses(a,v,{expanded:!o})),p=d.prev().first(),h=d.next().last(),f._updateNodeClasses(p,{},{expanded:"true"==p.attr(s.attr("expanded"))}),f._updateNodeClasses(h,{},{expanded:"true"==h.attr(s.attr("expanded"))}),u=0;u<t.length;u++)(c=t[u]).hasChildren&&(l=c.children.data()).length&&f._insertNode(l,c.index,d.eq(u),b,!c.expanded);return d}},_updateNodes:function(t,n){var i,r,o,d,u,c,p=this,h={treeview:p.options,item:d},f="expanded"!=n&&"checked"!=n;function m(e,t){e.is(".k-group")&&e.find(".k-item:not([aria-disabled])").attr(B,t),e.find(".k-checkbox-wrapper input[type=checkbox]:not([disabled])").prop(x,t).data(C,!1).prop(C,!1)}if("selected"==n)d=t[0],(r=p.findByUid(d.uid)).find(".k-in").first().removeClass("k-hover").toggleClass("k-selected",d[n]).end(),d[n]&&p.current(r),r.attr(L,!!d[n]);else{var g=e.map(t,(function(e){return p.findByUid(e.uid).children("div")}));for(f&&p.angular("cleanup",(function(){return{elements:g}})),i=0;i<t.length;i++)h.item=d=t[i],r=(o=g[i]).parent(),f&&(s.unbind&&s.unbind(o),o.children(".k-in").html(p.templates.itemContent(h))),n==x?(m(o,u=d[n]),r.attr(B,u),p.options.checkboxes.checkChildren&&(m(r.children(".k-group"),u),p._setChecked(d.children,u),p._bubbleIndeterminate(r))):"expanded"==n?p._toggle(r,d,d[n]):"enabled"==n&&(r.find(".k-checkbox-wrapper input[type=checkbox]").prop("disabled",!d[n]),c=!a(r).is(":visible"),r.removeAttr(V),d[n]||(d.selected&&d.set("selected",!1),d.expanded&&d.set("expanded",!1),c=!0,r.attr(L,!1).attr(V,!0)),p._updateNodeClasses(r,{},{enabled:d[n],expanded:!c})),o.length&&this.trigger("itemChange",{item:o,data:d,ns:l});f&&p.angular("compile",(function(){return{elements:g,data:e.map(t,(function(e){return[{dataItem:e}]}))}}))}},_appendItems:function(e,t,n){var a=i(n).children(),r=!this._expanded(n);if(this.element===n){var o=this.dataSource.data(),s=this.dataSource.view(),l=s.length<o.length?s:o;e=l.indexOf(t[0])}else t.length&&(e=t[0].parent().indexOf(t[0]));typeof e==H&&(e=a.length),this._insertNode(t,e,n,(function(t,n){e>=a.length?t.appendTo(n):t.insertBefore(a.eq(e))}),r),r||(this._updateNodeClasses(n,{},{expanded:!r}),i(n).css("display","block"))},_refreshChildren:function(e,t,n){var a,r,o,s=this.options,d=s.loadOnDemand,u=s.checkboxes&&s.checkboxes.checkChildren;if(i(e).empty(),t.length)for(this._appendItems(n,t,e),r=i(e).children(),d&&u&&this._bubbleIndeterminate(r.last()),a=0;a<r.length;a++)o=r.eq(a),this.trigger("itemChange",{item:o.children("div"),data:t[a],ns:l});else J(e)},_refreshRoot:function(t){var n=this._renderGroup({items:t,group:{firstLevel:!0,expanded:!0}});if(this.root.length&&this.root[0].parentElement){this._angularItems("cleanup");var i=e(n);this.root.attr("class",i.attr("class")).html(i.html())}else this.root=this.wrapper.html(n).children("ul");for(var a=this.root.children(".k-item"),r=0;r<t.length;r++)this.trigger("itemChange",{item:a.eq(r),data:t[r],ns:l});this._angularItems("compile")},refresh:function(e){var n,i=e.node,a=e.action,r=e.items,o=this.wrapper,s=this.options,l=s.loadOnDemand,d=s.checkboxes&&s.checkboxes.checkChildren;if(!this._skip){for(n=0;n<r.length;n++)this._dataSourceUids[r[n].uid]=r[n];if(e.field){if(!r[0]||!r[0].level)return;return this._updateNodes(r,e.field)}if(i&&(o=this.findByUid(i.uid),this._progress(o,!1)),d&&"remove"!=a){var u=!1;for(n=0;n<r.length;n++)if("checked"in r[n]){u=!0;break}if(!u&&i&&i.checked)for(n=0;n<r.length;n++)r[n].checked=!0}if("add"==a?this._appendItems(e.index,r,o):"remove"==a?this._remove(this.findByUid(r[0].uid),!1):"itemchange"==a?this._updateNodes(r):"itemloaded"==a?this._refreshChildren(o,r,e.index):(this._refreshRoot(r),this.element.attr(j,!1)),"remove"!=a)for(n=0;n<r.length;n++)(!l||r[n].expanded||r[n]._loaded)&&r[n].load();this.wrapper.find(">ul").attr("role","none"),this.trigger(E,{node:i?o:t}),this.dataSource.filter()&&this.options.checkboxes.checkChildren&&this.updateIndeterminate(o)}},_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),r(t).addClass("k-i-reload"),e.node.loaded(!1)):(this._progress(!1),this.dataSource.data([]),this.element.html(n))},_retryRequest:function(e){e.preventDefault(),this.dataSource.fetch(this._attemptLoadCompleted.bind(this))},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){"boolean"==typeof e?(t=e,e=this.items()):t=2!=arguments.length||!!t,this._processNodes(e,(function(e,n){this.dataItem(n).set("enabled",t)}))},current:function(t){var n=this,i=n._current,a=n.element;return arguments.length>0&&t&&t.length?(i&&i.find(".k-in").first().removeClass("k-focus"),(i=n._current=e(t,a).closest(O)).find(".k-in").first().addClass("k-focus"),void n._updateActiveDescendant()):(i||(i=n._nextVisible(e())),i)},_updateActiveDescendant:function(){var e=this._current,t=e[0].id||this._ariaId,n=this.element.find("#"+this._ariaId);n.length>0&&n.removeAttr("id"),this.wrapper.removeAttr(W),e.attr("id",t),this.wrapper.attr(W,t)},select:function(t){var n=this,i=n.element;if(!arguments.length)return i.find(".k-selected").closest(O);t=e(t,i).closest(O),i.find(".k-selected").each((function(){var t=n.dataItem(this);t?(t.set("selected",!1),delete t.selected):e(this).removeClass("k-selected")})),t.length&&(n.dataItem(t).set("selected",!0),n._clickTarget=t),n.trigger(w)},_toggle:function(e,t,n){var i,r=this.options,o=a(e),s=n?"expand":"collapse";o.data("animating")||(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(u({reset:!0},r.animation[s],{complete:function(){n&&o.css("height","")}}))))},toggle:function(t,n){t=e(t),r(t).is(".k-i-expand, .k-i-collapse")&&(1==arguments.length&&(n=!this._expanded(t)),this._expanded(t,n))},destroy:function(){var e=this;h.fn.destroy.call(e),e.wrapper.off(g),e.wrapper.find(".k-checkbox-wrapper :checkbox").off(g),e._clickHandler=null,e._unbindDataSource(),e.dragging&&e.dragging.destroy(),e._dataSourceUids={},s.destroy(e.element),e.root=e.wrapper=e.element=null},_expanded:function(e,t,n){var i,r=s.attr("expanded"),o=t,l=o?"expand":"collapse";if(1==arguments.length)return i=this._dataItem(e),"true"===e.attr(r)||i&&i.expanded;i=this.dataItem(e),a(e).data("animating")||!n&&this._trigger(l,e)||(o?(e.attr(r,"true"),e.attr(U,"true")):(e.removeAttr(r),e.attr(U,"false")),i&&(i.set("expanded",o),o=i.expanded))},_progress:function(e,t){var n=this.element,i=this.templates.loading({messages:this.options.messages});1==arguments.length?((t=e)?n.html(i):n.empty(),n.attr(j,t)):(r(e).toggleClass("k-i-loading",t).removeClass("k-i-reload"),e.attr(j,t))},text:function(e,t){var n=this.dataItem(e),i=this.options[G.text],a=n.level(),r=i.length,o=i[Math.min(a,r-1)];if(!t)return n[o];n.set(o,t)},_objectOrSelf:function(t){return e(t).closest("[data-role=treeview]").data("kendoTreeView")||this},_dataSourceMove:function(t,n,i,a){var r,o=this._objectOrSelf(i||n),s=o.dataSource,l=e.Deferred().resolve().promise();return i&&i[0]!=o.element[0]&&((r=o.dataItem(i)).loaded()||(o._progress(i,!0),l=r.load()),i!=this.root&&((s=r.children)&&s instanceof f||(r._initChildren(),r.loaded(!0),s=r.children))),t=this._toObservableData(t),a.call(o,s,t,l)},_toObservableData:function(t){var n,i,a,r=t;return((a=t)instanceof s.jQuery||window.jQuery&&a instanceof window.jQuery||K(t))&&(n=this._objectOrSelf(t).dataSource,i=e(t).attr(s.attr("uid")),(r=n.getByUid(i))&&(r=n.remove(r))),r},_insert:function(e,t,n){t instanceof s.data.ObservableArray?t=t.toJSON():p(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:X(1),insertBefore:X(0),append:function(t,n,a){var r=this.root;if(!(n&&t instanceof jQuery&&n[0]===t[0]))return(n=n&&n.length?n:null)&&(r=i(n)),this._dataSourceMove(t,r,n,(function(t,i,r){var o,s=this;return r.done((function(){o=function(){n&&s._expanded(n,!0,!0);var e=t.data(),a=Math.max(e.length,0);return s._insert(e,i,a)}(),(a=a||e.noop)(o)})),o||null}))},_remove:function(t,n){var i,a,r,o=this;return(t=e(t,o.element)).attr("id")===o.element.attr(W)&&o.element.removeAttr(W),this.angular("cleanup",(function(){return{elements:t.get()}})),i=t.parent().parent(),a=t.prev(),r=t.next(),t[n?"detach":"remove"](),i.hasClass("k-item")&&(J(i),o._updateNodeClasses(i)),o._updateNodeClasses(a),o._updateNodeClasses(r),t},remove:function(e){var t=this.dataItem(e);t&&this.dataSource.remove(t)},detach:function(e){return this._remove(e,!0)},findByText:function(t){return e(this.element).find(".k-in").filter((function(n,i){return e(i).text()==t})).closest(O)},findByUid:function(t){for(var n,i=this.element.find(".k-item"),a=s.attr("uid"),r=0;r<i.length;r++)if(i[r].getAttribute(a)==t){n=i[r];break}return e(n)},expandPath:function(t,n){var i=this,a=t.slice(0),r=n||e.noop;function o(t){var n,a=e.Deferred(),r=i.dataSource.get(t),o=s.attr("expanded");return r?(n=i.findByUid(r.uid),r.loaded()?(r.set("expanded",!0),n.attr(o,!0),n.attr(U,!0),a.resolve()):(i._progress(n,!0),r.load().then((function(){r.set("expanded",!0),n.attr(o,!0),n.attr(U,!0),a.resolve()})))):a.resolve(),a.promise()}o(a[0]).then((function e(){a.shift(),a.length?o(a[0]).then(e):r.call(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 s.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,a=e.items,r=a?a.length:0,o=e.group;for(o.length=r;i<r;i++)e.group=o,e.item=a[i],e.item.index=i,n+=t._renderItem(e);return n},e.r=t.templates,t.templates.group(e)}}),s.cssProperties.registerPrefix("TreeView","k-treeview-"),l.plugin(n)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=Math.abs,r=i.extend({init:function(e,t){var a=this;function r(e){return function(t){a._triggerTouch(e,t)}}function o(e){return function(t){a.trigger(e,{touches:t.touches,distance:t.distance,center:t.center,event:t.event})}}i.fn.init.call(a,e,t),t=a.options,e=a.element,a.wrapper=e,a.events=new n.UserEvents(e,{filter:t.filter,surface:t.surface,minHold:t.minHold,multiTouch:t.multiTouch,allowSelection:!0,fastTap:t.fastTap,press:r("touchstart"),hold:r("hold"),tap:a._tap.bind(a),gesturestart:o("gesturestart"),gesturechange:o("gesturechange"),gestureend:o("gestureend")}),t.enableSwipe?(a.events.bind("start",a._swipestart.bind(a)),a.events.bind("move",a._swipemove.bind(a))):(a.events.bind("start",a._dragstart.bind(a)),a.events.bind("move",r("drag")),a.events.bind("end",r("dragend"))),n.notify(a)},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,a=e.touch;i&&a.endTime-i.endTime<t.options.doubleTapTimeout&&n.touchDelta(a,i).distance<20?(t._triggerTouch("doubletap",e),t.lastTap=null):(t._triggerTouch("tap",e),t.lastTap=a)},_dragstart:function(e){this._triggerTouch("dragstart",e)},_swipestart:function(e){2*a(e.x.velocity)>=a(e.y.velocity)&&e.sender.capture()},_swipemove:function(e){var t=this.options,n=e.touch,i=e.event.timeStamp-n.startTime,r=n.x.initialDelta>0?"right":"left";a(n.x.initialDelta)>=t.minXDelta&&a(n.y.initialDelta)<t.maxYDelta&&i<t.maxDuration&&(this.trigger("swipe",{direction:r,touch:e.touch}),n.cancel())}});n.ui.plugin(r)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=".kendoButtonMenu",r=n.ui,o=n.keys,s=e.extend,l=".",d="id",u="next",c="k-disabled",p="aria-disabled",h="tabindex",f="click",m="menuClick",g="menuOpen",v="menuClose",_="keydown",b="focus",k="k-menu-popup",w="k-group k-menu-group k-reset",y="k-item k-menu-item",x="k-menu-item",C="k-link k-menu-link",T={text:null,icon:null,url:null,attributes:null,enabled:!0,hidden:!1,id:null,imageUrl:null,spriteCssClass:null},S='#if(imageUrl){#<img alt="icon" class="'+"k-image"+'" src="#:imageUrl#" />#}#',I='#if(spriteCssClass){#<span class="'+"k-sprite"+' #:spriteCssClass#"></span>#}#',D='#if(icon){#<span class="'+"k-icon"+' k-i-#:icon#"></span>#}#',E='#if(text){#<span class="'+"k-menu-link-text"+'">#:text#</span>#}#',A='<span class="'+C+'">'+S+I+D+E+"</span>",F='<a href="#:url#" class="'+C+'">'+S+I+D+E+"</a>";function z(t,n){var i=n===u?e.fn.next:e.fn.prev,a=n===u?e.fn.first:e.fn.last,r=i.call(t),o=":kendoFocusable";return r.length||(r=a.call(t.parent().find(l+x))),r.is(o)||!r.length?r:r.find(o).length?a.call(r.find(o)):z(r,n)}var P=i.extend({init:function(e,t){var n=this;i.fn.init.call(n,e,t),n.mainButton=t.mainButton,n._clickHandlers={},n._renderList(),n._initPopup(),n._attachEvents(),n._applyCssClasses(n.list)},options:{name:"ButtonMenu",element:null,items:[],size:"medium"},events:[m,g,v],_renderList:function(){var t=this,i=t.options.items,a=t.element.addClass(k),r=t.mainButton.attr(d)||n.guid(),o=e('<ul role="menu"></ul>').addClass(w);t.list=o.appendTo(a),t.list.attr(d,r+"_buttonmenu"),i.forEach(t._renderListItem.bind(t))},_renderListItem:function(t){var i,a,r=this;i=(t=s({},T,t,{enabled:t.enable&&t.enabled})).id||n.guid(),a=e('<li id="'+i+'" role="menuitem" class="'+y+'">'+r._renderItemButton(t)+"</li>"),t.click&&(r._clickHandlers[i]=t.click),t.attributes&&a.attr(t.attributes),t.data&&n.isFunction(t.data)&&a.data(t.data(t)),r.list.append(a),r.enable(t.enabled,a),r._hide(t.hidden,a)},_renderItemButton:function(e){var t=this.options;return t.itemTemplate?n.template(t.itemTemplate)(e):e.url?n.template(F)(e):n.template(A)(e)},_initPopup:function(){var e=this,t=e.options;e._popup=new r.Popup(e.element,s({},t.popup,{anchor:e.mainButton,isRtl:e._isRtl,toggleTarget:t.toggleTarget,copyAnchorStyles:!1,animation:t.animation,open:e._popupOpenHandler.bind(e),close:e._popupCloseHandler.bind(e),activate:e._popupExpandHandler.bind(e)}))},_popupOpenHandler:function(e){this.trigger(g)?e.preventDefault():this.list.find(l+x).attr(h,0)},_popupCloseHandler:function(e){this.trigger(v)&&e.preventDefault(),this.list.find(l+x).attr(h,-1)},_popupExpandHandler:function(){this.list.find(":kendoFocusable").first().trigger(b)},adjustPopupWidth:function(e){this.element.addClass("k-split-wrapper"),this.element.css({"min-width":e})},_attachEvents:function(){var e=this;e.list.on(f+a,l+x,e._click.bind(e)).on(_+a,l+x,e.listItemKeydown.bind(e)),e.mainButton.on(_+a,e._keydown.bind(e))},_keydown:function(t){if(!e(t.target).is(".k-disabled")&&!e(t.target).parents(".k-disabled").length)return t.altKey&&t.keyCode===o.DOWN?(this._popup.open(),void t.preventDefault()):void 0},listItemKeydown:function(t){var n=this,i=e(t.target);t.preventDefault(),t.keyCode===o.ESC||t.keyCode===o.TAB||t.altKey&&t.keyCode===o.UP?(n._popup.close(),n.mainButton.trigger(b)):t.keyCode===o.DOWN?z(i,u).trigger(b):t.keyCode===o.UP?z(i,"prev").trigger(b):i.is(".k-disabled")||t.keyCode!==o.SPACEBAR&&t.keyCode!==o.ENTER?t.keyCode===o.HOME?n.list.find(":kendoFocusable").filter(l+x).first().trigger(b):t.keyCode===o.END&&n.list.find(":kendoFocusable").filter(l+x).last().trigger(b):i.trigger(f)},_click:function(t){var n=this,i=e(t.target).closest(l+x),a=i.attr(d);n._clickHandlers[a]&&n._clickHandlers[a](t),n.trigger(m,{id:a,target:i,type:"menu-click",originalEvent:t})},toggle:function(){this._popup.toggle()},enable:function(e,t){(t=t&&t.length?this.list.find(t):this.items()).toggleClass(c,!e),e?t.removeAttr(p):t.attr(p,!e)},_hide:function(e,t){(t=t&&t.length?this.list.find(t):this.items()).toggleClass("k-hidden",e)},hide:function(e){this._hide(!0,e)},show:function(e){this._hide(!1,e)},close:function(){this._popup.close()},items:function(){return this.list.children(l+x)},destroyPopup:function(){var e=this;e._popup&&(e._popup.destroy(),e._popup=null,e.list.off(a),e.list.remove(),e.list=null)},destroy:function(){var e=this;delete e._clickHandlers,e.destroyPopup(),e.mainButton.off(a),i.fn.destroy.call(e)}});n.cssProperties.registerPrefix("ButtonMenu","k-menu-group-"),r.plugin(P)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=".kendoSplitButton",r=n.ui,o=e.extend,s=n.html,l=n._outerWidth,d=n.keys,u="id",c="aria-disabled",p="aria-label",h="aria-expanded",f="disabled",m="k-disabled",g="k-focus",v="click",_="open",b="close",k="focus",w="k-split-button k-button-group",y=i.extend({init:function(t,a){var r=this;a.enabled=!1!==a.enabled&&!e(t).prop(f),i.fn.init.call(r,t,a),r._wrapper(),r._renderButtons(),r._renderMenu(),r._enable(r.options.enabled),r._aria(),r._attachEvents(),n.notify(r),r._applyCssClasses()},options:{name:"SplitButton",enabled:!0,items:[],rounded:"medium",size:"medium",fillMode:"solid",themeColor:"base",icon:null,popup:null,arrowIcon:"arrow-s",messages:{labelSuffix:"splitbutton"}},events:[v,_,b],_wrapper:function(){var t=this,i=(t.element.attr(u)||n.guid())+"_wrapper";t.wrapper=t.element.wrap('<div id="'+i+'" class="'+w+'"></div>').parent(".k-split-button"),t.arrowButton=e('<button tabindex="-1" aria-label="arrow-button" class="k-split-button-arrow"></button>').appendTo(t.wrapper)},_applyCssClasses:function(){this.wrapper.addClass(this._getAppearanceClasses())},_clearCssClasses:function(){this.wrapper.removeClass(this._getAppearanceClasses())},_getAppearanceClasses:function(){var e=this.__proto__.options.name;return n.cssProperties.getValidClass({widget:e,propName:"rounded",value:this.options.rounded})},_renderButtons:function(){this._mainButton(),this._arrowButton()},_mainButton:function(){var e=this,t=o({},e.options,{type:e.element.attr("type")||"button"});delete t.click,s.renderButton(e.element,t)},_arrowButton:function(){var e=this,t=o({},e.options,{type:"button",icon:e.options.arrowIcon});delete t.text,delete t.imageUrl,delete t.click,s.renderButton(e.arrowButton,t)},_aria:function(){var e=this,t=e.element,n=e.menu;t.attr("aria-haspopup",n?"menu":null),t.attr(h,!n&&null),t.attr("aria-controls",n?n.list.attr(u):null),t.attr(p)||t.attr(p,t.text()+" "+e.options.messages.labelSuffix)},_renderMenu:function(){var t=this,n=o({},t.options),i=e("<div></div>");delete n.click,delete n.name,n.items.length&&(t.menu=i.appendTo(t.wrapper).kendoButtonMenu(o({mainButton:t.element,toggleTarget:t.arrowButton,menuOpen:t.menuOpenHandler.bind(t),menuClose:t.menuCloseHandler.bind(t),menuClick:t._click.bind(t)},n)).data("kendoButtonMenu"))},menuOpenHandler:function(e){var t=this,n=l(t.wrapper);t.trigger(_,{target:t.element})?e.preventDefault():(e.sender.adjustPopupWidth(n),t.element.attr(h,!0))},menuCloseHandler:function(e){var t=this;t.trigger(b,{target:t.element})?e.preventDefault():(t.element.attr(h,!1),t.element.trigger(k))},_attachEvents:function(){var e=this;e.element.on(v+a,e._click.bind(e)),e.element.on("keydown"+a,e._keydown.bind(e)),e.element.on(k+a,e._focus.bind(e)),e.element.on("blur"+a,e._blur.bind(e))},_focus:function(){this.wrapper.addClass(g)},_blur:function(){this.wrapper.removeClass(g)},_click:function(t){var n=e(t.target).closest(".k-button"),i=n.attr(u),a=t;"menu-click"===t.type&&(i=t.id,n=t.target,a=t.originalEvent),this.menu.close(),this.trigger(v,{id:i,target:n,originalEvent:a})},_keydown:function(e){!this.element.is(".k-disabled")||e.keyCode!==d.ENTER&&e.keyCode!==d.SPACEBAR||e.preventDefault()},focus:function(){this.element.trigger(k)},_enable:function(e,t){this.element.add(this.arrowButton).toggleClass(m,!e),e?this.element.removeAttr(c):this.element.attr(c,!e),t||this.element.attr(f,!e),this.arrowButton.attr(f,!e)},enable:function(e,t,n){var i=this;undefined===e&&(e=!0),t&&t.length?i.menu.enable(e,t):(i.options.enabled=e,i._enable(e,n),i.menu.enable(e))},hide:function(e){e&&e.length&&this.menu.hide(e)},show:function(e){e&&e.length&&this.menu.show(e)},open:function(){this.menu._popup.open()},close:function(){this.menu._popup.close()},items:function(){return this.menu.items()},setOptions:function(e){var t=this;i.fn.setOptions.call(t,e),(e.popup||e.items||e.size)&&(t.menu.destroy(),t._renderMenu()),t._renderButtons(),t._aria()},destroy:function(){var e=this;e.menu.destroy(),e.element.off(a),i.fn.destroy.call(e)}});n.cssProperties.registerPrefix("SplitButton","k-splitbutton-"),n.cssProperties.registerValues("SplitButton",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),r.plugin(y)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui.Widget,a=".kendoDropDownButton",r=n.ui,o=n.keys,s=e.extend,l=n.html,d=n._outerWidth,u="aria-disabled",c="aria-label",p="aria-expanded",h="disabled",f="k-disabled",m="click",g="open",v="close",_="focus",b="k-menu-button",k=i.extend({init:function(t,a){var r=this;a.enabled=!1!==a.enabled&&!e(t).prop(h),i.fn.init.call(r,t,a),r.wrapper=r.element,r._mainButton(),r._renderMenu(),r._enable(r.options.enabled),r._aria(),r._attachEvents(),n.notify(r),r._applyCssClasses()},options:{name:"DropDownButton",enabled:!0,items:[],rounded:"medium",size:"medium",fillMode:"solid",themeColor:"base",icon:null,popup:null,messages:{labelSuffix:"dropdownbutton"}},events:[m,g,v],_mainButton:function(){var e=this,t=s({},e.options,{type:e.element.attr("type")||"button"});delete t.click,e.element.addClass(b),l.renderButton(e.element,t)},_aria:function(){var e=this,t=e.element,n=e.menu;t.attr("aria-haspopup",n?"menu":null),t.attr(p,!n&&null),t.attr("aria-controls",n?n.list.attr("id"):null),t.attr(c)||t.attr(c,t.text()+" "+e.options.messages.labelSuffix)},_renderMenu:function(){var t=this,n=s({},t.options),i=e("<div></div>");delete n.click,delete n.name,n.items.length&&(t.menu=i.appendTo(document.body).kendoButtonMenu(s({mainButton:t.element,toggleTarget:t.element,menuOpen:t.menuOpenHandler.bind(t),menuClose:t.menuCloseHandler.bind(t),menuClick:t._click.bind(t)},n)).data("kendoButtonMenu"))},menuOpenHandler:function(e){var t=this,n=d(t.element);t.trigger(g,{target:t.element})?e.preventDefault():(e.sender.adjustPopupWidth(n),t.element.attr(p,!0))},menuCloseHandler:function(e){var t=this;t.trigger(v,{target:t.element})?e.preventDefault():(t.element.attr(p,!1),t.element.trigger(_))},_attachEvents:function(){var e=this;e.element.on("keydown"+a,e._keydown.bind(e))},_click:function(e){var t=e.id,n=e.target,i=e.originalEvent;this.menu.close(),this.trigger(m,{id:t,target:n,originalEvent:i})},_keydown:function(e){!this.element.is(".k-disabled")||e.keyCode!==o.ENTER&&e.keyCode!==o.SPACEBAR||e.preventDefault()},focus:function(){this.element.trigger(_)},_enable:function(e,t){this.element.toggleClass(f,!e),e?this.element.removeAttr(u):this.element.attr(u,!e),t||this.element.attr(h,!e)},enable:function(e,t,n){var i=this;undefined===e&&(e=!0),t&&t.length?i.menu.enable(e,t):(i.options.enabled=e,i._enable(e,n),i.menu.enable(e))},hide:function(e){e&&e.length&&this.menu.hide(e)},show:function(e){e&&e.length&&this.menu.show(e)},open:function(){this.menu._popup.open()},close:function(){this.menu._popup.close()},items:function(){return this.menu.items()},setOptions:function(e){var t=this;i.fn.setOptions.call(t,e),(e.popup||e.items||e.size)&&(t.menu.destroy(),t._renderMenu()),t._mainButton(),t._aria()},destroy:function(){var e=this;e.menu.destroy(),e.element.off(a),i.fn.destroy.call(e)}});r.plugin(k)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.Class,a=n.ui,r=a.Widget,o=n.isFunction,s=n.keys,l=n._outerWidth,d=".kendoToolBar",u="k-button",c="k-overflow-button",p="k-toggle-button",h="k-button-group",f="k-split-button",m="k-menu-button",g="k-separator",v="k-spacer",_="k-selected",b="k-disabled",k="k-hidden",w="k-force-hidden",y="k-overflow-hidden",x="k-overflow-anchor",C="k-overflow-container",T="k-toolbar-first-visible",S="k-toolbar-last-visible",I="k-split-button-arrow",D="k-toolbar-item",E="k-dropdownlist",A="k-colorpicker",F="k-input-button",z="k-focus",P="aria-disabled",H="aria-label",N="click",R="toggle",O="open",M="close",B="focus",L="keydown",V="spacer",U="both",W="primary",j="role",q="button",G="splitButton",K="dropDownButton",$="separator",Y="overflow",Q="next",X="tabindex",J="template",Z="input",ee="hidden",te="group",ne=":kendoFocusable",ie="overflowOpen",ae="overflowClose",re="never",oe="auto",se="_optionlist",le=n.attr("uid"),de=" ",ue="",ce="textItem",pe=".",he=",";n.toolbar={};var fe={overflowAnchor:'<div tabindex="0" class="k-overflow-anchor k-button k-button-md k-rounded-md k-button-flat k-button-flat-base" title="More tools" role="button"></div>',overflowContainer:'<ul class="k-overflow-container k-list-container"></ul>'};n.toolbar.registerComponent=function(e,t,n){fe[e]={toolbar:t,overflow:n}};var me=n.Class.extend({addOverflowAttr:function(){this.element.attr(n.attr(Y),this.options.overflow||oe)},addUidAttr:function(){this.element.attr(le,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(){var e,t=this.options.attributes;t&&(t.class&&(e=t.class,this.element.addClass(e),delete t.class),this.element.attr(t),t.class=e)},show:function(){this.element.removeClass(k),this.element.removeClass(w),this.options.hidden=!1},hide:function(){this.element.addClass(k),this.element.addClass(w),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(b,!e),this.element.attr(P,!e),this.options.enable=e},twin:function(){var t=this.element.attr(le);return this.overflow&&this.options.splitContainerId?e("#"+this.options.splitContainerId).find("["+le+"='"+t+"']").data(this.options.type):this.overflow?this.toolbar.element.find("["+le+"='"+t+"']").data(this.options.type):this.toolbar.options.resizable?this.toolbar.popup.element.find("["+le+"='"+t+"']").data(this.options.type):void 0}});n.toolbar.Item=me;var ge=me.extend({init:function(t,n){this.options=e.extend({},this.options,t),this.toolbar=n}});n.toolbar.BareItem=ge;var ve=me.extend({init:function(i,a){var r=i.useButtonTag?e("<button></button>"):e('<a role="button" href></a>');this.element=r,this.options=e.extend({},this.options,i),this.toolbar=a,this.attributes(),i.primary&&(this.options.themeColor=W),i.togglable&&(r.addClass(p),this.toggle(i.selected)),i.url===t||i.useButtonTag||(r.attr("href",i.url),i.mobile&&r.attr(n.attr(j),q)),i.group&&(r.attr(n.attr(te),i.group),this.group=this.toolbar.addToGroup(this,i.group)),!i.togglable&&i.click&&o(i.click)&&(this.clickHandler=i.click),i.togglable&&i.toggle&&o(i.toggle)&&(this.toggleHandler=i.toggle)},options:{showIcon:U,showText:U},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(pe+h).data("buttonGroup")}});n.toolbar.Button=ve;var _e=ve.extend({init:function(e,t){ve.fn.init.call(this,e,t);var i=this.element;e=this.options,i.addClass(u),this.addIdAttr(),e.align&&i.addClass("k-align-"+e.align),!e.text||"toolbar"!=e.showText&&e.showText!=U?e.text&&i.attr(H,e.text):e.mobile?i.html('<span class="km-text">'+e.text+"</span>"):i.html(e.text),(e.icon||e.spriteCssClass||e.imageUrl)&&"toolbar"!==e.showIcon&&e.showIcon!==U&&(e.icon=null,e.spriteCssClass=null,e.imageUrl=null),n.html.renderButton(i,e),this.addUidAttr(),this.addOverflowAttr(),this.enable(e.enable),e.hidden&&this.hide(),this.element.data({type:q,button:this})},select:function(e){e===t&&(e=!1),this.options.togglable&&this.element.attr("aria-pressed",e),this.element.toggleClass(_,e),this.options.selected=e}});n.toolbar.ToolBarButton=_e;var be=ve.extend({init:function(t,i){this.overflow=!0,ve.fn.init.call(this,e.extend({},t),i);var a=this.element;!(t=this.options).text||t.showText!=Y&&t.showText!=U?t.text&&a.attr(H,t.text):t.mobile?a.html('<span class="km-text">'+t.text+"</span>"):a.html(t.text),(t.icon||t.spriteCssClass||t.imageUrl)&&t.showIcon!==Y&&t.showIcon!==U&&(t.icon=null,t.spriteCssClass=null,t.imageUrl=null),n.html.renderButton(a,t),t.isChild||this._wrap(),this.addOverflowIdAttr(),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.enable(t.enable),a.addClass("k-overflow-button "+u),t.hidden&&this.hide(),t.togglable&&this.toggle(t.selected),this.element.data({type:q,button:this})},_wrap:function(){this.element=this.element.wrap('<li class="k-menu-item k-item">').parent()},overflowHidden:function(){this.element.addClass(y)},select:function(e){e===t&&(e=!1),this.options.isChild?this.element.toggleClass(_,e):this.element.find(pe+u).toggleClass(_,e),this.options.selected=e}});n.toolbar.OverflowButton=be,n.toolbar.registerComponent(q,_e,be);var ke=me.extend({createButtons:function(t){for(var i=this.options,a=i.buttons||[],r=0;r<a.length;r++)a[r].uid||(a[r].uid=n.guid()),new t(e.extend({mobile:i.mobile,isChild:!0,type:q},a[r]),this.toolbar).element.appendTo(this.element)},refresh:function(){this.element.children().filter(":not('.k-hidden')").first().addClass("k-group-start"),this.element.children().filter(":not('.k-hidden')").last().addClass("k-group-end")}});n.toolbar.ButtonGroup=ke;var we=ke.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(_e),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass(h),t.hidden&&this.hide(),this.element.data({type:"buttonGroup",buttonGroup:this})}});n.toolbar.ToolBarButtonGroup=we;var ye=ke.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(be),this.attributes(),this.addUidAttr(),this.addOverflowAttr(),this.refresh(),i.addClass((t.mobile?ue:h)+de+"k-overflow-group"),this.element.data({type:"buttonGroup",buttonGroup:this})},overflowHidden:function(){this.element.addClass(y)}});n.toolbar.OverflowButtonGroup=ye,n.toolbar.registerComponent("buttonGroup",we,ye);var xe=_e.extend({init:function(i,a){var r;r=(i=this.options=e.extend({},this.options,i)).url!==t?e(n.template('<a href="#:href#" class="k-link k-menu-link"><span class="k-menu-link-text">#:text#</span></a>')({href:i.url,text:i.text})):e(n.template('<span tabindex="0" class="k-link k-menu-link"><span class="k-menu-link-text">#:text#</span></span>')({text:i.text})),this.element=r,this.toolbar=a,i.click&&o(i.click)&&(this.clickHandler=i.click),i.togglable&&i.toggle&&o(i.toggle)&&(this.toggleHandler=i.toggle),i.imageUrl?e('<img alt="icon" class="k-image" />').prependTo(r).attr("src",i.imageUrl):i.icon?e("<span></span>").prependTo(r).attr("class","k-icon k-i-"+i.icon):i.spriteCssClass&&e('<span class="k-sprite"></span>').prependTo(r).addClass(i.spriteCssClass),this.addIdAttr(),this.addUidAttr(),this.addOverflowAttr(),this.attributes(),this.enable(i.enable),i.group&&(r.attr(n.attr(te),i.group),this.group=this.toolbar.addToGroup(this,i.group)),i.hidden&&this.hide(),this.element.data({type:q,button:this})}});n.toolbar.ToolBarMenuButton=xe;var Ce=me.extend({init:function(t,n){var i=this;i.options=e.extend({id:t.id||t.uid,enable:!0},t,{togglable:!1}),t.primary&&(i.options.themeColor=W),t.showIcon===Y&&(i.options.icon=null),t.showText===Y&&(i.options.text=""),i.toolbar=n,i.splitButton=new a.SplitButton(e("<button id='"+i.options.id+"'>"+i.options.text+"</button>"),e.extend({},i.options,{items:i._extend(t.menuButtons)}),n.options),i.element=i.splitButton.wrapper,i.splitButton.bind(N,n._buttonClick.bind(n)),i.splitButton.bind(M,i._close.bind(i)),i.splitButton.bind(O,i._open.bind(i)),i.splitButton.element.data({type:G,button:i,splitButton:i}),i.splitButton.wrapper.data({type:G,button:i,splitButton:i}),i.addOverflowAttr(),i.addUidAttr(),i.attributes(),i.addMenuAttributes(),!1===i.options.enable&&i.enable(this.options.enable),i.options.hidden&&i.hide()},_open:function(e){this.toolbar.trigger(O,{target:this.element})&&e.preventDefault()},_close:function(e){var t=this;t.toolbar.trigger(M,{target:t.element})&&e.preventDefault(),t.splitButton.element.trigger(B)},_extend:function(t){var n=this;return t.map((function(t){var i=new ge(t,n.toolbar);return e.extend({},t,{togglable:!1,data:function(){return{type:q,button:i,splitButton:n}}})}))},addMenuAttributes:function(){var t;this.splitButton.items().each((function(n,i){i=e(i),(t=i.data(q)).element=i,t.options=e.extend({type:q,enable:!0},t.options),t.addOverflowAttr(),t.addUidAttr()}))},remove:function(){var e=this.splitButton.wrapper;this.splitButton.destroy(),e.remove()},enable:function(e,t){this.splitButton.enable(e,t,!0),this.twin()&&this.twin().enable(e)},attributes:function(){var e,t=this.splitButton.element,n=this.options.attributes;n&&(n.class&&(e=n.class,t.addClass(e),delete n.class),t.attr(n),n.class=e)}});n.toolbar.ToolBarSplitButton=Ce;var Te=me.extend({init:function(t,n){var i,a=this.element=e('<li class="k-split-button"></li>'),r=t.menuButtons;this.options=e.extend({},t,{togglable:!1}),this.toolbar=n,this.overflow=!0,i=(t.id||t.uid)+se,this.mainButton=new be(e.extend({isChild:!0},t,{togglable:!1})),this.mainButton.element.appendTo(a);for(var o=0;o<r.length;o++)new be(e.extend({mobile:t.mobile,type:q,splitContainerId:i,isChild:!0},r[o],{click:t.click}),this.toolbar).element.appendTo(a);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,!1===this.options.enable&&this.enable(this.options.enable),a.data({type:G,splitButton:this})},enable:function(e){var n=this.element.add(this.element.find(pe+c));e===t&&(e=!0),n.toggleClass(b,!e),n.attr(P,!e),this.options.enable=e},overflowHidden:function(){this.element.addClass(y)}});n.toolbar.OverflowSplitButton=Te,n.toolbar.registerComponent(G,Ce,Te);var Se=me.extend({init:function(t,n){var i=this;i.options=e.extend({id:t.id||t.uid,enable:!0},t,{togglable:!1}),t.primary&&(i.options.themeColor=W),t.showIcon===Y&&(i.options.icon=null),t.showText===Y&&(i.options.text=""),i.toolbar=n,i.dropDownButton=new a.DropDownButton(e("<button id='"+i.options.id+"'>"+i.options.text+"</button>"),e.extend({},i.options,{items:i._extend(t.menuButtons)}),n.options),i.element=i.dropDownButton.element,i.dropDownButton.bind(N,n._buttonClick.bind(n)),i.dropDownButton.bind(M,i._close.bind(i)),i.dropDownButton.bind(O,i._open.bind(i)),i.dropDownButton.element.data({type:K,button:i,dropDownButton:i}),i.addOverflowAttr(),i.addUidAttr(),i.attributes(),i.addMenuAttributes(),!1===i.options.enable&&i.enable(this.options.enable),i.options.hidden&&i.hide()},_open:function(e){this.toolbar.trigger(O,{target:this.element})&&e.preventDefault()},_close:function(e){var t=this;t.toolbar.trigger(M,{target:t.element})&&e.preventDefault(),t.dropDownButton.element.trigger(B)},_extend:function(t){var n=this;return t.map((function(t){var i=new ge(t,n.toolbar);return e.extend({},t,{data:function(){return{type:q,button:i,dropDownButton:n}}})}))},addMenuAttributes:function(){var t;this.dropDownButton.items().each((function(n,i){i=e(i),(t=i.data(q)).element=i,t.options=e.extend({type:q,enable:!0},t.options),t.addOverflowAttr(),t.addUidAttr()}))},remove:function(){var e=this.dropDownButton.element;this.dropDownButton.destroy(),e.remove()},enable:function(e,t){this.dropDownButton.enable(e,t,!0),this.twin()&&this.twin().enable(e)},attributes:function(){var e,t=this.element,n=this.options.attributes;n&&(n.class&&(e=n.class,t.addClass(e),delete n.class),t.attr(n),n.class=e)}});n.toolbar.ToolBarSplitButton=Ce;var Ie=me.extend({init:function(t,n){var i=this.element=e("<span></span>");this.element=i,this.options=t,this.toolbar=n,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),!t.icon||t.showIcon&&"toolbar"===t.showIcon||i.append('<span class="k-icon k-i-'+t.icon+'"></span>'),"toolbar"!==t.showText&&i.append("<span>"+this.options.text+"</span>"),i.data({type:ce,textItem:this})},overflowHidden:function(){this.element.addClass(y)}}),De=me.extend({init:function(t,n){var i,a=this.element=e('<li class="k-split-button k-menu-button"></li>'),r=t.menuButtons;this.options=e.extend({},t,{togglable:!1}),this.toolbar=n,this.overflow=!0,i=(t.id||t.uid)+se,this.mainButton=new Ie(e.extend({isChild:!0},t,{togglable:!1})),this.mainButton.element.appendTo(a);for(var o=0;o<r.length;o++)new be(e.extend({mobile:t.mobile,type:q,splitContainerId:i,isChild:!0},r[o],{click:t.click}),this.toolbar).element.appendTo(a);this.addUidAttr(),this.addOverflowAttr(),this.mainButton.main=!0,!1===this.options.enable&&this.enable(this.options.enable),a.data({type:K,dropDownButton:this})},enable:function(e){var n=this.element.add(this.element.find(pe+c));e===t&&(e=!0),n.toggleClass(b,!e),n.attr(P,!e),this.options.enable=e},overflowHidden:function(){this.element.addClass(y)}});n.toolbar.OverflowSplitButton=De,n.toolbar.registerComponent(K,Se,De);var Ee=me.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(g),i.attr(j,$),i.data({type:$,separator:this})}}),Ae=me.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(g),i.attr(j,$),i.data({type:$,separator:this})},overflowHidden:function(){this.element.addClass(y)}});n.toolbar.registerComponent("separator",Ee,Ae);var Fe=me.extend({init:function(t,n){var i=this.element=e("<div>&nbsp;</div>");this.element=i,this.options=t,this.toolbar=n,i.addClass(v),i.data({type:V}),this.addOverflowAttr()}});n.toolbar.registerComponent(V,Fe);var ze=me.extend({init:function(t,n,i){var a=o(t)?t(n):t;a=a instanceof jQuery?a.wrap("<div class='k-toolbar-item' aria-keyshortcuts='Enter'></div>").parent():e("<div class='k-toolbar-item' aria-keyshortcuts='Enter'></div>").html(a),this.element=a,this.options=n,this.options.type=n.type||J,this.toolbar=i,this.attributes(),this.addUidAttr(),this.addIdAttr(),this.addOverflowAttr(),n.hidden&&this.hide(),a.data({type:J,template:this})}});n.toolbar.TemplateItem=ze;var Pe=me.extend({init:function(t,n,i){var a=o(t)?e(t(n)):e(t);a=a instanceof jQuery?a.wrap("<li></li>").parent():e("<li></li>").html(a),this.element=a,this.options=n,this.options.type=J,this.toolbar=i,this.overflow=!0,this.attributes(),this.addUidAttr(),this.addOverflowIdAttr(),this.addOverflowAttr(),a.data({type:J,template:this})},overflowHidden:function(){this.element.addClass(y)}});function He(e){e.target.is(".k-toggle-button")||e.target.toggleClass(_,"press"==e.type)}function Ne(t){e(t.target).closest("a.k-button").length&&t.preventDefault()}function Re(t,n){var i=n===Q?e.fn.next:e.fn.prev,a=n===Q?e.fn.first:e.fn.last,r=i.call(t);return!r.length&&t.is(pe+x)?t:r.is(ne)||!r.length?r:r.find(ne).length?a.call(r.find(ne)):Re(r,n)}n.toolbar.OverflowTemplateItem=Pe;var Oe=i.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){for(var t=0;t<this.buttons.length;t++)this.buttons[t].select(!1);e.select(!0),e.twin()&&e.twin().select(!0)}}),Me=r.extend({init:function(t,i){var a=this;if(r.fn.init.call(a,t,i),i=a.options,(t=a.wrapper=a.element).addClass("k-toolbar k-widget"),t.attr(j,"toolbar"),this.uid=n.guid(),this._isRtl=n.support.isRtl(t),this._groups={},t.attr(le,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"),u="km-button",h="km-buttongroup",_="km-state-active",b="km-state-disabled"),i.resizable?(a._renderOverflow(),t.addClass("k-toolbar-resizable"),a.overflowUserEvents=new n.UserEvents(a.element,{threshold:5,allowSelection:!0,filter:pe+x,tap:a._toggleOverflow.bind(a)}),a._resizeHandler=n.onResize((function(){a.resize()}))):a.popup={element:e([])},i.items&&i.items.length){for(var o=0;o<i.items.length;o++)a.add(i.items[o]);i.resizable&&a._shrink(a.element.innerWidth())}a.userEvents=new n.UserEvents(document.documentElement,{threshold:5,allowSelection:!0,filter:"["+le+"="+a.uid+"] a."+u+he+" ["+le+"="+a.uid+"] ."+x+he+" ["+le+"="+a.uid+"] ."+I+he+" ["+le+"="+a.uid+"] ."+D+he+" ["+le+"="+a.uid+"] ."+m,tap:a._buttonClick.bind(a),press:He,release:He}),a.element.on(N+d,"a.k-button",Ne).on(L+d,a._keydown.bind(a)).on("focusin"+d,a._focusIn.bind(a)).on("focusout"+d,a._focusOut.bind(a)),a.options.resizable&&a.popup.element.on(N+d,NaN,Ne),i.resizable&&(a.overflowAnchor.appendTo(a.wrapper),this._toggleOverflowAnchor()),a._tabIndex(),n.notify(a)},events:[N,R,O,M,ie,ae],options:{name:"ToolBar",items:[],resizable:!0,mobile:null,navigateOnTab:!1},addToGroup:function(e,t){var n;return(n=this._groups[t]?this._groups[t]:this._groups[t]=new Oe).add(e),n},destroy:function(){var e=this;e.destroySplitButtons(),e.destroyDropDownButtons(),e.element.off(d,"a.k-button"),e.userEvents.destroy(),e.options.resizable&&(n.unbindResize(e._resizeHandler),e.overflowUserEvents.destroy(),e.popup.element.off(d,"a.k-button"),e.popup.destroy()),r.fn.destroy.call(e)},destroySplitButtons:function(){var t,n=this;n.element.find(pe+f).each((function(i,a){(t=n._getItem(a))&&t.type===G&&(t=t.toolbar),t&&t.splitButton&&t.splitButton.destroy&&(t.splitButton.destroy(),e(a).remove())}))},destroyDropDownButtons:function(){var t,n=this;n.element.find(pe+m).each((function(i,a){(t=n._getItem(a))&&t.type===K&&(t=t.toolbar),t&&t.dropDownButton&&t.dropDownButton.destroy&&(t.dropDownButton.destroy(),e(a).remove())}))},add:function(t){var i,a,r,o=fe[t.type],s=t.template,l=this,d=l.isMobile?ue:"k-item",u=t.overflowTemplate;if(e.extend(t,{uid:n.guid(),animation:l.animation,mobile:l.isMobile,rootUid:l.uid}),t.menuButtons)for(var c=0;c<t.menuButtons.length;c++)e.extend(t.menuButtons[c],{uid:n.guid()});s&&!u||t.type===V?t.overflow=re:t.overflow||(t.overflow=oe),t.overflow!==re&&l.options.resizable&&(u?a=new Pe(u,t,l):o&&(a=new o.overflow(t,l)).element.addClass(d),a&&(t.overflow===oe&&a.overflowHidden(),a.element.appendTo(l.popup.container),l.angular("compile",(function(){return{elements:a.element.get()}})))),"always"!==t.overflow&&(s?(r=(i=new ze(s,t,l)).element.find("input,select"),!this.options.navigateOnTab&&r.length>0&&(i.element.attr(X,0),r.attr(X,-1))):o&&(i=new o.toolbar(t,l)),i&&(i.element.appendTo(l.element),l.angular("compile",(function(){return{elements:i.element.get()}}))))},_getItem:function(t){var n,i,a,r,o=this.options.resizable;return(n=this.element.find(t)).length||(n=e('[data-role="buttonmenu"]').find(t)),r=n.length?n.data("type"):ue,(i=n.data(r))&&o?a=i.twin():o&&(r=(n=this.popup.element.find(t)).length?n.data("type"):ue,a=n.data(r),r===ce&&(r="dropDownButton",a=(n=n.parent(pe+m)).data(r)),a&&a.main&&r!==ce&&(r="splitButton",a=(n=n.parent(pe+f)).data(r))),{type:r,toolbar:i,overflow:a}},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,n=this._getItem(e);n.toolbar&&(n.toolbar.options.type===q&&n.toolbar.options.isChild?(t=n.toolbar.getParentGroup(),n.toolbar.hide(),t&&t.refresh()):n.toolbar.options.hidden||n.toolbar.hide()),n.overflow&&(n.overflow.options.type===q&&n.overflow.options.isChild?(t=n.overflow.getParentGroup(),n.overflow.hide(),t&&t.refresh()):n.overflow.options.hidden||n.overflow.hide()),this.resize(!0)},show:function(e){var t,n=this._getItem(e);n.toolbar&&(n.toolbar.options.type===q&&n.toolbar.options.isChild?(t=n.toolbar.getParentGroup(),n.toolbar.show(),t&&t.refresh()):n.toolbar.options.hidden&&n.toolbar.show()),n.overflow&&(n.overflow.options.type===q&&n.overflow.options.isChild?(t=n.overflow.getParentGroup(),n.toolbar.show(),t&&t.refresh()):n.overflow.options.hidden&&n.overflow.show()),this.resize(!0)},enable:function(e,t){var n=this._getItem(e);void 0===t&&(t=!0),n.toolbar&&n.toolbar.enable(t,n.element),n.overflow&&n.overflow.enable(t)},getSelectedFromGroup:function(e){return this.element.find(".k-toggle-button[data-group='"+e+"']").filter(pe+_)},toggle:function(n,i){var a=e(n).data(q);a.options.togglable&&(i===t&&(i=!0),a.toggle(i,!0))},_renderOverflow:function(){var t,i=this,a=fe.overflowContainer,r=i._isRtl,o=r?"left":"right";i.overflowAnchor=e(fe.overflowAnchor).addClass(u),i.element.append(i.overflowAnchor),i.isMobile?(i.overflowAnchor.append('<span class="km-icon km-more"></span>'),a=(t=e(t=a)).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()):i.overflowAnchor.append('<span class="k-icon k-i-more-vertical"></span>'),i.popup=new n.ui.Popup(a,{origin:"bottom "+o,position:"top "+o,anchor:i.overflowAnchor,isRtl:r,animation:i.animation,appendTo:i.isMobile?e(i.isMobile).children(".km-pane"):null,copyAnchorStyles:!1,open:function(t){var a=n.wrap(i.popup.element).addClass("k-overflow-wrapper");i.isMobile?i.popup.container.css("max-height",parseFloat(e(".km-content:visible").innerHeight())-15+"px"):a.css("margin-left",(r?-1:1)*((l(a)-a.width())/2+1)),i.trigger(ie)&&t.preventDefault()},activate:function(){this.element.find(ne).first().trigger(B)},close:function(e){i.trigger(ae)&&e.preventDefault(),this.element.trigger(B)}}),i.popup.element.on(L+d,pe+u,(function(t){var n=e(t.target),a=n.parent(),r=a.is(pe+h)||a.is(pe+f);t.preventDefault(),t.keyCode===s.ESC||t.keyCode===s.TAB||t.altKey&&t.keyCode===s.UP?(i._toggleOverflow(),i.overflowAnchor.trigger(B)):t.keyCode===s.DOWN?Re(!r||r&&n.is(":last-child")||r&&!n.next().is(ne)?a:n,Q).trigger(B):t.keyCode===s.UP?Re(!r||r&&n.is(":first-child")||r&&!n.prev().is(ne)?a:n,"prev").trigger(B):t.keyCode!==s.SPACEBAR&&t.keyCode!==s.ENTER||e(t.target).is(pe+b)?t.keyCode===s.HOME?a.parent().find(ne).first().trigger(B):t.keyCode===s.END&&a.parent().find(ne).last().trigger(B):(i.userEvents.trigger("tap",{target:e(t.target)}),i.overflowAnchor.trigger(B))})),i.isMobile?i.popup.container=i.popup.element.find(pe+C):i.popup.container=i.popup.element,i.popup.container.attr(le,this.uid)},_toggleOverflowAnchor:function(){var e=this._isRtl?"padding-left":"padding-right";(this.options.mobile?this.popup.element.find(pe+C).children(":not(.k-overflow-hidden, .k-popup)").length>0:this.popup.element.children(":not(.k-overflow-hidden, .k-popup)").length>0)?(this.overflowAnchor.css({visibility:"visible",width:ue}),this.wrapper.css(e,this.overflowAnchor.outerWidth(!0))):(this.overflowAnchor.css({visibility:ee,width:"1px"}),this.wrapper.css(e,ue))},_buttonClick:function(t){var n,i,a,r,s,l=this,d=e(t.target);0===d.closest(".k-toolbar-item").length&&t.preventDefault(),d.hasClass(m)||d.hasClass(x)?l._resetTabIndex(d):d.hasClass(I)?l._resetTabIndex(d.prev()):d.hasClass(D)?(s=d.find("input,select,."+E)).length>0&&l._resetTabIndex(s.first()):(d.data(G)||(d=e(t.target).closest(pe+u+he+pe+"k-menu-link",l.element)),(n=d.data(q))&&!d.hasClass("k-menu-item")&&l._resetTabIndex(d),!n&&l.popup&&(n=(d=e(t.target).closest(pe+c,l.popup.container)).parent("li").data(q)),n&&n.options.enable&&(n.options.togglable?(i=o(n.toggleHandler)?n.toggleHandler:null,n.toggle(!n.options.selected,!0),a={target:d,group:n.options.group,checked:n.options.selected,id:n.options.id,item:n},i&&i.call(l,a),l.trigger(R,a)):(i=o(n.clickHandler)?n.clickHandler:null,a={sender:l,target:d,id:n.options.id,item:n},i&&i.call(l,a),l.trigger(N,a)),n.options.url&&(n.options.attributes&&n.options.attributes.target&&(r=n.options.attributes.target),window.open(n.options.url,r||"_self")),d.hasClass(c)&&l.popup.close()))},_focusOut:function(e){this.wrapper.find(pe+u+pe+z).removeClass(z)},_focusIn:function(t){var n=e(t.target);n.closest(pe+u).length>0&&n.closest(pe+u).addClass(z)},_keydown:function(t){var i,a,r,o,l,d=e(t.target),u=t.keyCode,c=this._getItems(),p=this._isRtl?-1:1,h=d.closest(".k-toolbar-item");if(t.altKey&&u===s.DOWN)e(document.activeElement).is(pe+x)&&this._toggleOverflow();else if(this.options.navigateOnTab||u!==s.ENTER||!d.hasClass(D))if(!this.options.navigateOnTab&&u===s.ESC&&h.length>0){if(o=h.find("[data-role]"),r=h.find(":kendoFocusable:not('.k-input-button'),."+E),o.length>0&&(l=n.widgetInstance(o))){if(l.popup&&l.popup.visible())return;h.attr(X,0),h.trigger(B),h.find(ne).attr(X,-1)}r.length>0&&(h.attr(X,0),h.trigger(B),r.attr(X,-1))}else if(u!==s.SPACEBAR&&u!==s.ENTER||d.is("input,checkbox,button"))if(u===s.HOME){if(d.is(pe+E)||d.is(Z))return;this._resetTabIndex(c.first()),c.first().trigger(B),t.preventDefault()}else if(u===s.END){if(d.is(pe+E)||d.is(Z))return;0===(i=c.last()).width()&&(i=c.eq(c.length-2)),this._resetTabIndex(i),i.trigger(B),t.preventDefault()}else this.options.navigateOnTab||u!==s.RIGHT||d.is("input:not([type=file]),select,.k-dropdownlist,."+A)||!this._getNextElement(t.target,1*p)?this.options.navigateOnTab||u!==s.LEFT||d.is("input:not([type=file]),select, .k-dropdownlist,."+A)||!this._getNextElement(t.target,-1*p)||(a=e(this._getNextElement(t.target,-1*p)),this._resetTabIndex(a),a.trigger(B),t.preventDefault()):(a=e(this._getNextElement(t.target,1*p)),this._resetTabIndex(a),a.trigger(B),t.preventDefault());else u===s.SPACEBAR&&(t.preventDefault(),this.userEvents.trigger("tap",{target:d}));else(r=d.find(":kendoFocusable:not('.k-input-button'),."+E)).length>0&&(d.attr(X,-1),r.attr(X,0),r.first().trigger(B))},_getNextElement:function(e,t){var n=this._getItems(),i=-1===n.index(e)?n.index(e.parentElement):n.index(e),a=n[i+t];return a||(a=-1===t?n.last():n.first()),a},_getItems:function(){return this.wrapper.find(":kendoFocusable,.k-toolbar-item,.k-overflow-anchor,.k-switch").filter((function(){var t=e(this);return!t.hasClass("k-hidden")&&((!t.hasClass(x)||t.css("visibility")!==ee)&&((!t.hasClass(D)||0!==t.find("input:visible,.k-picker,.k-input").length)&&(!(!t.hasClass(D)&&t.closest(".k-toolbar-item").length>0)&&(!t.hasClass(F)&&!t.hasClass(I)))))}))},_toggle:function(t){var n=e(t.target).closest(pe+f).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,n=parseInt(this.element.css("gap"),10)||0;return this.element.children(":visible:not(.k-spacer)").each((function(){t+=l(e(this),!0)+n})),Math.ceil(t)},_shrink:function(e){var t,n,i;if(e<this._childrenWidth())for(var a=(n=this.element.children(":visible:not([data-overflow='never'], .k-overflow-anchor)")).length-1;a>=0&&(t=n.eq(a),!(e>this._childrenWidth()));a--)(i=t.find("[tabindex=0]")).length>0&&(i.attr(X,-1),this.element.children(pe+x).attr(X,0)),this._hideItem(t)},_stretch:function(e){var t,n;if(e>this._childrenWidth()){n=this.element.children(".k-hidden:not(.k-force-hidden)");for(var i=0;i<n.length&&(t=n.eq(i),!(e<this._childrenWidth())&&this._showItem(t,e));i++);}},_hideItem:function(e){e.addClass(k),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").removeClass(y)},_showItem:function(e,t){var n=parseInt(this.element.css("gap"),10)||0;e.removeClass(k);var i=l(e,!0)+n;return e.addClass(k),!!(e.length&&t>this._childrenWidth()+i)&&(e.removeClass(k),!0!==this.options.navigateOnTab&&e.find(ne).attr(X,-1),this.popup&&this.popup.container.find(">li[data-uid='"+e.data("uid")+"']").addClass(y),!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("k-toolbar-first-visible "+S),n.first().add(i.first()).addClass(T),n.last().add(i.last()).addClass(S)},_resetTabIndex:function(e){!0!==this.options.navigateOnTab&&(this.wrapper.find(ne).attr(X,-1),e.attr(X,0))},_tabIndex:function(){var e=this.wrapper.find(":kendoFocusable:not('[tabindex=-1]')"),t=e.first();!0!==this.options.navigateOnTab&&(e.attr(X,-1),t.attr(X,0))}});n.ui.plugin(Me)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=".kendoSwitch",r=i.Widget,o=n.support,s="change",l={widget:"k-switch",track:"k-switch-track",thumbWrapper:"k-switch-thumb-wrap",thumb:"k-switch-thumb",checked:"k-switch-on",checkedLabel:"k-switch-label-on",unchecked:"k-switch-off",uncheckedLabel:"k-switch-label-off",disabled:"k-disabled",readonly:"k-readonly",active:"k-active"},d="disabled",u="aria-disabled",c="readonly",p="aria-readonly",h="aria-hidden",f="checked",m=o.click+a,g=o.pointers?"pointerup":"touchend",v=".",_=n.template('<span class="#=styles.widget#" role="switch"></span>'),b=n.template("<span class='#=styles.track#'><span class='#=styles.checkedLabel#'>#=checked#</span><span class='#=styles.uncheckedLabel#'>#=unchecked#</span></span>"),k=n.template("<span class='#=styles.thumbWrapper#'><span class='#=styles.thumb#'></span></span>"),w=r.extend({init:function(e,t){var i=this;r.fn.init.call(i,e,t),i._wrapper(),i._initSettings(),i._aria(),i._attachEvents(),n.notify(i,n.ui)},_wrapper:function(){var t=this,n=t.options,i=t.element[0],a=e(_({styles:l}));i.type="checkbox",t.wrapper=t.element.wrap(a).parent(),t.wrapper[0].style.cssText=t.element[0].style.cssText,t.element.hide(),t.wrapper.append(e(b({styles:l,checked:n.messages.checked,unchecked:n.messages.unchecked}))).append(e(k({styles:l}))).addClass(i.className).removeClass("input-validation-error"),t.options.rounded=t.options.trackRounded,t._applyCssClasses(),t._applyRoundedClasses()},_applyRoundedClasses:function(e){var t=this,i=t.options,a=n.cssProperties.getValidClass({widget:i.name,propName:"rounded",value:i.trackRounded}),r=n.cssProperties.getValidClass({widget:i.name,propName:"rounded",value:i.thumbRounded});e=e||"addClass",t.wrapper.find(v+l.track)[e](a),t.wrapper.find(v+l.thumb)[e](r)},_attachEvents:function(){var e=this;e.wrapper.on(m,e._click.bind(e)).on(g,e._touchEnd.bind(e)).on("keydown.kendoSwitch",e._keydown.bind(e))},setOptions:function(n){var i=this,a=n.messages;i._clearCssClasses(n),i._applyRoundedClasses("removeClass"),i.options=e.extend(i.options,n),a&&a.checked!==t&&i.wrapper.find(v+l.checkedLabel).text(a.checked),a&&a.unchecked!==t&&i.wrapper.find(v+l.uncheckedLabel).text(a.unchecked),n.width&&i.wrapper.css({width:n.width}),n.enabled!==t&&i.enable(n.enabled),n.readonly!==t&&i.readonly(n.readonly),i.check(n.checked),i.options.rounded=i.options.trackRounded,i._applyCssClasses(),i._applyRoundedClasses()},_initSettings:function(){var e=this,t=e.element[0],n=e.options;n.enabled&&e._tabindex(),n.width&&e.wrapper.css({width:n.width}),null===n.checked&&(n.checked=t.checked),e.check(n.checked),n.enabled=n.enabled&&!e.element.attr(d),e.enable(n.enabled),n.readonly=n.readonly||!!e.element.attr(c),e.readonly(n.readonly)},_aria:function(){var t=this.element,i=this.wrapper,a=t.attr("id"),r=e('label[for="'+a+'"]'),o=t.attr("aria-label"),s=t.attr("aria-labelledby");if(o)i.attr("aria-label",o);else if(s)i.attr("aria-labelledby",s);else if(r.length){var l=r.attr("id");l||(l=(a||n.guid())+"_label",r.attr("id",l)),i.attr("aria-labelledby",l)}},events:[s],options:{name:"Switch",messages:{checked:"On",unchecked:"Off"},width:null,checked:null,enabled:!0,readonly:!1,size:"medium",rounded:"full",trackRounded:"full",thumbRounded:"full"},check:function(e){var n=this,i=n.element[0];if(e===t)return i.checked;i.checked!==e&&(n.options.checked=i.checked=e),n.wrapper.attr("aria-checked",e).toggleClass(l.checked,e).toggleClass(l.unchecked,!e).find("[aria-hidden='true']").removeAttr(h),e?(n.element.attr(f,f),n.wrapper.find(v+l.uncheckedLabel).attr(h,!0)):(n.element.prop(f,!1),n.wrapper.find(v+l.checkedLabel).attr(h,!0))},value:function(e){return"string"==typeof e?e="true"===e:null===e&&(e=!1),this.check.apply(this,[e])},destroy:function(){r.fn.destroy.call(this),this.wrapper.off(a)},toggle:function(){this.check(!this.element[0].checked)},enable:function(e){var t=this.element,n=this.wrapper;void 0===e&&(e=!0),this.options.enabled=e,e?(t.prop(d,!1),n.removeAttr(u)):(t.attr(d,d),n.attr(u,!0)),n.toggleClass(l.disabled,!e)},readonly:function(e){var t=this,n=t.element,i=t.wrapper;void 0===e&&(e=!0),t.options.readonly=e,e?(n.attr(c,!0),i.attr(p,!0)):(n.prop(c,!1),i.removeAttr(p)),i.toggleClass(l.readonly,e)},_check:function(){var e=this,t=e.element[0].checked=!e.element[0].checked;e.wrapper.trigger("focus"),!e.options.enabled||e.options.readonly||e.trigger(s,{checked:t})?e.element[0].checked=!t:e.check(t)},_keydown:function(e){e.keyCode===n.keys.SPACEBAR&&(this._check(),e.preventDefault())},_isTouch:function(e){return/touch/.test(e.type)||e.originalEvent&&/touch/.test(e.originalEvent.pointerType)},_click:function(e){this._isTouch(e)||1!==e.which||this._check()},_touchEnd:function(e){this._isTouch(e)&&(this._check(),e.preventDefault())}});n.cssProperties.registerPrefix("Switch","k-switch-"),n.cssProperties.registerValues("Switch",[{prop:"rounded",values:n.cssProperties.roundedValues.concat([["full","full"]])}]),i.plugin(w)}(window.kendo.jQuery);!function(e,t){var n=window.kendo,i=n.ui,a=i.Widget,r=n.keys,o=n.template,s=".kendoButtonGroup",l="k-button",d="k-icon-button",u="k-selected",c="k-disabled",p="select",h=n.support.browser.msie,f={item:o('<span #= item.enabled === false ? "disabled" : "" # >#= icon(iconClass) ##= image(item) ## if(!!text) { #<span class="k-button-text"> #= text # </span># } #</span>'),image:o('<img alt="icon" src="#=data.imageUrl#" class="k-button-icon"/>'),icon:o('<span class="k-button-icon #=data#"></span>'),empty:o("")};function m(n,a){var r;null!==n&&n!==t&&(n.constructor!==Object&&(n={text:n}),n.position!==t&&""!==n.position||(n.position="edge",n.align!==t&&""!==n.align||(n.align="top end")),n._classNames=["k-button-badge"],a.addClass("k-badge-container"),r=e("<span />").appendTo(a),a.badge=new i.Badge(r,n))}var g=a.extend({init:function(t,n){var i=this;a.fn.init.call(i,t,n),i.wrapper=i.element,i.options.items&&i._renderItems(i.options.items),i.selectedIndices=[],i.element.addClass("k-widget k-button-group").attr("role","group").attr("tabindex",i.element.attr("tabindex")||"0").children().each((function(){var t=e(this);i._updateClasses.bind(i)(t)})),i._enable=!0,i.options.enable&&i.options.enabled||(i._enable=!1,i.element.attr("aria-disabled",!0).addClass(c),i.element.children().addClass(c)),i.select(i.options.index),i._attachEvents()},events:[p],options:{name:"ButtonGroup",selection:"single",index:-1,enable:!0,enabled:!0},current:function(){return this.element.find("."+u)},_attachEvents:function(){var e=this;e.element.on("click"+s,".k-button",e._click.bind(e)).on("focus"+s,e._focus.bind(e)).on("focusout"+s,e._focusout.bind(e)).on("keydown"+s,e._keyDown.bind(e)).on("mousedown"+s,e._mouseDown.bind(e))},_renderItems:function(t){var i=this;t.forEach((function(t){var a=e(f.item({image:t.imageUrl?f.image:f.empty,icon:t.imageUrl||!t.iconClass&&!t.icon?f.empty:f.icon,iconClass:t.iconClass||"k-icon k-i-"+t.icon,item:t,text:t.text?!1===t.encoded?t.text:n.htmlEncode(t.text):""}));t.attributes&&a.attr(t.attributes),t.selected&&a.addClass(u),(t.iconClass||t.icon||t.imageUrl)&&!t.text&&a.addClass(d),t.badge&&m(t.badge,a),a.appendTo(i.element)}))},_mouseDown:function(e){var t=e.clientX,n=e.clientY;document.elementFromPoint(t,n)!==this.element[0]&&(this.preventFocus=!0,this.preventFocusOut=!0),h&&this._focus()},_focus:function(){var t=e(this.element);t.removeAttr("tabindex"),t.find("[role='button']").attr("tabindex","0"),this.preventFocus?this.preventFocus=!1:t.find("."+u).length?t.find("."+u).first().trigger("focus"):t.children().first().trigger("focus")},_focusout:function(){var e=this.wrapper;this.preventFocusOut?this.preventFocusOut=!1:setTimeout((function(){e[0].contains(document.activeElement)||(e.attr("tabindex","0"),e.find("[role='button']").removeAttr("tabindex"))}))},_keyDown:function(t){var i=this,a=e(i.element),o=a.find(".k-button"),s=a.find(":focus"),l=o.index(s),d=n.support.isRtl(i.element);t.keyCode===r.LEFT&&!d||t.keyCode===r.RIGHT&&d?((0===l?o.eq(o.length-1):e(o[l-1])).trigger("focus"),t.preventDefault()):t.keyCode===r.LEFT&&d||t.keyCode===r.RIGHT&&!d?((l+1===o.length?o.eq(0):e(o[l+1])).trigger("focus"),t.preventDefault()):t.keyCode!==r.ENTER&&t.keyCode!==r.SPACEBAR||(i._select(s),t.preventDefault())},select:function(n){var i,a=this,r=-1;n!==t&&-1!==n&&("number"==typeof n?(r=n,n=a.element.children().eq(n)):n.nodeType&&(r=(n=e(n)).index()),"multiple"===a.options.selection?(i="true"===n.attr("aria-pressed"),n.attr("aria-pressed",!i).toggleClass(u),-1===a.selectedIndices.indexOf(r)?a.selectedIndices.push(r):a.selectedIndices.splice(a.selectedIndices.indexOf(r),1)):(a.selectedIndices=[],a.current().attr("aria-pressed",!1).removeClass(u),n.attr("aria-pressed",!0).addClass(u),a.selectedIndices.push(r)))},badge:function(e,t){var i,a=this.element,r=isNaN(e)?a.find(e):a.children().eq(e),o=t||0===t;if(r.length){if(!(i=r.children(".k-badge").eq(0).data("kendoBadge"))&&o)return m({text:n.htmlEncode(t)},r),n.htmlEncode(t);if(o)i.text(n.htmlEncode(t));else if(!1===t)return i.element.empty().remove(),void i.destroy();return i?i.text():null}},enable:function(e){void 0===e&&(e=!0),this.element.attr("aria-disabled",!e).toggleClass(c,!e),this.element.children().toggleClass(c,!e),this._enable=this.options.enable=e},destroy:function(){var t=this;t.element.off(s),t.element.find(".k-badge").each((function(){e(this).data("kendoBadge").destroy()})),a.fn.destroy.call(t)},_updateClasses:function(t){var i=n.attrValue(t,"icon"),a=n.attrValue(t,"badge"),r=t.find("img").addClass("k-image"),o=!0;t.attr("aria-pressed",!1).attr("role","button").addClass(l).addClass("k-button-md k-rounded-md k-button-solid k-button-solid-base"),(t.is("[disabled]")||t.hasClass(c))&&t.addClass(c).attr("aria-disabled",!0).removeAttr("disabled"),t.is("."+u)&&(t.removeClass(u),(!t.hasClass(c)&&"single"===this.options.selection||"multiple"===this.options.selection)&&this.select(t[0])),!r[0]&&i&&t.prepend(e(f.icon("k-icon k-i-"+i))),t.contents().filter((function(){return!e(this).hasClass("k-icon")&&!e(this).hasClass("k-image")})).each((function(){(1==this.nodeType||3==this.nodeType&&n.trim(this.nodeValue).length>0)&&(o=!1)})),(r[0]||i)&&o&&t.addClass(d),(a||0===a)&&m(a,t)},_click:function(t){var n=e(t.target).closest(".k-button");t.isDefaultPrevented()||(t.target.focus(),this._select(n))},_select:function(e){var t=e;this._enable&&!t.is("."+c)&&(this.select(e[0]),this.trigger(p,{indices:this.selectedIndices}))}});i.plugin(g)}(window.kendo.jQuery)}));
17
+ //# sourceMappingURL=kendo.custom.min.js.map