1/* 2* Kendo UI Complete v2013.1.514 (http://kendoui.com) 3* Copyright 2013 Telerik AD. All rights reserved. 4* 5* Kendo UI commercial licenses may be obtained at 6* https://www.kendoui.com/purchase/license-agreement.aspx 7* If you do not own a commercial license, this file shall be governed by the trial license terms. 8*/ 9(function (e, t, n) { 10 function i() { } function r(e, t) { if (t) return "'" + e.split("'").join("\\'").split('\\"').join('\\\\\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t") + "'"; var n = e.charAt(0), i = e.substring(1); return "=" === n ? "+(" + i + ")+" : ":" === n ? "+e(" + i + ")+" : ";" + e + ";o+=" } function a(e, t, n) { return e += "", t = t || 2, n = t - e.length, n ? O[t].substring(0, n) + e : e } function o(t) { var n, i, r, a, o, s, l, d, c, u, p, f, h, g = mt.browser, m = "rtl" == t.css("direction"); return t.parent().hasClass("k-animation-container") ? (f = t.parent(".k-animation-container"), h = f[0].style, f.is(":hidden") && f.show(), n = vt.test(h.width) || vt.test(h.height), n || f.css({ width: t.outerWidth(), height: t.outerHeight() })) : (i = t.css(st.support.transitions.css + "box-shadow") || t.css("box-shadow"), r = i ? i.match(bt) || [0, 0, 0, 0, 0] : [0, 0, 0, 0, 0], a = ht.max(+r[3], +(r[4] || 0)), o = -r[1] + a, s = +r[1] + a, l = +r[2] + a, d = t[0].style.width, c = t[0].style.height, u = vt.test(d), p = vt.test(c), g.opera && (o = s = l = 5), n = u || p, u || (d = t.outerWidth()), p || (c = t.outerHeight()), t.wrap(e("<div/>").addClass("k-animation-container").css({ width: d, height: c, marginLeft: o * (m ? 1 : -1), paddingLeft: o, paddingRight: s, paddingBottom: l })), n && t.css({ width: "100%", height: "100%", boxSizing: "border-box", mozBoxSizing: "border-box", webkitBoxSizing: "border-box" })), g.msie && 7 >= ht.floor(g.version) && t.css({ zoom: 1 }), t.parent() } function s(e) { var t = 1, n = arguments.length; for (t = 1; n > t; t++) l(e, arguments[t]); return e } function l(e, t) { var n, i, r, a, o = st.data.ObservableArray; for (n in t) i = t[n], r = typeof i, r === xt && null !== i && i.constructor !== Array && i.constructor !== o ? i instanceof Date ? e[n] = new Date(i.getTime()) : (a = e[n], e[n] = typeof a === xt ? a || {} : {}, l(e[n], i)) : r !== St && (e[n] = i); return e } function d(e, t, i) { for (var r in t) if (t.hasOwnProperty(r) && t[r].test(e)) return r; return i !== n ? i : e } function c(t, n) { var i, r = {}; return document.defaultView && document.defaultView.getComputedStyle ? (i = document.defaultView.getComputedStyle(t, ""), n && e.each(n, function (e, t) { r[t] = i.getPropertyValue(t) })) : (i = t.currentStyle, n && e.each(n, function (e, t) { r[t] = i[t.replace(/\-(\w)/g, function (e, t) { return t.toUpperCase() })] })), st.size(r) || (r = i), r } function u(e) { var t, n = 0; for (t in e) e.hasOwnProperty(t) && "toJSON" != t && n++; return n } function p(t) { return "" === e.trim(e(t).contents().filter(function () { return 8 != this.nodeType }).html()) } function f(e, t, n) { var i, r, a, o; return t || (t = "offset"), i = e[t](), r = mt.mobileOS, mt.touch && r.ios && 410 > r.flatVersion && (a = "offset" == t ? i : e.offset(), o = i.left == a.left && i.top == a.top) ? { top: i.top - window.scrollY, left: i.left - window.scrollX} : (st.support.pointers && !n && (i.top -= window.pageYOffset - document.documentElement.scrollTop, i.left -= window.pageXOffset - document.documentElement.scrollLeft), i) } function h(e) { var t = {}; return dt("string" == typeof e ? e.split(" ") : e, function (e) { t[e] = this }), t } function g(e) { return new st.effects.Element(e) } function m(e, t, n, i) { return typeof e === wt && (ft(t) && (i = t, t = 400, n = !1), ft(n) && (i = n, n = !1), typeof t === Tt && (n = t, t = 400), e = { effects: e, duration: t, reverse: n, complete: i }), lt({ effects: {}, duration: 400, reverse: !1, init: pt, teardown: pt, hide: !1 }, e, { completeCallback: e.complete, complete: pt }) } function v(t, n, i, r, a) { for (var o, s = 0, l = t.length; l > s; s++) o = e(t[s]), o.queue(function () { P.promise(o, m(n, i, r, a)) }); return t } function _(e, t, n, i, r, a) { return P.transitionPromise(e, t, m(n, i, r, a)) } function b(e, t, n, i) { return t && (t = t.split(" "), dt(t, function (t, n) { e.toggleClass(n, i) })), e } function k(e) { return ("" + e).replace(B, "&").replace(L, "<").replace(V, ">") } function w(e, i) { var r; return 0 === i.indexOf("data") && (i = i.substring(4), i = i.charAt(0).toLowerCase() + i.substring(1)), i = i.replace(Q, "-$1"), r = e.getAttribute("data-" + st.ns + i), null === r ? r = n : "null" === r ? r = null : "true" === r ? r = !0 : "false" === r ? r = !1 : isNaN(parseFloat(r)) ? K.test(r) && !Y.test(r) && (r = t("(" + r + ")")) : r = parseFloat(r), r } function y(t, i) { var r, a, o = {}; for (r in i) a = w(t, r), a !== n && ($.test(r) && (a = st.template(e("#" + a).html())), o[r] = a); return o } function x(e, t) { var n = e.nodeName.toLowerCase(); return (/input|select|textarea|button|object/.test(n) ? !e.disabled : "a" === n ? e.href || t : t) && C(e) } function C(t) { return !e(t).parents().andSelf().filter(function () { return "hidden" === e.css(this, "visibility") || e.expr.filters.hidden(this) }).length } function T(e, t) { return new T.fn.init(e, t) } var S, F, D, E, A, I, H, N, R, z, O, M, P, B, L, V, W, U, q, j, G, $, K, Y, Q, J, X, Z, et, tt, nt, it, rt, at, ot, st = window.kendo = window.kendo || {}, lt = e.extend, dt = e.each, ct = e.proxy, ut = e.isArray, pt = e.noop, ft = e.isFunction, ht = Math, gt = window.JSON || {}, mt = {}, vt = /%/, _t = /\{(\d+)(:[^\}]+)?\}/g, bt = /(\d+?)px\s*(\d+?)px\s*(\d+?)px\s*(\d+?)?/i, kt = "function", wt = "string", yt = "number", xt = "object", Ct = "null", Tt = "boolean", St = "undefined", Ft = {}, Dt = {}, Et = [].slice, At = window.Globalize; i.extend = function (e) { var t, n, i = function () { }, r = this, a = e && e.init ? e.init : function () { r.apply(this, arguments) }; i.prototype = r.prototype, n = a.fn = a.prototype = new i; for (t in e) n[t] = typeof e[t] !== xt || e[t] instanceof Array || null === e[t] ? e[t] : lt(!0, {}, i.prototype[t], e[t]); return n.constructor = a, a.extend = r.extend, a }, F = function () { this._defaultPrevented = !0 }, D = function () { return this._defaultPrevented === !0 }, E = i.extend({ init: function () { this._events = {} }, bind: function (e, t, i) { var r, a, o, s, l, d = this, c = typeof e === wt ? [e] : e, u = typeof t === kt; if (t === n) { for (r in e) d.bind(r, e[r]); return d } for (r = 0, a = c.length; a > r;
10 r++) e = c[r], s = u ? t : t[e], s && (i && (o = s, s = function () { d.unbind(e, s), o.apply(d, arguments) }), l = d._events[e] = d._events[e] || [], l.push(s)); return d }, one: function (e, t) { return this.bind(e, t, !0) }, first: function (e, t) { var n, i, r, a, o = this, s = typeof e === wt ? [e] : e, l = typeof t === kt; for (n = 0, i = s.length; i > n; n++) e = s[n], r = l ? t : t[e], r && (a = o._events[e] = o._events[e] || [], a.unshift(r)); return o }, trigger: function (e, t) { var n, i, r = this, a = r._events[e]; if (a) { for (t = t || {}, t.sender = r, t._defaultPrevented = !1, t.preventDefault = F, t.isDefaultPrevented = D, a = a.slice(), n = 0, i = a.length; i > n; n++) a[n].call(r, t); return t._defaultPrevented === !0 } return !1 }, unbind: function (e, t) { var i, r = this, a = r._events[e]; if (e === n) r._events = {}; else if (a) if (t) for (i = a.length - 1; i >= 0; i--) a[i] === t && a.splice(i, 1); else r._events[e] = []; return r } }), A = /^\w+/, I = /\$\{([^}]*)\}/g, H = /\\\}/g, N = /__CURLY__/g, R = /\\#/g, z = /__SHARP__/g, O = ["", "0", "00", "000", "0000"], S = { paramName: "data", useWithBlock: !0, render: function (e, t) { var n, i, r = ""; for (n = 0, i = t.length; i > n; n++) r += e(t[n]); return r }, compile: function (t, n) { var i, a, o = lt({}, this, n), s = o.paramName, l = s.match(A)[0], d = o.useWithBlock, c = "var o,e=kendo.htmlEncode;"; if (ft(t)) return 2 === t.length ? function (n) { return t(e, { data: n }).join("") } : t; for (c += d ? "with(" + s + "){" : "", c += "o=", i = t.replace(H, "__CURLY__").replace(I, "#=e($1)#").replace(N, "}").replace(R, "__SHARP__").split("#"), a = 0; i.length > a; a++) c += r(i[a], 0 === a % 2); c += d ? ";}" : ";", c += "return o;", c = c.replace(z, "#"); try { return Function(l, c) } catch (u) { throw Error(st.format("Invalid template:'{0}' Generated code:'{1}'", t, c)) } } }, function () { function e(e) { return o.lastIndex = 0, o.test(e) ? '"' + e.replace(o, function (e) { var t = s[e]; return typeof t === wt ? t : "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4) }) + '"' : '"' + e + '"' } function t(a, o) { var s, d, c, u, p, f, h = n, g = o[a]; if (g && typeof g === xt && typeof g.toJSON === kt && (g = g.toJSON(a)), typeof r === kt && (g = r.call(o, a, g)), f = typeof g, f === wt) return e(g); if (f === yt) return isFinite(g) ? g + "" : Ct; if (f === Tt || f === Ct) return g + ""; if (f === xt) { if (!g) return Ct; if (n += i, p = [], "[object Array]" === l.apply(g)) { for (u = g.length, s = 0; u > s; s++) p[s] = t(s, g) || Ct; return c = 0 === p.length ? "[]" : n ? "[\n" + n + p.join(",\n" + n) + "\n" + h + "]" : "[" + p.join(",") + "]", n = h, c } if (r && typeof r === xt) for (u = r.length, s = 0; u > s; s++) typeof r[s] === wt && (d = r[s], c = t(d, g), c && p.push(e(d) + (n ? ": " : ":") + c)); else for (d in g) Object.hasOwnProperty.call(g, d) && (c = t(d, g), c && p.push(e(d) + (n ? ": " : ":") + c)); return c = 0 === p.length ? "{}" : n ? "{\n" + n + p.join(",\n" + n) + "\n" + h + "}" : "{" + p.join(",") + "}", n = h, c } } var n, i, r, o = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, s = { "\b": "\\b", " ": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\" }, l = {}.toString; typeof Date.prototype.toJSON !== kt && (Date.prototype.toJSON = function () { var e = this; return isFinite(e.valueOf()) ? a(e.getUTCFullYear(), 4) + "-" + a(e.getUTCMonth() + 1) + "-" + a(e.getUTCDate()) + "T" + a(e.getUTCHours()) + ":" + a(e.getUTCMinutes()) + ":" + a(e.getUTCSeconds()) + "Z" : null }, String.prototype.toJSON = Number.prototype.toJSON = Boolean.prototype.toJSON = function () { return this.valueOf() }), typeof gt.stringify !== kt && (gt.stringify = function (e, a, o) { var s; if (n = "", i = "", typeof o === yt) for (s = 0; o > s; s += 1) i += " ";
10 else typeof o === wt && (i = o); if (r = a, a && typeof a !== kt && (typeof a !== xt || typeof a.length !== yt)) throw Error("JSON.stringify"); return t("", { "": e }) }) } (), function () { function e(e) { if (e) { if (e.numberFormat) return e; if (typeof e === wt) { var t = st.cultures; return t[e] || t[e.split("-")[0]] || null } return null } return null } function t(t) { return t && (t = e(t)), t || st.cultures.current } function i(e) { e.groupSizes = e.groupSize, e.percent.groupSizes = e.percent.groupSize, e.currency.groupSizes = e.currency.groupSize } function r(e, i, r) { r = t(r); var o = r.calendars.standard, s = o.days, l = o.months; return i = o.patterns[i] || i, i.replace(d, function (t) { var i; return "d" === t ? i = e.getDate() : "dd" === t ? i = a(e.getDate()) : "ddd" === t ? i = s.namesAbbr[e.getDay()] : "dddd" === t ? i = s.names[e.getDay()] : "M" === t ? i = e.getMonth() + 1 : "MM" === t ? i = a(e.getMonth() + 1) : "MMM" === t ? i = l.namesAbbr[e.getMonth()] : "MMMM" === t ? i = l.names[e.getMonth()] : "yy" === t ? i = a(e.getFullYear() % 100) : "yyyy" === t ? i = a(e.getFullYear(), 4) : "h" === t ? i = e.getHours() % 12 || 12 : "hh" === t ? i = a(e.getHours() % 12 || 12) : "H" === t ? i = e.getHours() : "HH" === t ? i = a(e.getHours()) : "m" === t ? i = e.getMinutes() : "mm" === t ? i = a(e.getMinutes()) : "s" === t ? i = e.getSeconds() : "ss" === t ? i = a(e.getSeconds()) : "f" === t ? i = ht.floor(e.getMilliseconds() / 100) : "ff" === t ? i = ht.floor(e.getMilliseconds() / 10) : "fff" === t ? i = e.getMilliseconds() : "tt" === t && (i = 12 > e.getHours() ? o.AM[0] : o.PM[0]), i !== n ? i : t.slice(1, t.length - 1) }) } function o(e, i, r) { r = t(r); var a, o, l, d, b, k, w, y, x, C, T, S, F, D, E, A, I, H, N, R, z, O, M, P = r.numberFormat, B = P.groupSize[0], L = P[g], V = P[h], W = P.decimals, U = P.pattern[0], q = [], j = 0 > e, G = f, $ = f, K = -1; if (e === n) return f; if (!isFinite(e)) return e; if (!i) return r.name.length ? e.toLocaleString() : "" + e; if (b = c.exec(i)) { if (i = b[1].toLowerCase(), o = "c" === i, l = "p" === i, (o || l) && (P = o ? P.currency : P.percent, B = P.groupSize[0], L = P[g], V = P[h], W = P.decimals, a = P.symbol, U = P.pattern[j ? 0 : 1]), d = b[2], d && (W = +d), "e" === i) return d ? e.toExponential(W) : e.toExponential(); if (l && (e *= 100), e = s(e, W), e = e.split(h), k = e[0], w = e[1], j && (k = k.substring(1)), $ = k, y = k.length, y >= B) for ($ = f, C = 0; y > C; C++) C > 0 && 0 === (y - C) % B && ($ += L), $ += k.charAt(C); if (w && ($ += V + w), "n" === i && !j) return $; for (e = f, C = 0, T = U.length; T > C; C++) S = U.charAt(C), e += "n" === S ? $ : "$" === S || "%" === S ? a : S; return e } if (j && (e = -e), i = i.split(";"), j && i[1]) i = i[1], D = !0; else if (0 === e) { if (i = i[2] || i[0], -1 == i.indexOf(m) && -1 == i.indexOf(v)) return i } else i = i[0]; if ((i.indexOf("'") > -1 || i.indexOf('"') > -1) && (i = i.replace(u, function (e) { return q.push(e), _ })), R = i.indexOf("%"), z = i.indexOf("$"), l = -1 != R, o = -1 != z, l && ("\\" !== i[R - 1] ? e *= 100 : i = i.split("\\").join("")), o && "\\" === i[z - 1] && (i = i.split("\\").join(""), o = !1), (o || l) && (P = o ? P.currency : P.percent, B = P.groupSize[0], L = P[g], V = P[h], W = P.decimals, a = P.symbol), F = i.indexOf(g) > -1, F && (i = i.replace(p, f)), E = i.indexOf(h), T = i.length, -1 != E ? (w = ("" + e).split("e"), w = w[1] ? s(e, Math.abs(w[1])) : w[0], w = w.split(h)[1] || f, I = i.lastIndexOf(v) - E, A = i.lastIndexOf(m) - E, H = I > -1, N = A > -1, C = w.length, H || N || (i = i.substring(0, E) + i.substring(E + 1), T = i.length, E = -1, C = 0), H && I > A ? C = I : A > I && (N && C > A ? C = A : H && I > C && (C = I)), C > -1 && (e = s(e, C))) : e = s(e), A = i.indexOf(m), O = I = i.indexOf(v), K = -1 == A && -1 != I ? I : -1 != A && -1 == I ? A : A > I ? I : A, A = i.lastIndexOf(m), I = i.lastIndexOf(v), M = -1 == A && -1 != I ? I : -1 != A && -1 == I ? A : A > I ? A : I, K == T && (M = K), -1 != K) { if ($ = ("" + e).split(h), k = $[0], w = $[1] || f, y = k.length, x = w.length, F) if (y === B && E - O > y) k = L + k; else if (y > B) { for ($ = f, C = 0; y > C; C++) C > 0 && 0 === (y - C) % B && ($ += L), $ += k.charAt(C); k = $ } for (e = i.substring(0, K), j && !D && (e += "-"), C = K; T > C; C++) { if (S = i.charAt(C), -1 == E) { if (y > M - C) { e += k; break } } else if (-1 != I && C > I && (G = f), y >= E - C && E - C > -1 && (e += k, C = E), E === C) { e += (w ? V : f) + w, C += M - E + 1; continue } S === v ? (e += S, G = S) : S === m && (e += G) } if (M >= K && (e += i.substring(M + 1)), o || l) { for ($ = f, C = 0, T = e.length; T > C; C++) S = e.charAt(C), $ += "$" === S || "%" === S ? a : S; e = $ } if (q[0]) for (T = q.length, C = 0; T > C; C++) e = e.replace(_, q[C]) } return e }
10 var s, l, d = /dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|HH|H|hh|h|mm|m|fff|ff|f|tt|ss|s|"[^"]*"|'[^']*'/g, c = /^(n|c|p|e)(\d*)$/i, u = /["'].*?["']/g, p = /\,/g, f = "", h = ".", g = ",", m = "#", v = "0", _ = "??", b = "en-US", k = {}.toString; st.cultures = { "en-US": { name: b, numberFormat: { pattern: ["-n"], decimals: 2, ",": ",", ".": ".", groupSize: [3], percent: { pattern: ["-n %", "n %"], decimals: 2, ",": ",", ".": ".", groupSize: [3], symbol: "%" }, currency: { 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}}} }, st.culture = function (t) { var r, a = st.cultures; return t === n ? a.current : (r = e(t) || a[b], r.calendar = r.calendars.standard, a.current = r, At && i(r.numberFormat), n) }, st.findCulture = e, st.getCulture = t, st.culture(b), s = function (e, t) { var n = Math.pow(10, t || 0); return (Math.round(e * n) / n).toFixed(t) }, l = function (e, t, i) { if (t) { if ("[object Date]" === k.call(e)) return r(e, t, i); if (typeof e === yt) return o(e, t, i) } return e !== n ? e : "" }, At && (l = ct(At.format, At)), st.format = function (e) { var t = arguments; return e.replace(_t, function (e, n, i) { var r = t[parseInt(n, 10) + 1]; return l(r, i ? i.substring(1) : "") }) }, st._extractFormat = function (e) { return "{0:" === e.slice(0, 3) && (e = e.slice(3, e.length - 1)), e }, st._activeElement = function () { try { return document.activeElement } catch (e) { return document.documentElement.activeElement } }, st._round = s, st.toString = l } (), function () { function t(e, t, n) { return !(e >= t && n >= e) } function i(e) { return e.charAt(0) } function r(t) { return e.map(t, i) } function a(e, t) { t || 23 !== e.getHours() || e.setHours(e.getHours() + 2) } function o(e, i, o) { if (!e) return null; var s, l, u, p, h, g, m, v, _, b, k, w, y = function (e) { for (var t = 0; i[R] === e; ) t++, R++; return t > 0 && (R -= 1), t }, x = function (t) { var n = f[t] || RegExp("^\\d{1," + t + "}"), i = e.substr(z, t).match(n); return i ? (i = i[0], z += i.length, parseInt(i, 10)) : null }, C = function (t) { for (var n, i, r = 0, a = t.length; a > r; r++) if (n = t[r], i = n.length, e.substr(z, i) == n) return z += i, r + 1; return null }, T = function () { var t = !1; return e.charAt(z) === i[R] && (z++, t = !0), t }, S = o.calendars.standard, F = null, D = null, E = null, A = null, I = null, H = null, N = null, R = 0, z = 0, O = !1, M = new Date, P = S.twoDigitYearMax || 2029, B = M.getFullYear(); for (i || (i = "d"), p = S.patterns[i], p && (i = p), i = i.split(""), u = i.length; u > R; R++) if (s = i[R], O) "'" === s ? O = !1 : T(); else if ("d" === s) { if (l = y("d"), E = 3 > l ? x(2) : C(S.days[3 == l ? "namesAbbr" : "names"]), null === E || t(E, 1, 31)) return null } else if ("M" === s) { if (l = y("M"), D = 3 > l ? x(2) : C(S.months[3 == l ? "namesAbbr" : "names"]), null === D || t(D, 1, 12)) return null; D -= 1 } else if ("y" === s) { if (l = y("y"), F = x(l), null === F) return null; 2 == l && ("string" == typeof P && (P = B + parseInt(P, 10)), F = B - B % 100 + F, F > P && (F -= 100)) } else if ("h" === s) { if (y("h"), A = x(2), 12 == A && (A = 0), null === A || t(A, 0, 11)) return null } else if ("H" === s) { if (y("H"), A = x(2), null === A || t(A, 0, 23)) return null } else if ("m" === s) { if (y("m"), I = x(2), null === I || t(I, 0, 59)) return null } else if ("s" === s) { if (y("s"), H = x(2), null === H || t(H, 0, 59)) return null } else if ("f" === s) { if (l = y("f"), N = x(l), null !== N && l > 3 && (N = parseInt(("" + N).substring(0, 3), 10)), null === N || t(N, 0, 999)) return null } else if ("t" === s) { if (l = y("t"), _ = S.AM, b = S.PM, 1 === l && (_ = r(_), b = r(b)), h = C(b), !h && !C(_)) return null } else if ("z" === s) { if (g = !0, l = y("z"), "Z" === e.substr(z, 1)) { if (!m) return null; T(); continue } if (v = e.substr(z, 6).match(l > 2 ? c : d), !v) return null; if (v = v[0], z = v.length, v = v.split(":"), k = parseInt(v[0], 10), t(k, -12, 13)) return null; if (l > 2 && (w = parseInt(v[1], 10), isNaN(w) || t(w, 0, 59))) return null } else if ("T" === s) m = T(); else if ("'" === s) O = !0, T(); else if (!T()) return null; return null === F && (F = B), h && 12 > A && (A += 12), null === E && (E = 1), g ? (k && (A += -k), w && (I += -w), e = new Date(Date.UTC(F, D, E, A, I, H, N))) : (e = new Date(F, D, E, A, I, H, N), a(e, A)), 100 > F && e.setFullYear(F), e.getDate() !== E && g === n ? null : e } var s = /\u00A0/g, l = /[eE][\-+]?[0-9]+/, d = /[+|\-]\d{1,2}/, c = /[+|\-]\d{1,2}:\d{2}/, u = /^\/Date\((.*?)\)\/$/, p = ["G", "g", "d", "F", "D", "y", "m", "T", "t"], f = { 2: /^\d{1,2}/, 4: /^\d{4}/ }, h = {}.toString; st._adjustDate = a, st.parseDate = function (e, t, n) { if ("[object Date]" === h.call(e)) return e; var i, r, a = 0, s = null; if (e && 0 === e.indexOf("/D") && (s = u.exec(e))) return new Date(parseInt(s[1], 10)); if (n = st.getCulture(n), !t) { for (t = [], r = n.calendar.patterns, i = p.length; i > a; a++) t[a] = r[p[a]]; t[a] = "ddd MMM dd yyyy HH:mm:ss", t[++a] = "yyyy-MM-ddTHH:mm:ss.fffffffzzz", t[++a] = "yyyy-MM-ddTHH:mm:ss.fffzzz", t[++a] = "yyyy-MM-ddTHH:mm:sszzz", t[++a] = "yyyy-MM-ddTHH:mmzzz", t[++a] = "yyyy-MM-ddTHH:mmzz", t[++a] = "yyyy-MM-ddTHH:mm:ss", t[++a] = "yyyy-MM-ddTHH:mm", t[++a] = "yyyy-MM-dd", a = 0 } for (t = ut(t) ? t : [t], i = t.length; i > a;
10 a++) if (s = o(e, t[a], n)) return s; return s }, st.parseInt = function (e, t) { var n = st.parseFloat(e, t); return n && (n = 0 | n), n }, st.parseFloat = function (e, t, n) { if (!e && 0 !== e) return null; if (typeof e === yt) return e; e = "" + e, t = st.getCulture(t); var i, r, a = t.numberFormat, o = a.percent, d = a.currency, c = d.symbol, u = o.symbol, p = e.indexOf("-") > -1; return l.test(e) ? (e = parseFloat(e), isNaN(e) && (e = null), e) : (e.indexOf(c) > -1 || n && n.toLowerCase().indexOf("c") > -1 ? (a = d, i = a.pattern[0].replace("$", c).split("n"), e.indexOf(i[0]) > -1 && e.indexOf(i[1]) > -1 && (e = e.replace(i[0], "").replace(i[1], ""), p = !0)) : e.indexOf(u) > -1 && (r = !0, a = o, c = u), e = e.replace("-", "").replace(c, "").replace(s, " ").split(a[","].replace(s, " ")).join("").replace(a["."], "."), e = parseFloat(e), isNaN(e) ? e = null : p && (e *= -1), e && r && (e /= 100), e) }, At && (st.parseDate = function (e, t, n) { return "[object Date]" === h.call(e) ? e : At.parseDate(e, t, n) }, st.parseFloat = function (e, t) { return typeof e === yt ? e : e === n || null === e ? null : (e = At.parseFloat(e, t), isNaN(e) ? null : e) }) } (), function () { function t(e) { var t, n = !1, i = [], r = { webkit: /(chrome)[ \/]([\w.]+)/i, safari: /(webkit)[ \/]([\w.]+)/i, opera: /(opera)(?:.*version|)[ \/]([\w.]+)/i, msie: /(msie) ([\w.]+)/i, mozilla: /(mozilla)(?:.*? rv:([\w.]+)|)/i }; for (t in r) if (r.hasOwnProperty(t) && (i = e.match(r[t]))) { n = {}, n[t] = !0, n[i[1].toLowerCase()] = !0, n.version = parseInt(document.documentMode || i[2], 10); break } return n } var i, r, a, o, s, l; mt.scrollbar = function () { var e, t = document.createElement("div"); return t.style.cssText = "overflow:scroll;overflow-x:hidden;zoom:1;clear:both", t.innerHTML = " ", document.body.appendChild(t), e = t.offsetWidth - t.scrollWidth, document.body.removeChild(t), e }, mt.isRtl = function (t) { return e(t).closest(".k-rtl").length > 0 }, i = document.createElement("table"); try { i.innerHTML = "<tr><td></td></tr>", mt.tbodyInnerHtml = !0 } catch (c) { mt.tbodyInnerHtml = !1 } mt.touch = "ontouchstart" in window, mt.pointers = navigator.msPointerEnabled, r = mt.transitions = !1, a = mt.transforms = !1, o = "HTMLElement" in window ? HTMLElement.prototype : [], mt.hasHW3D = "WebKitCSSMatrix" in window && "m11" in new window.WebKitCSSMatrix || "MozPerspective" in document.documentElement.style || "msPerspective" in document.documentElement.style, dt(["Moz", "webkit", "O", "ms"], function () { var e, t = "" + this, o = typeof i.style[t + "Transition"] === wt; return o || typeof i.style[t + "Transform"] === wt ? (e = t.toLowerCase(), a = { css: "ms" != e ? "-" + e + "-" : "", prefix: t, event: "o" === e || "webkit" === e ? e : "" }, o && (r = a, r.event = r.event ? r.event + "TransitionEnd" : "transitionend"), !1) : n }), mt.transforms = a, mt.transitions = r, mt.devicePixelRatio = window.devicePixelRatio === n ? 1 : window.devicePixelRatio, mt.screenWidth = window.outerWidth || window.screen ? window.screen.availWidth : window.innerWidth, mt.screenHeight = window.outerHeight || window.screen ? window.screen.availHeight : window.innerHeight, mt.detectOS = function (e) { var t, n, i = !1, r = [], a = !/mobile safari/i.test(e), o = { 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+)?)/, wp: /(Windows Phone(?: OS)?)\s(\d+)\.(\d+(\.\d+)?)/, windows: /(MSIE)\s+(\d+)\.(\d+(\.\d+)?)/, 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/, meego: /meego|ffos/ }, l = { tablet: /playbook|ipad|fire/i }, c = { omini: /Opera\sMini/i, omobile: /Opera\sMobi/i, firefox: /Firefox|Fennec/i, mobilesafari: /version\/.*safari/i, chrome: /chrome/i, webkit: /webkit/i, ie: /MSIE|Windows\sPhone/i };
10 for (n in o) if (o.hasOwnProperty(n) && (r = e.match(o[n]))) { if ("windows" == n && "plugins" in navigator) return !1; i = {}, i.device = n, i.tablet = d(n, l, !1), i.browser = d(e, c, "default"), i.name = d(n, s), i[i.name] = !0, i.majorVersion = r[2], i.minorVersion = r[3].replace("_", "."), t = i.minorVersion.replace(".", "").substr(0, 2), i.flatVersion = i.majorVersion + t + Array(3 - (3 > t.length ? t.length : 2)).join("0"), i.appMode = window.navigator.standalone || /file|local|wmapp/.test(window.location.protocol) || typeof window.PhoneGap !== St || typeof window.cordova !== St, i.android && (1.5 > mt.devicePixelRatio && 400 > i.flatVersion || a) && (mt.screenWidth > 800 || mt.screenHeight > 800) && (i.tablet = n); break } return i }, s = mt.mobileOS = mt.detectOS(navigator.userAgent), mt.wpDevicePixelRatio = s.wp ? screen.width / 320 : 0, mt.kineticScrollNeeded = s && (mt.touch || mt.pointers), mt.hasNativeScrolling = !1, (s.ios && s.majorVersion > 4 || s.android && s.majorVersion > 2 || s.wp) && (mt.hasNativeScrolling = s), mt.mouseAndTouchPresent = mt.touch && !(mt.mobileOS.ios || mt.mobileOS.android), mt.browser = t(navigator.userAgent), function (t) { var n, i = parseInt(t.version, 10); t.msie ? n = "ie" : t.mozilla ? n = "ff" : t.safari ? n = "safari" : t.webkit ? n = "webkit" : t.opera && (n = "opera"), n && e(document.documentElement).addClass("k-" + n + " k-" + n + i) } (mt.browser), mt.zoomLevel = function () { return mt.touch ? document.documentElement.clientWidth / window.innerWidth : mt.pointers ? window.outerWidth / window.innerWidth : 1 }, mt.eventCapture = document.documentElement.addEventListener, mt.placeholder = "placeholder" in document.createElement("input"), mt.stableSort = function () { var e = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].sort(function () { return 0 }); return 0 === e[0] && 1 === e[1] && 2 === e[2] && 3 === e[3] && 4 === e[4] && 5 === e[5] && 6 === e[6] && 7 === e[7] && 8 === e[8] && 9 === e[9] && 10 === e[10] && 11 === e[11] && 12 === e[12] } (), mt.matchesSelector = o.webkitMatchesSelector || o.mozMatchesSelector || o.msMatchesSelector || o.oMatchesSelector || o.matchesSelector || function (t) { for (var n = document.querySelectorAll ? (this.parentNode || document).querySelectorAll(t) || [] : e(t), i = n.length; i--; ) if (n[i] == this) return !0; return !1 }, mt.pushState = window.history && window.history.pushState, l = document.documentMode, mt.hashChange = "onhashchange" in window && !(mt.browser.msie && (!l || 8 >= l)) } (), M = { left: { reverse: "right" }, right: { reverse: "left" }, down: { reverse: "up" }, up: { reverse: "down" }, top: { reverse: "bottom" }, bottom: { reverse: "top" }, "in": { reverse: "out" }, out: { reverse: "in"} }, P = {}, e.extend(P, { Element: function (t) { this.element = e(t) }, promise: function (e, t) { e.is(":visible") || e.css({ display: e.data("olddisplay") || "block" }).css("display"), t.hide && e.data("olddisplay", e.css("display")).hide(), t.init && t.init(), t.completeCallback && t.completeCallback(e), e.dequeue() }, transitionPromise: function (e, t, n) { var i = st.wrap(e); return i.append(t), e.hide(), t.show(), n.completeCallback && n.completeCallback(e), e } }
10), "kendoAnimate" in e.fn || lt(e.fn, { kendoStop: function (e, t) { return this.stop(e, t) }, kendoAnimate: function (e, t, n, i) { return v(this, e, t, n, i) }, kendoAnimateTo: function (e, t, n, i, r) { return _(this, e, t, n, i, r) }, kendoAddClass: function (e, t) { return st.toggleClass(this, e, t, !0) }, kendoRemoveClass: function (e, t) { return st.toggleClass(this, e, t, !1) }, kendoToggleClass: function (e, t, n) { return st.toggleClass(this, e, t, n) } }), B = /&/g, L = /</g, V = />/g, W = function (e) { return e.target }, mt.touch && (U = "chrome" == mt.mobileOS.browser && !mt.mobileOS.ios, W = function (e) { var t = "originalEvent" in e ? e.originalEvent.changedTouches : "changedTouches" in e ? e.changedTouches : null, n = U ? "screen" : "client"; return t ? document.elementFromPoint(t[0][n + "X"], t[0][n + "Y"]) : e.target }, dt(["swipe", "swipeLeft", "swipeRight", "swipeUp", "swipeDown", "doubleTap", "tap"], function (t, n) { e.fn[n] = function (e) { return this.bind(n, e) } })), mt.touch ? mt.mobileOS ? (mt.mousedown = "touchstart", mt.mouseup = "touchend", mt.mousemove = "touchmove", mt.mousecancel = "touchcancel", mt.click = "touchend", mt.resize = "orientationchange") : (mt.mousedown = "mousedown touchstart", mt.mouseup = "mouseup touchend", mt.mousemove = "mousemove touchmove", mt.mousecancel = "mouseleave touchcancel", mt.click = "click", mt.resize = "resize") : mt.pointers ? (mt.mousemove = "MSPointerMove", mt.mousedown = "MSPointerDown", mt.mouseup = "MSPointerUp", mt.mousecancel = "MSPointerCancel", mt.click = "MSPointerUp", mt.resize = "orientationchange resize") : (mt.mousemove = "mousemove", mt.mousedown = "mousedown", mt.mouseup = "mouseup", mt.mousecancel = "mouseleave", mt.click = "click", mt.resize = "resize"), q = function (e, t) { var n, i, r, a, o = t || "d", s = 1; for (i = 0, r = e.length; r > i; i++) a = e[i], "" !== a && (n = a.indexOf("["), 0 !== n && (-1 == n ? a = "." + a : (s++, a = "." + a.substring(0, n) + " || {})" + a.substring(n))), s++, o += a + (r - 1 > i ? " || {})" : ")")); return Array(s).join("(") + o }, j = /^([a-z]+:)?\/\//i, lt(st, { ui: st.ui || {}, fx: st.fx || g, effects: st.effects || P, mobile: st.mobile || {}, data: st.data || {}, dataviz: st.dataviz || { ui: { roles: {}} }, 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 }, support: st.support || mt, animate: st.animate || v, ns: "", attr: function (e) { return "data-" + st.ns + e }, wrap: o, deepExtend: s, getComputedStyles: c, size: u, isNodeEmpty: p, getOffset: st.getOffset || f, parseEffects: st.parseEffects || h, toggleClass: st.toggleClass || b, directions: st.directions || M, Observable: E, Class: i, Template:
10S, template: ct(S.compile, S), render: ct(S.render, S), stringify: ct(gt.stringify, gt), eventTarget: W, htmlEncode: k, isLocalUrl: function (e) { return e && !j.test(e) }, expr: function (e, t, n) { return e = e || "", typeof t == wt && (n = t, t = !1), n = n || "d", e && "[" !== e.charAt(0) && (e = "." + e), e = t ? q(e.split("."), n) : n + e }, getter: function (e, t) { return Ft[e] = Ft[e] || Function("d", "return " + st.expr(e, t)) }, setter: function (e) { return Dt[e] = Dt[e] || Function("d,value", st.expr(e) + "=value") }, accessor: function (e) { return { get: st.getter(e), set: st.setter(e)} }, guid: function () { var e, t, n = ""; for (e = 0; 32 > e; e++) t = 0 | 16 * ht.random(), (8 == e || 12 == e || 16 == e || 20 == e) && (n += "-"), n += (12 == e ? 4 : 16 == e ? 8 | 3 & t : t).toString(16); return n }, roleSelector: function (e) { return e.replace(/(\S+)/g, "[" + st.attr("role") + "=$1],").slice(0, -1) }, logToConsole: function (e) { var t = window.console; t !== n && t.log && t.log(e) } }), G = E.extend({ init: function (e, t) { var n = this; n.element = st.jQuery(e).handler(n), E.fn.init.call(n), t = n.options = lt(!0, {}, n.options, t), n.element.attr(st.attr("role")) || n.element.attr(st.attr("role"), (t.name || "").toLowerCase()), n.element.data("kendo" + t.prefix + t.name, n), n.bind(n.events, t) }, events: [], options: { prefix: "" }, _tabindex: function (e) { e = e || this.wrapper; var t = this.element, n = "tabindex", i = e.attr(n) || t.attr(n); t.removeAttr(n), e.attr(n, isNaN(i) ? 0 : i) }, setOptions: function (t) { for (var n, i = this, r = 0, a = i.events.length; a > r; r++) n = i.events[r], i.options[n] && t[n] && i.unbind(n, i.options[n]); e.extend(i.options, t), i.bind(i.events, t) }, destroy: function () { var e = this; e.element.removeData("kendo" + e.options.prefix + e.options.name), e.element.removeData("handler"), e.unbind() } }), st.notify = pt, $ = /template$/i, K = /^\s*(?:\{(?:.|\r\n|\n)*\}|\[(?:.|\r\n|\n)*\])\s*$/, Y = /^\{(\d+)(:[^\}]+)?\}/, Q = /([A-Z])/g, st.initWidget = function (t, i, r) { var a, o, s, l, d, c, u, p; if (r ? r.roles && (r = r.roles) : r = st.ui.roles, t = t.nodeType ? t : t[0], c = t.getAttribute("data-" + st.ns + "role"), c && (s = -1 === c.indexOf(".") ? r[c] : st.getter(c)(window))) { for (p = w(t, "dataSource"), i = e.extend({}, y(t, s.fn.options), i), p && (i.dataSource = typeof p === wt ? st.getter(p)(window) : p), l = 0, d = s.fn.events.length; d > l; l++) o = s.fn.events[l], u = w(t, o), u !== n && (i[o] = st.getter(u)(window)); return a = e(t).data("kendo" + s.fn.options.prefix + s.fn.options.name), a ? a.setOptions(i) : a = new s(t, i), a } }, st.rolesFromNamespaces = function (e) { var t, n, i = []; for (e[0] || (e = [st.ui, st.dataviz.ui]), t = 0, n = e.length; n > t; t++) i[t] = e[t].roles; return lt.apply(null, [{}].concat(i.reverse())) }, st.init = function (t) { var n = st.rolesFromNamespaces(Et.call(arguments, 1)); e(t).find("[data-" + st.ns + "role]").andSelf().each(function () { st.initWidget(this, {}, n) }) }, st.destroy = function (t) { e(t).find("[data-" + st.ns + "role]").andSelf().each(function () { var t = e(this), n = st.widgetInstance(t, st.ui) || st.widgetInstance(t, st.mobile.ui) || st.widgetInstance(t, st.dataviz.ui); n && n.destroy() }) }, st.parseOptions = y, lt(st.ui, { Widget: G, roles: {}, progress: function (t, n) { var i, r, a, o, s = t.find(".k-loading-mask"), l = st.support, d = l.browser; n ? s.length || (i = l.isRtl(t), r = i ? "right" : "left", o = t.scrollLeft(), a = d.webkit ? i ? t[0].scrollWidth - t.width() - 2 * o : 0 : 0, s = e("<div class='k-loading-mask'><span class='k-loading-text'>Loading...</span><div class='k-loading-image'/><div class='k-loading-color'/></div>").width("100%").height("100%").css("top", t.scrollTop()).css(r, Math.abs(o) + a).prependTo(t)) : s && s.remove() }, plugin: function (t, i, r) { var a, o = t.fn.options.name; i = i || st.ui, r = r || "", i[o] = t, i.roles[o.toLowerCase()] = t, a = "getKendo" + r + o, o = "kendo" + r + o, e.fn[o] = function (i) { var r, a = this; return typeof i === wt ? (r = Et.call(arguments, 1), this.each(function () { var t, s, l = e.data(this, o); if (!l) throw Error(st.format("Cannot call method '{0}' of {1} before it is initialized", i, o)); if (t = l[i], typeof t !== kt) throw Error(st.format("Cannot find method '{0}' of {1}", i, o)); return s = t.apply(l, r), s !== n ? (a = s, !1) : n })) : this.each(function () { new t(this, i) }), a }, e.fn[a] = function () { return this.data(o) } } }), J = { bind: e.noop }, X = G.extend({ init: function (e, t) { G.fn.init.call(this, e, t), this.element.autoApplyNS(), this.wrapper = this.element }, destroy: function () { G.fn.destroy.call(this), this.element.kendoDestroy() }, options: { prefix: "Mobile" }, events: [], view: function () { var e = this.element.closest(st.roleSelector("view splitview modalview")); return st.widgetInstance(e, st.mobile.ui) }, container: function () { var e = this.element.closest(st.roleSelector("view layout modalview")); return st.widgetInstance(e, st.mobile.ui) || J } }), lt(st.mobile, { init: function (e) { st.init(e, st.mobile.ui, st.ui, st.dataviz.ui) }, ui: { Widget: X, roles: {}, plugin: function (e) { st.ui.plugin(e, st.mobile.ui, "Mobile") } } }), st.touchScroller = function (t, n) { return e(t).map(function (t, i) { return i = e(i), mt.kineticScrollNeeded && st.mobile.ui.Scroller && !i.data("kendoMobileScroller") ? (i.kendoMobileScroller(n), i.data("kendoMobileScroller")) : !1 })[0] }, st.preventDefault = function (e) { e.preventDefault() }, st.widgetInstance = function (e, t) { var i = t.roles[e.data(st.ns + "role")]; return i ? e.data("kendo" + i.fn.options.prefix + i.fn.options.name) : n }, st.onResize = function (t) { var n = t; mt.mobileOS.android && (n = function () { setTimeout(t, 200) }), e(window).on(mt.resize, n) }, st.attrValue = function (e, t) { return e.data(st.ns + t) }, st.days = { Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday: 6 }, e.extend(e.expr[":"], { focusable: function (t) { var n = e.attr(t, "tabindex"); return x(t, !isNaN(n) && n > -1) } }), Z = ["mousedown", "mousemove", "mouseenter", "mouseleave", "mouseover", "mouseout", "mouseup", "click"], et = "label, input, [data-rel=external]", tt = { setupMouseMute: function () { var t, n = 0, i = Z.length, r = document.documentElement; if (!tt.mouseTrap && mt.eventCapture) for (tt.mouseTrap = !0, tt.bustClick = !1, tt.captureMouse = !1, t = function (t) { tt.captureMouse && ("click" === t.type ? tt.bustClick && !e(t.target).is(et) && (t.preventDefault(), t.stopPropagation()) : t.stopPropagation()) }; i > n; n++) r.addEventListener(Z[n], t, !0) }, muteMouse: function (e) { tt.captureMouse = !0, e.data.bustClick && (tt.bustClick = !0), clearTimeout(tt.mouseTrapTimeoutID) }, unMuteMouse: function () { clearTimeout(tt.mouseTrapTimeoutID), tt.mouseTrapTimeoutID = setTimeout(function () { tt.captureMouse = !1, tt.bustClick = !1 }, 400) } }, nt = { down: "touchstart mousedown", move: "mousemove touchmove", up: "mouseup touchend touchcancel", cancel: "mouseleave touchcancel" }, mt.touch && (mt.mobileOS.ios || mt.mobileOS.android) && (nt = { down: "touchstart", move: "touchmove", up: "touchend touchcancel", cancel: "touchcancel" }), mt.pointers && (nt = { down: "MSPointerDown", move: "MSPointerMove", up: "MSPointerUp", cancel: "MSPointerCancel MSPointerLeave" }, e.each({ MSPointerEnter: "MSPointerOver", MSPointerLeave: "MSPointerOut" }, function (t, n) { 11 e.event.special[t] = { delegateType: n, bindType: n, handle: function (t) { 12 var i, r = this, a = t.relatedTarget, o = t.handleObj; 13 return (!a || a !== r && !e.contains(r, a)) && (t.type = o.origType, i = o.handler.apply(this, arguments), t.type = n), i 14 } 15 } 16 })), it = function (e) { return nt[e] || e }, rt = /([^ ]+)/g, st.applyEventMap = function (e, t) { return e = e.replace(rt, it), t && (e = e.replace(rt, "$1." + t)), e }, at = e.fn.on, lt(!0, T, e), T.fn = T.prototype = new e, T.fn.constructor = T, T.fn.init = function (t, n) { return n && n instanceof e && !(n instanceof T) && (n = T(n)), e.fn.init.call(this, t, n, ot) }, T.fn.init.prototype = T.fn, ot = T(document), lt(T.fn, { handler: function (e) { return this.data("handler", e), this }, autoApplyNS: function (e) { return this.data("kendoNS", e || st.guid()), this }, on: function () { var e, t, n, i, r, a, o = this, s = o.data("kendoNS"); return 1 === arguments.length ? at.call(o, arguments[0]) : (e = o, t = Et.call(arguments), typeof t[t.length - 1] === St && t.pop(), n = t[t.length - 1], i = st.applyEventMap(t[0], s), mt.mouseAndTouchPresent && i.search(/mouse|click/) > -1 && this[0] !== document.documentElement && (tt.setupMouseMute(), r = 2 === t.length ? null : t[1], a = i.indexOf("click") > -1 && i.indexOf("touchend") > -1, at.call(this, { touchstart: tt.muteMouse, touchend: tt.unMuteMouse }, r, { bustClick: a })), typeof n === wt && (e = o.data("handler"), n = e[n], t[t.length - 1] = function (t) { n.call(e, t) }), t[0] = i, at.apply(o, t), o) }, kendoDestroy: function (e) { return e = e || this.data("kendoNS"), e && this.off("." + e), this } }), st.jQuery = T, st.eventMap = nt 17})(jQuery, eval), "undefined" == typeof kendo_module && (kendo_module = function () { }), function (e) { var t = window.kendo, n = t.support, i = window.location, r = window.history, a = 50, o = /^#*/, s = window.document, l = t.Observable.extend({ start: function (e) { var t = this; if (e = e || {}, t.bind(["change"], e), !t._started) { if (t._started = !0, t._pushStateRequested = !!e.pushState, t._pushState = n.pushState && t._pushStateRequested, t.root = e.root || "/", t._interval = 0, t._normalizeUrl()) return !0; t.current = t._currentLocation(), t._listenToLocationChange() } }, stop: function () { e(window).unbind(".kendo"), this.unbind("change"), clearInterval(this._interval), this._started = !1 }, change: function (e) { this.bind("change", e) }, navigate: function (e, t) { var n = this; return "#:back" === e ? (r.back(), undefined) : (e = e.replace(o, ""), n.current !== e && n.current !== decode
17URIComponent(e) && (t || !n.trigger("change", { url: e })) && (n._pushState ? (r.pushState({}, s.title, n._makePushStateUrl(e)), n.current = e) : i.hash = n.current = e), undefined) }, _normalizeUrl: function () { var e, t = this, a = t.root == i.pathname, l = t._pushStateRequested && !n.pushState && !a, d = t._pushState && a && i.hash; return l ? (i.replace(t.root + "#" + t._stripRoot(i.pathname)), !0) : d ? (e = t._makePushStateUrl(i.hash.replace(o, "")), r.replaceState({}, s.title, e), !1) : !1 }, _listenToLocationChange: function () { var t = this, i = e.proxy(t._checkUrl, t); this._pushState ? e(window).bind("popstate.kendo", i) : n.hashChange ? e(window).bind("hashchange.kendo", i) : t._interval = setInterval(i, a) }, _checkUrl: function () { var e = this, t = e._currentLocation().replace(o, ""); if (e.current !== t && e.current !== decodeURIComponent(t)) return e.trigger("change", { url: t }) ? (r.back(), undefined) : (e.current = t, undefined) }, _stripRoot: function (e) { var t = this; return 0 === e.indexOf(t.root) ? ("/" + e.substr(t.root.length)).replace(/\/\//g, "/") : e }, _makePushStateUrl: function (e) { var t = this; return 0 !== e.indexOf(t.root) && (e = (t.root + e).replace(/\/\//g, "/")), i.protocol + "//" + i.host + e }, _currentLocation: function () { var e, t = this; return t._pushState ? (e = i.pathname, i.search && (e += i.search), t._stripRoot(e)) : i.hash.replace(o, "") } }); t.history = new l } (window.kendo.jQuery), function () { function e(e, t) { return t ? e : "([^/]+)" } function t(t) { return RegExp("^" + t.replace(u, "\\$&").replace(l, "(?:$1)?").replace(d, e).replace(c, "(.*?)") + "$") } var n = window.kendo, i = n.history, r = n.Observable, a = "init", o = "routeMissing", s = "change", l = /\((.*?)\)/g, d = /(\(\?)?:\w+/g, c = /\*\w+/g, u = /[\-{}\[\]+?.,\\\^$|#\s]/g, p = n.Class.extend({ init: function (e, n) { e instanceof RegExp || (e = t(e)), this.route = e, this._callback = n }, callback: function (e) { for (var t = this.route.exec(e).slice(1), n = 0, i = t.length; i > n; n++) t[n] !== void 0 && (t[n] = decodeURIComponent(t[n])); this._callback.apply(null, t) }, worksWith: function (e) { return this.route.test(e) ? (this.callback(e), !0) : !1 } }), f = r.extend({ init: function (e) { r.fn.init.call(this), this.routes = [], this.bind([a, o, s], e) }, destroy: function () { i.unbind("change", this._urlChangedProxy), this.unbind() }, start: function () { var e, t = this, n = function (e) { t._urlChanged(e) }; i.start({ change: n }), e = { url: i.current || "/" }, t.trigger(a, e) || t._urlChanged(e), this._urlChangedProxy = n }, route: function (e, t) { this.routes.push(new p(e, t)) }, navigate: function (e, t) { n.history.navigate(e, t) }, _urlChanged: function (e) { var t, n, i, r, a = e.url; if (a || (a = "/"), this.trigger(s, { url: e.url })) return e.preventDefault(), void 0; for (n = 0, i = this.routes, r = i.length; r > n; n++) if (t = i[n], t.worksWith(a)) return; this.trigger(o, { url: a }) && e.preventDefault() } }); n.Router = f } (), function (e) { var t = window.kendo, n = t.Observable, i = "SCRIPT", r = "init", a = "show", o = "hide", s = n.extend({ init: function (e, t) { var i = this; t = t || {}, n.fn.init.call(i), i.content = e, i.tagName = t.tagName || "div", i.model = t.model, i._wrap = t.wrap !== !1, i.bind([r, a, o], t) }, render: function (n) { var i = this, o = !i.element; return o && (i.element = i._createElement()), n && e(n).append(i.element), o && (t.bind(i.element, i.model), this.trigger(r)), n && i.trigger(a), i.element }, hide: function () { this.element.detach(), this.trigger(o) }, destroy: function () { this.element && (t.unbind(this.element), this.element.remove()) }, _createElement: function () { var t, n, r = this; return n = e(document.getElementById(r.content) || r.content), t = e("<" + r.tagName + " />").append(n[0].tagName === i ? n.html() : n), r._wrap || (t = t.contents()), t } }), l = s.extend({ init: function (e, t) { s.fn.init.call(this, e, t), this.regions = {} }, showIn: function (e, t) { var n = this.regions[e]; n && n.hide(), t.render(this.render().find(e), n), this.regions[e] = t } });
17 t.Layout = l, t.View = s } (window.kendo.jQuery), function (e, t) { function n(e) { return parseInt(e, 10) } function i(e, t) { return n(e.css(t)) } function r(e) { var t = e.effects; return "zoom" === t && (t = "zoom:in fade:in"), "fade" === t && (t = "fade:in"), "slide" === t && (t = "tile:left"), /^slide:(.+)$/.test(t) && (t = "tile:" + RegExp.$1), "overlay" === t && (t = "slideIn:left"), /^overlay:(.+)$/.test(t) && (t = "slideIn:" + RegExp.$1), e.effects = C.parseEffects(t), e } function a(e) { var t, n = []; for (t in e) n.push(t); return n } function o(e) { for (var t in e)-1 != W.indexOf(t) && -1 == U.indexOf(t) && delete e[t]; return e } function s(e, t) { var n, i, r, a, o = [], s = {}; for (i in t) n = i.toLowerCase(), a = I && -1 != W.indexOf(n), !E.hasHW3D && a && -1 == U.indexOf(n) ? delete t[i] : (r = t[i], a ? o.push(i + "(" + r + ")") : s[i] = r); return o.length && (s[ot] = o.join(" ")), s } function l(e, t) { var i, r, a; return I ? (i = e.css(ot), i == Y ? "scale" == t ? 1 : 0 : (r = i.match(RegExp(t + "\\s*\\(([\\d\\w\\.]+)")), a = 0, r ? a = n(r[1]) : (r = i.match(O) || [0, 0, 0, 0, 0], t = t.toLowerCase(), P.test(t) ? a = parseFloat(r[3] / r[2]) : "translatey" == t ? a = parseFloat(r[4] / r[2]) : "scale" == t ? a = parseFloat(r[2]) : "rotate" == t && (a = parseFloat(Math.atan2(r[2], r[1])))), a)) : parseFloat(e.css(t)) } function d(e) { return e.charAt(0).toUpperCase() + e.substring(1) } function c(e, t) { var n = g.extend(t), i = n.prototype.directions; T[d(e)] = n, T.Element.prototype[e] = function (e, t, i, r) { return new n(this.element, e, t, i, r) }, S(i, function (t, i) { T.Element.prototype[e + d(i)] = function (e, t, r) { return new n(this.element, i, e, t, r) } }) } function u(e, t, n) { c(e, { directions: v, restore: [t], startValue: function (e) { return this._startValue = e, this }, endValue: function (e) { return this._endValue = e, this }, shouldHide: function () { return "out" === this._direction && this._end() === n ? !this._reverse : this._reverse }, _end: function () { return this._endValue || n }, _start: function () { return this._startValue || 1 }, prepare: function (e, n) { var i = this, r = i.element.data(t), a = i.shouldHide(), o = isNaN(r) || "" === r ? i._start() : r; e[t] = n[t] = i._end(), a ? e[t] = o : n[t] = o } }) } function p(e, t) { var n = C.directions[t].vertical, i = e[n ? X : J]() / 2 + "px"; return b[t].replace("$size", i) } var f, h, g, m, v, _, b, k, w, y, x, C = window.kendo, T = C.effects, S = e.each, F = e.extend, D = e.proxy, E = C.support, A = E.browser, I = E.transforms, H = E.transitions, N = { scale: 0, scalex: 0, scaley: 0, scale3d: 0 }, R = { translate: 0, translatex: 0, translatey: 0, translate3d: 0 }, z = document.documentElement.style.zoom !== t && !I, O = /matrix3?d?\s*\(.*,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?,\s*([\d\.\-]+)\w*?/i, M = /^(-?[\d\.\-]+)?[\w\s]*,?\s*(-?[\d\.\-]+)?[\w\s]*/i, P = /translatex?$/i, B = /(zoom|fade|expand)(\w+)/, L = /(zoom|fade|expand)/, V = /[xy]$/i, W = ["perspective", "rotate", "rotatex", "rotatey", "rotatez", "rotate3d", "scale", "scalex", "scaley", "scalez", "scale3d", "skew", "skewx", "skewy", "translate", "translatex", "translatey", "translatez", "translate3d", "matrix", "matrix3d"], U = ["rotate", "scale", "scalex", "scaley", "skew", "skewx", "skewy", "translate", "translatex", "translatey", "matrix"], q = { rotate: "deg", scale: "", skew: "px", translate: "px" }, j = I.css, G = Math.round, $ = "", K = "px", Y = "none", Q = "auto", J = "width", X = "height", Z = "hidden", et = "origin", tt = "abortId", nt = "overflow", it = "translate", rt = "completeCallback", at = j + "transition", ot = j + "transform", st = j + "backface-visibility", lt = j + "perspective", dt = "1500px", ct = "perspective(" + dt + ")", ut = { left: { reverse: "right", property: "left", transition: "translatex", vertical: !1, modifier: -1 }, right: { reverse: "left", property: "left", transition: "translatex", vertical: !1, modifier: 1 }, down: { reverse: "up", property: "top", transition: "translatey", vertical: !0, modifier: 1 }, up: { reverse: "down", property: "top", transition: "translatey", vertical: !0, modifier: -1 }, top: { reverse: "bottom" }, bottom: { reverse: "top" }, "in": { reverse: "out", modifier: -1 }, out: { reverse: "in", modifier: 1 }, vertical: { reverse: "vertical" }, horizontal: { reverse: "horizontal"} }; C.directions = ut, F(e.fn, { kendoStop: function (e, t) { return H ? T.stopQueue(this, e || !1, t || !1) : this.stop(e, t) } }), I && !H && (S(U, function (n, i) { e.fn[i] = function (n) { if (n === t) return l(this, i); var r = e(this)[0], a = i + "(" + n + q[i.replace(V, "")] + ")"; return -1 == r.style.cssText.indexOf(ot) ? e(this).css(ot, a) : r.style.cssText = r.style.cssText.replace(RegExp(i + "\\(.*?\\)", "i"), a), this }, e.fx.step[i] = function (t) { e(t.elem)[i](t.now) } }), f = e.fx.prototype.cur, e.fx.prototype.cur = function () { return -1 != U.indexOf(this.prop) ? parseFloat(e(this.elem)[this.prop]()) : f.apply(this, arguments) }), C.toggleClass = function (e, t, n, i) { return t && (t = t.split(" "), H && (n = F({ exclusive: "all", duration: 400, ease: "ease-out" }, n), e.css(at, n.exclusive + " " + n.duration + "ms " + n.ease), setTimeout(function () { e.css(at, "").css(X) }, n.duration)), S(t, function (t, n) { e.toggleClass(n, i) })), e }, C.parseEffects = function (e, t) { var n = {}; return "string" == typeof e ? S(e.split(" "), function (e, i) { var r = !L.test(i), a = i.replace(B, function (e, t, n) { return t + ":" + n.toLowerCase() }), o = a.split(":"), s = o[1], l = {}; o.length > 1 && (l.direction = t && r ? ut[s].reverse : s), n[o[0]] = l }) : S(e, function (e) { var i = this.direction; i && t && !L.test(e) && (this.direction = ut[i].reverse), n[e] = this }), n }, H && F(T, { transition: function (t, n, i) { var r, o, l, d, c = 0, u = t.data("keys") || []; i = F({ duration: 200, ease: "ease-out", complete: null, exclusive: "all" }, i), l = !1, d = function () { l || (l = !0, o && (clearTimeout(o), o = null), t.removeData(tt).dequeue().css(at, "").css(at), i.complete.call(t)) }, i.duration = e.fx ? e.fx.speeds[i.duration] || i.duration : i.duration, r = s(t, n), e.merge(u, a(r)), t.data("keys", e.unique(u)).height(), t.css(at, i.exclusive + " " + i.duration + "ms " + i.ease).css(at), t.css(r).css(ot), H.event && (t.one(H.event, d), 0 !== i.duration && (c = 500)), o = setTimeout(d, i.duration + c), t.data(tt, o), t.data(rt, d) }, stopQueue: function (e, t, n) { var i, r = e.data("keys"), a = !n && r, o = e.data(rt); return a && (i = C.getComputedStyles(e[0], r)), o && o(), a && e.css(i), e.removeData("keys").stop(t) } }), h = C.Class.extend({ init: function (e, t) { var n = this; n.element = e, n.effects = [], n.options = t, n.restore = [] }, run: function (t) { var n, i, r, a, l, d, c, u = this, p = t.length, f = u.element, h = u.options, g = e.Deferred(), m = {}, v = {}; for (u.effects = t, g.then(e.proxy(u, "complete")), f.data("animating", !0), i = 0; p > i; i++) for (n = t[i], n.setReverse(h.reverse), n.setOptions(h), u.addRestoreProperties(n.restore), n.prepare(m, v), l = n.children(), r = 0, d = l.length; d > r; r++) l[r].duration(h.duration).run(); for (c in h.effects) F(v, h.effects[c].properties); for (f.is(":visible") || F(m, { display: f.data("olddisplay") || "block" }), I && !h.reset && (a = f.data("targetTransform"), a && (m = F(a, m))), m = s(f, m), I && !H && (m = o(m)), f.css(m).css(ot), i = 0; p > i; i++) t[i].setup(); return h.init && h.init(), f.data("targetTransform", v), T.animate(f, v, F({}, h, { complete: g.resolve })), g.promise() }, stop: function () { e(this.element).kendoStop(!0, !0) }, addRestoreProperties: function (e) { for (var t, n = this.element, i = 0, r = e.length; r > i; i++) t = e[i], this.restore.push(t), n.data(t) || n.data(t, n.css(t)) }, restoreCallback: function () { var e, t, n, i = this.element; for (e = 0, t = this.restore.length; t > e; e++) n = this.restore[e], i.css(n, i.data(n)) }, complete: function () { var t = this, n = 0, i = t.element, r = t.options, a = t.effects, o = a.length; for (i.removeData("animating").dequeue(), r.hide && i.data("olddisplay", i.css("display")).hide(), this.restoreCallback(), z && !I && setTimeout(e.proxy(this, "restoreCallback"), 0); o > n; n++) a[n].teardown(); r.completeCallback && r.completeCallback(i) } }), T.promise = function (e, t) { var n, i, r, a = [], o = new h(e, t), s = C.parseEffects(t.effects); t.effects = s; for (r in s) n = T[d(r)], n && (i = new n(e, s[r].direction), a.push(i)); a[0] ? o.run(a) : (e.is(":visible") || e.css({ display: e.data("olddisplay") || "block" }).css("display"), t.init && t.init(), e.dequeue(), o.complete()) }, T.transitionPromise = function (e, t, n) { return T.animateTo(e, t, n), e }, F(T, { animate: function (n, r, a) { var s = a.transition !== !1; delete a.transition, H && "transition" in T && s ? T.transition(n, r, a) : I ? n.animate(o(r), { queue: !1, show: !1, hide: !1, duration: a.duration, complete: a.complete }) : n.each(function () { var n = e(this), o = {}; S(W, function (e, a) { var s, l, d, c, u, p, f, h = r ? r[a] + " " : null; h && (l = r, a in N && r[a] !== t ? (s = h.match(M), I && F(l, { scale: +s[0] })) : a in R && r[a] !== t && (d = n.css("position"), c = "absolute" == d || "fixed" == d, n.data(it) || (c ? n.data(it, { top: i(n, "top") || 0, left: i(n, "left") || 0, bottom: i(n, "bottom"), right: i(n, "right") }) : n.data(it, { top: i(n, "marginTop") || 0, left: i(n, "marginLeft") || 0 })), u = n.data(it), s = h.match(M), s && (p = a == it + "y" ? 0 : +s[1], f = a == it + "y" ? +s[1] : +s[2], c ? (isNaN(u.right) ? isNaN(p) || F(l, { left: u.left + p }) : isNaN(p) || F(l, { right: u.right - p }), isNaN(u.bottom) ? isNaN(f) || F(l, { top: u.top + f }) : isNaN(f) || F(l, { bottom: u.bottom - f })) : (isNaN(p) || F(l, { marginLeft: u.left + p }), isNaN(f) || F(l, { marginTop: u.top + f })))), !I && "scale" != a && a in l && delete l[a], l && F(o, l)) }), A.msie && delete o.scale, n.animate(o, { queue: !1, show: !1, hide: !1, duration: a.duration, complete: a.complete }) }) }, animateTo: function (t, n, i) { function a(e) { n[0].style.cssText = "", t[0].style.cssText = "", E.mobileOS.android || l.css(nt, s), i.completeCallback && i.completeCallback.call(t, e) } var o, s, l = t.parents().filter(n.parents()).first(); i = r(i), E.mobileOS.android || (s = l.css(nt), l.css(nt, "hidden")), e.each(i.effects, function (e, t) { o = o || t.direction }), i.complete = A.msie ? function () { setTimeout(a, 0) } : a, i.previous = i.reverse ? n : t, i.reset = !0, (i.reverse ? t : n).each(function () { e(this).kendoAnimate(F(!0, {}, i)), i.complete = null, i.previous = null }) } }), g = C.Class.extend({ init: function (e, t) { var n = this; n.element = e, n._direction = t, n.options = {}, n._additionalEffects = [], n.restore || (n.restore = []) }, reverse: function () { return this._reverse = !0, this.run() }, play: function () { return this._reverse = !1, this.run() }, add: function (e) { return this._additionalEffects.push(e), this }, direction: function (e) { return this._direction = e, this }, duration: function (e) { return this._duration = e, this }, compositeRun: function () { var e = this, t = new h(e.element, { reverse: e._reverse, duration: e._duration }), n = e._additionalEffects.concat([e]); return t.run(n) }, run: function () { if (this._additionalEffects && this._additionalEffects[0]) return this.compositeRun(); var t, n, i = this, r = i.element, a = 0, l = i.restore, d = l.length, c = e.Deferred(), u = {}, p = {}, f = i.children(), h = f.length; for (c.then(e.proxy(i, "_complete")), r.data("animating", !0), a = 0; d > a; a++) t = l[a], r.data(t) || r.data(t, r.css(t)); for (a = 0; h > a; a++) f[a].duration(i._duration).run(); return i.prepare(u, p), r.is(":visible") || F(u, { display: r.data("olddisplay") || "block" }), I && (n = r.data("targetTransform"), n && (u = F(n, u))), u = s(r, u), I && !H && (u = o(u)), r.css(u).css(ot), i.setup(), r.data("targetTransform", p), T.animate(r, p, { duration: i._duration, complete: c.resolve }), c.promise() }, stop: function () { var t = 0, n = this.children(), i = n.length; for (t = 0; i > t; t++) n[t].stop(); return e(this.element).kendoStop(!0, !0), this }, restoreCallback: function () { var e, t, n, i = this.element; for (e = 0, t = this.restore.length; t > e; e++) n = this.restore[e], i.css(n, i.data(n)) }, _complete: function () { var t = this, n = t.element; n.removeData("animating").dequeue(), t.restoreCallback(), t.shouldHide() && n.data("olddisplay", n.css("display")).hide(), z && !I && setTimeout(e.proxy(t, "restoreCallback"), 0), t.teardown() }, setOptions: function (e) { F(!0, this.options, e) }, children: function () { return [] }, shouldHide: e.noop, setup: e.noop, prepare: e.noop, teardown: e.noop, directions: [], setReverse: function (e) { return this._reverse = e, this } }), m = ["left", "right", "up", "down"], v = ["in", "out"], c("slideIn", { directions: m, prepare: function (e, t) { var n, i = this, r = i.element, a = ut[i._direction], o = -a.modifier * (a.vertical ? r.outerHeight() : r.outerWidth()), s = o / (i.options && i.options.divisor || 1) + K, l = "0px"; i._reverse && (n = e, e = t, t = n), I ? (e[a.transition] = s, t[a.transition] = l) : (e[a.property] = s, t[a.property] = l) } }), c("tile", { directions: m, init: function (e, t, n) { g.prototype.init.call(this, e, t), this.options = { previous: n} }, children: function () { var e = this, t = e._reverse, n = e.options.previous, i = e._direction, r = [C.fx(e.element).slideIn(i).setReverse(t)]; return n && r.push(C.fx(n).slideIn(ut[i].reverse).setReverse(!t)), r } }), u("fade", "opacity", 0), u("zoom", "scale", .01), c("slideMargin", { prepare: function (e, t) { var n, i = this, r = i.element, a = i.options, o = r.data(et), s = a.offset, l = i._reverse; l || null !== o || r.data(et, parseFloat(r.css("margin-" + a.axis))
17), n = r.data(et) || 0, t["margin-" + a.axis] = l ? n : n + s } }), c("slideTo", { prepare: function (e, t) { var n = this, i = n.element, r = n.options, a = r.offset.split(","), o = n._reverse; I ? (t.translatex = o ? 0 : a[0], t.translatey = o ? 0 : a[1]) : (t.left = o ? 0 : a[0], t.top = o ? 0 : a[1]), i.css("left") } }), c("expand", { directions: ["horizontal", "vertical"], restore: [nt], prepare: function (e, n) { var i = this, r = i.element, a = i.options, o = i._reverse, s = "vertical" === i._direction ? X : J, l = r[0].style[s], d = r.data(s), c = parseFloat(d || l), u = G(r.css(s, Q)[s]()); e.overflow = Z, c = a && a.reset ? u || c : c || u, n[s] = (o ? 0 : c) + K, e[s] = (o ? c : 0) + K, d === t && r.data(s, l) }, shouldHide: function () { return this._reverse }, teardown: function () { var e = this, t = e.element, n = "vertical" === e._direction ? X : J, i = t.data(n); (i == Q || i === $) && setTimeout(function () { t.css(n, Q).css(n) }, 0) } }), _ = { position: "absolute", marginLeft: 0, marginTop: 0, scale: 1 }, c("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, i, r, a, o, s, d, c, u, p, f, h, g, m = this, v = m.element, b = m.options, k = m._reverse, w = b.target, y = l(v, "scale"), x = w.offset(), C = w.outerHeight() / v.outerHeight(); F(e, _), t.scale = 1, v.css(ot, "scale(1)").css(ot), n = v.offset(), v.css(ot, "scale(" + y + ")"), i = 0, r = 0, a = x.left - n.left, o = x.top - n.top, s = i + v.outerWidth(), d = r, c = a + w.outerWidth(), u = o, p = (o - r) / (a - i), f = (u - d) / (c - s), h = (r - d - p * i + f * s) / (f - p), g = r + p * (h - i), e.top = n.top, e.left = n.left, e.transformOrigin = h + K + " " + g + K, k ? e.scale = C : t.scale = C } }), b = { top: "rect(auto auto $size auto)", bottom: "rect($size auto auto auto)", left: "rect(auto $size auto auto)", right: "rect(auto auto auto $size)" }, k = { 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)"} }, c("turningPage", { directions: m, init: function (e, t, n) { g.prototype.init.call(this, e, t), this._container = n }, prepare: function (e, t) { var n = this, i = n._reverse, r = i ? ut[n._direction].reverse : n._direction, a = k[r]; e.zIndex = 1, n._clipInHalf && (e.clip = p(n._container, C.directions[r].reverse)), e[st] = Z, t[ot] = ct + (i ? a.start : a.end), e[ot] = ct + (i ? a.end : a.start) }, setup: function () { this._container.append(this.element) }, face: function (e) { return this._face = e, this }, shouldHide: function () { var e = this, t = e._reverse, n = e._face; return t && !n || !t && n }, clipInHalf: function (e) { return this._clipInHalf = e, this }, temporary: function () { return this.element.addClass("temp-page"), this } }), c("staticPage", { directions: m, init: function (e, t, n) { g.prototype.init.call(this, e, t), this._container = n }, restore: ["clip"], prepare: function (e, t) { var n = this, i = n._reverse ? ut[n._direction].reverse : n._direction; e.clip = p(n._container, i), e.opacity = .999, t.opacity = 1 }, shouldHide: function () { var e = this, t = e._reverse, n = e._face; return t && !n || !t && n }, face: function (e) { return this._face = e, this } }), c("pageturn", { directions: ["horizontal", "vertical"], init: function (e, t, n, i) { g.prototype.init.call(this, e, t), this.options = {}, this.options.face = n, this.options.back = i }, children: function () { var e, t = this, n = t.options, i = "horizontal" === t._direction ? "left" : "top", r = C.directions[i].reverse, a = t._reverse, o = n.face.clone(!0).removeAttr("id"), s = n.back.clone(!0).removeAttr("id"), l = t.element; return a && (e = i, i = r, r = e), [C.fx(n.face).staticPage(i, l).face(!0).setReverse(a), C.fx(n.back).staticPage(r, l).setReverse(a), C.fx(o).turningPage(i, l).face(!0).clipInHalf(!0).temporary().setReverse(a), C.fx(s).turningPage(r, l).clipInHalf(!0).temporary().setReverse(a)] }, prepare: function (e, t) { e[lt] = dt, e.transformStyle = "preserve-3d", e.opacity = .999, t.opacity = 1 }, teardown: function () { this.element.find(".temp-page").remove() } }), c("flip", { directions: ["horizontal", "vertical"], init: function (e, t, n, i) { g.prototype.init.call(this, e, t), this.options = {}, this.options.face = n, this.options.back = i }, children: function () { var e, t = this, n = t.options, i = "horizontal" === t._direction ? "left" : "top", r = C.directions[i].reverse, a = t._reverse, o = t.element; return a && (e = i, i = r, r = e), [C.fx(n.face).turningPage(i, o).face(!0).setReverse(a), C.fx(n.back).turningPage(r, o).setReverse(a)] }, prepare: function (e) { e[lt] = dt, e.transformStyle = "preserve-3d" } }), w = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function (e) { setTimeout(e, 1e3 / 60) }
17, y = C.Class.extend({ init: function () { var e = this; e._tickProxy = D(e._tick, e), e._started = !1 }, tick: e.noop, done: e.noop, onEnd: e.noop, onCancel: e.noop, start: function () { this.done() || (this._started = !0, w(this._tickProxy)) }, cancel: function () { this._started = !1, this.onCancel() }, _tick: function () { var e = this; e._started && (e.tick(), e.done() ? (e._started = !1, e.onEnd()) : w(e._tickProxy)) } }), x = y.extend({ init: function (e) { var t = this; F(t, e), y.fn.init.call(t) }, done: function () { return this.timePassed() >= this.duration }, timePassed: function () { return Math.min(this.duration, Date.now() - this.startDate) }, moveTo: function (e) { var t = this, n = t.movable; t.initial = n[t.axis], t.delta = e.location - t.initial, t.duration = e.duration || 300, t.tick = t._easeProxy(e.ease), t.startDate = Date.now(), t.start() }, _easeProxy: function (e) { var t = this; return function () { t.movable.moveAxis(t.axis, e(t.timePassed(), t.initial, t.delta, t.duration)) } } }), F(x, { easeOutExpo: function (e, t, n, i) { return e == i ? t + n : n * (-Math.pow(2, -10 * e / i) + 1) + t }, easeOutBack: function (e, t, n, i, r) { return r = 1.70158, n * ((e = e / i - 1) * e * ((r + 1) * e + r) + 1) + t } }), T.Animation = y, T.Transition = x, T.createEffect = c } (window.kendo.jQuery), function (e, t) { function n(r) { var o, s, l, d, c, u, p, f, h = [], g = r.logic || "and", m = r.filters; for (o = 0, s = m.length; s > o; o++) r = m[o], l = r.field, p = r.value, u = r.operator, r.filters ? r = n(r) : (f = r.ignoreCase, l = l.replace(/\./g, "/"), r = a[u], r && p !== t && (d = e.type(p), "string" === d ? (c = "'{1}'", p = p.replace(/'/g, "''"), f === !0 && (l = "tolower(" + l + ")")) : c = "date" === d ? "datetime'{1:yyyy-MM-ddTHH:mm:ss}'" : "{1}", r.length > 3 ? "substringof" !== r ? c = "{0}({2}," + c + ")" : (c = "{0}(" + c + ",{2})", "doesnotcontain" === u && (c += " eq false")) : c = "{2} {0} " + c, r = i.format(c, r, p, l))), h.push(r); return r = h.join(" " + g + " "), h.length > 1 && (r = "(" + r + ")"), r } var i = window.kendo, r = e.extend, a = { eq: "eq", neq: "ne", gt: "gt", gte: "ge", lt: "lt", lte: "le", contains: "substringof", doesnotcontain: "substringof", endswith: "endswith", startswith: "startswith" }, o = { pageSize: e.noop, page: e.noop, filter: function (e, t) { t && (e.$filter = n(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) } }, s = { read: { dataType: "jsonp"} }; r(!0, i.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) { var n, r, a, l; if (e = e || {}, t = t || "read", l = (this.options || s)[t], l = l ? l.dataType : "json", "read" === t) { n = { $inlinecount: "allpages" }, "json" != l && (n.$format = "json"); for (a in e) o[a] ? o[a](n, e[a]) : n[a] = e[a] } else { if ("json" !== l) throw Error("Only json dataType can be used for " + t + " operation."); if ("destroy" !== t) { for (a in e) r = e[a], "number" == typeof r && (e[a] = r + ""); n = i.stringify(e) } } return n } }} }) } (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = e.isArray, r = e.isPlainObject, a = e.map, o = e.each, s = e.extend, l = n.getter, d = n.Class, c = d.extend({ init: function (e) { var t, l, d, c = this, u = e.total, p = e.model, f = e.parse, h = e.errors, g = e.data; p && (r(p) && (p.fields && o(p.fields, function (e, t) { t = r(t) && t.field ? s(t, { field: c.getter(t.field) }) : { field: c.getter(t) }, p.fields[e] = t }), t = p.id, t && (l = {}, l[c.xpathToMember(t, !0)] = { field: c.getter(t) }, p.fields = s(l, p.fields), p.id = c.xpathToMember(t)), p = n.data.Model.define(p)), c.model = p), u && ("string" == typeof u ? (u = c.getter(u), c.total = function (e) { return parseInt(u(e), 10) }) : "function" == typeof u && (c.total = u)), h && ("string" == typeof h ? (h = c.getter(h), c.errors = function (e) { return h(e) || null }) : "function" == typeof h && (c.errors = h)), g && ("string" == typeof g ? (g = c.xp
17athToMember(g), c.data = function (e) { var t, n = c.evaluate(e, g); return n = i(n) ? n : [n], c.model && p.fields ? (t = new c.model, a(n, function (e) { if (e) { var n, i = {}; for (n in p.fields) i[n] = t._parse(n, p.fields[n].field(e)); return i } })) : n }) : "function" == typeof g && (c.data = g)), "function" == typeof f && (d = c.parse, c.parse = function (e) { var t = f.call(c, e); return d.call(c, t) }) }, total: function (e) { return this.data(e).length }, errors: function (e) { return e ? e.errors : null }, parseDOM: function (e) { var n, r, a, o, s, l, d, c = {}, u = e.attributes, p = u.length; for (d = 0; p > d; d++) l = u[d], c["@" + l.nodeName] = l.nodeValue; for (r = e.firstChild; r; r = r.nextSibling) a = r.nodeType, 3 === a || 4 === a ? c["#text"] = r.nodeValue : 1 === a && (n = this.parseDOM(r), o = r.nodeName, s = c[o], i(s) ? s.push(n) : s = s !== t ? [s, n] : n, c[o] = s); return c }, evaluate: function (e, t) { for (var n, r, a, o, s, l = t.split("."); n = l.shift(); ) if (e = e[n], i(e)) { for (r = [], t = l.join("."), s = 0, a = e.length; a > s; s++) o = this.evaluate(e[s], t), o = i(o) ? o : [o], r.push.apply(r, o); return r } return e }, parse: function (t) { var n, i, r = {}; return n = t.documentElement || e.parseXML(t).documentElement, i = this.parseDOM(n), r[n.nodeName] = i, r }, xpathToMember: function (e, t) { return e ? (e = e.replace(/^\//, "").replace(/\//g, "."), e.indexOf("@") >= 0 ? e.replace(/\.?(@.*)/, t ? "$1" : '["$1"]') : e.indexOf("text()") >= 0 ? e.replace(/(\.?text\(\))/, t ? "#text" : '["#text"]') : e) : "" }, getter: function (e) { return l(this.xpathToMember(e), !0) } }); e.extend(!0, n.data, { XmlDataReader: c, readers: { xml: c} }) } (window.kendo.jQuery), function (e, t) { 18 function n(e, t, n, i) { return function (r) { var a, o = {}; for (a in r) o[a] = r[a]; o.field = i ? n + "." + r.field : n, e.trigger(t, o) } } function i(t, n) { if (t === n) return !0; var r, a = e.type(t), o = e.type(n); if (a !== o) return !1; if ("date" === a) return t.getTime() === n.getTime(); if ("object" !== a && "array" !== a) return !1; for (r in t) if (!i(t[r], n[r])) return !1; return !0 } function r(e, t) { var n, i; for (i in e) { if (n = e[i], K(n) && n.field && n.field === t) return n; if (n === t) return n } return null } function a(e) { this.data = e || [] } function o(e, n) { if (e) { var i = typeof e === rt ? { field: e, dir: n} : e, r = Q(i) ? i : i !== t ? [i] : []; return J(r, function (e) { return !!e.dir }) } } function s(e) { var t, n, i, r, a = e.filters; if (a) for (t = 0, n = a.length; n > t; t++) i = a[t], r = i.operator, r && typeof r === rt && (i.operator = z[r.toLowerCase()] || r), s(i) } function l(e) { return e && !Y(e) ? ((Q(e) || !e.filters) && (e = { logic: "and", filters: Q(e) ? e : [e] }), s(e), e) : t } function d(e) { return Q(e) ? e : [e] } function c(e, n) { var i = typeof e === rt ? { field: e, dir: n} : e, r = Q(i) ? i : i !== t ? [i] : []; return I(r, function (e) { return { field: e.field, dir: e.dir || "asc", aggregates: e.aggregates} }) } function u(e, t) { return e && e.getTime && t && t.getTime ? e.getTime() === t.getTime() : e === t } function p(e, t, n, i, r) { var a, o, s, l, d; for (t = t || [], l = t.length, a = 0; l > a; a++) o = t[a], s = o.aggregate, d = o.field, e[d] = e[d] || {}, e[d][s] = O[s.toLowerCase()](e[d][s], n, tt.accessor(d), i, r) } function f(e) { var t, n = e.length, i = Array(n); for (t = 0; n > t; t++) i[t] = e[t].toJSON(); return i } function h(e, t) { t = t || {}; var n = new a(e), i = t.aggregate, r = t.filter; return r && (n = n.filter(r)), n.aggregate(i) } function g(e, t, n) { var i, r, a, o; for (a = 0, o = e.length; o > a; a++) { i = e[a]; for (r in t) i[r] = n._parse(r, t[r](i)) } } function m(e, t, n) { var i, r, a; for (r = 0, a = e.length; a > r; r++) i = e[r], i.value = n._parse(i.field, i.value), i.hasSubgroups ? m(i.items, t, n) : g(i.items, t, n) } function v(e, t, n, i) { return function (r) { return r = e(r), r && !Y(i) && ("[object Array]" === Et.call(r) || r instanceof Rt || (r = [r]), n(r, i, new t)), r || [] } } function _(e, t, n, i) { for (var r, a, o = 0; t.length && i && (r = t[o], a = r.items, e && e.field === r.field && e.value === r.value ? (e.hasSubgroups && e.items.length ? _(e.items[e.items.length - 1], r.items, n, i) : (a = a.slice(n, i), i -= a.length, e.items = e.items.concat(a)), t.splice(o--, 1)) : (a = a.slice(n, i), i -= a.length, r.items = a, r.items.length || t.splice(o--, 1)), n = 0, !(++o >= t.length)); ); } function b(e) { var t, n, i = []; for (t = 0, n = e.length; n > t; t++) i = e[t].hasSubgroups ? i.concat(b(e[t].items)) : i.concat(e[t].items.slice()); return i } function k(e, t) { var n, i, r, a; if (t) for (n = 0, i = e.length; i > n; n++) r = e[n], a = r.items, r.hasSubgroups ? k(a, t) : !a.length || a[0] instanceof t || (a.type = t, a.wrapAll(a, a)) } function w(e, t) { var n, i; for (n = 0, i = e.length; i > n; n++) if (e[n].hasSubgroups) { if (w(e[n].items, t)) return !0 } else if (t(e[n].items, e[n])) return !0 } function y(e, t) { var n, i; for (n = 0, i = e.length; i > n; n++) if (e[n].uid == t.uid) return t = e[n], e.splice(n, 1), t } function x(e, t) { var n, i, r, a; for (r = e.length - 1, a = 0; r >= a; r--) i = e[r], n = { value: t.get(i.field), field: i.field, items: n ? [n] : [t], hasSubgroups: !!n, aggregates: {} }; return n } function C(e, t) { return t ? S(e, function (e) { return e[t.idField] === t.id }) : -1 } function T(e, t) { return t ? S(e, function (e) { return e.uid == t.uid }) : -1 } function S(e, t) { var n, i; for (n = 0, i = e.length; i > n; n++) if (t(e[n])) return n; return -1 } function F(t, n) { var i, r, a, o, s, l = e(t)[0].children, d = [], c = n[0], u = n[1]; for (i = 0, r = l.length; r > i; i++) a = {}, s = l[i], s.disabled || (a[c.field] = s.text, o = s.attributes.value, o = o && o.specified ? s.value : s.text, a[u.field] = o, d.push(a)); return d } function D(t, n) { var i, r, a, o, s, l, d, c = e(t)[0].tBodies[0], u = c ? c.rows : [], p
18= n.length, f = []; for (i = 0, r = u.length; r > i; i++) { for (s = {}, d = !0, o = u[i].cells, a = 0; p > a; a++) l = o[a], "th" !== l.nodeName.toLowerCase() && (d = !1, s[n[a].field] = l.innerHTML); d || f.push(s) } return f } function E(e) { return function () { var t = this._data, n = V.fn[e].apply(this, Ft.call(arguments)); return this._data != t && this._attachBubbleHandlers(), n } } function A(t, n) { var i, r, a, o, s, l, d, c, u = e(t).children(), p = [], f = n[0].field, h = n[1] && n[1].field, g = n[2] && n[2].field, m = n[3] && n[3].field; for (i = 0, r = u.length; r > i; i++) a = { _loaded: !0 }, o = u.eq(i), l = o[0].firstChild, c = o.children(), t = c.filter("ul"), c = c.filter(":not(ul)"), s = o.attr("data-id"), s && (a.id = s), l && (a[f] = 3 == l.nodeType ? l.nodeValue : c.text()), h && (a[h] = c.find("a").attr("href")), m && (a[m] = c.find("img").attr("src")), g && (d = c.find(".k-sprite").prop("className"), a[g] = d && e.trim(d.replace("k-sprite", ""))), t.length && (a.items = A(t.eq(0), n)), "true" == o.attr("data-hasChildren") && (a.hasChildren = !0), p.push(a); return p } var I, H, N, R, z, O, M, P, B, L, V, W, U, q, j = e.extend, G = e.proxy, $ = e.isFunction, K = e.isPlainObject, Y = e.isEmptyObject, Q = e.isArray, J = e.grep, X = e.ajax, Z = e.each, et = e.noop, tt = window.kendo, nt = tt.Observable, it = tt.Class, rt = "string", at = "function", ot = "create", st = "read", lt = "update", dt = "destroy", ct = "change", ut = "sync", pt = "get", ft = "error", ht = "requestStart", gt = "progress", mt = "requestEnd", vt = [ot, st, lt, dt], _t = function (e) { return e }, bt = tt.getter, kt = tt.stringify, wt = Math, yt = [].push, xt = [].join, Ct = [].pop, Tt = [].splice, St = [].shift, Ft = [].slice, Dt = [].unshift, Et = {}.toString, At = tt.support.stableSort, It = /^\/Date\((.*?)\)\/$/, Ht = /(\r+|\n+)/g, Nt = /(?=['\\])/g, Rt = nt.extend({ init: function (e, t) { var n = this; n.type = t || zt, nt.fn.init.call(n), n.length = e.length, n.wrapAll(e, n) }, toJSON: function () { var e, t, n = this.length, i = Array(n); for (e = 0; n > e; e++) t = this[e], t instanceof zt && (t = t.toJSON()), i[e] = t; return i }, parent: et, wrapAll: function (e, t) { 19 var n, i, r = this, a = function () { 20 return r 21 }; for (t = t || [], n = 0, i = e.length; i > n; n++) t[n] = r.wrap(e[n], a); return t 22 }, wrap: function (e, t) { var n, i = this; return null !== e && "[object Object]" === Et.call(e) && (n = e instanceof i.type || e instanceof Pt, n || (e = e instanceof zt ? e.toJSON() : e, e = new i.type(e)), e.parent = t, e.bind(ct, function (e) { i.trigger(ct, { field: e.field, node: e.node, index: e.index, items: e.items || [this], action: e.node ? e.action || "itemchange" : "itemchange" }) })), e }, push: function () { var e, t = this.length, n = this.wrapAll(arguments); return e = yt.apply(this, n), this.trigger(ct, { action: "add", index: t, items: n }), e }, slice: Ft, join: xt, pop: function () { var e = this.length, t = Ct.apply(this); return e && this.trigger(ct, { action: "remove", index: e - 1, items: [t] }), t }, splice: function (e, t, n) { var i, r, a, o = this.wrapAll(Ft.call(arguments, 2)); if (i = Tt.apply(this, [e, t].concat(o)), i.length) for (this.trigger(ct, { action: "remove", index: e, items: i }), r = 0, a = i.length; a > r; r++) i[r].children && i[r].unbind(ct); return n && this.trigger(ct, { action: "add", index: e, items: o }), i }, shift: function () { var e = this.length, t = St.apply(this); return e && this.trigger(ct, { action: "remove", index: 0, items: [t] }), t }, unshift: function () { var e, t = this.wrapAll(arguments); return e = Dt.apply(this, t), this.trigger(ct, { action: "add", index: 0, items: t }), e }, indexOf: function (e) { var t, n, i = this; for (t = 0, n = i.length; n > t; t++) if (i[t] === e) return t; return -1 }, forEach: function (e) { for (var t = 0, n = this.length; n > t; t++) e(this[t], t, this) }, map: function (e) { for (var t = 0, n = [], i = this.length; i > t; t++) n[t] = e(this[t], t, this); return n }, filter: function (e) { for (var t, n = 0, i = [], r = this.length; r > n; n++) t = this[n], e(t, n, this) && (i[i.length] = t); return i }, find: function (e) { for (var t, n = 0, i = this.length; i > n; n++) if (t = this[n], e(t, n, this)) return t }, every: function (e) { for (var t, n = 0, i = this.length; i > n; n++) if (t = this[n], !e(t, n, this)) return !1; return !0 }, some: function (e) { for (var t, n = 0, i = this.length; i > n; n++) if (t = this[n], e(t, n, this)) return !0; return !1 }, remove: function (e) { this.splice(this.indexOf(e), 1) } 23 }), zt = nt.extend({ init: function (e) { var t, n, i = this, r = function () { return i }; nt.fn.init.call(this); for (n in e) t = e[n], "_" != n.charAt(0) && (t = i.wrap(t, n, r)), i[n] = t; i.uid = tt.guid() }, shouldSerialize: function (e) { return this.hasOwnProperty(e) && "_events" !== e && typeof this[e] !== at && "uid" !== e }
23, forEach: function (e) { for (var t in this) this.shouldSerialize(t) && e(this[t], t) }, toJSON: function () { var e, t, n = {}; for (t in this) this.shouldSerialize(t) && (e = this[t], (e instanceof zt || e instanceof Rt) && (e = e.toJSON()), n[t] = e); return n }, get: function (e) { var t, n = this; return n.trigger(pt, { field: e }), t = "this" === e ? n : tt.getter(e, !0)(n) }, _set: function (e, n) { var i, r, a, o = this; if (e.indexOf(".")) for (i = e.split("."), r = ""; i.length > 1; ) { if (r += i.shift(), a = tt.getter(r, !0)(o), a instanceof zt) return a.set(i.join("."), n), t; r += "." } tt.setter(e)(o, n) }, set: function (e, t) { var n = this, i = tt.getter(e, !0)(n); i !== t && (n.trigger("set", { field: e, value: t }) || (n._set(e, n.wrap(t, e, function () { return n })), n.trigger(ct, { field: e }))) }, parent: et, wrap: function (e, t, i) { var r, a, o = this, s = Et.call(e); return null == e || "[object Object]" !== s && "[object Array]" !== s || (r = e instanceof Rt, a = e instanceof V, "[object Object]" !== s || a || r ? ("[object Array]" === s || r || a) && (r || a || (e = new Rt(e)), e.parent() != i() && e.bind(ct, n(o, ct, t, !1))) : (e instanceof zt || (e = new zt(e)), e.parent() != i() && (e.bind(pt, n(o, pt, t, !0)), e.bind(ct, n(o, ct, t, !0)))), e.parent = i), e } }), Ot = { number: function (e) { return tt.parseFloat(e) }, date: function (e) { return tt.parseDate(e) }, "boolean": function (e) { return typeof e === rt ? "true" === e.toLowerCase() : null != e ? !!e : e }, string: function (e) { return null != e ? e + "" : e }, "default": function (e) { return e } }, Mt = { string: "", number: 0, date: new Date, "boolean": !1, "default": "" }, Pt = zt.extend({ init: function (n) { var i = this; (!n || e.isEmptyObject(n)) && (n = e.extend({}, i.defaults, n)), zt.fn.init.call(i, n), i.dirty = !1, i.idField && (i.id = i.get(i.idField), i.id === t && (i.id = i._defaultId)) }, shouldSerialize: function (e) { return zt.fn.shouldSerialize.call(this, e) && "uid" !== e && !("id" !== this.idField && "id" === e) && "dirty" !== e && "_accessors" !== e }, _parse: function (e, t) { var n, i = this, a = e, o = i.fields || {}; return e = o[e], e || (e = r(o, a)), e && (n = e.parse, !n && e.type && (n = Ot[e.type.toLowerCase()])), n ? n(t) : t }, editable: function (e) { return e = (this.fields || {})[e], e ? e.editable !== !1 : !0 }, set: function (e, t, n) { var r = this; r.editable(e) && (t = r._parse(e, t), i(t, r.get(e)) || (r.dirty = !0, zt.fn.set.call(r, e, t, n))) }, accept: function (e) { var t, n = this, i = function () { return n }; for (t in e) n._set(t, n.wrap(e[t], t, i)); n.idField && (n.id = n.get(n.idField)), n.dirty = !1 }, isNew: function () { return this.id === this._defaultId } }); Pt.define = function (e, n) { n === t && (n = e, e = Pt); var i, r, a, o, s, l, d, c = j({ defaults: {} }, n), u = {}, p = c.id; if (p && (c.idField = p), c.id && delete c.id, p && (c.defaults[p] = c._defaultId = ""), "[object Array]" === Et.call(c.fields)) { for (l = 0, d = c.fields.length; d > l; l++) a = c.fields[l], typeof a === rt ? u[a] = {} : a.field && (u[a.field] = a); c.fields = u } for (r in c.fields) a = c.fields[r], o = a.type || "default", s = null, r = typeof a.field === rt ? a.field : r, a.nullable || (s = c.defaults[r] = a.defaultValue !== t ? a.defaultValue : Mt[o.toLowerCase()]), n.id === r && (c._defaultId = s), c.defaults[r] = s, a.parse = a.parse || Ot[o]; return i = e.extend(c), i.define = function (e) { return Pt.define(i, e) }, c.fields && (i.fields = c.fields, i.idField = c.idField), i }, H = { selector: function (e) { return $(e) ? e : bt(e) }, asc: 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 > n ? 1 : n > e ? -1 : 0 } }, desc: function (e) { var t = this.selector(e); return function (e, n) { return e = t(e), n = t(n), null == e && null == n ? 0 : null == n ? -1 : null == e ? 1 : n > e ? 1 : e > n ? -1 : 0 } }, create: function (e) { return this[e.dir.toLowerCase()](e.field) }, combine: function (e) { return function (t, n) { var i, r, a = e[0](t, n); for (i = 1, r = e.length; r > i; i++) a = a || e[i](t, n); return a } } }, N = j({}, H, { asc: function (e) { var t = this.selector(e); return function (e, n) { var i = t(e), r = t(n); return i && i.getTime && r && r.getTime && (i = i.getTime(), r = r.getTime()), i === r ? e.__position - n.__position : null == i ? -1 : null == r ? 1 : i > r ? 1 : r > i ? -1 : e.__position - n.__position } }, desc: function (e) { var t = this.selector(e); return function (e, n) { var i = t(e), r = t(n); return i && i.getTime && r && r.getTime && (i = i.getTime(), r = r.getTime()), i === r ? e.__position - n.__position : null == i ? 1 : null == r ? -1 : r > i ? 1 : i > r ? -1 : e.__position - n.__position } } }), I = function (e, t) { var n, i = e.length, r = Array(i); for (n = 0; i > n; n++) r[n] = t(e[n], n, e); return r }, R = function () { function e(e) { return e.replace(Nt, "\\").replace(Ht, "") } function t(t, n, i, r) { var a; return null != i && (typeof i === rt && (i = e(i), a = It.exec(i), a ? i = new Date(+a[1]) : r ? (i = "'" + i.toLowerCase() + "'", n = "(" + n + " || '').toLowerCase()") : i = "'" + i + "'"), i.getTime && (n = "(" + n + "?" + n + ".getTime():" + n + ")", i = i.getTime())), n + " " + t + " " + i } return { eq: function (e, n, i) { return t("==", e, n, i) }, neq: function (e, n, i) { return t("!=", e, n, i) }, gt: function (e, n, i) { return t(">", e, n, i) }, gte: function (e, n, i) { return t(">=", e, n, i) }, lt: function (e, n, i) { return t("<", e, n, i) }, lte: function (e, n, i) { return t("<=", e, n, i) }, startswith: function (t, n, i) { return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".lastIndexOf('" + n + "', 0) == 0" }, endswith: function (t, n, i) { return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "', " + t + ".length - " + (n || "").length + ") >= 0" }, contains: function (t, n, i) { return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "') >= 0" }, doesnotcontain: function (t, n, i) { return i && (t = "(" + t + " || '').toLowerCase()", n && (n = n.toLowerCase())), n && (n = e(n)), t + ".indexOf('" + n + "') == -1" } } } (), a.filterExpr = function (e) { var n, i, r, o, s, l, d = [], c = { and: " && ", or: " || " }
23, u = [], p = [], f = e.filters; for (n = 0, i = f.length; i > n; n++) r = f[n], s = r.field, l = r.operator, r.filters ? (o = a.filterExpr(r), r = o.expression.replace(/__o\[(\d+)\]/g, function (e, t) { return t = +t, "__o[" + (p.length + t) + "]" }).replace(/__f\[(\d+)\]/g, function (e, t) { return t = +t, "__f[" + (u.length + t) + "]" }), p.push.apply(p, o.operators), u.push.apply(u, o.fields)) : (typeof s === at ? (o = "__f[" + u.length + "](d)", u.push(s)) : o = tt.expr(s), typeof l === at ? (r = "__o[" + p.length + "](" + o + ", " + r.value + ")", p.push(l)) : r = R[(l || "eq").toLowerCase()](o, r.value, r.ignoreCase !== t ? r.ignoreCase : !0)), d.push(r); return { expression: "(" + d.join(c[e.logic]) + ")", fields: u, operators: p} }, z = { "==": "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" }, a.normalizeFilter = l, a.prototype = { toArray: function () { return this.data }, range: function (e, t) { return new a(this.data.slice(e, e + t)) }, skip: function (e) { return new a(this.data.slice(e)) }, take: function (e) { return new a(this.data.slice(0, e)) }, select: function (e) { return new a(I(this.data, e)) }, orderBy: function (e) { var t = this.data.slice(0), n = $(e) || !e ? H.asc(e) : e.compare; return new a(t.sort(n)) }, orderByDescending: function (e) { return new a(this.data.slice(0).sort(H.desc(e))) }, sort: function (e, t, n) { var i, r, a = o(e, t), s = []; if (n = n || H, a.length) { for (i = 0, r = a.length; r > i; i++) s.push(n.create(a[i])); return this.orderBy({ compare: n.combine(s) }) } return this }, filter: function (e) { var t, n, i, r, o, s, d, c, u = this.data, p = []; if (e = l(e), !e || 0 === e.filters.length) return this; for (r = a.filterExpr(e), s = r.fields, d = r.operators, o = c = Function("d, __f, __o", "return " + r.expression), (s.length || d.length) && (c = function (e) { return o(e, s, d) }), t = 0, i = u.length; i > t; t++) n = u[t], c(n) && p.push(n); return new a(p) }, group: function (e, t) { e = c(e || []), t = t || this.data; var n, i = this, r = new a(i.data); return e.length > 0 && (n = e[0], r = r.groupBy(n).select(function (i) { var r = new a(t).filter([{ field: i.field, operator: "eq", value: i.value}]); return { field: i.field, value: i.value, items: e.length > 1 ? new a(i.items).group(e.slice(1), r.toArray()).toArray() : i.items, hasSubgroups: e.length > 1, aggregates: r.aggregate(n.aggregates)} })), r }, groupBy: function (e) { if (Y(e) || !this.data.length) return new a([]); var t, n, i, r, o = e.field, s = this._sortForGrouping(o, e.dir || "asc"), l = tt.accessor(o), d = l.get(s[0], o), c = { field: o, value: d, items: [] }, p = [c]; for (i = 0, r = s.length; r > i; i++) t = s[i], n = l.get(t, o), u(d, n) || (d = n, c = { field: o, value: d, items: [] }, p.push(c)), c.items.push(t); return new a(p) }, _sortForGrouping: function (e, t) { var n, i, r = this.data; if (!At) { for (n = 0, i = r.length; i > n; n++) r[n].__position = n; for (r = new a(r).sort(e, t, N).toArray(), n = 0, i = r.length; i > n; n++) delete r[n].__position; return r } return this.sort(e, t).toArray() }, aggregate: function (e) { var t, n, i = {}; if (e && e.length) for (t = 0, n = this.data.length; n > t; t++) p(i, e, this.data[t], t, n); return i } }, O = { sum: function (e, t, n) { return (e || 0) + n.get(t) }, count: function (e) { return (e || 0) + 1 }, average: function (e, t, n, i, r) { return e = (e || 0) + n.get(t), i == r - 1 && (e /= r), e }, max: function (e, t, n) { var i = n.get(t); return e = e || 0, i > e && (e = i), e }, min: function (e, t, n) { var i = n.get(t); return e = e || i, e > i && (e = i), e } }, a.process = function (e, n) { n = n || {}; var i, r = new a(e), s = n.group, l = c(s || []).concat(o(n.sort || [])), d = n.filter, u = n.skip, p = n.take; return d && (r = r.filter(d), i = r.toArray().length), l && (r = r.sort(l), s && (e = r.toArray())), u !== t && p !== t && (r = r.range(u, p)), s && (r = r.group(s, e)), { total: i, data: r.toArray()} }, M = it.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) } }), P = it.extend({ init: function (e) { var t, n = this; e = n.options = j({}, n.options, e), Z(vt, function (t, n) { typeof e[n] === rt && (e[n] = { url: e[n] }) }), n.cache = e.cache ? B.create(e.cache) : { find: et, add: et }, t = e.parameterMap, n.parameterMap = $(t) ? t : function (e) { var n = {}; return Z(e, function (e, i) { e in t && (e = t[e], K(e) && (i = e.value(i), e = e.key)), n[e] = i }), n } }, options: { parameterMap: _t }, create: function (e) { return X(this.setup(e, ot)) }, read: function (n) { var i, r, a, o = this, s = o.cache; n = o.setup(n, st), i = n.success || et, r = n.error || et, a = s.find(n.data), a !== t ? i(a) : (n.success = function (e) { s.add(n.data, e), i(e) }, e.ajax(n)) }, update: function (e) { return X(this.setup(e, lt)) }, destroy: function (e) { return X(this.setup(e, dt)) }, setup: function (e, t) { e = e || {}; var n, i = this, r = i.options[t], a = $(r.data) ? r.data(e.data) : r.data; return e = j(!0, {}, r, e), n = j(!0, {}, a, e.data), e.data = i.parameterMap(n, t), $(e.url) && (e.url = e.url(n)), e } }), B = it.extend({ init: function () { this._store = {} }, add: function (e, n) { e !== t && (this._store[kt(e)] = n) }, find: function (e) { return this._store[kt(e)] }, clear: function () { this._store = {} }, remove: function (e) { delete this._store[kt(e)] } }), B.create = function (e) { var t = { inmemory: function () { return new B } }; return K(e) && $(e.find) ? e : e === !0 ? new B : t[e]() }, L = it.extend({ init: function (e) { var t, n, i, r, a, o, s, l = this; e = e || {}; for (t in e) n = e[t], l[t] = typeof n === rt ? bt(n) : n; r = e.modelBase || Pt, K(l.model) && (l.model = i = r.define(l.model)), l.model && (a = G(l.data, l), o = G(l.groups, l), s = {}, i = l.model, i.fields && Z(i.fields, function (e, t) { K(t) && t.field ? s[t.field] = bt(t.field) : s[e] = bt(e) }), l.data = v(a, i, g, s), l.groups = v(o, i, m, s)) }, errors: function (e) { return e ? e.errors : null }, parse: _t, data: _t, total: function (e) { return e.length }, groups: _t, status: function (e) { return e.status }, aggregates: function () { return {} } }), V = nt.extend({ init: function (e) { var n, i, r = this; e && (i = e.data), e = r.options = j({}, r.options, e), r._map = {}, r._prefetch = {}, r._data = [], r._ranges = [], r._view = [], r._pristine = [], r._destroyed = [], r._pageSize = e.pageSize, r._page = e.page || (e.pageSize ? 1 : t), r._sort = o(e.sort), r._filter = l(e.filter), r._group = c(e.group), r._aggregate = e.aggregate, r._total = e.total, nt.fn.init.call(r), r.transport = W.create(e, i), r.reader = new tt.data.readers[e.schema.type || "json"](e.schema), n = r.reader.model || {}, r._data = r._observe(r._data), r.bind([ft, ct, ht, ut, mt, gt], e) }, options: { data: [], schema: { modelBase: Pt }, serverSorting: !1, serverPaging: !1, serverFiltering: !1, serverGrouping: !1, serverAggregates: !1, batch: !1 }, _isServerGrouped: function () { var e = this.group() || []; return this.options.serverGrouping && e.length }, _flatData: function (e) { return this._isServerGrouped() ? b(e) : e }, parent: et, get: function (e) { var t, n, i = this._flatData(this._data); for (t = 0, n = i.length; n > t; t++) if (i[t].id == e) return i[t] }, getByUid: function (e) { var t, n, i = this._flatData(this._data); if (i) for (t = 0, n = i.length; n > t; t++) if (i[t].uid == e) return i[t] }, indexOf: function (e) { return T(this._data, e) }, at: function (e) { return this._data[e] }, data: function (e) { var n = this; return e === t ? n._data : (n._data = this._observe(e), n._ranges = [], n._addRange(n._data), n._total = n._data.length, n._process(n._data), t) }, view: function () { return this._view }, add: function (e) { return this.insert(this._data.length, e) }, insert: function (e, t) { return t || (t = e, e = 0), t instanceof Pt || (t = this.reader.model ? new this.reader.model(t) : new zt(t)), this._isServerGrouped() ? this._data.splice(e, 0, x(this.group(), t)) : this._data.splice(e, 0, t), t }, remove: function (e) { var n, i = this, r = i._isServerGrouped(); return this._eachItem(i._data, function (a) { return n = y(a, e), n && r ? (n.isNew && n.isNew() || i._destroyed.push(n), !0) : t }), e }, sync: function () { var t, n, i, r = this, a = [], o = [], s = r._destroyed, l = r._flatData(r._data); if (r.reader.model) { for (t = 0, n = l.length; n > t; t++) l[t].isNew() ? a.push(l[t]) : l[t].dirty && o.push(l[t]); i = r._send("create", a), i.push.apply(i, r._send("update", o)), i.push.apply(i, r._send("destroy", s)), e.when.apply(null, i).then(function () { var e, t; for (e = 0, t = arguments.length; t > e; e++) r._accept(arguments[e]); r._change({ action: "sync" }), r.trigger(ut) }) } }, cancelChanges: function (e) { var t = this, n = t._readData(t._pristine); e instanceof tt.data.Model ? t._cancelModel(e) : (t._destroyed = [], t._data = t._observe(n), t.options.serverPaging && (t._total = t.reader.total(t._pristine)), t._change()) }, hasChanges: function () { var e, t, n = this._data; if (this._destroyed.length) return !0; for (e = 0, t = n.length; t > e; e++) if (n[e].isNew() || n[e].dirty) return !0; return !1 }, _accept: function (t) { var n, i = this, r = t.models, a = t.response, o = 0, s = i._isServerGrouped(), l = i._readData(i._pristine), d = t.type; if (i.trigger(mt, { response: a, type: d }), a && !Y(a)) { if (a = i.reader.parse(a), i._handleCustomErrors(a)) return; a = i.reader.data(a), e.isArray(a) || (a = [a]) } else a = e.map(r, function (e) { return e.toJSON() }); for ("destroy" === d && (i._destroyed = []), o = 0, n = r.length; n > o; o++) "destroy" !== d ? (r[o].accept(a[o]), "create" === d ? l.push(s ? x(i.group(), r[o]) : a[o]) : "update" === d && i._updatePristineForModel(r[o], a[o])) : i._removePristineForModel(r[o]) }, _updatePristineForModel: function (e, t) { this._executeOnPristineForModel(e, function (e, n) { tt.deepExtend(n[e], t) }) }, _executeOnPristineForModel: function (e, n) { this._eachPristineItem(function (i) { var r = C(i, e); return r > -1 ? (n(r, i), !0) : t }) }, _removePristineForModel: function (e) { this._executeOnPristineForModel(e, function (e, t) { t.splice(e, 1) }) }, _readData: function (e) { var t = this._isServerGrouped() ? this.reader.groups : this.reader.data; return t(e) }, _eachPristineItem: function (e) { this._eachItem(this._readData(this._pristine), e) }, _eachItem: function (e, t) { e && e.length && (this._isServerGrouped() ? w(e, t) : t(e)) }, _pristineForModel: function (e) { var n, i, r = function (r) { return i = C(r, e), i > -1 ? (n = r[i], !0) : t }; return this._eachPristineItem(r), n }, _cancelModel: function (e) { var t, n = this._pristineForModel(e); this._eachItem(this._data, function (i) { t = T(i, e), -1 != t && (!e.isNew() && n ? i[t].accept(n) : i.splice(t, 1)) }) }, _promise: function (t, n, i) { var r = this, a = r.transport; return e.Deferred(function (e) { a[i].call(a, j({ success: function (t) { e.resolve({ response: t, models: n, type: i }) }, error: function (t, n, i) { e.reject(t), r.error(t, n, i) } }, t)) }).promise() }, _send: function (e, t) { var n, i, r = this, a = []; if (r.options.batch) t.length && a.push(r._promise({ data: { models: f(t)} }, t, e)); else for (n = 0, i = t.length; i > n; n++) a.push(r._promise({ data: t[n].toJSON() }, [t[n]], e)); return a }, read: function (e) { var t = this, n = t._params(e); t._queueRequest(n, function () { t.trigger(ht) ? t._dequeueRequest() : (t.trigger(gt), t._ranges = [], t.transport.read({ data: n, success: G(t.success, t), error: G(t.error, t) })) }) }, success: function (n) { var i = this, r = i.options; return i.trigger(mt, { response: n, type: "read" }), n = i.reader.parse(n), i._handleCustomErrors(n) ? (i._dequeueRequest(), t) : (i._pristine = K(n) ? e.extend(!0, {}, n) : n.slice ? n.slice(0) : n, i._total = i.reader.total(n), i._aggregate && r.serverAggregates && (i._aggregateResult = i.reader.aggregates(n)), n = i._readData(n), i._data = i._observe(n), i._addRange(i._data), i._dequeueRequest(), i._process(i._data), t) }, _addRange: function (e) { var t = this, n = t._skip || 0, i = n + t._flatData(e).length; t._ranges.push({ start: n, end: i, data: e }), t._ranges.sort(function (e, t) { return e.start - t.start }) }, error: function (e, t, n) { this._dequeueRequest(), this.trigger(mt, {}), this.trigger(ft, { xhr: e, status: t, errorThrown: n }) }, _params: function (e) { var t = this, n = j({ take: t.take(), skip: t.skip(), page: t.page(), pageSize: t.pageSize(), sort: t._sort, filter: t._filter, group: t._group, aggregate: t._aggregate }, e); return t.options.serverPaging || (delete n.take, delete n.skip, delete n.page, delete n.pageSize), t.options.serverGrouping || delete n.group, t.options.serverFiltering || delete n.filter, t.options.serverSorting || delete n.sort, t.options.serverAggregates || delete n.aggregate, n }, _queueRequest: function (e, n) { var i = this; i._requestInProgress ? i._pending = { callback: G(n, i), options: e} : (i._requestInProgress = !0, i._pending = t, n()) }, _dequeueRequest: function () { var e = this; e._requestInProgress = !1, e._pending && e._queueRequest(e._pending.options, e._pending.callback) }, _handleCustomErrors: function (e) { if (this.reader.errors) { var t = this.reader.errors(e); if (t) return this.trigger(ft, { xhr: null, status: "customerror", errorThrown: "custom error", errors: t }), !0 } return !1 }, _observe: function (e) { var t = this, n = t.reader.model, i = !1; return n && e.length && (i = !(e[0] instanceof n)), e instanceof Rt ? i && (e.type = t.reader.model, e.wrapAll(e, e)) : (e = new Rt(e, t.reader.model), e.parent = function () { return t.parent() }), t._isServerGrouped() && k(e, n), e.bind(ct, G(t._change, t)) }, _change: function (e) { var t, n, i, r = this, a = e ? e.action : ""; if ("remove" === a) for (t = 0, n = e.items.length; n > t; t++) e.items[t].isNew && e.items[t].isNew() || r._destroyed.push(e.items[t]); !r.options.autoSync || "add" !== a && "remove" !== a && "itemchange" !== a ? (i = r._total || r.reader.total(r._pristine), "add" === a ? i += e.items.length : "remove" === a ? i -= e.items.length : "itemchange" === a || "sync" === a || r.options.serverPaging || (i = r.reader.total(r._pristine)), r._total = i, r._process(r._data, e)) : r.sync() }, _process: function (e, n) { var i, r = this, o = {}; r.options.serverPaging !== !0 && (o.skip = r._skip, o.take = r._take || r._pageSize, o.skip === t && r._page !== t && r._pageSize !== t && (o.skip = (r._page - 1) * r._pageSize)), r.options.serverSorting !== !0 && (o.sort = r._sort), r.options.serverFiltering !== !0 && (o.filter = r._filter), r.options.serverGrouping !== !0 && (o.group = r._group), r.options.serverAggregates !== !0 && (o.aggregate = r._aggregate, r._aggregateResult = h(e, o)), i = a.process(e, o), r._view = i.data, i.total === t || r.options.serverFiltering || (r._total = i.total), n = n || {}, n.items = n.items || r._view, r.trigger(ct, n) }, _mergeState: function (e) { var n = this; return e !== t && (n._pageSize = e.pageSize, n._page = e.page, n._sort = e.sort, n._filter = e.filter, n._group = e.group, n._aggregate = e.aggregate, n._skip = e.skip, n._take = e.take, n._skip === t && (n._skip = n.skip(), e.skip = n.skip()), n._take === t && n._pageSize !== t && (n._take = n._pageSize, e.take = n._take), e.sort && (n._sort = e.sort = o(e.sort)), e.filter && (n._filter = e.filter = l(e.filter)), e.group && (n._group = e.group = c(e.group)), e.aggregate && (n._aggregate = e.aggregate = d(e.aggregate))), e }, query: function (e) { var n, i = this, r = i.options.serverSorting || i.options.serverPaging || i.options.serverFiltering || i.options.serverGrouping || i.options.serverAggregates; r || (i._data === t || 0 ==
23= i._data.length) && !i._destroyed.length ? i.read(i._mergeState(e)) : i.trigger(ht) || (i.trigger(gt), n = a.process(i._data, i._mergeState(e)), i.options.serverFiltering || (i._total = n.total !== t ? n.total : i._data.length), i._view = n.data, i._aggregateResult = h(i._data, e), i.trigger(mt, {}), i.trigger(ct, { items: n.data })) }, fetch: function (e) { var t = this; e && $(e) && t.one(ct, e), t._query() }, _query: function (e) { var t = this; t.query(j({}, { page: t.page(), pageSize: t.pageSize(), sort: t.sort(), filter: t.filter(), group: t.group(), aggregate: t.aggregate() }, e)) }, next: function (e) { var n = this, i = n.page(), r = n.total(); return e = e || {}, !i || r && i + 1 > n.totalPages() ? t : (n._skip = i * n.take(), i += 1, e.page = i, n._query(e), i) }, prev: function (e) { var n = this, i = n.page(); return e = e || {}, i && 1 !== i ? (n._skip = n._skip - n.take(), i -= 1, e.page = i, n._query(e), i) : t }, page: function (e) { var n, i = this; return e !== t ? (e = wt.max(wt.min(wt.max(e, 1), i.totalPages()), 1), i._query({ page: e }), t) : (n = i.skip(), n !== t ? wt.round((n || 0) / (i.take() || 1)) + 1 : t) }, pageSize: function (e) { var n = this; return e !== t ? (n._query({ pageSize: e, page: 1 }), t) : n.take() }, sort: function (e) { var n = this; return e !== t ? (n._query({ sort: e }), t) : n._sort }, filter: function (e) { var n = this; return e === t ? n._filter : (n._query({ filter: e, page: 1 }), t) }, group: function (e) { var n = this; return e !== t ? (n._query({ group: e }), t) : n._group }, total: function () { return this._total || 0 }, aggregate: function (e) { var n = this; return e !== t ? (n._query({ aggregate: e }), t) : n._aggregate }, aggregates: function () { return this._aggregateResult }, totalPages: function () { var e = this, t = e.pageSize() || e.total(); return wt.ceil((e.total() || 0) / t) }, inRange: function (e, t) { var n = this, i = wt.min(e + t, n.total()); return !n.options.serverPaging && n.data.length > 0 ? !0 : n._findRange(e, i).length > 0 }, range: function (e, n) { var i, r, a, o, s, l, d; if (e = wt.min(e || 0, this.total()), r = this, a = wt.max(wt.floor(e / n), 0) * n, o = wt.min(a + n, r.total()), i = r._findRange(e, wt.min(e + n, r.total())), i.length) { r._skip = e > r.skip() ? wt.min(o, (r.totalPages() - 1) * r.take()) : a, r._take = n, s = r.options.serverPaging, l = r.options.serverSorting, d = r.options.serverFiltering; try { r.options.serverPaging = !0, r.options.serverSorting = !0, r.options.serverFiltering = !0, s && (r._data = i = r._observe(i)), r._process(i) } finally { r.options.serverPaging = s, r.options.serverSorting = l, r.options.serverFiltering = d } } else n !== t && (r._rangeExists(a, o) ? e > a && r.prefetch(o, n, function () { r.range(e, n) }) : r.prefetch(a, n, function () { e > a && r.total() > o && !r._rangeExists(o, wt.min(o + n, r.total())) ? r.prefetch(o, n, function () { r.range(e, n) }) : r.range(e, n) })) }, _findRange: function (e, n) { var i, r, s, l, d, u, p, f, h, g, m, v, _ = this, b = _._ranges, k = [], w = _.options, y = w.serverSorting || w.serverPaging || w.serverFiltering || w.serverGrouping || w.serverAggregates; for (r = 0, m = b.length; m > r; r++) if (i = b[r], e >= i.start && i.end >= e) { for (g = 0, s = r; m > s; s++) if (i = b[s], h = _._flatData(i.data), h.length && e + g >= i.start && (u = i.data, p = i.end, y || (v = c(_.group() || []).concat(o(_.sort() || [])), f = a.process(i.data, { sort: v, filter: _.filter() }), h = u = f.data, f.total !== t && (p = f.total)), l = 0, e + g > i.start && (l = e + g - i.start), d = h.length, p > n && (d -= p - n), g += d - l, k = _._mergeGroups(k, u, l, d), i.end >= n && g == n - e)) return k; break } return [] }, _mergeGroups: function (e, t, n, i) { if (this._isServerGrouped()) { var r, a = t.toJSON(); return e.length && (r = e[e.length - 1]), _(r, a, n, i), e.concat(a) } return e.concat(t.slice(n, i)) }, skip: function () { var e = this; return e._skip === t ? e._page !== t ? (e._page - 1) * (e.take() || 1) : t : e._skip }, take: function () { return this._take || this._pageSize }, _prefetchSuccessHandler: function (e, t, n) { var i = this; return function (r) { var a, o, s = !1, l = { start: e, end: t, data: [] }; for (i._dequeueRequest(), a = 0, o = i._ranges.length; o > a; a++) if (i._ranges[a].start === e) { s = !0, l = i._ranges[a]; break } s || i._ranges.push(l), i.trigger(mt, { response: r, type: "read" }), r = i.reader.parse(r), l.data = i._observe(i._readData(r)), l.end = l.start + i._flatData(l.data).length, i._ranges.sort(function (e, t) { return e.start - t.start }), i._total = i.reader.total(r), n && n() } }, prefetch: function (e, t, n) { var i = this, r = wt.min(e + t, i.total()), a = { take: t, skip: e, page: e / t + 1, pageSize: t, sort: i._sort, filter: i._filter, group: i._group, aggregate: i._aggregate }; i._rangeExists(e, r) ? n && n() : (clearTimeout(i._timeout), i._timeout = setTimeout(function () { i._queueRequest(a, function () { i.trigger(ht) ? i._dequeueRequest() : i.transport.read({ data: a, success: i._prefetchSuccessHandler(e, r, n) }) }) }, 100)) }, _rangeExists: function (e, t) { var n, i, r = this, a = r._ranges; for (n = 0, i = a.length; i > n; n++) if (e >= a[n].start && a[n].end >= t) return !0; return !1 } }), W = {}, W.create = function (e, t) { var n, i = e.transport; return i ? (i.read = typeof i.read === rt ? { url: i.read} : i.read, e.type && (tt.data.transports[e.type] && !K(tt.data.transports[e.type]) ? n = new tt.data.transports[e.type](j(i, { data: t })) : i = j(!0, {}, tt.data.transports[e.type], i), e.schema = j(!0, {}, tt.data.schemas[e.type], e.schema)), n || (n = $(i.read) ? i : new P(i))) : n = new M({ data: e.data }), n }, V.create = function (e) { e = e && e.push ? { data: e} : e; var t, n, i, r = e || {}, a = r.data, o = r.fields, s = r.table, l = r.select, d = {}; if (a || !o || r.transport || (s ? a = D(s, o) : l && (a = F(l, o))), tt.data.Model && o && (!r.schema || !r.schema.model)) { for (t = 0, n = o.length; n > t; t++) i = o[t], i.type && (d[i.field] = i); Y(d) || (r.schema = j(!0, r.schema, { model: { fields: d} })) } return r.data = a, r instanceof V ? r : new V(r) }, U = Pt.define({ init: function (e) { var t = this, n = t.hasChildren || e && e.hasChildren, i = "items", r = {}; tt.data.Model.fn.init.call(t, e), typeof t.children === rt && (i = t.children), r = { schema: { data: i, model: { hasChildren: n, id: t.idField}} }, typeof t.children !== rt && j(r, t.children), r.data = e, n || (n = r.schema.data), typeof n === rt && (n = tt.getter(n)), $(n) && (t.hasChildren = !!n.call(t, t)), t._childrenOptions = r, t.hasChildren && t._initChildren(), t._loaded = !(!e || !e[i] && !e._loaded) }
23, _initChildren: function () { var e = this; e.children instanceof q || (e.children = new q(e._childrenOptions), e.children.parent = function () { return e }, e.children.bind(ct, function (t) { t.node = t.node || e, e.trigger(ct, t) }), e.children.bind(ft, function (t) { var n = e.parent(); n && (t.node = t.node || e, n.trigger(ft, t)) }), e._updateChildrenField()) }, append: function (e) { this._initChildren(), this.loaded(!0), this.children.add(e) }, hasChildren: !1, level: function () { for (var e = this.parentNode(), t = 0; e && e.parentNode; ) t++, e = e.parentNode ? e.parentNode() : null; return t }, _updateChildrenField: function () { var e = this._childrenOptions.schema.data; this[e || "items"] = this.children.data() }, load: function () { var e = this, n = {}; e.hasChildren && (e._initChildren(), n[e.idField || "id"] = e.id, e._loaded || (e.children._data = t), e.children.one(ct, function () { e._loaded = !0, e._updateChildrenField() })._query(n)) }, parentNode: function () { var e = this.parent(); return e.parent() }, loaded: function (e) { return e === t ? this._loaded : (this._loaded = e, t) }, shouldSerialize: function (e) { return Pt.fn.shouldSerialize.call(this, e) && "children" !== e && "_loaded" !== e && "hasChildren" !== e && "_childrenOptions" !== e } }), q = V.extend({ init: function (e) { var t = U.define({ children: e }); V.fn.init.call(this, j(!0, {}, { schema: { modelBase: t, model: t} }, e)), this._attachBubbleHandlers() }, _attachBubbleHandlers: function () { var e = this; e._data.bind(ft, function (t) { e.trigger(ft, t) }) }, remove: function (e) { var t, n = e.parentNode(), i = this; return n && (i = n.children), t = V.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.hasChildren = !0, n._initChildren()), V.fn.insert.call(this, e, t) }, _find: function (e, t) { var n, i, r, a, o; if (r = V.fn[e].call(this, t)) return r; if (a = this._flatData(this.data())) for (n = 0, i = a.length; i > n; n++) if (o = a[n].children, o instanceof q && (r = o[e](t))) return r }, get: function (e) { return this._find("get", e) }, getByUid: function (e) { return this._find("getByUid", e) } }), q.create = function (e) { e = e && e.push ? { data: e} : e; var t = e || {}, n = t.data, i = t.fields, r = t.list; return n && n._dataSource ? n._dataSource : (n || !i || t.transport || r && (n = A(r, i)), t.data = n, t instanceof q ? t : new q(t)) }, j(!0, tt.data, { readers: { json: L }, Query: a, DataSource: V, HierarchicalDataSource: q, Node: U, ObservableObject: zt, ObservableArray: Rt, LocalTransport: M, RemoteTransport: P, Cache: B, DataReader: L, Model: Pt }) 24} (window.kendo.jQuery), function (e, t) { 25 function n(e) { var t, i, r = []; for (t = 0, i = e.length; i > t; t++) r = e[t].hasSubgroups ? r.concat(n(e[t].items)) : r.concat(e[t].items); return r } function i(e, n, i) { var r = i[e]; return r ? new _(w.initWidget(n, r.options, i)) : t } function r(e) { var t, n, i, a, o, s, l, d = {}; for (l = e.match(b), t = 0, n = l.length; n > t; t++) i = l[t], a = i.indexOf(":"), o = i.substring(0, a), s = i.substring(a + 1), "{" == s.charAt(0) && (s = r(s)), d[o] = s; return d } function a(e, t, n) { var i, r = {}; for (i in e) r[i] = new n(t, e[i]); return r } function o(e, t, n, s) { var d, c, u, p = e.getAttribute("data-" + w.ns + "role"), m = e.getAttribute("data-" + w.ns + "bind"), _ = e.children, b = [], y = !0, x = {}; if (s = s || [t], (p || m) && l(e), p && (u = i(p, e, n)), m && (m = r(m.replace(k, "")), u || (x = w.parseOptions(e, { textField: "", valueField: "", template: "", valueUpdate: N }), x.roles = n, u = new v(e, x)), u.source = t, c = a(m, s, f), x.template && (c.template = new g(s, "", x.template)), c.click && (m.events = m.events || {}, m.events.click = m.click, delete c.click), c.source && (y = !1), m.attr && (c.attr = a(m.attr, s, f)), m.style && (c.style = a(m.style, s, f)), m.events && (c.events = a(m.events, s, h)), u.bind(c)), u && (e.kendoBindingTarget = u), y && _) { for (d = 0; _.length > d; d++) b[d] = _[d]; for (d = 0; b.length > d; d++) o(b[d], t, n, s) } } function s(t, n) { var i, r, a, s = w.rolesFromNamespaces([].slice.call(arguments, 2)); for (n = w.observable(n), t = e(t), i = 0, r = t.length; r > i; i++) a = t[i], 1 === a.nodeType && o(a, n, s) } function l(t) { var n = t.kendoBindingTarget; n && (n.destroy(), e.support.deleteExpando ? delete t.kendoBindingTarget : t.removeAttribute ? t.removeAttribute("kendoBindingTarget") : t.kendoBindingTarget = null) } function d(e) { var t, n, i = e.children; if (l(e), i) for (t = 0, n = i.length; n > t; t++) d(i[t]) } function c(t) { var n, i; for (t = e(t), n = 0, i = t.length; i > n; n++) d(t[n]) } function u(e, t) { var n = e.element, i = n[0].kendoBindingTarget; i && s(n, i.source, t) } var p, f, h, g, m, v, _, b, k, w = window.kendo, y = w.Observable, x = w.data.ObservableObject, C = w.data.ObservableArray, T = {}.toString, S = {}, F = w.Class, D = e.proxy, E = "value", A = "source", I = "events", H = "checked", N = "change"; (function () { var e = document.createElement("a"); e.innerText !== t ? p = "innerText" : e.textContent !== t && (p = "textContent") })(), f = y.extend({ init: function (e, t) { var n = this; y.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 y, n._access = function (e) { n.dependencies[e.field] = !0 }, n.observable && (n._change = function (e) { n.change(e) }, n.source.bind(N, n._change)) }, _parents: function () { var t, n = this.parents, i = this.get(); return i && (t = i.parent(), 0 > e.inArray(t, n) && (n = [t].concat(n))), n }, change: function (e) { var t, n, i = e.field, r = this; if ("this" === r.path) r.trigger(N, e);
25 else for (t in r.dependencies) if (0 === t.indexOf(i) && (n = t.charAt(i.length), !n || "." === n || "[" === n)) { r.trigger(N, e); break } }, start: function (e) { e.bind("get", this._access) }, stop: function (e) { e.unbind("get", this._access) }, get: function () { 26 var e = this, n = e.source, i = 0, r = e.path, a = n; if (!e.observable) return a; for (e.start(e.source), a = n.get(r); a === t && n; ) n = e.parents[++i], n instanceof x && (a = n.get(r)); if (a === t) for (n = e.source; a === t && n; ) n = n.parent(), n instanceof x && (a = n.get(r)); return "function" == typeof a && (i = r.lastIndexOf("."), i > 0 && (n = n.get(r.substring(0, i))), e.start(n), a = a.call(n, e.source), e.stop(n)), n && n !== e.source && (e.currentSource = n, n.unbind(N, e._change).bind(N, e._change)), e.stop(e.source), a 27 }, set: function (e) { var t = this, n = t.currentSource || t.source; n.set(t.path, e) }, destroy: function () { this.observable && this.source.unbind(N, this._change) } 28 }), h = f.extend({ get: function () { var e, t = this.source, n = this.path, i = 0; for (e = t.get(n); !e && t; ) t = this.parents[++i], t instanceof x && (e = t.get(n)); return D(e, t) } }), g = f.extend({ init: function (e, t, n) { var i = this; f.fn.init.call(i, e, t), i.template = n }, render: function (e) { var t; return this.start(this.source), t = w.render(this.template, e), this.stop(this.source), t } }), m = F.extend({ init: function (e, t, n) { this.element = e, this.bindings = t, this.options = n }, bind: function (e, t) { var n = this; e = t ? e[t] : e, e.bind(N, function (e) { n.refresh(t || e) }), n.refresh(t) }, destroy: function () { } }), S.attr = m.extend({ refresh: function (e) { this.element.setAttribute(e, this.bindings.attr[e].get()) } }), S.style = m.extend({ refresh: function (e) { this.element.style[e] = this.bindings.style[e].get() || "" } }), S.enabled = m.extend({ refresh: function () { this.bindings.enabled.get() ? this.element.removeAttribute("disabled") : this.element.setAttribute("disabled", "disabled") } }), S.readonly = m.extend({ refresh: function () { this.bindings.readonly.get() ? this.element.setAttribute("readonly", "readonly") : this.element.removeAttribute("readonly") } }), S.disabled = m.extend({ refresh: function () { this.bindings.disabled.get() ? this.element.setAttribute("disabled", "disabled") : this.element.removeAttribute("disabled") } }), S.events = m.extend({ init: function (e, t, n) { m.fn.init.call(this, e, t, n), this.handlers = {} }, refresh: function (t) { var n = e(this.element), i = this.bindings.events[t], r = this.handlers[t]; r && n.off(t, r), r = this.handlers[t] = i.get(), n.on(t, i.source, r) }, destroy: function () { var t, n = e(this.element); for (t in this.handlers) n.off(t, this.handlers[t]) } }), S.text = m.extend({ refresh: function () { var e = this.bindings.text.get(); null == e && (e = ""), this.element[p] = e } }), S.visible = m.extend({ refresh: function () { this.element.style.display = this.bindings.visible.get() ? "" : "none" } }), S.invisible = m.extend({ refresh: function () { this.element.style.display = this.bindings.invisible.get() ? "none" : "" } }), S.html = m.extend({ refresh: function () { this.element.innerHTML = this.bindings.html.get() } }), S.value = m.extend({ init: function (t, n, i) { m.fn.init.call(this, t, n, i), this._change = D(this.change, this), this.eventName = i.valueUpdate || N, e(this.element).on(this.eventName, this._change), this._initChange = !1 }, change: function () { this._initChange = this.eventName != N, this.bindings[E].set(this.element.value), this._initChange = !1 }, refresh: function () { if (!this._initChange) { var e = this.bindings[E].get(); null == e && (e = ""), this.element.value = e } this._initChange = !1 }, destroy: function () { e(this.element).off(this.eventName, this._change) } }), S.source = m.extend({ init: function (e, t, n) { m.fn.init.call(this, e, t, n) }, refresh: function (e) { var t = this, n = t.bindings.source.get(); n instanceof C ? (e = e || {}, "add" == e.action ? t.add(e.index, e.items) : "remove" == e.action ? t.remove(e.index, e.items) : "itemchange" != e.action && t.render()) : t.render() }, container: function () { var e = this.element; return "table" == e.nodeName.toLowerCase() && (e.tBodies[0] || e.appendChild(document.createElement("tbody")), e = e.tBodies[0]), e }, template: function () { var e = this.options, t = e.template, n = this.container().nodeName.toLowerCase(); return t || (t = "select" == n ? e.valueField || e.textField ? w.format('<option value="#:{0}#">#:{1}#</option>', e.valueField || e.textField, e.textField || e.valueField) : "<option>#:data#</option>" : "tbody" == n ? "<tr><td>#:data#</td></tr>" : "ul" == n || "ol" == n ? "<li>#:data#</li>" : "#:data#", t = w.template(t)), t }, destroy: function () { var e = this.bindings.source.get(); e.unbind(N, this._change) }, add: function (t, n) { var i, r, a, s, l = this.container(), d = l.cloneNode(!1), c = l.children[t]; if (e(d).html(w.render(this.template(), n)), d.children.length) for (i = this.bindings.source._parents(), r = 0, a = n.length; a > r; r++) s = d.children[0], l.insertBefore(s, c || null), o(s, n[r], this.options.roles, [n[r]].concat(i)) }, remove: function (e, t) { var n, i = this.container(); for (n = 0; t.length > n; n++) i.removeChild(i.children[e]) }, render: function () { var t, n, i, r, a = this.bindings.source.get(), s = this.container(), l = this.template(); if (a instanceof C || "[object Array]" === T.call(a) || (a.parent && (r = a.parent), a = new C([a]), a.parent && (a.parent = r)), this.bindings.template) { if (e(s).html(this.bindings.template.render(a)), s.children.length) for (t = this.bindings.source._parents(), n = 0, i = a.length; i > n; n++) o(s.children[n], a[n], this.options.roles, [a[n]].concat(t)) } else e(s).html(w.render(l, a)) } }), S.input = { checked: m.extend({ init: function (t, n, i) { m.fn.init.call(this, t, n, i), this._change = D(this.change, this), e(this.element).change(this._change) }, change: function () { var e, t, n = this.element, i = this.value(); "radio" == n.type ? this.bindings[H].set(i) : "checkbox" == n.type && (e = this.bindings[H].get(), e instanceof C ? (i = this.element.value, "on" !== i && "off" !== i && (t = e.indexOf(i), t > -1 ? e.splice(t, 1) : e.push(i))) : this.bindings[H].set(i)) }, refresh: function () { var e = this.bindings[H].get(), t = e, n = this.element; "checkbox" == n.type ? (t instanceof C && (e = this.element.value, t.indexOf(e) >= 0 && (e = !0)), n.checked = e === !0) : "radio" == n.type && null != e && n.value === "" + e && (n.checked = !0) }, value: function () { var e = this.element, t = e.value; return "checkbox" == e.type && (t = e.checked), t }, destroy: function () { e(this.element).off(N, this._change) } }) }, S.select = { value: m.extend({ init: function (t, n, i) { m.fn.init.call(this, t, n, i), this._change = D(this.change, this), e(this.element).change(this._change) }, change: function () { var e, t, n, i, r, a, o = [], s = this.element, l = this.options.valueField || this.options.textField; for (r = 0, a = s.options.length; a > r; r++) t = s.options[r], t.selected && (i = t.attributes.value, i = i && i.specified ? t.value : t.text, o.push(i)); if (l) for (e = this.bindings.source.get(), n = 0; o.length > n; n++) for (r = 0, a = e.length; a > r; r++) if (e[r].get(l) == o[n]) { o[n] = e[r]; break } i = this.bindings[E].get(), i instanceof C ? i.splice.apply(i, [0, i.length].concat(o)) : i instanceof x || !l ? this.bindings[E].set(o[0]) : this.bindings[E].set(o[0].get(l)) }, refresh: function () { var e, t, n, i = this.element, r = i.options, a = this.bindings[E].get(), o = a, s = this.options.valueField || this.options.textField, l = !1; for (o instanceof C || (o = new C([a])), i.selectedIndex = -1, n = 0; o.length > n; n++) for (a = o[n], s && a instanceof x && (a = a.get(s)), e = 0; r.length > e; e++) t = r[e].value, "" === t && "" !== a && (t = r[e].text), t == a && (r[e].selected = !0, l = !0) }, destroy: function () { e(this.element).off(N, this._change) } }) }, S.widget = { events: m.extend({ init: function (e, t, n) { m.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: m.extend({ init: function (e, t, n) { m.fn.init.call(this, e.element[0], t, n), this.widget = e, this._change = D(this.change, this), this.widget.bind(N, this._change) }, change: function () { this.bindings[H].set(this.value()) }, refresh: function () { this.widget.check(this.bindings[H].get() === !0) }, value: function () { var e = this.element, t = e.value; return ("on" == t || "off" == t) && (t = e.checked), t }, destroy: function () { this.widget.unbind(N, this._change) } }), visible: m.extend({ init: function (e, t, n) { m.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: m.extend({ init: function (e, t, n) { m.fn.init.call(this, e.element[0], t, n), this.widget = e }, refresh: function () { var e = this.bindings.invisible.get(); this.widget.wrapper[0].style.display = e ? "none" : "" } }), enabled: m.extend({ init: function (e, t, n) { m.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: m.extend({ init: function (e, t, n) { m.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: m.extend({ init: function (e, t, n) { var i = this; m.fn.init.call(i, e.element[0], t, n), i.widget = e, i._dataBinding = D(i.dataBinding, i), i._dataBound = D(i.dataBound, i), i._itemChange = D(i.itemChange, i) }, itemChange: function (e) { o(e.item[0], e.data, this._ns(e.ns), [e.data].concat(this.bindings.source._parents())) }, dataBinding: function () { var e, t, n = this.widget, i = n.items(); for (e = 0, t = i.length; t > e; e++) d(i[e]) }, _ns: function (t) { t = t || w.ui; var n = [w.ui, w.dataviz.ui, w.mobile.ui]; return n.splice(e.inArray(t, n), 1), n.unshift(t), w.rolesFromNamespaces(n) }, dataBound: function (e) { var t, i, r, a = this.widget, s = a.items(), l = a.dataSource, d = l.view(), c = l.group() || []; if (s.length) for (c.length && (d = n(d)), r = this.bindings.source._parents(), t = 0, i = d.length; i > t; t++) o(s[t], d[t], this._ns(e.ns), [d[t]].concat(r)) }, refresh: function (e) { var t, n = this, i = n.widget; e = e || {}, e.action || (n.destroy(), i.bind("dataBinding", n._dataBinding), i.bind("dataBound", n._dataBound), i.bind("itemChange", n._itemChange), t = n.bindings.source.get(), i.dataSource instanceof w.data.DataSource && i.dataSource != t && (t instanceof w.data.DataSource ? i.setDataSource(t) : t && t._dataSource ? i.setDataSource(t._dataSource) : i.dataSource.data(t))) }, destroy: function () { var e = this.widget; e.unbind("dataBinding", this._dataBinding), e.unbind("dataBound", this._dataBound), e.unbind("itemChange", this._itemChange) } }), value: m.extend({ init: function (t, n, i) { m.fn.init.call(this, t.element[0], n, i), this.widget = t, this._change = e.proxy(this.change, this), this.widget.first(N, this._change); var r = this.bindings.value.get(); this._valueIsObservableObject = null == r || r instanceof x, this._valueIsObservableArray = r instanceof C, this._initChange = !1 }, change: function () { var e, t, n, i, r, a, o, s = this.widget.value(), l = this.options.dataValueField || this.options.dataTextField, d = "[object Array]" === T.call(s), c = this._valueIsObservableObject, u = []; if (this._initChange = !0, l) if (this.bindings.source && (o = this.bindings.source.get()), "" === s && c) s = null; else { for ((!o || o instanceof w.data.DataSource) && (o = this.widget.dataSource.view()), d && (t = s.length, u = s.slice(0)), r = 0, a = o.length; a > r; r++) if (n = o[r], i = n.get(l), d) { for (e = 0; t > e; e++) if (i == u[e]) { u[e] = n; break } } else if (i == s) { s = c ? n : i; break } u[0] && (s = this._valueIsObservableArray ? u : c || !l ? u[0] : u[0].get(l)) } this.bindings.value.set(s), this._initChange = !1 }, refresh: function () { if (!this._initChange) { var e, t = this.options.dataValueField || this.options.dataTextField, n = this.bindings.value.get(), i = 0, r = []; if (t) if (n instanceof C) { for (e = n.length; e > i; i++) r[i] = n[i].get(t); n = r } else n instanceof x && (n = n.get(t)); this.widget.value(n) } this._initChange = !1 }, destroy: function () { this.widget.unbind(N, this._change) } }), multiselect: { value: m.extend({ init: function (t, n, i) { m.fn.init.call(this, t.element[0], n, i), this.widget = t, this._change = e.proxy(this.change, this), this.widget.first(N, this._change), this._initChange = !1 }, change: function () { this._initChange = !0, this.bindings.value.set(this.widget.dataItems()), this._initChange = !1 }, refresh: function () { if (!this._initChange) { var e, t, n = this.options.dataValueField || this.options.dataTextField, i = this.bindings.value.get(), r = 0, a = []; if (n) if (i instanceof C) { for (e = i.length; e > r; r++) t = i[r], a[r] = t.get ? t.get(n) : t; i = a } else i instanceof x && (i = i.get(n)); this.widget.value(i) } }, destroy: function () { this.widget.unbind(N, this._change) } })} }, v = F.extend({ init: function (e, t) { this.target = e, this.options = t, this.toDestroy = [] }, bind: function (e) { var t, n, i, r, a = this.target.nodeName.toLowerCase(), o = S[a] || {}; for (t in e) t == E ? n = !0 : t == A ? i = !0 : t == I ? r = !0 : this.applyBinding(t, e, o); i && this.applyBinding(A, e, o), n && this.applyBinding(E, e, o), r && this.applyBinding(I, e, o) }, applyBinding: function (e, t, n) { var i, r = n[e] || S[e], a = this.toDestroy, o = t[e]; if (r) if (r = new r(this.target, t, this.options), a.push(r), o instanceof f) r.bind(o), a.push(o); else for (i in o) r.bind(o, i), a.push(o[i]); else if ("template" !== e) throw Error("The " + e + " binding is not supported by the " + this.target.nodeName.toLowerCase() + " element") }, destroy: function () { var e, t, n = this.toDestroy; for (e = 0, t = n.length; t > e; e++) n[e].destroy() } }), _ = v.extend({ bind: function (e) { var t, n = this, i = !1, r = !1, a = S.widget[n.target.options.name.toLowerCase()] || {}; for (t in e) t == E ? i = !0 : t == A ? r = !0 : n.applyBinding(t, e); r && n.applyBinding(A, e), i && n.applyBinding(E, e, a[E]) }, applyBinding: function (e, t, n) { var i, r = n || S.widget[e], a = this.toDestroy, o = t[e]; if (!r) throw Error("The " + e + " binding is not supported by the " + this.target.options.name + " widget"); if (r = new r(this.target, t, this.target.options), a.push(r), o instanceof f) r.bind(o), a.push(o); else for (i in o) r.bind(o, i), a.push(o[i]) } }), b = /[A-Za-z0-9_\-]+:(\{([^}]*)\}|[^,}]+)/g, k = /\s/g, w.unbind = c, w.bind = s, w.data.binders = S, w.data.Binder = m, w.notify = u, w.observable = function (e) { return e instanceof x || (e = new x(e)), e }, w.observableHierarchy = function (e) { function t(e) { var n, i; for (n = 0; e.length > n;
28 n++) e[n]._initChildren(), i = e[n].children, i.fetch(), e[n].items = i.data(), t(e[n].items) } var n = w.data.HierarchicalDataSource.create(e); return n.fetch(), t(n.data()), n._data._dataSource = n, n._data } 29} (window.kendo.jQuery), function (e) { function t(t) { var n, i = a.ui.validator.ruleResolvers || {}, r = {}; for (n in i) e.extend(!0, r, i[n].resolve(t)); return r } function n(e) { return e.replace(/&/g, "&").replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">") } function i(e) { return e = (e + "").split("."), e.length > 1 ? e[1].length : 0 } var r, a = window.kendo, o = a.ui.Widget, s = ".kendoValidator", l = "k-invalid-msg", d = "k-invalid", c = /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([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])))$/i, u = /^(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, p = ":input:not(:button,[type=submit],[type=reset],[disabled],[readonly])", f = ":checkbox:not([disabled],[readonly])", h = "[type=number],[type=range]", g = "blur", m = "name", v = "form", _ = "novalidate", b = e.proxy, k = function (e, t) { return "string" == typeof t && (t = RegExp("^(?:" + t + ")$")), t.test(e) }, w = function (e, t, n) { var i = e.val(); return e.filter(t).length && "" !== i ? k(i, n) : !0 }, y = function (e, t) { return e.length ? null != e[0].attributes[t] : !1 }, x = /("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g; a.ui.validator || (a.ui.validator = { rules: {}, messages: {} }), r = o.extend({ init: function (n, i) { var r = this, s = t(n); i = i || {}, i.rules = e.extend({}, a.ui.validator.rules, s.rules, i.rules), i.messages = e.extend({}, a.ui.validator.messages, s.messages, i.messages), o.fn.init.call(r, n, i), r._errorTemplate = a.template(r.options.errorTemplate), r.element.is(v) && r.element.attr(_, _), r._errors = {}, r._attachEvents() }, options: { name: "Validator", errorTemplate: '<span class="k-widget k-tooltip k-tooltip-validation"><span class="k-icon k-warning"> </span> #=message#</span>', messages: { required: "{0} is required", pattern: "{0} is not valid", min: "{0} should be greater than or equal to {1}", max: "{0} should be smaller than or equal to {1}", step: "{0}
29 is not valid", email: "{0} is not valid email", url: "{0} is not valid URL", date: "{0} is not valid date" }, rules: { required: function (e) { var t = e.filter("[type=checkbox]").length && !e.is(":checked"), n = e.val(); return !(y(e, "required") && ("" === n || !n || t)) }, pattern: function (e) { return e.filter("[type=text],[type=email],[type=url],[type=tel],[type=search],[type=password]").filter("[pattern]").length && "" !== e.val() ? k(e.val(), e.attr("pattern")) : !0 }, min: function (e) { if (e.filter(h + ",[" + a.attr("type") + "=number]").filter("[min]").length && "" !== e.val()) { var t = parseFloat(e.attr("min")) || 0, n = parseFloat(e.val()); return n >= t } return !0 }, max: function (e) { if (e.filter(h + ",[" + a.attr("type") + "=number]").filter("[max]").length && "" !== e.val()) { var t = parseFloat(e.attr("max")) || 0, n = parseFloat(e.val()); return t >= n } return !0 }, step: function (e) { if (e.filter(h + ",[" + a.attr("type") + "=number]").filter("[step]").length && "" !== e.val()) { var t, n = parseFloat(e.attr("min")) || 0, r = parseFloat(e.attr("step")) || 1, o = parseFloat(e.val()), s = i(r); return s ? (t = Math.pow(10, s), 0 === (o - n) * t % (r * t) / Math.pow(100, s)) : 0 === (o - n) % r } return !0 }, email: function (e) { return w(e, "[type=email],[" + a.attr("type") + "=email]", c) }, url: function (e) { return w(e, "[type=url],[" + a.attr("type") + "=url]", u) }, date: function (e) { return e.filter("[type^=date],[" + a.attr("type") + "=date]").length && "" !== e.val() ? null !== a.parseDate(e.val(), e.attr(a.attr("format"))) : !0 } }, validateOnBlur: !0 }, destroy: function () { o.fn.destroy.call(this), this.element.off(s) }, _submit: function (e) { return this.validate() ? !0 : (e.stopPropagation(), e.stopImmediatePropagation(), e.preventDefault(), !1) }, _attachEvents: function () { var t = this; t.element.is(v) && t.element.on("submit" + s, b(t._submit, t)), t.options.validateOnBlur && (t.element.is(p) ? (t.element.on(g + s, function () { t.validateInput(t.element) }), t.element.is(f) && t.element.on("click" + s, function () { t.validateInput(t.element) })) : (t.element.on(g + s, p, function () { t.validateInput(e(this)) }), t.element.on("click" + s, f, function () { t.validateInput(e(this)) }))) }, validate: function () { var e, t, n, i = this, r = !1; if (i._errors = {}, !i.element.is(p)) { for (e = i.element.find(p), t = 0, n = e.length; n > t; t++) i.validateInput(e.eq(t)) || (r = !0); return !r } return i.validateInput(i.element) }, validateInput: function (t) { var i, r, a, o, s, c, u, p, f; return t = e(t), r = this, a = r._errorTemplate, o = r._checkValidity(t), s = o.valid, c = "." + l, u = t.attr(m) || "", p = r._findMessageContainer(u).add(t.next(c)).hide(), t.removeAttr("aria-invalid"), s || (i = r._extractMessage(t, o.key), r._errors[u] = i, f = e(a({ message: n(i) })), r._decorateMessageContainer(f, u), p.replaceWith(f).length || f.insertAfter(t), f.show(), t.attr("aria-invalid", !0)), t.toggleClass(d, !s), s }, hideMessages: function () { var e = this, t = "." + l, n = e.element; n.is(p) ? n.next(t).hide() : n.find(t).hide() }, _findMessageContainer: function (e) { var t, n = a.ui.validator.messageLocators, i = this.element.find("." + l + "[" + a.attr("for") + "=" + e.replace(x, "\\$1") + "]"); for (t in n) i = i.add(n[t].locate(this.element, e)); return i }, _decorateMessageContainer: function (e, t) { var n, i = a.ui.validator.messageLocators; e.addClass(l).attr(a.attr("for"), t || ""); for (n in i) i[n].decorate(e, t); e.attr("role", "alert") }, _extractMessage: function (t, n) { var i = this, r = i.options.messages[n], o = t.attr(m); return r = e.isFunction(r) ? r(t) : r, a.format(t.attr(a.attr(n + "-msg")) || t.attr("validationMessage") || t.attr("title") || r || "", o, t.attr(n)) }, _checkValidity: function (e) { var t, n = this.options.rules; for (t in n) if (!n[t](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 } }), a.ui.plugin(r) } (window.kendo.jQuery), function (e) { function t(e, t) { var n = e.x.location, i = e.y.location, r = t.x.location, a = t.y.location, o = n - r, s = i - a; return { center: { x: (n + r) / 2, y: (i + a) / 2 }, distance: Math.sqrt(o * o + s * s)} } function n(e) { var t, n, i, r = [], a = e.originalEvent, s = e.currentTarget, l = 0;
29 if (e.api) r.push({ id: 2, event: e, target: e.target, currentTarget: e.target, location: e }); else if (e.type.match(/touch/)) for (n = a ? a.changedTouches : [], t = n.length; t > l; l++) i = n[l], r.push({ location: i, event: e, target: i.target, currentTarget: s, id: i.identifier }); else o.pointers ? r.push({ location: a, event: e, target: e.target, currentTarget: s, id: a.pointerId }) : r.push({ id: 1, event: e, target: e.target, currentTarget: s, location: e }); return r } function i(t) { t.preventDefault(); var n = e(t.data.root), i = n.closest(".k-widget").parent(); i[0] || (i = n.parent()), i.trigger(e.Event(t.type, { target: n[0] })) } function r(e) { for (var t = a.eventMap.up.split(" "), n = 0, i = t.length; i > n; n++) e(t[n]) } var a = window.kendo, o = a.support, s = window.document, l = e(s.documentElement), d = a.Class, c = a.Observable, u = e.now, p = e.extend, f = o.mobileOS, h = f && f.android, g = o.browser.ie ? 5 : 0, m = "press", v = "select", _ = "start", b = "move", k = "end", w = "cancel", y = "tap", x = "release", C = "gesturestart", T = "gesturechange", S = "gestureend", F = "gesturetap", D = d.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 = u() }, move: function (e) { var t = this, n = e["page" + t.axis], i = u(), r = i - t.timeStamp || 1; (n || !h) && (t.delta = n - t.location, t._updateLocationData(e), t.initialDelta = n - t.startLocation, t.velocity = t.delta / r, t.timeStamp = i) }, _updateLocationData: function (e) { var t = this, n = t.axis; t.location = e["page" + n], t.client = e["client" + n], t.screen = e["screen" + n] } }), E = d.extend({ init: function (e, t, n) { var i = this; p(i, { x: new D("X", n.location), y: new D("Y", n.location), userEvents: e, target: t, currentTarget: n.currentTarget, initialTouch: n.target, id: n.id, _moved: !1, _finished: !1 }), i.notifyInit = function () { i._trigger(m, n) } }, move: function (e) { var t = this; if (!t._finished) { if (t.x.move(e.location), t.y.move(e.location), !t._moved) { if (t._withinIgnoreThreshold()) return; if (A.current && A.current !== t.userEvents) return t.dispose(); t._start(e) } t._finished || t._trigger(b, e) } }, end: function (e) { var t = this; t.endTime = u(), t._finished || (t._moved ? t._trigger(k, e) : t._trigger(y, e), t._trigger(x, e), t.dispose()) }, dispose: function () { var t = this, n = t.userEvents, i = n.touches; t._finished = !0, i.splice(e.inArray(t, i), 1) }, skip: function () { this.dispose() }, cancel: function () { this.dispose() }, isMoved: function () { return this._moved }, _start: function (e) { this.startTime = u(), this._moved = !0, this._trigger(_, e) }, _trigger: function (e, t) { var n = this, i = t.event, r = { touch: n, x: n.x, y: n.y, target: n.target, event: i }; n.userEvents.notify(e, r) && i.preventDefault() }, _withinIgnoreThreshold: function () { var e = this.x.initialDelta, t = this.y.initialDelta; return Math.sqrt(e * e + t * t) <= this.userEvents.threshold } }), A = c.extend({ init: function (t, n) { var i, s, d = this, u = a.guid(); n = n || {}, i = d.filter = n.filter, d.threshold = n.threshold || g, d.touches = [], d._maxTouches = n.multiTouch ? 2 : 1, d.allowSelection = n.allowSelection, d.eventNS = u, t = e(t).handler(d), c.fn.init.call(d), p(d, { element: t, surface: n.global ? l : e(n.surface || t), stopPropagation: n.stopPropagation, pressed: !1 }), d.surface.handler(d).on(a.applyEventMap("move", u), "_move").on(a.applyEventMap("up cancel", u), "_end"), t.on(a.applyEventMap("down", u), i, "_start"), o.pointers && t.css("-ms-touch-action", "pinch-zoom double-tap-zoom"), n.preventDragEvent && t.on(a.applyEventMap("dragstart", u), a.preventDefault), t.on(a.applyEventMap("mousedown selectstart", u), i, { root: t }, "_select"), o.eventCapture && (s = d.surface[0], d.preventIfMoving = function (e) { d._isMoved() && e.preventDefault() }, r(function (e) { s.addEventListener(e, d.preventIfMoving, !0) })), d.bind([m, y, _, b, k, x, w, C, T, S, F, v], n) }, destroy: function () { var e, t = this; o.eventCapture && (e = t.surface[0], r(function (n) { e.removeEventListener(n, t.preventIfMoving) })), t.element.kendoDestroy(t.eventNS), t.surface.kendoDestroy(t.eventNS), t.element.removeData("handler"), t.surface.removeData("handler"), t._disposeAll(), t.unbind() }, capture: function () { A.current = this }, cancel: function () { this._disposeAll(), this.trigger(w) }, notify: function (e, n) { var i = this, r = i.touches; if (this._isMultiTouch()) { switch (e) { case b: e = T; break; case k: e = S; break; case y: e = F } p(n, { touches: r }, t(r[0], r[1])) } return this.trigger(e, n) }, 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 () { e.each(this.touches, function () { this.dispose() }) }, _isMoved: function () { return e.grep(this.touches, function (e) { return e.isMoved() }).length }, _select: function (e) { (!this.allowSelection || this.trigger(v, { event: e })) && i(e) }, _start: function (t) { var i, r, a = this, o = 0, s = a.filter, l = n(t), d = l.length; if (!a._maxTouchesReached()) for (A.current = null, a.currentTarget = t.currentTarget, a.stopPropagation && t.stopPropagation(); d > o && !a._maxTouchesReached(); o++) r = l[o], i = s ? e(r.currentTarget) : a.element, i.length && (r = new E(a, i, r), a.touches.push(r), r.notifyInit(
29), a._isMultiTouch() && a.notify("gesturestart", {})) }, _move: function (e) { this._eachTouch("move", e) }, _end: function (e) { this._eachTouch("end", e) }, _eachTouch: function (e, t) { var i, r, a, o, s = this, l = {}, d = n(t), c = s.touches; for (i = 0; c.length > i; i++) r = c[i], l[r.id] = r; for (i = 0; d.length > i; i++) a = d[i], o = l[a.id], o && o[e](a) }, _apiCall: function (t, n, i, r) { this[t]({ api: !0, pageX: n, pageY: i, target: r || this.element, stopPropagation: e.noop, preventDefault: e.noop }) } }); a.getTouches = n, a.touchDelta = t, a.UserEvents = A } (window.kendo.jQuery), function (e, t) { 30 function n(t, n) { try { return e.contains(t, n) || t == n } catch (i) { return !1 } } function i(e) { return E ? m.elementFromPoint(e.x.screen, e.y.screen) : m.elementFromPoint(e.x.client, e.y.client) } function r(e, t) { return parseInt(e.css(t), 10) || 0 } function a(e, t) { return Math.min(Math.max(e, t.min), t.max) } function o(e, t) { var n = x(e), i = n.left + r(e, "borderLeftWidth") + r(e, "paddingLeft"), a = n.top + r(e, "borderTopWidth") + r(e, "paddingTop"), o = i + e.width() - t.outerWidth(!0), s = a + e.height() - t.outerHeight(!0); return { x: { min: i, max: o }, y: { min: a, max: s}} } function s(e, n, i) { for (var r, a, o = 0, s = n && n.length, l = i && i.length; e && e.parentNode; ) { for (o = 0; s > o; o++) if (r = n[o], r.element[0] === e) return { target: r, targetElement: e }; for (o = 0; l > o; o++) if (a = i[o], g.matchesSelector.call(e, a.options.filter)) return { target: a, targetElement: e }; e = e.parentNode } return t } var l, d, c, u, p, f, h = window.kendo, g = h.support, m = window.document, v = h.Class, _ = h.ui.Widget, b = h.Observable, k = h.UserEvents, w = e.proxy, y = e.extend, x = h.getOffset, C = {}, T = {}, S = {}, F = g.mobileOS, D = F && F.android, E = D && "chrome" == F.browser, A = "keyup", I = "change", H = "dragstart", N = "drag", R = "dragend", z = "dragcancel", O = "dragenter", M = "dragleave", P = "drop", B = b.extend({ init: function (t, n) { var i = this, r = t[0]; i.capture = !1, e.each(h.eventMap.down.split(" "), function () { r.addEventListener(this, w(i._press, i), !0) }), e.each(h.eventMap.up.split(" "), function () { r.addEventListener(this, w(i._release, i), !0) }), b.fn.init.call(i), i.bind(["press", "release"], n || {}) }, captureNext: function () { this.capture = !0 }, cancelCapture: function () { this.capture = !1 }, _press: function (e) { var t = this; t.trigger("press"), t.capture && e.preventDefault() }, _release: function (e) { var t = this; t.trigger("release"), t.capture && (e.preventDefault(), t.cancelCapture()) } }), L = b.extend({ init: function (t) { var n = this; b.fn.init.call(n), n.forcedEnabled = !1, e.extend(n, t), n.scale = 1, n.max = 0, n.horizontal ? (n.measure = "width", n.scrollSize = "scrollWidth", n.axis = "x") : (n.measure = "height", n.scrollSize = "scrollHeight", n.axis = "y") }, outOfBounds: function (e) { return e > this.max || this.min > e }, forceEnabled: function () { this.forcedEnabled = !0 }, getSize: function () { return this.container[this.measure]() }, getTotal: function () { return this.element[0][this.scrollSize] }, rescale: function (e) { this.scale = e }, update: function (e) { var t = this, n = t.getTotal(), i = n * t.scale, r = t.getSize(); t.size = r, t.total = i, t.min = Math.min(t.max, t.size - i), t.minScale = t.size / n, t.enabled = t.forcedEnabled || i > r, e || t.trigger(I, t) } }), V = b.extend({ init: function (e) { var t = this, n = w(t.refresh, t); b.fn.init.call(t), t.x = new L(y({ horizontal: !0 }, e)), t.y = new L(y({ horizontal: !1 }, e)), t.forcedMinScale = e.minScale, t.bind(I, e), h.onResize(n) }, rescale: function (e) { this.x.rescale(e), this.y.rescale(e), this.refresh() }, refresh: function () { var e = this; e.x.update(), e.y.update(), e.enabled = e.x.enabled || e.y.enabled, e.minScale = e.forcedMinScale || Math.max(e.x.minScale, e.y.minScale), e.trigger(I) } }), W = b.extend({ init: function (e) { var t = this; y(t, e), b.fn.init.call(t) }, dragMove: function (e) { var t = this, n = t.dimension, i = t.axis, r = t.movable, a = r[i] + e; n.enabled && ((n.min > a && 0 > e || a > n.max && e > 0) && (e *= t.resistance), r.translateAxis(i, e), t.trigger(I, t)) } }), U = v.extend({ init: function (e) { var t, n, i, r, a = this; y(a, { elastic: !0 }, e), i = a.elastic ? .5 : 0, r = a.movable, a.x = t = new W({ axis: "x", dimension: a.dimensions.x, resistance: i, movable: r }), a.y = n = new W({ axis: "y", dimension: a.dimensions.y, resistance: i, movable: r }), a.userEvents.bind(["move", "end", "gesturestart", "gesturechange"], { gesturestart: function (e) { a.gesture = e }, gesturechange: function (e) { var i, o = a.gesture, s = o.center, l = e.center, d = e.distance / o.distance, c = a.dimensions.minScale; c >= r.scale && 1 > d && (d += .8 * (1 - d)), i = { x: (r.x - s.x) * d + l.x - r.x, y: (r.y - s.y) * d + l.y - r.y }, r.scaleWith(d), t.dragMove(i.x), n.dragMove(i.y), a.dimensions.rescale(r.scale), a.gesture = e }, move: function (e) { e.event.target.tagName.match(/textarea|input/i) || (t.dimension.enabled || n.dimension.enabled ? (t.dragMove(e.x.delta), n.dragMove(e.y.delta), e.preventDefault()) : e.touch.skip()) }, end: function (e) { e.preventDefault() } }) } }), q = g.transitions.prefix + "Transform", j = Math.round; d = g.hasHW3D ? function (e, t, n) { return "translate3d(" + j(e) + "px," + j(t) + "px,0) scale(" + n + ")" } : function (e, t, n) { return "translate(" + j(e) + "px," + j(t) + "px) scale(" + n + ")" }, c = b.extend({ init: function (t) { var n = this; b.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(d(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) { y(this, e), this.refresh() }, refresh: function () { var e = this, t = d(e.x, e.y, e.scale); t != e.coordinates && (e.element[0].style[q] = t, e._saveCoordinates(t), e.trigger(I)) }, _saveCoordinates: function (e) { this.coordinates = e } }), u = _.extend({ init: function (e, t) { var n, i = this; _.fn.init.call(i, e, t), n = i.options.group, n in T ? T[n].push(i) : T[n] = [i] }, events: [O, M, P], options: { name: "DropTarget", group: "default" }, destroy: function () { var e, t = this.options.group, n = T[t] || S[t]; if (n.length > 1) { for (_.fn.destroy.call(this), e = 0; n.length > e; e++) if (n[e] == this) { n.splice(e, 1); break } } else u.destroyGroup(t) }, _trigger: function (e, n) { var i = this, r = C[i.options.group]; return r ? i.trigger(e, y({}, n.event, { draggable: r, dropTarget: n.dropTarget })) : t }, _over: function (e) { this._trigger(O, e) }, _out: function (e) { this._trigger(M, e) }, _drop: function (e) { var t = this, n = C[t.options.group]; n && (n.dropped = !t._trigger(P, e)) } }), u.destroyGroup = function (e) { var t, n = T[e] || S[e]; if (n) { for (t = 0; n.length > t; t++) _.fn.destroy.call(n[t]); n.length = 0, delete T[e], delete S[e] } }, u._cache = T, p = u.extend({ init: function (e, t) { var n, i = this; _.fn.init.call(i, e, t), n = i.options.group, n in S ? S[n].push(i) : S[n] = [i] }, options: { name: "DropTargetArea", group: "default", filter: null} }), f = _.extend({ init: function (e, t) { var n = this; _.fn.init.call(n, e, t), n.userEvents = new k(n.element, { global: !0, stopPropagation: !0, filter: n.options.filter, threshold: n.options.distance, start: w(n._start, n), move: w(n._drag, n), end: w(n._end, n), cancel: w(n._cancel, n) }), n._afterEndHandler = w(n._afterEnd, n), n.captureEscape = function (e) { e.keyCode === h.keys.ESC && (n._trigger(z, { event: e }), n.userEvents.cancel()) } }, events: [H, N, R, z], options: { name: "Draggable", distance: 5, group: "default", cursorOffset: null, axis: null, container: null, dropped: !1 }, _updateHint: function (t) { 31 var n, i = this, r = i.options, o = i.boundaries, s = r.axis, l = i.options.cursorOffset; 32 l ? n = { left: t.x.location + l.left, top: t.y.location + l.top} : (i.hintOffset.left += t.x.delta, i.hintOffset.top += t.y.delta, n = e.extend({}, i.hintOffset)), o && (n.top = a(n.top, o.y), n.left = a(n.left, o.x)), "x" === s ? delete n.top : "y" === s && delete n.left, i.hint.css(n) 33 }, _start: function (t) { var n, i = this, r = i.options, a = r.container, s = r.hint;
33 i.currentTarget = t.target, i.currentTargetOffset = x(i.currentTarget), s && (i.hint && i.hint.stop(!0, !0).remove(), i.hint = e.isFunction(s) ? e(s.call(i, i.currentTarget)) : s, n = x(i.currentTarget), i.hintOffset = n, i.hint.css({ position: "absolute", zIndex: 2e4, left: n.left, top: n.top }).appendTo(m.body)), C[r.group] = i, i.dropped = !1, a && (i.boundaries = o(a, i.hint)), i._trigger(H, t) && (i.userEvents.cancel(), i._afterEnd()), e(m).on(A, i.captureEscape) }, _drag: function (n) { var i = this; n.preventDefault(), i._withDropTarget(n, function (i, r) { if (!i) return l && (l._trigger(M, y(n, { dropTarget: e(l.targetElement) })), l = null), t; if (l) { if (r === l.targetElement) return; l._trigger(M, y(n, { dropTarget: e(l.targetElement) })) } i._trigger(O, y(n, { dropTarget: e(r) })), l = y(i, { targetElement: r }) }), i._trigger(N, n), i.hint && i._updateHint(n) }, _end: function (t) { var n = this; n._withDropTarget(t, function (n, i) { n && (n._drop(y({}, t, { dropTarget: e(i) })), l = null) }), n._trigger(R, t), n._cancel(t.event) }, _cancel: function () { var e = this; e.hint && !e.dropped ? setTimeout(function () { e.hint.stop(!0, !0).animate(e.currentTargetOffset, "fast", e._afterEndHandler) }, 0) : e._afterEnd() }, _trigger: function (e, t) { var n = this; return n.trigger(e, y({}, t.event, { x: t.x, y: t.y, currentTarget: n.currentTarget, dropTarget: t.dropTarget })) }, _withDropTarget: function (e, t) { var r, a, o = this, l = o.options, d = T[l.group], c = S[l.group]; (d && d.length || c && c.length) && (r = i(e), o.hint && n(o.hint[0], r) && (o.hint.hide(), r = i(e), r || (r = i(e)), o.hint.show()), a = s(r, d, c), a ? t(a.target, a.targetElement) : t()) }, destroy: function () { var e = this; _.fn.destroy.call(e), e._afterEnd(), e.userEvents.destroy() }, _afterEnd: function () { var t = this; t.hint && t.hint.remove(), delete C[t.options.group], t.trigger("destroy"), e(m).off(A, t.captureEscape) } 34 }), h.ui.plugin(u), h.ui.plugin(p), h.ui.plugin(f), h.TapCapture = B, h.containerBoundaries = o, y(h.ui, { Pane: U, PaneDimensions: V, Movable: c }) 35} (window.kendo.jQuery), function (e) { var t = window.kendo, n = t.mobile, i = t.effects, r = n.ui, a = e.proxy, o = e.extend, s = r.Widget, l = t.Class, d = t.ui.Movable, c = t.ui.Pane, u = t.ui.PaneDimensions, p = i.Transition, f = i.Animation, h = Math.abs, g = 500, m = .7, v = .93, _ = .5, b = "km-scroller-release", k = "km-scroller-refresh", w = "pull", y = "change", x = "resize", C = "scroll", T = f.extend({ init: function (e) { var t = this; f.fn.init.call(t), o(t, e), t.userEvents.bind("gestureend", a(t.start, t)), t.tapCapture.bind("press", a(t.cancel, t)) }, done: function () { return .01 > this.dimensions.minScale - this.movable.scale }, 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) } }), S = f.extend({ init: function (e) { var t = this; f.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", a(t.start, t)), t.userEvents.bind("gestureend", a(t.start, t)), t.userEvents.bind("tap", a(t.onEnd, t)) }, onCancel: function () { this.transition.cancel() }, freeze: function (e) { var t = this; t.cancel(), t._moveTo(e) }, onEnd: function () { var e = this; e._outOfBounds() ? e._snapBack() : e._end() }, done: function () { return 1 > h(this.velocity) }, start: function (e) { var t = this; t.dimension.enabled && (t._outOfBounds() ? t._snapBack() : (t.velocity = 16 * e.touch[t.axis].velocity, t.velocity && (t.tapCapture.captureNext(), f.fn.start.call(t)))) }, tick: function () { var e = this, t = e.dimension, n = e._outOfBounds() ? _ : v, i = e.velocity *= n, r = e.movable[e.axis] + i; !e.elastic && t.outOfBounds(r) && (r = Math.max(Math.min(r, t.max), t.min), e.velocity = 0), e.movable.moveAxis(e.axis, r) }, _end: function () { this.tapCapture.cancelCapture(), this.end() }, _outOfBounds: function () { return this.dimension.outOfBounds(this.movable[this.axis]) }, _snapBack: function () { var e = this, t = e.dimension, n = e.movable[e.axis
35] > t.max ? t.max : t.min; e._moveTo(n) }, _moveTo: function (e) { this.transition.moveTo({ location: e, duration: g, ease: p.easeOutExpo }) } }), F = l.extend({ init: function (t) { var n = this, i = "x" === t.axis, r = e('<div class="km-touch-scrollbar km-' + (i ? "horizontal" : "vertical") + '-scrollbar" />'); o(n, t, { element: r, elementSize: 0, movable: new d(r), scrollMovable: t.movable, size: i ? "width" : "height" }), n.scrollMovable.bind(y, a(n._move, n)), n.container.append(r) }, _move: function () { var e = this, t = e.axis, n = e.dimension, i = n.size, r = e.scrollMovable, a = i / n.total, o = Math.round(-r[t] * a), s = Math.round(i * a); o + s > i ? s = i - o : 0 > o && (s += o, o = 0), e.elementSize != s && (e.element.css(e.size, s + "px"), e.elementSize = s), e.movable.moveAxis(t, o) }, show: function () { this.element.css({ opacity: m, visibility: "visible" }) }, hide: function () { this.element.css({ opacity: 0 }) } }), D = s.extend({ init: function (n, i) { var r, a, l, p, f, g, m, v = this; return s.fn.init.call(v, n, i), n = v.element, v.options.useNative && t.support.hasNativeScrolling ? (n.addClass("km-native-scroller").prepend('<div class="km-scroll-header"/>'), o(v, { scrollElement: n, fixedContainer: n.children().first() }), undefined) : (n.css("overflow", "hidden").addClass("km-scroll-wrapper").wrapInner('<div class="km-scroll-container"/>').prepend('<div class="km-scroll-header"/>'), r = n.children().eq(1), a = new t.TapCapture(n), l = new d(r), p = new u({ element: r, container: n, forcedEnabled: v.options.zoom, change: function () { v.trigger(x) } }), f = new t.UserEvents(n, { allowSelection: !0, preventDragEvent: !0, multiTouch: v.options.zoom, start: function (e) { p.refresh(); var t = h(e.x.velocity), n = h(e.y.velocity); p.x.enabled && 2 * t >= n || p.y.enabled && 2 * n >= t ? f.capture() : f.cancel() } }), g = new c({ movable: l, dimensions: p, userEvents: f, elastic: v.options.elastic }), m = new T({ movable: l, dimensions: p, userEvents: f, tapCapture: a }), l.bind(y, function () { v.scrollTop = -l.y, v.scrollLeft = -l.x, v.trigger(C, { scrollTop: v.scrollTop, scrollLeft: v.scrollLeft }) }), o(v, { movable: l, dimensions: p, zoomSnapBack: m, userEvents: f, pane: g, tapCapture: a, pulled: !1, scrollElement: r, fixedContainer: n.children().first() }), v._initAxis("x"), v._initAxis("y"), p.refresh(), v.options.pullToRefresh && v._initPullToRefresh(), t.onResize(e.proxy(v.reset, v)), undefined) }, scrollHeight: function () { return this.scrollElement[0].scrollHeight }, scrollWidth: function () { return this.scrollElement[0].scrollWidth }, options: { name: "Scroller", zoom: !1, pullOffset: 140, elastic: !0, useNative: !1, pullTemplate: "Pull to refresh", releaseTemplate: "Release to refresh", refreshTemplate: "Refreshing" }, events: [w, C, x], setOptions: function (e) { var t = this; s.fn.setOptions.call(t, e), e.pullToRefresh && t._initPullToRefresh() }, reset: function () { this.movable.moveTo({ x: 0, y: 0 }) }, scrollTo: function (e, t) { this.movable.moveTo({ x: e, y: t }) }, pullHandled: function () { var e = this; e.refreshHint.removeClass(k), e.hintContainer.html(e.pullTemplate({})), e.yinertia.onEnd(), e.xinertia.onEnd() }, destroy: function () { s.fn.destroy.call(this), this.userEvents.destroy() }, _initPullToRefresh: function () { var e = this; e.dimensions.y.forceEnabled(), e.pullTemplate = t.template(e.options.pullTemplate), e.releaseTemplate = t.template(e.options.releaseTemplate), e.refreshTemplate = t.template(e.options.refreshTemplate), e.scrollElement.prepend('<span class="km-scroller-pull"><span class="km-icon"></span><span class="km-template">' + e.pullTemplate({}) + "</span></span>"), e.refreshHint = e.scrollElement.children().first(), e.hintContainer = e.refreshHint.children(".km-template"), e.pane.y.bind("change", a(e._paneChange, e)), e.userEvents.bind("end", a(e._dragEnd, e)) }, _dragEnd: function () { var e = this; e.pulled && (e.pulled = !1, e.refreshHint.removeClass(b).addClass(k), e.hintContainer.html(e.refreshTemplate({})), e.yinertia.freeze(e.options.pullOffset / 2), e.trigger("pull")) }, _paneChange: function () { var e = this; e.movable.y / _ > e.options.pullOffset ? e.pulled || (e.pulled = !0, e.refreshHint.removeClass(k).addClass(b), e.hintContainer.html(e.releaseTemplate({}))) : e.pulled && (e.pulled = !1, e.refreshHint.removeClass(b), e.hintContainer.html(e.pullTemplate({}))) }, _initAxis: function (e) { var t = this, n = t.movable, i = t.dimensions[e], r = t.tapCapture, a = new F({ axis: e, movable: n, dimension: i, container: t.element }), o = new S({ axis: e, movable: n, tapCapture: r, userEvents: t.userEvents, dimension: i, elastic: t.options.elastic, end: function () { a.hide() } }); t[e + "inertia"] = o, t.pane[e].bind(y, function () { a.show() }) } }); r.plugin(D) } (window.kendo.jQuery), function (e) { function t(e) { return e.position().top + 3 } var n = window.kendo, i = n.ui.Widget, r = e.proxy, a = ".kendoGroupable", o = n.template('<div class="k-group-indicator" data-#=data.ns#field="${data.field}" data-#=data.ns#title="${data.title || ""}" data-#=data.ns#dir="${data.dir || "asc"}"><a href="\\#" class="k-link"><span class="k-icon k-si-arrow-${(data.dir || "asc") == "asc" ? "n" : "s"}">(sorted ${(data.dir || "asc") == "asc" ? "ascending": "descending"})</span>${data.title ? data.title: data.field}</a><a class="k-button k-button-icon k-button-bare"><span class="k-icon k-group-delete"></span></a></div>', { useWithBlock: !1 }), s = function (t) { return e('<div class="k-header k-drag-clue" />').css({ width: t.width(), paddingLeft: t.css("paddingLeft"), paddingRight: t.css("paddingRight"), lineHeight: t.height() + "px", paddingTop: t.css("paddingTop"), paddingBottom: t.css("paddingBottom") }).html(t.attr(n.attr("title")) || t.attr(n.attr("field"))).prepend('<span class="k-icon k-drag-status k-denied" />') }, l = e('<div class="k-grouping-dropclue"/>'), d = /("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g, c = i.extend({ init: function (o, d) { var c, u, p = this, f = n.guid(), h = r(p._intializePositions, p), g = p._dropCuePositions = []; i.fn.init.call(p, o, d), p.draggable = u = p.options.draggable || new n.ui.Draggable(p.element, { filter: p.options.draggableElements, hint: s, group: f }), c = p.groupContainer = e(p.options.groupContainer, p.element).kendoDropTarget({ group: u.options.group, dragenter: function (e) { p._canDrag(e.draggable.currentTarget) && (e.draggable.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add"), l.css({ top: t(c), left: 0 }).appendTo(c)) }, dragleave: function (e) { e.draggable.hint.find(".k-drag-status").removeClass("k-add").addClass("k-denied"), l.remove() }, drop: function (t) { var i, r = t.draggable.currentTarget, a = r.attr(n.attr("field")), o = r.attr(n.attr("title")), s = p.indicator(a), d = p._dropCuePositions, c = d[d.length - 1]; (r.hasClass("k-group-indicator") || p._canDrag(r)) && (c ? (i = p._dropCuePosition(n.getOffset(l).left + parseInt(c.element.css("marginLeft"), 10) + parseInt(c.element.css("marginRight"), 10)), i && p._canDrop(e(s), i.element, i.left) && (i.before ? i.element.before(s || p.buildIndicator(a, o)) : i.element.after(s || p.buildIndicator(a, o)), p._change())) : (p.groupContainer.append(p.buildIndicator(a, o)), p._change())) } }).kendoDraggable({ filter: "div.k-group-indicator", hint: s, group: u.options.group, dragcancel: r(p._dragCancel, p), dragstart: function (e) { var n = e.currentTarget, i = parseInt(n.css("marginLeft"), 10), r = n.position().left - i; h(), l.css({ top: t(c), left: r }).appendTo(c), this.hint.find(".k-drag-status").removeClass("k-denied").addClass("k-add") }, dragend: function () { p._dragEnd(this) }, drag: r(p._drag, p) }).on("click" + a, ".k-button", function (t) { t.preventDefault(), p._removeIndicator(e(this).parent()) }).on("click" + a, ".k-link", function (t) { var i = e(this).parent(), r = p.buildIndicator(i.attr(n.attr("field")), i.attr(n.attr("title")), "asc" == i.attr(n.attr("dir")) ? "desc" : "asc"); i.before(r).remove(), p._change(), t.preventDefault() }), u.bind(["dragend", "dragcancel", "dragstart", "drag"], { dragend: function () { p._dragEnd(this) }, dragcancel: r(p._dragCancel, p), dragstart: function (e) { var t, n, i; return p.options.allowDrag || p._canDrag(e.currentTarget) ? (h(), g.length ? (t = g[g.length - 1].element, n = parseInt(t.css("marginRight"), 10), i = t.position().left + t.outerWidth() + n) : i = 0, undefined) : (e.preventDefault(), undefined) }, drag: r(p._drag, p) }), p.dataSource = p.options.dataSource, p.dataSource && (p._refreshHandler = r(p.refresh, p), p.dataSource.bind("change", p._refreshHandler)) }, refresh: function () { var t = this, i = t.dataSource; t.groupContainer.empty().append(e.map(i.group() || [], function (e) { var i = e.field.replace(d, "\\$1"), r = t.element.find(t.options.filter).filter("[" + n.attr("field") + "=" + i + "]"); return t.buildIndicator(e.field, r.attr(n.attr("title")), e.dir) }).join("")), t._invalidateGroupContainer() }, destroy: function () { var e = this; i.fn.destroy.call(e), e.groupContainer.off(a).kendoDropTarget("destroy").kendoDraggable("destroy"), e.options.draggable || e.draggable.destroy(), e.dataSource && e._refreshHandler && e.dataSource.unbind("change", e._refreshHandler) }, options: { name: "Groupable", filter: "th", draggableElements: "th", messages: { empty: "Drag a column header and drop it here to group by that column"} }, indicator: function (t) { var i = e(".k-group-indicator", this.groupContainer); return e.grep(i, function (i) { return e(i).attr(n.attr("field")) === t })[0] }, buildIndicator: function (e, t, i) { return o({ field: e.replace(/"/g, "'"), dir: i, title: t, ns: n.ns }) }, descriptors: function () { var t, i, r, a, o, s = this, l = e(".k-group-indicator", s.groupContainer); return t = s.element.find(s.options.filter).map(function () { var t = e(this), r = t.attr(n.attr("aggregates")), s = t.attr(n.attr("field")); if (r && "" !== r) for (i = r.split(","), r = [], a = 0, o = i.length; o > a;
35 a++) r.push({ field: s, aggregate: i[a] }); return r }).toArray(), e.map(l, function (i) { return i = e(i), r = i.attr(n.attr("field")), { field: r, dir: i.attr(n.attr("dir")), aggregates: t || []} }) }, _removeIndicator: function (e) { var t = this; e.remove(), t._invalidateGroupContainer(), t._change() }, _change: function () { var e = this; e.dataSource && e.dataSource.group(e.descriptors()) }, _dropCuePosition: function (t) { var n, i, r, a, o = this._dropCuePositions; if (l.is(":visible") && 0 !== o.length) return t = Math.ceil(t), n = o[o.length - 1], i = n.right, r = parseInt(n.element.css("marginLeft"), 10), a = parseInt(n.element.css("marginRight"), 10), t >= i ? t = { left: n.element.position().left + n.element.outerWidth() + a, element: n.element, before: !1} : (t = e.grep(o, function (e) { return t >= e.left && e.right >= t })[0], t && (t = { left: t.element.position().left - r, element: t.element, before: !0 })), t }, _drag: function (e) { var t = this._dropCuePosition(e.x.location); t && l.css({ left: t.left }) }, _canDrag: function (e) { var t = e.attr(n.attr("field")); return "false" != e.attr(n.attr("groupable")) && t && (e.hasClass("k-group-indicator") || !this.indicator(t)) }, _canDrop: function (e, t, n) { var i = e.next(); return e[0] !== t[0] && (!i[0] || t[0] !== i[0] || n > i.position().left) }, _dragEnd: function (t) { var i = this, r = t.currentTarget.attr(n.attr("field")), a = i.indicator(r); t !== i.options.draggable && !t.dropped && a && i._removeIndicator(e(a)), i._dragCancel() }, _dragCancel: function () { l.remove(), this._dropCuePositions = [] }, _intializePositions: function () { var t, i = this, r = e(".k-group-indicator", i.groupContainer); i._dropCuePositions = e.map(r, function (i) { return i = e(i), t = n.getOffset(i).left, { left: parseInt(t, 10), right: parseInt(t + i.outerWidth(), 10), element: i} }) }, _invalidateGroupContainer: function () { var e = this.groupContainer; e.is(":empty") && e.html(this.options.messages.empty) } }); n.ui.plugin(c) } (window.kendo.jQuery), function (e) { function t(t, n) { t = e(t), n ? t.find(".k-drag-status").removeClass("k-add").addClass("k-denied") : t.find(".k-drag-status").removeClass("k-denied").addClass("k-add") } var n = window.kendo, i = n.ui.Widget, r = "change", a = "k-reorderable", o = i.extend({ init: function (o, s) { var l, d = this, c = n.guid() + "-reorderable"; i.fn.init.call(d, o, s), o = d.element.addClass(a), s = d.options, d.draggable = l = s.draggable || new n.ui.Draggable(o, { group: c, filter: s.filter, hint: s.hint }), d.reorderDropCue = e('<div class="k-reorder-cue"><div class="k-icon k-i-arrow-s"></div><div class="k-icon k-i-arrow-n"></div></div>'), o.find(l.options.filter).kendoDropTarget({ group: l.options.group, dragenter: function (e) { if (d._draggable) { var i, r = this.element, a = r[0] === d._draggable[0]; t(e.draggable.hint, a), a || (i = n.getOffset(r), d.reorderDropCue.css({ height: r.outerHeight(), top: i.top, left: i.left + (r.index() > d._draggable.index() ? r.outerWidth() : 0) }).appendTo(document.body)) } }, dragleave: function (e) { t(e.draggable.hint, !0), d.reorderDropCue.remove() }, drop: function () { if (d._draggable) { var e, t = d._draggable[0], n = this.element[0]; t !== n && (e = o.find(l.options.filter), d.trigger(r, { element: d._draggable, oldIndex: e.index(t), newIndex: e.index(n) })) } } }), l.bind(["dragcancel", "dragend", "dragstart"], { dragcancel: function () { d.reorderDropCue.remove(), d._draggable = null }, dragend: function () { d.reorderDropCue.remove(), d._draggable = null }, dragstart: function (e) { d._draggable = e.currentTarget } }) }, options: { name: "Reorderable", filter: "*" }, events: [r], destroy: function () { var e = this; i.fn.destroy.call(e), e.draggable && e.draggable.destroy(), n.destroy(e.element) } }); n.ui.plugin(o) } (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = n.ui, r = i.Widget, a = e.proxy, o = e.isFunction, s = e.extend, l = "horizontal", d = "vertical", c = "start", u = "resize", p = "resizeend", f = r.extend({ init: function (e, t) { var n = this; r.fn.init.call(n, e, t), n.orientation = n.options.orientation.toLowerCase() != d ? l : d, n._positionMouse = n.orientation == l ? "x" : "y", n._position = n.orientation == l ? "left" : "top", n._sizingDom = n.orientation == l ? "outerWidth" : "outerHeight", n.draggable = new i.Draggable(e, { distance: 0, filter: t.handle, drag: a(n._resize, n), dragcancel: a(n._cancel, n), dragstart: a(n._start, n), dragend: a(n._stop, n) }), n.userEvents = n.draggable.userEvents }, events: [u, p, c], options: { name: "Resizable", orientation: l }, _max: function (e) { var n = this, i = n.hint ? n.hint[n._sizingDom]() : 0, r = n.options.max; return o(r) ? r(e) : r !== t ? n._initialElementPosition + r - i : r }, _min: function (e) { var n = this, i = n.options.min; return o(i) ? i(e) : i !== t ? n._initialElementPosition + i : i }, _start: function (t) { var n = this, i = n.options.hint, r = e(t.currentTarget); n._initialElementPosition = r.position()[n._position], n._initialMousePosition = t[n._positionMouse].startLocation, i && (n.hint = o(i) ? e(i(r)) : i, n.hint.css({ position: "absolute" }).css(n._position, n._initialElementPosition).appendTo(n.element)), n.trigger(c, t), n._maxPosition = n._max(t), n._minPosition = n._min(t), e(document.body).css("cursor", r.css("cursor")) }, _resize: function (n) { var i, r = this, a = (e(n.currentTarget), r._maxPosition), o = r._minPosition, l = r._initialElementPosition + (n[r._positionMouse].location - r._initialMousePosition); i = o !== t ? Math.max(o, l) : l, r.position = i = a !== t ? Math.min(a, i) : i, r.hint && r.hint.toggleClass(r.options.invalidClass || "", i == a || i == o).css(r._position, i), r.resizing = !0, r.trigger(u, s(n, { position: i })) }, _stop: function (t) { var n = this; n.hint && n.hint.remove(), n.resizing = !1, n.trigger(p, s(t, { position: n.position })), e(document.body).css("cursor", "") }, _cancel: function (e) { var n = this; n.hint && (n.position = t, n.hint.css(n._position, n._initialElementPosition), n._stop(e)) }, destroy: function () { var e = this; r.fn.destroy.call(e), e.draggable && e.draggable.destroy() }, press: function (e) { if (e) { var t = e.position(), n = this; n.userEvents.press(t.left, t.top, e[0]), n.targetPosition = t, n.target = e } }, move: function (e) { var n = this, i = n._position, r = n.targetPosition, a = n.position; a === t && (a = r[i]), r[i] = a + e, n.userEvents.move(r.left, r.top) }, end: function () { this.userEvents.end(), this.target = this.position = t } }); n.ui.plugin(f) } (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = e.proxy, r = "dir", a = "asc", o = "single", s = "field", l = "desc", d = ".kendoSortable", c = ".k-link", u = "aria-sort", p = n.ui.Widget, f = p.extend({ init: function (e, t) { var n, r = this; p.fn.init.call(r, e, t), r._refreshHandler = i(r.refresh, r), r.dataSource = r.options.dataSource.bind("change", r._refreshHandler), n = r.element.find(c), n[0] || (n = r.element.wrapInner('<a class="k-link" href="#"/>').find(c)), r.link = n, r.element.on("click" + d, i(r._click, r)) }, options: { name: "Sortable", mode: o, allowUnsort: !0 }, destroy: function () { var e = this; p.fn.destroy.call(e), e.element.off(d), e.dataSource.unbind("change", e._refreshHandler) }, refresh: function () { var t, i, o, d, c = this, p = c.dataSource.sort() || [], f = c.element, h = f.attr(n.attr(s)); for (f.removeAttr(n.attr(r)), f.removeAttr(u), t = 0, i = p.length; i > t;
35 t++) o = p[t], h == o.field && f.attr(n.attr(r), o.dir); d = f.attr(n.attr(r)), f.find(".k-i-arrow-n,.k-i-arrow-s").remove(), d === a ? (e('<span class="k-icon k-i-arrow-n" />').appendTo(c.link), f.attr(u, "ascending")) : d === l && (e('<span class="k-icon k-i-arrow-s" />').appendTo(c.link), f.attr(u, "descending")) }, _click: function (e) { var i, d, c = this, u = c.element, p = u.attr(n.attr(s)), f = u.attr(n.attr(r)), h = c.options, g = c.dataSource.sort() || []; if (f = f === a ? l : f === l && h.allowUnsort ? t : a, h.mode === o) g = [{ field: p, dir: f}]; else if ("multiple" === h.mode) { for (i = 0, d = g.length; d > i; i++) if (g[i].field === p) { g.splice(i, 1); break } g.push({ field: p, dir: f }) } e.preventDefault(), c.dataSource.sort(g) } }); n.ui.plugin(f) } (window.kendo.jQuery), function (e) { function t(e, t) { var n = r.getOffset(e), i = t.left + t.width, a = t.top + t.height; return n.right = n.left + e.outerWidth(), n.bottom = n.top + e.outerHeight(), !(n.left > i || n.right < t.left || n.top > a || n.bottom < t.top) } function n(e, n, i, r) { var a, o, s; for (a = 0, o = e.length; o > a; a++) s = e.eq(a), t(s, i) ? s.hasClass(d) ? r && n !== s[0] && s.removeClass(d).addClass(h) : s.hasClass(c) || s.hasClass(h) || s.addClass(c) : s.hasClass(c) ? s.removeClass(c) : r && s.hasClass(h) && s.removeClass(h).addClass(d) } var i, r = window.kendo, a = r.ui.Widget, o = e.proxy, s = Math.abs, l = "aria-selected", d = "k-state-selected", c = "k-state-selecting", u = "k-selectable", p = "change", f = ".kendoSelectable", h = "k-state-unselecting", g = !1; (function (e) { (function () { e('<div class="parent"><span /></div>').on("click", ">*", function () { g = !0 }).find("span").click().end().off() })() })(e), i = a.extend({ init: function (t, n) { var i, s = this; a.fn.init.call(s, t, n), s._marquee = e("<div class='k-marquee'></div>"), s._lastActive = null, s.element.addClass(u), i = s.options.multiple, s.userEvents = new r.UserEvents(s.element, { global: !0, allowSelection: !0, filter: (g ? "" : "." + u + " ") + s.options.filter, tap: o(s._tap, s) }), i && s.userEvents.bind("start", o(s._start, s)).bind("move", o(s._move, s)).bind("end", o(s._end, s)).bind("select", o(s._select, s)) }, events: [p], options: { name: "Selectable", filter: ">*", multiple: !1 }, _tap: function (t) { var n, i = e(t.target), r = this, a = t.event.ctrlKey || t.event.metaKey, o = r.options.multiple, s = o && t.event.shiftKey, l = t.event.which, c = t.event.button; i.closest("." + u)[0] !== r.element[0] || l && 3 == l || c && 2 == c || (n = i.hasClass(d), o && a || r.clear(), s ? r.selectRange(r._firstSelectee(), i) : (n && a ? (r._unselect(i), r._notify(p)) : r.value(i), r._lastActive = r._downTarget = i)) }, _start: function (t) { var n = this, i = e(t.target), r = i.hasClass(d), a = t.event.ctrlKey || t.event.metaKey; return n._downTarget = i, i.closest("." + u)[0] !== n.element[0] ? (n.userEvents.cancel(), n._downTarget = null, undefined) : (n._marquee.appendTo(document.body).css({ left: t.x.client + 1, top: t.y.client + 1, width: 0, height: 0 }), a || n.clear(), r && (n._selectElement(i, !0), a && i.addClass(h)), undefined) }, _move: function (e) { var t = this, i = { left: e.x.startLocation > e.x.location ? e.x.location : e.x.startLocation, top: e.y.startLocation > e.y.location ? e.y.location : e.y.startLocation, width: s(e.x.initialDelta), height: s(e.y.initialDelta) }, r = t.element.find(t.options.filter); t._marquee.css(i), n(r, t._downTarget[0], i, e.event.ctrlKey || e.event.metaKey), e.preventDefault() }, _end: function () { var e = this; e._marquee.remove(), e._unselect(e.element.find(e.options.filter + "." + h)).removeClass(h), e.value(e.element.find(e.options.filter + "." + c)), e._lastActive = e._downTarget }, value: function (e) { var t = this, n = o(t._selectElement, t); return e ? (e.each(function () { n(this) }), t._notify(p), undefined) : t.element.find(t.options.filter + "." + d) }, _firstSelectee: function () { var e, t = this; return null !== t._lastActive ? t._lastActive : (e = t.value(), e.length > 0 ? e[0] : t.element.find(t.options.filter)) }, _selectElement: function (t, n) { var i = e(t), r = !n && this._notify("select", { element: t }); i.removeClass(c), r || (i.addClass(d), this.options.aria && i.attr(l, !0)) }, _notify: function (e, t) { return t = t || {}, this.trigger(e, t) }, _unselect: function (e) { return e.removeClass(d), this.options.aria && e.attr(l, !1), e }, _select: function (t) { e(t.event.target).is("input,a,textarea") ? (this.userEvents.cancel(), this._downTarget = null) : t.preventDefault() }, clear: function () { var e = this.element.find(this.options.filter + "." + d); this._unselect(e) }, selectRange: function (t, n) { var i, r, a, s, l = this, c = !1, u = l.element.find(l.options.filter), f = o(l._selectElement, l); for (t = e(t)[0], n = e(n)[0], i = 0, r = u.length; r > i; i++) s = u[i], c ? (f(s), c = s !== n) : s === t ? (c = t !== n, f(s)) : s === n ? (a = t, t = n, n = a, c = !0, f(s)) : e(s).removeClass(d); l._notify(p) }, destroy: function () { var e = this; a.fn.destroy.call(e), e.element.off(f), e.userEvents.destroy() } }), r.ui.plugin(i) } (window.kendo.jQuery), function (e, t) { function n(e, t, n, i) { return e({ idx: t, text: n, ns: d.ns, numeric: i }) } function i(e, t) { return y({ className: e.substring(1), text: t }) } function r(e, t, n, i) { e.find(t).parent().attr(d.attr("page"), n).attr("tabindex", -1).toggleClass("k-state-disabled", i) } function a(e, t) { r(e, f, 1, 1 >= t) } function o(e, t) { r(e, g, Math.max(1, t - 1), 1 >= t) } function s(e, t, n) { r(e, m, Math.min(n, t + 1), t >= n) } function l(e, t, n) { r(e, h, n, t >= n) } var d = window.kendo, c = d.ui, u = c.Widget, p = e.proxy, f = ".k-i-seek-w", h = ".k-i-seek-e", g = ".k-i-arrow-w", m = ".k-i-arrow-e", v = "change", _ = ".kendoPager", b = "click", k = "keydown", w = "disabled", y = d.template('<a href="\\#" title="#=text#" class="k-link"><span class="k-icon #= className #">#=text#</span></a>'), x = u.extend({ init: function (t, n) { var r, c, w = this; u.fn.init.call(w, t, n), n = w.options, w.dataSource = d.data.DataSource.create(n.dataSource), w.linkTemplate = d.template(w.options.linkTemplate), w.selectTemplate = d.template(w.options.selectTemplate), r = w.page(
35), c = w.totalPages(), w._refreshHandler = p(w.refresh, w), w.dataSource.bind(v, w._refreshHandler), n.previousNext && (w.element.find(f).length || (w.element.append(i(f, n.messages.first)), a(w.element, r, c)), w.element.find(g).length || (w.element.append(i(g, n.messages.previous)), o(w.element, r, c))), n.numeric && (w.list = w.element.find(".k-pager-numbers"), w.list.length || (w.list = e('<ul class="k-pager-numbers k-reset" />').appendTo(w.element))), n.input && (w.element.find(".k-pager-input").length || w.element.append('<span class="k-pager-input k-label">' + n.messages.page + '<input class="k-textbox">' + d.format(n.messages.of, c) + "</span>"), w.element.on(k + _, ".k-pager-input input", p(w._keydown, w))), n.previousNext && (w.element.find(m).length || (w.element.append(i(m, n.messages.next)), s(w.element, r, c)), w.element.find(h).length || (w.element.append(i(h, n.messages.last)), l(w.element, r, c))), n.pageSizes && (w.element.find(".k-pager-sizes").length || e('<span class="k-pager-sizes k-label"><select/>' + n.messages.itemsPerPage + "</span>").appendTo(w.element).find("select").html(e.map(e.isArray(n.pageSizes) ? n.pageSizes : [5, 10, 20], function (e) { return "<option>" + e + "</option>" }).join("")).end().appendTo(w.element), w.element.find(".k-pager-sizes select").val(w.pageSize()), d.ui.DropDownList && w.element.find(".k-pager-sizes select").show().kendoDropDownList(), w.element.on(v + _, ".k-pager-sizes select", p(w._change, w))), n.refresh && (w.element.find(".k-pager-refresh").length || w.element.append('<a href="#" class="k-pager-refresh k-link" title="' + n.messages.refresh + '"><span class="k-icon k-i-refresh">' + n.messages.refresh + "</span></a>"), w.element.on(b + _, ".k-pager-refresh", p(w._refreshClick, w))), n.info && (w.element.find(".k-pager-info").length || w.element.append('<span class="k-pager-info k-label" />')), w.element.on(b + _, "a", p(w._click, w)).addClass("k-pager-wrap k-widget"), n.autoBind && w.refresh(), d.notify(w) }, destroy: function () { var e = this; u.fn.destroy.call(e), e.element.off(_), e.dataSource.unbind(v, e._refreshHandler) }, events: [v], options: { name: "Pager", selectTemplate: '<li><span class="k-state-selected">#=text#</span></li>', linkTemplate: '<li><a tabindex="-1" href="\\#" class="k-link" data-#=ns#page="#=idx#">#=text#</a></li>', buttonCount: 10, autoBind: !0, numeric: !0, info: !0, input: !1, previousNext: !0, pageSizes: !1, refresh: !1, messages: { display: "{0} - {1} of {2} items", empty: "No items to display", page: "Page", of: "of {0}", itemsPerPage: "items per page", first: "Go to the first page", previous: "Go to the previous page", next: "Go to the next page", last: "Go to the last page", refresh: "Refresh"} }, setDataSource: function (e) { var t = this; t.dataSource.unbind(v, t._refreshHandler), t.dataSource = t.options.dataSource = e, e.bind(v, t._refreshHandler), t.options.autoBind && e.fetch() }, refresh: function () { var e, t, i, r = this, c = 1, u = "", p = r.page(), f = r.options, h = r.pageSize(), g = r.dataSource.total(), m = r.totalPages(), v = r.linkTemplate, _ = f.buttonCount; if (f.numeric) { for (p > _ && (i = p % _, c = 0 === i ? p - _ + 1 : p - i + 1), t = Math.min(c + _ - 1, m), c > 1 && (u += n(v, c - 1, "...", !1)), e = c; t >= e; e++) u += n(e == p ? r.selectTemplate : v, e, e, !0); m > t && (u += n(v, e, "...", !1)), "" === u && (u = r.selectTemplate({ text: 0 })), r.list.html(u) } f.info && (u = g > 0 ? d.format(f.messages.display, (p - 1) * h + 1, Math.min(p * h, g), g) : f.messages.empty, r.element.find(".k-pager-info").html(u)), f.input && r.element.find(".k-pager-input").html(r.options.messages.page + '<input class="k-textbox">' + d.format(f.messages.of, m)).find("input").val(p).attr(w, 1 > g).toggleClass("k-state-disabled", 1 > g), f.previousNext && (a(r.element, p, m), o(r.element, p, m), s(r.element, p, m), l(r.element, p, m)), f.pageSizes && r.element.find(".k-pager-sizes select").val(h).filter("[" + d.attr("role") + "=dropdownlist]").kendoDropDownList("value", h).kendoDropDownList("text", h) }, _keydown: function (e) { if (e.keyCode === d.keys.ENTER) { var t = this.element.find(".k-pager-input").find("input"), n = parseInt(t.val(), 10); (isNaN(n) || 1 > n || n > this.totalPages()) && (n = this.page()), t.val(n), this.page(n) } }, _refreshClick: function (e) { e.preventDefault(), this.dataSource.read() }, _change: function (e) { var t = parseInt(e.currentTarget.value, 10); isNaN(t) || this.dataSource.pageSize(t) }, _click: function (t) { var n = e(t.currentTarget); t.preventDefault(), n.is(".k-state-disabled") || this.page(n.attr(d.attr("page"))) }, totalPages: function () { return Math.ceil((this.dataSource.total() || 0) / this.pageSize()) }, pageSize: function () { return this.dataSource.pageSize() || this.dataSource.total() }, page: function (e) { return e === t ? this.dataSource.total() > 0 ? this.dataSource.page() : 0 : (this.dataSource.page(e), this.trigger(v, { index: e }), t) } }); c.plugin(x) } (window.kendo.jQuery), function (e) { 36 function t(t, n) { return t === n || e.contains(t, n) } var n = window.kendo, i = n.ui, r = i.Widget, a = n.support, o = n.getOffset, s = n._activeElement, l = "open", d = "close", c = "deactivate", u = "activate", p = "center", f = "left", h = "right", g = "top", m = "bottom", v = "absolute", _ = "hidden", b = "body", k = "location", w = "position", y = "visible", x = "effects", C = "k-state-active", T = "k-state-border", S = /k-state-border-(\w+)/, F = ".k-picker-wrap, .k-dropdown-wrap, .k-link", D = "down", E = e(window), A = e(document.documentElement), I = "resize scroll", H = a.transitions.css, N = H + "transform", R = e.extend, z = ".kendoPopup", O = ["font-family", "font-size", "font-stretch", "font-style", "font-weight", "line-height"], M = r.extend({ init: function (t, i) { var a, o = this; i = i || {}, i.isRtl && (i.origin = i.origin || m + " " + h, i.position = i.position || g + " " + h), r.fn.init.call(o, t, i), t = o.element, i = o.options, o.collisions = i.collision ? i.collision.split(" ") : [], 1 === o.collisions.length && o.collisions.push(o.collisions[0]), a = e(o.options.anchor).closest(".k-popup,.k-group").filter(":not([class^=km-])"), i.appendTo = e(e(i.appendTo)[0] || a[0] || b), o.element.hide().addClass("k-popup k-group k-reset").toggleClass("k-rtl", !!i.isRtl).css({ position: v }).appendTo(i.appendTo).on("mouseenter" + z, function () { o._hovered = !0 }).on("mouseleave" + z, function () { o._hovered = !1 }), o.wrapper = e(), i.animation === !1 && (i.animation = { open: { effects: {} }, close: { hide: !0, effects: {}} }), R(i.animation.open, { complete: function () { o.wrapper.css({ overflow: y }), o.trigger(u) } }), R(i.animation.close, { complete: function () { o.wrapper.hide(); var r, a, s = o.wrapper.data(k), l = e(i.anchor); s && o.wrapper.css(s), i.anchor != b && (r = (l[0].className.match(S) || ["", "down"])[1], a = T + "-" + r, l.removeClass(a).children(F
36).removeClass(C).removeClass(a), t.removeClass(T + "-" + n.directions[r].reverse)), o._closing = !1, o.trigger(c) } }), o._mousedownProxy = function (e) { o._mousedown(e) }, o._resizeProxy = function (e) { o._resize(e) }, i.toggleTarget && e(i.toggleTarget).on(i.toggleEvent + z, e.proxy(o.toggle, o)) }, events: [l, u, d, c], options: { name: "Popup", toggleEvent: "click", origin: m + " " + f, position: g + " " + f, anchor: b, collision: "flip fit", viewport: window, copyAnchorStyles: !0, animation: { open: { effects: "slideIn:down", transition: !0, duration: 200 }, close: { duration: 100, hide: !0}} }, destroy: function () { var t, i = this, a = i.options, o = i.element.off(z); r.fn.destroy.call(i), a.toggleTarget && e(a.toggleTarget).off(z), A.unbind(D, i._mousedownProxy), E.unbind(I, i._resizeProxy), a.appendTo[0] === document.body && (t = o.parent(".k-animation-container"), t[0] ? t.remove() : o.remove()), n.destroy(i.element.children()) }, open: function (t, i) { 37 var r, o, s, d = this, c = { isFixed: !isNaN(parseInt(i, 10)), x: t, y: i }, u = d.element, p = d.options, f = "down", h = e(p.anchor); 38 if (!d.visible()) { if (p.copyAnchorStyles && u.css(n.getComputedStyles(h[0], O)), u.data("animating") || d.trigger(l)) return; A.unbind(D, d._mousedownProxy).bind(D, d._mousedownProxy), a.mobileOS.ios || a.mobileOS.android || E.unbind(I, d._resizeProxy).bind(I, d._resizeProxy), d.wrapper = o = n.wrap(u).css({ overflow: _, display: "block", position: v }), a.mobileOS.android && o.add(h).css(N, "translatez(0)"), o.css(w), e(p.appendTo)[0] == document.body && o.css(g, "-10000px"), r = R(!0, {}, p.animation.open), d.flipped = d._position(c), r.effects = n.parseEffects(r.effects, d.flipped), f = r.effects.slideIn ? r.effects.slideIn.direction : f, p.anchor != b && (s = T + "-" + f, u.addClass(T + "-" + n.directions[f].reverse), h.addClass(s).children(F).addClass(C).addClass(s)), u.data(x, r.effects).kendoStop(!0).kendoAnimate(r) } 39 }, toggle: function () { var e = this; e[e.visible() ? d : l]() }, visible: function () { return this.element.is(":" + y) }, close: function () { var t, i, r, a, o = this, s = o.options; if (o.visible()) { if (t = o.wrapper[0] ? o.wrapper : n.wrap(o.element).hide(), o._closing || o.trigger(d)) return; o.element.find(".k-popup").each(function () { var t = e(this), n = t.data("kendoPopup"); n && n.close() }), A.unbind(D, o._mousedownProxy), E.unbind(I, o._resizeProxy), i = R(!0, {}, s.animation.close), r = o.element.data(x), a = i.effects, !a && !n.size(a) && r && n.size(r) && (i.effects = r, i.reverse = !0), o._closing = !0, o.element.kendoStop(!0), t.css({ overflow: _ }), o.element.kendoAnimate(i) } }, _resize: function (e) { var n = this; "resize" === e.type ? (clearTimeout(n._resizeTimeout), n._resizeTimeout = setTimeout(function () { n._position(), n._resizeTimeout = null }, 50)) : n._hovered || t(n.element[0], s()) || n.close() }, _mousedown: function (i) { var r = this, a = r.element[0], o = r.options, s = e(o.anchor)[0], l = o.toggleTarget, d = n.eventTarget(i), c = e(d).closest(".k-popup"), u = c.parent().parent(".km-shim").length; c = c[0], (u || !c || c === r.element[0]) && (t(a, d) || t(s, d) || l && t(e(l)[0], d) || r.close()) }, _fit: function (e, t, n) { var i = 0; return e + t > n && (i = n - (e + t)), 0 > e && (i = -e), i }, _flip: function (e, t, n, i, r, a, o) { var s = 0; return o = o || t, a !== r && a !== p && r !== p && (e + o > i && (s += -(n + t)), 0 > e + s && (s += n + t)), s }, _position: function (t) { var n, i, r, s, l, d, c, u, p, f = this, h = f.element.css(w, ""), g = f.wrapper, m = f.options, _ = e(m.viewport), b = e(_).offset(), y = e(m.anchor), x = m.origin.toLowerCase().split(" "), C = m.position.toLowerCase().split(" "), T = f.collisions, S = a.zoomLevel(), F = 10002, D = 0, E = y.parents().filter(g.siblings()); if (E[0]) if (i = Number(e(E).css("zIndex"))) F = i + 1; else for (n = y.parentsUntil(E), r = n.length; r > D; D++) i = Number(e(n[D]).css("zIndex")), i && i > F && (F = i + 1); return g.css("zIndex", F), t && t.isFixed ? g.css({ left: t.x, top: t.y }) : g.css(f._align(x, C)), s = o(g, w, y[0] === g.offsetParent()[0]), l = o(g), d = y.offsetParent().parent(".k-animation-container,.k-popup,.k-group"), d.length && (s = o(g, w, !0), l = o(g)), _[0] === window ? (l.top -= window.pageYOffset || document.documentElement.scrollTop || 0, l.left -= window.pageXOffset || document.documentElement.scrollLeft || 0) : (l.top -= b.top, l.left -= b.left), f.wrapper.data(k) || g.data(k, R({}, s)), c = R({}, l), u = R({}, s), "fit" === T[0] && (u.top += f._fit(c.top, g.outerHeight(), _.height() / S)), "fit" === T[1] && (u.left += f._fit(c.left, g.outerWidth(), _.width() / S)), p = R({}, u), "flip" === T[0] && (u.top += f._flip(c.top, h.outerHeight(), y.outerHeight(), _.height() / S, x[0], C[0], g.outerHeight())), "flip" === T[1] && (u.left += f._flip(c.left, h.outerWidth(), y.outerWidth(), _.width() / S, x[1], C[1], g.outerWidth())), h.css(w, v), g.css(u), u.left != p.left || u.top != p.top }, _align: function (t, n) { var i, r = this, a = r.wrapper, s = e(r.options.anchor), l = t[0], d = t[1], c = n[0], u = n[1], f = o(s), g = e(r.options.appendTo), v = a.outerWidth(), _ = a.outerHeight(), b = s.outerWidth(), k = s.outerHeight(), w = f.top, y = f.left, x = Math.round; return g[0] != document.body && (i = o(g), w -= i.top, y -= i.left), l === m && (w += k), l === p && (w += x(k / 2)), c === m && (w -= _), c === p && (w -= x(_ / 2)), d === h && (y += b), d === p && (y += x(b / 2)), u === h && (y -= v), u === p && (y -= x(v / 2)), { top: w, left: y} } 40 }); i.plugin(M) 41} (window.kendo.jQuery), function (e) { function t(e) { for (; e.length; ) n(e), e = e.parent() } function n(e) { var t = e.data(a.ns + "title"); t && (e.attr("title", t), e.removeData(a.ns + "title")) } function i(e) { var t = e.attr("title"); t && (e.data(a.ns + "title", t), e.attr("title", "")) } function r(e) { for (; e.length && !e.is("body"); ) i(e), e = e.parent() } var a = window.kendo, o = a.ui.Widget, s = a.ui.Popup, l = e.isFunction, d = e.isPlainObject, c = e.extend, u = e.proxy, p = e(document), f = a.isLocalUrl, h = "_tt_active", g = "aria-describedby", m = "show", v = "hide", _ = "error", b = "contentLoad", k = "requestStart", w = "k-content-frame", y = '<div role="tooltip" class="k-widget k-tooltip#if (!autoHide) {# k-tooltip-closable#}#">#if (!autoHide) {# <div class="k-tooltip-button"><a href="\\#" class="k-icon k-i-close">close</a></div> #}#<div class="k-tooltip-content"></div>#if (callout){ #<div class="k-callout k-callout-#=dir#"></div>#}#</div>', x = a.template("<iframe frameborder='0' class='" + w + "' " + "src='#= content.url #'>" + "This page requires frames in order to show content" + "</iframe>"), C = ".kendoTooltip", T = { bottom: { origin: "bottom center", position: "top center" }, top: { origin: "top center", position: "bottom center" }, left: { origin: "center left", position: "center right", collision: "fit flip" }, right: { origin: "center right", position: "center left", collision: "fit flip" }, center: { position: "center center", origin: "center center"} }, S = { top: "bottom", bottom: "top", left: "right", right: "left", center: "center" }, F = { bottom: "n", top: "s", left: "e", right: "w", center: "n" }
41, D = { horizontal: { offset: "top", size: "height" }, vertical: { offset: "left", size: "width"} }, E = function (e) { return e.target.data(a.ns + "title") }, A = o.extend({ init: function (e, t) { var n, i = this; o.fn.init.call(i, e, t), n = i.options.position.match(/left|right/) ? "horizontal" : "vertical", i.dimensions = D[n], i._documentKeyDownHandler = u(i._documentKeyDown, i), i.element.on(i.options.showOn + C, i.options.filter, u(i._showOn, i)).on("mouseenter" + C, i.options.filter, u(i._mouseenter, i)), this.options.autoHide && i.element.on("mouseleave" + C, i.options.filter, u(i._mouseleave, i)) }, options: { name: "Tooltip", filter: "", content: E, showAfter: 100, callout: !0, position: "bottom", showOn: "mouseenter", autoHide: !0, animation: { open: { effects: "fade:in", duration: 0 }, close: { effects: "fade:out", duration: 40, hide: !0}} }, events: [m, v, b, _, k], _mouseenter: function (t) { r(e(t.currentTarget)) }, _showOn: function (t) { var n = this; n.options.showOn && n.options.showOn.match(/click|focus/) ? n._show(e(t.currentTarget)) : (clearTimeout(n.timeout), n.timeout = setTimeout(function () { n._show(e(t.currentTarget)) }, n.options.showAfter)) }, _appendContent: function (e) { var t, n = this, i = n.options.content, r = n.content, o = n.options.iframe; d(i) && i.url ? ("iframe" in n.options || (o = !f(i.url)), n.trigger(k, { options: i, target: e }), o ? (r.hide(), t = r.find("." + w)[0], t ? t.src = i.url || t.src : r.html(x({ content: i })), r.find("." + w).off("load" + C).on("load" + C, function () { n.trigger(b), r.show() })) : (r.empty(), a.ui.progress(r, !0), n._ajaxRequest(i))) : i && l(i) ? (i = i({ target: e }), n.content.html(i || "")) : n.content.html(i) }, _ajaxRequest: function (e) { var t = this; jQuery.ajax(c({ type: "GET", dataType: "html", cache: !1, error: function (e, n) { a.ui.progress(t.content, !1), t.trigger(_, { status: n, xhr: e }) }, success: u(function (e) { a.ui.progress(t.content, !1), t.content.html(e), t.trigger(b) }, t) }, e)) }, _documentKeyDown: function (e) { e.keyCode === a.keys.ESC && this.hide() }, refresh: function () { var e = this, t = e.popup; t && t.options.anchor && e._appendContent(t.options.anchor) }, hide: function () { this.popup && this.popup.close() }, show: function (e) { r(e), this._show(e) }, _show: function (e) { var n = this, i = n.target(); n.popup || n._initPopup(), i && i[0] != e[0] && (n.popup.close(), n.popup.element.kendoStop(!0, !0)), i && i[0] == e[0] || (n._appendContent(e), n.popup.options.anchor = e), n.popup.one("deactivate", function () { t(e), e.removeAttr(g), this.element.removeAttr("id").attr("aria-hidden", !0), p.off("keydown" + C, n._documentKeyDownHandler) }), n.popup.open() }, _initPopup: function () { var t = this, n = t.options, i = e(a.template(y)({ callout: n.callout && "center" !== n.position, dir: F[n.position], autoHide: n.autoHide })); t.popup = new s(i, c({ activate: function () { var e = this.options.anchor, i = e[0].id || t.element[0].id; i && (e.attr(g, i + h), this.element.attr("id", i + h)), n.callout && t._positionCallout(), this.element.removeAttr("aria-hidden"), p.on("keydown" + C, t._documentKeyDownHandler), t.trigger(m) }, close: function () { t.trigger(v) }, copyAnchorStyles: !1, animation: n.animation }, T[n.position])), i.css({ width: n.width, height: n.height }), t.content = i.find(".k-tooltip-content"), t.arrow = i.find(".k-callout"), n.autoHide ? i.on("mouseleave" + C, u(t._mouseleave, t)) : i.on("click" + C, ".k-tooltip-button", u(t._closeButtonClick, t)) }, _closeButtonClick: function (e) { e.preventDefault(), this.hide() }, _mouseleave: function (n) { if (this.popup) { var i = e(n.currentTarget), r = i.offset(), a = n.pageX, o = n.pageY; if (r.right = r.left + i.outerWidth(), r.bottom = r.top + i.outerHeight(), a > r.left && r.right > a && o > r.top && r.bottom > o) return; this.popup.close() } else t(e(n.currentTarget)); clearTimeout(this.timeout) }, _positionCallout: function () { var t = this, n = t.options.position, i = t.dimensions, r = i.offset, a = t.popup, o = a.options.anchor, s = e(o).offset(), l = parseInt(t.arrow.css("borderWidth"), 10), d = e(a.element).offset(), c = F[a.flipped ? S[n] : n], u = s[r] - d[r] + e(o)[i.size]() / 2 - l; t.arrow.removeClass("k-callout-n k-callout-s k-callout-w k-callout-e").addClass("k-callout-" + c).css(r, u) }, target: function () { return this.popup ? this.popup.options.anchor : null }, destroy: function () { var e = this.popup; e && (e.element.off(C), e.destroy()), this.element.off(C), p.off("keydown" + C, this._documentKeyDownHandler), o.fn.destroy.call(this) } }); a.ui.plugin(A) } (window.kendo.jQuery), function (e, t) { function n(t, i) { t.filters && (t.filters = e.grep(t.filters, function (e) { return n(e, i), e.filters ? e.filters.length : e.field != i })) }
41 var i = window.kendo, r = i.ui, a = r.Widget, o = i.keys, s = i.support, l = i.htmlEncode, d = i._activeElement, c = "id", u = "li", p = "change", f = "character", h = "k-state-focused", g = "k-state-hover", m = "k-loading", v = "open", _ = "close", b = "select", k = "progress", w = "requestEnd", y = "width", x = e.extend, C = e.proxy, T = s.browser, S = T.msie && 9 > T.version, F = /"/g, D = { ComboBox: "DropDownList", DropDownList: "ComboBox" }, E = a.extend({ init: function (t, n) { var i, r = this, o = r.ns; a.fn.init.call(r, t, n), t = r.element, r._isSelect = t.is(b), r._template(), r.ul = e('<ul unselectable="on" class="k-list k-reset"/>').css({ overflow: s.kineticScrollNeeded ? "" : "auto" }).on("mouseenter" + o, u, function () { e(this).addClass(g) }).on("mouseleave" + o, u, function () { e(this).removeClass(g) }).on("click" + o, u, C(r._click, r)).attr({ tabIndex: -1, role: "listbox", "aria-hidden": !0 }), r.list = e("<div class='k-list-container'/>").append(r.ul).on("mousedown" + o, function (e) { e.preventDefault() }), i = t.attr(c), i && (r.list.attr(c, i + "-list"), r.ul.attr(c, i + "_listbox"), r._optionID = i + "_option_selected"), r._accessors(), r._initValue() }, setOptions: function (e) { a.fn.setOptions.call(this, e), e && e.enable !== t && (e.enabled = e.enable) }, focus: function () { this._focused.focus() }, readonly: function (e) { this._editable({ readonly: e === t ? !0 : e, disable: !1 }) }, enable: function (e) { this._editable({ readonly: !1, disable: !(e = e === t ? !0 : e) }) }, _filterSource: function (e) { var t = this, i = t.options, r = t.dataSource, a = r.filter() || {}; n(a, i.dataTextField), e && (a = a.filters || [], a.push(e)), r.filter(a) }, _initValue: function () { var e = this, t = e.options.value; t ? e.element.val(t) : t = e.element.val(), e._old = t }, _ignoreCase: function () { var e, t = this, n = t.dataSource.reader.model; n && n.fields && (e = n.fields[t.options.dataTextField], e && e.type && "string" !== e.type && (t.options.ignoreCase = !1)) }, items: function () { return this.ul[0].children }, current: function (e) { var n = this, i = n._optionID; return e === t ? n._current : (n._current && (n._current.removeClass(h).removeAttr("aria-selected").removeAttr(c), n._focused.removeAttr("aria-activedescendant")), e && (e.addClass(h), n._scroll(e), i && (e.attr("id", i), n._focused.attr("aria-activedescendant", i))), n._current = e, t) }, destroy: function () { var e = this, t = e.ns; a.fn.destroy.call(e), e._unbindDataSource(), e.ul.off(t), e.list.off(t), e.popup.destroy(), e._form && e._form.off("reset", e._resetHandler) }, dataItem: function (e) { var n = this; return e === t && (e = n.selectedIndex), n._data()[e] }, _accessors: function () { var e = this, t = e.element, n = e.options, r = i.getter, a = t.attr(i.attr("text-field")), o = t.attr(i.attr("value-field")); a && (n.dataTextField = a), o && (n.dataValueField = o), e._text = r(n.dataTextField), e._value = r(n.dataValueField) }, _aria: function (e) { var n = this, i = n.options, r = n._focused; i.suggest !== t && r.attr("aria-autocomplete", i.suggest ? "both" : "list"), e = e ? e + " " + n.ul[0].id : n.ul[0].id, r.attr("aria-owns", e), n.ul.attr("aria-live", i.filter && "none" !== i.filter ? "polite" : "off") }, _blur: function () { var e = this; e._change(), e.close() }, _change: function () { var e, n = this, i = n.selectedIndex, r = n.options.value, a = n.value(); n._isSelect && !n._bound && r && (a = r), a !== n._old ? e = !0 : i !== t && i !== n._oldIndex && (e = !0), e && (n._old = a, n._oldIndex = i, n.trigger(p), n.element.trigger(p)) }, _click: function (t) { t.isDefaultPrevented() || this._accept(e(t.currentTarget)) }, _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]")) }, _focus: function (e) { var n = this; return n.popup.visible() && e && n.trigger(b, { item: e }) ? (n.close(), t) : (n._select(e), n._triggerCascade(), n._blur(), t) }, _index: function (e) { var t, n, i = this, r = i._data(); for (t = 0, n = r.length; n > t; t++) if (i._dataValue(r[t]) == e) return t; return -1 }, _dataValue: function (e) { var n = this._value(e); return n === t && (n = this._text(e)), n }, _height: function (e) { if (e) { var t = this, n = t.list, i = t.popup.visible(), r = t.options.height; n = n.add(n.parent(".k-animation-container")).show().height(t.ul[0].scrollHeight > r ? r : "auto"), i || n.hide() } }, _adjustListWidth: function () { var e, t, n = this.list, i = n[0].style.width, r = this.wrapper; if (n.data(y) || !i) return e = window.getComputedStyle ? window.getComputedStyle(r[0], null) : 0, t = e ? parseFloat(e.width) : r.outerWidth(), e && (T.mozilla || T.msie) && (t += parseFloat(e.paddingLeft) + parseFloat(e.paddingRight) + parseFloat(e.borderLeftWidth) + parseFloat(e.borderRightWidth)), i = t - (n.outerWidth() - n.width()), n.css({ fontFamily: r.css("font-family"), width: i }).data(y, i), !0 }, _popup: function () { var e = this, t = e.list, n = e._focused, a = e.options, o = e.wrapper; e.popup = new r.Popup(t, x({}, a.popup, { anchor: o, open: function (t) { e._adjustListWidth(), e.trigger(v) ? t.preventDefault() : (n.attr("aria-expanded", !0), e.ul.attr("aria-hidden", !1)) }, close: function (t) { e.trigger(_) ? t.preventDefault() : (n.attr("aria-expanded", !1), e.ul.attr("aria-hidden", !0)) }, animation: a.animation, isRtl: s.isRtl(o) })), e.popup.one(v, function () { e._height(e._data().length) }), e._touchScroller = i.touchScroller(e.popup.element) }, _makeUnselectable: function () { S && this.list.find("*").attr("unselectable", "on") }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(g, "mouseenter" === t.type) }, _toggle: function (e) { var n = this; e = e !== t ? e : !n.popup.visible(), s.touch || n._focused[0] === d() || n._focused.focus(), n[e ? v : _]() }, _scroll: function (e) { if (e) { e[0] && (e = e[0]); var t = this.ul[0], n = e.offsetTop, i = e.offsetHeight, r = t.scrollTop, a = t.clientHeight, o = n + i; t.scrollTop = r > n ? n : o > r + a ? o - a : r } }, _template: function () { var e = this, t = e.options, n = t.template, r = t.dataSource; e._isSelect && e.element[0].length && (r || (t.dataTextField = t.dataTextField || "text", t.dataValueField = t.dataValueField || "value")), n ? (n = i.template(n), e.template = function (e) { return '<li tabindex="-1" role="option" unselectable="on" class="k-item">' + n(e) + "</li>" }) : e.template = i.template('<li tabindex="-1" role="option" unselectable="on" class="k-item">${' + i.expr(t.dataTextField, "data") + "}</li>", { useWithBlock: !1 }) }, _triggerCascade: function () { var e = this, t = e.value(); (!e._bound && t || e._old !== t) && e.trigger("cascade") }, _unbindDataSource: function () { var e = this; e.dataSource.unbind(p, e._refreshHandler).unbind(k, e._progressHandler).unbind(w, e._requestEndHandler).unbind("error", e._errorHandler) } }); x(E, { caret: function (e) { var t, n = e.ownerDocument.selection; return t = n ? Math.abs(n.createRange().moveStart(f, -e.value.length)) : e.selectionStart }, selectText: function (e, t, n) { try { if (e.createTextRange) { e.focus(); var i = e.createTextRange(); i.collapse(!0), i.moveStart(f, t), i.moveEnd(f, n - t), i.select() } else e.setSelectionRange(t, n) } catch (r) { } }, inArray: function (e, t) { var n, i, r = t.children; if (!e || e.parentNode !== t) return -1; for (n = 0, i = r.length; i > n; n++) if (e === r[n]) return n; return -1 } }), i.ui.List = E, r.Select = E.extend({ init: function (e, t) { E.fn.init.call(this, e, t), this._initial = this.element.val() }, setDataSource: function (e) { this.options.dataSource = e, this._dataSource(), this.options.autoBind && this.dataSource.fetch() }, close: function () { this.popup.close() }, select: function (e) { var n = this; return e === t ? n.selectedIndex : (n._select(e), n._triggerCascade(), n._old = n._accessor(), n._oldIndex = n.selectedIndex, t) }, _accessor: function (e, n) { var i, r, a = this.element, o = this._isSelect; return a = a[0], e === t ? (o ? (r = a.selectedIndex, r > -1 && (i = a.options[r], i && (e = i.value))) : e = a.value, e) : (o ? a.selectedIndex = n : a.value = e, t) }, _hideBusy: function () { var e = this; clearTimeout(e._busy), e._arrow.removeClass(m), e._focused.attr("aria-busy", !1), e._busy = null }, _showBusy: function () { var e = this; e._request = !0, e._busy || (e._busy = setTimeout(function () { e._focused.attr("aria-busy", !0), e._arrow.addClass(m) }, 100)) }, _requestEnd: function () { this._request = !1 }, _dataSource: function () { var t, n = this, r = n.element, a = n.options, o = a.dataSource || {}; o = e.isArray(o) ? { data: o} : o, n._isSelect && (t = r[0].selectedIndex, t > -1 && (a.index = t), o.select = r, o.fields = [{ field: a.dataTextField }, { field: a.dataValueField}]), n.dataSource && n._refreshHandler ? n._unbindDataSource() : (n._refreshHandler = C(n.refresh, n), n._progressHandler = C(n._showBusy, n), n._requestEndHandler = C(n._requestEnd, n), n._errorHandler = C(n._hideBusy, n)), n.dataSource = i.data.DataSource.create(o).bind(p, n._refreshHandler).bind(k, n._progressHandler).bind(w, n._requestEndHandler).bind("error", n._errorHandler) }, _get: function (t) { var n, i, r = this, a = r._data(); if ("function" == typeof t) for (n = 0, i = a.length; i > n; n++) if (t(a[n])) { t = n; break } if ("number" == typeof t) { if (0 > t) return e(); t = e(r.ul[0].children[t]) } return t && t.nodeType && (t = e(t)), t }, _move: function (e) { var t, n, i = this, r = e.keyCode, a = i.ul[0], s = i.popup.visible() ? "_select" : "_accept", l = i._current, d = r === o.DOWN; if (r === o.UP || d) { if (e.altKey) i.toggle(d); else { if (t = a.firstChild, !t && !i._accessor() && "filter" !== i._state) return i.dataSource.one(p, function () { i._move(e) }
41), i._filterSource(), e.preventDefault(), !0; d ? (!l || -1 === i.selectedIndex && !i.value() && l[0] === t ? l = t : (l = l[0].nextSibling, l || t !== a.lastChild || (l = t)), i[s](l)) : (l = l ? l[0].previousSibling : a.lastChild, l || t !== a.lastChild || (l = t), i[s](l)) } e.preventDefault(), n = !0 } else r === o.ENTER || r === o.TAB ? (i.popup.visible() && e.preventDefault(), i._accept(l), n = !0) : r === o.ESC && (i.popup.visible() && e.preventDefault(), i.close(), n = !0); return n }, _selectItem: function (e) { var t = this, n = t.options, i = t.selectedIndex; e = t._selectedValue || n.value || t._accessor(), e ? t.value(e) : (!t._bound || i > -1) && (t._bound || (i = n.index), t.select(i)) }, _fetchItems: function (e) { var n = this, i = n.ul[0].firstChild; return n._request ? !0 : n._fetch || i ? t : n.options.cascadeFrom ? !i : (n.dataSource.one(p, function () { n.value(e), n._fetch = !1 }), n._fetch = !0, n.dataSource.fetch(), !0) }, _options: function (e, n) { var i, r, a, o, s = this, d = s.element, c = d[0].selectedIndex, u = e.length, p = "", f = 0; for (n && (p = n, c += 1, f = 1); u > f; f++) i = "<option", r = e[f], a = s._text(r), o = s._value(r), o !== t && (o += "", -1 !== o.indexOf('"') && (o = o.replace(F, """)), i += ' value="' + o + '"'), i += ">", a !== t && (i += l(a)), i += "</option>", p += i; d.html(p), d[0].selectedIndex = -1 === c ? 0 : c }, _reset: function () { var e = this, t = e.element, n = t.closest("form"); n[0] && (e._resetHandler = function () { setTimeout(function () { e.value(e._initial) }) }, e._form = n.on("reset", e._resetHandler)) }, _cascade: function () { var t, i, r, a, o, s = this, l = s.options, d = l.cascadeFrom; if (d) { if (s._selectedValue = l.value || s._accessor(), i = e("#" + d), t = i.data("kendo" + l.name), t || (t = i.data("kendo" + D[l.name])), !t) return; l.autoBind = !1, a = t.options.dataValueField, o = function () { var e = s._selectedValue || s.value(); e ? (s.value(e), s.dataSource.view()[0] && -1 !== s.selectedIndex || s._clearSelection(t, !0)) : s.select(l.index), s.enable(), s._triggerCascade() }, r = function () { var e, i, r = t.dataItem(), l = r ? t._value(r) : null; l ? (e = s.dataSource.filter() || {}, n(e, a), i = e.filters || [], i.push({ field: a, operator: "eq", value: l }), s.dataSource.one(p, o).filter(i)) : (s.enable(!1), s._clearSelection(t), s._triggerCascade()) }, t.bind("cascade", function () { r() }), t._bound ? r() : t.value() || s.enable(!1) } } }) } (window.kendo.jQuery), function (e, t) { 42 function n(e, t, n, i) { var r, a = e.getFullYear(), o = t.getFullYear(), s = n.getFullYear(); return a -= a % i, r = a + (i - 1), o > a && (a = o), r > s && (r = s), a + "-" + r } function i(e) { for (var t, n = 0, i = e.min, r = e.max, a = e.start, o = e.setter, l = e.build, d = e.cells || 12, c = e.perRow || 4, u = e.content || A, p = e.empty || I, f = e.html || '<table tabindex="0" role="grid" class="k-content k-meta-view" cellspacing="0"><tbody><tr role="row">'; d > n; n++) n > 0 && 0 === n % c && (f += '</tr><tr role="row">'), t = l(a, n), f += s(a, i, r) ? u(t) : p(t), o(a, 1); return f + "</tr></tbody></table>" } function r(e, t, n) { var i = e.getFullYear(), r = t.getFullYear(), a = r, o = 0; return n && (r -= r % n, a = r - r % n + n - 1), i > a ? o = 1 : r > i && (o = -1), o } function a() { var e = new ft; return new ft(e.getFullYear(), e.getMonth(), e.getDate()) } function o(e, t, n) { var i = a(); return e && (i = new ft(+e)), t > i ? i = new ft(+t) : i > n && (i = new ft(+n)), i } function s(e, t, n) { return +e >= +t && +n >= +e } function l(e, t) { return e.slice(t).concat(e.slice(0, t)) } function d(e, t, n) { t = t instanceof ft ? t.getFullYear() : e.getFullYear() + n * t, e.setFullYear(t) } function c(t) { e(this).toggleClass(G, nt.indexOf(t.type) > -1 || t.type == et) } function u(e) { e.preventDefault() } function p(e) { return F(e).calendars.standard } function f(e) { var n = ht[e.start], i = ht[e.depth], r = F(e.culture); e.format = T(e.format || r.calendars.standard.patterns.d), isNaN(n) && (n = 0, e.start = V), (i === t || i > n) && (e.depth = V), e.dates || (e.dates = []) } function h(e) { N && e.find("*").attr("unselectable", "on") } function g(e, t) { for (var n = 0, i = t.length; i > n; n++) if (e === +t[n]) return !0; return !1 } function m(e, t) { return e ? e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate() : !1 }
42 var v, _ = window.kendo, b = _.support, k = _.ui, w = k.Widget, y = _.parseDate, x = _._adjustDate, C = _.keys, T = _._extractFormat, S = _.template, F = _.getCulture, D = _.support.transitions, E = D ? D.css + "transform-origin" : "", A = S('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link" href="\\#" data-#=data.ns#value="#=data.dateString#">#=data.value#</a></td>', { useWithBlock: !1 }), I = S('<td role="gridcell"> </td>', { useWithBlock: !1 }), H = _.support.browser, N = H.msie && 9 > H.version, R = ".kendoCalendar", z = "click" + R, O = "keydown" + R, M = "id", P = "min", B = "left", L = "slideIn", V = "month", W = "century", U = "change", q = "navigate", j = "value", G = "k-state-hover", $ = "k-state-disabled", K = "k-state-focused", Y = "k-other-month", Q = ' class="' + Y + '"', J = "k-nav-today", X = "td:has(.k-link)", Z = "blur" + R, et = "focus", tt = et + R, nt = b.touch ? "touchstart" : "mouseenter", it = b.touch ? "touchstart" + R : "mouseenter" + R, rt = b.touch ? "touchend" + R + " touchmove" + R : "mouseleave" + R, at = 6e4, ot = 864e5, st = "_prevArrow", lt = "_nextArrow", dt = "aria-disabled", ct = "aria-selected", ut = e.proxy, pt = e.extend, ft = Date, ht = { month: 0, year: 1, decade: 2, century: 3 }, gt = w.extend({ init: function (t, n) { var i, r, a = this; w.fn.init.call(a, t, n), t = a.wrapper = a.element, n = a.options, n.url = window.unescape(n.url), a._templates(), a._header(), a._footer(a.footer), r = t.addClass("k-widget k-calendar").on(it + " " + rt, X, c).on(O, "table.k-content", ut(a._move, a)).on(z, X, function (t) { var n = t.currentTarget.firstChild; -1 != n.href.indexOf("#") && t.preventDefault(), a._click(e(n)) }).on("mouseup" + R, function () { a._focusView(a.options.focusOnNav !== !1) }).attr(M), r && (a._cellID = r + "_cell_selected"), i = n.value, f(n), a._index = ht[n.start], a._current = new ft(+o(i, n.min, n.max)), a._addClassProxy = function () { a._active = !0, a._cell.addClass(K) }, a._removeClassProxy = function () { a._active = !1, a._cell.removeClass(K) }, a.value(i), _.notify(a) }, options: { name: "Calendar", value: null, min: new ft(1900, 0, 1), max: new ft(2099, 11, 31), dates: [], url: "", culture: "", footer: "", format: "", month: {}, start: V, depth: V, animation: { horizontal: { effects: L, reverse: !0, duration: 500, divisor: 2 }, vertical: { effects: "zoomIn", duration: 400}} }, events: [U, q], setOptions: function (e) { f(e), w.fn.setOptions.call(this, e) }, destroy: function () { var e = this, t = e._today; e.element.off(R), e._title.off(R), e[st].off(R), e[lt].off(R), _.destroy(e._view), t && _.destroy(t.off(R)), w.fn.destroy.call(e) }, current: function () { return this._current }, view: function () { return this._view }, focus: function (e) { e = e || this._table, this._bindTable(e), e.focus() }, min: function (e) { return this._option(P, e) }, max: function (e) { return this._option("max", e) }, navigateToPast: function () { this._navigate(st, -1) }, navigateToFuture: function () { this._navigate(lt, 1) }, navigateUp: function () { var e = this, t = e._index; e._title.hasClass($) || e.navigate(e._current, ++t) }, navigateDown: function (e) { var n = this, i = n._index, r = n.options.depth; if (e) return i === ht[r] ? (+n._value != +e && (n.value(e), n.trigger(U)), t) : (n.navigate(e, --i), t) }, navigate: function (n, i) { i = isNaN(i) ? ht[i] : i; var r, a, s, l, d = this, c = d.options, u = c.culture, p = c.min, f = c.max, g = d._title, m = d._table, _ = d._oldTable, b = d._value, k = d._current, w = n && +n > +k, y = i !== t && i !== d._index; n ? d._current = n = new ft(+o(n, p, f)) : n = k, i === t ? i = d._index : d._index = i, d._view = a = v.views[i], s = a.compare, l = i === ht[W], g.toggleClass($, l).attr(dt, l), l = 1 > s(n, p), d[st].toggleClass($, l).attr(dt, l), l = s(n, f) > -1, d[lt].toggleClass($, l).attr(dt, l), m && _ && _.data("animating") && (_.kendoStop(!0, !0), m.kendoStop(!0, !0)), d._oldTable = m, (!m || d._changeView) && (g.html(a.title(n, p, f, u)), d._table = r = e(a.content(pt({ min: p, max: f, date: n, url: c.url, dates: c.dates, format: c.format, culture: u }, d[a.name]))), h(r), d._animate({ from: m, to: r, vertical: y, future: w }), d._focus(n), d.trigger(q)), i === ht[c.depth] && b && d._class("k-state-selected", a.toDateString(b)), d._class(K, a.toDateString(n)), !m && d._cell && d._cell.removeClass(K), d._changeView = !0 }, value: function (e) { var n = this, i = n._view, r = n.options, a = n._view, o = r.min, l = r.max; return e === t ? n._value : (e = y(e, r.format, r.culture), null !== e && (e = new ft(+e), s(e, o, l) || (e = null)), n._value = e, a && null === e && n._cell ? n._cell.removeClass("k-state-selected") : (n._changeView = !e || i && 0 !== i.compare(e, n._current), n.navigate(e)), t) }, _move: function (t) { var n, i, r, a, s = this, l = s.options, d = t.keyCode, c = s._view, u = s._index, p = new ft(+s._current), f = _.supp
42ort.isRtl(s.wrapper); return t.target === s._table[0] && (s._active = !0), t.ctrlKey ? d == C.RIGHT && !f || d == C.LEFT && f ? (s.navigateToFuture(), i = !0) : d == C.LEFT && !f || d == C.RIGHT && f ? (s.navigateToPast(), i = !0) : d == C.UP ? (s.navigateUp(), i = !0) : d == C.DOWN && (s._click(e(s._cell[0].firstChild)), i = !0) : (d == C.RIGHT && !f || d == C.LEFT && f ? (n = 1, i = !0) : d == C.LEFT && !f || d == C.RIGHT && f ? (n = -1, i = !0) : d == C.UP ? (n = 0 === u ? -7 : -4, i = !0) : d == C.DOWN ? (n = 0 === u ? 7 : 4, i = !0) : d == C.ENTER ? (s._click(e(s._cell[0].firstChild)), i = !0) : d == C.HOME || d == C.END ? (r = d == C.HOME ? "first" : "last", a = c[r](p), p = new ft(a.getFullYear(), a.getMonth(), a.getDate(), p.getHours(), p.getMinutes(), p.getSeconds(), p.getMilliseconds()), i = !0) : d == C.PAGEUP ? (i = !0, s.navigateToPast()) : d == C.PAGEDOWN && (i = !0, s.navigateToFuture()), (n || r) && (r || c.setDate(p, n), s._focus(o(p, l.min, l.max)))), i && t.preventDefault(), s._current }, _animate: function (e) { var t = this, n = e.from, i = e.to, r = t._active; n ? n.parent().data("animating") ? (n.parent().kendoStop(!0, !0).remove(), n.remove(), i.insertAfter(t.element[0].firstChild), t._focusView(r)) : n.is(":visible") && t.options.animation !== !1 ? t[e.vertical ? "_vertical" : "_horizontal"](n, i, e.future) : (i.insertAfter(n), n.remove(), t._focusView(r)) : (i.insertAfter(t.element[0].firstChild), t._bindTable(i)) }, _horizontal: function (e, n, i) { var r = this, a = r._active, o = r.options.animation.horizontal, s = o.effects, l = e.outerWidth(); s && -1 != s.indexOf(L) && (e.add(n).css({ width: l }), e.wrap("<div/>"), r._focusView(a, e), e.parent().css({ position: "relative", width: 2 * l, "float": B, "margin-left": i ? 0 : -l }), n[i ? "insertAfter" : "insertBefore"](e), pt(o, { effects: L + ":" + (i ? "right" : B), complete: function () { e.remove(), n.unwrap(), r._focusView(a), r._oldTable = t } }), e.parent().kendoStop(!0, !0).kendoAnimate(o)) }, _vertical: function (e, n) { var i, r, a = this, o = a.options.animation.vertical, s = o.effects, l = a._active; s && -1 != s.indexOf("zoom") && (n.css({ position: "absolute", top: e.prev().outerHeight(), left: 0 }).insertBefore(e), E && (i = a._cellByDate(a._view.toDateString(a._current)), r = i.position(), r = r.left + parseInt(i.width() / 2, 10) + "px" + " " + (r.top + parseInt(i.height() / 2, 10) + "px"), n.css(E, r)), e.kendoStop(!0, !0).kendoAnimate({ effects: "fadeOut", duration: 600, complete: function () { e.remove(), n.css({ position: "static", top: 0, left: 0 }), a._focusView(l), a._oldTable = t } }), n.kendoStop(!0, !0).kendoAnimate(o)) }, _cellByDate: function (t) { return this._table.find("td:not(." + Y + ")").filter(function () { return e(this.firstChild).attr(_.attr(j)) === t }) }, _class: function (t, n) { var i = this, r = i._cellID, a = i._cell; a && a.removeAttr(ct).removeAttr(M), a = i._table.find("td:not(." + Y + ")").removeClass(t).filter(function () { return e(this.firstChild).attr(_.attr(j)) === n }).attr(ct, !0), t !== K || i._active || i.options.focusOnNav === !1 || (t = ""), a.addClass(t), a[0] && (i._cell = a), r && (a.attr(M, r), i._table.removeAttr("aria-activedescendant").attr("aria-activedescendant", r)) }, _bindTable: function (e) { e.on(tt, this._addClassProxy).on(Z, this._removeClassProxy) }, _click: function (e) { var t = this, n = t.options, i = new Date(+t._current), r = e.attr(_.attr(j)).split("/"); r = new ft(r[0], r[1], r[2]), x(r), t._view.setDate(i, r), t.navigateDown(o(i, n.min, n.max)) }, _focus: function (e) { var t = this, n = t._view; 0 !== n.compare(e, t._current) ? t.navigate(e) : (t._current = e, t._class(K, n.toDateString(e))) }, _focusView: function (e, t) { e && this.focus(t) }, _footer: function (n) { var i = this, r = a(), o = i.element, s = o.find(".k-footer"); return n ? (s[0] || (s = e('<div class="k-footer"><a href="#" class="k-link k-nav-today"></a></div>').appendTo(o)), i._today = s.show().find(".k-link").html(n(r)).attr("title", _.toString(r, "D", i.options.culture)), i._toggle(), t) : (i._toggle(!1), s.hide(), t) }, _header: function () { var e, t = this, n = t.element, i = t.options.focusOnNav !== !1; n.find(".k-header")[0] || n.html('<div class="k-header"><a href="#" role="button" class="k-link k-nav-prev"><span class="k-icon k-i-arrow-w"></span></a>
42<a href="#" role="button" aria-live="assertive" aria-atomic="true" class="k-link k-nav-fast"></a><a href="#" role="button" class="k-link k-nav-next"><span class="k-icon k-i-arrow-e"></span></a></div>'), e = n.find(".k-link").on(it + " " + rt + " " + tt + " " + Z, c).click(!1), t._title = e.eq(1).on(z, function () { t._focusView(i), t.navigateUp() }), t[st] = e.eq(0).on(z, function () { t._focusView(i), t.navigateToPast() }), t[lt] = e.eq(2).on(z, function () { t._focusView(i), t.navigateToFuture() }) }, _navigate: function (e, t) { var n = this, i = n._index + 1, r = new ft(+n._current); e = n[e], e.hasClass($) || (i > 3 ? r.setFullYear(r.getFullYear() + 100 * t) : v.views[i].setDate(r, t), n.navigate(r)) }, _option: function (e, n) { var i, r, a = this, o = a.options, s = +a._value, l = lt; return n === t ? o[e] : (n = y(n, o.format, o.culture), n && (o[e] = new ft(+n), r = a._view.compare(n, a._current), s ? e === P ? (i = +n > s, r = r > -1, l = st) : (i = s > +n, r = 1 > r) : r = m(a._current, n), i ? a.value(null) : r ? a.navigate() : a[l].toggleClass($, !1).attr(dt, !1), a._toggle()), t) }, _toggle: function (e) { var n = this, i = n.options, r = n._today; e === t && (e = s(a(), i.min, i.max)), r && (r.off(z), e ? r.addClass(J).removeClass($).on(z, ut(n._todayClick, n)) : r.removeClass(J).addClass($).on(z, u)) }, _todayClick: function (e) { var t = this, n = ht[t.options.depth], i = a(); e.preventDefault(), 0 === t._view.compare(t._current, i) && t._index == n && (t._changeView = !1), t._value = i, t.navigate(i, n), t.trigger(U) }, _templates: function () { var e = this, t = e.options, n = t.footer, i = t.month, r = i.content, a = i.empty; e.month = { content: S('<td#=data.cssClass# role="gridcell"><a tabindex="-1" class="k-link#=data.linkClass#" href="#=data.url#" ' + _.attr("value") + '="#=data.dateString#" title="#=data.title#">' + (r || "#=data.value#") + "</a></td>", { useWithBlock: !!r }), empty: S('<td role="gridcell">' + (a || " ") + "</td>", { useWithBlock: !!a }) }, n !== !1 && (e.footer = S(n || '#= kendo.toString(data,"D","' + t.culture + '") #', { useWithBlock: !1 })) } }); k.plugin(gt), v = { firstDayOfMonth: function (e) { return new ft(e.getFullYear(), e.getMonth(), 1) }, firstVisibleDay: function (e, t) { t = t || _.culture().calendar; for (var n = t.firstDay, i = new ft(e.getFullYear(), e.getMonth(), 0, e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds()); i.getDay() != n; ) v.setTime(i, -1 * ot); return i }, setTime: function (e, t) { var n = e.getTimezoneOffset(), i = new ft(e.getTime() + t), r = i.getTimezoneOffset() - n; e.setTime(i.getTime() + r * at) }, views: [{ name: V, title: function (e, t, n, i) { return p(i).months.names[e.getMonth()] + " " + e.getFullYear() }, content: function (e) { 43 for (var t = this, n = 0, r = e.min, a = e.max, o = e.date, s = e.dates, d = e.format, c = e.culture, u = e.url, f = u && s[0], h = p(c), m = h.firstDay, b = h.days, k = l(b.names, m), w = l(b.namesShort, m), y = v.firstVisibleDay(o, h), C = t.first(o), T = t.last(o), S = t.toDateString, F = new ft, D = '<table tabindex="0" role="grid" class="k-content" cellspacing="0"><thead><tr role="row">'; 7 > n; n++) D += '<th scope="col" title="' + k[n] + '">' + w[n] + "</th>"; 44 return F = new ft(F.getFullYear(), F.getMonth(), F.getDate()), x(F), F = +F, i({ cells: 42, perRow: 7, html: D += '</tr></thead><tbody><tr role="row">', start: new ft(y.getFullYear(), y.getMonth(), y.getDate()), min: new ft(r.getFullYear(), r.getMonth(), r.getDate()), max: new ft(a.getFullYear(), a.getMonth(), a.getDate()), content: e.content, empty: e.empty, setter: t.setDate, build: function (e) { var t = [], n = e.getDay(), i = "", r = "#"; return (C > e || e > T) && t.push(Y), +e === F && t.push("k-today"), (0 === n || 6 === n) && t.push("k-weekend"), f && g(+e, s) && (r = u.replace("{0}", _.toString(e, d, c)), i = " k-action-link"), { date: e, dates: s, ns: _.ns, title: _.toString(e, "D", c), value: e.getDate(), dateString: S(e), cssClass: t[0] ? ' class="' + t.join(" ") + '"' : "", linkClass: i, url: r} } }) 45 }, first: function (e) { return v.firstDayOfMonth(e) }, last: function (e) { var t = new ft(e.getFullYear(), e.getMonth() + 1, 0), n = v.firstDayOfMonth(e), i = Math.abs(t.getTimezoneOffset() - n.getTimezoneOffset()); return i && t.setHours(n.getHours() + i / 60), t }, compare: function (e, t) { var n, i = e.getMonth(), r = e.getFullYear(), a = t.getMonth(), o = t.getFullYear(); return n = r > o ? 1 : o > r ? -1 : i == a ? 0 : i > a ? 1 : -1 }, setDate: function (e, t) { var n = e.getHours(); t instanceof ft ? e.setFullYear(t.getFullYear(), t.getMonth(), t.getDate()) : v.setTime(e, t * ot), x(e, n) }, toDateString: function (e) { return e.getFullYear() + "/" + e.getMonth() + "/" + e.getDate() } 46 }, { name: "year", title: function (e) { return e.getFullYear() }, content: function (e) { var t = p(e.culture).months.namesAbbr, n = this.toDateString, r = e.min, a = e.max; return i({ min: new ft(r.getFullYear(), r.getMonth(), 1), max: new ft(a.getFullYear(), a.getMonth(), 1), start: new ft(e.date.getFullYear(), 0, 1), setter: this.setDate, build: function (e) { return { value: t[e.getMonth()], ns: _.ns, dateString: n(e), cssClass: ""} } }) }, first: function (e) { return new ft(e.getFullYear(), 0, e.getDate()) }, last: function (e) { return new ft(e.getFullYear(), 11, e.getDate()) }, compare: function (e, t) { return r(e, t) }, setDate: function (e, t) { var n, i = e.getHours(); t instanceof ft ? (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)), x(e, i) }, toDateString: function (e) { return e.getFullYear() + "/" + e.getMonth() + "/1" } }, { name: "decade", title: function (e, t, i) { return n(e, t, i, 10) }, content: function (e) { var t = e.date.getFullYear(), n = this.toDateString; return i({ start: new ft(t - t % 10 - 1, 0, 1), min: new ft(e.min.getFullYear(), 0, 1), max: new ft(e.max.getFullYear(), 0, 1), setter: this.setDate, build: function (e, t) { return { value: e.getFullYear(), ns: _.ns, dateString: n(e), cssClass: 0 === t || 11 == t ? Q : ""} } }) }, first: function (e) { var t = e.getFullYear(); return new ft(t - t % 10, e.getMonth(), e.getDate()) }, last: function (e) { var t = e.getFullYear(); return new ft(t - t % 10 + 9, e.getMonth(), e.getDate()) }, compare: function (e, t) { return r(e, t, 10) }, setDate: function (e, t) { d(e, t, 1) }, toDateString: function (e) { return e.getFullYear() + "/0/1" } }, { name: W, title: function (e, t, i) { return n(e, t, i, 100) }, content: function (e) { var t = e.date.getFullYear(), n = e.min.getFullYear(), r = e.max.getFullYear(), a = this.toDateString, o = n, s = r; return o -= o % 10, s -= s % 10, 10 > s - o && (s = o + 9), i({ start: new ft(t - t % 100 - 10, 0, 1), min: new ft(o, 0, 1), max: new ft(s, 0, 1), setter: this.setDate, build: function (e, t) { var i = e.getFullYear(), o = i + 9; return n > i && (i = n), o > r && (o = r), { ns: _.ns, value: i + " - " + o, dateString: a(e), cssClass: 0 === t || 11 == t ? Q : ""} } }) }, first: function (e) { var t = e.getFullYear(); return new ft(t - t % 100, e.getMonth(), e.getDate()) }, last: function (e) { var t = e.getFullYear(); return new ft(t - t % 100 + 99, e.getMonth(), e.getDate()) }, compare: function (e, t) { return r(e, t, 100) }, setDate: function (e, t) { d(e, t, 10) }, toDateString: function (e) { var t = e.getFullYear(); return t - t % 10 + "/0/1" } }] 47 }, v.isEqualDatePart = m, v.makeUnselectable = h, v.restrictValue = o, v.isInRange = s, v.normalize = f, v.viewsEnum = ht, _.calendar = v 48} (window.kendo.jQuery), function (e, t) { function n(t) { var n = t.parseFormats, i = t.format;
48 P.normalize(t), n = e.isArray(n) ? n : [n], -1 === e.inArray(i, n) && n.splice(0, 0, t.format), t.parseFormats = n } function i(e) { e.preventDefault() } var r, a = window.kendo, o = a.ui, s = o.Widget, l = a.parseDate, d = a.keys, c = a.template, u = a._activeElement, p = "<div />", f = "<span />", h = ".kendoDatePicker", g = "click" + h, m = "open", v = "close", _ = "change", b = "dateView", k = "disabled", w = "readonly", y = "k-state-default", x = "k-state-focused", C = "k-state-selected", T = "k-state-disabled", S = "k-state-hover", F = "keydown" + h, D = "mouseenter" + h + " mouseleave" + h, E = "mousedown" + h, A = "id", I = "min", H = "max", N = "month", R = "aria-disabled", z = "aria-expanded", O = "aria-hidden", M = "aria-readonly", P = a.calendar, B = P.isInRange, L = P.restrictValue, V = P.isEqualDatePart, W = e.extend, U = e.proxy, q = Date, j = function (t) { var n, i = this, s = document.body, l = r.sharedCalendar, d = e(p).attr(O, "true").addClass("k-calendar-container").appendTo(s); l || (l = r.sharedCalendar = new o.Calendar(e(p).attr(A, a.guid()).hide().appendTo(s), { focusOnNav: !1 }), P.makeUnselectable(l.element)), i.calendar = l, i.options = t = t || {}, n = t.id, n && (n += "_dateview", d.attr(A, n), i._dateViewID = n), i.popup = new o.Popup(d, W(t.popup, t, { name: "Popup", isRtl: a.support.isRtl(t.anchor) })), i.div = d, i._templates(), i.value(t.value) }; j.prototype = { _calendar: function () { var e = this, t = e.popup, n = e.options, r = e.calendar, a = r.element; a.data(b) !== e && (a.appendTo(t.element).data(b, e).off(g + " " + F).on(g, "td:has(.k-link)", U(e._click, e)).on(E, i).show(), r.unbind(_).bind(_, n), r.month = e.month, r.options.dates = n.dates, r.options.depth = n.depth, r.options.culture = n.culture, r._footer(e.footer), r.min(n.min), r.max(n.max), r._value = null, r.navigate(e._value || e._current, n.start), e.value(e._value)) }, destroy: function () { var n, i = this, a = i.calendar, o = a.element, s = o.data(b); (s === t || s === i) && (n = e(".k-calendar-container"), n.length > 1 ? o.hide().appendTo(document.body) : (o.off(h), a.destroy(), a.element.remove(), r.sharedCalendar = null)), i.popup.destroy() }, open: function () { var e = this; e._calendar(), e.popup.open() }, close: function () { this.popup.close() }, min: function (e) { this._option(I, e) }, max: function (e) { this._option(H, e) }, toggle: function () { var e = this; e[e.popup.visible() ? v : m]() }, move: function (e) { var n = this, i = e.keyCode, r = n.calendar, a = e.ctrlKey && i == d.DOWN || i == d.ENTER; if (i == d.ESC) return n.close(), t; if (e.altKey) return i == d.DOWN ? (n.open(), e.preventDefault()) : i == d.UP && (n.close(), e.preventDefault()), t; if (n.popup.visible()) return a && r._cell.hasClass(C) ? (n.close(), e.preventDefault(), t) : (n._current = r._move(e), t) }, value: function (e) { var t = this, n = t.calendar, i = t.options; t._value = e, t._current = new q(+L(e, i.min, i.max)), n.element.data(b) === t && n.value(e) }, _click: function (e) { -1 !== e.currentTarget.className.indexOf(C) && this.close() }, _option: function (e, t) { var n = this, i = n.options, r = n.calendar; i[e] = t, r.element.data(b) === n && r[e](t) }, _templates: function () { var e = this, t = e.options, n = t.footer, i = t.month || {}, r = i.content, o = i.empty; e.month = { content: c('<td#=data.cssClass#><a tabindex="-1" class="k-link" href="\\#" ' + a.attr("value") + '="#=data.dateString#" title="#=data.title#">' + (r || "#=data.value#") + "</a></td>", { useWithBlock: !!r }), empty: c("<td>" + (o || " ") + "</td>", { useWithBlock: !!o }) }, n !== !1 && (e.footer = c(n || '#= kendo.toString(data,"D","' + t.culture + '") #', { useWithBlock: !1 })) } }, j.normalize = n, a.DateView = j, r = s.extend({ init: function (e, t) { var i, r, o = this; s.fn.init.call(o, e, t), e = o.element, t = o.options, n(t), o._wrapper(), o.dateView = new j(W({}, t, { id: e.attr(A), anchor: o.wrapper, change: function () { o._change(this.value()), o.close() }, close: function (t) { o.trigger(v) ? t.preventDefault() : (e.attr(z, !1), r.attr(O, !0)) }, open: function (t) { var n, i = o.options; o.trigger(m) ? t.preventDefault() : (o.element.val() !== o._oldText && (n = l(e.val(), i.parseFormats, i.culture), n ? (o.dateView._current = n, o.dateView.calendar._focus(n)) : o.dateView.value(n)), e.attr(z, !0), r.attr(O, !1)) } })), r = o.dateView.div, o._icon(), e[0].type = "text", e.addClass("k-input").attr({ role: "textbox", "aria-haspopup": !0, "aria-expanded": !1, "aria-owns": o.dateView._dateViewID }), o._reset(), o._template(), i = e.is("[disabled]"), i ? o.enable(!1) : o.readonly(e.is("[readonly]")), o.value(t.value || o.element.val()), a.notify(o) }, events: [m, v, _], options: { name: "DatePicker", value: null, footer: "", format: "", culture: "", parseFormats: [], min: new Date(1900, 0, 1), max: new Date(2099, 11, 31), start: N, depth: N, animation: {}, month: {}, dates: [], ARIATemplate: 'Current focused date is #=kendo.toString(data.current, "D")#' }, setOptions: function (e) { var t = this, i = t.dateView, r = i.options; s.fn.setOptions.call(t, e), n(t.options), i.options = W(r, t.options, { change: r.change, close: r.close, open: r.open }) }, _editable: function (e) { var t = this, n = t._dateIcon.off(h), r = t.element.off(h), a = t._inputWrapper.off(h), o = e.readonly, s = e.disable; o || s ? (a.addClass(s ? T : y).removeClass(s ? y : T), r.attr(k, s).attr(w, o).attr(R, s).attr(M, o)) : (a.addClass(y).removeClass(T).on(D, t._toggleHover), r.removeAttr(k).removeAttr(w).attr(R, !1).attr(M, !1).on("keydown" + h, U(t._keydown, t)).on("blur" + h, U(t._blur, t)).on("focus" + h, function () { t._inputWrapper.addClass(x) }
48), n.on(g, U(t._click, t)).on(E, i)) }, readonly: function (e) { this._editable({ readonly: e === t ? !0 : e, disable: !1 }) }, enable: function (e) { this._editable({ readonly: !1, disable: !(e = e === t ? !0 : e) }) }, destroy: function () { var e = this; s.fn.destroy.call(e), e.dateView.destroy(), e.element.off(h), e._dateIcon.off(h), e._inputWrapper.off(h), e._form && e._form.off("reset", e._resetHandler) }, open: function () { this.dateView.open() }, close: function () { this.dateView.close() }, min: function (e) { return this._option(I, e) }, max: function (e) { return this._option(H, e) }, value: function (e) { var n = this; return e === t ? n._value : (n._old = n._update(e), null === n._old && n.element.val(""), n._oldText = n.element.val(), t) }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(S, "mouseenter" === t.type) }, _blur: function () { var e = this, t = e.element.val(); e.close(), t !== e._oldText && e._change(t), e._inputWrapper.removeClass(x) }, _click: function () { var e = this, t = e.element; e.dateView.toggle(), a.support.touch || t[0] === u() || t.focus() }, _change: function (e) { var t = this; e = t._update(e), +t._old != +e && (t._old = e, t._oldText = t.element.val(), t.trigger(_), t.element.trigger(_)) }, _keydown: function (e) { var t = this, n = t.dateView, i = t.element.val(); n.popup.visible() || e.keyCode != d.ENTER || i === t._oldText ? (n.move(e), t._updateARIA(n._current)) : t._change(i) }, _icon: function () { var t, n = this, i = n.element; t = i.next("span.k-select"), t[0] || (t = e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span></span>').insertAfter(i)), n._dateIcon = t.attr({ role: "button", "aria-controls": n.dateView._dateViewID }) }, _option: function (e, n) { var i = this, r = i.options; return n === t ? r[e] : (n = l(n, r.parseFormats, r.culture), n && (r[e] = new q(+n), i.dateView[e](n)), t) }, _update: function (e) { var t, n = this, i = n.options, r = i.min, o = i.max, s = l(e, i.parseFormats, i.culture); return +s === +n._value ? (t = a.toString(s, i.format, i.culture), t !== e && n.element.val(null === s ? e : t), s) : (null !== s && V(s, r) ? s = L(s, r, o) : B(s, r, o) || (s = null), n._value = s, n.dateView.value(s), n.element.val(s ? a.toString(s, i.format, i.culture) : e), n._updateARIA(s), s) }, _wrapper: function () { var t, n = this, i = n.element; t = i.parents(".k-datepicker"), t[0] || (t = i.wrap(f).parent().addClass("k-picker-wrap k-state-default"), t = t.wrap(f).parent()), t[0].style.cssText = i[0].style.cssText, i.css({ width: "100%", height: i[0].style.height }), n.wrapper = t.addClass("k-widget k-datepicker k-header").addClass(i[0].className), n._inputWrapper = e(t[0].firstChild) }, _reset: function () { var e = this, t = e.element, n = t.closest("form"); n[0] && (e._resetHandler = function () { e.value(t[0].defaultValue) }, e._form = n.on("reset", e._resetHandler)) }, _template: function () { this._ariaTemplate = c(this.options.ARIATemplate) }, _updateARIA: function (e) { this.element.attr("aria-label", this._ariaTemplate({ current: e })) } }), o.plugin(r) } (window.kendo.jQuery), function (e, t) { function n(e, t, n) { return n ? t.substring(0, e).split(n).length - 1 : 0 } function i(e, t, i) { return t.split(i)[n(e, t, i)] } function r(e, t, i, r) { var a = t.split(r); return a.splice(n(e, t, r), 1, i), r && "" !== a[a.length - 1] && a.push(""), a.join(r) } function a(e) { var t = e.value.length; S(e, t, t) } var o = window.kendo, s = o.support, l = o._activeElement, d = s.placeholder, c = o.ui, u = o.keys, p = o.data.DataSource, f = c.List, h = "aria-disabled", g = "aria-readonly", m = "k-state-default", v = "disabled", _ = "readonly", b = "k-state-focused", k = "k-state-selected", w = "k-state-disabled", y = "k-state-hover", x = ".kendoAutoComplete", C = "mouseenter" + x + " mouseleave" + x, T = f.caret, S = f.selectText, F = e.proxy, D = f.extend({ init: function (t, n) { var i, r = this; r.ns = x, n = e.isArray(n) ? { dataSource: n} : n, f.fn.init.call(r, t, n), t = r.element, n = r.options, n.placeholder = n.placeholder || t.attr("placeholder"), d && t.attr("placeholder", n.placeholder), r._wrapper(), r._loader(), r._dataSource(), r._ignoreCase(), t[0].type = "text", i = r.wrapper, r._popup(), t.addClass("k-input").on("keydown" + x, F(r._keydown, r)).on("paste" + x, F(r._search, r)).on("focus" + x, function () { r._prev = r._accessor(), r._placeholder(!1), i.addClass(b) }).on("blur" + x, function () { r._change(), r._placeholder(), i.removeClass(b) }).attr({ autocomplete: "off", role: "textbox", "aria-haspopup": !0 }), r._enable(), r._old = r._accessor(), t[0].id && t.attr("aria-owns", r.ul[0].id), r._aria(), r._placeholder(), o.notify(r) }, options: { name: "AutoComplete", enabled: !0, suggest: !1, template: "", dataTextField: "", minLength: 1, delay: 200, height: 200, filter: "startswith", ignoreCase: !0, highlightFirst: !1, separator: null, placeholder: "", animation: {} }, _dataSource: function () { var e = this; e.dataSource && e._refreshHandler ? e._unbindDataSource() : (e._refreshHandler = F(e.refresh, e), e._progressHandler = F(e._showBusy, e)), e.dataSource = p.create(e.options.dataSource).bind("change", e._refreshHandler).bind("progress", e._progressHandler) }, setDataSource: function (e) { this.options.dataSource = e, this._dataSource() }, events: ["open", "close", "change", "select", "dataBinding", "dataBound"], setOptions: function (e) { f.fn.setOptions.call(this, e), this._template(), this._accessors(), this._aria() }, _editable: function (e) { var t = this, n = t.element, i = t.wrapper.off(x), r = e.readonly, a = e.disable; r || a ? (i.addClass(a ? w : m).removeClass(a ? m : w), n.attr(v, a).attr(_, r).attr(h, a).attr(g, r)) : (i.addClass(m).removeClass(w).on(C, t._toggleHover), n.removeAttr(v).removeAttr(_).attr(h, !1).attr(g, !1)) }, close: function () { var e = this, t = e._current; t && t.removeClass(k), e.current(null), e.popup.close() }, destroy: function () { var e = this; e.element.off(x), e.wrapper.off(x), f.fn.destroy.call(e) }, refresh: function () { var n, i = this, r = i.ul[0], a = i.popup, s = i.options, d = i._data(), c = d.length; i.trigger("dataBinding"), r.innerHTML = o.render(i.template, d), i._height(c), a.visible() && a._position(), c && (s.highlightFirst && i.current(e(r.firstChild)), s.suggest && i.suggest(e(r.firstChild))), i._open && (i._open = !1, n = c ? "open" : "close", i._typing && i.element[0] !== l() && (n = "close"), a[n](), i._typing = t), i._touchScroller && i._touchScroller.reset(), i._makeUnselectable(), i._hideBusy(), i.trigger("dataBound") }, select: function (e) { this._select(e) }, search: function (e) { var t, n = this, r = n.options, a = r.ignoreCase, o = r.separator; e = e || n._accessor(), n._current = null, clearTimeout(n._typing), o && (e = i(T(n.element[0]), e, o)), t = e.length, t ? t >
48= n.options.minLength && (n._open = !0, n._filterSource({ value: a ? e.toLowerCase() : e, operator: r.filter, field: r.dataTextField, ignoreCase: a })) : n.popup.close() }, suggest: function (e) { var i, r = this, a = r._last, o = r._accessor(), s = r.element[0], l = T(s), d = r.options.separator, c = o.split(d), p = n(l, o, d), h = l; return a == u.BACKSPACE || a == u.DELETE ? (r._last = t, t) : (e = e || "", "string" != typeof e && (i = f.inArray(e[0], r.ul[0]), e = i > -1 ? r._text(r._data()[i]) : ""), 0 >= l && (l = o.toLowerCase().indexOf(e.toLowerCase()) + 1), i = o.substring(0, l).lastIndexOf(d), i = i > -1 ? l - (i + d.length) : l, o = c[p].substring(0, i), e && (i = e.toLowerCase().indexOf(o.toLowerCase()), i > -1 && (e = e.substring(i + o.length), h = l + e.length, o += e), d && "" !== c[c.length - 1] && c.push("")), c[p] = o, r._accessor(c.join(d || "")), S(s, l, h), t) }, value: function (e) { return e === t ? this._accessor() : (this._accessor(e), this._old = e, t) }, _accessor: function (e) { var n = this, i = n.element[0]; return e === t ? (e = i.value, i.className.indexOf("k-readonly") > -1 ? e === n.options.placeholder ? "" : e : e) : (i.value = null === e ? "" : e, n._placeholder(), t) }, _accept: function (e) { var t = this; t._focus(e), a(t.element[0]) }, _keydown: function (t) { var n = this, i = n.ul[0], r = t.keyCode, a = n._current, o = n.popup.visible(); n._last = r, r === u.DOWN ? (o && n._move(a ? a.next() : e(i.firstChild)), t.preventDefault()) : r === u.UP ? (o && n._move(a ? a.prev() : e(i.lastChild)), t.preventDefault()) : r === u.ENTER || r === u.TAB ? (r === u.ENTER && n.popup.visible() && t.preventDefault(), n._accept(a)) : r === u.ESC ? (n.popup.visible() && t.preventDefault(), n.close()) : n._search() }, _move: function (e) { var t = this; e = e[0] ? e : null, t.current(e), t.options.suggest && t.suggest(e) }, _hideBusy: function () { var e = this; clearTimeout(e._busy), e._loading.hide(), e.element.attr("aria-busy", !1), e._busy = null }, _showBusy: function () { var e = this; e._busy || (e._busy = setTimeout(function () { e.element.attr("aria-busy", !0), e._loading.show() }, 100)) }, _placeholder: function (e) { if (!d) { var n, i = this, r = i.element, a = i.options.placeholder; if (a) { if (n = r.val(), e === t && (e = !n), e || (a = n !== a ? n : ""), n === i._old && !e) return; r.toggleClass("k-readonly", e).val(a) } } }, _search: function () { var e = this; clearTimeout(e._typing), e._typing = setTimeout(function () { e._prev !== e._accessor() && (e._prev = e._accessor(), e.search()) }, e.options.delay) }, _select: function (t) { var n, i, a = this, o = a.options.separator, s = a._data(); t = e(t), t[0] && !t.hasClass(k) && (i = f.inArray(t[0], a.ul[0]), i > -1 && (s = s[i], n = a._text(s), o && (n = r(T(a.element[0]), a._accessor(), n, o)), a._accessor(n), a.current(t.addClass(k)))) }, _loader: function () { this._loading = e('<span class="k-icon k-loading" style="display:none"></span>').insertAfter(this.element) }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(y, "mouseenter" === t.type) }, _wrapper: function () { var e, t = this, n = t.element, i = n[0]; e = n.parent(), e.is("span.k-widget") || (e = n.wrap("<span />").parent()), e.attr("tabindex", -1), e.attr("role", "presentation"), e[0].style.cssText = i.style.cssText, n.css({ width: "100%", height: i.style.height }), t._focused = t.element, t.wrapper = e.addClass("k-widget k-autocomplete k-header").addClass(i.className) } }); c.plugin(D) } (window.kendo.jQuery), function (e, t) { function n(e, t, n) { for (var i, r = 0, a = t.length - 1; a > r; ++r) i = t[r], i in e || (e[i] = {}), e = e[i]; e[t[a]] = n } var i = window.kendo, r = i.ui, a = r.Select, o = i.support.mobileOS, s = ".kendoDropDownList", l = "disabled", d = "readonly", c = "change", u = "k-state-focused", p = "k-state-default", f = "k-state-disabled", h = "aria-disabled", g = "aria-readonly", m = "k-state-selected", v = "mouseenter" + s + " mouseleave" + s, _ = "tabindex", b = e.proxy, k = a.extend({ init: function (n, r) { var o, l, d, c = this, u = r && r.index; c.ns = s, r = e.isArray(r) ? { dataSource: r} : r, a.fn.init.call(c, n, r), c._focusHandler = function () { c.wrapper.focu
48s() }, r = c.options, n = c.element.on("focus" + s, c._focusHandler), c._reset(), c._word = "", c._wrapper(), c._tabindex(), c.wrapper.data(_, c.wrapper.attr(_)), c._aria(), c._span(), c._popup(), c._mobile(), c._dataSource(), c._ignoreCase(), c._enable(), c._cascade(), c._oldIndex = c.selectedIndex = -1, u !== t && (r.index = u), r.autoBind ? c.dataSource.fetch() : (d = r.text || "", d || (o = c._optionLabelText(r.optionLabel), l = o && 0 === r.index, c._isSelect ? d = l ? o : n.children(":selected").text() : !n[0].value && l && (d = o)), c.text(d)), i.notify(c) }, options: { name: "DropDownList", enabled: !0, autoBind: !0, index: 0, text: null, value: null, template: "", delay: 500, height: 200, dataTextField: "", dataValueField: "", optionLabel: "", cascadeFrom: "", ignoreCase: !0, animation: {} }, events: ["open", "close", c, "select", "dataBinding", "dataBound", "cascade"], setOptions: function (e) { a.fn.setOptions.call(this, e), this._template(), this._accessors(), this._aria() }, destroy: function () { var e = this; e.wrapper.off(s), e.element.off(s), e._inputWrapper.off(s), a.fn.destroy.call(e) }, open: function () { var e = this; e.ul[0].firstChild ? (e.popup.open(), e._scroll(e._current)) : (e._open = !0, e._request || e.dataSource.fetch()) }, toggle: function (e) { this._toggle(e) }, refresh: function () { var e = this, t = e._data(), n = t.length, r = e.options.optionLabel; e.trigger("dataBinding"), e._current && e.current(null), e.ul[0].innerHTML = i.render(e.template, t), e._height(n), e.popup.visible() && e.popup._position(), e._isSelect && (r && n && (r = e._optionLabelText(r), r = '<option value="">' + r + "</option>"), e._options(t, r)), e._open && (e._open = !1, e.toggle(!!n)), e._hideBusy(), e._makeUnselectable(), !e._fetch && n && e._selectItem(), e._bound = !0, e.trigger("dataBound") }, search: function (e) { if (e) { var n = this, i = n.options.ignoreCase; i && (e = e.toLowerCase()), n._select(function (r) { var a = n._text(r); return a !== t ? (a += "", i && (a = a.toLowerCase()), 0 === a.indexOf(e)) : t }) } }, text: function (e) { var n = this.span; return e === t ? n.text() : (n.text(e), t) }, value: function (e) { var n, i, r = this; return e === t ? r._accessor() : (null !== e && (e = "" + e), r._selectedValue = e, i = e || r.options.optionLabel && !r.element[0].disabled && "" === e, i && r._fetchItems(e) || (n = r._index(e), r.select(n > -1 ? n : 0)), t) }, _editable: function (e) { var t = this, n = t.element, i = e.disable, r = e.readonly, a = t.wrapper.off(s), o = t._inputWrapper.off(v), c = function () { o.addClass(u), t._blured = !1 }, m = function () { t._blured || (t._triggerCascade(), t._blur(), o.removeClass(u), t._blured = !0, n.blur()) }; r || i ? (i ? (a.removeAttr(_), o.addClass(f).removeClass(p)) : (o.addClass(p).removeClass(f), a.on("focusin" + s, c).on("focusout" + s, m)), n.attr(l, i).attr(d, r), a.attr(h, i).attr(g, r)) : (n.removeAttr(l).removeAttr(d), o.addClass(p).removeClass(f).on(v, t._toggleHover), a.attr(_, a.data(_)).attr(h, !1).attr(g, !1).on("click" + s, function (e) { t._blured = !1, e.preventDefault(), t.toggle() }).on("keydown" + s, b(t._keydown, t)).on("keypress" + s, b(t._keypress, t)).on("focusin" + s, c).on("focusout" + s, m)) }, _accept: function (e) { this._focus(e) }, _optionLabelText: function () { var e = this.options, t = e.dataTextField, n = e.optionLabel; return n && t && "object" == typeof n ? this._text(n) : n }, _data: function () { var e = this, t = e.options, r = t.optionLabel, a = t.dataTextField, o = t.dataValueField, s = e.dataSource.view(), l = s.length, d = r, c = 0; if (r && l) { for ("object" == typeof r ? d = r : a && (d = {}, a = a.split("."), o = o.split("."), n(d, o, ""), n(d, a, r)), d = new i.data.ObservableArray([d]); l > c; c++) d.push(s[c]); s = d } return s }, _keydown: function (e) { var t = this, n = e.keyCode, r = i.keys, a = t.ul[0]; n === r.LEFT ? n = r.UP : n === r.RIGHT && (n = r.DOWN), e.keyCode = n, t._move(e), n === r.HOME ? (e.preventDefault(), t._select(a.firstChild)) : n === r.END && (e.preventDefault(), t._select(a.lastChild)) }, _selectNext: function (e, t) { for (var n, i = this, r = i.options.ignoreCase, a = i._data(), o = a.length; o > t; t++) if (n = i._text(a[t]), n && (n += "", r && (n = n.toLowerCase()), 0 === n.indexOf(e))) return i._select(t), i._triggerEvents(), !0; return !1 }, _keypress: function (e) { var t = this; setTimeout(function () { var n = String.fromCharCode(e.keyCode || e.charCode), i = t.selectedIndex; if (t.options.ignoreCase && (n = n.toLowerCase()), n === t._last && i > -1) { if (t._word = n, t._selectNext(n, i + 1)) return } else t._word += n; t._last = n, t._search() }) }, _popup: function () { a.fn._popup.call(this), this.popup.one("open", function () { this.wrapper = i.wrap(this.element).addClass("km-popup") }) }, _search: function () { var e = this, n = e.dataSource, i = e._word; return clearTimeout(e._typing), e._typing = setTimeout(function () { e._word = "" }, e.options.delay), e.ul[0].firstChild ? (e.search(i), e._triggerEvents(), t) : (n.one(c, function () { n.data()[0] && e.search(i) }).fetch(), t) }, _select: function (e) { var n, i, a, o = this, s = o._current, l = o._data(); e = o._get(e), e && e[0] && !e.hasClass(m) && (s && s.removeClass(m), a = r.List.inArray(e[0], o.ul[0]), a > -1 && (l = l[a], i = o._text(l), n = o._value(l), o.selectedIndex = a, o.text(i), o._accessor(n !== t ? n : i, a), o._selectedValue = o._accessor(), o.current(e.addClass(m)), o._optionID && o._current.attr("aria-selected", !0))) }, _triggerEvents: function () { this.popup.visible() || (this._triggerCascade(), this._change()) }, _mobile: function () { var e = this, t = e.popup, n = t.element.parents(".km-root").eq(0); n.length && o && (t.options.animation.open.effects = o.android || o.meego ? "fadeIn" : o.ios || o.wp ? "slideIn:up" : t.options.animation.open.effects) }, _span: function () { var t, n = this, i = n.wrapper, r = "span.k-input"; t = i.find(r), t[0] || (i.append('<span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input"> </span><span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element), t = i.find(r)), n.span = t, n._inputWrapper = e(i[0].firstChild), n._arrow = i.find(".k-icon").mousedown(function (e) { e.preventDefault() }) }, _wrapper: function () { var e, t = this, n = t.element, i = n[0];
48 e = n.parent(), e.is("span.k-widget") || (e = n.wrap("<span />").parent(), e[0].style.cssText = i.style.cssText), n.hide(), t._focused = t.wrapper = e.addClass("k-widget k-dropdown k-header").addClass(i.className).css("display", "").attr({ unselectable: "on", role: "listbox", "aria-haspopup": !0, "aria-expanded": !1 }) }, _clearSelection: function () { var e = this, n = e.options.optionLabel; return e.dataSource.view()[0] && n ? (e.select(0), t) : (e.text(n), e.element.val(""), e.selectedIndex = -1, t) } }); r.plugin(k) } (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = n.ui, r = i.List, a = i.Select, o = n.support, s = o.placeholder, l = n._activeElement, d = n.keys, c = ".kendoComboBox", u = "click" + c, p = "mousedown" + c, f = "disabled", h = "readonly", g = "change", m = "k-state-default", v = "k-state-focused", _ = "k-state-disabled", b = "aria-disabled", k = "aria-readonly", w = "k-state-selected", y = "filter", x = "accept", C = "rebind", T = "mouseenter" + c + " mouseleave" + c, S = null, F = e.proxy, D = a.extend({ init: function (t, i) { var r, o = this; o.ns = c, i = e.isArray(i) ? { dataSource: i} : i, a.fn.init.call(o, t, i), o._focusHandler = function () { o.input.focus() }, i = o.options, t = o.element.on("focus" + c, o._focusHandler), i.placeholder = i.placeholder || t.attr("placeholder"), o._reset(), o._wrapper(), o._input(), o._tabindex(o.input), o._popup(), o._dataSource(), o._ignoreCase(), o._enable(), o._cascade(), o._aria(), o._oldIndex = o.selectedIndex = -1, i.autoBind ? o._filterSource() : (r = i.text, !r && o._isSelect && (r = t.children(":selected").text()), r && o.input.val(r)), r || o._placeholder(), n.notify(o) }, options: { name: "ComboBox", enabled: !0, index: -1, text: null, value: null, autoBind: !0, delay: 200, dataTextField: "", dataValueField: "", minLength: 0, height: 200, highlightFirst: !0, template: "", filter: "none", placeholder: "", suggest: !1, ignoreCase: !0, animation: {} }, events: ["open", "close", g, "select", "dataBinding", "dataBound", "cascade"], setOptions: function (e) { a.fn.setOptions.call(this, e), this._template(), this._accessors(), this._aria() }, current: function (e) { var n = this, i = n._current; return e === t ? i : (i && i.removeClass(w), a.fn.current.call(n, e), t) }, destroy: function () { var e = this; e.input.off(c), e.element.off(c), e._inputWrapper.off(c), a.fn.destroy.call(e) }, _editable: function (e) { var t = this, n = e.disable, i = e.readonly, r = t._inputWrapper.off(c), a = t.element.add(t.input.off(c)), o = t._arrow.parent().off(u + " " + p); i || n ? (r.addClass(n ? _ : m).removeClass(n ? m : _), a.attr(f, n).attr(h, i).attr(b, n).attr(k, i)) : (r.addClass(m).removeClass(_).on(T, t._toggleHover), a.removeAttr(f).removeAttr(h).attr(b, !1).attr(k, !1), o.on(u, function () { t.toggle() }).on(p, function (e) { e.preventDefault() }), t.input.on("keydown" + c, F(t._keydown, t)).on("focus" + c, function () { r.addClass(v), t._placeholder(!1) }).on("blur" + c, function () { r.removeClass(v), clearTimeout(t._typing), t.options.text !== t.input.val() && t.text(t.text()), t._placeholder(), t._blur(), t.element.blur() })) }, open: function () { var e = this, t = e.dataSource.options.serverFiltering; e.popup.visible() || (!e.ul[0].firstChild || e._state === x && !t ? (e._open = !0, e._state = C, e._filterSource()) : (e.popup.open(), e._scroll(e._current))) }, refresh: function () { var i, r, a, o = this, s = o.ul[0], d = o.options, c = o._state, u = o._data(), p = u.length; o.trigger("dataBinding"), s.innerHTML = n.render(o.template, u), o._height(p), o.popup.visible() && o.popup._position(), o._isSelect && (c === C && (o._state = "", i = o.value()), a = o._option, o._option = t, o._options(u), a && a[0].selected && o._custom(a.val())), p && (d.highlightFirst && o.current(e(s.firstChild)), d.suggest && o.input.val() && o._request !== t && o.suggest(e(s.firstChild))), c === y || o._fetch || o._selectItem(), o._open && (o._open = !1, r = !!p, o._typing && o.input[0] !== l() && (r = !1), o.toggle(r), o._typing = t), o._touchScroller && o._touchScroller.reset(), o._makeUnselectable(), o._hideBusy(), o._bound = !0, o.trigger("dataBound") }, search: function (e) { e = "string" == typeof e ? e : this.text(); var t = this, n = e.length, i = t.options, r = i.ignoreCase, a = i.filter, o = i.dataTextField; clearTimeout(t._typing), n >= i.minLength && (t._state = y, "none" === a ? t._filter(e) : (t._open = !0, t._filterS
48ource({ value: r ? e.toLowerCase() : e, field: o, operator: a, ignoreCase: r }))) }, suggest: function (e) { var n, i = this, a = i.input[0], o = i.text(), s = r.caret(a), l = i._last; return l == d.BACKSPACE || l == d.DELETE ? (i._last = t, t) : (e = e || "", "string" != typeof e && (n = r.inArray(e[0], i.ul[0]), e = n > -1 ? i._text(i.dataSource.view()[n]) : ""), 0 >= s && (s = o.toLowerCase().indexOf(e.toLowerCase()) + 1), e ? (n = e.toLowerCase().indexOf(o.toLowerCase()), n > -1 && (o += e.substring(n + o.length))) : o = o.substring(0, s), o.length === s && e || (a.value = o, r.selectText(a, s, o.length)), t) }, text: function (e) { e = null === e ? "" : e; var n, i = this, r = i._text, a = i.input[0], o = i.options.ignoreCase, s = e; return e === t ? a.value : (n = i.dataItem(), n && r(n) === e ? (i._triggerCascade(), t) : (o && (s = s.toLowerCase()), i._select(function (e) { return e = r(e), o && (e = (e + "").toLowerCase()), e === s }), 0 > i.selectedIndex && (i._custom(e), a.value = e), i._triggerCascade(), t)) }, toggle: function (e) { var t = this; t._toggle(e) }, value: function (e) { var n, i = this; return e === t ? i._accessor() : (null !== e && (e = "" + e), i._selectedValue = e, !i._open && e && i._fetchItems(e) || (n = i._index(e), n > -1 ? i.select(n) : (i.current(S), i._custom(e), i.text(e), i._placeholder()), i._prev = i._old = i._accessor(), i._oldIndex = i.selectedIndex), t) }, _accept: function (e) { var t = this; e ? t._focus(e) : (t.text(t.text()), t._change()) }, _custom: function (t) { var n = this, i = n.element, r = n._option; n._state === y && (n._state = x), n._isSelect ? (r || (r = n._option = e("<option/>"), i.append(r)), r.text(t), r[0].selected = !0) : i.val(t), n._selectedValue = t }, _filter: function (e) { var n = this, i = n.options, r = n.dataSource, a = i.ignoreCase, o = function (i) { var r = n._text(i); return r !== t ? (r += "", "" !== r && "" === e ? !1 : (a && (r = r.toLowerCase()), 0 === r.indexOf(e))) : t }; return a && (e = e.toLowerCase()), n.ul[0].firstChild ? (-1 !== n._highlight(o) && (i.suggest && n._current && n.suggest(n._current), n.open()), n._hideBusy(), t) : (r.one(g, function () { r.data()[0] && n.search(e) }).fetch(), t) }, _highlight: function (n) { var i, a = this; return n === t || null === n ? -1 : (n = a._get(n), i = r.inArray(n[0], a.ul[0]), -1 == i && (n = a.options.highlightFirst && !a.text() ? e(a.ul[0].firstChild) : S), a.current(n), i) }, _input: function () { var t, n = this, i = n.element.removeClass("k-input")[0], r = i.accessKey, a = n.wrapper, o = "input.k-input", l = i.name || ""; l && (l = 'name="' + l + '_input" '), t = a.find(o), t[0] || (a.append('<span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input ' + l + 'class="k-input" type="text" autocomplete="off"/><span tabindex="-1" unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-arrow-s">select</span></span></span>').append(n.element), t = a.find(o)), t[0].style.cssText = i.style.cssText, i.maxLength > -1 && (t[0].maxLength = i.maxLength), t.addClass(i.className).val(i.value).css({ width: "100%", height: i.style.height }).attr({ role: "combobox", "aria-expanded": !1 }).show(), s && t.attr("placeholder", n.options.placeholder), r && (i.accessKey = "", t[0].accessKey = r), n._focused = n.input = t, n._inputWrapper = e(a[0].firstChild), n._arrow = a.find(".k-icon").attr({ role: "button", tabIndex: -1 }), i.id && n._arrow.attr("aria-controls", n.ul[0].id) }, _keydown: function (e) { var t = this, n = e.keyCode; t._last = n, clearTimeout(t._typing), n == d.TAB || t._move(e) || t._search() }, _placeholder: function (e) { if (!s) { var n, i = this, r = i.input, a = i.options.placeholder;
48 if (a) { if (n = i.value(), e === t && (e = !n), r.toggleClass("k-readonly", e), !e) { if (n) return; a = "" } r.val(a) } } }, _search: function () { var e = this; e._typing = setTimeout(function () { var t = e.text(); e._prev !== t && (e._prev = t, e.search(t)) }, e.options.delay) }, _select: function (e) { var n, i, r = this, a = r._data(), o = r._highlight(e); r.selectedIndex = o, -1 !== o && (r._state === y && (r._state = x), r._current.addClass(w), a = a[o], n = r._text(a), i = r._value(a), r._prev = r.input[0].value = n, r._accessor(i !== t ? i : n, o), r._selectedValue = r._accessor(), r._placeholder(), r._optionID && r._current.attr("aria-selected", !0)) }, _wrapper: function () { var e = this, t = e.element, n = t.parent(); n.is("span.k-widget") || (n = t.hide().wrap("<span />").parent(), n[0].style.cssText = t[0].style.cssText), e.wrapper = n.addClass("k-widget k-combobox k-header").addClass(t[0].className).css("display", "") }, _clearSelection: function (e, t) { var n = this, i = e._selectedValue || e.value(), r = i && -1 === e.selectedIndex; (t || !i || r) && n.value("") } }); i.plugin(D) } (window.kendo.jQuery), function (e, t) { 49 function n(e, t) { var n; if (null === e && null !== t || null !== e && null === t) return !1; if (n = e.length, n !== t.length) return !1; for (; n--; ) if (e[n] !== t[n]) return !1; return !0 } function i(e) { 50 var t = e.firstChild; 51 return t && "none" === t.style.display && (t = a(t, y)), t 52 } function r(e) { var t = e.lastChild; return t && "none" === t.style.display && (t = a(t, x)), t } function a(e, t) { return e = e[t], e && "none" === e.style.display && (e = a(e, t)), e } var o = window.kendo, s = o.ui, l = s.List, d = o.keys, c = o._activeElement, u = o.data.ObservableArray, p = e.proxy, f = "id", h = "li", g = "accept", m = "filter", v = "open", _ = "close", b = "change", k = "progress", w = "select", y = "nextSibling", x = "previousSibling", C = ' style="display:none"', T = "aria-disabled", S = "aria-readonly", F = "k-state-focused", D = "k-loading-hidden", E = "k-state-hover", A = "k-state-disabled", I = "disabled", H = "readonly", N = ".kendoMultiSelect", R = "click" + N, z = "keydown" + N, O = "mouseenter" + N, M = "mouseleave" + N, P = O + " " + M, B = /"/g, L = e.isArray, V = ["font-family", "font-size", "font-stretch", "font-style", "font-weight", "letter-spacing", "text-transform", "line-height"], W = l.extend({ init: function (t, n) { var i, r, a = this; a.ns = N, l.fn.init.call(a, t, n), a._wrapper(), a._tagList(), a._input(), a._textContainer(), a._loader(), a._tabindex(a.input), t = a.element.attr("multiple", "multiple").hide(), n = a.options, r = n.value, n.placeholder || (n.placeholder = t.data("placeholder")), i = t.attr(f), i && (a._tagID = i + "_tag_active", i += "_taglist", a.tagList.attr(f, i)), a._aria(i), a._dataSource(), a._ignoreCase(), a._popup(), a._values = [], a._dataItems = [], a._reset(), a._enable(), a._placeholder(), n.autoBind ? a.dataSource.fetch() : r && (L(r) || (r = [r]), (e.isPlainObject(r[0]) || !n.dataValueField) && (a.dataSource.data(r), a.value(a._initialValues))), o.notify(a) }, options: { name: "MultiSelect", enabled: !0, autoBind: !0, highlightFirst: !0, dataTextField: "", dataValueField: "", filter: "startswith", ignoreCase: !0, minLength: 0, delay: 100, value: null, maxSelectedItems: null, itemTemplate: "", tagTemplate: "", placeholder: "", height: 200, animation: {} }, events: [v, _, b, w, "dataBinding", "dataBound"], setDataSource: function (e) { this.options.dataSource = e, this._dataSource(), this.options.autoBind && this.dataSource.fetch() }, setOptions: function (e) { l.fn.setOptions.call(this, e), this._template(), this._accessors(), this._aria(this.tagList.attr(f)) }, current: function (e) { return this.currentTag(null), l.fn.current.call(this, e) }, currentTag: function (e) { var n = this; return e === t ? n._currentTag : (n._currentTag && (n._currentTag.removeClass(F).removeAttr(f), n.input.removeAttr("aria-activedescendant")), e && (e.addClass(F).attr(f, n._tagID), n.input.attr("aria-activedescendant", n._tagID)), n._currentTag = e, t) }, dataItems: function () { return this._dataItems }, destroy: function () { var e = this, t = e.ns; e.wrapper.off(t), e.tagList.off(t), e.input.off(t), l.fn.destroy.call(e) }, _editable: function (t) { var n = this, i = t.disable, r = t.readonly, a = n.wrapper.off(N), o = n.tagList.off(N), s = n.element.add(n.input.off(N)); r || i ? (i ? a.addClass(A) : a.removeClass(A), s.attr(I, i).attr(H, r).attr(T, i).attr(S, r)) : (a.removeClass(A).on(P, n._toggleHover).on("mousedown" + N, function (e) { e.preventDefault(), n.input[0] !== c() && n.input.focus(), -1 == e.target.className.indexOf("k-delete") && 0 === n.options.minLength && n.open() }), n.input.on(z, p(n._keydown, n)).on("paste" + N, p(n._search, n)).on("focus" + N, function () { n._placeholder(!1) }).on("blur" + N, function () { clearTimeout(n._typing), n._placeholder(), n.close(), n._state === m && (n._state = g), n.element.blur() }), s.removeAttr(I).removeAttr(H).attr(T, !1).attr(S, !1), o.on(O, h, function () { e(this).addClass(E) }).on(M, h, function () { e(this).removeClass(E) }).on(R, ".k-delete", function (t) { n._unselect(e(t.target).closest(h)), n._change(), n.close() })) }, close: function () { this.popup.close(), this.current(null) }, open: function () { var t = this; t.ul[0].firstChild && t._state !== g ? t._visibleItems && t._allowSelection() && (t.popup.open(), t.current(t.options.highlightFirst ? e(i(t.ul[0])) : null)) : (t._state = "", t._open = !0, t._filterS
52ource()) }, toggle: function (e) { this[e ? v : _]() }, refresh: function () { var t, n = this, r = null; n.trigger("dataBinding"), t = n._render(n.dataSource.view()), n._height(t), n._setInitialValues && (n._setInitialValues = !1, n.value(n._initialValues)), n._open && (n._open = !1, n.toggle(t)), n.popup.visible() && (n.popup._position(), n.options.highlightFirst && (r = e(i(n.ul[0])))), n.current(r), n._touchScroller && n._touchScroller.reset(), n._makeUnselectable(), n._hideBusy(), n.trigger("dataBound") }, search: function (e) { var t = this, n = t.options, i = n.ignoreCase, r = n.filter, a = n.dataTextField; clearTimeout(t._typing), e = "string" == typeof e ? e : t.input.val(), e.length >= n.minLength && (t._state = m, t._open = !0, t._filterSource({ value: i ? e.toLowerCase() : e, field: a, operator: r, ignoreCase: i })) }, value: function (n) { var i, r = this, a = e(r.tagList[0].children), o = a.length, s = 0; if (n === t) return r._values; if (!r._fetchItems(n)) { for (; o > s; s++) r._unselect(a.eq(s)); if (null !== n) { for (n = L(n) || n instanceof u ? n : [n], s = 0, o = n.length; o > s; s++) i = r._index(n[s]), i > -1 && r._select(i); r._old = r._values.slice() } } }, _dataSource: function () { var e = this, t = e.element, n = e.options, i = n.dataSource || {}; i = L(i) ? { data: i} : i, i.select = t, i.fields = [{ field: n.dataTextField }, { field: n.dataValueField}], e.dataSource && e._refreshHandler ? e._unbindDataSource() : (e._refreshHandler = p(e.refresh, e), e._progressHandler = p(e._showBusy, e)), e.dataSource = o.data.DataSource.create(i).bind(b, e._refreshHandler).bind(k, e._progressHandler) }, _fetchItems: function (e) { var n = this; return n._fetch || n.ul[0].firstChild ? t : (n.dataSource.one(b, function () { n.value(e), n._fetch = !1 }), n._fetch = !0, n.dataSource.fetch(), !0) }, _reset: function () { var e = this, t = e.element, n = t.closest("form"); n[0] && (e._resetHandler = function () { setTimeout(function () { e.value(e._initialValues) }) }, e._form = n.on("reset", e._resetHandler)) }, _initValue: function () { var e = this, t = e.options.value || e.element.val(); null === t ? t = [] : (L(t) || (t = [t]), t = e._mapValues(t)), e._old = e._initialValues = t, e._setInitialValues = !!t[0] }, _mapValues: function (t) { var n = this; return t && e.isPlainObject(t[0]) && (t = e.map(t, function (e) { return n._value(e) })), t }, _change: function () { var e = this, t = e.value(); n(t, e._old) || (e._old = t.slice(), e.trigger(b), e.element.trigger(b)) }, _click: function (n) { var i = this, r = e(n.currentTarget); if (!n.isDefaultPrevented()) { if (i.trigger(w, { item: r })) return i.close(), t; i._select(r), i._change(), i.close() } }, _item: function (e, t) { return e = e[t](), e[0] && !e.is(":visible") && (e = this._item(e, t)), e }, _keydown: function (n) { var s = this, l = n.keyCode, c = s._currentTag, u = s._current, p = s.input.val(), f = o.support.isRtl(s.wrapper), h = s.popup.visible(); if (l === d.DOWN) { if (n.preventDefault(), !h) return s.open(), t; u = u ? a(u[0], y) : s.ul[0].firstChild, u && s.current(e(u)) } else if (l === d.UP) h && (u = u ? a(u[0], x) : s.ul[0].lastChild, s.current(e(u)), s._current[0] || s.close()), n.preventDefault(); else if (l === d.LEFT && !f || l === d.RIGHT && f) p || (c = c ? c.prev() : e(s.tagList[0].lastChild), c[0] && s.currentTag(c)); else if (l === d.RIGHT && !f || l === d.LEFT && f) !p && c && (c = c.next(), s.currentTag(c[0] ? c : null)); else if (l === d.ENTER && h) { if (u) { if (s.trigger(w, { item: u })) return s.close(), t; s._select(u) } s._change(), s.close(), n.preventDefault() } else l === d.ESC ? (h ? n.preventDefault() : s.currentTag(null), s.close()) : l === d.HOME ? h ? s.current(e(i(s.ul[0]))) : p || (c = s.tagList[0].firstChild, c && s.currentTag(e(c))) : l === d.END ? h ? s.current(e(r(s.ul[0]))) : p || (c = s.tagList[0].lastChild, c && s.currentTag(e(c))) : l !== d.DELETE && l !== d.BACKSPACE || p ? (clearTimeout(s._typing), s._search()) : (l !== d.BACKSPACE || c || (c = e(s.tagList[0].lastChild)), c && c[0] && (s._unselect(c), s._change(), s.close())) }, _hideBusy: function () { var e = this; clearTimeout(e._busy), e.input.attr("aria-busy", !1), e._loading.addClass(D), e._busy = null }, _showBusy: function () { var e = this; e._busy || (e._busy = setTimeout(function () { e.input.attr("aria-busy", !0), e._loading.removeClass(D) }, 100)) }, _placeholder: function (e) { var n = this, i = n.input; e === t ? (e = !1, i[0] !== c() && (e = !n._dataItems[0]), n.wrapper.removeClass(F)) : n.wrapper.addClass(F), n._prev = "", i.toggleClass("k-readonly", e).val(e ? n.options.placeholder : ""), n._scale() }, _scale: function () { var e, t = this, n = t.wrapper, i = n.width(), r = t._span.text(t.input.val()); n.is(":visible") ? e = r.width() + 25 : (r.appendTo(document.documentElement), i = e = r.width() + 25, r.appendTo(n)), t.input.width(e > i ? i : e) }, _option: function (e, n) { var i = "<option", r = this._text(e), a = this._value(e); return a !== t && (a += "", -1 !== a.indexOf('"') && (a = a.replace(B, """)), i += ' value="' + a + '"'), n && (i += ' selected="selected"'), i += ">", r !== t && (i += o.htmlEncode(r)), i += "</option>" }, _render: function (e) { for (var t, n, i = this, r = e.length, a = i.itemTemplate, o = i._dataItems.slice(0), s = 0, l = 0, d = "", c = ""; r > l; l++) t = e[l], n = i._selected(o, t), c += a(t, l, n), d += i._option(t, n), n || (s += 1); if (r = o.length) for (l = 0; r > l; l++) d += i._option(o[l], !0); return i.ul[0].innerHTML = c, i.element.html(d), i._visibleItems = s, s }, _selected: function (e, n) { var i, r = this, a = r._text, o = r._value, s = o(n), l = e.length, d = !1, c = 0; for (s === t && (s = a(n)); l > c; c++) if (n = e[c], i = o(n), i === t && (i = a(n)), i !== t && i === s) { d = !0; break } return d && e.splice(c, 1), d }, _search: function () { var e = this; e._typing = setTimeout(function () { var t = e.input.val(); e._prev !== t && (e._scale(), e._prev = t, e.search(t)) }, e.options.delay) }, _allowSelection: function () { var e = this.options.maxSelectedItems; return null === e || e > this._values.length }, _select: function (e) { var t, n, i = this, r = i._values; i._allowSelection() && (isNaN(e) ? n = e.hide().data("idx") : (n = e, i.ul[0].children[n].style.display = "none"), i.element[0].children[n].selected = !0, t = i.dataSource.view()[n], i.tagList.append(i.tagTemplate(t)), i._dataItems.push(t), r.push(i._dataValue(t)), i._visibleItems -= 1, i.currentTag(null), i._placeholder(), i._height(i._visibleItems), i._state === m && (i._state = g)) }, _unselect: function (t) { var n, i, r, a, o, s = this, l = t.index(); if (t.remove(), s.currentTag(null), s._values.splice(l, 1), n = s._dataItems.splice(l, 1)[0], i = s._dataValue(n), l = s._index(i), -1 !== l) e(s.ul[0].children[l]).show(), s.element[0].children[l].selected = !1, s._visibleItems += 1, s._height(s._visibleItems); else for (l = s.dataSource.view().length, r = s.element[0].children, o = r.length; o > l; l++) if (a = r[l], a.value == i) { a.selected = !1; break } s._placeholder() }, _template: function () { var e, t = this, n = t.options, i = n.itemTemplate, r = n.tagTemplate, a = n.dataSource; t.element[0].length && !a && (n.dataTextField = n.dataTextField || "text", n.dataValueField = n.dataValueField || "value"), e = o.template("#:" + o.expr(n.dataTextField, "data") + "#", { useWithBlock: !1 }), i = i ? o.template(i) : e, r = r ? o.template(r) : e, t.itemTemplate = function (e, t, n) { return '<li tabindex="-1" role="option" data-idx="' + t + '" unselectable="on" class="k-item"' + (n ? C : "") + ">" + i(e) + "</li>" }, t.tagTemplate = function (e) { return '<li class="k-button" unselectable="on"><span unselectable="on">' + r(e) + '</span><span unselectable="on" class="k-icon k-delete">delete</span></li>' } }, _input: function () { var t = this, n = t.element[0].accessKey, i = t._innerWrapper.children("input.k-input"); i[0] || (i = e('<input class="k-input" style="width: 25px" />').appendTo(t._innerWrapper)), t.element.removeAttr("accesskey"), t._focused = t.input = i.attr({ accesskey: n, role: "listbox", "aria-expanded": !1 }) }, _tagList: function () { var t = this, n = t._innerWrapper.children("ul"); n[0] || (n = e('<ul role="listbox" unselectable="on" class="k-reset"/>').appendTo(t._innerWrapper)), t.tagList = n }, _loader: function () { this._loading = e('<span class="k-icon k-loading ' + D + '"></span>').insertAfter(this.input) }, _textContainer: function () { var t = o.getComputedStyles(this.input[0], V); t.position = "absolute", t.visibility = "hidden", this._span = e("<span/>").css(t).appendTo(this.wrapper) }, _wrapper: function () { var t = this, n = t.element, i = n.parent("span.k-multiselect"); i[0] || (i = n.wrap('<div class="k-widget k-multiselect k-header" unselectable="on" />
52').parent(), i[0].style.cssText = n[0].style.cssText, e('<div class="k-multiselect-wrap k-floatwrap" unselectable="on" />').insertBefore(n)), t.wrapper = i.addClass(n[0].className).css("display", ""), t._innerWrapper = e(i[0].firstChild) } }); s.plugin(W) 53} (window.kendo.jQuery), function (e, t, n) { function i(e, t, n) { n = o(n), n && !n.equals(e.color()) && ("change" == t && (e._value = n), n = 1 != n.a ? n.toCssRgba() : n.toCss(), e.trigger(t, { value: n })) } function r(e, t, n) { for (n || (n = "0"), e = e.toString(16); t > e.length; ) e = "0" + e; return e } function a(e) { return parseFloat((+e).toFixed(3)) } function o(e, i) { if (null == e || "transparent" == e) return null; if (e instanceof D) return e; var r = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(e); if (r) return new A(t(r[1], 16), t(r[2], 16), t(r[3], 16), 1); if (r = /^#?([0-9a-f])([0-9a-f])([0-9a-f])$/i.exec(e)) return new A(t(r[1] + r[1], 16), t(r[2] + r[2], 16), t(r[3] + r[3], 16), 1); if (r = /^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/.exec(e)) return new A(t(r[1], 10), t(r[2], 10), t(r[3], 10), 1); if (r = /^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)/.exec(e)) return new A(t(r[1], 10), t(r[2], 10), t(r[3], 10), parseFloat(r[4])); if (r = /^rgb\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*\)/.exec(e)) return new E(parseFloat(r[1]) / 100, parseFloat(r[2]) / 100, parseFloat(r[3]) / 100, 1); if (r = /^rgba\(\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9]*\.?[0-9]+)%\s*,\s*([0-9.]+)\s*\)/.exec(e)) return new E(parseFloat(r[1]) / 100, parseFloat(r[2]) / 100, parseFloat(r[3]) / 100, parseFloat(r[4])); if (!i) throw Error("Cannot parse color: " + e); return n } function s(e, t, n) { var i, r; return e = Array.prototype.slice.call(e), i = e.length, r = e.indexOf(t), 0 > r ? 0 > n ? e[i - 1] : e[0] : (r += n, 0 > r ? r += i : r %= i, e[r]) } function l(e) { e.preventDefault() } function d(e, t) { return function () { return e.apply(t, arguments) } } var c = window.kendo, u = c.Class, p = c.ui, f = p.Widget, h = c.keys, g = "background-color", m = "k-state-selected", v = "000000,7f7f7f,880015,ed1c24,ff7f27,fff200,22b14c,00a2e8,3f48cc,a349a4,ffffff,c3c3c3,b97a57,ffaec9,ffc90e,efe4b0,b5e61d,99d9ea,7092be,c8bfe7", _ = "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", b = { apply: "Apply", cancel: "Cancel" }, k = ".kendoColorTools", w = "click" + k, y = "keydown" + k, x = c.support.browser, C = x.msie && 9 > x.version, T = f.extend({ init: function (e, t) { var n, i = this; f.fn.init.call(i, e, t), e = i.element, t = i.options, i._value = t.value = o(t.value), n = i._ariaId = t.ariaId, n && e.attr("aria-labelledby", n), t._standalone && (i._triggerSelect = i._triggerChange) }, options: { value: null, _standalone: !0 }, events: ["change", "select", "cancel"], color: function (e) { return e !== n && this._updateUI(this._value = o(e)), this._value }, value: function (e) { return e = this.color(e), e && (e = this.options.opacity ? e.toCssRgba() : e.toCss()), e || null }, enable: function (t) { 0 === arguments.length && (t = !0), t ? e(".k-disabled-overlay", this.wrapper).remove() : this.wrapper.append("<div class='k-disabled-overlay'></div>"), this._onEnable(t) }, _select: function (e, t) { var n = this._value; e = this.color(e), t || (e.equals(n) ? this._standalone || this.trigger("cancel") : this.trigger("change", { value: this.value() })) }, _triggerSelect: function (e) { i(this, "select", e) }, _triggerChange: function (e) { i(this, "change", e) }, destroy: function () { this.element && this.element.off(k), this.wrapper && this.wrapper.off(k).find("*").off(k), this.wrapper = null, f.fn.destroy.call(this) }, _updateUI: e.noop, _selectOnHide: function () { return null }, _cancel: function () { this.trigger("cancel") } }), S = T.extend({ init: function (t, n) { var i, r, a, s, l = this; if (T.fn.init.call(l, t, n), t = l.wrapper = l.element, n = l.options, i = n.palette, "websafe" == i ? (i = _, n.columns = 18) : "basic" == i && (i = v), "string" == typeof i && (i = i.split(",")), e.isArray(i) && (i = e.map(i, function (e) { return o(e) })), t.addClass("k-widget k-colorpalette").append(e(l._template({ colors: i, tileSize: n.tileSize, value: l._value, id: n.ariaId }))).on(w, ".k-item", function (t) { l._select(e(t.currentTarget).css(g)) }).attr("tabIndex", 0).on(y, d(l._keydown, l)), s = n.tileSize) { if (/number|string/.test(typeof s)) r = a = parseFloat(s); else { if ("object" != typeof s) throw Error("Unsupported value for the 'tileSize' argument"); r = parseFloat(s.width), a = parseFloat(s.height) }
53 t.find(".k-item").css({ width: r - 2, height: a - 2 }) } n.columns && t.css("width", n.columns * (r || 14)) }, focus: function () { this.wrapper.focus() }, options: { name: "ColorPalette", columns: 10, tileSize: null, palette: "basic" }, _onEnable: function (e) { e ? this.wrapper.removeAttr("tabIndex") : this.wrapper.attr("tabIndex", 0) }, _keydown: function (t) { var n, i, r = this, a = r.wrapper, d = a.find(".k-item"), c = d.filter("." + m).get(0), u = t.keyCode; if (u == h.LEFT ? n = s(d, c, -1) : u == h.RIGHT ? n = s(d, c, 1) : u == h.DOWN ? n = s(d, c, r.options.columns) : u == h.UP ? n = s(d, c, -r.options.columns) : u == h.ENTER ? (l(t), c && this._select(e(c).css(g))) : u == h.ESC && this._cancel(), n) { l(t), n = e(n), e(c).removeClass(m).removeAttr("aria-selected"), n.addClass(m).attr("aria-selected", !0); try { i = o(n.css(g)), r._triggerSelect(i) } catch (p) { } } }, _updateUI: function (t) { var n = this, i = null; n.wrapper.find(".k-item." + m).removeClass(m).removeAttr("aria-selected"), n.wrapper.find(".k-item").each(function () { var n = o(e(this).css(g)); n && n.equals(t) && (i = this) }), e(i).addClass(m).attr("aria-selected", !0) }, _template: c.template('<ul class="k-palette k-reset"># for (var i = 0; i < colors.length; i++) { #<li unselectable="on" style="background-color:#= colors[i].toCss() #" #=(id && i === 0) ? "id=\\""+id+"\\" aria-selected=\\"true\\"" : "" # class="k-item #= colors[i].equals(value) ? "' + m + '" : "" #" aria-label="#= colors[i].toCss() #">' + "</li>" + "# } #" + "</ul>") }), F = T.extend({ init: function (t, n) { var i = this; T.fn.init.call(i, t, n), n = i.options, t = i.element, i.wrapper = t.addClass("k-widget k-flatcolorpicker").append(i._template(n)), i._hueElements = e(".k-hsv-rectangle, .k-transparency-slider .k-slider-track", t), i._selectedColor = e(".k-selected-color-display", t), i._colorAsText = e("input.k-color-value", t), i._sliders(), i._hsvArea(), i._updateUI(i._value || new E(1, 0, 0, 1)), t.find("input.k-color-value").on(y, function (t) { var n, r; if (t.keyCode == h.ENTER) try { n = o(this.value), r = i.color(), i._select(n, n.equals(r)) } catch (a) { e(this).addClass("k-state-error") } }).end().on(w, ".k-controls button.apply", function () { i._select(i._getHSV()) }).on(w, ".k-controls button.cancel", function () { i._updateUI(i.color()), i._cancel() }), C && i._applyIEFilter() }, destroy: function () { this._hueSlider.destroy(), this._opacitySlider && this._opacitySlider.destroy(), this._hueSlider = this._opacitySlider = this._hsvRect = this._hsvHandle = this._hueElements = this._selectedColor = this._colorAsText = null, T.fn.destroy.call(this) }, options: { name: "FlatColorPicker", opacity: !1, buttons: !1, input: !0, preview: !0, messages: b }, _applyIEFilter: function () { var e = this.element.find(".k-hue-slider .k-slider-track")[0], t = e.currentStyle.backgroundImage; t = t.replace(/^url\([\'\"]?|[\'\"]?\)$/g, ""), e.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + t + "', sizingMethod='scale')" }, _sliders: function () { function e(e) { n._updateUI(n._getHSV(e.value, null, null, null)) } function t(e) { n._updateUI(n._getHSV(null, null, null, e.value / 100)) } var n = this, i = n.element; n._hueSlider = i.find(".k-hue-slider").kendoSlider({ min: 0, max: 359, tickPlacement: "none", showButtons: !1, slide: e, change: e }).data("kendoSlider"), n._opacitySlider = i.find(".k-transparency-slider").kendoSlider({ min: 0, max: 100, tickPlacement: "none", showButtons: !1, slide: t, change: t }).data("kendoSlider") }, _hsvArea: function () { function e(e, n) { var i = this.offset, r = e - i.left, a = n - i.top, o = this.width, s = this.height; r = 0 > r ? 0 : r > o ? o : r, a = 0 > a ? 0 : a > s ? s : a, t._svChange(r / o, 1 - a / s) } var t = this, n = t.element, i = n.find(".k-hsv-rectangle"), r = i.find(".k-draghandle").attr("tabIndex", 0).on(y, d(t._keydown, t)); t._hsvEvents = new c.UserEvents(i, { global: !0, press: function (t) { this.offset = c.getOffset(i), this.width = i.width(), this.height = i.height(), r.focus(), e.call(this, t.x.location, t.y.location) }, start: function () { i.addClass("k-dragging"), r.focus() }, move: function (t) { t.preventDefault(), e.call(this, t.x.location, t.y.location) }, end: function () { i.removeClass("k-dragging") } }), t._hsvRect = i, t._hsvHandle = r }, _onEnable: function (e) { this._hueSlider.enable(e), this._opacitySlider && this._opacitySlider.enable(e), this.wrapper.find("input").attr("disabled", !e); var t = this._hsvRect.find(".k-draghandle"); e ? t.attr("tabIndex", 0) : t.removeAttr("tabIndex") }, _keydown: function (e) { function t(t, n) { var r = i._getHSV(); r[t] += n * (e.shiftKey ? .01 : .05), 0 > r[t] && (r[t] = 0), r[t] > 1 && (r[t] = 1), i._updateUI(r), l(e) } function n(t) { var n = i._getHSV(); n.h += t * (e.shiftKey ? 1 : 5), 0 > n.h && (n.h = 0), n.h > 359 && (n.h = 359), i._updateUI(n), l(e) } var i = this; switch (e.keyCode) { case h.LEFT: e.ctrlKey ? n(-1) : t("s", -1); break; case h.RIGHT: e.ctrlKey ? n(1) : t("s", 1); break; case h.UP: t(e.ctrlKey && i._opacitySlider ? "a" : "v", 1); break; case h.DOWN: t(e.ctrlKey && i._opacitySlider ? "a" : "v", -1); break; case h.ENTER: i._select(i._getHSV()); break; case h.F2: i.wrapper.find("input.k-color-value").focus().select(); break;
53 case h.ESC: i._cancel() } }, focus: function () { this._hsvHandle.focus() }, _getHSV: function (e, t, n, i) { var r = this._hsvRect, a = r.width(), o = r.height(), s = this._hsvHandle.position(); return null == e && (e = this._hueSlider.value()), null == t && (t = s.left / a), null == n && (n = 1 - s.top / o), null == i && (i = this._opacitySlider ? this._opacitySlider.value() / 100 : 1), new I(e, t, n, i) }, _svChange: function (e, t) { var n = this._getHSV(null, e, t, null); this._updateUI(n) }, _updateUI: function (e) { var t = this, n = t._hsvRect; e && (this._colorAsText.removeClass("k-state-error"), t._selectedColor.css(g, e.toDisplay()), t._colorAsText.val(t._opacitySlider ? e.toCssRgba() : e.toCss()), t._triggerSelect(e), e = e.toHSV(), t._hsvHandle.css({ left: e.s * n.width() + "px", top: (1 - e.v) * n.height() + "px" }), t._hueElements.css(g, new I(e.h, 1, 1, 1).toCss()), t._hueSlider.value(e.h), t._opacitySlider && t._opacitySlider.value(100 * e.a)) }, _selectOnHide: function () { return this.options.buttons ? null : this._getHSV() }, _template: c.template('# if (preview) { #<div class="k-selected-color"><div class="k-selected-color-display"><input class="k-color-value" #= !data.input ? \'style="visibility: hidden;"\' : "" #></div></div># } #<div class="k-hsv-rectangle"><div class="k-hsv-gradient"></div><div class="k-draghandle"></div></div><input class="k-hue-slider" /># if (opacity) { #<input class="k-transparency-slider" /># } ## if (buttons) { #<div unselectable="on" class="k-controls"><button class="k-button apply">#: messages.apply #</button> <button class="k-button cancel">#: messages.cancel #</button></div># } #') }), D = u.extend({ toHSV: function () { return this }, toRGB: function () { return this }, toHex: function () { return this.toBytes().toHex() }, toBytes: function () { return this }, toCss: function () { return "#" + this.toHex() }, toCssRgba: function () { var e = this.toBytes(); return "rgba(" + e.r + ", " + e.g + ", " + e.b + ", " + a(this.a) + ")" }, toDisplay: function () { return C ? this.toCss() : this.toCssRgba() }, equals: function (e) { return e === this || null !== e && this.toCssRgba() == o(e).toCssRgba() }, diff: function (e) { if (null == e) return 0 / 0; var t = this.toBytes(); return e = e.toBytes(), Math.sqrt(Math.pow(.3 * (t.r - e.r), 2) + Math.pow(.59 * (t.g - e.g), 2) + Math.pow(.11 * (t.b - e.b), 2)) }, clone: function () { var e = this.toBytes(); return e === this && (e = new A(e.r, e.g, e.b, e.a)), e } }), E = D.extend({ init: function (e, t, n, i) { this.r = e, this.g = t, this.b = n, this.a = i }, toHSV: function () { var e, t, n = this.r, i = this.g, r = this.b, a = Math.min(n, i, r), o = Math.max(n, i, r), s = o, l = o - a; return 0 === l ? new I(0, 0, s, this.a) : (0 !== o ? (t = l / o, e = n == o ? (i - r) / l : i == o ? 2 + (r - n) / l : 4 + (n - i) / l, e *= 60, 0 > e && (e += 360)) : (t = 0, e = -1), new I(e, t, s, this.a)) }, toBytes: function () { return new A(255 * this.r, 255 * this.g, 255 * this.b, this.a) } }), A = E.extend({ init: function (e, t, n, i) { this.r = Math.round(e), this.g = Math.round(t), this.b = Math.round(n), this.a = i }, toRGB: function () { return new E(this.r / 255, this.g / 255, this.b / 255, this.a) }, toHSV: function () { return this.toRGB().toHSV() }, toHex: function () { return r(this.r, 2) + r(this.g, 2) + r(this.b, 2) }, toBytes: function () { return this } }), I = D.extend({ init: function (e, t, n, i) { this.h = e, this.s = t, this.v = n, this.a = i }, toRGB: function () { var e, t, n, i, r, a, o, s, l = this.h, d = this.s, c = this.v; if (0 === d) t = n = i = c; else switch (l /= 60, e = Math.floor(l), r = l - e, a = c * (1 - d), o = c * (1 - d * r), s = c * (1 - d * (1 - r)), e) { case 0: t = c, n = s, i = a; break; case 1: t = o, n = c, i = a; break; case 2: t = a, n = c, i = s; break; case 3: t = a, n = o, i = c; break; case 4: t = s, n = a, i = c; break; default: t = c, n = a, i = o } return new E(t, n, i, this.a) }, toBytes: function () { return this.toRGB().toBytes() } }), H = f.extend({ init: function (t, n) { var i, r, a, s = this; f.fn.init.call(s, t, n), n = s.options, t = s.element, i = t.val() ? o(t.val(), !0) : o(n.value, !0), s._value = n.value = i, r = s.wrapper = e(s._template(n)), t.hide().after(r), t.is("input") && t.appendTo(r), s.enable(!t.attr("disabled")), a = t.attr("accesskey"), a && (t.attr("accesskey", null), r.attr("accesskey", a)), s.bind("activate", function (e) { e.isDefaultPrevented() || s.toggle() }), s._updateUI(i) }, destroy: function () { this.wrapper.add("*").off(k), this._popup && (this._selector.destroy(), this._popup.destroy()), this._selector = this._popup = this.wrapper = null, f.fn.destroy.call(this) }, enable: function (e) { var t = this, n = t.wrapper, i = n.children(".k-picker-wrap"), r = i.find(".k-select"); 0 === arguments.length && (e = !0), t.element.attr("disabled", !e), n.attr("disabled", !e), r.off(k).on("mousedown" + k, l), e ? n.removeClass("k-state-disabled").attr("tabIndex", 0).on("mouseenter" + k, function () { i.addClass("k-state-hover") }).on("mouseleave" + k, function () { i.removeClass("k-state-hover") }).on("focus" + k, function () { i.addClass("k-state-focused") }).on("blur" + k, function () { i.removeClass("k-state-focused") }).on(y, d(t._keydown, t)).on(w, ".k-icon", d(t.toggle, t)).on(w, t.options.toolIcon ? ".k-tool-icon" : ".k-selected-color", function () { t.trigger("activate") }) : n.addClass("k-state-disabled").removeAttr("tabIndex").add("*", n).off(k) }, _template: c.template('<span class="k-widget k-colorpicker k-header"><span class="k-picker-wrap k-state-default"># if (toolIcon) { #<span class="k-tool-icon #= toolIcon #"><span class="k-selected-color"></span></span># } else { #<span class="k-selected-color"></span># } #<span class="k-select" unselectable="on"><span class="k-icon k-i-arrow-s" unselectable="on"></span></span></span></span>'), options: { name: "ColorPicker", palette: null, columns: 10, toolIcon: null, value: null, messages: b, opacity: !1, buttons: !0, preview: !0 }, events: ["activate", "change", "select", "open", "close"], open: function () { this._getPopup().open() }, close: function () { this._getPopup().close() }, toggle: function () { this._getPopup().toggle() }, color: T.fn.color, value: T.fn.value, _select: T.fn._select, _triggerSelect: T.fn._triggerSelect, _isInputTypeColor: function () { var e = this.element[0]; return /^input$/i.test(e.tagName) && /^color$/i.test(e.type) }, _updateUI: function (e) { e && (this._isInputTypeColor() || 1 == e.a ? this.element.val(e.toCss()) : this.element.val(e.toCssRgba())), this._triggerSelect(e), this.wrapper.find(".k-selected-color").css(g, e ? e.toDisplay() : "transparent") }, _keydown: function (e) { var t = e.keyCode; this._getPopup().visible() ? (t == h.ESC ? this._selector._cancel() : this._selector._keydown(e), l(e)) : (t == h.ENTER || t == h.DOWN) && (this.open(), l(e)) }, _getPopup: function () { var t, i, r, a = this, s = a._popup; return s || (t = this.options, i = t.palette ? S : F, t._standalone = !1, r = this._selector = new i(e("<div />").appendTo(document.body), t), a._popup = s = r.wrapper.kendoPopup({ anchor: a.wrapper }).data("kendoPopup"), r.bind({ select: function (e) { a._updateUI(o(e.value)) }, change: function () { a._select(r.color()), a.close() }, cancel: function () { a.close() } }), s.bind({ close: function (e) { if (a.trigger("close")) return e.preventDefault(), n; var t = r._selectOnHide();
53 t ? a._select(t) : (a.wrapper.focus(), a._updateUI(a.color())) }, open: function (e) { a.trigger("open") && e.preventDefault() }, activate: function () { r._select(a.color(), !0), r.focus() } })), s } }); p.plugin(S), p.plugin(F), p.plugin(H), c.parseColor = o, c.Color = { fromBytes: function (e, t, n, i) { return new A(e, t, n, null != i ? i : 1) }, fromRGB: function (e, t, n, i) { return new E(e, t, n, null != i ? i : 1) }, fromHSV: function (e, t, n, i) { return new I(e, t, n, null != i ? i : 1) } } } (jQuery, parseInt), function (e, t) { 54 function n(t) { return e.trim(t).replace(/ /gi, "") } var i = window.kendo, r = i.ui, a = e.proxy, o = e.extend, s = e.grep, l = e.map, d = e.inArray, c = "k-state-selected", u = "asc", p = "desc", f = "change", h = "init", g = "kendoPopup", m = "kendoFilterMenu", v = "kendoMenu", _ = ".kendoColumnMenu", b = /(\[|\]|\$|\.|\:|\+)/g, k = r.Widget, w = k.extend({ init: function (t, n) { var r, o = this; k.fn.init.call(o, t, n), t = o.element, n = o.options, o.owner = n.owner, o.dataSource = n.dataSource, o.field = t.attr(i.attr("field")), r = t.find(".k-header-column-menu"), r[0] || (r = t.prepend('<a class="k-header-column-menu" href="#"><span class="k-icon k-i-arrowhead-s"/></a>').find(".k-header-column-menu")), o.link = r.attr("tabindex", -1).on("click" + _, a(o._click, o)), o.wrapper = e('<div class="k-column-menu"/>') }, _init: function () { var e = this, t = e.options; e.wrapper.html(i.template(y)({ ns: i.ns, messages: t.messages, sortable: t.sortable, filterable: t.filterable, columns: e._ownerColumns(), showColumns: t.columns })), e.popup = e.wrapper[g]({ anchor: e.link, open: a(e._open, e), activate: a(e._activate, e), close: e.options.closeCallback }).data(g), e._menu(), e._sort(), e._columns(), e._filter(), e.trigger(h, { field: e.field, container: e.wrapper }) }, events: [h], options: { name: "ColumnMenu", messages: { sortAscending: "Sort Ascending", sortDescending: "Sort Descending", filter: "Filter", columns: "Columns" }, columns: !0, sortable: !0, filterable: !0 }, destroy: function () { var e = this; k.fn.destroy.call(e), e.filterMenu && e.filterMenu.destroy(), e._refreshHandler && e.dataSource.unbind(f, e._refreshHandler), e.options.columns && (e.owner.unbind("columnShow", e._updateColumnsMenuHandler), e.owner.unbind("columnHide", e._updateColumnsMenuHandler)), e.menu && (e.menu.element.off(_), e.menu.destroy()), e.wrapper.off(_), e.popup && e.popup.destroy(), e.link.off(_) }, close: function () { this.menu.close(), this.popup.close(), this.popup.element.off("keydown" + _) }, _click: function (e) { e.preventDefault(), e.stopPropagation(), this.popup || this._init(), this.popup.toggle() }, _open: function () { var t = this; e(".k-column-menu").not(t.wrapper).each(function () { e(this).data(g).close() }), t.popup.element.on("keydown" + _, function (e) { e.keyCode == i.keys.ESC && t.close() }) }, _activate: function () { this.menu.element.focus() }, _ownerColumns: function () { var e = this.owner.columns, t = s(e, function (e) { var t = !0, i = n(e.title || ""); return (e.menu === !1 || !e.field && !i.length) && (t = !1), t }); return l(t, function (t) { return { originalField: t.field, field: t.field || t.title, title: t.title || t.field, hidden: t.hidden, index: d(t, e)} }) }, _menu: function () { this.menu = this.wrapper.children()[v]({ orientation: "vertical", closeOnClick: !1 }).data(v) }, _sort: function () { var t = this; t.options.sortable && (t.refresh(), t._refreshHandler = a(t.refresh, t), t.dataSource.bind(f, t._refreshHandler), t.menu.bind("select", function (n) { var i, r = e(n.item); r.hasClass("k-sort-asc") ? i = u : r.hasClass("k-sort-desc") && (i = p), i && (r.parent().find(".k-sort-" + (i == u ? p : u)).removeClass(c), t._sortDataSource(r, i), t.close()) })) }, _sortDataSource: function (e, n) { var i, r, a = this, o = a.options.sortable, s = a.dataSource, l = s.sort() || []; if (e.hasClass(c) && o && o.allowUnsort !== !1 ? (e.removeClass(c), n = t) : e.addClass(c), o === !0 || "single" === o.mode) l = [{ field: a.field, dir: n}]; else { for (i = 0, r = l.length; r > i; i++) if (l[i].field === a.field) { l.splice(i, 1); break } l.push({ field: a.field, dir: n }) } s.sort(l) }, _columns: function () { var t = this; t.options.columns && (t._updateColumnsMenu(), t._updateColumnsMenuHandler = a(t._updateColumnsMenu, t), t.owner.bind(["columnHide", "columnShow"], t._updateColumnsMenuHandler), t.menu.bind("select", function (n) { var r, a, o, l, c = e(n.item), u = t.owner.columns; c.parent().closest("li.k-columns-item")[0] && (r = c.find(":checkbox"), r.attr("disabled") || (l = r.attr(i.attr("field")), o = s(u, function (e) { return e.field == l || e.t
54itle == l })[0], a = d(o, u), o.hidden === !0 ? t.owner.showColumn(a) : t.owner.hideColumn(a))) })) }, _updateColumnsMenu: function () { 55 var e = "[" + i.attr("field") + "=", t = this._ownerColumns(), n = l(t, function (t) { 56 return e + '"' + t.field.replace(b, "\\$1") + '"]' 57 }).join(","), r = s(t, function (e) { return !e.hidden }), a = s(r, function (e) { return e.originalField }).length, o = l(r, function (t) { return e + '"' + t.field.replace(b, "\\$1") + '"]' }).join(","); this.wrapper.find(n).prop("checked", !1), this.wrapper.find(o).prop("checked", !0).prop("disabled", 1 == a) 58 }, _filter: function () { var e = this, t = e.options; t.filterable !== !1 && (e.filterMenu = e.wrapper.find(".k-filterable")[m](o(!0, {}, { appendToElement: !0, dataSource: t.dataSource, values: t.values, field: e.field }, t.filterable)).data(m)) }, refresh: function () { var e, t, n, i = this, r = i.options.dataSource.sort() || [], a = i.field; for (i.wrapper.find(".k-sort-asc, .k-sort-desc").removeClass(c), t = 0, n = r.length; n > t; t++) e = r[t], a == e.field && i.wrapper.find(".k-sort-" + e.dir).addClass(c) } 59 }), y = '<ul>#if(sortable){#<li class="k-item k-sort-asc"><span class="k-link"><span class="k-sprite k-i-sort-asc"></span>${messages.sortAscending}</span></li><li class="k-item k-sort-desc"><span class="k-link"><span class="k-sprite k-i-sort-desc"></span>${messages.sortDescending}</span></li>#if(showColumns || filterable){#<li class="k-separator"></li>#}##}##if(showColumns){#<li class="k-item k-columns-item"><span class="k-link"><span class="k-sprite k-i-columns"></span>${messages.columns}</span><ul>#for (var col in columns) {#<li><input type="checkbox" data-#=ns#field="#=columns[col].field#" data-#=ns#index="#=columns[col].index#"/>#=columns[col].title#</li>#}#</ul></li>#if(filterable){#<li class="k-separator"></li>#}##}##if(filterable){#<li class="k-item k-filter-item"><span class="k-link"><span class="k-sprite k-filter"></span>${messages.filter}</span><ul><li><div class="k-filterable"></div></li></ul></li>#}#</ul>'; r.plugin(w) 60} (window.kendo.jQuery), function (e, t) { 61 function n(e) { return Array(e + 1).join('<td class="k-group-cell"> </td>') } function i(e) { var t, n = " "; if (e) { if (typeof e === gt) return e; for (t in e) n += t + '="' + e[t] + '"' } return n } function r(t) { var n = 0; return e("> .k-grouping-header, > .k-grid-toolbar", t).each(function () { n += this.offsetHeight }), n } function a(t, n) { e("th, th .k-grid-filter, th .k-link", t).add(document.body).css("cursor", n) } function o(e) { var t, n, i = {}, r = {}; if (!z(e)) for (I(e) || (e = [e]), t = 0, n = e.length; n > t; t++) i[e[t].aggregate] = 0, r[e[t].field] = i; return r } function s(e, t, n) { var i = e.eq(t), r = e.eq(n); i[t > n ? "insertBefore" : "insertAfter"](r) } function l(e, t, n) { var i, r, a, o; for (n = I(n) ? n : [n], i = 0, r = n.length; r > i; i++) a = n[i], F(a) && a.click && (o = a.name || a.text, t.on(ut + $, "a.k-grid-" + (o || "").replace(/\s/g, ""), { commandName: o }, N(a.click, e))) } function d(e) { return A(e, function (e) { return !e.hidden }) } function c(e) { e = e || {}; var t = e.style; return t ? (t = t.replace(/((.*)?display)(.*)?:([^;]*)/i, "$1:none"), t === e.style && (t = t.replace(/(.*)?/i, "display:none;$1"))) : t = "display:none", D({}, e, { style: t }) } function u(e) { e = e || {}; var t = e.style; return t && (e.style = t.replace(/(display\s*:\s*none\s*;?)*/gi, "")), e } function p(t, n, i, r) { var a, o = t.find(">colgroup"), s = E(n, function (e) { return a = e.width, a && 0 !== parseInt(a, 10) ? b.format('<col style="width:{0}"/>', typeof a === gt ? a : a + "px") : "<col />" }); (i || o.find(".k-hierarchy-col").length) && s.splice(0, 0, '<col class="k-hierarchy-col" />'), o.length && o.remove(), o = e(Array(r + 1).join('<col class="k-group-col">') + s.join("")), o.is("colgroup") || (o = e("<colgroup/>").append(o)), t.prepend(o), xt.msie && 8 == xt.version && (t.css("display", "inline-table"), window.setTimeout(function () { t.css("display", "") }, 1)) } function f(e) { var t, n, i, r = {}; for (n = 0, i = e.length; i > n; n++) t = e[n], r[t.value] = t.text; return r } function h(e, t, n) { var i = n && n.length && F(n[0]) && "value" in n[0], r = i ? f(n)[e] : e; return r = null != r ? r : "", t ? b.format(t, r) : r } function g(e, t, n) { for (var i, r = 0, a = e[r]; a; ) { if (i = n ? !0 : "none" !== a.style.display, i && !kt.test(a.className) && 0 > --t) { a.style.display = n ? "" : "none"; break } a = e[++r] } } function m(e, t) { var n, i, r; if (typeof e === gt && e === t) return e; if (F(e) && e.name === t) return e; if (I(e)) for (n = 0, i = e.length; i > n; n++) if (r = e[n], typeof r === gt && r === t || r.name === t) return r; return null } function v(t, n) { var i, r, a, o = xt.msie; if (n === !0) { if (t = e(t), a = o && t.parent().is(".k-grid-content,.k-grid-header-wrap"), a && (i = t.parent().scrollTop(), r = t.parent().scrollLeft()), o) try { t[0].setActive() } catch (s) { t[0].focus() } else t[0].focus(); a && (t.parent().scrollTop(i), t.parent().scrollLeft(r)) } else e(t).one("focusin", function (e) { e.preventDefault() }).focus() } function _(t) { var n = e(t.currentTarget), i = n.is("th"), r = n.closest("table")[0]; b.support.touch || (r === this.table[0] || r === this.thead.parent()[0]) && (this.current(n), (i || !e(t.target).is(":button,a,:input,a>.k-icon,textarea,span.k-icon,.k-input")) && setTimeout(function () { v(r, !0) }), i && t.preventDefault()) } var b = window.kendo, k = b.ui, w = b.data.DataSource, y = k.Groupable, x = b.support.tbodyInnerHtml, C = b._activeElement, T = k.Widget, S = b.keys, F = e.isPlainObject, D = e.extend, E = e.map, A = e.grep, I = e.isArray, H = e.inArray, N = e.proxy, R = e.isFunction, z = e.isEmptyObject, O = Math, M = "progress", P = "error", B = ":not(.k-group-cell):not(.k-hierarchy-cell):visible", L = "tbody>tr:not(.k-grouping-row):not(.k-detail-row):not(.k-group-footer) > td:not(.k-group-cell):not(.k-hierarchy-cell)", V = "tr:not(.k-footer-template):visible", W = ":not(.k-group-cell):not(.k-hierarchy-cell):visible", U = V + ":first>" + W + ":first", q = "th.k-header:not(.k-group-cell,.k-hierarchy-cell)", j = q + ":visible[" + b.attr("field") + "]", G = q + "[" + b.attr("field") + "]", $ = ".kendoGrid", K = "edit", Y = "save", Q = "remove", J = "detailInit", X = "filterMenuInit", Z = "columnMenuInit", et = "change", tt = "columnHide", nt = "columnShow", it = "saveChanges", rt = "dataBound", at = "detailExpand", ot = "detailCollapse", st = "k-state-focused", lt = "k-state-selected", dt = "columnResize", ct = "columnReorder", ut = "click", pt = "height", ft = "tabIndex", ht = "function", gt = "string", mt = "Are you sure you want to delete this record?", vt = /(\}|\#)/gi, _t = /#/gi, bt = "[\\x20\\t\\r\\n\\f]", kt = RegExp("(^|" + bt + ")" + "(k-group-cell|k-hierarchy-cell)" + "(" + bt + "|$)"), wt = '<a class="k-button k-button-icontext #=className#" #=attr# href="\\#"><span class="#=iconClass# #=imageClass#"></span>#=text#</a>', yt = !1, xt = b.support.browser, Ct = xt.msie && 7 == xt.version, Tt = T.extend({ init: function (e, t) { var n = this; T.fn.init.call(n, e, t), n._refreshHandler = N(n.refresh, n), n.setDataSource(t.dataSource), n.wrap() }, setDataSource: function (e) { var t = this; t.dataSource && t.dataSource.unbind(et, t._refreshHandler), t.dataSource = e, t.dataSource.bind(et, t._refreshHandler) }, options: { name: "VirtualScrollable", itemHeight: e.noop }, destroy: function () { var e = this; T.fn.destroy.call(e), e.dataSource.unbind(et, e._refreshHandler), e.wrapper.add(e.verticalScrollbar).off($), e.drag && e.drag.destroy() }, wrap: function () { var t, n = this, i = b.support.scrollbar() + 1, r = n.element; r.css({ width: "auto", overflow: "hidden" }).css(yt ? "padding-left" : "padding-right", i), n.content = r.children().first(), t = n.wrapper = n.content.wrap('<div class="k-virtual-scrollable-wrap"/>').parent().bind("DOMMouseScroll" + $ + " mousewheel" + $, N(n._wheelScroll, n)), b.support.kineticScrollNeeded && (n.drag = new b.UserEvents(n.wrapper, { global: !0, move: function (e) { n.verticalScrollbar.scrollTop(n.verticalScrollbar.scrollTop() - e.y.delta), t.scrollLeft(t.scrollLeft() - e.x.delta), e.preventDefault() } })), n.verticalScrollbar = e('<div class="k-scrollbar k-scrollbar-vertical" />').css({ width: i }).appendTo(r).bind("scroll" + $, N(n._scroll, n)) }, _wheelScroll: function (e) { var n, i = this, r = i.verticalScrollbar.scrollTop(), a = e.originalEvent, o = a.wheelDeltaY; a.wheelDelta ? (o === t || o) && (n = a.wheelDelta) : a.detail && a.axis === a.VERTICAL_AXIS && (n = 10 * -a.detail), n && (e.preventDefault(), i.verticalScrollbar.scrollTop(r + -n)) }, _scroll: function (e) { var t = this, n = e.currentTarget.scrollTop, i = t.dataSource, r = t.itemHeight, a = i.skip() || 0, o = t._rangeStart || a, s = t.element.innerHe
61ight(), l = !!(t._scrollbarTop && t._scrollbarTop > n), d = O.max(O.floor(n / r), 0), c = O.max(d + O.floor(s / r), 0); t._scrollTop = n - o * r, t._scrollbarTop = n, t._fetch(d, c, l) || (t.wrapper[0].scrollTop = t._scrollTop) }, _fetch: function (e, t, n) { var i = this, r = i.dataSource, a = i.itemHeight, o = r.take(), s = i._rangeStart || r.skip() || 0, l = O.floor(e / o) * o, d = !1, c = .33; return s > e ? (d = !0, s = O.max(0, t - o), i._scrollTop = (e - s) * a, i._page(s, o)) : t >= s + o && !n ? (d = !0, s = e, i._scrollTop = a, i._page(s, o)) : i._fetching || (l + o - o * c > e && e > o && r.prefetch(l - o, o), t > l + o * c && r.prefetch(l + o, o)), d }, _page: function (e, t) { var n = this, i = n.dataSource; clearTimeout(n._timeout), n._fetching = !0, n._rangeStart = e, i.inRange(e, t) ? i.range(e, t) : (b.ui.progress(n.wrapper.parent(), !0), n._timeout = setTimeout(function () { i.range(e, t) }, 100)) }, refresh: function () { var e, t, n, i, r = this, a = "", o = 25e4, s = r.dataSource, l = r._rangeStart, d = b.support.kineticScrollNeeded ? 0 : b.support.scrollbar(), c = r.wrapper[0]; for (b.ui.progress(r.wrapper.parent(), !1), clearTimeout(r._timeout), n = r.itemHeight = r.options.itemHeight() || 0, i = c.scrollWidth > c.offsetWidth ? d : 0, e = s.total() * n + i, t = 0; O.floor(e / o) > t; t++) a += '<div style="width:1px;height:' + o + 'px"></div>'; e % o && (a += '<div style="width:1px;height:' + e % o + 'px"></div>'), r.verticalScrollbar.html(a), c.scrollTop = r._scrollTop, r.drag && r.drag.cancel(), l && !r._fetching && (r._rangeStart = s.skip()), r._fetching = !1 } }), St = { create: { text: "Add new record", imageClass: "k-add", className: "k-grid-add", iconClass: "k-icon" }, cancel: { text: "Cancel changes", imageClass: "k-cancel", className: "k-grid-cancel-changes", iconClass: "k-icon" }, save: { text: "Save changes", imageClass: "k-update", className: "k-grid-save-changes", iconClass: "k-icon" }, destroy: { text: "Delete", imageClass: "k-delete", className: "k-grid-delete", iconClass: "k-icon" }, edit: { text: "Edit", imageClass: "k-edit", className: "k-grid-edit", iconClass: "k-icon" }, update: { text: "Update", imageClass: "k-update", className: "k-grid-update", iconClass: "k-icon" }, canceledit: { text: "Cancel", imageClass: "k-cancel", className: "k-grid-cancel", iconClass: "k-icon"} }, Ft = T.extend({ init: function (e, t) { var n = this; t = I(t) ? { dataSource: t} : t, T.fn.init.call(n, e, t), yt = b.support.isRtl(e), n._element
61(), n._aria(), n._columns(n.options.columns), n._dataSource(), n._tbody(), n._pageable(), n._thead(), n._groupable(), n._toolbar(), n._setContentHeight(), n._templates(), n._navigatable(), n._selectable(), n._details(), n._editable(), n._attachCustomCommandsEvent(), n.options.autoBind ? n.dataSource.fetch() : n._footer(), b.notify(n) }, events: [et, "dataBinding", "cancel", rt, at, ot, J, X, Z, K, Y, Q, it, dt, ct, nt, tt], setDataSource: function (e) { var t = this; t.options.dataSource = e, t._dataSource(), t._pageable(), t.options.groupable && t._groupable(), t._thead(), t.virtualScrollable && t.virtualScrollable.setDataSource(t.options.dataSource), t.options.autoBind && e.fetch() }, options: { name: "Grid", columns: [], toolbar: null, autoBind: !0, filterable: !1, scrollable: !0, sortable: !1, selectable: !1, navigatable: !1, pageable: !1, editable: !1, groupable: !1, rowTemplate: "", altRowTemplate: "", dataSource: {}, height: null, resizable: !1, reorderable: !1, columnMenu: !1, detailTemplate: null, columnResizeHandleWidth: 3 }, destroy: function () { var e, t = this; T.fn.destroy.call(t), t.pager && t.pager.destroy(), t.groupable && t.groupable.destroy(), t.options.reorderable && t.wrapper.data("kendoReorderable").destroy(), t.resizable && t.resizable.destroy(), t.virtualScrollable && t.virtualScrollable.destroy(), t._destroyColumnAttachments(), t._destroyEditable(), t.dataSource.unbind(et, t._refreshHandler).unbind(M, t._progressHandler).unbind(P, t._errorHandler), e = t.element.add(t.wrapper).add(t.table).add(t.thead).add(t.wrapper.find(">.k-grid-toolbar")), t.content && (e = e.add(t.content).add(t.content.find(">.k-virtual-scrollable-wrap"))), e.off($), b.destroy(t.wrapper) }, setOptions: function (e) { var t = this; T.fn.setOptions.call(this, e), t._templates() }, items: function () { return this.tbody.children(":not(.k-grouping-row,.k-detail-row,.k-group-footer)") }, _destroyColumnAttachments: function () { var t = this; t.resizeHandle = null, t.thead.find("th").each(function () { var t = e(this), n = t.data("kendoFilterMenu"), i = t.data("kendoSortable"), r = t.data("kendoColumnMenu"); n && n.destroy(), i && i.destroy(), r && r.destroy() }) }, _attachCustomCommandsEvent: function () { var e, t, n, i = this, r = i.columns || []; for (t = 0, n = r.length; n > t; t++) e = r[t].command, e && l(i, i.wrapper, e) }, _aria: function () { var e = this.element.attr("id") || "aria"; e && (this._cellId = e + "_active_cell") }, _element: function () { var t = this, n = t.element; n.is("table") || (n = t.options.scrollable ? t.element.find("> .k-grid-content > table") : t.element.children("table"), n.length || (n = e("<table />").appendTo(t.element))), Ct && n.attr("cellspacing", 0), t.table = n.attr("role", t._hasDetails() ? "treegrid" : "grid"), t._wrapper() }, _positionColumnResizeHandle: function (t) { var n, i = this, o = i.options.scrollable, s = i.resizeHandle, l = i.options.columnResizeHandleWidth; i.thead.on("mousemove" + $, "th:not(.k-group-cell,.k-hierarchy-cell)", function (d) { var c, u, p, f, h = e(this), g = d.clientX, m = e(window).scrollLeft(), v = h.offset().left + (yt ? 0 : this.offsetWidth); g + m > v - l && v + l > g + m ? (s || (s = i.resizeHandle = e('<div class="k-resize-handle"/>'), t.append(s)), yt ? (c = h.closest(".k-grid-header-wrap"), u = xt.msie ? c.scrollLeft() : 0, p = xt.webkit ? c[0].scrollWidth - c[0].offsetWidth - c.scrollLeft() : 0, f = xt.mozilla ? c[0].scrollWidth - c[0].offsetWidth - (c[0].scrollWidth - c[0].offsetWidth - c.scrollLeft()) : 0, n = h.position().left - p + f - u) : (n = this.offsetWidth, h.prevAll(":visible").each(function () { n += this.offsetWidth })), s.css({ top: o ? 0 : r(i.wrapper), left: n - l, height: h.outerHeight(), width: 3 * l }).data("th", h).show()) : s ? s.hide() : a(i.wrapper, "") }) }, _resizable: function () { var t, n, i, r, o, s = this, l = s.options; l.resizable && (t = l.scrollable ? s.wrapper.find(".k-grid-header-wrap:first") : s.wrapper, s._positionColumnResizeHandle(t), s.resizable = new k.Resizable(t, { handle: ".k-resize-handle", hint: function (t) { return e('<div class="k-grid-resize-indicator" />').css({ height: t.data("th").outerHeight() + s.tbody.attr("clientHeight") }) }, start: function (t) { var d = e(t.currentTarget).data("th"), c = e.inArray(d[0], d.parent().children(":visible")), u = s.tbody.parent(), p = s.footer || e(); a(s.wrapper, "col-resize"), o = l.scrollable ? s.thead.parent().find("col:eq(" + c + ")").add(u.children("colgroup").find("col:eq(" + c + ")")).add(p.find("colgroup").find("col:eq(" + c + ")")) : u.children("colgroup").find("col:eq(" + c + ")"), n = t.x.location, i = d.outerWidth(), r = s.tbody.outerWidth() }, resize: function (t) { var a = yt ? -1 : 1, d = i + t.x.location * a - n * a, c = s.footer || e(); d >
61 10 && (o.css("width", d), l.scrollable && r && (s._footerWidth = r + t.x.location * a - n * a, s.tbody.parent().add(s.thead.parent()).add(c.find("table")).css("width", s._footerWidth))) }, resizeend: function (t) { var n, r = e(t.currentTarget).data("th"), o = r.outerWidth(); a(s.wrapper, ""), i != o && (n = s.columns[r.parent().find("th:not(.k-group-cell,.k-hierarchy-cell)").index(r)], n.width = o, s.trigger(dt, { column: n, oldWidth: i, newWidth: o })), s.resizeHandle.hide() } })) }, _draggable: function () { var t = this; t.options.reorderable && (t._draggableInstance && t._draggableInstance.destroy(), t._draggableInstance = t.wrapper.kendoDraggable({ group: b.guid(), filter: t.content ? ".k-grid-header:first " + q : "table:first>.k-grid-header " + q, hint: function (t) { return e('<div class="k-header k-drag-clue" />').css({ width: t.width(), paddingLeft: t.css("paddingLeft"), paddingRight: t.css("paddingRight"), lineHeight: t.height() + "px", paddingTop: t.css("paddingTop"), paddingBottom: t.css("paddingBottom") }).html(t.attr(b.attr("title")) || t.attr(b.attr("field")) || t.text()).prepend('<span class="k-icon k-drag-status k-denied" />') } }).data("kendoDraggable")) }, _reorderable: function () { var e = this; e.options.reorderable && e.wrapper.kendoReorderable({ draggable: e._draggableInstance, change: function (t) { var n = H(e.columns[t.newIndex], e.columns), i = e.columns[t.oldIndex]; e.trigger(ct, { newIndex: n, oldIndex: H(i, e.columns), column: i }), e.reorderColumn(n, i) } }) }, reorderColumn: function (e, t) { var n, i, r, a = this, o = H(t, a.columns), l = H(t, d(a.columns)), c = H(a.columns[e], d(a.columns)), u = a.footer || a.wrapper.find(".k-grid-footer"); if (o !== e) for (a.columns.splice(o, 1), a.columns.splice(e, 0, t), a._templates(), s(a.thead.prev().find("col:not(.k-group-col,.k-hierarchy-col)"), l, c), a.options.scrollable && s(a.tbody.prev().find("col:not(.k-group-col,.k-hierarchy-col)"), l, c), s(a.thead.find(".k-header:not(.k-group-cell,.k-hierarchy-cell)"), o, e), u && u.length && (s(u.find(".k-grid-footer-wrap>table>colgroup>col:not(.k-group-col,.k-hierarchy-col)"), l, c), s(u.find(".k-footer-template>td:not(.k-group-cell,.k-hierarchy-cell)"), o, e)), n = a.tbody.children(":not(.k-grouping-row,.k-detail-row)"), i = 0, r = n.length; r > i; i += 1) s(n.eq(i).find(">td:not(.k-group-cell,.k-hierarchy-cell)"), o, e) }, cellIndex: function (t) { return e(t).parent().children("td:not(.k-group-cell,.k-hierarchy-cell)").index(t) }, _modelForContainer: function (t) { t = e(t), t.is("tr") || "popup" === this._editMode() || (t = t.closest("tr")); var n = t.attr(b.attr("uid")); return this.dataSource.getByUid(n) }, _editable: function () { var t, n = this, i = n.selectable && n.selectable.options.multiple, r = n.options.editable, a = function () { var t = C(), i = n._editContainer; !i || e.contains(i[0], t) || i[0] === t || e(t).closest(".k-animation-container").length || n.editable.end() && n.closeCell() }; r && (t = n._editMode(), "incell" === t ? r.update !== !1 && n.wrapper.on(ut + $, "tr:not(.k-grouping-row) > td", function (t) { var r = e(this); r.hasClass("k-hierarchy-cell") || r.hasClass("k-detail-cell") || r.hasClass("k-group-cell") || r.hasClass("k-edit-cell") || r.has("a.k-grid-delete").length || r.has("button.k-grid-delete").length || r.closest("tbody")[0] !== n.tbody[0] || e(t.target).is(":input") || (n.editable ? n.editable.end() && (i && e(C()).blur(), n.closeCell(), n.editCell(r)) : n.editCell(r)) }).on("focusin" + $, function () { clearTimeout(n.timer), n.timer = null }).on("focusout" + $, function () { n.timer = setTimeout(a, 1) }) : r.update !== !1 && n.wrapper.on(ut + $, "tbody>tr:not(.k-detail-row,.k-grouping-row):visible a.k-grid-edit", function (t) { t.preventDefault(), n.editRow(e(this).closest("tr")) }), r.destroy !== !1 ? n.wrapper.on(ut + $, "tbody>tr:not(.k-detail-row,.k-grouping-row):visible .k-grid-delete", function (t) { t.preventDefault(), t.stopPropagation(), n.removeRow(e(this).closest("tr")) }) : n.wrapper.on(ut + $, "tbody>tr:not(.k-detail-row,.k-grouping-row):visible button.k-grid-delete", function (e) { n._confirmation() || e.preventDefault() })) }, editCell: function (t) { t = e(t); var n = this, i = n.columns[n.cellIndex(t)], r = n._modelForContainer(t); !r || r.editable && !r.editable(i.field) || i.command || !i.field || (n._attachModelChange(r), n._edit
61Container = t, n.editable = t.addClass("k-edit-cell").kendoEditable({ fields: { field: i.field, format: i.format, editor: i.editor, values: i.values }, model: r, change: function (e) { n.trigger(Y, { values: e.values, container: t, model: r }) && e.preventDefault() } }).data("kendoEditable"), t.parent().addClass("k-grid-edit-row"), n.trigger(K, { container: t, model: r })) }, _destroyEditable: function () { var e = this, t = function () { e.editable && (e._detachModelChange(), e.editable.destroy(), e.editable = null, e._editContainer = null) }; e.editable && ("popup" === e._editMode() ? e._editContainer.data("kendoWindow").bind("deactivate", t).close() : t()) }, _attachModelChange: function (e) { var t = this; t._modelChangeHandler = function (e) { t._modelChange({ field: e.field, model: this }) }, e.bind("change", t._modelChangeHandler) }, _detachModelChange: function () { var e = this, t = e._editContainer, n = e._modelForContainer(t); n && n.unbind(et, e._modelChangeHandler) }, closeCell: function () { var t, n, i, r, a = this; a._editContainer && (t = a._editContainer.removeClass("k-edit-cell"), n = t.closest("tr").attr(b.attr("uid")), i = a.columns[a.cellIndex(t)], r = a.dataSource.getByUid(n), t.parent().removeClass("k-grid-edit-row"), a._destroyEditable(), a._displayCell(t, i, r), t.hasClass("k-dirty-cell") && e('<span class="k-dirty"/>').prependTo(t)) }, _displayCell: function (e, t, n) { var i = this, r = { storage: {}, count: 0 }, a = D({}, b.Template, i.options.templateSettings), o = b.template(i._cellTmpl(t, r), a); r.count > 0 && (o = N(o, r.storage)), e.empty().html(o(n)) }, removeRow: function (t) { var n, i, r = this; r._confirmation() && (t = e(t).hide(), n = r._modelForContainer(t), n && !r.trigger(Q, { row: t, model: n }) && (i = r._editMode(), "incell" !== i && r.cancelRow(), r.dataSource.remove(n), ("inline" === i || "popup" === i) && r.dataSource.sync())) }, _editMode: function () { var e = "incell", t = this.options.editable; return t !== !0 && (e = "string" == typeof t ? t : t.mode || e), e }, editRow: function (n) { n = e(n); var i, r = this, a = r._modelForContainer(n), o = r._editMode(), s = r.options.navigatable; r.cancelRow(), a && (r._attachModelChange(a), "popup" === o ? r._createPopupEditor(a) : "inline" === o ? r._createInlineEditor(n, a) : "incell" === o && e(n).children(B).each(function () { var n = e(this), i = r.columns[n.index()]; return a = r._modelForContainer(n), a && (!a.editable || a.editable(i.field)) && i.field ? (r.editCell(n), !1) : t }), i = r._editContainer, i.on(ut + $, "a.k-grid-cancel", function (t) { if (t.preventDefault(), t.stopPropagation(), !r.trigger("cancel", { container: i, model: a })) { var n = r.items().index(e(r.current()).parent()); r.cancelRow(), s && (r.current(r.items().eq(n).children().filter(W).first()), v(r.table, !0)) } }), i.on(ut + $, "a.k-grid-update", function (e) { e.preventDefault(), e.stopPropagation(), r.saveRow() })) }, _createPopupEditor: function (n) { var i, r, a, o, s, l, d, c, u, p, f, h = this, g = "<div " + b.attr("uid") + '="' + n.uid + '"><div class="k-edit-form-container">', _ = [], k = h.options.editable, w = k.template, y = F(k) ? k.window : {}, x = D({}, b.Template, h.options.templateSettings); if (w) for (typeof w === gt && (w = window.unescape(w)), g += b.template(w, x)(n), a = 0, o = h.columns.length; o > a; a++) i = h.columns[a], i.command && (c = m(i.command, "edit"), c && (r = c)); else for (a = 0, o = h.columns.length; o > a; a++) i = h.columns[a], i.command ? i.command && (c = m(i.command, "edit"), c && (r = c)) : (g += '<div class="k-edit-label"><label for="' + i.field + '">' + (i.title || i.field || "") + "</label></div>", n.editable && !n.editable(i.field) || !i.field ? (p = { storage: {}, count: 0 }, s = b.template(h._cellTmpl(i, p), x), p.count > 0 && (s = N(s, p.storage)), g += '<div class="k-edit-field">' + s(n) + "</div>") : (_.push({ field: i.field, format: i.format, editor: i.editor, values: i.values }), g += "<div " + b.attr("container-for") + '="' + i.field + '" class="k-edit-field"></div>')); r && F(r) && (r.text && F(r.text) && (l = r.text.update, d = r.text.cancel), r.attr && (u = r.attr)), g += h._createButton({ name: "update", text: l, attr: u }) + h._createButton({ name: "canceledit", text: d, attr: u }), g += "</div></div>", f = h._editContainer = e(g).appendTo(h.wrapper).eq(0).kendoWindow(D({ modal: !0, resizable: !1, draggable: !0, title: "Edit", visible: !1, close: function (i) { if (i.userTriggered) { if (h.trigger("cancel", { container: f, model: n })) return i.preventDefault(), t; var r = h.items().index(e(h.current()).parent()); h.cancelRow(), h.options.navigatable && (h.current(h.items().eq(r).children().filter(W).first()), v(h.table, !0)) } } }, y)), h.editable = h._editContainer.kendoEditable({ fields: _, model: n, clearContainer: !1 }).data("kendoEditable"), f.data("kendoWindow").center().open(), h.trigger(K, { container: f, model: n }) }, _createInlineEditor: function (t, n) { var i, r, a, o = this, s = []; t.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function () { if (r = e(this), i = o.columns[o.cellIndex(r)], i.command || !i.field || n.editable && !n.editable(i.field)) { if (i.command && (a = m(i.command, "edit"))) { r.empty(); var t, l, d; F(a) && (a.text && F(a.text) && (t = a.text.update, l = a.text.cancel), a.attr && (d = a.attr)), e(o._createButton({ name: "update", text: t, attr: d }) + o._createButton({ name: "canceledit", text: l, attr: d })).appendTo(r) } } else s.push({ field: i.field, format: i.format, editor: i.editor, values: i.values }), r.attr(b.attr("container-for"), i.field), r.empty() }
61), o._editContainer = t, o.editable = t.addClass("k-grid-edit-row").kendoEditable({ fields: s, model: n, clearContainer: !1 }).data("kendoEditable"), o.trigger(K, { container: t, model: n }) }, cancelRow: function () { var e, t = this, n = t._editContainer; n && (e = t._modelForContainer(n), t.dataSource.cancelChanges(e), "popup" !== t._editMode() ? t._displayRow(n) : t._displayRow(t.items().filter("[" + b.attr("uid") + "=" + e.uid + "]")), t._destroyEditable()) }, saveRow: function () { var e = this, t = e._editContainer, n = e._modelForContainer(t), i = e.editable; t && i && i.end() && !e.trigger(Y, { container: t, model: n }) && e.dataSource.sync() }, _displayRow: function (t) { var n = this, i = n._modelForContainer(t); i && t.replaceWith(e((t.hasClass("k-alt") ? n.altRowTemplate : n.rowTemplate)(i))) }, _showMessage: function (e) { return window.confirm(e) }, _confirmation: function () { var e = this, t = e.options.editable, n = t === !0 || typeof t === gt ? mt : t.confirmation; return n !== !1 && null != n ? e._showMessage(n) : !0 }, cancelChanges: function () { this.dataSource.cancelChanges() }, saveChanges: function () { var e = this; (e.editable && e.editable.end() || !e.editable) && !e.trigger(it) && e.dataSource.sync() }, addRow: function () { var e, t, n, i, r, a = this, o = a.dataSource, s = a._editMode(), l = a.options.editable.createAt || "", d = o.pageSize(), c = o.view() || []; (a.editable && a.editable.end() || !a.editable) && ("incell" != s && a.cancelRow(), e = o.indexOf(c[0]), "bottom" == l.toLowerCase() && (e += c.length, d && !o.options.serverPaging && c.length >= d && (e -= 1)), 0 > e && (e = o.page() > o.totalPages() ? (o.page() - 1) * d : 0), t = o.insert(e, {}), n = t.uid, i = a.table.find("tr[" + b.attr("uid") + "=" + n + "]"), r = i.children("td:not(.k-group-cell,.k-hierarchy-cell)").eq(a._firstEditableColumnIndex(i)), "inline" !== s && "popup" !== s || !i.length ? r.length && a.editCell(r) : a.editRow(i)) }, _firstEditableColumnIndex: function (e) { var t, n, i, r = this, a = r.columns, o = r._modelForContainer(e); for (n = 0, i = a.length; i > n; n++) if (t = a[n], o && (!o.editable || o.editable(t.field)) && !t.command && t.field) return n; return -1 }, _toolbar: function () { var t, n = this, i = n.wrapper, r = n.options.toolbar, a = n.options.editable; r && (t = n.wrapper.find(".k-grid-toolbar"), t.length || (R(r) || (r = typeof r === gt ? r : n._toolbarTmpl(r).replace(_t, "\\#"), r = N(b.template(r), n)), t = e('<div class="k-toolbar k-grid-toolbar" />').html(r({})).prependTo(i)), a && a.create !== !1 && t.on(ut + $, ".k-grid-add", function (e) { e.preventDefault(), n.addRow() }).on(ut + $, ".k-grid-cancel-changes", function (e) { e.preventDefault(), n.cancelChanges() }).on(ut + $, ".k-grid-save-changes", function (e) { e.preventDefault(), n.saveChanges() })) }, _toolbarTmpl: function (e) { var t, n, i = this, r = ""; if (I(e)) for (t = 0, n = e.length; n > t; t++) r += i._createButton(e[t]); return r }, _createButton: function (e) { var t = e.template || wt, n = typeof e === gt ? e : e.name || e.text, r = { className: "k-grid-" + (n || "").replace(/\s/g, ""), text: n, imageClass: "", attr: "", iconClass: "" }; if (!(n || F(e) && e.template)) throw Error("Custom commands should have name specified"); return F(e) ? (e.className && (e.className += " " + r.className), "edit" === n && F(e.text) && (e = D(!0, {}, e), e.text = e.text.edit), e.attr && F(e.attr) && (e.attr = i(e.attr)), r = D(!0, r, St[n], e)) : r = D(!0, r, St[n]), b.template(t)(r) }, _groupable: function () { var t = this; t._groupableClickHandler ? t.table.off(ut + $, t._groupableClickHandler) : t._groupableClickHandler = function (n) { var i = e(this), r = i.closest("tr"); i.hasClass("k-i-collapse") ? t.collapseGroup(r) : t.expandGroup(r), n.preventDefault(), n.stopPropagation() }, t.table.on(ut + $, ".k-grouping-row .k-i-collapse, .k-grouping-row .k-i-expand", t._groupableClickHandler), t._attachGroupable() }, _attachGroupable: function () { var t = this, n = t.wrapper, i = t.options.groupable; i && (n.has("div.k-grouping-header")[0] || e("<div> </div>").addClass("k-grouping-header").prependTo(n), t.groupable && t.groupable.destroy(), t.groupable = new y(n, D({}, i, { draggable: t._draggableInstance, groupContainer: ">div.k-grouping-header", dataSource: t.dataSource, draggableElements: t.content ? ".k-grid-header:first " + j : "table:first>.k-grid-header " + j, filter: t.content ? ".k-grid-header:first " + G : "table:first>.k-grid-header " + G, allowDrag: t.options.reorderable }))) }, _selectable: function () { var e, n, i = this, r = i.options.selectable; r && (e = typeof r === gt && r.toLowerCase().indexOf("multiple") > -1, n = typeof r === gt && r.toLowerCase().indexOf("cell") > -1, i.selectable = new b.ui.Selectable(i.table, { filter: ">" + (n ? L : "tbody>tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)"), aria: !0, multiple: e, change: function () { i.trigger(et) } }
61), i.options.navigatable && i.table.on("keydown" + $, function (r) { var a = i.current(); if (r.keyCode === S.SPACEBAR && r.target == i.table[0] && !a.is(".k-edit-cell,.k-header") && a.parent().is(":not(.k-grouping-row,.k-detail-row,.k-group-footer)")) { if (r.preventDefault(), r.stopPropagation(), a = n ? a : a.parent(), e) if (r.ctrlKey) { if (a.hasClass(lt)) return a.removeClass(lt), i.trigger(et), t } else i.selectable.clear(); else i.selectable.clear(); i.selectable.value(a) } })) }, clearSelection: function () { var e = this; e.selectable.clear(), e.trigger(et) }, select: function (n) { var i = this, r = i.selectable; return n = e(n), n.length ? (r.options.multiple || (r.clear(), n = n.first()), r.value(n), t) : r.value() }, current: function (n) { var i = this, r = i.options.scrollable, a = i._current, o = i.table.add(i.thead.parent()); return n !== t && n.length && (a && a[0] === n[0] || (a && (a.removeClass(st).removeAttr("id"), o.removeAttr("aria-activedescendant")), n.attr("id", i._cellId), i._current = n.addClass(st), o.attr("aria-activedescendant", i._cellId), n.length && r && (e.contains(i.content[0], n[0]) && i._scrollTo(n.parent()[0], i.content[0]), r.virtual ? i._scrollTo(n[0], i.content.find(">.k-virtual-scrollable-wrap")[0]) : i._scrollTo(n[0], i.content[0])))), i._current }, _removeCurrent: function () { this._current && (this._current.removeClass(st), this._current = null) }, _scrollTo: function (e, t) { var n = e.tagName.toLowerCase(), i = "td" === n || "th" === n, r = e[i ? "offsetLeft" : "offsetTop"], a = e[i ? "offsetWidth" : "offsetHeight"], o = t[i ? "scrollLeft" : "scrollTop"], s = t[i ? "clientWidth" : "clientHeight"], l = r + a, d = 0; d = o > r ? r : l > o + s ? s >= a ? l - s : r : o, t[i ? "scrollLeft" : "scrollTop"] = d }, _navigatable: function () { var t = this, n = N(t.current, t), i = t.table, r = t.thead.parent(), a = i, o = b.support.isRtl(t.element); t.options.navigatable && (t.options.scrollable && (a = i.add(r), r.attr(ft, -1)), r.on("key
61down" + $, function (e) { e.altKey && e.keyCode == S.DOWN && (n().find(".k-grid-filter, .k-header-column-menu").click(), e.stopImmediatePropagation()) }).find("a.k-link").attr("tabIndex", -1), i.attr(ft, O.max(i.attr(ft) || 0, 0)).on("mousedown" + $ + " keydown" + $, ".k-detail-cell", function (e) { e.target !== e.currentTarget && e.stopImmediatePropagation() }), a.on(b.support.touch ? "touchstart" + $ : "mousedown" + $, V + ">" + W, N(_, t)).on("focus" + $, function () { if (!b.support.touch) { var t = n(); t && t.is(":visible") ? t.addClass(st) : n(e(this).find(U)), this == i[0] ? (r.attr(ft, -1), i.attr(ft, 0)) : (i.attr(ft, -1), r.attr(ft, 0)) } }).on("focusout" + $, function () { var e = n(); e && e.removeClass(st) }).on("keydown" + $, function (r) { var a, s, l, d, c, u, p, f = r.keyCode, h = !1, g = !r.isDefaultPrevented() && !e(r.target).is(":button,a,:input,a>.k-icon"), m = t.options.pageable, _ = t.dataSource, b = "incell" == t._editMode(), k = r.shiftKey, w = n(); w && w.is("th") && (g = !0), g && f == S.UP ? (w ? (l = w.parent().prevAll(V).first(), l[0] || (c = t.thead.parent(), v(c, !0), l = c.find(V).first()), d = w.index(), w = l.children().eq(d), w[0] && w.is(W) || (w = l.children(W).first())) : w = i.find(U), h = !0, n(w)) : g && f == S.DOWN ? (w ? (l = w.parent().nextAll(V).first(), !l[0] && w.is("th") && (v(t.tbody.parent()), l = t.tbody.find(V).first()), d = w.index(), w = l.children().eq(d), w[0] && w.is(W) || (w = l.children(W).first())) : w = i.find(U), h = !0, n(w)) : g && f == (o ? S.RIGHT : S.LEFT) ? (n(w ? w.prevAll(B + ":first") : i.find(U)), h = !0) : g && f == (o ? S.LEFT : S.RIGHT) ? (w ? w.next()[0] && (w = w.nextAll(B + ":first")) : w = i.find(U), h = !0, n(w)) : g && m && S.PAGEDOWN == f ? (_.page(_.page() + 1), h = !0) : g && m && S.PAGEUP == f ? (_.page(_.page() - 1), h = !0) : f == S.ENTER || S.F2 == f ? (w = w ? w : i.find(U), w.is("th") ? (w.find(".k-link").click(), h = !0) : w.parent().is(".k-master-row,.k-grouping-row") ? (w.parent().find(".k-icon:first").click(), h = !0) : (u = w.find(":focusable:first"), !w.hasClass("k-edit-cell") && u[0] && w.hasClass("k-state-focused") ? (u.focu
61s(), h = !0) : t.options.editable && !e(r.target).is(":button,.k-button") && (t._handleEditing(w), h = !0))) : S.ESC == f ? (a = C(), w && e.contains(w[0], a) && !w.hasClass("k-edit-cell") && !w.parent().hasClass("k-grid-edit-row") ? (v(t.table[0], !0), h = !0) : !t._editContainer || w && !t._editContainer.has(w[0]) && w[0] !== t._editContainer[0] || (b ? t.closeCell() : (s = t.items().index(e(w).parent()), a && a.blur(), t.cancelRow(), s >= 0 && t.current(t.items().eq(s).children().filter(W).first())), xt.msie && 9 > xt.version && document.body.focus(), v(i, !0), h = !0)) : S.TAB == f && (w = e(w), t.options.editable && b && (p = e(C()).closest(".k-edit-cell"), p[0] && p[0] !== w[0] && (w = p)), p = k ? w.prevAll(B + ":first") : w.nextAll(":visible:first"), p.length || (p = w.parent()[k ? "prevAll" : "nextAll"]("tr:not(.k-grouping-row):not(.k-detail-row):visible:first").children(B + (k ? ":last" : ":first"))), !w.is("th") && p.length && t.options.editable && b && (t._handleEditing(w, p), h = !0)), h && (r.preventDefault(), r.stopPropagation()) })) }, _handleEditing: function (n, i) { 62 var r, a, o = this, s = e(C()), l = o._editMode(), d = xt.msie, c = d && 9 > xt.version, u = o._editContainer; if (a = "incell" == l ? n.hasClass("k-edit-cell") : n.parent().hasClass("k-grid-edit-row"), o.editable) { 63 if (e.contains(u[0], s[0]) && (xt.opera || c ? s.change().triggerHandler("blur") : (s.blur(), d && s.blur())), !o.editable) return v(o.table), t; if (!o.editable.end()) return "incell" == l ? o.current(u) : o.current(u.children().filter(B).first()), r = u.find(":focusable:first")[0], r && r.focus(), t; "incell" == l ? o.closeCell() : (o.saveRow(), a = !0) 64 } i && o.current(i), c && document.body.focus(), v(o.table, !0), (!a && !i || i) && ("incell" == l ? o.editCell(o.current()) : o.editRow(o.current().parent())) 65 }, _wrapper: function () { var e = this, t = e.table, n = e.options.height, i = e.element; i.is("div") || (i = i.wrap("<div/>").parent()), e.wrapper = i.addClass("k-grid k-widget"), n && (e.wrapper.css(pt, n), t.css(pt, "auto")) }, _tbody: function () { var t, n = this, i = n.table; t = i.find(">tbody"), t.length || (t = e("<tbody/>").appendTo(i)), n.tbody = t }, _scrollable: function () { var t, n, i, r, a, o = this, s = o.options, l = s.scrollable, d = l !== !0 && l.virtual && !o.virtualScrollable, c = !b.support.kineticScrollNeeded || d ? b.support.scrollbar() : 0; l && (t = o.wrapper.children(".k-grid-header"), t[0] || (t = e('<div class="k-grid-header" />').insertBefore(o.table)), t.css(yt ? "padding-left" : "padding-right", l.virtual ? c + 1 : c), n = e('<table role="grid" />'), Ct && n.attr("cellspacing", 0), n.append(o.thead), t.empty().append(e('<div class="k-grid-header-wrap" />').append(n)), o.content = o.table.parent(), o.content.is(".k-virtual-scrollable-wrap") && (o.content = o.content.parent()), o.content.is(".k-grid-content, .k-virtual-scrollable-wrap") || (o.content = o.table.wrap('<div class="k-grid-content" />').parent()), d && (o.virtualScrollable = new Tt(o.content, { dataSource: o.dataSource, itemHeight: N(o._averageRowHeight, o) })), o.scrollables = t.children(".k-grid-header-wrap"), i = o.wrapper.find(".k-grid-footer"), r = yt && xt.webkit ? c : 0, i.length && (o.scrollables = o.scrollables.add(i.children(".k-grid-footer-wrap"))), l.virtual ? o.content.find(">.k-virtual-scrollable-wrap").bind("scroll" + $, function () { o.scrollables.scrollLeft(this.scrollLeft + r) }) : (o.content.bind("scroll" + $, function () { o.scrollables.scrollLeft(this.scrollLeft + r) }), a = b.touchScroller(o.content), a && a.movable && a.movable.bind("change", function (e) { o.scrollables.scrollLeft(-e.sender.x) }))) }, _setContentHeight: function () { var e, t = this, n = t.options, i = t.wrapper.innerHeight(), r = t.wrapper.children(".k-grid-header"), a = b.support.scrollbar(); n.scrollable && (i -= r.outerHeight(), t.pager && (i -= t.pager.element.outerHeight()), n.groupable && (i -= t.wrapper.children(".k-grouping-header").outerHeight()), n.toolbar && (i -= t.wrapper.children(".k-grid-toolbar").outerHeight()), t.footerTemplate && (i -= t.wrapper.children(".k-grid-footer").outerHeight()), e = function (e) { var t, n; return e[0].style.height ? !0 : (t = e.height(), e.height("auto"), n = e.height(), t != n ? (e.height(""), !0) : (e.height(""), !1)) }, e(t.wrapper) && (i > 2 * a ? t.content.height(i) : t.content.height(2 * a + 1))) }, _averageRowHeight: function () { var e, t = this, n = t._rowHeight; return t._rowHeight || (t._rowHeight = n = t.table.outerHeight() / t.items().length, t._sum = n, t._measures = 1), e = t.table.outerHeight() / t.items().length, n !== e && (t._measures++, t._sum += e, t._rowHeight = t._sum / t._measures), n }, _dataSource: function () { var e, n = this, i = n.options, r = i.dataSource; r = I(r) ? { data: r} : r, F(r) && (D(r, { table: n.table, fields: n.columns }), e = i.pageable, F(e) && e.pageSize !== t && (r.pageSize = e.pageSize)), n.dataSource && n._refreshHandler ? n.dataSource.unbind(et, n._refreshHandler).unbind(M, n._progressHandler).unbind(P, n._errorHandler) : (n._refreshHandler = N(n.refresh, n), n._progressHandler = N(n._requestStart, n), n._errorHandler = N(n._error, n)), n.dataSource = w.create(r).bind(et, n._refreshHandler).bind(M, n._progressHandler).bind(P, n._errorHandler) }, _error: function () { this._progress(!1) }, _requestStart: function () { this._progress(!0) }, _modelChange: function (t) { var n, i, r, a, o = this, s = t.model, l = o.tbody.find("tr[" + b.attr("uid") + "=" + s.uid + "]"), d = l.hasClass("k-alt"), c = o.items().index(l); if (l.children(".k-edit-cell").length && !o.options.rowTemplate) l.children(":not(.k-group-cell,.k-hierarchy-cell)").each(function () { n = e(this), i = o.columns[o.cellIndex(n)], i.field === t.field && (n.hasClass("k-edit-cell") ? n.addClass("k-dirty-cell") : (o._displayCell(n, i, s), e('<span class="k-dirty"/>
65').prependTo(n))) }); else if (!l.hasClass("k-grid-edit-row")) { for (r = (d ? o.altRowTemplate : o.rowTemplate)(s), l.replaceWith(r), r = o.items().eq(c), c = 0, a = o.columns.length; a > c; c++) i = o.columns[c], i.field === t.field && (n = r.children(":not(.k-group-cell,.k-hierarchy-cell)").eq(c), e('<span class="k-dirty"/>').prependTo(n)); o.trigger("itemChange", { item: r, data: s, ns: k }) } }, _pageable: function () { var t, n = this, i = n.options.pageable; i && (t = n.wrapper.children("div.k-grid-pager"), t.length || (t = e('<div class="k-pager-wrap k-grid-pager"/>').appendTo(n.wrapper)), n.pager && n.pager.destroy(), n.pager = "object" == typeof i && i instanceof b.ui.Pager ? i : new b.ui.Pager(t, D({}, i, { dataSource: n.dataSource }))) }, _footer: function () { var t, n, i = this, r = i.dataSource.aggregates(), a = "", s = i.footerTemplate, l = i.options, d = i.footer || i.wrapper.find(".k-grid-footer"); s ? (r = z(r) ? o(i.dataSource.aggregate()) : r, a = e(i._wrapFooter(s(r))), d.length ? (n = a, d.replaceWith(n), d = i.footer = n) : d = i.footer = l.scrollable ? l.pageable ? a.insertBefore(i.wrapper.children("div.k-grid-pager")) : a.appendTo(i.wrapper) : a.insertBefore(i.tbody)) : d && !i.footer && (i.footer = d), d.length && (l.scrollable && (t = d.attr("tabindex", -1).children(".k-grid-footer-wrap"), i.scrollables = i.scrollables.not(".k-grid-footer-wrap").add(t)), i._footerWidth && d.find("table").css("width", i._footerWidth), t && t.scrollLeft(i.content.scrollLeft())) }, _wrapFooter: function (t) { var n = this, i = "", r = b.support.mobileOS ? 0 : b.support.scrollbar(); return n.options.scrollable ? (i = e('<div class="k-grid-footer"><div class="k-grid-footer-wrap"><table' + (Ct ? ' cellspacing="0"' : "") + "><tbody>" + t + "</tbody></table></div></div>"), n._appendCols(i.find("table")), i.css(yt ? "padding-left" : "padding-right", r), i) : '<tfoot class="k-grid-footer">' + t + "</tfoot>" }, _columnMenu: function () { var t, n, i, r, a, o, s = this, l = s.columns, d = s.options, c = d.columnMenu, u = function () { v(s.thead.parent(), !0) }, p = function (e) { s.trigger(Z, { field: e.field, container: e.container }) }; c && ("boolean" == typeof c && (c = {}), s.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function (f) { n = l[f], o = e(this), n.command || !n.field && !o.attr("data-" + b.ns + "field") || (t = o.data("kendoColumnMenu"), t && t.destroy(), r = n.sortable !== !1 && c.sortable !== !1 ? d.sortable : !1, a = d.filterable && n.filterable !== !1 && c.filterable !== !1 ? D({}, n.filterable, d.filterable) : !1, i = { dataSource: s.dataSource, values: n.values, columns: c.columns, sortable: r, filterable: a, messages: c.messages, owner: s, closeCallback: u, init: p }, o.kendoColumnMenu(i)) })) }, _filterable: function () { var t, n, i = this, r = i.columns, a = function () { v(i.thead.parent(), !0) }, o = i.options.filterable; o && !i.options.columnMenu && i.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function (s) { t = e(this), r[s].filterable === !1 || r[s].command || !r[s].field && !t.attr("data-" + b.ns + "field") || (n = t.data("kendoFilterMenu"), n && n.destroy(), t.kendoFilterMenu(D(!0, {}, o, r[s].filterable, { dataSource: i.dataSource, values: r[s].values, closeCallback: a, init: function (e) { i.trigger(X, { field: e.field, container: e.container }) } }))) }) }, _sortable: function () { var t, n, i, r = this, a = r.columns, o = r.options.sortable; o && r.thead.find("th:not(.k-hierarchy-cell,.k-group-cell)").each(function (s) { t = a[s], t.sortable !== !1 && !t.command && t.field && (n = e(this), i = n.data("kendoSortable"), i && i.destroy(), n.attr("data-" + b.ns + "field", t.field).kendoSortable(D({}, o, { dataSource: r.dataSource, aria: !0 }))) }) }, _columns: function (t) { var n, i = this, r = i.table, a = r.find("col"), o = i.options.dataSource; t = t.length ? t : E(r.find("th"), function (t, n) { t = e(t); var i = t.attr(b.attr("sortable")), r = t.attr(b.attr("filterable")), o = t.attr(b.attr("type")), s = t.attr(b.attr("groupable")), l = t.attr(b.attr("field")), d = t.attr(b.attr("menu")); return l || (l = t.text().replace(/\s|[^A-z0-9]/g, "")), { field: l, type: o, sortable: "false" !== i, filterable: "false" !== r, groupable: "false" !== s, menu: d, template: t.attr(b.attr("template")), width: a.eq(n).css("width")} }), n = !(i.table.find("tbody tr").length > 0 && (!o || !o.transport)), i.columns = E(t, function (e) { return e = typeof e === gt ? { field: e} : e, e.hidden && (e.attributes = c(e.attributes), e.footerAttributes = c(e.footerAttributes), e.headerAttributes = c(e.headerAttributes)), D({ encoded: n }, e) }) }, _groups: function () { var e = this.dataSource.group(); return e ? e.length : 0 }, _tmpl: function (e, t) { var r, a, o, s, l = this, d = D({}, b.Template, l.options.templateSettings), c = l.columns.length, u = { storage: {}, count: 0 }
65, p = l._hasDetails(), f = [], h = l._groups(); if (!e) { for (e = "<tr", t && f.push("k-alt"), p && f.push("k-master-row"), f.length && (e += ' class="' + f.join(" ") + '"'), c && (e += " " + b.attr("uid") + '="#=' + b.expr("uid", d.paramName) + '#"'), e += " role='row'>", h > 0 && (e += n(h)), p && (e += '<td class="k-hierarchy-cell"><a class="k-icon k-plus" href="\\#" tabindex="-1"></a></td>'), r = 0; c > r; r++) o = l.columns[r], a = o.template, s = typeof a, e += "<td" + i(o.attributes) + " role='gridcell'>", e += l._cellTmpl(o, u), e += "</td>"; e += "</tr>" } return e = b.template(e, d), u.count > 0 ? N(e, u.storage) : e }, _headerCellText: function (e) { var t = this, n = D({}, b.Template, t.options.templateSettings), i = e.headerTemplate, r = typeof i, a = e.title || e.field || ""; return r === ht ? a = b.template(i, n)({}) : r === gt && (a = i), a }, _cellTmpl: function (e, t) { var n, i, r = this, a = D({}, b.Template, r.options.templateSettings), o = e.template, s = a.paramName, l = e.field, d = "", c = e.format, u = typeof o, p = e.values; if (e.command) { if (I(e.command)) { for (n = 0, i = e.command.length; i > n; n++) d += r._createButton(e.command[n]); return d.replace(_t, "\\#") } return r._createButton(e.command).replace(_t, "\\#") } return u === ht ? (t.storage["tmpl" + t.count] = o, d += "#=this.tmpl" + t.count + "(" + s + ")#", t.count++) : u === gt ? d += o : p && p.length && F(p[0]) && "value" in p[0] && l ? (d += "#var v =" + b.stringify(f(p)) + "#", d += "#var f = v[", a.useWithBlock || (d += s + "."), d += l + "]#", d += "${f != null ? f : ''}") : (d += e.encoded ? "#:" : "#=", c && (d += 'kendo.format("' + c.replace(vt, "\\$1") + '",'), l ? (l = b.expr(l, s), d += l + "==null?'':" + l) : d += "''", c && (d += ")"), d += "#"), d }, _templates: function () { var t = this, n = t.options, i = t.dataSource, r = i.group(), a = t.footer || t.wrapper.find(".k-grid-footer"), o = i.aggregate(); t.rowTemplate = t._tmpl(n.rowTemplate), t.altRowTemplate = t._tmpl(n.altRowTemplate || n.rowTemplate, !0), t._hasDetails() && (t.detailTemplate = t._detailTmpl(n.detailTemplate || "")), (t._group && !z(o) || !z(o) && !a.length || A(t.columns, function (e) { return e.footerTemplate }).length) && (t.footerTemplate = t._footerTmpl(o, "footerTemplate", "k-footer-template")), r && A(t.columns, function (e) { return e.groupFooterTemplate }).length && (o = e.map(r, function (e) { return e.aggregates }), t.groupFooterTemplate = t._footerTmpl(o, "groupFooterTemplate", "k-group-footer")) }, _footerTmpl: function (e, t, r) { var a, s, l, d, c, u = this, p = D({}, b.Template, u.options.templateSettings), f = p.paramName, h = "", g = u.columns, m = {}, v = 0, _ = {}, k = u._groups(), w = o(e); for (h += '<tr class="' + r + '">', k > 0 && (h += n(k)), u._hasDetails() && (h += '<td class="k-hierarchy-cell"> </td>'), a = 0, s = u.columns.length; s > a; a++) c = g[a], l = c[t], d = typeof l, h += "<td" + i(c.footerAttributes) + ">", l ? (d !== ht && (_ = w[c.field] ? D({}, p, { paramName: f + "." + c.field }) : {}, l = b.template(l, _)), m["tmpl" + v] = l, h += "#=this.tmpl" + v + "(" + f + ")#", v++) : h += " ", h += "</td>"; return h += "</tr>", h = b.template(h, p), v > 0 ? N(h, m) : h }, _detailTmpl: function (e) { var t = this, i = "", r = D({}, b.Template, t.options.templateSettings), a = r.paramName, o = {}, s = 0, l = t._groups(), c = d(t.columns).length, u = typeof e; return i += '<tr class="k-detail-row">', l > 0 && (i += n(l)), i += '<td class="k-hierarchy-cell"></td><td class="k-detail-cell"' + (c ? ' colspan="' + c + '"' : "") + ">", u === ht ? (o["tmpl" + s] = e, i += "#=this.tmpl" + s + "(" + a + ")#", s++) : i += e, i += "</td></tr>", i = b.template(i, r), s > 0 ? N(i, o) : i }, _hasDetails: function () { var e = this; return null !== e.options.detailTemplate || (e._events[J] || []).length }, _details: function () { var t = this; t.table.on(ut + $, ".k-hierarchy-cell .k-plus, .k-hierarchy-cell .k-minus", function (n) { var i, r, a = e(this), o = a.hasClass("k-plus"), s = a.closest("tr.k-master-row"), l = t.detailTemplate, d = t._hasDetail
65s(); return a.toggleClass("k-plus", !o).toggleClass("k-minus", o), d && !s.next().hasClass("k-detail-row") && (r = t.dataItem(s), e(l(r)).addClass(s.hasClass("k-alt") ? "k-alt" : "").insertAfter(s), t.trigger(J, { masterRow: s, detailRow: s.next(), data: r, detailCell: s.next().find(".k-detail-cell") })), i = s.next(), t.trigger(o ? at : ot, { masterRow: s, detailRow: i }), i.toggle(o), t._current && t._current.attr("aria-expanded", o), n.preventDefault(), !1 }) }, dataItem: function (t) { return this._data[this.tbody.find("> tr:not(.k-grouping-row,.k-detail-row,.k-group-footer)").index(e(t))] }, expandRow: function (t) { e(t).find("> td .k-plus, > td .k-i-expand").click() }, collapseRow: function (t) { e(t).find("> td .k-minus, > td .k-i-collapse").click() }, _thead: function () { var n, r, a, o, s, l = this, d = l.columns, c = l._hasDetails() && d.length, u = "", p = l.table.find(">thead"); if (p.length || (p = e("<thead/>").insertBefore(l.tbody)), a = l.element.find("tr:has(th):first"), a.length || (a = p.children().first(), a.length || (a = e("<tr/>"))), a.children().length) c && !a.find(".k-hierarchy-cell")[0] && a.prepend('<th class="k-hierarchy-cell"> </th>'); else { for (c && (u += '<th class="k-hierarchy-cell"> </th>'), n = 0, r = d.length; r > n; n++) s = d[n], o = l._headerCellText(s), s.command ? u += "<th" + i(s.headerAttributes) + ">" + o + "</th>" : (u += "<th role='columnheader' " + b.attr("field") + "='" + (s.field || "") + "' ", s.title && (u += b.attr("title") + '="' + s.title.replace(/'/g, "'") + '" '), s.groupable !== t && (u += b.attr("groupable") + "='" + s.groupable + "' "), s.aggregates && (u += b.attr("aggregates") + "='" + s.aggregates + "'"), u += i(s.headerAttributes), u += ">" + o + "</th>"); a.html(u) } a.find("th").addClass("k-header"), l.options.scrollable || p.addClass("k-grid-header"), a.find("script").remove().end().appendTo(p), l.thead && l._destroyColumnAttachments(), l.thead = p, l._sortable(), l._filterable(), l._scrollable(), l._updateCols(), l._resizable(), l._draggable(), l._reorderable(), l.groupable && l._attachGroupable(), l._columnMenu() }, _updateCols: function () { var e = this; e._appendCols(e.thead.parent().add(e.table)) }, _appendCols: function (e) { var t = this; p(e, d(t.columns), t._hasDetails(), t._groups()) }, _autoColumns: function (e) { if (e && e.toJSON) { var t, n = this; e = e.toJSON(); for (t in e) n.columns.push({ field: t }); n._thead(), n._templates() } }, _rowsHtml: function (e) { var t, n, i = this, r = "", a = i.rowTemplate, o = i.altRowTemplate; for (t = 0, n = e.length; n > t; t++) r += t % 2 ? o(e[t]) : a(e[t]), i._data.push(e[t]); return r }, _groupRowHtml: function (e, t, i) { var r, a, o = this, s = "", l = e.field, d = A(o.columns, function (e) { return e.field == l })[0] || {}, c = d.groupHeaderTemplate, u = (d.title || l) + ": " + h(e.value, d.format, d.values), p = D({}, { field: e.field, value: e.value }, e.aggregates[e.field]), f = o._groupAggregatesDefaultObject || {}, g = e.items; if (c && (u = typeof c === ht ? c(p) : b.template(c)(p)), s += '<tr class="k-grouping-row">' + n(i) + '<td colspan="' + t + '" aria-expanded="true">' + '<p class="k-reset">' + '<a class="k-icon k-i-collapse" href="#" tabindex="-1"></a>' + u + "</p></td></tr>", e.hasSubgroups) for (r = 0, a = g.length; a > r; r++) s += o._groupRowHtml(g[r], t - 1, i + 1); else s += o._rowsHtml(g); return o.groupFooterTemplate && (s += o.groupFooterTemplate(D(f, e.aggregates))), s }, collapseGroup: function (n) { n = e(n).find(".k-icon").addClass("k-i-expand").removeClass("k-i-collapse").end(); var i, r, a = n.find(".k-group-cell").length, o = 1; n.find("td:first").attr("aria-expanded", !1), n.nextAll("tr").each(function () { return r = e(this), i = r.find(".k-group-cell").length, r.hasClass("k-grouping-row") ? o++ : r.hasClass("k-group-footer") && o--, a >= i || r.hasClass("k-group-footer") && 0 > o ? !1 : (r.hide(), t) }) }, expandGroup: function (n) { n = e(n).find(".k-icon").addClass("k-i-collapse").removeClass("k-i-expand").end(); var i, r, a = this, o = n.find(".k-group-cell").length, s = 1; n.find("td:first").attr("aria-expanded", !0), n.nextAll("tr").each(function () { return i = e(this), r = i.find(".k-group-cell").length, o >= r ? !1 : (r != o + 1 || i.hasClass("k-detail-row") || (i.show(), i.hasClass("k-grouping-row") && i.find(".k-icon").hasClass("k-i-collapse") && a.exp
65andGroup(i), i.hasClass("k-master-row") && i.find(".k-icon").hasClass("k-minus") && i.next().show()), i.hasClass("k-grouping-row") && s++, i.hasClass("k-group-footer") && (1 == s ? i.show() : s--), t) }) }, _updateHeader: function (t) { var n = this, i = n.thead.find("th.k-group-cell"), r = i.length; t > r ? e(Array(t - r + 1).join('<th class="k-group-cell k-header"> </th>')).prependTo(n.thead.find("tr")) : r > t && (r -= t, e(A(i, function (e, t) { return r > t })).remove()) }, _firstDataItem: function (e, t) { return e && t && (e = e.hasSubgroups ? this._firstDataItem(e.items[0], t) : e.items[0]), e }, hideColumn: function (t) { var n, i, r, a, o, s, l, u, p, f = this, h = 0, m = f.footer || f.wrapper.find(".k-grid-footer"), v = f.columns; if (t = "number" == typeof t ? v[t] : A(v, function (e) { return e.field === t })[0], t && !t.hidden) { for (p = H(t, d(v)), t.hidden = !0, t.attributes = c(t.attributes), t.footerAttributes = c(t.footerAttributes), t.headerAttributes = c(t.headerAttributes), f._templates(), f._updateCols(), g(f.thead.find(">tr")[0].cells, p, !1), m[0] && (f._appendCols(m.find("table:first")), g(m.find(".k-footer-template")[0].cells, p, !1)), n = f.tbody.children(), o = 0, u = n.length; u > o; o += 1) i = n.eq(o), i.is(".k-grouping-row,.k-detail-row") ? (r = i.children(":not(.k-group-cell):first,.k-detail-cell").last(), r.attr("colspan", parseInt(r.attr("colspan"), 10) - 1)) : (i.hasClass("k-grid-edit-row") && (r = i.children(".k-edit-container")[0]) && (r = e(r), r.attr("colspan", parseInt(r.attr("colspan"), 10) - 1), r.find("col").eq(p).remove(), i = r.find("tr:first")), g(i[0].cells, p, !1)); for (s = f.thead.prev().find("col"), o = 0, u = s.length; u > o; o += 1) { if (l = s[o].style.width, !l || -1 != l.indexOf("%")) { h = 0; break } h += parseInt(l, 10) } a = e(">.k-grid-header table:first,>.k-grid-footer table:first", f.wrapper).add(f.table), f._footerWidth = null, h && (a.width(h), f._footerWidth = h), xt.msie && 8 == xt.version && (a.css("display", "inline-table"), setTimeout(function () { a.css("display", "table") }, 1)), f.trigger(tt, { column: t }) } }, showColumn: function (t) { var n, i, r, a, o, s, l, c, f, h, m = this, v = m.columns, _ = m.footer || m.wrapper.find(".k-grid-footer"); if (t = "number" == typeof t ? v[t] : A(v, function (e) { return e.field === t })[0], t && t.hidden) { for (h = H(t, v), t.hidden = !1, t.attributes = u(t.attributes), t.footerAttributes = u(t.footerAttributes), t.headerAttributes = u(t.headerAttributes), m._templates(), m._updateCols(), g(m.thead.find(">tr")[0].cells, h, !0), _[0] && (m._appendCols(_.find("table:first")), g(_.find(".k-footer-template")[0].cells, h, !0)), n = m.tbody.children(), i = 0, r = n.length; r > i; i += 1) a = n.eq(i), a.is(".k-grouping-row,.k-detail-row") ? (o = a.children(":not(.k-group-cell):first,.k-detail-cell").last(), o.attr("colspan", parseInt(o.attr("colspan"), 10) + 1)) : (a.hasClass("k-grid-edit-row") && (o = a.children(".k-edit-container")[0]) && (o = e(o), o.attr("colspan", parseInt(o.attr("colspan"), 10) + 1), p(o.find(">form>table"), d(v), !1, 0), a = o.find("tr:first")), g(a[0].cells, h, !0)); if (s = e(">.k-grid-header table:first,>.k-grid-footer table:first", m.wrapper).add(m.table), t.width) { for (l = 0, f = m.thead.prev().find("col"), i = 0, r = f.length; r > i; i += 1) { if (c = f[i].style.width, c.indexOf("%") > -1) { l = 0; break } l += parseInt(c, 10) }
65 m._footerWidth = null, l && (s.width(l), m._footerWidth = l) } else s.width(""); m.trigger(nt, { column: t }) } }, _progress: function (e) { var t = this, n = t.element.is("table") ? t.element.parent() : t.content && t.content.length ? t.content : t.element; b.ui.progress(n, e) }, refresh: function (t) { var n, i, r, a, s, l, c = this, u = "", p = c.dataSource.view(), f = c.options.navigatable, h = e(c.current()), g = !1, m = (c.dataSource.group() || []).length, _ = m + d(c.columns).length; if (!(t && "itemchange" === t.action && c.editable || (t = t || {}, c.trigger("dataBinding", { action: t.action || "rebind", index: t.index, items: t.items })))) { if (l = C(), f && (c.table[0] === l || e.contains(c.table[0], l) || c._editContainer && c._editContainer.data("kendoWindow")) && (g = h.is("th"), s = 0, g && (s = c.thead.find("th:not(.k-group-cell)").index(h))), c._destroyEditable(), c._progress(!1), c._data = [], c.columns.length || (c._autoColumns(c._firstDataItem(p[0], m)), _ = m + c.columns.length), c._group = m > 0 || c._group, c._group && (c._templates(), c._updateCols(), c._updateHeader(m), c._group = m > 0), m > 0) for (c.detailTemplate && _++, c.groupFooterTemplate && (c._groupAggregatesDefaultObject = o(c.dataSource.aggregate())), i = 0, n = p.length; n > i; i++) u += c._groupRowHtml(p[i], _, 0); else u += c._rowsHtml(p); x ? c.tbody[0].innerHTML = u : (a = document.createElement("div"), a.innerHTML = "<table><tbody>" + u + "</tbody></table>", r = a.firstChild.firstChild, c.table[0].replaceChild(r, c.tbody[0]), c.tbody = e(r)), c._footer(), c._setContentHeight(), s >= 0 && (c._removeCurrent(), g ? c.current(c.thead.find("th:not(.k-group-cell)").eq(s)) : c.current(c.items().eq(s).children().filter(B).first()), c._current && v(c._current.closest("table")[0], !0)), c.trigger(rt) } } 66 }); k.plugin(Ft), k.plugin(Tt) 67} (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = "change", r = "cancel", a = "dataBound", o = "dataBinding", s = n.ui.Widget, l = n.keys, d = ">*", c = "progress", u = "error", p = "k-state-focused", f = "k-state-selected", h = "k-edit-item", g = "string", m = "edit", v = "remove", _ = "save", b = "click", k = ".kendoListView", w = e.proxy, y = n._activeElement, x = n.ui.progress, C = n.data.DataSource, T = s.extend({ init: function (t, i) { var r = this; i = e.isArray(i) ? { dataSource: i} : i, s.fn.init.call(r, t, i), i = r.options, r.wrapper = t = r.element, t[0].id && (r._itemId = t[0].id + "_lv_active"), r._element(), r._dataSource(), r.template = n.template(i.template || ""), r.altTemplate = n.template(i.altTemplate || i.template), r.editTemplate = n.template(i.editTemplate || ""), r._navigatable(), r._selectable(), r._pageable(), r._crudHandlers(), r.options.autoBind && r.dataSource.fetch(), n.notify(r) }, events: [i, r, o, a, m, v, _], options: { name: "ListView", autoBind: !0, selectable: !1, navigatable: !1, template: "", altTemplate: "", editTemplate: "" }, _item: function (e) { return this.element.children()[e]() }, items: function () { return this.element.children() }, setDataSource: function (e) { this.options.dataSource = e, this._dataSource(), this.options.autoBind && e.fetch() }, _unbindDataSource: function () { var e = this; e.dataSource.unbind(i, e._refreshHandler).unbind(c, e._progressHandler).unbind(u, e._errorHandler) }, _dataSource: function () { var e = this; e.dataSource && e._refreshHandler ? e._unbindDataSource() : (e._refreshHandler = w(e.refresh, e), e._progressHandler = w(e._progress, e), e._errorHandler = w(e._error, e)), e.dataSource = C.create(e.options.dataSource).bind(i, e._refreshHandler).bind(c, e._progressHandler).bind(u, e._errorHandler) }, _progress: function () { x(this.element, !0) }, _error: function () { x(this.element, !1) }, _element: function () { this.element.addClass("k-widget k-listview").attr("role", "listbox") }, refresh: function (i) { var r, s, l, d, c, u = this, p = u.dataSource.view(), f = "", h = u.template, g = u.altTemplate, m = y(); if (i && "itemchange" === i.action) return u.editable || (r = i.items[0], d = e.inArray(r, p), d >= 0 && (u.items().eq(d).replaceWith(h(r)), l = u.items().eq(d), l.attr(n.attr("uid"), r.uid), u.trigger("itemChange", { item: l, data: r }))), t; if (i = i || {}, !u.trigger(o, { action: i.action || "rebind", items: i.items, index: i.index })) { for (u._destroyEditable(), d = 0, c = p.length; c > d; d++) f += d % 2 ? g(p[d]) : h(p[d]); for (u.element.html(f), s = u.items(), d = 0, c = p.length; c > d; d++) s.eq(d).attr(n.attr("uid"), p[d].uid).attr("role", "option").attr("aria-selected", "false"); u.element[0] === m && u.options.navigatable && u.current(s.eq(0)), u.trigger(a) } }, _pageable: function () { var t, i, r = this, a = r.options.pageable; e.isPlainObject(a) && (i = a.pagerId, t = e.extend({}, a, { dataSource: r.dataSource, pagerId: null }), r.pager = new n.ui.Pager(e("#" + i), t)) }, _selectable: function () { var e, r, a = this, o = a.options.selectable, s = a.options.navigatable; o && (e = typeof o === g && o.toLowerCase().indexOf("multiple") > -1, e && a.element.attr("aria-multiselectable", !0), a.selectable = new n.ui.Selectable(a.element, { aria: !0, multiple: e, filter: d, change: function () { a.trigger(i) } }
67), s && a.element.on("keydown" + k, function (n) { if (n.keyCode === l.SPACEBAR) { if (r = a.current(), n.target == n.currentTarget && n.preventDefault(), e) if (n.ctrlKey) { if (r && r.hasClass(f)) return r.removeClass(f), t } else a.selectable.clear(); else a.selectable.clear(); a.selectable.value(r) } })) }, current: function (e) { var n = this, i = n.element, r = n._current, a = n._itemId; return e === t ? r : (r && (r[0].id === a && r.removeAttr("id"), r.removeClass(p), i.removeAttr("aria-activedescendant")), e && e[0] && (a = e[0].id || a, n._scrollTo(e[0]), i.attr("aria-activedescendant", a), e.addClass(p).attr("id", a)), n._current = e, t) }, _scrollTo: function (t) { var n, i, r = this, a = !1, o = "scroll"; "auto" == r.wrapper.css("overflow") || r.wrapper.css("overflow") == o ? n = r.wrapper[0] : (n = window, a = !0), i = function (i, r) { var s = a ? e(t).offset()[i.toLowerCase()] : t["offset" + i], l = t["client" + r], d = e(n)[o + i](), c = e(n)[r.toLowerCase()](); s + l > d + c ? e(n)[o + i](s + l - c) : d > s && e(n)[o + i](s) }, i("Top", "Height"), i("Left", "Width") }, _navigatable: function () { var t = this, i = t.options.navigatable, r = t.element, a = function (n) { t.current(e(n.currentTarget)), e(n.target).is(":button,a,:input,a>.k-icon,textarea") || r.focus() }; i && (t._tabindex(), r.on("focus" + k, function () { var e = t._current; e && e.is(":visible") || (e = t._item("first")), t.current(e) }).on("focusout" + k, function () { t._current && t._current.removeClass(p) }).on("keydown" + k, function (i) { var a, o, s = i.keyCode, d = t.current(), c = e(i.target), u = !c.is(":button,textarea,a,a>.t-icon,input"), p = c.is(":text"), f = n.preventDefault, g = r.find("." + h), m = y(); if (!(!u && !p && l.ESC != s || p && l.ESC != s && l.ENTER != s)) if (l.UP === s || l.LEFT === s) d && (d = d.prev()), t.current(d && d[0] ? d : t._item("last")), f(i); else if (l.DOWN === s || l.RIGHT === s) d && (d = d.next()), t.current(d && d[0] ? d : t._item("first")), f(i); else if (l.PAGEUP === s) t.current(null), t.dataSource.page(t.dataSource.page() - 1), f(i); else if (l.PAGEDOWN === s) t.current(null), t.dataSource.page(t.dataSource.page() + 1), f(i); else if (l.HOME === s) t.current(t._item("first")), f(i); else if (l.END === s) t.current(t._item("last")), f(i); else if (l.ENTER === s) 0 !== g.length && (u || p) ? (a = t.items().index(g), m && m.blur(), t.save(), o = function () { t.element.trigger("focus"), t.current(t.items().eq(a)) }, t.one("dataBound", o)) : "" !== t.options.editTemplate && t.edit(d); else if (l.ESC === s) { if (g = r.find("." + h), 0 === g.length) return; a = t.items().index(g), t.cancel(), t.element.trigger("focus"), t.current(t.items().eq(a)) } }), r.on("mousedown" + k + " touchstart" + k, d, w(a, t))) }, clearSelection: function () { var e = this; e.selectable.clear(), e.trigger(i) }, select: function (n) { var i = this, r = i.selectable; return n = e(n), n.length ? (r.options.multiple || (r.clear(), n = n.first()), r.value(n), t) : r.value() }, _destroyEditable: function () { var e = this; e.editable && (e.editable.destroy(), delete e.editable) }, _modelFromElement: function (e) { var t = e.attr(n.attr("uid")); return this.dataSource.getByUid(t) }, _closeEditable: function (e) { var t, i, r = this, a = r.editable, o = r.template, s = !0; return a && (e && (s = a.end()), s && (a.element.index() % 2 && (o = r.altTemplate), t = r._modelFromElement(a.element), r._destroyEditable(), i = a.element.index(), a.element.replaceWith(o(t)), r.items().eq(i).attr(n.attr("uid"), t.uid))), s }, edit: function (e) { var t, i = this, r = i._modelFromElement(e), a = e.index(); i.cancel(), e.replaceWith(i.editTemplate(r)), t = i.items().eq(a).addClass(h).attr(n.attr("uid"), r.uid), i.editable = t.kendoEditable({ model: r, clearContainer: !1, errorTemplate: !1 }).data("kendoEditable"), i.trigger(m, { model: r, item: t }) }, save: function () { var e, t = this, n = t.editable; n && (n = n.element, e = t._modelFromElement(n), !t.trigger(_, { model: e, item: n }) && t._closeEditable(!0) && t.dataSource.sync()) }, remove: function (e) { var t = this, n = t.dataSource, i = t._modelFromElement(e); t.trigger(v, { model: i, item: e }) || (e.hide(), n.remove(i), n.sync()) }, add: function () { var e = this, t = e.dataSource, n = t.indexOf((t.view() || [])[0]); 0 > n && (n = 0), e.cancel(), t.insert(n, {}), e.edit(e.element.children().first()) }, cancel: function () { var e, t, n = this, i = n.dataSource; n.editable && (e = n.editable.element, t = n._modelFromElement(e), n.trigger(r, { model: t, container: e }) || (i.cancelChanges(t), n._closeEditable(!1))) }, _crudHandlers: function () { var t = this, i = b + k; t.element.on(i, ".k-edit-button", function (i) { var r = e(this).closest("[" + n.attr("uid") + "]"); t.edit(r), i.preventDefault() }), t.element.on(i, ".k-delete-button", function (i) { var r = e(this).closest("[" + n.attr("uid") + "]"); t.remove(r), i.preventDefault() }), t.element.on(i, ".k-update-button", function (e) { t.save(), e.preventDefault() }), t.element.on(i, ".k-cancel-button", function (e) { t.cancel(), e.preventDefault() }) }, destroy: function () { var e = this; s.fn.destroy.call(e), e._unbindDataSource(), e._destroyEditable(), e.element.off(k), e.pager && e.pager.destroy(), e.selectable && e.selectable.destroy(), n.destroy(e.element) } }); n.ui.plugin(T) } (window.kendo.jQuery), function (e, t) { 68 function n(e, t, n) { var i, r; e.on("dragenter" + x, function () { t(), r = new Date, i || (i = setInterval(function () { var e = new Date - r; e > 100 && (n(), clearInterval(i), i = null) }, 100)) }).on("dragover" + x, function () { r = new Date }) } function i(e, t) { var n = e[t]; return p(n) ? n.field || t : n } function r(e, n) { return e !== t && e.match(/\/$/) || (e = (e || "") + "/"), e + n } function a(e) { if (!e) return ""; var t = " bytes"; return e >= 1073741824 ? (t = " GB", e /= 1073741824) : e >= 1048576 ? (t = " MB", e /= 1048576) : e >= 1024 && (t = " KB", e /= 1024), Math.round(100 * e) / 100 + t } var o, s, l, d, c = window.kendo, u = c.ui.Widget, p = e.isPlainObject, f = e.proxy, h = e.extend, g = c.support.placeholder, m = c.support.browser, v = e.isFunction, _ = /(^\/|\/$)/g, b = "change", k = "apply", w = "error", y = "click", x = ".kendoImageBrowser", C = ".kendoBreadcrumbs", T = ".kendoSearchBox", S = "name", F = "size", D = "type", E = { field: D, dir: "asc" }, A = c.template('<li data-#=ns#value="#=value#" class="k-item">${text}</li>'), I = c.template('<li class="k-tile-empty"><strong>${text}</strong></li>'), H = '<div class="k-widget k-toolbar k-floatwrap"><div class="k-toolbar-wrap">#if(showUpload) { # <div class="k-widget k-upload"><div class="k-button k-button-icontext k-button-bare k-upload-button"><span class="k-icon k-add"></span>#=messages.uploadFile#<input type="file" name="file" /></div></div>#}##if(showCreate) {#<button type="button" class="k-button k-button-icon k-button-bare"><span class="k-icon k-addfolder"></span></button>#}##if(showDelete) {#<button type="button" class="k-button k-button-icon k-button-bare k-state-disabled"><span class="k-icon k-delete"></span></button> #}#</div><div class="k-tiles-arrange">#=messages.orderBy#: <a href="\\#" class="k-link"><span>#=messages.orderByName#</span><span class="k-icon k-i-arrow-s"></span></a></div></div>'; h(!0, c.data, { schemas: { imagebrowser: { data: function (e) { return e.items || e || [] }, model: { id: "name", fields: { name: "name", size: "size", type: "type"}}}} }), h(!0, c.data, { transports: { imagebrowser: c.data.RemoteTransport.extend({ init: function (t) { c.data.RemoteTransport.fn.init.call(this, e.extend(!0, {}, this.options, t)) }, _call: function (t, n) { n.data = e.extend({}, n.data, { path: this.options.path() }), v(this.options[t]) ? this.options[t].call(this, n) : c.data.RemoteTransport.fn[t].call(this, n) }, read: function (e) { this._call("read", e) }, create: function (e) { this._call("create", e) }, destroy: function (e) { this._call("destroy", e) }, update: function () { }, options: { read: { type: "POST" }, update: { type: "POST" }, create: { type: "POST" }, destroy: { type: "POST"}} })} }), o = m.msie && 8 > m.version ? function (e) { return e.offsetTop } : function (t) { return t.offsetTop - e(t).height() }, s = u.extend({ init: function (e, t) { var n = this; t = t || {}, u.fn.init.call(n, e, t), n.element.addClass("k-imagebrowser"), n.element.on(y + x, ".k-toolbar button:not(.k-state-disabled):has(.k-delete)", f(n._deleteClick, n)).on(y + x, ".k-toolbar button:not(.k-state-disabled):has(.k-addfolder)", f(n._addClick, n)).on("keydown" + x, "li.k-state-selected input", f(n._directoryKeyDown, n)).on("blur" + x, "li.k-state-selected input", f(n._directoryBlur, n)), n._dataSource(), n.refresh(), n.path(n.options.path) }, options: { name: "ImageBrowser", 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}
68" 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: "*.png,*.gif,*.jpg,*.jpeg" }, events: [w, b, k], destroy: function () { var e = this; u.fn.destroy.call(e), e.dataSource.unbind(w, e._errorHandler), e.element.add(e.list).add(e.toolbar).off(x), e.arrangeByPopup && e.arrangeByPopup.destroy(), c.destroy(e.element) }, value: function () { var e, n = this, i = n._selectedItem(), a = n.options.transport.imageUrl; return i && "f" === i.get(n._getFieldName(D)) ? (e = r(n.path(), i.get(n._getFieldName(S))).replace(_, ""), a && (e = v(a) ? a(e) : c.format(a, encodeURIComponent(e))), e) : t }, _selectedItem: function () { var e = this.listView, n = e.select(); return n.length ? this.dataSource.getByUid(n.attr(c.attr("uid"))) : t }, _toolbar: function () { 69 var t, n, i = this, r = c.template(H), a = i.options.messages, o = [{ text: a.orderByName, value: "name", ns: c.ns }, { text: a.orderBySize, value: "size", ns: c.ns}]; i.toolbar = e(r({ messages: a, showUpload: i.options.transport.uploadUrl, showCreate: i.options.transport.create, showDelete: i.options.transport.destroy })).appendTo(i.element).find(".k-upload input").kendoUpload({ multiple: !1, localization: { dropFilesHere: a.dropFilesHere }, async: { saveUrl: i.options.transport.uploadUrl, autoUpload: !0 }, upload: f(i._fileUpload, i), error: function (e) { 70 i._error({ xhr: e.XMLHttpRequest, status: "error" }) 71 } 72 }).end(), i.upload = i.toolbar.find(".k-upload input").data("kendoUpload"), t = i.toolbar.find(".k-tiles-arrange a"), i.arrangeByPopup = n = e("<ul>" + c.render(A, o) + "</ul>").kendoPopup({ anchor: t }).on(y + x, "li", function () { var t = e(this), r = t.attr(c.attr("value")); i.toolbar.find(".k-tiles-arrange a span:first").html(t.text()), n.close(), i.orderBy(r) }).data("kendoPopup"), t.on(y + x, function (e) { e.preventDefault(), n.toggle() }), i._attachDropzoneEvents() 73 }, _attachDropzoneEvents: function () { var t = this; t.options.transport.uploadUrl && (n(e(document.documentElement), e.proxy(t._dropEnter, t), e.proxy(t._dropLeave, t)), t._scrollHandler = f(t._positionDropzone, t)) }, _dropEnter: function () { this._positionDropzone(), e(document).on("scroll" + x, this._scrollHandler) }, _dropLeave: function () { this._removeDropzone(), e(document).off("scroll" + x, this._scrollHandler) }, _positionDropzone: function () { var e = this, t = e.element, n = t.offset(); e.toolbar.find(".k-dropzone").addClass("k-imagebrowser-dropzone").offset(n).css({ width: t[0].clientWidth, height: t[0].clientHeight, lineHeight: t[0].clientHeight + "px" }) }, _removeDropzone: function () { this.toolbar.find(".k-dropzone").removeClass("k-imagebrowser-dropzone").css({ width: "", height: "", lineHeight: "", top: "", left: "" }) }, _deleteClick: function () { var e = this, t = e.listView.select(), n = c.format(e.options.messages.deleteFile, t.find("strong").text()); t.length && e._showMessage(n, "confirm") && e.listView.remove(t) }, _addClick: function () { this.createDirectory() }, _fileUpload: function (e) { var t, n = this, i = n.options, r = i.fileTypes, a = RegExp(("(" + r.split(",").join(")|(") + ")").replace(/\*\./g, ".*."), "i"), o = e.files[0].name, s = n._getFieldName(S), l = n._getFieldName(F); a.test(o) ? (e.data = { path: n.path() }, t = n._createFile(o), t ? n.upload.one("success", function (e) { t.set(s, e.response[s]), t.set(l, e.response[l]), n._tiles = n.listView.items().filter("[" + c.attr("type") + "=f]"), n._scroll() }) : e.preventDefault()) : (e.preventDefault(), n._showMessage(c.format(i.messages.invalidFileType, o, r))) }, _findFile: function (e) { var t, n, i, r = this.dataSource.data(), a = this._getFieldName(D), o = this._getFieldName(S); for (e = e.toLowerCase(), t = 0, i = r.length; i > t; t++) if ("f" === r[t].get(a) && r[t].get(o).toLowerCase() === e) { n = r[t]; break } return n }, _createFile: function (e) { var t, n, i = this, r = 0, a = {}, o = i._getFieldName(D), s = i.dataSource.view(), l = i._findFile(e); if (l && !i._showMessage(c.format(i.options.messages.overwriteFile, e), "confirm")) return null; if (l) return l; for (t = 0, n = s.length; n > t; t++) if ("f" === s[t].get(o)) { r = t; break } return a[o] = "f", a[i._getFieldName(S)] = e, a[i._getFieldName(F)] = 0, i.dataSource.insert(++r, a) }, createDirectory: function () { var e, t, n = this, i = 0, r = n._getFieldName(D), a = n._getFieldName(S), o = n.dataSource.data(), s = n._nameDirectory(), l = new n.dataSource.reader.model; for (e = 0, t = o.length; t > e; e++) "d" === o[e].get(r) && (i = e); l.set(r, "d"), l.set(a, s), n.listView.one("dataBound", function () { var e = n.listView.items().filter("[" + c.attr("uid") + "=" + l.uid + "]"), t = e.find("input"); e.length && this.edit(e), this.element.scrollTop(e.attr("offsetTop") - this.element[0].offsetHeight), setTimeout(function () { t.select() }) }).one("save", function (e) { var t = e.model.get(a); t ? e.model.set(a, n._nameExists(t, l.uid) ? n._nameDirectory() : t) : e.model.set(a, s) }), n.dataSource.insert(++i, l) }, _directoryKeyDown: function (e) { 13 == e.keyCode && e.currentTarget.blur() }, _directoryBlur: function () { this.listView.save() }, _nameExists: function (e, t) { var n, i, r = this.dataSource.data(), a = this._getFieldName(D), o = this._getFieldName(S); for (n = 0, i = r.length; i > n; n++) if ("d" === r[n].get(a) && r[n].get(o).toLowerCase() === e.toLowerCase() && r[n].uid !== t) return !0; return !1 }, _nameDirectory: function () { var t, n, i, r = "New folder", a = this.dataSource.data(), o = [], s = this._getFieldName(D), l = this._getFieldName(S); for (n = 0, i = a.length; i > n; n++) "d" === a[n].get(s) && a[n].get(l).toLowerCase().indexOf(r.toLowerCase()) > -1 && o.push(a[n].get(l)); if (e.inArray(r, o) > -1) { n = 2; do t = r + " (" + n + ")", n++; while (e.inArray(t, o) > -1); r = t } return r }, orderBy: function (e) { this.dataSource.sort([{ field: this._getFieldName(D), dir: "asc" }, { field: this._getFieldName(e), dir: "asc"}]) }, search: function (e) { this.dataSource.filter({ field: this._getFieldName(S), operator: "contains", value: e }) }, _content: function () { var t = this; t.list = e('<ul class="k-reset k-floats k-tiles" />').appendTo(t.element).on("scroll" + x, f(t._scroll, t)).on("dblclick" + x, "li", f(t._dblClick, t)), t.listView = new c.ui.ListView(t.list, { dataSource: t.dataSource, template: t._itemTmpl(), editTemplate: t._editTmpl(), selectable: !0, autoBind: !1, dataBinding: function (e) { t.toolbar.find(".k-delete").parent().addClass("k-state-disabled"), ("remove" === e.action || "sync" === e.action) && e.preventDefault() }, dataBound: function () { t.dataSource.view().length ? (t._tiles = this.items().filter("[" + c.attr("type") + "=f]"), t._scroll()) : this.wrapper.append(I({ text: t.options.messages.emptyFolder })) }, change: f(t._listViewChange, t) }) }, _dblClick: function (t) { var n, i = this, a = e(t.currentTarget); a.filter("[" + c.attr("type") + "=d]").length ? (n = i.dataSource.getByUid(a.attr(c.attr("uid"))), n && (i.path(r(i.path(), n.get(i._getFieldName(S)))), i.breadcrumbs.value(i.path()))) : a.filter("[" + c.attr("type") + "=f]").length && i.trigger(k) }, _listViewChange: function () { var e = this._selectedItem(); e && (this.toolbar.find(".k-delete").parent().removeClass("k-state-disabled"), "f" === e.get(this._getFieldName(D)) && this.trigger(b)) }, _dataSource: function () { var e, t = this, n = t.options, r = n.transport, a = h({}, E), o = { field: S, dir: "asc" }, s = { type: r.type || "imagebrowser", sort: [a, o] }; p(r) && (r.path = f(t.path, t), s.transport = r), p(n.schema) ? (s.schema = n.schema, p(n.schema.model) && n.schema.model.fields && (a.field = i(n.schema.model.fields, D), o.field = i(n.schema.model.fields, S))) : r.type && p(c.data.schemas[r.type]) && (e = c.data.schemas[r.type], p(e.model) && e.model.fields && (a.field = i(e.model.fields, D), o.field = i(e.model.fields, S))), t.dataSource && t._errorHandler ? t.dataSource.unbind(w, t._errorHandler) : t._errorHandler = f(t._error, t), t.dataSource = c.data.DataSource.create(s).bind(w, t._errorHandler) }, _navigation: function () { var t = this, n = e('<div class="k-floatwrap"><input/><input/></div>').appendTo(this.element); t.breadcrumbs = n.find("input:first").kendoBreadcrumbs({ value: t.options.path, change: function () { t.path(this.value()) } }).data("kendoBreadcrumbs"), t.searchBox = n.parent().find("input:last").kendoSearchBox({ label: t.options.messages.search, change: function () { t.search(this.value()) } }).data("kendoSearchBox") }, _error: function (e) { var t, n = this; n.trigger(w, 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.")) }, _showMessage: function (e, t) { return window[t || "alert"](e) }, refresh: function () { var e = this; e._navigation(), e._toolbar(), e._content() }, _loadImage: function (t) { var n = this, i = e(t), r = n.dataSource.getByUid(i.attr(c.attr("uid"))), a = r.get(n._getFieldName(S)), o = n.options.transport.thumbnailUrl, s = e("<img />", { alt: a }).hide().on("load" + x, function () { e(this).prev().remove().end().addClass("k-image").fadeIn() }), l = "?";
73 i.find(".k-loading").after(s), v(o) ? o = o(n.path(), encodeURIComponent(a)) : (o.indexOf("?") >= 0 && (l = "&"), o = o + l + "path=" + n.path() + encodeURIComponent(a)), s.attr("src", o), t.loaded = !0 }, _scroll: function () { var e = this; e.options.transport && e.options.transport.thumbnailUrl && (clearTimeout(e._timeout), e._timeout = setTimeout(function () { var n = e.list.outerHeight(), i = e.list.scrollTop(), r = i + n; e._tiles.each(function () { var n = o(this), a = n + this.offsetHeight; return (n >= i && r > n || a >= i && r > a) && e._loadImage(this), n > r ? !1 : t }), e._tiles = e._tiles.filter(function () { return !this.loaded }) }, 250)) }, _editTmpl: function () { var e = this, t = '<li class="k-tile k-state-selected" ' + c.attr("uid") + '="#=uid#" '; return t += c.attr("type") + '="${' + e._getFieldName(D) + '}">', t += "#if(" + e._getFieldName(D) + ' == "d") { #', t += '<div class="k-thumb"><span class="k-icon k-folder"></span></div>', t += "#}else{#", t += '<div class="k-thumb"><span class="k-icon k-loading"></span></div>', t += "#}#", t += "#if(" + e._getFieldName(D) + ' == "d") { #', t += '<input class="k-input" ' + c.attr("bind") + '="value:' + e._getFieldName(S) + '"/>', t += "#}#", t += "</li>", f(c.template(t), { sizeFormatter: a }) }, _itemTmpl: function () { var e = this, t = '<li class="k-tile" ' + c.attr("uid") + '="#=uid#" '; return t += c.attr("type") + '="${' + e._getFieldName(D) + '}">', t += "#if(" + e._getFieldName(D) + ' == "d") { #', t += '<div class="k-thumb"><span class="k-icon k-folder"></span></div>', t += "#}else{#", t += e.options.transport && e.options.transport.thumbnailUrl ? '<div class="k-thumb"><span class="k-icon k-loading"></span></div>' : '<div class="k-thumb"><span class="k-icon k-file"></span></div>', t += "#}#", t += "<strong>${" + e._getFieldName(S) + "}</strong>", t += "#if(" + e._getFieldName(D) + ' == "f") { # <span class="k-filesize">${this.sizeFormatter(' + e._getFieldName(F) + ")}</span> #}#", t += "</li>", f(c.template(t), { sizeFormatter: a }) }, _getFieldName: function (e) { return i(this.dataSource.reader.model.fields, e) }, path: function (e) { var n = this, i = n._path || ""; return e !== t ? (n._path = e.replace(_, "") + "/", n.dataSource.read({ path: n._path }), t) : (i && (i = i.replace(_, "")), "/" === i || "" === i ? "" : i + "/") } 74 }), l = u.extend({ init: function (e, t) { var n = this; t = t || {}, u.fn.init.call(n, e, t), g && n.element.attr("placeholder", n.options.label), n._wrapper(), n.element.on("keydown" + T, f(n._keydown, n)).on("change" + T, f(n._updateValue, n)), n.wrapper.on(y + T, "a", f(n._click, n)), g || n.element.on("focus" + T, f(n._focus, n)).on("blur" + T, f(n._blur, n)) }, options: { name: "SearchBox", label: "Search", value: "" }, events: [b], destroy: function () { var e = this; e.wrapper.add(e.element).add(e.label).off(T), u.fn.destroy.call(e) }, _keydown: function (e) { 13 === e.keyCode && this._updateValue() }, _click: function (e) { e.preventDefault(), this._updateValue() }, _updateValue: function () { var e = this, t = e.element.val(); t !== e.value() && (e.value(t), e.trigger(b)) }, _blur: function () { this._updateValue(), this._toggleLabel() }, _toggleLabel: function () { g || 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 k-textbox"), n.length || (n = t.wrap(e('<div class="k-widget k-search-wrap k-textbox"/>')).parent(), g || e('<label style="display:block">' + this.options.label + "</label>").insertBefore(t), e('<a href="#" class="k-icon k-i-search k-search"/>').appendTo(n)), this.wrapper = n, this.label = n.find(">label") }, value: function (e) { var n = this; return e !== t ? (n.options.value = e, n.element.val(e), n._toggleLabel(), t) : n.options.value } }), d = u.extend({ init: function (e, t) { var n = this; t = t || {}, u.fn.init.call(n, e, t), n._wrapper(), n.wrapper.on("focus" + C, "input", f(n._focus, n)).on("blur" + C, "input", f(n._blur, n)).on("keydown" + C, "input", f(n._keydown, n)).on(y + C, "a.k-i-arrow-n:first", f(n._rootClick, n)).on(y + C, "a:not(.k-i-arrow-n)", f(n._click, n)), n.value(n.options.value) }, options: { name: "Breadcrumbs", gap: 50 }, events: [b], destroy: function () { var e = this; u.fn.destroy.call(e), e.wrapper.add(e.wrapper.find("input")).add(e.wrapper.find("a")).off(C) }, _update: function (e) { e = "/" === (e || "").charAt(0) ? e : "/" + (e || ""), e !== this.value() && (this.value(e), this.trigger(b)) }, _click: function (t) { t.preventDefault(), this._update(this._path(e(t.target).prevAll("a:not(.k-i-arrow-n)").andSelf())) }, _rootClick: function (e) { e.preventDefault(), this._update("") }, _focus: function () { var e = this, t = e.element; e.overlay.hide(), e.element.val(e.value()), setTimeout(function () { t.select() }) }, _blur: function () { if (!this.overlay.is(":visible")) { var e = this, t = e.element, n = t.val().replace(/\/{2,}/g, "/"); e.overlay.show(), t.val(""), e._update(n) } }, _keydown: function (e) { var t = this; 13 === e.keyCode && (t._blur(), setTimeout(function () { t.overlay.find("a:first").focus() })) }, _wrapper: function () { var t, n = this.element, i = n.parents(".k-breadcrumbs"); n[0].style.width = "", n.addClass("k-input"), i.length || (i = n.wrap(e('<
74div class="k-widget k-breadcrumbs k-header k-state-default"/>')).parent()), t = i.find(".k-breadcrumbs-wrap"), t.length || (t = e('<div class="k-breadcrumbs-wrap"/>').appendTo(i)), this.wrapper = i, this.overlay = t }, refresh: function () { var n, i, r, a, o = "", s = this.value(); for (s !== t && s.match(/^\//) || (s = "/" + (s || "")), n = s.split("/"), r = 0, a = n.length; a > r; r++) i = n[r], i && (o || (o += '<a href="#" class="k-icon k-i-arrow-n">root</a>'), o += '<a class="k-link" href="#">' + n[r] + "</a>", o += '<span class="k-icon k-i-arrow-e">></span>'); this.overlay.empty().append(e(o)), this._adjustSectionWidth() }, _adjustSectionWidth: function () { var t, n = this, i = n.wrapper, r = i.width() - n.options.gap, a = n.overlay.find("a"); a.each(function (n) { t = e(this), t.parent().width() > r && (n == a.length - 1 ? t.width(r) : t.prev().andSelf().hide()) }) }, value: function (e) { return e !== t ? (this._value = e.replace(/\/{2,}/g, "/"), this.refresh(), t) : this._value }, _path: function (t) { return "/" + e.map(t, function (t) { return e(t).text() }).join("/") } }), c.ui.plugin(s), c.ui.plugin(d), c.ui.plugin(l) 75} (window.kendo.jQuery), function (e, t) { var n, i, r = window.kendo, a = r.Class, o = r.ui.Widget, s = r.support.mobileOS, l = r.support.browser, d = e.extend, c = r.deepExtend, u = ".kendoEditor", p = r.keys, f = a.extend({ init: function (e) { this.options = e }, getHtml: function () { var e = this.options; return r.template(e.template)({ cssClass: e.cssClass, tooltip: e.title, initialValue: e.initialValue }) } }), h = { select: function (e) { e.trigger("select", {}) }, editorWrapperTemplate: '<table cellspacing="4" cellpadding="0" class="k-widget k-editor k-header" role="presentation"><tbody><tr role="presentation"><td class="k-editor-toolbar-wrap" role="presentation"><ul class="k-editor-toolbar" role="toolbar"></ul></td></tr><tr><td class="k-editable-area"></td></tr></tbody></table>', buttonTemplate: '<li class="k-editor-button" role="presentation"><a href="" role="button" class="k-tool-icon #= cssClass #" unselectable="on" title="#= tooltip #">#= tooltip #</a></li>', colorPickerTemplate: '<li class="k-editor-colorpicker" role="presentation"><div class="k-colorpicker #= cssClass #"></div></li>', comboBoxTemplate: '<li class="k-editor-combobox"><select title="#= tooltip #" class="#= cssClass #"></select></li>', dropDownListTemplate: '<li class="k-editor-selectbox"><select title="#= tooltip #" class="#= cssClass #"></select></li>', separatorTemplate: '<li class="k-separator"></li>', focusable: ".k-colorpicker,a.k-tool-icon:not(.k-state-disabled),.k-selectbox, .k-combobox .k-input", wrapTextarea: function (t) { var n = t[0].style.width, i = t[0].style.height, r = h.editorWrapperTemplate, a = e(r).insertBefore(t).width(n).height(i), o = a.find(".k-editable-area"); return t.appendTo(o).addClass("k-content k-raw-content").hide(), t.closest(".k-editor") }, renderTools: function (t, n) { var i, a, o, s, l, c = {}, u = t._nativeTools, p = e(t.element).closest(".k-editor").find(".k-editor-toolbar"); if (n) for (o = 0; n.length > o; o++) i = n[o], l = null, e.isPlainObject(i) ? i.name && t.tools[i.name] ? (e.extend(t.tools[i.name].options, i), c[i.name] = t.tools[i.name], l = c[i.name].options) : (l = d({ cssClass: "k-i-custom", type: "button", tooltip: "" }, i), l.name && (l.cssClass = "k-" + ("custom" == l.name ? "i-custom" : l.name)), l.template || "button" == l.type && (l.template = h.buttonTemplate)) : t.tools[i] && (c[i] = t.tools[i], l = c[i].options), l && (s = l.template, s && (s.getHtml ? s = s.getHtml() : (e.isFunction(s) || (s = r.template(s)), s = s(l)), 0 !== s.indexOf("<li") && (s = "<li class='k-editor-template'>" + s + "</li>"), a = e(s).appendTo(p), "button" == l.type && l.exec && a.find(".k-tool-icon").click(e.proxy(l.exec, t.element[0])))); for (o = 0; u.length > o; o++) c[u[o]] || (c[u[o]] = t.tools[u[o]]); t.options.tools = c }, decorateStyleToolItems: function (t) { var n, i = t.data.closest(".k-editor").find(".k-style").data("kendoSelectBox"); i && (n = i.dataSource.view(), i.list.find(".k-item").each(function (i, a) { var o = e(a), s = o.text(), l = r.ui.editor.Dom.inlineStyle(t.data.data("kendoEditor").document, "span", { className: n[i].value }); o.html('<span unselectable="on" style="display:block;' + l + '">' + s + "</span>") })) }, createContentElement: function (t, n) { var i, a, o, s = r.support.isRtl(t) ? "direction:rtl;" : ""; return t.hide(), i = e("<iframe />", { src: 'javascript:""', frameBorder: "0" }).css("display", "").addClass("k-content").insertBefore(t)[0], a = i.contentWindow || i, n.length > 0 && e(i).one("load", t, h.decorateStyleToolItems), o = a.document || i.contentDocument, o.open(), o.write("<!DOCTYPE html><html><head><meta charset='utf-8' /><style>html,body{padding:0;margin:0;background:#fff;height:100%;min-height:100%;}body{font-size:13px;font-family:Verdana,Geneva,sans-serif;padding-top:1px;margin-top:-1px;word-wrap: break-word;-webkit-nbsp-mode: space;-webkit-line-break: after-white-space;" + s + "}" + "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;padding:0 .2em}.k-marker{display:none;}.k-paste-container,.Apple-style-span{position:absolute;
75left:-10000px;width:1px;height:1px;overflow:hidden}" + "ul,ol{padding-left:2.5em}" + "a{color:#00a}" + "code{font-size:1.23em}" + "</style>" + e.map(n, function (e) { return "<link rel='stylesheet' href='" + e + "'>" }).join("") + "</head><body autocorrect='off' contenteditable='true'></body></html>"), o.close(), a }, initializeContentElement: function (n) { var i = !0; n.window = h.createContentElement(e(n.textarea), n.options.stylesheets), n.document = n.window.contentDocument || n.window.document, n.body = n.document.body, e(n.document).on("keydown" + u, function (e) { var a, o, s, l, d; return e.keyCode === p.F10 ? (setTimeout(function () { var e = "tabIndex", t = n.wrapper, i = t.attr(e); t.attr(e, i || 0).focus().find("li:has(" + m + ")").first().focus(), i || 0 === i || t.removeAttr(e) }, 100), e.preventDefault(), t) : (e.keyCode === p.BACKSPACE && (a = n.getRange(), s = r.support.browser.msie ? "" : '<br _moz_dirty="" />', l = r.ui.editor.Dom, a.deleteContents(), o = a.commonAncestorContainer, "p" === l.name(o) && "" === o.innerHTML && (o.innerHTML = s, a.setStart(o, 0), a.collapse(!0), n.selectRange(a))), (d = n.keyboard.toolFromShortcut(n.options.tools, e)) ? (e.preventDefault(), /undo|redo/.test(d) || n.keyboard.endTyping(!0), n.trigger("keydown", e), n.exec(d), !1) : (n.keyboard.isTypingKey(e) && n.pendingFormats.hasPending() && (i ? i = !1 : (a = n.getRange(), n.pendingFormats.apply(a), n.selectRange(a))), n.keyboard.clearTimeout(), n.keyboard.keydown(e), t)) }).on("keyup" + u, function (t) { var r, a = [8, 9, 33, 34, 35, 36, 37, 38, 39, 40, 40, 45, 46]; (e.inArray(t.keyCode, a) > -1 || 65 == t.keyCode && t.ctrlKey && !t.altKey && !t.shiftKey) && (n.pendingFormats.clear(), g(n)), n.keyboard.isTypingKey(t) ? n.pendingFormats.hasPending() && (r = n.getRange(), n.pendingFormats.apply(r), n.selectRange(r)) : i = !0, n.keyboard.keyup(t) }).on("mousedown" + u, function (t) { n.pendingFormats.clear(); var i = e(t.target); !l.gecko && 2 == t.which && i.is("a[href]") && window.open(i.attr("href"), "_new") }).on("mouseup" + u, function () { g(n) }).on("click" + u, function (e) { var t, i = r.ui.editor.Dom; "img" === i.name(e.target) && (t = n.createRange(), t.selectNode(e.target), n.selectRange(t)) }), e(n.window).on("blur" + u, function () { var e = n.textarea.value, t = n.encodedValue(); n.update(), t != e && n.trigger("change") }), e(n.body).on("cut" + u + " paste" + u, function (e) { n.clipboard["on" + e.type](e) }) }, formatByName: function (t, n) { for (var i = 0; n.length > i; i++) if (e.inArray(t, n[i].tags) >= 0) return n[i] }, registerTool: function (e, t) { var n = t.options; n && n.template && (n.template.options.cssClass = "k-" + e), y.defaultTools[e] = t }, registerFormat: function (e, t) { y.fn.options.formats[e] = t }, createDialog: function (t, n, i) { var a = r.support.isRtl(n.wrapper), o = e(t).appendTo(document.body).kendoWindow(i); return a && o.closest(".k-window").addClass("k-rtl"), o } }, g = h.select, m = h.focusable, v = h.wrapTextarea, _ = h.renderTools, b = h.initializeContentElement, k = { 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", insertHtml: "Insert HTML", viewHtml: "View HTML", fontName: "Select font family", fontNameInherit: "(inherited font)", fontSize: "Select font size", fontSizeInherit: "(inherited size)", formatBlock: "Format", foreColor: "Color", backColor: "Background color", style: "Styles", emptyFolder: "Empty Folder", uploadFile: "Upload", 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", linkWebAddress: "Web address", linkText: "Text", linkToolTip: "ToolTip", linkOpenInNewWindow: "Open link in new window", dialogUpdate: "Update", dialogInsert: "Insert", dialogButtonSeparator: "or", dialogCancel: "Cancel" }, w = !s || s.ios && s.flatVersion >= 500 || !s.ios && document.documentElement.contentEditable !== t, y = o.extend({ init: function (t, n) { function i(t) { var n = e.grep(t.className.split(" "), function (e) { return !/^k-(widget|tool-icon|state-hover|header|combobox|dropdown|selectbox|colorpicker)$/i.test(e) }); return n[0] ? n[0].substring(n[0].lastIndexOf("-") + 1) : "custom" } function a(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 + ")" }
75 var s, l, d, f, h, g, y, x, C; if (w) { d = this, f = r.ui.editor, o.fn.init.call(d, t, n), d.tools = c({}, r.ui.Editor.defaultTools), d.options = c({}, d.options, n), t = e(t), t.closest("form").on("submit" + u, function () { d.update() }); for (h in d.tools) d.tools[h].name = h.toLowerCase(); d.textarea = t.attr("autocomplete", "off")[0], s = d.wrapper = v(t), d.textarea.id && s.find(".k-editor-toolbar").attr("aria-controls", d.textarea.id), _(d, d.options.tools), b(d), d.keyboard = new f.Keyboard([new f.TypingHandler(d), new f.SystemHandler(d)]), d.clipboard = new f.Clipboard(this), d.pendingFormats = new f.PendingFormats(this), d.undoRedoStack = new f.UndoRedoStack, l = n && n.value ? n.value : t.val().replace(/[\r\n\v\f\t ]+/gi, " "), d.value(l), g = ".k-editor-toolbar > li > *, .k-editor-toolbar > li select", y = ".k-editor-button .k-tool-icon", x = y + ":not(.k-state-disabled)", C = y + ".k-state-disabled", s.find(".k-combobox .k-input").keydown(function (t) { var n = e(this).closest(".k-combobox").data("kendoComboBox"), i = t.keyCode; i == p.RIGHT || i == p.LEFT ? n.close() : i == p.DOWN && (n.dropDown.isOpened() || (t.stopImmediatePropagation(), n.open())) }), s.on("mouseenter" + u, x, function () { e(this).addClass("k-state-hover") }).on("mouseleave" + u, x, function () { e(this).removeClass("k-state-hover") }).on("mousedown" + u, y, !1).on("keydown" + u, m, function (t) { var n, i = e(this).closest("li"), r = "li:has(" + m + ")", a = t.keyCode; if (a == p.RIGHT) n = i.nextAll(r).first().find(m); else if (a == p.LEFT) n = i.prevAll(r).first().find(m); else if (a == p.ESC) n = d; else if (a == p.TAB && !t.ctrlKey && !t.altKey) if (t.shiftKey) { if (n = i.prevAll(r).first().find(m), !n.length) return; t.preventDefault() } else t.preventDefault(), n = i.nextAll(r).first().find(m), n.length || (n = d); n && n.focus() }).on("click" + u, x, function (t) { t.preventDefault(), t.stopPropagation(), e(this).removeClass("k-state-hover"), d.exec(i(this)) }).on("click" + u, C, function (e) { e.preventDefault() }).find(g).each(function () { var t, n = i(this), r = d.options, o = r.tools[n], s = r.messages[n], l = e(this); o && (("fontSize" == n || "fontName" == n) && (t = r.messages[n + "Inherit"] || k[n + "Inherit"], l.find("input").val(t).end().find("span.k-input").text(t).end()), o.initialize(l, { title: a(s, o), editor: d })) }), d.bind("select", function () { var t = d.getRange(), n = f.RangeUtils.textNodes(t); n.length || (n = [t.startContainer]), s.find(g).each(function () { var t = d.options.tools[i(this)]; t && t.update(e(this), n, d.pendingFormats) }) }), d._DOMNodeInsertedHandler = function (e) { d._DOMNodeInserted(e) }, d._endTypingHandler = function () { d._endTyping() }, e(document).on("DOMNodeInserted", d._DOMNodeInsertedHandler).on("mousedown", d._endTypingHandler), r.notify(d) } }, _endTyping: function () { var e = this; try { e.keyboard.isTypingInProgress() && e.keyboard.endTyping(!0), e.selectionRestorePoint || (e.selectionRestorePoint = new r.ui.editor.RestorePoint(e.getRange())) } catch (t) { } }, _DOMNodeInserted: function (t) { var n = this.wrapper; (e.contains(t.target, n[0]) || n[0] == t.target) && this.refresh() }, refresh: function () { var e = this; e.textarea.value = e.value(), e.wrapper.find("iframe").remove(), b(e), e.value(e.textarea.value) }, events: ["select", "change", "execute", "error", "paste", "keydown", "keyup"], options: { name: "Editor", messages: k, formats: {}, encoded: !0, stylesheets: [], dialogOptions: { modal: !0, resizable: !1, draggable: !0, animation: !1 }, 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: ["bold", "italic", "underline", "strikethrough", "fontName", "fontSize", "foreColor", "backColor", "justifyLeft", "justifyCenter", "justifyRight", "justifyFull", "insertUnorderedList", "insertOrderedList", "indent", "outdent", "formatBlock", "createLink", "unlink", "insertImage"] }, destroy: function () { var t = this; o.fn.destroy.call(t), e(t.window).add(t.document).add(t.wrapper).add(t.element.closest("form")).off(u), e(document).off("DOMNodeInserted", t._DOMNodeInsertedHandler).off("mousedown", t._endTypingHandler), r.destroy(t.wrapper) }, _nativeTools: ["insertLineBreak", "insertParagraph", "redo", "undo", "insertHtml"], tools: {}, value: function (n) { var i, a, o, s = this.body, d = r.ui.editor.Dom, c = r.ui.editor.Serializer.domToXhtml(s); return n === t ? c : (n != c && (this.pendingFormats.clear(), i = /onerror\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/i, n = (n || "").replace(/<!\[CDATA\[(.*)?\]\]>/g, "<!--[CDATA[$1]]-->").replace(/<script([^>]*)>(.*)?<\/script>/gi, "<telerik:script $1>$2</telerik:script>").replace(/<img([^>]*)>/gi, function (e) { return e.replace(i, "") }).replace(/(<\/?img[^>]*>)[\r\n\v\f\t ]+/gi, "$1"), l.msie || (n = n.replace(/<p([^>]*)>(\s*)?<\/p>/gi, '<p $1><br _moz_dirty="" /></p>')), l.msie && 9 > l.version ? (n = "<br/>" + n, a = "originalsrc", o = "originalhref", n = n.replace(/href\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/, o + '="$1"'), n = n.replace(/src\s*=\s*(?:'|")?([^'">\s]*)(?:'|")?/, a + '="$1"'), s.innerHTML = n, d.remove(s.firstChild), e(s).find("telerik\\:script,script,link,img,a").each(function () { var e = this; e[o] && (e.setAttribute("href", e[o]), e.removeAttribute(o)), e[a] && (e.setAttribute("src", e[a
75]), e.removeAttribute(a)) })) : (s.innerHTML = n, l.msie && (d.normalize(s), setTimeout(function () { var e, t, n, i = s.getElementsByTagName("ol"); for (e = 0; i.length > e; e++) t = i[e], n = t.getAttribute("start"), t.setAttribute("start", 1), n ? t.setAttribute("start", n) : t.removeAttribute(n) }, 1))), this.selectionRestorePoint = null, this.update()), t) }, focus: function () { this.window.focus() }, update: function (e) { this.textarea.value = e || this.options.encoded ? this.encodedValue() : this.value() }, encodedValue: function () { return r.ui.editor.Dom.encode(this.value()) }, createRange: function (e) { return r.ui.editor.RangeUtils.createRange(e || this.document) }, getSelection: function () { return r.ui.editor.SelectionUtils.selectionFromDocument(this.document) }, selectRange: function (e) { this.focus(); var t = this.getSelection(); t.removeAllRanges(), t.addRange(e) }, getRange: function () { var e = this.getSelection(), t = 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 }, selectedHtml: function () { return r.ui.editor.Serializer.domToXhtml(this.getRange().cloneContents()) }, paste: function (e) { this.clipboard.paste(e) }, exec: function (n, i) { var r, a, o, s, l, c = this, u = ""; n = n.toLowerCase(), c.keyboard.isTypingInProgress() || (c.focus(), r = c.getRange(), a = c.document.body); for (o in c.options.tools) if (o.toLowerCase() == n) { u = c.options.tools[o]; break } if (u) { if (r = c.getRange(), !/undo|redo/i.test(n) && u.willDelayExecution(r)) return s = e.extend({}, u), e.extend(s.options, { params: i }), c.pendingFormats.toggle(s), g(c), t; if (l = u.command ? u.command(d({ range: r }, i)) : null, c.trigger("execute", { name: n, command: l }), /undo|redo/i.test(n)) c.undoRedoStack[n](); else if (l && (l.managesUndoRedo || c.undoRedoStack.push(l), l.editor = c, l.exec(), l.async)) return l.change = e.proxy(function () { g(c) }, c), t; g(c) } } }); y.defaultTools = { undo: { options: { key: "Z", ctrl: !0} }, redo: { options: { key: "Y", ctrl: !0}} }, r.ui.plugin(y), n = a.extend({ init: function (e) { this.options = e }, initialize: function (e, t) { e.attr({ unselectable: "on", title: t.title }) }, command: function (e) { return new this.options.command(e) }, update: function () { }, willDelayExecution: function () { return !1 } }), n.exec = function (e, t, n) { e.exec(t, { value: n }) }, i = n.extend({ init: function (e) { n.fn.init.call(this, e) }, command: function (e) { var t = this; return new r.ui.editor.FormatCommand(d(e, { formatter: t.options.formatter })) }, update: function (e, t, n) { var i = n.isPending(this.name), r = this.options.finder.isFormatted(t), a = i ? !r : r; e.toggleClass("k-state-active", a), e.attr("aria-pressed", a) } }), h.registerTool("separator", new n({ template: new f({ template: h.separatorTemplate }) })), d(r.ui, { editor: { ToolTemplate: f, EditorUtils: h, Tool: n, FormatTool: i} }) } (window.jQuery), function (e) { 76 function t(e) { var t, n, i = {}; for (t = 0, n = e.length; n > t; t++) i[e[t]] = !0; return i } var n, i, r, a, o, s, l, d, c, u, p = window.kendo, f = e.map, h = e.extend, g = p.support.browser, m = "style", v = "float", _ = "cssFloat", b = "styleFloat", k = "class", w = "k-marker", y = t("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed".split(",")), x = "div,p,h1,h2,h3,h4,h5,h6,address,applet,blockquote,button,center,dd,dir,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,pre,script,table,tbody,td,tfoot,th,thead,tr,ul".split(","), C = t(x), T = "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".split(","), S = t(T), F = t("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected".split(",")), D = function (e) { 1 == e.nodeType && e.normalize() }; g.msie && g.version >= 8 && (D = function (e) { if (1 == e.nodeType && e.firstChild) for (var t = e.firstChild, n = t; ; ) { if (n = n.nextSibling, !n) break; 3 == n.nodeType && 3 == t.nodeType && (n.nodeValue = t.nodeValue + n.nodeValue, u.remove(t)), t = n } }), i = /^\s+$/, r = /rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i, a = /&/g, o = /</g, s = />/g, l = /\u00a0/g, d = /\ufeff/g, c = "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(","), u = { findNodeIndex: function (e) { for (var t = 0; ; ) { if (e = e.previousSibling, !e) break; t++ } return t }, isDataNode: function (e) { return e && null !== e.nodeValue && null !== e.data }, isAncestorOf: function (t, n) { try { return !u.isDataNode(t) && (e.contains(t, u.isDataNode(n) ? n.parentNode : n) || n.parentNode == t) } catch (i) { return !1 } }, isAncestorOrSelf: function (e, t) { return u.isAncestorOf(e, t) || e == t }, findClosestAncestor: function (e, t) { if (u.isAncestorOf(e, t)) for (; t && t.parentNode != e; ) t = t.parentNode; return t }, getNodeLength: function (e) { return u.isDataNode(e) ? e.length : e.childNodes.length }, splitDataNode: function (e, t) { for (var n = e.cloneNode(!1), i = "", r = e; r.nextSibling && 3 == r.nextSibling.nodeType && r.nextSibling.nodeValue; ) i += r.nextSibling.nodeValue, r = r.nextSibling; e.deleteData(t, e.length), n.deleteData(0, t), n.nodeValue += i, u.insertAfter(n, e) }, attrEquals: function (t, n) { 77 var i, r; for (i in n) if (r = t[i], i == v && (r = t[e.support.cssFloat ? _ : b]), "object" == typeof r) { 78 if (!u.attrEquals(r, n[i])) return !1 79 } else if (r != n[i]) return !1; return !0 80 }, blockParentOrBody: function (e) { return u.parentOfType(e, x) || e.ownerDocument.body }, blockParents: function (t) { var n, i, r, a = []; for (n = 0, i = t.length; i > n; n++) r = u.parentOfType(t[n], u.blockElements), r && 0 > e.inArray(r, a) && a.push(r); return a }, windowFromDocument: function (e) { return e.defaultView || e.parentWindow }, normalize: D, blockElements: x, inlineElements: T, empty: y, fillAttrs: F, toHex: function (e) { var t = r.exec(e); return t ? "#" + f(t.slice(1), function (e) { return e = parseInt(e, 10).toString(16), e.length > 1 ? e : "0" + e }).join("") : e }, encode: function (e) { return e.replace(a, "&").replace(o, "<").replace(s, ">").replace(l, " ") }
80, name: function (e) { return e.nodeName.toLowerCase() }, significantChildNodes: function (t) { return e.grep(t.childNodes, function (e) { return 3 != e.nodeType || !u.isWhitespace(e) }) }, lastTextNode: function (e) { var t, n = null; if (3 == e.nodeType) return e; for (t = e.lastChild; t; t = t.previousSibling) if (n = u.lastTextNode(t)) return n; return n }, is: function (e, t) { return u.name(e) == t }, isMarker: function (e) { return e.className == w }, isWhitespace: function (e) { return i.test(e.nodeValue) }, isBlock: function (e) { return C[u.name(e)] }, isEmpty: function (e) { return y[u.name(e)] }, isInline: function (e) { return S[u.name(e)] }, scrollContainer: function (e) { var t = u.windowFromDocument(e), n = (t.contentWindow || t).document || t.ownerDocument || t; return n = p.support.browser.webkit || "BackCompat" == n.compatMode ? n.body : n.documentElement }, scrollTo: function (t) { var n, i, r = e(u.isDataNode(t) ? t.parentNode : t), a = u.windowFromDocument(t.ownerDocument), o = a.innerHeight, s = u.scrollContainer(t.ownerDocument); "br" == u.name(r[0]) && (r = r.parent()), n = r.offset().top, i = r[0].offsetHeight, i + n > s.scrollTop + o && (s.scrollTop = i + n - o) }, persistScrollTop: function (e) { n = u.scrollContainer(e).scrollTop }, restoreScrollTop: function (e) { u.scrollContainer(e).scrollTop = n }, 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.removeChild(e) }, trim: function (e) { var t, n; for (t = e.childNodes.length - 1; t >= 0; t--) n = e.childNodes[t], u.isDataNode(n) ? (n.nodeValue.replace(d, "").length || u.remove(n), u.isWhitespace(n) && u.insertBefore(n, e)) : n.className != w && (u.trim(n), n.childNodes.length || u.isEmpty(n) || u.remove(n)); return e }, parentOfType: function (e, t) { do e = e.parentNode; while (e && !u.ofType(e, t)); return e }, ofType: function (t, n) { return e.inArray(u.name(t), n) >= 0 }, changeTag: function (e, t) { var n, i, r, a, o, s = u.create(e.ownerDocument, t), l = e.attributes; for (n = 0, i = l.length; i > n; n++) o = l[n], o.specified && (r = o.nodeName, a = o.nodeValue, r == k ? s.className = a : r == m ? s.style.cssText = e.style.cssText : s.setAttribute(r, a)); for (; e.firstChild; ) s.appendChild(e.firstChild); return u.insertBefore(s, e), u.remove(e), s }, wrap: function (e, t) { return u.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) }, create: function (e, t, n) { return u.attr(e.createElement(t), n) }, attr: function (e, t) { t = h({}, t), t && m in t && (u.style(e, t.style), delete t.style); for (var n in t) null === t[n] && (e.removeAttribute(n), delete t[n]); return h(e, t) }, style: function (t, n) { e(t).css(n || {}) }, unstyle: function (t, n) { for (var i in n) i == v && (i = e.support.cssFloat ? _ : b), t.style[i] = ""; "" === t.style.cssText && t.removeAttribute(m) }, inlineStyle: function (t, n, i) { var r, a = e(u.create(t, n, i)); return t.body.appendChild(a[0]), r = f(c, function (e) { return g.msie && "line-height" == e && "1px" == a.css(e) ? "line-height:1.5" : e + ":" + a.css(e) }).join(";"), a.remove(), r }, removeClass: function (t, n) { var i, r, a = " " + t.className + " ", o = n.split(" "); for (i = 0, r = o.length; r > i; i++) a = a.replace(" " + o[i] + " ", " "); a = e.trim(a), a.length ? t.className = a : t.removeAttribute(k) }, commonAncestor: function () { var e, t, n, i, r, a = arguments.length, o = [], s = 1 / 0, l = null; if (!a) return null; if (1 == a) return arguments[0]; for (e = 0; a > e; e++) { for (t = [], n = arguments[e]; n; ) t.push(n), n = n.parentNode; o.push(t.reverse()), s = Math.min(s, t.length) } if (1 == a) return o[0][0]; for (e = 0; s > e; e++) { for (i = o[0][e], r = 1; a > r; r++) if (i != o[r][e]) return l; l = i } return l } 81 }, p.ui.editor.Dom = u 82} (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = n.ui.editor, r = i.Dom, a = e.extend, o = "xx-small,x-small,small,medium,large,x-large,xx-large".split(","), s = /"/g, l = /<br[^>]*>/i, d = /<p><\/p>/i, c = /([\w|\-]+)\s*:\s*([^;]+);?/i, u = { domToXhtml: function (n) { function i(n) { var i, a, o, l, d, u, f, h, g, m, v, _, b, k, w, y, x = [], C = n.attributes, T = e.trim; for (r.is(n, "img") && (l = n.style.width, d = n.style.height, u = e(n), l && (u.attr("width", parseInt(l, 10)), r.unstyle(n, { width: t })), d && (u.attr("height", parseInt(d, 10)), r.unstyle(n, { height: t }))), a = 0, o = C.length; o > a; a++) i = C[a], f = i.nodeName, (i.specified || "value" == f && !n.value || "type" == f && "text" == i.nodeValue) && 0 > f.indexOf("_moz") && "complete" != f && "altHtml" != f && x.push(i);
82 if (x.length) for (x.sort(function (e, t) { return e.nodeName > t.nodeName ? 1 : e.nodeName < t.nodeName ? -1 : 0 }), a = 0, o = x.length; o > a; a++) { if (i = x[a], h = i.nodeName, g = i.nodeValue, p.push(" "), p.push(h), p.push('="'), "style" == h) { for (m = T(g || n.style.cssText).split(";"), v = 0, _ = m.length; _ > v; v++) if (b = m[v], b.length) { if (k = c.exec(b), w = T(k[1].toLowerCase()), y = T(k[2]), "font-size-adjust" == w || "font-stretch" == w) continue; w.indexOf("color") >= 0 ? y = r.toHex(y) : w.indexOf("font") >= 0 ? y = y.replace(s, "'") : /\burl\(/g.test(y) && (y = y.replace(s, "")), p.push(w), p.push(":"), p.push(y), p.push(";") } } else "src" == h || "href" == h ? p.push(n.getAttribute(h, 2)) : p.push(r.fillAttrs[h] ? h : g); p.push('"') } } function a(e, t) { for (var n = e.firstChild; n; n = n.nextSibling) u(n, t) } function u(n, o) { var s, l, d, c, u, h = n.nodeType; if (1 == h) { if (s = r.name(n), !s || (n.attributes._moz_dirty || n.attributes._moz_editor_bogus_node) && r.is(n, "br") || "k-marker" == n.className) return; if (l = f[s]) return l.start(n), a(n), l.end(n), t; p.push("<"), p.push(s), i(n), r.empty[s] ? p.push(" />") : (p.push(">"), a(n, o || r.is(n, "pre")), p.push("</"), p.push(s), p.push(">")) } else 3 == h ? (c = n.nodeValue, !o && e.support.leadingWhitespace && (d = n.parentNode, u = n.previousSibling, u || (u = (r.isInline(d) ? d : n).previousSibling), (!u || "" === u.innerHTML || r.isBlock(u)) && (c = c.replace(/^[\r\n\v\f\t ]+/, "")), c = c.replace(/ +/, " ")), p.push(r.encode(c))) : 4 == h ? (p.push("<![CDATA["), p.push(n.data), p.push("]]>")) : 8 == h && (0 > n.data.indexOf("[CDATA[") ? (p.push("<!--"), p.push(n.data), p.push("-->")) : (p.push("<!"), p.push(n.data), p.push(">"))) } var p = [], f = { "telerik:script": { start: function (e) { p.push("<script"), i(e), p.push(">") }, end: function () { p.push("</script>") } }, b: { start: function () { p.push("<strong>") }, end: function () { p.push("</strong>") } }, i: { start: function () { p.push("<em>") }, end: function () { p.push("</em>") } }, u: { start: function () { p.push('<span style="text-decoration:underline;">') }, end: function () { p.push("</span>") } }, iframe: { start: function (e) { p.push("<iframe"), i(e), p.push(">") }, end: function () { p.push("</iframe>") } }, font: { start: function (e) { var t, n, i; p.push('<span style="'), t = e.getAttribute("color"), n = o[e.getAttribute("size")], i = e.getAttribute("face"), t && (p.push("color:"), p.push(r.toHex(t)), p.push(";")), i && (p.push("font-face:"), p.push(i), p.push(";")), n && (p.push("font-size:"), p.push(n), p.push(";")), p.push('">') }, end: function () { p.push("</span>") } } }; return 1 == n.childNodes.length && 3 == n.firstChild.nodeType ? r.encode(n.firstChild.nodeValue.replace(/[\r\n\v\f\t ]+/, " ")) : (a(n), p = p.join(""), "" === p.replace(l, "").replace(d, "") ? "" : p) } }; a(i, { Serializer: u }) } (window.kendo.jQuery), function (e) { function t(e, t, n, i) { var r, a, o, s; if (e == t) return i - n; for (r = t; r && r.parentNode != e; ) r = r.parentNode; if (r) return f(r) - n; for (r = e; r && r.parentNode != t; ) r = r.parentNode; if (r) return i - f(r) - 1; for (a = p.commonAncestor(e, t), o = e; o && o.parentNode != a; ) o = o.parentNode; for (o || (o = a), s = t; s && s.parentNode != a; ) s = s.parentNode; return s || (s = a), o == s ? 0 : f(s) - f(o) } function n(e, n) { function i(e) { try { return 0 > t(e.startContainer, e.endContainer, e.startOffset, e.endOffset) } catch (n) { return !0 } } i(e) && (n ? (e.commonAncestorContainer = e.endContainer = e.startContainer, e.endOffset = e.startOffset) : (e.commonAncestorContainer = e.startContainer = e.endContainer, e.startOffset = e.endOffset), e.collapsed = !0) } function i(e) { e.collapsed = e.startContainer == e.endContainer && e.startOffset == e.endOffset; for (var t = e.startContainer; t && t != e.endContainer && !p.isAncestorOf(t, e.endContainer); ) t = t.parentNode; e.commonAncestorContainer = t } function r(e) { var t = e.duplicate(), n = e.duplicate(); return t.collapse(!0), n.collapse(!1), p.commonAncestor(e.parentElement(), t.parentElement(), n.parentElement()) } function a(e, t, n) { var i, r, a = t[n ? "startContainer" : "endContainer"], o = t[n ? "startOffset" : "endOffset"], s = 0, l = h(a), d = l ? a : a.childNodes[o] || null, c = l ? a.parentNode : a; (3 == a.nodeType || 4 == a.nodeType) && (s = o), r = c.insertBefore(p.create(t.ownerDocument, "a"), d), i = t.ownerDocument.body.createTextRange(), i.moveToElementText(r), p.remove(r), i[n ? "moveStart" : "moveEnd"]("character", s), i.collapse(!1), e.setEndPoint(n ? "StartToStart" : "EndToStart", i) } function o(e, t, n, i) { var r, a, o, s, l, d, c, u = p.create(t.ownerDocument, "a"), g = e.duplicate(), m = i ? "StartToStart" : "StartToEnd"; u.innerHTML = "", g.collapse(i), a = g.parentElement(), p.isAncestorOrSelf(n, a) || (a = n); do a.insertBefore(u, u.previousSibling), g.moveToElementText(u); while ((r = g.compareEndPoints(m, e)) > 0 && u.previousSibling); o = u.nextSibling, -1 == r && h(o) ? (g.setEndPoint(i ? "EndToStart" : "EndToEnd", e), p.remove(u), d = [o, g.text.length]) : (s = !i && u.previousSibling, l = i && u.nextSibling, h(l) ? d = [l, 0] : h(s) ? d = [s, s.length] : (c = f(u), d = a.nextSibling && c == a.childNodes.length - 1 ? [a.nextSibling, 0] : [a, c]), p.remove(u)), t[i ? "setStart" : "setEnd"].apply(t, d) } var s = window.kendo, l = s.Class, d = e.extend, c = s.ui.editor, u = s.support.browser, p = c.Dom, f = p.findNodeIndex, h = p.isDataNode, g = p.findClosestAncestor, m = p.getNodeLength, v = p.normalize, _ = { selectionFromWindow: function (e) { return "getSelection" in e ? e.getSelection() : new w(e.document) }, selectionFromRange: function (e) { var t = S.documentFromRange(e); return _.selectionFromDocument(t) }, selectionFromDocument: function (e) { return _.selectionFromWindow(p.windowFromDocument(e)) } }, b = l.extend({ init: function (t) { e.extend(this, { ownerDocument: t, startContainer: t, endContainer: t, commonAncestorContainer: t, startOffset: 0, endOffset: 0, collapsed: !0 }) }, setStart: function (e, t) { this.startContainer = e, this.startOffset = t, i(this), n(this, !0) }, setEnd: function (e, t) { this.endContainer = e, this.endOffset = t, i(this), n(this, !1) }, setStartBefore: function (e) { this.setStart(e.parentNode, f(e)) }, setStartAfter: function (e) { this.setStart(e.parentNode, f(e) + 1) }, setEndBefore: function (e) { this.setEnd(e.parentNode, f(e)) }, setEndAfter: function (e) { this.setEnd(e.parentNode, f(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(g(e.commonAncestorContainer, e.startContainer)), e.collapse(!0), function n(e) { for (; e.next(); ) e.hasPartialSubtree() ? n(e.getSubtreeIterator()) : e.remove() } (new k(t)) }, cloneContents: function () { var e = S.documentFromRange(this); return function t(n) { for (var i, r = e.createDocumentFragment(); i = n.next(); ) i = i.cloneNode(!n.hasPartialSubtree()), n.hasPartialSubtree() && i.appendChild(t(n.getSubtreeIterator())), r.appendChild(i); return r } (new k(this)) }, extractContents: function () { var e, t = this, n = t.cloneRange(); return t.startContainer != t.commonAncestorContainer && t.setStartAfter(g(t.commonAncestorContainer, t.startContainer)), t.collapse(!0), e = S.documentFromRange(t), function i(n) { for (var r, a = e.createDocumentFragment(); r = n.next(); ) n.hasPartialSubtree() ? (r = r.cloneNode(!1), r.appendChild(i(n.getSubtreeIterator()))) : n.remove(t.originalRange), a.appendChild(r); return a } (new k(n)) }, insertNode: function (e) { var t = this; h(t.startContainer) ? (t.startOffset != t.startContainer.nodeValue.length && p.splitDataNode(t.startContainer, t.startOffset), p.insertAfter(e, t.startContainer)) : p.insertAt(t.startContainer, e, t.startOffset), t.setStart(t.startContainer, t.startOffset) }, cloneRange: function () { return e.extend(new b(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("") } }), k = l.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 || h(t.startContainer) ? g(n, t.startContainer) : t.startContainer.childNodes[t.startOffset], this._end = t.endContainer != n || h(t.endContainer) ? g(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, h(e._current) && (e.range.endContainer == e._current && (t = t.cloneNode(!0), t.deleteData(e.range.endOffset, t.length - e.range.endOffset)), e.range.startContainer == e._current && (t = t.cloneNode(!0), t.deleteData(0, e.range.startOffset))), t }, traverse: function (e) { function t() { return i._current = i._next, i._next = i._current && i._current.nextSibling != i._end ? i._current.nextSibling : null, i._current } for (var n, i = this; n = t(); ) i.hasPartialSubtree() ? i.getSubtreeIterator().traverse(e) : e(n); return n }, remove: function (e) { var t, n, i, r, a, o = this, s = o.range.startContainer == o._current, l = o.range.endContainer == o._current; h(o._current) && (s || l) ? (t = s ? o.range.startOffset : 0, n = l ? o.range.endOffset : o._current.length, i = n - t, e && (s || l) && (o._current == e.
82startContainer && e.startOffset >= t && (e.startOffset -= i), o._current == e.endContainer && e.endOffset >= n && (e.endOffset -= i)), o._current.deleteData(t, i)) : (r = o._current.parentNode, !e || o.range.startContainer != r && o.range.endContainer != r || (a = f(o._current), r == e.startContainer && e.startOffset >= a && (e.startOffset -= 1), r == e.endContainer && e.endOffset > a && (e.endOffset -= 1)), p.remove(o._current)) }, hasPartialSubtree: function () { return !h(this._current) && (p.isAncestorOrSelf(this._current, this.range.startContainer) || p.isAncestorOrSelf(this._current, this.range.endContainer)) }, getSubtreeIterator: function () { var e = this, t = e.range.cloneRange(); return t.selectNodeContents(e._current), p.isAncestorOrSelf(e._current, e.range.startContainer) && t.setStart(e.range.startContainer, e.range.startOffset), p.isAncestorOrSelf(e._current, e.range.endContainer) && t.setEnd(e.range.endContainer, e.range.endOffset), new k(t) } }), w = l.extend({ init: function (e) { this.ownerDocument = e, this.rangeCount = 1 }, addRange: function (e) { var t = this.ownerDocument.body.createTextRange(); a(t, e, !1), a(t, e, !0), t.select() }, removeAllRanges: function () { this.ownerDocument.selection.empty() }, getRangeAt: function () { var e, t, n, i, a, s, l, d, c = new b(this.ownerDocument), u = this.ownerDocument.selection; try { if (e = u.createRange(), t = e.item ? e.item(0) : e.parentElement(), t.ownerDocument != this.ownerDocument) return c } catch (p) { return c } if ("Control" == u.type) c.selectNode(e.item(0)); else if (n = r(e), o(e, c, n, !0), o(e, c, n, !1), 9 == c.startContainer.nodeType && c.setStart(c.endContainer, c.startOffset), 9 == c.endContainer.nodeType && c.setEnd(c.startContainer, c.endOffset), 0 === e.compareEndPoints("StartToEnd", e) && c.collapse(!1), i = c.startContainer, a = c.endContainer, s = this.ownerDocument.body, !(c.collapsed || 0 !== c.startOffset || c.endOffset != m(c.endContainer) || i == a && h(i) && i.parentNode == s)) { for (l = !1, d = !1; 0 === f(i) && i == i.parentNode.firstChild && i != s; ) i = i.parentNode, l = !0; for (; f(a) == m(a.parentNode) - 1 && a == a.parentNode.lastChild && a != s; ) a = a.parentNode, d = !0; i == s && a == s && l && d && (c.setStart(i, 0), c.setEnd(a, m(s))) } return c } }), y = l.extend({ init: function (e) { this.enumerate = function () { function t(e) { if (p.is(e, "img") || 3 == e.nodeType && !p.isWhitespace(e)) n.push(e); else for (e = e.firstChild; e; ) t(e), e = e.nextSibling } var n = []; return new k(e).traverse(t), n } } }), x = l.extend({ init: function (e) { var t = this; t.range = e, t.rootNode = S.documentFromRange(e), t.body = t.rootNode.body, t.html = t.body.innerHTML, t.startContainer = t.nodeToPath(e.startContainer), t.endContainer = t.nodeToPath(e.endContainer), t.startOffset = t.offset(e.startContainer, e.startOffset), t.endOffset = t.offset(e.endContainer, e.endOffset) }, index: function (e) { for (var t, n = 0, i = e.nodeType; e = e.previousSibling; ) t = e.nodeType, (3 != t || i != t) && n++, i = t; return n }, offset: function (e, t) { if (3 == e.nodeType) for (; (e = e.previousSibling) && 3 == e.nodeType; ) t += e.nodeValue.length; return t }, nodeToPath: function (e) { for (var t = []; e != this.rootNode; ) t.push(this.index(e)), e = e.parentNode; return t }, toRangePoint: function (e, t, n, i) { for (var r = this.rootNode, a = n.length, o = i; a--; ) r = r.childNodes[n[a]]; for (; 3 == r.nodeType && o > r.nodeValue.length; ) o -= r.nodeValue.length, r = r.nextSibling; e[t ? "setStart" : "setEnd"](r, 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 = l.extend({ init: function () { this.caret = null }, addCaret: function (e) { var t = this; return t.caret = p.create(S.documentFromRange(e), "span", { className: "k-marker" }), e.insertNode(t.caret), e.selectNode(t.caret), t.caret }, removeCaret: function (e) { var t, n, i, r, a = this, o = a.caret.previousSibling, s = 0; o && (s = h(o) ? o.nodeValue.length : f(o)), t = a.caret.parentNode, n = o ? f(o) : 0, p.remove(a.caret), v(t), i = t.childNodes[n], h(i) ? e.setStart(i, s) : i ? (r = p.lastTextNode(i), r ? e.setStart(r, r.nodeValue.length) : e[o ? "setStartAfter" : "setStartBefore"](i)) : (u.msie || t.innerHTML || (t.innerHTML = '<br _moz_dirty="" />'), e.selectNodeContents(t)), e.collapse(!0) }, add: function (e, t) { var n, i = this; return t && e.collapsed && (i.addCaret(e), e = S.expand(e)), n = e.cloneRange(), n.collapse(!1), i.end = p.create(S.documentFromRange(e), "span", { className: "k-marker" }), n.insertNode(i.end), n = e.cloneRange(), n.collapse(!0), i.start = i.end.cloneNode(!0), n.insertNode(i.start), e.setStartBefore(i.start), e.setEndAfter(i.end), v(e.commonAncestorContainer), e }, remove: function (e) { var t, n, i, r, a, o, s, l, d, c, u, g, m, _ = this, b = _.start, k = _.end; for (v(e.commonAncestorContainer); !b.nextSibling && b.parentNode; ) b = b.parentNode; for (; !k.previousSibling && k.parentNode; ) k = k.parentNode; if (t = b.previousSibling && 3 == b.previousSibling.nodeType && b.nextSibling && 3 == b.nextSibling.nodeType, n = k.previousSibling && 3 == k.previousSibling.nodeType && k.nextSibling && 3 == k.nextSibling.nodeType, i = t && n, b = b.nextSibling, k = k.previousSibling, r = !1, a = !1, b == _.end && (a = !!_.start.previousSibling, b = k = _.start.previousSibling || _.end.nextSibling, r = !0), p.remove(_.start), p.remove(_.end), !b || !k) return e.selectNodeContents(e.commonAncestorContainer), e.collapse(!0), void 0; if (o = r ? h(b) ? b.nodeValue.length : b.childNodes.length : 0, s = h(k) ? k.nodeValue.length : k.childNodes.length, 3 == b.nodeType) for (; b.previousSibling && 3 == b.previousSibling.nodeType; ) b = b.previousSibling, o += b.nodeValue.length; if (3 == k.nodeType) for (; k.previousSibling && 3 == k.previousSibling.nodeType; ) k = k.previousSibling, s += k.nodeValue.length; for (l = f(b), d = b.parentNode, c = f(k), u = k.parentNode, g = b; g.previousSibling;
82 g = g.previousSibling) 3 == g.nodeType && 3 == g.previousSibling.nodeType && l--; for (m = k; m.previousSibling; m = m.previousSibling) 3 == m.nodeType && 3 == m.previousSibling.nodeType && c--; v(d), 3 == b.nodeType && (b = d.childNodes[l]), v(u), 3 == k.nodeType && (k = u.childNodes[c]), r ? (3 == b.nodeType ? e.setStart(b, o) : e[a ? "setStartAfter" : "setStartBefore"](b), e.collapse(!0)) : (3 == b.nodeType ? e.setStart(b, o) : e.setStartBefore(b), 3 == k.nodeType ? e.setEnd(k, s) : e.setEndAfter(k)), _.caret && _.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), t.length || (t = p.significantChildNodes(e.commonAncestorContainer))), t }, textNodes: function (e) { return new y(e).enumerate() }, documentFromRange: function (e) { var t = e.startContainer; return 9 == t.nodeType ? t : t.ownerDocument }, createRange: function (e) { return u.msie && 9 > u.version ? new b(e) : e.createRange() }, selectRange: function (e) { var t, n = S.image(e); n && (e.setStartAfter(n), e.setEndAfter(n)), t = _.selectionFromRange(e), t.removeAllRanges(), t.addRange(e) }, split: function (e, t, n) { function i(i) { var r, a = e.cloneRange(); a.collapse(i), a[i ? "setStartBefore" : "setEndAfter"](t), r = a.extractContents(), n && (r = p.trim(r)), p[i ? "insertBefore" : "insertAfter"](r, t) } i(!0), i(!1) }, getMarkers: function (e) { var t = []; return new k(e).traverse(function (e) { "k-marker" == e.className && t.push(e) }), t }, image: function (e) { var t = []; return new k(e).traverse(function (e) { p.is(e, "img") && t.push(e) }), 1 == t.length ? t[0] : void 0 }, expand: function (e) { var t, n, i, r, a = e.cloneRange(), o = a.startContainer.childNodes[0 === a.startOffset ? 0 : a.startOffset - 1], s = a.endContainer.childNodes[a.endOffset]; return h(o) && h(s) ? (t = o.nodeValue, n = s.nodeValue, t && n ? (i = t.split("").reverse().join("").search(T), r = n.search(T), i && r ? (r = -1 == r ? n.length : r, i = -1 == i ? 0 : t.length - i, a.setStart(o, i), a.setEnd(s, r), a) : a) : a) : a }, isExpandable: function (e) { var t, n, i, r, a, o, s = e.startContainer, l = S.documentFromRange(e); return s == l || s == l.body ? !1 : (t = e.cloneRange(), (n = s.nodeValue) ? (i = n.substring(0, t.startOffset), r = n.substring(t.startOffset), a = 0, o = 0, i && (a = i.split("").reverse().join("").search(T)), r && (o = r.search(T)), a && o) : !1) } }; d(c, { SelectionUtils: _, W3CRange: b, RangeIterator: k, W3CSelection: w, RangeEnumerator: y, RestorePoint: x, Marker: C, RangeUtils: S }) } (window.kendo.jQuery), function (e) { var t = window.kendo, n = t.Class, i = t.ui.editor, r = i.EditorUtils, a = r.registerTool, o = i.Dom, s = i.RangeUtils, l = s.selectRange, d = i.Tool, c = i.ToolTemplate, u = i.RestorePoint, p = i.Marker, f = e.extend, h = n.extend({ init: function (e) { var t = this; t.options = e, t.restorePoint = new u(e.range), t.marker = new p, t.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), l(e) }, undo: function () { var e = this.restorePoint; e.body.innerHTML = e.html, l(e.toRange()) }, redo: function () { this.exec() }, exec: function () { var e = this, t = e.lockRange(!0); e.formatter.editor = e.editor, e.formatter.toggle(t), e.releaseRange(t) } }), g = n.extend({ init: function (e, t) { this.body = e.body, this.startRestorePoint = e, this.endRestorePoint = t }, redo: function () { this.body.innerHTML = this.endRestorePoint.html, l(this.endRestorePoint.toRange()) }, undo: function () { this.body.innerHTML = this.startRestorePoint.html, l(this.startRestorePoint.toRange()) } }), m = h.extend({ init: function (e) { h.fn.init.call(this, e), this.managesUndoRedo = !0 }, exec: function () { var e = this.editor, t = e.getRange(), n = new u(t); e.clipboard.paste(this.options.value || ""), e.undoRedoStack.push(new g(n, new u(e.getRange()))), e.focus() } }), v = d.extend({ initialize: function (e, t) { var n = t.editor, r = this.options, a = r.items ? r.items : n.options.insertHtml; new i.SelectBox(e, { dataSource: a, dataTextField: "text", dataValueField: "value", change: function () { d.exec(n, "insertHtml", this.value()) }, title: n.options.messages.insertHtml, highlightFirst: !1 }) }, command: function (e) { return new m(e) }, update: function (e) { var t = e.data("kendoSelectBox") || e.find("select").data("kendoSelectBox"); t.close(), t.value(t.options.title) } }), _ = n.extend({ init: function () { this.stack = [], this.currentCommandIndex = -1 }, push: function (e) { var t = this; t.stack = t.stack.slice(0, t.currentCommandIndex + 1), t.currentCommandIndex = t.stack.push(e) - 1 }, undo: function () { this.canUndo() && this.stack[this.currentCommandIndex--].undo() }, redo: function () { this.canRedo() && this.stack[++this.currentCommandIndex].redo() }, canUndo: function () { return this.currentCommandIndex >= 0 }, canRedo: function () { return this.currentCommandIndex != this.stack.length - 1 } }), b = n.extend({ init: function (e) { this.editor = e }, keydown: function (t) { var n, i = this, r = i.editor, a = r.keyboard, o = a.isTypingKey(t), s = f(e.Event(), t); return i.editor.trigger("keydown", s), s.isDefaultPrevented() && t.preventDefault(), s.isDefaultPrevented() || !o || a.isTypingInProgress() ? !1 : (n = r.getRange(), i.startRestorePoint = new u(n), a.startTyping(function () { r.selectionRestorePoint = i.endRestorePoint = new u(r.getRange()), r.undoRedoStack.push(new g(i.startRestorePoint, i.endRestorePoint)) }), !0) }, keyup: function (e) { var t = this.editor.keyboard; return this.editor.trigger("keyup", e), t.isTypingInProgress() ? (t.endTyping(), !0) : !1 } }), k = n.extend({ init: function (e) { this.editor = e, this.systemCommandIsInProgress = !1 }, createUndoCommand: function () { var e = this; e.endRestorePoint = new u(e.editor.getRange()), e.editor.undoRedoStack.push(new g(e.startRestorePoint, e.endRestorePoint)), e.startRestorePoint = e.endRestorePoint }, changed: function () { return this.startRestorePoint ? this.startRestorePoint.html != this.editor.body.innerHTML : !1 }
82, keydown: function (e) { var t = this, n = t.editor, i = n.keyboard; return i.isModifierKey(e) ? (i.isTypingInProgress() && i.endTyping(!0), t.startRestorePoint = new u(n.getRange()), !0) : i.isSystem(e) ? (t.systemCommandIsInProgress = !0, t.changed() && (t.systemCommandIsInProgress = !1, t.createUndoCommand()), !0) : !1 }, keyup: function (e) { var t = this; return t.systemCommandIsInProgress && t.changed() ? (t.systemCommandIsInProgress = !1, t.createUndoCommand(e), !0) : !1 } }), w = n.extend({ init: function (e) { this.handlers = e, this.typingInProgress = !1 }, isCharacter: function (e) { return e >= 48 && 90 >= e || e >= 96 && 111 >= e || e >= 186 && 192 >= e || e >= 219 && 222 >= e }, toolFromShortcut: function (t, n) { var i, r, a = String.fromCharCode(n.keyCode); for (i in t) if (r = e.extend({ ctrl: !1, alt: !1, shift: !1 }, t[i].options), (r.key == a || r.key == n.keyCode) && r.ctrl == n.ctrlKey && r.alt == n.altKey && r.shift == n.shiftKey) return i }, 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 = !1, this.onEndTyping && this.onEndTyping() }, endTyping: function (t) { var n = this; n.clearTimeout(), t ? n.stopTyping() : n.timeout = window.setTimeout(e.proxy(n.stopTyping, n), 1e3) }, isTypingInProgress: function () { return this.typingInProgress }, clearTimeout: function () { window.clearTimeout(this.timeout) }, notify: function (e, t) { var n, i = this.handlers; for (n = 0; i.length > n && !i[n][t](e); n++); }, keydown: function (e) { this.notify(e, "keydown") }, keyup: function (e) { this.notify(e, "keyup") } }), y = n.extend({ init: function (e) { this.editor = e, this.cleaners = [new C, new T] }, htmlToFragment: function (e) { var t = this.editor, n = t.document, i = o.create(n, "div"), r = n.createDocumentFragment(); for (i.innerHTML = e; i.firstChild; ) r.appendChild(i.firstChild); return r }, isBlock: function (e) { return /<(div|p|ul|ol|table|h[1-6])/i.test(e) }, oncut: function () { var e = this.editor, t = new u(e.getRange()); setTimeout(function () { e.undoRedoStack.push(new g(t, new u(e.getRange()))) }) }, onpaste: function (t) { var n, r, a, s = this.editor, d = s.getRange(), c = "", p = new u(d), f = o.create(s.document, "div", { className: "k-paste-container", innerHTML: c }); o.persistScrollTop(s.document), s.body.appendChild(f), s.body.createTextRange ? (t.preventDefault(), n = s.createRange(), n.selectNodeContents(f), s.selectRange(n), r = s.body.createTextRange(), r.moveToElementText(f), e(s.body).unbind("paste"), r.execCommand("Paste"), e(s.body).bind("paste", e.proxy(arguments.callee, this))) : (a = s.createRange(), a.selectNodeContents(f), l(a)), d.deleteContents(), setTimeout(function () { var e, t = { html: "" }; l(d), f.parentNode || (f = s.body.lastChild), o.remove(f), f.lastChild && o.is(f.lastChild, "br") && o.remove(f.lastChild), e = f.innerHTML, e != c && (t.html = e), s.trigger("paste", t), s.clipboard.paste(t.html, !0), s.undoRedoStack.push(new g(p, new u(s.getRange()))), i.EditorUtils.select(s) }) }, splittableParent: function (e, t) { var n, i; if (e) return o.parentOfType(t, ["p", "ul", "ol"]) || t.parentNode; if (n = t.parentNode, i = t.ownerDocument.body, o.isInline(n)) for (; n.parentNode != i && !o.isBlock(n.parentNode); ) n = n.parentNode; return n }, paste: function (e, t) { var n, i, r, a, d, c, u, f, h, g, m = this.editor; for (n = 0, i = this.cleaners.length; i > n; n++) this.cleaners[n].applicable(e) && (e = this.cleaners[n].clean(e)); if (t && (e = e.replace(/(<br>(\s| )*)+(<\/?(div|p|li|col|t))/gi, "$3"), e = e.replace(/<(a|span)[^>]*><\/\1>/gi, "")), e = e.replace(/^<li/i, "<ul><li").replace(/li>$/g, "li></ul>"), r = this.isBlock(e), a = m.getRange(), a.deleteContents(), a.startContainer == m.document && a.selectNodeContents(m.body), d = new p, c = d.addCaret(a), u = this.splittableParent(r, c), f = !1, /body|td/.test(o.name(u)) || !r && !o.isInline(u) || (a.selectNode(c), s.split(a, u, !0), f = !0), h = this.htmlToFragment(e), h.firstChild && "k-paste-container" === h.firstChild.className) { for (g = [], n = 0, i = h.childNodes.length; i > n; n++) g.push(h.childNodes[n].innerHTML); h = this.htmlToFragment(g.join("<br />")) } if (a.insertNode(h), u = this.splittableParent(r, c), f) { for (; c.parentNode != u; ) o.unwrap(c.parentNode); o.unwrap(c.parentNode) } o.normalize(a.commonAncestorContainer), c.style.display = "inline", o.restoreScrollTop(m.document), o.scrollTo(c), d.removeCaret(a), l(a) } }), x = n.extend({ clean: function (e) { var t, n, i = this, r = i.replacements; for (t = 0, n = r.length; n > t; t += 2) e = e.replace(r[t], r[t + 1]); return e } }), C = x.extend({ init: function () { this.replacements = [/<\?xml[^>]*>/gi, "", /<!--(.|\n)*?-->/g, "", /"/g, "'", /(?:<br> [\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> [\s\r\n]+|<br>
82)*/g, "$1", /<br><br>/g, "<BR><BR>", /<br>/g, " ", /<table([^>]*)>(\s| )+<t/gi, "<table$1><t", /<tr[^>]*>(\s| )*<\/tr>/gi, "", /<tbody[^>]*>(\s| )*<\/tbody>/gi, "", /<table[^>]*>(\s| )*<\/table>/gi, "", /<BR><BR>/g, "<br>", /^\s*( )+/gi, "", /( |<br[^>]*>)+\s*$/gi, "", /mso-[^;"]*;?/gi, "", /<(\/?)b(\s[^>]*)?>/gi, "<$1strong$2>", /<(\/?)i(\s[^>]*)?>/gi, "<$1em$2>", /<\/?(meta|link|style|o:|v:|x:)[^>]*>((?:.|\n)*?<\/(meta|link|style|o:|v:|x:)[^>]*>)?/gi, "", /style=(["|'])\s*\1/g, ""] }, applicable: function (e) { return /class="?Mso|style="[^"]*mso-/i.test(e) }, listType: function (e) { return /^[\u2022\u00b7\u00a7\u00d8o]\u00a0+/.test(e) ? "ul" : /^\s*\w+[\.\)]\u00a0{2,}/.test(e) ? "ol" : void 0 }, lists: function (t) { var n, i, r, a, s, l, d, c, u = o.create(document, "div", { innerHTML: t }), p = e(o.blockElements.join(","), u), f = -1, h = { ul: {}, ol: {} }, g = u; for (i = 0; p.length > i; i++) if (r = p[i], t = r.innerHTML.replace(/<\/?\w+[^>]*>/g, "").replace(/ /g, "Ã "), a = this.listType(t), a && "p" == o.name(r)) { if (s = parseFloat(r.style.marginLeft || 0), l = h[a][s], (s > f || !l) && (l = o.create(document, a), g == u ? o.insertBefore(l, r) : g.appendChild(l), h[a][s] = l), n != a) for (d in h) for (c in h[d]) e.contains(l, h[d][c]) && delete h[d][c]; o.remove(r.firstChild), g = o.create(document, "li", { innerHTML: r.innerHTML }), l.appendChild(g), o.remove(r), f = s, n = a } else r.innerHTML ? (h = { ul: {}, ol: {} }, g = u, f = -1) : o.remove(r); return u.innerHTML }, stripEmptyAnchors: function (e) { return e.replace(/<a([^>]*)>\s*<\/a>/gi, function (e, t) { return !t || 0 > t.indexOf("href") ? "" : e }) }, clean: function (e) { var t = this; return e = x.fn.clean.call(t, e), e = t.stripEmptyAnchors(e), e = t.lists(e), e = e.replace(/\s+class="?[^"\s>]*"?/gi, "") } }), T = x.extend({ init: function () { 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) } }); f(i, { Command: h, GenericCommand: g, InsertHtmlCommand: m, InsertHtmlTool: v, UndoRedoStack: _, TypingHandler: b, SystemHandler: k, Keyboard: w, Clipboard: y, Cleaner: x, MSWordFormatCleaner: C, WebkitFormatCleaner: T }), a("insertHtml", new v({ template: new c({ template: r.dropDownListTemplate, title: "Insert HTML", initialValue: "Insert HTML" }) })) } (window.kendo.jQuery), function (e) { 83 function t(e) { return e.collapsed && !u.isExpandable(e) } var n = window.kendo, i = n.Class, r = n.ui.editor, a = n.ui.Editor.fn.options.formats, o = r.EditorUtils, s = r.Tool, l = r.ToolTemplate, d = r.FormatTool, c = r.Dom, u = r.RangeUtils, p = e.extend, f = r.EditorUtils.registerTool, h = r.EditorUtils.registerFormat, g = "k-marker", m = i.extend({ init: function (e) { this.format = e }, numberOfSiblings: function (e) { 84 var t, n = 0, i = 0, r = 0, a = e.parentNode; for (t = a.firstChild; t; t = t.nextSibling) t != e && (t.className == g ? r++ : 3 == t.nodeType ? n++ : i++); return r > 1 && a.firstChild.className == g && a.lastChild.className == g ? 0 : i + n 85 }, findSuitable: function (e, t) { return !t && this.numberOfSiblings(e) > 0 ? null : c.parentOfType(e, this.format[0].tags) }, findFormat: function (e) { var t, n, i, r, a, o = this.format, s = c.attrEquals; for (t = 0, n = o.length; n > t; t++) { if (i = e, r = o[t].tags, a = o[t].attr, i && c.ofType(i, r) && s(i, a)) return i; for (; i; ) if (i = c.parentOfType(i, r), i && s(i, a)) return i } return null }, isFormatted: function (e) { var t, n; for (t = 0, n = e.length; n > t; t++) if (this.findFormat(e[t])) return !0; return !1 } 86 }), v = i.extend({ init: function (e, t) { var n = this; n.finder = new m(e), n.attributes = p({}, e[0].attr, t), n.tag = e[0].tags[0] }, wrap: function (e) { return c.wrap(e, c.create(e.ownerDocument, this.tag, this.attributes)) }, activate: function (e, t) { var n = this; n.finder.isFormatted(t) ? (n.split(e), n.remove(t)) : n.apply(t) }, toggle: function (e) { var t = u.textNodes(e); t.length > 0 && this.activate(e, t) }, apply: function (e) { var t, n, i, r, a = this, o = []; for (t = 0, n = e.length; n > t; t++) i = e[t], r = a.finder.findSuitable(i), r ? c.attr(r, a.attributes) : r = a.wrap(i), o.push(r); a.consolidate(o) }, remove: function (e) { var t, n, i, r = this; for (t = 0, n = e.length; n > t; t++) i = r.finder.findFormat(e[t]), i && (r.attributes && r.attributes.style ? (c.unstyle(i, r.attributes.style), i.style.cssText || i.attributes["class"] || c.unwrap(i)) : c.unwrap(i)) }, split: function (e) { var t, n, i = u.textNodes(e), r = i.length; if (r > 0) for (t = 0; r > t; t++) n = this.finder.findFormat(i[t]), n && u.split(e, n, !0) }, consolidate: function (e) { for (var t, n; e.length > 1; ) if (t = e.pop(), n = e[e.length - 1], t.previousSibling && t.previousSibling.className == g && n.appendChild(t.previousSibling), t.tagName == n.tagName && t.previousSibling == n && t.style.cssText == n.style.cssText) { for (; t.firstChild; ) n.appendChild(t.firstChild); c.remove(t) } } }), _ = m.extend({ init: function (e, t) { var n = this; n.format = e, n.greedyProperty = t, m.fn.init.call(n, e) }, getInlineCssValue: function (t) { var n, i, r, a, o, s, l, d, u, p, f, h, g = t.attributes, m = e.trim; if (g) for (n = 0, i = g.length; i > n; n++) if (r = g[n], a = r.nodeName, o = r.nodeValue, r.specified && "style" == a) for (s = m(o || t.style.cssText).split(";"), d = 0, u = s.length; u > d; d++) if (l = s[d], l.length) { if (p = l.split(":"), f = m(p[0].toLowerCase()), h = m(p[1]), f != this.greedyProperty) continue; return f.indexOf("color") >= 0 ? c.toHex(h) : h } }, getFormatInner: function (t) { var n, i, r, a = e(c.isDataNode(t) ? t.parentNode : t), o = a.parents().andSelf(); for (n = 0, i = o.length; i > n; n++) if (r = "className" == this.greedyProperty ? o[n].className : this.getInlineCssValue(o[n])) return r; return "inherit" }, getFormat: function (e) { var t, n, i = this.getFormatInner(e[0]); for (t = 1, n = e.length; n > t; t++) if (i != this.getFormatInner(e[t])) return ""; return i }, isFormatted: function (e) { return "" !== this.getFormat(e) } }), b = v.extend({ init: function (e, t, n) { var i = this; v.fn.init.call(i, e, t), i.greedyProperty = n, i.values = t, i.finder = new _(e, n) }, activate: function (e, t) { var n, i = this, r = i.greedyProperty, a = "apply"; i.split(e), r && (n = r.replace(/-([a-z])/, function (e, t) { return t.toUpperCase() }), "inherit" == i.values.style[n] && (a = "remove")), i[a](t) } }), k = d.extend({ init: function (e) { d.fn.init.call(this, p(e, { finder: new m(e.format), formatter: function () { return new v(e.format) } })), this.willDelayExecution = t } }), w = s.extend({ willDelayExecution: t, update: function (e, t, n) { var i, r = e.data(this.type), a = n.getPending(this.name); i = a && a.options.params ? a.options.params.value : this.finder.getFormat(t), r.close(), r.value(i) } }), y = w.extend({ init: function (e) { var t = this; s.fn.init.call(t, e), t.type = n.support.browser.msie || n.support.touch ? "kendoDropDownList" : "kendoComboBox", t.format = [{ tags: ["span"]}], t.finder = new _(t.format, e.cssAttr) }, command: function (e) { var t = this.options, n = this.format, i = {}; return new r.FormatCommand(p(e, { formatter: function () { return i[t.domAttr] = e.value, new b(n, { style: i }, t.cssAttr) } })) }, initialize: function (e, t) { var n, i = t.editor, r = this.options, a = r.name, o = []; r.defaultValue && (o = [{ text: i.options.messages[r.defaultValue[0].text], value: r.defaultValue[0].value}]), n = o.concat(r.items ? r.items : i.options[a]), e[this.type]({ dataTextField: "text", dataValueField: "value", dataSource: n, change: function () { s.exec(i, a, this.value()) }, highlightFirst: !1 }), e.closest(".k-widget").removeClass("k-" + a).find("*").andSelf().attr("unselectable", "on"), e.data(this.type).value("inherit") } }), x = s.extend({ init: function (e) { s.fn.init.call(this, e), this.format = [{ tags: ["span"]}] }, options: { palette: "websafe" }, update: function () { this._widget.close() }, command: function (e) { var t = this.options, n = this.format, i = {}; return new r.FormatCommand(p(e, { formatter: function () { return i[t.domAttr] = e.value, new b(n, { style: i }, t.cssAttr) } })) }, willDelayExecution: t, initialize: function (t, i) { var r = i.editor, a = this.name, o = p({}, x.fn.options, this.options), l = o.palette; t = this._widget = new n.ui.ColorPicker(t, { value: e.isArray(l) ? l[0] : "#000", toolIcon: "k-" + o.name, palette: l, change: function () { var e = t.value(); e && s.exec(r, a, e) } }), t.bind("activate", function (e) { e.preventDefault(), t.trigger("change"), r.focus() }), t.wrapper.attr({ title: i.title, unselectable: "on" }).find("*").attr("unselectable", "on") } }), C = w.extend({ init: function (e) { var t = this; s.fn.init.call(t, e), t.type = "kendoSelectBox", t.format = [{ tags: ["span"]}], t.finder = new _(t.format, "className") }, command: function (e) { var t = this.format; return new r.FormatCommand(p(e, { formatter: function () { return new b(t, { className: e.value }) } })) }, initialize: function (e, t) { var n = t.editor, i = this.options; new r.SelectBox(e, { dataTextField: "text", dataValueField: "value", dataSource: i.items || n.options.style, title: n.options.messages.style, change: function () { s.exec(n, "style", this.value()) }, highlightFirst: !1 }), e.closest(".k-widget").removeClass("k-" + this.name).find("*").andSelf().attr("unselectable", "on") } }); p(r, { InlineFormatFinder: m, InlineFormatter: v, GreedyInlineFormatFinder: _, GreedyInlineFormatter: b, InlineFormatTool: k, FontTool: y, ColorTool: x, StyleTool: C }), f("style", new r.StyleTool({ template: new l({ template: o.dropDownListTemplate, title: "Styles" }) })), h("bold", [{ tags: ["strong", "b"] }, { tags: ["span"], attr: { style: { fontWeight: "bold"}}}]), f("bold", new k({ key: "B", ctrl: !0, format: a.bold, template: new l({ template: o.buttonTemplate, title: "Bold" }) })), h("italic", [{ tags: ["em", "i"] }, { tags: ["span"], attr: { style: { fontStyle: "italic"}}}]), f("italic", new k({ key: "I", ctrl: !0, format: a.italic, template: new l({ template: o.buttonTemplate, title: "Italic" }) })), h("underline", [{ tags: ["span"], attr: { style: { textDecoration: "underline"}} }, { tags: ["u"]}]), f("underline", new k({ key: "U", ctrl: !0, format: a.underline, template: new l({ template: o.buttonTemplate, title: "Underline" }) })), h("strikethrough", [{ tags: ["del"] }, { tags: ["span"], attr: { style: { textDecoration: "line-through"}}}]), f("strikethrough", new k({ format: a.strikethrough, template: new l({ template: o.buttonTemplate, title: "Strikethrough" }) })), h("superscript", [{ tags: ["sup"]}]), f("superscript", new k({ format: a.superscript, template: new l({ template: o.buttonTemplate, title: "Superscript" }) })), h("subscript", [{ tags: ["sub"]}]), f("subscript", new k({ format: a.subscript, template: new l({ template: o.buttonTemplate, title: "Subscript" }) })), f("foreColor", new x({ cssAttr: "color", domAttr: "color", name: "foreColor", template: new l({ template: o.colorPickerTemplate, title: "Color" }) })), f("backColor", new x({ cssAttr: "background-color", domAttr: "backgroundColor", name: "backColor", template: new l({ template: o.colorPickerTemplate, title: "Backgroun
86d Color" }) })), f("fontName", new y({ cssAttr: "font-family", domAttr: "fontFamily", name: "fontName", defaultValue: [{ text: "fontNameInherit", value: "inherit"}], template: new l({ template: o.comboBoxTemplate, title: "Font Name" }) })), f("fontSize", new y({ cssAttr: "font-size", domAttr: "fontSize", name: "fontSize", defaultValue: [{ text: "fontSizeInherit", value: "inherit"}], template: new l({ template: o.comboBoxTemplate, title: "Font Size" }) })) 87} (window.kendo.jQuery), function (e) { var t = window.kendo, n = t.Class, i = e.extend, r = t.ui.editor, a = t.ui.Editor.fn.options.formats, o = r.Dom, s = r.Command, l = r.Tool, d = r.ToolTemplate, c = r.FormatTool, u = r.EditorUtils, p = u.registerTool, f = u.registerFormat, h = r.RangeUtils, g = n.extend({ init: function (e) { this.format = e }, contains: function (e, t) { var n, i, r; for (n = 0, i = t.length; i > n; n++) if (r = t[n], !r || !o.isAncestorOrSelf(e, r)) return !1; return !0 }, findSuitable: function (t) { var n, i, r, a = this.format, s = []; for (n = 0, i = t.length; i > n; n++) { if (r = o.ofType(t[n], a[0].tags) ? t[n] : o.parentOfType(t[n], a[0].tags), !r) return []; 0 > e.inArray(r, s) && s.push(r) } for (n = 0, i = s.length; i > n; n++) if (this.contains(s[n], s)) return [s[n]]; return s }, findFormat: function (e) { var t, n, i, r, a, s = this.format; for (t = 0, n = s.length; n > t; t++) for (i = e, r = s[t].tags, a = s[t].attr; i; ) { if (o.ofType(i, r) && o.attrEquals(i, a)) return i; i = i.parentNode } return null }, getFormat: function (e) { var t, n, i = this, r = function (e) { return i.findFormat(o.isDataNode(e) ? e.parentNode : e) }, a = r(e[0]); if (!a) return ""; for (t = 1, n = e.length; n > t; t++) if (a != r(e[t])) return ""; return a.nodeName.toLowerCase() }, isFormatted: function (e) { for (var t = 0, n = e.length; n > t; t++) if (!this.findFormat(e[t])) return !1; return !0 } }), m = n.extend({ init: function (e, t) { this.format = e, this.values = t, this.finder = new g(e) }, wrap: function (e, t, n) { var i, r, a, s, l, d = 1 == n.length ? o.blockParentOrBody(n[0]) : o.commonAncestor.apply(null, n); for (o.isInline(d) && (d = o.blockParentOrBody(d)), a = o.significantChildNodes(d), s = o.findNodeIndex(a[0]), l = o.create(d.ownerDocument, e, t), i = 0; a.length > i; i++) r = a[i], o.isBlock(r) ? (o.attr(r, t), l.childNodes.length && (o.insertBefore(l, r), l = l.cloneNode(!1)), s = o.findNodeIndex(r) + 1) : l.appendChild(r); l.firstChild && o.insertAt(d, l, s) }, apply: function (e) { var t, n, r, a, s = this, l = o.is(e[0], "img") ? [e[0]] : s.finder.findSuitable(e), d = l.length ? u.formatByName(o.name(l[0]), s.format) : s.format[0]; if (d) if (t = d.tags[0], n = i({}, d.attr, s.values), l.length) for (r = 0, a = l.length; a > r; r++) o.attr(l[r], n); else s.wrap(t, n, e) }, remove: function (e) { var t, n, i, r, a; for (t = 0, n = e.length; n > t; t++) i = this.finder.findFormat(e[t]), i && (a = o.name(i), "div" != a || i.getAttribute("class") ? (r = u.formatByName(a, this.format), r.attr.style && o.unstyle(i, r.attr.style), r.attr.className && o.removeClass(i, r.attr.className)) : o.unwrap(i)) }, toggle: function (e) { var t = this, n = h.nodes(e); t.finder.isFormatted(n) ? t.remove(n) : t.apply(n) } }), v = n.extend({ init: function (e, t) { var n = this; n.format = e, n.values = t, n.finder = new g(e) }, apply: function (e) { var t, n, i, a, s, l = this.format, d = o.blockParents(e), c = l[0].tags[0]; if (d.length) for (t = 0, n = d.length; n > t; t++) o.is(d[t], "li") ? (i = d[t].parentNode, a = new r.ListFormatter(i.nodeName.toLowerCase(), c), s = this.editor.createRange(), s.selectNode(d[t]), a.toggle(s)) : o.changeTag(d[t], c); else new m(l, this.values).apply(e) }, toggle: function (e) { var t = h.textNodes(e); t.length || (e.selectNodeContents(e.commonAncestorContainer), t = h.textNodes(e), t.length || (t = o.significantChildNodes(e.commonAncestorContainer))), this.apply(t) } }), _ = s.extend({ init: function (e) { e.formatter = e.formatter(), s.fn.init.call(this, e) } }), b = c.extend({ init: function (e) { c.fn.init.call(this, i(e, { finder: new g(e.format), formatter: function () { return new m(e.format) } })) } }), k = l.extend({ init: function (e) { l.fn.init.call(this, e), this.finder = new g([{ tags: o.blockElements}]) }, command: function (e) { return new _(i(e, { formatter: function () { return new v([{ tags: [e.value]}], {}) } })) }, update: function (e, t) { var n; n = e.is("select") ? e.data("kendoSelectBox") : e.find("select").data("kendoSelectBox"), n.close(), n.value(this.finder.getFormat(t)) }, initialize: function (e, t) { var n = t.editor, i = "formatBlock"; new r.SelectBox(e, { dataTextField: "text", dataValueField: "value", dataSource: this.options.items ? this.options.items : n.options.formatBlock, title: n.options.messages.formatBlock, change: function () { l.exec(n, i, this.value()) }, highlightFirst: !1 }), e.closest(".k-widget").removeClass("k-" + i).find("*").andSelf().attr("unselectable", "on") } }); i(r, { BlockFormatFinder: g, BlockFormatter: m, GreedyBlockFormatter: v, FormatCommand: _, BlockFormatTool: b, FormatBlockTool: k }), p("formatBlock", new k({ template: new d({ template: u.dropDownListTemplate }) })), f("justifyLeft", [{ tags: o.blockElements, attr: { style: { textAlign: "left"}} }, { tags: ["img"], attr: { style: { "float": "left"}}}]), p("justifyLeft", new b({ format: a.justifyLeft, template: new d({ template: u.buttonTemplate, title: "Justify Left" }) })), f("justifyCenter", [{ tags: o.blockElements, attr: { style: { textAlign: "center"}} }, { tags: ["img"], attr: { style: { display: "block", marginLeft: "auto", marginRight: "auto"}}}]), p("justifyCenter", new b({ format: a.justifyCenter, template: new d({ template: u.buttonTemplate, title: "Justify Center" }) })), f("justifyRight", [{ tags: o.blockElements, attr: { style: { textAlign: "right"}} }, { tags: ["img"], attr: { style: { "float": "right"}}}]), p("justifyRight", new b({ format: a.justifyRight, template: new d({ template: u.buttonTemplate, title: "Justify Right" }) })), f("justifyFull", [{ tags: o.blockElements, attr: { style: { textAlign: "justify"}}}]), p("justifyFull", new b({ format: a.justifyFull, template: new d({ template: u.buttonTemplate, title: "Justify Full" }) })) } (window.kendo.jQuery), function (e) { var t = window.kendo, n = e.extend, i = t.ui.editor, r = i.Dom, a = i.Command, o = i.Tool, s = i.BlockFormatter, l = r.normalize, d = i.RangeUtils, c = i.EditorUtils.registerTool, u = a.extend({ init: function (e) { this.options = e, a.fn.init.call(this, e) }, _insertMarker: function (e, t) { var n, i = r.create(e, "a");
87 return t.insertNode(i), i.parentNode || (n = t.commonAncestorContainer, n.innerHTML = "", n.appendChild(i)), l(i.parentNode), i }, exec: function () { function e(e) { if (e.firstChild && r.is(e.firstChild, "br") && r.remove(e.firstChild), r.isDataNode(e) && !e.nodeValue && (e = e.parentNode), e && !r.is(e, "img")) { for (; e.firstChild && 1 == e.firstChild.nodeType; ) e = e.firstChild; "" === e.innerHTML && (e.innerHTML = v) } } var n, i, a, o, c, u, p, f, h, g = this.getRange(), m = d.documentFromRange(g), v = t.support.browser.msie ? "" : '<br _moz_dirty="" />', _ = "p,h1,h2,h3,h4,h5,h6".split(","), b = r.parentOfType(g.startContainer, _), k = r.parentOfType(g.endContainer, _), w = b && !k || !b && k; g.deleteContents(), c = this._insertMarker(m, g), u = r.parentOfType(c, ["li"]), p = r.parentOfType(c, "h1,h2,h3,h4,h5,h6".split(",")), u ? (f = g.cloneRange(), f.selectNode(u), d.textNodes(f).length || (o = r.create(m, "p"), u.nextSibling && d.split(f, u.parentNode), r.insertAfter(o, u.parentNode), r.remove(1 == u.parentNode.childNodes.length ? u.parentNode : u), o.innerHTML = v, a = o)) : p && !c.nextSibling && (o = r.create(m, "p"), r.insertAfter(o, p), o.innerHTML = v, r.remove(c), a = o), a || (u || p || new s([{ tags: ["p"]}]).apply([c]), g.selectNode(c), n = r.parentOfType(c, [u ? "li" : p ? r.name(p) : "p"]), d.split(g, n, w), i = n.previousSibling, r.is(i, "li") && i.firstChild && !r.is(i.firstChild, "br") && (i = i.firstChild), a = n.nextSibling, r.is(a, "li") && a.firstChild && !r.is(a.firstChild, "br") && (a = a.firstChild), r.remove(n), e(i), e(a), l(i)), l(a), r.is(a, "img") ? g.setStartBefore(a) : (g.selectNodeContents(a), h = d.textNodes(g)[0], h && g.selectNodeContents(h)), g.collapse(!0), r.scrollTo(a), d.selectRange(g) } }), p = a.extend({ init: function (e) { this.options = e, a.fn.init.call(this, e) }, exec: function () { var e, n = this.getRange(), i = r.create(d.documentFromRange(n), "br"); n.deleteContents(), n.insertNode(i), l(i.parentNode), t.support.browser.msie || i.nextSibling && !r.isWhitespace(i.nextSibling) || (e = i.cloneNode(!0), e.setAttribute("_moz_dirty", ""), r.insertAfter(e, i)), n.setStartAfter(i), n.collapse(!0), r.scrollTo(i.nextSibling || i), d.selectRange(n) } }); n(i, { ParagraphCommand: u, NewLineCommand: p }), c("insertLineBreak", new o({ key: 13, shift: !0, command: p })), c("insertParagraph", new o({ key: 13, command: u })) } (window.kendo.jQuery), function (e) { var t = window.kendo, n = t.Class, i = e.extend, r = t.ui.editor, a = r.Dom, o = r.RangeUtils, s = r.EditorUtils, l = r.Command, d = r.ToolTemplate, c = r.FormatTool, u = r.BlockFormatFinder, p = o.textNodes, f = r.EditorUtils.registerTool, h = u.extend({ init: function (e) { this.tag = e; var t = this.tags = ["ul" == e ? "ol" : "ul", e]; u.fn.init.call(this, [{ tags: t}]) }, isFormatted: function (e) { var t, n, i = []; for (n = 0; e.length > n; n++) (t = this.findFormat(e[n])) && a.name(t) == this.tag && i.push(t); if (1 > i.length) return !1; if (i.length != e.length) return !1; for (n = 0; i.length > n && i[n].parentNode == t.parentNode; n++) if (i[n] != t) return !1; return !0 }, findSuitable: function (e) { var t = a.parentOfType(e[0], this.tags); return t && a.name(t) == this.tag ? t : null } }), g = n.extend({ init: function (e, t) { var n = this; n.finder = new h(e), n.tag = e, n.unwrapTag = t }, wrap: function (e, t) { var n, i, r = a.create(e.ownerDocument, "li"); for (n = 0; t.length > n; n++) if (i = t[n], a.is(i, "li")) e.appendChild(i); else if (a.is(i, "ul") || a.is(i, "ol")) for (; i.firstChild; ) e.appendChild(i.firstChild); else if (a.is(i, "td")) { for (; i.firstChild; ) r.appendChild(i.firstChild); e.appendChild(r), i.appendChild(e), e = e.cloneNode(!1), r = r.cloneNode(!1) } else r.appendChild(i), a.isBlock(i) && (e.appendChild(r), a.unwrap(i), r = r.cloneNode(!1)); r.firstChild && e.appendChild(r) }, containsAny: function (e, t) { for (var n = 0; t.length > n; n++) if (a.isAncestorOrSelf(e, t[n])) return !0; return !1 }, suitable: function (e, t) { if ("k-marker" == e.className) { var n = e.nextSibling; if (n && a.isBlock(n)) return !1; if (n = e.previousSibling, n && a.isBlock(n)) return !1 } return this.containsAny(e, t) || a.isInline(e) || 3 == e.nodeType }, split: function (t) { var n, i, r, s, l, d, c = p(t); if (c.length) for (n = a.parentOfType(c[0], ["li"]), i = a.parentOfType(c[c.length - 1], ["li"]), t.setStartBefore(n), t.setEndAfter(i), r = 0, s = c.length; s > r; r++) l = this.finder.findFormat(c[r]), l && (d = e(l).parents("ul,ol"), d[0] ? o.split(t, d.last()[0], !0) : o.split(t, l, !0)) }, merge: function (e, t) { for (var n, i = t.previousSibling; i && ("k-marker" == i.className || 3 == i.nodeType && a.isWhitespace(i)); ) i = i.previousSibling; if (i && a.name(i) == e) { for (; t.firstChild; ) i.appendChild(t.firstChild); a.remove(t), t = i } for (n = t.nextSibling; n && ("k-marker" == n.className || 3 == n.nodeType && a.isWhitespace(n)); ) n = n.nextSibling; if (n && a.name(n) == e) { for (; t.lastChild; ) n.insertBefore(t.lastChild, n.firstChild); a.remove(t) } }, applyOnSection: function (t, n) { function i() { o.push(this) } var r, o, s, l, d, c, u, p = this.tag; for (r = 1 == n.length ? a.parentOfType(n[0], ["ul", "ol"]) : a.commonAncestor.apply(null, n), r || (r = a.parentOfType(n[0], ["p", "td"]) || n[0].ownerDocument.body), a.isInline(r) && (r = a.blockParentOrBody(r)), o = [], s = this.finder.findSuitable(n), s || (s = new h("ul" == p ? "ol" : "ul").findSuitable(n)), l = a.significantChildNodes(r), l.length || (l = n), /table|tbody/.test(a.name(r)) && (l = e.map(n, function (e) { return a.parentOfType(e, ["td"]) })), d = 0; l.length > d; d++) c = l[d], u = a.name(c), !this.suitable(c, n) || s && a.isAncestorOrSelf(s, c) || (!s || "ul" != u && "ol" != u ? o.push(c) : (e.each(c.childNodes, i), a.remove(c))); o.length != l.length || r == n[0].ownerDocument.body || /table|tbody|tr|td/.test(a.name(r)) || (o = [r]), s || (s = a.create(r.ownerDocument, p), a.insertBefore(s, o[0])), this.wrap(s, o), a.is(s, p) || a.changeTag(s, p), this.merge
87(p, s) }, apply: function (e) { var t, n, i, r = 0, o = []; do i = a.parentOfType(e[r], ["td", "body"]), t && i == t ? n.push(e[r]) : (t && o.push({ section: t, nodes: n }), n = [e[r]], t = i), r++; while (e.length > r); for (o.push({ section: t, nodes: n }), r = 0; o.length > r; r++) this.applyOnSection(o[r].section, o[r].nodes) }, unwrap: function (t) { var n, i, r, o, s = t.ownerDocument.createDocumentFragment(), l = this.unwrapTag; for (i = t.firstChild; i; i = i.nextSibling) { for (r = a.create(t.ownerDocument, l || "p"); i.firstChild; ) o = i.firstChild, a.isBlock(o) ? (r.firstChild && (s.appendChild(r), r = a.create(t.ownerDocument, l || "p")), s.appendChild(o)) : r.appendChild(o); r.firstChild && s.appendChild(r) } n = e(t).parents("ul,ol"), n[0] ? (a.insertAfter(s, n.last()[0]), n.last().remove()) : a.insertAfter(s, t), a.remove(t) }, remove: function (e) { var t, n, i; for (n = 0, i = e.length; i > n; n++) t = this.finder.findFormat(e[n]), t && this.unwrap(t) }, toggle: function (e) { var t, n = this, i = p(e), r = e.commonAncestorContainer; i.length || (e.selectNodeContents(r), i = p(e), i.length || (t = r.ownerDocument.createTextNode(""), e.startContainer.appendChild(t), i = [t], e.selectNode(t.parentNode))), n.finder.isFormatted(i) ? (n.split(e), n.remove(i)) : n.apply(i) } }), m = l.extend({ init: function (e) { e.formatter = new g(e.tag), l.fn.init.call(this, e) } }), v = c.extend({ init: function (e) { this.options = e, c.fn.init.call(this, i(e, { finder: new h(e.tag) })) }, command: function (e) { return new m(i(e, { tag: this.options.tag })) } }); i(r, { ListFormatFinder: h, ListFormatter: g, ListCommand: m, ListTool: v }), f("insertUnorderedList", new v({ tag: "ul", template: new d({ template: s.buttonTemplate, title: "Remove Link" }) })), f("insertOrderedList", new v({ tag: "ol", template: new d({ template: s.buttonTemplate, title: "Remove Link" }) })) } (window.kendo.jQuery), function (e) { var t = window.kendo, n = t.Class, i = e.extend, r = t.ui.editor, a = r.Dom, o = r.RangeUtils, s = r.EditorUtils, l = r.Command, d = r.Tool, c = r.ToolTemplate, u = r.InlineFormatter, p = r.InlineFormatFinder, f = o.textNodes, h = r.EditorUtils.registerTool, g = n.extend({ findSuitable: function (e) { return a.parentOfType(e, ["a"]) } }), m = n.extend({ init: function () { this.finder = new g }, apply: function (e, t) { var n, i, r, s, l = f(e); t.innerHTML ? (n = o.getMarkers(e), i = o.documentFromRange(e), e.deleteContents(), s = a.create(i, "a", t), e.insertNode(s), "a" == a.name(s.parentNode) && a.insertAfter(s, s.parentNode), n.length > 1 && (a.insertAfter(n[n.length - 1], s), a.insertAfter(n[1], s), a[l.length > 0 ? "insertBefore" : "insertAfter"](n[0], s))) : (r = new u([{ tags: ["a"]}], t), r.finder = this.finder, r.apply(l)) } }), v = l.extend({ init: function (e) { e.formatter = { toggle: function (e) { new u([{ tags: ["a"]}]).remove(f(e)) } }, this.options = e, l.fn.init.call(this, e) } }), _ = l.extend({ init: function (e) { var t = this; t.options = e, l.fn.init.call(t, e), t.formatter = new m, e.url ? this.exec = function () { this.formatter.apply(e.range, { href: e.url, innerHTML: e.text || e.url, target: e.target }) } : (t.attributes = null, t.async = !0) }, _dialogTemplate: function (e) { return t.template("<div class=\"k-editor-dialog\"><ol><li class='k-form-text-row'><label for='k-editor-link-url'>#: messages.linkWebAddress #</label><input type='text' class='k-input' id='k-editor-link-url'></li># if (showText) { #<li class='k-form-text-row'><label for='k-editor-link-text'>#: messages.linkText #</label><input type='text' class='k-input' id='k-editor-link-text'></li># } #<li class='k-form-text-row'><label for='k-editor-link-title'>#: messages.linkToolTip #</label><input type='text' class='k-input' id='k-editor-link-title'></li><li class='k-form-checkbox-row'><input type='checkbox' id='k-editor-link-target'><label for='k-editor-link-target'>#: messages.linkOpenInNewWindow #</label></li></ol><div class='k-button-wrapper'><button class=\"k-dialog-insert k-button\">#: messages.dialogInsert #</button> #: messages.dialogButtonSeparator # <a href=\"\\#\" class=\"k-dialog-close k-link\">#: messages.dialogCancel #</a></div></div>")({ messages: this.editor.options.messages, showText: e }) }, exec: function () { function n(t) { var n, i, a, o = u.element, s = e("#k-editor-link-url", o).val(); s && "http://" != s && (p.attributes = { href: s }, n = e("#k-editor-link-title", o).val(), n && (p.attributes.title = n), i = e("#k-editor-link-text", o).val(), i === m || !i && 0 !== l.length || (p.attributes.innerHTML = i || s), a = e("#k-editor-link-target", o).is(":checked"), p.attributes.target = a ? "_blank" : null, p.formatter.apply(h, p.attributes)), r(t), p.change && p.change() } function r(e) { e.preventDefault(), u.destroy(), a.windowFromDocument(o.documentFromRange(h)).focus(), p.releaseRange(h) } var l, d, c, u, p = this, h = p.getRange(), g = h.collapsed, m = null, v = p.editor.options.messages; h = p.lockRange(!0), l = f(h), d = l.length ? p.formatter.finder.findSuitable(l[0]) : null, c = 1 >= l.length || 2 == l.length && g, u = s.createDialog(p._dialogTemplate(c), p.editor, i({}, p.editor.options.dialogOptions, { title: v.createLink, close: r, visible: !1 })).find(".k-dialog-insert").click(n).end().find(".k-dialog-close").click(r).end().find(".k-form-text-row input").keydown(function (e) { var i = t.keys; e.keyCode == i.ENTER ? n(e) : e.keyCode == i.ESC && r(e) }).end().find("#k-editor-link-url").val(d ? d.getAttribute("href", 2) : "http://").end().find("#k-editor-link-text").val(l.length > 0 ? 1 == l.length ? l[0].nodeValue : l[0].nodeValue + l[1].nodeValue : "").end().find("#k-editor-link-title").val(d ? d.title : "").end().find("#k-editor-link-target").attr("checked", d ? "_blank" == d.target : !1).end().data("kendoWindow").center().open(), c && l.length > 0 && (m = e("#k-editor-link-text", u.element).val()), e("#k-editor-link-url", u.element).focus().select() }, redo: function () { var e = this, t = e.lockRange(!0); e.formatter.apply(t, e.attributes), e.releaseRange(t) } }), b = d.extend({ init: function (t) { this.options = t, this.finder = new p([{ tags: ["a"]}]), d.fn.init.call(this, e.extend(t, { command: v })) }, initialize: function (e, t) { d.fn.initialize.call(this, e, t), e.addClass("k-state-disabled") }, update: function (e, t) { e.toggleClass("k-state-disabled", !this.finder.isFormatted(t)).removeClass("k-state-hover") } }); i(t.ui.editor, { LinkFormatFinder: g, LinkFormatter: m, UnlinkCommand: v, LinkCommand: _, UnlinkTool: b }), h("createLink", new d({ key: "K", ctrl: !0, command: _, template: new c({ template: s.buttonTemplate, title: "Create Link" }) })), h("unlink", new b({ key: "K", ctrl: !0, shift: !0, template: new c({ template: s.buttonTemplate, title: "Remove Link" }) })) } (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = e.extend, r = n.ui.editor, a = r.EditorUtils, o = r.Dom, s = a.registerTool, l = r.ToolTemplate, d = r.RangeUtils, c = r.Command, u = n.keys, p = "#k-editor-image-url", f = "#k-editor-image-title", h = c.extend({ init: function (e) { var t = this; c.fn.init.call(t, e), t.async = !0, t.attributes = {} }, insertImage: function (e, t) { var n = this.attributes; if (n.src && "http://" != n.src) { if (!e) return e = o.create(d.documentFromRange(t), "img", n), e.onload = e.onerror = function () { e.removeAttribute("complete"), e.removeAttribute("width"), e.removeAttribute("height") }
87, t.deleteContents(), t.insertNode(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"># if (showBrowser) { #<div class="k-imagebrowser"></div># } #<ol><li class="k-form-text-row"><label for="k-editor-image-url">#: messages.imageWebAddress #</label><input type="text" class="k-input" id="k-editor-image-url"></li><li class="k-form-text-row"><label for="k-editor-image-title">#: messages.imageAltText #</label><input type="text" class="k-input" id="k-editor-image-title"></li></ol><div class="k-button-wrapper"><button class="k-dialog-insert k-button">#: messages.dialogInsert #</button> #: messages.dialogButtonSeparator # <a href="\\#" class="k-dialog-close k-link">#: messages.dialogCancel #</a></div></div>')({ messages: this.editor.options.messages, showBrowser: e }) }, redo: function () { var e = this, t = e.lockRange(); e.insertImage(d.image(t), t) || e.releaseRange(t) }, exec: function () { function r(e) { var t = c.element; g.attributes = { src: t.find(p).val().replace(/ /g, "%20"), alt: t.find(f).val() }, v = g.insertImage(_, m), s(e), g.change && g.change() } function s(e) { e.preventDefault(), c.destroy(), o.windowFromDocument(d.documentFromRange(m)).focus(), v || g.releaseRange(m) } function l(e) { e.keyCode == u.ENTER ? r(e) : e.keyCode == u.ESC && s(e) } var c, h, g = this, m = g.lockRange(), v = !1, _ = d.image(m), b = g.editor.options, k = b.messages, w = b.imageBrowser, y = !!(n.ui.ImageBrowser && w && w.transport && w.transport.read !== t); h = y ? { width: "960px", height: "650px"} : {}, c = a.createDialog(g._dialogTemplate(y), g.editor, i(h, b.dialogOptions, { title: k.insertImage, close: s, visible: !1, resizable: y, activate: function () { if (y) { var e = this; new n.ui.ImageBrowser(e.element.find(".k-imagebrowser"), i({}, w, { change: function () { e.element.find(p).val(this.value()) }, apply: r })) } } })).find(".k-dialog-insert").click(r).end().find(".k-dialog-close").click(s).end().find(".k-form-text-row input").keydown(l).end().find(p).val(_ ? _.getAttribute("src", 2) : "http://").end().find(f).val(_ ? _.alt : "").end().data("kendoWindow").center().open(), e(p, c.element).focus().select() } }); n.ui.editor.ImageCommand = h, s("insertImage", new r.Tool({ command: h, template: new l({ template: a.buttonTemplate, title: "Insert Image" }) })) } (window.kendo.jQuery), function (e, t) { var n = window.kendo, i = n.ui.DropDownList, r = i.extend({ init: function (e, t) { var n = this; i.fn.init.call(n, e, t), n.value(n.options.title) }, options: { name: "SelectBox" }, value: function (e) { var n = this, r = i.fn.value.call(n, e); return e === t ? r : (e !== i.fn.value.call(n) && (n.text(n.options.title), n._current.removeClass("k-state-selected"), n.current(null), n._oldIndex = n.selectedIndex = -1), t) } }); n.ui.plugin(r), n.ui.editor.SelectBox = r } (window.kendo.jQuery), function (e, t) { function n(n, i) { var r = "rtl" == e(n).css("direction"), a = r ? "Right" : "Left", o = "td" != s.name(n) ? "margin" + a : "padding" + a; return i === t ? n.style[o] || 0 : (i > 0 ? n.style[o] = i + "px" : (n.style[o] = "", n.style.cssText || n.removeAttribute("style")), t) } var i = window.kendo, r = i.Class, a = e.extend, o = i.ui.editor, s = o.Dom, l = o.EditorUtils, d = l.registerTool, c = o.Command, u = o.Tool, p = o.ToolTemplate, f = o.RangeUtils, h = s.blockElements, g = o.BlockFormatFinder, m = o.BlockFormatter, v = r.extend({ init: function () { this.finder = new g([{ tags: s.blockElements}]) }, apply: function (t) { var i, r, a, o, l, d, c, u, p, f, h = this.finder.findSuitable(t), g = []; if (h.length) { for (i = 0, r = h.length; r > i; i++) s.is(h[i], "li") ? e(h[i]).index() ? 0 > e.inArray(h[i].parentNode, g) && g.push(h[i]) : g.push(h[i].parentNode) : g.push(h[i]); for (; g.length; ) if (a = g.shift(), s.is(a, "li")) if (o = a.parentNode, l = e(a).prev("li"), d = l.find("ul,ol").last(), c = e(a).children("ul,ol")[0], c && l[0]) d[0] ? (d.append(a), d.append(e(c).children()), s.remove(c)) : (l.append(c), c.insertBefore(a, c.firstChild)); else for (c = l.children("ul,ol")[0], c || (c = s.create(a.ownerDocument, s.name(o)), l.append(c)); a && a.parentNode == o; ) c.appendChild(a), a = g.shift(); else for (u = parseInt(n(a), 10) + 30, n(a, u), p = 0; g.length > p;
87 p++) e.contains(a, g[p]) && g.splice(p, 1) } else f = new m([{ tags: "p"}], { style: { marginLeft: 30} }), f.apply(t) }, remove: function (t) { var i, r, a, o, s, l, d, c, u = this.finder.findSuitable(t); for (r = 0, a = u.length; a > r; r++) { if (d = e(u[r]), d.is("li")) { if (o = d.parent(), s = o.parent(), s.is("li,ul,ol") && !n(o[0])) { if (i && e.contains(i, s[0])) continue; l = d.nextAll("li"), l.length && e(o[0].cloneNode(!1)).appendTo(d).append(l), s.is("li") ? d.insertAfter(s) : d.appendTo(s), o.children("li").length || o.remove(); continue } if (i == o[0]) continue; i = o[0] } else i = u[r]; c = parseInt(n(i), 10) - 30, n(i, c) } } }), _ = c.extend({ init: function (e) { e.formatter = { toggle: function (e) { (new v).apply(f.nodes(e)) } }, c.fn.init.call(this, e) } }), b = c.extend({ init: function (e) { e.formatter = { toggle: function (e) { (new v).remove(f.nodes(e)) } }, c.fn.init.call(this, e) } }), k = u.extend({ init: function (e) { u.fn.init.call(this, e), this.finder = new g([{ tags: h}]) }, update: function (i, r) { var a, o, l, d, c = this.finder.findSuitable(r); for (l = 0, d = c.length; d > l; l++) if (a = n(c[l]), a || (o = e(c[l]).parents("ul,ol").length, a = s.is(c[l], "li") && (o > 1 || n(c[l].parentNode)) || s.ofType(c[l], ["ul", "ol"]) && o > 0), a) return i.removeClass("k-state-disabled"), t; i.addClass("k-state-disabled").removeClass("k-state-hover") } }); a(o, { IndentFormatter: v, IndentCommand: _, OutdentCommand: b, OutdentTool: k }), d("indent", new u({ command: _, template: new p({ template: l.buttonTemplate, title: "Indent" }) })), d("outdent", new k({ command: b, template: new p({ template: l.buttonTemplate, title: "Outdent" }) })) } (window.kendo.jQuery), function (e) { var t = window.kendo, n = e.extend, i = t.ui.editor, r = i.Dom, a = i.RangeUtils, o = i.EditorUtils, s = i.Command, l = i.Tool, d = i.ToolTemplate, c = s.extend({ init: function (e) { var t = this; t.options = e, s.fn.init.call(t, e), t.attributes = null, t.async = !0 }, exec: function () { function i(e) { d.value(f.find(g).val()), s(e), l.change && l.change(), d.trigger("change") } function s(e) { e.preventDefault(), f.data("kendoWindow").destroy(); try { r.windowFromDocument(a.documentFromRange(u)).focus() } catch (t) { } } var l = this, d = l.editor, u = d.getRange(), p = d.options.messages, f = e(t.template(c.template)(p)).appendTo(document.body), h = c.indent(d.value()), g = ".k-editor-textarea"; o.createDialog(f, d, n({}, d.options.dialogOptions, { title: p.viewHtml, close: s, visible: !1 })).find(g).val(h).end().find(".k-dialog-update").click(i).end().find(".k-dialog-close").click(s).end().data("kendoWindow").center().open(), f.find(g).focus() } }); n(c, { template: "<div class='k-editor-dialog'><textarea class='k-editor-textarea k-input'></textarea><div class='k-button-wrapper'><button class='k-dialog-update k-button'>#: dialogUpdate #</button> #: dialogButtonSeparator # <a href='\\#' class='k-dialog-close k-link'>#: dialogCancel #</a></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$/, "") } }), t.ui.editor.ViewHtmlCommand = c, i.EditorUtils.registerTool("viewHtml", new l({ command: c, template: new d({ template: o.buttonTemplate, title: "View HTML" }) })) } (window.kendo.jQuery), function (e) { 88 var t = window.kendo, n = t.Class, i = e.extend, r = t.ui.editor, a = r.RangeUtils, o = r.Marker, s = n.extend({ init: function (e) { this.editor = e, this.formats = [] }, apply: function (e) { 89 var t, n, r, s, l, d, c, u; if (this.hasPending()) { 90 if (t = new o, t.addCaret(e), n = e.startContainer.childNodes[e.startOffset], r = n.previousSibling, r ? (r.nodeValue || (r = r.previousSibling), e.setStart(r, r.nodeValue.length - 1)) : e.setStart(e.startContainer, e.startOffset), t.add(e), !a.textNodes(e).length) return t.remove(e), e.collapse(!0), this.editor.selectRange(e), void 0; 91 for (s = t.end.previousSibling.previousSibling, d = this.formats, c = 0; d.length > c; c++) l = d[c], u = l.command(i({ range: e }, l.options.params)), u.editor = this.editor, u.exec(), e.selectNode(s); t.remove(e), s.parentNode && (e.setStart(s, 1), e.collapse(!0)), this.clear(), this.editor.selectRange(e) 92 } 93 }, hasPending: function () { return this.formats.length > 0 }, isPending: function (e) { return !!this.getPending(e) }, getPending: function (e) { var t, n = this.formats; for (t = 0; n.length > t; t++) if (n[t].name == e) return n[t] }, toggle: function (e) { var t, n = this.formats; for (t = 0; n.length > t; t++) if (n[t].name == e.name) return n[t].params && n[t].params.value != e.params.value ? n[t].params.value = e.params.value : n.splice(t, 1), void 0; n.push(e) }, clear: function () { this.formats = [] } 94 }); i(r, { PendingFormats: s }) 95} (window.kendo.jQuery), function (e, t) { function n(e, t) { return '<span unselectable="on" class="k-link"><span unselectable="on" class="k-icon k-i-arrow-' + e + '" title="' + t + '">' + t + "</span></span>" } function i(n, i) { var r, a, o, s, l, d = i !== t; return n.selectionStart !== t ? d ? (n.focus(), n.setSelectionRange(i, i)) : i = [n.selectionStart, n.selectionEnd] : document.selection && (e(n).is(":visible") && n.focus(), r = document.selection.createRange(), d ? (r.move("character", i), r.select()) : (s = n.createTextRange(), l = s.duplicate(), s.moveToBookmark(r.getBookmark()), l.setEndPoint("EndToStart", s), a = l.text.length, o = a + s.text.length, i = [a, o])), i } var r = window.kendo, a = r.keys, o = r.ui, s = o.Widget, l = r._activeElement, d = r._extractFormat, c = r.parseFloat, u = r.support.placeholder, p = r.getCulture, f = r._round, h = "change", g = "disabled", m = "readonly", v = "k-input", _ = "spin", b = ".kendoNumericTextBox", k = "touchend", w = "mouseleave" + b, y = "mouseenter" + b + " " + w, x = "k-state-default", C = "k-state-focused", T = "k-state-hover", S = "focus", F = ".", D = "k-state-selected", E = "k-state-disabled", A = "aria-disabled", I = "aria-readonly", H = null, N = e.proxy, R = { 190: ".", 188: "," }, z = s.extend({ init: function (e, n) { var i, a, o, l, c, u = this, p = n && n.step !== t; s.fn.init.call(u, e, n), n = u.options, e = u.element.on("blur" + b, N(u._focusout, u)).attr("role", "spinbutton"), n.placeholder = n.placeholder || e.attr("placeholder"), u._reset(), u._wrapper(), u._arrows(), u._input(), r.support.mobileOS ? u._text.on(k + b + " " + S + b, function (t) { u._toggleText(!1), t.type === S && e.focus() }) : u._text.on(S + b, N(u._click, u)), i = u.min(e.attr("min")), a = u.max(e.attr("max")), o = u._parse(e.attr("step")), n.min === H && i !== H && (n.min = i), n.max === H && a !== H && (n.max = a), p || o === H || (n.step = o), e.attr("aria-valuemin", n.min).attr("aria-valuemax", n.max), n.format = d(n.format), l = n.value, u.value(l !== H ? l : e.val()), c = e.is("[disabled]"), c ? u.enable(!1) : u.readonly(e.is("[readonly]")), r.n
95otify(u) }, options: { name: "NumericTextBox", decimals: H, min: H, max: H, value: H, step: 1, culture: "", format: "n", spinners: !0, placeholder: "", upArrowText: "Increase value", downArrowText: "Decrease value" }, events: [h, _], _editable: function (e) { var t = this, n = t.element, i = e.disable, r = e.readonly, a = t._text.add(n), o = t._inputWrapper.off(y); t._toggleText(!0), t._upArrowEventHandler.unbind("press"), t._downArrowEventHandler.unbind("press"), n.off("keydown" + b).off("paste" + b), r || i ? (o.addClass(i ? E : x).removeClass(i ? x : E), a.attr(g, i).attr(m, r).attr(A, i).attr(I, r)) : (o.addClass(x).removeClass(E).on(y, t._toggleHover), a.removeAttr(g).removeAttr(m).attr(A, !1).attr(I, !1), t._upArrowEventHandler.bind("press", function (e) { e.preventDefault(), t._spin(1), t._upArrow.addClass(D) }), t._downArrowEventHandler.bind("press", function (e) { e.preventDefault(), t._spin(-1), t._downArrow.addClass(D) }), t.element.on("keydown" + b, N(t._keydown, t)).on("paste" + b, N(t._paste, t))) }, readonly: function (e) { this._editable({ readonly: e === t ? !0 : e, disable: !1 }) }, enable: function (e) { this._editable({ readonly: !1, disable: !(e = e === t ? !0 : e) }) }, destroy: function () { var e = this; e.element.add(e._text).add(e._upArrow).add(e._downArrow).add(e._inputWrapper).off(b), 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, i = this; return e === t ? i._value : (e = i._parse(e), n = i._adjust(e), e === n && (i._update(e), i._old = i._value), t) }, focus: function () { this._focusin() }, _adjust: function (e) { var t = this, n = t.options, i = n.min, r = n.max; return e === H ? e : (i !== H && i > e ? e = i : r !== H && e > r && (e = r), e) }, _arrows: function () { var t, i = this, a = function () { clearTimeout(i._spinning), t.removeClass(D) }, o = i.options, s = o.spinners, l = i.element; t = l.siblings(".k-icon"), t[0] || (t = e(n("n", o.upArrowText) + n("s", o.downArrowText)).insertAfter(l), t.wrapAll('<span class="k-select"/>')), s || (t.parent().toggle(s), i._inputWrapper.addClass("k-expand-padding")), i._upArrow = t.eq(0), i._upArrowEventHandler = new r.UserEvents(i._upArrow, { release: a }), i._downArrow = t.eq(1), i._downArrowEventHandler = new r.UserEvents(i._downArrow, { release: a }) }, _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 = e.target, r = i(n)[0], a = n.value.substring(0, r), o = t._format(t.options.format), s = o[","], l = RegExp("\\" + s, "g"), d = RegExp("([\\d\\" + s + "]+)(\\" + o[F] + ")?(\\d+)?"), c = d.exec(a), u = 0; c && (u = c[0].replace(l, "").length, -1 != a.indexOf("(") && 0 > t._value && u++), t._focusin(), i(t.element[0], u) }) }, _change: function (e) { var t = this; t._update(e), e = t._value, t._old != e && (t._old = e, t.trigger(h), t.element.trigger(h)) }, _culture: function (e) { return e || p(this.options.culture) }, _focusin: function () { var e = this; e._inputWrapper.addClass(C), e._toggleText(!1), e.element[0].focus() }, _focusout: function () { var e = this; clearTimeout(e._focusing), e._inputWrapper.removeClass(C).removeClass(T), e._blur() }, _format: function (e, t) { var n = this._culture(t).numberFormat; return e = e.toLowerCase(), e.indexOf("c") > -1 ? n = n.currency : e.indexOf("p") > -1 && (n = n.percent), n }, _input: function () { var t, n = this, i = "k-formatted-value", r = n.element.addClass(v).show()[0], a = r.accessKey, o = n.wrapper; t = o.find(F + i), t[0] || (t = e('<input type="text"/>').insertBefore(r).addClass(i)), r.type = "text", t[0].tabIndex = r.tabIndex, t[0].style.cssText = r.style.cssText, t.prop("placeholder", n.options.placeholder), a && (t.attr("accesskey", a), r.accessKey = ""), n._text = t.addClass(r.className) }, _keydown: function (e) { var t = this, n = e.keyCode; n == a.DOWN ? t._step(-1) : n == a.UP ? t._step(1) : n == a.ENTER && t._change(t.element.val()), t._prevent(n, e.shiftKey) && !e.ctrlKey && e.preventDefault() }, _paste: function (e) { var t = this, n = e.target, i = n.value; setTimeout(function () { t._parse(n.value) === H && t._update(i) }) }, _prevent: function (e, t) { var n, r = this, o = r.element[0], s = o.value, l = r.options, d = l.min, c = r._format(l.format), u = c[F], p = l.decimals, f = i(o), h = f[0], g = f[1], m = 0 === h && g === s.length, v = !0; return p === H && (p = c.decimals), e > 16 && 21 > e || e > 32 && 37 > e || e > 47 && 58 > e || e > 95 && 106 > e || e == a.INSERT || e == a.DELETE || e == a.LEFT || e == a.RIGHT || e == a.TAB || e == a.BACKSPACE || e == a.ENTER ? (v = !1, t && (n = parseInt(String.fromCharCode(e), 10), isNaN(n) || (n += "", s = s.substring(0, h) + n + s.substring(g), (-1 === o.maxLength || o.maxLength >= s.length) && (o.value = s, i(o, h + n.length)), v = !0))) : (R[e] === u || 110 == e) && p > 0 && (-1 == s.indexOf(u) || m) ? 110 == e ? (o.value = s.substring(0, h) + u + s.substring(g), i(o, h + u.length)) : t || (v = !1) : !(d === H || 0 > d) || -1 != s.indexOf("-") || 189 != e && 109 != e && 173 != e || 0 !== h || (v = !1), v }, _option: function (e, n) { var i = this, r = i.options; return n === t ? r[e] : (n = i._parse(n), (n || "step" !== e) && (r[e] = n, i.element.attr("aria-value" + e, n).attr(e, n)), t) }, _spin: function (e, t) { var n = this; t = t || 500, clearTimeout(n._spinning), n._spinning = setTimeout(function () { n._spin(e, 50) }, t), n._step(e) }, _step: function (e) { var t = this, n = t.element, i = t._parse(n.val()) || 0;
95 l() != n[0] && t._focusin(), i += t.options.step * e, t._update(t._adjust(i)), t.trigger(_) }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(T, "mouseenter" === t.type) }, _toggleText: function (e) { var t = this; t._text.toggle(e), t.element.toggle(!e) }, _parse: function (e, t) { return c(e, this._culture(t), this.options.format) }, _update: function (e) { var t, n = this, i = n.options, a = i.format, o = i.decimals, s = n._culture(), l = n._format(a, s); o === H && (o = l.decimals), e = n._parse(e, s), t = e !== H, t && (e = parseFloat(f(e, o))), n._value = e = n._adjust(e), n._placeholder(r.toString(e, a, s)), t ? (e = "" + e, -1 !== e.indexOf("e") && (e = f(+e, o))) : e = "", n.element.val(e).attr("aria-valuenow", e) }, _placeholder: function (e) { this._text.val(e), u || e || this._text.val(this.options.placeholder) }, _wrapper: function () { var t, n = this, i = n.element, r = i[0]; t = i.parents(".k-numerictextbox"), t.is("span.k-numerictextbox") || (t = i.hide().wrap('<span class="k-numeric-wrap k-state-default" />').parent(), t = t.wrap("<span/>").parent()), t[0].style.cssText = r.style.cssText, r.style.width = "", n.wrapper = t.addClass("k-widget k-numerictextbox").addClass(r.className).css("display", ""), n._inputWrapper = e(t[0].firstChild) }, _reset: function () { var e = this, t = e.element, n = t.closest("form"); n[0] && (e._resetHandler = function () { setTimeout(function () { e.value(t[0].value) }) }, e._form = n.on("reset", e._resetHandler)) } }); o.plugin(z) } (window.kendo.jQuery), function (e, t) { function n(e, t) { return e = e.split(" ")[!t + 0] || e, e.replace("top", "up").replace("bottom", "down") } function i(e, t, n) { e = e.split(" ")[!t + 0] || e; var i = { origin: ["bottom", n ? "right" : "left"], position: ["top", n ? "right" : "left"] }, r = /left|right/.test(e); return r ? (i.origin = ["top", e], i.position[1] = l.directions[e].reverse) : (i.origin[0] = e, i.position[0] = l.directions[e].reverse), i.origin = i.origin.join(" "), i.position = i.position.join(" "), i } function r(t, n) { try { return e.contains(t, n) } catch (i) { return !1 } } function a(t) { t = e(t), t.addClass("k-item").children(x).addClass(I), t.children("a").addClass(S).children(x).addClass(I), t.filter(":not([disabled])").addClass(B), t.filter(".k-separator:empty").append(" "), t.filter("li[disabled]").addClass(W).removeAttr("disabled").attr("aria-disabled", !0), t.filter("[role]").length || t.attr("role", "menuitem"), t.children("." + S).length || t.contents().filter(function () { return !(this.nodeName.match(w) || 3 == this.nodeType && !e.trim(this.nodeValue)) }).wrapAll("<span class='" + S + "'/>"), o(t), s(t) } function o(t) { t = e(t), t.find("> .k-link > [class*=k-i-arrow]").remove(), t.filter(":has(.k-group)").children(".k-link:not(:has([class*=k-i-arrow]))").each(function () { var t = e(this), n = t.parent().parent(); t.append("<span class='k-icon " + (n.hasClass(T + "-horizontal") ? "k-i-arrow-s" : "k-i-arrow-e") + "'/>") }) } function s(t) { t = e(t), t.filter(".k-first:not(:first-child)").removeClass(A), t.filter(".k-last:not(:last-child)").removeClass(F), t.filter(":first-child").addClass(A), t.filter(":last-child").addClass(F) } var l = window.kendo, d = l.ui, c = l._activeElement, u = l.support.touch && l.support.mobileOS, p = u || l.support.pointers, f = "mousedown", h = "click", g = e.extend, m = e.proxy, v = e.each, _ = l.template, b = l.keys, k = d.Widget, w = /^(ul|a|div)$/i, y = ".kendoMenu", x = "img", C = "open", T = "k-menu", S = "k-link", F = "k-last", D = "close", E = "timer", A = "k-first", I = "k-image", H = "select", N = "zIndex", R = "activate", z = "deactivate", O = l.supp
95ort.pointers ? "MSPointerOver" : "mouseenter", M = l.support.pointers ? "MSPointerOut" : "mouseleave", P = "kendoPopup", B = "k-state-default", L = "k-state-hover", V = "k-state-focused", W = "k-state-disabled", U = ".k-group", q = ":not(.k-list) > .k-item", j = ".k-item.k-state-disabled", G = ".k-item:not(.k-state-disabled)", $ = ".k-item:not(.k-state-disabled) > .k-link", K = ":not(.k-item.k-separator)", Y = K + ":eq(0)", Q = K + ":last", J = "div:not(.k-animation-container,.k-list-container)", X = { content: _("<div class='k-content k-group' tabindex='-1'>#= content(item) #</div>"), group: _("<ul class='#= groupCssClass(group) #'#= groupAttributes(group) # role='menu' aria-hidden='true'>#= renderItems(data) #</ul>"), itemWrapper: _("<#= tag(item) # class='#= textClass(item) #'#= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"), item: _("<li class='#= wrapperCssClass(group, item) #' role='menuitem' #=item.items ? \"aria-haspopup='true'\": \"\"##=item.enabled === false ? \"aria-disabled='true'\" : ''#>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, menu: menu, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"), image: _("<img class='k-image' alt='' src='#= imageUrl #' />"), arrow: _("<span class='#= arrowClass(item, group) #'></span>"), sprite: _("<span class='k-sprite #= spriteCssClass #'></span>"), empty: _("") }, Z = { wrapperCssClass: function (e, t) { var n = "k-item", i = t.index; return n += t.enabled === !1 ? " k-state-disabled" : " k-state-default", e.firstLevel && 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), t.cssClass && (n += " " + t.cssClass), n }, textClass: function () { return S }, textAttributes: function (e) { return e.url ? " href='" + e.url + "'" : "" }, arrowClass: function (e, t) { var n = "k-icon"; return n += t.horizontal ? " k-i-arrow-s" : " k-i-arrow-e" }, text: function (e) { return e.encoded === !1 ? e.text : l.htmlEncode(e.text) }, tag: function (e) { return e.url ? "a" : "span" }, groupAttributes: function (e) { return e.expanded !== !0 ? " style='display:none'" : "" }, groupCssClass: function () { return "k-group" }, content: function (e) { return e.content ? e.content : " " } }, et = k.extend({ init: function (t, n) { var i = this; k.fn.init.call(i, t, n), t = i.wrapper = i.element, n = i.options, i._initData(n), i._updateClasses(), i._animations(n), i.nextItemZIndex = 100, i._tabindex(), i._focusProxy = m(i._focusHandler, i), t.on("touchstart MSPointerDown", i._focusProxy).on(h + y, j, !1).on(h + y, G, m(i._click, i)).on("keydown" + y, m(i._keydown, i)).on("focus" + y, m(i._focus, i)).on("focus" + y, ".k-content", m(i._focus, i)).on("blur" + y, m(i._removeHoverItem, i)).on("blur" + y, "[tabindex]", m(i._checkActiveElement, i)).on(O + y, G, m(i._mouseenter, i)).on(M + y, G, m(i._mouseleave, i)).on(O + y + " " + M + y + " " + f + y + " " + h + y, $, m(i._toggleHover, i)), n.openOnClick && (i.clicked = !1, i._documentClickHandler = m(i._documentClick, i), e(document).click(i._documentClickHandler)), t.attr("role", "menubar"), t[0].id && (i._ariaId = l.format("{0}_mn_active", t[0].id)), l.notify(i) }, events: [C, D, R, z, H], options: { name: "Menu", animation: { open: { duration: 200 }, close: { duration: 100} }, orientation: "horizontal", direction: "default", openOnClick: !1, closeOnClick: !0, hoverDelay: 100 }, _initData: function (e) { var t = this; e.dataSource && (t.element.empty(), t.append(e.dataSource, t.element)) }, setOptions: function (e) { var t = this.options.animation; this._animations(e), e.animation = g(!0, t, e.animation), "dataSource" in e && this._initData(e), k.fn.setOptions.call(this, e) }, destroy: function () { var t = this; k.fn.destroy.call(t), t.element.off(y), t._documentClickHandler && e(document).unbind("click", t._documentClickHandler) }, enable: function (e, t) { return this._toggleDisabled(e, t !== !1), this }, disable: function (e) { return this._toggleDisabled(e, !1), this }, append: function (e, t) { t = this.element.find(t); var n = this._insert(e, t, t.length ? t.find("> .k-group, > .k-animation-container > .k-group") : null); return v(n.items, function () { n.group.append(this), o(this) }), o(t), s(n.group.find(".k-first, .k-last").add(n.items)), this }, insertBefore: function (e, t) { t = this.element.find(t); var n = this._insert(e, t, t.parent()); return v(n.items, function () { t.before(this), o(this), s(this) }), s(t), this }, insertAfter: function (e, t) { t = this.element.find(t); var n = this._insert(e, t, t.parent()); return v(n.items, function () { t.after(this), o(this), s(this) }), s(t), this }, _insert: function (t, n, i) { var r, o, s, l, d = this; return n && n.length || (i = d.element), s = e.isPlainObject(t), l = { firstLevel: i.hasClass(T), horizontal: i.hasClass(T + "-horizontal"), expanded: !0, length: i.children().length }, n && !i.length && (i = e(et.renderGroup({ group: l })).appendTo(n)), s || e.isArray(t) ? r = e.map(s ? [t] : t, function (t, n) { return "string" == typeof t ? e(t) : e(et.renderItem({ group: l, item: g(t, { index: n }) })) }) : (r = e(t), o = r.find("> ul").addClass("k-group").attr("role", "menu"), r = r.filter("li"), r.add(o.find("> li")).each(function () { a(this) })), { items: r, group: i} }, remove: function (e) { var t, n, i, r; return e = this.element.find(e), t = this, n = e.parentsUntil(t.element, q), i = e.parent("ul"), e.remove(), i && !i.children(q).length && (r = i.parent(".k-animation-container"), r.length ? r.remove() : i.remove()), n.length && (n = n.eq(0), o(n), s(n)), t }, open: function (r) { var a = this, o = a.options, s = "horizontal" == o.orientation, d = o.direction, c = l.supp
95ort.isRtl(a.wrapper); return r = a.element.find(r), /^(top|bottom|default)$/.test(d) && (d = c ? s ? (d + " left").replace("default", "bottom") : "left" : s ? (d + " right").replace("default", "bottom") : "right"), r.siblings().find(">.k-popup:visible,>.k-animation-container>.k-popup:visible").each(function () { var t = e(this).data("kendoPopup"); t && t.close() }), r.each(function () { var r = e(this); clearTimeout(r.data(E)), r.data(E, setTimeout(function () { var e, l, u, p, f, h, m = r.find(".k-group:first:hidden"); m[0] && a.trigger(C, { item: r[0] }) === !1 && (r.data(N, r.css(N)), r.css(N, a.nextItemZIndex++), e = m.data(P), l = r.parent().hasClass(T), u = l && s, p = i(d, l, c), f = o.animation.open.effects, h = f !== t ? f : "slideIn:" + n(d, l), e ? (e = m.data(P), e.options.origin = p.origin, e.options.position = p.position, e.options.animation.open.effects = h) : e = m.kendoPopup({ activate: function () { a.trigger(R, { item: this.wrapper.parent() }) }, deactivate: function () { a.trigger(z, { item: this.wrapper.parent() }) }, origin: p.origin, position: p.position, collision: o.popupCollision !== t ? o.popupCollision : u ? "fit" : "fit flip", anchor: r, appendTo: r, animation: { open: g(!0, { effects: h }, o.animation.open), close: o.animation.close }, close: function (e) { var t = e.sender.wrapper.parent(); a.trigger(D, { item: t[0] }) ? e.preventDefault() : (t.css(N, t.data(N)), t.removeData(N)) } }).data(P), m.removeAttr("aria-hidden"), e.open()) }, a.options.hoverDelay)) }), a }, close: function (t) { var n = this, i = n.element; return t = i.find(t), t.length || (t = i.find(">.k-item")), t.each(function () { var t = e(this); clearTimeout(t.data(E)), t.data(E, setTimeout(function () { var e = t.find(".k-group:not(.k-list-container):first:visible").data(P); e && (e.close(), e.element.attr("aria-hidden", !0)) }, n.options.hoverDelay)) }), n }, _toggleDisabled: function (t, n) { this.element.find(t).each(function () { e(this).toggleClass(B, n).toggleClass(W, !n).attr("aria-disabled", !n) }) }, _toggleHover: function (t) { var n = e(l.eventTarget(t) || t.target).closest(q), i = t.type == O || -1 !== f.indexOf(t.type); n.parents("li." + W).length || n.toggleClass(L, i || "mousedown" == t.type || "click" == t.type), this._removeHoverItem() }, _checkActiveElement: function (t) { var n = this, i = e(this._hoverItem()[0] || (t ? t.currentTarget : {})), a = n._findRootParent(i)[0]; setTimeout(function () { document.hasFocus() && r(a, l._activeElement()) || n.close(a) }, 0) }, _removeHoverItem: function () { var e = this._hoverItem(); e && e.hasClass(V) && (e.removeClass(V), this._oldHoverItem = null) }, _updateClasses: function () { var e, t = this.element; t.addClass("k-widget k-reset k-header " + T).addClass(T + "-" + this.options.orientation), t.find("li > ul").addClass("k-group").attr("role", "menu").attr("aria-hidden", t.is(":visible")).end().find("li > div").addClass("k-content").attr("tabindex", "-1"), e = t.find("> li,.k-group > li"), e.each(function () { a(this) }) }, _mouseenter: function (t) { var n = this, i = e(t.currentTarget), a = i.children(".k-animation-container").length || i.children(U).length; t.delegateTarget == i.parents(".k-menu")[0] && ((!n.options.openOnClick || n.clicked) && !r(t.currentTarget, t.relatedTarget) && a && n.open(i), (n.options.openOnClick && n.clicked || p) && i.siblings().each(m(function (e, t) { n.close(t) }, n))) }, _mouseleave: function (n) { var i = this, a = e(n.currentTarget), o = a.children(".k-animation-container").length || a.children(U).length; return a.parentsUntil(".k-animation-container", ".k-list-container,.k-calendar-container")[0] ? (n.stopImmediatePropagation(), t) : (i.options.openOnClick || u || l.support.pointers && 2 == n.originalEvent.pointerType || r(n.currentTarget, n.relatedTarget) || !o || i.close(a), t) }, _click: function (n) { var i, r, a, o = this, s = o.options, d = e(l.eventTarget(n)), c = d[0] ? d[0].nodeName.toUpperCase() : "", u = "INPUT" == c || "SELECT" == c || "BUTTON" == c, f = d.closest("." + S), h = d.closest(q), g = f.attr("href"), m = !!g && "#" != g.charAt(g.length - 1); if (!h.children(J)[0]) return h.hasClass(W) ? (n.preventDefault(), t) : (n.handled || !o.trigger(H, { item: h[0] }) || u || n.preventDefault(), n.handled = !0, r = h.children(U + ",.k-animation-container"), a = r.is(":visible"), s.closeOnClick && !m && (!r.length || s.openOnClick && a) ? (h.removeClass(L).css("height"), o._oldHoverItem = o._findRootParent(h), o.close(f.parentsUntil(o.element, q)), o.clicked = !1, -1 != "MSPointerUp".indexOf(n.type) && n.preventDefault(), t) : ((h.parent().hasClass(T) && s.openOnClick || !p) && (m || u || n.preventDefault(), o.clicked = !0, i = r.is(":visible") ? D : C, (s.closeOnClick || i != D) && o[i](h)), t)) }, _documentClick: function (e) { r(this.element[0], e.target) || (this.clicked = !1) }, _focus: function (n) { var i = this, r = n.target, a = i._hoverItem(), o = c(); return r == i.wrapper[0] || e(r).is(":focusable") ? (o === n.currentTarget && (a.length ? i._moveHover([], a) : i._oldHoverItem || i._moveHover([], i.wrapper.children().first())), t) : (n.stopPropagation(), e(r).closest(".k-content").closest(".k-group").closest(".k-item").addClass(V), i.wrapper.focu
95s(), t) }, _keydown: function (e) { var n, i, r, a = this, o = e.keyCode, s = a._oldHoverItem, d = l.support.isRtl(a.wrapper); if (e.target == e.currentTarget || o == b.ESC) { if (s || (s = a._oldHoverItem = a._hoverItem()), i = a._itemBelongsToVertival(s), r = a._itemHasChildren(s), o == b.RIGHT) n = a[d ? "_itemLeft" : "_itemRight"](s, i, r); else if (o == b.LEFT) n = a[d ? "_itemRight" : "_itemLeft"](s, i, r); else if (o == b.DOWN) n = a._itemDown(s, i, r); else if (o == b.UP) n = a._itemUp(s, i, r); else if (o == b.ESC) n = a._itemEsc(s, i); else if (o == b.ENTER || o == b.SPACEBAR) n = s.children(".k-link"), n.length > 0 && (a._click({ target: n[0], preventDefault: function () { } }), a._moveHover(s, a._findRootParent(s))); else if (o == b.TAB) return n = a._findRootParent(s), a._moveHover(s, n), a._checkActiveElement(), t; n && n[0] && (e.preventDefault(), e.stopPropagation()) } }, _hoverItem: function () { return this.wrapper.find(".k-item.k-state-hover,.k-item.k-state-focused").filter(":visible") }, _itemBelongsToVertival: function (e) { var t = this.wrapper.hasClass("k-menu-vertical"); return e.length ? e.parent().hasClass("k-group") || t : t }, _itemHasChildren: function (e) { return e.length ? e.children("ul.k-group, div.k-animation-container").length > 0 : !1 }, _moveHover: function (e, t) { var n = this, i = n._ariaId; e.length && t.length && (e.removeClass(V), e[0].id === i && e.removeAttr("id")), t.length && (t[0].id && (i = t[0].id), t.addClass(V), n._oldHoverItem = t, i && (n.element.removeAttr("aria-activedescendant"), t.attr("id", i), n.element.attr("aria-activedescendant", i))) }, _findRootParent: function (e) { return e.parent().hasClass("k-menu") ? e : e.parentsUntil(".k-menu", "li.k-item").last() }, _isRootItem: function (e) { return e.parent().hasClass("k-menu") }, _itemRight: function (e, t, n) { var i, r, a = this; return t ? n ? (a.open(e), i = e.find(".k-group").children().first()) : "horizontal" == a.options.orientation && (r = a._findRootParent(e), a.close(r), i = r.nextAll(Y)) : (i = e.nextAll(Y), i.length || (i = e.prevAll(Q))), i && !i.length ? i = a.wrapper.children(".k-item").first() : i || (i = []), a._moveHover(e, i), i }, _itemLeft: function (e, t) { var n, i = this; return t ? (n = e.parent().closest(".k-item"), i.close(n), i._isRootItem(n) && "horizontal" == i.options.orientation && (n = n.prevAll(Y))) : (n = e.prevAll(Y), n.length || (n = e.nextAll(Q))), n.length || (n = i.wrapper.children(".k-item").last()), i._moveHover(e, n), n }, _itemDown: function (e, t, n) { var i, r = this; if (t) i = e.nextAll(Y); else { if (!n || e.hasClass(W)) return; r.open(e), i = e.find(".k-group").children().first() } return !i.length && e.length ? i = e.parent().children().first() : e.length || (i = r.wrapper.children(".k-item").first()), r._moveHover(e, i), i }, _itemUp: function (e, t) { var n, i = this; if (t) return n = e.prevAll(Y), !n.length && e.length ? n = e.parent().children().last() : e.length || (n = i.wrapper.children(".k-item").last()), i._moveHover(e, n), n }, _itemEsc: function (e, t) { var n, i = this; return t ? (n = e.parent().closest(".k-item"), i.close(n), i._moveHover(e, n), n) : e }, _focusHandler: function (t) { var n = this, i = e(l.eventTarget(t)).closest(q); setTimeout(function () { n._moveHover([], i), i.children(".k-content")[0] && i.parent().closest(".k-item").removeClass(V) }, 200) }, _animations: function (e) { e && "animation" in e && !e.animation && (e.animation = { open: { effects: {} }, close: { hide: !0, effects: {}} }) } }); g(et, { renderItem: function (e) { e = g({ menu: {}, group: {} }, e); var t = X.empty, n = e.item; return X.item(g(e, { image: n.imageUrl ? X.image : t, sprite: n.spriteCssClass ? X.sprite : t, itemWrapper: X.itemWrapper, renderContent: et.renderContent, arrow: n.items || n.content ? X.arrow : t, subGroup: et.renderGroup }, Z)) }, renderGroup: function (e) { return X.group(g({ renderItems: function (e) { for (var t = "", n = 0, i = e.items, r = i ? i.length : 0, a = g({ length: r }, e.group); r > n; n++) t += et.renderItem(g(e, { group: a, item: g({ index: n }, i[n]) })); return t } }, e, Z)) }
95, renderContent: function (e) { return X.content(g(e, Z)) } }), l.ui.plugin(et) } (window.kendo.jQuery), function (e, t) { function n(t) { return t = null != t ? t : "", t.type || e.type(t) || "string" } function i(t) { t.find(":input:not(:button, [" + s.attr("role") + "=upload], [" + s.attr("skip") + "], [type=file]), select").each(function () { var t = s.attr("bind"), n = this.getAttribute(t) || "", i = "checkbox" === this.type || "radio" === this.type ? "checked:" : "value:", r = this.name; -1 === n.indexOf(i) && r && (n += (n.length ? "," : "") + i + r, e(this).attr(t, n)) }) } function r(e) { var t, i, r = (e.model.fields || e.model)[e.field], a = n(r), o = r ? r.validation : {}, l = s.attr("type"), d = s.attr("bind"), c = { name: e.field }; for (t in o) i = o[t], h(t, _) >= 0 ? c[l] = t : p(i) || (c[t] = f(i) ? i.value || t : i), c[s.attr(t + "-msg")] = i.message; return h(a, _) >= 0 && (c[l] = a), c[d] = ("boolean" === a ? "checked:" : "value:") + e.field, c } function a(e) { var t, n, i, r, a, o; if (e && e.length) for (o = [], t = 0, n = e.length; n > t; t++) i = e[t], a = i.text || i.value || i, r = null == i.value ? i.text || i : i.value, o[t] = { text: a, value: r }; return o } function o(e, t) { var n, i = e ? e.validation || {} : {}; for (n in i) p(i[n]) && (t[n] = i[n]) } var s = window.kendo, l = s.ui, d = l.Widget, c = e.extend, u = s.support.browser.msie && 9 > s.support.browser.version, p = e.isFunction, f = e.isPlainObject, h = e.inArray, g = /("|\%|'|\[|\]|\$|\.|\,|\:|\;|\+|\*|\&|\!|\#|\(|\)|<|>|\=|\?|\@|\^|\{|\}|\~|\/|\||`)/g, m = '<div class="k-widget k-tooltip k-tooltip-validation" style="margin:0.5em"><span class="k-icon k-warning"> </span>#=message#<div class="k-callout k-callout-n"></div></div>', v = "change", _ = ["url", "email", "number", "date", "boolean"], b = { number: function (t, n) { var i = r(n); e('<input type="text"/>').attr(i).appendTo(t).kendoNumericTextBox({ format: n.format }), e("<span " + s.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t) }, date: function (t, n) { var i = r(n), a = n.format; a && (a = s._extractFormat(a)), i[s.attr("format")] = a, e('<input type="text"/>').attr(i).appendTo(t).kendoDatePicker({ format: n.format }), e("<span " + s.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t) }, string: function (t, n) { var i = r(n); e('<input type="text" class="k-input k-textbox"/>').attr(i).appendTo(t) }, "boolean": function (t, n) { var i = r(n); e('<input type="checkbox" />').attr(i).appendTo(t) }, values: function (t, n) { var i = r(n); e("<select " + s.attr("text-field") + '="text"' + s.attr("value-field") + '="value"' + s.attr("source") + "='" + s.stringify(a(n.values)).replace(/\'/g, "'") + "'" + s.attr("role") + '="dropdownlist"/>').attr(i).appendTo(t), e("<span " + s.attr("for") + '="' + n.field + '" class="k-invalid-msg"/>').hide().appendTo(t) } }, k = d.extend({ init: function (t, n) { var i = this; d.fn.init.call(i, t, n), i._validateProxy = e.proxy(i._validate, i), i.refresh() }, events: [v], options: { name: "Editable", editors: b, clearContainer: !0, errorTemplate: m }, editor: function (e, t) { var i = this, r = i.options.editors, a = f(e), o = a ? e.field : e, l = i.options.model || {}, d = a && e.values, u = d ? "values" : n(t), p = a && e.editor, h = p ? e.editor : r[u], m = i.element.find("[" + s.attr("container-for") + "=" + o.replace(g, "\\$1") + "]"); h = h ? h : r.string, p && "string" == typeof e.editor && (h = function (t) { t.append(e.editor) }), m = m.length ? m : i.element, h(m, c(!0, {}, a ? e : { field: o }, { model: l })) }, _validate: function (t) { var n, i = this, r = "boolean" == typeof t.value, a = i._validationEventInProgress, o = {}; o[t.field] = t.value, n = e(":input[" + s.attr("bind") + '="' + (r ? "checked:" : "value:") + t.field.replace(g, "\\$1") + '"]', i.element); try { i._validationEventInProgress = !0, (!i.validatable.validateInput(n) || !a && i.trigger(v, { values: o })) && t.preventDefault() } finally { i._validationEventInProgress = !1 } }, end: function () { return this.validatable.validate() }, destroy: function () { var e = this; d.fn.destroy.call(e), e.options.model.unbind("set", e._validateProxy), s.unbind(e.element), s.destroy(e.element), e.element.removeData("kendoValidator") }, refresh: function () { var n, r, a, l, d, c, p, h, g = this, m = g.options.fields || [], v = g.options.clearContainer ? g.element.empty() : g.element, _ = g.options.model || {}, b = {}; for (e.isArray(m) || (m = [m]), n = 0, r = m.length; r > n; n++) a = m[n], l = f(a), d = l ? a.field : a, c = (_.fields || _)[d], o(c, b), g.editor(a, c); if (!r) { p = _.fields || _; for (d in p) o(p[d], b) } i(v), s.bind(v, g.options.model), g.options.model.bind("set", g._validateProxy), g.validatable = v.kendoValidator({ validateOnBlur: !1, errorTemplate: g.options.errorTemplate || t, rules: b }).data("kendoValidator"), h = v.find(":focusable:first").focus(), u && h.focus() } }); l.plugin(k) } (window.kendo.jQuery), function (e) { 96 function t(n, i) { n.filters && (n.filters = e.grep(n.filters, function (e) { return t(e, i), e.filters ? e.filters.length : e.field != i })) } function n(e) { var t, n, i, r, a, o; if (e && e.length) for (o = [], t = 0, n = e.length; n > t; t++) i = e[t], a = i.text || i.value || i, r = null == i.value ? i.text || i : i.value, o[t] = { text: a, value: r }; return o } function i(t, n) { return e.grep(t, function (t) { return t.filters ? (t.filters = e.grep(t.filters, function (e) { return e.field != n }), t.filters.length) : t.field != n }) } var r = window.kendo, a = r.ui, o = e.proxy, s = "kendoPopup", l = "init", d = ".kendoFilterMenu", c = "Is equal to", u = "Is not equal to", p = { number: "numerictextbox", date: "datepicker" }, f = e.isFunction, h = a.Widget, g = '<div><div class="k-filter-help-text">#=messages.info#</div><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="true" name="filters[0].value"/>#=messages.isTrue#</label><label><input type="radio" data-#=ns#bind="checked: filters[0].value" value="false" name="filters[0].value"/>#=messages.isFalse#</label><div><button type="submit" class="k-button">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>', m = '<div><div class="k-filter-help-text">#=messages.info#</div><select data-#=ns#bind="value: filters[0].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select data-#=ns#bind="value:filters[0].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#"></select>#}else{#<input data-#=ns#bind="value:filters[0].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""# />#}##if(extra){#<select class="k-filter-and" data-#=ns#bind="value: logic" data-#=ns#role="dropdownlist"><option value="and">#=messages.and#</option><option value="or">#=messages.or#</option></select><select data-#=ns#bind="value: filters[1].operator" data-#=ns#role="dropdownlist">#for(var op in operators){#<option value="#=op#">#=operators[op]#</option>#}#</select>#if(values){#<select data-#=ns#bind="value:filters[1].value" data-#=ns#text-field="text" data-#=ns#value-field="value" data-#=ns#source=\'#=kendo.stringify(values).replace(/\'/g,"&\\#39;")#\' data-#=ns#role="dropdownlist" data-#=ns#option-label="#=messages.selectValue#"></select>#}else{#<input data-#=ns#bind="value: filters[1].value" class="k-textbox" type="text" #=role ? "data-" + ns + "role=\'" + role + "\'" : ""#/>#}##}#<div><button type="submit" class="k-button">#=messages.filter#</button><button type="reset" class="k-button">#=messages.clear#</button></div></div>', v = h.extend({ init: function (t, n) { var i, a, s, l, c = this, u = "string"; h.fn.init.call(c, t, n), i = c.operators = n.operators || {}, t = c.element, n = c.options, n.appendToElement || (s = t.addClass("k-filterable").find(".k-grid-filter"), s[0] || (s = t.prepend('<a class="k-grid-filter" href="#"><span class="k-icon k-filter"/></a>').find(".k-grid-filter")), s.attr("tabindex", -1).on("click" + d, o(c._click, c))), c.link = s || e(), c.dataSource = n.dataSource, c.field = n.field || t.attr(r.attr("field")), c.model = c.dataSource.reader.model, c._parse = function (e) { return e + "" }, c.model && c.model.fields && (l = c.model.fields[c.field], l && (u = l.type || "string", l.parse && (c._parse = o(l.parse, l)))), n.values && (u = "enums"), c.type = u, i = i[u] || n.operators[u]; for (a in i) break; c._defaultFilter = function () { return { field: c.field, operator: a || "eq", value: ""} }, c._refreshHandler = o(c.refresh, c), c.dataSource.bind("change", c._refreshHandler), n.appendToElement ? c._init() : c.refresh() }, _init: function () { 97 var t, i = this, a = i.options, c = i.operators || {}, u = a.ui, h = f(u), v = i.type; c = c[v] || a.operators[v], h || (t = u || p[v]), i.form = e('<form class="k-filter-menu"/>').html(r.template("boolean" === v ? g : m)({ field: i.field, format: a.format, ns: r.ns, messages: a.messages, extra: a.extra, operators: c, type: v, role: t, values: n(a.values) }
97)).on("keydown" + d, o(i._keydown, i)).on("submit" + d, o(i._submit, i)).on("reset" + d, o(i._reset, i)), a.appendToElement ? (i.element.append(i.form), i.popup = i.element.closest(".k-popup").data(s)) : i.popup = i.form[s]({ anchor: i.link, open: o(i._open, i), activate: o(i._activate, i), close: i.options.closeCallback }).data(s), h && i.form.find(".k-textbox").removeClass("k-textbox").each(function () { 98 u(e(this)) 99 }), i.form.find("[" + r.attr("role") + "=numerictextbox]").removeClass("k-textbox").end().find("[" + r.attr("role") + "=datetimepicker]").removeClass("k-textbox").end().find("[" + r.attr("role") + "=timepicker]").removeClass("k-textbox").end().find("[" + r.attr("role") + "=datepicker]").removeClass("k-textbox"), i.refresh(), i.trigger(l, { field: i.field, container: i.form }) 100 }, refresh: function () { var e = this, t = e.dataSource.filter() || { filters: [], logic: "and" }; e.filterModel = r.observable({ logic: "and", filters: [e._defaultFilter(), e._defaultFilter()] }), e.form && r.bind(e.form.children().first(), e.filterModel), e._bind(t) ? e.link.addClass("k-state-active") : e.link.removeClass("k-state-active") }, destroy: function () { var e = this; h.fn.destroy.call(e), e.form && (r.unbind(e.form), r.destroy(e.form), e.form.unbind(d), e.popup.destroy()), e.link.unbind(d), e._refreshHandler && e.dataSource.unbind("change", e._refreshHandler) }, _bind: function (e) { var t, n, i, r, a = this, o = e.filters, s = !1, l = 0, d = a.filterModel; for (t = 0, n = o.length; n > t; t++) r = o[t], r.field == a.field ? (d.set("logic", e.logic), i = d.filters[l], i || (d.filters.push({ field: a.field }), i = d.filters[l]), i.set("value", a._parse(r.value)), i.set("operator", r.operator), l++, s = !0) : r.filters && (s = s || a._bind(r)); return s }, _merge: function (n) { var i, r, a, o = this, s = n.logic || "and", l = n.filters, d = o.dataSource.filter() || { filters: [], logic: "and" }; for (t(d, o.field), l = e.grep(l, function (e) { return "" !== e.value && null != e.value }), r = 0, a = l.length; a > r; r++) i = l[r], i.value = o._parse(i.value); return l.length && (d.filters.length ? (n.filters = l, "and" !== d.logic && (d.filters = [{ logic: d.logic, filters: d.filters}], d.logic = "and"), l.length > 1 ? d.filters.push(n) : d.filters.push(l[0])) : (d.filters = l, d.logic = s)), d }, filter: function (e) { e = this._merge(e), e.filters.length && this.dataSource.filter(e) }, clear: function () { var t = this, n = t.dataSource.filter() || { filters: [] }; n.filters = e.grep(n.filters, function (e) { return e.filters ? (e.filters = i(e.filters, t.field), e.filters.length) : e.field != t.field }), n.filters.length || (n = null), t.dataSource.filter(n) }, _submit: function (e) { var t = this; e.preventDefault(), t.filter(t.filterModel.toJSON()), t.popup.close() }, _reset: function () { this.clear(), this.popup.close() }, _click: function (e) { e.preventDefault(), e.stopPropagation(), this.popup || this._init(), this.popup.toggle() }, _open: function () { var t; e(".k-filter-menu").not(this.form).each(function () { t = e(this).data(s), t && t.close() }) }, _activate: function () { this.form.find(":focusable:first").focus() }, _keydown: function (e) { e.keyCode == r.keys.ESC && this.popup.close() }, events: [l], options: { name: "FilterMenu", extra: !0, appendToElement: !1, type: "string", operators: { string: { eq: c, neq: u, startswith: "Starts with", contains: "Contains", doesnotcontain: "Does not contain", endswith: "Ends with" }, number: { eq: c, neq: u, gte: "Is greater than or equal to", gt: "Is greater than", lte: "Is less than or equal to", lt: "Is less than" }, date: { eq: c, neq: u, gte: "Is after or equal to", gt: "Is after", lte: "Is before or equal to", lt: "Is before" }, enums: { eq: c, neq: u} }, messages: { info: "Show items with value that:", isTrue: "is true", isFalse: "is false", filter: "Filter", clear: "Clear", and: "And", or: "Or", selectValue: "-Select value-"}} 101 }); a.plugin(v) 102} (window.kendo.jQuery), function (e, t) { function n(t) { t = e(t), t.children(v).children(".k-icon").remove(), t.filter(":has(.k-panel),:has(.k-content)").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(H) ? "k-i-arrow-n k-panelbar-collapse" : "k-i-arrow-s k-panelbar-expand") + "'/>") }) } function i(t) { t = e(t), t.filter(".k-first:not(:first-child)").removeClass(x), t.filter(".k-last:not(:last-child)").removeClass(g), t.filter(":first-child").addClass(x), t.filter(":last-child").addClass(g) } var r = window.kendo, a = r.ui, o = r.keys, s = e.extend, l = e.each, d = r.template, c = a.Widget, u = /^(ul|a|div)$/i, p = ".kendoPanelBar", f = "img", h = "href", g = "k-last", m = "k-link", v = "." + m, _ = "error", b = ".k-item", k = ".k-group", w = k + ":visible", y = "k-image", x = "k-first", C = "expand", T = "select", S = "k-content", F = "activate", D = "collapse", E = "mouseenter", A = "mouseleave", I = "contentLoad", H = "k-state-active", N = "> .k-panel", R = "> .k-content", z = "k-state-focused", O = "k-state-disabled", M = "k-state-selected", P = "." + M, B = "k-state-highlight", L = b + ":not(.k-state-disabled)", V = L + " > .k-link", W = b + ".k-state-disabled > .k-link", U = "> li > " + P + ", .k-panel > li > " + P, q = "k-state-default", j = "aria-disabled", G = "aria-expanded", $ = "aria-hidden", K = "aria-selected", Y = ":visible", Q = ":empty", J = "single", X = { content: d("<div role='region' class='k-content'#= contentAttributes(data) #>#= content(item) #</div>"), group: d("<ul role='group' aria-hidden='true' class='#= groupCssClass(group) #'#= groupAttributes(group) #>#= renderItems(data) #</ul>"), itemWrapper: d("<#= tag(item) # class='#= textClass(item, group) #' #= contentUrl(item) ##= textAttributes(item) #>#= image(item) ##= sprite(item) ##= text(item) ##= arrow(data) #</#= tag(item) #>"), item: d("<li role='menuitem' #=aria(item)#class='#= wrapperCssClass(group, item) #'>#= itemWrapper(data) ## if (item.items) { ##= subGroup({ items: item.items, panelBar: panelBar, group: { expanded: item.expanded } }) ## } else if (item.content || item.contentUrl) { ##= renderContent(data) ## } #</li>"), image: d("<img class='k-image' alt='' src='#= imageUrl #' />"), arrow: d("<span class='#= arrowClass(item) #'></span>"), sprite: d("<span class='k-sprite #= spriteCssClass #'></span>"), empty: d("") }
102, Z = { aria: function (e) { var t = ""; return (e.items || e.content || e.contentUrl) && (t += G + "='" + (e.expanded ? "true" : "false") + "' "), e.enabled === !1 && (t += j + "='true'"), t }, wrapperCssClass: function (e, t) { var n = "k-item", i = t.index; return n += t.enabled === !1 ? " " + O : t.expanded === !0 ? " " + H : " k-state-default", 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), t.cssClass && (n += " " + t.cssClass), n }, textClass: function (e, t) { var n = m; return t.firstLevel && (n += " k-header"), n }, textAttributes: function (e) { return e.url ? " href='" + e.url + "'" : "" }, arrowClass: function (e) { var t = "k-icon"; return t += e.expanded ? " k-i-arrow-n k-panelbar-collapse" : " k-i-arrow-s k-panelbar-expand" }, text: function (e) { return e.encoded === !1 ? e.text : r.htmlEncode(e.text) }, tag: function (e) { return e.url ? "a" : "span" }, groupAttributes: function (e) { return e.expanded !== !0 ? " style='display:none'" : "" }, groupCssClass: function () { return "k-group k-panel" }, contentAttributes: function (e) { return e.item.expanded !== !0 ? " style='display:none'" : "" }, content: function (e) { return e.content ? e.content : e.contentUrl ? "" : " " }, contentUrl: function (e) { return e.contentUrl ? r.attr("content-url") + '="' + e.contentUrl + '"' : "" } }, et = c.extend({ init: function (t, n) { var i, a = this; c.fn.init.call(a, t, n), t = a.wrapper = a.element.addClass("k-widget k-reset k-header k-panelbar"), n = a.options, t[0].id && (a._itemId = t[0].id + "_pb_active"), a._tabindex(), a._initData(n), a._updateClasses(), a._animations(n), t.on("click" + p, V, function (t) { a._click(e(t.currentTarget)) && t.preventDefault() }).on(E + p + " " + A + p, V, a._toggleHover).on("click" + p, W, !1).on("keydown" + p, e.proxy(a._
102keydown, a)).on("focus" + p, function () { var e = a.select(); a._current(e[0] ? e : a._first()) }).on("blur" + p, function () { a._current(null) }).attr("role", "menu"), i = t.find("li." + H + " > ." + S), i[0] && a.expand(i.parent(), !1), r.notify(a) }, events: [C, D, T, F, _, I], options: { name: "PanelBar", animation: { expand: { effects: "expand:vertical", duration: 200 }, collapse: { duration: 200} }, expandMode: "multiple" }, destroy: function () { c.fn.destroy.call(this), this.element.off(p), r.destroy(this.element) }, _initData: function (e) { var t = this; e.dataSource && (t.element.empty(), t.append(e.dataSource, t.element)) }, setOptions: function (e) { var t = this.options.animation; this._animations(e), e.animation = s(!0, t, e.animation), "dataSource" in e && this._initData(e), c.fn.setOptions.call(this, e) }, expand: function (t, n) { var i = this, r = {}; return n = n !== !1, t = this.element.find(t), t.each(function (a, o) { o = e(o); var s = o.find(N).add(o.find(R)); if (!o.hasClass(O) && s.length > 0) { if (i.options.expandMode == J && i._collapseAllExpanded(o)) return i; t.find("." + B).removeClass(B), o.addClass(B), n || (r = i.options.animation, i.options.animation = { expand: { effects: {} }, collapse: { hide: !0, effects: {}} }), i._triggerEvent(C, o) || i._toggleItem(o, !1), n || (i.options.animation = r) } }), i }, collapse: function (t, n) { var i = this, r = {}; return n = n !== !1, t = i.element.find(t), t.each(function (t, a) { a = e(a); var o = a.find(N).add(a.find(R)); !a.hasClass(O) && o.is(Y) && (a.removeClass(B), n || (r = i.options.animation, i.options.animation = { expand: { effects: {} }, collapse: { hide: !0, effects: {}} }), i._triggerEvent(D, a) || i._toggleItem(a, !0), n || (i.options.animation = r)) }), i }, _toggleDisabled: function (e, t) { e = this.element.find(e), e.toggleClass(q, t).toggleClass(O, !t).attr(j, !t) }, select: function (n) { var i = this; return n === t ? i.element.find(U).parent() : (i.element.find(n).each(function () { var n = e(this), r = n.children(v); return n.hasClass(O) ? i : (i._updateSelected(r), t) }), i) }, enable: function (e, t) { return this._toggleDisabled(e, t !== !1), this }, disable: function (e) { return this._toggleDisabled(e, !1), this }, append: function (e, t) { t = this.element.find(t); var r = this._insert(e, t, t.length ? t.find(N) : null); return l(r.items, function () { r.group.append(this), i(this) }), n(t), i(r.group.find(".k-first, .k-last")), r.group.height("auto"), this }, insertBefore: function (e, t) { t = this.element.find(t); var n = this._insert(e, t, t.parent()); return l(n.items, function () { t.before(this), i(this) }), i(t), n.group.height("auto"), this }, insertAfter: function (e, t) { t = this.element.find(t); var n = this._insert(e, t, t.parent()); return l(n.items, function () { t.after(this), i(this) }), i(t), n.group.height("auto"), this }, remove: function (e) { e = this.element.find(e); var t = this, r = e.parentsUntil(t.element, b), a = e.parent("ul"); return e.remove(), !a || a.hasClass("k-panelbar") || a.children(b).length || a.remove(), r.length && (r = r.eq(0), n(r), i(r)), t }, reload: function (t) { var n = this; t = n.element.find(t), t.each(function () { var t = e(this); n._ajaxRequest(t, t.children("." + S), !t.is(Y)) }) }, _first: function () { return this.element.children(L).first() }, _last: function () { var e = this.element.children(L).last(), t = e.children(w); return t[0] ? t.children(L).last() : e }, _current: function (e) { var n = this, i = n._focused, r = n._itemId; return e === t ? i : (n.element.removeAttr("aria-activedescendant"), i && (i[0].id === r && i.removeAttr("id"), i.children(v).removeClass(z)), e && (r = e[0].id || r, e.attr("id", r).children(v).addClass(z), n.element.attr("aria-activedescendant", r)), n._focused = e, t) }, _keydown: function (e) { var t = this, n = e.keyCode, i = t._current(); e.target == e.currentTarget && (n == o.DOWN || n == o.RIGHT ? (t._current(t._nextItem(i)), e.preventDefault()) : n == o.UP || n == o.LEFT ? (t._current(t._prevItem(i)), e.preventDefault()) : n == o.ENTER || n == o.SPACEBAR ? (t._click(i.children(v)), e.preventDefault()) : n == o.HOME ? (t._current(t._first()), e.preventDefault()) : n == o.END && (t._current(t._last()), e.preventDefault())) }, _nextItem: function (e) { if (!e) return this._first(); var t = e.children(w), n = e.next(); return t[0] && (n = t.children("." + x)), n[0] || (n = e.parent(w).parent(b).next()), n[0] && n.is(":visible") || (n = this._first()), n.hasClass(O) && (n = this._nextItem(n)), n }
102, _prevItem: function (e) { if (!e) return this._last(); var t, n = e.prev(); if (n[0]) for (t = n; t[0]; ) t = t.children(w).children("." + g), t[0] && (n = t); else n = e.parent(w).parent(b), n[0] || (n = this._last()); return n.hasClass(O) && (n = this._prevItem(n)), n }, _insert: function (t, n, i) { var r, a, o = this, l = e.isPlainObject(t), d = n && n[0]; return d || (i = o.element), a = { firstLevel: i.hasClass("k-panelbar"), expanded: i.parent().hasClass(H), length: i.children().length }, d && !i.length && (i = e(et.renderGroup({ group: a })).appendTo(n)), l || e.isArray(t) ? (r = e.map(l ? [t] : t, function (t, n) { return "string" == typeof t ? e(t) : e(et.renderItem({ group: a, item: s(t, { index: n }) })) }), d && n.attr(G, !1)) : (r = e(t), o._updateItemsClasses(r)), { items: r, group: i} }, _toggleHover: function (t) { var n = e(t.currentTarget); n.parents("li." + O).length || n.toggleClass("k-state-hover", t.type == E) }, _updateClasses: function () { var t, r, a = this; t = a.element.find("li > ul").not(function () { return e(this).parentsUntil(".k-panelbar", "div").length }).addClass("k-group k-panel").attr("role", "group"), t.parent().attr(G, !1).not("." + H).children("ul").attr($, !0).hide(), r = a.element.add(t).children(), a._updateItemsClasses(r), n(r), i(r) }, _updateItemsClasses: function (e) { for (var t = e.length, n = 0; t > n; n++) this._updateItemClasses(e[n], n) }, _updateItemClasses: function (t, n) { var i, a, o = this._selected, s = this.options.contentUrls, l = s && s[n], d = this.element[0]; t = e(t).addClass("k-item").attr("role", "menuitem"), r.support.browser.msie && t.css("list-style-position", "inside").css("list-style-position", ""), t.children(f).addClass(y), a = t.children("a").addClass(m), a[0] && (a.attr("href", l), a.children(f).addClass(y)), t.filter(":not([disabled]):not([class*=k-state])").addClass("k-state-default"), t.filter("li[disabled]").addClass("k-state-disabled").attr(j, !0).removeAttr("disabled"), t.children("div").addClass(S).attr("role", "region").attr($, !0).hide().parent().attr(G, !1), a = t.children(P), a[0] && (o && o.removeAttr(K).children(P).removeClass(M), a.addClass(M), this._selected = t.attr(K, !0)), t.children(v)[0] || (i = "<span class='" + m + "'/>", s && s[n] && t[0].parentNode == d && (i = '<a class="k-link k-header" href="' + s[n] + '"/>'), t.contents().filter(function () { return !(this.nodeName.match(u) || 3 == this.nodeType && !e.trim(this.nodeValue)) }).wrapAll(i)), t.parent(".k-panelbar")[0] && t.children(v).addClass("k-header") }, _click: function (e) { var t, n, i, r, a, o, s, l = this, d = l.element; if (!e.parents("li." + O).length && e.closest(".k-widget")[0] == d[0]) { if (a = e.closest(v), o = a.closest(b), l._updateSelected(a), n = o.find(N).add(o.find(R)), i = a.attr(h), r = i && ("#" == i.charAt(i.length - 1) || -1 != i.indexOf("#" + l.element[0].id + "-")), t = !(!r && !n.length), n.data("animating")) return t; if (l._triggerEvent(T, o) && (t = !0), t !== !1) return l.options.expandMode == J && l._collapseAllExpanded(o) ? t : (n.length && (s = n.is(Y), l._triggerEvent(s ? D : C, o) || (t = l._toggleItem(o, s))), t) } }, _toggleItem: function (e, t) { var n, i, r = this, a = e.find(N); return a.length ? (this._toggleGroup(a, t), n = !0) : (i = e.children("." + S), i.length && (n = !0, i.is(Q) ? r._ajaxRequest(e, i, t) : r._toggleGroup(i, t))), n }, _toggleGroup: function (e, t) { var n = this, i = n.options.animation, r = i.expand, a = s({}, i.collapse), o = a && "effects" in a; e.is(Y) == t && (e.parent().attr(G, !t).attr($, t).toggleClass(q, t).toggleClass(H, !t).find("> .k-link > .k-icon").toggleClass("k-i-arrow-n", !t).toggleClass("k-panelbar-collapse", !t).toggleClass("k-i-arrow-s", t).toggleClass("k-panelbar-expand", t), r = t ? s(o ? a : s({ reverse: !0 }, r), { hide: !0 }) : s({ complete: function (e) { n._triggerEvent(F, e.closest(b)) } }, r), e.kendoStop(!0, !0).kendoAnimate(r)) }, _collapseAllExpanded: function (n) { var i, r, a = this, o = !1; return n.children(v).hasClass("k-header") ? (r = n.find(N).add(n.find(R)), r.is(Y) && (o = !0), r.is(Y) || 0 === r.length || (i = e(a.element).children(), i.find(N).add(i.find(R)).filter(function () { return e(this).is(Y) }).each(function (t, n) { n = e(n), o = a._triggerEvent(D, n.closest(b)), o || a._toggleGroup(n, !0) })), o) : t }, _ajaxRequest: function (t, n, i) { var r = this, a = t.find(".k-panelbar-collapse, .k-panelbar-expand"), o = t.find(v), s = setTimeout(function () { a.addClass("k-loading") }, 100), l = {}, d = o.attr(h); e.ajax({ type: "GET", cache: !1, url: d, dataType: "html", data: l, error: function (e, t) { a.removeClass("k-loading"), r.trigger(_, { xhr: e, status: t }) && this.complete() }, complete: function () { clearTimeout(s), a.removeClass("k-loading") }
102, success: function (e) { try { n.html(e) } catch (a) { var o = window.console; o && o.error && o.error(a.name + ": " + a.message + " in " + d), this.error(this.xhr, "error") } r._toggleGroup(n, i), r.trigger(I, { item: t[0], contentElement: n[0] }) } }) }, _triggerEvent: function (e, t) { var n = this; return n.trigger(e, { item: t[0] }) }, _updateSelected: function (e) { var t = this, n = t.element, i = e.parent(b), r = t._selected; r && r.removeAttr(K), t._selected = i.attr(K, !0), n.find(U).removeClass(M), n.find("> ." + B + ", .k-panel > ." + B).removeClass(B), e.addClass(M), e.parentsUntil(n, b).filter(":has(.k-header)").addClass(B), t._current(i) }, _animations: function (e) { e && "animation" in e && !e.animation && (e.animation = { expand: { effects: {} }, collapse: { hide: !0, effects: {}} }) } }); s(et, { renderItem: function (e) { e = s({ panelBar: {}, group: {} }, e); var t = X.empty, n = e.item; return X.item(s(e, { image: n.imageUrl ? X.image : t, sprite: n.spriteCssClass ? X.sprite : t, itemWrapper: X.itemWrapper, renderContent: et.renderContent, arrow: n.items || n.content || n.contentUrl ? X.arrow : t, subGroup: et.renderGroup }, Z)) }, renderGroup: function (e) { return X.group(s({ renderItems: function (e) { for (var t = "", n = 0, i = e.items, r = i ? i.length : 0, a = s({ length: r }, e.group); r > n; n++) t += et.renderItem(s(e, { group: a, item: s({ index: n }, i[n]) })); return t } }, e, Z)) }, renderContent: function (e) { return X.content(s(e, Z)) } }), r.ui.plugin(et) } (window.kendo.jQuery), function (e, t) { function n(t) { t.children(g).addClass(x), t.children("a").addClass(_).children(g).addClass(x), t.filter(":not([disabled]):not([class*=k-state-disabled])").addClass(N), t.filter("li[disabled]").addClass(H).removeAttr("disabled"), t.filter(":not([class*=k-state])").children("a").filter(":focus").parent().addClass(R + " " + M), t.attr("role", "tab"), t.filter("." + R).attr("aria-selected", !0), t.each(function () { var t = e(this); t.children("." + _).length || t.contents().filter(function () { return !(this.nodeName.match(f) || 3 == this.nodeType && !d(this.nodeValue)) }).wrapAll("<a class='" + _ + "'/>") }) } function i(e) { var t = e.children(".k-item"); t.filter(".k-first:not(:first-child)").removeClass(C), t.filter(".k-last:not(:last-child)").removeClass(b), t.filter(":first-child").addClass(C), t.filter(":last-child").addClass(b) } var r = window.kendo, a = r.ui, o = r.keys, s = e.map, l = e.each, d = e.trim, c = e.extend, u = r.template, p = a.Widget, f = /^(a|div)$/i, h = ".kendoTabStrip", g = "img", m = "href", v = "prev", _ = "k-link", b = "k-last", k = "click", w = "error", y = ":empty", x = "k-image", C = "k-first", T = "select", S = "activate", F = "k-content", D = "contentUrl", E = "mouseenter", A = "mouseleave", I = "contentLoad", H = "k-state-disabled", N = "k-state-default", R = "k-state-active", z = "k-state-focused", O = "k-state-hover", M = "k-tab-on-top", P = ".k-item:not(." + H + ")", B = ".k-tabstrip-items > " + P + ":not(." + R + ")", L = { content: u("<div class='k-content'#= contentAttributes(data) # role='tabpanel'>#= 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("") }, V = { wrapperCssClass: function (e, t) { var n = "k-item", i = t.index; return n += t.enabled === !1 ? " k-state-disabled" : " k-state-default", 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), n }, textAttributes: function (e) { return e.url ? " href='" + e.url + "'" : "" }, text: function (e) { return e.encoded === !1 ? e.text : r.htmlEncode(e.text) }, tag: function (e) { return e.url ? "a" : "span" }, contentAttributes: function (e) { return e.active !== !0 ? " style='display:none' aria-hidden='true' aria-expanded='false'" : "" }, content: function (e) { return e.content ? e.content : e.contentUrl ? "" : " " }, contentUrl: function (e) { return e.contentUrl ? r.attr("content-url") + '="' + e.contentUrl + '"' : "" } }, W = p.extend({ init: function (t, n) { var i, a, o = this; p.fn.init.call(o, t, n), o._animations(o.options), o.wrapper = o.element.is("ul") ? o.element.wrapAll("<div />").parent() : o.element, n = o.options, o._isRtl = r.support.isRtl(o.wrapper), o._tabindex(), o._updateClasses(), o._dataSource(), n.dataSource && o.dataSource.fetch(), o.options.contentUrls && o.wrapper.find(".k-tabstrip-items > .k-item").each(function (t, n) { e(n).find(">." + _).data(D, o.options.contentUrls[t]) }), o.wrapper.on(E + h + " " + A + h, B, o._toggleHover).on("keydown" + h, e.proxy(o._keydown, o)).on("focus" + h, e.proxy(o._active, o)).on("blur" + h, function () { o._current(null) }), o.wrapper.children(".k-tabstrip-items").on(k + h, ".k-state-disabled .k-link", !1).on(k + h, " > " + P, function (t) { o._click(e(t.currentTarget)) && t.preventDefault() }), i = o.tabGroup.children("li." + R), a = o.contentHolder(i.index()), a.length > 0 && 0 === a[0].childNodes.length && o.activateTab(i.eq(0)), o.element.attr("role", "tablist"), o.element[0].id && (o._ariaId = o.element[0].id + "_ts_active"), r.notify(o) }, _active: function () { var e = this.tabGroup.children().filter("." + R); e = e[0] ? e : this._endItem("first"), e[0] && this._current(e) }, _endItem: function (e) { return this.tabGroup.children(P)[e]() }, _item: function (e, t) { var n; return n = t === v ? "last" : "first", e ? (e = e[t](), e[0] || (e = this._endItem(n)), e.hasClass(H) && (e = this._item(e, t)), e) : this._endItem(n) }, _current: function (e) { var n = this, i = n._focused, r = n._ariaId; return e === t ? i : (i && (i[0].id === r && i.removeAttr("id"), i.removeClass(z)), e && (e.hasClass(R) || e.addClass(z), n.element.removeAttr("aria-activedescendant"), r = e[0].id || r, r && (e.attr("id", r), n.element.attr("aria-activedescendant", r))), n._focused = e, t) }, _keydown: function (e) { var n, i = this, r = e.keyCode, a = i._current(), s = i._isRtl; if (e.target == e.currentTarget) { if (r == o.DOWN || r == o.RIGHT) n = s ? v : "next"; else if (r == o.UP || r == o.LEFT) n = s ? "next" : v; else if (r == o.ENTER || r == o.SPACEBAR) i._click(a), e.preventDefault(); else { if (r == o.HOME) return i._click(i._endItem("first")), e.preventDefault(), t; if (r == o.END) return i._click(i._endItem("last")), e.preventDefault(), t } n && (i._click(i._item(a, n)), e.preventDefault()) } }, _dataSource: function () { var t = this; t.dataSource && t._refreshHandler ? t.dataSource.unbind("change", t._refreshHandler) : t._refreshHandler = e.proxy(t.refresh, t), t.dataSource = r.data.DataSource.create(t.options.dataSource).bind("change", t._refreshHandler) }, setDataSource: function (e) { this.options.dataSource = e, this._dataSource(), e.fetch() }, _animations: function (e) { e && "animation" in e && !e.animation && (e.animation = { open: { effects: {} }, close: { effects: {}} }) }, refresh: function (e) { var t, n, i, a, o = this, s = o.options, l = r.getter(s.dataTextField), d = r.getter(s.dataContentField), c = r.getter(s.dataContentUrlField), u = r.getter(s.dataImageUrlField), p = r.getter(s.dataUrlField), f = r.getter(s.dataSpriteCssClass), h = [], g = o.dataSource.view(); for (e = e || {}, i = e.action, i && (g = e.items), t = 0, a = g.length; a > t; t++) n = { text: l(g[t]) }, s.dataContentField && (n.content = d(g[t])), s.dataContentUrlField && (n.contentUrl = c(g[t])), s.dataUrlField && (n.url = p(g[t])), s.dataImageUrlField && (n.imageUrl = u(g[t])), s.dataSpriteCssClass && (n.spriteCssClass = f(g[t])), h[t] = n; if ("add" == e.action) e.index < o.tabGroup.children().length ? o.insertBefore(h, o.tabGroup.children().eq(e.index)) : o.append(h); else if ("remove" == e.action) for (t = 0; g.length > t; t++) o.remove(e.index); else "itemchange" == e.action ? (t = o.dataSource.view().indexOf(g[0]), e.field === s.dataTextField && o.tabGroup.children().eq(t).find(".k-link").text(g[0].get(e.field))) : (o.trigger("dataBinding"), o.remove("li"), o.append(h), o.trigger("dataBound")) }, value: function (n) { var i = this;
102 return n === t ? i.select().text() : (n != i.value() && i.tabGroup.children().each(function () { e.trim(e(this).text()) == n && i.select(this) }), t) }, items: function () { return this.tabGroup[0].children }, setOptions: function (e) { var t = this.options.animation; this._animations(e), e.animation = c(!0, t, e.animation), p.fn.setOptions.call(this, e) }, events: [T, S, w, I, "change", "dataBinding", "dataBound"], options: { name: "TabStrip", dataTextField: "", dataContentField: "", dataImageUrlField: "", dataUrlField: "", dataSpriteCssClass: "", dataContentUrlField: "", animation: { open: { effects: "expand:vertical fadeIn", duration: 200 }, close: { duration: 200} }, collapsible: !1 }, destroy: function () { var e = this; p.fn.destroy.call(e), e._refreshHandler && e.dataSource.unbind("change", e._refreshHandler), e.wrapper.off(h), r.destroy(e.wrapper) }, select: function (t) { var n = this; return 0 === arguments.length ? n.tabGroup.children("li." + R) : (isNaN(t) || (t = n.tabGroup.children().get(t)), t = n.tabGroup.find(t), e(t).each(function (t, i) { i = e(i), i.hasClass(R) || n.trigger(T, { item: i[0], contentElement: n.contentHolder(i.index())[0] }) || n.activateTab(i) }), n) }, enable: function (e, t) { return this._toggleDisabled(e, t !== !1), this }, disable: function (e) { return this._toggleDisabled(e, !1), this }, reload: function (t) { t = this.tabGroup.find(t); var n = this; return t.each(function () { var t = e(this), i = t.find("." + _).data(D), r = n.contentHolder(t.index()); i && n.ajaxRequest(t, r, null, i) }), n }, append: function (e) { var t = this, n = t._create(e); return l(n.tabs, function (e) { t.tabGroup.append(this), t.wrapper.append(n.contents[e]) }), i(t.tabGroup), t._updateContentElements(), t }, insertBefore: function (t, n) { var r = this, a = r._create(t), o = e(r.contentElement(n.index())); return l(a.tabs, function (e) { n.before(this), o.before(a.contents[e]) }), i(r.tabGroup), r._updateContentElements(), r }, insertAfter: function (t, n) { var r = this, a = r._create(t), o = e(r.contentElement(n.index())); return l(a.tabs, function (e) { n.after(this), o.after(a.contents[e]) }), i(r.tabGroup), r._updateContentElements(), r }, remove: function (t) { var n = this, i = typeof t, r = e(); return "string" === i ? t = n.tabGroup.find(t) : "number" === i && (t = n.tabGroup.children().eq(t)), t.each(function () { r.push(n.contentElement(e(this).index())) }), t.remove(), r.remove(), n._updateContentElements(), n }, _create: function (i) { var r, a, o = e.isPlainObject(i), l = this; return o || e.isArray(i) ? (i = e.isArray(i) ? i : [i], r = s(i, function (t, n) { return e(W.renderItem({ group: l.tabGroup, item: c(t, { index: n }) })) }), a = s(i, function (n, i) { return n.content || n.contentUrl ? e(W.renderContent({ item: c(n, { index: i }) })) : t })) : (r = e(i), a = e("<div class='" + F + "'/>"), n(r)), { tabs: r, contents: a} }, _toggleDisabled: function (t, n) { t = this.tabGroup.find(t), t.each(function () { e(this).toggleClass(N, n).toggleClass(H, !n) }) }, _updateClasses: function () { var r, a, o, s = this; s.wrapper.addClass("k-widget k-header k-tabstrip"), s.tabGroup = s.wrapper.children("ul").addClass("k-tabstrip-items k-reset"), s.tabGroup[0] || (s.tabGroup = e("<ul class='k-tabstrip-items k-reset'/>").appendTo(s.wrapper)), r = s.tabGroup.find("li").addClass("k-item"), r.length && (a = r.filter("." + R).index(), o = a >= 0 ? a : t, s.tabGroup.contents().filter(function () { return 3 == this.nodeType && !d(this.nodeValue) }).remove()), a >= 0 && r.eq(a).addClass(M), s.contentElements = s.wrapper.children("div"), s.contentElements.addClass(F).eq(o).addClass(R).css({ display: "block" }), r.length && (n(r), i(s.tabGroup), s._updateContentElements()) }, _updateContentElements: function () { var t = this, n = t.options.contentUrls || [], i = t.element.attr("id"), a = t.wrapper.children("div"); t.tabGroup.find(".k-item").each(function (r) { var o = a.eq(r), s = i + "-" + (r + 1); this.setAttribute("aria-controls", s), !o.length && n[r] ? e("<div id='" + s + "' class='" + F + "'/>").appendTo(t.wrapper) : o.attr("id", s), o.attr("role", "tabpanel"), o.filter(":not(." + R + ")").attr("aria-hidden", !0).attr("aria-expanded", !1), o.filter("." + R).attr("aria-expanded", !0) }), t.contentElements = t.contentAnimators = t.wrapper.children("div"), r.kineticScrollNeeded && r.mobile.ui.Scroller && (r.touchScroller(t.contentElements), t.contentElements = t.contentElements.children(".km-scroll-container")) }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(O, t.type == E) }, _click: function (e) { var t, n, i = this, r = e.find("." + _), a = r.attr(m), o = i.options.collapsible, s = i.contentHolder(e.index()); if (e.closest(".k-widget")[0] == i.wrapper[0]) { if (e.is("." + H + (o ? "" : ",." + R))) return !0; if (n = r.data(D) || a && ("#" == a.charAt(a.length - 1) || -1 != a.indexOf("#" + i.element[0].id + "-")), t = !a || n, i.tabGroup.children("[data-animating]").length) return t; if (i.trigger(T, { item: e[0], contentElement: s[0] })) return !0; if (t !== !1) return o && e.is("." + R) ? (i.deactivateTab(e), !0) : (i.activateTab(e) && (t = !0), t) } }, deactivateTab: function (e) { var t = this, n = t.options.animation, i = n.open, a = c({}, n.close), o = a && "effects" in a; e = t.tabGroup.find(e), a = c(o ? a : c({ reverse: !0 }, i), { hide: !0 }), r.size(i.effects) ? (e.kendoAddClass(N, { duration: i.duration }), e.kendoRemoveClass(R, { duration: i.duration })) : (e.addClass(N), e.removeClass(R)), e.removeAttr("aria-selected"), t.contentAnimators.filter("." + R).kendoStop(!0, !0).kendoAnimate(a).removeClass(R).attr("aria-hidden", !0) }, activateTab: function (e) { var t, n, i, a, o, s, l, d, u, p, f, h, g, m, v; return e = this.tabGroup.find(e), t = this, n = t.options.animation, i = n.open, a = c({}, n.close), o = a && "effects" in a, s = e.parent().children(), l = s.filter("." + R), d = s.index(e), a = c(o ? a : c({ reverse: !0 }, i), { hide: !0 }), r.size(i.effects) ? (l.kendoRemoveClass(R, { duration: a.duration }), e.kendoRemoveClass(O, { duration: a.duration })) : (l.removeClass(R), e.removeClass(O)), u = t.contentAnimators, e.data("in-request") && (t.xhr.abort(), e.removeAttr("data-in-request")), 0 === u.length ? (l.removeClass(M), e.addClass(M).css("z-index"), e.addClass(R), t._current(e), t.trigger("change"), !1) : (p = u.filter("." + R), f = t.contentHolder(d), h = f.closest(".k-content"), 0 === f.length ? (p.removeClass(R).attr("aria-hidden", !0).kendoStop(!0, !0).kendoAnimate(a), !1) : (e.attr("data-animating", !0), g = (e.children("." + _).data(D) || !1) && f.is(y), m = function () { l.removeClass(M), e.addClass(M).css("z-index"), r.size(i.effects) ? (l.kendoAddClass(N, { duration: i.duration }), e.kendoAddClass(R, { duration: i.duration })) : (l.addClass(N), e.addClass(R)), l.removeAttr("aria-selected"), e.attr("aria-selected", !0), t._current(e), h.addClass(R).removeAttr("aria-hidden").kendoStop(!0, !0).attr("aria-expanded", !0).kendoAnimate(c({ init: function () { t.trigger(S, { item: e[0], contentElement: f[0] }) } }, i, { complete: function () { e.removeAttr("data-animating") } })) }, v = function () { g ? (e.removeAttr("data-animating"), t.ajaxRequest(e, f, function () { e.attr("data-animating", !0), m(), t.trigger("change") })) : (m(), t.trigger("change")) }, p.removeClass(R), p.attr("aria-hidden", !0), p.attr("aria-expanded", !1), p.length ? p.kendoStop(!0, !0).kendoAnimate(c({ complete: v }, a)) : v(), !0)) }, contentElement: function (e) { var n, i, a, o; if (isNaN(e - 0)) return t; if (n = this.contentElements && this.contentElements[0] && !r.kineticScrollNeeded ? this.contentElements : this.contentAnimators, i = RegExp("-" + (e + 1) + "$"), n) for (a = 0, o = n.length; o > a; a++) if (i.test(n.closest(".k-content")[a].id)) return n[a]; return t }, contentHolder: function (t) { var n = e(this.contentElement(t)), i = n.children(".km-scroll-container"); return r.support.touch && i[0] ? i : n }, ajaxRequest: function (t, n, i, r) { if (t = this.tabGroup.find(t), !t.find(".k-loading").length) { var a = this, o = t.find("." + _), s = {}, l = null, d = setTimeout(function () { l = e("<span class='k-icon k-loading'/>").prependTo(o) }, 100); r = r || o.data(D) || o.attr(m), t.attr("data-in-request", !0), a.xhr = e.ajax({ type: "GET", cache: !1, url: r, dataType: "html", data: s, error: function (e, t) { a.trigger("error", { xhr: e, status: t }) && this.complete() }, complete: function () { t.removeAttr("data-in-request"), clearTimeout(d), null !== l && l.remove() }
102, success: function (e) { try { n.html(e) } catch (o) { var s = window.console; s && s.error && s.error(o.name + ": " + o.message + " in " + r), this.error(this.xhr, "error") } i && i.call(a, n), a.trigger(I, { item: t[0], contentElement: n[0] }) } }) } } }); c(W, { renderItem: function (e) { e = c({ tabStrip: {}, group: {} }, e); var t = L.empty, n = e.item; return L.item(c(e, { image: n.imageUrl ? L.image : t, sprite: n.spriteCssClass ? L.sprite : t, itemWrapper: L.itemWrapper }, V)) }, renderContent: function (e) { return L.content(c(e, V)) } }), r.ui.plugin(W) } (window.kendo.jQuery), function (e, t) { 103 function n(e, t, n) { var i, r = e.getTimezoneOffset(); e.setTime(e.getTime() + t), n || (i = e.getTimezoneOffset() - r, e.setTime(e.getTime() + i * H)) } function i() { var e = new G, t = new G(e.getFullYear(), e.getMonth(), e.getDate(), 0, 0, 0), n = new G(e.getFullYear(), e.getMonth(), e.getDate(), 12, 0, 0); return -1 * (t.getTimezoneOffset() - n.getTimezoneOffset()) } function r(e) { return 60 * e.getHours() * H + e.getMinutes() * H + 1e3 * e.getSeconds() + e.getMilliseconds() } function a(e, t, n) { var i, a = r(t), o = r(n); return e && a != o ? (i = r(e), a > i && (i += N), a > o && (o += N), i >= a && o >= i) : !0 } function o(e) { var t = e.parseFormats; e.format = f(e.format || c.getCulture(e.culture).calendars.standard.patterns.t), t = U(t) ? t : [t], t.splice(0, 0, e.format), e.parseFormats = t } function s(e) { e.preventDefault() } var l, d, c = window.kendo, u = c.keys, p = c._activeElement, f = c._extractFormat, h = c.support, g = h.browser, m = c.ui, v = m.Widget, _ = "open", b = "close", k = "change", w = ".kendoTimePicker", y = "click" + w, x = "k-state-default", C = "disabled", T = "readonly", S = "li", F = "<span/>", D = "k-state-focused", E = "k-state-hover", A = "mouseenter" + w + " mouseleave" + w, I = "mousedown" + w, H = 6e4, N = 864e5, R = "k-state-selected", z = "k-state-disabled", O = "aria-selected", M = "aria-expanded", P = "aria-hidden", B = "aria-disabled", L = "aria-readonly", V = "aria-activedescendant", W = "id", U = e.isArray, q = e.extend, j = e.proxy, G = Date, $ = new G; $ = new G($.getFullYear(), $.getMonth(), $.getDate(), 0, 0, 0), l = function (t) { 104 var n = this, i = t.id; n.options = t, n.ul = e('<ul tabindex="-1" role="listbox" aria-hidden="true" unselectable="on" class="k-list k-reset"/>').css({ overflow: h.kineticScrollNeeded ? "" : "auto" }).on(y, S, j(n._click, n)).on("mouseenter" + w, S, function () { e(this).addClass(E) }).on("mouseleave" + w, S, function () { e(this).removeClass(E) }), n.list = e("<div class='k-list-container'/>").append(n.ul).on(I, s), i && (n._timeViewID = i + "_timeview", n._optionID = i + "_option_selected", n.ul.attr(W, n._timeViewID)), n._popup(), n.template = c.template('<li tabindex="-1" role="option" class="k-item" unselectable="on">#=data#</li>', { useWithBlock: !1 }) 105 }, l.prototype = { current: function (n) { var i = this, r = i.options.active; return n === t ? i._current : (i._current && i._current.removeClass(R).removeAttr(O).removeAttr(W), n && (n = e(n).addClass(R).attr(W, i._optionID).attr(O, !0), i.scroll(n[0])), i._current = n, r && r(n), t) }, close: function () { this.popup.close() }, destroy: function () { var e = this; e.ul.off(w), e.list.off(w), e.popup.destroy() }, open: function () { var e = this; e.ul[0].firstChild || e.bind(), e.popup.open(), e._current && e.scroll(e._current[0]) }, dataBind: function (e) { for (var t, n = this, i = n.options, r = i.format, o = c.toString, s = n.template, l = e.length, d = 0, u = ""; l > d; d++) t = e[d], a(t, i.min, i.max) && (u += s(o(t, r, i.culture))); n._html(u, l) }, refresh: function () { var e, t, a, o = this, s = o.options, l = s.format, d = i(), u = 0 > d, p = s.min, f = s.max, h = r(p), g = r(f), m = s.interval * H, v = c.toString, _ = o.template, b = new G(+p), k = b.getDate(), w = 0, y = ""; for (a = u ? (N + d * H) / m : N / m, h != g && (h > g && (g += N), a = (g - h) / m + 1), t = parseInt(a, 10); a > w; w++) w && n(b, m, u), g && t == w && (e = r(b), b.getDate() >
105 k && (e += N), e > g && (b = new G(+f))), y += _(v(b, l, s.culture)); o._html(y, a) }, bind: function () { var e = this, t = e.options.dates; t && t[0] ? e.dataBind(t) : e.refresh() }, _html: function (e, t) { var n = this; n.ul[0].innerHTML = e, n._height(t), n.current(null), n.select(n._value) }, scroll: function (e) { if (e) { var t = this.ul[0], n = e.offsetTop, i = e.offsetHeight, r = t.scrollTop, a = t.clientHeight, o = n + i; t.scrollTop = r > n ? n : o > r + a ? o - a : r } }, select: function (t) { var n = this, i = n.options, r = n._current; t instanceof Date && (t = c.toString(t, i.format, i.culture)), "string" == typeof t && (r && r.text() === t ? t = r : (t = e.grep(n.ul[0].childNodes, function (e) { return (e.textContent || e.innerText) == t }), t = t[0] ? t : null)), n.current(t) }, toggle: function () { var e = this; e.popup.visible() ? e.close() : e.open() }, value: function (e) { var t = this; t._value = e, t.ul[0].firstChild && t.select(e) }, _click: function (t) { var n = this, i = e(t.currentTarget); t.isDefaultPrevented() || (n.select(i), n.options.change(i.text(), !0), n.close()) }, _height: function (e) { if (e) { var t = this, n = t.list, i = n.parent(".k-animation-container"), r = t.options.height; n.add(i).show().height(t.ul[0].scrollHeight > r ? r : "auto").hide() } }, _parse: function (e) { var t = this, n = t.options, i = t._value || $; return e instanceof G ? e : (e = c.parseDate(e, n.parseFormats, n.culture), e && (e = new G(i.getFullYear(), i.getMonth(), i.getDate(), e.getHours(), e.getMinutes(), e.getSeconds(), e.getMilliseconds())), e) }, _adjustListWidth: function () { var e, t, n = this.list, i = n[0].style.width, r = this.options.anchor; (n.data("width") || !i) && (e = window.getComputedStyle ? window.getComputedStyle(r[0], null) : 0, t = e ? parseFloat(e.width) : r.outerWidth(), e && (g.mozilla || g.msie) && (t += parseFloat(e.paddingLeft) + parseFloat(e.paddingRight) + parseFloat(e.borderLeftWidth) + parseFloat(e.borderRightWidth)), i = t - (n.outerWidth() - n.width()), n.css({ fontFamily: r.css("font-family"), width: i }).data("width", i)) }, _popup: function () { var e = this, t = e.list, n = e.options, i = n.anchor; e.popup = new m.Popup(t, q(n.popup, { anchor: i, open: n.open, close: n.close, animation: n.animation, isRtl: h.isRtl(n.anchor) })), c.touchScroller(e.popup.element) }, move: function (e) { var n = this, i = e.keyCode, r = n.ul[0], a = n._current, o = i === u.DOWN; if (i === u.UP || o) { if (e.altKey) return n.toggle(o), t; a = o ? a ? a[0].nextSibling : r.firstChild : a ? a[0].previousSibling : r.lastChild, a && n.select(a), n.options.change(n._current.text()), e.preventDefault() } else (i === u.ENTER || i === u.TAB || i === u.ESC) && (e.preventDefault(), a && n.options.change(a.text(), !0), n.close()) } }, l.getMilliseconds = r, c.TimeView = l, d = v.extend({ init: function (e, t) { var n, i, r, a = this; v.fn.init.call(a, e, t), e = a.element, t = a.options, o(t), a._wrapper(), a.timeView = i = new l(q({}, t, { id: e.attr(W), anchor: a.wrapper, format: t.format, change: function (t, n) { n ? a._change(t) : e.val(t) }, open: function (t) { a.timeView._adjustListWidth(), a.trigger(_) ? t.preventDefault() : (e.attr(M, !0), n.attr(P, !1)) }, close: function (t) { a.trigger(b) ? t.preventDefault() : (e.attr(M, !1), n.attr(P, !0)) }, active: function (t) { e.removeAttr(V), t && e.attr(V, i._optionID) } })), n = i.ul, a._icon(), a._reset(), e[0].type = "text", e.addClass("k-input").attr({ role: "textbox", "aria-haspopup": !0, "aria-expanded": !1, "aria-owns": i._timeViewID }), r = e.is("[disabled]"), r ? a.enable(!1) : a.readonly(e.is("[readonly]")), a.value(t.value || e.val()), c.notify(a) }, options: { name: "TimePicker", min: $, max: $, format: "", dates: [], parseFormats: [], value: null, interval: 30, height: 200, animation: {} }, events: [_, b, k], setOptions: function (e) { var t = this, n = t.timeView, i = n.options; v.fn.setOptions.call(t, e), o(t.options), n.options = q(i, t.options, { active: i.active, change: i.change, close: i.close, open: i.open }), n.ul[0].innerHTML = "" }, dataBind: function (e) { U(e) && this.timeView.dataBind(e) }, _editable: function (e) { var t = this, n = e.disable, i = e.readonly, r = t._arrow.off(w), a = t.element.off(w), o = t._inputWrapper.off(w); i || n ? (o.addClass(n ? z : x).removeClass(n ? x : z), a.attr(C, n).attr(T, i).attr(B, n).attr(L, i)) : (o.addClass(x).removeClass(z).on(A, t._toggleHover), a.removeAttr(C).removeAttr(T).attr(B, !1).attr(L, !1).on("keydown" + w, j(t._keydown, t)).on("blur" + w, j(t._blur, t)).on("focus" + w, function () { t._inputWrapper.addClass(D) }), r.on(y, j(t._click, t)).on(I, s)) }, readonly: function (e) { this._editable({ readonly: e === t ? !0 : e, disable: !1 }) }, enable: function (e) { this._editable({ readonly: !1, disable: !(e = e === t ? !0 : e) }) }, destroy: function () { var e = this; v.fn.destroy.call(e), e.timeView.destroy(), e.element.off(w), e._arrow.off(w), e._inputWrapper.off(w), e._form && e._form.off("reset", e._resetHandler) }, close: function () { this.timeView.close() }, open: function () { this.timeView.open() }, min: function (e) { return this._option("min", e) }, max: function (e) { return this._option("max", e) }, value: function (e) { var n = this; return e === t ? n._value : (n._old = n._update(e), null === n._old && n.element.val(""), n._oldText = n.element.val(), t) }, _blur: function () { var e = this, t = e.element.val(); e.close(), t !== e._oldText && e._change(t), e._inputWrapper.removeClass(D) }, _click: function () { var e = this, t = e.element; e.timeView.toggle(), h.touch || t[0] === p() || t.focus() }, _change: function (e) { var t = this; e = t._update(e), +t._old != +e && (t._old = e, t._oldText = t.element.val(), t.trigger(k), t.element.trigger(k)) }, _icon: function () { var t, n = this, i = n.element; t = i.next("span.k-select"), t[0] || (t = e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-clock">select</span></span>').insertAfter(i)), n._arrow = t.attr({ role: "button", "aria-controls": n.timeView._timeViewID }) }, _keydown: function (e) { var t = this, n = e.keyCode, i = t.timeView, r = t.element.val(); i.popup.visible() || e.altKey ? i.move(e) : n === u.ENTER && r !== t._oldText && t._change(r) }, _option: function (e, n) { var i = this, r = i.options; return n === t ? r[e] : (n = i.timeView._parse(n), n && (n = new G(+n), r[e] = n, i.timeView.options[e] = n, i.timeView.bind()), t) }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(E, "mouseenter" === t.type) }, _update: function (e) { var t = this, n = t.options, i = t.timeView, r = i._parse(e); return a(r, n.min, n.max) || (r = null), t._value = r, t.element.val(r ? c.toString(r, n.format, n.culture) : e), i.value(r), r }, _wrapper: function () { var t, n = this, i = n.element; t = i.parents(".k-timepicker"), t[0] || (t = i.wrap(F).parent().addClass("k-picker-wrap k-state-default"), t = t.wrap(F).parent()), t[0].style.cssText = i[0].style.cssText, n.wrapper = t.addClass("k-widget k-timepicker k-header").addClass(i[0].className), i.css({ width: "100%", height: i[0].style.height }), n._inputWrapper = e(t[0].firstChild) }, _reset: function () { var e = this, t = e.element, n = t.closest("form"); n[0] && (e._resetHandler = function () { e.value(t[0].defaultValue) }, e._form = n.on("reset", e._resetHandler)) } }), m.plugin(d) 106} (window.kendo.jQuery), function (e, t) { function n(e) { e.preventDefault() } function i(t) { var n, i = r.getCulture(t.culture).calendars.standard.patterns; t.format = l(t.format || i.g), t.timeFormat = n = l(t.timeFormat || i.t), r.DateView.normalize(t), -1 === e.inArray(n, t.parseFormats) && t.parseFormats.splice(1, 0, n) } var r = window.kendo, a = r.TimeView, o = r.parseDate, s = r._activeElement, l = r._extractFormat, d = r.calendar, c = d.isInRange, u = d.restrictValue, p = d.isEqualDatePart, f = a.getMilliseconds, h = r.ui, g = h.Widget, m = "open", v = "close", _ = "change", b = ".kendoDateTimePicker", k = "click" + b, w = "disabled", y = "readonly", x = "k-state-default", C = "k-state-focused", T = "k-state-hover", S = "k-state-disabled", F = "mouseenter" + b + " mouseleave" + b, D = "mousedown" + b, E = "month", A = "<span/>", I = "aria-activedescendant", H = "aria-expanded", N = "aria-hidden", R = "aria-owns", z = "aria-disabled", O = "aria-readonly", M = Date, P = new M(1900, 0, 1), B = new M(2099, 11, 31), L = { view: "date" }, V = { view: "time" }, W = e.extend, U = g.extend({ init: function (e, t) { var n, a = this; g.fn.init.call(a, e, t), e = a.element, t = a.options, i(t), a._wrapper(), a._views(), a._icons(), a._reset(), a._template(), e[0].type = "text", e.addClass("k-input").attr({ role: "textbox", "aria-haspopup": !0, "aria-expanded": !1 }), a._midnight = 0 === f(t.min) + f(t.max), n = e.is("[disabled]"), n ? a.enable(!1) : a.readonly(e.is("[readonly]")), a.value(t.value || e.val()), r.notify(a) }, options: { name: "DateTimePicker", value: null, format: "", timeFormat: "", culture: "", parseFormats: [], dates: [], min: new M(P), max: new M(B), interval: 30, height: 200, footer: "", start: E, depth: E, animation: {}, month: {}, ARIATemplate: 'Current focused date is #=kendo.toString(data.current, "G")#' }, events: [m, v, _], setOptions: function (e) { var t = this, n = t.dateView.options, r = t.timeView.options; g.fn.setOptions.call(t, e), i(t.options), e = t.options, W(n, e, { change: n.change, close: n.close, open: n.open }), W(r, e, { format: e.timeFormat, active: r.active, change: r.change, close: r.close, open: r.open }), t.timeView.ul[0].innerHTML = "" }, _editable: function (t) { var i = this, a = i.element.off(b), o = i._dateIcon.off(b), l = i._timeIcon.off(b), d = i._inputWrapper.off(b), c = t.readonly, u = t.disable; c || u ? (d.addClass(u ? S : x).removeClass(u ? x : S), a.attr(w, u).attr(y, c).attr(z, u).attr(O, c)) : (d.addClass(x).removeClass(S).on(F, i._toggleHover), a.removeAttr(w).removeAttr(y).attr(z, !1).attr(O, !1).on("keydown" + b, e.proxy(i._keydown, i)
106).on("focus" + b, function () { i._inputWrapper.addClass(C) }).on("blur" + b, function () { i._inputWrapper.removeClass(C), a.val() !== i._oldText && i._change(a.val()), i.close("date"), i.close("time") }), o.on(D, n).on(k, function () { i.toggle("date"), r.support.touch || a[0] === s() || a.focus() }), l.on(D, n).on(k, function () { i.toggle("time"), r.support.touch || a[0] === s() || a.focus() })) }, readonly: function (e) { this._editable({ readonly: e === t ? !0 : e, disable: !1 }) }, enable: function (e) { this._editable({ readonly: !1, disable: !(e = e === t ? !0 : e) }) }, destroy: function () { var e = this; g.fn.destroy.call(e), e.dateView.destroy(), e.timeView.destroy(), e.element.off(b), e._dateIcon.off(b), e._timeIcon.off(b), e._inputWrapper.off(b), e._form && e._form.off("reset", e._resetHandler) }, close: function (e) { "time" !== e && (e = "date"), this[e + "View"].close() }, open: function (e) { "time" !== e && (e = "date"), this[e + "View"].open() }, min: function (e) { return this._option("min", e) }, max: function (e) { return this._option("max", e) }, toggle: function (e) { var t = "timeView"; "time" !== e ? e = "date" : t = "dateView", this[e + "View"].toggle(), this[t].close() }, value: function (e) { var n = this; return e === t ? n._value : (n._old = n._update(e), null === n._old && n.element.val(""), n._oldText = n.element.val(), t) }, _change: function (e) { var t = this; e = t._update(e), +t._old != +e && (t._old = e, t._oldText = t.element.val(), t.trigger(_), t.element.trigger(_)) }, _option: function (e, n) { var i = this, r = i.options, a = i.timeView, s = a.options, l = i._value || i._old; if (n === t) return r[e]; if (n = o(n, r.parseFormats, r.culture)) { if (r[e] = new M(+n), i.dateView[e](n), i._midnight = 0 === f(r.min) + f(r.max), l && p(n, l)) { if (i._midnight && "max" == e) return s[e] = B, a.dataBind([B]), t; s[e] = n } else s.max = B, s.min = P; a.bind() } }, _toggleHover: function (t) { e(t.currentTarget).toggleClass(T, "mouseenter" === t.type) }, _update: function (t) { var n, i, a, s, l, d = this, f = d.options, h = f.min, g = f.max, m = f.dates, v = d.timeView, _ = o(t, f.parseFormats, f.culture); return +_ === +d._value ? (l = r.toString(_, f.format, f.culture), l !== t && d.element.val(null === _ ? t : l), _) : (null !== _ && p(_, h) ? _ = u(_, h, g) : c(_, h, g) || (_ = null), d._value = _, v.value(_), d.dateView.value(_), _ && (a = d._old, i = v.options, m[0] && (m = e.grep(m, function (e) { return p(_, e) }), m[0] && (v.dataBind(m), s = !0)), s || (p(_, h) && (i.min = h, i.max = B, n = !0), p(_, g) && (d._midnight ? (v.dataBind([B]), s = !0) : (i.max = g, n || (i.min = P), n = !0))), !s && (!a && n || a && !p(a, _)) && (n || (i.max = B, i.min = P), v.bind())), d.element.val(_ ? r.toString(_, f.format, f.culture) : t), d._updateARIA(_), _) }, _keydown: function (e) { var t = this, n = t.dateView, i = t.timeView, a = t.element.val(), o = n.popup.visible(); e.altKey && e.keyCode === r.keys.DOWN ? t.toggle(o ? "time" : "date") : o ? (n.move(e), t._updateARIA(n._current)) : i.popup.visible() ? i.move(e) : e.keyCode === r.keys.ENTER && a !== t._oldText && t._change(a) }, _views: function () { var e, t, n, i, s, l = this, d = l.element, u = l.options, p = d.attr("id"); l.dateView = e = new r.DateView(W({}, u, { id: p, anchor: l.wrapper, change: function () { var t, n = e.calendar.value(), i = +n, r = +u.min, a = +u.max; (i === r || i === a) && (t = new M(+l._value), t.setFullYear(n.getFullYear()), t.setMonth(n.getMonth()), t.setDate(n.getDate()), c(t, r, a) && (n = t)), l._change(n), l.close("date") }, close: function (e) { l.trigger(v, L) ? e.preventDefault() : (d.attr(H, !1), n.attr(N, !0), t.popup.visible() || d.removeAttr(R)) }, open: function (t) { l.trigger(m, L) ? t.preventDefault() : (l.element.val() !== l._oldText && (s = o(d.val(), u.parseFormats, u.culture), s ? (l.dateView._current = s, l.dateView.calendar._focus(s)) : l.dateView.value(s)), n.attr(N, !1), d.attr(H, !0).attr(R, e._dateViewID)) } })), n = e.div, l.timeView = t = new a({ id: p, value: u.value, anchor: l.wrapper, animation: u.animation, format: u.timeFormat, culture: u.culture, height: u.height, interval: u.interval, min: new M(P), max: new M(B), parseFormats: u.parseFormats, change: function (n, i) { n = t._parse(n), u.min > n ? (n = new M(+u.min), t.options.min = n) : n > u.max && (n = new M(+u.max), t.options.max = n), i ? (l._timeSelected = !0, l._change(n)) : (d.val(r.toString(n, u.format, u.culture)), e.value(n), l._updateARIA(n)) }, close: function (t) { l.trigger(v, V) ? t.preventDefault() : (i.attr(N, !0), d.attr(H, !1), e.popup.visible() || d.removeAttr(R)) }, open: function (e) { t._adjustListWidth(), l.trigger(m, V) ? e.preventDefault() : (i.attr(N, !1), d.attr(H, !0).attr(R, t._timeViewID)) }, active: function (e) { d.removeAttr(I), e && d.attr(I, t._optionID) } }), i = t.ul }, _icons: function () { var t, n = this, i = n.element; t = i.next("span.k-select"), t[0] || (t = e('<span unselectable="on" class="k-select"><span unselectable="on" class="k-icon k-i-calendar">select</span><span unselectable="on" class="k-icon k-i-clock">select</span></span>').insertAfter(i)), t = t.children(), n._dateIcon = t.eq(0).attr({ role: "button", "aria-controls": n.dateView._dateViewID }), n._timeIcon = t.eq(1).attr({ role: "button", "aria-controls": n.timeView._timeViewID }) }, _wrapper: function () { var t, n = this, i = n.element; t = i.parents(".k-datetimepicker"), t[0] || (t = i.wrap(A).parent().addClass("k-picker-wrap k-state-default"), t = t.wrap(A).parent()), t[0].style.cssText = i[0].style.cssText, i.css({ width: "100%", height: i[0].style.height }), n.wrapper = t.addClass("k-widget k-datetimepicker k-header").addClass(i[0].className), n._inputWrapper = e(t[0].firstChild) }, _reset: function () { var e = this, t = e.element, n = t.closest("form"); n[0] && (e._resetHandler = function () { e.value(t[0].defaultValue) }, e._form = n.on("reset", e._resetHandler)) }, _template: function () { this._ariaTemplate = r.template(this.options.ARIATemplate) }, _updateARIA: function (e) { this.element.attr("aria-label", this._ariaTemplate({ current: e })) } }); h.plugin(U) } (window.kendo.jQuery), function (e, t) { 107 function n(e) { return function (t) { var n = t.children(".k-animation-container"); return n.length || (n = t), n.children(e) } } function i(e) { return e.children("div").find(".k-checkbox:first :checkbox") } function r(e) { return function (t, n) { n = n.closest(L); var i, r = n.parent(); return r.parent().is("li") && (i = r.parent()), this._dataSourceMove(t, r, i, function (t, i) { return this._insert(t.data(), i, n.index() + e) }) } } function a(t) { var n, i, r = t.children("div"), a = t.children("ul"), o = r.children(".k-icon"), s = t.children(":checkbox"), l = r.children(".k-in"); if (!t.hasClass("k-treeview") && (r.length || (r = e("<div />").prependTo(t)), !o.length && a.length ? o = e("<span class='k-icon' />").prependTo(r) : a.length && a.children().length || (o.remove(), a.remove()), s.length && e("<span class='k-checkbox' />").appendTo(r).append(s), !l.length)) for (l = e("<span class='k-in' />").appendTo(r)[0], n = r[0].nextSibling, l = r.find(".k-in")[0]; n && "ul" != n.nodeName.toLowerCase(); ) i = n, n = n.nextSibling, 3 == i.nodeType && (i.nodeValue = e.trim(i.nodeValue)), l.appendChild(i) } function o(e) { var t = this; t.treeview = e, t.hovered = e.element, t._draggable = new p.Draggable(e.element, { filter: "div:not(.k-state-disabled) .k-in", hint: function (t) { return e.templates.dragClue({ item: e.dataItem(t), treeview: e.options }) }
107, cursorOffset: { left: 10, top: u.support.touch || u.support.pointers ? -40 / u.support.zoomLevel() : 10 }, dragstart: b(t.dragstart, t), dragcancel: b(t.dragcancel, t), drag: b(t.drag, t), dragend: b(t.dragend, t) }) } var s, l, d, c, u = window.kendo, p = u.ui, f = u.data, h = e.extend, g = u.template, m = e.isArray, v = p.Widget, _ = f.HierarchicalDataSource, b = e.proxy, k = u.keys, w = ".kendoTreeView", y = "select", x = "navigate", C = "expand", T = "change", S = "error", F = "checked", D = "collapse", E = "dragstart", A = "drag", I = "drop", H = "dragend", N = "dataBound", R = "click", z = "visibility", O = "undefined", M = "k-state-hover", P = "k-treeview", B = ":visible", L = ".k-item", V = "string", W = "aria-selected", U = "aria-disabled", q = { text: "dataTextField", url: "dataUrlField", spriteCssClass: "dataSpriteCssClassField", imageUrl: "dataImageUrlField" }, j = function (e) { return "object" == typeof HTMLElement ? e instanceof HTMLElement : e && "object" == typeof e && 1 === e.nodeType && typeof e.nodeName === V }; l = n(".k-group"), d = n(".k-group,.k-content"), c = function (e) { return e.children("div").children(".k-icon") }, s = v.extend({ init: function (e, t) { var n, i = this, r = !1; m(t) && (n = !0, t = { dataSource: t }), t && typeof t.loadOnDemand == O && m(t.dataSource) && (t.loadOnDemand = !1), v.prototype.init.call(i, e, t), e = i.element, t = i.options, r = e.is("ul") || e.hasClass(P), r && (t.dataSource.list = e.is("ul") ? e : e.children("ul")), i._animation(), i._accessors(), i._templates(), e.hasClass(P) ? (i.wrapper = e, i.root = e.children("ul").eq(0)) : (i._wrapper(), r && (i.root = e, i._group(i.wrapper))), i._tabindex(), i.wrapper.filter("[role=tree]").length || i.wrapper.attr("role", "tree"), i._dataSource(r), i._attachEvents(), t.dragAndDrop && (i.dragging = new o(i)), r ? i._attachUids() : t.autoBind && (i._progress(!0), i.dataSource.fetch()), t.checkboxes && t.checkboxes.checkChildren && i._updateIndeterminateInitial(i.wrapper), i.element[0].id && (i._ariaId = u.format("{0}_tv_active", i.element[0].id)) }, _attachEvents: function () { var t = this, n = ".k-in:not(.k-state-selected,.k-state-disabled)", i = "mouseenter"; t.wrapper.on(i + w, ".k-in.k-state-selected", function (e) { e.preventDefault() }).on(i + w, n, function () { e(this).addClass(M) }).on("mouseleave" + w, n, function () { e(this).removeClass(M) }).on(R + w, n, b(t._click, t)).on("dblclick" + w, ".k-in:not(.k-state-disabled)", b(t._toggleButtonClick, t)).on(R + w, ".k-plus,.k-minus", b(t._toggleButtonClick, t)).on("keydown" + w, b(t._keydown, t)).on("focus" + w, b(t._focus, t)).on("blur" + w, b(t._blur, t)).on("mousedown" + w, ".k-in,.k-checkbox :checkbox,.k-plus,.k-minus", b(t._mousedown, t)).on("change" + w, ".k-checkbox :checkbox", b(t._checkboxChange, t)).on("click" + w, ".k-checkbox :checkbox", b(t._checkboxClick, t)).on("click" + w, ".k-request-retry", b(t._retryRequest, t)).on("click" + w, function (n) { e(n.target).is(":focusable") || t.focus() }) }, _checkboxClick: function (t) { var n = e(t.target); n.data("indeterminate") && (n.data("indeterminate", !1).prop("indeterminate", !1).prop(F, !0), this._checkboxChange(t)) }, _attachUids: function (t, n) { var i, r = this, a = u.attr("uid"); t = t || r.root, n = n || r.dataSource, i = n.view(), t.children("li").each(function (t, n) { n = e(n).attr(a, i[t].uid), n.attr("role", "treeitem"), r._attachUids(n.children("ul"), i[t].children) }) }, _animation: function () { var e = this.options, t = e.animation; t === !1 ? t = { expand: { effects: {} }, collapse: { hide: !0, effects: {}}} : t.collapse && "effects" in t.collapse || (t.collapse = h({ reverse: !0 }, t.expand)), h(t.collapse, { hide: !0 }), e.animation = t }, _templates: function () { var e = this, t = e.options, n = b(e._fieldAccessor, e); t.template && typeof t.template == V ? t.template = g(t.template) : t.template || (t.template = g("# var text = " + n("text") + "(item); #" + "# if (typeof item.encoded != 'undefined' && item.encoded === false) {#" + "#= text #" + "# } else { #" + "#: text #" + "# } #")), e._checkboxes(), e.templates = { wrapperCssClass: function (e, t) { var n = "k-item", i = t.index; return e.firstLevel && 0 === i && (n += " k-first"), i == e.length - 1 && (n += " k-last"), n }, cssClass: function (e, t) { var n = "", i = t.index, r = e.length - 1; return e.firstLevel && 0 === i && (n += "k-top "), n += 0 === i && i != r ? "k-top" : i == r ? "k-bot" : "k-mid" }, textClass: function (e) { var t = "k-in"; return e.enabled === !1 && (t += " k-state-disabled"), e.selected === !0 && (t += " k-state-selected"), t }, toggleButtonClass: function (e) { var t = "k-icon"; return t += e.expanded !== !0 ? " k-plus" : " k-minus", e.enabled === !1 && (t += "-disabled"), t }, groupAttributes: function (e) { return e.expanded !== !0 ? " style='display:none'" : "" }, groupCssClass: function (e) { var t = "k-group"; return e.firstLevel && (t += " k-treeview-lines"), t }, dragClue: g("<div class='k-header k-drag-clue'><span class='k-icon k-drag-status' />#= treeview.template(data) #</div>"), group: g("<ul class='#= r.groupCssClass(group) #'#= r.groupAttributes(group) # role='group'>#= renderItems(data) #</ul>"), itemContent: g("# var imageUrl = " + n("imageUrl") + "(item); #" + "# var spriteCssClass = " + n("spriteCssClass") + "(item); #" + "# if (imageUrl) { #" + "<img class='k-image' alt='' src='#= imageUrl #'>" + "# } #" + "# if (spriteCssClass) { #" + "<span class='k-sprite #= spriteCssClass #' />" + "# } #" + "#= treeview.template(data) #"), itemElement: g("# var url = " + n("url") + "(item); #" + "<div class='#= r.cssClass(group, item) #'>" + "# if (item.hasChildren) { #" + "<span class='#= r.toggleButtonClass(item) #' role='presentation' />" + "# } #" + "# if (treeview.checkboxes) { #" + "<span class='k-checkbox' role='presentation'>" + "#= treeview.checkboxes.template(data) #" + "</span>" + "# } #" + "# var tag = url ? 'a' : 'span'; #" + "# var textAttr = url ? ' href=\\'' + url + '\\'' : ''; #" + "<#=tag# class='#= r.textClass(item) #'#= textAttr #>" + "#= r.itemContent(data) #" + "</#=tag#>" + "</div>"), item: g("<li role='treeitem' class='#= r.wrapperCssClass(group, item) #' " + u.attr("uid") + "='#= item.uid #'" + "#=item.selected ? \"aria-selected='true'\" : ''#" + "#=item.enabled === false ? \"aria-disabled='true'\" : ''#" + ">" + "#= r.itemElement(data) #" + "</li>"), loading: g("<div class='k-icon k-loading' /> Loading..."), retry: g("Request failed. <button class='k-button k-request-retry'>Retry</button>")} }, items: function () { return this.element.find(".k-item") }, setDataSource: function (e) { this.options.dataSource = e, this._dataSource(), this.dataSource.fetch() }, _dataSource: function (e) { function t(e) { for (var n = 0; e.length > n;
107 n++) e[n]._initChildren(), e[n].children.fetch(), t(e[n].children.view()) } var n = this, i = n.options, r = i.dataSource; r = m(r) ? { data: r} : r, n.dataSource && (n.dataSource.unbind(T, b(n.refresh, n)), n.dataSource.unbind(S, b(n._error, n))), r.fields || (r.fields = [{ field: "text" }, { field: "url" }, { field: "spriteCssClass" }, { field: "imageUrl"}]), n.dataSource = r = _.create(r), e && (r.fetch(), t(r.view())), r.bind(T, b(n.refresh, n)), r.bind(S, b(n._error, n)) }, events: [E, A, I, H, N, C, D, y, T, x], options: { name: "TreeView", dataSource: {}, animation: { expand: { effects: "expand:vertical", duration: 200 }, collapse: { duration: 100} }, dragAndDrop: !1, checkboxes: !1, autoBind: !0, loadOnDemand: !0, template: "", dataTextField: null }, _accessors: function () { var e, t, n, i = this, r = i.options, a = i.element; for (e in q) t = r[q[e]], n = a.attr(u.attr(e + "-field")), !t && n && (t = n), t || (t = e), m(t) || (t = [t]), r[q[e]] = t }, _fieldAccessor: function (t) { var n = this.options[q[t]], i = n.length, r = "(function(item) {"; return 0 === i ? r += "return item['" + t + "'];" : (r += "var level = item.level();var levels = [" + e.map(n, function (e) { return "function(d){ return " + u.expr(e) + "}" }).join(",") + "];", r += "return levels[Math.min(level, " + i + "-1)](item)"), r += "})" }, setOptions: function (e) { var t = this; "dragAndDrop" in e && e.dragAndDrop && !t.options.dragAndDrop && (t.dragging = new o(t)), v.fn.setOptions.call(t, e), t._animation(), t._templates() }, _trigger: function (e, t) { return this.trigger(e, { node: t.closest(L)[0] }) }, _setChecked: function (t, n) { if (t && e.isFunction(t.view)) for (var i = 0, r = t.view(); r.length > i; i++) r[i][F] = n, r[i].children && this._setChecked(r[i].children, n) }, _setIndeterminate: function (e) { var t, n, r, a = l(e), o = !0; if (a.length) { if (t = i(a.children()), n = t.length, n > 1) { for (r = 1; n > r; r++) if (t[r].checked != t[r - 1].checked || t[r].indeterminate || t[r - 1].indeterminate) { o = !1; break } } else o = !t[0].indeterminate; i(e).data("indeterminate", !o).prop("indeterminate", !o).prop(F, o && t[0].checked) } }, _updateIndeterminateInitial: function (e) { var t, n = l(e).children(); if (n.length) { for (t = 0; n.length > t; t++) this._updateIndeterminateInitial(n.eq(t)); this._setIndeterminate(e) } }, _updateIndeterminate: function (e) { var t, n = this.parent(e); n.length && (this._setIndeterminate(n), t = n.children("div").find(".k-checkbox :checkbox"), t.prop("indeterminate") === !1 ? this.dataItem(n).set(F, t.prop(F)) : this.dataItem(n).checked = !1, this._updateIndeterminate(n)) }, _checkboxChange: function (t) { var n = e(t.target), i = n.prop(F), r = n.closest(L), a = this; a.dataItem(r).set(F, i) }, _toggleButtonClick: function (t) { this.toggle(e(t.target).closest(L)) }, _mousedown: function (t) { var n = e(t.currentTarget).closest(L); this._clickTarget = n, this.current(n) }, _focusable: function (e) { return e && e.length && e.is(":visible") && !e.find(".k-in:first").hasClass("k-state-disabled") }, _focus: function () { var t = this.select(), n = this._clickTarget; u.support.touch || (n && n.length && (t = n), this._focusable(t) || (t = this.current()), this._focusable(t) || (t = this._nextVisible(e())), this.current(t)) }, focus: function () { var e, t = this.wrapper, n = t[0], i = [], r = [], a = document.documentElement; do n = n.parentNode, n.scrollHeight > n.clientHeight && (i.push(n), r.push(n.scrollTop)); while (n != a); for (t.focus(), e = 0; i.length > e; e++) i[e].scrollTop = r[e] }, _blur: function () { this.current().find(".k-in:first").removeClass("k-state-focused") }, _enabled: function (e) { return !e.children("div").children(".k-in").hasClass("k-state-disabled") }, parent: function (t) { var n, i, r = /\bk-treeview\b/, a = /\bk-item\b/; typeof t == V && (t = this.element.find(t)), j(t) || (t = t[0]), i = a.test(t.className); do t = t.parentNode, a.test(t.className) && (i ? n = t : i = !0); while (!r.test(t.className) && !n); return e(n) }, _nextVisible: function (e) { var t, n = this, i = n._expanded(e); if (e.length && e.is(":visible")) if (i) t = l(e).children().first(); else { for (; e.length && !e.next().length; ) e = n.parent(e); t = e.next().length ? e.next() : e } else t = n.root.children().eq(0); return n._enabled(t) || (t = n._nextVisible(t)), t }, _previousVisible: function (e) { var t, n = this; if (!e.length || e.prev().length) for (t = e.length ? e.prev() : n.root.children().last(
107); n._expanded(t); ) t = l(t).children().last(); else t = n.parent(e) || e; return n._enabled(t) || (t = n._previousVisible(t)), t }, _keydown: function (n) { var i, r = this, a = n.keyCode, o = r.current(), s = r._expanded(o), l = o.find(".k-checkbox:first :checkbox"), d = u.support.isRtl(r.element); n.target == n.currentTarget && (!d && a == k.RIGHT || d && a == k.LEFT ? s ? i = r._nextVisible(o) : r.expand(o) : !d && a == k.LEFT || d && a == k.RIGHT ? s ? r.collapse(o) : (i = r.parent(o), r._enabled(i) || (i = t)) : a == k.DOWN ? i = r._nextVisible(o) : a == k.UP ? i = r._previousVisible(o) : a == k.HOME ? i = r._nextVisible(e()) : a == k.END ? i = r._previousVisible(e()) : a == k.ENTER ? o.find(".k-in:first").hasClass("k-state-selected") || r._trigger(y, o) || r.select(o) : a == k.SPACEBAR && l.length && (l.prop(F, !l.prop(F)).data("indeterminate", !1).prop("indeterminate", !1), r._checkboxChange({ target: l }), i = o), i && (n.preventDefault(), o[0] != i[0] && (r._trigger(x, i), r.current(i)))) }, _click: function (t) { var n, i = this, r = e(t.target), a = d(r.closest(L)), o = r.attr("href"); n = o ? "#" == o || o.indexOf("#" + this.element.id + "-") >= 0 : a.length && !a.children().length, n && t.preventDefault(), r.hasClass(".k-state-selected") || i._trigger(y, r) || i.select(r) }, _wrapper: function () { var e, t, n = this, i = n.element, r = "k-widget k-treeview"; i.is("div") ? (e = i, t = e.children("ul").eq(0)) : (e = i.wrap("<div />").parent(), t = i), n.wrapper = e.addClass(r), n.root = t }, _group: function (e) { var t = this, n = e.hasClass(P), i = { firstLevel: n, expanded: n || t._expanded(e) }, r = e.children("ul"); r.addClass(t.templates.groupCssClass(i)).css("display", i.expanded ? "" : "none"), t._nodes(r, i) }, _nodes: function (t, n) { var i, r = this, o = t.children("li"); n = h({ length: o.length }, n), o.each(function (t, o) { o = e(o), i = { index: t, expanded: r._expanded(o) }, a(o), r._updateNodeClasses(o, n, i), r._group(o) }) }, _checkboxes: function () { var e, t = this.options, n = t.checkboxes; (n || t.checkboxTemplate) && (t.checkboxTemplate ? e = t.checkboxTemplate : (e = "<input type='checkbox' #= (item.enabled === false) ? 'disabled' : '' # #= item.checked ? 'checked' : '' #", n.name && (e += " name='" + n.name + "'"), e += " />"), n = h({ template: e }, t.checkboxes), typeof n.template == V && (n.template = g(n.template)), t.checkboxes = n) }, _updateNodeClasses: function (e, t, n) { var i = e.children("div"), r = e.children("ul"), a = this.templates; e.hasClass("k-treeview") || (n = n || {}, n.expanded = typeof n.expanded != O ? n.expanded : this._expanded(e), n.index = typeof n.index != O ? n.index : e.index(), n.enabled = typeof n.enabled != O ? n.enabled : !i.children(".k-in").hasClass("k-state-disabled"), t = t || {}, t.firstLevel = typeof t.firstLevel != O ? t.firstLevel : e.parent().parent().hasClass(P), t.length = typeof t.length != O ? t.length : e.parent().children().length, e.removeClass("k-first k-last").addClass(a.wrapperCssClass(t, n)), i.removeClass("k-top k-mid k-bot").addClass(a.cssClass(t, n)), i.children(".k-in").removeClass("k-in k-state-default k-state-disabled").addClass(a.textClass(n)), (r.length || "true" == e.attr("data-hasChildren")) && (i.children(".k-icon").removeClass("k-plus k-minus k-plus-disabled k-minus-disabled").addClass(a.toggleButtonClass(n)), r.addClass("k-group"))) }, _processNodes: function (t, n) { var i = this; i.element.find(t).each(function (t, r) { n.call(i, t, e(r).closest(L)) }) }, dataItem: function (t) { var n = e(t).closest(L).attr(u.attr("uid")), i = this.dataSource; return i && i.getByUid(n) }, _insertNode: function (t, n, i, r, o) { var s, d, c, u, p = this, f = l(i), h = f.children().length + 1, g = { firstLevel: i.hasClass(P), expanded: !o, length: h }, m = "", v = function (e, t) { e.appendTo(t) }; for (c = 0; t.length > c; c++) u = t[c], u.index = n + c, m += p._renderItem({ group: g, item: u }); if (d = e(m), d.length) { for (f.length || (f = e(p._renderGroup({ group: g })).appendTo(i)), r(d, f), i.hasClass("k-item") && (a(i), p._updateNodeClasses(i)), p._updateNodeClasses(d.prev().first()), p._updateNodeClasses(d.next().last()), c = 0; t.length > c; c++) u = t[c], u.hasChildren && (s = u.children.data(), s.length && p._insertNode(s, u.index, d.eq(c), v, !p._expanded(d.eq(c)))); return d } }, _updateNode: function (t, n) { function i() { f = !0 } function r(e, t) { e.find(".k-checkbox :checkbox").prop(F, t).data("indeterminate", !1).prop("indeterminate", !1) } var a, o, s, l, c, u = this, p = { treeview: u.options, item: s }, f = !1; if ("selected" == t) s = n[0], o = u.findByUid(s.uid).find(".k-in:first").removeClass("k-state-hover").toggleClass("k-state-selected", s[t]).end(), s[t] ? (u.current(o), o.attr(W, !0)) : o.attr(W, !1); else for (e.inArray(t, u.options.dataTextField) >= 0 ? f = !0 : (p.item = n[0], p.item.bind("get", i), u.templates.itemContent(p), p.item.unbind("set", i)), a = 0; n.length > a; a++) p.item = s = n[a], "spriteCssClass" == t || "imageUrl" == t || f ? u.findByUid(s.uid).find(">div>.k-in").html(u.templates.itemContent(p)) : t == F ? (o = u.findByUid(s.uid), l = s[t], r(o.children("div"), l), u.options.checkboxes.checkChildren && (r(o.children(".k-group"), l), u._setChecked(s.children, l), u._updateIndeterminate(o))) : "expanded" == t ? u._toggle(u.findByUid(s.uid), s, s[t]) : "enabled" == t && (o = u.findByUid(s.uid), o.find(".k-checkbox :checkbox").prop("disabled", !s[t]), c = !d(o).is(B), o.removeAttr(U), s[t] || (s.selected && s.set("selected", !1), s.expanded && s.set("expanded", !1), c = !0, o.removeAttr(W).attr(U, !0)), u._updateNodeClasses(o, {}, { enabled: s[t], expanded: !c })) }, refresh: function (e) { function n(e, t) { var n = l(t), i = n.children(), a = !r._exp
107anded(t); typeof u == O && (u = i.length), r._insertNode(e, u, t, function (e, t) { u == i.length ? e.appendTo(t) : e.insertBefore(i.eq(u)) }, a), r._expanded(t) && (r._updateNodeClasses(t), l(t).css("display", "block")) } var i, r = this, o = r.wrapper, s = e.node, d = e.action, c = e.items, u = e.index, p = r.options, f = p.loadOnDemand, h = p.checkboxes && p.checkboxes.checkChildren; if (e.field) return r._updateNode(e.field, c); if (s && (o = r.findByUid(s.uid), r._progress(o, !1)), h && "remove" != d && s && s.checked) for (i = 0; c.length > i; i++) c[i].checked = !0; for ("add" == d ? n(c, o) : "remove" == d ? r._remove(r.findByUid(c[0].uid), !1) : s ? (l(o).empty(), c.length ? n(c, o) : a(o)) : r.root = r.wrapper.html(r._renderGroup({ items: c, group: { firstLevel: !0, expanded: !0} })).children("ul"), i = 0; c.length > i; i++) (!f || c[i].expanded) && c[i].load(); r.trigger(N, { node: s ? o : t }) }, _error: function (e) { 108 var t = this, n = e.node && t.findByUid(e.node.uid); n ? (this._progress(n, !1), c(n).addClass("k-i-refresh"), e.node.loaded(!1)) : (this._progress(!1), this.element.html(this.templates.retry)) 109 }, _retryRequest: function (e) { e.preventDefault(), this.dataSource.fetch() }, expand: function (e) { this._processNodes(e, function (e, t) { this.toggle(t, !0) }) }, collapse: function (e) { this._processNodes(e, function (e, t) { this.toggle(t, !1) }) }, enable: function (e, t) { t = 2 == arguments.length ? !!t : !0, this._processNodes(e, function (e, n) { this.dataItem(n).set("enabled", t) }) }, current: function (n) { var i = this, r = i._current, a = i.element, o = i._ariaId; return arguments.length > 0 && n && n.length ? (r && (r[0].id === o && r.removeAttr("id"), r.find(".k-in:first").removeClass("k-state-focused")), r = i._current = e(n, a).closest(L), r.find(".k-in:first").addClass("k-state-focused"), o = r[0].id || o, o && (i.wrapper.removeAttr("aria-activedescendant"), r.attr("id", o), i.wrapper.attr("aria-activedescendant", o)), t) : (r || (r = i._nextVisible(e())), r) }, select: function (n) { var i = this, r = i.element; return arguments.length ? (n = e(n, r).closest(L), r.find(".k-state-selected").each(function () { var e = i.dataItem(this); e.set("selected", !1), delete e.selected }), n.length && i.dataItem(n).set("selected", !0), i.trigger(T), t) : r.find(".k-state-selected").closest(L) }, _toggle: function (e, t, n) { var i, r = this, a = r.options, o = d(e), s = n ? "expand" : "collapse", l = a.animation[s]; if (!o.data("animating") && !r._trigger(s, e)) if (r._expanded(e, n), i = t && t.loaded(), i && o.children().length > 0) { if (r._updateNodeClasses(e, {}, { expanded: n }), o.css("display") == (n ? "block" : "none")) return; n || o.css("height", o.height()).css("height"), o.kendoStop(!0, !0).kendoAnimate(h({ reset: !0 }, l, { complete: function () { n && o.css("height", "") } })) } else (!i || i && n) && (a.loadOnDemand && r._progress(e, !0), o.remove(), t.load()) }, toggle: function (t, n) { t = e(t), c(t).is(".k-minus,.k-plus,.k-minus-disabled,.k-plus-disabled") && (1 == arguments.length && (n = !this._expanded(t)), this._expanded(t, n)) }, destroy: function () { var e = this; v.fn.destroy.call(e), e.element.off(w), e.dragging && e.dragging.destroy(), u.destroy(e.element) }, _expanded: function (e, n) { var i = u.attr("expanded"), r = this.dataItem(e); return 1 == arguments.length ? "true" === e.attr(i) || r && r.expanded : (d(e).data("animating") || (r && r.set("expanded", n), n ? (e.attr(i, "true"), e.attr("aria-expanded", "true")) : (e.removeAttr(i), e.attr("aria-expanded", "false"))), t) }, _progress: function (e, t) { var n = this.element; 1 == arguments.length ? (t = e, t ? n.html(this.templates.loading) : n.empty()) : c(e).toggleClass("k-loading", t) }, text: function (e, n) { var i = this.dataItem(e), r = this.options[q.text], a = i.level(), o = r.length, s = r[Math.min(a, o - 1)]; return n ? (i.set(s, n), t) : i[s] }, _objectOrSelf: function (t) { return e(t).closest("[data-role=treeview]").data("kendoTreeView") || this }, _dataSourceMove: function (e, t, n, i) { var r, a = this._objectOrSelf(n || t), o = a.dataSource; return n && n[0] != a.element[0] && (r = a.dataItem(n), r.loaded() || (a._progress(n, !0), r.load()), n != this.root && (o = r.children, o && o instanceof _ || (r._initChildren(), r.loaded(!0), o = r.children))), e = this._toObservableData(e), i.call(this, o, e) }, _toObservableData: function (t) { var n, i, r = t; return (t instanceof window.jQuery || j(t)) && (n = this._objectOrSelf(t).dataSource, i = e(t).attr(u.attr("uid")), r = n.getByUid(i), r && (r = n.remove(r))), r }, _insert: function (e, t, n) { t instanceof u.data.ObservableArray ? t = t.toJSON() : m(t) || (t = [t]); var i = e.parent();
109 return i && (i.hasChildren = !0, i._initChildren()), e.splice.apply(e, [n, 0].concat(t)), this.findByUid(e[n].uid) }, insertAfter: r(1), insertBefore: r(0), append: function (e, t) { var n = this, i = n.root; return t && (i = l(t)), n._dataSourceMove(e, i, t, function (e, i) { function r() { t && n._expanded(t, !0); var r = e.data(), a = Math.max(r.length, 0); return n._insert(r, i, a) } return e.data() ? r() : (e.one(T, r), null) }) }, _remove: function (t, n) { var i, r, o, s = this; return t = e(t, s.element), i = t.parent().parent(), r = t.prev(), o = t.next(), t[n ? "detach" : "remove"](), i.hasClass("k-item") && (a(i), s._updateNodeClasses(i)), s._updateNodeClasses(r), s._updateNodeClasses(o), t }, remove: function (e) { var t = this.dataItem(e); t && this.dataSource.remove(t) }, detach: function (e) { return this._remove(e, !0) }, findByText: function (t) { return e(this.element).find(".k-in").filter(function (n, i) { return e(i).text() == t }).closest(L) }, findByUid: function (e) { return this.element.find(".k-item[" + u.attr("uid") + "=" + e + "]") }, _renderItem: function (e) { return e.group || (e.group = {}), e.treeview = this.options, e.r = this.templates, this.templates.item(e) }, _renderGroup: function (e) { var t = this; return e.renderItems = function (e) { var n = "", i = 0, r = e.items, a = r ? r.length : 0, o = e.group; for (o.length = a; a > i; i++) e.group = o, e.item = r[i], e.item.index = i, n += t._renderItem(e); return n }, e.r = t.templates, t.templates.group(e) } 110 }), o.prototype = { _removeTouchHover: function () { var e = this; u.support.touch && e.hovered && (e.hovered.find("." + M).removeClass(M), e.hovered = !1) }, _hintStatus: function (n) { var i = this._draggable.hint.find(".k-drag-status")[0]; return n ? (i.className = "k-icon k-drag-status " + n, t) : e.trim(i.className.replace(/k-(icon|drag-status)/g, "")) }, dragstart: function (t) { var n = this, i = n.treeview, r = n.sourceNode = t.currentTarget.closest(L); i.trigger(E, { sourceNode: r[0] }) && t.preventDefault(), n.dropHint = e("<div class='k-drop-hint' />").css(z, "hidden").appendTo(i.element) }, drag: function (t) { var n, i, r, a, o, s, l, d, c, p, f = this, h = f.treeview, g = f.sourceNode, m = f.dropTarget = e(u.eventTarget(t)), v = m.closest(".k-treeview"); v.length ? e.contains(g[0], m[0]) ? n = "k-denied" : (n = "k-insert-middle", i = m.closest(".k-top,.k-mid,.k-bot"), i.length ? (a = i.outerHeight(), o = u.getOffset(i).top, s = m.closest(".k-in"), l = a / (s.length > 0 ? 4 : 2), d = o + l > t.y.location, c = t.y.location > o + a - l, f._removeTouchHover(), p = s.length && !d && !c, f.hovered = p ? v : !1, f.dropHint.css(z, p ? "hidden" : "visible"), s.toggleClass(M, p), p ? n = "k-add" : (r = i.position(), r.top += d ? 0 : a, f.dropHint.css(r)[d ? "prependTo" : "appendTo"](m.closest(L).children("div:first")), d && i.hasClass("k-top") && (n = "k-insert-top"), c && i.hasClass("k-bot") && (n = "k-insert-bottom"))) : m[0] != f.dropHint[0] && (n = v[0] != h.element[0] ? "k-add" : "k-denied")) : (n = "k-denied", f._removeTouchHover()), h.trigger(A, { sourceNode: g[0], dropTarget: m[0], pageY: t.y.location, pageX: t.x.location, statusClass: n.substring(2), setStatusClass: function (e) { n = e } }), 0 !== n.indexOf("k-insert") && f.dropHint.css(z, "hidden"), f._hintStatus(n) }, dragcancel: function () { this.dropHint.remove() }, dragend: function () { var e, n, i, r = this, a = r.treeview, o = "over", s = r.sourceNode, l = r.dropHint, d = r.dropTarget; return "visible" == l.css(z) ? (o = l.prevAll(".k-in").length > 0 ? "after" : "before", e = l.closest(L)) : d && (e = d.closest(L), e.length || (e = d.closest(".k-treeview"))), n = "k-denied" != r._hintStatus(), i = a.trigger(I, { sourceNode: s[0], destinationNode: e[0], valid: n, setValid: function (e) { n = e }, dropTarget: d[0], dropPosition: o }), l.remove(), r._removeTouchHover(), !n || i ? (r._draggable.dropped = n, t) : (r._draggable.dropped = !0, "over" == o ? s = a.append(s, e) : "before" == o ? s = a.insertBefore(s, e) : "after" == o && (s = a.insertAfter(s, e)), a.trigger(H, { sourceNode: s && s[0], destinationNode: e[0], dropPosition: o }), t) }, destroy: function () { this._draggable.destroy() } }, p.plugin(s) 111} (window.kendo.jQuery), function (e, t) { function n(e, t, n) { var i = n ? " k-slider-horizontal" : " k-slider-vertical", r = e.style ? e.style : t.attr("style"), a = t.attr("class") ? " " + t.attr("class") : "", o = ""; return "bottomRight" == e.tickPlacement ? o = " k-slider-bottomright" : "topLeft" == e.tickPlacement && (o = " k-slider-topleft"), r = r ? " style='" + r + "'" : "", "<div class='k-widget k-slider" + i + a + "'" + r + ">" + "<div class='k-slider-wrap" + (e.showButtons ? " k-slider-buttons" : "") + o + "'></div></div>" } function i(e, t, n) { var i = ""; return i = "increase" == t ? n ? "k-i-arrow-e" : "k-i-arrow-n" : n ? "k-i-arrow-w" : "k-i-arrow-s", "<a class='k-button k-button-" + t + "'><span class='k-icon " + i + "' title='" + e[t + "ButtonTitle"] + "'>" + e[t + "ButtonTitle"] + "</span></a>" } function r(e, t) { var n, i = "<ul class='k-reset k-slider-items'>
111", r = w.floor(d(t / e.smallStep)) + 1; for (n = 0; r > n; n++) i += "<li class='k-tick' role='presentation'> </li>"; return i += "</ul>" } function a(e, t) { var n = t.is("input") ? 1 : 2, i = 2 == n ? e.leftDragHandleTitle : e.dragHandleTitle; return "<div class='k-slider-track'><div class='k-slider-selection'><!-- --></div><a href='#' class='k-draghandle' title='" + i + "' role='slider' aria-valuemin='" + e.min + "' aria-valuemax='" + e.max + "' aria-valuenow='" + (n > 1 ? e.selectionStart || e.min : e.value || e.min) + "'>Drag</a>" + (n > 1 ? "<a href='#' class='k-draghandle' title='" + e.rightDragHandleTitle + "'role='slider' aria-valuemin='" + e.min + "' aria-valuemax='" + e.max + "' aria-valuenow='" + (e.selectionEnd || e.max) + "'>Drag</a>" : "") + "</div>" } function o(e) { return function (t) { return t + e } } function s(e) { return function () { return e } } function l(e) { return (e + "").replace(".", f.cultures.current.numberFormat["."]) } function d(e) { e = parseFloat(e, 10); var t = w.pow(10, U || 0); return w.round(e * t) / t } function c(e, n) { var i = _(e.getAttribute(n)); return null === i && (i = t), i } function u(e) { return typeof e !== j } var p, f = window.kendo, h = f.ui.Widget, g = f.ui.Draggable, m = e.extend, v = f.format, _ = f.parseFloat, b = e.proxy, k = e.isArray, w = Math, y = f.support, x = y.pointers, C = "change", T = "slide", S = ".slider", F = "touchstart" + S + " mousedown" + S, D = x ? "MSPointerDown" + S : F, E = "touchend" + S + " mouseup" + S, A = x ? "MSPointerUp" + S : E, I = "moveSelection", H = "keydown" + S, N = "click" + S, R = "mouseover" + S, z = "focus" + S, O = "blur" + S, M = ".k-draghandle", P = ".k-slider-track", B = ".k-tick", L = "k-state-selected", V = "k-state-default", W = "k-state-disabled", U = 3, q = "disabled", j = "undefined", G = "tabindex", $ = f.getTouches, K = h.extend({ init: function (e, t) { var n, i, a, l = this; h.fn.init.call(l, e, t), t = l.options, l._distance = t.max - t.min, l._isHorizontal = "horizontal" == t.orientation, l._isRtl = l._isHorizontal && f.support.isRtl(e), l._position = l._isHorizontal ? "left" : "bottom", l._size = l._isHorizontal ? "width" : "height", l._outerSize = l._isHorizontal ? "outerWidth" : "outerHeight", t.tooltip.format = t.tooltip.enabled ? t.tooltip.format || "{0}" : "{0}", l._createHtml(), l.wrapper = l.element.closest(".k-slider"), l._trackDiv = l.wrapper.find(P), l._setTrackDivWidth(), l._maxSelection = l._trackDiv[l._size](), n = l._maxSelection / ((t.max - t.min) / t.smallStep), i = l._calculateItemsWidth(w.floor(l._distance / t.smallStep)), "none" != t.tickPlacement && n >= 2 && (l._trackDiv.before(r(t, l._distance)), l._setItemsWidth(i), l._setItemsTitle(), l._setItemsLargeTick()), l._calculateSteps(i), l._tabindex(l.wrapper.find(M)), l[t.enabled ? "enable" : "disable"](), a = f.support.isRtl(l.wrapper) ? -1 : 1, l._keyMap = { 37: o(-1 * a * t.smallStep), 40: o(-t.smallStep), 39: o(1 * a * t.smallStep), 38: o(+t.smallStep), 35: s(t.max), 36: s(t.min), 33: o(+t.largeStep), 34: o(-t.largeStep) }, f.notify(l) }, events: [C, T], options: { enabled: !0, min: 0, max: 10, smallStep: 1, largeStep: 5, orientation: "horizontal", tickPlacement: "both", tooltip: { enabled: !0, format: "{0}"} }, _setTrackDivWidth: function () { var e = this, t = 2 * parseFloat(e._trackDiv.css(e._isRtl ? "right" : e._position), 10); e._trackDiv[e._size](e.wrapper[e._size]() - 2 - t) }, _setItemsWidth: function (t) { var n, i = this, r = i.options, a = 0, o = t.length - 1, s = i.wrapper.find(B), l = 0, d = 2, c = s.length, u = 0; for (n = 0; c - 2 > n; n++) e(s[n + 1])[i._size](t[n]); if (i._isHorizontal ? (e(s[a]).addClass("k-first")[i._size](t[o - 1]), e(s[o]).addClass("k-last")[i._size](t[o])) : (e(s[o]).addClass("k-first")[i._size](t[o]), e(s[a]).addClass("k-last")[i._size](t[o - 1])), 0 !== i._distance % r.smallStep && !i._isHorizontal) { for (n = 0; t.length > n; n++) u += t[n]; l = i._maxSelection - u, l += parseFloat(i._trackDiv.css(i._position), 10) + d, i.wrapper.find(".k-slider-items").css("padding-top", l) } }, _setItemsTitle: function () { for (var t = this, n = t.options, i = t.wrapper.find(B), r = n.min, a = i.length, o = t._isHorizontal && !t._isRtl ? 0 : a - 1, s = t._isHorizontal && !t._isRtl ? a : -1, l = t._isHorizontal && !t._isRtl ? 1 : -1; 0 !== o - s; o += l) e(i[o]).attr("title", v(n.tooltip.format, d(r))), r += n.smallStep }, _setItemsLargeTick: function () { var t, n = this, i = n.options, r = n.wrapper.find(B), a = {}, o = d(i.largeStep / i.smallStep); if (0 === 1e3 * i.largeStep % (1e3 * i.smallStep)) if (n._isHorizontal && !n._isRtl) for (t = 0; r.length > t; t = d(t + o)) a = e(r[t]), a.addClass("k-tick-large").html("<span class='k-label'>" + a.attr("title") + "</span>"); else for (t = r.length - 1; t >= 0; t = d(t - o)) a = e(r[t]), a.addClass("k-tick-large").html("<span class='k-label'>" + a.attr("title") + "</span>"), n._isRtl || 0 !== t && t !== r.length - 1 && a.css("line-height", a[n._size]() + "px") }, _calculateItemsWidth: function (e) { var t, n, i, r = this, a = r.options, o = parseFloat(r._trackDiv.css(r._size)) + 1, s = o / r._distance; for (r._distance / a.smallStep - w.floor(r._distance / a.smallStep) > 0 && (o -= r._distance % a.smallStep * s), t = o / e, n = [], i = 0; e - 1 > i; i++) n[i] = t; return n[e - 1] = n[e] = t / 2, r._roundWidths(n) }, _roundWidths: function (e) { var t, n = 0, i = e.length; for (t = 0; i > t; t++) n += e[t] - w.floor(e[t]), e[t] = w.floor(e[t]); return n = w.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; e > n; n++) t[parseInt(w.round(i * n), 10)] += 1; return t }, _calculateSteps: function (e) { var t, n = this, i = n.options, r = i.min, a = 0, o = w.ceil(n._distance / i.smallStep), s = 1; if (o += 0 === n._distance / i.smallStep % 1 ? 1 : 0, e.splice(0, 0, 2 * e[o - 2]), e.splice(o - 1, 1, 2 * e.pop()), n._pixelSteps = [a], n._values = [r], 0 !== o) { for (; o > s; ) a += (e[s - 1] + e[s]) / 2, n._pixelSteps[s] = a, n._values[s] = r += i.smallStep, s++; t = 0 === n._distance % i.smallStep ? o - 1 : o, n._pixelSteps[t] = n._maxSelection, n._values[t] = i.max, n._isRtl && (n._pixelSteps.reverse(), n._values.reverse()) } }, _getValueFromPosition: function (e, t) { var n, i = this, r = i.options, a = w.max(r.smallStep * (i._maxSelection / i._distance), 0), o = 0, s = a / 2; if (i._isHorizontal ? (o = e - t.startPoint, i._isRtl && (o = i._maxSelection - o)) : o = t.startPoint - e, o > i._maxSelection - (parseInt(i._maxSelection % a, 10) - 3) / 2) return r.max; for (n = 0; i._pixelSteps.length > n; n++) if (s >= w.abs(i._pixelSteps[n] - o) - 1) return d(i._values[n]) }, _getFormattedValue: function (e, t) { var n, i, r, a = this, o = "", s = a.options.tooltip; return k(e) ? (i = e[0], r = e[1]) : t && t.type && (i = t.selectionStart, r = t.selectionEnd), t && (n = t.tooltipTemplate), !n && s.template && (n = f.template(s.template)), k(e) || t && t.type ? n ? o = n({ selectionStart: i, selectionEnd: r }) : (i = v(s.format, i), r = v(s.format, r), o = i + " - " + r) : (t && (t.val = e), o = n ? n({ value: e }) : v(s.format, e)), o }, _getDraggableArea: function () { var e = this, t = f.getOffset(e._trackDiv); return { startPoint: e._isHorizontal ? t.left : t.top + e._maxSelection, endPoint: e._isHorizontal ? t.left + e._maxSelection : t.top} }, _createHtml: function () { var e = this, t = e.element, r = e.options, o = t.find("input"); 2 == o.length ? (o.eq(0).val(r.selectionStart), o.eq(1).val(r.selectionEnd)) : t.val(r.value), t.wrap(n(r, t, e._isHorizontal)).hide(), r.showButtons && t.before(i(r, "increase", e._isHorizontal)).before(i(r, "decrease", e._isHorizontal)), t.before(a(r, t)) }, _focus: function (t) { var n = this, i = t.target, r = n.value(
111), a = n._drag; a || (i == n.wrapper.find(M).eq(0)[0] ? (a = n._firstHandleDrag, n._activeHandle = 0) : (a = n._lastHandleDrag, n._activeHandle = 1), r = r[n._activeHandle]), e(i).addClass(L), a && (n._activeHandleDrag = a, a.selectionStart = n.options.selectionStart, a.selectionEnd = n.options.selectionEnd, a._updateTooltip(r)) }, _focusWithMouse: function (t) { var n = this, i = e(t.target), r = i.is(M) ? i.index() : 0; window.setTimeout(function () { n.wrapper.find(M)[2 == r ? 1 : 0].focus() }, 1), n._setTooltipTimeout() }, _blur: function (t) { var n = this, i = n._activeHandleDrag; e(t.target).removeClass(L), i && (i._removeTooltip(), delete n._activeHandleDrag, delete n._activeHandle) }, _setTooltipTimeout: function () { var e = this; e._tooltipTimeout = window.setTimeout(function () { var t = e._drag || e._activeHandleDrag; t && t._removeTooltip() }, 300) }, _clearTooltipTimeout: function () { var e, t = this; window.clearTimeout(this._tooltipTimeout), e = t._drag || t._activeHandleDrag, e && e.tooltipDiv && e.tooltipDiv.stop(!0, !1).css("opacity", 1) } }), Y = K.extend({ init: function (n, i) { var r, a = this; n.type = "text", i = m({}, { value: c(n, "value"), min: c(n, "min"), max: c(n, "max"), smallStep: c(n, "step") }, i), n = e(n), i && i.enabled === t && (i.enabled = !n.is("[disabled]")), K.fn.init.call(a, n, i), i = a.options, u(i.value) && null !== i.value || (i.value = i.min, n.val(i.min)), i.value = w.max(w.min(i.value, i.max), i.min), r = a.wrapper.find(M), new Y.Selection(r, a, i), a._drag = new Y.Drag(r, "", a, i) }, options: { name: "Slider", showButtons: !0, increaseButtonTitle: "Increase", decreaseButtonTitle: "Decrease", dragHandleTitle: "drag", tooltip: { format: "{0}" }, value: null }, enable: function (n) { var i, r, a, o = this, s = o.options; o.disable(), n !== !1 && (o.wrapper.removeClass(W).addClass(V), o.wrapper.find("input").removeAttr(q), i = function (n) { var i, r, a, s = $(n)[0]; if (s) { if (i = o._isHorizontal ? s.location.pageX : s.location.pageY, r = o._getDraggableArea(), a = e(n.target), a.hasClass("k-draghandle")) return a.addClass(L), t; o._update(o._getValueFromPosition(i, r)), o._focusWithMouse(n), o._drag.dragstart(n), n.preventDefault() } }, o.wrapper.find(B + ", " + P).on(D, i).end().on(D, function () { e(document.documentElement).one("selectstart", f.preventDefault) }).on(A, function () { o._drag._end() }), o.wrapper.find(M).attr(G, 0).on(E, function () { o._setTooltipTimeout() }).on(N, function (e) { o._focusWithMouse(e), e.preventDefault() }).on(z, b(o._focus, o)).on(O, b(o._blur, o)), r = b(function (e) { var t = o._nextValueByIndex(o._valueIndex + 1 * e); o._setValueInRange(t), o._drag._updateTooltip(t) }, o), s.showButtons && (a = b(function (e, t) { this._clearTooltipTimeout(), (1 === e.which || y.touch && 0 === e.which) && (r(t), this.timeout = setTimeout(b(function () { this.timer = setInterval(function () { r(t) }, 60) }, this), 200)) }, o), o.wrapper.find(".k-button").on(E, b(function (e) { this._clearTimer(), o._focusWithMouse(e) }, o)).on(R, function (t) { e(t.currentTarget).addClass("k-state-hover") }).on("mouseout" + S, b(function (t) { e(t.currentTarget).removeClass("k-state-hover"), this._clearTimer() }, o)).eq(0).on(F, b(function (e) { a(e, 1) }, o)).click(!1).end().eq(1).on(F, b(function (e) { a(e, -1) }, o)).click(f.preventDefault)), o.wrapper.find(M).off(H, !1).on(H, b(this._keydown, o)), s.enabled = !0) }, disable: function () { var t = this; t.wrapper.removeClass(V).addClass(W), e(t.element).prop(q, q), t.wrapper.find(".k-button").off(F).on(F, f.preventDefault).off(E).on(E, f.preventDefault).off("mouseleave" + S).on("mouseleave" + S, f.preventDefault).off(R).on(R, f.preventDefault), t.wrapper.find(B + ", " + P).off(D).off(A), t.wrapper.find(M).attr(G, -1).off(E).off(H).off(N).off(z).off(O), t.options.enabled = !1 }, _update: function (e) { var t = this, n = t.value() != e; t.value(e), n && t.trigger(C, { value: t.options.value }) }, value: function (e) { var n = this, i = n.options; return e = d(e), isNaN(e) ? i.value : (e >= i.min && i.max >= e && i.value != e && (n.element.prop("value", l(e)), i.value = e, n._refreshAriaAttr(e), n._refresh()), t) }, _refresh: function () { this.trigger(I, { value: this.options.value }) }, _refreshAriaAttr: function (e) { var t, n = this, i = n._drag; t = i && i._tooltipDiv ? i._tooltipDiv.text() : n._getFormattedValue(e, null), this.wrapper.find(M).attr("aria-valuenow", e).attr("aria-valuetext", t) }, _clearTimer: function () { clearTimeout(this.timeout), clearInterval(this.timer) }, _keydown: function (e) { var t = this; e.keyCode in t._keyMap && (t._clearTooltipTimeout(), t._setValueInRange(t._keyMap[e.keyCode](t.options.value)), t._drag._updateTooltip(t.value()), e.preventDefault()) }, _setValueInRange: function (e) { var n = this, i = n.options; return e = d(e), isNaN(e) ? (n._update(i.min), t) : (e = w.max(w.min(e, i.max), i.min), n._update(e), t) }, _nextValueByIndex: function (e) { var t = this._values.length; return this._isRtl && (e = t - 1 - e), this._values[w.max(0, w.min(e, t - 1))] }, destroy: function () { var e = this; h.fn.destroy.call(e), e.wrapper.off(S).find(".k-button").off(S).end().find(M).off(S).end().find(B + ", " + P).off(S).end(), e._drag.draggable.destroy() } }); Y.Selection = function (e, t, n) { function i(i) { var r = i - n.min, a = t._valueIndex = w.ceil(d(r / n.smallStep)), o = parseInt(t._pixelSteps[a], 10), s = t._trackDiv.find(".k-slider-selection"), l = parseInt(e[t._outerSize]() / 2, 10), c = t._isRtl ? 2 : 0; s[t._size](t._isRtl ? t._maxSelection - o : o), e.css(t._position, o - l - c) } i(n.value), t.bind([C, T, I], function (e) { i(parseFloat(e.value, 10)) }) }, Y.Drag = function (e, t, n, i) { var r = this; r.owner = n, r.options = i, r.dragHandle = e, r.dragHandleSize = e[n._outerSize](), r.type = t, r.draggable = new g(e, { distance: 0, dragstart: b(r._dragstart, r), drag: b(r.drag, r), dragend: b(r.dragend, r), dragcancel: b(r.dragcancel, r) }), e.click(!1) }, Y.Drag.prototype = { dragstart: function (e) { this.draggable.userEvents._start(e) }, _dragstart: function (n) { var i = this, r = i.owner, a = i.options; return a.enabled ? (r.element.off(R), i.dragHandle.addClass(L), e(document.documentElement).css("cursor", "pointer"), i.dragableArea = r._getDraggableArea(), i.step = w.max(a.smallStep * (r._maxSelection / r._distance), 0), i.type ? (i.selectionStart = a.selectionStart, i.selectionEnd = a.selectionEnd, r._setZIndex(i.type)) : i.oldVal = i.val = a.value, i._removeTooltip(!0), i._createTooltip(), t) : (n.preventDefault(), t) }, _createTooltip: function () { var t, n, i = this, r = i.owner, a = i.options.tooltip, o = "", s = e(window); a.enabled && (a.template && (t = i.tooltipTemplate = f.template(a.template)), e(".k-slider-tooltip").remove(), i.tooltipDiv = e("<div class='k-widget k-tooltip k-slider-tooltip'><!-- --></div>").appendTo(document.body), o = r._getFormattedValue(i.val || r.value(), i), i.type || (n = "k-callout-" + (r._isHorizontal ? "s" : "e"), i.tooltipInnerDiv = "<div class='k-callout " + n + "'><!-- --></div>", o += i.tooltipInnerDiv), i.tooltipDiv.html(o), i._scrollOffset = { top: s.scrollTop(), left: s.scrollLeft() }, i.moveTooltip()) }, drag: function (e) { var t, n = this, i = n.owner, r = e.x.location, a = e.y.location, o = n.dragableArea.startPoint, s = n.dragableArea.endPoint; e.preventDefault(), n.val = i._isHorizontal ? i._isRtl ? n.constrainValue(r, o, s, s > r) : n.constrainValue(r, o, s, r >= s) : n.constrainValue(a, s, o, s >= a), n.oldVal != n.val && (n.oldVal = n.val, n.type ? ("firstHandle" == n.type ? n.selectionStart = n.val < n.selectionEnd ? n.val : n.selectionEnd = n.val : n.val > n.selectionStart ? n.selectionEnd = n.val : n.selectionStart = n.selectionEnd = n.val, t = { values: [n.selectionStart, n.selectionEnd], value: [n.selectionStart, n.selectionEnd] }) : t = { value: n.val }, i.trigger(T, t)), n._updateTooltip(n.val) }, _updateTooltip: function (e) { var t = this, n = t.options, i = n.tooltip, r = ""; i.enabled && (t.tooltipDiv || t._createTooltip(), r = t.owner._getFormattedValue(d(e), t), t.type || (r += t.tooltipInnerDiv), t.tooltipDiv.html(r), t.moveTooltip()) }, dragcancel: function () { return this.owner._refresh(), e(document.documentElement).css("cursor", ""), this._end() }, dragend: function () { var t = this, n = t.owner; return e(document.documentElement).css("cursor", ""), t.type ? n._update(t.selectionStart, t.selectionEnd) : n._update(t.val), t._end() }, _end: function () { var e = this, t = e.owner; return t._focusWithMouse({ target: e.dragHandle[0] }), t.element.on(R), !1 }, _removeTooltip: function (t) { var n = this, i = n.owner; n.tooltipDiv && i.options.tooltip.enabled && i.options.enabled && (t ? (n.tooltipDiv.remove(), n.tooltipDiv = null) : n.tooltipDiv.fadeOut("slow", function () { e(this).remove(), n.tooltipDiv = null })) }, moveTooltip: function () { var t, n, i, r, a = this, o = a.owner, s = 0, l = 0, d = a.dragHandle, c = f.getOffset(d), u = 8, p = e(window), h = a.tooltipDiv.find(".k-callout"), g = a.tooltipDiv.outerWidth(), m = a.tooltipDiv.outerHeight(); a.type ? (t = o.wrapper.find(M), c = f.getOffset(t.eq(0)), n = f.getOffset(t.eq(1)), o._isHorizontal ? (s = n.top, l = c.left + (n.left - c.left) / 2) : (s = c.top + (n.top - c.top) / 2, l = n.left), r = t.eq(0).outerWidth() + 2 * u) : (s = c.top, l = c.left, r = d.outerWidth() + 2 * u), o._isHorizontal ? (l -= parseInt((g - d[o._outerSize]()) / 2, 10), s -= m + h.height() + u) : (s -= parseInt((m - d[o._outerSize]()) / 2, 10), l -= g + h.width() + u), o._isHorizontal ? (i = a._flip(s, m, r, p.outerHeight() + a._scrollOffset.top), s += i, l += a._fit(l, g, p.outerWidth() + a._scrollOffset.left)) : (i = a._flip(l, g, r, p.outerWidth() + a._scrollOffset.left), s += a._fit(s, m, p.outerHeight() + a._scrollOffset.top), l += i), i > 0 && h && (h.removeClass(), h.addClass("k-callout k-callout-" + (o._isHorizontal ? "n" : "w"))), a.tooltipDiv.css({ top: s, left: l }) }, _fit: function (e, t, n) { var i = 0; return e + t > n && (i = n - (e + t)), 0 > e && (i = -e), i }, _flip: function (e, t, n, i) { var r = 0; return e + t > i && (r += -(n + t)), 0 > e + r && (r += n + t), r }, constrainValue: function (e, t, n, i) { var r = this, a = 0; return a = e > t && n > e ? r.owner._getValueFromPosition(e, r.dragableArea) : i ? r.options.max : r.options.min } }, f.ui.plugin(Y), p = K.extend({ init: function (n, i) { var r, a = this, o = e(n).find("input"), s = o.eq(0)[0], l = o.eq(1)[0];
111 s.type = "text", l.type = "text", i = m({}, { selectionStart: c(s, "value"), min: c(s, "min"), max: c(s, "max"), smallStep: c(s, "step") }, { selectionEnd: c(l, "value"), min: c(l, "min"), max: c(l, "max"), smallStep: c(l, "step") }, i), i && i.enabled === t && (i.enabled = !o.is("[disabled]")), K.fn.init.call(a, n, i), i = a.options, u(i.selectionStart) && null !== i.selectionStart || (i.selectionStart = i.min, o.eq(0).val(i.min)), u(i.selectionEnd) && null !== i.selectionEnd || (i.selectionEnd = i.max, o.eq(1).val(i.max)), r = a.wrapper.find(M), new p.Selection(r, a, i), a._firstHandleDrag = new Y.Drag(r.eq(0), "firstHandle", a, i), a._lastHandleDrag = new Y.Drag(r.eq(1), "lastHandle", a, i) }, options: { name: "RangeSlider", leftDragHandleTitle: "drag", rightDragHandleTitle: "drag", tooltip: { format: "{0}" }, selectionStart: null, selectionEnd: null }, enable: function (n) { var i, r = this, a = r.options; r.disable(), n !== !1 && (r.wrapper.removeClass(W).addClass(V), r.wrapper.find("input").removeAttr(q), i = function (n) { var i, o, s, l, d, c = $(n)[0]; if (c) { if (o = r._isHorizontal ? c.location.pageX : c.location.pageY, s = r._getDraggableArea(), l = r._getValueFromPosition(o, s), d = e(n.target), d.hasClass("k-draghandle")) return d.addClass(L), t; a.selectionStart > l ? (r._setValueInRange(l, a.selectionEnd), r._firstHandleDrag.dragstart(n), i = 0) : l > r.selectionEnd ? (r._setValueInRange(a.selectionStart, l), r._lastHandleDrag.dragstart(n), i = 1) : l - a.selectionStart <= a.selectionEnd - l ? (r._setValueInRange(l, a.selectionEnd), r._firstHandleDrag.dragstart(n), i = 0) : (r._setValueInRange(a.selectionStart, l), r._lastHandleDrag.dragstart(n), i = 1), r._focusWithMouse({ target: r.wrapper.find(M)[i] }) } }, r.wrapper.find(B + ", " + P).on(D, i).end().on(D, function () { e(document.documentElement).one("selectstart", f.preventDefault) }).on(A, function () { r._drag._end() }), r.wrapper.find(M).attr(G, 0).on(E, function () { r._setTooltipTimeout() }).on(N, function (e) { r._focusWithMouse(e), e.preventDefault() }).on(z, b(r._focus, r)).on(O, b(r._blur, r)), r.wrapper.find(M).off(H, f.preventDefault).eq(0).on(H, b(function (e) { this._keydown(e, "firstHandle") }, r)).end().eq(1).on(H, b(function (e) { this._keydown(e, "lastHandle") }, r)), r.options.enabled = !0) }, disable: function () { var e = this; e.wrapper.removeClass(V).addClass(W), e.wrapper.find("input").prop(q, q), e.wrapper.find(B + ", " + P).off(D).off(A), e.wrapper.find(M).attr(G, -1).off(E).off(H).off(N).off(z).off(O), e.options.enabled = !1 }, _keydown: function (e, t) { var n, i, r, a = this, o = a.options.selectionStart, s = a.options.selectionEnd; e.keyCode in a._keyMap && (a._clearTooltipTimeout(), "firstHandle" == t ? (r = a._activeHandleDrag = a._firstHandleDrag, o = a._keyMap[e.keyCode](o), o > s && (s = o)) : (r = a._activeHandleDrag = a._lastHandleDrag, s = a._keyMap[e.keyCode](s), o > s && (o = s)), a._setValueInRange(o, s), n = Math.max(o, a.options.selectionStart), i = Math.min(s, a.options.selectionEnd), r.selectionEnd = Math.max(i, a.options.selectionStart), r.selectionStart = Math.min(n, a.options.selectionEnd), r._updateTooltip(a.value()[a._activeHandle]), e.preventDefault()) }, _update: function (e, t) { var n = this, i = n.value(), r = i[0] != e || i[1] != t; n.value([e, t]), r && n.trigger(C, { values: [e, t], value: [e, t] }) }, value: function (e) { return e && e.length ? this._value(e[0], e[1]) : this._value() }, _value: function (e, n) { var i = this, r = i.options, a = r.selectionStart, o = r.selectionEnd; return isNaN(e) && isNaN(n) ? [a, o] : (e = d(e), n = d(n), e >= r.min && r.max >= e && n >= r.min && r.max >= n && n >= e && (a != e || o != n) && (i.element.find("input").eq(0).prop("value", l(e)).end().eq(1).prop("value", l(n)), r.selectionStart = e, r.selectionEnd = n, i._refresh(), i._refreshAriaAttr(e, n)), t) }, values: function (e, t) { return k(e) ? this._value(e[0], e[1]) : this._value(e, t) }, _refresh: function () { var e = this, t = e.options; e.trigger(I, { values: [t.selectionStart, t.selectionEnd], value: [t.selectionStart, t.selectionEnd] }), t.selectionStart == t.max && t.selectionEnd == t.max && e._setZIndex("firstHandle") }, _refreshAriaAttr: function (e, t) { var n, i = this, r = i.wrapper.find(M), a = i._activeHandleDrag; n = i._getFormattedValue([e, t], a), r.eq(0).attr("aria-valuenow", e), r.eq(1).attr("aria-valuenow", t), r.attr("aria-valuetext", n) }, _setValueInRange: function (e, t) { var n = this.options; e = w.max(w.min(e, n.max), n.min), t = w.max(w.min(t, n.max), n.min), e == n.max && t == n.max && this._setZIndex("firstHandle"), this._update(w.min(e, t), w.max(e, t)) }, _setZIndex: function (t) { this.wrapper.find(M).each(function (n) { e(this).css("z-index", "firstHandle" == t ? 1 - n : n) }) }, destroy: function () { var e = this; h.fn.destroy.call(e), e.wrapper.off(S).find(B + ", " + P).off(S).end().find(M).off(S), e._firstHandleDrag.draggable.destroy(), e._lastHandleDrag.draggable.destroy() } }), p.Selection = function (e, t, n) { function i(i) { i = i || []; var a = i[0] - n.min, o = i[1] - n.min, s = w.ceil(d(a / n.smallStep)), l = w.ceil(d(o / n.smallStep)), c = t._pixelSteps[s], u = t._pixelSteps[l], p = parseInt(e.eq(0)[t._outerSize]() / 2, 10), f = t._isRtl ? 2 : 0; e.eq(0).css(t._position, c - p - f).end().eq(1).css(t._position, u - p - f), r(c, u) } function r(e, n) { var i, r, a = t._trackDiv.find(".k-slider-selection"); i = w.abs(e - n), a[t._size](i), t._isRtl ? (r = w.max(e, n), a.css("right", t._maxSelection - r - 1)) : (r = w.min(e, n), a.css(t._position, r - 1)) } i(t.value()), t.bind([C, T, I], function (e) { i(e.values) }) }, f.ui.plugin(p) } (window.kendo.jQuery), function (e, t) { 112 function n(e) { return m.test(e) } function i(e) { return g.test(e) || /^\d+$/.test(e) } function r(e) { return !n(e) && !i(e) } function a(e, n) { return function (i, r) { var a, o = this.element.find(i).data(F); return 1 == arguments.length ? o[e] : (o[e] = r, n && (a = this.element.data("kendoSplitter"), a.trigger(w)), t) } } function o(e) { var t = this, n = e.orientation; t.owner = e, t._element = e.element, t.orientation = n, p(t, n === x ? l : s), t._resizable = new d.ui.Resizable(e.element, { orientation: n, handle: ".k-splitbar-draggable-" + n + "[data-marker=" + e._marker + "]", hint: f(t._createHint, t), start: f(t._start, t), max: f(t._max, t), min: f(t._min, t), invalidClass: "k-restricted-size-" + n, resizeend: f(t._stop, t) }) } var s, l, d = window.kendo, c = d.ui, u = d.keys, p = e.extend, f = e.proxy, h = c.Widget, g = /^\d+(\.\d+)?px$/i, m = /^\d+(\.\d+)?%$/i, v = ".kendoSplitter", _ = "expand", b = "collapse", k = "contentLoad", w = "resize", y = "layoutChange", x = "horizontal", C = "vertical", T = "mouseenter", S = "click", F = "pane", D = "mouseleave", E = "k-state-focused", A = "k-" + F, I = "." + A, H = h.extend({ init: function (t, n) { var i, r = this; h.fn.init.call(r, t, n), r.wrapper = r.element, i = r.options.orientation.toLowerCase() != C, r.orientation = i ? x : C, r._dimension = i ? "width" : "height", r._keys = { decrease: i ? u.LEFT : u.UP, increase: i ? u.RIGHT : u.DOWN }, r._resizeStep = 10, r.bind(w, f(r._resize, r)), r._marker = d.guid().substring(0, 8), r._initPanes(), r._resizeHandler = function () { r.trigger(w), r._detachEvents(), r._attachEvents() }, r._attachEvents(), e(window).on("resize", r._resizeHandler), r.element.children(".k-splitbar-draggable-" + r.orientation).length && (r.resizing = new o(r)), r.element.triggerHandler("init" + v) }, events: [_, b, k, w, y], _parentSplitter: function () { return this.element.parent().closest(".k-splitter") }, _attachEvents: function () { var t = this, n = t.options.orientation; t.element.children(".k-splitbar-draggable-" + n).on("keydown" + v, e.proxy(t._keydown, t)).on("mousedown" + v, function (e) { e.currentTarget.focu
112s() }).on("focus" + v, function (t) { e(t.currentTarget).addClass(E) }).on("blur" + v, function (n) { e(n.currentTarget).removeClass(E), t.resizing && t.resizing.end() }).on(T + v, function () { e(this).addClass("k-splitbar-" + t.orientation + "-hover") }).on(D + v, function () { e(this).removeClass("k-splitbar-" + t.orientation + "-hover") }).on("mousedown" + v, function () { t._panes().append("<div class='k-splitter-overlay k-overlay' />") }).on("mouseup" + v, function () { t._panes().children(".k-splitter-overlay").remove() }).end().children(".k-splitbar").on("dblclick" + v, f(t._togglePane, t)).children(".k-collapse-next, .k-collapse-prev").on(S + v, t._arrowClick(b)).end().children(".k-expand-next, .k-expand-prev").on(S + v, t._arrowClick(_)).end().end(), t._parentSplitter().each(function () { var n = e(this), i = n.data("kendoSplitter"); i ? i.bind(w, t._resizeHandler) : n.off("init" + v).one("init" + v, function () { e(this).data("kendoSplitter").bind(w, t._resizeHandler), t._resizeHandler() }) }) }, _detachEvents: function () { var e = this, t = e._parentSplitter().data("kendoSplitter"); e.element.children(".k-splitbar-draggable-" + e.orientation).off(v).end().children(".k-splitbar").off("dblclick" + v).children(".k-collapse-next, .k-collapse-prev, .k-expand-next, .k-expand-prev").off(v), t && t.unbind(w, e._resizeHandler) }, options: { name: "Splitter", orientation: x, panes: [] }, destroy: function () { var t = this; h.fn.destroy.call(t), t._detachEvents(), t.resizing && t.resizing.destroy(), e(window).off("resize", t._resizeHandler), d.destroy(t.element) }, _keydown: function (t) { var n, i = this, r = t.keyCode, a = i.resizing, o = e(t.currentTarget), s = i._keys, l = r === s.increase, d = r === s.decrease; l || d ? (t.ctrlKey ? (n = o[d ? "next" : "prev"](), a && a.isResizing() && a.end(), n[i._dimension]() ? i._triggerAction(b, o[d ? "prev" : "next"]()) : i._triggerAction(_, n)) : a && a.move((d ? -1 : 1) * i._resizeStep, o), t.preventDefault()) : r === u.ENTER && a && (a.end(), t.preventDefault()) }, _initPanes: function () { 113 var t = this, n = t.options.panes || []; 114 t.element.addClass("k-widget").addClass("k-splitter").children(":not(script)").each(function (i, r) { var a = n && n[i]; r = e(r).attr("role", "group").addClass(A), r.data(F, a ? a : {}).toggleClass("k-scrollable", a ? a.scrollable !== !1 : !0), t.ajaxRequest(r) }).end(), t.trigger(w) 115 }, ajaxRequest: function (e, t, n) { var i, r = this; e = r.element.find(e), i = e.data(F), t = t || i.contentUrl, t && (e.append("<span class='k-icon k-loading k-pane-loading' />"), d.isLocalUrl(t) ? jQuery.ajax({ url: t, data: n || {}, type: "GET", dataType: "html", success: function (t) { e.html(t), r.trigger(k, { pane: e[0] }) } }) : e.removeClass("k-scrollable").html("<iframe src='" + t + "' frameborder='0' class='k-content-frame'>" + "This page requires frames in order to show content" + "</iframe>")) }, _triggerAction: function (e, t) { this.trigger(e, { pane: t[0] }) || this[e](t[0]) }, _togglePane: function (t) { var n, i = this, r = e(t.target); r.closest(".k-splitter")[0] == i.element[0] && (n = r.children(".k-icon:not(.k-resize-handle)"), 1 === n.length && (n.is(".k-collapse-prev") ? i._triggerAction(b, r.prev()) : n.is(".k-collapse-next") ? i._triggerAction(b, r.next()) : n.is(".k-expand-prev") ? i._triggerAction(_, r.prev()) : n.is(".k-expand-next") && i._triggerAction(_, r.next()))) }, _arrowClick: function (t) { var n = this; return function (i) { var r, a = e(i.target); a.closest(".k-splitter")[0] == n.element[0] && (r = a.is(".k-" + t + "-prev") ? a.parent().prev() : a.parent().next(), n._triggerAction(t, r)) } }, _updateSplitBar: function (e, t, n) { var i = function (e, t) { return t ? "<div class='k-icon " + e + "' />" : "" }, r = this.orientation, a = t.resizable !== !1 && n.resizable !== !1, o = t.collapsible, s = t.collapsed, l = n.collapsible, d = n.collapsed; e.addClass("k-splitbar k-state-default k-splitbar-" + r).attr("role", "separator").attr("aria-expanded", !(s || d)).removeClass("k-splitbar-" + r + "-hover").toggleClass("k-splitbar-draggable-" + r, a && !s && !d).toggleClass("k-splitbar-static-" + r, !a && !o && !l).html(i("k-collapse-prev", o && !s && !d) + i("k-expand-prev", o && s && !d) + i("k-resize-handle", a) + i("k-collapse-next", l && !d && !s) + i("k-expand-next", l && d && !s)) }, _updateSplitBars: function () { var t = this; this.element.children(".k-splitbar").each(function () { var n = e(this), i = n.prev(I).data(F), r = n.next(I).data(F); r && t._updateSplitBar(n, i, r) }) }, _panes: function () { return this.element.children(I) }, _resize: function () { var i, a, o, s, l, d, c, u, p, f, h = this, g = h.element, m = g.children(":not(.k-splitbar)"), v = h.orientation == x, _ = g.children(".k-splitbar"), b = _.length, k = v ? "width" : "height", w = g[k](); 0 === b ? (b = m.length - 1, m.slice(0, b).after("<div tabindex='0' class='k-splitbar' data-marker='" + h._marker + "' />"), h._updateSplitBars(), _ = g.children(".k-splitbar")) : h._updateSplitBars(), _.each(function () { w -= this[v ? "offsetWidth" : "offsetHeight"] }), i = 0, a = 0, o = e(), m.css({ position: "absolute", top: 0 })[k](function () { var s, l = e(this).data(F) || {}; if (l.collapsed) s = 0, e(this).css("overflow", "hidden"); else { if (r(l.size)) return o = o.add(this), t; s = parseInt(l.size, 10), n(l.size) && (s = Math.floor(s * w / 100)) } return a++, i += s, s }), w -= i, s = o.length, l = Math.floor(w / s), o.slice(0, s - 1).css(k, l).end().eq(s - 1).css(k, w - (s - 1) * l), d = 0, c = v ? "height" : "width", u = v ? "left" : "top", p = v ? "offsetWidth" : "offsetHeight", 0 === s && (f = m.filter(function () { return !(e(this).data(F) || {}).collapsed }
115).last(), f[k](w + f[0][p])), g.children().css(c, g[c]()).each(function (e, t) { t.style[u] = Math.floor(d) + "px", d += t[p] }), h.trigger(y) }, toggle: function (e, n) { var i; e = this.element.find(e), i = e.data(F), (n || i.collapsible) && (1 == arguments.length && (n = i.collapsed === t ? !1 : i.collapsed), i.collapsed = !n, i.collapsed ? e.css("overflow", "hidden") : e.css("overflow", ""), this.trigger(w), this.resizing && this.resizing.destroy(), this._detachEvents(), this._attachEvents(), this.element.children(".k-splitbar-draggable-" + this.orientation).length && (this.resizing = new o(this))) }, collapse: function (e) { this.toggle(e, !1) }, expand: function (e) { this.toggle(e, !0) }, size: a("size", !0), min: a("min"), max: a("max") 116 }); c.plugin(H), s = { sizingProperty: "height", sizingDomProperty: "offsetHeight", alternateSizingProperty: "width", positioningProperty: "top", mousePositioningProperty: "pageY" }, l = { sizingProperty: "width", sizingDomProperty: "offsetWidth", alternateSizingProperty: "height", positioningProperty: "left", mousePositioningProperty: "pageX" }, o.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() }, isResizing: function () { return this._resizable.resizing }, _createHint: function (t) { var n = this; return e("<div class='k-ghost-splitbar k-ghost-splitbar-" + n.orientation + " k-state-default' />").css(n.alternateSizingProperty, t[n.alternateSizingProperty]()) }, _start: function (t) { var n = this, r = e(t.currentTarget), a = r.prev(), o = r.next(), s = a.data(F), l = o.data(F), d = parseInt(a[0].style[n.positioningProperty], 10), c = parseInt(o[0].style[n.positioningProperty], 10) + o[0][n.sizingDomProperty] - r[0][n.sizingDomProperty], u = parseInt(n._element.css(n.sizingProperty), 10), p = function (e) { var t = parseInt(e, 10); return (i(e) ? t : u * t / 100) || 0 }, f = p(s.min), h = p(s.max) || c - d, g = p(l.min), m = p(l.max) || c - d; n.previousPane = a, n.nextPane = o, n._maxPosition = Math.min(c - g, d + h), n._minPosition = Math.max(d + f, c - m) }, _max: function () { return this._maxPosition }, _min: function () { return this._minPosition }, _stop: function (t) { var n, i, a, o, s, l, c, u, p = this, f = e(t.currentTarget), h = p.owner; return h._panes().children(".k-splitter-overlay").remove(), t.keyCode !== d.keys.ESC && (n = t.position, i = f.prev(), a = f.next(), o = i.data(F), s = a.data(F), l = n - parseInt(i[0].style[p.positioningProperty], 10), c = parseInt(a[0].style[p.positioningProperty], 10) + a[0][p.sizingDomProperty] - n - f[0][p.sizingDomProperty], u = p._element.children(I).filter(function () { return r(e(this).data(F).size) }).length, (!r(o.size) || u > 1) && (r(o.size) && u--, o.size = l + "px"), (!r(s.size) || u > 1) && (s.size = c + "px"), h._resizeHandler()), !1 } } 117} (window.kendo.jQuery), function (e, t) { function n(t) { return e.map(i(t), function (e) { return e.name }).join(", ") } function i(e) { var t = e[0]; return t.files ? r(t.files) : [{ name: s(t.value), extension: o(t.value), size: null}] } function r(t) { return e.map(t, function (e) { return a(e) }) } function a(e) { var t = e.name || e.fileName; return { name: _.htmlEncode(t), extension: o(t), size: e.size || e.fileSize, rawFile: e} } function o(e) { var t = e.match(w); return t ? t[0] : "" } function s(e) { var t = e.lastIndexOf("\\"); return -1 != t ? e.substr(t + 1) : e } function l(t, n, i) { var r, a; n._supportsRemove() && (r = t.data("fileNames"), a = e.map(r, function (e) { return e.name }), n._submitRemove(a, i, function (e, i, a) { n._removeFileEntry(t), n.trigger(T, { operation: "remove", files: r, response: e, XMLHttpRequest: a }) }, function (e) { n.trigger(S, { operation: "remove", files: r, XMLHttpRequest: e }), k("Server response: " + e.responseText) })) } function d(t, n, i) { var r = !1, a = ""; try { a = e.parseJSON(c(t)), r = !0 } catch (o) { i() } r && n(a) } function c(e) { return (e === t || "" === e) && (e = "{}"), e } function u(e) { e.stopPropagation(), e.preventDefault() } function p(e, t, n, i) { var r, a; e.on("dragenter" + t, function () { n(), a = new Date, r || (r = setInterval(function () { var e = new Date - a; e > 100 && (i(), clearInterval(r), r = null) }, 100)) }).on("dragover" + t, function () { a = new Date }) } function f(e) { return e.children(".k-icon").is(".k-loading, .k-success, .k-fail") } function h(t) { return e(t.target).closest(".k-file") } function g() { var n = {}, i = e("meta[name=csrf-token]").attr("content"), r = e("meta[name=csrf-param]").attr("content"); return e("input[name^='__RequestVerificationToken']").each(function () { n[this.name] = this.value }), r !== t && i !== t && (n[r] = i), n } var m, v, _ = window.kendo, b = _.ui.Widget, k = _.logToConsole, w = /\.([^\.]+)$/, y = ".kendoUpload", x = "select", C = "upload", T = "success", S = "error", F = "complete", D = "cancel", E = "progress", A = "remove", I = b.extend({ init: function (t, n) { var i, r, a = this; b.fn.init.call(a, t, n), a.name = t.name, a.multiple = a.options.multiple, a.localization = a.options.localization, i = a.element, a.wrapper = i.closest(".k-upload"), 0 === a.wrapper.length && (a.wrapper = a._wrapInput(i)), a._activeInput(i), a.toggle(a.options.enabled), r = a._ns = y + "-" + _.guid(), i.closest("form").on("submit" + r, e.proxy(a._onParentFormSubmit, a)).on("reset" + r, e.proxy(a._onParentFormReset, a)), a.options.async.saveUrl ? (a._module = a._supportsFormData() ? new v(a) : new m(a), a._async = !0) : a._module = new H(a), a._supportsDrop() && a._setupDropZone(), a.wrapper.delegate(".k-upload-action", "click", e.proxy(a._onFileAction, a)).delegate(".k-upload-selected", "click", e.proxy(a._onUploadSelected, a)).delegate(".k-file", "t:progress", e.proxy(a._onFileProgress, a)).delegate(".k-file", "t:upload-success", e.proxy(a._onUploadSuccess, a)).delegate(".k-file", "t:upload-error", e.proxy(a._onUploadError, a)) }, events: [x, C, T, S, F, D, E, A], options: { name: "Upload", enabled: !0, multiple: !0, showFileList: !0, async: { removeVerb: "POST", autoUpload: !0 }, localization: { select: "Select...", cancel: "Cancel", retry: "Retry", remove: "Remove", uploadSelectedFiles: "Upload files", dropFilesHere: "drop files here to upload", statusUploading: "uploading", statusUploaded: "uploaded", statusFailed: "failed"} }, setOptions: function (e) { var t = this, n = t.element; b.fn.setOptions.call(t, e), t.multiple = t.options.multiple, n.attr("multiple", t._supportsMultiple() ? t.multiple : !1), t.toggle(t.options.enabled) }, enable: function (e) { e = e === t ? !0 : e, this.toggle(e) }, disable: function () { this.toggle(!1) }, toggle: function (e) { e = e === t ? e : !e, this.wrapper.toggleClass("k-state-disabled", e) }, destroy: function () { var t = this; e(document).add(e(".k-dropzone", t.wrapper)).add(t.wrapper.closest("form")).off(t._ns), e(t.element).off(y), b.fn.destroy.call(t) }, _addInput: function (t) { var n = this; t.insertAfter(n.element).data("kendoUpload", n), e(n.element).hide().removeAttr("id").off(y), n._activeInput(t) }, _activeInput: function (t) { var n = this, i = n.wrapper; n.element = t, t.attr("multiple", n._supportsMultiple() ? n.multiple : !1).attr("autocomplete", "off").on("click" + y, function (e) { i.hasClass("k-state-disabled") && e.preventDefault() }).on("focus" + y, function () { e(this).parent().addClass("k-state-focused") }).on("blur" + y, function () { e(this).parent().removeClass("k-state-focused") }).on("change" + y, e.proxy(n._onInputChange, n)) }, _onInputChange: function (t) { var n = this, r = e(t.target), a = n.trigger(x, { files: i(r) }); a ? (n._addInput(r.clone().val("")), r.remove()) : r.trigger("t:select") }, _onDrop: function (t) { var n, i = t.originalEvent.dataTransfer, a = this, o = i.files; u(t), o.length > 0 && (n = a.trigger(x, { files: r(o) }), n || e(".k-dropzone", a.wrapper).trigger("t:select", [o])) }, _enqueueFile: function (t, n) { var i, r, a = this, o = e(".k-upload-files", a.wrapper); return 0 === o.length && (o = e("<ul class='k-upload-files k-reset'></ul>").appendTo(a.wrapper), a.options.showFileList || o.hide()), i = e(".k-file", o), r = e("<li class='k-file'><span class='k-filename' title='" + t + "'>" + t + "</span></li>").appendTo(o).data(n), a._async && r.prepend("<span class='k-icon'></span>"), a.multiple || i.trigger("t:remove"), r }, _removeFileEntry: function (t) { var n, i = t.closest(".k-upload-files"); t.remove(), n = e(".k-file", i), n.find("> .k-fail").length === n.length && this._hideUploadButton(), 0 === n.length && i.remove() }, _fileAction: function (e, t) { var n = { remove: "k-delete", cancel: "k-cancel", retry: "k-retry" }; n.hasOwnProperty(t) && (this._clearFileAction(e), e.append(this._renderAction(n[t], this.localization[t]).addClass("k-upload-action"))) }, _fileState: function (e, t) { var n, i = this.localization, r = { uploading: { cssClass: "k-loading", text: i.statusUploading }, uploaded: { cssClass: "k-success", text: i.statusUploaded }, failed: { cssClass: "k-fail", text: i.statusFailed} }, a = r[t]; a && (n = e.children(".k-icon").text(a.text), n[0].className = "k-icon " + a.cssClass) }, _renderAction: function (t, n) { return "" !== t ? e("<button type='button' class='k-button k-button-icontext'><span class='k-icon " + t + "'></span>" + n + "</button>") : e("<button type='button' class='k-button'>" + n + "</button>") }, _clearFileAction: function (e) { e.find(".k-upload-action").remove() }, _onFileAction: function (t) { var n, i, r, a, o = this; return o.wrapper.hasClass("k-state-disabled") || (n = e(t.target).closest(".k-upload-action"), i = n.find(".k-icon"), r = n.closest(".k-file"), a = { files: r.data("fileNames") }, i.hasClass("k-delete") ? o.trigger(A, a) || r.trigger("t:remove", a.data) : i.hasClass("k-cancel") ? (o.trigger(D, a), r.trigger("t:cancel"), this._checkAllComplete()) : i.hasClass("k-retry") && r.trigger("t:retry")), !1 }, _onUploadSelected: function () { return this.wrapper.trigger("t:saveSelected"), !1 }, _onFileProgress: function (t, n) { var i = e(".k-progress-status", t.target); 0 === i.length && (i = e("<span class='k-progress'><span class='k-state-selected k-progress-status' style='width: 0;'></span></span>").appendTo(e(".k-filename", t.target)).find(".k-progress-status")), i.width(n + "%"), this.trigger(E, { files: h(t).data("fileNames"), percentComplete: n }) }, _onUploadSuccess: function (e, t, n) { var i = h(e); this._fileState(i, "uploaded"), this.trigger(T, { files: i.data("fileNames"), response: t, operation: "upload", XMLHttpRequest: n }), this._supportsRemove() ? this._fileAction(i, A) : this._clearFileAction(i), this._checkAllComplete() }, _onUploadError: function (e, t) { var n = h(e); this._fileState(n, "failed"), this._fileAction(n, "retry"), this.trigger(S, { operation: "upload", files: n.data("fileNames"), XMLHttpRequest: t }), k("Server response: " + t.responseText), this._checkAllComplete() }, _showUploadButton: function () { var t = e(".k-upload-selected", this.wrapper); 0 === t.length && (t = this._renderAction("", this.localization.uploadSelectedFiles).addClass("k-upload-selected")), this.wrapper.append(t) }, _hideUploadButton: function () { e(".k-upload-selected", this.wrapper).remove() }, _onParentFormSubmit: function () { var t, n = this, i = n.element; i.trigger("t:abort"), i.value || (t = e(i), t.attr("disabled", "disabled"), window.setTimeout(function () { t.removeAttr("disabled") }, 0)) }, _onParentFormReset: function () { e(".k-upload-files", this.wrapper).remove() }, _supportsFormData: function () { return "undefined" != typeof FormData }, _supportsMultiple: function () { var e = this._userAgent().indexOf("Windows") > -1; return !(_.support.browser.opera || _.support.browser.safari && e) }, _supportsDrop: function () { var e = this._userAgent().toLowerCase(), t = /chrome/.test(e), n = !t && /safari/.test(e), i = n && /windows/.test(e); return !i && this._supportsFormData() && this.options.async.saveUrl }, _userAgent: function () { return navigator.userAgent }, _setupDropZone: function () { var t, n, i = this; e(".k-upload-button", this.wrapper).wrap("<div class='k-dropzone'></div>"), t = i._ns, n = e(".k-dropzone", i.wrapper).append(e("<em>" + i.localization.dropFilesHere + "</em>")).on("dragenter" + t, u).on("dragover" + t, function (e) { e.preventDefault() }).on("drop" + t, e.proxy(this._onDrop, this)), p(n, t, function () { n.addClass("k-dropzone-hovered") }, function () { n.removeClass("k-dropzone-hovered") }
117), p(e(document), t, function () { n.addClass("k-dropzone-active") }, function () { n.removeClass("k-dropzone-active") }) }, _supportsRemove: function () { return !!this.options.async.removeUrl }, _submitRemove: function (t, n, i, r) { var a = this, o = a.options.async.removeField || "fileNames", s = e.extend(n, g()); s[o] = t, jQuery.ajax({ type: this.options.async.removeVerb, dataType: "json", dataFilter: c, url: this.options.async.removeUrl, traditional: !0, data: s, success: i, error: r }) }, _wrapInput: function (e) { return e.wrap("<div class='k-widget k-upload'><div class='k-button k-upload-button'></div></div>"), e.closest(".k-button").append("<span>" + this.localization.select + "</span>"), e.closest(".k-upload") }, _checkAllComplete: function () { 0 === e(".k-file .k-icon.k-loading", this.wrapper).length && this.trigger(F) } }), H = function (t) { this.name = "syncUploadModule", this.element = t.wrapper, this.upload = t, this.element.bind("t:select", e.proxy(this.onSelect, this)).bind("t:remove", e.proxy(this.onRemove, this)).closest("form").attr("enctype", "multipart/form-data").attr("encoding", "multipart/form-data") }; H.prototype = { onSelect: function (t) { var r, a = this.upload, o = e(t.target); a._addInput(o.clone().val("")), r = a._enqueueFile(n(o), { relatedInput: o, fileNames: i(o) }), a._fileAction(r, A) }, onRemove: function (e) { var t = h(e); t.data("relatedInput").remove(), this.upload._removeFileEntry(t) } }, m = function (t) { this.name = "iframeUploadModule", this.element = t.wrapper, this.upload = t, this.iframes = [], this.element.bind("t:select", e.proxy(this.onSelect, this)).bind("t:cancel", e.proxy(this.onCancel, this)).bind("t:retry", e.proxy(this.onRetry, this)).bind("t:remove", e.proxy(this.onRemove, this)).bind("t:saveSelected", e.proxy(this.onSaveSelected, this)).bind("t:abort", e.proxy(this.onAbort, this)) }, I._frameId = 0, m.prototype = { onSelect: function (t) { var n = this.upload, i = e(t.target), r = this.prepareUpload(i); n.options.async.autoUpload ? this.performUpload(r) : (n._supportsRemove() && this.upload._fileAction(r, A), n._showUploadButton()) }, prepareUpload: function (t) { var r, a, o, s = this.upload, l = e(s.element), d = s.options.async.saveField || t.attr("name"); return s._addInput(t.clone().val("")), t.attr("name", d), r = this.createFrame(s.name + "_" + I._frameId++), this.registerFrame(r), a = this.createForm(s.options.async.saveUrl, r.attr("name")).append(l), o = s._enqueueFile(n(t), { frame: r, relatedInput: l, fileNames: i(t) }), r.data({ form: a, file: o }), o }, performUpload: function (t) { var n, i, r, a = { files: t.data("fileNames") }, o = t.data("frame"), s = this.upload; if (s.trigger(C, a)) s._removeFileEntry(o.data("file")), this.cleanupFrame(o), this.unregisterFrame(o); else { s._hideUploadButton(), o.appendTo(document.body), n = o.data("form").appendTo(document.body), a.data = e.extend({}, a.data, g()); for (i in a.data) r = n.find("input[name='" + i + "']"), 0 === r.length && (r = e("<input>", { type: "hidden", name: i }).appendTo(n)), r.val(a.data[i]); s._fileAction(t, D), s._fileState(t, "uploading"), o.one("load", e.proxy(this.onIframeLoad, this)), n[0].submit() } }, onSaveSelected: function () { var t = this; e(".k-file", this.element).each(function () { var n = e(this), i = f(n); i || t.performUpload(n) }) }, onIframeLoad: function (t) { var n, i = e(t.target); try { n = i.contents().text() } catch (r) { n = "Error trying to get server response: " + r } this.processResponse(i, n) }, processResponse: function (t, n) { var i = t.data("file"), r = this, a = { responseText: n }; d(n, function (n) { e.extend(a, { statusText: "OK", status: "200" }), i.trigger("t:progress", [100]), i.trigger("t:upload-success", [n, a]), r.cleanupFrame(t), r.unregisterFrame(t) }, function () { e.extend(a, { statusText: "error", status: "500" }), i.trigger("t:upload-error", [a]) }) }, 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 = h(e); this.performUpload(t) }, onRemove: function (e, t) { var n = h(e), i = n.data("frame");
117 i ? (this.unregisterFrame(i), this.upload._removeFileEntry(n), this.cleanupFrame(i)) : l(n, this.upload, t) }, 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) { e.stop !== t ? 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) } }, v = function (t) { this.name = "formDataUploadModule", this.element = t.wrapper, this.upload = t, this.element.bind("t:select", e.proxy(this.onSelect, this)).bind("t:cancel", e.proxy(this.onCancel, this)).bind("t:remove", e.proxy(this.onRemove, this)).bind("t:retry", e.proxy(this.onRetry, this)).bind("t:saveSelected", e.proxy(this.onSaveSelected, this)).bind("t:abort", e.proxy(this.onAbort, this)) }, v.prototype = { onSelect: function (t, n) { var i = this.upload, a = this, o = e(t.target), s = n ? r(n) : this.inputFiles(o), l = this.prepareUpload(o, s); e.each(l, function () { i.options.async.autoUpload ? a.performUpload(this) : (i._supportsRemove() && i._fileAction(this, A), i._showUploadButton()) }) }, 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.clone().val(""))), i }, enqueueFiles: function (t) { var n, i, r, a, o = this.upload, s = t.length, l = []; if (o.options.async.batch === !0) n = e.map(t, function (e) { return e.name }).join(", "), a = o._enqueueFile(n, { fileNames: t }), a.data("files", t), l.push(a); else for (i = 0; s > i; i++) r = t[i], n = r.name, a = o._enqueueFile(n, { fileNames: [r] }), a.data("files", [r]), l.push(a); return l }, inputFiles: function (e) { return i(e) }, performUpload: function (t) { var n, i = this.upload, r = this.createFormData(t.data("files")), a = new XMLHttpRequest, o = { files: t.data("fileNames"), XMLHttpRequest: a }; if (i.trigger(C, o)) this.removeFileEntry(t); else { i._fileAction(t, D), i._hideUploadButton(), o.data = e.extend({}, o.data, g()); for (n in o.data) r.append(n, o.data[n]); i._fileState(t, "uploading"), this.postFormData(i.options.async.saveUrl, r, t, a) } }, onSaveSelected: function () { var t = this; e(".k-file", this.element).each(function () { var n = e(this), i = f(n); i || t.performUpload(n) }) }, onCancel: function (e) { var t = h(e); this.stopUploadRequest(t), this.removeFileEntry(t) }, onRetry: function (e) { var t = h(e); this.performUpload(t) }, onRemove: function (e, t) { var n = h(e); n.children(".k-icon").is(".k-success") ? l(n, this.upload, t) : this.removeFileEntry(n) }, postFormData: function (e, t, n, i) { var r = this; n.data("request", i), i.addEventListener("load", function (e) { r.onRequestSuccess.call(r, e, n) }, !1), i.addEventListener(S, function (e) { r.onRequestError.call(r, e, n) }, !1), i.upload.addEventListener("progress", function (e) { r.onRequestProgress.call(r, e, n) }, !1), i.open("POST", e), i.withCredentials = "true", i.send(t) }, createFormData: function (e) { var t, n = new FormData, i = this.upload, r = e.length; for (t = 0; r > t; t++) n.append(i.options.async.saveField || i.name, e[t].rawFile); return n }, onRequestSuccess: function (e, t) { function n() { t.trigger("t:upload-error", [i]) } var i = e.target, r = this; i.status >= 200 && 299 >= i.status ? d(i.responseText, function (e) { t.trigger("t:progress", [100]), t.trigger("t:upload-success", [e, i]), r.cleanupFileEntry(t) }, n) : n() }, onRequestError: function (e, t) { var n = e.target; t.trigger("t:upload-error", [n]) }, 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.children(".k-icon").is(".k-success")) }), i && n.remove()) }, removeFileEntry: function (e) { this.cleanupFileEntry(e), this.upload._removeFileEntry(e) }, onRequestProgress: function (e, t) { var n = Math.round(100 * e.loaded / e.total); t.trigger("t:progress", [n]) }, stopUploadRequest: function (e) { e.data("request").abort() } }, _.ui.plugin(I) } (window.kendo.jQuery), function (e, t) { 118 function n(e) { return e !== t } function i(e, t, n) { return Math.max(Math.min(parseInt(e, 10), 1 / 0 === n ? n : parseInt(n, 10)), parseInt(t, 10)) } function r(e, t) { var n = e.children(x); return n.data("kendoWindow") || n.data("kendo" + t) } function a(t) { return e(k).filter(function () { var n = e(this), i = r(n, t); return i.options.modal && n.is(A) && i.options.visible }).sort(function (t, n) { return +e(t).css("zIndex") - +e(n).css("zIndex") }) } function o(e, t) { return function () { var e = this, n = e.wrapper, i = n[0].style, r = e.options; if (!r.isMaximized && !r.isMinimized) return e.restoreOptions = { width: i.width, height: i.height }, n.find(C).hide().end().find(q).parent().hide().eq(0).before(K.action({ name: "Restore" })), t.call(e), e } } function s(e) { var t = this; t.owner = e, t._draggable = new u(e.wrapper, { filter: C, group: e.wrapper.id + "-resizing", dragstart: h(t.dragstart, t), drag: h(t.drag, t), dragend: h(t.dragend, t) }) } function l(e) { var t = this; t.owner = e, t._draggable = new u(e.wrapper, { filter: y, group: e.wrapper.id + "-moving", dragstart: h(t.dragstart, t), drag: h(t.drag, t), dragend: h(t.dragend, t), dragcancel: h(t.dragcancel, t) }) } var d = window.kendo, c = d.ui.Widget, u = d.ui.Draggable, p = e.isPlainObject, f = d._activeElement, h = e.proxy, g = e.extend, m = e.each, v = d.template, _ = "body", b = ".kendoWindow", k = ".k-window", w = ".k-window-title", y = w + "bar", x = ".k-window-content", C = ".k-resize-handle", T = ".k-overlay", S = "k-content-frame", F = "k-loading", D = "k-state-hover", E = "k-state-focused", A = ":visible", I = "hidden", H = "cursor", N = "open", R = "activate", z = "deactivate", O = "close", M = "refresh", P = "resize", B = "dragstart", L = "dragend", V = "error", W = "overflow", U = "zIndex", q = ".k-window-actions .k-i-minimize,.k-window-actions .k-i-maximize", j = ".k-window-titlebar .k-window-action", G = d.isLocalUrl, $ = c.extend({ init: function (t, i) { var r, a, o, u, f, g, v, _ = this, C = !1, T = i && i.actions && !i.actions.length; c.fn.init.call(_, t, i), i = _.options, t = _.element, f = i.content, T && (i.actions = []), _.appendTo = e(i.appendTo || document.body), _._animations(), f && !p(f) && (f = i.content = { url: f }), t.find("script").filter(function () { return !this.type || this.type.toLowerCase().indexOf("script") >= 0 }).remove(), t.parent().is(_.appendTo) || (t.is(A) ? (a = t.offset(), C = !0) : (o = t.css("visibility"), u = t.css("display"), t.css({ visibility: I, display: "" }), a = t.offset(), t.css({ visibility: o, display: u }))), n(i.visible) && null !== i.visible || (i.visible = t.is(A)), r = _.wrapper = t.closest(k), t.is(".k-content") && r[0] || (t.addClass("k-window-content k-content"), _._createWindow(t, i), r = _.wrapper = t.closest(k), _._dimensions()), a && r.css({ top: a.top, left: a.left }), f && _.refresh(f), i.visible && _.toFront(), g = r.children(x), _._tabindex(g), i.visible && i.modal && _._overlay(r.is(A)).css({ opacity: .5 }), r.on("mouseenter" + b, j, function () { e(this).addClass(D) }).on("mouseleave" + b, j, function () { e(this).removeClass(D) }
118).on("click" + b, j, h(_._windowActionHandler, _)), g.on("keydown" + b, h(_._keydown, _)).on("focus" + b, function () { r.addClass(E) }).on("blur" + b, function () { r.removeClass(E) }), i.resizable && (r.on("dblclick" + b, y, function (t) { return e(t.target).closest(".k-window-action").length || _.toggleMaximization(), this }), m("n e s w se sw ne nw".split(" "), function (e, t) { r.append(K.resizeHandle(t)) }), _.resizing = new s(_)), i.draggable && (_.dragging = new l(_)), v = t.attr("id"), v && (v += "_wnd_title", r.find(y).children(w).attr("id", v), g.attr({ role: "dialog", "aria-labelledby": v })), r.add(r.find(".k-resize-handle,.k-window-titlebar")).on("mousedown" + b, h(_.toFront, _)), _.touchScroller = d.touchScroller(t), _._resizeHandler = function (e) { return _._onDocumentResize(e) }, e(window).on("resize", _._resizeHandler), i.visible && (_.trigger(N), _.trigger(R)), d.notify(_) }, _dimensions: function () { var e = this, t = e.wrapper, n = e.options, r = n.width, a = n.height, o = n.maxHeight; e.title(n.title), m(["minWidth", "minHeight", "maxWidth", "maxHeight"], function (e, i) { var r = n[i]; r && 1 / 0 != r && t.css(i, r) }), o && 1 / 0 != o && e.element.css("maxHeight", o), r && (("" + r).indexOf("%") > 0 ? t.width(r) : t.width(i(r, n.minWidth, n.maxWidth))), a && (("" + a).indexOf("%") > 0 ? t.height(a) : t.height(i(a, n.minHeight, n.maxHeight))), n.visible || t.hide() }, _animations: function () { var e = this.options; e.animation === !1 && (e.animation = { open: { effects: {} }, close: { hide: !0, effects: {}} }) }, setOptions: function (e) { c.fn.setOptions.call(this, e), this._animations(), this._dimensions() }, events: [N, R, z, O, M, P, B, L, V], 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"], modal: !1, resizable: !0, draggable: !0, minWidth: 90, minHeight: 50, maxWidth: 1 / 0, maxHeight: 1 / 0, visible: null, height: null, width: null }, _closable: function () { return e.inArray("close", e.map(this.options.actions, function (e) { return e.toLowerCase() })) > -1 }, _keydown: function (e) { var t, n, r, a, o = this, s = o.options, l = d.keys, c = e.keyCode, u = o.wrapper, p = 10, f = o.options.isMaximized; e.target == e.currentTarget && (c == l.ESC && o._closable() && o._close(!0), !s.draggable || e.ctrlKey || f || (t = d.getOffset(u), c == l.UP ? n = u.css("top", t.top - p) : c == l.DOWN ? n = u.css("top", t.top + p) : c == l.LEFT ? n = u.css("left", t.left - p) : c == l.RIGHT && (n = u.css("left", t.left + p))), s.resizable && e.ctrlKey && !f && (c == l.UP ? (n = !0, a = u.height() - p) : c == l.DOWN && (n = !0, a = u.height() + p), c == l.LEFT ? (n = !0, r = u.width() - p) : c == l.RIGHT && (n = !0, r = u.width() + p), n && (u.css({ width: i(r, s.minWidth, s.maxWidth), height: i(a, s.minHeight, s.maxHeight) }), o.trigger(P))), n && e.preventDefault()) }, _overlay: function (t) { var n = this.appendTo.children(".k-overlay"), i = this.wrapper; return n.length || (n = e("<div class='k-overlay' />")), n.insertBefore(i[0]).toggle(t).css(U, parseInt(i.css(U), 10) - 1), n }, _windowActionHandler: function (n) { var i = e(n.target).closest(".k-window-action").find(".k-icon"), r = this; r._closing || m({ "k-i-close": function () { r._close(!0) }, "k-i-maximize": r.maximize, "k-i-minimize": r.minimize, "k-i-restore": r.restore, "k-i-refresh": r.refresh }, function (e, a) { return i.hasClass(e) ? (n.preventDefault(), a.call(r), !1) : t }) }, center: function () { var t = this.wrapper, n = e(window); return t.css({ left: n.scrollLeft() + Math.max(0, (n.width() - t.width()) / 2), top: n.scrollTop() + Math.max(0, (n.height() - t.height()) / 2) }), this }, title: function (e) { var t = this, n = t.wrapper, i = t.options, r = n.find(y), a = r.children(w), o = r.outerHeight(); return arguments.length ? (e === !1 ? (n.addClass("k-window-titleless"), r.remove()) : (r.length || n.prepend(K.titlebar(g(K, i))), n.css("padding-top", o), r.css("margin-top", -o)), a.text(e), t) : a.text() }, content: function (e) { var t = this.wrapper.children(x), n = t.children(".km-scroll-container"); return t = n[0] ? n : t, e ? (d.destroy(this.element.children()), t.html(e), this) : t.html() }, open: function () { var t, n = this, i = n.wrapper, r = n.options, a = r.animation.open, o = i.children(x), s = o.css(W); return n.trigger(N) || (n._closing = !1, n.toFront(), n.element.focus(), r.visible = !0, r.modal && (t = n._overlay(!1), a.duration ? t.kendoStop().kendoAnimate({ effects: "fade:in", duration: a.duration }).show() : t.css("opacity", .5).show()), i.is(A) || (o.css(W, I), i.show().kendoStop().kendoAnimate({ effects: a.effects, duration: a.duration, complete: function () { n.element.focus(), n.trigger(R), o.css(W, s) } }))), r.isMaximized && (n._documentScrollTop = e(document).scrollTop(), e("html, body").css(W, I)), n }, _close: function (n) { var i, o, s, l = this, d = l.wrapper, c = l.options, u = c.animation.open, p = c.animation.close;
118 d.is(A) && !l.trigger(O, { userTriggered: !!n }) && (l._closing = !0, c.visible = !1, e(k).each(function (t, n) { var i = e(n), r = i.find(x); n != d && r.find("> ." + S).length > 0 && r.children(".k-overlay").remove() }), i = a(c.name), o = c.modal && !i.length, s = c.modal ? l._overlay(!0) : e(t), o ? p.duration ? s.kendoStop().kendoAnimate({ effects: "fade:out", duration: p.duration, hide: !0 }) : s.hide() : i.length && r(i.eq(i.length - 1), c.name)._overlay(!0), d.kendoStop().kendoAnimate({ effects: p.effects || u.effects, reverse: p.reverse === !0, duration: p.duration, complete: function () { d.hide(), l.trigger(z) } })), l.options.isMaximized && (e("html, body").css(W, ""), l._documentScrollTop && l._documentScrollTop > 0 && e(document).scrollTop(l._documentScrollTop)) }, close: function () { return this._close(!1), this }, toFront: function (t) { var n, i, r = this, a = r.wrapper, o = a[0], s = +a.css(U), l = s, d = f(), c = r.element, u = t && t.target ? t.target : null; return e(k).each(function (t, n) { var i = e(n), r = i.css(U), a = i.find(x); isNaN(r) || (s = Math.max(+r, s)), n != o && a.find("> ." + S).length > 0 && a.append(K.overlay) }), (10001 == s || s > l) && a.css(U, s + 2), r.element.find("> .k-overlay").remove(), e(d).is(c) || e(u).is(j + "," + j + " .k-icon,:input,a") || c.find(d).length && c.find(u).length || (c.focus(), n = e(window).scrollTop(), i = parseInt(r.wrapper.position().top, 10), i > 0 && 0 > i - n && (n > 0 ? e(window).scrollTop(i) : r.wrapper.css("top", n))), r }, toggleMaximization: function () { return this._closing ? this : this[this.options.isMaximized ? "restore" : "maximize"]() }, restore: function () { var t = this, n = t.options, i = t.restoreOptions; if (n.isMaximized || n.isMinimized) return t.wrapper.css({ position: "absolute", left: i.left, top: i.top, width: i.width, height: i.height }).find(".k-window-content,.k-resize-handle").show().end().find(".k-window-titlebar .k-i-restore").parent().remove().end().end().find(q).parent().show(), e("html, body").css(W, ""), this._documentScrollTop && this._documentScrollTop > 0 && e(document).scrollTop(this._documentScrollTop), n.isMaximized = n.isMinimized = !1, t.trigger(P), t }, maximize: o("maximize", function () { var t = this, n = t.wrapper, i = n.position(); g(t.restoreOptions, { left: i.left, top: i.top }), n.css({ left: 0, top: 0, position: "fixed" }), this._documentScrollTop = e(document).scrollTop(), e("html, body").css(W, I), t.options.isMaximized = !0, t._onDocumentResize() }), minimize: o("minimize", function () { var e = this; e.wrapper.css("height", ""), e.element.hide(), e.options.isMinimized = !0 }), _onDocumentResize: function () { var t = this, n = t.wrapper, i = e(window); t.options.isMaximized && (n.css({ width: i.width(), height: i.height() - parseInt(n.css("padding-top"), 10) }), t.trigger(P)) }, refresh: function (t) { 119 var i, r, a, o = this, s = o.options, l = e(o.element); 120 return p(t) || (t = { url: t }), t = g({}, s.content, t), r = n(s.iframe) ? s.iframe : t.iframe, a = t.url, a ? (n(r) || (r = !G(a)), r ? (i = l.find("." + S)[0], i ? i.src = a || i.src : l.html(K.contentFrame(g({}, s, { content: t }))), l.find("." + S).unbind("load" + b).on("load" + b, function () { o.trigger(M) })) : o._ajaxRequest(t)) : (t.template && o.content(v(t.template)({})), o.trigger(M)), o 121 }, _ajaxRequest: function (t) { var n = this, i = t.template, r = n.wrapper.find(".k-window-titlebar .k-i-refresh"), a = setTimeout(function () { r.addClass(F) }, 100); e.ajax(g({ type: "GET", dataType: "html", cache: !1, error: h(function (e, t) { n.trigger(V, { status: t, xhr: e }) }, n), complete: function () { clearTimeout(a), r.removeClass(F) }, success: h(function (e) { i && (e = v(i)(e || {})), n.content(e), n.element.prop("scrollTop", 0), n.trigger(M) }, n) }, t)) }, destroy: function () { var t, n, i = this; c.fn.destroy.call(i), d.destroy(i.wrapper), i.resizing && i.resizing.destroy(), i.dragging && i.dragging.destroy(), i.element.children("iframe").remove(), i.wrapper.remove().add(i.wrapper.find(".k-resize-handle,.k-window-titlebar")).off(b), e(window).off("resize", i._resizeHandler), t = a(), n = i.options.modal && !t.length, n ? i._overlay(!1).remove() : t.length > 0 && r(t.eq(t.length - 1), i.options.name)._overlay(!0) }, _createWindow: function () { var t, n, i = this, r = i.element, a = i.options, o = d.support.isRtl(r); a.scrollable === !1 && r.attr("style", "overflow:hidden;"), n = e(K.wrapper(a)), a.title !== !1 && n.append(K.titlebar(g(K, a))), t = r.find("iframe:not(.k-content)").map(function () { var e = this.getAttribute("src"); return this.src = "", e }), n.toggleClass("k-rtl", o).appendTo(i.appendTo).append(r).find("iframe:not(.k-content)").each(function (e) { this.src = t[e] }), n.find(".k-window-title").css(o ? "left" : "right", n.find(".k-window-actions").outerWidth() + 10), r.show() } 122 }), K = { wrapper: v("<div class='k-widget k-window' />"), action: v("<a role='button' href='\\#' class='k-window-action k-link'><span role='presentation' class='k-icon k-i-#= name.toLowerCase() #'>#= name #</span></a>"), titlebar: v("<div class='k-window-titlebar k-header'> <span class='k-window-title'>#= title #</span><div class='k-window-actions'># for (var i = 0; i < actions.length; i++) { ##= action({ name: actions[i] }) ## } #</div></div>"), overlay: "<div class='k-overlay' />", contentFrame: v("<iframe frameborder='0' title='#= title #' class='" + S + "' " + "src='#= content.url #'>" + "This page requires frames in order to show content" + "</iframe>"), resizeHandle: v("<div class='k-resize-handle k-resize-#= data #'></div>") }; s.prototype = { dragstart: function (t) { var n = this, i = n.owner, r = i.wrapper; n.elementPadding = parseInt(i.wrapper.css("padding-top"), 10), n.initialCursorPosition = d.getOffset(r, "position"), n.resizeDirection = t.currentTarget.prop("className").replace("k-resize-handle k-resize-", ""), n.initialSize = { width: r.width(), height: r.height() }, n.containerOffset = d.getOffset(i.appendTo), r.append(K.overlay).find(C).not(t.currentTarget).hide(), e(_).css(H, t.currentTarget.css(H)) }, drag: function (e) { var t, n, r, a, o = this, s = o.owner, l = s.wrapper, d = s.options, c = o.resizeDirection, u = o.containerOffset, p = o.initialCursorPosition, f = o.initialSize, h = Math.max(e.x.location, u.left), g = Math.max(e.y.location, u.to
122p); c.indexOf("e") >= 0 ? (t = h - p.left, l.width(i(t, d.minWidth, d.maxWidth))) : c.indexOf("w") >= 0 && (a = p.left + f.width, t = i(a - h, d.minWidth, d.maxWidth), l.css({ left: a - t - u.left, width: t })), c.indexOf("s") >= 0 ? (n = g - p.top - o.elementPadding, l.height(i(n, d.minHeight, d.maxHeight))) : c.indexOf("n") >= 0 && (r = p.top + f.height, n = i(r - g, d.minHeight, d.maxHeight), l.css({ top: r - n - u.top, height: n })), s.trigger(P) }, dragend: function (t) { var n = this, i = n.owner, r = i.wrapper; return r.find(T).remove().end().find(C).not(t.currentTarget).show(), e(_).css(H, ""), i.touchScroller && i.touchScroller.reset(), 27 == t.keyCode && r.css(n.initialCursorPosition).css(n.initialSize), !1 }, destroy: function () { this._draggable.destroy() } }, l.prototype = { dragstart: function (t) { var n = this.owner, i = n.element, r = i.find(".k-window-actions"), a = d.getOffset(n.appendTo); n.trigger(B), n.initialWindowPosition = d.getOffset(n.wrapper, "position"), n.startPosition = { left: t.x.client - n.initialWindowPosition.left, top: t.y.client - n.initialWindowPosition.top }, n.minLeftPosition = r.length > 0 ? r.outerWidth() + parseInt(r.css("right"), 10) - i.outerWidth() : 20 - i.outerWidth(), n.minLeftPosition -= a.left, n.minTopPosition = -a.top, n.wrapper.append(K.overlay).find(C).hide(), e(_).css(H, t.currentTarget.css(H)) }, drag: function (t) { var n = this.owner, i = { left: Math.max(t.x.client - n.startPosition.left, n.minLeftPosition), top: Math.max(t.y.client - n.startPosition.top, n.minTopPosition) }; e(n.wrapper).css(i) }, _finishDrag: function () { var t = this.owner; t.wrapper.find(C).toggle(!t.options.isMinimized).end().find(T).remove(), e(_).css(H, "") }, dragcancel: function (e) { this._finishDrag(), e.currentTarget.closest(k).css(this.owner.initialWindowPosition) }, dragend: function () { return this._finishDrag(), this.owner.trigger(L), !1 }, destroy: function () { this._draggable.destroy() } }, d.ui.plugin($) 123} (window.kendo.jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.